zhuzhuanzhuan
2023-10-12 36ca71eaff11519ef34eb6e4fb192f24bf3bf47c
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);
        //身份为上级显示负责部门,否则不显示
        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=""