席位管理
This commit is contained in:
@@ -30,6 +30,11 @@
|
||||
<img :src="row.avatar ? row.avatar : 'https://cdn.cunwuyun.cn/dvcp/group-img.png'" alt="" class="group-avatar">
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column slot="areaName" label="所属地区" align="center">
|
||||
<template slot-scope="{ row }">
|
||||
<div @click="changeArea(row)" style="cursor: pointer;color:#26f">{{row.areaName || '请选择'}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column slot="option" label="操作" align="center">
|
||||
<template slot-scope="{ row }">
|
||||
<div class="table-options">
|
||||
@@ -64,6 +69,19 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</ai-dialog>
|
||||
<ai-dialog
|
||||
title="所属地区设置"
|
||||
:visible.sync="showArea"
|
||||
:destroyOnClose="true"
|
||||
width="720px"
|
||||
@onConfirm="areaConfirm"
|
||||
>
|
||||
<el-form class="ai-form" :model="areaInfo" label-width="120px" ref="form">
|
||||
<el-form-item prop="areaId" style="width: 100%;" label="所属地区" :rules="[{required: true, message: '请选择所属地区地区', trigger: 'change'}]">
|
||||
<ai-area-get style="width: 400px;" placeholder="所属地区" :instance="instance" v-model="areaInfo.areaId" :name.sync="areaInfo.areaName" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</ai-dialog>
|
||||
</section>
|
||||
|
||||
</template>
|
||||
@@ -89,7 +107,9 @@ export default {
|
||||
tableData: [],
|
||||
total: 0,
|
||||
dialog: false,
|
||||
editInfo: {}
|
||||
editInfo: {},
|
||||
showArea: false,
|
||||
areaInfo: {}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -107,7 +127,7 @@ export default {
|
||||
{ prop: "status", label: '群状态', align: 'center', dict: 'xbotGroupStatus'},
|
||||
{ prop: "managerTpUserName", label: '关联人员', align: 'center'},
|
||||
{ prop: "managerTpUserDeptName", label: '主部门', align: 'center'},
|
||||
{ prop: "areaName", label: '所属地区', align: 'center'},
|
||||
{ slot: "areaName", label: '所属地区', align: 'center'},
|
||||
{ slot: "option"},
|
||||
// { prop: "status", label: '状态'},
|
||||
]
|
||||
@@ -194,7 +214,27 @@ export default {
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
changeArea(row) {
|
||||
this.showArea = true
|
||||
this.areaInfo = {...row}
|
||||
this.$refs['form'].clearValidate();
|
||||
},
|
||||
areaConfirm() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.instance.post(`app/xbotCallback/updateGroupArea?wxid=${this.areaInfo.wxid}&areaId=${this.areaInfo.areaId}&areaName=${this.areaInfo.areaName}`).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.$message.success('所属地区设置成功')
|
||||
this.showArea = false
|
||||
this.getTableData()
|
||||
}
|
||||
})
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user