From c69465bda51821cdadbc0e1fefa885fbe071ac28 Mon Sep 17 00:00:00 2001
From: qb <1191961160@qq.com>
Date: Tue, 20 Feb 2024 09:25:57 +0800
Subject: [PATCH] =?UTF-8?q?=E6=8C=87=E6=A0=87=E6=96=B0=E5=A2=9E=E7=BB=9F?=
=?UTF-8?q?=E8=AE=A1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/option/supervise/supervise.js | 1 +
src/views/supervise/IndicatorList.vue | 54 +++++++++++---------
src/views/supervise/management.vue | 73 ++++++++++++++-------------
3 files changed, 67 insertions(+), 61 deletions(-)
diff --git a/src/option/supervise/supervise.js b/src/option/supervise/supervise.js
index 9b509ee1..742bf24f 100644
--- a/src/option/supervise/supervise.js
+++ b/src/option/supervise/supervise.js
@@ -217,6 +217,7 @@ export const IndicatorColumnList = [
fixed: false,
sortable: true,
head: false,
+ isshowSummary: true,
},
{
prop: 'createDeptName',
diff --git a/src/views/supervise/IndicatorList.vue b/src/views/supervise/IndicatorList.vue
index 37dd5092..b4433635 100644
--- a/src/views/supervise/IndicatorList.vue
+++ b/src/views/supervise/IndicatorList.vue
@@ -81,6 +81,7 @@
-
-
-
+
@@ -369,6 +368,7 @@ import { ElMessage, ElMessageBox } from 'element-plus';
import { ref, reactive, computed, onMounted } from 'vue';
import { IndicatorColumnList } from '@/option/supervise/supervise.js';
import functions from '@/utils/functions.js';
+import { setNodeHeight } from '@/utils/util';
import {
$_Getclassify,
$_newlyadded,
@@ -431,6 +431,8 @@ const fuj = val => {
.catch(() => {});
};
const srcList = ref([]);
+/** 表格实例 */
+const tableNode = ref();
const onLoad = () => {
let data = {
current: current.value,
@@ -585,13 +587,13 @@ const handleNodeClick = (data, node, component) => {
// 根据你的需求处理点击事件
};
-const assessDeptChange=()=>{
- if(!searchFrom.value.assessDept){
- query.value.assessDept=null
+const assessDeptChange = () => {
+ if (!searchFrom.value.assessDept) {
+ query.value.assessDept = null;
onLoad();
}
- console.log(searchFrom.value.assessDept,'当前点击的考核部门');
-}
+ console.log(searchFrom.value.assessDept, '当前点击的考核部门');
+};
// 考核部门搜索
const searcheNodeClick = (data, node, component) => {
@@ -743,6 +745,8 @@ const selectionChange = list => {
const searchHide = () => {
search.value = !search.value;
+
+ setNodeHeight(tableNode.value.$el, '', true);
};
// 指标分类选择
const ClassificationChange = val => {
@@ -1045,9 +1049,9 @@ const timeChange = val => {
}
}
}
-.maboxhi {
- height: 700px !important;
-}
+// .maboxhi {
+// height: 700px !important;
+// }
.el_fotnr {
:deep(.el-upload) {
display: none;
diff --git a/src/views/supervise/management.vue b/src/views/supervise/management.vue
index 1fd17cdf..d0bc87b3 100644
--- a/src/views/supervise/management.vue
+++ b/src/views/supervise/management.vue
@@ -67,30 +67,29 @@
-
-
-
-
-
-
- 编辑
- 删除
-
-
+
+
+
+
+
+ 编辑
+ 删除
+
-
-
+
+
@@ -248,7 +247,7 @@ import {
$_classifupdateChild,
$_parentId,
} from '@/api/classify/classify';
-import { isNumber } from '@/utils/util';
+import { isNumber, setNodeHeight } from '@/utils/util';
const loadingclassification = ref(false); //指标分类加载效果
const classificationdata = ref([]); //指标分类数据
const current = ref(1); //当前页
@@ -274,6 +273,9 @@ const drawerShow = ref(false); //抽屉显示
const department = ref(); //考核部门存储
const examineDeptName = ref(''); //考核部门名字
+/** 表格实例 */
+const tableNode = ref();
+
// 获取分类指标
// 在外部定义递归函数,用于加载和更新分类
const loadChildren = (targetList, parentId, indicatorValue) => {
@@ -314,7 +316,7 @@ const loadChildren = (targetList, parentId, indicatorValue) => {
// 当分类项被点击时调用
const classification = (val, index) => {
console.log(index, '当前点击的谁');
- console.log(val,'val222');
+ console.log(val, 'val222');
const currentCategory = AssessmentDepartment.value.find(category => category.value === index);
if (currentCategory) {
if (currentCategory.hasChildren && currentCategory.children.length === 0) {
@@ -330,16 +332,15 @@ const classification = (val, index) => {
}
};
-
// 初始时获取顶级分类
const loadInitialCategories = (val = 0) => {
let dataSub = { parentId: val };
$_parentId(dataSub).then(res => {
console.log(res, '初始化顶级分类-------');
res.data.data.forEach(item => {
- setTimeout(()=>{
- classification(item.id,item.value)
- },0)
+ setTimeout(() => {
+ classification(item.id, item.value);
+ }, 0);
department.value = item.id;
AssessmentDepartment.value.push({
value: item.value,
@@ -354,8 +355,6 @@ const loadInitialCategories = (val = 0) => {
};
loadInitialCategories();
-
-
const handleNodeClick = (data, node, component) => {
// 'data' 是点击的节点数据
// 'node' 是 Node 对象
@@ -363,8 +362,8 @@ const handleNodeClick = (data, node, component) => {
// console.log('You clicked:', data);
department.value = data; //存储当前点击的考核部门
console.log(department.value, '当前点击的考核部门');
- console.log(data.id,'data.id');
- console.log(data.value,'data.value');
+ console.log(data.id, 'data.id');
+ console.log(data.value, 'data.value');
if (data.hasChildren) {
classification(data.id, data.value);
}
@@ -540,6 +539,8 @@ const BatchDelete = () => {
// 放大镜搜索
const searchHide = () => {
search.value = !search.value;
+
+ setNodeHeight(tableNode.value.$el, '', true);
};
// 分类删除
const CategoryDeletion = val => {
@@ -772,7 +773,7 @@ const handleClose = res => {
margin-right: 0;
}
}
-.maboxhi {
- height: 700px !important;
-}
+// .maboxhi {
+// height: 700px !important;
+// }