From ab701df859cd79ae036f8cc86268137d2c8da8ee Mon Sep 17 00:00:00 2001
From: guanqb <18720758508@163.com>
Date: Thu, 22 Feb 2024 18:00:56 +0800
Subject: [PATCH] 消防自查导出、消防自查和场所检查增加场所类别字段

---
 src/views/article/components/deitDiscussion.vue |   56 +++++++++++++++++++++++++++++++++++++++++++-------------
 1 files changed, 43 insertions(+), 13 deletions(-)

diff --git a/src/views/article/components/deitDiscussion.vue b/src/views/article/components/deitDiscussion.vue
index e7ea244..abce4aa 100644
--- a/src/views/article/components/deitDiscussion.vue
+++ b/src/views/article/components/deitDiscussion.vue
@@ -115,11 +115,17 @@
               prop: 'discussContent',
               type: 'input',
               row: true,
+              rules: [{
+                required: true,
+                message: '请输入议题',
+                trigger: 'blur'
+              }],
             },
             {
               label: '选项范围',
               prop: 'optionRange',
               type: 'radio',
+              value: 0,
               button: true,
               row: true,
               dicData: [{
@@ -128,14 +134,19 @@
               }, {
                 label: '单选',
                 value: 0
-              }]
+              }],
+              rules: [{
+                required: true,
+                message: '请选项范围',
+                trigger: 'blur'
+              }],
             },
-            {
-              label: '排序',
-              prop: 'sort',
-              controlsPosition: '',
-              type: 'number'
-            },
+            // {
+            //   label: '排序',
+            //   prop: 'sort',
+            //   controlsPosition: '',
+            //   type: 'number'
+            // },
             {
               label: '选项内容',
               prop: 'children',
@@ -200,7 +211,7 @@
           calcHeight: 54,
           dialogWidth: 950,
           tip: false,
-          border: false,
+          border: true,
           //stripe:true,
           index: true,
           editBtn: false,
@@ -249,6 +260,8 @@
           total: 0
         },
         query: {},
+        newData: {},
+        articleRange: {},
       }
     },
 
@@ -262,14 +275,22 @@
       },
 
       searchReset() {
-        this.query = {}
-        this.getUserPage(this.userPage)
+        if (this.articleRange) {
+          this.query.districtId = this.newData.articleRange
+        }
+        this.query.articleId = this.articleId
+        this.userPage.currentPage = 1
+        this.getUserPage(this.userPage, this.query)
       },
 
       searchChange(params, done) {
+        if (this.articleRange) {
+          this.query.districtId = this.newData.articleRange
+        }
         this.query = params
+        this.query.articleId = this.articleId
         this.userPage.currentPage = 1
-        this.getUserPage(this.userPage, params)
+        this.getUserPage(this.userPage, this.query)
         done()
       },
       initData(newData) {
@@ -278,6 +299,8 @@
         this.articleId = newData.id
         this.query.level = 1
         this.query.articleId = this.articleId
+        this.newData = newData
+        this.query.districtId = newData.articleRange
         this.onLoad(this.userPage, this.query)
       },
       // initData(newData) {
@@ -400,13 +423,20 @@
       openUser(row, type = 0) {
         this.popupTableUserShow = true
         this.query = {}
+        this.articleId = row.id
+        let districtId
         if (type == 0) {
+          this.newData = row
+          districtId = this.newData.articleRange
           this.userParams = {
-            articleId: row.id
+            articleId: row.id,
+            districtId: districtId
           }
         } else {
+          districtId = this.newData.articleRange
           this.userParams = {
-            topicsId: row.id
+            topicsId: row.id,
+            districtId: districtId
           }
         }
         this.getUserPage(this.userPage, this.userParams)

--
Gitblit v1.9.3