治理报告联调接口
This commit is contained in:
@@ -4,26 +4,13 @@
|
|||||||
<TableHeader :showReset="false" datePicker @selectChange="selectChange" v-if="fullscreen">
|
<TableHeader :showReset="false" datePicker @selectChange="selectChange" v-if="fullscreen">
|
||||||
<template v-slot:select>
|
<template v-slot:select>
|
||||||
<el-form-item label="报表模板">
|
<el-form-item label="报表模板">
|
||||||
<el-select
|
<el-select v-model="tableStore.table.params.tempId" placeholder="请选择报表模板" clearable>
|
||||||
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-option v-for="item in templateList" :key="item.id" :label="item.name" :value="item.id" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="监测对象">
|
<el-form-item label="监测对象">
|
||||||
<el-select
|
<el-select v-model="tableStore.table.params.sensitiveUserId" placeholder="请选择监测对象" clearable>
|
||||||
v-model="tableStore.table.params.sensitiveUserId"
|
<el-option v-for="item in idList" :key="item.id" :label="item.name" :value="item.id" />
|
||||||
placeholder="请选择监测对象"
|
|
||||||
clearable
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in idList"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.id"
|
|
||||||
/>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
@@ -31,7 +18,7 @@
|
|||||||
<el-button @click="downloadExcel" class="" type="primary" icon="el-icon-Download">导出excel</el-button>
|
<el-button @click="downloadExcel" class="" type="primary" icon="el-icon-Download">导出excel</el-button>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<div style="display: flex;">
|
<div style="display: flex">
|
||||||
<div
|
<div
|
||||||
id="luckysheet"
|
id="luckysheet"
|
||||||
:style="{
|
:style="{
|
||||||
@@ -43,15 +30,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<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 TableStore from '@/utils/tableStore'
|
||||||
import { exportExcel } from '@/views/govern/reportForms/export.js'
|
import { exportExcel } from '@/views/govern/reportForms/export.js'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
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 { getTemplateList } from '@/api/harmonic-boot/luckyexcel'
|
||||||
import { getListByIds } from '@/api/harmonic-boot/cockpit/cockpit'
|
import { getListByIds } from '@/api/harmonic-boot/cockpit/cockpit'
|
||||||
|
import Json from './index.json'
|
||||||
|
|
||||||
const prop = defineProps({
|
const prop = defineProps({
|
||||||
w: { type: [String, Number] },
|
w: { type: [String, Number] },
|
||||||
@@ -62,26 +47,6 @@ const prop = defineProps({
|
|||||||
timeValue: { type: Object }
|
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()
|
const templateList = ref()
|
||||||
|
|
||||||
@@ -93,9 +58,11 @@ const initListByIds = () => {
|
|||||||
getListByIds({}).then((res: any) => {
|
getListByIds({}).then((res: any) => {
|
||||||
if (res.data.length > 0) {
|
if (res.data.length > 0) {
|
||||||
idList.value = res.data
|
idList.value = res.data
|
||||||
|
|
||||||
if (!tableStore.table.params.sensitiveUserId && idList.value?.length > 0) {
|
if (!tableStore.table.params.sensitiveUserId && idList.value?.length > 0) {
|
||||||
tableStore.table.params.sensitiveUserId = idList.value[0].id
|
tableStore.table.params.sensitiveUserId = idList.value[0].id
|
||||||
}
|
}
|
||||||
|
templateListData()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -104,8 +71,11 @@ const templateListData = () => {
|
|||||||
getTemplateList({}).then(res => {
|
getTemplateList({}).then(res => {
|
||||||
templateList.value = res.data
|
templateList.value = res.data
|
||||||
if (!tableStore.table.params.tempId && templateList.value?.length > 0) {
|
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(() => {
|
onMounted(() => {
|
||||||
initListByIds()
|
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) => {
|
const selectChange = (showSelect: any, height: any, datePickerValue?: any) => {
|
||||||
@@ -149,6 +106,42 @@ const fullscreen = computed(() => {
|
|||||||
return false
|
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(
|
watch(
|
||||||
() => prop.timeKey,
|
() => prop.timeKey,
|
||||||
val => {
|
val => {
|
||||||
|
|||||||
@@ -197,8 +197,6 @@ const setEchart = () => {
|
|||||||
const phaseName = phase === 'default' ? '' : `${phase}相`
|
const phaseName = phase === 'default' ? '' : `${phase}相`
|
||||||
const color = phaseColors[phase] || config.layout.elementUiPrimary[0]
|
const color = phaseColors[phase] || config.layout.elementUiPrimary[0]
|
||||||
|
|
||||||
console.log(color,'89089900')
|
|
||||||
|
|
||||||
series.push({
|
series.push({
|
||||||
name: `治理前${phaseName}`,
|
name: `治理前${phaseName}`,
|
||||||
type: 'line',
|
type: 'line',
|
||||||
|
|||||||
@@ -67,7 +67,8 @@ function createAxios<Data = any, T = ApiPromise<Data>>(
|
|||||||
config.url == '/system-boot/file/upload' ||
|
config.url == '/system-boot/file/upload' ||
|
||||||
config.url == '/harmonic-boot/grid/getAssessOverview' ||
|
config.url == '/harmonic-boot/grid/getAssessOverview' ||
|
||||||
config.url == '/harmonic-boot/gridDiagram/getGridDiagramAreaData' ||
|
config.url == '/harmonic-boot/gridDiagram/getGridDiagramAreaData' ||
|
||||||
config.url == '/cs-device-boot/csline/list'
|
config.url == '/cs-device-boot/csline/list' ||
|
||||||
|
config.url == '/cs-harmonic-boot/pqSensitiveUser/getListByIds'
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
removePending(config)
|
removePending(config)
|
||||||
|
|||||||
Reference in New Issue
Block a user