Commit a47260c9 by 胡悦

tjiao

1 parent 4688b7a8
......@@ -174,17 +174,18 @@ export default {
orginizaDialogTitle: '新增组织',
orginizaVisible: false,
orginizaForm: {
enableStatus: true
},
orginizaData: [
{ label: '上级组织', prop: 'departmentName', type: 'input', hidden: false, readonly: true },
{ label: '组织名称', prop: 'name', type: 'input' },
{ label: '显示排序', prop: 'orderNum', type: 'input' },
{ label: '组织状态', prop: 'enableStatus', type: 'radio', children: this.$Constants.ORGINIZA_STATUS }
{ label: '组织状态', prop: 'enableStatus', type: 'switch' }
],
orginizaRules: {
name: [{ required: true, message: '请输入组织名称', trigger: 'blur' }],
orderNum: [{ required: true, message: '请输入显示排序', trigger: 'blur' }],
enableStatus: [{ required: true, message: '请选择组织状态', trigger: 'change' }]
enableStatus: [{ required: true }]
},
// 部门弹窗
num: 1
......@@ -220,11 +221,14 @@ export default {
if (params.id) api = editOrganiza
api(params).then(res => {
if (res.code = 200) {
this.$set(this.$refs.table.store.states.lazyTreeNodeMap, params.id, res.data)
// this.$set(this.$refs.table.store.states.lazyTreeNodeMap, params.id, res.data)
this.$message({
type: 'success',
message: '操作成功'
})
if (this.orginizaDialogTitle == '新增根组织') {
this.getList()
}
this.handleClose()
}
})
......@@ -282,10 +286,18 @@ export default {
type: 'error',
callBack: () => {
deleteOrganiza({ id: id }).then(res => {
this.$message({
type: 'success',
message: '删除成功!'
})
if (res.code == 200) {
this.$message({
type: 'success',
message: '删除成功!'
})
if (this.orginizaDialogTitle == '新增根组织') {
this.getList()
}
} else {
this.$message(res.message)
}
})
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!