This commit is contained in:
打豆豆 2024-03-26 19:48:34 +08:00
parent 73aeaa701b
commit 029d57ad8e
9 changed files with 416 additions and 374 deletions

View File

@ -30,7 +30,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="7"> <!-- <el-col :span="7">
<el-form-item label="所在车间" prop="workshopName"> <el-form-item label="所在车间" prop="workshopName">
<el-select v-model="queryParams.workshopId" placeholder="请选择车间"> <el-select v-model="queryParams.workshopId" placeholder="请选择车间">
<el-option <el-option
@ -41,7 +41,7 @@
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col> -->
<el-col :span="3"> <el-col :span="3">
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
@ -178,7 +178,7 @@ export default {
workstationCode: null, workstationCode: null,
workstationName: null, workstationName: null,
workstationAddress: null, workstationAddress: null,
workshopId: null, workshopId: "214",
workshopCode: null, workshopCode: null,
workshopName: null, workshopName: null,
processId: null, processId: null,

View File

@ -315,15 +315,8 @@
v-model="form.machineryTypeId" v-model="form.machineryTypeId"
:options="machineryTypeOptions" :options="machineryTypeOptions"
:normalizer="normalizer" :normalizer="normalizer"
disabled placeholder="请选择设备类型"
v-if="optType == 'view'" @select="handleNodeClick"
/>
<treeselect
v-model="form.machineryTypeId"
:options="machineryTypeOptions"
:normalizer="normalizer"
placeholder="请选择所属分类"
v-else
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -382,7 +375,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="所属车间" prop="workshopName"> <!-- <el-form-item label="所属车间" prop="workshopName">
<el-select <el-select
v-model="form.workshopName" v-model="form.workshopName"
placeholder="请选择车间" placeholder="请选择车间"
@ -397,7 +390,7 @@
:value="item" :value="item"
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item> -->
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
@ -587,7 +580,7 @@ export default {
idList: "", idList: "",
workshopCode: "", workshopCode: "",
workshopName: "", workshopName: "",
workshopId: "", workshopId: "214",
}, },
defaultPropss: { defaultPropss: {
children: "children", children: "children",
@ -656,15 +649,15 @@ export default {
machineryName: [ machineryName: [
{ required: true, message: "设备名称不能为空", trigger: "blur" }, { required: true, message: "设备名称不能为空", trigger: "blur" },
], ],
workshopId: [ // workshopId: [
{ required: true, message: "车间不能为空", trigger: "blur" }, // { required: true, message: "", trigger: "blur" },
], // ],
machineryTypeId: [ machineryTypeId: [
{ required: true, message: "设备分类不能为空", trigger: "blur" }, { required: true, message: "设备分类不能为空", trigger: "blur" },
], ],
workshopName: [ // workshopName: [
{ required: true, message: "所属车间不能为空", trigger: "blur" }, // { required: true, message: "", trigger: "blur" },
], // ],
}, },
}; };
}, },
@ -727,6 +720,12 @@ export default {
this.queryParamsdata = data; this.queryParamsdata = data;
this.handleQuery(); this.handleQuery();
}, },
//
handleNodeClick(data) {
console.log(data);
this.form.machineryTypeName = data.machineryTypeName;
this.form.machineryTypeCode = data.code;
},
// //
cancel() { cancel() {
this.open = false; this.open = false;
@ -743,7 +742,7 @@ export default {
machineryTypeId: null, machineryTypeId: null,
machineryTypeCode: null, machineryTypeCode: null,
machineryTypeName: null, machineryTypeName: null,
workshopId: null, workshopId: "214",
workshopCode: null, workshopCode: null,
workshopName: null, workshopName: null,
status: "STOP", status: "STOP",
@ -809,7 +808,7 @@ export default {
// this.$emit("getSelectList", this.selectList); // this.$emit("getSelectList", this.selectList);
}, },
// //
handleAccompanyId(val) { handleAccompanyId(val) {
this.form.workshopCode = val.workshopCode; this.form.workshopCode = val.workshopCode;
this.form.workshopName = val.workshopName; this.form.workshopName = val.workshopName;

View File

@ -201,7 +201,7 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="所属车间" prop="workshopId"> <!-- <el-form-item label="所属车间" prop="workshopId">
<el-select <el-select
v-model="form.workshopId" v-model="form.workshopId"
placeholder="请选择车间" placeholder="请选择车间"
@ -215,7 +215,7 @@
:value="item.workshopId" :value="item.workshopId"
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item> -->
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="是否启用" prop="enableFlag"> <el-form-item label="是否启用" prop="enableFlag">
@ -346,7 +346,7 @@ export default {
proAgvlineId: null, proAgvlineId: null,
lineCode: null, lineCode: null,
lineName: null, lineName: null,
workshopId: null, workshopId: "214",
enableFlag: "Y", enableFlag: "Y",
remark: null, remark: null,
}; };

View File

@ -245,7 +245,7 @@
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <!-- <el-col :span="12">
<el-form-item label="所在车间" prop="workshopId"> <el-form-item label="所在车间" prop="workshopId">
<el-select <el-select
v-model="form.workshopId" v-model="form.workshopId"
@ -260,7 +260,7 @@
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col> -->
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
@ -564,7 +564,7 @@ export default {
workstationCode: null, workstationCode: null,
workstationName: null, workstationName: null,
workstationAddress: null, workstationAddress: null,
workshopId: null, workshopId: "214",
workshopCode: null, workshopCode: null,
workshopName: null, workshopName: null,
processId: null, processId: null,
@ -670,6 +670,7 @@ export default {
this.$refs["form"].validate((valid) => { this.$refs["form"].validate((valid) => {
if (valid) { if (valid) {
if (this.form.workstationId != null) { if (this.form.workstationId != null) {
this.form.processId = this.form.processId.join(",");
updateWorkstation(this.form).then((response) => { updateWorkstation(this.form).then((response) => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
this.open = false; this.open = false;

View File

@ -1,177 +1,188 @@
<template> <template>
<div class="videoMain" ref="playWndBox"> <div>
<div <div>
id="playWnd" <div id="playWnd" class="playWnd"></div>
class="playWnd" <div v-show="lodingshow" style="margin: -17px 0">
:style="{ <a-spin tip="Loading...">
height: playWndHeight + 'px', <div class="spin-content">插件未启动正在尝试启动请稍候...</div>
width: playWndWidth + 'px', </a-spin>
}" </div>
></div>
<div v-show="lodingres" class="example">
<p style="margin: 0; display: inline-block">
没有检测到插件请安装插件后重启浏览器
</p>
<a-button class="buttonDetails-class" @click="downloadFile()"
>下载</a-button
>
</div>
</div>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
name: "HikVideo", name: "monitor",
data() { data() {
return { return {
// //
playWndHeight: "", camlength: "1x1",
//
playWndWidth: "", //
oWebControl: null, lodingshow: false,
initCount: 0, lodingres: false,
pubKey: "",
cameraIndexCode: "", //
objData: {
appkey: "", //appkey
ip: "", //
secret: "", //secret
port: 443,
playMode: 0, // 0 1
layout: "2x2", //16
},
}; };
}, },
mounted() { created() {
// //
this.playWndHeight = this.$refs.playWndBox.clientHeight;
//
this.playWndWidth = this.$refs.playWndBox.clientWidth;
//
this.$nextTick(() => {
this.initPlugin(); this.initPlugin();
});
// scroll使DIV
window.addEventListener("scroll", () => {
if (this.oWebControl != null) {
this.oWebControl.JS_Resize(
this.$refs.playWndBox.clientWidth,
this.$refs.playWndBox.clientHeight
);
this.setWndCover();
}
});
// resize使DIV // resize使DIV
window.addEventListener("resize", (e) => { // vue onresize
if (this.oWebControl != null) { $(window).resize(() => {
this.oWebControl.JS_Resize( if (oWebControl != null) {
this.$refs.playWndBox.clientWidth, oWebControl.JS_Resize( $('.map').width(), $('.map').height() - 60);
this.$refs.playWndBox.clientHeight
);
this.setWndCover();
} }
}); });
}, },
//
destroyed() { destroyed() {
if (this.oWebControl != null) { if (oWebControl != null) {
// oWebControl.JS_HideWnd(); //
this.oWebControl.JS_HideWnd(); oWebControl.JS_Disconnect().then(() => { //
// },
this.oWebControl.JS_RequestInterface({ funcName: "destroyWnd" }); () => { //
// });
this.oWebControl.JS_Disconnect();
} }
}, },
methods: { methods: {
//
refusePlay() {
//
SubordinateCam({
pageNo: 1,
pageSize: 1000,
regionIndexCode: this.$route.params.id
}).then(res => {
if (res.data.code == 0) {
let shuliang = res.data.data.list.length;
if (shuliang == 1 || shuliang == 0) {
this.camlength = "1x1"
} else if (shuliang > 1 && shuliang <= 4) {
this.camlength = "2x2"
} else if (shuliang > 4 && shuliang <= 9) {
this.camlength = "3x3"
} else if (shuliang > 9 && shuliang <= 16) {
this.camlength = "4x4"
} else if (shuliang > 16 && shuliang <= 25) {
this.camlength = "5x5"
}
//
oWebControl.JS_RequestInterface({
funcName: "setLayout",
argument: {layout: this.camlength}
}).then(() => {
//
if (res.data.data.list.length > 0) {
this.$message.success('获取成功 监控点数量为' + res.data.data.list.length)
res.data.data.list.forEach((item, index) => {
oWebControl.JS_RequestInterface({
funcName: "startPreview",
argument: JSON.stringify({
cameraIndexCode: item.cameraIndexCode, //
streamMode: 0, //
transMode: 1, //
gpuMode: 0, //GPU
wndId: index + 1 //
})
})
})
} else {
this.$message.warning('当前区域无直属监控点区域')
//
let result = JSON.stringify({
"funcName": "stopAllPreview"
}, null, 2)
this.requestInterface(result);
}
})
} else {
this.$message.error('获取失败')
}
})
},
// $('.map').width(), $('.map').height() - 60)
// //
initPlugin() { initPlugin() {
let that = this; // eslint-disable-next-line no-undef
this.oWebControl = null; oWebControl = new WebControl({
that.oWebControl = new WebControl({
szPluginContainer: "playWnd", // id szPluginContainer: "playWnd", // id
iServicePortStart: 15900, // 使 iServicePortStart: 15900, // 使
iServicePortEnd: 15909, iServicePortEnd: 15909,
szClassId: "23BF3B0A-2C56-4D97-9C03-0CB103AA8F11", // IE10使ActiveXclsid szClassId: "23BF3B0A-2C56-4D97-9C03-0CB103AA8F11", // IE10使ActiveXclsid
cbConnectSuccess: () => { cbConnectSuccess: () => { // WebControl
// WebControl oWebControl.JS_StartService("window", { // WebControl
that.oWebControl dllPath: "./VideoPluginConnect.dll" // "./VideoPluginConnect.dll"
.JS_StartService("window", { }).then(() => { //
// WebControl oWebControl.JS_SetWindowControlCallback({ //
// "./VideoPluginConnect.dll" cbIntegrationCallBack: this.cbIntegrationCallBack
dllPath: "./VideoPluginConnect.dll",
})
.then(
function () {
//
that.oWebControl.JS_SetWindowControlCallback({
cbIntegrationCallBack: that.cbIntegrationCallBack,
}); });
//JS_CreateWnd oWebControl.JS_CreateWnd("playWnd", $('.map').width(), $('.map').height() - 60).then(() => { //JS_CreateWnd
that.oWebControl this.init(); //
.JS_CreateWnd("playWnd", 2040, 945, { bEmbed: true }) });
//2040,945 }, () => { //
.then(function () {
//
that.init();
}); });
}, },
function () { cbConnectError: () => { // WebControl
// oWebControl = null;
} // $("#playWnd").html("...");
); this.lodingshow = true;
}, // eslint-disable-next-line no-undef
// WebControl WebControl.JS_WakeUp("VideoWebPlugin://"); // errorwakeup
cbConnectError: function () { initCount++;
that.oWebControl = null; if (initCount < 3) {
// alert('...') setTimeout(() => {
// that.$message.warning("..."); this.initPlugin();
// errorwakeup }, 3000)
window.WebControl.JS_WakeUp("VideoWebPlugin://");
that.initCount++;
if (that.initCount < 3) {
setTimeout(function () {
that.initPlugin();
}, 3000);
} else { } else {
// that.messageBox = true this.lodingshow = false;
// alert('') this.lodingres = true;
// that.downloadHikVideo() // $("#playWnd").html("");
// setTimeout(function () {
// that.messageBox = false
// }, 5000)
// setTimeout(function () {
// alert('')
// that.$message({
// message: ' \n https://www.baidu.com',
// type: 'warning'
// });
// }, 5000)
} }
}, },
cbConnectClose: () => { cbConnectClose: () => {
// bNormalClose = false // bNormalClose = false
// JS_DisconnectbNormalClose = true // JS_DisconnectbNormalClose = true
// console.log("cbConnectClose"); oWebControl = null;
that.oWebControl = null; }
},
}); });
}, },
// //
init(callback) { init() {
let that = this; //
that.getPubKey(() => { this.getPubKey(() => {
let appkey = that.objData.appkey; //appkey ////////////////////////////////// ////////////////////////////////////
let secret = that.setEncrypt(that.objData.secret); //secret let appkey = admin; //appkey
let ip = that.objData.ip; //IP //
let playMode = that.objData.playMode; //0-1- let secret = "mygymygy."; //secret
let port = that.objData.port; //HTTPS443 let ip = "192.168.2.107"; //IP
let port = "443"; //HTTPS443
let playMode = 0; //0-1-
let snapDir = "D:\\SnapDir"; // let snapDir = "D:\\SnapDir"; //
let videoDir = "D:\\VideoDir"; // let videoDir = "D:\\VideoDir"; //
let layout = that.objData.layout; //playMode let layout = "1x1"; //playMode
let enableHTTPS = 1; //HTTPS1 let enableHTTPS = 1; //HTTPS1
let encryptedFields = "secret"; //secret let encryptedFields = 'secret'; //secret
let showToolbar = 1; //0-0- let showToolbar = 1; //0-0-
let showSmart = 1; //线0-0- let showSmart = 1; //线0-0-
let buttonIDs = let buttonIDs = "0,16,256,257,258,259,260,512,513,514,515,516,768,769"; //
"0,16,256,257,258,259,260,512,513,514,515,516,517,768,769"; // let toolBarButtonIDs = "2048,2304,2305,2306,2307,2308,2309,4096,4097,4098,4099,4608,4609"
// var toolBarButtonIDs = "2049,2304" // ////////////////////////////////// ////////////////////////////////////
that.oWebControl oWebControl.JS_RequestInterface({
.JS_RequestInterface({
funcName: "init", funcName: "init",
argument: JSON.stringify({ argument: JSON.stringify({
appkey: appkey, //APIappkey appkey: appkey, //APIappkey
@ -186,77 +197,123 @@ export default {
encryptedFields: encryptedFields, // encryptedFields: encryptedFields, //
showToolbar: showToolbar, // showToolbar: showToolbar, //
showSmart: showSmart, // showSmart: showSmart, //
buttonIDs, // buttonIDs: buttonIDs, //
}), toolBarButtonIDs:toolBarButtonIDs //
}) })
.then(function (oData) { }).then(() => {
that.oWebControl.JS_Resize(that.playWndWidth, that.playWndHeight); // resizefirefoxDIV oWebControl.JS_Resize( $('.map').width(), $('.map').height() - 60); // resizefirefoxDIV
if (callback) { //
callback(); this.refusePlay();
}
//
// that.oWebControl.JS_HideWnd()
}); });
}); });
}, },
// //
getPubKey(callback) { getPubKey(callback) {
let that = this; oWebControl.JS_RequestInterface({
this.oWebControl
.JS_RequestInterface({
funcName: "getRSAPubKey", funcName: "getRSAPubKey",
argument: JSON.stringify({ argument: JSON.stringify({
keyLength: 1024, keyLength: 1024
}),
}) })
.then(function (oData) { }).then((oData) => {
console.log(oData);
if (oData.responseMsg.data) { if (oData.responseMsg.data) {
that.pubKey = oData.responseMsg.data; pubKey = oData.responseMsg.data;
callback(); callback()
} }
}); })
}, },
//RSA //RSA
setEncrypt(value) { setEncrypt(value) {
let that = this; // eslint-disable-next-line no-undef
let encrypt = new window.JSEncrypt(); let encrypt = new JSEncrypt();
encrypt.setPublicKey(that.pubKey); encrypt.setPublicKey(pubKey);
return encrypt.encrypt(value); return encrypt.encrypt(value);
}, },
//
//
cbIntegrationCallBack(oData) { cbIntegrationCallBack(oData) {
let { responseMsg: type } = oData; // if (oData.responseMsg.msg.cameraIndexCode != '') {
if (type === "error") { // this.$router.push({name: 'playbackDetails', params: {id: oData.responseMsg.msg.cameraIndexCode}})
} else { // }
this.showCBInfo(JSON.stringify(oData.responseMsg));
},
// JS_CuttingPartWindow
setWndCover() {
let iWidth = $('.map').width();
let iHeight = $('.map').height() - 60;
let oDivRect = $("#playWnd").get(0).getBoundingClientRect();
let iCoverLeft = (oDivRect.left < 0) ? Math.abs(oDivRect.left) : 0;
let iCoverTop = (oDivRect.top < 0) ? Math.abs(oDivRect.top) : 0;
let iCoverRight = (oDivRect.right - iWidth > 0) ? Math.round(oDivRect.right - iWidth) : 0;
let iCoverBottom = (oDivRect.bottom - iHeight > 0) ? Math.round(oDivRect.bottom - iHeight) : 0;
iCoverLeft = (iCoverLeft > 1200) ? 1200 : iCoverLeft;
iCoverTop = (iCoverTop > 600) ? 600 : iCoverTop;
iCoverRight = (iCoverRight > 1200) ? 1200 : iCoverRight;
iCoverBottom = (iCoverBottom > 600) ? 600 : iCoverBottom;
oWebControl.JS_RepairPartWindow(0, 0, $('.map').width(), $('.map').height() - 60); // 1
if (iCoverLeft != 0) {
oWebControl.JS_CuttingPartWindow(0, 0, iCoverLeft, 600);
}
if (iCoverTop != 0) {
oWebControl.JS_CuttingPartWindow(0, 0, $('.map').width(), iCoverTop); //
}
if (iCoverRight != 0) {
oWebControl.JS_CuttingPartWindow($('.map').width() - iCoverRight, 0, iCoverRight, 600);
}
if (iCoverBottom != 0) {
oWebControl.JS_CuttingPartWindow(0, 600 - iCoverBottom, $('.map').width(), iCoverBottom);
} }
}, },
//
previewVideo(data) {
let that = this;
let cameraIndexCode = data; //
let streamMode = 0; // 0-1-
let transMode = 0; // 0-UDP1-TCP
let gpuMode = 0; // GPU0-1-
let wndId = -1; // 2x2
// console.log(cameraIndexCode, "-------cameraIndexCode-");
that.oWebControl.JS_RequestInterface({ //
funcName: "startPreview", // valueJS_RequestInterfacejsonargumentargument
argument: JSON.stringify({ requestInterface(value) {
cameraIndexCode: cameraIndexCode.trim(), // this.isJSON(value);
streamMode: streamMode, // let JsonParam = JSON.parse(value);
transMode: transMode, // let JsonArgument = JsonParam.argument;
gpuMode: gpuMode, // GPU JsonParam.argument = JSON.stringify(JsonArgument);
wndId: wndId, //
}), oWebControl.JS_RequestInterface(JsonParam).then((oData) => {
this.showCBInfo(JSON.stringify(oData ? oData.responseMsg : ''));
}); });
}, },
//
stopAllPreview() { //
this.oWebControl.JS_RequestInterface({ showCBInfo(szInfo, type) {
funcName: "stopAllPreview", if (type === 'error') {
}); szInfo = "<div style='color: red;'>" + this.dateFormat(new Date(), "yyyy-MM-dd hh:mm:ss") + " " + szInfo + "</div>";
} else {
szInfo = "<div>" + this.dateFormat(new Date(), "yyyy-MM-dd hh:mm:ss") + " " + szInfo + "</div>";
}
$("#cbInfo").html(szInfo + $("#cbInfo").html());
}, },
// json
isJSON(str) {
if (typeof str == 'string') {
try {
let obj = JSON.parse(str);
if (typeof obj == 'object' && obj) {
return true;
} else {
this.showCBInfo("param is not the correct JSON message");
return false;
}
} catch (e) {
this.showCBInfo("param is not the correct JSON message");
return false;
}
}
},
// //
dateFormat(oDate, fmt) { dateFormat(oDate, fmt) {
let o = { let o = {
@ -266,78 +323,29 @@ export default {
"m+": oDate.getMinutes(), // "m+": oDate.getMinutes(), //
"s+": oDate.getSeconds(), // "s+": oDate.getSeconds(), //
"q+": Math.floor((oDate.getMonth() + 3) / 3), // "q+": Math.floor((oDate.getMonth() + 3) / 3), //
S: oDate.getMilliseconds(), // "S": oDate.getMilliseconds()//
}; };
if (/(y+)/.test(fmt)) { if (/(y+)/.test(fmt)) {
fmt = fmt.replace( fmt = fmt.replace(RegExp.$1, (oDate.getFullYear() + "").substr(4 - RegExp.$1.length));
RegExp.$1,
(oDate.getFullYear() + "").substr(4 - RegExp.$1.length)
);
} }
for (let k in o) { for (let k in o) {
if (new RegExp("(" + k + ")").test(fmt)) { if (new RegExp("(" + k + ")").test(fmt)) {
fmt = fmt.replace( fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
RegExp.$1,
RegExp.$1.length == 1
? o[k]
: ("00" + o[k]).substr(("" + o[k]).length)
);
} }
} }
return fmt; return fmt;
}, },
//
// JS_CuttingPartWindow downloadFile() {
setWndCover() { var a = document.createElement('a')
var iWidth = $(window).width(); // var blob = new Blob([content])
var iHeight = $(window).height(); // var url = window.URL.createObjectURL(blob)
var oDivRect = $("#playWnd").get(0).getBoundingClientRect(); a.href = '控件下载地址'
a.download = '视频插件'
var iCoverLeft = oDivRect.left < 0 ? Math.abs(oDivRect.left) : 0; a.click()
var iCoverTop = oDivRect.top < 0 ? Math.abs(oDivRect.top) : 0; // window.URL.revokeObjectURL(url)
var iCoverRight =
oDivRect.right - iWidth > 0 ? Math.round(oDivRect.right - iWidth) : 0;
var iCoverBottom =
oDivRect.bottom - iHeight > 0
? Math.round(oDivRect.bottom - iHeight)
: 0;
iCoverLeft = iCoverLeft > 2041 ? 2041 : iCoverLeft;
iCoverTop = iCoverTop > 945 ? 945 : iCoverTop;
iCoverRight = iCoverRight > 2041 ? 2041 : iCoverRight;
iCoverBottom = iCoverBottom > 945 ? 945 : iCoverBottom;
this.oWebControl.JS_RepairPartWindow(0, 0, 2041, 946); // 1
if (iCoverLeft != 0) {
this.oWebControl.JS_CuttingPartWindow(0, 0, iCoverLeft, 946);
}
if (iCoverTop != 0) {
this.oWebControl.JS_CuttingPartWindow(0, 0, 2041, iCoverTop); //
}
if (iCoverRight != 0) {
this.oWebControl.JS_CuttingPartWindow(
2041 - iCoverRight,
0,
iCoverRight,
946
);
}
if (iCoverBottom != 0) {
this.oWebControl.JS_CuttingPartWindow(
0,
946 - iCoverBottom,
2041,
iCoverBottom
);
}
},
}, },
}
}; };
</script> </script>
<style lang="scss" scoped>
.videoMain {
width: 100%;
height: 100%;
}
</style>

View File

@ -146,11 +146,7 @@
<defective :message="this.defectiveData" /> <defective :message="this.defectiveData" />
</div> </div>
<div style="width: 30%; margin-top: 50px"> <div style="width: 30%; margin-top: 50px">
<hkVideo <hkVideo :monitoringNumber="cameraIndexCode"></hkVideo>
:cameraIndexCode="cameraIndexCode"
:objData="objData"
ref="hikVideo"
></hkVideo>
</div> </div>
</div> </div>
<div style="height: 50%; display: flex"> <div style="height: 50%; display: flex">
@ -251,6 +247,7 @@
</template> </template>
<script> <script>
import axios from "axios";
import { listWorkorder } from "@/api/mes/pro/workorder"; import { listWorkorder } from "@/api/mes/pro/workorder";
// import * as statisServer from "@/api/statistics"; // import * as statisServer from "@/api/statistics";
@ -265,7 +262,7 @@ export default {
components: { defective, complete, ticket, hkVideo }, components: { defective, complete, ticket, hkVideo },
data() { data() {
return { return {
cameraIndexCode: "", //wed cameraIndexCode: "1a033f81-a404-4a66-aabf-cb0ead6cc2be", //wed
//wed //wed
objData: { objData: {
appkey: "", //appkey appkey: "", //appkey
@ -366,6 +363,28 @@ export default {
}, },
getList() { getList() {
var params = {
pageNo: 1,
pageSize: 9999,
};
axios({
url: "https://190.168.2.104:8077/artemis/api/resource/v1/cameras",
method: "post",
data: params, //data;
headers: {
//
"Content-Type": "application/json",
},
})
.then((res) => {
console.log(res);
})
.catch((error) => {
if (error) {
throw error;
}
});
// listWorkorder(this.queryParams).then((response) => { // listWorkorder(this.queryParams).then((response) => {
// this.workorderList = response.data; // this.workorderList = response.data;
// }); // });

View File

@ -666,7 +666,8 @@ export default {
handleproductione(row) { handleproductione(row) {
const routeId = row.workorderId || this.ids; const routeId = row.workorderId || this.ids;
axios axios
.get("http://192.168.3.53:8077/manage/task/execute?ids=" + routeId) .get("http://192.168.2.104:8077/manage/task/execute?ids=" + routeId)
// .get("http://192.168.3.53:8077/manage/task/execute?ids=" + routeId)
// .get("http://127.0.0.1:8077/manage/task/execute?ids=" + routeId) // .get("http://127.0.0.1:8077/manage/task/execute?ids=" + routeId)
.then((res) => { .then((res) => {
if (res.data.code === 200) { if (res.data.code === 200) {
@ -682,7 +683,8 @@ export default {
Pendingproduction(row) { Pendingproduction(row) {
const routeId = row.workorderId || this.ids; const routeId = row.workorderId || this.ids;
axios axios
.get("http://192.168.3.53:8077/manage/task/suspension?id=" + routeId) .get("http://192.168.2.104:8077/manage/task/suspension?id=" + routeId)
// .get("http://192.168.3.53:8077/manage/task/suspension?id=" + routeId)
// .get("http://127.0.0.1:8077/manage/task/suspension?id=" + routeId) // .get("http://127.0.0.1:8077/manage/task/suspension?id=" + routeId)
.then((res) => { .then((res) => {
if (res.data.code === 200) { if (res.data.code === 200) {

View File

@ -434,6 +434,7 @@
</template> </template>
<script> <script>
import axios from "axios";
import { import {
listItemrecpt, listItemrecpt,
getItemrecpt, getItemrecpt,
@ -441,7 +442,6 @@ import {
addItemrecpt, addItemrecpt,
updateItemrecpt, updateItemrecpt,
confirmItemrecpt, confirmItemrecpt,
storage,
} from "@/api/mes/wm/itemrecpt"; } from "@/api/mes/wm/itemrecpt";
import { listItemrecptline } from "@/api/mes/wm/itemrecptline"; import { listItemrecptline } from "@/api/mes/wm/itemrecptline";
import { listMdItem } from "@/api/mes/md/pallet"; import { listMdItem } from "@/api/mes/md/pallet";
@ -693,8 +693,12 @@ export default {
listItemrecptline({ recptId: row.recptId }).then((response) => { listItemrecptline({ recptId: row.recptId }).then((response) => {
this.itemrecptlineList = response.rows; this.itemrecptlineList = response.rows;
}); });
var queryParams = {
pageNum: 1,
pageSize: 10000,
};
// //
listMdItem(this.queryParams).then((response) => { listMdItem(queryParams).then((response) => {
this.itemList = response.rows; this.itemList = response.rows;
}); });
}, },
@ -707,7 +711,6 @@ export default {
} }
this.perform.itemCode = data.itemCode; this.perform.itemCode = data.itemCode;
this.perform.lineId = data.lineId; this.perform.lineId = data.lineId;
this.perform.itemId = data.itemId;
}, },
selectTray(data) { selectTray(data) {
this.perform.palletId = data.proPalletId; this.perform.palletId = data.proPalletId;
@ -715,11 +718,19 @@ export default {
}, },
submitFileForm() { submitFileForm() {
if (this.remainingquantity != 0) { if (this.remainingquantity != 0) {
storage(this.perform).then((response) => { axios
.get("http://192.168.2.104:8077/manage/matter/storageItem", {
params: this.perform,
})
.then((res) => {
if (res.data.code === 200) {
this.$modal.msgSuccess("入库成功"); this.$modal.msgSuccess("入库成功");
this.warehousing = false; this.warehousing = false;
this.getList(); this.getList();
this.selectEncoding(); this.selectEncoding();
} else {
this.$message.error(res.data.msg);
}
}); });
} else { } else {
this.$message({ this.$message({

View File

@ -35,14 +35,16 @@ module.exports = {
proxy: { proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy // detail: https://cli.vuejs.org/config/#devserver-proxy
"/prod-api": { "/prod-api": {
target: `http://192.168.3.53:8063`, target: `http://192.168.2.104:8063`,
// target: `http://192.168.3.53:8063`,
changeOrigin: true, changeOrigin: true,
// pathRewrite: { // pathRewrite: {
// ['^' + process.env.VUE_APP_BASE_API]: '' // ['^' + process.env.VUE_APP_BASE_API]: ''
// } // }
}, },
"/ureport": { "/ureport": {
target: `http://192.168.3.53:8063`, target: `http://192.168.2.104:8063`,
// target: `http://192.168.3.53:8063`,
ws: false, ws: false,
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {