qinxianzhangyao
2023-12-22 c619aad083ed22c4f591e7d84f6eb5cd0e227b40
qxtj
6个文件已修改
267 ■■■■■ 已修改文件
src/api/system/package.js 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/system/tijian.js 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/Packages/index.vue 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/biol/index.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/package/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/tijian/index.vue 202 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/system/package.js
@@ -99,3 +99,12 @@
    params: query
  })
}
export function newGetTjPat(query) {
  return request({
    url: '/sqlserver/getdata/newGetTjPat',
    method: 'get',
    params: query
  })
}
src/api/system/tijian.js
@@ -141,3 +141,10 @@
   
  })
}
export function getconfigKey(configKey) {
  return request({
    url: '/system/config/configKey/' + configKey,
    method: 'get'
  })
}
src/components/Packages/index.vue
@@ -2,16 +2,16 @@
    <div>
        <el-dialog :title="title" :visible.sync="open" width="900px" append-to-body>
            <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="68px">
                <el-form-item label="套餐编码" prop="pacCode">
                    <el-input v-model="queryParams.pacCode" placeholder="请输入套餐编码" clearable
                <el-form-item label="编码" prop="pacCode">
                    <el-input v-model="queryParams.pacCode" placeholder="请输入编码" clearable
                        @keyup.enter.native="handleQuery" style="width: 120px;" />
                </el-form-item>
                <el-form-item label="套餐名称" prop="pacName">
                    <el-input v-model="queryParams.pacName" placeholder="请输入套餐名称" clearable
                <el-form-item label="名称" prop="pacName">
                    <el-input v-model="queryParams.pacName" placeholder="请输入名称" clearable
                        @keyup.enter.native="handleQuery" style="width: 130px;" />
                </el-form-item>
                <el-form-item label="套餐内容" prop="pacRemark">
                    <el-input v-model="queryParams.pacRemark" placeholder="请输入套餐内容" clearable
                <el-form-item label="内容" prop="pacRemark">
                    <el-input v-model="queryParams.pacRemark" placeholder="请输入内容" clearable
                        @keyup.enter.native="handleQuery" style="width: 130px;" />
                </el-form-item>
                <el-form-item>
@@ -21,12 +21,12 @@
            <el-table :data="dataList" ref="elTable" v-loading="loading" @selection-change="handleSelectionChange" border
                height="320px">
                <el-table-column type="selection" width="40" align="center" />
                <el-table-column label="序号" type="index" width="80px" />
                <el-table-column label="套餐编码" align="center" prop="pacCode" />
                <el-table-column label="套餐名称" align="center" prop="pacName" />
                <el-table-column label="序号" width="80px" prop="xh"/>
                <el-table-column label="编码" align="center" prop="pacCode" />
                <el-table-column label="名称" align="center" prop="pacName" />
                <el-table-column label="拼音码" align="center" prop="detail" />
                <el-table-column label="套餐价格" align="center" prop="price" />
                <el-table-column label="套餐内容" align="center" prop="pacRemark" />
                <el-table-column label="内容" align="center" prop="pacRemark" />
                <el-table-column label="备注" align="center" prop="price" />
            </el-table>
            <span slot="footer" class="dialog-footer">
                <el-button @click="open = false">取 消</el-button>
@@ -39,7 +39,7 @@
  
<script>
import {
    Packagestlist
    Packagestlist,newGetTjPat
} from "@/api/system/package";
export default {
    name: 'Packages',
@@ -52,6 +52,7 @@
    data() {
        return {
            open: false,
            openone:false,
            // 弹出层标题
            title: "",
            dataList: [],
@@ -79,21 +80,31 @@
    },
    mounted() {
        this.getList()
        // this.getList()
    },
    created() {
        this.getList()
        // this.getList()
    },
    methods: {
        getAllList(){
            this.openone = true
            newGetTjPat(this.queryParams).then(res => {
                this.dataList = res.data
            })
        },
        getList() {
            this.openone = false
            Packagestlist(this.queryParams).then(res => {
                this.dataList = res.rows
            })
        },
        handleQuery() {
            this.getList()
            if(this.openone == false){
                this.getList()
            }else  if(this.openone == true){
                this.getAllList()
            }
        },
        handleSelectionChange(selection) {
            if (selection.length > 1) {
src/views/system/biol/index.vue
@@ -78,8 +78,8 @@
        <el-table-column label="体检类型" align="center" prop="tjType" height="10px" width="80px"
          :show-overflow-tooltip="true">
          <template slot-scope="scope">
            <span v-if="scope.row.tjType == '1'">个人</span>
            <span v-if="scope.row.tjType == '2'">团队</span>
            <span v-if="scope.row.tjType == '1'">团队</span>
            <span v-if="scope.row.tjType == '2'">个人</span>
          </template>
        </el-table-column>
        <el-table-column label="体检号" align="center" prop="tjNumber" :show-overflow-tooltip="true" width="160px" />
src/views/system/package/index.vue
@@ -759,7 +759,7 @@
    handlePackage() {
      this.$refs.aaa.open = true;
      this.$refs.aaa.getList();
      this.$refs.aaa.title = "套餐名称";
      this.$refs.aaa.title = "套餐字典";
    },
    handleChanges(param1) {
      this.form.pacName = param1[0].pacName;
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("请检查读卡器连接是否正常");
        };
        //连接成功建立的回调方法
        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) {
      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) {