You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

1230 lines
42 KiB

if (typeof Promise !== "undefined" && !Promise.prototype.finally) {
Promise.prototype.finally = function(callback) {
const promise = this.constructor;
return this.then(
(value) => promise.resolve(callback()).then(() => value),
(reason) => promise.resolve(callback()).then(() => {
throw reason;
})
);
};
}
;
if (typeof uni !== "undefined" && uni && uni.requireGlobal) {
const global = uni.requireGlobal();
ArrayBuffer = global.ArrayBuffer;
Int8Array = global.Int8Array;
Uint8Array = global.Uint8Array;
Uint8ClampedArray = global.Uint8ClampedArray;
Int16Array = global.Int16Array;
Uint16Array = global.Uint16Array;
Int32Array = global.Int32Array;
Uint32Array = global.Uint32Array;
Float32Array = global.Float32Array;
Float64Array = global.Float64Array;
BigInt64Array = global.BigInt64Array;
BigUint64Array = global.BigUint64Array;
}
;
if (uni.restoreGlobal) {
uni.restoreGlobal(Vue, weex, plus, setTimeout, clearTimeout, setInterval, clearInterval);
}
(function(vue) {
"use strict";
function formatAppLog(type, filename, ...args) {
if (uni.__log__) {
uni.__log__(type, filename, ...args);
} else {
console[type].apply(console, [...args, filename]);
}
}
const CONFIG = {};
{
CONFIG["API_BASE_URL"] = "http://192.168.150.29:10086";
}
const BASE_URL = CONFIG["API_BASE_URL"];
function httpPost(option) {
return new Promise((resolve, reject) => {
let config = "";
const isToken = option.isToken === false;
let token = uni.getStorageSync("token1");
if (token && !isToken) {
config = "Bearer " + token;
}
uni.request({
url: BASE_URL + option.url,
method: "POST",
data: option.data,
header: {
"Content-Type": "application/json;charset=UTF-8",
"Authorization": config
},
success: (res) => {
resolve(res, 1111111);
},
fail: (err) => {
reject(err, 22222);
},
complete(res) {
if (res.data.code == 401) {
fetchUserName();
}
}
});
});
}
function fetchUserName() {
uni.getStorage({
key: "username",
success: function(res) {
anewLogin(res.data);
}
});
}
function anewLogin(data) {
let obj = {
url: "/login",
data
};
httpPost(obj).then((res) => {
formatAppLog("log", "at utils/requset.js:80", res);
if (res.data.code == 200) {
formatAppLog("log", "at utils/requset.js:82", res.data);
let token = res.data.token;
uni.setStorageSync("token1", token);
uni.setStorage({
key: "username",
data: {
username,
password
}
});
}
}).catch((err) => {
formatAppLog("log", "at utils/requset.js:95", err);
});
}
function setItem(key, value) {
uni.setStorageSync(key, value);
}
const _imports_0$1 = "/static/image/login.png";
const _export_sfc = (sfc, props) => {
const target = sfc.__vccOpts || sfc;
for (const [key, val] of props) {
target[key] = val;
}
return target;
};
const _sfc_main$4 = {
data() {
return {
title: "Hello",
username: "admin",
password: "admin123"
};
},
onLoad() {
uni.removeStorageSync("NUM", "message");
plus.screen.lockOrientation("landscape-primary");
},
methods: {
skip() {
let username2 = this.username;
let password2 = this.password;
if (username2 && password2) {
formatAppLog("log", "at pages/login/LoginPage.vue:36", username2, password2);
httpPost({
url: "/login",
data: {
username: username2,
password: password2
}
}).then((res) => {
formatAppLog("log", "at pages/login/LoginPage.vue:44", res);
if (res.data.code == 200) {
formatAppLog("log", "at pages/login/LoginPage.vue:46", res.data);
let token = res.data.token;
setItem("token1", token);
setItem("username", username2);
this.goSystem();
} else if (res.data.status == 403) {
httpPost({
url: "/logout",
data: {}
}).then((res2) => {
formatAppLog("log", "at pages/login/LoginPage.vue:56", res2);
});
}
}).catch((err) => {
uni.showToast({
title: "无法连接到服务",
icon: "error"
});
formatAppLog("log", "at pages/login/LoginPage.vue:64", err);
uni.showToast({
icon: "error",
title: "连接服务器失败"
});
});
} else if (!username2) {
uni.showToast({
title: "请输入用户名",
icon: "error",
duration: 1e3
});
} else {
uni.showToast({
title: "请输入密码",
icon: "error",
duration: 1e3
});
}
},
goSystem() {
uni.reLaunch({
url: "/pages/index/index"
});
}
},
mounted() {
}
};
function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
vue.createElementVNode("image", {
class: "logo",
src: _imports_0$1
}),
vue.createElementVNode("view", { class: "text-area" }, [
vue.createElementVNode("text", { class: "title" }, "管理终端")
]),
vue.createElementVNode("view", { class: "user" }, [
vue.withDirectives(vue.createElementVNode(
"input",
{
type: "text",
placeholder: "账号",
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.username = $event),
name: "username"
},
null,
512
/* NEED_PATCH */
), [
[vue.vModelText, $data.username]
]),
vue.withDirectives(vue.createElementVNode(
"input",
{
type: "password",
placeholder: "密码",
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.password = $event),
name: "password"
},
null,
512
/* NEED_PATCH */
), [
[vue.vModelText, $data.password]
])
]),
vue.createElementVNode("view", {
class: "btn",
onClick: _cache[2] || (_cache[2] = (...args) => $options.skip && $options.skip(...args))
}, "登录")
]);
}
const PagesLoginLoginPage = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$3], ["__file", "D:/XingXi/SpztPad/pages/login/LoginPage.vue"]]);
const _sfc_main$3 = {
props: {
Data: {
type: Object
}
},
data() {
return {
deviceData: {
trueEleCurrent: "",
//电机实际运行电流
vfdOnlineState: "",
//变频器在线状态
vfdFaultCode: 1,
//变频器故障码
encoderPosition: 100,
//编码器位置,单位mm
encoderOnlineState: 0,
//编码器在线状态:0-离线,1-在线
upDownAngle: "",
//俯仰角度
directionAngle: 100,
//方位角度,单位°
horizontalTurnAngle: 100,
//滚装角度,单位°
cameraOneState: 1,
//相机1状态:0:正常,1:通讯异常,2:无图像,3:光强饱和,4:缺少目标点
cameraTwoState: 1,
//相机2状态:0:正常,1:通讯异常,2:无图像,3:光强饱和,4:缺少目标点
yAxisDistance: 100,
//Y方向距离,单位mm
xAxisDistance: 100,
//X方向距离,单位mm
zAxisDistance: 100,
//Z方向距离,单位mm
isOnline: false,
//在线状态:true-在线、false
autoDockLightFlag: 0,
//自动对接:0:无动作、1:有动作
stopLightFlag: 0,
//急停有效:0:无效、1:有效
autoReturnLightFlag: 0,
//自动退货: 0:无动作、1:有动作
autoFillLightFlag: 0,
//自动装填: 0:无动作、1:有动作
ctrlFlag: 0,
//控制模式:0-手动、1-自动
lightFlag: 1
//设备状态:0-正常、1-异常
},
errorIcon: "/static/image/error.png",
normalIcon: "/static/image/normal.png"
};
},
methods: {
controlDevice(value) {
formatAppLog("log", "at components/controlPage/index.vue:243", value);
httpPost({
url: `/zhxx/dt/horizonLoadIControl/${value}`,
data: {}
}).then((res) => {
if (res.code == 200) {
uni.showToast({
title: res.msg,
icon: "success",
duration: 1e3
});
} else {
uni.showToast({
title: res.msg ? res.msg : "请求失败",
icon: "error",
duration: 1e3
});
}
}).catch((Error) => {
uni.showToast({
title: Error,
icon: "error",
duration: 1e3
});
});
}
},
computed: {
cameraState() {
return function(value) {
let cameraData = "";
switch (value) {
case 0:
cameraData = "正常";
break;
case 1:
cameraData = "通讯异常";
break;
case 2:
cameraData = "无图像";
break;
case 3:
cameraData = "光强饱和";
break;
case 4:
cameraData = "缺少目标点";
break;
}
return cameraData;
};
}
},
watch: {
Data: {
handler(newVal, oldVal) {
if (newVal) {
this.deviceData = newVal;
}
}
}
}
};
function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
return vue.openBlock(), vue.createElementBlock("view", { class: "deviceInfo" }, [
vue.createElementVNode("view", { class: "deviceContent" }, [
vue.createElementVNode("view", { class: "infoShow" }, [
vue.createElementVNode("view", { class: "deviceitle info" }, "设备数据"),
vue.createElementVNode("view", { class: "deivceData" }, [
vue.createElementVNode("view", { class: "left" }, [
vue.createElementVNode("view", { class: "left_top" }, [
vue.createElementVNode("view", null, [
vue.createElementVNode("span", null, "设备状态:"),
vue.createElementVNode("image", {
class: "Icon",
src: $data.deviceData.lightFlag == 0 ? $data.normalIcon : $data.errorIcon
}, null, 8, ["src"])
]),
vue.createElementVNode("view", null, [
vue.createElementVNode("span", null, "自动对接:"),
vue.createElementVNode("image", {
class: "Icon",
src: $data.deviceData.autoDockLightFlag == 0 ? $data.errorIcon : $data.normalIcon
}, null, 8, ["src"])
]),
vue.createElementVNode("view", null, [
vue.createElementVNode("span", null, "急停有效:"),
vue.createElementVNode("image", {
class: "Icon",
src: $data.deviceData.stopLightFlag == 0 ? $data.errorIcon : $data.normalIcon
}, null, 8, ["src"])
]),
vue.createElementVNode("view", null, [
vue.createElementVNode("span", null, "自动装填:"),
vue.createElementVNode("image", {
class: "Icon",
src: $data.deviceData.autoFillLightFlag == 0 ? $data.errorIcon : $data.normalIcon
}, null, 8, ["src"])
]),
vue.createElementVNode("view", null, [
vue.createElementVNode("span", null, "控制模式:"),
vue.createElementVNode(
"span",
null,
vue.toDisplayString($data.deviceData.ctrlFlag == 1 ? "自动" : "手动"),
1
/* TEXT */
)
]),
vue.createElementVNode("view", null, [
vue.createElementVNode("span", null, "自动退货:"),
vue.createElementVNode("image", {
class: "Icon",
src: $data.deviceData.autoReturnLightFlag == 0 ? $data.errorIcon : $data.normalIcon
}, null, 8, ["src"])
])
]),
vue.createElementVNode("view", { class: "left-bottom" }, [
vue.createElementVNode("view", null, [
vue.createElementVNode("view", { style: { "width": "25%" } }, "设备状态:"),
vue.createElementVNode("view", null, [
vue.createElementVNode("image", {
class: "Icon",
src: $data.normalIcon
}, null, 8, ["src"]),
vue.createTextVNode(": "),
vue.createElementVNode("span", null, "正常")
]),
vue.createElementVNode("view", null, [
vue.createElementVNode("image", {
class: "Icon",
src: $data.errorIcon
}, null, 8, ["src"]),
vue.createTextVNode(": "),
vue.createElementVNode("span", null, "异常")
])
]),
vue.createElementVNode("view", null, [
vue.createElementVNode("view", { style: { "width": "25%" } }, "急停有效:"),
vue.createElementVNode("view", null, [
vue.createElementVNode("image", {
class: "Icon",
src: $data.normalIcon
}, null, 8, ["src"]),
vue.createTextVNode(": "),
vue.createElementVNode("span", null, "有效")
]),
vue.createElementVNode("view", null, [
vue.createElementVNode("image", {
class: "Icon",
src: $data.errorIcon
}, null, 8, ["src"]),
vue.createTextVNode(": "),
vue.createElementVNode("span", null, "无效")
])
]),
vue.createElementVNode("view", null, [
vue.createElementVNode("view", { style: { "width": "25%" } }, "自动对接:"),
vue.createElementVNode("view", null, [
vue.createElementVNode("image", {
class: "Icon",
src: $data.normalIcon
}, null, 8, ["src"]),
vue.createTextVNode(": "),
vue.createElementVNode("span", null, "有动作")
]),
vue.createElementVNode("view", null, [
vue.createElementVNode("image", {
class: "Icon",
src: $data.errorIcon
}, null, 8, ["src"]),
vue.createTextVNode(": "),
vue.createElementVNode("span", null, "无动作")
])
]),
vue.createElementVNode("view", null, [
vue.createElementVNode("view", { style: { "width": "25%" } }, "自动装填:"),
vue.createElementVNode("view", null, [
vue.createElementVNode("image", {
class: "Icon",
src: $data.normalIcon
}, null, 8, ["src"]),
vue.createTextVNode(": "),
vue.createElementVNode("span", null, "有动作")
]),
vue.createElementVNode("view", null, [
vue.createElementVNode("image", {
class: "Icon",
src: $data.errorIcon
}, null, 8, ["src"]),
vue.createTextVNode(": "),
vue.createElementVNode("span", null, "无动作")
])
]),
vue.createElementVNode("view", null, [
vue.createElementVNode("view", { style: { "width": "25%" } }, "自动退货:"),
vue.createElementVNode("view", null, [
vue.createElementVNode("image", {
class: "Icon",
src: $data.normalIcon
}, null, 8, ["src"]),
vue.createTextVNode(": "),
vue.createElementVNode("span", null, "有动作")
]),
vue.createElementVNode("view", null, [
vue.createElementVNode("image", {
class: "Icon",
src: $data.errorIcon
}, null, 8, ["src"]),
vue.createTextVNode(": "),
vue.createElementVNode("span", null, "无动作")
])
])
])
]),
vue.createElementVNode("view", { class: "right" }, [
vue.createElementVNode("view", { class: "cameraInfo" }, [
vue.createElementVNode("view", { style: { "width": "22%" } }, [
vue.createElementVNode("span", { class: "infoTitle" }, "设备在线状态:"),
vue.createElementVNode(
"span",
{ class: "detail" },
vue.toDisplayString($data.deviceData.isOnline ? "在线" : "不在线"),
1
/* TEXT */
)
]),
vue.createElementVNode("view", { style: { "width": "22%" } }, [
vue.createElementVNode("span", { class: "infoTitle" }, "相机1状态:"),
vue.createElementVNode(
"span",
{ class: "detail" },
vue.toDisplayString($options.cameraState($data.deviceData.cameraOneState)),
1
/* TEXT */
)
]),
vue.createElementVNode("view", { style: { "width": "22%" } }, [
vue.createElementVNode("span", { class: "infoTitle" }, "相机2状态:"),
vue.createElementVNode(
"span",
{ class: "detail" },
vue.toDisplayString($options.cameraState($data.deviceData.cameraTwoState)),
1
/* TEXT */
)
])
]),
vue.createElementVNode("view", { class: "directionInfo" }, [
vue.createElementVNode("view", { style: { "width": "22%" } }, [
vue.createElementVNode("span", { class: "infoTitle" }, "X方向距离:"),
vue.createElementVNode(
"span",
{ class: "detail" },
vue.toDisplayString($data.deviceData.xAxisDistance) + "mm",
1
/* TEXT */
)
]),
vue.createElementVNode("view", { style: { "width": "22%" } }, [
vue.createElementVNode("span", { class: "infoTitle" }, "Y方向距离:"),
vue.createElementVNode(
"span",
{ class: "detail" },
vue.toDisplayString($data.deviceData.yAxisDistance) + "mm",
1
/* TEXT */
)
]),
vue.createElementVNode("view", { style: { "width": "22%" } }, [
vue.createElementVNode("span", { class: "infoTitle" }, "Z方向距离:"),
vue.createElementVNode(
"span",
{ class: "detail" },
vue.toDisplayString($data.deviceData.zAxisDistance) + "mm",
1
/* TEXT */
)
])
]),
vue.createElementVNode("view", { class: "angleInfo" }, [
vue.createElementVNode("view", { style: { "width": "22%" } }, [
vue.createElementVNode("span", { class: "infoTitle" }, "滚转角度:"),
vue.createElementVNode(
"span",
null,
vue.toDisplayString($data.deviceData.horizontalTurnAngle ? $data.deviceData.horizontalTurnAngle : "0") + "°",
1
/* TEXT */
)
]),
vue.createElementVNode("view", { style: { "width": "22%" } }, [
vue.createElementVNode("span", { class: "infoTitle" }, "俯仰角度:"),
vue.createElementVNode(
"span",
null,
vue.toDisplayString($data.deviceData.upDownAngle ? $data.deviceData.upDownAngle : "0") + "°",
1
/* TEXT */
)
]),
vue.createElementVNode("view", { style: { "width": "22%" } }, [
vue.createElementVNode("span", { class: "infoTitle" }, "方位角度:"),
vue.createElementVNode(
"span",
{ class: "detail" },
vue.toDisplayString($data.deviceData.directionAngle ? $data.deviceData.directionAngle : "0") + "°",
1
/* TEXT */
)
])
]),
vue.createElementVNode("view", { class: "encoderInfo" }, [
vue.createElementVNode("view", { style: { "width": "28%" } }, [
vue.createElementVNode("span", { class: "infoTitle" }, "编码器在线状态:"),
vue.createElementVNode(
"span",
{ class: "detail" },
vue.toDisplayString($data.deviceData.encoderOnlineState == 1 ? "在线" : "离线"),
1
/* TEXT */
)
]),
vue.createElementVNode("view", { style: { "width": "24%" } }, [
vue.createElementVNode("span", { class: "infoTitle" }, "编码器位置:"),
vue.createElementVNode(
"span",
{ class: "detail" },
vue.toDisplayString($data.deviceData.encoderPosition) + "mm",
1
/* TEXT */
)
]),
vue.createElementVNode("view", { style: { "width": "10%", "opacity": "0" } })
]),
vue.createElementVNode("view", { class: "encoderInfo" }, [
vue.createElementVNode("view", { style: { "width": "28%" } }, [
vue.createElementVNode("span", { class: "infoTitle" }, "变频器在线状态:"),
vue.createElementVNode(
"span",
{ class: "detail" },
vue.toDisplayString($data.deviceData.vfdOnlineState == 1 ? "在线" : "离线"),
1
/* TEXT */
)
]),
vue.createElementVNode("view", { style: { "width": "24%" } }, [
vue.createElementVNode("span", { class: "infoTitle" }, "变频器故障码:"),
vue.createElementVNode(
"span",
{ class: "detail" },
vue.toDisplayString($data.deviceData.vfdFaultCode),
1
/* TEXT */
)
]),
vue.createElementVNode("view", { style: { "width": "10%", "opacity": "0" } })
]),
vue.createElementVNode("view", { class: "angleInfo" }, [
vue.createElementVNode("view", { style: { "width": "28%" } }, [
vue.createElementVNode("span", { class: "infoTitle" }, "电机实际运行电流:"),
vue.createElementVNode(
"span",
{ class: "detail" },
vue.toDisplayString($data.deviceData.trueEleCurrent),
1
/* TEXT */
)
]),
vue.createElementVNode("view", { style: { "opacity": "0" } }),
vue.createElementVNode("view", { style: { "opacity": "0" } })
])
])
])
]),
vue.createElementVNode("view", { class: "controlButton" }, [
vue.createElementVNode("view", { class: "deviceitle control" }, "设备控制"),
vue.createElementVNode("view", { class: "controlContent" }, [
vue.createElementVNode("view", {
onClick: _cache[0] || (_cache[0] = ($event) => $options.controlDevice(1))
}, "对接"),
vue.createElementVNode("view", {
onClick: _cache[1] || (_cache[1] = ($event) => $options.controlDevice(2))
}, "装填"),
vue.createElementVNode("view", {
onClick: _cache[2] || (_cache[2] = ($event) => $options.controlDevice(3))
}, "退货"),
vue.createElementVNode("view", {
onClick: _cache[3] || (_cache[3] = ($event) => $options.controlDevice(4))
}, "急停"),
vue.createElementVNode("view", {
onClick: _cache[4] || (_cache[4] = ($event) => $options.controlDevice(5))
}, "恢复")
])
])
])
]);
}
const controlPage = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$2], ["__scopeId", "data-v-d6733cbd"], ["__file", "D:/XingXi/SpztPad/components/controlPage/index.vue"]]);
const _sfc_main$2 = {
props: {
carData1: {
type: Array
},
carData2: {
type: Array
},
carData3: {
type: Array
}
},
data() {
return {
dataInter: [
{
name: "支架车在线状态:",
width: 0,
val: "离线"
},
{
name: "左横移限位:",
width: 1,
val: "2"
},
{
name: "右横移限位:",
width: 1,
val: "3"
},
{
name: "上限位:",
width: 1,
val: "3"
},
{
name: "下限位:",
width: 1,
val: "3"
},
{
name: "左滚转限位:",
width: 1,
val: "3"
},
{
name: "右滚转限位:",
width: 1,
val: "3"
},
{
name: "行进位置:",
width: 1,
val: "3"
},
{
name: "横移位置:",
width: 1,
val: "3"
},
{
name: "滚转位置:",
width: 1,
val: "3"
},
{
name: "超重限位:",
width: 1,
val: "3"
},
{
name: "升降位置:",
width: 0,
val: "3"
}
],
carDetail1: [],
carDetail2: [],
carDetail3: []
};
},
watch: {
carData1: {
handler(newVal, oldVal) {
if (newVal) {
this.carDetail1 = newVal;
}
}
},
carData2: {
handler(newVal, oldVal) {
if (newVal) {
this.carDetail2 = newVal;
}
}
},
carData3: {
handler(newVal, oldVal) {
if (newVal) {
this.carDetail3 = newVal;
}
}
}
},
mounted() {
this.carDetail1 = this.dataInter;
this.carDetail2 = this.dataInter;
this.carDetail3 = this.dataInter;
}
};
function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
return vue.openBlock(), vue.createElementBlock("view", { class: "carInfo" }, [
vue.createElementVNode("view", { class: "carContent" }, [
vue.createElementVNode("view", null, [
vue.createElementVNode("view", { class: "carTitle" }, " 1号支架车 "),
vue.createElementVNode("view", { class: "carDetail" }, [
(vue.openBlock(true), vue.createElementBlock(
vue.Fragment,
null,
vue.renderList($data.carDetail1, (item, index) => {
return vue.openBlock(), vue.createElementBlock(
"view",
{
key: index,
class: vue.normalizeClass(item.width == 0 ? "optionWidth" : "")
},
[
vue.createElementVNode(
"span",
null,
vue.toDisplayString(item.name),
1
/* TEXT */
),
vue.createElementVNode(
"span",
{ style: { "padding-right": "4px" } },
vue.toDisplayString(item.val),
1
/* TEXT */
),
vue.createElementVNode(
"span",
null,
vue.toDisplayString(index == 7 || index == 11 ? "mm" : index == 9 ? "°" : ""),
1
/* TEXT */
)
],
2
/* CLASS */
);
}),
128
/* KEYED_FRAGMENT */
))
])
]),
vue.createElementVNode("view", null, [
vue.createElementVNode("view", { class: "carTitle" }, " 2号支架车 "),
vue.createElementVNode("view", { class: "carDetail" }, [
(vue.openBlock(true), vue.createElementBlock(
vue.Fragment,
null,
vue.renderList($data.carDetail2, (item, index) => {
return vue.openBlock(), vue.createElementBlock(
"view",
{
key: index,
class: vue.normalizeClass(item.width == 0 ? "optionWidth" : "")
},
[
vue.createElementVNode(
"span",
null,
vue.toDisplayString(item.name),
1
/* TEXT */
),
vue.createElementVNode(
"span",
{ style: { "padding-right": "4px" } },
vue.toDisplayString(item.val),
1
/* TEXT */
),
vue.createElementVNode(
"span",
null,
vue.toDisplayString(index == 7 || index == 11 ? "mm" : index == 9 ? "°" : ""),
1
/* TEXT */
)
],
2
/* CLASS */
);
}),
128
/* KEYED_FRAGMENT */
))
])
]),
vue.createElementVNode("view", null, [
vue.createElementVNode("view", { class: "carTitle" }, " 3号支架车 "),
vue.createElementVNode("view", { class: "carDetail" }, [
(vue.openBlock(true), vue.createElementBlock(
vue.Fragment,
null,
vue.renderList($data.carDetail3, (item, index) => {
return vue.openBlock(), vue.createElementBlock(
"view",
{
key: index,
class: vue.normalizeClass(item.width == 0 ? "optionWidth" : "")
},
[
vue.createElementVNode(
"span",
null,
vue.toDisplayString(item.name),
1
/* TEXT */
),
vue.createElementVNode(
"span",
{ style: { "padding-right": "4px" } },
vue.toDisplayString(item.val),
1
/* TEXT */
),
vue.createElementVNode(
"span",
null,
vue.toDisplayString(index == 7 || index == 11 ? "mm" : index == 9 ? "°" : ""),
1
/* TEXT */
)
],
2
/* CLASS */
);
}),
128
/* KEYED_FRAGMENT */
))
])
])
])
]);
}
const carPage = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$1], ["__scopeId", "data-v-5961d202"], ["__file", "D:/XingXi/SpztPad/components/carPage/index.vue"]]);
const _imports_0 = "/static/image/taitou.png";
const _sfc_main$1 = {
components: {
controlPage,
carPage
},
data() {
return {
optionIndex: 1,
dataInter: [
{
name: "支架车在线状态:",
width: 0,
val: ""
},
{
name: "左横移限位:",
width: 1,
val: ""
},
{
name: "右横移限位:",
width: 1,
val: ""
},
{
name: "上限位:",
width: 1,
val: ""
},
{
name: "下限位:",
width: 1,
val: ""
},
{
name: "左滚转限位:",
width: 1,
val: ""
},
{
name: "右滚转限位:",
width: 1,
val: ""
},
{
name: "行进位置:",
width: 1,
val: ""
},
{
name: "横移位置:",
width: 1,
val: ""
},
{
name: "滚转位置:",
width: 1,
val: ""
},
{
name: "超重限位:",
width: 1,
val: ""
},
{
name: "升降位置:",
width: 0,
val: ""
}
],
carData1: [],
carData2: [],
carData3: [],
deviceData: {}
};
},
methods: {
cutOption(value) {
this.optionIndex = value;
},
outLogin() {
uni.showModal({
title: "提示",
content: "是否退出",
success: (res) => {
if (res.confirm) {
httpPost({
url: "/logout",
data: {}
}).then((res2) => {
formatAppLog("log", "at pages/index/index.vue:102", res2);
uni.reLaunch({
url: "/pages/login/LoginPage"
});
});
} else if (res.cancel) {
formatAppLog("log", "at pages/index/index.vue:108", "用户点击取消");
}
}
});
},
deviceAjax() {
httpPost({
url: "/zhxx/dt/horizonLoadInfo",
data: {}
}).then((res) => {
if (res.code == 200) {
this.deviceData = res.data;
this.carData1 = this.carEntsorgen(res.data, 1);
this.carData2 = this.carEntsorgen(res.data, 2);
this.carData3 = this.carEntsorgen(res.data, 3);
}
});
},
carEntsorgen(value, type) {
let arrData = this.dataInter;
if (type == 1) {
arrData[0].val = value.online == 1 ? "在线" : "离线";
arrData[1].val = value.leftHorizontalLimit;
arrData[2].val = value.rightHorizontalLimit;
arrData[3].val = value.downLimit;
arrData[4].val = value.upLimit;
arrData[5].val = value.leftTurnLimit;
arrData[6].val = value.rightTurnLimit;
arrData[7].val = value.walkAxisPosition;
arrData[8].val = value.horizontalAxisPosition;
arrData[9].val = value.turnPosition;
arrData[10].val = value.overWeightLimit;
arrData[11].val = value.liftPosition;
} else if (type == 2) {
arrData[0].val = value.onlineTwo == 1 ? "在线" : "离线";
arrData[1].val = value.leftHorizontalLimitTwo;
arrData[2].val = value.rightHorizontalLimitTwo;
arrData[3].val = value.downLimitTwo;
arrData[4].val = value.upLimitTwo;
arrData[5].val = value.leftTurnLimitTwo;
arrData[6].val = value.rightTurnLimitTwo;
arrData[7].val = value.walkAxisPositionTwo;
arrData[8].val = value.horizontalAxisPositionTwo;
arrData[9].val = value.turnPositionTwo;
arrData[10].val = value.overWeightLimitTwo;
arrData[11].val = value.liftPositionTwo;
} else {
arrData[0].val = value.onlineThree == 1 ? "在线" : "离线";
arrData[1].val = value.leftHorizontalLimitThree;
arrData[2].val = value.rightHorizontalLimitThree;
arrData[3].val = value.downLimitThree;
arrData[4].val = value.upLimitThree;
arrData[5].val = value.leftTurnLimitThree;
arrData[6].val = value.rightTurnLimitThree;
arrData[7].val = value.walkAxisPositionThree;
arrData[8].val = value.horizontalAxisPositionThree;
arrData[9].val = value.turnPositionThree;
arrData[10].val = value.overWeightLimitThree;
arrData[11].val = value.liftPositionThree;
}
return arrData;
}
},
watch: {},
onLoad() {
plus.screen.lockOrientation("landscape-primary");
uni.getSystemInfo({
success: (info) => {
this.screenHeight = info.windowHeight;
}
});
},
mounted() {
this.deviceAjax();
setInterval(() => {
this.deviceAjax();
}, 1e3);
}
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
const _component_controlPage = vue.resolveComponent("controlPage");
const _component_carPage = vue.resolveComponent("carPage");
return vue.openBlock(), vue.createElementBlock("view", {
class: "content",
style: { "background-color": "#09154F", "height": "784px" }
}, [
vue.createElementVNode("image", {
src: _imports_0,
style: { "width": "100%", "height": "7%", "position": "absolute" }
}),
vue.createElementVNode("view", { class: "title" }, [
vue.createElementVNode("text", null, "控制终端")
]),
vue.createElementVNode("view", { class: "optionButton" }, [
vue.createElementVNode(
"span",
{
class: vue.normalizeClass($data.optionIndex == 0 ? "pitch" : ""),
onClick: _cache[0] || (_cache[0] = ($event) => $options.cutOption(0))
},
"控制面板",
2
/* CLASS */
),
vue.createElementVNode(
"span",
{
class: vue.normalizeClass($data.optionIndex == 1 ? "pitch" : ""),
onClick: _cache[1] || (_cache[1] = ($event) => $options.cutOption(1))
},
"车辆面板",
2
/* CLASS */
)
]),
vue.createElementVNode("view", { class: "outButton" }, [
vue.createElementVNode(
"span",
{
class: vue.normalizeClass($data.optionIndex == 2 ? "pitch" : ""),
onClick: _cache[2] || (_cache[2] = ($event) => $options.outLogin())
},
"退出",
2
/* CLASS */
)
]),
$data.optionIndex == 0 ? (vue.openBlock(), vue.createBlock(_component_controlPage, {
key: 0,
Data: $data.deviceData
}, null, 8, ["Data"])) : vue.createCommentVNode("v-if", true),
$data.optionIndex == 1 ? (vue.openBlock(), vue.createBlock(_component_carPage, {
key: 1,
carData1: $data.carData1,
carData2: $data.carData2,
carData3: $data.carData3
}, null, 8, ["carData1", "carData2", "carData3"])) : vue.createCommentVNode("v-if", true)
]);
}
const PagesIndexIndex = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render], ["__scopeId", "data-v-1cf27b2a"], ["__file", "D:/XingXi/SpztPad/pages/index/index.vue"]]);
__definePage("pages/login/LoginPage", PagesLoginLoginPage);
__definePage("pages/index/index", PagesIndexIndex);
const _sfc_main = {
onLaunch: function() {
formatAppLog("log", "at App.vue:4", "App Launch");
},
onShow: function() {
formatAppLog("log", "at App.vue:7", "App Show");
},
onHide: function() {
formatAppLog("log", "at App.vue:10", "App Hide");
}
};
const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "D:/XingXi/SpztPad/App.vue"]]);
function mitt(n) {
return { all: n = n || /* @__PURE__ */ new Map(), on: function(t, e) {
var i = n.get(t);
i ? i.push(e) : n.set(t, [e]);
}, off: function(t, e) {
var i = n.get(t);
i && (e ? i.splice(i.indexOf(e) >>> 0, 1) : n.set(t, []));
}, emit: function(t, e) {
var i = n.get(t);
i && i.slice().map(function(n2) {
n2(e);
}), (i = n.get("*")) && i.slice().map(function(n2) {
n2(t, e);
});
} };
}
function createApp() {
const app = vue.createVueApp(App);
const eventBus = mitt();
eventBus.$on = eventBus.on;
eventBus.$off = eventBus.off;
eventBus.$emit = eventBus.emit;
app.config.globalProperties.$eventBus = eventBus;
return {
app
};
}
const { app: __app__, Vuex: __Vuex__, Pinia: __Pinia__ } = createApp();
uni.Vuex = __Vuex__;
uni.Pinia = __Pinia__;
__app__.provide("__globalStyles", __uniConfig.styles);
__app__._component.mpType = "app";
__app__._component.render = () => {
};
__app__.mount("#app");
})(Vue);