From 4522ab3fe8bd45ee753ef187448c1e884bbc601f Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Thu, 18 Apr 2024 11:09:27 +0800
Subject: [PATCH] Merge branch 'master' of http://s16s652780.51mypc.cn:49896/r/jczz_web
---
src/views/article/article.vue | 112 +++++++++++++++++++++++++++++++++++++-------------------
1 files changed, 74 insertions(+), 38 deletions(-)
diff --git a/src/views/article/article.vue b/src/views/article/article.vue
index 67b5b79..9e7ae0f 100644
--- a/src/views/article/article.vue
+++ b/src/views/article/article.vue
@@ -29,10 +29,8 @@
</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="showPublish(row.publish).type" v-text="showPublish(row.publish).text">
</el-tag>
</template>
@@ -122,14 +120,17 @@
datetime: "",
selectionList: [],
option: {
+ labelWidth: 96,
+ searchLabelWidth: 96,
+ searchShow: true,
+ searchMenuSpan: 3,
+ menuWidth: 280,
+
height: "auto",
calcHeight: 54,
dialogWidth: 950,
tip: false,
- searchShow: true,
- searchMenuSpan: 3,
- menuWidth: 240,
- border: false,
+ border: true,
//stripe:true,
index: true,
viewBtn: true,
@@ -137,12 +138,14 @@
excelBtn: true,
dialogClickModal: false,
column: [{
+ overHidden: true,
label: "文章标题",
prop: "title",
span: 24,
row: true,
searchSpan: 4,
search: true,
+ searchLabelWidth: 76,
rules: [{
required: true,
message: "请输入文章标题",
@@ -150,10 +153,10 @@
}, ],
},
{
+ width: 110,
label: "文章封面",
prop: "url",
// align:'center',
- width: 80,
type: "upload",
listType: "picture-img",
action: "/api/blade-resource/oss/endpoint/put-file",
@@ -165,6 +168,7 @@
span: 24,
},
{
+ width: 100,
label: "文章来源",
prop: "sourceName",
search: true,
@@ -175,14 +179,17 @@
message: "请输入文章类型",
trigger: "blur",
}, ],
- }, {
+ },
+ {
label: "文章范围",
prop: "articleList",
span: 12,
minRows: 2,
- type: "cascader",
+ type: "tree",
+ dataType: "string",
multiple: true,
tags: true,
+ // search: true,
dicData: [],
props: {
label: "name",
@@ -191,12 +198,13 @@
hide: true,
},
{
+ width: 100,
label: "文章类型",
prop: "articleType",
addDisplay: true,
editDisplay: true,
viewDisplay: true,
- searchSpan: 3,
+ searchSpan: 4,
checkStrictly: true,
dicUrl: "/api/blade-system/dict-biz/dictionary?code=articleType",
props: {
@@ -211,37 +219,42 @@
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: "datetime",
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd",
- searchSpan: 5,
- searchRange: true,
- hide: true,
- addDisplay: false,
- editDisplay: false,
- viewDisplay: false,
- search: true,
- rules: [{
- required: true,
- message: "请选择发布时间",
- trigger: "blur",
- }, ],
- },
- {
+ width: 100,
label: "发布时间",
prop: "createTime",
type: "date",
format: "yyyy-MM-dd",
valueFormat: "yyyy-MM-dd HH:mm:ss",
+ search: true,
+ addDisplay: false,
+ editDisplay: false,
+ viewDisplay: false,
},
{
+ width: 100,
label: "发布状态",
prop: "publish",
- searchSpan: 3,
- width: 80,
+ searchSpan: 4,
value: "0",
slot: true,
search: true,
@@ -262,13 +275,14 @@
],
},
{
+ width: 100,
label: "评论区",
prop: "iscomment",
- width: 80,
slot: true,
type: "switch",
activeColor: "#13ce66",
inactiveColor: "#ccc",
+ value: '1',
dicData: [{
label: "关闭",
value: "0",
@@ -464,6 +478,22 @@
ids.push(ele.id)
})
return ids.join(",")
+ },
+
+ showPublish() {
+ return (data) => {
+ if (data == 0) {
+ return {
+ text: '未发布',
+ type: 'info'
+ }
+ } else if (data == 1) {
+ return {
+ text: '已发布',
+ type: 'success'
+ }
+ }
+ }
}
},
methods: {
@@ -631,7 +661,6 @@
if (["edit", "view"].includes(type)) {
getNotice(this.form.id).then((res) => {
let data = res.data.data
- // data.forEach(item=>{
if (data.url.length > 0) {
var urls = []
var names = data.url.split(",")
@@ -640,11 +669,10 @@
})
data.url = urls.join(",")
}
- // })
+ data.articleList = JSON.parse(data.articleRange)
this.form = data
})
}
- // con
done()
},
currentChange(currentPage) {
@@ -777,8 +805,16 @@
}
</script>
-<style>
+<style lang="scss" scoped>
.avue-upload__icon {
line-height: 6;
}
+
+ :deep(.avue-form__menu--center) {
+ text-align: left;
+ }
+
+ :deep(.avue-form__menu--center .el-button) {
+ margin: 0 5px 0 0;
+ }
</style>
\ No newline at end of file
--
Gitblit v1.9.3