| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <el-form-item label="文化程度" prop="wenHua" style="display: flex"> |
| | | <el-input style="width: 100%" :disabled="isDisabled" v-model="form.wenHua" placeholder="请输入文化程度" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <el-button v-show="lishi" type="primary" @click="cope" size="mini">一键复制</el-button> |
| | | <el-button type="primary" @click="inputChanges" v-show="lishi" size="mini" |
| | | :disabled="confirm">历史体检记录</el-button> |
| | |
| | | <el-button type="primary" @click="copes">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <Packages ref="aaa" @add="handleChanges" /> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | 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"; |
| | |
| | | components: { |
| | | VTreeTransfer, |
| | | historyTj, |
| | | Packages |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | address: [{ required: true, message: "", trigger: "blur" }], |
| | | phone: [{ required: true, message: "", trigger: "blur" }], |
| | | cusPhone: [ |
| | | { required: true, message: "", trigger: "change" }, |
| | | ], |
| | | cusBrithday: [ |
| | | { required: true, message: "", trigger: "change" }, |
| | | ], |
| | | // cusNational: [ |
| | |
| | | |
| | | /** 查询信息列表 */ |
| | | getList() { |
| | | this.loading = true; |
| | | // listCustomer(this.queryParams).then((response) => { |
| | | // this.customerList = response.rows; |
| | | // this.total = response.total; |
| | |
| | | // 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("请检查读卡器连接是否正常"); |
| | | }; |
| | | |
| | | //连接成功建立的回调方法 |
| | | 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代表读卡成功 |
| | | 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("请检查读卡器连接是否正常"); |
| | | }; |
| | | |
| | | //连接成功建立的回调方法 |
| | | 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代表读卡成功 |
| | | 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) { |
| | | if(this.form.pacCode == "不详"){ |
| | | this.form.cusIdcard = param1[0].xh; |
| | | }else{ |
| | | this.form.cusIdcard = param1[0].pacCode; |
| | | } |
| | | |
| | | // this.form.cusName = param1[0].pacName; |
| | | // this.form.cusPhone = param1[0].pacRemark; |
| | | |
| | | }, |
| | | |
| | | // selected(row, index) { |
| | |
| | | let cusSex = this.form.cusSex; |
| | | this.datekey = Date.now(); |
| | | //全部套餐 |
| | | this.loading = true; |
| | | deptTreeSelect(cusSex).then((response) => { |
| | | this.newpacName = response.rows; |
| | | console.log(this.newpacName) |
| | |
| | | tjFlowingWater: this.tjFlowingWater, |
| | | userId, |
| | | tjType, |
| | | tjCategory:this.tjCategory |
| | | }; |
| | | } else { |
| | | data = { |
| | |
| | | tjFlowingWater: this.tjFlowingWater, |
| | | userId, |
| | | tjType, |
| | | tjCategory:this.tjCategory |
| | | }; |
| | | } |
| | | getOrder(data).then((res) => { |
| | |
| | | |
| | | |
| | | <style > |
| | | .el-form-item__error { |
| | | display: none; |
| | | } |
| | | .el-table__header-wrapper .el-checkbox { |
| | | display: none; |
| | | } |