From 34dbf82112e28c111ffb2efdf2653ee42df80b21 Mon Sep 17 00:00:00 2001
From: lin <sbla5888@163.com>
Date: Wed, 28 Feb 2024 14:15:49 +0800
Subject: [PATCH] 街道管理员查询不出物业公司(物业公司加一列)

---
 src/views/article/discussionManage.vue |   84 ++++++++++++++++++++++++++++--------------
 1 files changed, 56 insertions(+), 28 deletions(-)

diff --git a/src/views/article/discussionManage.vue b/src/views/article/discussionManage.vue
index aca6adc..895d934 100644
--- a/src/views/article/discussionManage.vue
+++ b/src/views/article/discussionManage.vue
@@ -41,8 +41,9 @@
             </template>
 
             <template slot-scope="{ row, size }" slot="iscomment">
-                <el-tag :size="size" :type="showStatus(row.iscomment, 2).type" v-text="showStatus(row.iscomment, 2).text">
-                </el-tag>
+                <el-switch @change="iscommentInput($event, row)" v-model="row.iscomment" :active-value="'1'"
+                    :inactive-value="'0'" active-color="#13ce66" inactive-color="#ccc">
+                </el-switch>
             </template>
         </avue-crud>
 
@@ -130,7 +131,7 @@
                 calcHeight: 54,
                 dialogWidth: 950,
                 tip: false,
-                border: false,
+                border: true,
                 //stripe:true,
                 index: true,
                 viewBtn: false,
@@ -158,7 +159,7 @@
                     span: 24,
                     minRows: 2,
                     tags: true,
-                    type: "cascader",
+                    type: "tree",
                     multiple: true,
                     dicData: [],
                     rules: [{
@@ -189,7 +190,7 @@
                 },
                 {
                     width: 110,
-                    label: "文章类型",
+                    label: "议事类型",
                     prop: "articleType",
                     addDisplay: true,
                     editDisplay: true,
@@ -205,29 +206,29 @@
                     type: "tree",
                     rules: [{
                         required: true,
-                        message: "请选择文章类型",
+                        message: "请选择议事类型",
                         trigger: "blur",
                     },],
                 },
-                {
-                    label: "发布时间",
-                    prop: "dateTime",
-                    type: "daterange",
-                    format: "yyyy-MM-dd",
-                    valueFormat: "yyyy-MM-dd",
-                    searchSpan: 6,
-                    searchRange: true,
-                    hide: true,
-                    addDisplay: false,
-                    editDisplay: false,
-                    viewDisplay: false,
-                    search: true,
-                    rules: [{
-                        required: true,
-                        message: "请选择发布时间",
-                        trigger: "blur",
-                    },],
-                },
+                // {
+                //   label: "发布时间",
+                //   prop: "dateTime",
+                //   type: "daterange",
+                //   format: "yyyy-MM-dd",
+                //   valueFormat: "yyyy-MM-dd",
+                //   searchSpan: 6,
+                //   searchRange: true,
+                //   hide: true,
+                //   addDisplay: false,
+                //   editDisplay: false,
+                //   viewDisplay: false,
+                //   search: true,
+                //   rules: [{
+                //     required: true,
+                //     message: "请选择发布时间",
+                //     trigger: "blur",
+                //   }, ],
+                // },
                 {
                     width: 100,
                     label: "发布时间",
@@ -235,6 +236,10 @@
                     type: "date",
                     format: "yyyy-MM-dd",
                     valueFormat: "yyyy-MM-dd HH:mm:ss",
+                    search: true,
+                    addDisplay: false,
+                    editDisplay: false,
+                    viewDisplay: false,
                 },
                 {
                     width: 100,
@@ -486,8 +491,29 @@
         }
     },
     methods: {
+        iscommentInput (e, data) {
+            upcomment(data.id, e).then(() => {
+                this.$message({
+                    type: "success",
+                    message: "操作成功!",
+                })
+            })
+        },
+
         openEditPopup (row) {
-            this.$refs.DeitDiscussion.initData(row)
+            getListPd(1, 10, {
+                eventType: 1,
+                articleId: row.id
+            }).then(res => {
+                if (res.data.data.records.length == 0) {
+                    this.$message.warning('请先设置议事规则!')
+                    setTimeout(() => {
+                        this.openDilog(row, 1)
+                    }, 200)
+                } else {
+                    this.$refs.DeitDiscussion.initData(row)
+                }
+            })
         },
 
         openUserPopup (row) {
@@ -518,7 +544,7 @@
             }
             // 类型  0:文章 1经营性收支,2:物业招标 3:公益报名 4:选举调查
             row.type = 4
-            row.publish = 1
+            // row.publish = 1
 
             add(row).then(
                 () => {
@@ -674,6 +700,7 @@
                 this.page.total = data.total
                 this.data = data.records
                 this.data.forEach(item => {
+                    // item.articleRange = JSON.parse(item.articleRange)
                     if (item.url.length > 0) {
                         var urls = []
                         var names = item.url.split(",")
@@ -773,4 +800,5 @@
 <style>
 .avue-upload__icon {
     line-height: 6;
-}</style>
\ No newline at end of file
+}
+</style>
\ No newline at end of file

--
Gitblit v1.9.3