|
@@ -32,8 +32,8 @@
|
|
|
import topInfo from '@/layout/public/top.vue';
|
|
|
import dataTable from '@/components/data-table.vue';
|
|
|
import { mapActions, mapState, createNamespacedHelpers } from 'vuex';
|
|
|
-
|
|
|
const { mapActions: live } = createNamespacedHelpers('live');
|
|
|
+const { mapActions: place } = createNamespacedHelpers('place');
|
|
|
export default {
|
|
|
name: 'index',
|
|
|
props: {},
|
|
@@ -87,7 +87,10 @@ export default {
|
|
|
{ label: '对接会简介', prop: 'desc' },
|
|
|
{ label: '开始时间', prop: 'start_time' },
|
|
|
{ label: '报名截止时间', prop: 'join_end' },
|
|
|
+ { label: '省', prop: 'sheng' },
|
|
|
+ { label: '市', prop: 'shi' },
|
|
|
{ label: '对接会简介', prop: 'desc' },
|
|
|
+
|
|
|
{
|
|
|
label: '审核状态',
|
|
|
prop: 'is_allowed',
|
|
@@ -114,16 +117,32 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
...live(['query', 'delete', 'update']),
|
|
|
+ ...place({ palcequery: 'query', palcefetch: 'fetch' }),
|
|
|
async search({ skip = 0, limit = 10, ...info } = {}) {
|
|
|
if (this.user.role != '1') info.user_id = this.user.uid;
|
|
|
- const res = await this.query({ skip, limit, ...info });
|
|
|
- if (this.$checkRes(res)) {
|
|
|
- for (const val of res.data) {
|
|
|
- val.role = this.user.role;
|
|
|
+ // const res = await this.query({ skip, limit, ...info });
|
|
|
+ // if (this.$checkRes(res)) {
|
|
|
+ // for (const val of res.data) {
|
|
|
+ // val.role = this.user.role;
|
|
|
+ // }
|
|
|
+ let res = await this.query({ skip, limit });
|
|
|
+ for (const val of res.data) {
|
|
|
+ let parent = val.province;
|
|
|
+ let places = val.place;
|
|
|
+ let reslte = await this.palcequery({ level: 1, parent });
|
|
|
+ let resltes = await this.palcequery({ level: 2, parent });
|
|
|
+ var arr = reslte.data.filter(item => item.code === parent);
|
|
|
+ var cre = resltes.data.filter(item => item.code === places);
|
|
|
+ for (const shi of cre) {
|
|
|
+ val.shi = shi.name;
|
|
|
+ }
|
|
|
+ for (const sheng of arr) {
|
|
|
+ val.sheng = sheng.name;
|
|
|
}
|
|
|
- this.$set(this, `list`, res.data || []);
|
|
|
- this.$set(this, `total`, res.total);
|
|
|
}
|
|
|
+ console.log(res.data);
|
|
|
+ this.$set(this, `list`, res.data);
|
|
|
+ this.$set(this, `total`, res.total);
|
|
|
},
|
|
|
toEdit({ data }) {
|
|
|
this.$router.push({ path: './detail', query: { id: data.id } });
|