| | |
| | | </a-empty> |
| | | </a-card> |
| | | </a-tab-pane> |
| | | <!--<a-tab-pane tab="部门权限" key="2" forceRender>--> |
| | | <a-tab-pane tab="部门权限" key="2" forceRender> |
| | | <!--<depart-auth-modal ref="departAuth"/>--> |
| | | <!--</a-tab-pane>--> |
| | | <a-tab-pane tab="设备列表" key="2" forceRender> |
| | | <depart-m-auth-modal ref="departMAuth"></depart-m-auth-modal> |
| | | </a-tab-pane> |
| | | <a-tab-pane v-if="isDepartType == 0" tab="设备列表" key="3" forceRender> |
| | | <depart-auth-modal ref="departAuth"/> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | |
| | | </a-row> |
| | | </template> |
| | | <script> |
| | | import {mapActions} from 'vuex' |
| | | import DepartMModal from './modules/DepartModal' |
| | | import DepartModal from './modules/DepartList/DepartModal' |
| | | import {queryDepartTreeList, searchByKeywords, deleteByDepartId} from '@/api/api' |
| | | import {httpAction, deleteAction} from '@/api/manage' |
| | | import {JeecgListMixin} from '@/mixins/JeecgListMixin' |
| | | import DepartAuthModal from './modules/DepartList/DepartAuthModal' |
| | | import DepartMAuthModal from './modules/DepartAuthModal' |
| | | |
| | | // 表头 |
| | | const columns = [ |
| | | { |
| | |
| | | mixins: [JeecgListMixin], |
| | | components: { |
| | | DepartAuthModal, |
| | | DepartModal |
| | | DepartModal, |
| | | DepartMModal, |
| | | DepartMAuthModal |
| | | }, |
| | | data() { |
| | | return { |
| | | isDepartType:"", |
| | | iExpandedKeys: [], |
| | | loading: false, |
| | | autoExpandParent: true, |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | ...mapActions(['QueryDepartTree']), |
| | | queryTreeData() { |
| | | this.QueryDepartTree().then(res => { |
| | | if (res.success) { |
| | | this.isDepartType = res.result[0].value |
| | | } else { |
| | | // this.$message.warn(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() =>{ |
| | | }) |
| | | }, |
| | | loadData() { |
| | | this.refresh(); |
| | | }, |
| | |
| | | this.$refs.nodeModal.add(this.currFlowId, '') |
| | | }, |
| | | batchDel: function () { |
| | | console.log(this.checkedKeys) |
| | | if (this.checkedKeys.length <= 0) { |
| | | this.$message.warning('请选择一条记录!') |
| | | // this.$message.warning('请选择一条记录!') |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:"请选择一条记录" |
| | | }); |
| | | } else { |
| | | var ids = '' |
| | | for (var a = 0; a < this.checkedKeys.length; a++) { |
| | |
| | | onOk: function () { |
| | | deleteAction(that.url.deleteBatch, {ids: ids}).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message) |
| | | // that.$message.success(res.message) |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | that.loadTree() |
| | | that.onClearSelected() |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | // that.$message.warning(res.message) |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }) |
| | | } |
| | |
| | | that.departTree.push(temp) |
| | | } |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | // that.$message.warning(res.message) |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }) |
| | | } else { |
| | |
| | | this.selectedKeys = [record.key] |
| | | this.model.parentId = record.parentId |
| | | this.setValuesToForm(record) |
| | | this.$refs.departAuth.show(record.id); |
| | | if(this.isDepartType == 0){ |
| | | this.$refs.departAuth.show(record.id); |
| | | } |
| | | |
| | | this.$refs.departMAuth.show(record.id) |
| | | |
| | | }, |
| | | // 触发onSelect事件时,为部门树右侧的form表单赋值 |
| | |
| | | this.checkedKeys = [] |
| | | this.currSelected = {} |
| | | this.selectedKeys = [] |
| | | this.$refs.departAuth.departId = '' |
| | | if(this.isDepartType == 0){ |
| | | this.$refs.departAuth.departId = '' |
| | | |
| | | } |
| | | this.$refs.departMAuth.departId = '' |
| | | }, |
| | | handleNodeTypeChange(val) { |
| | | this.currSelected.nodeType = val |
| | |
| | | this.$refs.form.validate(valid => { |
| | | if (valid) { |
| | | if (!this.currSelected.id) { |
| | | this.$message.warning('请点击选择要修改部门!') |
| | | // this.$message.warning('请点击选择要修改部门!') |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:"请点击选择要修改部门" |
| | | }); |
| | | return |
| | | } |
| | | |
| | | httpAction(this.url.edit, this.currSelected, 'put').then((res) => { |
| | | if (res.success) { |
| | | this.$message.success('保存成功!') |
| | | // this.$message.success('保存成功!') |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:"保存成功" |
| | | }); |
| | | this.loadTree() |
| | | } else { |
| | | this.$message.error(res.message) |
| | | // this.$message.error(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }) |
| | | } |
| | |
| | | |
| | | }, |
| | | created() { |
| | | this.queryTreeData() |
| | | this.currFlowId = this.$route.params.id |
| | | this.currFlowName = this.$route.params.name |
| | | // this.loadTree() |