From d16d10d94fddff86bdfd87113e7fd2cebe8b7cd7 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Wed, 24 Jan 2024 18:15:06 +0800
Subject: [PATCH] 居民监管样式调整
---
src/views/article/discussionManage.vue | 121 +++++++++++++++++++++++++++++++--------
1 files changed, 95 insertions(+), 26 deletions(-)
diff --git a/src/views/article/discussionManage.vue b/src/views/article/discussionManage.vue
index c96e9aa..597f5a4 100644
--- a/src/views/article/discussionManage.vue
+++ b/src/views/article/discussionManage.vue
@@ -32,13 +32,13 @@
</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>
@@ -117,13 +117,16 @@
datetime: "",
selectionList: [],
option: {
+ labelWidth: 96,
+ searchLabelWidth: 96,
+ searchShow: true,
+ searchMenuSpan: 3,
+ menuWidth: 500,
+
height: "auto",
calcHeight: 54,
dialogWidth: 950,
tip: false,
- searchShow: true,
- searchMenuSpan: 3,
- menuWidth: 500,
border: false,
//stripe:true,
index: true,
@@ -132,6 +135,7 @@
excelBtn: true,
dialogClickModal: false,
column: [{
+ overHidden: true,
label: "议事标题",
prop: "title",
span: 24,
@@ -149,7 +153,8 @@
prop: "articleList",
span: 24,
minRows: 2,
- type: "tree",
+ tags: true,
+ type: "cascader",
multiple: true,
dicData: [],
rules: [{
@@ -164,12 +169,49 @@
hide: true,
},
{
+ width: 110,
+ label: "封面",
+ prop: "url",
+ // align:'center',
+ type: "upload",
+ listType: "picture-img",
+ action: "/api/blade-resource/oss/endpoint/put-file",
+ propsHttp: {
+ res: "data",
+ url: "link",
+ },
+ // hide: true,
+ span: 24,
+ },
+ {
+ width: 110,
+ label: "文章类型",
+ prop: "articleType",
+ addDisplay: true,
+ editDisplay: true,
+ viewDisplay: true,
+ searchSpan: 4,
+ checkStrictly: true,
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=investigateType",
+ props: {
+ label: "dictValue",
+ value: "dictKey",
+ },
+ search: true,
+ type: "tree",
+ rules: [{
+ required: true,
+ message: "请选择文章类型",
+ trigger: "blur",
+ }, ],
+ },
+ {
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,
@@ -183,26 +225,36 @@
}, ],
},
{
- label: "封面",
- prop: "url",
- // align:'center',
- width: 80,
- type: "upload",
- listType: "picture-img",
- action: "/api/blade-resource/oss/endpoint/put-file",
- propsHttp: {
- res: "data",
- url: "link",
- },
- // hide: true,
- span: 24,
- },
- {
+ width: 100,
label: "发布时间",
prop: "createTime",
type: "date",
format: "yyyy-MM-dd",
valueFormat: "yyyy-MM-dd HH:mm:ss",
+ },
+ {
+ width: 100,
+ label: "发布状态",
+ prop: "publish",
+ searchSpan: 4,
+ value: "0",
+ slot: true,
+ search: true,
+ type: "select",
+ rules: [{
+ required: true,
+ message: "请选择发布状态",
+ trigger: "blur",
+ }, ],
+ dicData: [{
+ label: "未发布",
+ value: "0",
+ },
+ {
+ label: "已发布",
+ value: "1",
+ }
+ ],
},
{
span: 24,
@@ -404,6 +456,7 @@
editBtn: this.vaildData(this.permission.article_edit, true),
}
},
+
ids() {
let ids = []
this.selectionList.forEach((ele) => {
@@ -411,6 +464,22 @@
})
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: {
openEditPopup(row) {
@@ -701,4 +770,4 @@
.avue-upload__icon {
line-height: 6;
}
-</style>
+</style>
\ No newline at end of file
--
Gitblit v1.9.3