治理报告联调接口

This commit is contained in:
stt
2025-11-28 11:22:33 +08:00
parent 8ce2968bee
commit 80182cdc6f
3 changed files with 51 additions and 59 deletions

View File

@@ -4,26 +4,13 @@
<TableHeader :showReset="false" datePicker @selectChange="selectChange" v-if="fullscreen">
<template v-slot:select>
<el-form-item label="报表模板">
<el-select
v-model="tableStore.table.params.tempId"
placeholder="请选择报表模板"
clearable
>
<el-select v-model="tableStore.table.params.tempId" placeholder="请选择报表模板" clearable>
<el-option v-for="item in templateList" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
</el-form-item>
<el-form-item label="监测对象">
<el-select
v-model="tableStore.table.params.sensitiveUserId"
placeholder="请选择监测对象"
clearable
>
<el-option
v-for="item in idList"
:key="item.id"
:label="item.name"
:value="item.id"
/>
<el-select v-model="tableStore.table.params.sensitiveUserId" placeholder="请选择监测对象" clearable>
<el-option v-for="item in idList" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
</el-form-item>
</template>
@@ -31,8 +18,8 @@
<el-button @click="downloadExcel" class="" type="primary" icon="el-icon-Download">导出excel</el-button>
</template>
</TableHeader>
<div style="display: flex;">
<div
<div style="display: flex">
<div
id="luckysheet"
:style="{
width: `calc(${prop.width} )`,
@@ -43,15 +30,13 @@
</div>
</template>
<script setup lang="ts">
import { ref, onMounted, provide, reactive, watch, h, computed } from 'vue'
import { ref, onMounted, provide, reactive, watch, h, computed, nextTick } from 'vue'
import TableStore from '@/utils/tableStore'
import { exportExcel } from '@/views/govern/reportForms/export.js'
import TableHeader from '@/components/table/header/index.vue'
import { useConfig } from '@/stores/config'
import Json from './index.json'
import JsonAfter from './index.json'
import { getTemplateList } from '@/api/harmonic-boot/luckyexcel'
import { getListByIds } from '@/api/harmonic-boot/cockpit/cockpit'
import Json from './index.json'
const prop = defineProps({
w: { type: [String, Number] },
@@ -62,26 +47,6 @@ const prop = defineProps({
timeValue: { type: Object }
})
const tableStore: any = new TableStore({
url: '/user-boot/role/selectRoleDetail?id=0',
method: 'POST',
showPage: false,
exportName: '主要监测点列表',
column: [],
beforeSearchFun: () => {
tableStore.table.params.searchBeginTime = tableStore.table.params.searchBeginTime || prop.timeValue?.[0]
tableStore.table.params.searchEndTime = tableStore.table.params.searchEndTime || prop.timeValue?.[1]
},
loadCallback: () => {}
})
const tableRef = ref()
provide('tableRef', tableRef)
tableStore.table.params.power = '1'
provide('tableStore', tableStore)
// 报表模板列表
const templateList = ref()
@@ -93,9 +58,11 @@ const initListByIds = () => {
getListByIds({}).then((res: any) => {
if (res.data.length > 0) {
idList.value = res.data
if (!tableStore.table.params.sensitiveUserId && idList.value?.length > 0) {
tableStore.table.params.sensitiveUserId = idList.value[0].id
}
templateListData()
}
})
}
@@ -104,8 +71,11 @@ const templateListData = () => {
getTemplateList({}).then(res => {
templateList.value = res.data
if (!tableStore.table.params.tempId && templateList.value?.length > 0) {
tableStore.table.params.tempId = res.data[0].id
tableStore.table.params.tempId = templateList.value[0].id
}
nextTick(() => {
tableStore.index()
})
})
}
// 下载表格
@@ -115,19 +85,6 @@ const downloadExcel = () => {
onMounted(() => {
initListByIds()
templateListData()
luckysheet.create({
container: 'luckysheet',
title: '', // 表 头名
lang: 'zh', // 中文
showtoolbar: false, // 是否显示工具栏
showinfobar: false, // 是否显示顶部信息栏
showsheetbar: true, // 是否显示底部sheet按钮
allowEdit: false, // 禁止所有编辑操作(必填)
data: Json
})
tableStore.index()
})
const selectChange = (showSelect: any, height: any, datePickerValue?: any) => {
@@ -149,6 +106,42 @@ const fullscreen = computed(() => {
return false
}
})
const tableStore: any = new TableStore({
url: '/cs-harmonic-boot/customReport/getSensitiveUserReport',
method: 'POST',
showPage: false,
exportName: '治理效果报表',
column: [],
beforeSearchFun: () => {
tableStore.table.params.searchBeginTime = tableStore.table.params.searchBeginTime || prop.timeValue?.[0]
tableStore.table.params.searchEndTime = tableStore.table.params.searchEndTime || prop.timeValue?.[1]
if (!tableStore.table.params.sensitiveUserId && idList.value?.length > 0) {
tableStore.table.params.sensitiveUserId = idList.value[0].id
}
if (!tableStore.table.params.tempId && templateList.value?.length > 0) {
tableStore.table.params.tempId = templateList.value[0].id
}
},
loadCallback: () => {
luckysheet.create({
container: 'luckysheet',
title: '', // 表 头名
lang: 'zh', // 中文
showtoolbar: false, // 是否显示工具栏
showinfobar: false, // 是否显示顶部信息栏
showsheetbar: true, // 是否显示底部sheet按钮
allowEdit: false, // 禁止所有编辑操作(必填)
data: tableStore.table.data
})
}
})
const tableRef = ref()
provide('tableRef', tableRef)
provide('tableStore', tableStore)
watch(
() => prop.timeKey,
val => {

View File

@@ -197,8 +197,6 @@ const setEchart = () => {
const phaseName = phase === 'default' ? '' : `${phase}`
const color = phaseColors[phase] || config.layout.elementUiPrimary[0]
console.log(color,'89089900')
series.push({
name: `治理前${phaseName}`,
type: 'line',