Browse Source

08-15提交

duanxiaoduan 2 years ago
parent
commit
aa0a38790c
1 changed files with 8 additions and 81 deletions
  1. 8 81
      src/views/basicData/groupColumn/index.vue

+ 8 - 81
src/views/basicData/groupColumn/index.vue

@@ -102,25 +102,7 @@
           <template slot-scope="scope">
             <el-switch v-model="scope.row.enable" :disabled="scope.row.NoEdit==true" active-color="#13ce66" inactive-color="#ff4949" :active-value="1" :inactive-value="0" @change="handleEnableChange(scope.$index, scope.row)" />
           </template>
-        </el-table-column>
-        <!-- 现代牧业专用 -->
-        <el-table-column label="牛舍类型" min-width="150px" align="center">
-          <template slot-scope="scope">
-            <span v-if="scope.row.NoEdit">{{ scope.row.class }}</span>
-            <el-select v-if="scope.row.Edit" v-model="scope.row.classid" filterable class="filter-item" style="width: 95%;padding:10px 0;">
-              <el-option v-for="item in barClassList" :key="item.id" :label="item.name" :value="item.id" />
-            </el-select>
-          </template>
-        </el-table-column>
-        <el-table-column label="牛群" min-width="150px" align="center">
-          <template slot-scope="scope">
-            <span v-if="scope.row.NoEdit">{{ scope.row.scopeherd }}</span>
-            <el-select v-if="scope.row.Edit" v-model="scope.row.scopeherdid" filterable class="filter-item" style="width: 95%;padding:10px 0;">
-              <el-option v-for="item in scopeherdList" :key="item.id" :label="item.name" :value="item.id" />
-            </el-select>
-          </template>
-        </el-table-column>
-        <!-- 现代牧业专用 -->
+        </el-table-column>
         <el-table-column label="操作" align="center" width="80" class-name="small-padding fixed-width" fixed="right">
           <template slot-scope="{row}">
             <!-- 新增 -->
@@ -316,35 +298,8 @@ export default {
       }
 
       this.table.temp.isstart = row.isstart
-      this.table.temp.enable = row.enable
-      // 现代牧业专用
-      this.table.temp.classid = row.classid
-      this.table.temp.scopeherdid = row.scopeherdid
-      // 现代牧业专用
+      this.table.temp.enable = row.enable
       // 检验用户名称/角色是否为空
-      if (this.table.temp.bname == '' && this.table.temp.bcode == '' && this.table.temp.classid == ''&& this.table.temp.scopeherdid == '') {
-        this.$message({ type: 'error', message: '栏舍名称/栏舍编号/牛舍类型/牛群不能为空', duration: 2000 })
-        return false
-      } else if (this.table.temp.bcode == '' && this.table.temp.classid == ''&& this.table.temp.scopeherdid == '') {
-        this.$message({ type: 'error', message: '栏舍编号/牛舍类型/牛群不能为空', duration: 2000 })
-        return false
-      } else if (this.table.temp.classid == ''&& this.table.temp.scopeherdid == '') {
-        this.$message({ type: 'error', message: '牛舍类型/牛群不能为空', duration: 2000 })
-        return false
-      } else if (this.table.temp.bname == '') {
-        this.$message({ type: 'error', message: '栏舍名称不能为空', duration: 2000 })
-        return false
-      } else if (this.table.temp.bcode == '') {
-        this.$message({ type: 'error', message: '栏舍编号不能为空', duration: 2000 })
-        return false
-      }else if (this.table.temp.classid == '') {
-        this.$message({ type: 'error', message: '牛舍类型不能为空', duration: 2000 })
-        return false
-      } else if (this.table.temp.scopeherdid == '') {
-        this.$message({ type: 'error', message: '牛群不能为空', duration: 2000 })
-        return false
-      }
-      // 现代牧业专用
       if (this.table.temp.bname == '' && this.table.temp.bcode == '') {
         this.$message({ type: 'error', message: '栏舍名称/栏舍编号/牛舍类型/牛群不能为空', duration: 2000 })
         return false
@@ -355,7 +310,7 @@ export default {
         this.$message({ type: 'error', message: '栏舍编号不能为空', duration: 2000 })
         return false
       }
-	  // 现代牧业专用
+      
       // if (this.table.temp.bcode.length > 8) {
       //   this.$message({ type: 'error', message: '栏舍编号请输入1-8位数字', duration: 2000 })
       //   return false
@@ -452,46 +407,18 @@ export default {
       this.table.temp.autosecondname = this.table.temp.autosecondname
       this.table.temp.isstart = row.isstart
       this.table.temp.enable = row.enable
-      this.table.temp.id = row.id
-      // 现代牧业专用
-      this.table.temp.classid = row.classid
-      this.table.temp.scopeherdid = row.scopeherdid
-      // 现代牧业专用
+      this.table.temp.id = row.id
       // 检验用户名称/角色是否为空
-      // 现代牧业专用
-      if (this.table.temp.bname == '' && this.table.temp.bcode == '' && this.table.temp.classid == ''&& this.table.temp.scopeherdid == '') {
-        this.$message({ type: 'error', message: '栏舍名称/栏舍编号/牛舍类型/牛群不能为空', duration: 2000 })
-        return false
-      } else if (this.table.temp.bcode == '' && this.table.temp.classid == ''&& this.table.temp.scopeherdid == '') {
-        this.$message({ type: 'error', message: '栏舍编号/牛舍类型/牛群不能为空', duration: 2000 })
-        return false
-      } else if (this.table.temp.classid == ''&& this.table.temp.scopeherdid == '') {
-        this.$message({ type: 'error', message: '牛舍类型/牛群不能为空', duration: 2000 })
+      if (this.table.temp.bname == '' && this.table.temp.bcode == '') {
+        this.$message({ type: 'error', message: '栏舍名称/栏舍编号不能为空', duration: 2000 })
         return false
-      } else if (this.table.temp.bname == '') {
+      }else if (this.table.temp.bname == '') {
         this.$message({ type: 'error', message: '栏舍名称不能为空', duration: 2000 })
         return false
       } else if (this.table.temp.bcode == '') {
         this.$message({ type: 'error', message: '栏舍编号不能为空', duration: 2000 })
         return false
-      }else if (this.table.temp.classid == '') {
-        this.$message({ type: 'error', message: '牛舍类型不能为空', duration: 2000 })
-        return false
-      } else if (this.table.temp.scopeherdid == '') {
-        this.$message({ type: 'error', message: '牛群不能为空', duration: 2000 })
-        return false
-      }
-      // 现代牧业专用
-      // if (this.table.temp.bname == '' && this.table.temp.bcode == '') {
-      //   this.$message({ type: 'error', message: '栏舍名称/栏舍编号/牛舍类型/牛群不能为空', duration: 2000 })
-      //   return false
-      // }else if (this.table.temp.bname == '') {
-      //   this.$message({ type: 'error', message: '栏舍名称不能为空', duration: 2000 })
-      //   return false
-      // } else if (this.table.temp.bcode == '') {
-      //   this.$message({ type: 'error', message: '栏舍编号不能为空', duration: 2000 })
-      //   return false
-      // }
+      }
       if (this.table.temp.allowratio !== '') {
         console.log(this.table.temp.allowratio)
         const allowratio = /^[0-9]\d*$/