From 36ca71eaff11519ef34eb6e4fb192f24bf3bf47c Mon Sep 17 00:00:00 2001 From: zhuzhuanzhuan Date: 星期四, 12 十月 2023 11:24:24 +0800 Subject: [PATCH] 新增大屏车间管理页面并基本实现基础功能(除车间删除与批量删除与查询) --- src/views/system/modules/UserModal.vue | 29 +++++++++++++++++++++++------ 1 files changed, 23 insertions(+), 6 deletions(-) diff --git a/src/views/system/modules/UserModal.vue b/src/views/system/modules/UserModal.vue index 2abe65b..d46bccf 100644 --- a/src/views/system/modules/UserModal.vue +++ b/src/views/system/modules/UserModal.vue @@ -58,7 +58,7 @@ </a-form-model-item> <!--閮ㄩ棬鍒嗛厤--> - <a-form-model-item label="閮ㄩ棬鍒嗛厤" :labelCol="labelCol" :wrapperCol="wrapperCol" v-show="!departDisabled"> + <a-form-model-item v-if="isDepartType== 0" label="閮ㄩ棬鍒嗛厤" :labelCol="labelCol" :wrapperCol="wrapperCol" v-show="!departDisabled"> <j-select-depart v-model="model.selecteddeparts" :multi="true" @back="backDepartInfo" :backDepart="true" :treeOpera="true">></j-select-depart> </a-form-model-item> @@ -134,6 +134,7 @@ import { disabledAuthFilter } from "@/utils/authFilter" import { duplicateCheck } from '@/api/api' import JSelectProduction from '../../../components/jeecgbiz/JSelectProduction' + import {mapActions} from 'vuex' export default { name: "UserModal", @@ -194,7 +195,9 @@ tenantsOptions: [], rolesOptions:[], nextDepartOptions:[], - nextProductionOptions:[] + nextProductionOptions:[], + isDepartType:'', + } }, created () { @@ -202,6 +205,7 @@ this.headers = {"X-Access-Token":token} this.initRoleList() this.initTenantList() + this.queryTreeData() }, computed:{ uploadAction:function () { @@ -209,6 +213,21 @@ } }, 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(() =>{ + }) + }, add () { this.refresh(); this.edit({activitiSync:'1',userIdentity:1}); @@ -219,9 +238,9 @@ //鏍规嵁灞忓箷瀹藉害鑷�傚簲鎶藉眽瀹藉害 this.resetScreenSize(); that.userId = record.id; + that.model = Object.assign({},{selectedroles:'',selecteddeparts:''}, record); that.model = Object.assign({},{selectedroles:'',selectedProduction:''}, record); - //韬唤涓轰笂绾ф樉绀鸿礋璐i儴闂紝鍚﹀垯涓嶆樉绀� if(this.model.userIdentity==2){ this.departIdShow=true; @@ -233,7 +252,7 @@ that.getUserRoles(record.id); that.getUserDeparts(record.id); } - console.log('that.model=',that.model) + console.log('that.model',that.model) }, isDisabledAuth(code){ return disabledAuthFilter(code); @@ -347,8 +366,6 @@ return c; }) }, - - refresh () { this.userId="" -- Gitblit v1.9.3