|
@@ -117,7 +117,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
- import { onMounted, ref, reactive, watch, defineProps } from 'vue';
|
|
|
+ import { ref, reactive, watch, defineProps, inject } from 'vue';
|
|
|
import echartLine1 from './echartLine1.vue';
|
|
|
import warnZb from './warnZb.vue';
|
|
|
import PredictionCurve from './predictionCurve.vue';
|
|
@@ -404,28 +404,28 @@
|
|
|
|
|
|
// 设备控制
|
|
|
function controlDevice(code, value?) {
|
|
|
- Promise.all(
|
|
|
- [].map(({ deviceID, deviceType }) => {
|
|
|
- return deviceControlApi({
|
|
|
- deviceid: deviceID,
|
|
|
- devicetype: deviceType,
|
|
|
- paramcode: code,
|
|
|
- value,
|
|
|
- // password: passWord || globalConfig?.simulatedPassword,
|
|
|
- });
|
|
|
- })
|
|
|
- ).then((res) => {
|
|
|
- // 模拟时开启
|
|
|
- if (res.success) {
|
|
|
- if (globalConfig.History_Type == 'remote') {
|
|
|
- message.success('指令已下发至生产管控平台成功!');
|
|
|
- } else {
|
|
|
- message.success('指令已下发成功!');
|
|
|
- }
|
|
|
- } else {
|
|
|
- message.error(res.message);
|
|
|
- }
|
|
|
- });
|
|
|
+ // Promise.all(
|
|
|
+ // [].map(({ deviceID, deviceType }) => {
|
|
|
+ // return deviceControlApi({
|
|
|
+ // deviceid: deviceID,
|
|
|
+ // devicetype: deviceType,
|
|
|
+ // paramcode: code,
|
|
|
+ // value,
|
|
|
+ // // password: passWord || globalConfig?.simulatedPassword,
|
|
|
+ // });
|
|
|
+ // })
|
|
|
+ // ).then((res) => {
|
|
|
+ // // 模拟时开启
|
|
|
+ // if (res.success) {
|
|
|
+ // if (globalConfig.History_Type == 'remote') {
|
|
|
+ // message.success('指令已下发至生产管控平台成功!');
|
|
|
+ // } else {
|
|
|
+ // message.success('指令已下发成功!');
|
|
|
+ // }
|
|
|
+ // } else {
|
|
|
+ // message.error(res.message);
|
|
|
+ // }
|
|
|
+ // });
|
|
|
}
|
|
|
|
|
|
/** 预测曲线的配置,数据分别为平均、最大、最小、当前值 */
|