diff --git a/package.json b/package.json index cfc5aa43..0360164d 100644 --- a/package.json +++ b/package.json @@ -12,11 +12,12 @@ }, "dependencies": { "@ant-design/colors": "^7.0.2", - "@dataview/datav-vue3": "0.0.0-test.1672506674342", + "@element-plus/icons-vue": "^2.3.1", "@form-create/designer": "^3.1.3", "@form-create/element-ui": "^3.1.24", "@fortawesome/fontawesome-free": "^6.5.1", + "@kjgl77/datav-vue3": "^1.7.4", "@vue-office/docx": "^1.6.2", "@vue-office/excel": "^1.7.8", "@vue-office/pdf": "^2.0.2", diff --git a/src/api/supervision-boot/userReport/form.ts b/src/api/supervision-boot/userReport/form.ts index e756e1af..8c4a402e 100644 --- a/src/api/supervision-boot/userReport/form.ts +++ b/src/api/supervision-boot/userReport/form.ts @@ -67,6 +67,16 @@ export const downloadSensitiveReportTemplate = () => { responseType: 'blob' }) } +/** + * 下载技术监督模版 + */ +export const downloadPlanTemplate = () => { + return createAxios({ + url: '/supervision-boot/surveyPlan/downloadPlanTemplate', + method: 'GET', + responseType: 'blob' + }) +} /** * 导入敏感及重要用户数据 @@ -90,6 +100,17 @@ export const importSensitiveReportData = (data: any) => { responseType: 'blob' }) } +/** + * 批量导入技术监督数据 + */ +export const importPlanData = (data: any) => { + return createAxios({ + url: '/supervision-boot/surveyPlan/importPlanData', + method: 'POST', + data: data, + responseType: 'blob' + }) +} /** * 批量导入终端台账入网 diff --git a/src/components/table/header/index.vue b/src/components/table/header/index.vue index 015f948f..43383444 100644 --- a/src/components/table/header/index.vue +++ b/src/components/table/header/index.vue @@ -63,7 +63,7 @@ interface Props { showSearch?: boolean nextFlag?: boolean //控制时间是否可以往后推 theCurrentTime?: boolean //控制时间前3天展示上个月时间 - showReset?: boolean //控制时间前3天展示上个月时间 + showReset?: boolean //是否显示重置按钮 showExport?: boolean //导出控制 showTimeAll?: boolean //控制时间是否显示 diff --git a/src/components/table/index.vue b/src/components/table/index.vue index 40a350ca..367d69f8 100644 --- a/src/components/table/index.vue +++ b/src/components/table/index.vue @@ -117,13 +117,13 @@ watch( if (tableStore.table.allFlag) { tableRef.value?.exportData({ - filename: document.querySelectorAll('.ba-nav-tab.active')[0].textContent || '', // 文件名字 + filename:tableStore.table.filename|| document.querySelectorAll('.ba-nav-tab.active')[0].textContent || '', // 文件名字 sheetName: 'Sheet1', type: 'xlsx', //导出文件类型 xlsx 和 csv useStyle: true, data: tableStore.table.allData, // 数据源 // 过滤那个字段导出 columnFilterMethod: function (column: any) { - + return !(column.column.title === undefined || column.column.title === '序号' || column.column.title === '操作') } }) diff --git a/src/components/tree/pqs/Terminal.vue b/src/components/tree/pqs/Terminal.vue index e92753fe..58770609 100644 --- a/src/components/tree/pqs/Terminal.vue +++ b/src/components/tree/pqs/Terminal.vue @@ -24,24 +24,31 @@ const info = (id: any) => { if (VITE_FLAG) { res.data.forEach((item: any) => { item.icon = 'el-icon-Menu' + item.plevel = item.level item.level = 0 item.children.forEach((item2: any) => { item2.icon = 'el-icon-HomeFilled' + + item2.plevel = item2.level item2.level = 100 expanded.value.push(item2.id) item2.children.forEach((item3: any) => { item3.icon = 'el-icon-CollectionTag' + item3.plevel = item3.level item3.level = 200 item3.children.forEach((item4: any) => { item4.icon = 'el-icon-Flag' + item4.plevel = item4.level item4.level = 300 // arr.push(item4) item4.children.forEach((item5: any) => { item5.icon = 'el-icon-OfficeBuilding' + item5.plevel = item5.level item5.level = 300 // item5.id = item4.id item5.children.forEach((item6: any) => { item6.icon = 'el-icon-HelpFilled' + item6.plevel = 4 if (item6.name == '电网侧' && item6.children.length == 0) { item6.level = 400 } else { @@ -49,15 +56,19 @@ const info = (id: any) => { } item6.children.forEach((item7: any) => { item7.icon = 'el-icon-Film' + item7.plevel = item7.level item7.level = 400 item7.children.forEach((item8: any) => { item8.icon = 'el-icon-Collection' + item8.plevel = item8.level item8.level = 500 item8.children.forEach((item9: any) => { item9.icon = 'el-icon-Share' + item9.plevel = item9.level item9.level = 600 item9.children.forEach((item10: any) => { item10.icon = 'el-icon-Location' + item10.plevel = item10.level item10.level = 700 }) }) @@ -90,7 +101,7 @@ const info = (id: any) => { item4.children.forEach((item5: any) => { item5.icon = 'el-icon-OfficeBuilding' item5.plevel = item5.level - item5.level = (item5.level == 7 ? 4 : item5.level+1) * 100 + item5.level = (item5.level == 7 ? 4 : item5.level + 1) * 100 item5.children.forEach((item6: any) => { item6.icon = 'el-icon-Film' item6.plevel = item6.level diff --git a/src/utils/echartMethod.ts b/src/utils/echartMethod.ts index 17843d69..a3d4bbae 100644 --- a/src/utils/echartMethod.ts +++ b/src/utils/echartMethod.ts @@ -3,9 +3,50 @@ const dataProcessing = (arr: any[]) => { .filter(item => typeof item === 'number' || (typeof item === 'string' && !isNaN(parseFloat(item)))) .map(item => (typeof item === 'number' ? item : parseFloat(item))) } +const calculateValue = (o:number,value: number, num: number, isMin: boolean) => { + if (value === 0) { + return 0 + }else if(value>0&& Math.abs(value)<1 && isMin==true){ + return 0 + }else if(value>-1&& value<0 && isMin==false){ + return 0 + } + let base + if (Math.abs(o) >= 100) { + base = 100 + } else if (Math.abs(o) >= 10) { + base = 10 + } else if (Math.abs(o) >= 1) { + base = 1 + } else { + base = 0.1 + } + let calculatedValue + if (isMin) { + if (value < 0) { + calculatedValue = value + num * value + } else { + calculatedValue = value - num * value + } + } else { + if (value < 0) { + calculatedValue = value - num * value + } else { + calculatedValue = value + num * value + } + } + if (base === 0.1) { + return parseFloat(calculatedValue.toFixed(1)) + } else if (isMin) { + return Math.floor(calculatedValue / base) * base + } else { + return Math.ceil(calculatedValue / base) * base + } +} // 处理y轴最大最小值 export const yMethod = (arr: any) => { + let num = 0.2 let numList = dataProcessing(arr) let maxValue = 0 let minValue = 0 @@ -13,32 +54,76 @@ export const yMethod = (arr: any) => { let min = 0 maxValue = Math.max(...numList) minValue = Math.min(...numList) - if (maxValue > 1000 || minValue < -1000) { - max = Math.ceil(maxValue / 100) * 100 - if (minValue == 0) { - min = 0 - } else { - min = Math.floor(minValue / 100) * 100 - } - } else if (maxValue < 60 && minValue > 40) { - max = 60 - min = 40 - } else if (maxValue == minValue && maxValue < 10 && minValue > 0) { - max = Math.ceil(maxValue / 10) * 10 - min = Math.floor(minValue / 10) * 10 - } else if (maxValue == minValue && maxValue != 0 && minValue != 0) { - max = Math.ceil(maxValue / 10 + 1) * 10 - min = Math.floor(minValue / 10 - 1) * 10 - } else { - max = Math.ceil(maxValue / 10) * 10 - min = Math.floor(minValue / 10) * 10 - } + const o=maxValue-minValue + min = calculateValue( o,minValue, num, true) + max = calculateValue(o,maxValue, num, false) + // if (-100 >= minValue) { + // min = Math.floor((minValue + num * minValue) / 100) * 100 + // } else if (-10 >= minValue && minValue > -100) { + // min = Math.floor((minValue + num * minValue) / 10) * 10 + // } else if (-1 >= minValue && minValue > -10) { + // min = Math.floor(minValue + num * minValue) + // } else if (0 > minValue && minValue > -1) { + // min = parseFloat((minValue + num * minValue).toFixed(1)) + // } else if (minValue == 0) { + // min = 0 + // } else if (0 < minValue && minValue < 1) { + // min = parseFloat((minValue - num * minValue).toFixed(1)) + // } else if (1 <= minValue && minValue < 10) { + // min = Math.floor(minValue - num * minValue) + // } else if (10 <= minValue && minValue < 100) { + // min = Math.floor((minValue - num * minValue) / 10) * 10 + // } else if (100 <= minValue) { + // min = Math.floor((minValue - num * minValue) / 100) * 100 + // } + + // if (-100 >= maxValue) { + // max = Math.ceil((maxValue - num * maxValue) / 100) * 100 + // } else if (-10 >= maxValue && maxValue > -100) { + // max = Math.ceil((maxValue - num * maxValue) / 10) * 10 + // } else if (-1 >= maxValue && maxValue > -10) { + // max = Math.ceil(maxValue - num * maxValue) + // } else if (0 > maxValue && maxValue > -1) { + // max = parseFloat((maxValue - num * maxValue).toFixed(1)) + // } else if (maxValue == 0) { + // max = 0 + // } else if (0 < maxValue && maxValue < 1) { + // max = parseFloat((maxValue + num * maxValue).toFixed(1)) + // } else if (1 <= maxValue && maxValue < 10) { + // max = Math.ceil(maxValue + num * maxValue) + // } else if (10 <= maxValue && maxValue < 100) { + // max = Math.ceil((maxValue + num * maxValue) / 10) * 10 + // } else if (100 <= maxValue) { + // max = Math.ceil((maxValue + num * maxValue) / 100) * 100 + // } + + // if (maxValue > 1000 || minValue < -1000) { + // max = Math.ceil(maxValue / 100) * 100 + // if (minValue == 0) { + // min = 0 + // } else { + // min = Math.floor(minValue / 100) * 100 + // } + // } else if (maxValue < 60 && minValue > 40) { + // max = 60 + // min = 40 + // } else if (maxValue == minValue && maxValue < 10 && minValue > 0) { + // max = Math.ceil(maxValue / 10) * 10 + // min = Math.floor(minValue / 10) * 10 + // } else if (maxValue == minValue && maxValue != 0 && minValue != 0) { + // max = Math.ceil(maxValue / 10 + 1) * 10 + // min = Math.floor(minValue / 10 - 1) * 10 + // } else { + // max = Math.ceil(maxValue / 10) * 10 + // min = Math.floor(minValue / 10) * 10 + // } + + // if (maxValue > 0 && maxValue < 1) { + // max = 1 + // } else if (max == 0 && minValue > -1 && minValue < 0) { + // min = -1 + // } - if (maxValue > 0 && maxValue < 1) { - max = 1 - } else if (max == 0 && minValue > -1 && minValue < 0) { - min = -1 - } return [min, max] } diff --git a/src/utils/tableStore.ts b/src/utils/tableStore.ts index 129b7f42..f525f1d6 100644 --- a/src/utils/tableStore.ts +++ b/src/utils/tableStore.ts @@ -8,6 +8,7 @@ import { filtration } from './tableMethod' interface TableStoreParams { url: string // 请求地址 pk?: string + filename?: any // 导出文件名 column: TableColumn[] params?: anyObj method?: Method // 请求方式 @@ -18,12 +19,14 @@ interface TableStoreParams { publicHeight?: number //计算高度 resetCallback?: () => void // 重置 loadCallback?: () => void // 接口调用后的回调 + exportProcessingData?:() => void //导出处理数据 beforeSearchFun?: () => void // 接口调用前的回调 } export default class TableStore { public url public pk + public filename: any = null public method: Method public initData: any = null public isWebPaging = false @@ -42,9 +45,11 @@ export default class TableStore { pageNum: 1, pageSize: 20 }, + filename:null, loading: true, column: [], loadCallback: null, + exportProcessingData: null, resetCallback: null, beforeSearchFun: null, height: '', @@ -57,12 +62,14 @@ export default class TableStore { this.paramsPOST = options.paramsPOST || false this.isWebPaging = options.isWebPaging || false this.method = options.method || 'GET' + this.table.filename = options.filename || null this.table.column = options.column this.showPage = options.showPage !== false this.table.publicHeight = options.publicHeight || 0 this.table.resetCallback = options.resetCallback || null this.table.loadCallback = options.loadCallback || null + this.table.exportProcessingData = options.exportProcessingData || null this.table.beforeSearchFun = options.beforeSearchFun || null Object.assign(this.table.params, options.params) this.table.height = mainHeight(20 + (this.showPage ? 58 : 0) + this.table.publicHeight).height as string @@ -206,6 +213,7 @@ export default class TableStore { ) ).then(res => { this.table.allData = filtration(res.data.records || res.data) + this.table.exportProcessingData && this.table.exportProcessingData() this.table.allFlag = data.showAllFlag || true }) } diff --git a/src/views/pqs/business/terminal/deviceter/index.vue b/src/views/pqs/business/terminal/deviceter/index.vue index 10462406..dcc13058 100644 --- a/src/views/pqs/business/terminal/deviceter/index.vue +++ b/src/views/pqs/business/terminal/deviceter/index.vue @@ -1318,7 +1318,7 @@ @@ -1347,7 +1347,7 @@ diff --git a/src/views/pqs/runManage/cleaning/index.vue b/src/views/pqs/runManage/cleaning/index.vue index b3c63ad6..80c6332f 100644 --- a/src/views/pqs/runManage/cleaning/index.vue +++ b/src/views/pqs/runManage/cleaning/index.vue @@ -1,9 +1,8 @@ diff --git a/src/views/pqs/runManage/runEvaluate/index.vue b/src/views/pqs/runManage/runEvaluate/index.vue index 4e77ecef..14aab261 100644 --- a/src/views/pqs/runManage/runEvaluate/index.vue +++ b/src/views/pqs/runManage/runEvaluate/index.vue @@ -19,116 +19,104 @@ - + -
- -
- - 终端统计 -
-
- -
终端运行评价
-
- -
最近一周终端评价趋势
-
-
-
- -
异常终端详情
-
-
-
- -
区域终端运行评价
-
- -
终端运行评价详情
-
-
- + diff --git a/src/views/pqs/supervise/electricalEnergy/components1/complaints.vue b/src/views/pqs/supervise/electricalEnergy/components1/complaints.vue index 29e8de93..7ca62f26 100644 --- a/src/views/pqs/supervise/electricalEnergy/components1/complaints.vue +++ b/src/views/pqs/supervise/electricalEnergy/components1/complaints.vue @@ -2,7 +2,7 @@ - +