Commit a47260c9 by 胡悦

tjiao

1 parent 4688b7a8
...@@ -174,17 +174,18 @@ export default { ...@@ -174,17 +174,18 @@ export default {
orginizaDialogTitle: '新增组织', orginizaDialogTitle: '新增组织',
orginizaVisible: false, orginizaVisible: false,
orginizaForm: { orginizaForm: {
enableStatus: true
}, },
orginizaData: [ orginizaData: [
{ label: '上级组织', prop: 'departmentName', type: 'input', hidden: false, readonly: true }, { label: '上级组织', prop: 'departmentName', type: 'input', hidden: false, readonly: true },
{ label: '组织名称', prop: 'name', type: 'input' }, { label: '组织名称', prop: 'name', type: 'input' },
{ label: '显示排序', prop: 'orderNum', type: 'input' }, { label: '显示排序', prop: 'orderNum', type: 'input' },
{ label: '组织状态', prop: 'enableStatus', type: 'radio', children: this.$Constants.ORGINIZA_STATUS } { label: '组织状态', prop: 'enableStatus', type: 'switch' }
], ],
orginizaRules: { orginizaRules: {
name: [{ required: true, message: '请输入组织名称', trigger: 'blur' }], name: [{ required: true, message: '请输入组织名称', trigger: 'blur' }],
orderNum: [{ required: true, message: '请输入显示排序', trigger: 'blur' }], orderNum: [{ required: true, message: '请输入显示排序', trigger: 'blur' }],
enableStatus: [{ required: true, message: '请选择组织状态', trigger: 'change' }] enableStatus: [{ required: true }]
}, },
// 部门弹窗 // 部门弹窗
num: 1 num: 1
...@@ -220,11 +221,14 @@ export default { ...@@ -220,11 +221,14 @@ export default {
if (params.id) api = editOrganiza if (params.id) api = editOrganiza
api(params).then(res => { api(params).then(res => {
if (res.code = 200) { 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({ this.$message({
type: 'success', type: 'success',
message: '操作成功' message: '操作成功'
}) })
if (this.orginizaDialogTitle == '新增根组织') {
this.getList()
}
this.handleClose() this.handleClose()
} }
}) })
...@@ -282,10 +286,18 @@ export default { ...@@ -282,10 +286,18 @@ export default {
type: 'error', type: 'error',
callBack: () => { callBack: () => {
deleteOrganiza({ id: id }).then(res => { deleteOrganiza({ id: id }).then(res => {
if (res.code == 200) {
this.$message({ this.$message({
type: 'success', type: 'success',
message: '删除成功!' 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!