From 53b7cfd8589201ec728c68a08b4ea07d94e66258 Mon Sep 17 00:00:00 2001
From: qinxianzhangyao <11053546+qinxianzhangyao@user.noreply.gitee.com>
Date: 星期一, 08 七月 2024 17:16:48 +0800
Subject: [PATCH] qxtj

---
 src/views/system/tijian/index.vue   |  259 +++++++++++++++++++++-------
 src/views/doctor/checkAll/index.vue |  224 +++++++++++++-----------
 src/views/hosp/order/index.vue      |   55 ++++-
 vue.config.js                       |    2 
 4 files changed, 354 insertions(+), 186 deletions(-)

diff --git a/src/views/doctor/checkAll/index.vue b/src/views/doctor/checkAll/index.vue
index bc6558e..878a99e 100644
--- a/src/views/doctor/checkAll/index.vue
+++ b/src/views/doctor/checkAll/index.vue
@@ -243,69 +243,79 @@
       :with-header="false"
       size="80%"
     >
-      <div style="font-size: 14px">
-        <table
-          style="
-            width: 96%;
-            margin: 10px 10px;
-            border: 1px solid #dfe6ec;
-            border-collapse: collapse;
-          "
-          cellspacing="4"
-        >
-          <caption style="background-color: #f8f8f9; font-size: 18px">
-            {{
-              tableAll.cusName
-            }}鐨勪綋妫�璧勬枡
-          </caption>
-          <tr style="border: 1px solid #dfe6ec; border-collapse: collapse">
-            <td style="border: 1px solid #dfe6ec; border-collapse: collapse">
-              濮撳悕锛�
-            </td>
-            <td style="border: 1px solid #dfe6ec; border-collapse: collapse">
-              {{ tableAll.cusName }}
-            </td>
-            <td style="border: 1px solid #dfe6ec; border-collapse: collapse">
-              鎬у埆锛�
-            </td>
-            <td style="border: 1px solid #dfe6ec; border-collapse: collapse">
-              {{
-                tableAll.cusSex == 0
-                  ? "鐢�"
-                  : tableAll.cusSex == 1
-                  ? "濂�"
-                  : "鏈煡"
-              }}
-            </td>
-          </tr>
-          <tr style="border: 1px solid #dfe6ec; border-collapse: collapse">
-            <td style="border: 1px solid #dfe6ec; border-collapse: collapse">
-              浣撴鍗曞彿锛�
-            </td>
-            <td style="border: 1px solid #dfe6ec; border-collapse: collapse">
-              {{ tableAll.tjNumber }}
-            </td>
-            <td style="border: 1px solid #dfe6ec; border-collapse: collapse">
-              浣撴鏃堕棿锛�
-            </td>
-            <td style="border: 1px solid #dfe6ec; border-collapse: collapse">
-              {{ tableAll.tjTime }}
-            </td>
-          </tr>
-        </table>
-      </div>
       <div>
         <el-row>
           <el-col :span="18">
-            <div style="margin: 10px 10px">
-               <!--<el-radio-group
-                v-model="tjproject"
-                @input="radiotjprojectChange"
-                style="margin-left: 20px"
+            <div style="font-size: 14px">
+              <table
+                style="
+                  width: 98%;
+                  margin: 10px 10px;
+                  border: 1px solid #dfe6ec;
+                  border-collapse: collapse;
+                "
+                cellspacing="4"
               >
-                <el-radio-button label="0">浣撴椤圭洰</el-radio-button>
-                <el-radio-button label="1">鍖栭獙椤圭洰</el-radio-button>
-              </el-radio-group> -->
+                <caption style="background-color: #f8f8f9; font-size: 18px">
+                  {{
+                    tableAll.cusName
+                  }}鐨勪綋妫�璧勬枡
+                </caption>
+                <tr
+                  style="border: 1px solid #dfe6ec; border-collapse: collapse;height: 36px;"
+                >
+                  <td
+                    style="border: 1px solid #dfe6ec; border-collapse: collapse"
+                  >
+                    濮撳悕锛�
+                  </td>
+                  <td
+                    style="border: 1px solid #dfe6ec; border-collapse: collapse"
+                  >
+                    {{ tableAll.cusName }}
+                  </td>
+                  <td
+                    style="border: 1px solid #dfe6ec; border-collapse: collapse"
+                  >
+                    鎬у埆锛�
+                  </td>
+                  <td
+                    style="border: 1px solid #dfe6ec; border-collapse: collapse"
+                  >
+                    {{
+                      tableAll.cusSex == 0
+                        ? "鐢�"
+                        : tableAll.cusSex == 1
+                        ? "濂�"
+                        : "鏈煡"
+                    }}
+                  </td>
+                </tr>
+                <tr
+                  style="border: 1px solid #dfe6ec; border-collapse: collapse;height: 36px;"
+                >
+                  <td
+                    style="border: 1px solid #dfe6ec; border-collapse: collapse"
+                  >
+                    浣撴鍗曞彿锛�
+                  </td>
+                  <td
+                    style="border: 1px solid #dfe6ec; border-collapse: collapse"
+                  >
+                    {{ tableAll.tjNumber }}
+                  </td>
+                  <td
+                    style="border: 1px solid #dfe6ec; border-collapse: collapse"
+                  >
+                    浣撴鏃堕棿锛�
+                  </td>
+                  <td
+                    style="border: 1px solid #dfe6ec; border-collapse: collapse"
+                  >
+                    {{ tableAll.tjTime }}
+                  </td>
+                </tr>
+              </table>
             </div>
           </el-col>
           <el-col :span="6">
@@ -348,7 +358,13 @@
               :key="index"
               style="margin-left: 10px"
             >
-              <div style="text-align: center; background-color: #f8f8f9;margin-top: 10px;">
+              <div
+                style="
+                  text-align: center;
+                  background-color: #aad8df;
+                  margin-top: 10px;
+                "
+              >
                 {{ item.parent || "" }}
               </div>
               <el-table
@@ -356,6 +372,7 @@
                 border
                 style="width: 100%"
                 :row-style="changRed"
+                :header-cell-style="{background:'#aad8df'}"
               >
                 <el-table-column align="center" label="妫�娴嬮」鐩�" width="240">
                   <template slot-scope="scope">
@@ -384,16 +401,16 @@
                   <template slot-scope="scope">
                     <div v-if="scope.row.project != null">
                       {{
-                        scope.row.standard.tjStandardGtValue +
-                        "-" +
-                        scope.row.standard.tjStandardLtValue || "/"
+                        scope.row.standard.tjStandardGtValue ||
+                        "/" + "-" + scope.row.standard.tjStandardLtValue ||
+                        "/"
                       }}
                     </div>
-                    <div v-else>{{ scope.row.stanId || "/"}}</div>
+                    <div v-else>{{ scope.row.stanId || "/" }}</div>
                   </template>
                 </el-table-column>
               </el-table>
-              <table style="width: 100%" v-if="tjproject!='1'">
+              <table style="width: 100%" v-if="tjproject != '1'">
                 <tr
                   style="border: 1px solid #dfe6ec; border-collapse: collapse"
                 >
@@ -401,17 +418,17 @@
                     style="
                       border: 1px solid #dfe6ec;
                       border-collapse: collapse;
-                      width: 240px;
+                      width:7%
                     "
+                     
                   >
                     灏忕粨锛�
                   </td>
                   <td
                     style="
-                      border: 1px solid #dfe6ec;
-                      border-collapse: collapse;
-                      width: 180px;
+                      border: 1px solid #dfe6ec;width:45%
                     "
+
                   >
                     <el-input v-model="item.remark" disabled></el-input>
                     <!-- <el-select v-model="item.value" multiple filterable placeholder="璇烽�夋嫨" style="width: 100%" @change="xiAoJieChange($event, item)">
@@ -423,13 +440,13 @@
                     style="
                       border: 1px solid #dfe6ec;
                       border-collapse: collapse;
-                      width: 350px;
+                      width:15%
                     "
                   >
                     涓绘鍖诲笀锛�
                   </td>
                   <td
-                    style="border: 1px solid #dfe6ec; border-collapse: collapse"
+                    style="border: 1px solid #dfe6ec; border-collapse: collapse" colspan="2"
                   >
                     {{ item.doctorName }}
                   </td>
@@ -451,8 +468,8 @@
                     澶囨敞锛�
                   </td>
                   <td
-                    style="border: 1px solid #dfe6ec; border-collapse: collapse;"
-                    colspan="2"
+                    style="border: 1px solid #dfe6ec; border-collapse: collapse"
+                    colspan="3"
                   >
                     <textarea
                       placeholder="璇疯緭鍏ュ唴瀹�"
@@ -468,7 +485,7 @@
               </table>
             </div>
 
-            <div style="margin: 0 0px 10px 15px" v-if="tjproject!='1'">
+            <div style="margin: 0 0px 10px 15px" v-if="tjproject != '1'">
               <el-button type="primary" @click="propoChange"
                 >蹇嵎寤鸿</el-button
               >
@@ -481,7 +498,7 @@
               ref="numberValidateForm"
               label-width="80px"
               class="demo-ruleForm"
-              v-if="tjproject!='1'"
+              v-if="tjproject != '1'"
             >
               <el-form-item label="鎬绘寤鸿">
                 <el-input
@@ -496,7 +513,7 @@
             </el-form>
             <div slot="footer" class="dialog-footers">
               <el-button
-              v-if="tjproject == '0'"
+                v-if="tjproject == '0'"
                 type="primary"
                 size="mini"
                 @click.stop="rowClick"
@@ -1467,14 +1484,14 @@
             }
             this.changedate.forEach((item) => {
               // this.remark = item.remark;
-              item.sons.forEach((item3) => {
-                if (item3.standard.tjStandardGtValue === null) {
-                  item3.standard.tjStandardGtValue = "";
-                }
-                if (item3.standard.tjStandardLtValue === null) {
-                  item3.standard.tjStandardLtValue = "";
-                }
-              });
+              // item.sons.forEach((item3) => {
+              //   if (item3.standard.tjStandardGtValue === null) {
+              //     item3.standard.tjStandardGtValue = "";
+              //   }
+              //   if (item3.standard.tjStandardLtValue === null) {
+              //     item3.standard.tjStandardLtValue = "";
+              //   }
+              // });
               // item.remark = "";
             });
           } else {
@@ -1590,8 +1607,8 @@
       }
     },
 
-    handleCurrentChange(val){
-      this.handleClick(val)
+    handleCurrentChange(val) {
+      this.handleClick(val);
     },
 
     // 鐐瑰嚮璇︽儏
@@ -1632,17 +1649,17 @@
                     for (let i = 0; i < this.changedate.length; i++) {
                       this.remark = this.changedate[i].remark;
                     }
-                    console.log( this.changedate)
+                    console.log(this.changedate);
                     this.changedate.forEach((item) => {
                       // this.remark = item.remark;
-                      item.sons.forEach((item3) => {
-                        if (item3.standard.tjStandardGtValue === null) {
-                          item3.standard.tjStandardGtValue = "";
-                        }
-                        if (item3.standard.tjStandardLtValue === null) {
-                          item3.standard.tjStandardLtValue = "";
-                        }
-                      });
+                      // item.sons.forEach((item3) => {
+                      //   if (item3.standard.tjStandardGtValue === null) {
+                      //     item3.standard.tjStandardGtValue = "";
+                      //   }
+                      //   if (item3.standard.tjStandardLtValue === null) {
+                      //     item3.standard.tjStandardLtValue = "";
+                      //   }
+                      // });
                     });
                   } else {
                     this.$message({
@@ -1686,14 +1703,14 @@
                           this.textarea1 = item.checkAdvice;
 
                           // this.remark = item.remark;
-                          item.sons.forEach((item3) => {
-                            if (item3.standard.tjStandardGtValue === null) {
-                              item3.standard.tjStandardGtValue = "";
-                            }
-                            if (item3.standard.tjStandardLtValue === null) {
-                              item3.standard.tjStandardLtValue = "";
-                            }
-                          });
+                          // item.sons.forEach((item3) => {
+                          //   if (item3.standard.tjStandardGtValue === null) {
+                          //     item3.standard.tjStandardGtValue = "";
+                          //   }
+                          //   if (item3.standard.tjStandardLtValue === null) {
+                          //     item3.standard.tjStandardLtValue = "";
+                          //   }
+                          // });
                           // item.remark = "";
                         });
                       } else {
@@ -1911,6 +1928,7 @@
   border: none;
   outline: none;
 }
+
 </style>
 
   
diff --git a/src/views/hosp/order/index.vue b/src/views/hosp/order/index.vue
index ca262cf..cf5ca05 100644
--- a/src/views/hosp/order/index.vue
+++ b/src/views/hosp/order/index.vue
@@ -802,7 +802,7 @@
     </el-dialog>
 
     <!-- 娣诲姞鎴栦慨鏀逛綋妫�璁板綍瀵硅瘽妗� -->
-    <el-dialog :title="title" :visible.sync="open" width="950px" append-to-body>
+    <el-dialog :title="title" :visible.sync="open" width="950px" append-to-body >
       <el-tabs v-model="activeName1" type="card">
         <!-- <el-tab-pane label="璁㈠崟娴佹按" name="first">
           <el-table :data="numberList" style="width: 100%">
@@ -839,8 +839,8 @@
             </el-table-column>
           </el-table>
         </el-tab-pane> -->
-        <el-tab-pane label="椤圭洰姹囨��" name="second">
-          <el-table :data="huizongList" style="width: 100%" max-height="280">
+        <el-tab-pane label="椤圭洰姹囨��" name="second" style="height: 400px;">
+          <el-table :data="huizongList" style="width: 100%" max-height="200">
             <el-table-column
               align="center"
               prop="newID"
@@ -855,6 +855,7 @@
             <el-table-column align="center" prop="price" label="璐圭敤鍚堣">
             </el-table-column>
           </el-table>
+          <h3>浠樻璇︽儏</h3>
           <el-table :data="bill" style="width: 100%; margin-top: 10px">
             <el-table-column align="center" prop="copeWith" label="搴斾粯">
             </el-table-column>
@@ -864,11 +865,11 @@
             </el-table-column>
           </el-table>
         </el-tab-pane>
-        <el-tab-pane label="鏄庣粏椤圭洰" name="third">
+        <el-tab-pane label="鏄庣粏椤圭洰" name="third" style="height: 350px;">
           <el-table
             :data="infoList"
             style="width: 100%"
-            max-height="300"
+            max-height="330"
             :span-method="objectSpanMethod1"
           >
             <el-table-column
@@ -922,10 +923,17 @@
             <el-table :data="DataLists" border style="width: 100%" height="400"  @selection-change="handleProjectssChange" >
               <el-table-column type="selection" width="40" align="center" />
               <el-table-column
-                prop="id"
+                type="index"
                 label="搴忓彿"
                 align="center"
                 width="49px"
+              >
+              </el-table-column>
+              <el-table-column
+                prop="blje"
+                label="琛ュ綍閲戦"
+                align="center"
+                width="74px"
               >
               </el-table-column>
               <el-table-column
@@ -949,13 +957,7 @@
                 width="96px"
               >
               </el-table-column>
-              <el-table-column
-                prop="blje"
-                label="琛ュ綍閲戦"
-                align="center"
-                width="74px"
-              >
-              </el-table-column>
+             
             </el-table>
           </div>
         </el-col>
@@ -1047,7 +1049,7 @@
       src: "",
       url: "",
       flag: true,
-      bill: null,
+      bill: [],
       Treedata: [],
       DataListss:[],
       checkedkey: [],
@@ -1430,7 +1432,17 @@
       getNumber(tjNumber).then((response) => {
         // this.form = response.data;
         this.numberList = response.data.charging;
-        this.bill = response.data.water;
+        this.bill =[]
+        var copeWith = 0;
+        var paidIn = 0;
+        var discount = ""
+        response.data.water.forEach(item => {
+          copeWith += item.copeWith;
+          paidIn+= item.copeWith;
+          discount= item.discount
+        })
+        this.bill.push({copeWith:copeWith,paidIn:paidIn,discount:discount});
+
         this.title = "璁㈠崟娴佹按";
       });
       getTransitionInfo(tjNumber).then((res) => {
@@ -1457,7 +1469,18 @@
       getNumber(tjNumber).then((response) => {
         // this.form = response.data;
         this.numberList = response.data.charging;
-        this.bill = response.data.water;
+        this.bill =[]
+        var copeWith = 0;
+        var paidIn = 0;
+        var discount = ""
+        response.data.water.forEach(item => {
+          copeWith += item.copeWith;
+          paidIn+= item.copeWith;
+          discount= item.discount
+        })
+        this.bill.push({copeWith:copeWith,paidIn:paidIn,discount:discount});
+
+        console.log(this.bill)
         this.title = "璁㈠崟娴佹按";
       });
       getTransitionInfo(tjNumber).then((res) => {
diff --git a/src/views/system/tijian/index.vue b/src/views/system/tijian/index.vue
index 01a76ae..da8a012 100644
--- a/src/views/system/tijian/index.vue
+++ b/src/views/system/tijian/index.vue
@@ -1320,6 +1320,31 @@
         </el-table>
       </div>
     </el-dialog>
+    <el-dialog
+      title="鎻愮ず"
+      :visible.sync="cardreader"
+      width="30%"
+      :close-on-press-escape="false"
+      :close-on-click-modal="false"
+    >
+      <template>
+        <el-radio-group v-model="cardreaderradio" @input="changeradio">
+          <el-radio :label="3">韬唤璇�</el-radio>
+          <el-radio :label="6">鍋ュ悍鐮�</el-radio>
+        </el-radio-group>
+        <div style="margin-top: 10px" v-show="cardreaderradio == 6">
+          <el-input
+            v-model="inputSSS"
+            ref="tableHeadFilterInp"
+            placeholder="璇疯緭鍏ュ唴瀹�"
+          ></el-input>
+        </div>
+      </template>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="cardreader = false">鍙� 娑�</el-button>
+        <el-button type="primary" @click="cardreadercopes">纭� 瀹�</el-button>
+      </span>
+    </el-dialog>
     <div style="position: absolute; bottom: 100px; width: 360px; display: none">
       <div
         id="printBill"
@@ -1355,12 +1380,7 @@
       </span> -->
     <!-- </el-dialog> -->
     <historyTj :cusIdCard="form.cusIdcard" ref="historyTj"></historyTj>
-    <el-dialog
-      title="鎻愮ず"
-      :visible.sync="dialogVisiblese"
-      width="30%"
-      :before-close="handleClose"
-    >
+    <el-dialog title="鎻愮ず" :visible.sync="dialogVisiblese" width="30%">
       <span>鏄惁澶嶅埗鏈�杩戜竴娆$殑浣撴椤圭洰锛�</span>
       <span slot="footer" class="dialog-footer">
         <el-button @click="dialogVisiblese = false">鍙� 娑�</el-button>
@@ -1382,7 +1402,7 @@
 } from "@/api/hosp/customer";
 import { getPrintSetUp } from "@/api/system/examcharge";
 import axios from "axios";
-import { getIp } from '@/utils/auth'
+import { getIp } from "@/utils/auth";
 import {
   deptTreeSelect,
   projectGetList,
@@ -1441,11 +1461,13 @@
       proIdList: [],
       tableDatas: [],
       dialogVisiblese: false,
+      cardreaderradio: 3,
       lishi: false,
       table: false,
       HistoryList: {},
       index: 0,
       names: "",
+      inputSSS: "",
       dictType: [
         {
           value: 0,
@@ -1551,6 +1573,7 @@
       ids: [],
       // 闈炲崟涓鐢�
       single: true,
+      cardreader: false,
       // 闈炲涓鐢�
       multiple: true,
       nodeobj: {},
@@ -1663,7 +1686,6 @@
     this.getList1();
     // this.getData();
   },
- 
 
   methods: {
     getCurrentDateTime() {
@@ -2356,64 +2378,9 @@
               this.$refs.aaa.getAllList();
               this.$refs.aaa.title = "璇佷欢瀛楀吀";
             } else if (res.msg == "S") {
-              var websocket = null;
-              var url = this.valueUrls;
-              // var url = 'ws://'+ getIp() +':6789/websocket'
-              console.log(url)
-              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("11111");
-              }
-              websocket.onopen = function () {
-                try {
-                websocket.send("鍙戦��");
-              } catch (err) {
-                var tryTime = 0;
-                // 閲嶈瘯10娆★紝姣忔涔嬮棿闂撮殧3绉�
-                if (tryTime < 1) {
-                  var t1 = setTimeout(function () {
-                    tryTime++;
-                  
-                websocket.send("鍙戦��");
-              
-                  }, 1 * 1000);
-                } else {
-                  console.error("閲嶈繛澶辫触.");
-                }
-              }
-              };
-              websocket.onclose = function () {
-                alert("璇诲崱鍣ㄨ繛鎺ュ叧闂�");
-              };
-              websocket.onmessage = function (event) {
-              
-                var resultObj =JSON.parse(event.data);
-               _this.form.cusName = resultObj.data.name;
-                    _this.form.cusSex =
-                    resultObj.data.sex;
-                    _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;
-              };
-
-              //杩炴帴鍙戠敓閿欒鐨勫洖璋冩柟娉�
-              websocket.onerror = function () {
-                alert("璇锋鏌ヨ鍗″櫒杩炴帴鏄惁姝e父");
-              };
-            
+              this.cardreader = true;
+              _this.cardreaderradio = 3;
+              _this.inputSSS = "";
               // let url = window.location.protocol + "//" + window.location.host;
               // console.log(url);
               // axios
@@ -2445,6 +2412,166 @@
         });
       }
     },
+    changeradio() {
+      if (this.cardreaderradio != 3) {
+        this.$nextTick(() => {
+          this.$refs.tableHeadFilterInp.focus();
+        });
+      }
+    },
+    cardreadercopes() {
+      let _this = this;
+
+      if (this.cardreaderradio == 3) {
+        var websocket = null;
+        var url = this.valueUrls;
+        // var url = 'ws://'+ getIp() +':6789/websocket'
+        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("11111");
+        }
+        websocket.onopen = function () {
+          try {
+            // 杩炴帴璁惧
+            var jsonObjs = {
+              type: 1,
+              data: {},
+            };
+            var jStrs = JSON.stringify(jsonObjs);
+            websocket.send(jStrs);
+          } catch (err) {
+            var tryTime = 0;
+            // 閲嶈瘯10娆★紝姣忔涔嬮棿闂撮殧3绉�
+            if (tryTime < 1) {
+              var t1 = setTimeout(function () {
+                tryTime++;
+                var jsonObjs = {
+                  type: 1,
+                  data: {},
+                };
+                var jStrs = JSON.stringify(jsonObjs);
+                websocket.send(jStrs);
+              }, 1 * 1000);
+            } else {
+              console.error("閲嶈繛澶辫触.");
+            }
+          }
+        };
+        websocket.onclose = function () {
+          alert("璇诲崱鍣ㄨ繛鎺ュ叧闂�");
+        };
+        websocket.onmessage = function (event) {
+          var resultObj = JSON.parse(event.data);
+          _this.form.cusName = resultObj.data.name;
+          _this.form.cusSex = resultObj.data.sex;
+          _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.cardreader = false;
+        };
+
+        //杩炴帴鍙戠敓閿欒鐨勫洖璋冩柟娉�
+        websocket.onerror = function () {
+          alert("璇锋鏌ヨ鍗″櫒杩炴帴鏄惁姝e父");
+        };
+      } else {
+        // if (_this.inputSSS.indexOf(":1") != -1) {
+          
+        //   var str1 = _this.inputSSS.indexOf(":1");
+        //   var result1 = _this.inputSSS.substring(0, str1);
+
+        //   var str2 = _this.inputSSS.indexOf(":1");
+        //   var result2 = _this.inputSSS.substring(
+        //     str2 + 2,
+        //     _this.inputSSS.length
+        //   );
+
+        //   _this.inputSSS = result1 + result2;
+        // }
+        _this.inputSSS = _this.inputSSS.replace(":1","");
+        var websocket = null;
+        var url = this.valueUrls;
+        // var url = 'ws://'+ getIp() +':6789/websocket'
+        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("11111");
+        }
+        websocket.onopen = function () {
+          try {
+            // 杩炴帴璁惧
+            var jsonObjs = {
+              type: 2,
+              data: {
+                qrcode: _this.inputSSS,
+              },
+            };
+            var jStrs = JSON.stringify(jsonObjs);
+            websocket.send(jStrs);
+          } catch (err) {
+            var tryTime = 0;
+            // 閲嶈瘯10娆★紝姣忔涔嬮棿闂撮殧3绉�
+            if (tryTime < 1) {
+              var t1 = setTimeout(function () {
+                tryTime++;
+                var jsonObjs = {
+                  type: 2,
+                  data: {
+                    qrcode: _this.inputSSS,
+                  },
+                };
+                var jStrs = JSON.stringify(jsonObjs);
+                websocket.send(jStrs);
+              }, 1 * 1000);
+            } else {
+              console.error("閲嶈繛澶辫触.");
+            }
+          }
+        };
+        websocket.onclose = function () {
+          alert("璇诲崱鍣ㄨ繛鎺ュ叧闂�");
+        };
+        websocket.onmessage = function (event) {
+          var resultObj = JSON.parse(event.data);
+          _this.form.cusName = resultObj.data.name;
+          _this.form.cusSex = resultObj.data.gender;
+          _this.form.cusNational = resultObj.data.nation;
+          // _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.cusPhone = resultObj.data.phone;
+          _this.form.cusIdcard = resultObj.data.idenno;
+          _this.cardreader = false;
+        };
+
+        //杩炴帴鍙戠敓閿欒鐨勫洖璋冩柟娉�
+        websocket.onerror = function () {
+          alert("璇锋鏌ヨ鍗″櫒杩炴帴鏄惁姝e父");
+        };
+      }
+    },
 
     handleChanges(param1) {
       if (this.form.pacCode == "涓嶈") {
diff --git a/vue.config.js b/vue.config.js
index 2622179..77960d7 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -63,7 +63,7 @@
         },
       },
       '/douban':{
-        target:'http://192.168.1.82:6789',
+        target:'http://192.168.1.3:6789',
         changeOrigin:true,
         ws: true,
         pathRewrite: {

--
Gitblit v1.8.0