diff --git a/src/views/evaluation/personnel_evaluation_status/components/personnel_list.vue b/src/views/evaluation/personnel_evaluation_status/components/personnel_list.vue index 729e52b..1cdc487 100644 --- a/src/views/evaluation/personnel_evaluation_status/components/personnel_list.vue +++ b/src/views/evaluation/personnel_evaluation_status/components/personnel_list.vue @@ -32,7 +32,7 @@ style="width: 100%;"/> - + 搜索 @@ -40,6 +40,9 @@ 重置 + + 导出数据 + @@ -78,6 +81,9 @@ 批量兑换 全选兑换 +
+ 合计:奖励总得分: {{ totalScores }} ,已兑换分数: {{ userdScores }} ,未兑换奖励数: {{ totalScores - userdScores }} +
@@ -95,9 +101,12 @@ export default { directives: { waves }, data() { return { + config: config, total: 0, varList: [], treeData: [], + totalScores: 0, + userdScores: 0, normalizer(node) { return { id: node.id, @@ -168,6 +177,8 @@ export default { this.listLoading = false this.varList = data.varList this.total = data.page.totalResult + this.totalScores = data.allAmounttoScore.totalScores + this.userdScores = data.allAmounttoScore.userdScores }).catch((e) => { this.listLoading = false }) @@ -243,6 +254,38 @@ export default { }, goBack() { this.$parent.activeName = 'List' + }, + // 导出数据 + exportData() { + this.$confirm('确定要导出到excel吗?', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + console.log('开始') + this.listLoading = false + let pageData = '' + if (this.searchForm.KEYWORDS) { + pageData += '&KEYWORDS=' + this.searchForm.KEYWORDS + } + if (this.searchForm.DEPARTMENT_ID) { + pageData += '&DEPARTMENT_ID=' + this.searchForm.DEPARTMENT_ID + } + if (this.searchForm.dates[0]) { + pageData += '&START_TIME=' + this.searchForm.dates[0] + ' 00:00:00' + } + if (this.searchForm.dates[1]) { + pageData += '&END_TIME=' + this.searchForm.dates[1] + ' 23:59:59' + } + if (this.$parent.CORPINFO_ID) { + pageData += '&CORPINFO_ID=' + this.$parent.CORPINFO_ID + } + window.open(this.config.httpurl + 'evaluationscore/excelAll?' + pageData) + }).catch(() => { + console.log('报错') + this.listLoading = false + }) + this.listLoading = false } } } diff --git a/src/views/keyprojects/outsourced/components/edit.vue b/src/views/keyprojects/outsourced/components/edit.vue index 713264b..2fdf10c 100644 --- a/src/views/keyprojects/outsourced/components/edit.vue +++ b/src/views/keyprojects/outsourced/components/edit.vue @@ -37,6 +37,7 @@ @@ -443,6 +446,7 @@ export default { directives: { waves }, data() { return { + updateValue: true, selectUsers: [], // 防止报错,参数无用 chooseUserList: [], punishThePerson: [], @@ -1315,6 +1319,52 @@ export default { this.form.UNITS_PHONE = item.PHONENUM } }) + }, + // 将树节点的子节点全部添加到数组中 + pullSelectedNodes(selectedItems) { + if (selectedItems.nodes && selectedItems.nodes.length > 0) { + for (let i = 0; i < selectedItems.nodes.length; i++) { + if (!this.form.JURISDICTION_UNIT.includes(selectedItems.nodes[i].id)) { + this.form.JURISDICTION_UNIT.push(selectedItems.nodes[i].id) + } + this.pullSelectedNodes(selectedItems.nodes[i]) + } + } + }, + // 选择项时触发的事件 + handleSelect(selectedItems) { + // 选择父节点时同时勾选全部子节点 + if (!this.form.JURISDICTION_UNIT.includes(selectedItems.id)) { + this.form.JURISDICTION_UNIT.push(selectedItems.id) + } + this.pullSelectedNodes(selectedItems) + this.onClick() + }, + // 将选中项的子节点全部移除 + removeSelectedNodes(selectedItems) { + if (selectedItems.nodes && selectedItems.nodes.length > 0) { + for (let i = 0; i < selectedItems.nodes.length; i++) { + if (this.form.JURISDICTION_UNIT.includes(selectedItems.nodes[i].id)) { + this.form.JURISDICTION_UNIT.splice(this.form.JURISDICTION_UNIT.indexOf(selectedItems.nodes[i].id), 1) + } + this.removeSelectedNodes(selectedItems.nodes[i]) + } + } + }, + // 移除选中项时触发的事件 + handleRemove(selectedItems) { + // 移除选中项时同时移除全部子节点 + if (this.form.JURISDICTION_UNIT.includes(selectedItems.id)) { + this.form.JURISDICTION_UNIT.splice(this.form.JURISDICTION_UNIT.indexOf(selectedItems.id), 1) + } + this.removeSelectedNodes(selectedItems) + this.onClick() + }, + onClick() { + this.updateValue = false + this.$nextTick(() => { + this.updateValue = true + }) } } } diff --git a/src/views/map/index.vue b/src/views/map/index.vue index 0c5a106..96c7677 100644 --- a/src/views/map/index.vue +++ b/src/views/map/index.vue @@ -298,7 +298,8 @@ export default { 'x': 117.91412, 'y': 38.35902 }, - CORP_INFO_ID: '016d19225e9d4ece863cce8a256a3e72' + // CORP_INFO_ID: '016d19225e9d4ece863cce8a256a3e72' + CORP_INFO_ID: 'f8da1790b1034058ae2efefd69af3284' }, { 'id': '00003', diff --git a/src/views/safetyenvironmental/inspection/components/edit.vue b/src/views/safetyenvironmental/inspection/components/edit.vue index 4e36afc..0f550ff 100644 --- a/src/views/safetyenvironmental/inspection/components/edit.vue +++ b/src/views/safetyenvironmental/inspection/components/edit.vue @@ -531,8 +531,8 @@ export default { this.getDict() await this.getDictTreeData() await this.getDictInspectDept() + await this.handleEdit(this.$parent.INSPECTION_ID) await this.getHiddenReginTreeList() - this.handleEdit(this.$parent.INSPECTION_ID) loading.close() }, mounted() { @@ -547,36 +547,39 @@ export default { // 修改 handleEdit(ID) { - requestFN( - '/safetyenvironmental/goEdit', - { - INSPECTION_ID: ID - } - ).then((data) => { - this.form = Object.assign(this.form, data.pd) // copy obj - if (this.form.INSPECTION_TYPE_OTHER) { - this.switchInspectionType = 'value' - } else { - this.switchInspectionType = 'select' - } - for (let i = 0; i < this.form.inspectorList.length; i++) { - this.INSPECTOR_List.push([]) - this.getInspectorList(this.form.inspectorList[i].INSPECTION_DEPARTMENT_ID, i) - } - for (let i = 0; i < this.form.hiddenList.length; i++) { - const formData = { fileHdImgList: [], fileVideoList: [] } - this.hdFile.push(formData) - } - this.$nextTick(() => { // 此处使用这个可以等节点渲染后再获取节点 - if (this.switchInspectionType === 'select') { - this.$refs['tree_InspectionType'].handleNodeClick({ id: this.form.INSPECTION_TYPE }) + return new Promise((resolve) => { + requestFN( + '/safetyenvironmental/goEdit', + { + INSPECTION_ID: ID } - this.$refs['deptTree_Inspected'].handleNodeClick({ id: this.form.INSPECTED_DEPARTMENT_ID }) - this.getUserList(this.form.INSPECTED_DEPARTMENT_ID) - console.info(this.form) + ).then((data) => { + this.form = Object.assign(this.form, data.pd) // copy obj + if (this.form.INSPECTION_TYPE_OTHER) { + this.switchInspectionType = 'value' + } else { + this.switchInspectionType = 'select' + } + for (let i = 0; i < this.form.inspectorList.length; i++) { + this.INSPECTOR_List.push([]) + this.getInspectorList(this.form.inspectorList[i].INSPECTION_DEPARTMENT_ID, i) + } + for (let i = 0; i < this.form.hiddenList.length; i++) { + const formData = { fileHdImgList: [], fileVideoList: [] } + this.hdFile.push(formData) + } + this.$nextTick(() => { // 此处使用这个可以等节点渲染后再获取节点 + if (this.switchInspectionType === 'select') { + this.$refs['tree_InspectionType'].handleNodeClick({ id: this.form.INSPECTION_TYPE }) + } + this.$refs['deptTree_Inspected'].handleNodeClick({ id: this.form.INSPECTED_DEPARTMENT_ID }) + this.getUserList(this.form.INSPECTED_DEPARTMENT_ID) + console.info(this.form) + resolve() + }) + }).catch((e) => { + this.listLoading = false }) - }).catch((e) => { - this.listLoading = false }) }, changeSwitch(type) { @@ -1080,8 +1083,11 @@ export default { return new Promise((resolve) => { this.treeLoading = true requestFN( - '/hiddenRegion/listAll', - {} + '/hiddenRegion/gerRegionList', + { + parentId: '0', + DEPARTMENT_ID: this.form.INSPECTED_DEPARTMENT_ID + } ).then((data) => { this.treeLoading = false this.hiddenPartList = JSON.parse(data.zTreeNodes)