From daea06fe6b912c640c87e9a40dc8ead31b87ac3c Mon Sep 17 00:00:00 2001
From: Lou <luzhiping@qqyjz.com>
Date: Fri, 23 Feb 2024 15:38:12 +0800
Subject: [PATCH] 更新

---
 src/views/property/propertyCapitalApply.vue |   81 ++++++++++++++++++++++++++--------------
 1 files changed, 52 insertions(+), 29 deletions(-)

diff --git a/src/views/property/propertyCapitalApply.vue b/src/views/property/propertyCapitalApply.vue
index b90545f..7a769fe 100644
--- a/src/views/property/propertyCapitalApply.vue
+++ b/src/views/property/propertyCapitalApply.vue
@@ -9,8 +9,8 @@
       <template slot-scope="{ row, size, index }" slot="menu">
         <el-button :size="size" type="text" v-if="row.applyStatus === 4" @click="handleWork(row)">调整申请
         </el-button>
-        <el-button :size="size" type="text" @click="goDetail(row)">查看申请
-        </el-button>
+        <!-- <el-button :size="size" type="text" @click="goDetail(row)">查看申请
+        </el-button> -->
         <!-- <el-button :size="size" type="text" @click="goDetail(row)">删 除
         </el-button> -->
       </template>
@@ -31,31 +31,19 @@
     </avue-crud>
 
 
-    <el-dialog  title="详情" append-to-body :visible.sync="showDialog" width="80%">
-      <avue-crud :option="optionList"   ref="crud2"  :data="optionData"   :span-method="spanMethod">
-        </avue-crud>
-        </el-dialog>
-
-    <!-- <el-dialog   title="详情" :visible.sync="showDialog" width="80%"  z-index="55555"  :before-close="showDialog = false">
-      <span>
-        1111
-      </span>
-      <avue-crud :option="optionList"   ref="crud2">
-          <template slot="menuLeft" v-if="!editFlag">
-            <el-button type="primary" size="small" plain icon="el-icon-circle-plus-outline" @click="add()">添加
-            </el-button>
-          </template>
+    <el-dialog   title="详情"  append-to-body  :visible.sync="showDialog" width="80%"  >
+      <avue-crud :option="optionList"    :data="topictData"  ref="crud2">
           <template #icon="scope">
             <i :class="scope.row.icon" style="font-size:14px"></i>
           </template>
-           <template #menu="{ row, size }">
+           <!-- <template #menu="{ row, size }">
             <el-button v-if="row.level === 1" :size="size" text type="primary" @click="edit(row)">编辑</el-button>
             <el-button v-if="row.level === 1" :size="size" text type="danger" @click="deletes(row)">删除</el-button>
             <el-button v-if="row.level === 2" :size="size" text type="primary" @click="openUser(row, 1)">
               选择此项人数:{{ row.number }} 详情</el-button>
-          </template>
+          </template> -->
         </avue-crud>
-    </el-dialog>     -->
+    </el-dialog>    
 
 
   </basic-container>
@@ -74,6 +62,9 @@
   } from "vuex"
   import website from '@/config/website'
   import func from "@/util/func"
+  import {
+    getLists,
+  } from "@/api/discuss/topics"
   export default {
     data() {
       return {
@@ -105,10 +96,11 @@
           //stripe:true,
           index: true,
           editBtn: false,
-          viewBtn: false,
+          viewBtn: true,
           delBtn: false,
           selection: true,
           dialogClickModal: false,
+          viewBtnText:"查看申请",
           column: [{
               width: 220,
               overHidden: true,
@@ -135,6 +127,7 @@
               search: false,
               type: 'tree',
               dicUrl: `/api/blade-district/district/getDistrictTree?filterFlag=1`,
+              cascader: ['articleId'],
               props: {
                 label: "name",
                 value: "id"
@@ -314,15 +307,16 @@
               value: '0.00'
             },
             {
+              display:false,
               hide: true,
               parent: false,
               label: "议事标题",
-              prop: "",
+              prop: "articleId",
               search: false,
               type: 'select',
-              dicUrl: "",
+              dicUrl: `/api/blade-article/article/getArticleByDistrictId?type=4&eventType=1&districtIdList={{districtId}}`,
               props: {
-                label: "name",
+                label: "title",
                 value: "id"
               },
               defaultExpandedKeys: ["361102003"],
@@ -337,6 +331,7 @@
                 console.log ("val===>",  val)
                 if(val.value){
                   this.showDialog = true;
+                  this.getDetail( val.value,val.articleRange)
                 }
 
               }
@@ -382,7 +377,7 @@
         data: [],
      
         optionList: {
-          hander:false,
+          header:false,
           menu: false,
           headerAlign: 'center',
           align: 'center',
@@ -395,15 +390,15 @@
           rowParentKey: 'parentId',
           column: [{
               label: '标题',
-              prop: 'title',
+              prop: 'discussContent',
             },
             {
               label: '选项内容',
-              prop: 'content',
+              prop: 'optionContent',
             },
             {
               label: '人数',
-              prop: 'count',
+              prop: 'number',
             }
           ]
         },
@@ -423,8 +418,8 @@
                content:"选项",
                count:2
            },
-
-       ]
+       ],
+       topictData:[]
       }
     },
     watch: {
@@ -439,6 +434,17 @@
 			// 	immediate: true
            
       // }
+
+      'form.districtId': {
+        handler(newData) {
+          const column = this.findObject(this.option.column, "articleId")
+          if (newData) {
+            column.display = true;
+          } else {
+            column.display = false
+          }
+        },
+      },
     },
     computed: {
       ...mapGetters(["permission", "userInfo"]),
@@ -473,6 +479,12 @@
       }
     },
     methods: {
+
+      rowView(){
+          this.showDialog = false;
+      },
+
+
       showStringDispose(row, type) {
         row[type] = !row[type]
       },
@@ -673,6 +685,17 @@
             }
           }
         }
+      },
+      getDetail(articleId,districtId){
+        let params = {
+          level:1,
+          articleId:articleId,
+          districtId:districtId
+        }
+        getLists(1,10,params).then(res => {
+              const data = res.data.data
+              this.topictData = data
+            })
       }
     }
     

--
Gitblit v1.9.3