Forráskód Böngészése

开栓修改回显

qinhouyu 1 éve
szülő
commit
02dad3a532
2 módosított fájl, 42 hozzáadás és 34 törlés
  1. 19 23
      src/views/zdsz/openbolt/index.vue
  2. 23 11
      src/views/zdsz/opencheck/index.vue

+ 19 - 23
src/views/zdsz/openbolt/index.vue

@@ -80,22 +80,22 @@
           v-hasPermi="['zdsz:openbolt:remove']"
         >删除</el-button>
       </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="warning"
-          plain
-          icon="el-icon-download"
-          size="mini"
-          @click="handleExport"
-          v-hasPermi="['zdsz:openbolt:export']"
-        >导出</el-button>
-      </el-col>
+      <!--      <el-col :span="1.5">-->
+      <!--        <el-button-->
+      <!--          type="warning"-->
+      <!--          plain-->
+      <!--          icon="el-icon-download"-->
+      <!--          size="mini"-->
+      <!--          @click="handleExport"-->
+      <!--          v-hasPermi="['zdsz:openbolt:export']"-->
+      <!--        >导出</el-button>-->
+      <!--      </el-col>-->
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
     <el-table v-loading="loading" :data="comprehensiveList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
-<!--      <el-table-column label="" align="center" prop="id" v-if="true"/>-->
+      <!--      <el-table-column label="" align="center" prop="id" v-if="true"/>-->
       <el-table-column label="小区" align="center" prop="areaName" />
       <el-table-column label="楼栋" align="center" prop="buildingName" />
       <el-table-column label="单元" align="center" prop="unitName" />
@@ -184,7 +184,7 @@
           </el-select>
         </el-form-item>
         <el-form-item label="安检是否合格" prop="isQualified">
-<!--          <el-input v-model="form.isQualified" placeholder="请输入安检是否合格" />-->
+          <!--          <el-input v-model="form.isQualified" placeholder="请输入安检是否合格" />-->
           <el-select v-model="form.isQualified" placeholder="请选择安检是否合格" filterable>
             <el-option
               v-for="obj in dict.type.pass_check"
@@ -195,7 +195,7 @@
           </el-select>
         </el-form-item>
         <el-form-item label="是否维修" prop="isMaintenance">
-<!--          <el-input v-model="form.isMaintenance" placeholder="请输入是否维修" />-->
+          <!--          <el-input v-model="form.isMaintenance" placeholder="请输入是否维修" />-->
           <el-select v-model="form.isMaintenance" placeholder="请选择是否维修" filterable>
             <el-option
               v-for="obj in dict.type.is_repair"
@@ -257,7 +257,7 @@ export default {
         buildingId: undefined,
         unitId: undefined,
         houseId: undefined,
-        type: 1,
+        type: 2,
         isQualified: undefined,
         isMaintenance: undefined,
       },
@@ -314,7 +314,6 @@ export default {
     },
     getUnits(id) {
       this.houses = []
-      this.queryParams.houseId = undefined
       this.queryParams.unitId = undefined
       getUnits(this.queryParams.areaId,id).then(res => {
         this.units = res.data
@@ -336,7 +335,6 @@ export default {
     },
     getHouses() {
       this.houses = []
-      this.queryParams.houseId = undefined
       getHouses(this.queryParams.unitId).then(res => {
         this.houses = res.data;
       });
@@ -353,7 +351,6 @@ export default {
     },
     getUnits1(id) {
       this.houses = []
-      this.form.houseId = undefined
       this.form.unitId = undefined
       getUnits(this.form.areaId,id).then(res => {
         this.units = res.data
@@ -361,7 +358,6 @@ export default {
     },
     getHouses1() {
       this.houses = []
-      this.form.houseId = undefined
       getHouses(this.form.unitId).then(res => {
         this.houses = res.data;
       });
@@ -388,7 +384,7 @@ export default {
         buildingId: undefined,
         unitId: undefined,
         houseId: undefined,
-        type: 1,
+        type: 2,
         isQualified: undefined,
         isMaintenance: undefined,
         remark: undefined,
@@ -420,7 +416,7 @@ export default {
     handleAdd() {
       this.reset();
       this.open = true;
-      this.title = "添加开栓";
+      this.title = "添加安检";
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
@@ -431,7 +427,7 @@ export default {
         this.loading = false;
         this.form = response.data;
         this.open = true;
-        this.title = "修改开栓";
+        this.title = "修改安检";
       });
     },
     /** 提交按钮 */
@@ -462,7 +458,7 @@ export default {
     /** 删除按钮操作 */
     handleDelete(row) {
       const ids = row.id || this.ids;
-      this.$modal.confirm('是否确认删除开栓为"' + ids + '"的数据项?').then(() => {
+      this.$modal.confirm('是否确认删除安检为"' + ids + '"的数据项?').then(() => {
         this.loading = true;
         return delComprehensive(ids);
       }).then(() => {
@@ -476,7 +472,7 @@ export default {
     },
     /** 导出按钮操作 */
     handleExport() {
-      this.download('zdsz/comprehensive/export', {
+      this.download('zdsz/openbolt/export', {
         ...this.queryParams
       }, `comprehensive_${new Date().getTime()}.xlsx`)
     }

+ 23 - 11
src/views/zdsz/opencheck/index.vue

@@ -80,16 +80,16 @@
           v-hasPermi="['zdsz:openbolt:remove']"
         >删除</el-button>
       </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="warning"
-          plain
-          icon="el-icon-download"
-          size="mini"
-          @click="handleExport"
-          v-hasPermi="['zdsz:openbolt:export']"
-        >导出</el-button>
-      </el-col>
+<!--      <el-col :span="1.5">-->
+<!--        <el-button-->
+<!--          type="warning"-->
+<!--          plain-->
+<!--          icon="el-icon-download"-->
+<!--          size="mini"-->
+<!--          @click="handleExport"-->
+<!--          v-hasPermi="['zdsz:openbolt:export']"-->
+<!--        >导出</el-button>-->
+<!--      </el-col>-->
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
@@ -373,6 +373,9 @@ export default {
     cancel() {
       this.open = false;
       this.reset();
+      this.builds = []
+      this.units = []
+      this.houses = []
     },
     // 表单重置
     reset() {
@@ -418,6 +421,15 @@ export default {
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
+      getHouses().then(res => {
+        this.houses = res.data;
+      });
+      getUnits().then(res => {
+        this.units = res.data
+      });
+      getBuildings().then(res => {
+        this.builds = res.data
+      })
       this.loading = true;
       this.reset();
       const id = row.id || this.ids
@@ -470,7 +482,7 @@ export default {
     },
     /** 导出按钮操作 */
     handleExport() {
-      this.download('zdsz/comprehensive/export', {
+      this.download('zdsz/openbolt/export', {
         ...this.queryParams
       }, `comprehensive_${new Date().getTime()}.xlsx`)
     }