Browse Source

指标新增统计

dev-xx
qb 1 year ago
parent
commit
c69465bda5
  1. 1
      src/option/supervise/supervise.js
  2. 54
      src/views/supervise/IndicatorList.vue
  3. 73
      src/views/supervise/management.vue

1
src/option/supervise/supervise.js

@ -217,6 +217,7 @@ export const IndicatorColumnList = [
fixed: false, fixed: false,
sortable: true, sortable: true,
head: false, head: false,
isshowSummary: true,
}, },
{ {
prop: 'createDeptName', prop: 'createDeptName',

54
src/views/supervise/IndicatorList.vue

@ -81,6 +81,7 @@
<el-row> <el-row>
<!-- 列表模块 --> <!-- 列表模块 -->
<tablecmt <tablecmt
ref="tableNode"
:columnList="IndicatorColumnList" :columnList="IndicatorColumnList"
:tableData="classificationdata" :tableData="classificationdata"
:loading="loadingclassification" :loading="loadingclassification"
@ -106,23 +107,21 @@
</el-row> </el-row>
<!-- 分页模块 --> <!-- 分页模块 -->
<el-row class="el-fy"> <div class="flex-c-sb">
<div class="avue-crud__pagination flex-c-sb" style="width: 100%"> <div></div>
<div></div> <el-pagination
<el-pagination align="right"
align="right" background
background @size-change="sizeChange"
@size-change="sizeChange" @current-change="currentChange"
@current-change="currentChange" :current-page="currentPage"
:current-page="currentPage" :page-sizes="[30, 50, 80, 120]"
:page-sizes="[30, 50, 80, 120]" :page-size="pageSize"
:page-size="pageSize" layout="total, sizes, prev, pager, next, jumper"
layout="total, sizes, prev, pager, next, jumper" :total="total"
:total="total" >
> </el-pagination>
</el-pagination> </div>
</div>
</el-row>
</div> </div>
<el-dialog v-model="newlyAdded" title="查看详情" width="60%"> <el-dialog v-model="newlyAdded" title="查看详情" width="60%">
@ -369,6 +368,7 @@ import { ElMessage, ElMessageBox } from 'element-plus';
import { ref, reactive, computed, onMounted } from 'vue'; import { ref, reactive, computed, onMounted } from 'vue';
import { IndicatorColumnList } from '@/option/supervise/supervise.js'; import { IndicatorColumnList } from '@/option/supervise/supervise.js';
import functions from '@/utils/functions.js'; import functions from '@/utils/functions.js';
import { setNodeHeight } from '@/utils/util';
import { import {
$_Getclassify, $_Getclassify,
$_newlyadded, $_newlyadded,
@ -431,6 +431,8 @@ const fuj = val => {
.catch(() => {}); .catch(() => {});
}; };
const srcList = ref([]); const srcList = ref([]);
/** 表格实例 */
const tableNode = ref();
const onLoad = () => { const onLoad = () => {
let data = { let data = {
current: current.value, current: current.value,
@ -585,13 +587,13 @@ const handleNodeClick = (data, node, component) => {
// //
}; };
const assessDeptChange=()=>{ const assessDeptChange = () => {
if(!searchFrom.value.assessDept){ if (!searchFrom.value.assessDept) {
query.value.assessDept=null query.value.assessDept = null;
onLoad(); onLoad();
} }
console.log(searchFrom.value.assessDept,'当前点击的考核部门'); console.log(searchFrom.value.assessDept, '当前点击的考核部门');
} };
// //
const searcheNodeClick = (data, node, component) => { const searcheNodeClick = (data, node, component) => {
@ -743,6 +745,8 @@ const selectionChange = list => {
const searchHide = () => { const searchHide = () => {
search.value = !search.value; search.value = !search.value;
setNodeHeight(tableNode.value.$el, '', true);
}; };
// //
const ClassificationChange = val => { const ClassificationChange = val => {
@ -1045,9 +1049,9 @@ const timeChange = val => {
} }
} }
} }
.maboxhi { // .maboxhi {
height: 700px !important; // height: 700px !important;
} // }
.el_fotnr { .el_fotnr {
:deep(.el-upload) { :deep(.el-upload) {
display: none; display: none;

73
src/views/supervise/management.vue

@ -67,30 +67,29 @@
</el-row> </el-row>
<!-- 首页表格 --> <!-- 首页表格 -->
<el-row> <!-- 列表模块 -->
<!-- 列表模块 --> <tablecmt
<tablecmt ref="tableNode"
:columnList="managementColumnList" :columnList="managementColumnList"
:tableData="classificationdata" :tableData="classificationdata"
:loading="loadingclassification" :loading="loadingclassification"
@inputTxt="inputsc" @inputTxt="inputsc"
@timeCheck="timesc" @timeCheck="timesc"
@btnCheck="btnsc" @btnCheck="btnsc"
@selectCheck="selectsc" @selectCheck="selectsc"
@selection="selectionChange" @selection="selectionChange"
> >
<template #default="slotProps"> <template #default="slotProps">
<template v-if="slotProps.scope.column.label === '操作'"> <template v-if="slotProps.scope.column.label === '操作'">
<div class="ElBtnClass"> <div class="ElBtnClass">
<el-button text @click="ClassificationDditing(slotProps.scope)">编辑</el-button> <el-button text @click="ClassificationDditing(slotProps.scope)">编辑</el-button>
<el-button text type="primary" @click="CategoryDeletion(slotProps.scope)" <el-button text type="primary" @click="CategoryDeletion(slotProps.scope)"
>删除</el-button >删除</el-button
> >
</div> </div>
</template>
</template> </template>
</tablecmt> </template>
</el-row> </tablecmt>
<!-- 分页模块 --> <!-- 分页模块 -->
<el-row class="el-fy"> <el-row class="el-fy">
@ -248,7 +247,7 @@ import {
$_classifupdateChild, $_classifupdateChild,
$_parentId, $_parentId,
} from '@/api/classify/classify'; } from '@/api/classify/classify';
import { isNumber } from '@/utils/util'; import { isNumber, setNodeHeight } from '@/utils/util';
const loadingclassification = ref(false); // const loadingclassification = ref(false); //
const classificationdata = ref([]); // const classificationdata = ref([]); //
const current = ref(1); // const current = ref(1); //
@ -274,6 +273,9 @@ const drawerShow = ref(false); //抽屉显示
const department = ref(); // const department = ref(); //
const examineDeptName = ref(''); // const examineDeptName = ref(''); //
/** 表格实例 */
const tableNode = ref();
// //
// //
const loadChildren = (targetList, parentId, indicatorValue) => { const loadChildren = (targetList, parentId, indicatorValue) => {
@ -314,7 +316,7 @@ const loadChildren = (targetList, parentId, indicatorValue) => {
// //
const classification = (val, index) => { const classification = (val, index) => {
console.log(index, '当前点击的谁'); console.log(index, '当前点击的谁');
console.log(val,'val222'); console.log(val, 'val222');
const currentCategory = AssessmentDepartment.value.find(category => category.value === index); const currentCategory = AssessmentDepartment.value.find(category => category.value === index);
if (currentCategory) { if (currentCategory) {
if (currentCategory.hasChildren && currentCategory.children.length === 0) { if (currentCategory.hasChildren && currentCategory.children.length === 0) {
@ -330,16 +332,15 @@ const classification = (val, index) => {
} }
}; };
// //
const loadInitialCategories = (val = 0) => { const loadInitialCategories = (val = 0) => {
let dataSub = { parentId: val }; let dataSub = { parentId: val };
$_parentId(dataSub).then(res => { $_parentId(dataSub).then(res => {
console.log(res, '初始化顶级分类-------'); console.log(res, '初始化顶级分类-------');
res.data.data.forEach(item => { res.data.data.forEach(item => {
setTimeout(()=>{ setTimeout(() => {
classification(item.id,item.value) classification(item.id, item.value);
},0) }, 0);
department.value = item.id; department.value = item.id;
AssessmentDepartment.value.push({ AssessmentDepartment.value.push({
value: item.value, value: item.value,
@ -354,8 +355,6 @@ const loadInitialCategories = (val = 0) => {
}; };
loadInitialCategories(); loadInitialCategories();
const handleNodeClick = (data, node, component) => { const handleNodeClick = (data, node, component) => {
// 'data' // 'data'
// 'node' Node // 'node' Node
@ -363,8 +362,8 @@ const handleNodeClick = (data, node, component) => {
// console.log('You clicked:', data); // console.log('You clicked:', data);
department.value = data; // department.value = data; //
console.log(department.value, '当前点击的考核部门'); console.log(department.value, '当前点击的考核部门');
console.log(data.id,'data.id'); console.log(data.id, 'data.id');
console.log(data.value,'data.value'); console.log(data.value, 'data.value');
if (data.hasChildren) { if (data.hasChildren) {
classification(data.id, data.value); classification(data.id, data.value);
} }
@ -540,6 +539,8 @@ const BatchDelete = () => {
// //
const searchHide = () => { const searchHide = () => {
search.value = !search.value; search.value = !search.value;
setNodeHeight(tableNode.value.$el, '', true);
}; };
// //
const CategoryDeletion = val => { const CategoryDeletion = val => {
@ -772,7 +773,7 @@ const handleClose = res => {
margin-right: 0; margin-right: 0;
} }
} }
.maboxhi { // .maboxhi {
height: 700px !important; // height: 700px !important;
} // }
</style> </style>

Loading…
Cancel
Save