| | |
| | | :loading="exportLoading" |
| | | v-hasPermi="['data:point:export']" |
| | | > |
| | | <Icon icon="ep:download" />导出 |
| | | <Icon icon="ep:download"/> |
| | | 导出 |
| | | </el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div ref="chartDomPlan" class="result-chart"></div> |
| | | <div ref="chartDomPlan" class="result-chart" v-loading="loading"></div> |
| | | </el-dialog> |
| | | </template> |
| | | |
| | |
| | | import * as echarts from 'echarts'; |
| | | import * as ItemApi from '@/api/data/plan/item' |
| | | import download from "@/utils/download"; |
| | | |
| | | const message = useMessage() // 消息弹窗 |
| | | const visible = ref(false); |
| | | const chartDomPlan = ref(null); |
| | |
| | | start: undefined, |
| | | end: undefined, |
| | | }) |
| | | const loading = ref(true) // 列表的加载中 |
| | | |
| | | function getYMDHMS() { |
| | | let timestamp = new Date().getTime(); |
| | | let time = new Date(timestamp - 1000 * 60 * 60 * 3); |
| | |
| | | "00" |
| | | ); |
| | | } |
| | | |
| | | /** 打开弹窗 */ |
| | | const open = async (row: object) => { |
| | | visible.value = true |
| | |
| | | |
| | | async function getDataList() { |
| | | visible.value = true; |
| | | loading.value = true |
| | | if (dataForm.value.id) { |
| | | try { |
| | | queryParams.itemNos=[dataForm.value.itemNo]; |
| | | queryParams.itemNos = [dataForm.value.itemNo]; |
| | | queryParams.start = dataForm.value.startTime; |
| | | queryParams.end = dataForm.value.endTime; |
| | | const data = await ItemApi.getPlanChart(queryParams) |
| | | loading.value = false |
| | | let seriesData = [] |
| | | data.series.forEach(item => { |
| | | seriesData.push({ |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** 导出按钮操作 */ |
| | | const exportLoading = ref(false) |
| | | const handleExport = async () => { |
| | | queryParams.itemNos=[dataForm.value.itemNo]; |
| | | queryParams.itemNo = dataForm.value.itemNo; |
| | | queryParams.start = dataForm.value.startTime; |
| | | queryParams.end = dataForm.value.endTime; |
| | | try { |
| | |
| | | // 发起导出 |
| | | exportLoading.value = true |
| | | const data = await ItemApi.exportPlanValue(queryParams) |
| | | download.excel(data, dataForm.value.itemName +'.xls') |
| | | download.excel(data, '计划数据.xlsx') |
| | | } catch { |
| | | } finally { |
| | | exportLoading.value = false |