|
@@ -3,7 +3,7 @@
|
|
|
<toolbar @on-filter="filterData" @on-reset="filterData" />
|
|
|
|
|
|
<div class="m-10 bg-w p-20 br-10">
|
|
|
- <el-button type="primary" icon="el-icon-plus" @click="handleSubmit"
|
|
|
+ <el-button type="primary" icon="el-icon-plus" @click="handleAdd"
|
|
|
>新增</el-button
|
|
|
>
|
|
|
<base-table
|
|
@@ -19,6 +19,7 @@
|
|
|
<script>
|
|
|
import toolbar from './toolbar';
|
|
|
import mxFilterList from '@/mixins/filterList';
|
|
|
+import { getList, delItem } from '@/api/scene';
|
|
|
|
|
|
export default {
|
|
|
name: 'SceneList',
|
|
@@ -27,7 +28,11 @@ export default {
|
|
|
|
|
|
mixins: [
|
|
|
mxFilterList({
|
|
|
- // fetchList: iGetList // 在下方data再声明一个 fetchList: iGetList 同等效果
|
|
|
+ fetchList: getList, // 在下方data再声明一个 fetchList: iGetList 同等效果
|
|
|
+ internalFilterObj: {
|
|
|
+ isDel: false,
|
|
|
+ auditStatus: 1
|
|
|
+ }
|
|
|
})
|
|
|
],
|
|
|
|
|
@@ -35,17 +40,17 @@ export default {
|
|
|
return {
|
|
|
columns: [
|
|
|
{
|
|
|
- key: 'photo',
|
|
|
+ key: 'id',
|
|
|
name: 'ID',
|
|
|
width: '160'
|
|
|
},
|
|
|
{
|
|
|
- key: 'region',
|
|
|
+ key: 'name',
|
|
|
name: '机构名称',
|
|
|
width: '180'
|
|
|
},
|
|
|
{
|
|
|
- key: 'region',
|
|
|
+ key: 'logo',
|
|
|
name: 'Logo',
|
|
|
width: '120'
|
|
|
},
|
|
@@ -55,32 +60,97 @@ export default {
|
|
|
minWidth: '180'
|
|
|
},
|
|
|
{
|
|
|
- key: 'region',
|
|
|
+ key: 'type',
|
|
|
name: '机构类型',
|
|
|
width: '180'
|
|
|
},
|
|
|
{
|
|
|
- key: 'region',
|
|
|
+ key: 'realName',
|
|
|
name: '申请人',
|
|
|
width: '180'
|
|
|
},
|
|
|
{
|
|
|
- key: 'region',
|
|
|
- name: '手机号',
|
|
|
+ key: 'phonenumber',
|
|
|
+ name: '办公号码',
|
|
|
width: '180'
|
|
|
},
|
|
|
{
|
|
|
- key: 'region',
|
|
|
+ key: 'isShow',
|
|
|
name: '状态',
|
|
|
- minWidth: '180'
|
|
|
+ minWidth: '180',
|
|
|
+ type: 'tag',
|
|
|
+ fetchTagType: val => (val ? 'success' : 'info'),
|
|
|
+ tagName: row => (row.isShow ? '显示' : '隐藏')
|
|
|
},
|
|
|
{
|
|
|
key: 'action',
|
|
|
name: '操作',
|
|
|
- minWidth: '180'
|
|
|
+ width: '120',
|
|
|
+ render: (h, { row }) => {
|
|
|
+ const action = [];
|
|
|
+ action.push(
|
|
|
+ h(
|
|
|
+ 'el-button',
|
|
|
+ {
|
|
|
+ props: {
|
|
|
+ type: 'text'
|
|
|
+ },
|
|
|
+ on: {
|
|
|
+ click: () =>
|
|
|
+ this.$BannerItemModal({
|
|
|
+ id: row.id
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ '编辑'
|
|
|
+ )
|
|
|
+ );
|
|
|
+ action.push(
|
|
|
+ h(
|
|
|
+ 'BaseBtn',
|
|
|
+ {
|
|
|
+ props: {
|
|
|
+ popip: true,
|
|
|
+ txt: '删除',
|
|
|
+ type: 'text'
|
|
|
+ },
|
|
|
+ class: 'ml-10',
|
|
|
+ on: {
|
|
|
+ ok: () => this.handleDelItem(row)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ '删除'
|
|
|
+ )
|
|
|
+ );
|
|
|
+
|
|
|
+ return h('div', action);
|
|
|
+ }
|
|
|
}
|
|
|
]
|
|
|
};
|
|
|
+ },
|
|
|
+
|
|
|
+ created() {
|
|
|
+ this.$g_on('scene_reload', this.reload);
|
|
|
+ },
|
|
|
+
|
|
|
+ beforeDestroy() {
|
|
|
+ this.$g_off('scene_reload', this.reload);
|
|
|
+ },
|
|
|
+
|
|
|
+ methods: {
|
|
|
+ handleAdd() {
|
|
|
+ this.$SceneItemModal();
|
|
|
+ },
|
|
|
+ async handleDelItem(item) {
|
|
|
+ const { success, msg } = await delItem({
|
|
|
+ id: item.id
|
|
|
+ });
|
|
|
+ if (success) {
|
|
|
+ this.$success('删除成功!');
|
|
|
+ this.$g_emit('scene_reload');
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
};
|
|
|
</script>
|