|
|
@@ -170,6 +170,7 @@ import GwEchart from "@/components/chart/GwEchart.vue";
|
|
|
import {listUser} from "@/api/system/user.js";
|
|
|
import {parseTime} from "@/utils/ruoyi.js";
|
|
|
import {getAlarmList} from "@/api/service/alarm.js";
|
|
|
+import {snailJobLine} from "@/api/service/timing.js";
|
|
|
|
|
|
const statisticData = ref([
|
|
|
{name: '模型总数', value: 0, color: '#477ACF'},
|
|
|
@@ -207,10 +208,12 @@ const dateTypeOptions = ref([
|
|
|
{label: '近一个月', value: '4'},
|
|
|
{label: '全部', value: '5'},
|
|
|
])
|
|
|
-const task = ref('1')
|
|
|
+const task = ref('MONTH')
|
|
|
const taskOptions = ref([
|
|
|
- {label: '日执行量', value: '1'},
|
|
|
- {label: '月执行量', value: '2'},
|
|
|
+ {label: '今日', value: 'DAY'},
|
|
|
+ {label: '最近一周', value: 'WEEK'},
|
|
|
+ {label: '最近一月', value: 'MONTH'},
|
|
|
+ {label: '全年', value: 'YEAR'},
|
|
|
])
|
|
|
const bt1Ref = ref(null)
|
|
|
const echartMapData = ref([])
|
|
|
@@ -589,58 +592,67 @@ function initChartBottom2() {
|
|
|
}
|
|
|
|
|
|
function initChartTop5() {
|
|
|
- const option = {
|
|
|
- legend: {},
|
|
|
- grid: {
|
|
|
- left: '5%',
|
|
|
- right: '5%',
|
|
|
- bottom: '10%',
|
|
|
- top: '15%',
|
|
|
- containLabel: true
|
|
|
- },
|
|
|
- tooltip: {
|
|
|
- trigger: 'axis',
|
|
|
- showContent: false
|
|
|
- },
|
|
|
- dataset: {
|
|
|
- source: [
|
|
|
- ['模型', '09-07', '09-08', '09-09', '09-10', '09-11', '09-12'],
|
|
|
- ['上海沿海风暴潮预报模型', 56.5, 82.1, 88.7, 70.1, 53.4, 85.1],
|
|
|
- ['马斯京根法', 51.1, 51.4, 55.1, 53.3, 73.8, 68.7],
|
|
|
- ['三水源新安江产流模型', 40.1, 62.2, 69.5, 36.4, 45.2, 32.5],
|
|
|
- ['上海市中心城区排水系统模型', 25.2, 37.1, 41.2, 18, 33.9, 49.1]
|
|
|
- ]
|
|
|
- },
|
|
|
- xAxis: {type: 'category'},
|
|
|
- yAxis: {gridIndex: 0},
|
|
|
- series: [
|
|
|
- {
|
|
|
- type: 'line',
|
|
|
- smooth: true,
|
|
|
- seriesLayoutBy: 'row',
|
|
|
- emphasis: {focus: 'series'}
|
|
|
+ snailJobLine({type: task.value}).then(res => {
|
|
|
+ const chartData = res.data
|
|
|
+ const option = {
|
|
|
+ color: ['#2dbea2', '#f56c6c', '#b686d4', '#e6a23c'],
|
|
|
+ legend: {},
|
|
|
+ grid: {
|
|
|
+ left: '5%',
|
|
|
+ right: '5%',
|
|
|
+ bottom: '10%',
|
|
|
+ top: '15%',
|
|
|
+ containLabel: true
|
|
|
},
|
|
|
- {
|
|
|
- type: 'line',
|
|
|
- smooth: true,
|
|
|
- seriesLayoutBy: 'row',
|
|
|
- emphasis: {focus: 'series'}
|
|
|
+ // tooltip: {
|
|
|
+ // trigger: 'axis'
|
|
|
+ // },
|
|
|
+ tooltip: {
|
|
|
+ trigger: "item",
|
|
|
+ // formatter: "{a} <br/>{b} : {c}"
|
|
|
},
|
|
|
- {
|
|
|
- type: 'line',
|
|
|
- smooth: true,
|
|
|
- seriesLayoutBy: 'row',
|
|
|
- emphasis: {focus: 'series'}
|
|
|
+ xAxis: {
|
|
|
+ type: 'category',
|
|
|
+ data: chartData.map(item => item.createDt)
|
|
|
},
|
|
|
- {
|
|
|
- type: 'line',
|
|
|
- smooth: true,
|
|
|
- seriesLayoutBy: 'row',
|
|
|
- emphasis: {focus: 'series'}
|
|
|
- }
|
|
|
- ]
|
|
|
- };
|
|
|
- top5Ref.value.loadChart(option);
|
|
|
+ yAxis: {gridIndex: 0},
|
|
|
+ series: [
|
|
|
+ {
|
|
|
+ type: 'line',
|
|
|
+ name: '成功',
|
|
|
+ smooth: true,
|
|
|
+ seriesLayoutBy: 'row',
|
|
|
+ emphasis: {focus: 'series'},
|
|
|
+ data: chartData.map(item => item.success)
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: 'line',
|
|
|
+ name: '失败',
|
|
|
+ smooth: true,
|
|
|
+ seriesLayoutBy: 'row',
|
|
|
+ emphasis: {focus: 'series'},
|
|
|
+ data: chartData.map(item => item.failNum)
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: 'line',
|
|
|
+ name: '停止',
|
|
|
+ smooth: true,
|
|
|
+ seriesLayoutBy: 'row',
|
|
|
+ emphasis: {focus: 'series'},
|
|
|
+ data: chartData.map(item => item.stop)
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: 'line',
|
|
|
+ name: '取消',
|
|
|
+ smooth: true,
|
|
|
+ seriesLayoutBy: 'row',
|
|
|
+ emphasis: {focus: 'series'},
|
|
|
+ data: chartData.map(item => item.cancel)
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ };
|
|
|
+ top5Ref.value.loadChart(option);
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
function initVisitNumberChart(name, data) {
|