From 626af15b65701197a33ad0d1384bae8d56c169ce Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Tue, 09 Jan 2024 18:17:22 +0800
Subject: [PATCH] 内容管理字段补充,服务管理页面展示调整

---
 src/views/property/oiae.vue |   63 ++++++++++++++++++-------------
 1 files changed, 36 insertions(+), 27 deletions(-)

diff --git a/src/views/property/oiae.vue b/src/views/property/oiae.vue
index eb75631..9d39345 100644
--- a/src/views/property/oiae.vue
+++ b/src/views/property/oiae.vue
@@ -32,22 +32,16 @@
                 </el-button>
             </template>
 
-            <template slot-scope="{ row }" slot="publish">
-                <el-tag>{{
-                    row.publish == "1" ? "已发布" : row.publish == "0" ? "未发布" : "未发布"
-                }}
+            <template slot-scope="{ row, size }" slot="publish">
+                <el-tag :size="size" :type="showStatus(row.publish, 1).type" v-text="showStatus(row.publish, 1).text">
                 </el-tag>
             </template>
 
-            <template slot-scope="{ row }" slot="iscomment">
-                <el-tag>{{
-                    row.iscomment == "1" ? "开启" : row.iscomment == "0" ? "关闭" : "关闭"
-                }}
+            <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>
             </template>
         </avue-crud>
-
-
 
         <el-dialog title="" append-to-body :visible.sync="dialogVisibles" width="50%" :before-close="handleClose">
             <span slot="title" class="dialog-footer">
@@ -62,9 +56,6 @@
                 </avue-form>
             </div>
         </el-dialog>
-
-
-
 
     </basic-container>
 </template>
@@ -132,13 +123,16 @@
             datetime: "",
             selectionList: [],
             option: {
+                labelWidth: 120,
+                searchLabelWidth: 96,
+                searchShow: true,
+                searchMenuSpan: 3,
+                menuWidth: 280,
+
                 height: "auto",
                 calcHeight: 54,
                 dialogWidth: 950,
                 tip: false,
-                searchShow: true,
-                searchMenuSpan: 3,
-                menuWidth: 450,
                 border: false,
                 //stripe:true,
                 index: true,
@@ -162,10 +156,10 @@
                     },
 
                     {
+                        width: 110,
                         label: "缩略图",
                         prop: "url",
                         // align:'center',
-                        width: 80,
                         type: "upload",
                         listType: "picture-img",
                         action: "/api/blade-resource/oss/endpoint/put-file",
@@ -176,7 +170,7 @@
                         // hide: true,
                         span: 24,
                     },
-                    
+
                     // {
                     //   label: "收支来源",
                     //   prop: "sourceName",
@@ -212,10 +206,10 @@
                     {
                         label: "收支类型",
                         prop: "type",
-                        searchSpan: 3,
                         width: 80,
                         value: 1,
                         slot: true,
+                        searchSpan: 4,
                         search: true,
                         type: "select",
                         rules: [{
@@ -228,13 +222,14 @@
                             value: 1,
                         }],
                     },
+
                     {
                         label: "发布时间",
                         prop: "dateTime",
-                        type: "datetime",
+                        type: "daterange",
                         format: "yyyy-MM-dd",
                         valueFormat: "yyyy-MM-dd",
-                        searchSpan: 5,
+                        searchSpan: 6,
                         searchRange: true,
                         hide: true,
                         addDisplay: false,
@@ -247,7 +242,9 @@
                             trigger: "blur",
                         },],
                     },
+
                     {
+                        width: 100,
                         label: "发布时间",
                         prop: "createTime",
                         type: "date",
@@ -255,12 +252,12 @@
                         valueFormat: "yyyy-MM-dd HH:mm:ss",
                     },
                     {
+                        width: 100,
                         label: "发布状态",
                         prop: "publish",
-                        searchSpan: 3,
-                        width: 80,
                         value: "0",
                         slot: true,
+                        searchSpan: 4,
                         search: true,
                         type: "select",
                         rules: [{
@@ -279,9 +276,9 @@
                         ],
                     },
                     {
+                        width: 100,
                         label: "评论区",
                         prop: "iscomment",
-                        width: 80,
                         slot: true,
                         type: "select",
                         dicData: [{
@@ -341,7 +338,6 @@
                         fontSize: '24px'
                     }
                 }, {
-                    labelWidth: 100,
                     label: '开启',
                     prop: 'openFlag',
                     type: 'radio',
@@ -380,7 +376,6 @@
                         fontSize: '24px'
                     }
                 }, {
-                    labelWidth: 100,
                     label: '开启投票',
                     prop: 'openFlag',
                     type: 'radio',
@@ -395,7 +390,6 @@
                         value: 1
                     }]
                 }, {
-                    labelWidth: 100,
                     label: '开启签名',
                     prop: 'signatureFlag',
                     type: 'radio',
@@ -465,6 +459,21 @@
             })
             return ids.join(",")
         },
+        showStatus () {
+            return (data, type) => {
+                if (data == 0) {
+                    return {
+                        text: type == 1 ? '未发布' : '关闭',
+                        type: 'info'
+                    }
+                } else if (data == 1) {
+                    return {
+                        text: type == 1 ? '已发布' : '开启',
+                        type: 'success'
+                    }
+                }
+            }
+        }
     },
     methods: {
 

--
Gitblit v1.9.3