@@ -188,10 +189,11 @@ import * as ItembasicApi from '@/api/spc/itembasic'
import * as TemplateItemDetailsApi from '@/api/spc/templateItemDetails'
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
import {formatDate} from '@/utils/formatTime'
-// import { listSimpleDictData } from '@/api/system/dict/dict.data'
-
+import ZtfbView from './components/ztfbview.vue'
let echart = echarts
+const myEcharts3Ref = ref()
+
// 项目列表
const projectList = ref()
// 物料列表
@@ -351,87 +353,10 @@ function setChart2(rangeData) {
chart.resize()
}
}
-function setChart3() {
- let chart = echart.init(document.getElementById('myEcharts3'), 'light')
- // 把配置和数据放这里
- chart.setOption({
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- type: 'cross',
- crossStyle: {
- color: '#999'
- }
- }
- },
- legend: {
- data: ['Evaporation', 'Precipitation', 'Temperature']
- },
- grid: {
- left: '3%',
- right: '4%',
- top: '15%',
- bottom: '10%',
- containLabel: true
- },
- xAxis: [
- {
- type: 'category',
- data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
- axisPointer: {
- type: 'shadow'
- }
- }
- ],
- yAxis: [
- {
- type: 'value',
- name: 'Precipitation',
- min: 0,
- max: 250,
- interval: 50,
- axisLabel: {
- formatter: '{value} ml'
- }
- },
- {
- type: 'value',
- name: 'Temperature',
- min: 0,
- max: 25,
- interval: 5,
- axisLabel: {
- formatter: '{value} °C'
- }
- }
- ],
- series: [
- {
- name: '原数据频率',
- type: 'bar',
- tooltip: {
- valueFormatter: function (value) {
- return value + ' ml'
- }
- },
- data: [2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3]
- },
- {
- name: '正态分布',
- type: 'line',
- yAxisIndex: 1,
- tooltip: {
- valueFormatter: function (value) {
- return value + ' °C'
- }
- },
- data: [2.0, 2.2, 3.3, 4.5, 6.3, 10.2, 20.3, 23.4, 23.0, 16.5, 12.0, 6.2]
- }
- ]
- })
- window.onresize = function () {
- //自适应大小
- chart.resize()
+function setChart3(ztData) {
+ // console.log(ztData , 'daikun')
+ if (ztData != null) {
+ myEcharts3Ref.value.open(ztData.datas , ztData.downLimit , ztData.upLimit)
}
}
function setChart4(ybData) {
@@ -548,6 +473,7 @@ const changTabIndex = async (tIndexV) => {
tabIndex.value = tIndexV
queryParams.ecTab = tIndexV
const dvDatas = await ZlnalysisAPI.getZcnlEcharts(queryParams)
+ // console.log(dvDatas , '333333')
if (dvDatas != null) {
if (tIndexV == 0) {
setChart1(dvDatas.menMap)
@@ -555,7 +481,8 @@ const changTabIndex = async (tIndexV) => {
ec1Loading.value = false
ec2Loading.value = false
} else if (tIndexV == 1) {
-
+ setChart3(dvDatas.ztMap)
+ ec3Loading.value = false
} else if (tIndexV == 2) {
setChart4(dvDatas.ybMap)
ec4Loading.value = false