This commit is contained in:
chengdandan 2023-02-26 09:55:32 +08:00
commit 5e5af91675
5 changed files with 256 additions and 179 deletions

View File

@ -5,3 +5,13 @@ export const getHostInfoApi = params => {
params params
}); });
}; };
//获取upd接口
export const getUpdInfoApi = params => {
return axios.get('api/GetUdppz', {
params
});
};
export const resetReboot = data => {
return axios.post('api/SetReboot', data, { headers: { 'Content-Type': 'application/x-www-form-urlencoded' } });
};

View File

@ -1,22 +1,21 @@
<template> <template>
<!-- 触发类型 --> <!-- 触发类型 -->
<div class="setion"> <div class="setion">
<p class="chartTitle"><span class="titleIcon"></span> {{ componentName }} {{ triggerType }}</p> <!-- <p class="chartTitle"><span class="titleIcon"></span> {{ componentName }} {{ triggerType }}</p> -->
<!-- 触发数据数值渲染 --> <!-- 触发数据数值渲染 -->
<div class="typeContent"> <div class="typeContent">
<div v-if="dataArr && dataArr.length != 0 && dataArr != undefined"> <div v-if="dataArr && dataArr.length != 0 && dataArr != undefined">
<div v-if="title == '类型'" style="display:flex"> <div v-if="title == '类型'" style="display:flex">
<el-card v-for="(n, i) in dataArr[0].type_data" :key="i" <el-card v-for="(n, i) in dataArr[0].type_data" :key="i" style="width: 150px; margin-bottom: 20px; text-align: center">
style="width: 150px; margin-bottom: 20px; text-align: center">
<div> <div>
<span style="font-size: 15px;">{{ n.name }}</span><br /> <span style="font-size: 15px;">{{ n.name }}</span
><br />
<span style="font-size: 30px; font-weight: bold">{{ n.quantity }}</span> <span style="font-size: 30px; font-weight: bold">{{ n.quantity }}</span>
</div> </div>
<div> <div>
<div> <div>
{{ dataArr[0].time ? dataArr[0].time : '' }} {{ dataArr[0].time ? dataArr[0].time : '' }}
</div> </div>
</div> </div>
</el-card> </el-card>
</div> </div>
@ -69,9 +68,9 @@
<div class="tableTitle" v-if="dataArr && dataArr.length != 0 && dataArr != undefined"> <div class="tableTitle" v-if="dataArr && dataArr.length != 0 && dataArr != undefined">
<div> <div>
<span <span
style="width: 10px;height:10px;border-radius: 50%;background-color: #3297ff;display: inline-block;vertical-align: middle;margin-right: 8px;"></span> style="width: 10px;height:10px;border-radius: 50%;background-color: #3297ff;display: inline-block;vertical-align: middle;margin-right: 8px;"
<span style="font-size:18px;">{{ this.chartName + '-' + this.componentName + '-' + '表格' + '-' + ></span>
triggerType }}</span> <span style="font-size:18px;">{{ this.chartName + '-' + this.componentName + '-' + '表格' + '-' + triggerType }}</span>
</div> </div>
<div class="tableTime"> <div class="tableTime">
{{ dataArr[0].time ? dataArr[0].time : '' }} {{ dataArr[0].time ? dataArr[0].time : '' }}
@ -86,23 +85,55 @@
</div> </div>
<div class="border" v-if="echartArr.includes('曲线图')"> <div class="border" v-if="echartArr.includes('曲线图')">
<detailDialog /> <detailDialog />
<lineChart :componentName="componentName" :chartName="chartName" :pageType="pageType" :list="dataArr" <lineChart
:status="triggerType" :title="title" :typeValue="typeValue" ref="lineChartRef" /> :componentName="componentName"
:chartName="chartName"
:pageType="pageType"
:list="dataArr"
:status="triggerType"
:title="title"
:typeValue="typeValue"
ref="lineChartRef"
/>
</div> </div>
<div class="border" v-if="echartArr.includes('饼状图')"> <div class="border" v-if="echartArr.includes('饼状图')">
<detailDialog /> <detailDialog />
<pieChart :componentName="componentName" :chartName="chartName" :pageType="pageType" :list="dataArr" <pieChart
:status="triggerType" :title="title" :typeValue="typeValue" ref="pieChartRef"/> :componentName="componentName"
:chartName="chartName"
:pageType="pageType"
:list="dataArr"
:status="triggerType"
:title="title"
:typeValue="typeValue"
ref="pieChartRef"
/>
</div> </div>
<div class="border" v-if="echartArr.includes('均值图')"> <div class="border" v-if="echartArr.includes('均值图')">
<detailDialog /> <detailDialog />
<avgChart ref="avgRefChart" :componentName="componentName" :chartName="chartName" :pageType="pageType" <avgChart
:list="dataArr" :status="triggerType" :title="title" :typeValue="typeValue" /> ref="avgRefChart"
:componentName="componentName"
:chartName="chartName"
:pageType="pageType"
:list="dataArr"
:status="triggerType"
:title="title"
:typeValue="typeValue"
/>
</div> </div>
<div class="border" v-if="echartArr.includes('直方图')"> <div class="border" v-if="echartArr.includes('直方图')">
<detailDialog /> <detailDialog />
<barChart :componentName="componentName" :chartName="chartName" :pageType="pageType" :list="dataArr" <barChart
:status="triggerType" :title="title" :typeValue="typeValue" ref="barChartRef"/> :componentName="componentName"
:chartName="chartName"
:pageType="pageType"
:list="dataArr"
:status="triggerType"
:title="title"
:typeValue="typeValue"
ref="barChartRef"
/>
</div> </div>
</div> </div>
</template> </template>
@ -137,9 +168,9 @@ export default {
flow: 0, flow: 0,
isRefer: true, isRefer: true,
valueShow: { }, valueShow: {},
// //
queue: '', queue: ''
}; };
}, },
created() { created() {
@ -149,17 +180,13 @@ export default {
// //
getTotal(dataArr) { getTotal(dataArr) {
if(dataArr!=undefined&&dataArr.length!=0){
return dataArr[0].type_data.reduce(function(prev, cur) { return dataArr[0].type_data.reduce(function(prev, cur) {
return cur.quantity + prev return cur.quantity + prev;
}, 0) }, 0);
}
// return dataArr[0].type_data((pre, cur) => { // return dataArr[0].type_data((pre, cur) => {
// return pre + cur // return pre + cur
// }, 0) // }, 0)
}, },
// //
getNewQueue(dataArr) { getNewQueue(dataArr) {
@ -172,35 +199,31 @@ export default {
// } // }
if (dataArr[0].timeMode=='触发') { if (dataArr[0].timeMode == '触发') {
this.queue = dataArr[0].n_queue this.queue = dataArr[0].n_queue;
} else if (dataArr[0].timeMode=='周期统计') { } else if (dataArr[0].timeMode == '周期统计') {
this.queue = dataArr[0].ave_queue this.queue = dataArr[0].ave_queue;
} else if (dataArr[0].timeMode=='周期时刻') { } else if (dataArr[0].timeMode == '周期时刻') {
} }
} }
}, },
computed: { computed: {
// //
}, },
mounted() { }, mounted() {},
watch: { watch: {
// //
dataArr: { dataArr: {
handler(newVal) { handler(newVal) {
// console.log('dataArr', newVal); // console.log('dataArr', newVal);
if(newVal!=undefined&&newVal.length!=0){ if (newVal != undefined && newVal.length != 0) {
this.getNewQueue(newVal) this.getNewQueue(newVal);
} }
}, },
immediate: true immediate: true
}, }
// cycleTimeData: { // cycleTimeData: {
// handler(newVal) { // handler(newVal) {
// console.log(newVal); // console.log(newVal);

View File

@ -2,11 +2,6 @@
<div class="content-box"> <div class="content-box">
<div class="container"> <div class="container">
<p class="title">UPD服务设置</p> <p class="title">UPD服务设置</p>
<!-- <div class="test-div">
<i class="el-icon-edit"></i>
<i class="el-icon-share"></i>
<i class="el-icon-delete"></i>
</div> -->
<el-form :model="form" label-position="left" label-width="180px"> <el-form :model="form" label-position="left" label-width="180px">
<el-form-item label="upd服务器端口"> <el-form-item label="upd服务器端口">
<el-input-number v-model="form.name" controls-position="right" :min="1"></el-input-number> <el-input-number v-model="form.name" controls-position="right" :min="1"></el-input-number>
@ -26,6 +21,7 @@
</template> </template>
<script> <script>
import { getUpdInfoApi } from '../../api/aboutMachine';
export default { export default {
data() { data() {
return { return {
@ -34,9 +30,23 @@ export default {
delivery: true, delivery: true,
bytes: 4096 bytes: 4096
} }
};
},
methods: {
getUpd() {
getUpdInfoApi()
.then(res => {
console.log(res.data.data);
})
.catch(err => {
this.$message.error(res.data.msg);
});
} }
},
mounted() {
this.getUpd();
} }
} };
</script> </script>
<style> <style>

View File

@ -6,8 +6,12 @@
<div class="dataBoard" ref="dataBoard" v-if="activeName == 'second'"> <div class="dataBoard" ref="dataBoard" v-if="activeName == 'second'">
<!-- 断面 --> <!-- 断面 -->
<div class="plate1" ref="plate1"> <div class="plate1" ref="plate1">
<div :class="sectionData.length <= 2 ? 'sectionBox' : 'section'" ref="section" <div
v-for="(s, i) in sectionData" :key="s.analogAreaComponentId"> :class="sectionData.length <= 2 ? 'sectionBox' : 'section'"
ref="section"
v-for="(s, i) in sectionData"
:key="s.analogAreaComponentId"
>
<template> <template>
<div ref="sectionContent"> <div ref="sectionContent">
<div> <div>
@ -18,30 +22,58 @@
</div> </div>
<el-tabs> <el-tabs>
<el-collapse v-model="acticveName"> <el-collapse v-model="acticveName">
<div v-for="o in s.children" :key="o.analogAreaComponentId"> <div style="position:relative" v-for="o in s.children" :key="o.analogAreaComponentId">
<el-collapse-item :title="o.componentName" :name="o.analogAreaComponentId"> <div class="titleGnag"></div>
<OD v-if="o.componentName.includes('OD')" :pageType="o.graphicType" <el-collapse-item :title="o.componentName + o.timeMode" :name="o.analogAreaComponentId">
triggerType="触发" :componentName="o.componentName" <OD
:echartArr="o.presentationForm" :dataArr="o.trigger" v-if="o.componentName.includes('OD')"
:title="o.componentName.split('_')[0]" :chartName="o.combinationName" /> :pageType="o.graphicType"
triggerType="触发"
:componentName="o.componentName"
:echartArr="o.presentationForm"
:dataArr="o.trigger"
:title="o.componentName.split('_')[0]"
:chartName="o.combinationName"
/>
<!--触发的组件 --> <!--触发的组件 -->
<typeChart ref="typeChartRef" v-if="o.timeMode === '触发'" <typeChart
:pageType="o.graphicType" :triggerType="o.timeMode" ref="typeChartRef"
:componentName="o.componentName" :dataArr="o.trigger" v-if="o.timeMode === '触发'"
:echartArr="o.presentationForm" :title="o.componentName.split('_')[0]" :pageType="o.graphicType"
:chartName="o.combinationName" :typeValue="typeTimeMode" /> :triggerType="o.timeMode"
<typeChart ref="typeChartRef1" v-if="o.timeMode === '周期时刻'" :componentName="o.componentName"
:pageType="o.graphicType" :triggerType="o.timeMode" :dataArr="o.trigger"
:componentName="o.componentName" :dataArr="o.cycleTimeData" :echartArr="o.presentationForm"
:echartArr="o.presentationForm" :title="o.componentName.split('_')[0]" :title="o.componentName.split('_')[0]"
:chartName="o.combinationName" :typeValue="typeCycleTimeData" /> :chartName="o.combinationName"
:typeValue="typeTimeMode"
/>
<typeChart
ref="typeChartRef1"
v-if="o.timeMode === '周期时刻'"
:pageType="o.graphicType"
:triggerType="o.timeMode"
:componentName="o.componentName"
:dataArr="o.cycleTimeData"
:echartArr="o.presentationForm"
:title="o.componentName.split('_')[0]"
:chartName="o.combinationName"
:typeValue="typeCycleTimeData"
/>
<!-- 周期统计的组件 --> <!-- 周期统计的组件 -->
<typeChart ref="typeChartRef2" style="width: 100%;" <typeChart
v-if="o.timeMode === '周期统计'" :pageType="o.graphicType" ref="typeChartRef2"
:triggerType="o.timeMode" :componentName="o.componentName" style="width: 100%;"
:dataArr="o.cycleStatistics" :echartArr="o.presentationForm" v-if="o.timeMode === '周期统计'"
:title="o.componentName.split('_')[0]" :chartName="o.combinationName" :pageType="o.graphicType"
:typeValue="typeCycleStatistics" /> :triggerType="o.timeMode"
:componentName="o.componentName"
:dataArr="o.cycleStatistics"
:echartArr="o.presentationForm"
:title="o.componentName.split('_')[0]"
:chartName="o.combinationName"
:typeValue="typeCycleStatistics"
/>
</el-collapse-item> </el-collapse-item>
</div> </div>
</el-collapse> </el-collapse>
@ -104,7 +136,6 @@ export default {
title2: '01区域', title2: '01区域',
dialogVisible: false, dialogVisible: false,
idVal: '', idVal: '',
// //
componentList: [], componentList: [],
@ -151,9 +182,9 @@ export default {
}); });
}, },
siftData() { siftData() {
this.sectionArr = [] this.sectionArr = [];
this.sectionData = [] this.sectionData = [];
this.classify = [] this.classify = [];
this.componentList.forEach(val => { this.componentList.forEach(val => {
this.sectionArr.push(val.combinationName); this.sectionArr.push(val.combinationName);
this.sectionArr = Array.from(new Set(this.sectionArr)); this.sectionArr = Array.from(new Set(this.sectionArr));
@ -163,14 +194,13 @@ export default {
this.acticveName = []; this.acticveName = [];
this.componentList.forEach(val => { this.componentList.forEach(val => {
if (item.title == val.combinationName) { if (item.title == val.combinationName) {
this.classify.push(val) this.classify.push(val);
item.children.push(val); item.children.push(val);
} }
this.acticveName.push(val.analogAreaComponentId); this.acticveName.push([]);
}); });
return item; return item;
}); });
}, },
// //
sectionHandle(i) { sectionHandle(i) {
@ -189,27 +219,26 @@ export default {
downPulls1[i].style.cssText = 'transition: all 0.5s linear;'; downPulls1[i].style.cssText = 'transition: all 0.5s linear;';
// sections[i].style.height = '500px'; // sections[i].style.height = '500px';
if (sectionBox[i] != undefined) { if (sectionBox[i] != undefined) {
} }
} }
}, },
channge(oldVal, newVal) { channge(oldVal, newVal) {
console.log("old", oldVal) console.log('old', oldVal);
console.log("newVal", newVal) console.log('newVal', newVal);
if (oldVal == 'second') { if (oldVal == 'second') {
this.sectionArr = [] this.sectionArr = [];
this.sectionData = [] this.sectionData = [];
this.getNew() this.getNew();
} else if (newVal == 'second') { } else if (newVal == 'second') {
this.sectionArr = [] this.sectionArr = [];
this.sectionData = [] this.sectionData = [];
this.getNew() this.getNew();
} }
} }
// //
}, },
mounted() { }, mounted() {},
watch: { watch: {
// acticveName: { // acticveName: {
// handler(newVal) { // handler(newVal) {
@ -222,7 +251,7 @@ export default {
// }, // },
// //
triggerData: { triggerData: {
handler(newVal, oldVal) { }, handler(newVal, oldVal) {},
immediate: true immediate: true
}, },
// activeName:'channge', // activeName:'channge',
@ -231,14 +260,13 @@ export default {
handler(newVal) { handler(newVal) {
this.triggerList = newVal; this.triggerList = newVal;
// //
var _this = this var _this = this;
if (newVal.length != 0 && _this.sectionData) { if (newVal.length != 0 && _this.sectionData) {
_this.classify.forEach((ele, index) => { _this.classify.forEach((ele, index) => {
if (ele.trigger == undefined && ele.timeMode == '触发') { if (ele.trigger == undefined && ele.timeMode == '触发') {
ele.trigger = []; ele.trigger = [];
} }
newVal.forEach((item) => { newVal.forEach(item => {
if (ele.analogAreaComponentId == item.component_id && ele.timeMode == '触发') { if (ele.analogAreaComponentId == item.component_id && ele.timeMode == '触发') {
if (ele.trigger.length == 10) { if (ele.trigger.length == 10) {
ele.trigger.splice(newVal.length - 1, 1); ele.trigger.splice(newVal.length - 1, 1);
@ -246,38 +274,30 @@ export default {
item.time = item.time.split('.')[0]; item.time = item.time.split('.')[0];
// //
if (item.type_data != null) { if (item.type_data != null) {
_this.typeTimeMode = item _this.typeTimeMode = item;
} }
ele.trigger.unshift(item); ele.trigger.unshift(item);
_this.$nextTick(() => { _this.$nextTick(() => {
for (let i = 0; i < _this.$refs.typeChartRef.length; i++) { for (let i = 0; i < _this.$refs.typeChartRef.length; i++) {
// console.log(_this.$refs.typeChartRef[i], ''); // console.log(_this.$refs.typeChartRef[i], '');
let item = _this.$refs.typeChartRef[i] let item = _this.$refs.typeChartRef[i];
_this.$refs.typeChartRef[i].$refs.lineChartRef.drawLine(_this.$refs.typeChartRef[i].dataArr,_this.$refs.typeChartRef[i].componentName.split('_')[0]) _this.$refs.typeChartRef[i].$refs.lineChartRef.drawLine(
// if(item.componentName.split('_')[0]==""&&item.$refs.barChartRef){ _this.$refs.typeChartRef[i].dataArr,
_this.$refs.typeChartRef[i].componentName.split('_')[0]
);
// if (item.componentName.split('_')[0] == '' && item.$refs.barChartRef) {
// // // //
// item.$refs.barChartRef.drawBar(item.dataArr[0]) // item.$refs.barChartRef.drawBar(item.dataArr[0]);
// } else if (item.componentName.split('_')[0] == '' && item.$refs.pieChartRef) {
// }else if(item.componentName.split('_')[0]==""&&item.$refs.pieChartRef){
// // // // // //
// item.$refs.pieChartRef.drawPie(item.dataArr[0]) // item.$refs.pieChartRef.drawPie(item.dataArr[0]);
// } // }
} }
});
})
} }
} }
}); });
}); });
} }
}, },
immediate: true immediate: true
@ -287,17 +307,14 @@ export default {
handler(newVal) { handler(newVal) {
// //
console.log(newVal, '周期时刻数据'); console.log(newVal, '周期时刻数据');
var that = this var that = this;
if (newVal.length != 0 && this.sectionData) { if (newVal.length != 0 && this.sectionData) {
that.classify.forEach((ele, index) => { that.classify.forEach((ele, index) => {
if (ele.cycleTimeData == undefined && ele.timeMode == '周期时刻') { if (ele.cycleTimeData == undefined && ele.timeMode == '周期时刻') {
ele.cycleTimeData = []; ele.cycleTimeData = [];
} }
newVal.forEach(item => { newVal.forEach(item => {
if ( if (ele.analogAreaComponentId == item.component_id && ele.timeMode == '周期时刻') {
ele.analogAreaComponentId == item.component_id &&
ele.timeMode == '周期时刻'
) {
if (ele.cycleTimeData.length == 10) { if (ele.cycleTimeData.length == 10) {
ele.cycleTimeData.splice(newVal.length - 1, 1); ele.cycleTimeData.splice(newVal.length - 1, 1);
} else { } else {
@ -310,8 +327,11 @@ export default {
that.$nextTick(() => { that.$nextTick(() => {
// //
for (let i = 0; i < that.$refs.typeChartRef1.length; i++) { for (let i = 0; i < that.$refs.typeChartRef1.length; i++) {
item = that.$refs.typeChartRef1[i] item = that.$refs.typeChartRef1[i];
that.$refs.typeChartRef1[i].$refs.lineChartRef.drawLine(that.$refs.typeChartRef1[i].dataArr, that.$refs.typeChartRef[i].componentName.split('_')[0]) that.$refs.typeChartRef1[i].$refs.lineChartRef.drawLine(
that.$refs.typeChartRef1[i].dataArr,
that.$refs.typeChartRef[i].componentName.split('_')[0]
);
// if (item.componentName.split('_')[0] == "") { // if (item.componentName.split('_')[0] == "") {
// if (item.echartArr.includes('')){ // if (item.echartArr.includes('')){
// // // //
@ -322,20 +342,16 @@ export default {
// item.$refs.pieChartRef.drawPie(item.dataArr[0]) // item.$refs.pieChartRef.drawPie(item.dataArr[0])
// } // }
// }
// if(item.componentName.split('_')[0]==""&&item.$refs.barChartRef){
// //
// item.$refs.barChartRef.drawBar(item.dataArr[0])
// }else if(item.componentName.split('_')[0]==""&&item.$refs.pieChartRef){
// // //
// // item.$refs.pieChartRef.drawPie(item.dataArr[0])
// } // }
if (item.componentName.split('_')[0] == '类型' && item.$refs.barChartRef) {
//
item.$refs.barChartRef.drawBar(item.dataArr[0]);
} else if (item.componentName.split('_')[0] == '类型' && item.$refs.pieChartRef) {
// //
// item.$refs.pieChartRef.drawPie(item.dataArr[0])
} }
}) }
});
} }
} }
}); });
@ -363,9 +379,12 @@ export default {
} }
ele.cycleStatistics.unshift(item); ele.cycleStatistics.unshift(item);
for (let i = 0; i < this.$refs.typeChartRef2.length; i++) { for (let i = 0; i < this.$refs.typeChartRef2.length; i++) {
item = that.$refs.typeChartRef2[i] item = that.$refs.typeChartRef2[i];
// console.log(_this.$refs.typeChartRef[i], ''); // console.log(_this.$refs.typeChartRef[i], '');
this.$refs.typeChartRef2[i].$refs.lineChartRef.drawLine(this.$refs.typeChartRef2[i].dataArr, _this.$refs.typeChartRe2f[i].componentName.split('_')[0]) this.$refs.typeChartRef2[i].$refs.lineChartRef.drawLine(
this.$refs.typeChartRef2[i].dataArr,
_this.$refs.typeChartRe2f[i].componentName.split('_')[0]
);
// if (item.componentName.split('_')[0] == "") { // if (item.componentName.split('_')[0] == "") {
// if (item.echartArr.includes('')) { // if (item.echartArr.includes('')) {
// // // //
@ -377,14 +396,12 @@ export default {
// } // }
// } // }
if(item.componentName.split('_')[0]=="类型"&&item.$refs.barChartRef){ if (item.componentName.split('_')[0] == '类型' && item.echartArr.includes('直方图')) {
// //
item.$refs.barChartRef.drawBar(item.dataArr[0]) item.$refs.barChartRef.drawBar(item.dataArr[0]);
} else if (item.componentName.split('_')[0] == '类型' && item.echartArr.includes('饼状图')) {
}else if(item.componentName.split('_')[0]=="类型"&&item.$refs.pieChartRef){
// // // //
item.$refs.pieChartRef.drawPie(item.dataArr[0]) item.$refs.pieChartRef.drawPie(item.dataArr[0]);
} }
} }
} }
@ -413,6 +430,20 @@ export default {
}; };
</script> </script>
<style>
.titleGnag {
width: 3px;
height: 18px;
display: inline-block;
background-color: #3297ff;
position: absolute;
top: 14px;
}
.el-collapse-item__header {
font-size: 15px;
margin-left: 10px;
}
</style>
<style scoped lang="scss"> <style scoped lang="scss">
* { * {
margin: 0; margin: 0;

View File

@ -17,7 +17,7 @@
autocomplete="off" autocomplete="off"
></el-date-picker> ></el-date-picker>
<el-button @click="saveTime" type="primary" style="margin-left:10px" size="small">自动校验</el-button> <el-button @click="saveTime" type="primary" style="margin-left:10px" size="small">校时</el-button>
</el-form-item> </el-form-item>
<p>备份&恢复</p> <p>备份&恢复</p>
<el-form-item label="备份服务器设置:"> <el-form-item label="备份服务器设置:">
@ -77,7 +77,7 @@
</template> </template>
<script> <script>
import { getHostInfoApi } from '../../api/aboutMachine'; import { getHostInfoApi, resetReboot } from '../../api/aboutMachine';
import { getQuanjszData } from '../../api/index'; import { getQuanjszData } from '../../api/index';
import serverUrl from '../../config/apiurl.js'; import serverUrl from '../../config/apiurl.js';
import { setQuanjsz } from '@/api/index'; import { setQuanjsz } from '@/api/index';
@ -171,7 +171,6 @@ export default {
.then(res => { .then(res => {
this.sizeForm.name = res.data.data.hostname; this.sizeForm.name = res.data.data.hostname;
this.sizeForm.date1 = res.data.data.time; this.sizeForm.date1 = res.data.data.time;
console.log(res.data.data, 11111);
}) })
.catch(err => { .catch(err => {
this.$message.error(res.data.msg); this.$message.error(res.data.msg);
@ -184,10 +183,14 @@ export default {
type: 'warning' type: 'warning'
}) })
.then(() => { .then(() => {
// this.$message({ resetReboot()
// type: 'success', .then(res => {
// message: '!' console.log(res);
// }); this.$message.success(res.data.msg);
})
.catch(err => {
this.$message.error(res.data.msg);
});
}) })
.catch(() => { .catch(() => {
this.$message({ this.$message({