车辆管理系统-后台管理系统web
spring
4 天以前 d7606a9a3c81114f5d255c72d0eeb55e87d8aabb
src/views/vehicle/queuing/index.vue
@@ -1,24 +1,44 @@
<template>
  <div class="divBox relative vehicle-queue">
    <el-card class="box-card">
      <div slot="header" class="clearfix">
        <el-tabs v-model="tableFrom.areaId" @tab-click="handleChangeArea">
      <div
        slot="header"
        class="clearfix"
      >
        <el-tabs
          v-model="tableFrom.areaId"
          @tab-click="handleChangeArea"
        >
          <el-tab-pane
            :label="item.name"
            :name="item.id.toString()"
            v-for="(item, index) in headeNum"
            :key="index"
            :label="item.name"
            :name="item.id.toString()"
          />
        </el-tabs>
        <div class="sts-contanier" v-if="stsList.length > 0">
          <div v-for="item in stsList" :key="item.title" class="sts-box">
            <div class="sts-num">{{ item.num }}</div>
            <div class="sts-title">{{ item.title }}</div>
        <div
          v-if="stsList.length > 0"
          class="sts-contanier"
        >
          <div
            v-for="item in stsList"
            :key="item.title"
            class="sts-box"
          >
            <div class="sts-num">
              {{ item.num }}
            </div>
            <div class="sts-title">
              {{ item.title }}
            </div>
          </div>
        </div>
        <div class="container mt-1">
          <el-form inline size="small">
          <el-form
            inline
            size="small"
          >
            <el-form-item label="排队号码">
              <el-input
                v-model="tableFrom.queueNumber"
@@ -26,8 +46,7 @@
                class="selWidth"
                size="small"
                clearable
              >
              </el-input>
              />
            </el-form-item>
            <el-form-item label="手机号">
              <el-input
@@ -36,47 +55,83 @@
                class="selWidth"
                size="small"
                clearable
              >
              </el-input>
              />
            </el-form-item>
            <el-form-item>
              <el-button
                v-hasPermi="['admin:vehicle:queue']"
                size="small"
                type="primary"
                class="mr10"
                @click="getList(1)"
                v-hasPermi="['admin:vehicle:queue']"
                >查询</el-button
              >
                查询
              </el-button>
            </el-form-item>
          </el-form>
        </div>
      </div>
      <el-table
        :key="tableKey"
        v-loading="listLoading"
        :data="tableData.data"
        style="width: 100%"
        size="mini"
        :key="tableKey"
        :highlight-current-row="true"
        :cell-style="{ textAlign: 'center' }"
        :header-cell-style="{ fontWeight: 'bold', textAlign: 'center' }"
      >
        <el-table-column prop="queueNumber" label="排队号码" min-width="80" />
        <el-table-column prop="sort" label="当前排序" width="70" />
        <el-table-column prop="name" label="姓名" min-width="80" />
        <el-table-column prop="licensePlate" label="车牌号" width="90" />
        <el-table-column prop="phone" label="手机号" min-width="100" />
        <el-table-column prop="idCard" label="身份证号" min-width="150" />
        <el-table-column
          prop="queueNumber"
          label="排队号码"
          min-width="80"
        />
        <el-table-column
          prop="sort"
          label="当前排序"
          width="70"
        />
        <el-table-column
          prop="name"
          label="姓名"
          min-width="80"
        />
        <el-table-column
          prop="licensePlate"
          label="车牌号"
          width="90"
        />
        <el-table-column
          prop="phone"
          label="手机号"
          min-width="100"
        />
        <el-table-column
          prop="idCard"
          label="身份证号"
          min-width="150"
        />
        <el-table-column
          prop="loadingAreaName"
          label="装卸区域"
          min-width="70"
        />
        <el-table-column prop="orderTypeName" label="订单类型" min-width="70" />
        <el-table-column prop="loadUnloadQty" label="装卸数量" min-width="70" />
        <el-table-column prop="unitName" label="单位" min-width="50" />
        <el-table-column
          prop="orderTypeName"
          label="订单类型"
          min-width="70"
        />
        <el-table-column
          prop="loadUnloadQty"
          label="装卸数量"
          min-width="70"
        />
        <el-table-column
          prop="unitName"
          label="单位"
          min-width="50"
        />
        <el-table-column
          prop="vehicleStatusName"
          label="车辆状态"
@@ -88,7 +143,7 @@
              <template
                v-if="
                  scope.row.vehicleStatusCode == 1256 ||
                  scope.row.vehicleStatusCode == 1257
                    scope.row.vehicleStatusCode == 1257
                "
              >
                <el-tooltip
@@ -100,20 +155,29 @@
                    class="over-img"
                    src="../../../assets/imgs/over.svg"
                    alt=""
                  />
                  >
                </el-tooltip>
              </template>
            </div> </template
        ></el-table-column>
            </div>
          </template>
        </el-table-column>
        <el-table-column
          prop="goodsStatusName"
          label="货物状态"
          min-width="70"
        />
        <el-table-column prop="reasonName" label="事由" min-width="60" />
        <el-table-column
          prop="reasonName"
          label="事由"
          min-width="60"
        />
        <el-table-column label="登记时间" width="135" align="center">
        <el-table-column
          label="登记时间"
          width="135"
          align="center"
        >
          <template slot-scope="scope">
            <span>{{ scope.row.registerTime | vformatDate }}</span>
          </template>
@@ -133,21 +197,23 @@
              >生成二维码</el-button
            > -->
            <el-button
              v-hasPermi="['admin:vehicle:print']"
              type="text"
              @click="handlePrintVehicle(scope.row)"
              size="small"
              class="mr10"
              v-hasPermi="['admin:vehicle:print']"
              >打印</el-button
              @click="handlePrintVehicle(scope.row)"
            >
              打印
            </el-button>
            <el-button
              v-hasPermi="['admin:vehicle:sort']"
              type="text"
              size="small"
              class="mr10"
              @click="handleChangeSort(scope.row)"
              v-hasPermi="['admin:vehicle:sort']"
              >调整排序</el-button
            >
              调整排序
            </el-button>
            <el-dropdown trigger="click">
              <span class="el-dropdown-link">
                更多<i class="el-icon-arrow-down el-icon--right" />
@@ -156,32 +222,36 @@
                <el-dropdown-item
                  v-if="scope.row.vehicleStatusCode == 1256"
                  @click.native="handleMoreAction(0, scope.row)"
                  >发送短信提醒</el-dropdown-item
                >
                  发送短信提醒
                </el-dropdown-item>
                <el-dropdown-item
                  v-if="
                    checkPermi(['admin:vehicle:call']) &&
                    scope.row.vehicleStatusCode == 1255
                      scope.row.vehicleStatusCode == 1255
                  "
                  @click.native="handleMoreAction(1, scope.row)"
                  >手动叫号</el-dropdown-item
                >
                  手动叫号
                </el-dropdown-item>
                <el-dropdown-item
                  v-if="
                    checkPermi(['admin:vehicle:pass']) &&
                    scope.row.vehicleStatusCode == 1256
                      scope.row.vehicleStatusCode == 1256
                  "
                  @click.native="handleMoreAction(2, scope.row)"
                  >标记为已过号</el-dropdown-item
                >
                  标记为已过号
                </el-dropdown-item>
                <el-dropdown-item
                  v-if="
                    checkPermi(['admin:vehicle:reQueue']) &&
                    scope.row.vehicleStatusCode == 1257
                      scope.row.vehicleStatusCode == 1257
                  "
                  @click.native="handleMoreAction(3, scope.row)"
                  >重新排队</el-dropdown-item
                >
                  重新排队
                </el-dropdown-item>
              </el-dropdown-menu>
            </el-dropdown>
          </template>
@@ -208,7 +278,7 @@
        <edit
          v-if="editDialogConfig.visible"
          :edit-data="editDialogConfig.editData"
          :isReQueue="editDialogConfig.isReQueue"
          :is-re-queue="editDialogConfig.isReQueue"
          @hideEditDialog="hideEditDialog"
          @editSuccess="handleReloadData"
        />
@@ -216,10 +286,20 @@
    </el-card>
    <el-card v-show="false">
      <div class="print-dom">
        <div class="print-dom-box" v-if="printInfo" id="printArea">
          <div class="title">出入证信息</div>
          <div class="code-title">排队号码</div>
          <div class="code-code">{{ printInfo.queueNumber }}</div>
        <div
          v-if="printInfo"
          id="printArea"
          class="print-dom-box"
        >
          <div class="title">
            出入证信息
          </div>
          <div class="code-title">
            排队号码
          </div>
          <div class="code-code">
            {{ printInfo.queueNumber }}
          </div>
          <div class="code-wait">
            前方还有{{ printInfo.currentWaitNum }}辆车排队中...
          </div>
@@ -227,46 +307,84 @@
            <qrcode
              v-if="printInfo.visible"
              :size="160"
              :qrUrl="printInfo.url"
            ></qrcode>
              :qr-url="printInfo.url"
            />
          </div>
          <div class="qrcode-text">微信扫码查看排队进度</div>
          <div class="line"></div>
          <div class="qrcode-text">
            微信扫码查看排队进度
          </div>
          <div class="line" />
          <div class="cell">
            <div class="cell-label">姓名</div>
            <div class="cell-value">{{ printInfo.name }}</div>
            <div class="cell-label">
              姓名
            </div>
            <div class="cell-value">
              {{ printInfo.name }}
            </div>
          </div>
          <div class="cell">
            <div class="cell-label">车牌号</div>
            <div class="cell-value">{{ printInfo.licensePlate }}</div>
            <div class="cell-label">
              车牌号
            </div>
            <div class="cell-value">
              {{ printInfo.licensePlate }}
            </div>
          </div>
          <div class="cell">
            <div class="cell-label">手机号</div>
            <div class="cell-value">{{ printInfo.phone }}</div>
            <div class="cell-label">
              手机号
            </div>
            <div class="cell-value">
              {{ printInfo.phone }}
            </div>
          </div>
          <div class="cell">
            <div class="cell-label">身份证号码</div>
            <div class="cell-value">{{ printInfo.idCard }}</div>
            <div class="cell-label">
              身份证号码
            </div>
            <div class="cell-value">
              {{ printInfo.idCard }}
            </div>
          </div>
          <div class="cell">
            <div class="cell-label">装卸数量</div>
            <div class="cell-value">{{ printInfo.loadUnloadQty }}</div>
            <div class="cell-label">
              装卸数量
            </div>
            <div class="cell-value">
              {{ printInfo.loadUnloadQty }}
            </div>
          </div>
          <div class="cell">
            <div class="cell-label">单位</div>
            <div class="cell-value">{{ printInfo.unitName }}</div>
            <div class="cell-label">
              单位
            </div>
            <div class="cell-value">
              {{ printInfo.unitName }}
            </div>
          </div>
          <div class="cell">
            <div class="cell-label">装卸区域</div>
            <div class="cell-value">{{ printInfo.loadingAreaName }}</div>
            <div class="cell-label">
              装卸区域
            </div>
            <div class="cell-value">
              {{ printInfo.loadingAreaName }}
            </div>
          </div>
          <div class="cell">
            <div class="cell-label">登记时间</div>
            <div class="cell-value">{{ printInfo.registerTime }}</div>
            <div class="cell-label">
              登记时间
            </div>
            <div class="cell-value">
              {{ printInfo.registerTime }}
            </div>
          </div>
          <div class="cell">
            <div class="cell-label">备注</div>
            <div class="cell-value over-line">{{ printInfo.remark }}</div>
            <div class="cell-label">
              备注
            </div>
            <div class="cell-value over-line">
              {{ printInfo.remark }}
            </div>
          </div>
        </div>
      </div>
@@ -283,9 +401,9 @@
      <div class="qrcodebox-container">
        <qrcode
          v-if="qrcodeDialogConfig.visible"
          :qrUrl="qrcodeDialogConfig.url"
          :showText="qrcodeDialogConfig.text"
        ></qrcode>
          :qr-url="qrcodeDialogConfig.url"
          :show-text="qrcodeDialogConfig.text"
        />
      </div>
    </el-dialog>
  </div>
@@ -355,7 +473,7 @@
      overTimeObj: null,
      // wsUrl: "wss://car-manager.truekey.mobi/admin/lineup",
      wsUrl: "wss://car-internalmanager.ztt.cn/admin/lineup",
      wsUrl: "wss://172.17.0.1:9031/admin/lineup",
      ws: null,
      lockReconnect: false, // 是否连接成功
@@ -365,8 +483,7 @@
  },
  mounted() {
    if (process.env.NODE_ENV === "production") {
      console.log("当前是生产环境");
      let url = "https://car-internalmanager.ztt.cn/time";
      let url = "https://172.17.0.1:9031/time";
      // let url = "https://car-manager.truekey.mobi/time";
      fetch(url, {
        method: "GET",
@@ -382,7 +499,6 @@
          this.goodHeade();
        });
    } else {
      console.log("当前是开发环境");
      this.currentTime = this.getCurrentDate();
      this.goodHeade();
    }
@@ -412,7 +528,7 @@
      this.getList(1);
    },
    //切换区域
    handleChangeArea(tab, event) {
    handleChangeArea(tab) {
      this.tableFrom.areaId = tab.name;
      this.getList(1);
      this.getStsInfo();
@@ -420,7 +536,6 @@
    handlePrintVehicle(item) {
      let that = this;
      getPrintVehcicleInfoApi({ queueNumber: item.queueNumber }).then((res) => {
        console.log("打印信息:", res);
        that.printInfo = undefined;
        let newEl = {};
        newEl.queueNumber = res.queueNumber || "-";
@@ -439,7 +554,7 @@
        newEl.registerTime = res.registerTime || "-";
        newEl.remark = res.remark || "-";
        // newEl.url = `https://car-manager.truekey.mobi/driver/javaMobile/queryResult/${res.linkCode}`;
        newEl.url = `https://car-manager.ztt.cn/driver/javaMobile/queryResult/${res.linkCode}`;
        newEl.url = `https://172.17.0.1:9031/driver/javaMobile/queryResult/${res.linkCode}`;
        newEl.visible = true;
        setTimeout(() => {
@@ -467,7 +582,7 @@
      if (type == 0) {
        this.$modalSure("发送短信提醒吗?").then(() => {
          sendSmsApi(item.id)
            .then((res) => {
            .then(() => {
              that.getList(1);
              that.listLoading = false;
              that.$message.success(tipsArr[type]);
@@ -488,7 +603,7 @@
          that.listLoading = true;
          const api = ["", putQueueCallNumberApi, putQueuePassNumberApi][type];
          api(type == 1 ? item.id : item.masterId)
            .then((res) => {
            .then(() => {
              this.getList(1);
              that.listLoading = false;
              that.$message.success(tipsArr[type]);
@@ -513,7 +628,7 @@
    },
    reloadOverTime() {
      let that = this;
      let url = "https://car-internalmanager.ztt.cn/time";
      let url = "https://172.17.0.1:9031/time";
      // let url = "https://car-manager.truekey.mobi/time";
      fetch(url, {
        method: "GET",
@@ -567,7 +682,6 @@
            _fields.map((item) => {
              if (_lItem.status) {
                this.overtime = item.value;
                console.log("overtime", this.overtime);
              }
            });
          });
@@ -594,7 +708,6 @@
          });
          this.headeNum = _selfList;
          console.log("xxxxx", this.headeNum);
          this.tableFrom.areaId = this.headeNum[0].id.toString();
          this.getList(1);
          this.getStsInfo(this.tableFrom.areaId);
@@ -654,8 +767,8 @@
        // console.log('websocket创建连接-----》成功')
        if ("WebSocket" in window) {
          that.ws = new WebSocket(that.wsUrl);
        } else if ("MozWebSocket" in window) {
          that.ws = new MozWebSocket(that.wsUrl);
        } else if ("MozWebSocket" in window && window.MozWebSocket) {
          that.ws = new window.MozWebSocket(that.wsUrl);
        } else {
          alert(
            "您的浏览器不支持websocket协议,建议使用新版谷歌、火狐等浏览器,请勿使用IE10以下浏览器,360浏览器请使用极速模式,不要使用兼容模式!"