|
|
|
@ -356,7 +356,7 @@
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column label="评分选项" align="center" prop="options" min-width="220" :show-overflow-tooltip="true">
|
|
|
|
<!-- <el-table-column label="评分选项" align="center" prop="options" min-width="220" :show-overflow-tooltip="true">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<div v-if="scope.$index=== pcSetUp.xzhIndex && scope.row.typeId===1">
|
|
|
|
<div v-if="scope.$index=== pcSetUp.xzhIndex && scope.row.typeId===1">
|
|
|
|
<el-select :disabled="scope.row.vote.id && !(new Date(scope.row.vote.sTime) > (new Date()))"
|
|
|
|
<el-select :disabled="scope.row.vote.id && !(new Date(scope.row.vote.sTime) > (new Date()))"
|
|
|
|
@ -375,7 +375,7 @@
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>-->
|
|
|
|
<el-table-column label="最大值" align="center" prop="vote" min-width="220" :show-overflow-tooltip="true">
|
|
|
|
<el-table-column label="最大值" align="center" prop="vote" min-width="220" :show-overflow-tooltip="true">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<div v-if="scope.$index=== pcSetUp.xzhIndex && scope.row.typeId!==1">
|
|
|
|
<div v-if="scope.$index=== pcSetUp.xzhIndex && scope.row.typeId!==1">
|
|
|
|
@ -398,11 +398,6 @@
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column label="状态" align="center" prop="vote" min-width="220" :show-overflow-tooltip="true">
|
|
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
|
|
<dict-tag :options="dict.type.kh_state" :value="scope.row.vote.state"/>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
<el-table-column label="开始时间" align="center" prop="vote" min-width="220" :show-overflow-tooltip="true">
|
|
|
|
<el-table-column label="开始时间" align="center" prop="vote" min-width="220" :show-overflow-tooltip="true">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<div v-if="scope.$index=== pcSetUp.xzhIndex">
|
|
|
|
<div v-if="scope.$index=== pcSetUp.xzhIndex">
|
|
|
|
@ -452,6 +447,11 @@
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
<el-table-column label="状态" align="center" prop="vote" min-width="100" :show-overflow-tooltip="true">
|
|
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
|
|
<dict-tag :options="dict.type.kh_state" :value="scope.row.vote.state"/>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="180">
|
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="180">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
@ -1123,7 +1123,7 @@ export default {
|
|
|
|
item.vote.pingceId = this.pcSetUp.pingceId;
|
|
|
|
item.vote.pingceId = this.pcSetUp.pingceId;
|
|
|
|
item.vote.pingceName = this.pcSetUp.pingceName;
|
|
|
|
item.vote.pingceName = this.pcSetUp.pingceName;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(item.vote.voteItems){
|
|
|
|
/*if(item.vote.voteItems){
|
|
|
|
item.vote.voteItems = item.vote.voteItems.split(',');
|
|
|
|
item.vote.voteItems = item.vote.voteItems.split(',');
|
|
|
|
let VoteItemsName = []
|
|
|
|
let VoteItemsName = []
|
|
|
|
item.vote.voteItems.forEach(e => {
|
|
|
|
item.vote.voteItems.forEach(e => {
|
|
|
|
@ -1134,7 +1134,7 @@ export default {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
item.vote['voteItemsName'] = VoteItemsName.join(',');
|
|
|
|
item.vote['voteItemsName'] = VoteItemsName.join(',');
|
|
|
|
}
|
|
|
|
}*/
|
|
|
|
pcSetUpList.push(item);
|
|
|
|
pcSetUpList.push(item);
|
|
|
|
})
|
|
|
|
})
|
|
|
|
this.pcSetUp.list = pcSetUpList;
|
|
|
|
this.pcSetUp.list = pcSetUpList;
|
|
|
|
@ -1184,12 +1184,12 @@ export default {
|
|
|
|
type: 'Danger'
|
|
|
|
type: 'Danger'
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(row.typeId===1 && (!Vote.voteItems)){
|
|
|
|
/*if(row.typeId===1 && (!Vote.voteItems)){
|
|
|
|
flag = false;
|
|
|
|
flag = false;
|
|
|
|
this.$alert(`评分选项不能为空!`, `提示`, {
|
|
|
|
this.$alert(`评分选项不能为空!`, `提示`, {
|
|
|
|
type: 'Danger'
|
|
|
|
type: 'Danger'
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}*/
|
|
|
|
if(row.typeId!==1 && (!Vote.maxNum)){
|
|
|
|
if(row.typeId!==1 && (!Vote.maxNum)){
|
|
|
|
flag = false;
|
|
|
|
flag = false;
|
|
|
|
this.$alert(`最大值不能为空!`, `提示`, {
|
|
|
|
this.$alert(`最大值不能为空!`, `提示`, {
|
|
|
|
@ -1208,24 +1208,29 @@ export default {
|
|
|
|
type: 'Danger'
|
|
|
|
type: 'Danger'
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(!Vote.vDescription){
|
|
|
|
/*if(!Vote.vDescription){
|
|
|
|
flag = false;
|
|
|
|
flag = false;
|
|
|
|
this.$alert(`评分详情描述不能为空!`, `提示`, {
|
|
|
|
this.$alert(`评分详情描述不能为空!`, `提示`, {
|
|
|
|
type: 'Danger'
|
|
|
|
type: 'Danger'
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
}*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(row.typeId===1){
|
|
|
|
|
|
|
|
Vote.voteItems = '1,2,3,4'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (Vote.id != null && flag ) {
|
|
|
|
if (Vote.id != null && flag ) {
|
|
|
|
if(Vote.voteItems){
|
|
|
|
/*if(Vote.voteItems){
|
|
|
|
Vote.voteItems = Vote.voteItems.join(',')
|
|
|
|
Vote.voteItems = Vote.voteItems.join(',')
|
|
|
|
}
|
|
|
|
}*/
|
|
|
|
updateVote(Vote).then(response => {
|
|
|
|
updateVote(Vote).then(response => {
|
|
|
|
this.$modal.msgSuccess("修改成功")
|
|
|
|
this.$modal.msgSuccess("修改成功")
|
|
|
|
this.cancelVote()
|
|
|
|
this.cancelVote()
|
|
|
|
})
|
|
|
|
})
|
|
|
|
} else if(Vote.id === null && flag){
|
|
|
|
} else if(Vote.id === null && flag){
|
|
|
|
if(Vote.voteItems){
|
|
|
|
/*if(Vote.voteItems){
|
|
|
|
Vote.voteItems = Vote.voteItems.join(',')
|
|
|
|
Vote.voteItems = Vote.voteItems.join(',')
|
|
|
|
}
|
|
|
|
}*/
|
|
|
|
Vote.state = '0'
|
|
|
|
Vote.state = '0'
|
|
|
|
addVote(Vote).then(response => {
|
|
|
|
addVote(Vote).then(response => {
|
|
|
|
this.$modal.msgSuccess("新增成功")
|
|
|
|
this.$modal.msgSuccess("新增成功")
|
|
|
|
|