| | |
| | | v-for="(item, index) in tableData1" |
| | | :key="'info1-' + index" |
| | | > |
| | | |
| | | <el-collapse-item :name="index"> |
| | | <template slot="title"> |
| | | <div style="width: 70%"> |
| | |
| | | style="width: 100%" |
| | | height="270" |
| | | > |
| | | <el-table-column prop="proName" label="项目" width="180"> |
| | | <el-table-column prop="s" label="项目" width="180"> |
| | | </el-table-column> |
| | | <el-table-column prop="proType" label="性别" width="180"> |
| | | <template |
| | |
| | | pacName: null, |
| | | pacRemark: null, |
| | | }, |
| | | valueUrl: "ws://127.0.0.1:18890", |
| | | // valueUrl: "ws://127.0.0.1:18890", |
| | | // valueUrl: "ws://192.168.1.3:6789/websocket", |
| | | valueUrl: "ws://127.0.0.1:6789/websocket", |
| | | valueUrls: "ws://127.0.0.1:6789/websocket", |
| | | // valueUrls: "ws://"+getIp() +":6789/websocket", |
| | | WebSocket: null, |
| | | webSocket: null, |
| | | // 身份证需要 |
| | | // socket: null, |
| | | // value: 1, |
| | |
| | | |
| | | // 表单参数 |
| | | // 表单参数 |
| | | obj: {}, |
| | | form: { |
| | | cusIdcard: "", |
| | | tjType: "3", |
| | | cusSex: 1, |
| | | cusNational: "1", |
| | | cusMarryStatus: "1", |
| | | cusMarryStatus: "5", |
| | | idType: "1", |
| | | ageUnit: "0", |
| | | }, |
| | |
| | | this.startTimer(); |
| | | this.getList1(); |
| | | // this.getData(); |
| | | }, |
| | | mounted() { |
| | | console.log(this.dict.type.dict_user_marry, 555); |
| | | console.log(this.dict.type.dict_user_national, 666); |
| | | |
| | | |
| | | }, |
| | | |
| | | methods: { |
| | |
| | | if (this.form.tjType === null) { |
| | | this.form.tjType = "3"; |
| | | } |
| | | if (this.form.cusMarryStatus === "null") { |
| | | this.form.cusMarryStatus = "5"; |
| | | } |
| | | if (this.form.cusNational === "null") { |
| | | this.form.cusNational = "1"; |
| | | } |
| | | if (this.form.reservationId != null) { |
| | | if (this.form.groupingId) { |
| | | _this.tcShow = true; |
| | |
| | | } else { |
| | | let configKey = "getInfoFromSqlData"; |
| | | getconfigKey(configKey).then((res) => { |
| | | console.log(res); |
| | | if (res.code == 200) { |
| | | if (res.msg == "N") { |
| | | var websocket = null; |
| | |
| | | this.websocket = websocket; |
| | | // 连接设备 |
| | | var jsonObj = { |
| | | name: "connect", |
| | | // name: "connect", |
| | | type: "1", |
| | | }; |
| | | var jStr = JSON.stringify(jsonObj); |
| | | this.websocket.send(jStr); |
| | | alert("请放身份证再点确认"); |
| | | // alert("请放身份证再点确认"); |
| | | var jsonObj = { |
| | | name: "readCert", |
| | | // name: "readCert", |
| | | }; |
| | | var jStr = JSON.stringify(jsonObj); |
| | | this.websocket.send(jStr); |
| | | // var jStr = JSON.stringify(jsonObj); |
| | | // this.websocket.send(jStr); |
| | | this.dialogVisible = false; |
| | | }; |
| | | |
| | | //接收到消息的回调方法 |
| | | websocket.onmessage = function (event) { |
| | | websocket.onmessage = (event)=> { |
| | | console.log(event, "event"); |
| | | var resultObj = eval("(" + event.data + ")"); |
| | | //resultFlag为0代表读卡成功 |
| | | 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("设备连接已断开,请检查读卡器连接"); |
| | | } |
| | | } |
| | | } |
| | | console.log(resultObj); |
| | | // TODO 以下代码可能是泾川使用的 |
| | | // this.jingChuanHandlerWebSocketResult(resultObj) |
| | | this.readCardWebSocket(resultObj) |
| | | }; |
| | | |
| | | //连接关闭的回调方法 |
| | |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | // 最新使用webSocket通信 |
| | | readCardWebSocket(resultObj){ |
| | | let _this = this; |
| | | if (resultObj.code === 200 && resultObj.data.name != null) { |
| | | console.log('213131'); |
| | | |
| | | //回显相关数据 |
| | | _this.form.cusName = resultObj.data.name; |
| | | _this.form.cusSex = |
| | | resultObj.data.sex == "0" ? "女" : "男"; |
| | | _this.form.cusNational = resultObj.data.mz; |
| | | _this.form.cusBrithday = resultObj.data.csrq; |
| | | if (_this.form.cusBrithday) { |
| | | _this.form.cusBrithday = _this.form.cusBrithday.replace( |
| | | /^(\d{4})(\d{2})(\d{2})$/, |
| | | "$1-$2-$3" |
| | | ); |
| | | } |
| | | _this.form.cusAddr = resultObj.data.addres; |
| | | _this.form.cusIdcard = resultObj.data.card; |
| | | _this.imageUrl = |
| | | "data:image/jpeg;base64," + resultObj.data.img; |
| | | if (resultObj.name == "readCert" || resultObj.name == "PushWithImg") { |
| | | this.imageUrl = |
| | | "data:image/jpeg;base64," + |
| | | resultObj.data.img; |
| | | } |
| | | } else { |
| | | this.$message.warning('请放置身份证后再点击读取') |
| | | }/* if (resultObj.resultFlag == "-1") { |
| | | if (resultObj.errorMsg == "端口打开失败") { |
| | | //alert("读卡器未连接"); |
| | | } else { |
| | | //alert(resultObj.errorMsg); |
| | | } |
| | | } else if (resultObj.resultFlag == "-2") { |
| | | //alert(resultObj.errorMsg); |
| | | } */ |
| | | }, |
| | | // TODO 以下代码可能是泾川使用的 |
| | | jingChuanHandlerWebSocketResult(resultObj) { |
| | | let _this = this; |
| | | 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("设备连接已断开,请检查读卡器连接"); |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | changeradio() { |
| | |
| | | let proId = this.packagedataList[i].proId; |
| | | this.checkedListkey1.push(proId); |
| | | // this.DataLists.push(this.packagedataList[i]); |
| | | getProSonDxList(proId).then((res) => { |
| | | getProSonDxList(proId).then((res) => { |
| | | this.TreedataList = res.data.list; |
| | | console.log(this.TreedataList,888); |
| | | |
| | | console.log(this.TreedataList, 888); |
| | | |
| | | this.TreedataList.forEach((item) => { |
| | | // this.checkedListkey1.push(item.proId); |
| | | |
| | |
| | | this.marryalls = 0; |
| | | this.DataLists.forEach((item1) => { |
| | | this.marryalls += item1.proPrice; |
| | | |
| | | |
| | | this.packagedataList.forEach((item3) => { |
| | | if (item1.proParentId == item3.proId) { |
| | | item1.propinName = item3.proName; |
| | |
| | | } |
| | | this.list1 = false; |
| | | this.list3 = true; |
| | | this.list2 = false; |
| | | console.log(this.list1) |
| | | console.log(this.list3) |
| | | } else { |
| | | this.list1 = true; |
| | | this.TotalPrice = "0.00"; |