智慧农业后台管理页面
圈地打开页面移除表单验证;用户管理取消角色配置,平台配置,导入导出;修复删除用户后再添加新用户报错的问题
3 files modified
80 ■■■■■ changed files
src/views/land/landAdd.vue 7 ●●●● patch | view | raw | blame | history
src/views/system/user.vue 70 ●●●● patch | view | raw | blame | history
src/views/wel/land.vue 3 ●●●●● patch | view | raw | blame | history
src/views/land/landAdd.vue
@@ -217,8 +217,13 @@
            this.$store.commit("clear_polygon")
            this.form.landArea = 0
            this.visible = true
            this.form.farmId = this.$farmId
            this.$nextTick(()=>{
              this.$refs.form.clearValidate()
            })
            this.form.farmId = this.$farmId
            this.form.landName = ""
            this.form.landType = ""
            getDetail(this.form.farmId).then(res => {
                this.farmInfo = res.data.data
                this.url = this.drawMapUrlBase + "/base?type=1&lng=112&lat=24&status=manage&longitude=" + this.farmInfo.longitude + "&latitude=" + this.farmInfo.latitude
src/views/system/user.vue
@@ -52,13 +52,13 @@
                       v-if="permission.user_delete"
                       @click="handleDelete">删 除
            </el-button>
            <el-button type="info"
                       size="small"
                       plain
                       v-if="permission.user_role"
                       icon="el-icon-user"
                       @click="handleGrant">角色配置
            </el-button>
<!--            <el-button type="info"-->
<!--                       size="small"-->
<!--                       plain-->
<!--                       v-if="permission.user_role"-->
<!--                       icon="el-icon-user"-->
<!--                       @click="handleGrant">角色配置-->
<!--            </el-button>-->
            <el-button type="info"
                       size="small"
                       plain
@@ -66,13 +66,13 @@
                       icon="el-icon-refresh"
                       @click="handleReset">密码重置
            </el-button>
            <el-button type="info"
                       size="small"
                       plain
                       v-if="userInfo.role_name.includes('admin')"
                       icon="el-icon-setting"
                       @click="handlePlatform">平台配置
            </el-button>
<!--            <el-button type="info"-->
<!--                       size="small"-->
<!--                       plain-->
<!--                       v-if="userInfo.role_name.includes('admin')"-->
<!--                       icon="el-icon-setting"-->
<!--                       @click="handlePlatform">平台配置-->
<!--            </el-button>-->
            <el-button type="info"
                       size="small"
                       plain
@@ -80,20 +80,20 @@
                       icon="el-icon-coordinate"
                       @click="handleLock">账号解封
            </el-button>
            <el-button type="success"
                       size="small"
                       plain
                       v-if="userInfo.role_name.includes('admin')"
                       icon="el-icon-upload2"
                       @click="handleImport">导入
            </el-button>
            <el-button type="warning"
                       size="small"
                       plain
                       v-if="userInfo.role_name.includes('admin')"
                       icon="el-icon-download"
                       @click="handleExport">导出
            </el-button>
<!--            <el-button type="success"-->
<!--                       size="small"-->
<!--                       plain-->
<!--                       v-if="userInfo.role_name.includes('admin')"-->
<!--                       icon="el-icon-upload2"-->
<!--                       @click="handleImport">导入-->
<!--            </el-button>-->
<!--            <el-button type="warning"-->
<!--                       size="small"-->
<!--                       plain-->
<!--                       v-if="userInfo.role_name.includes('admin')"-->
<!--                       icon="el-icon-download"-->
<!--                       @click="handleExport">导出-->
<!--            </el-button>-->
          </template>
          <template slot-scope="{row}"
                    slot="tenantName">
@@ -243,7 +243,6 @@
          callback();
        }
      };
      const validatePhone = (rule, value, callback) => {
        if (value){
          if (!/^[1]([3-9])[0-9]{9}$/.test(value)) {
@@ -255,7 +254,6 @@
          callback();
        }
      };
      const validateEmail = (rule, value, callback) => {
        const mal = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/
        if (value){
@@ -268,7 +266,6 @@
          callback()
        }
      };
      return {
        form: {},
        search:{},
@@ -922,6 +919,9 @@
        this.form['deptId'] = this.userInfo.dept_id;
        this.form.roleId = this.form.roleId.join(",")
        this.form.farmId = this.form.farmId.join(",")
        if (!row.sex){
          row.sex = 3
        }
        update(this.form).then(() => {
          this.initFlag = false;
          this.onLoad(this.page);
@@ -1087,7 +1087,9 @@
        passwordColumn.display = true;
        password2Column.display = true;
        if(type == "add"&& column.dicData == ""){
          this.form = {}
          this.form = {
            id:null
          }
          this.initData(website.tenantId)
        }
        if (["edit", "view"].includes(type)) {
@@ -1108,6 +1110,10 @@
            //   this.form.postId = this.form.postId.split(",");
            // }
          });
        }else {
          this.form = {
            id:null
          }
        }
        this.initFlag = true;
        done();
src/views/wel/land.vue
@@ -219,6 +219,9 @@
      //计算当前时间
      this.form.landArea = 0
      this.visible = true;
      this.$nextTick(()=>{
        this.$refs.form.clearValidate()
      })
      this.form.farmId = this.$farmId;
      this.form.landName = ""
      this.form.landType = ""