1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
| <template>
| <div v-show="false"></div>
| </template>
|
| <script>
| import {
| const_outline
| } from '@/assets/js/const'
| export default {
| name: "stopOutlineCuring",
| props: {
| devId: {
| type: [String, Number],
| default: 0
| },
| stopTime: {
| type: Number,
| default: 0
| },
| },
| data() {
| let cmd = const_outline.cmd;
| return {
| cmd: cmd,
| }
| },
| watch: {
| stopTime() {
| this.confirmStop();
| },
| },
| methods: {
| // 确认停止
| confirmStop() {
| this.$confirm("停止离线养护除硫", "提示", {
| confirmButtonText: '确定',
| cancelButtonText: '取消',
| }).then(()=>{
| this.stop();
| }).catch(()=>{});
| },
| stop() {
| let stop = this.cmd.stop;
| let devId = this.devId;
| let params = {
| op_cmd: stop,
| dev_id: devId,
| MonomerTmp_High: 0,
| OnLineVol_Low: 0,
| OffLineYH_Cycle: 0,
| OffLineYHOnceCycle: 0,
| OffLineYHstarttime: '2020-01-01 00:00:00',
| };
| // 开启等待框
| let loading = this.$layer.loading();
| // 请求后台设置参数
| this.$apis.outline.update(params).then(res=>{
| let rs = JSON.parse(res.data.result);
| if(rs.code == 1) {
| // 提示信息
| this.$layer.msg("停止离线养护成功!");
| }else {
| // 提示信息
| this.$layer.msg("停止离线养护失败!");
| }
| // 关闭等待框
| this.$layer.close(loading);
| }).catch(error=>{
| // 提示信息
| this.$layer.msg("网络请求异常,停止离线养护失败!");
| // 关闭等待框
| this.$layer.close(loading);
| });
| }
| }
| }
| </script>
|
| <style scoped>
|
| </style>
|
|