From ab701df859cd79ae036f8cc86268137d2c8da8ee Mon Sep 17 00:00:00 2001
From: guanqb <18720758508@163.com>
Date: Thu, 22 Feb 2024 18:00:56 +0800
Subject: [PATCH] 消防自查导出、消防自查和场所检查增加场所类别字段
---
src/views/article/publicSignUp.vue | 425 ++++++++++++++++++++++++++++------------------------
1 files changed, 228 insertions(+), 197 deletions(-)
diff --git a/src/views/article/publicSignUp.vue b/src/views/article/publicSignUp.vue
index d544ca5..3eb8f3d 100644
--- a/src/views/article/publicSignUp.vue
+++ b/src/views/article/publicSignUp.vue
@@ -18,14 +18,12 @@
<el-button icon="el-icon-user" :size="size" :type="type" @click.stop="openUserPopup(row)">
参与用户
</el-button>
- <el-button v-if="row.publish == '1'" icon="el-icon-close" :size="size" :type="type"
- @click.stop="updateFb(row)">
- 撤销
- </el-button>
- <el-button v-if="row.publish == '0'" icon="el-icon-check" :size="size" :type="type"
- @click.stop="updateFb(row)">
- 发布
- </el-button>
+ <!-- <el-button v-if="row.publish == '1'" icon="el-icon-close" :size="size" :type="type" @click.stop="updateFb(row)">
+ 撤销
+ </el-button> -->
+ <!-- <el-button v-if="row.publish == '0'" icon="el-icon-check" :size="size" :type="type" @click.stop="updateFb(row)">
+ 发布
+ </el-button> -->
</template>
<template slot-scope="{ row, size }" slot="publish">
@@ -34,8 +32,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>
@@ -126,213 +125,238 @@
calcHeight: 54,
dialogWidth: 950,
tip: false,
- border: false,
+ border: true,
//stripe:true,
index: true,
viewBtn: false,
selection: true,
excelBtn: true,
dialogClickModal: false,
- column: [
- {
- label: "文章标题",
- prop: "title",
- span: 24,
- row: true,
- searchSpan: 4,
- search: true,
- rules: [{
- required: true,
- message: "请输入文章标题",
- trigger: "blur",
- },],
- },
- {
- 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,
- },
- {
- label: "文章范围",
- prop: "articleList",
- span: 12,
- minRows: 2,
- type: "cascader",
- multiple: true,
- tags: true,
- dicData: [],
- rules: [{
- required: true,
- message: "请选择文章范围",
- trigger: "blur",
- },],
- props: {
- label: "name",
- value: 'id'
- },
- hide: true,
- },
- {
- width: 110,
- label: "文章类型",
- prop: "type",
- searchSpan: 4,
- value: 3,
- slot: true,
- search: true,
- type: "select",
- rules: [{
- required: true,
- message: "请选择文章类型",
- trigger: "blur",
- },],
- dicData: [{
- label: "公益报名",
- value: 3, // // 类型 0:文章 1经营性收支,2:物业招标 3:公益报名 4:选举调查
- }],
- },
- {
- 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",
- }
- ],
- },
- {
- width: 80,
- label: "评论区",
- prop: "iscomment",
- slot: true,
- type: "select",
- dicData: [{
- label: "关闭",
- value: "0",
- },
- {
- label: "开启",
- value: "1",
- }
- ],
- },
- {
- label: "文章内容",
- prop: "content",
- component: "AvueUeditor",
- options: {
- action: "/api/blade-resource/oss/endpoint/put-file",
- props: {
- res: "data",
- url: "link",
- },
- },
- hide: true,
- minRows: 6,
- span: 24,
- },
- ],
- },
- data: [],
- optionEnroll: {
column: [{
- label: "",
- type: 'title',
+ label: "文章标题",
prop: "title",
span: 24,
row: true,
- offset: 2,
- styles: {
- fontSize: '24px'
- }
- }, {
- labelWidth: 100,
- label: '开启',
- prop: 'openFlag',
- type: 'radio',
- button: true,
- row: true,
- offset: 6,
- dicData: [{
- label: '开启',
- value: 0
- }, {
- label: '不开启',
- value: 1
- }],
+ searchSpan: 4,
+ search: true,
+ searchLabelWidth: 76,
rules: [{
required: true,
- message: "请选开启状态",
- trigger: "blur",
- },],
- }, {
- labelWidth: 100,
- label: '投票限制',
- prop: 'voteRestrictions',
- type: 'radio',
- button: true,
- row: true,
- offset: 6,
- dicData: [{
- label: '一人一票',
- value: 0
- }, {
- label: '一户一票',
- value: 1
- }],
- rules: [{
- required: true,
- message: "请选投票限制",
+ message: "请输入文章标题",
trigger: "blur",
},],
},
{
- label: "截止时间",
- row: true,
- offset: 6,
- prop: "endTime",
- type: "datetime",
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd HH:mm:ss",
+ 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,
+ },
+ {
+ label: "文章范围",
+ prop: "articleList",
+ span: 12,
+ minRows: 2,
+ type: "tree",
+ multiple: true,
+ tags: true,
+ dicData: [],
rules: [{
required: true,
- message: "请选截止时间",
+ message: "请选择文章范围",
+ trigger: "blur",
+ },],
+ props: {
+ label: "name",
+ value: 'id'
+ },
+ hide: true,
+ },
+ {
+ width: 110,
+ label: "文章类型",
+ prop: "type",
+ searchSpan: 4,
+ value: 3,
+ slot: true,
+ // search: true,
+ type: "select",
+ rules: [{
+ required: true,
+ message: "请选择文章类型",
+ trigger: "blur",
+ },],
+ dicData: [{
+ label: "公益报名",
+ value: 3, // // 类型 0:文章 1经营性收支,2:物业招标 3:公益报名 4:选举调查
+ }],
+ },
+ {
+ 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",
+ },
+ {
+ width: 100,
+ label: "发布状态",
+ prop: "publish",
+ searchSpan: 4,
+ value: "1",
+ slot: true,
+ hide: true,
+ // search: true,
+ type: "select",
+ rules: [{
+ required: true,
+ message: "请选择发布状态",
+ trigger: "blur",
+ },],
+ dicData: [{
+ label: "未发布",
+ value: "0",
+ },
+ {
+ label: "已发布",
+ value: "1",
+ }
+ ],
+ },
+ {
+ width: 80,
+ label: "评论区",
+ prop: "iscomment",
+ slot: true,
+ type: "switch",
+ activeColor: "#13ce66",
+ inactiveColor: "#ccc",
+ value: '1',
+ dicData: [{
+ label: "关闭",
+ value: "0",
+ },
+ {
+ label: "开启",
+ value: "1",
+ }
+ ],
+ },
+ {
+ label: "文章内容",
+ prop: "content",
+ component: "AvueUeditor",
+ options: {
+ action: "/api/blade-resource/oss/endpoint/put-file",
+ props: {
+ res: "data",
+ url: "link",
+ },
+ },
+ hide: true,
+ minRows: 6,
+ span: 24,
+ },
+ ],
+ },
+ data: [],
+ optionEnroll: {
+ column: [
+ // {
+ // label: "",
+ // type: 'title',
+ // prop: "title",
+ // span: 24,
+ // row: true,
+ // offset: 2,
+ // styles: {
+ // fontSize: '24px'
+ // }
+ // },
+ {
+ labelWidth: 100,
+ label: '开启',
+ prop: 'openFlag',
+ type: 'radio',
+ button: true,
+ row: true,
+ offset: 6,
+ dicData: [{
+ label: '开启',
+ value: 0
+ }, {
+ label: '不开启',
+ value: 1
+ }],
+ rules: [{
+ required: true,
+ message: "请选开启状态",
+ trigger: "blur",
+ },],
+ }, {
+ labelWidth: 100,
+ label: '投票限制',
+ prop: 'voteRestrictions',
+ type: 'radio',
+ button: true,
+ row: true,
+ offset: 6,
+ dicData: [{
+ label: '一人一票',
+ value: 0
+ }, {
+ label: '一户一票',
+ value: 1
+ }],
+ rules: [{
+ required: true,
+ message: "请选投票限制",
+ trigger: "blur",
+ },],
+ },
+ {
+ label: "截止时间",
+ row: true,
+ offset: 6,
+ prop: "endTime",
+ type: "datetime",
+ format: "yyyy-MM-dd",
+ valueFormat: "yyyy-MM-dd HH:mm:ss",
+ rules: [{
+ required: true,
+ message: "请选截止时间",
+ trigger: "blur",
+ },],
+ },
]
},
districtTree: [],
@@ -397,7 +421,14 @@
}
},
methods: {
-
+ iscommentInput (e, data) {
+ upcomment(data.id, e).then(() => {
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ })
+ },
openUserPopup (row) {
this.$refs.publicSignUpChild.openUser(row)
--
Gitblit v1.9.3