From 4522ab3fe8bd45ee753ef187448c1e884bbc601f Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Thu, 18 Apr 2024 11:09:27 +0800
Subject: [PATCH] Merge branch 'master' of http://s16s652780.51mypc.cn:49896/r/jczz_web

---
 src/views/property/process/maintenanceFundApply/edit.vue |  161 +++++++++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 147 insertions(+), 14 deletions(-)

diff --git a/src/views/property/process/maintenanceFundApply/edit.vue b/src/views/property/process/maintenanceFundApply/edit.vue
index a7e0dd5..7eb648f 100644
--- a/src/views/property/process/maintenanceFundApply/edit.vue
+++ b/src/views/property/process/maintenanceFundApply/edit.vue
@@ -14,6 +14,24 @@
           <span>审批信息</span>
         </div>
         <avue-form ref="crud" :option="option" v-model="form" @submit="handleSubmit">
+
+          <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>
+
+
           <template slot-scope="{size}" slot="menuForm">
             <el-button type="primary" :size="size" @click="$refs.crud.submit()">保存信息</el-button>
             <!-- <el-button :size="size" @click="$refs.form.resetForm()">自定义清空</el-button> -->
@@ -32,10 +50,10 @@
           <el-timeline>
             <el-timeline-item :key="flow.id" :timestamp="flow.createTime" v-for="flow in flowList" placement="top">
               <el-card shadow="hover">
-                <p>{{flow.assigneeName}} 在 [{{flow.createTime}}] 开始处理 [{{flow.historyActivityName}}] 环节</p>
-                <p v-if="flow.historyActivityDurationTime!==''">任务历时 [{{flow.historyActivityDurationTime}}]</p>
-                <p v-if="flow.comment!==''">批复意见: [{{flow.comment}}]</p>
-                <p v-if="flow.endTime!==''">结束时间: [{{flow.endTime}}]</p>
+                <p>{{ flow.assigneeName }} 在 [{{ flow.createTime }}] 开始处理 [{{ flow.historyActivityName }}] 环节</p>
+                <p v-if="flow.historyActivityDurationTime !== ''">任务历时 [{{ flow.historyActivityDurationTime }}]</p>
+                <p v-if="flow.comment !== ''">批复意见: [{{ flow.comment }}]</p>
+                <p v-if="flow.endTime !== ''">结束时间: [{{ flow.endTime }}]</p>
               </el-card>
             </el-timeline-item>
           </el-timeline>
@@ -60,6 +78,9 @@
       <el-button type="danger" @click="handleDisagree">关闭申请</el-button>
     </div>
 
+    <deitDiscussion ref="DeitDiscussion">
+    </deitDiscussion>
+
   </basic-container>
 </template>
 
@@ -79,8 +100,14 @@
   import {
     completeTask
   } from "@/api/work/work";
-
+  import {
+    getLists
+  } from "@/api/discuss/topics"
+  import deitDiscussion from "../../components/deitDiscussion.vue"
   export default {
+    components: {
+      deitDiscussion
+    },
     data() {
       return {
         taskId: '',
@@ -120,13 +147,14 @@
               search: true,
               type: 'tree',
               dicUrl: `/api/blade-district/district/getDistrictTree`,
+              cascader: ['articleId'],
               props: {
                 label: "name",
                 value: "id"
               },
               defaultExpandedKeys: ["361102003"],
               span: 12,
-              labelWidth: 120,
+              labelWidth: 140,
               width: 220,
               overHidden: true,
               rules: [{
@@ -178,18 +206,22 @@
               }, ],
             },
             {
-              label: "项目分摊方式",
-              prop: "allocationWay",
-              labelWidth: 140,
-              value: '按建筑面积分摊',
+              label: "楼栋",
+              prop: "buildingName",
+              value: '',
               span: 12,
               row: true,
+              rules: [{
+                required: true,
+                message: "请输入楼栋",
+                trigger: "blur",
+              }, ],
             },
             {
               label: '联系人',
               prop: 'linkman',
               span: 12,
-              labelWidth: 120,
+              labelWidth: 140,
               search: true,
               searchSpan: 4,
               rules: [{
@@ -250,6 +282,49 @@
               value: '0.00',
             },
             {
+              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&districtIdList={{districtId}}`,
+              // slot: true,
+              formslot: true,
+              cascader: ['vote'],
+              props: {
+                label: "title",
+                value: "id"
+              },
+              defaultExpandedKeys: ["361102003"],
+              span: 12,
+              width: 260,
+              rules: [{
+                required: true,
+                message: "请选择投票结果",
+                trigger: "blur",
+              }, ],
+              change: (val) => {
+                console.log("val===>", val)
+                // console.log("form===>",this.form)
+
+
+              }
+            },
+
+            {
+              display: false,
+              span: 24,
+              hide: true,
+              prop: "vote",
+              slot: true,
+              label: "投票详情",
+              labelWidth: 140,
+
+            },
+            {
               label: "项目摘要",
               span: 24,
               hide: true,
@@ -301,9 +376,42 @@
               }, ],
             }
           ],
-        }
+        },
+        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();
     },
@@ -413,7 +521,32 @@
         this.$router.push({
           path: `/property/todo`
         });
-      }
+      },
+
+      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>

--
Gitblit v1.9.3