清除已评分数据

main
wanglei 1 month ago
parent 8fb70c5db3
commit ca121598b3

@ -91,3 +91,12 @@ export function modifyBkhdx(data) {
data: data
})
}
// 清除已评分数据
export function cleanPingce(id) {
return request({
url: '/kaohe/pingce/clean?ids=' + id,
method: 'delete'
})
}

@ -195,11 +195,12 @@
>查看评分账号
</el-button>
<el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['kaohe:pingce:edit']">
<el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)">
<el-button size="mini" type="text" icon="el-icon-d-arrow-right">更多</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="bkhdxAddFun" icon="el-icon-plus" v-hasPermi="['kaohe:pingce:edit']"></el-dropdown-item>
<el-dropdown-item command="bkhdxDelFun" icon="el-icon-delete" v-hasPermi="['kaohe:pingce:edit']"></el-dropdown-item>
<el-dropdown-item command="bkhdxAddFun" icon="el-icon-plus">被考核对象添加</el-dropdown-item>
<el-dropdown-item command="bkhdxDelFun" icon="el-icon-delete">被考核对象删除</el-dropdown-item>
<el-dropdown-item command="clearScoredData" icon="el-icon-delete">清除已评分数据</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
@ -800,7 +801,7 @@
</template>
<script>
import { listPingce, getPingce, delPingce, addPingce, updatePingce, getItemVote, addsUser, generateResult, pcItemVotes, modifyBkhdx } from "@/api/kaohe/pingce";
import { listPingce, getPingce, delPingce, addPingce, updatePingce, getItemVote, addsUser, generateResult, pcItemVotes, modifyBkhdx, cleanPingce } from "@/api/kaohe/pingce";
import { listKh_result } from "@/api/kaohe/kh_result";
import { deptTreeSelect, ldUserlist, delUser, delUserPingfen } from "@/api/system/user";
import { listTemplate } from "@/api/kaohe/template";
@ -1042,19 +1043,6 @@ export default {
this.getVoteItemsList();
},
methods: {
//
handleCommand(command, row) {
switch (command) {
case "bkhdxAddFun":
this.bkhdxAddFun(row)
break
case "bkhdxDelFun":
this.bkhdxDelFun(row)
break
default:
break
}
},
samePercentChange(row){
let voteEmps = [];
if(row.vote.samePercent==='1'){
@ -2130,6 +2118,31 @@ export default {
})
}).catch(() => {})
},
//
handleCommand(command, row) {
switch (command) {
case "bkhdxAddFun":
this.bkhdxAddFun(row)
break
case "bkhdxDelFun":
this.bkhdxDelFun(row)
break
case "clearScoredData":
this.clearScoredData(row)
break
default:
break
}
},
/** 删除按钮操作 */
clearScoredData(row) {
this.$modal.confirm('是否确认清除已评分数据?').then(function() {
return cleanPingce(row.id);
}).then(() => {
this.getList()
this.$modal.msgSuccess("删除成功")
}).catch(() => {})
},
}
}
</script>

Loading…
Cancel
Save