@@ -257,18 +242,6 @@ export default {
listVote(this.queryParams).then(response => {
let pcSetUpList = [];
response.rows.forEach(item=>{
- if(item.voteItems){
- item.voteItems = item.voteItems.split(',');
- let VoteItemsName = []
- item.voteItems.forEach(e => {
- this.vote_options.forEach(e1 => {
- if(e === e1.id){
- VoteItemsName.push(e1.vitemName)
- }
- })
- })
- item['voteItemsName'] = VoteItemsName.join(',');
- }
pcSetUpList.push(item);
})
this.voteList = pcSetUpList;
@@ -341,12 +314,6 @@ export default {
type: 'Danger'
})
}
- if(row.khitemTypeid===1 && (!Vote.voteItems)){
- flag = false;
- this.$alert(`评分选项不能为空!`, `提示`, {
- type: 'Danger'
- })
- }
if(row.khitemTypeid!==1 && (!Vote.maxNum)){
flag = false;
this.$alert(`最大值不能为空!`, `提示`, {
@@ -365,24 +332,16 @@ export default {
type: 'Danger'
})
}
- if(!Vote.vDescription){
- flag = false;
- this.$alert(`评分详情描述不能为空!`, `提示`, {
- type: 'Danger'
- })
+ if(row.khitemTypeid===1){
+ Vote.voteItems = '1,2,3,4'
}
if (Vote.id != null && flag ) {
- if(Vote.voteItems){
- Vote.voteItems = Vote.voteItems.join(',')
- }
updateVote(Vote).then(response => {
this.$modal.msgSuccess("修改成功")
this.cancelVote()
})
} else if(Vote.id === null && flag){
- if(Vote.voteItems){
- Vote.voteItems = Vote.voteItems.join(',')
- }
+ Vote.state = '0'
addVote(Vote).then(response => {
this.$modal.msgSuccess("新增成功")
this.cancelVote()
diff --git a/ruoyi-ui/src/views/kaohe/vote_emp/index.vue b/ruoyi-ui/src/views/kaohe/vote_emp/index.vue
index e610567..4ca6908 100644
--- a/ruoyi-ui/src/views/kaohe/vote_emp/index.vue
+++ b/ruoyi-ui/src/views/kaohe/vote_emp/index.vue
@@ -108,10 +108,10 @@
-
-
+
+
-
+