智慧农业后台管理页面
guoshilong
2022-11-08 082613d446e29e4ec1c16bfaa52345106a498b23
src/views/system/user.vue
@@ -371,6 +371,19 @@
              display: false
            },
            {
              display: false,
              label: "账号状态",
              prop: "bannedState",
              slot: true,
              dicData: [{
                label: '已封禁',
                value: "1"
              }, {
                label: '正常',
                value: "0"
              }],
            },
            {
              label: "所属部门",
              prop: "deptName",
              slot: true,
@@ -858,7 +871,7 @@
        row['deptId'] = this.userInfo.dept_id;
        row.roleId = row.roleId.join(",");
        row.farmId = row.farmId.join(",");
        // row.postId = row.postId.join(",");
        row.id = null
        if (!row.sex){
          row.sex = 3
        }
@@ -1051,6 +1064,7 @@
              type: "success",
              message: "操作成功!"
            });
            this.onLoad(this.page)
          });
      },
      handleImport() {
@@ -1081,15 +1095,14 @@
        })
      },
      beforeOpen(done, type) {
        this.initFlag = true;
        const column = this.findObject(this.option.group, "farmId");
        var passwordColumn = this.findObject(this.option.group,"password");
        var password2Column = this.findObject(this.option.group,"password2")
        passwordColumn.display = true;
        password2Column.display = true;
        if(type == "add"&& column.dicData == ""){
          this.form = {
            id:null
          }
          this.form = {id:null}
          this.initData(website.tenantId)
        }
        if (["edit", "view"].includes(type)) {
@@ -1110,12 +1123,13 @@
            //   this.form.postId = this.form.postId.split(",");
            // }
          });
        }else {
          this.form = {
            id:null
          }
        }
        this.initFlag = true;
        if (type == "add"){
          if (this.$refs.form){
            this.$refs.form.resetForm()
          }
          this.form = {id :null }
        }
        done();
      },
      currentChange(currentPage) {