From c619aad083ed22c4f591e7d84f6eb5cd0e227b40 Mon Sep 17 00:00:00 2001 From: qinxianzhangyao <11053546+qinxianzhangyao@user.noreply.gitee.com> Date: 星期五, 22 十二月 2023 15:43:39 +0800 Subject: [PATCH] qxtj --- src/views/system/tijian/index.vue | 202 ++++++++++++++++++++++++++++---------------------- 1 files changed, 112 insertions(+), 90 deletions(-) diff --git a/src/views/system/tijian/index.vue b/src/views/system/tijian/index.vue index ce4ede2..95a16bd 100644 --- a/src/views/system/tijian/index.vue +++ b/src/views/system/tijian/index.vue @@ -653,6 +653,7 @@ <el-button type="primary" @click="copes">纭� 瀹�</el-button> </span> </el-dialog> + <Packages ref="aaa" @add="handleChanges" /> </div> </template> @@ -677,9 +678,10 @@ getTransitionList, getByTeamNo, getLoadFile, - getIsRequired, + getIsRequired, getconfigKey, getHistryTjOrderProByCusIdCard, } from "@/api/system/tijian"; +import Packages from "@/components/Packages"; import { MessageBox } from "element-ui"; import VTreeTransfer from "./TreeTransfer.vue"; import historyTj from "@/components/historyTj/index"; @@ -701,6 +703,7 @@ components: { VTreeTransfer, historyTj, + Packages }, data() { return { @@ -1439,104 +1442,123 @@ // this.$message.error("姝ょ敤鎴蜂笉瀛樺湪"); // }); } else { - var websocket = null; - var url = this.valueUrl; - if ("WebSocket" in window) { - websocket = new WebSocket(url); - } else if ("MozWebSocket" in window) { - websocket = new MozWebSocket(url); - } else { - // console.log("SockJS"); - } - - if (websocket == null) { - alert("鍒涘缓WebSocket瀵硅薄澶辫触"); - } - - //杩炴帴鍙戠敓閿欒鐨勫洖璋冩柟娉� - websocket.onerror = function () { - alert("璇锋鏌ヨ鍗″櫒杩炴帴鏄惁姝e父"); - }; - - //杩炴帴鎴愬姛寤虹珛鐨勫洖璋冩柟娉� - websocket.onopen = function () { - this.websocket = websocket; - // 杩炴帴璁惧 - var jsonObj = { - name: "connect", - }; - var jStr = JSON.stringify(jsonObj); - this.websocket.send(jStr); - alert("璇锋斁韬唤璇佸啀鐐圭‘璁�"); - var jsonObj = { - name: "readCert", - }; - var jStr = JSON.stringify(jsonObj); - this.websocket.send(jStr); - this.dialogVisible = false; - }; - - //鎺ユ敹鍒版秷鎭殑鍥炶皟鏂规硶 - websocket.onmessage = function (event) { - var resultObj = eval("(" + event.data + ")"); - //resultFlag涓�0浠h〃璇诲崱鎴愬姛 - if ( - resultObj.name == "readCard" || - resultObj.name == "readCert" || - resultObj.name == "PushWithImg" || - resultObj.name == "PushWithOutImg" - ) { - if (resultObj.resultFlag == "0") { - //鍥炴樉鐩稿叧鏁版嵁 - _this.form.cusName = resultObj.resultContent.partyName; - _this.form.cusSex = - resultObj.resultContent.gender == "0" ? "濂�" : "鐢�"; - _this.form.cusNational = resultObj.resultContent.nation; - _this.form.cusBrithday = resultObj.resultContent.bornDay; - if (_this.form.cusBrithday) { - _this.form.cusBrithday = _this.form.cusBrithday.replace( - /^(\d{4})(\d{2})(\d{2})$/, - "$1-$2-$3" - ); - } - _this.form.cusAddr = resultObj.resultContent.certAddress; - _this.form.cusIdcard = resultObj.resultContent.certNumber; - _this.imageUrl = - "data:image/jpeg;base64," + resultObj.resultContent.identityPic; - if ( - resultObj.name == "readCert" || - resultObj.name == "PushWithImg" - ) { - this.imageUrl = - "data:image/jpeg;base64," + - resultObj.resultContent.identityPrintPic; - } - } else if (resultObj.resultFlag == "-1") { - if (resultObj.errorMsg == "绔彛鎵撳紑澶辫触") { - //alert("璇诲崱鍣ㄦ湭杩炴帴"); + let configKey = "getInfoFromSqlData" + getconfigKey(configKey).then(res => { + if (res.code == 200) { + if (res.msg == "N") { + var websocket = null; + var url = this.valueUrl; + if ("WebSocket" in window) { + websocket = new WebSocket(url); + } else if ("MozWebSocket" in window) { + websocket = new MozWebSocket(url); } else { - //alert(resultObj.errorMsg); + // console.log("SockJS"); } - } else if (resultObj.resultFlag == "-2") { - //alert(resultObj.errorMsg); - } - } else if (resultObj.name == "getStatus") { - if (resultObj.resultFlag == "0") { - if (resultObj.status == "0") { - } else { - alert("璁惧杩炴帴宸叉柇寮�锛岃妫�鏌ヨ鍗″櫒杩炴帴"); + + if (websocket == null) { + alert("鍒涘缓WebSocket瀵硅薄澶辫触"); } + + //杩炴帴鍙戠敓閿欒鐨勫洖璋冩柟娉� + websocket.onerror = function () { + alert("璇锋鏌ヨ鍗″櫒杩炴帴鏄惁姝e父"); + }; + + //杩炴帴鎴愬姛寤虹珛鐨勫洖璋冩柟娉� + websocket.onopen = function () { + this.websocket = websocket; + // 杩炴帴璁惧 + var jsonObj = { + name: "connect", + }; + var jStr = JSON.stringify(jsonObj); + this.websocket.send(jStr); + alert("璇锋斁韬唤璇佸啀鐐圭‘璁�"); + var jsonObj = { + name: "readCert", + }; + var jStr = JSON.stringify(jsonObj); + this.websocket.send(jStr); + this.dialogVisible = false; + }; + + //鎺ユ敹鍒版秷鎭殑鍥炶皟鏂规硶 + websocket.onmessage = function (event) { + var resultObj = eval("(" + event.data + ")"); + //resultFlag涓�0浠h〃璇诲崱鎴愬姛 + if ( + resultObj.name == "readCard" || + resultObj.name == "readCert" || + resultObj.name == "PushWithImg" || + resultObj.name == "PushWithOutImg" + ) { + if (resultObj.resultFlag == "0") { + //鍥炴樉鐩稿叧鏁版嵁 + _this.form.cusName = resultObj.resultContent.partyName; + _this.form.cusSex = + resultObj.resultContent.gender == "0" ? "濂�" : "鐢�"; + _this.form.cusNational = resultObj.resultContent.nation; + _this.form.cusBrithday = resultObj.resultContent.bornDay; + if (_this.form.cusBrithday) { + _this.form.cusBrithday = _this.form.cusBrithday.replace( + /^(\d{4})(\d{2})(\d{2})$/, + "$1-$2-$3" + ); + } + _this.form.cusAddr = resultObj.resultContent.certAddress; + _this.form.cusIdcard = resultObj.resultContent.certNumber; + _this.imageUrl = + "data:image/jpeg;base64," + resultObj.resultContent.identityPic; + if ( + resultObj.name == "readCert" || + resultObj.name == "PushWithImg" + ) { + this.imageUrl = + "data:image/jpeg;base64," + + resultObj.resultContent.identityPrintPic; + } + } else if (resultObj.resultFlag == "-1") { + if (resultObj.errorMsg == "绔彛鎵撳紑澶辫触") { + //alert("璇诲崱鍣ㄦ湭杩炴帴"); + } else { + //alert(resultObj.errorMsg); + } + } else if (resultObj.resultFlag == "-2") { + //alert(resultObj.errorMsg); + } + } else if (resultObj.name == "getStatus") { + if (resultObj.resultFlag == "0") { + if (resultObj.status == "0") { + } else { + alert("璁惧杩炴帴宸叉柇寮�锛岃妫�鏌ヨ鍗″櫒杩炴帴"); + } + } + } + }; + + //杩炴帴鍏抽棴鐨勫洖璋冩柟娉� + websocket.onclose = function () { + alert("璇诲崱鍣ㄨ繛鎺ュ叧闂�"); + }; + } else if (res.msg == "Y"){ + this.$refs.aaa.open = true; + this.$refs.aaa.getAllList(); + this.$refs.aaa.title = "璇佷欢瀛楀吀"; } } - }; + }) - //杩炴帴鍏抽棴鐨勫洖璋冩柟娉� - websocket.onclose = function () { - alert("璇诲崱鍣ㄨ繛鎺ュ叧闂�"); - }; } }, + handleChanges(param1) { + this.form.cusIdcard = param1[0].pacCode; + // this.form.cusName = param1[0].pacName; + // this.form.cusPhone = param1[0].pacRemark; + + }, + // selected(row, index) { // if (this.formPacId !== null) { // if (row.pacId == this.formPacId) { -- Gitblit v1.8.0