wente
2024-01-12 c21bf35f523ee1430fc5fa02ab1b4171492009b6
web/src/views/modules/project/Project-AddOrUpdate.vue
@@ -104,7 +104,7 @@
          <div class="DSTOld-1-Form">
            <zt-form-item class="marginTopAndMarginBottom" label-width="120px" label="所属部门" prop="bizDeptId"
                          style="width: 48%">
              <zt-select v-model="dataForm.bizDeptId" :datas="bizDeptList" onchange="getUserList()" placeholder="所属部门"/>
              <zt-select @input="changeDept" v-model="dataForm.bizDeptId" :datas="bizDeptList" placeholder="所属部门"/>
            </zt-form-item>
            <!-- 是否签署合同 -->
            <zt-form-item label-width="120px" label="是否签署合同" prop="isContract" style="width: 48%">
@@ -176,12 +176,11 @@
        bizDeptIdList: [],
      }
    },
    watch: {
      /*      bizDeptId(val, oldval) {
              alert(1)
              this.getUserList()
            },*/
    },
    // watch: {
    //   "dataForm.bizDeptId"(){
    //     this.getUserList()
    //   }
    // },
    methods: {
      init() {
        this.getInfo()
@@ -201,6 +200,15 @@
          }
          await this.getUserList()
        }
        console.log(this.dataForm, "async getInfo() dataForm")
      },
      changeDept(selected){
        console.log(selected,'selected')
        this.dataForm.projectLeader=''
        this.dataForm.projectTesters=[]
        this.dataForm.projectReviewer=[]
        this.dataForm.projectConfiger=[]
        this.getUserList()
      },
      async getUserList() {
        let res = await this.$http.get(`/project/Project/getUsersLists?deptId=${this.dataForm.bizDeptId}`)
@@ -221,6 +229,11 @@
      },
      // 表单提交
      async formSubmit() {
        console.log(localStorage.getItem('userSecretClass'),"formSubmit")
        if (this.dataForm.secretClass>localStorage.getItem('userSecretClass')){
          this.$alert("当前项目设置的密级高于当前用户的密级,请重新设置")
          return
        }
        if (this.dataForm && this.dataForm.projectTesters instanceof Array) {
          this.dataForm.projectTesters = this.dataForm.projectTesters.join(',')
          console.log(this.dataForm.projectTesters)