From 953890b950f73a64a538238f207ee43684059c78 Mon Sep 17 00:00:00 2001
From: Lou <luzhiping@qqyjz.com>
Date: Tue, 27 Feb 2024 10:48:11 +0800
Subject: [PATCH] 维修基金相关页面修改

---
 src/views/gzll/process/maintenanceFundApply/detail.vue |  142 ++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 138 insertions(+), 4 deletions(-)

diff --git a/src/views/gzll/process/maintenanceFundApply/detail.vue b/src/views/gzll/process/maintenanceFundApply/detail.vue
index 502caad..3934e70 100644
--- a/src/views/gzll/process/maintenanceFundApply/detail.vue
+++ b/src/views/gzll/process/maintenanceFundApply/detail.vue
@@ -10,7 +10,25 @@
         <div slot="header">
           <span>审批信息</span>
         </div>
-        <avue-form :option="option" :value="form"></avue-form>
+        <avue-form :option="option" :value="form">
+        
+          <template slot-scope="{ row, size, index }" slot="vote">
+            <div>{{ topicTitle }}</div>
+            <el-table :data="topictData" v-if="topictData.length">
+              <el-table-column width="300" property="optionContent" label="选项"
+                label-class-name="workOrderStyle"></el-table-column>
+              <el-table-column width="300" property="number" label="人数" label-class-name="workOrderStyle">
+              </el-table-column>
+              <el-table-column width="300">
+                <template slot-scope="scope">
+                  <el-button slot="reference" type="primary" size="mini"
+                    @click="openUserPopup(scope.row, 1)">详情</el-button>
+                </template>
+              </el-table-column>
+            </el-table>
+          </template>
+        
+        </avue-form>
         <!-- <el-form-item label="申请人">
           <el-input :disabled="true" v-model="form.flow.assigneeName" />
         </el-form-item>
@@ -56,6 +74,8 @@
         </el-row>
       </el-card>
     </el-form>
+    <deitDiscussion ref="DeitDiscussion">
+    </deitDiscussion>
   </basic-container>
 </template>
 
@@ -71,8 +91,14 @@
     add,
     getPropertyCapitalApply
   } from "@/api/property/propertyCapitalApply";
-
-  export default {
+  import {
+  getLists
+} from "@/api/discuss/topics"
+import deitDiscussion from "../../components/deitDiscussion.vue"
+export default {
+  components: {
+    deitDiscussion
+  },
     data() {
       return {
         businessId: '',
@@ -250,6 +276,55 @@
               value: '0.00',
               disabled: true
             },
+
+            {
+          disabled:true,
+          display: false,
+          hide: true,
+          parent: false,
+          label: "投票结果",
+          prop: "articleId",
+          search: false,
+          viewDisabled: false,
+          type: 'select',
+          dicUrl: `/api/blade-article/article/getArticleByDistrictId?type=4&eventType=1&districtId={{districtId}}`,
+          cascader: ['vote'],
+          props: {
+            label: "title",
+            value: "id"
+          },
+          defaultExpandedKeys: ["361102003"],
+          span: 12,
+          labelWidth:140,
+          rules: [{
+            required: true,
+            message: "请选择投票结果",
+            trigger: "blur",
+          },],
+          change: (val) => {
+            console.log("val===>", val)
+            // console.log("form===>",this.form)
+            if (val.value && !this.form.id) {
+              this.articleRange = val.articleRange;
+              // this.showDialog = true;
+              // this.getDetail(val.value, val.articleRange)
+            }
+
+          }
+        },
+
+        {
+          disabled: true,
+          display: false,
+          span: 24,
+          hide: true,
+          prop: "vote",
+          slot: true,
+          label: "投票详情",
+          labelWidth: 140,
+
+        },
+
             {
               label: "项目摘要",
               span: 24,
@@ -291,9 +366,41 @@
               }, ],
             }
           ],
+        },
+        topictData: [],
+      topicTitle: "",
+      articleRange: ""
+      }
+    },
+
+
+    watch: {
+    'form.districtId': {
+      handler(newData) {
+        const column = this.findObject(this.option.column, "articleId")
+        if (newData && this.form.articleId) {
+          column.display = true;
+        } else {
+          column.display = false
         }
       }
     },
+
+
+    'form.articleId': {
+      handler(newData) {
+        this.getVoteDetail(this.form.articleId, this.articleRange)
+        const column = this.findObject(this.option.column, "vote")
+        if (newData) {
+          column.display = true;
+        } else {
+          column.display = false
+        }
+      }
+    },
+
+  },
+
     created() {
       this.init();
     },
@@ -319,7 +426,34 @@
         this.$router.push({
           path: `/work/start`
         });
+      },
+      getVoteDetail(articleId, districtId) {
+      let params = {
+        level: 1,
+        articleId: articleId,
+        districtId: districtId
       }
+      getLists(1, 10, params).then(res => {
+        const data = res.data.data
+        if (data.length) {
+          this.topictData = data[0].children;
+          this.topicTitle = data[0].discussContent;
+        }
+      })
+    },
+
+    openUserPopup(row) {
+      this.$refs.DeitDiscussion.openUser(row, 1, [this.form.districtId])
+    },
     }
   }
-</script>
\ No newline at end of file
+</script>
+
+
+<style>
+
+
+.workOrderStyle {
+  font-weight: normal;
+}
+</style>
\ No newline at end of file

--
Gitblit v1.9.3