LAPTOP-FO2T5SIU\35838 4 ヶ月 前
コミット
2e9e9e562e
共有1 個のファイルを変更した41 個の追加9 個の削除を含む
  1. 41 9
      src/views/reportForms/parkRoomArchives.vue

+ 41 - 9
src/views/reportForms/parkRoomArchives.vue

@@ -10,7 +10,7 @@
           style="width: 100%"
           clearable
           filterable
-          @change="handleSearch"
+          @change="groupChange"
         >
           <el-option
             v-for="item in groupOption"
@@ -29,7 +29,7 @@
           style="width: 100%"
           clearable
           filterable
-          @change="handleSearch"
+          @change="discChange"
         >
           <el-option
             v-for="item in discOption"
@@ -39,6 +39,25 @@
           />
         </el-select>
       </el-col>
+      <el-col :span="2">
+        <div style="text-align: center"><span>单元/楼栋</span></div>
+      </el-col>
+      <el-col :span="4">
+        <el-select
+          v-model="search.buildId"
+          style="width: 100%"
+          clearable
+          filterable
+          @change="handleSearch"
+        >
+          <el-option
+            v-for="item in buildOption"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value"
+          />
+        </el-select>
+      </el-col>
       <el-col :span="2">
         <div style="text-align: center"><span>关键字</span></div>
       </el-col>
@@ -132,14 +151,27 @@ export default {
     },
     mounted() {
         this.getGroupOption()
-        this.getDiscOption()
-        this.getBuildOption()
+        // this.getDiscOption()
+        // this.getBuildOption()
         this.initDict(this.dc_key).then((res) => {
             this.getData()
         })
     },
     methods: {
-
+        groupChange() {
+            this.handleSearch()
+            const data = {
+                groupId: this.search.groupId
+            }
+            this.getDiscOption(data)
+        },
+        discChange() {
+            this.handleSearch()
+            const data = {
+                discId: this.search.discId
+            }
+            this.getBuildOption(data)
+        },
         getData: function() {
             const _this = this
             _this.loading = true
@@ -219,8 +251,8 @@ export default {
                 })
             })
         },
-        getDiscOption() {
-            this.baseDiscRequest('listAll', {}).then((res) => {
+        getDiscOption(data) {
+            this.baseDiscRequest('listAll', data).then((res) => {
                 const data = res.data
                 this.discOption = []
                 data.forEach(item => {
@@ -233,8 +265,8 @@ export default {
                 })
             })
         },
-        getBuildOption() {
-            this.baseBuildRequest('listAll', {}).then((res) => {
+        getBuildOption(data) {
+            this.baseBuildRequest('listAll', data).then((res) => {
                 const data = res.data
                 this.buildOption = []
                 data.forEach(item => {