|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724 |
- <!--
- Copyright 2020 Huawei Technologies Co., Ltd.All Rights Reserved.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- -->
-
- <script>
- export default {
- data() {
- return {
- thresholdDialogVisible: false,
- delThresholdVisible: false,
- currentTagName: '',
- currentSample: {},
- thresholdErrorMsg: '',
- thresholdRelational: '',
- thresholdValue: [
- { filterCondition: this.$t('scalar.lessThan'), value: '' },
- { filterCondition: this.$t('scalar.lessThan'), value: '' },
- ],
- filterOptions: [
- {
- value: this.$t('scalar.lessThan'),
- label: this.$t('scalar.lessThan'),
- },
- {
- value: this.$t('scalar.greaterThan'),
- label: this.$t('scalar.greaterThan'),
- },
- ],
- thresholdLocal: null,
- thresholdSwitch: false,
- delThresholdSwitch: false,
- thresholdColor: '#f00',
- };
- },
- methods: {
- /**
- * Get localStorge
- */
-
- getCache() {
- if (localStorage.getItem('thresholdCache')) {
- try {
- this.thresholdLocal = JSON.parse(
- localStorage.getItem('thresholdCache')
- );
- this.clearCache();
- } catch (e) {
- localStorage.removeItem('thresholdCache');
- this.thresholdLocal = {};
- }
- } else {
- this.thresholdLocal = {};
- }
- },
-
- /**
- * Clear localStorge
- */
-
- clearCache() {
- if (
- this.thresholdLocal &&
- this.thresholdLocal[this.decodeTrainingJobId]
- ) {
- if (
- Object.keys(this.thresholdLocal[this.decodeTrainingJobId]).length ===
- 0
- ) {
- delete this.thresholdLocal[this.decodeTrainingJobId];
- localStorage.setItem(
- 'thresholdCache',
- JSON.stringify(this.thresholdLocal)
- );
- }
- }
- },
-
- /**
- * Set one point style
- * @param {Object} sampleObject
- */
-
- setOnePoint(sampleObject) {
- const that = this;
- sampleObject.charObj.on('datazoom', function (params) {
- const xAxisObject = params.batch[0];
- const yAxisObject = params.batch[1];
- const charData = sampleObject.charData.charOption.series[0].data;
- const tempCharOption = sampleObject.charData.charOption;
- // one point
- if (charData.length === 1) {
- sampleObject.onePoint = true;
- tempCharOption.series[0].showSymbol = true;
- sampleObject.charObj.setOption(tempCharOption, false);
- return;
- }
- let filtetArr = [];
- for (let i = 0; i < charData.length; i++) {
- if (
- Math.ceil(charData[i][0] * 10000) / 10000 >=
- xAxisObject.startValue &&
- Math.floor(charData[i][0] * 10000) / 10000 <=
- xAxisObject.endValue &&
- Math.ceil(charData[i][1] * 10000) / 10000 >=
- yAxisObject.startValue &&
- Math.floor(charData[i][1] * 10000) / 10000 <= yAxisObject.endValue
- ) {
- filtetArr.push(charData[i]);
- if (filtetArr.length > 1) {
- filtetArr = [];
- break;
- }
- }
- }
- if (filtetArr.length === 1) {
- sampleObject.onePoint = true;
- tempCharOption.series[0].showSymbol = true;
- } else {
- sampleObject.onePoint = false;
- tempCharOption.series[0].showSymbol = false;
- }
-
- if (
- tempCharOption.visualMap &&
- tempCharOption.visualMap['pieces'] &&
- tempCharOption.visualMap['pieces'].length > 0
- ) {
- tempCharOption.visualMap = null;
- tempCharOption.series[0].markLine = null;
- that.updateVisualMap(sampleObject);
- } else {
- sampleObject.charObj.setOption(tempCharOption, false);
- }
- });
- },
-
- /**
- * Set restore
- * @param {Object} sampleObject
- */
-
- setRestore(sampleObject) {
- const that = this;
- sampleObject.charObj.on('restore', function (params) {
- const charData = sampleObject.charData.charOption.series[0].data;
- const tempCharOption = sampleObject.charData.charOption;
-
- // One point
- if (charData.length === 1) {
- sampleObject.onePoint = true;
- tempCharOption.series[0].showSymbol = true;
- sampleObject.charObj.setOption(tempCharOption, false);
- return;
- }
- sampleObject.onePoint = false;
- tempCharOption.series[0].showSymbol = false;
- if (
- tempCharOption.visualMap &&
- tempCharOption.visualMap['pieces'] &&
- tempCharOption.visualMap['pieces'].length > 0
- ) {
- tempCharOption.visualMap = null;
- tempCharOption.series[0].markLine = null;
- that.updateVisualMap(sampleObject);
- } else {
- sampleObject.charObj.setOption(tempCharOption, false);
- }
- });
- },
-
- /**
- * Update visualMap
- * @param {Object} sampleObject
- */
-
- updateVisualMap(sampleObject) {
- this.getCache();
- if (
- this.thresholdLocal &&
- this.thresholdLocal[this.decodeTrainingJobId] &&
- this.thresholdLocal[this.decodeTrainingJobId][sampleObject.tagName]
- ) {
- const tempStorgeArr = JSON.parse(
- JSON.stringify(
- this.thresholdLocal[this.decodeTrainingJobId][sampleObject.tagName]
- )
- );
- let pieceStr = '';
- pieceStr = this.formatePieceStr(tempStorgeArr);
- sampleObject.pieceStr = pieceStr;
-
- tempStorgeArr.forEach((item) => {
- item.color = this.thresholdColor;
- });
-
- if (sampleObject.charObj) {
- this.setVisualMap(sampleObject, tempStorgeArr);
- }
- } else {
- sampleObject.pieceStr = '';
- sampleObject.charData.charOption.series[0].markLine = null;
- }
- },
-
- /**
- * Set threshold
- * @param {Object} sampleItem sampleItem
- */
-
- setThreshold(sampleItem) {
- this.stopUpdateSamples();
- this.getCache();
- if (
- this.thresholdLocal &&
- this.thresholdLocal[this.decodeTrainingJobId] &&
- this.thresholdLocal[this.decodeTrainingJobId][sampleItem.tagName]
- ) {
- delete this.thresholdLocal[this.decodeTrainingJobId][
- sampleItem.tagName
- ];
- }
- this.currentTagName = sampleItem.tagName;
- this.currentSample = sampleItem;
- this.thresholdDialogVisible = true;
- },
-
- /**
- * Delete threshold
- * @param {Object} sampleItem sampleItem
- */
-
- delThreshold(sampleItem) {
- this.stopUpdateSamples();
- this.currentTagName = sampleItem.tagName;
- this.currentSample = sampleItem;
- this.delThresholdVisible = true;
- },
-
- /**
- * Threshold validate
- */
-
- thresholdValidate() {
- let isValidate = true;
-
- const valueFirst = this.thresholdValue[0].value;
- const valueSec = this.thresholdValue[1].value;
- const filterConditionFirst = this.thresholdValue[0].filterCondition;
- const filterConditionSec = this.thresholdValue[1].filterCondition;
-
- if (!this.thresholdRelational) {
- if (!valueFirst) {
- this.thresholdErrorMsg = this.$t('scalar.placeHolderThreshold');
- isValidate = false;
- } else if (valueFirst.indexOf(' ') > -1) {
- this.thresholdErrorMsg = this.$t('scalar.noSpace');
- isValidate = false;
- } else if (isNaN(valueFirst) || valueFirst.indexOf('Infinity') > -1) {
- this.thresholdErrorMsg = this.$t('scalar.placeHolderNumber');
- isValidate = false;
- }
- } else {
- if (filterConditionFirst === filterConditionSec) {
- this.thresholdErrorMsg = this.$t('scalar.sameCompare');
- isValidate = false;
- } else if (!valueFirst || !valueSec) {
- this.thresholdErrorMsg = this.$t('scalar.placeHolderThreshold');
- isValidate = false;
- } else if (valueFirst.indexOf(' ') > -1 || valueSec.indexOf(' ') > -1) {
- this.thresholdErrorMsg = this.$t('scalar.noSpace');
- isValidate = false;
- } else if (valueFirst === valueSec) {
- this.thresholdErrorMsg = this.$t('scalar.unreasonable');
- isValidate = false;
- } else if (isNaN(valueFirst) || isNaN(valueSec)) {
- this.thresholdErrorMsg = this.$t('scalar.placeHolderNumber');
- isValidate = false;
- } else if (
- valueFirst.indexOf('Infinity') > -1 ||
- valueSec.indexOf('Infinity') > -1
- ) {
- this.thresholdErrorMsg = this.$t('scalar.placeHolderNumber');
- isValidate = false;
- } else {
- if (this.thresholdRelational === this.$t('scalar.or')) {
- if (
- filterConditionFirst === this.$t('scalar.greaterThan') &&
- Number(valueFirst) < Number(valueSec)
- ) {
- this.thresholdErrorMsg = this.$t('scalar.unreasonable');
- isValidate = false;
- } else if (
- filterConditionFirst === this.$t('scalar.lessThan') &&
- Number(valueFirst) > Number(valueSec)
- ) {
- this.thresholdErrorMsg = this.$t('scalar.unreasonable');
- isValidate = false;
- }
- }
- if (this.thresholdRelational === this.$t('scalar.and')) {
- if (
- filterConditionFirst === this.$t('scalar.greaterThan') &&
- Number(valueFirst) > Number(valueSec)
- ) {
- this.thresholdErrorMsg = this.$t('scalar.unreasonable');
- isValidate = false;
- } else if (
- filterConditionFirst === this.$t('scalar.lessThan') &&
- Number(valueFirst) < Number(valueSec)
- ) {
- this.thresholdErrorMsg = this.$t('scalar.unreasonable');
- isValidate = false;
- }
- }
- }
- }
- return isValidate;
- },
-
- /**
- * Set visualMap
- * @param {Object} sampleObject SampleObject
- * @param {Array} chartPieces ChartPieces
- */
-
- setVisualMap(sampleObject, chartPieces) {
- // Empty array
- if (chartPieces.length === 0) {
- return;
- }
- const markLineData = [];
- chartPieces.forEach((item) => {
- if (!isNaN(item.lt)) {
- const markLineDataItem = {};
- markLineDataItem.yAxis = item.lt;
- markLineData.push(markLineDataItem);
- }
- if (!isNaN(item.gt)) {
- const markLineDataItem = {};
- markLineDataItem.yAxis = item.gt;
- markLineData.push(markLineDataItem);
- }
- });
- const tempCharOption = sampleObject.charData.charOption;
-
- let chartPiecesTemp = JSON.parse(JSON.stringify(chartPieces));
- chartPiecesTemp.forEach((item) => {
- item.color = this.thresholdColor;
- });
-
- // One filter condition
- if (chartPiecesTemp.length === 1) {
- if (
- !isNaN(chartPiecesTemp[0]['lt']) &&
- isNaN(chartPiecesTemp[0]['gt'])
- ) {
- if (chartPiecesTemp[0]['lt'] <= sampleObject.zoomData[0]) {
- chartPiecesTemp = [];
- } else if (
- chartPiecesTemp[0]['lt'] < sampleObject.zoomData[1] &&
- chartPiecesTemp[0]['lt'] > sampleObject.zoomData[0]
- ) {
- chartPiecesTemp[0]['gt'] = sampleObject.zoomData[0];
- } else if (chartPiecesTemp[0]['lt'] >= sampleObject.zoomData[1]) {
- chartPiecesTemp[0]['lt'] = sampleObject.zoomData[1];
- chartPiecesTemp[0]['gt'] = sampleObject.zoomData[0];
- }
- } else if (
- !isNaN(chartPiecesTemp[0]['gt']) &&
- isNaN(chartPiecesTemp[0]['lt'])
- ) {
- if (chartPiecesTemp[0]['gt'] >= sampleObject.zoomData[1]) {
- chartPiecesTemp = [];
- } else if (
- chartPiecesTemp[0]['gt'] > sampleObject.zoomData[0] &&
- chartPiecesTemp[0]['gt'] < sampleObject.zoomData[1]
- ) {
- chartPiecesTemp[0]['lt'] = sampleObject.zoomData[1];
- } else if (chartPiecesTemp[0]['gt'] <= sampleObject.zoomData[0]) {
- chartPiecesTemp[0]['lt'] = sampleObject.zoomData[1];
- chartPiecesTemp[0]['gt'] = sampleObject.zoomData[0];
- }
- } else if (
- !isNaN(chartPiecesTemp[0]['lt']) &&
- !isNaN(chartPiecesTemp[0]['gt'])
- ) {
- if (chartPiecesTemp[0]['gt'] >= sampleObject.zoomData[1]) {
- chartPiecesTemp = [];
- } else {
- if (chartPiecesTemp[0]['gt'] <= sampleObject.zoomData[0]) {
- chartPiecesTemp[0]['gt'] = sampleObject.zoomData[0];
- }
- if (chartPiecesTemp[0]['lt'] >= sampleObject.zoomData[1]) {
- chartPiecesTemp[0]['lt'] = sampleObject.zoomData[1];
- }
- if (chartPiecesTemp[0]['lt'] <= sampleObject.zoomData[0]) {
- chartPiecesTemp = [];
- }
- }
- }
- }
-
- // Two filter condition
- if (chartPiecesTemp.length === 2) {
- const relationalArr = [];
- relationalArr[0] = chartPiecesTemp[0].lt || chartPiecesTemp[1].lt || 0;
- relationalArr[1] = chartPiecesTemp[0].gt || chartPiecesTemp[1].gt || 0;
- if (
- relationalArr[0] >= sampleObject.zoomData[1] ||
- relationalArr[1] <= sampleObject.zoomData[0]
- ) {
- chartPiecesTemp = [
- {
- gt: sampleObject.zoomData[0],
- lt: sampleObject.zoomData[1],
- color: this.thresholdColor,
- },
- ];
- } else {
- if (relationalArr[0] <= sampleObject.zoomData[0]) {
- if (!isNaN(chartPiecesTemp[0].lt)) {
- chartPiecesTemp[0].lt = sampleObject.zoomData[0];
- } else {
- chartPiecesTemp[1].lt = sampleObject.zoomData[0];
- }
- }
- if (relationalArr[1] >= sampleObject.zoomData[1]) {
- if (!isNaN(chartPiecesTemp[0].gt)) {
- chartPiecesTemp[0].gt = sampleObject.zoomData[1];
- } else {
- chartPiecesTemp[1].gt = sampleObject.zoomData[1];
- }
- }
- }
- }
- if (chartPiecesTemp.length > 0) {
- tempCharOption.series[0].lineStyle['color'] = null;
- tempCharOption.visualMap = {};
- tempCharOption.visualMap['show'] = false;
- tempCharOption.visualMap['pieces'] = chartPiecesTemp;
- tempCharOption.visualMap['outOfRange'] = {
- color: sampleObject.colors,
- };
- tempCharOption.series[0]['markLine'] = {
- precision: 5,
- silent: true,
- data: markLineData,
- };
-
- sampleObject.charObj.setOption(tempCharOption, false);
- } else {
- tempCharOption.series[0].lineStyle['color'] = sampleObject.colors;
- sampleObject.charObj.setOption(tempCharOption, false);
- }
- },
-
- /**
- * Formate pieceStr
- * @param {Array} piecesArr PiecesArr
- * @return {String}
- */
-
- formatePieceStr(piecesArr) {
- // Empty array
- if (piecesArr.length === 0) {
- return;
- }
- piecesArr.forEach((item) => {
- if (item.lt) {
- item.lt = Number(item.lt.toFixed(5));
- }
- if (item.gt) {
- item.gt = Number(item.gt.toFixed(5));
- }
- });
- let pieceStr;
- // Only one filter condition
- if (piecesArr.length === 1) {
- if (!isNaN(piecesArr[0].gt) && !isNaN(piecesArr[0].lt)) {
- pieceStr = `(${piecesArr[0].gt},${piecesArr[0].lt})`;
- } else if (!isNaN(piecesArr[0].gt) && isNaN(piecesArr[0].lt)) {
- pieceStr = `(${piecesArr[0].gt},Infinity)`;
- } else if (!isNaN(piecesArr[0].lt) && isNaN(piecesArr[0].gt)) {
- pieceStr = `(-Infinity,${piecesArr[0].lt})`;
- }
- }
- // Two filter condition
- if (piecesArr.length === 2) {
- if (!isNaN(piecesArr[0].lt) && !isNaN(piecesArr[1].gt)) {
- pieceStr = `(-Infinity,${piecesArr[0].lt}),(${piecesArr[1].gt},Infinity)`;
- } else if (!isNaN(piecesArr[0].gt) && !isNaN(piecesArr[1].lt)) {
- pieceStr = `(-Infinity,${piecesArr[1].lt}),(${piecesArr[0].gt},Infinity)`;
- }
- }
- return pieceStr;
- },
-
- /**
- * Threshold commit
- */
-
- thresholdCommit() {
- const isValidate = this.thresholdValidate();
-
- if (isValidate) {
- const chartPieces = [];
- if (this.thresholdValue[0].value && this.thresholdValue[1].value) {
- if (this.thresholdRelational === this.$t('scalar.or')) {
- this.thresholdValue.forEach((item) => {
- const chartPiecesData = {};
- if (item.filterCondition === this.$t('scalar.greaterThan')) {
- chartPiecesData.gt = Number(item.value);
- chartPieces.push(chartPiecesData);
- } else {
- chartPiecesData.lt = Number(item.value);
- chartPieces.push(chartPiecesData);
- }
- });
- } else {
- const tempArr = [];
- const chartPiecesData = {};
- this.thresholdValue.forEach((item) => {
- tempArr.push(item.value);
- });
-
- if (Number(tempArr[0]) > Number(tempArr[1])) {
- chartPiecesData.gt = Number(tempArr[1]);
- chartPiecesData.lt = Number(tempArr[0]);
- chartPieces.push(chartPiecesData);
- } else {
- chartPiecesData.gt = Number(tempArr[0]);
- chartPiecesData.lt = Number(tempArr[1]);
- chartPieces.push(chartPiecesData);
- }
- }
- } else {
- this.thresholdValue.forEach((item) => {
- const chartPiecesData = {};
- if (!item.value) {
- return;
- } else if (item.filterCondition === this.$t('scalar.greaterThan')) {
- chartPiecesData.gt = Number(item.value);
- chartPieces.push(chartPiecesData);
- } else if (item.filterCondition === this.$t('scalar.lessThan')) {
- chartPiecesData.lt = Number(item.value);
- chartPieces.push(chartPiecesData);
- }
- });
- }
-
- let pieceStr = '';
- pieceStr = this.formatePieceStr(chartPieces);
-
- if (!this.thresholdLocal) {
- this.thresholdLocal = {};
- }
- if (!this.thresholdLocal[this.decodeTrainingJobId]) {
- this.thresholdLocal[this.decodeTrainingJobId] = {};
- }
-
- const chartPiecesTemp = JSON.parse(JSON.stringify(chartPieces));
-
- chartPiecesTemp.forEach((item) => {
- item.color = this.thresholdColor;
- });
-
- if (this.thresholdSwitch) {
- this.originDataArr.forEach((sampleObject) => {
- if (this.multiSelectedTagNames[sampleObject.tagName]) {
- this.thresholdLocal[this.decodeTrainingJobId][
- sampleObject.tagName
- ] = chartPieces;
- sampleObject.pieceStr = pieceStr;
-
- if (sampleObject.charObj) {
- this.setVisualMap(sampleObject, chartPieces);
- }
- }
- });
- } else {
- this.thresholdLocal[this.decodeTrainingJobId][
- this.currentTagName
- ] = chartPieces;
- this.currentSample.pieceStr = pieceStr;
- this.setVisualMap(this.currentSample, chartPieces);
- }
- localStorage.setItem(
- 'thresholdCache',
- JSON.stringify(this.thresholdLocal)
- );
-
- this.thresholdDialogVisible = false;
- }
- },
-
- /**
- * Relational change
- */
-
- relationalChange(val) {
- if (!val) {
- this.thresholdValue[1].value = '';
- this.thresholdErrorMsg = '';
- this.thresholdValue[1].filterCondition = this.$t('scalar.lessThan');
- }
- },
-
- /**
- * Threshold cancel
- */
-
- thresholdCancel() {
- this.thresholdValue[0].value = '';
- this.thresholdValue[1].value = '';
- this.thresholdErrorMsg = '';
- this.currentTagName = '';
- this.currentSample = {};
- this.thresholdSwitch = false;
- this.thresholdRelational = '';
- this.thresholdValue[1].filterCondition = this.$t('scalar.lessThan');
- this.thresholdDialogVisible = false;
- if (this.isTimeReload) {
- this.autoUpdateSamples();
- }
- },
-
- /**
- * Delete threshold cancel
- */
-
- delThresholdCancel() {
- this.currentTagName = '';
- this.currentSample = {};
- this.delThresholdSwitch = false;
- this.delThresholdVisible = false;
- if (this.isTimeReload) {
- this.autoUpdateSamples();
- }
- },
-
- /**
- * Delete threshold commit
- */
-
- delThresholdCommit() {
- this.getCache();
- if (this.delThresholdSwitch) {
- this.originDataArr.forEach((sampleObject) => {
- if (this.multiSelectedTagNames[sampleObject.tagName]) {
- if (
- this.thresholdLocal &&
- this.thresholdLocal[this.decodeTrainingJobId] &&
- this.thresholdLocal[this.decodeTrainingJobId][
- sampleObject.tagName
- ]
- ) {
- delete this.thresholdLocal[this.decodeTrainingJobId][
- sampleObject.tagName
- ];
- sampleObject.pieceStr = '';
- const tempCharOption = sampleObject.charData.charOption;
- if (
- tempCharOption.visualMap &&
- tempCharOption.visualMap['pieces'] &&
- tempCharOption.visualMap['pieces'].length > 0
- ) {
- tempCharOption.visualMap = null;
- tempCharOption.series[0].markLine = null;
- tempCharOption.series[0].lineStyle['color'] =
- sampleObject.colors;
- }
- if (sampleObject.charObj) {
- sampleObject.charObj.setOption(tempCharOption, false);
- }
- }
- }
- });
- } else {
- if (
- this.thresholdLocal &&
- this.thresholdLocal[this.decodeTrainingJobId] &&
- this.thresholdLocal[this.decodeTrainingJobId][this.currentTagName]
- ) {
- delete this.thresholdLocal[this.decodeTrainingJobId][
- this.currentTagName
- ];
- this.currentSample.pieceStr = '';
- const tempCharOption = this.currentSample.charData.charOption;
- if (
- tempCharOption.visualMap &&
- tempCharOption.visualMap['pieces'] &&
- tempCharOption.visualMap['pieces'].length > 0
- ) {
- tempCharOption.visualMap = null;
- tempCharOption.series[0].markLine = null;
- tempCharOption.series[0].lineStyle[
- 'color'
- ] = this.currentSample.colors;
- }
- this.currentSample.charObj.setOption(tempCharOption, false);
- }
- }
- this.clearCache();
- localStorage.setItem(
- 'thresholdCache',
- JSON.stringify(this.thresholdLocal)
- );
- this.delThresholdVisible = false;
- },
- },
- };
- </script>
|