|
|
|
@ -64,26 +64,11 @@
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column label="评分主题" align="center" prop="voteTitle" min-width="200" :show-overflow-tooltip="true">
|
|
|
|
<el-table-column label="评分主题" align="center" prop="voteTitle" min-width="200" :show-overflow-tooltip="true">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<el-link type="primary" @click="goVoteEmp(scope.row)">{{ scope.row.voteTitle }}</el-link>
|
|
|
|
<div v-if="scope.$index=== xzhIndex">
|
|
|
|
</template>
|
|
|
|
<el-input v-model.trim="scope.row.voteTitle" placeholder="请输入评分主题" :disabled="scope.row.id && !(new Date(scope.row.sTime) > (new Date()))"/>
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
<el-table-column label="评分选项" align="center" prop="options" min-width="200" :show-overflow-tooltip="true">
|
|
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
|
|
<div v-if="scope.$index=== xzhIndex && scope.row.khitemTypeid===1">
|
|
|
|
|
|
|
|
<el-select :disabled="!(new Date(scope.row.sTime) > (new Date()))"
|
|
|
|
|
|
|
|
v-model="scope.row.voteItems" multiple placeholder="请选择评分选项">
|
|
|
|
|
|
|
|
<el-option
|
|
|
|
|
|
|
|
v-for="item in vote_options"
|
|
|
|
|
|
|
|
:key="item.id"
|
|
|
|
|
|
|
|
:label="item.vitemName"
|
|
|
|
|
|
|
|
:value="item.id">
|
|
|
|
|
|
|
|
</el-option>
|
|
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div v-else>
|
|
|
|
<div v-else>
|
|
|
|
<div v-if=" scope.row.voteItems">
|
|
|
|
<el-link type="primary" @click="goVoteEmp(scope.row)">{{ scope.row.voteTitle }}</el-link>
|
|
|
|
<div>{{ scope.row.voteItemsName }}</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
@ -109,11 +94,6 @@
|
|
|
|
</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.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===xzhIndex">
|
|
|
|
<div v-if="scope.$index===xzhIndex">
|
|
|
|
@ -163,6 +143,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.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>
|
|
|
|
@ -257,18 +242,6 @@ export default {
|
|
|
|
listVote(this.queryParams).then(response => {
|
|
|
|
listVote(this.queryParams).then(response => {
|
|
|
|
let pcSetUpList = [];
|
|
|
|
let pcSetUpList = [];
|
|
|
|
response.rows.forEach(item=>{
|
|
|
|
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);
|
|
|
|
pcSetUpList.push(item);
|
|
|
|
})
|
|
|
|
})
|
|
|
|
this.voteList = pcSetUpList;
|
|
|
|
this.voteList = pcSetUpList;
|
|
|
|
@ -341,12 +314,6 @@ export default {
|
|
|
|
type: 'Danger'
|
|
|
|
type: 'Danger'
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(row.khitemTypeid===1 && (!Vote.voteItems)){
|
|
|
|
|
|
|
|
flag = false;
|
|
|
|
|
|
|
|
this.$alert(`评分选项不能为空!`, `提示`, {
|
|
|
|
|
|
|
|
type: 'Danger'
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if(row.khitemTypeid!==1 && (!Vote.maxNum)){
|
|
|
|
if(row.khitemTypeid!==1 && (!Vote.maxNum)){
|
|
|
|
flag = false;
|
|
|
|
flag = false;
|
|
|
|
this.$alert(`最大值不能为空!`, `提示`, {
|
|
|
|
this.$alert(`最大值不能为空!`, `提示`, {
|
|
|
|
@ -365,24 +332,16 @@ export default {
|
|
|
|
type: 'Danger'
|
|
|
|
type: 'Danger'
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(!Vote.vDescription){
|
|
|
|
if(row.khitemTypeid===1){
|
|
|
|
flag = false;
|
|
|
|
Vote.voteItems = '1,2,3,4'
|
|
|
|
this.$alert(`评分详情描述不能为空!`, `提示`, {
|
|
|
|
|
|
|
|
type: 'Danger'
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (Vote.id != null && flag ) {
|
|
|
|
if (Vote.id != null && flag ) {
|
|
|
|
if(Vote.voteItems){
|
|
|
|
|
|
|
|
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){
|
|
|
|
Vote.state = '0'
|
|
|
|
Vote.voteItems = Vote.voteItems.join(',')
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
addVote(Vote).then(response => {
|
|
|
|
addVote(Vote).then(response => {
|
|
|
|
this.$modal.msgSuccess("新增成功")
|
|
|
|
this.$modal.msgSuccess("新增成功")
|
|
|
|
this.cancelVote()
|
|
|
|
this.cancelVote()
|
|
|
|
|