diff --git a/ruoyi-ui/src/api/kaohe/gather.js b/ruoyi-ui/src/api/kaohe/gather.js
index a2b5f76..0b3189b 100644
--- a/ruoyi-ui/src/api/kaohe/gather.js
+++ b/ruoyi-ui/src/api/kaohe/gather.js
@@ -18,7 +18,7 @@ export function getGather(id) {
}
// 新增生成汇总
-export function addGather(data) {
+export function addGather1(data) {
return request({
url: '/kaohe/gather',
method: 'post',
@@ -26,6 +26,15 @@ export function addGather(data) {
})
}
+// 新增生成汇总
+export function addGather(data) {
+ return request({
+ url: '/kaohe/gather/generateSum',
+ method: 'post',
+ data: data
+ })
+}
+
// 修改生成汇总
export function updateGather(data) {
return request({
diff --git a/ruoyi-ui/src/api/kaohe/pingce.js b/ruoyi-ui/src/api/kaohe/pingce.js
index 92a4693..122ce4f 100644
--- a/ruoyi-ui/src/api/kaohe/pingce.js
+++ b/ruoyi-ui/src/api/kaohe/pingce.js
@@ -53,8 +53,6 @@ export function getItemVote(query) {
})
}
-
-
// 批量添加账号接口
export function addsUser(data) {
return request({
diff --git a/ruoyi-ui/src/components/RecursiveTree/index.vue b/ruoyi-ui/src/components/RecursiveTree/index.vue
index 0ac7721..ed63293 100644
--- a/ruoyi-ui/src/components/RecursiveTree/index.vue
+++ b/ruoyi-ui/src/components/RecursiveTree/index.vue
@@ -2,23 +2,23 @@
-
+
-
+ :max="1" v-if="nodeData.type1==='1'||nodeData.type1==='0'">
- 标题
- 占比引用
- 不占比引用
+ 标题
+ 占比引用
+ 不占比引用
@@ -57,14 +57,14 @@ export default {
onChangeKaohe(parentNode){
this.$emit('change-kaohe', parentNode)
},
- addChild(type) {
- this.$emit('add-child', this.nodeData, type)
+ addChild(type1) {
+ this.$emit('add-child', this.nodeData, type1)
},
removeNode() {
this.$emit('remove-node', this.nodeData)
},
- onAddChild(parentNode, type) {
- this.$emit('add-child', parentNode, type)
+ onAddChild(parentNode, type1) {
+ this.$emit('add-child', parentNode, type1)
},
onRemoveNode(nodeToRemove) {
this.$emit('remove-node', nodeToRemove)
diff --git a/ruoyi-ui/src/components/TableColumn/index.vue b/ruoyi-ui/src/components/TableColumn/index.vue
index 0eaa466..89f92a7 100644
--- a/ruoyi-ui/src/components/TableColumn/index.vue
+++ b/ruoyi-ui/src/components/TableColumn/index.vue
@@ -1,7 +1,7 @@
-
+
diff --git a/ruoyi-ui/src/views/index.vue b/ruoyi-ui/src/views/index.vue
index a8f4e4e..2461393 100644
--- a/ruoyi-ui/src/views/index.vue
+++ b/ruoyi-ui/src/views/index.vue
@@ -12,7 +12,7 @@
v-if="(new Date(item.sTime) < (new Date())) && (new Date(item.eTime) > (new Date()))"
@click="goVotepage(item)"
>
- 去评分
+ 去评分
未开始
已结束
diff --git a/ruoyi-ui/src/views/kaohe/gather/index.vue b/ruoyi-ui/src/views/kaohe/gather/index.vue
index 142143e..efd045c 100644
--- a/ruoyi-ui/src/views/kaohe/gather/index.vue
+++ b/ruoyi-ui/src/views/kaohe/gather/index.vue
@@ -26,7 +26,7 @@
v-hasPermi="['kaohe:gather:add']"
>新增
-
+
-
-
-
-
-
+
+
+
+
+
- 修改
+ >修改-->
+ 查看生成汇总
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -164,6 +186,12 @@ export default {
components: { TableColumn, RecursiveTree },
data() {
return {
+ // 考核得分
+ khdf:{
+ open: false,
+ list: [],
+ tableHeader: []
+ },
// 遮罩层
loading: true,
// 选中数组
@@ -271,7 +299,11 @@ export default {
},
/** 提交按钮 */
submitForm() {
- console.log(this.treeData);
+ addGather(JSON.stringify(this.treeData)).then(response => {
+ this.$modal.msgSuccess("新增成功")
+ this.open = false
+ this.getList();
+ })
/*this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
@@ -306,18 +338,41 @@ export default {
...this.queryParams
}, `gather_${new Date().getTime()}.xlsx`)
},
- handleAddChild(parentNode,type) {
+ handleAddChild(parentNode,type1) {
if (!parentNode.data) {
this.$set(parentNode, 'data', [])
}
- parentNode.data.push({
- type: type,
- title: null,
- id: null,
- zb: null,
- pcTitle: null,
- data: []
- })
+ if(type1==='0'){
+ parentNode.data.push({
+ type1: type1,
+ type: '0',
+ title: null,
+ id: null,
+ zb: null,
+ pcTitle: null,
+ data: []
+ })
+ }
+ if(type1==='1'){
+ parentNode.data.push({
+ type1: type1,
+ type: '1',
+ title: null,
+ id: null,
+ zb: null,
+ pcTitle: null
+ })
+ }
+ if(type1==='2'){
+ parentNode.data.push({
+ type1: type1,
+ type: '1',
+ title: null,
+ id: null,
+ pcTitle: null
+ })
+ }
+
},
handleRemoveNode(nodeToRemove) {
const removeNode = (parent, node) => {
@@ -354,9 +409,46 @@ export default {
// 引用考核任务选择 选中数据
khrwRowChange(row) {
this.khrw.parentNode.id = row.id;
+ this.khrw.parentNode.title = row.pcTitle;
this.khrw.parentNode.pcTitle = row.pcTitle;
this.khrw.open = false;
},
+ // 查看生成汇总
+ viewKaoHeScore(row){
+ this.khdf.list = [];
+ this.khdf.tableHeader = [];
+ this.khdf.open = true;
+ this.reset()
+ getGather(row.id).then(response => {
+ let khdfList = JSON.parse(response.data.tableData);
+ khdfList.forEach(item=> {
+ item.jxdwldbzkhzf['khdx'] = item.khdx;
+ })
+ this.khdf.list = khdfList;
+
+ let btTabelTree = JSON.parse(response.data.tableHeader);
+ btTabelTree.forEach(item => {
+ item.prop = item.name;
+ if(item.children && item.children.length>0){
+ this.setProp(item.children, item.prop)
+ }
+ })
+ this.khdf.tableHeader = btTabelTree;
+ })
+ },
+ // 递归函数 设置prop参数
+ setProp(list, prop){
+ list.forEach(item=>{
+ if(prop){
+ item.prop = prop+'.'+item.name;
+ }else {
+ item.prop = item.name;
+ }
+ if(item.children && item.children.length>0){
+ this.setProp(item.children, item.prop)
+ }
+ })
+ },
}
}
diff --git a/ruoyi-ui/src/views/kaohe/pingce/index.vue b/ruoyi-ui/src/views/kaohe/pingce/index.vue
index e548b0c..84d6f5f 100644
--- a/ruoyi-ui/src/views/kaohe/pingce/index.vue
+++ b/ruoyi-ui/src/views/kaohe/pingce/index.vue
@@ -80,6 +80,7 @@
+
@@ -90,7 +91,7 @@
-
+
发布考核
- 修改
查看考核得分
查看评分账号
- 删除
@@ -447,12 +434,12 @@
编辑评分规则
确认
@@ -469,6 +456,7 @@
type="text"
icon="el-icon-thumb"
@click="goVotepage(scope.row)"
+ v-hasPermi="['kaohe:vote_emp:edit']"
>去评分
diff --git a/ruoyi-ui/src/views/kaohe/vote/index.vue b/ruoyi-ui/src/views/kaohe/vote/index.vue
index c280ea5..d6c03d1 100644
--- a/ruoyi-ui/src/views/kaohe/vote/index.vue
+++ b/ruoyi-ui/src/views/kaohe/vote/index.vue
@@ -184,6 +184,7 @@
type="text"
icon="el-icon-thumb"
@click="goVotepage(scope.row)"
+ v-hasPermi="['kaohe:vote_emp:edit']"
>去评分
diff --git a/ruoyi-ui/src/views/votepage.vue b/ruoyi-ui/src/views/votepage.vue
index eff9f75..7463efc 100644
--- a/ruoyi-ui/src/views/votepage.vue
+++ b/ruoyi-ui/src/views/votepage.vue
@@ -39,7 +39,7 @@