修改方案数据&设备补召
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import createAxios from '@/utils/request'
|
||||
|
||||
// 获取设备补招页面数据
|
||||
// 获取设备补召页面数据
|
||||
export function getMakeUpData(data: any) {
|
||||
return createAxios({
|
||||
url: '/cs-harmonic-boot/offlineDataUpload/makeUpData?lineId='+data,
|
||||
@@ -16,8 +16,8 @@ export function getAskDirOrFile(data: any) {
|
||||
})
|
||||
}
|
||||
|
||||
//设备补招操作
|
||||
// 获取设备补招页面数据
|
||||
//设备补召操作
|
||||
// 获取设备补召页面数据
|
||||
export function offlineDataUploadMakeUp(data: any) {
|
||||
return createAxios({
|
||||
url: '/cs-harmonic-boot/offlineDataUpload/makeUp',
|
||||
|
||||
@@ -27,7 +27,7 @@ export const adminBaseRoute = {
|
||||
},
|
||||
|
||||
{
|
||||
// 设备补招
|
||||
// 设备补召
|
||||
path: '/supplementaryRecruitment',
|
||||
name: 'supplementaryRecruitment',
|
||||
component: () => import('@/views/govern/device/control/supplementaryRecruitment.vue'),
|
||||
|
||||
@@ -10,7 +10,7 @@ export const yMethod = (arr: any) => {
|
||||
maxValue = Math.max(...arr)
|
||||
minValue = Math.min(...arr)
|
||||
|
||||
console.log('🚀 ~ yMethod ~ minValue:', minValue)
|
||||
console.log('🚀 ~ yMethod ~ minValue:', minValue,maxValue)
|
||||
|
||||
// interval = (maxValue - minValue) / 4
|
||||
// if (maxValue > 1000) {
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
模版下载
|
||||
</el-button> -->
|
||||
<el-button v-if="deviceType == '1'" type="primary" @click="handleImport">离线数据导入</el-button>
|
||||
<el-button v-if="deviceType == '1'" type="primary" @click="handleaddDevice">设备补招</el-button>
|
||||
<el-button v-if="deviceType == '1'" type="primary" @click="handleaddDevice">设备补召</el-button>
|
||||
<el-button v-if="deviceType == '1'" type="primary" @click="handleAnalysisList">解析列表</el-button>
|
||||
</template>
|
||||
<el-descriptions-item label="名称">
|
||||
@@ -393,7 +393,7 @@ const handleSizeChange = (val: number) => {
|
||||
handleClick()
|
||||
}
|
||||
const { push, options, currentRoute } = useRouter()
|
||||
//设备补招
|
||||
//设备补召
|
||||
const handleaddDevice = () => {
|
||||
push({
|
||||
path: '/supplementaryRecruitment',
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
<div class="default-main device">
|
||||
<currentDevice ref="currentDeviceRef"/>
|
||||
<!-- <el-tabs v-model="activeName" type="border-card">
|
||||
<el-tab-pane label="当前设备补招" name="0">
|
||||
<el-tab-pane label="当前设备补召" name="0">
|
||||
<currentDevice v-if="activeName == '0'" ref="currentDeviceRef"/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="历史设备补招" name="1">
|
||||
<el-tab-pane label="历史设备补召" name="1">
|
||||
<history v-if="activeName == '1'" />
|
||||
</el-tab-pane>
|
||||
</el-tabs> -->
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<!-- 当前设备补招 -->
|
||||
<!-- 当前设备补召 -->
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<TableHeader>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<!-- 设备补招 -->
|
||||
<!-- 设备补召 -->
|
||||
<div class="default-main current_device" v-loading="loading">
|
||||
<div class="current_header">
|
||||
<el-form-item label="日期">
|
||||
@@ -13,7 +13,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<!-- <el-button type="primary" :icon="Search" @click="handleSearch">查询</el-button> -->
|
||||
<el-button type="primary" :icon="Setting" @click="handleUpDevice">补招</el-button>
|
||||
<el-button type="primary" :icon="Setting" @click="handleUpDevice">补召</el-button>
|
||||
<el-button :icon="Back" @click="go(-1)">返回</el-button>
|
||||
</el-form-item>
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<!-- 历史数据补招 -->
|
||||
<!-- 历史数据补召 -->
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<TableHeader>
|
||||
|
||||
@@ -22,8 +22,12 @@
|
||||
<p>测试项信息</p>
|
||||
</div> -->
|
||||
<el-tabs v-model="activeName" type="border-card" @click="handleClickTabs">
|
||||
<el-tab-pane v-for="(item, index) in deviceData.records" :label="item.itemName"
|
||||
:name="item.id" :key="index">
|
||||
<el-tab-pane
|
||||
v-for="(item, index) in deviceData.records"
|
||||
:label="item.itemName"
|
||||
:name="item.id"
|
||||
:key="index"
|
||||
>
|
||||
<template #label>
|
||||
<span class="custom-tabs-label">
|
||||
<el-icon>
|
||||
@@ -101,10 +105,20 @@
|
||||
<div class="history_header">
|
||||
<el-form :model="searchForm" class="history_select" id="history_select">
|
||||
<el-form-item label="统计指标" label-width="80px">
|
||||
<el-select collapse-tags collapse-tags-tooltip v-model="searchForm.index"
|
||||
placeholder="请选择统计指标" multiple :multiple-limit="3">
|
||||
<el-option v-for="item in indexOptions" :key="item.id" :label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
<el-select
|
||||
collapse-tags
|
||||
collapse-tags-tooltip
|
||||
v-model="searchForm.index"
|
||||
placeholder="请选择统计指标"
|
||||
multiple
|
||||
:multiple-limit="3"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in indexOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="值类型">
|
||||
@@ -114,20 +128,36 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<div v-for="(item, index) in countData" :key="index">
|
||||
<el-form-item :label="item.name + '谐波次数'" label-width="180px"
|
||||
v-if="item.countOptions.length != 0">
|
||||
<el-form-item
|
||||
:label="item.name + '谐波次数'"
|
||||
label-width="180px"
|
||||
v-if="item.countOptions.length != 0"
|
||||
>
|
||||
<!-- multiple -->
|
||||
<el-select v-model="item.count" collapse-tags collapse-tags-tooltip
|
||||
placeholder="请选择谐波次数" style="width: 100px">
|
||||
<el-option v-for="vv in item.countOptions" :key="vv" :label="vv"
|
||||
:value="vv"></el-option>
|
||||
<el-select
|
||||
v-model="item.count"
|
||||
collapse-tags
|
||||
collapse-tags-tooltip
|
||||
placeholder="请选择谐波次数"
|
||||
style="width: 100px"
|
||||
>
|
||||
<el-option
|
||||
v-for="vv in item.countOptions"
|
||||
:key="vv"
|
||||
:label="vv"
|
||||
:value="vv"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<el-form-item label="统计类型" label-width="80px">
|
||||
<el-select v-model="searchForm.type" placeholder="请选择值类型">
|
||||
<el-option v-for="item in typeOptions" :key="item.id" :label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
<el-option
|
||||
v-for="item in typeOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@@ -493,9 +523,9 @@ const init = (flag: boolean) => {
|
||||
list[i].seriesName +
|
||||
' ' +
|
||||
`<div style="width:16px;height:16px;float:left;background:${list[i].color};border-radius:50%;margin:0 15px"></div>` +
|
||||
`<div style='float:right;padding-left:20px;'>${list[i].value[1].toFixed(
|
||||
2
|
||||
)} </div><br/>`
|
||||
`<div style='float:right;padding-left:20px;'>${
|
||||
list[i].value[1] == null ? '' : list[i].value[1].toFixed(2)
|
||||
} </div><br/>`
|
||||
}
|
||||
return res
|
||||
}
|
||||
@@ -506,7 +536,7 @@ const init = (flag: boolean) => {
|
||||
formatter: {
|
||||
day: '{MM}-{dd}',
|
||||
month: '{MM}',
|
||||
year: '{yyyy}',
|
||||
year: '{yyyy}'
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -586,7 +616,7 @@ const init = (flag: boolean) => {
|
||||
chartsList
|
||||
.map((kk: any, kks: any) => {
|
||||
if (kk.statisticalName == vv.name) {
|
||||
return Array.from(new Set([xAxis[kks], kk.statisticalData]))
|
||||
return [xAxis[kks], kk.statisticalData]
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
@@ -600,7 +630,7 @@ const init = (flag: boolean) => {
|
||||
})
|
||||
})
|
||||
//处理多y轴
|
||||
if (unitList.length != 0 && unitList.length > 1) {
|
||||
// if (unitList.length != 0 && unitList.length > 1) {
|
||||
console.log(max, min)
|
||||
// echartsData.value.options.yAxis[0].yAxisIndex = 0
|
||||
unitList.map((item: any, index: any) => {
|
||||
@@ -641,7 +671,7 @@ const init = (flag: boolean) => {
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
// }
|
||||
//设置数据项颜色
|
||||
echartsData.value.options.series.map((item: any, index: any) => {
|
||||
item.itemStyle = {
|
||||
@@ -726,7 +756,7 @@ const handleExport = async () => {
|
||||
xAxis = timeList.sort((a: any, b: any) => {
|
||||
new Date(a).getTime() - new Date(b).getTime()
|
||||
})
|
||||
xAxis = Array.from(new Set(xAxis))
|
||||
// xAxis = Array.from(new Set(xAxis))
|
||||
// 使用这个函数转换数据为CSV格式
|
||||
let csv: any = ''
|
||||
const list = echartsData.value.options.series
|
||||
@@ -750,13 +780,12 @@ const handleExport = async () => {
|
||||
count = index
|
||||
}
|
||||
let itemList: any = list[index].data[indexs]
|
||||
console.log(itemList);
|
||||
if(itemList&&itemList.length!=0){
|
||||
console.log(itemList)
|
||||
if (itemList && itemList.length != 0) {
|
||||
index == list.length - 1 ? (strs += itemList[1]) : (strs += itemList[1] + ',')
|
||||
}else{
|
||||
index == list.length - 1 ? strs += '/' :strs += '/,'
|
||||
} else {
|
||||
index == list.length - 1 ? (strs += '/') : (strs += '/,')
|
||||
}
|
||||
|
||||
})
|
||||
if (count == 0 && xAxis[indexs]) {
|
||||
csv += `${xAxis[indexs]},` + strs + '\n'
|
||||
|
||||
Reference in New Issue
Block a user