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 | 352 +++++++++++++++++++++++++++++++++-------------------------
1 files changed, 199 insertions(+), 153 deletions(-)
diff --git a/src/views/article/discussionManage.vue b/src/views/article/discussionManage.vue
index de2dfd7..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,169 +131,192 @@
calcHeight: 54,
dialogWidth: 950,
tip: false,
- border: false,
+ border: true,
//stripe:true,
index: true,
viewBtn: false,
selection: true,
excelBtn: true,
dialogClickModal: false,
- column: [
- {
- overHidden: true,
- label: "议事标题",
- prop: "title",
- span: 24,
- row: true,
- searchSpan: 4,
- search: true,
- rules: [{
- required: true,
- message: "请输入议事标题",
- trigger: "blur",
- },],
+ column: [{
+ overHidden: true,
+ label: "议事标题",
+ prop: "title",
+ span: 24,
+ row: true,
+ searchSpan: 4,
+ search: true,
+ searchLabelWidth: 76,
+ rules: [{
+ required: true,
+ message: "请输入议事标题",
+ trigger: "blur",
+ },],
+ },
+ {
+ label: "范围",
+ prop: "articleList",
+ span: 24,
+ minRows: 2,
+ tags: true,
+ type: "tree",
+ multiple: true,
+ dicData: [],
+ rules: [{
+ required: true,
+ message: "请选择范围",
+ trigger: "blur",
+ },],
+ props: {
+ label: "name",
+ value: 'id'
+ },
+ 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: "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: "发布时间",
+ 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: 4,
+ value: "0",
+ slot: true,
+ search: true,
+ type: "select",
+ rules: [{
+ required: true,
+ message: "请选择发布状态",
+ trigger: "blur",
+ },],
+ dicData: [{
+ label: "未发布",
+ value: "0",
},
{
- label: "范围",
- prop: "articleList",
- span: 24,
- minRows: 2,
- tags: true,
- type: "tree",
- multiple: true,
- dicData: [],
- rules: [{
- required: true,
- message: "请选择范围",
- trigger: "blur",
- },],
- props: {
- label: "name",
- value: 'id'
- },
- hide: true,
+ label: "已发布",
+ value: "1",
+ }
+ ],
+ },
+ {
+ span: 24,
+ label: "评论区",
+ prop: "iscomment",
+ width: 80,
+ slot: true,
+ type: "switch",
+ activeColor: "#13ce66",
+ inactiveColor: "#ccc",
+ value: '1',
+ dicData: [{
+ label: "关闭",
+ value: "0",
},
{
- width: 110,
- label: "封面",
- prop: "url",
- // align:'center',
- type: "upload",
- listType: "picture-img",
+ label: "开启",
+ value: "1",
+ }
+ ],
+ },
+ {
+ label: "视频",
+ prop: "videoUrl",
+ type: "upload",
+ accept: "video/mp4",
+ display: false,
+ hide: true,
+ span: 24,
+ listType: "picture-img",
+ action: "/api/depl/put-depl",
+ propsHttp: {
+ url: "data",
+ },
+ },
+ {
+ label: "议事内容",
+ prop: "content",
+ component: "AvueUeditor",
+ options: {
action: "/api/blade-resource/oss/endpoint/put-file",
- propsHttp: {
+ // customConfig: {
+ // lineHeights: ['1', '1.15', '1.6', '2', '2.5', '3']
+ // },//wangEditor编辑的配置
+ props: {
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",
- },],
- },
- {
- 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,
- label: "评论区",
- prop: "iscomment",
- width: 80,
- slot: true,
- type: "switch",
- activeColor: "#13ce66",
- inactiveColor: "#ccc",
- value: '1',
- dicData: [{
- label: "关闭",
- value: "0",
- },
- {
- label: "开启",
- value: "1",
- }
- ],
- },
- {
- label: "视频",
- prop: "videoUrl",
- type: "upload",
- accept: "video/mp4",
- display: false,
- hide: true,
- span: 24,
- listType: "picture-img",
- action: "/api/depl/put-depl",
- propsHttp: {
- url: "data",
- },
- },
- {
- label: "议事内容",
- prop: "content",
- component: "AvueUeditor",
- options: {
- action: "/api/blade-resource/oss/endpoint/put-file",
- // customConfig: {
- // lineHeights: ['1', '1.15', '1.6', '2', '2.5', '3']
- // },//wangEditor编辑的配置
- props: {
- res: "data",
- url: "link",
- },
- },
- hide: true,
- minRows: 6,
- span: 24,
- },
+ hide: true,
+ minRows: 6,
+ span: 24,
+ },
],
},
data: [],
@@ -467,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) {
@@ -499,7 +544,7 @@
}
// 类型 0:文章 1经营性收支,2:物业招标 3:公益报名 4:选举调查
row.type = 4
- row.publish = 1
+ // row.publish = 1
add(row).then(
() => {
@@ -655,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(",")
@@ -755,4 +801,4 @@
.avue-upload__icon {
line-height: 6;
}
-</style>
+</style>
\ No newline at end of file
--
Gitblit v1.9.3