diff --git a/project/oms/apps/AppSystemAccount/AppSystemAccount.vue b/project/oms/apps/AppSystemAccount/AppSystemAccount.vue index 65e51ab0..b615673a 100644 --- a/project/oms/apps/AppSystemAccount/AppSystemAccount.vue +++ b/project/oms/apps/AppSystemAccount/AppSystemAccount.vue @@ -24,15 +24,30 @@
{{ row.name }}
- - - 功能分配 - 删除 - + + + + + + + + + @@ -46,15 +61,18 @@ + + + + + + - - - @@ -90,18 +108,17 @@ export default { return [ // {type: 'selection', align: 'center'}, {label: "姓名", slot: "name"}, - {label: "联系方式", prop: "phone", align: 'center'}, + {label: "手机号", prop: "phone", align: 'center'}, + {label: "所属单位", prop: "unitName", align: 'center'}, {label: "角色", prop: "roleName", align: 'center'}, - {label: "地区", prop: "areaName"}, {slot: "options"} ] }, rules() { return { name: [{required: true, message: "请填写姓名"}], - // organizationId: [{required: true, message: "请选择党组织"}], - // unitId: [{required: true, message: "请选择单位"}], - // areaId: [{required: true, message: '请选择地区', trigger: 'change'}], + password:[{required: true, message: '请输入密码'}], + unitName: [{required: true, message: "请选择所属单位"}], roleId: [{required: true, message: "请选择角色"}], phone: [{required: true, message: "请输入手机号码"}] } @@ -118,7 +135,13 @@ export default { dialogForm: {}, tableData: [], search: {condition: ""}, - ids: [] + ids: [], + isShow: false, + form: { + appids: [], + userId: '' + }, + wechatList: [] } }, methods: { @@ -132,6 +155,53 @@ export default { } }) }, + + chooseWechat (id) { + this.form.userId = id + this.instance.post(`/sysuserwxmp/list?size=1000&userId=${id}`).then(res => { + if (res.code == 0) { + this.form.appids = res.data.records.map(v => v.appId) + } + }) + + this.isShow = true + }, + + getWechatList () { + this.instance.post(`/wxmpconfig/list?size=1000`).then(res => { + if (res.code == 0) { + this.wechatList = res.data.records.map(v => { + return { + dictValue: v.appId, + dictName: v.mpName + } + }) + } + }) + }, + onConfirm () { + this.$refs.form.validate((valid) => { + if (valid) { + this.instance.post(`/sysuserwxmp/addOrUpdate`, { + ...this.form + }).then(res => { + if (res.code == 0) { + this.$message.success('提交成功!') + this.isShow = false + + this.getList() + } + }) + } + }) + }, + + onClose () { + this.form.appids = [] + this.form.userId = '' + this.isShow = false + }, + initDialogData() { //用于优化初始化数据 this.getAccountRoles() @@ -188,6 +258,7 @@ export default { }, created() { this.getTableData() + this.getWechatList() } }