From e73a76a266b46de35d3811ae851d76ecb6eec8d3 Mon Sep 17 00:00:00 2001 From: wanglei Date: Mon, 14 Jul 2025 10:35:21 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/api/kaohe/gather.js | 11 +- .../src/components/RecursiveTree/index.vue | 26 ++-- ruoyi-ui/src/views/kaohe/gather/index.vue | 125 +++++++++++++++--- 3 files changed, 130 insertions(+), 32 deletions(-) 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/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/views/kaohe/gather/index.vue b/ruoyi-ui/src/views/kaohe/gather/index.vue index 142143e..9367956 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,43 @@ 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 => { + this.khdf.list = JSON.parse(response.data.tableData); + 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; + + console.log(this.khdf.tableHeader, this.khdf.list); + }) + }, + // 递归函数 设置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) + } + }) + }, } } From e363d66a69d4e41bfe549997277779aead316522 Mon Sep 17 00:00:00 2001 From: wanglei Date: Mon, 14 Jul 2025 10:51:32 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E6=9D=83=E9=99=90=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/views/index.vue | 2 +- ruoyi-ui/src/views/kaohe/pingce/index.vue | 1 + ruoyi-ui/src/views/votepage.vue | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) 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/pingce/index.vue b/ruoyi-ui/src/views/kaohe/pingce/index.vue index e548b0c..db8c8f3 100644 --- a/ruoyi-ui/src/views/kaohe/pingce/index.vue +++ b/ruoyi-ui/src/views/kaohe/pingce/index.vue @@ -469,6 +469,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 @@
- 提交评分 + 提交评分
From 085e5e9d00f3cd326c97a9bbc0ceec90a62c0ab4 Mon Sep 17 00:00:00 2001 From: wanglei Date: Mon, 14 Jul 2025 11:02:36 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E7=94=9F=E6=88=90=E6=B1=87=E6=80=BB?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/components/TableColumn/index.vue | 2 +- ruoyi-ui/src/views/kaohe/gather/index.vue | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) 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 @@ - + @@ -447,12 +434,12 @@ 编辑评分规则 确认 From 792601c7fc7d2a3375a454170175d9015df73161 Mon Sep 17 00:00:00 2001 From: wanglei Date: Mon, 14 Jul 2025 11:50:18 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E6=9D=83=E9=99=90=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/views/kaohe/gather/index.vue | 4 ++-- ruoyi-ui/src/views/kaohe/vote/index.vue | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ruoyi-ui/src/views/kaohe/gather/index.vue b/ruoyi-ui/src/views/kaohe/gather/index.vue index d8a4d14..efd045c 100644 --- a/ruoyi-ui/src/views/kaohe/gather/index.vue +++ b/ruoyi-ui/src/views/kaohe/gather/index.vue @@ -67,8 +67,8 @@ - - + +