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 | 241 ++++++++++++++++++-----------------------------
1 files changed, 93 insertions(+), 148 deletions(-)
diff --git a/src/views/article/article.vue b/src/views/article/article.vue
index adbc046..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,14 @@
getNoticePd,
upcommentPd
} from "@/api/discuss/publicDiscuss";
+
+ import website from '@/config/website';
+
+
+ import {
+ getDistrictTree
+ } from "@/api/district/index";
+
import {
mapGetters
} from "vuex";
@@ -182,6 +181,20 @@
message: "请输入资讯类型",
trigger: "blur",
}, ],
+ }, {
+ label: "资讯范围",
+ prop: "articleList",
+ span: 12,
+ minRows: 2,
+ type: "cascader",
+ multiple: true,
+ tags: true,
+ dicData: [],
+ props: {
+ label: "name",
+ value: 'id'
+ },
+ hide: true,
},
{
label: "资讯类型",
@@ -318,7 +331,7 @@
}
}, {
labelWidth: 100,
- label: '开启投票',
+ label: '开启',
prop: 'openFlag',
type: 'radio',
button: true,
@@ -332,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,
@@ -392,14 +360,12 @@
optionDiscuss: {
column: [{
label: "",
- // labelWidth: 20,
type: 'title',
prop: "title",
span: 24,
row: true,
offset: 2,
styles: {
- // color: 'red',
fontSize: '24px'
}
}, {
@@ -419,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
}]
},
{
@@ -496,37 +408,9 @@
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: [],
};
},
watch: {
@@ -616,6 +500,16 @@
row.videoUrl = "";
}
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);
@@ -632,6 +526,17 @@
);
},
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);
@@ -706,7 +611,18 @@
beforeOpen(done, type) {
if (["edit", "view"].includes(type)) {
getNotice(this.form.id).then((res) => {
- this.form = res.data.data;
+ 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;
});
}
// con
@@ -737,13 +653,31 @@
};
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();
+ });
+ getDistrictTree(params = {}).then((res) => {
+ const data = res.data.data;
+ this.districtTree = data;
+ const column = this.findObject(this.option.column, "articleList");
+ column.dicData = res.data.data;
+ this.loading = false;
});
},
updateFb(row) {
@@ -752,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);
@@ -817,4 +762,4 @@
.avue-upload__icon {
line-height: 6;
}
-</style>
+</style>
\ No newline at end of file
--
Gitblit v1.9.3