保安监管系统-验收版本
shuishen
2021-11-29 5f6d717c348b1ca9925110d8e6607800773d8102
Merge branch 'master' of http://192.168.0.105:10010/r/zhba_regulatory_ys
15 files modified
7 files added
4893 ■■■■■ changed files
src/api/licenseApproval/permit.js 2 ●●● patch | view | raw | blame | history
src/api/licenseApproval/record.js 2 ●●● patch | view | raw | blame | history
src/store/modules/user.js 2 ●●● patch | view | raw | blame | history
src/views/home/index.vue 108 ●●●● patch | view | raw | blame | history
src/views/licenseApproval/securityGuard.vue 247 ●●●● patch | view | raw | blame | history
src/views/licenseApproval/securityPermit.vue 223 ●●●●● patch | view | raw | blame | history
src/views/licenseApproval2/branchOffice.vue 578 ●●●●● patch | view | raw | blame | history
src/views/licenseApproval2/cancellationOfFiling.vue 503 ●●●●● patch | view | raw | blame | history
src/views/licenseApproval2/column.js 286 ●●●●● patch | view | raw | blame | history
src/views/licenseApproval2/crossRegion.vue 565 ●●●●● patch | view | raw | blame | history
src/views/licenseApproval2/securityGuard.vue 681 ●●●●● patch | view | raw | blame | history
src/views/licenseApproval2/securityPermit.vue 616 ●●●●● patch | view | raw | blame | history
src/views/licenseApproval2/securityTraining.vue 615 ●●●●● patch | view | raw | blame | history
src/views/management/registerOLD.vue 12 ●●●● patch | view | raw | blame | history
src/views/qualificationExamination/qualificationExamination.vue 37 ●●●●● patch | view | raw | blame | history
src/views/qualificationExamination/signQualificationExamination.vue 149 ●●●●● patch | view | raw | blame | history
src/views/securityGuardManagement/dispatchChildoperable.vue 3 ●●●● patch | view | raw | blame | history
src/views/securityGuardManagement/register.vue 12 ●●●● patch | view | raw | blame | history
src/views/securityGuardManagement/registerOnce.vue 76 ●●●● patch | view | raw | blame | history
src/views/statisticalQueryManagement/companyDetails.vue 100 ●●●● patch | view | raw | blame | history
src/views/statisticalQueryManagement/securityGuardStatistics.vue 63 ●●●● patch | view | raw | blame | history
src/views/system/user.vue 13 ●●●● patch | view | raw | blame | history
src/api/licenseApproval/permit.js
@@ -2,7 +2,7 @@
export const getList = (current, size, params) => {
  return request({
    url: '/api/permit/list',
    url: '/api/permit/page',
    method: 'get',
    params: {
      ...params,
src/api/licenseApproval/record.js
@@ -2,7 +2,7 @@
export const getList = (current, size, params) => {
  return request({
    url: '/api/record/list',
    url: '/api/record/page',
    method: 'get',
    params: {
      ...params,
src/store/modules/user.js
@@ -239,7 +239,7 @@
    },
    SET_USER_INFO: (state, userInfo) => {
      if (validatenull(userInfo.avatar)) {
        userInfo.avatar = "/img/bg/img-logo.png";
        userInfo.avatar = "http://47.49.36.190:9000/zhba/upload/picture/mrtx.png";
      }
      state.userInfo = userInfo;
      setStore({ name: 'userInfo', content: state.userInfo })
src/views/home/index.vue
@@ -714,6 +714,9 @@
  getSubstationWarnInfoPage
} from "../../api/index/index";
import { getPosition, getNewPeople } from "@/api/map/people";
import { getNewPosition } from "@/api/map/car";
import car from "@/assets/img/car.png";
import peo from "@/assets/img/people.png";
import gun from "@/assets/img/gun.png";
@@ -792,7 +795,9 @@
      },
      node1: {}, //选中的记录
      node2: {},
      params: null
      params: null,
      peopleGps: {},
      carGps: {}
    };
  },
  computed: {
@@ -804,6 +809,36 @@
    }
  },
  methods: {
    getPeoplePosition() {
      getPosition({ type: 1, workerId: "1432897970143014913" }).then(result => {
        getNewPeople().then(res => {
          if (JSON.stringify(res.data) != "{}") {
            var arr = res.data.sort(function(a, b) {
              return a["date"] < b["date"] ? 1 : -1;
            });
            this.peopleGps = {
              LGTD: arr[0].gis_jd,
              LTTD: arr[0].gis_wd
            };
          }
          this.getCarPosition();
        });
      });
    },
    getCarPosition() {
      getNewPosition({ imei: "861636056082414" }).then(result => {
        var res = result.data.data;
        if (JSON.stringify(res) != "{}") {
          this.carGps = {
            LGTD: res.x,
            LTTD: res.y
          };
        }
        this.getTableData(0);
      });
    },
    //点击节点
    handleNodeClick1(data) {
      this.value1 = data;
@@ -1139,6 +1174,10 @@
        3: {
          table: [],
          geoData: []
        },
        4: {
          table: [],
          geoData: []
        }
      };
      getLiveLocationVoList({ type: type }).then(res => {
@@ -1155,26 +1194,56 @@
              carNum: m.carNum,
              id: m.id
            };
            if (
              m.longitude &&
              m.latitude &&
              m.longitude !== "0" &&
              m.latitude !== "0"
            ) {
              middleData[m.type]["geoData"].push([
                m.id,
                Number(m.longitude),
                Number(m.latitude)
              ]);
            }
            middleData[m.type]["table"].push(obj);
            // if (
            //   m.longitude &&
            //   m.latitude &&
            //   m.longitude !== "0" &&
            //   m.latitude !== "0"
            // ) {
              if (m.type === 1) {
                middleData[m.type]["geoData"].push([
                  m.id,
                  Number(this.peopleGps.LGTD),
                  Number(this.peopleGps.LTTD)
                ]);
                middleData[m.type]["table"].push(obj);
              } else if (m.type === 2) {
                middleData[m.type]["geoData"].push([
                  m.id,
                  Number(this.carGps.LGTD),
                  Number(this.carGps.LTTD)
                ]);
                middleData[m.type]["table"].push(obj);
              } else {
                middleData[m.type]["geoData"].push([
                  m.id,
                  Number(m.longitude),
                  Number(m.latitude)
                ]);
                middleData[m.type]["table"].push(obj);
              }
            // }
            // if (
            //   m.longitude &&
            //   m.latitude &&
            //   m.longitude !== "0" &&
            //   m.latitude !== "0"
            // ) {
            //   middleData[m.type]["geoData"].push([
            //     m.id,
            //     Number(m.longitude),
            //     Number(m.latitude)
            //   ]);
            // }
            // middleData[m.type]["table"].push(obj);
          });
          this.carNum = middleData[2]["table"].length;
          this.peoNum = middleData[1]["table"].length;
          this.gunNum = middleData[3]["table"].length;
          this.mapData = middleData;
          this.setMapData(2);
          this.getCompanyMap();
        } else {
          this.$message.error(res.msg);
        }
@@ -1214,6 +1283,7 @@
            obj["table"].push(item);
          });
          this.companyNum = obj["table"].length;
          // this.mapData["4"] = {};
          this.mapData["4"] = obj;
        }
      });
@@ -1245,7 +1315,6 @@
      this.gridData.total = 0;
      this.dialogTableVisible = true;
      if (type === "zg") {
        // debugger;
        this.gridData.title = "资格异常人员清单";
        this.getQualificationPages(1);
      } else if (type === "wg") {
@@ -1507,10 +1576,13 @@
    }
  },
  mounted() {
    this.getPeoplePosition();
    // this.getCarPosition();
    this.initEchart();
    this.getHolderNum(0);
    this.getTableData(0);
    this.getCompanyMap();
    // this.getTableData(0);
    // this.getCompanyMap();
    this.getOfficeData();
  }
};
src/views/licenseApproval/securityGuard.vue
@@ -2,13 +2,17 @@
 * @Author: liu
 * @Date: 2021-08-26 16:57:58 
 * @Last Modified by: liu
 * @Last Modified time: 2021-10-12 13:51:24
 * @Last Modified time: 2021-11-25 17:38:08
 */
<template>
  <div>
    <basic-container class="permit">
    <basic-container>
      <!-- :class="[
        'permit',
        $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
      ]" -->
      <avue-crud
        :option="option"
        :table-loading="loading"
@@ -48,13 +52,13 @@
            :type="type"
            class="zhengJian-icon"
            @click.stop="handleCredentials(row)"
            >附件审查</el-button
            >附件</el-button
          >
          <el-button
            icon="el-icon-edit"
            :size="size"
            :type="type"
            v-if="row.type == '2'"
            v-if="row.stateOur == '0'"
            @click.stop="rowDel(row)"
            >备案审批
          </el-button>
@@ -62,15 +66,34 @@
            icon="el-icon-edit"
            :size="size"
            :type="type"
            v-if="
              row.stateOur != '0' &&
              !(
                row.papprove == '1' &&
                row.xapprove == '1' &&
                row.sapprove == '1'
              )
            "
            @click.stop="rowSee(row)"
            >审批查询
          </el-button>
          <el-button
            icon="el-icon-brush"
            :size="size"
            :type="type"
            @click.stop="viewLicense(row)"
            v-if="row.type == '0'"
            v-if="
              row.papprove == '1' && row.xapprove == '1' && row.sapprove == '1'
            "
            >打印备案证
          </el-button>
          <el-button
            icon="el-icon-edit"
            icon="el-icon-brush"
            :size="size"
            :type="type"
            v-show="row.type == 0"
            v-if="
              row.papprove == '1' && row.xapprove == '1' && row.sapprove == '1'
            "
            @click.stop="viewLicensehuizhi(row)"
            >回执打印
          </el-button>
@@ -78,11 +101,15 @@
        <template class="tdtype" slot-scope="{ row }" slot="type">
          <el-tag class="dtype">
            {{
              row.type == "0" ? "通过" : row.type == "1" ? "不通过" : "待审核"
              row.stateOur == "1"
                ? "通过"
                : row.stateOur == "2"
                ? "不通过"
                : "待审核"
            }}
            <i class="gz" v-if="row.type == '2'"></i>
            <i class="yj" v-if="row.type == '1'"></i>
            <i class="zc" v-if="row.type == '0'"></i>
            <i class="gz" v-if="row.stateOur == '0'"></i>
            <i class="yj" v-if="row.stateOur == '2'"></i>
            <i class="zc" v-if="row.stateOur == '1'"></i>
          </el-tag>
        </template>
      </avue-crud>
@@ -148,7 +175,7 @@
      <div
        id="licence_box"
        :class="classStyle == 'print' ? 'printstyle' : ''"
        ref="licencehuizhi"
        ref="licencelicencehuizhi"
      >
        <div
          class="licencehuizhi exam-box"
@@ -158,7 +185,9 @@
          <h3>回执单</h3>
          <p>
            南昌市公安局已收到
            <span>{{ rowData == null ? "" : rowData.enterprisename }}</span>
            <span>{{
              licenceData == null ? "" : licenceData.row.enterprisename
            }}</span>
            的相关备案申请!
          </p>
@@ -167,7 +196,9 @@
              <li>审批单位:<span>南昌市公安局</span></li>
              <li>
                日期:<span>{{
                  rowData == null ? "" : rowData.examinetime
                  licenceData.row.permitime == null
                    ? ""
                    : licenceData.row.permitime
                }}</span>
              </li>
            </ul>
@@ -204,6 +235,19 @@
        </div>
      </div>
    </el-dialog>
    <el-dialog
      title=""
      :visible.sync="dialogVisibleccsee"
      width="30%"
      :modal-append-to-body="false"
    >
      <div class="flots">
        <div class="f_title">
          审批 {{ stateOur == "1" ? "通过" : stateOur == "2" ? "不通过" : "" }}
        </div>
        <div><span>审批意见:</span> {{ stateText }}</div>
      </div>
    </el-dialog>
  </div>
</template>
@@ -217,7 +261,6 @@
} from "@/api/licenseApproval/record";
import { mapGetters } from "vuex";
import { column } from "./column";
export default {
  data() {
    return {
@@ -242,6 +285,7 @@
        pageSize: 10,
        currentPage: 1,
        total: 0,
        // ...this.$store.state.control.changePageSize,
      },
      selectionList: [],
      option: {
@@ -253,7 +297,7 @@
        searchShow: true,
        searchMenuSpan: 8,
        border: true,
        menuWidth: 378,
        menuWidth: 300,
        labelWidth: 130,
        headerAlign: "center",
        align: "center",
@@ -263,8 +307,16 @@
        selection: true,
        dialogClickModal: false,
        column: column,
        // ...this.$store.state.control.clearOtherBut,
      },
      data: [],
      user_name: "",
      stateOur: "",
      stateText: "",
      dialogVisibleccsee: false,
      userData: "",
    };
  },
  computed: {
@@ -342,29 +394,78 @@
      this.dialogVisiblecc = true;
      this.xukezData = row;
    },
    closecc() {
      this.xukezData.type = "0";
      this.dialogVisiblecc = false;
      this.xukezData["approve"] = this.textareaShenpi;
      console.log(this.xukezData);
      update(this.xukezData);
      this.textareaShenpi = "";
    },
    subcc() {
      this.xukezData.type = "1";
      this.dialogVisiblecc = false;
      this.xukezData["approve"] = this.textareaShenpi;
      update(this.xukezData);
      this.textareaShenpi = "";
    rowSee(row) {
      this.dialogVisibleccsee = true;
      this.stateOur = row.stateOur;
      if (this.user_name == "派") {
        // 派出所审批
        this.stateText = row.popinion;
      } else if (this.user_name == "县") {
        // 分局审批
        this.stateText = row.xopinion;
      } else if (this.user_name == "市") {
        // 市局审批
        this.stateText = row.sopinion;
      }
    },
    viewLicensehuizhi() {
    closecc() {
      this.upsData("1", "0"); //通过
    },
    subcc() {
      this.upsData("2", "1"); //不通过
    },
    upsData(state, type) {
      let date = new Date(+new Date() + 8 * 3600 * 1000)
        .toJSON()
        .substr(0, 19)
        .replace("T", " ");
      // console.log(date);
      // return;
      this.dialogVisiblecc = false;
      if (this.user_name == "派") {
        // 派出所审批
        this.xukezData.ptime = date;
        this.xukezData.papprove = state;
        this.xukezData.popinion = this.textareaShenpi;
        this.xukezData.type = type == "0" ? "2" : "1"; // 为了保持审核系统识别
      } else if (this.user_name == "县") {
        // 分局审批
        this.xukezData.xtime = date;
        this.xukezData.xapprove = state;
        this.xukezData.xopinion = this.textareaShenpi;
        this.xukezData.type = type == "0" ? "2" : "1"; // 为了保持审核系统识别
      } else if (this.user_name == "市") {
        // 市局审批
        this.xukezData.stime = date;
        this.xukezData.sapprove = state;
        this.xukezData.sopinion = this.textareaShenpi;
        this.xukezData.permitime = new Date(+new Date() + 8 * 3600 * 1000)
          .toJSON()
          .substr(0, 19)
          .replace("T", " ");
        this.xukezData.type = type == "0" ? "0" : "1"; // 为了保持审核系统识别
      }
      // console.log(this.xukezData);
      // return;
      update(this.xukezData).then((res) => {
        console.log(res);
        this.$message({
          type: "success",
          message: "操作成功!",
        });
        this.refreshChange();
        this.textareaShenpi = "";
      });
    },
    viewLicensehuizhi(row) {
      this.dialogVisiblehuizhi = true;
      this.viewLicense(row, 1);
    },
    closePrinthuizhi() {
      this.dialogVisiblehuizhi = false;
    },
    viewLicense(row) {
    viewLicense(row, val) {
      //查看许可证
      console.log(row, 34);
      this.licenceData.row = row;
@@ -379,7 +480,9 @@
      // this.licenceData.chiden["批准文号"] = row.registrationnumber;
      console.log(this.licenceData);
      this.dialogVisible = true;
      if (val != 1) {
        this.dialogVisible = true;
      }
    },
    closePrint() {
      this.dialogVisible = false;
@@ -440,9 +543,71 @@
    refreshChange() {
      this.onLoad(this.page, this.query);
    },
    getFenji(name) {
      var d = {};
      if (name == "派出所管理员") {
        d = {
          // papprove: 1,
        };
        this.user_name = "派";
      } else if (name == "县局管理员") {
        d = {
          papprove: "1",
        };
        this.user_name = "县";
      } else if (name == "市局管理员") {
        d = {
          xapprove: "1",
        };
        this.user_name = "市";
      }
      return d;
    },
    changeState(data) {
      var b = data;
      if (this.user_name == "派") {
        // 派出所审批
        b["stateOur"] = b.papprove == "0" ? "0" : b.papprove == "1" ? "1" : "2";
      } else if (this.user_name == "县") {
        // 分局审批
        b["stateOur"] = b.xapprove == "0" ? "0" : b.xapprove == "1" ? "1" : "2";
      } else if (this.user_name == "市") {
        // 市局审批
        b["stateOur"] = b.sapprove == "0" ? "0" : b.sapprove == "1" ? "1" : "2";
      }
      return b;
    },
    onLoad(page, params = {}) {
      this.loading = true;
      params["ptype"] = 3;
      var gonganj = "";
      console.log(this.userInfo);
      if (this.userInfo.role_name == "公安管理员") {
        let test = /派出所$/g;
        if (test.test(this.userInfo.list.name)) {
          gonganj = "派出所管理员";
        }
        test = /分局|公安局$/g;
        if (test.test(this.userInfo.list.name)) {
          gonganj = "县局管理员";
        }
        test = /市公安局$/g;
        if (test.test(this.userInfo.list.name)) {
          gonganj = "市局管理员";
        }
      }
      // console.log(gonganj);
      this.userData =
        gonganj == "派出所管理员" ? "2" : gonganj == "县局管理员" ? "1" : "0";
      params = {
        ...params,
        ...this.getFenji(gonganj),
      };
      console.log(params, "params");
      params["jurisdiction"] = this.userInfo.jurisdiction;
      // params["usetype"] = this.userData;
      // this.option.column[this.option.column.length - 2].prop = "opinionOur";
      // return;
      getList(
        page.currentPage,
        page.pageSize,
@@ -451,6 +616,22 @@
        const data = res.data.data;
        this.page.total = data.total;
        this.data = data.records;
        for (var k in this.data) {
          // console.log(this.changeState(this.data[k]));
          this.data[k] = this.changeState(this.data[k]);
          let paichusuoyijian = this.data[k].popinion
            ? "派出所意见:" + this.data[k].popinion + ";"
            : "";
          let fenjuijian = this.data[k].xopinion
            ? "分局意见:" + this.data[k].xopinion + ";"
            : "";
          let shijuyijian = this.data[k].sopinion
            ? "市局意见:" + this.data[k].sopinion + ";"
            : "";
          this.data[k]["opinionOur"] =
            paichusuoyijian + fenjuijian + shijuyijian;
        }
        console.log(this.data);
        this.loading = false;
        this.selectionClear();
      });
src/views/licenseApproval/securityPermit.vue
@@ -3,7 +3,7 @@
 * @Author: liu
 * @Date: 2021-08-26 16:22:20 
 * @Last Modified by: liu
 * @Last Modified time: 2021-09-22 11:29:43
 * @Last Modified time: 2021-11-25 18:49:29
 */
<template>
@@ -55,26 +55,47 @@
            :size="size"
            :type="type"
            @click.stop="rowDel(row)"
            v-if="row.type == '2'"
            v-if="row.stateOur == '0'"
            >许可审批
          </el-button>
          <el-button
            icon="el-icon-edit"
            :size="size"
            :type="type"
            v-if="
              row.stateOur != '0' &&
              !(
                row.papprove == '1' &&
                row.xapprove == '1' &&
                row.sapprove == '1'
              )
            "
            @click.stop="rowSee(row)"
            >审批查询
          </el-button>
          <el-button
            icon="el-icon-edit"
            :size="size"
            :type="type"
            @click.stop="viewLicense(row)"
            v-if="row.type == '0'"
            v-if="
              row.papprove == '1' && row.xapprove == '1' && row.sapprove == '1'
            "
            >打印许可证
          </el-button>
        </template>
        <template class="tdtype" slot-scope="{ row }" slot="type">
          <el-tag class="dtype">
            {{
              row.type == "0" ? "通过" : row.type == "1" ? "不通过" : "待审核"
              row.stateOur == "1"
                ? "通过"
                : row.stateOur == "2"
                ? "不通过"
                : "待审核"
            }}
            <i class="gz" v-if="row.type == '2'"></i>
            <i class="yj" v-if="row.type == '1'"></i>
            <i class="zc" v-if="row.type == '0'"></i>
            <i class="gz" v-if="row.stateOur == '0'"></i>
            <i class="yj" v-if="row.stateOur == '2'"></i>
            <i class="zc" v-if="row.stateOur == '1'"></i>
          </el-tag>
        </template>
      </avue-crud>
@@ -206,6 +227,19 @@
        </div>
      </div>
    </el-dialog>
    <el-dialog
      title=""
      :visible.sync="dialogVisibleccsee"
      width="30%"
      :modal-append-to-body="false"
    >
      <div class="flots">
        <div class="f_title">
          审批 {{ stateOur == "1" ? "通过" : stateOur == "2" ? "不通过" : "" }}
        </div>
        <div><span>审批意见:</span> {{ stateText }}</div>
      </div>
    </el-dialog>
  </div>
</template>
@@ -265,6 +299,13 @@
        column: column,
      },
      data: [],
      user_name: "",
      stateOur: "",
      stateText: "",
      dialogVisibleccsee: false,
      userData: "",
    };
  },
  computed: {
@@ -340,21 +381,88 @@
      this.dialogVisiblecc = true;
      this.xukezData = row;
    },
    rowSee(row) {
      this.dialogVisibleccsee = true;
      this.stateOur = row.stateOur;
      if (this.user_name == "派") {
        // 派出所审批
        this.stateText = row.popinion;
      } else if (this.user_name == "县") {
        // 分局审批
        this.stateText = row.xopinion;
      } else if (this.user_name == "市") {
        // 市局审批
        this.stateText = row.sopinion;
      }
    },
    closecc() {
      this.xukezData.type = "0";
      this.dialogVisiblecc = false;
      this.xukezData["approve"] = this.textareaShenpi;
      console.log(this.xukezData);
      update(this.xukezData);
      this.textareaShenpi = "";
      this.upsData("1", "0"); //通过
    },
    subcc() {
      this.xukezData.type = "1";
      this.dialogVisiblecc = false;
      this.xukezData["approve"] = this.textareaShenpi;
      update(this.xukezData);
      this.textareaShenpi = "";
      this.upsData("2", "1"); //不通过
    },
    upsData(state, type) {
      let date = new Date(+new Date() + 8 * 3600 * 1000)
        .toJSON()
        .substr(0, 19)
        .replace("T", " ");
      console.log(this.user_name);
      // return;
      this.dialogVisiblecc = false;
      if (this.user_name == "派") {
        // 派出所审批
        this.xukezData.ptime = date;
        this.xukezData.papprove = state;
        this.xukezData.popinion = this.textareaShenpi;
        this.xukezData.type = type == "0" ? "2" : "1"; // 为了保持审核系统识别
      } else if (this.user_name == "县") {
        // 分局审批
        this.xukezData.xtime = date;
        this.xukezData.xapprove = state;
        this.xukezData.xopinion = this.textareaShenpi;
        this.xukezData.type = type == "0" ? "2" : "1"; // 为了保持审核系统识别
      } else if (this.user_name == "市") {
        // 市局审批
        this.xukezData.stime = date;
        this.xukezData.sapprove = state;
        this.xukezData.sopinion = this.textareaShenpi;
        this.xukezData.permitime = new Date(+new Date() + 8 * 3600 * 1000)
          .toJSON()
          .substr(0, 19)
          .replace("T", " ");
        this.xukezData.type = type == "0" ? "0" : "1"; // 为了保持审核系统识别
      }
      console.log(this.xukezData);
      // return;
      update(this.xukezData).then((res) => {
        console.log(res);
        this.$message({
          type: "success",
          message: "操作成功!",
        });
        this.refreshChange();
        this.textareaShenpi = "";
      });
    },
    rowDel(row) {
      this.dialogVisiblecc = true;
      this.xukezData = row;
    },
    // closecc() {
    //   this.xukezData.type = "0";
    //   this.dialogVisiblecc = false;
    //   this.xukezData["approve"] = this.textareaShenpi;
    //   console.log(this.xukezData);
    //   update(this.xukezData);
    //   this.textareaShenpi = "";
    // },
    // subcc() {
    //   this.xukezData.type = "1";
    //   this.dialogVisiblecc = false;
    //   this.xukezData["approve"] = this.textareaShenpi;
    //   update(this.xukezData);
    //   this.textareaShenpi = "";
    // },
    viewLicense(row) {
      //查看许可证
@@ -429,9 +537,72 @@
    refreshChange() {
      this.onLoad(this.page, this.query);
    },
    getFenji(name) {
      var d = {};
      if (name == "派出所管理员") {
        d = {
          // papprove: 1,
        };
        this.user_name = "派";
      } else if (name == "县局管理员") {
        d = {
          papprove: "1",
        };
        this.user_name = "县";
      } else if (name == "市局管理员") {
        d = {
          xapprove: "1",
        };
        this.user_name = "市";
      }
      return d;
    },
    changeState(data) {
      var b = data;
      if (this.user_name == "派") {
        // 派出所审批
        b["stateOur"] = b.papprove == "0" ? "0" : b.papprove == "1" ? "1" : "2";
      } else if (this.user_name == "县") {
        // 分局审批
        b["stateOur"] = b.xapprove == "0" ? "0" : b.xapprove == "1" ? "1" : "2";
      } else if (this.user_name == "市") {
        // 市局审批
        b["stateOur"] = b.sapprove == "0" ? "0" : b.sapprove == "1" ? "1" : "2";
      }
      // console.log(this.user_name);
      return b;
    },
    onLoad(page, params = {}) {
      this.loading = true;
      params["ptype"] = 0;
      var gonganj = "";
      console.log(this.userInfo);
      if (this.userInfo.role_name == "公安管理员") {
        let test = /派出所$/g;
        if (test.test(this.userInfo.list.name)) {
          gonganj = "派出所管理员";
        }
        test = /分局|公安局$/g;
        if (test.test(this.userInfo.list.name)) {
          gonganj = "县局管理员";
        }
        test = /市公安局$/g;
        if (test.test(this.userInfo.list.name)) {
          gonganj = "市局管理员";
        }
      }
      // console.log(gonganj, 23);
      this.userData =
        gonganj == "派出所管理员" ? "2" : gonganj == "县局管理员" ? "1" : "0";
      params = {
        ...params,
        ...this.getFenji(gonganj),
      };
      console.log(params, "params");
      params["jurisdiction"] = this.userInfo.jurisdiction;
      // params["usetype"] = this.userData;
      // this.option.column[this.option.column.length - 2].prop = "opinionOur";
      // return;
      getList(
        page.currentPage,
        page.pageSize,
@@ -440,6 +611,22 @@
        const data = res.data.data;
        this.page.total = data.total;
        this.data = data.records;
        for (var k in this.data) {
          // console.log(this.changeState(this.data[k]));
          this.data[k] = this.changeState(this.data[k]);
          let paichusuoyijian = this.data[k].popinion
            ? "派出所意见:" + this.data[k].popinion + ";"
            : "";
          let fenjuijian = this.data[k].xopinion
            ? "分局意见:" + this.data[k].xopinion + ";"
            : "";
          let shijuyijian = this.data[k].sopinion
            ? "市局意见:" + this.data[k].sopinion + ";"
            : "";
          this.data[k]["opinionOur"] =
            paichusuoyijian + fenjuijian + shijuyijian;
        }
        console.log(this.data);
        this.loading = false;
        this.selectionClear();
      });
src/views/licenseApproval2/branchOffice.vue
New file
@@ -0,0 +1,578 @@
/*
 * @Author: liu
 * @Date: 2021-08-26 17:00:55
 * @Last Modified by: liu
 * @Last Modified time: 2021-09-22 11:28:49
 */
<template>
  <div>
    <basic-container class="permit">
      <avue-crud
        :option="option"
        :table-loading="loading"
        :data="data"
        :page.sync="page"
        :permission="permissionList"
        :before-open="beforeOpen"
        v-model="form"
        ref="crud"
        @row-update="rowUpdate"
        @row-save="rowSave"
        @row-del="rowDel"
        @search-change="searchChange"
        @search-reset="searchReset"
        @selection-change="selectionChange"
        @current-change="currentChange"
        @size-change="sizeChange"
        @refresh-change="refreshChange"
        @on-load="onLoad"
        :row-style="rowStyle"
      >
        <template slot="menuLeft">
          <el-button
            type="danger"
            size="small"
            icon="el-icon-delete"
            plain
            v-if="permission.permit_delete"
            @click="handleDelete"
            >删 除
          </el-button>
        </template>
        <template slot-scope="{ type, size, row }" slot="menu">
          <el-button
            icon="icon-zhengjian"
            :size="size"
            :type="type"
            class="zhengJian-icon"
            @click.stop="handleCredentials(row)"
            >附件审查</el-button
          >
          <el-button
            icon="el-icon-edit"
            :size="size"
            :type="type"
            v-if="row.type == '2'"
            @click.stop="rowDel(row)"
            >备案审批
          </el-button>
          <el-button
            icon="el-icon-edit"
            :size="size"
            :type="type"
            @click.stop="viewLicense(row)"
            v-if="row.type == '0'"
            >打印备案证
          </el-button>
        </template>
        <template class="tdtype" slot-scope="{ row }" slot="type">
          <el-tag class="dtype">
            {{
              row.type == "0" ? "通过" : row.type == "1" ? "不通过" : "待审批"
            }}
            <i class="gz" v-if="row.type == '2'"></i>
            <i class="yj" v-if="row.type == '1'"></i>
            <i class="zc" v-if="row.type == '0'"></i>
          </el-tag>
        </template>
      </avue-crud>
    </basic-container>
    <div
      v-if="dialogVisible"
      class="dialogVisibles"
      :class="classStyle == 'print' ? 'printstyle' : ''"
    >
      <div
        id="licence_box"
        :class="classStyle == 'print' ? 'printstyle' : ''"
        ref="licence"
      >
        <div class="licence" id="licence" v-if="dialogVisible">
          <div class="licence-head">备案回执</div>
          <div class="head-tid">
            编号
            <span class="fontStyle">{{
              licenceData.row.organizationcode
            }}</span>
            号
          </div>
          <div class="licence-main">
            <div
              class="l-m-once"
              v-for="(item, index, key) in licenceData.chiden"
              :key="key"
            >
              <span class="l-m-o-title"> {{ index }}: </span>
              <span class="l-m-r-once">{{ item }}</span>
            </div>
          </div>
          <div class="licence-bottom">(公安机关印章)</div>
          <div class="l-bottom">
            <!-- 发证日期 -->
            <span class="l-b-t">{{
              licenceData.row.permitime.slice(0, 4)
            }}</span
            >年
            <span class="l-b-t">{{
              licenceData.row.permitime.slice(5, 7)
            }}</span>
            月
            <span class="l-b-t">{{
              licenceData.row.permitime.slice(8, 10)
            }}</span>
            日
          </div>
        </div>
        <span slot="footer" class="dialog-footer no-print PrintBut">
          <el-button type="primary" @click="Print">打 印</el-button>
          <el-button type="primary" @click="closePrint"> 取 消 </el-button>
        </span>
      </div>
    </div>
    <el-dialog
      title=""
      :visible.sync="dialogVisiblecc"
      width="30%"
      :modal-append-to-body="false"
    >
      <div class="flots">
        <span class="f_title">是否通过备案审批?</span>
        <span class="f_body">请输入修改意见:</span>
        <textarea
          name="reworkmes"
          cols="40"
          rows="4"
          style="overflow: hidden"
          v-model="textareaShenpi"
        ></textarea>
        <div class="but">
          <el-button type="danger" @click="subcc">不通过</el-button>
          <el-button type="primary" @click="closecc">通过</el-button>
        </div>
      </div>
    </el-dialog>
  </div>
</template>
<script>
import {
  getList,
  getDetail,
  add,
  update,
  remove,
} from "@/api/licenseApproval/record";
import { mapGetters } from "vuex";
import { column } from "./column";
export default {
  data() {
    return {
      classStyle: "print", //打印样式
      dialogVisiblecc: false, //许可证审核抽屉
      xukezData: {},
      dialogVisible: false, //许可证抽屉
      licenceData: {
        row: {},
        chiden: {},
      },
      textareaShenpi: "",
      form: {},
      query: {},
      loading: true,
      page: {
        pageSize: 10,
        currentPage: 1,
        total: 0,
      },
      selectionList: [],
      option: {
        height: "auto",
        calcHeight: 30,
        excelBtn: true,
        tip: false,
        searchShowBtn: false,
        searchShow: true,
        searchMenuSpan: 8,
        border: true,
        menuWidth: 300,
        labelWidth: 130,
        headerAlign: "center",
        align: "center",
        // border: false,
        index: true,
        viewBtn: true,
        selection: true,
        dialogClickModal: false,
        column: column,
      },
      data: [],
    };
  },
  computed: {
    ...mapGetters(["permission", "userInfo"]),
    permissionList() {
      return {
        addBtn: this.vaildData(this.permission.permit_add, false),
        viewBtn: this.vaildData(this.permission.permit_view, true),
        delBtn: this.vaildData(this.permission.permit_delete, false),
        editBtn: this.vaildData(this.permission.permit_edit, false),
      };
    },
    ids() {
      let ids = [];
      this.selectionList.forEach((ele) => {
        ids.push(ele.id);
      });
      return ids.join(",");
    },
  },
  // mounted() {
  //     console.log(this.userInfo.dept_id);
  // },
  methods: {
    Print() {
      this.$Print(this.$refs.licence);
    },
    handleCredentials(row) {
      // console.log(row, "21354");
      this.$router.push({
        path: "/attachOnce/index",
        // redirect: { name: "foo" },
        // query: { row: row },
        query: { deptid: row.cardid, type: "2" },
        // params: { row: row.identificationnumber },
      });
    },
    rowSave(row, done, loading) {
      row.deptid = this.userInfo.dept_id;
      add(row).then(
        () => {
          this.onLoad(this.page);
          this.$message({
            type: "success",
            message: "操作成功!",
          });
          done();
        },
        (error) => {
          loading();
          window.console.log(error);
        }
      );
    },
    rowUpdate(row, index, done, loading) {
      update(row).then(
        () => {
          this.onLoad(this.page);
          this.$message({
            type: "success",
            message: "操作成功!",
          });
          done();
        },
        (error) => {
          loading();
          console.log(error);
        }
      );
    },
    rowDel(row) {
      this.dialogVisiblecc = true;
      this.xukezData = row;
    },
    closecc() {
      this.xukezData.type = "0";
      this.dialogVisiblecc = false;
      this.xukezData["approve"] = this.textareaShenpi;
      console.log(this.xukezData);
      update(this.xukezData);
      this.textareaShenpi = "";
      this.$message({
        type: "success",
        message: "审核通过!",
      });
    },
    subcc() {
      this.xukezData.type = "1";
      this.dialogVisiblecc = false;
      this.xukezData["approve"] = this.textareaShenpi;
      update(this.xukezData);
      this.textareaShenpi = "";
      this.$message({
        type: "success",
        message: "审核不通过!",
      });
    },
    viewLicense(row) {
      //查看许可证
      console.log(row, 34);
      this.licenceData.row = row;
      this.licenceData.chiden = {};
      this.licenceData.chiden["名称"] = row.enterprisename;
      this.licenceData.chiden["地址"] = row.address;
      this.licenceData.chiden["服务区域"] = row.industry;
      this.licenceData.chiden["法定代表人"] = row.representative;
      this.licenceData.chiden["备案时间"] = row.officetime;
      this.licenceData.chiden["备案内容"] = "设立分公司备案";
      // this.licenceData.chiden["注册资本"] = row.registeredcapital;
      // this.licenceData.chiden["批准文号"] = row.registrationnumber;
      console.log(this.licenceData);
      this.dialogVisible = true;
    },
    closePrint() {
      this.dialogVisible = false;
    },
    handleDelete() {
      if (this.selectionList.length === 0) {
        this.$message.warning("请选择至少一条数据");
        return;
      }
      this.$confirm("确定将选择数据删除?", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          return remove(this.ids);
        })
        .then(() => {
          this.onLoad(this.page);
          this.$message({
            type: "success",
            message: "操作成功!",
          });
          this.$refs.crud.toggleSelection();
        });
    },
    beforeOpen(done, type) {
      if (["edit", "view"].includes(type)) {
        getDetail(this.form.id).then((res) => {
          this.form = res.data.data;
        });
      }
      done();
    },
    searchReset() {
      this.query = {};
      this.onLoad(this.page);
    },
    searchChange(params, done) {
      this.query = params;
      this.page.currentPage = 1;
      this.onLoad(this.page, params);
      done();
    },
    selectionChange(list) {
      this.selectionList = list;
    },
    selectionClear() {
      this.selectionList = [];
      this.$refs.crud.toggleSelection();
    },
    currentChange(currentPage) {
      this.page.currentPage = currentPage;
    },
    sizeChange(pageSize) {
      this.page.pageSize = pageSize;
    },
    refreshChange() {
      this.onLoad(this.page, this.query);
    },
    onLoad(page, params = {}) {
      this.loading = true;
      params["ptype"] = 2;
      getList(
        page.currentPage,
        page.pageSize,
        Object.assign(params, this.query)
      ).then((res) => {
        const data = res.data.data;
        this.page.total = data.total;
        this.data = data.records;
        this.loading = false;
        this.selectionClear();
      });
    },
    rowStyle({ row }) {
      if (row.dtype != null && row.dtype != "") {
        if (row.dtype == "2") {
          return {
            color: "#F34A4A",
          };
        }
        if (row.dtype == "1") {
          return {
            color: "#F48F57",
          };
        }
      }
    },
  },
};
</script>
<style scoped lang="scss">
.dtype {
  width: 80px;
}
.dx {
  position: absolute;
  top: 50%;
  margin-top: -5px;
  margin-left: 6px;
  width: 10px;
  height: 10px;
  border-radius: 30%;
  background: #dfdfdf;
}
.zc {
  position: absolute;
  top: 50%;
  margin-top: -5px;
  margin-left: 6px;
  width: 10px;
  height: 10px;
  border-radius: 30%;
  background: #29c093;
}
.yj {
  position: absolute;
  top: 50%;
  margin-top: -5px;
  margin-left: 6px;
  width: 10px;
  height: 10px;
  border-radius: 30%;
  background: #f34a4a;
}
.gz {
  position: absolute;
  top: 50%;
  margin-top: -5px;
  margin-left: 6px;
  width: 10px;
  height: 10px;
  border-radius: 30%;
  background: #f48f57;
}
.el-tag {
  display: inline-block;
  width: 80px;
  /*padding-right: 40px !important;*/
}
#licence_box {
  position: relative;
  top: 15px;
  width: 1080px;
  height: 780px;
  background-color: #004ca7;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.licence {
  width: 960px;
  height: 648px;
  background-color: #fff !important;
  background-image: url("/img/permit/服务许可背景图.png");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  box-sizing: border-box;
  padding: 10%;
  color: #000;
}
.licence-head {
  width: 100%;
  height: 1.8rem;
  font-size: 1.8rem;
  text-align: center;
}
.head-tid {
  position: relative;
  left: 70%;
}
.head-tid span {
  margin: 0 1rem;
}
.licence-main {
  width: 80%;
}
.l-m-once {
  width: 100%;
  height: 2rem;
  margin-top: 1rem;
}
.l-m-o-title {
  font-size: 1.3rem;
  width: 22%;
  text-align: justify;
  display: inline-block;
}
.l-m-r-once {
  font-size: 1.1rem;
  /* border: 1px solid #000; */
  display: inline-block;
  width: 77%;
}
.licence-bottom,
.l-bottom {
  position: relative;
  left: 60%;
  font-size: 1.5rem;
  margin-top: 0.5rem;
}
.dialogVisibles {
  position: fixed;
  top: 0;
  left: -10%;
  height: 0;
  width: 120%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.printstyle {
  background-color: #fff !important;
}
.PrintBut {
  margin-top: 15px;
}
.flots {
  display: flex;
  justify-content: space-between;
  flex-direction: column;
  span {
    display: inline-block;
  }
  .f_title {
    position: absolute;
    top: 15px;
    font-size: 18px;
  }
}
.but {
  margin-top: 20px;
  width: 100%;
  display: flex;
  align-content: center;
  justify-content: center;
}
</style>
src/views/licenseApproval2/cancellationOfFiling.vue
New file
@@ -0,0 +1,503 @@
/*
 * @Author: liu
 * @Date: 2021-08-26 17:00:04
 * @Last Modified by: liu
 * @Last Modified time: 2021-10-12 13:54:42
 */
<template>
  <div>
    <basic-container class="permit">
      <avue-crud
        :option="option"
        :table-loading="loading"
        :data="data"
        :page.sync="page"
        :permission="permissionList"
        :before-open="beforeOpen"
        v-model="form"
        ref="crud"
        @row-update="rowUpdate"
        @row-save="rowSave"
        @row-del="rowDel"
        @search-change="searchChange"
        @search-reset="searchReset"
        @selection-change="selectionChange"
        @current-change="currentChange"
        @size-change="sizeChange"
        @refresh-change="refreshChange"
        @on-load="onLoad"
        :row-style="rowStyle"
      >
        <template slot="menuLeft">
          <el-button
            type="danger"
            size="small"
            icon="el-icon-delete"
            plain
            v-if="permission.permit_delete"
            @click="handleDelete"
            >删 除
          </el-button>
        </template>
        <template slot-scope="{ type, size, row }" slot="menu">
          <el-button
            icon="icon-zhengjian"
            :size="size"
            :type="type"
            class="zhengJian-icon"
            @click.stop="handleCredentials(row)"
            >附件查阅
          </el-button>
          <el-button
            icon="el-icon-edit"
            :size="size"
            :type="type"
            @click.stop="rowDel(row)"
            v-if="row.type == '2'"
            >撤销备案审批
          </el-button>
        </template>
        <template class="tdtype" slot-scope="{ row }" slot="type">
          <el-tag class="dtype">
            {{
              row.type == "0" ? "通过" : row.type == "1" ? "不通过" : "待审核"
            }}
            <i class="gz" v-if="row.type == '2'"></i>
            <i class="yj" v-if="row.type == '1'"></i>
            <i class="zc" v-if="row.type == '0'"></i>
          </el-tag>
        </template>
      </avue-crud>
    </basic-container>
    <el-dialog
      title=""
      :visible.sync="dialogVisiblecc"
      width="30%"
      :modal-append-to-body="false"
    >
      <div class="flots">
        <span class="f_title">是否通过撤销备案审批?</span>
        <span class="f_body">请输入修改意见:</span>
        <textarea
          name="reworkmes"
          cols="40"
          rows="4"
          style="overflow: hidden"
          v-model="textareaShenpi"
        ></textarea>
        <div class="but">
          <el-button type="danger" @click="subcc">不通过</el-button>
          <el-button type="primary" @click="closecc">通过</el-button>
        </div>
      </div>
    </el-dialog>
  </div>
</template>
<script>
import {
  getList,
  getDetail,
  add,
  update,
  remove,
} from "@/api/licenseApproval/revoke";
import { mapGetters } from "vuex";
import { column } from "./column";
export default {
  data() {
    return {
      classStyle: "print", //打印样式
      dialogVisiblecc: false, //许可证审核抽屉
      xukezData: {},
      dialogVisible: false, //许可证抽屉
      licenceData: {
        row: {},
        chiden: {},
      },
      textareaShenpi: "",
      form: {},
      query: {},
      loading: true,
      page: {
        pageSize: 10,
        currentPage: 1,
        total: 0,
      },
      selectionList: [],
      option: {
        height: "auto",
        calcHeight: 30,
        excelBtn: true,
        tip: false,
        searchShowBtn: false,
        searchShow: true,
        searchMenuSpan: 8,
        border: true,
        menuWidth: 300,
        labelWidth: 130,
        headerAlign: "center",
        align: "center",
        // border: false,
        index: true,
        viewBtn: true,
        selection: true,
        dialogClickModal: false,
        column: column,
      },
      data: [],
    };
  },
  computed: {
    ...mapGetters(["permission", "userInfo"]),
    permissionList() {
      return {
        addBtn: this.vaildData(this.permission.permit_add, false),
        viewBtn: this.vaildData(this.permission.permit_view, true),
        delBtn: this.vaildData(this.permission.permit_delete, false),
        editBtn: this.vaildData(this.permission.permit_edit, false),
      };
    },
    ids() {
      let ids = [];
      this.selectionList.forEach((ele) => {
        ids.push(ele.id);
      });
      return ids.join(",");
    },
  },
  // mounted() {
  //     console.log(this.userInfo.dept_id);
  // },
  methods: {
    Print() {
      this.$Print(this.$refs.licence);
    },
    handleCredentials(row) {
      this.$router.push({
        path: "/attachOnce/index",
        // redirect: { name: "foo" },
        // query: { row: row },
        query: { deptid: row.cardid, type: "6" },
        // params: { row: row.identificationnumber },
      });
    },
    rowSave(row, done, loading) {
      row.deptid = this.userInfo.dept_id;
      add(row).then(
        () => {
          this.onLoad(this.page);
          this.$message({
            type: "success",
            message: "操作成功!",
          });
          done();
        },
        (error) => {
          loading();
          window.console.log(error);
        }
      );
    },
    rowUpdate(row, index, done, loading) {
      update(row).then(
        () => {
          this.onLoad(this.page);
          this.$message({
            type: "success",
            message: "操作成功!",
          });
          done();
        },
        (error) => {
          loading();
          console.log(error);
        }
      );
    },
    rowDel(row) {
      this.dialogVisiblecc = true;
      this.xukezData = row;
    },
    closecc() {
      this.xukezData.type = "0";
      this.dialogVisiblecc = false;
      this.xukezData["approve"] = this.textareaShenpi;
      console.log(this.xukezData);
      update(this.xukezData);
      this.textareaShenpi = "";
    },
    subcc() {
      this.xukezData.type = "1";
      this.dialogVisiblecc = false;
      this.xukezData["approve"] = this.textareaShenpi;
      update(this.xukezData);
      this.textareaShenpi = "";
    },
    viewLicense(row) {
      //查看许可证
      this.licenceData.row = row;
      this.licenceData.chiden = {};
      this.licenceData.chiden["名称"] = row.enterprisename;
      this.licenceData.chiden["住所"] = row.address;
      this.licenceData.chiden["法定代表人"] = row.representative;
      this.licenceData.chiden["服务范围"] = row.industry;
      this.licenceData.chiden["注册资本"] = row.registeredcapital;
      this.licenceData.chiden["批准文号"] = row.registrationnumber;
      console.log(this.licenceData);
      this.dialogVisible = true;
    },
    closePrint() {
      this.dialogVisible = false;
    },
    handleDelete() {
      if (this.selectionList.length === 0) {
        this.$message.warning("请选择至少一条数据");
        return;
      }
      this.$confirm("确定将选择数据删除?", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          return remove(this.ids);
        })
        .then(() => {
          this.onLoad(this.page);
          this.$message({
            type: "success",
            message: "操作成功!",
          });
          this.$refs.crud.toggleSelection();
        });
    },
    beforeOpen(done, type) {
      if (["edit", "view"].includes(type)) {
        getDetail(this.form.id).then((res) => {
          this.form = res.data.data;
        });
      }
      done();
    },
    searchReset() {
      this.query = {};
      this.onLoad(this.page);
    },
    searchChange(params, done) {
      this.query = params;
      this.page.currentPage = 1;
      this.onLoad(this.page, params);
      done();
    },
    selectionChange(list) {
      this.selectionList = list;
    },
    selectionClear() {
      this.selectionList = [];
      this.$refs.crud.toggleSelection();
    },
    currentChange(currentPage) {
      this.page.currentPage = currentPage;
    },
    sizeChange(pageSize) {
      this.page.pageSize = pageSize;
    },
    refreshChange() {
      this.onLoad(this.page, this.query);
    },
    onLoad(page, params = {}) {
      this.loading = true;
      params["ptype"] = 4;
      getList(
        page.currentPage,
        page.pageSize,
        Object.assign(params, this.query)
      ).then((res) => {
        const data = res.data.data;
        this.page.total = data.total;
        this.data = data.records;
        this.loading = false;
        this.selectionClear();
      });
    },
    rowStyle({ row }) {
      if (row.dtype != null && row.dtype != "") {
        if (row.dtype == "2") {
          return {
            color: "#F34A4A",
          };
        }
        if (row.dtype == "1") {
          return {
            color: "#F48F57",
          };
        }
      }
    },
  },
};
</script>
<style scoped lang="scss">
.dtype {
  width: 80px;
}
.dx {
  position: absolute;
  top: 50%;
  margin-top: -5px;
  margin-left: 6px;
  width: 10px;
  height: 10px;
  border-radius: 30%;
  background: #dfdfdf;
}
.zc {
  position: absolute;
  top: 50%;
  margin-top: -5px;
  margin-left: 6px;
  width: 10px;
  height: 10px;
  border-radius: 30%;
  background: #29c093;
}
.yj {
  position: absolute;
  top: 50%;
  margin-top: -5px;
  margin-left: 6px;
  width: 10px;
  height: 10px;
  border-radius: 30%;
  background: #f34a4a;
}
.gz {
  position: absolute;
  top: 50%;
  margin-top: -5px;
  margin-left: 6px;
  width: 10px;
  height: 10px;
  border-radius: 30%;
  background: #f48f57;
}
.el-tag {
  display: inline-block;
  width: 80px;
  /*padding-right: 40px !important;*/
}
#licence_box {
  position: relative;
  top: 15px;
  width: 1080px;
  height: 780px;
  background-color: #004ca7;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.licence {
  width: 960px;
  height: 648px;
  background-color: #fff !important;
  background-image: url("/img/permit/服务许可背景图.png");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  box-sizing: border-box;
  padding: 10%;
  color: #000;
}
.licence-head {
  width: 100%;
  height: 1.8rem;
  font-size: 1.8rem;
  text-align: center;
}
.head-tid {
  position: relative;
  left: 70%;
}
.head-tid span {
  margin: 0 1rem;
}
.licence-main {
  width: 80%;
}
.l-m-once {
  width: 100%;
  height: 2rem;
  margin-top: 1rem;
}
.l-m-o-title {
  font-size: 1.3rem;
  width: 22%;
  text-align: justify;
  display: inline-block;
}
.l-m-r-once {
  font-size: 1.1rem;
  /* border: 1px solid #000; */
  display: inline-block;
  width: 77%;
}
.licence-bottom,
.l-bottom {
  position: relative;
  left: 60%;
  font-size: 1.5rem;
  margin-top: 0.5rem;
}
.dialogVisibles {
  position: fixed;
  top: 0;
  left: -10%;
  height: 0;
  width: 120%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.printstyle {
  background-color: #fff !important;
}
.PrintBut {
  margin-top: 15px;
}
.flots {
  display: flex;
  justify-content: space-between;
  flex-direction: column;
  .f_title {
    position: absolute;
    top: 15px;
    font-size: 18px;
  }
}
.but {
  margin-top: 20px;
  width: 100%;
  display: flex;
  align-content: center;
  justify-content: center;
}
</style>
src/views/licenseApproval2/column.js
New file
@@ -0,0 +1,286 @@
export var column = [
    {
        label: "企业名称",
        search: true,
        prop: "enterprisename",
        searchLabelWidth: 80,
        searchSpan: 4,
        overHidden: true,
        width: 250,
        rules: [
            {
                required: true,
                message: "请输入企业名称",
                trigger: "blur",
            },
        ],
    },
    // {
    //   label: "社会信用代码",
    //   prop: "creditcode",
    //   hide: true,
    //   rules: [
    //     {
    //       required: true,
    //       message: "请输入统一社会信用代码",
    //       trigger: "blur",
    //     },
    //   ],
    // },
    {
        label: "法定代表人",
        prop: "representative",
        search: true,
        searchLabelWidth: 90,
        width: 82,
        rules: [
            {
                required: true,
                message: "请输入法定代表人",
                trigger: "blur",
            },
        ],
    },
    {
        label: "法定代表人电话",
        width: 106,
        prop: "representativecell",
        rules: [
            {
                required: true,
                message: "请输入法定代表人电话",
                trigger: "blur",
            },
        ],
    },
    {
        label: "联系人",
        prop: "contacts",
        width: 58,
        rules: [
            {
                required: true,
                message: "请输入联系人",
                trigger: "blur",
            },
        ],
    },
    {
        label: "联系人电话",
        width: 96,
        prop: "contactscell",
        rules: [
            {
                required: true,
                message: "请输入联系人电话",
                trigger: "blur",
            },
        ],
    },
    // {
    //   label: "注册时间",
    //   hide: true,
    //   prop: "establishtime",
    //   type: "date",
    //   format: "yyyy-MM-dd",
    //   valueFormat: "yyyy-MM-dd",
    //   rules: [
    //     {
    //       required: true,
    //       message: "请输入注册时间",
    //       trigger: "blur",
    //     },
    //   ],
    // },
    // {
    //   label: "注册资本",
    //   prop: "registeredcapital",
    //   hide: true,
    //   rules: [
    //     {
    //       required: true,
    //       message: "请输入注册资本",
    //       trigger: "blur",
    //     },
    //   ],
    // },
    // {
    //   label: "组织机构代码",
    //   prop: "organizationcode",
    //   hide: true,
    //   rules: [
    //     {
    //       required: true,
    //       message: "请输入组织机构代码",
    //       trigger: "blur",
    //     },
    //   ],
    // },
    // {
    //   label: "工商注册号",
    //   hide: true,
    //   prop: "registrationnumber",
    //   rules: [
    //     {
    //       required: true,
    //       message: "请输入工商注册号",
    //       trigger: "blur",
    //     },
    //   ],
    // },
    // {
    //   label: "纳税人识别号",
    //   prop: "identificationnumber",
    //   hide: true,
    //   rules: [
    //     {
    //       required: true,
    //       message: "请输入纳税人识别号",
    //       trigger: "blur",
    //     },
    //   ],
    // },
    // {
    //   label: "企业类型",
    //   hide: true,
    //   prop: "enterprises",
    //   rules: [
    //     {
    //       required: true,
    //       message: "请输入企业类型",
    //       trigger: "blur",
    //     },
    //   ],
    // },
    {
        label: "注册地址",
        prop: "address",
        overHidden: true,
        rules: [
            {
                required: true,
                message: "请输入注册地址",
                trigger: "blur",
            },
        ],
    },
    // {
    //   label: "所属地区",
    //   hide: true,
    //   prop: "region",
    //   rules: [
    //     {
    //       required: true,
    //       message: "请输入所属地区",
    //       trigger: "blur",
    //     },
    //   ],
    // },
    {
        label: "登记机关",
        prop: "registration",
        overHidden: true,
        rules: [
            {
                required: true,
                message: "请输入登记机关",
                trigger: "blur",
            },
        ],
    },
    {
        label: "所属行业",
        hide: true,
        prop: "industry",
        rules: [
            {
                required: true,
                message: "请输入所属行业",
                trigger: "blur",
            },
        ],
    },
    // {
    //   label: "所属机构",
    //   prop: "deptid",
    //   addDisplay: false,
    //   type: "select",
    //   hide: true,
    //   dicUrl: "/api/blade-system/dept/selectIn",
    //   props: {
    //     label: "deptname",
    //     value: "deptid",
    //   },
    // },
    {
        label: "所属辖区",
        prop: "jurisdiction",
        type: "tree",
        dicUrl: "/api/jurisdiction/lazy-trees",
        props: {
            label: "title",
            value: "id",
        },
        // labelWidth: 160,
        // span: 12,
    },
    {
        label: "许可类型",
        // search: true,
        hide: true,
        prop: "ptype",
        type: "select",
        searchSpan: 4,
        dicData: [
            {
                label: "保安服务许可",
                value: "0",
            },
        ],
    },
    {
        label: "提交时间",
        prop: "permitime",
        overHidden: true,
        addDisplay: false,
        width: 132,
        type: "date",
        format: "yyyy-MM-dd HH:mm:ss",
        valueFormat: "yyyy-MM-dd HH:mm:ss",
    },
    {
        label: "审核状态",
        prop: "type",
        addDisplay: false,
        type: "select",
        dicData: [
            {
                label: "通过",
                value: "0",
            },
            {
                label: "不通过",
                value: "1",
            },
            {
                label: "待审核",
                value: "2",
            },
        ],
    },
    {
        label: "经营范围",
        prop: "business",
        component: "AvueUeditor",
        hide: true,
        minRows: 6,
        span: 24,
        rules: [
            {
                required: true,
                message: "请输入经营范围",
                trigger: "blur",
            },
        ],
    },
];
src/views/licenseApproval2/crossRegion.vue
New file
@@ -0,0 +1,565 @@
/*
 * @Author:liu
 * @Date: 2021-08-26 16:59:35
 * @Last Modified by: liu
 * @Last Modified time: 2021-10-12 13:52:24
 */
<template>
  <div>
    <basic-container class="permit">
      <avue-crud
        :option="option"
        :table-loading="loading"
        :data="data"
        :page.sync="page"
        :permission="permissionList"
        :before-open="beforeOpen"
        v-model="form"
        ref="crud"
        @row-update="rowUpdate"
        @row-save="rowSave"
        @row-del="rowDel"
        @search-change="searchChange"
        @search-reset="searchReset"
        @selection-change="selectionChange"
        @current-change="currentChange"
        @size-change="sizeChange"
        @refresh-change="refreshChange"
        @on-load="onLoad"
        :row-style="rowStyle"
      >
        <template slot="menuLeft">
          <el-button
            type="danger"
            size="small"
            icon="el-icon-delete"
            plain
            v-if="permission.permit_delete"
            @click="handleDelete"
            >删 除
          </el-button>
        </template>
        <template slot-scope="{ type, size, row }" slot="menu">
          <el-button
            icon="icon-zhengjian"
            :size="size"
            :type="type"
            class="zhengJian-icon"
            @click.stop="handleCredentials(row)"
            >附件查阅
          </el-button>
          <el-button
            icon="el-icon-edit"
            :size="size"
            :type="type"
            @click.stop="rowDel(row)"
            v-if="row.type == '2'"
            >备案审批
          </el-button>
          <el-button
            icon="el-icon-edit"
            :size="size"
            :type="type"
            @click.stop="viewLicense(row)"
            v-if="row.type == '0'"
            >打印备案证
          </el-button>
        </template>
        <template class="tdtype" slot-scope="{ row }" slot="type">
          <el-tag class="dtype">
            {{
              row.type == "0" ? "通过" : row.type == "1" ? "不通过" : "待审核"
            }}
            <i class="gz" v-if="row.type == '2'"></i>
            <i class="yj" v-if="row.type == '1'"></i>
            <i class="zc" v-if="row.type == '1'"></i>
          </el-tag>
        </template>
      </avue-crud>
    </basic-container>
    <div
      v-if="dialogVisible"
      class="dialogVisibles"
      :class="classStyle == 'print' ? 'printstyle' : ''"
    >
      <div
        id="licence_box"
        :class="classStyle == 'print' ? 'printstyle' : ''"
        ref="licence"
      >
        <div class="licence" id="licence" v-if="dialogVisible">
          <div class="licence-head">备案回执</div>
          <div class="head-tid">
            编号
            <span class="fontStyle">{{
              licenceData.row.organizationcode
            }}</span>
            <!-- 号 -->
          </div>
          <div class="licence-main">
            <div
              class="l-m-once"
              v-for="(item, index, key) in licenceData.chiden"
              :key="key"
            >
              <span class="l-m-o-title"> {{ index }}: </span>
              <span class="l-m-r-once">{{ item }}</span>
            </div>
          </div>
          <div class="licence-bottom">(公安机关印章)</div>
          <div class="l-bottom">
            <!-- 发证日期 -->
            <span class="l-b-t">{{
              licenceData.row.permitime.slice(0, 4)
            }}</span
            >年
            <span class="l-b-t">{{
              licenceData.row.permitime.slice(5, 7)
            }}</span>
            月
            <span class="l-b-t">{{
              licenceData.row.permitime.slice(8, 10)
            }}</span>
            日
          </div>
        </div>
        <span slot="footer" class="dialog-footer no-print PrintBut">
          <el-button type="primary" @click="Print">打 印</el-button>
          <el-button type="primary" @click="closePrint"> 取 消 </el-button>
        </span>
      </div>
    </div>
    <el-dialog
      title=""
      :visible.sync="dialogVisiblecc"
      width="30%"
      :modal-append-to-body="false"
    >
      <div class="flots">
        <span class="f_title">是否通过备案审批?</span>
        <span class="f_body">请输入修改意见:</span>
        <textarea
          name="reworkmes"
          cols="40"
          rows="4"
          style="overflow: hidden"
          v-model="textareaShenpi"
        ></textarea>
        <div class="but">
          <el-button type="danger" @click="subcc">不通过</el-button>
          <el-button type="primary" @click="closecc">通过</el-button>
        </div>
      </div>
    </el-dialog>
  </div>
</template>
<script>
import {
  getList,
  getDetail,
  add,
  update,
  remove,
} from "@/api/licenseApproval/recordk";
import { mapGetters } from "vuex";
import { column } from "./column";
export default {
  data() {
    return {
      classStyle: "print", //打印样式
      dialogVisiblecc: false, //许可证审核抽屉
      xukezData: {},
      dialogVisible: false, //许可证抽屉
      licenceData: {
        row: {},
        chiden: {},
      },
      textareaShenpi: "",
      form: {},
      query: {},
      loading: true,
      page: {
        pageSize: 10,
        currentPage: 1,
        total: 0,
      },
      selectionList: [],
      option: {
        height: "auto",
        calcHeight: 30,
        excelBtn: true,
        tip: false,
        searchShowBtn: false,
        searchShow: true,
        searchMenuSpan: 8,
        border: true,
        menuWidth: 300,
        labelWidth: 130,
        headerAlign: "center",
        align: "center",
        // border: false,
        index: true,
        viewBtn: true,
        selection: true,
        dialogClickModal: false,
        column: column,
      },
      data: [],
    };
  },
  computed: {
    ...mapGetters(["permission", "userInfo"]),
    permissionList() {
      return {
        addBtn: this.vaildData(this.permission.permit_add, false),
        viewBtn: this.vaildData(this.permission.permit_view, true),
        delBtn: this.vaildData(this.permission.permit_delete, false),
        editBtn: this.vaildData(this.permission.permit_edit, false),
      };
    },
    ids() {
      let ids = [];
      this.selectionList.forEach((ele) => {
        ids.push(ele.id);
      });
      return ids.join(",");
    },
  },
  // mounted() {
  //     console.log(this.userInfo.dept_id);
  // },
  methods: {
    Print() {
      this.$Print(this.$refs.licence);
    },
    handleCredentials(row) {
      this.$router.push({
        path: "/attachOnce/index",
        // redirect: { name: "foo" },
        // query: { row: row },
        query: { deptid: row.cardid, type: "5" },
        // params: { row: row.identificationnumber },
      });
    },
    rowSave(row, done, loading) {
      row.deptid = this.userInfo.dept_id;
      add(row).then(
        () => {
          this.onLoad(this.page);
          this.$message({
            type: "success",
            message: "操作成功!",
          });
          done();
        },
        (error) => {
          loading();
          window.console.log(error);
        }
      );
    },
    rowUpdate(row, index, done, loading) {
      update(row).then(
        () => {
          this.onLoad(this.page);
          this.$message({
            type: "success",
            message: "操作成功!",
          });
          done();
        },
        (error) => {
          loading();
          console.log(error);
        }
      );
    },
    rowDel(row) {
      this.dialogVisiblecc = true;
      this.xukezData = row;
    },
    closecc() {
      this.xukezData.type = "0";
      this.dialogVisiblecc = false;
      this.xukezData["approve"] = this.textareaShenpi;
      console.log(this.xukezData);
      update(this.xukezData);
      this.textareaShenpi = "";
    },
    subcc() {
      this.xukezData.type = "1";
      this.dialogVisiblecc = false;
      this.xukezData["approve"] = this.textareaShenpi;
      update(this.xukezData);
      this.textareaShenpi = "";
    },
    viewLicense(row) {
      //查看许可证
      console.log(row, 34);
      this.licenceData.row = row;
      this.licenceData.chiden = {};
      this.licenceData.chiden["名称"] = row.enterprisename;
      this.licenceData.chiden["地址"] = row.address;
      this.licenceData.chiden["服务区域"] = row.industry;
      this.licenceData.chiden["法定代表人"] = row.representative;
      this.licenceData.chiden["备案时间"] = row.officetime;
      this.licenceData.chiden["备案内容"] = "跨区域经营备案";
      // this.licenceData.chiden["注册资本"] = row.registeredcapital;
      // this.licenceData.chiden["批准文号"] = row.registrationnumber;
      console.log(this.licenceData);
      this.dialogVisible = true;
    },
    closePrint() {
      this.dialogVisible = false;
    },
    handleDelete() {
      if (this.selectionList.length === 0) {
        this.$message.warning("请选择至少一条数据");
        return;
      }
      this.$confirm("确定将选择数据删除?", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          return remove(this.ids);
        })
        .then(() => {
          this.onLoad(this.page);
          this.$message({
            type: "success",
            message: "操作成功!",
          });
          this.$refs.crud.toggleSelection();
        });
    },
    beforeOpen(done, type) {
      if (["edit", "view"].includes(type)) {
        getDetail(this.form.id).then((res) => {
          this.form = res.data.data;
        });
      }
      done();
    },
    searchReset() {
      this.query = {};
      this.onLoad(this.page);
    },
    searchChange(params, done) {
      this.query = params;
      this.page.currentPage = 1;
      this.onLoad(this.page, params);
      done();
    },
    selectionChange(list) {
      this.selectionList = list;
    },
    selectionClear() {
      this.selectionList = [];
      this.$refs.crud.toggleSelection();
    },
    currentChange(currentPage) {
      this.page.currentPage = currentPage;
    },
    sizeChange(pageSize) {
      this.page.pageSize = pageSize;
    },
    refreshChange() {
      this.onLoad(this.page, this.query);
    },
    onLoad(page, params = {}) {
      this.loading = true;
      params["ptype"] = 5;
      getList(
        page.currentPage,
        page.pageSize,
        Object.assign(params, this.query)
      ).then((res) => {
        const data = res.data.data;
        this.page.total = data.total;
        this.data = data.records;
        this.loading = false;
        this.selectionClear();
      });
    },
    rowStyle({ row }) {
      if (row.dtype != null && row.dtype != "") {
        if (row.dtype == "2") {
          return {
            color: "#F34A4A",
          };
        }
        if (row.dtype == "1") {
          return {
            color: "#F48F57",
          };
        }
      }
    },
  },
};
</script>
<style scoped lang="scss">
.dtype {
  width: 80px;
}
.dx {
  position: absolute;
  top: 50%;
  margin-top: -5px;
  margin-left: 6px;
  width: 10px;
  height: 10px;
  border-radius: 30%;
  background: #dfdfdf;
}
.zc {
  position: absolute;
  top: 50%;
  margin-top: -5px;
  margin-left: 6px;
  width: 10px;
  height: 10px;
  border-radius: 30%;
  background: #29c093;
}
.yj {
  position: absolute;
  top: 50%;
  margin-top: -5px;
  margin-left: 6px;
  width: 10px;
  height: 10px;
  border-radius: 30%;
  background: #f34a4a;
}
.gz {
  position: absolute;
  top: 50%;
  margin-top: -5px;
  margin-left: 6px;
  width: 10px;
  height: 10px;
  border-radius: 30%;
  background: #f48f57;
}
.el-tag {
  display: inline-block;
  width: 80px;
  /*padding-right: 40px !important;*/
}
#licence_box {
  position: relative;
  top: 15px;
  width: 1080px;
  height: 780px;
  background-color: #004ca7;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.licence {
  width: 960px;
  height: 648px;
  background-color: #fff !important;
  background-image: url("/img/permit/服务许可背景图.png");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  box-sizing: border-box;
  padding: 10%;
  color: #000;
}
.licence-head {
  width: 100%;
  height: 1.8rem;
  font-size: 1.8rem;
  text-align: center;
}
.head-tid {
  position: relative;
  left: 70%;
}
.head-tid span {
  margin: 0 1rem;
}
.licence-main {
  width: 80%;
}
.l-m-once {
  width: 100%;
  height: 2rem;
  margin-top: 1rem;
}
.l-m-o-title {
  font-size: 1.3rem;
  width: 22%;
  text-align: justify;
  display: inline-block;
}
.l-m-r-once {
  font-size: 1.1rem;
  /* border: 1px solid #000; */
  display: inline-block;
  width: 77%;
}
.licence-bottom,
.l-bottom {
  position: relative;
  left: 60%;
  font-size: 1.5rem;
  margin-top: 0.5rem;
}
.dialogVisibles {
  position: fixed;
  top: 0;
  left: -10%;
  height: 0;
  width: 120%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.printstyle {
  background-color: #fff !important;
}
.PrintBut {
  margin-top: 15px;
}
.flots {
  display: flex;
  justify-content: space-between;
  flex-direction: column;
  .f_title {
    position: absolute;
    top: 15px;
    font-size: 18px;
  }
}
.but {
  margin-top: 20px;
  width: 100%;
  display: flex;
  align-content: center;
  justify-content: center;
}
</style>
src/views/licenseApproval2/securityGuard.vue
New file
@@ -0,0 +1,681 @@
/*
 * @Author: liu
 * @Date: 2021-08-26 16:57:58
 * @Last Modified by: liu
 * @Last Modified time: 2021-10-12 13:51:24
 */
<template>
  <div>
    <basic-container class="permit">
      <avue-crud
        :option="option"
        :table-loading="loading"
        :data="data"
        :page.sync="page"
        :permission="permissionList"
        :before-open="beforeOpen"
        v-model="form"
        ref="crud"
        @row-update="rowUpdate"
        @row-save="rowSave"
        @row-del="rowDel"
        @search-change="searchChange"
        @search-reset="searchReset"
        @selection-change="selectionChange"
        @current-change="currentChange"
        @size-change="sizeChange"
        @refresh-change="refreshChange"
        @on-load="onLoad"
        :row-style="rowStyle"
      >
        <template slot="menuLeft">
          <el-button
            type="danger"
            size="small"
            icon="el-icon-delete"
            plain
            v-if="permission.permit_delete"
            @click="handleDelete"
            >删 除
          </el-button>
        </template>
        <template slot-scope="{ type, size, row }" slot="menu">
          <el-button
            icon="icon-zhengjian"
            :size="size"
            :type="type"
            class="zhengJian-icon"
            @click.stop="handleCredentials(row)"
            >附件审查</el-button
          >
          <el-button
            icon="el-icon-edit"
            :size="size"
            :type="type"
            v-if="row.type == '2'"
            @click.stop="rowDel(row)"
            >备案审批
          </el-button>
          <el-button
            icon="el-icon-edit"
            :size="size"
            :type="type"
            @click.stop="viewLicense(row)"
            v-if="row.type == '0'"
            >打印备案证
          </el-button>
          <el-button
            icon="el-icon-edit"
            :size="size"
            :type="type"
            v-show="row.type == 0"
            @click.stop="viewLicensehuizhi(row)"
            >回执打印
          </el-button>
        </template>
        <template class="tdtype" slot-scope="{ row }" slot="type">
          <el-tag class="dtype">
            {{
              row.type == "0" ? "通过" : row.type == "1" ? "不通过" : "待审核"
            }}
            <i class="gz" v-if="row.type == '2'"></i>
            <i class="yj" v-if="row.type == '1'"></i>
            <i class="zc" v-if="row.type == '0'"></i>
          </el-tag>
        </template>
      </avue-crud>
    </basic-container>
    <div
      v-if="dialogVisible"
      class="dialogVisibles"
      :class="classStyle == 'print' ? 'printstyle' : ''"
    >
      <div
        id="licence_box"
        :class="classStyle == 'print' ? 'printstyle' : ''"
        ref="licence"
      >
        <div class="licence" id="licence" v-if="dialogVisible">
          <div class="licence-head">备案回执</div>
          <div class="head-tid">
            编号
            <span class="fontStyle">{{
              licenceData.row.organizationcode
            }}</span>
            <!-- 号 -->
          </div>
          <div class="licence-main">
            <div
              class="l-m-once"
              v-for="(item, index, key) in licenceData.chiden"
              :key="key"
            >
              <span class="l-m-o-title"> {{ index }}: </span>
              <span class="l-m-r-once">{{ item }}</span>
            </div>
          </div>
          <div class="licence-bottom">(公安机关印章)</div>
          <div class="l-bottom">
            <!-- 发证日期 -->
            <span class="l-b-t">{{
              licenceData.row.permitime.slice(0, 4)
            }}</span
            >年
            <span class="l-b-t">{{
              licenceData.row.permitime.slice(5, 7)
            }}</span>
            月
            <span class="l-b-t">{{
              licenceData.row.permitime.slice(8, 10)
            }}</span>
            日
          </div>
        </div>
        <span slot="footer" class="dialog-footer no-print PrintBut">
          <el-button type="primary" @click="Print">打 印</el-button>
          <el-button type="primary" @click="closePrint"> 取 消 </el-button>
        </span>
      </div>
    </div>
    <div
      v-if="dialogVisiblehuizhi"
      class="dialogVisibles"
      :class="classStyle == 'print' ? 'printstyle' : ''"
    >
      <div
        id="licence_box"
        :class="classStyle == 'print' ? 'printstyle' : ''"
        ref="licencehuizhi"
      >
        <div
          class="licencehuizhi exam-box"
          id="licencehuizhi"
          v-if="dialogVisiblehuizhi"
        >
          <h3>回执单</h3>
          <p>
            南昌市公安局已收到
            <span>{{ rowData == null ? "" : rowData.enterprisename }}</span>
            的相关备案申请!
          </p>
          <div class="examine-bottom">
            <ul>
              <li>审批单位:<span>南昌市公安局</span></li>
              <li>
                日期:<span>{{
                  rowData == null ? "" : rowData.examinetime
                }}</span>
              </li>
            </ul>
          </div>
        </div>
        <span slot="footer" class="dialog-footer no-print PrintBut">
          <el-button type="primary" @click="Printhuizhi">打 印</el-button>
          <el-button type="primary" @click="closePrinthuizhi">
            取 消
          </el-button>
        </span>
      </div>
    </div>
    <el-dialog
      title=""
      :visible.sync="dialogVisiblecc"
      width="30%"
      :modal-append-to-body="false"
    >
      <div class="flots">
        <span class="f_title">是否通过备案审批?</span>
        <span class="f_body">请输入修改意见:</span>
        <textarea
          name="reworkmes"
          cols="40"
          rows="4"
          style="overflow: hidden"
          v-model="textareaShenpi"
        ></textarea>
        <div class="but">
          <el-button type="danger" @click="subcc">不通过</el-button>
          <el-button type="primary" @click="closecc">通过</el-button>
        </div>
      </div>
    </el-dialog>
  </div>
</template>
<script>
import {
  getList,
  getDetail,
  add,
  update,
  remove,
} from "@/api/licenseApproval/record";
import { mapGetters } from "vuex";
import { column } from "./column";
export default {
  data() {
    return {
      classStyle: "print", //打印样式
      dialogVisiblecc: false, //许可证审核抽屉
      xukezData: {},
      dialogVisiblehuizhi: false, //回执
      dialogVisible: false, //许可证抽屉
      licenceData: {
        row: {},
        chiden: {},
      },
      textareaShenpi: "",
      form: {},
      query: {},
      loading: true,
      page: {
        pageSize: 10,
        currentPage: 1,
        total: 0,
      },
      selectionList: [],
      option: {
        height: "auto",
        calcHeight: 30,
        excelBtn: true,
        tip: false,
        searchShowBtn: false,
        searchShow: true,
        searchMenuSpan: 8,
        border: true,
        menuWidth: 378,
        labelWidth: 130,
        headerAlign: "center",
        align: "center",
        // border: false,
        index: true,
        viewBtn: true,
        selection: true,
        dialogClickModal: false,
        column: column,
      },
      data: [],
    };
  },
  computed: {
    ...mapGetters(["permission", "userInfo"]),
    permissionList() {
      return {
        addBtn: this.vaildData(this.permission.permit_add, false),
        viewBtn: this.vaildData(this.permission.permit_view, true),
        delBtn: this.vaildData(this.permission.permit_delete, false),
        editBtn: this.vaildData(this.permission.permit_edit, false),
      };
    },
    ids() {
      let ids = [];
      this.selectionList.forEach((ele) => {
        ids.push(ele.id);
      });
      return ids.join(",");
    },
  },
  // mounted() {
  //     console.log(this.userInfo.dept_id);
  // },
  methods: {
    Printhuizhi() {
      this.$Print(this.$refs.licencehuizhi);
    },
    Print() {
      this.$Print(this.$refs.licence);
    },
    handleCredentials(row) {
      this.$router.push({
        path: "/attachOnce/index",
        // redirect: { name: "foo" },
        // query: { row: row },
        query: { deptid: row.cardid, type: "3" },
        // params: { row: row.identificationnumber },
      });
    },
    rowSave(row, done, loading) {
      row.deptid = this.userInfo.dept_id;
      add(row).then(
        () => {
          this.onLoad(this.page);
          this.$message({
            type: "success",
            message: "操作成功!",
          });
          done();
        },
        (error) => {
          loading();
          window.console.log(error);
        }
      );
    },
    rowUpdate(row, index, done, loading) {
      update(row).then(
        () => {
          this.onLoad(this.page);
          this.$message({
            type: "success",
            message: "操作成功!",
          });
          done();
        },
        (error) => {
          loading();
          console.log(error);
        }
      );
    },
    rowDel(row) {
      this.dialogVisiblecc = true;
      this.xukezData = row;
    },
    closecc() {
      this.xukezData.type = "0";
      this.dialogVisiblecc = false;
      this.xukezData["approve"] = this.textareaShenpi;
      console.log(this.xukezData);
      update(this.xukezData);
      this.textareaShenpi = "";
    },
    subcc() {
      this.xukezData.type = "1";
      this.dialogVisiblecc = false;
      this.xukezData["approve"] = this.textareaShenpi;
      update(this.xukezData);
      this.textareaShenpi = "";
    },
    viewLicensehuizhi() {
      this.dialogVisiblehuizhi = true;
    },
    closePrinthuizhi() {
      this.dialogVisiblehuizhi = false;
    },
    viewLicense(row) {
      //查看许可证
      console.log(row, 34);
      this.licenceData.row = row;
      this.licenceData.chiden = {};
      this.licenceData.chiden["名称"] = row.enterprisename;
      this.licenceData.chiden["地址"] = row.address;
      this.licenceData.chiden["服务区域"] = row.industry;
      this.licenceData.chiden["法定代表人"] = row.representative;
      this.licenceData.chiden["备案时间"] = row.officetime;
      this.licenceData.chiden["备案内容"] = "自招保安单位备案";
      // this.licenceData.chiden["注册资本"] = row.registeredcapital;
      // this.licenceData.chiden["批准文号"] = row.registrationnumber;
      console.log(this.licenceData);
      this.dialogVisible = true;
    },
    closePrint() {
      this.dialogVisible = false;
    },
    handleDelete() {
      if (this.selectionList.length === 0) {
        this.$message.warning("请选择至少一条数据");
        return;
      }
      this.$confirm("确定将选择数据删除?", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          return remove(this.ids);
        })
        .then(() => {
          this.onLoad(this.page);
          this.$message({
            type: "success",
            message: "操作成功!",
          });
          this.$refs.crud.toggleSelection();
        });
    },
    beforeOpen(done, type) {
      if (["edit", "view"].includes(type)) {
        getDetail(this.form.id).then((res) => {
          this.form = res.data.data;
        });
      }
      done();
    },
    searchReset() {
      this.query = {};
      this.onLoad(this.page);
    },
    searchChange(params, done) {
      this.query = params;
      this.page.currentPage = 1;
      this.onLoad(this.page, params);
      done();
    },
    selectionChange(list) {
      this.selectionList = list;
    },
    selectionClear() {
      this.selectionList = [];
      this.$refs.crud.toggleSelection();
    },
    currentChange(currentPage) {
      this.page.currentPage = currentPage;
    },
    sizeChange(pageSize) {
      this.page.pageSize = pageSize;
    },
    refreshChange() {
      this.onLoad(this.page, this.query);
    },
    onLoad(page, params = {}) {
      this.loading = true;
      params["ptype"] = 3;
      getList(
        page.currentPage,
        page.pageSize,
        Object.assign(params, this.query)
      ).then((res) => {
        const data = res.data.data;
        this.page.total = data.total;
        this.data = data.records;
        this.loading = false;
        this.selectionClear();
      });
    },
    rowStyle({ row }) {
      if (row.dtype != null && row.dtype != "") {
        if (row.dtype == "2") {
          return {
            color: "#F34A4A",
          };
        }
        if (row.dtype == "1") {
          return {
            color: "#F48F57",
          };
        }
      }
    },
  },
};
</script>
<style scoped lang="scss">
.dtype {
  width: 80px;
}
.dx {
  position: absolute;
  top: 50%;
  margin-top: -5px;
  margin-left: 6px;
  width: 10px;
  height: 10px;
  border-radius: 30%;
  background: #dfdfdf;
}
.zc {
  position: absolute;
  top: 50%;
  margin-top: -5px;
  margin-left: 6px;
  width: 10px;
  height: 10px;
  border-radius: 30%;
  background: #29c093;
}
.yj {
  position: absolute;
  top: 50%;
  margin-top: -5px;
  margin-left: 6px;
  width: 10px;
  height: 10px;
  border-radius: 30%;
  background: #f34a4a;
}
.gz {
  position: absolute;
  top: 50%;
  margin-top: -5px;
  margin-left: 6px;
  width: 10px;
  height: 10px;
  border-radius: 30%;
  background: #f48f57;
}
.el-tag {
  display: inline-block;
  width: 80px;
  /*padding-right: 40px !important;*/
}
#licence_box {
  position: relative;
  top: 15px;
  width: 1080px;
  height: 780px;
  background-color: #004ca7;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.licence {
  width: 960px;
  height: 648px;
  background-color: #fff !important;
  background-image: url("/img/permit/服务许可背景图.png");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  box-sizing: border-box;
  padding: 10%;
  color: #000;
}
.licencehuizhi {
  width: 800px;
  height: 348px;
  background-color: #fff !important;
  // background-image: url("../../static/img/permit/服务许可背景图.png");
  border: 1px solid rgba(#a3a3a3, 0.5);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  box-sizing: border-box;
  padding: 10%;
  color: #000;
}
.licence-head {
  width: 100%;
  height: 1.8rem;
  font-size: 1.8rem;
  text-align: center;
}
.head-tid {
  position: relative;
  left: 70%;
}
.head-tid span {
  margin: 0 1rem;
}
.licence-main {
  width: 80%;
}
.l-m-once {
  width: 100%;
  height: 2rem;
  margin-top: 1rem;
}
.l-m-o-title {
  font-size: 1.3rem;
  width: 22%;
  text-align: justify;
  display: inline-block;
}
.l-m-r-once {
  font-size: 1.1rem;
  /* border: 1px solid #000; */
  display: inline-block;
  width: 77%;
}
.licence-bottom,
.l-bottom {
  position: relative;
  left: 60%;
  font-size: 1.5rem;
  margin-top: 0.5rem;
}
.dialogVisibles {
  position: fixed;
  top: 0;
  left: -10%;
  height: 0;
  width: 120%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.printstyle {
  background-color: #fff !important;
}
.PrintBut {
  margin-top: 15px;
}
.flots {
  display: flex;
  justify-content: space-between;
  flex-direction: column;
  span {
    display: inline-block;
  }
  .f_title {
    position: absolute;
    top: 15px;
    font-size: 18px;
  }
}
.but {
  margin-top: 20px;
  width: 100%;
  display: flex;
  align-content: center;
  justify-content: center;
}
.exam-box {
  width: 100%;
  height: 360px;
  position: relative;
  padding: 10px;
  background: #fff !important;
  color: #000;
  box-sizing: border-box;
}
.exam-box h3 {
  margin: 0;
  text-align: center;
  font-size: 28px;
  letter-spacing: 10px;
  line-height: 46px;
}
.exam-box p {
  text-indent: 2em;
  font-size: 18px;
}
.exam-box .examine-bottom {
  position: absolute;
  bottom: 10px;
  right: 10px;
}
.exam-box li {
  list-style: none;
  font-size: 18px;
  line-height: 32px;
}
.exam-box span {
  text-decoration: underline;
}
</style>
src/views/licenseApproval2/securityPermit.vue
New file
@@ -0,0 +1,616 @@
/*
 * @Author: liu
 * @Date: 2021-08-26 16:22:20
 * @Last Modified by: liu
 * @Last Modified time: 2021-09-22 11:29:43
 */
<template>
  <div>
    <basic-container class="permit">
      <avue-crud
        :option="option"
        :table-loading="loading"
        :data="data"
        :page.sync="page"
        :permission="permissionList"
        :before-open="beforeOpen"
        v-model="form"
        ref="crud"
        @row-update="rowUpdate"
        @row-save="rowSave"
        @row-del="rowDel"
        @search-change="searchChange"
        @search-reset="searchReset"
        @selection-change="selectionChange"
        @current-change="currentChange"
        @size-change="sizeChange"
        @refresh-change="refreshChange"
        @on-load="onLoad"
        :row-style="rowStyle"
      >
        <template slot="menuLeft">
          <el-button
            type="danger"
            size="small"
            icon="el-icon-delete"
            plain
            v-if="permission.permit_delete"
            @click="handleDelete"
            >删 除
          </el-button>
        </template>
        <template slot-scope="{ type, size, row }" slot="menu">
          <el-button
            icon="icon-zhengjian"
            :size="size"
            :type="type"
            class="zhengJian-icon"
            @click.stop="handleCredentials(row)"
            >附件查阅
          </el-button>
          <el-button
            icon="el-icon-edit"
            :size="size"
            :type="type"
            @click.stop="rowDel(row)"
            v-if="row.type == '2'"
            >许可审批
          </el-button>
          <el-button
            icon="el-icon-edit"
            :size="size"
            :type="type"
            @click.stop="viewLicense(row)"
            v-if="row.type == '0'"
            >打印许可证
          </el-button>
        </template>
        <template class="tdtype" slot-scope="{ row }" slot="type">
          <el-tag class="dtype">
            {{
              row.type == "0" ? "通过" : row.type == "1" ? "不通过" : "待审核"
            }}
            <i class="gz" v-if="row.type == '2'"></i>
            <i class="yj" v-if="row.type == '1'"></i>
            <i class="zc" v-if="row.type == '0'"></i>
          </el-tag>
        </template>
      </avue-crud>
    </basic-container>
    <!-- <el-dialog
      :visible.sync="dialogVisible"
      :before-close="handleClose"
      :modal-append-to-body="false"
      width="1005px"
      top="10vh"
      class="printstyle"
    >
      <div id="licence_box">
        <div class="licence" id="licence" v-if="dialogVisible">
          <div class="licence-head">保安服务许可证</div>
          <div class="head-tid">
            洪公保服务
            <span class="fontStyle">{{
              licenceData.row.organizationcode
            }}</span>
            号
          </div>
          <div class="licence-main">
            <div
              class="l-m-once"
              v-for="(item, index, key) in licenceData.chiden"
              :key="key"
            >
              <span class="l-m-o-title"> {{ index }}: </span>
              <span class="l-m-r-once">{{ item }}</span>
            </div>
          </div>
          <div class="licence-bottom">发证机关(南昌市公安局)</div>
          <div class="l-bottom">
            发证日期
            <span class="l-b-t">{{
              licenceData.row.permitime.slice(0, 4)
            }}</span
            >年
            <span class="l-b-t">{{
              licenceData.row.permitime.slice(5, 7)
            }}</span>
            月
            <span class="l-b-t">{{
              licenceData.row.permitime.slice(8, 10)
            }}</span>
            日
          </div>
        </div>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button type="primary" @click="Print">打 印</el-button>
      </span>
    </el-dialog> -->
    <div
      v-if="dialogVisible"
      class="dialogVisibles"
      :class="classStyle == 'print' ? 'printstyle' : ''"
    >
      <div
        id="licence_box"
        :class="classStyle == 'print' ? 'printstyle' : ''"
        ref="licence"
      >
        <div class="licence" id="licence" v-if="dialogVisible">
          <div class="licence-head">保安服务许可证</div>
          <div class="head-tid">
            洪公保服务
            <span class="fontStyle">{{
              licenceData.row.organizationcode
            }}</span>
            号
          </div>
          <div class="licence-main">
            <div
              class="l-m-once"
              v-for="(item, index, key) in licenceData.chiden"
              :key="key"
            >
              <span class="l-m-o-title"> {{ index }}: </span>
              <span class="l-m-r-once">{{ item }}</span>
            </div>
          </div>
          <div class="licence-bottom">发证机关(南昌市公安局)</div>
          <div class="l-bottom">
            发证日期
            <span class="l-b-t">{{
              licenceData.row.permitime.slice(0, 4)
            }}</span
            >年
            <span class="l-b-t">{{
              licenceData.row.permitime.slice(5, 7)
            }}</span>
            月
            <span class="l-b-t">{{
              licenceData.row.permitime.slice(8, 10)
            }}</span>
            日
          </div>
        </div>
        <span slot="footer" class="dialog-footer no-print PrintBut">
          <el-button type="primary" @click="Print">打 印</el-button>
          <el-button type="primary" @click="closePrint"> 取 消 </el-button>
        </span>
      </div>
    </div>
    <el-dialog
      title=""
      :visible.sync="dialogVisiblecc"
      width="30%"
      :modal-append-to-body="false"
    >
      <div class="flots">
        <span class="f_title">是否通过审核?</span>
        <span class="f_body">请输入修改意见:</span>
        <textarea
          name="reworkmes"
          cols="40"
          rows="4"
          style="overflow: hidden"
          v-model="textareaShenpi"
        ></textarea>
        <div class="but">
          <el-button type="danger" @click="subcc">不通过</el-button>
          <el-button type="primary" @click="closecc">通过</el-button>
        </div>
      </div>
    </el-dialog>
  </div>
</template>
<script>
import {
  getList,
  getDetail,
  add,
  update,
  remove,
} from "@/api/licenseApproval/permit";
import { mapGetters } from "vuex";
import { column } from "./column";
export default {
  data() {
    return {
      classStyle: "print", //打印样式
      dialogVisiblecc: false, //许可证审核抽屉
      xukezData: {},
      dialogVisible: false, //许可证抽屉
      licenceData: {
        row: {},
        chiden: {},
      },
      textareaShenpi: "",
      form: {},
      query: {},
      loading: true,
      page: {
        pageSize: 10,
        currentPage: 1,
        total: 0,
      },
      selectionList: [],
      option: {
        height: "auto",
        calcHeight: 30,
        excelBtn: true,
        tip: false,
        searchShowBtn: false,
        searchShow: true,
        searchMenuSpan: 8,
        border: true,
        menuWidth: 300,
        labelWidth: 130,
        headerAlign: "center",
        align: "center",
        // border: false,
        index: true,
        viewBtn: true,
        selection: true,
        dialogClickModal: false,
        column: column,
      },
      data: [],
    };
  },
  computed: {
    ...mapGetters(["permission", "userInfo"]),
    permissionList() {
      return {
        addBtn: this.vaildData(this.permission.permit_add, false),
        viewBtn: this.vaildData(this.permission.permit_view, true),
        delBtn: this.vaildData(this.permission.permit_delete, false),
        editBtn: this.vaildData(this.permission.permit_edit, false),
      };
    },
    ids() {
      let ids = [];
      this.selectionList.forEach((ele) => {
        ids.push(ele.id);
      });
      return ids.join(",");
    },
  },
  // mounted() {
  //     console.log(this.userInfo.dept_id);
  // },
  methods: {
    Print() {
      this.$Print(this.$refs.licence);
    },
    handleCredentials(row) {
      console.log(row, "21354");
      this.$router.push({
        path: "/attachOnce/index",
        // redirect: { name: "foo" },
        // query: { row: row },
        query: { deptid: row.cardid, type: "0" },
        // params: { row: row.identificationnumber },
      });
    },
    rowSave(row, done, loading) {
      row.deptid = this.userInfo.dept_id;
      add(row).then(
        () => {
          this.onLoad(this.page);
          this.$message({
            type: "success",
            message: "操作成功!",
          });
          done();
        },
        (error) => {
          loading();
          window.console.log(error);
        }
      );
    },
    rowUpdate(row, index, done, loading) {
      update(row).then(
        () => {
          this.onLoad(this.page);
          this.$message({
            type: "success",
            message: "操作成功!",
          });
          done();
        },
        (error) => {
          loading();
          console.log(error);
        }
      );
    },
    rowDel(row) {
      this.dialogVisiblecc = true;
      this.xukezData = row;
    },
    closecc() {
      this.xukezData.type = "0";
      this.dialogVisiblecc = false;
      this.xukezData["approve"] = this.textareaShenpi;
      console.log(this.xukezData);
      update(this.xukezData);
      this.textareaShenpi = "";
    },
    subcc() {
      this.xukezData.type = "1";
      this.dialogVisiblecc = false;
      this.xukezData["approve"] = this.textareaShenpi;
      update(this.xukezData);
      this.textareaShenpi = "";
    },
    viewLicense(row) {
      //查看许可证
      this.licenceData.row = row;
      this.licenceData.chiden = {};
      this.licenceData.chiden["名称"] = row.enterprisename;
      this.licenceData.chiden["住所"] = row.address;
      this.licenceData.chiden["法定代表人"] = row.representative;
      this.licenceData.chiden["服务范围"] = row.industry;
      this.licenceData.chiden["注册资本"] = row.registeredcapital;
      this.licenceData.chiden["批准文号"] = row.registrationnumber;
      console.log(this.licenceData);
      this.dialogVisible = true;
    },
    closePrint() {
      this.dialogVisible = false;
    },
    handleDelete() {
      if (this.selectionList.length === 0) {
        this.$message.warning("请选择至少一条数据");
        return;
      }
      this.$confirm("确定将选择数据删除?", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          return remove(this.ids);
        })
        .then(() => {
          this.onLoad(this.page);
          this.$message({
            type: "success",
            message: "操作成功!",
          });
          this.$refs.crud.toggleSelection();
        });
    },
    beforeOpen(done, type) {
      if (["edit", "view"].includes(type)) {
        getDetail(this.form.id).then((res) => {
          this.form = res.data.data;
        });
      }
      done();
    },
    searchReset() {
      this.query = {};
      this.onLoad(this.page);
    },
    searchChange(params, done) {
      this.query = params;
      this.page.currentPage = 1;
      this.onLoad(this.page, params);
      done();
    },
    selectionChange(list) {
      this.selectionList = list;
    },
    selectionClear() {
      this.selectionList = [];
      this.$refs.crud.toggleSelection();
    },
    currentChange(currentPage) {
      this.page.currentPage = currentPage;
    },
    sizeChange(pageSize) {
      this.page.pageSize = pageSize;
    },
    refreshChange() {
      this.onLoad(this.page, this.query);
    },
    onLoad(page, params = {}) {
      this.loading = true;
      params["ptype"] = 0;
      getList(
        page.currentPage,
        page.pageSize,
        Object.assign(params, this.query)
      ).then((res) => {
        const data = res.data.data;
        this.page.total = data.total;
        this.data = data.records;
        this.loading = false;
        this.selectionClear();
      });
    },
    rowStyle({ row }) {
      if (row.dtype != null && row.dtype != "") {
        if (row.dtype == "2") {
          return {
            color: "#F34A4A",
          };
        }
        if (row.dtype == "1") {
          return {
            color: "#F48F57",
          };
        }
      }
    },
  },
};
</script>
<style scoped lang="scss">
.dtype {
  width: 80px;
}
.dx {
  position: absolute;
  top: 50%;
  margin-top: -5px;
  margin-left: 6px;
  width: 10px;
  height: 10px;
  border-radius: 30%;
  background: #dfdfdf;
}
.zc {
  position: absolute;
  top: 50%;
  margin-top: -5px;
  margin-left: 6px;
  width: 10px;
  height: 10px;
  border-radius: 30%;
  background: #29c093;
}
.yj {
  position: absolute;
  top: 50%;
  margin-top: -5px;
  margin-left: 6px;
  width: 10px;
  height: 10px;
  border-radius: 30%;
  background: #f34a4a;
}
.gz {
  position: absolute;
  top: 50%;
  margin-top: -5px;
  margin-left: 6px;
  width: 10px;
  height: 10px;
  border-radius: 30%;
  background: #f48f57;
}
.el-tag {
  display: inline-block;
  width: 80px;
  /*padding-right: 40px !important;*/
}
#licence_box {
  position: relative;
  top: 15px;
  width: 1080px;
  height: 780px;
  background-color: #004ca7;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.licence {
  width: 960px;
  height: 648px;
  background-color: #fff !important;
  background-image: url("/img/permit/服务许可背景图.png");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  box-sizing: border-box;
  padding: 10%;
  color: #000;
}
.licence-head {
  width: 100%;
  height: 1.8rem;
  font-size: 1.8rem;
  text-align: center;
}
.head-tid {
  position: relative;
  left: 70%;
}
.head-tid span {
  margin: 0 1rem;
}
.licence-main {
  width: 80%;
}
.l-m-once {
  width: 100%;
  height: 2rem;
  margin-top: 1rem;
}
.l-m-o-title {
  font-size: 1.3rem;
  width: 22%;
  text-align: justify;
  display: inline-block;
}
.l-m-r-once {
  font-size: 1.1rem;
  /* border: 1px solid #000; */
  display: inline-block;
  width: 77%;
}
.licence-bottom,
.l-bottom {
  position: relative;
  left: 60%;
  font-size: 1.5rem;
  margin-top: 0.5rem;
}
.dialogVisibles {
  position: fixed;
  top: 0;
  left: -10%;
  height: 0;
  width: 120%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.printstyle {
  background-color: #fff !important;
}
.PrintBut {
  margin-top: 15px;
}
.flots {
  display: flex;
  justify-content: space-between;
  flex-direction: column;
  .f_title {
    position: absolute;
    top: 15px;
    font-size: 18px;
  }
}
.but {
  margin-top: 20px;
  width: 100%;
  display: flex;
  align-content: center;
  justify-content: center;
}
</style>
src/views/licenseApproval2/securityTraining.vue
New file
@@ -0,0 +1,615 @@
/*
 * @Author: liu
 * @Date: 2021-08-26 16:55:25
 * @Last Modified by: liu
 * @Last Modified time: 2021-11-04 19:31:06
 */
<template>
  <div>
    <basic-container class="permit">
      <avue-crud
        :option="option"
        :table-loading="loading"
        :data="data"
        :page.sync="page"
        :permission="permissionList"
        :before-open="beforeOpen"
        v-model="form"
        ref="crud"
        @row-update="rowUpdate"
        @row-save="rowSave"
        @row-del="rowDel"
        @search-change="searchChange"
        @search-reset="searchReset"
        @selection-change="selectionChange"
        @current-change="currentChange"
        @size-change="sizeChange"
        @refresh-change="refreshChange"
        @on-load="onLoad"
        :row-style="rowStyle"
      >
        <template slot="menuLeft">
          <el-button
            type="danger"
            size="small"
            icon="el-icon-delete"
            plain
            v-if="permission.permit_delete"
            @click="handleDelete"
            >删 除
          </el-button>
        </template>
        <template slot-scope="{ type, size, row }" slot="menu">
          <el-button
            icon="icon-zhengjian"
            :size="size"
            :type="type"
            class="zhengJian-icon"
            @click.stop="handleCredentials(row)"
            >附件查阅
          </el-button>
          <el-button
            icon="el-icon-edit"
            :size="size"
            :type="type"
            @click.stop="rowDel(row)"
            v-if="row.type == '2'"
            >许可审批
          </el-button>
          <el-button
            icon="el-icon-edit"
            :size="size"
            :type="type"
            @click.stop="viewLicense(row)"
            v-if="row.type == '0'"
            >打印许可证
          </el-button>
        </template>
        <template class="tdtype" slot-scope="{ row }" slot="type">
          <el-tag class="dtype">
            {{
              row.type == "0" ? "通过" : row.type == "1" ? "不通过" : "待审核"
            }}
            <i class="gz" v-if="row.type == '2'"></i>
            <i class="yj" v-if="row.type == '1'"></i>
            <i class="zc" v-if="row.type == '0'"></i>
          </el-tag>
        </template>
      </avue-crud>
    </basic-container>
    <!-- <el-dialog
      :visible.sync="dialogVisible"
      :before-close="handleClose"
      :modal-append-to-body="false"
      width="1005px"
      top="10vh"
      class="printstyle"
    >
      <div id="licence_box">
        <div class="licence" id="licence" v-if="dialogVisible">
          <div class="licence-head">保安服务许可证</div>
          <div class="head-tid">
            洪公保服务
            <span class="fontStyle">{{
              licenceData.row.organizationcode
            }}</span>
            号
          </div>
          <div class="licence-main">
            <div
              class="l-m-once"
              v-for="(item, index, key) in licenceData.chiden"
              :key="key"
            >
              <span class="l-m-o-title"> {{ index }}: </span>
              <span class="l-m-r-once">{{ item }}</span>
            </div>
          </div>
          <div class="licence-bottom">发证机关(南昌市公安局)</div>
          <div class="l-bottom">
            发证日期
            <span class="l-b-t">{{
              licenceData.row.permitime.slice(0, 4)
            }}</span
            >年
            <span class="l-b-t">{{
              licenceData.row.permitime.slice(5, 7)
            }}</span>
            月
            <span class="l-b-t">{{
              licenceData.row.permitime.slice(8, 10)
            }}</span>
            日
          </div>
        </div>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button type="primary" @click="Print">打 印</el-button>
      </span>
    </el-dialog> -->
    <div
      v-if="dialogVisible"
      class="dialogVisibles"
      :class="classStyle == 'print' ? 'printstyle' : ''"
    >
      <div
        id="licence_box"
        :class="classStyle == 'print' ? 'printstyle' : ''"
        ref="licence"
      >
        <div class="licence" id="licence" v-if="dialogVisible">
          <div class="licence-head">保安培训许可证</div>
          <div class="head-tid">
            洪公保服务
            <span class="fontStyle">{{
              licenceData.row.organizationcode
            }}</span>
            号
          </div>
          <div class="licence-main">
            <div
              class="l-m-once"
              v-for="(item, index, key) in licenceData.chiden"
              :key="key"
            >
              <span class="l-m-o-title"> {{ index }}: </span>
              <span class="l-m-r-once">{{ item }}</span>
            </div>
          </div>
          <div class="licence-bottom">发证机关(南昌市公安局)</div>
          <div class="l-bottom">
            发证日期
            <span class="l-b-t">{{
              licenceData.row.permitime.slice(0, 4)
            }}</span
            >年
            <span class="l-b-t">{{
              licenceData.row.permitime.slice(5, 7)
            }}</span>
            月
            <span class="l-b-t">{{
              licenceData.row.permitime.slice(8, 10)
            }}</span>
            日
          </div>
        </div>
        <span slot="footer" class="dialog-footer no-print PrintBut">
          <el-button type="primary" @click="Print">打 印</el-button>
          <el-button type="primary" @click="closePrint"> 取 消 </el-button>
        </span>
      </div>
    </div>
    <el-dialog
      title=""
      :visible.sync="dialogVisiblecc"
      width="30%"
      :modal-append-to-body="false"
    >
      <div class="flots">
        <span class="f_title">是否通过审核?</span>
        <span class="f_body">请输入修改意见:</span>
        <textarea
          name="reworkmes"
          cols="40"
          rows="4"
          style="overflow: hidden"
          v-model="textareaShenpi"
        ></textarea>
        <div class="but">
          <el-button type="danger" @click="subcc">不通过</el-button>
          <el-button type="primary" @click="closecc">通过</el-button>
        </div>
      </div>
    </el-dialog>
  </div>
</template>
<script>
import {
  getList,
  getDetail,
  add,
  update,
  remove,
} from "@/api/licenseApproval/permit";
import { mapGetters } from "vuex";
import { column } from "./column";
export default {
  data() {
    return {
      classStyle: "print", //打印样式
      dialogVisiblecc: false, //许可证审核抽屉
      xukezData: {},
      dialogVisible: false, //许可证抽屉
      licenceData: {
        row: {},
        chiden: {},
      },
      textareaShenpi: "",
      form: {},
      query: {},
      loading: true,
      page: {
        pageSize: 10,
        currentPage: 1,
        total: 0,
      },
      selectionList: [],
      option: {
        height: "auto",
        calcHeight: 30,
        excelBtn: true,
        tip: false,
        searchShowBtn: false,
        searchShow: true,
        searchMenuSpan: 8,
        border: true,
        menuWidth: 300,
        labelWidth: 130,
        headerAlign: "center",
        align: "center",
        // border: false,
        index: true,
        viewBtn: true,
        selection: true,
        dialogClickModal: false,
        column: column,
      },
      data: [],
    };
  },
  computed: {
    ...mapGetters(["permission", "userInfo"]),
    permissionList() {
      return {
        addBtn: this.vaildData(this.permission.permit_add, false),
        viewBtn: this.vaildData(this.permission.permit_view, true),
        delBtn: this.vaildData(this.permission.permit_delete, false),
        editBtn: this.vaildData(this.permission.permit_edit, false),
      };
    },
    ids() {
      let ids = [];
      this.selectionList.forEach((ele) => {
        ids.push(ele.id);
      });
      return ids.join(",");
    },
  },
  // mounted() {
  //     console.log(this.userInfo.dept_id);
  // },
  methods: {
    Print() {
      this.$Print(this.$refs.licence);
    },
    handleCredentials(row) {
      this.$router.push({
        path: "/attachOnce/index",
        // redirect: { name: "foo" },
        // query: { row: row },
        query: { deptid: row.cardid, type: "1" },
        // params: { row: row.identificationnumber },
      });
    },
    rowSave(row, done, loading) {
      row.deptid = this.userInfo.dept_id;
      add(row).then(
        () => {
          this.onLoad(this.page);
          this.$message({
            type: "success",
            message: "操作成功!",
          });
          done();
        },
        (error) => {
          loading();
          window.console.log(error);
        }
      );
    },
    rowUpdate(row, index, done, loading) {
      update(row).then(
        () => {
          this.onLoad(this.page);
          this.$message({
            type: "success",
            message: "操作成功!",
          });
          done();
        },
        (error) => {
          loading();
          console.log(error);
        }
      );
    },
    rowDel(row) {
      this.dialogVisiblecc = true;
      this.xukezData = row;
    },
    closecc() {
      this.xukezData.type = "0";
      this.dialogVisiblecc = false;
      this.xukezData["approve"] = this.textareaShenpi;
      console.log(this.xukezData);
      update(this.xukezData);
      this.textareaShenpi = "";
    },
    subcc() {
      this.xukezData.type = "1";
      this.dialogVisiblecc = false;
      this.xukezData["approve"] = this.textareaShenpi;
      update(this.xukezData);
      this.textareaShenpi = "";
    },
    viewLicense(row) {
      //查看许可证
      this.licenceData.row = row;
      this.licenceData.chiden = {};
      this.licenceData.chiden["名称"] = row.enterprisename;
      this.licenceData.chiden["住所"] = row.address;
      this.licenceData.chiden["法定代表人"] = row.representative;
      this.licenceData.chiden["服务范围"] = row.industry;
      this.licenceData.chiden["注册资本"] = row.registeredcapital;
      this.licenceData.chiden["批准文号"] = row.registrationnumber;
      console.log(this.licenceData);
      this.dialogVisible = true;
    },
    closePrint() {
      this.dialogVisible = false;
    },
    handleDelete() {
      if (this.selectionList.length === 0) {
        this.$message.warning("请选择至少一条数据");
        return;
      }
      this.$confirm("确定将选择数据删除?", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          return remove(this.ids);
        })
        .then(() => {
          this.onLoad(this.page);
          this.$message({
            type: "success",
            message: "操作成功!",
          });
          this.$refs.crud.toggleSelection();
        });
    },
    beforeOpen(done, type) {
      if (["edit", "view"].includes(type)) {
        getDetail(this.form.id).then((res) => {
          this.form = res.data.data;
        });
      }
      done();
    },
    searchReset() {
      this.query = {};
      this.onLoad(this.page);
    },
    searchChange(params, done) {
      this.query = params;
      this.page.currentPage = 1;
      this.onLoad(this.page, params);
      done();
    },
    selectionChange(list) {
      this.selectionList = list;
    },
    selectionClear() {
      this.selectionList = [];
      this.$refs.crud.toggleSelection();
    },
    currentChange(currentPage) {
      this.page.currentPage = currentPage;
    },
    sizeChange(pageSize) {
      this.page.pageSize = pageSize;
    },
    refreshChange() {
      this.onLoad(this.page, this.query);
    },
    onLoad(page, params = {}) {
      this.loading = true;
      params["ptype"] = 1;
      getList(
        page.currentPage,
        page.pageSize,
        Object.assign(params, this.query)
      ).then((res) => {
        const data = res.data.data;
        this.page.total = data.total;
        this.data = data.records;
        this.loading = false;
        this.selectionClear();
      });
    },
    rowStyle({ row }) {
      if (row.dtype != null && row.dtype != "") {
        if (row.dtype == "2") {
          return {
            color: "#F34A4A",
          };
        }
        if (row.dtype == "1") {
          return {
            color: "#F48F57",
          };
        }
      }
    },
  },
};
</script>
<style scoped lang="scss">
.dtype {
  width: 80px;
}
.dx {
  position: absolute;
  top: 50%;
  margin-top: -5px;
  margin-left: 6px;
  width: 10px;
  height: 10px;
  border-radius: 30%;
  background: #dfdfdf;
}
.zc {
  position: absolute;
  top: 50%;
  margin-top: -5px;
  margin-left: 6px;
  width: 10px;
  height: 10px;
  border-radius: 30%;
  background: #29c093;
}
.yj {
  position: absolute;
  top: 50%;
  margin-top: -5px;
  margin-left: 6px;
  width: 10px;
  height: 10px;
  border-radius: 30%;
  background: #f34a4a;
}
.gz {
  position: absolute;
  top: 50%;
  margin-top: -5px;
  margin-left: 6px;
  width: 10px;
  height: 10px;
  border-radius: 30%;
  background: #f48f57;
}
.el-tag {
  display: inline-block;
  width: 80px;
  /*padding-right: 40px !important;*/
}
#licence_box {
  position: relative;
  top: 15px;
  width: 1080px;
  height: 780px;
  background-color: #004ca7;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.licence {
  width: 960px;
  height: 648px;
  background-color: #fff !important;
  background-image: url("/img/permit/服务许可背景图.png");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  box-sizing: border-box;
  padding: 10%;
  color: #000;
}
.licence-head {
  width: 100%;
  height: 1.8rem;
  font-size: 1.8rem;
  text-align: center;
}
.head-tid {
  position: relative;
  left: 70%;
}
.head-tid span {
  margin: 0 1rem;
}
.licence-main {
  width: 80%;
}
.l-m-once {
  width: 100%;
  height: 2rem;
  margin-top: 1rem;
}
.l-m-o-title {
  font-size: 1.3rem;
  width: 22%;
  text-align: justify;
  display: inline-block;
}
.l-m-r-once {
  font-size: 1.1rem;
  /* border: 1px solid #000; */
  display: inline-block;
  width: 77%;
}
.licence-bottom,
.l-bottom {
  position: relative;
  left: 60%;
  font-size: 1.5rem;
  margin-top: 0.5rem;
}
.dialogVisibles {
  position: fixed;
  top: 0;
  left: -10%;
  height: 0;
  width: 120%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.printstyle {
  background-color: #fff !important;
}
.PrintBut {
  margin-top: 15px;
}
.flots {
  display: flex;
  justify-content: space-between;
  flex-direction: column;
  .f_title {
    position: absolute;
    top: 15px;
    font-size: 18px;
  }
}
.but {
  margin-top: 20px;
  width: 100%;
  display: flex;
  align-content: center;
  justify-content: center;
}
</style>
src/views/management/registerOLD.vue
@@ -671,15 +671,21 @@
    },
    initData(tenantId) {
      getRoleTree(tenantId).then((res) => {
        const column = this.findObject(this.option.group, "roleId");
        try {
          const column = this.findObject(this.option.group, "roleId");
        } catch (error) {}
        column.dicData = res.data.data;
      });
      getDeptTree(tenantId).then((res) => {
        const column = this.findObject(this.option.group, "deptId");
        try {
          const column = this.findObject(this.option.group, "deptId");
        } catch (error) {}
        column.dicData = res.data.data;
      });
      getPostList(tenantId).then((res) => {
        const column = this.findObject(this.option.group, "postId");
        try {
          const column = this.findObject(this.option.group, "postId");
        } catch (error) {}
        column.dicData = res.data.data;
      });
    },
src/views/qualificationExamination/qualificationExamination.vue
@@ -1,8 +1,8 @@
/*
 * @Author: Morpheus
 * @Date: 2021-07-07 17:30:05
 * @Last Modified by: Morpheus
 * @Last Modified time: 2021-07-10 16:06:14
 * @Last Modified by: liu
 * @Last Modified time: 2021-11-26 09:31:04
 * menu-name 监管信息
 */
<template>
@@ -178,6 +178,17 @@
            prop: "examinationType",
            // overHidden: true,
            sortable: true,
            type: "select",
            dicData: [
              {
                label: "正常",
                value: "0",
              },
              {
                label: "异常",
                value: "1",
              },
            ],
            // type: "date",
            // format: "yyyy-MM-dd",
            // valueFormat: "yyyy-MM-dd",
@@ -186,12 +197,11 @@
            //   labelWidth: 120,
            //   format: "yyyy-MM-dd",
            // },
            // // search: true,
            // searchSpan: 4,
            search: true,
            searchSpan: 4,
            // // display: false,
            // width: 180,
          },
          {
            label: "审查明细",
            prop: "examinationMx",
@@ -387,16 +397,19 @@
        this.page.total = data.total;
        var d = data.records;
        for (var k in d) {
          if (d[k]["examinationMx"] == "") {
            d[k]["examinationMx"] = "正常";
            d[k]["examinationType"] = "正常";
          } else {
            console.log(d[k]);
            d[k]["examinationType"] = "异常";
          }
          // if (d[k]["examinationMx"] == "") {
          //   d[k]["examinationMx"] = "正常";
          //   d[k]["examinationType"] = "正常";
          // } else {
          //   console.log(d[k]);
          //   d[k]["examinationType"] = "异常";
          // }
          // if (d[k]["examinationType"] == "") {
          //   d[k]["examinationType"] = "正常";
          // }
          if (!d[k].examinationType) {
            d[k].examinationType = "0";
          }
          var sfz = d[k].cardid.substring(6, 10);
          d[k]["age"] = this.getyears() - sfz;
        }
src/views/qualificationExamination/signQualificationExamination.vue
@@ -1,8 +1,8 @@
/*
 * @Author: Morpheus
 * @Date: 2021-07-07 17:30:05
 * @Last Modified by: Morpheus
 * @Last Modified time: 2021-07-10 16:06:14
 * @Last Modified by: liu
 * @Last Modified time: 2021-11-25 11:56:38
 * menu-name 监管信息
 */
<template>
@@ -26,23 +26,32 @@
      @refresh-change="refreshChange"
      @on-load="onLoad"
    >
      <template slot-scope="{ type, size, row }"
                      slot="menu">
                <el-button icon="el-icon-edit"
                           :size="size"
                           :type="type"
                           @click.stop="payTheFees(row)">审核
                </el-button>
      <template slot-scope="{ type, size, row }" slot="menu">
        <el-button
          icon="el-icon-edit"
          :size="size"
          :type="type"
          @click.stop="payTheFees(row)"
          >审核
        </el-button>
      </template>
      <template slot-scope="{ row }"
                      slot="examinationType">
          {{row.examinationType=="1"?"正常":row.examinationType=="2"?"异常":"正常"}}
      <template slot-scope="{ row }" slot="examinationType">
        {{
          row.examinationType == "1"
            ? "正常"
            : row.examinationType == "2"
            ? "异常"
            : "正常"
        }}
      </template>
      <template slot-scope="{ row }"
                      slot="auditStatus">
          {{row.auditStatus==1?"审核通过":row.auditStatus==2?"审核不通过":"待审核"}}
      <template slot-scope="{ row }" slot="auditStatus">
        {{
          row.auditStatus == 1
            ? "审核通过"
            : row.auditStatus == 2
            ? "审核不通过"
            : "待审核"
        }}
      </template>
    </avue-crud>
  </basic-container>
@@ -53,9 +62,7 @@
  getList,
  getListJSON,
} from "@/api/qualificationExamination/signQualificationExamination";
import {
  update
} from "@/api/apply/apply";
import { update } from "@/api/apply/apply";
import { mapGetters } from "vuex";
export default {
@@ -156,11 +163,22 @@
          {
            label: "审查状态",
            prop: "examinationType",
            slot:true,
            // slot: true,
            // // display: false,
            // width: 200,
            // labelWidth: 120,
            // overHidden: true,
            type: "select",
            dicData: [
              {
                label: "正常",
                value: "1",
              },
              {
                label: "不正常",
                value: "2",
              },
            ],
          },
          {
            label: "审查明细",
@@ -173,7 +191,8 @@
          {
            label: "审核状态",
            prop: "auditStatus",
            slot:true,
            slot: true,
            hide: true,
            // // display: false,
            // width: 200,
            // labelWidth: 120,
@@ -254,40 +273,44 @@
        }
      );
    },
    payTheFees (row) {
            console.log(row)
            this.$confirm("请确认是否审核通过?", {
                confirmButtonText: "审核通过",
                cancelButtonText: "审核不通过",
                type: "warning",
            })
                .then(() => {
                    var  data  ={
                      id:row.id,
                      auditStatus:1
                    }
                    return update(data).then(() => {
                        this.onLoad(this.page);
                        this.$message({
                            type: "success",
                            message: "操作成功!",
                        });
                    });
                })
                .catch(() => {
                    var  data  ={
                      id:row.id,
                      auditStatus:2
                    }
                    return update(data).then(() => {
                        this.onLoad(this.page);
                        this.$message({
                            type: "success",
                            message: "操作成功!",
                        });
                    });
                });
        },
    payTheFees(row) {
      console.log(row);
      this.$confirm("请确认是否审核通过?", {
        confirmButtonText: "审核通过",
        cancelButtonText: "审核不通过",
        type: "warning",
      })
        .then(() => {
          var data = {
            id: row.id,
            examinationType: "1",
          };
          return update(data).then(() => {
            this.onLoad(this.page);
            this.$message({
              type: "success",
              message: "操作成功!",
            });
          });
        })
        .catch((action) => {
          if (action !== "cancel") {
            return;
          }
          var data = {
            id: row.id,
            examinationType: "2",
          };
          return update(data).then(() => {
            this.onLoad(this.page);
            this.$message({
              type: "success",
              message: "操作成功!",
            });
          });
        });
    },
    rowUpdates(row, index, done, loading) {
      // console.log(42342);
      update(row).then(
@@ -367,13 +390,13 @@
        const data = res.data.data;
        this.page.total = data.total;
        var d = data.records;
        for (var k in d) {
          if (d[k].examinationType == 1) {
            d[k].examinationType = "正常";
          } else if (d[k].examinationType == 2) {
            d[k].examinationType = "异常";
          }
        }
        // for (var k in d) {
        //   if (d[k].examinationType == 1) {
        //     d[k].examinationType = "正常";
        //   } else if (d[k].examinationType == 2) {
        //     d[k].examinationType = "异常";
        //   }
        // }
        this.data = data.records;
        this.loading = false;
        // this.selectionClear();
src/views/securityGuardManagement/dispatchChildoperable.vue
@@ -14,6 +14,7 @@
        @row-del="rowDel1"
        @selection-change="selectionChange1"
        @refresh-change="refreshChange1"
        @on-load="onLoad1"
      >
      </avue-crud>
    </basic-container>
@@ -605,7 +606,7 @@
    // },
  },
  mounted() {
    this.onLoad1(this.page1, this.query1);
    // this.onLoad1(this.page1, this.query1);
    //去掉缓存
    // this.typeTABS = this.optionTABS.column[0];
    // var row = {};
src/views/securityGuardManagement/register.vue
@@ -1047,19 +1047,25 @@
    initData(tenantId) {
      getRoleTree(tenantId).then((res) => {
        try {
          const column = this.findObject(this.option.group, "roleId");
          try {
            const column = this.findObject(this.option.group, "roleId");
          } catch (error) {}
          column.dicData = res.data.data;
        } catch {}
      });
      getDeptTree(tenantId).then((res) => {
        try {
          const column = this.findObject(this.option.group, "deptId");
          try {
            const column = this.findObject(this.option.group, "deptId");
          } catch (error) {}
          column.dicData = res.data.data;
        } catch {}
      });
      getPostList(tenantId).then((res) => {
        try {
          const column = this.findObject(this.option.group, "postId");
          try {
            const column = this.findObject(this.option.group, "postId");
          } catch (error) {}
          column.dicData = res.data.data;
        } catch {}
      });
src/views/securityGuardManagement/registerOnce.vue
@@ -1,8 +1,8 @@
/*
 * @Author: Morpheus
 * @Date: 2021-07-05 16:31:54
 * @Last Modified by: Morpheus
 * @Last Modified time: 2021-07-10 15:41:13
 * @Last Modified by: liu
 * @Last Modified time: 2021-11-26 09:16:21
 * menu-name 保安员注册查询
 */
<template>
@@ -12,11 +12,11 @@
        <div class="box">
          <el-scrollbar>
            <basic-container>
              <avue-tree
              <!-- <avue-tree
                :option="treeOption"
                :data="treeData"
                @node-click="nodeClick"
              />
              /> -->
            </basic-container>
          </el-scrollbar>
        </div>
@@ -307,16 +307,42 @@
        lazy: true,
        treeLoad: function (node, resolve) {
          const parentId = node.level === 0 ? 0 : node.data.id;
          getDeptLazyTree(parentId).then((res) => {
            resolve(
              res.data.data.map((item) => {
                return {
                  ...item,
                  leaf: !item.hasChildren,
                };
              })
            );
          });
          if (parentId == 0) {
            getDeptLazyTree(parentId).then((res) => {
              resolve(
                res.data.data.map((item) => {
                  return {
                    ...item,
                    leaf: !item.hasChildren,
                  };
                })
              );
            });
          } else if (parentId == "1372091709474910209") {
            getDeptLazyTree(parentId).then((res) => {
              resolve(
                res.data.data[0].children.map((item) => {
                  return {
                    ...item,
                    leaf: !item.hasChildren,
                  };
                })
              );
            });
          } else {
            getDeptLazyTree(parentId).then((res) => {
              res.data.data = [];
              resolve(
                res.data.data.map((item) => {
                  return {
                    ...item,
                    leaf: !item.hasChildren,
                  };
                })
              );
            });
          }
        },
        addBtn: false,
        menu: false,
@@ -777,16 +803,22 @@
    },
    initData(tenantId) {
      getRoleTree(tenantId).then((res) => {
        const column = this.findObject(this.option.group, "roleId");
        column.dicData = res.data.data;
        try {
          const column = this.findObject(this.option.group, "roleId");
          column.dicData = res.data.data;
        } catch (error) {}
      });
      getDeptTree(tenantId).then((res) => {
        const column = this.findObject(this.option.group, "deptId");
        column.dicData = res.data.data;
        try {
          const column = this.findObject(this.option.group, "deptId");
          column.dicData = res.data.data;
        } catch (error) {}
      });
      getPostList(tenantId).then((res) => {
        const column = this.findObject(this.option.group, "postId");
        column.dicData = res.data.data;
        try {
          const column = this.findObject(this.option.group, "postId");
          column.dicData = res.data.data;
        } catch (error) {}
      });
    },
@@ -879,11 +911,11 @@
      if (this.departmentid) {
        deptId = this.departmentid;
      }
      params["deptId"] = deptId;
      getListSecurity(
        page.currentPage,
        page.pageSize,
        Object.assign(params, this.query),
        deptId
        Object.assign(params, this.query)
      ).then((res) => {
        const data = res.data.data;
        this.page.total = data.total;
src/views/statisticalQueryManagement/companyDetails.vue
@@ -30,7 +30,7 @@
      page: {
        pageSize: 10,
        currentPage: 1,
        total: 0
        total: 0,
      },
      query: {},
      value1: "",
@@ -98,32 +98,32 @@
            prop: "real_name",
            search: true,
            searchSpan: 4,
            display: false
            display: false,
          },
          {
            label: "所属保安公司",
            prop: "enterpriseName",
            width: 300,
            display: false
            display: false,
          },
          {
            label: "保安证编号",
            prop: "securitynumber",
            width: 180,
            display: false
            display: false,
          },
          {
            label: "身份证号",
            prop: "cardid",
            width: 180,
            display: false
            display: false,
          },
          {
            label: "联系方式",
            prop: "phone",
            width: 180,
            display: false
            display: false,
          },
          {
            label: "是否持证",
@@ -132,32 +132,32 @@
            type: "select",
            props: {
              label: "label",
              value: "value"
              value: "value",
            },
            // cascaderItem: ["city", "area"],
            // dicUrl:subofficeOptions,
            dicData: [
              {
                value: "1",
                label: "是"
                label: "是",
              },
              {
                value: "2",
                label: "否"
                label: "否",
              },
              {
                value: "3",
                label: "吊销"
              }
                label: "吊销",
              },
            ],
            search: true,
            rules: [
              {
                required: true,
                message: "请选择是否持证",
                trigger: "blur"
              }
            ]
                trigger: "blur",
              },
            ],
          },
          {
            label: "是否缴纳社保",
@@ -168,26 +168,26 @@
            type: "select",
            props: {
              label: "label",
              value: "value"
              value: "value",
            },
            dicData: [
              {
                value: "0",
                label: "是"
                label: "是",
              },
              {
                value: "1",
                label: "否"
              }
                label: "否",
              },
            ],
            search: true,
            rules: [
              {
                required: true,
                message: "请选择是否缴纳社保",
                trigger: "blur"
              }
            ]
                trigger: "blur",
              },
            ],
          },
          {
@@ -198,26 +198,26 @@
            type: "select",
            props: {
              label: "label",
              value: "value"
              value: "value",
            },
            dicData: [
              {
                value: "0",
                label: "是"
                label: "是",
              },
              {
                value: "1",
                label: "否"
              }
                label: "否",
              },
            ],
            search: true,
            rules: [
              {
                required: true,
                message: "请选择是否已采集照片",
                trigger: "blur"
              }
            ]
                trigger: "blur",
              },
            ],
          },
          {
            label: "资格审查情况",
@@ -227,26 +227,26 @@
            type: "select",
            props: {
              label: "label",
              value: "value"
              value: "value",
            },
            dicData: [
              {
                value: "0",
                label: "正常"
                label: "正常",
              },
              {
                value: "1",
                label: "异常"
              }
                label: "异常",
              },
            ],
            search: true,
            rules: [
              {
                required: true,
                message: "请选择资格审查情况",
                trigger: "blur"
              }
            ]
                trigger: "blur",
              },
            ],
          },
          // {
          //   label: "是否通过考试",
@@ -284,32 +284,32 @@
            type: "select",
            props: {
              label: "label",
              value: "value"
              value: "value",
            },
            dicData: [
              {
                value: "0",
                label: "是"
                label: "是",
              },
              {
                value: "1",
                label: "否"
              }
                label: "否",
              },
            ],
            search: true,
            rules: [
              {
                required: true,
                message: "请选择是否派遣",
                trigger: "blur"
              }
            ]
          }
        ]
                trigger: "blur",
              },
            ],
          },
        ],
      },
      companyName: "",
      loading: true,
      deptid: ""
      deptid: "",
    };
  },
  computed: {
@@ -319,9 +319,9 @@
        addBtn: this.vaildData(this.permission.post_add, false),
        viewBtn: this.vaildData(this.permission.post_view, false),
        delBtn: this.vaildData(this.permission.post_delete, false),
        editBtn: this.vaildData(this.permission.post_edit, false)
        editBtn: this.vaildData(this.permission.post_edit, false),
      };
    }
    },
  },
  methods: {
    searchChange(params, done) {
@@ -372,7 +372,8 @@
        params["soil"] || params["soil"] == "0" ? Number(params["soil"]) : "";
      param["current"] = page.currentPage;
      param["size"] = page.pageSize;
      selectUIn(param).then(res => {
      // console.log(this.fwdeptId, 1);
      selectUIn(param).then((res) => {
        const data = res.data.data;
        this.page.total = data.total;
        this.tableData = data.records;
@@ -397,7 +398,8 @@
  mounted() {
    // this.getTableData();
    // this.getLocationParams();
  }
    // console.log(this.fwdeptId, 2);
  },
};
</script>
<style lang="scss" scoped>
src/views/statisticalQueryManagement/securityGuardStatistics.vue
@@ -25,6 +25,7 @@
      append-to-body
      :visible.sync="dialogShow"
      v-if="dialogShow"
      top="10px"
    >
      <companyDetails :fwdeptId="fwdeptId"></companyDetails>
      <!-- <avue-crud
@@ -46,21 +47,21 @@
import { mapGetters } from "vuex";
import {
  selectLi,
  dictionaryList
  dictionaryList,
} from "../../api/statisticalQueryManagement/statisticalQueryManagement";
import { lazyTreeJu, lazyTrees } from "../../api/index/index";
import companyDetails from "./companyDetails";
export default {
  name: "业务情况统计",
  components: {
    companyDetails
    companyDetails,
  },
  data() {
    return {
      page: {
        pageSize: 10,
        currentPage: 1,
        total: 0
        total: 0,
      },
      query: {},
      value1: "",
@@ -92,7 +93,7 @@
            search: true,
            searchSpan: 4,
            width: 300,
            display: false
            display: false,
          },
          {
            label: "单位类型",
@@ -103,9 +104,9 @@
            type: "select",
            props: {
              label: "dictValue",
              value: "dictKey"
              value: "dictKey",
            },
            dicData: []
            dicData: [],
          },
          {
            label: "所属辖区",
@@ -114,7 +115,7 @@
            type: "tree",
            props: {
              label: "title",
              value: "value"
              value: "value",
            },
            // dicUrl: "/api/information/lazyTreeJu",
            // dicMethod:'post',
@@ -124,29 +125,29 @@
              {
                required: true,
                message: "请选择所属辖区",
                trigger: "blur"
              }
            ]
                trigger: "blur",
              },
            ],
          },
          {
            label: "保安员总数",
            prop: "num",
            display: false
            display: false,
          },
          {
            label: "持证上岗人数",
            prop: "cznum",
            display: false
            display: false,
          },
          {
            label: "未派遣人数",
            prop: "wpaiqnum",
            display: false
            display: false,
          },
          {
            label: "派遣人数",
            prop: "paiqnum",
            display: false
            display: false,
          },
          // {
          //   label: "未采集照片人数",
@@ -156,17 +157,17 @@
          {
            label: "已采集照片人数",
            prop: "ycaijzpnum",
            display: false
            display: false,
          },
          {
            label: "已采集指纹人数",
            prop: "ycaijzwnum",
            display: false
            display: false,
          },
          {
            label: "资格审查异常人数",
            prop: "yicnum",
            display: false
            display: false,
          },
          // {
          //   label: "过考保安人数",
@@ -176,14 +177,14 @@
          {
            label: "缴纳社保人数",
            prop: "sbnum",
            display: false
          }
        ]
            display: false,
          },
        ],
      },
      companyName: "",
      loading: true,
      dialogShow: false,
      dialogTitle: ""
      dialogTitle: "",
    };
  },
  computed: {
@@ -193,15 +194,15 @@
        addBtn: this.vaildData(this.permission.post_add, false),
        viewBtn: this.vaildData(this.permission.post_view, false),
        delBtn: this.vaildData(this.permission.post_delete, false),
        editBtn: this.vaildData(this.permission.post_edit, false)
        editBtn: this.vaildData(this.permission.post_edit, false),
      };
    }
    },
  },
  methods: {
    getSubOfficeData() {
      lazyTrees().then(res => {
      lazyTrees().then((res) => {
        if (res.data.code === 200) {
          this.tableOption.column.forEach(item => {
          this.tableOption.column.forEach((item) => {
            if (item.label == "所属辖区") {
              // let data = res.data.data;
              item.dicData = res.data.data;
@@ -223,9 +224,9 @@
    //   });
    // },
    getDictionaryList() {
      dictionaryList().then(res => {
      dictionaryList().then((res) => {
        if (res.data.code === 200) {
          this.tableOption.column.forEach(item => {
          this.tableOption.column.forEach((item) => {
            if (item.label == "单位类型") {
              item.dicData = res.data.data;
            }
@@ -263,7 +264,7 @@
      param["stats"] = params["stats"] || "";
      param["current"] = page.currentPage;
      param["size"] = page.pageSize;
      selectLi(param).then(res => {
      selectLi(param).then((res) => {
        const data = res.data.data;
        this.page.total = data.total;
        this.tableData = data.records;
@@ -273,7 +274,7 @@
    handleRowClick(row, column, cell, event) {
      if (column.label == "保安员总数") {
        this.dialogTitle = "保安员明细";
        this.fwdeptId = row.dept_id;
        this.fwdeptId = row.departmentid;
        this.dialogShow = true;
      } else {
        this.dialogShow = false;
@@ -281,12 +282,12 @@
      // this.$router.push({
      //   path: "/statisticalQueryManagement/companyDetails?deptid=" + row.dept_id
      // });
    }
    },
  },
  mounted() {
    this.getSubOfficeData();
    this.getDictionaryList();
  }
  },
};
</script>
<style lang="scss" scoped>
src/views/system/user.vue
@@ -747,15 +747,21 @@
    },
    initData(tenantId) {
      getRoleTree(tenantId).then((res) => {
        const column = this.findObject(this.option.group, "roleId");
        try {
          const column = this.findObject(this.option.group, "roleId");
        } catch (error) {}
        column.dicData = res.data.data;
      });
      getDeptTree(tenantId).then((res) => {
        const column = this.findObject(this.option.group, "deptId");
        try {
          const column = this.findObject(this.option.group, "deptId");
        } catch (error) {}
        column.dicData = res.data.data;
      });
      getPostList(tenantId).then((res) => {
        const column = this.findObject(this.option.group, "postId");
        try {
          const column = this.findObject(this.option.group, "postId");
        } catch (error) {}
        column.dicData = res.data.data;
      });
    },
@@ -794,6 +800,7 @@
      row.deptId = row.deptId.join(",");
      row.roleId = row.roleId.join(",");
      row.postId = row.postId.join(",");
      delete row.rtime;
      update(row).then(
        () => {
          this.initFlag = false;