From af37ee88ef6d9647fa2b368271dcf53f656ea4fa Mon Sep 17 00:00:00 2001
From: linwe <872216996@qq.com>
Date: Mon, 18 Dec 2023 11:18:29 +0800
Subject: [PATCH] 按钮隐藏
---
src/views/article/article.vue | 209 +++++++++++++++------------------------------------
1 files changed, 62 insertions(+), 147 deletions(-)
diff --git a/src/views/article/article.vue b/src/views/article/article.vue
index f3324f7..abbdc13 100644
--- a/src/views/article/article.vue
+++ b/src/views/article/article.vue
@@ -49,7 +49,7 @@
<span slot="title" class="dialog-footer">
{{discussForm.ontitle}}
</span>
- <div id="" v-if="discussForm.eventType == 2">
+ <div id="" v-if="discussForm.eventType == 1">
<avue-form @submit="handleSubmit" :option="optionDiscuss" v-model="discussForm"></avue-form>
</div>
@@ -59,15 +59,6 @@
</div>
</el-dialog>
- <!-- <el-dialog title="用户数据导入" append-to-body :visible.sync="dialogVisibles" width="555px">
- <avue-form :option="excelOption" v-model="excelForm" :upload-after="uploadAfter">
- <template slot="excelTemplate">
- <el-button type="primary" @click="handleTemplate">
- 点击下载<i class="el-icon-download el-icon--right"></i>
- </el-button>
- </template>
- </avue-form>
- </el-dialog> -->
@@ -92,6 +83,9 @@
getNoticePd,
upcommentPd
} from "@/api/discuss/publicDiscuss";
+
+ import website from '@/config/website';
+
import {
getDistrictTree
@@ -337,7 +331,7 @@
}
}, {
labelWidth: 100,
- label: '开启投票',
+ label: '开启',
prop: 'openFlag',
type: 'radio',
button: true,
@@ -351,52 +345,7 @@
value: 1
}]
},
- {
- labelWidth: 100,
- label: '人数限制',
- prop: 'numberRestrictions',
- type: 'number',
- button: true,
- row: true,
- min: 0,
- max: 99999999,
- controlsPosition: '',
- step: 10,
- offset: 6,
- }, {
- labelWidth: 100,
- label: '投票限制',
- prop: 'voteRestrictions',
- type: 'radio',
- button: true,
- row: true,
- offset: 6,
- dicData: [{
- label: '一人一票',
- value: 0
- }, {
- label: '一户一票',
- value: 1
- }]
- }, {
- labelWidth: 100,
- label: '用户限制',
- prop: 'userRestrictions',
- type: 'radio',
- button: true,
- row: true,
- offset: 6,
- dicData: [{
- label: '不限制',
- value: 0
- }, {
- label: '必须绑定手机',
- value: 1
- }, {
- label: '必须绑定房屋',
- value: 2
- }]
- },
+
{
label: "截止时间",
row: true,
@@ -411,14 +360,12 @@
optionDiscuss: {
column: [{
label: "",
- // labelWidth: 20,
type: 'title',
prop: "title",
span: 24,
row: true,
offset: 2,
styles: {
- // color: 'red',
fontSize: '24px'
}
}, {
@@ -438,72 +385,18 @@
}]
}, {
labelWidth: 100,
- label: '多房屋可重复',
- prop: 'repeatVote',
+ label: '开启签名',
+ prop: 'signatureFlag',
type: 'radio',
button: true,
row: true,
offset: 6,
dicData: [{
- label: '不可以',
+ label: '开启',
value: 0
}, {
- label: '可以',
+ label: '不开启',
value: 1
- }]
- }, {
- labelWidth: 100,
- label: '投票限制',
- prop: 'voteRestrictions',
- type: 'radio',
- button: true,
- row: true,
- offset: 6,
- dicData: [{
- label: '一人一票',
- value: 0
- }, {
- label: '一户一票',
- value: 1
- }]
- }, {
- labelWidth: 100,
- label: '用户限制',
- prop: 'userRestrictions',
- type: 'radio',
- button: true,
- row: true,
- offset: 6,
- dicData: [{
- label: '不限制',
- value: 0
- }, {
- label: '必须绑定手机',
- value: 1
- }, {
- label: '必须绑定房屋',
- value: 2
- }]
- }, {
- labelWidth: 100,
- label: '票数公开',
- prop: 'voteNumberPublic',
- type: 'radio',
- button: true,
- row: true,
- offset: 6,
- dicData: [{
- label: '全程公开',
- value: 0
- }, {
- label: '投票后公开',
- value: 1
- }, {
- label: '投票结束后公开',
- value: 2
- }, {
- label: '不公开',
- value: 3
}]
},
{
@@ -515,35 +408,6 @@
format: "yyyy-MM-dd hh:mm:ss",
valueFormat: "timestamp",
},
- // {
- // labelWidth: 100,
- // label: '人数限制',
- // prop: 'numberRestrictions',
- // type: 'number',
- // button: true,
- // row: true,
- // min: 0,
- // max: 99999999,
- // controlsPosition: '',
- // step: 10,
- // offset: 6,
- // },
- // {
- // labelWidth: 100,
- // label: '指定用户',
- // prop: 'appointUser',
- // type: 'radio',
- // button: true,
- // row: true,
- // offset: 6,
- // dicData: [{
- // label: '不限制',
- // value: 0
- // }, {
- // label: '指定用户可见',
- // value: 1
- // }]
- // },
]
},
districtTree: [],
@@ -637,6 +501,15 @@
}
row.userid = this.userInfo.user_id;
row.articleRange = JSON.stringify(row.articleList)
+ if (row.url.length > 0) {
+ var urls = []
+ var split = row.url.split(",");
+ split.forEach(url => {
+ var names = url.split("jczz/");
+ urls.push(names[1])
+ })
+ row.url = urls.join(",")
+ }
add(row).then(
() => {
this.onLoad(this.page);
@@ -654,6 +527,16 @@
},
rowUpdate(row, index, done, loading) {
row.articleRange = JSON.stringify(row.articleList)
+ if (row.url.length > 0) {
+ var urls = []
+ var split = row.url.split(",");
+ split.forEach(url => {
+ var names = url.split("jczz/");
+ urls.push(names[1])
+ })
+ row.url = urls.join(",")
+ }
+
update(row).then(
() => {
this.onLoad(this.page);
@@ -729,6 +612,16 @@
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(",");
+ names.forEach(name => {
+ urls.push(website.minioUrl + name)
+ })
+ data.url = urls.join(",")
+ }
+ // })
this.form = data;
});
}
@@ -760,11 +653,22 @@
};
values.dateTime = null;
}
+ values.type = 0
this.loading = true;
getList(page.currentPage, page.pageSize, values).then((res) => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
+ this.data.forEach(item => {
+ if (item.url.length > 0) {
+ var urls = []
+ var names = item.url.split(",");
+ names.forEach(name => {
+ urls.push(website.minioUrl + name)
+ })
+ item.url = urls.join(",")
+ }
+ })
this.loading = false;
this.selectionClear();
});
@@ -782,6 +686,17 @@
} else {
row.publish = "0";
}
+
+ if (row.url.length > 0) {
+ var urls = []
+ var split = row.url.split(",");
+ split.forEach(url => {
+ var names = url.split("jczz/");
+ urls.push(names[1])
+ })
+ row.url = urls.join(",")
+ }
+
update(row).then(
() => {
this.onLoad(this.page);
@@ -847,4 +762,4 @@
.avue-upload__icon {
line-height: 6;
}
-</style>
+</style>
\ No newline at end of file
--
Gitblit v1.9.3