diff --git a/ruoyi-ui/src/views/kaohe/pingce/index.vue b/ruoyi-ui/src/views/kaohe/pingce/index.vue
index 84d6f5f..2d8a2b4 100644
--- a/ruoyi-ui/src/views/kaohe/pingce/index.vue
+++ b/ruoyi-ui/src/views/kaohe/pingce/index.vue
@@ -91,7 +91,7 @@
-
+
发布考核
+ 查看评分任务
+
-
+
{{ dict.label }}
@@ -425,7 +432,7 @@
-
+
@@ -526,7 +533,7 @@ import TableColumn from '@/components/TableColumn'
export default {
name: "Pingce",
- dicts: ['kh_state', 'sys_user_sex', 'bkhdx_type'],
+ dicts: ['kh_state', 'sys_user_sex', 'bkhdx_type', 'pf_state'],
components: { Treeselect, TableColumn },
data() {
return {
@@ -626,6 +633,7 @@ export default {
},
// 考核发布
pcSetUp: {
+ row: null,
// 选中行Index
xzhIndex: null,
isRowEdit: false,
@@ -833,6 +841,7 @@ export default {
this.getList()
})
} else {
+ this.form.state = '0'
addPingce(this.form).then(response => {
this.$modal.msgSuccess("新增成功")
this.open = false
@@ -963,6 +972,7 @@ export default {
},
// 发布考核
handleSetUp(row){
+ this.pcSetUp.row = row;
this.pcSetUp.pingceId = row.id;
this.pcSetUp.pingceName = row.pcTitle;
this.pcSetUp.templateId = row.templateId;
@@ -1047,6 +1057,32 @@ export default {
type: 'Danger'
})
}
+ if(row.typeId!==3 && Vote.percentage){
+ let allFlag = true;
+ let sumPercentage = 0;
+ this.pcSetUp.list.forEach(item=>{
+ if(item.typeId!==3){
+ if(!item.vote || !item.vote.percentage){
+ allFlag=false;
+ }
+ if(item.vote && item.vote.percentage){
+ sumPercentage += item.vote.percentage
+ }
+ }
+ })
+ if(allFlag && sumPercentage!==1){
+ flag = false;
+ this.$alert(`评分占比合计需要为1!`, `提示`, {
+ type: 'Danger'
+ })
+ }
+ if(!allFlag && sumPercentage>1){
+ flag = false;
+ this.$alert(`评分占比合计不能超过1!`, `提示`, {
+ type: 'Danger'
+ })
+ }
+ }
if(!Vote.voteTitle){
flag = false;
this.$alert(`评分主题不能为空!`, `提示`, {
@@ -1062,11 +1098,18 @@ export default {
this.cancelVote()
})
} else if(Vote.id === null && flag){
- Vote.state = '0'
+ Vote.state = '0';
addVote(Vote).then(response => {
this.$modal.msgSuccess("新增成功")
- this.cancelVote()
- })
+ this.cancelVote();
+ });
+ if(this.pcSetUp.row.state==='0'){
+ // 修改考核任务状态 进行中
+ this.pcSetUp.row.state='1'
+ updatePingce(this.pcSetUp.row).then(response => {
+ this.getList()
+ })
+ }
}
},
cancelVote(){
@@ -1194,6 +1237,10 @@ export default {
viewUser(row){
this.$router.push({ path: '/system/user', query: { pcId: row.id}});
},
+ // 查看评分任务
+ viewVote(row){
+ this.$router.push({ path: '/toupiao/vote', query: { pcId: row.id}});
+ },
// 提交生成评分账号
scpfzhSubmit(){
this.$refs["scpfzhForm"].validate(valid => {
diff --git a/ruoyi-ui/src/views/kaohe/vote/index.vue b/ruoyi-ui/src/views/kaohe/vote/index.vue
index d6c03d1..cbb61c4 100644
--- a/ruoyi-ui/src/views/kaohe/vote/index.vue
+++ b/ruoyi-ui/src/views/kaohe/vote/index.vue
@@ -242,6 +242,7 @@ export default {
}
},
created() {
+ this.queryParams.pingceId=this.$route.query.pcId
this.getVoteItemsList();
},
methods: {