保安监管系统-验收版本
liuyg
2021-11-25 43cf39c8e20a423537015d8ff459f5db32ac4fcb
逐级审批
3 files modified
233 ■■■■ changed files
src/api/licenseApproval/permit.js 2 ●●● patch | view | raw | blame | history
src/views/licenseApproval/securityGuard.vue 45 ●●●●● patch | view | raw | blame | history
src/views/licenseApproval/securityPermit.vue 186 ●●●●● 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/views/licenseApproval/securityGuard.vue
@@ -2,7 +2,7 @@
 * @Author: liu
 * @Date: 2021-08-26 16:57:58 
 * @Last Modified by: liu
 * @Last Modified time: 2021-11-25 15:51:45
 * @Last Modified time: 2021-11-25 17:38:08
 */
@@ -62,7 +62,7 @@
            @click.stop="rowDel(row)"
            >备案审批
          </el-button>
          <!-- <el-button
          <el-button
            icon="el-icon-edit"
            :size="size"
            :type="type"
@@ -76,7 +76,7 @@
            "
            @click.stop="rowSee(row)"
            >审批查询
          </el-button> -->
          </el-button>
          <el-button
            icon="el-icon-brush"
            :size="size"
@@ -107,12 +107,9 @@
                ? "不通过"
                : "待审核"
            }}
            <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>
@@ -188,7 +185,9 @@
          <h3>回执单</h3>
          <p>
            南昌市公安局已收到
            <span>{{ rowData == null ? "" : rowData.enterprisename }}</span>
            <span>{{
              licenceData == null ? "" : licenceData.row.enterprisename
            }}</span>
            的相关备案申请!
          </p>
@@ -197,7 +196,9 @@
              <li>审批单位:<span>南昌市公安局</span></li>
              <li>
                日期:<span>{{
                  rowData == null ? "" : rowData.examinetime
                  licenceData.row.permitime == null
                    ? ""
                    : licenceData.row.permitime
                }}</span>
              </li>
            </ul>
@@ -439,6 +440,10 @@
        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);
@@ -453,13 +458,14 @@
        this.textareaShenpi = "";
      });
    },
    viewLicensehuizhi() {
    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;
@@ -474,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;
@@ -576,18 +584,19 @@
      console.log(this.userInfo);
      if (this.userInfo.role_name == "公安管理员") {
        let test = /派出所$/g;
        if (test.test(this.userInfo.role_name)) {
        if (test.test(this.userInfo.list.name)) {
          gonganj = "派出所管理员";
        }
        test = /分局|公安局$/g;
        if (test.test(this.userInfo.role_name)) {
        if (test.test(this.userInfo.list.name)) {
          gonganj = "县局管理员";
        }
        test = /市公安局$/g;
        if (test.test(this.userInfo.role_name)) {
        if (test.test(this.userInfo.list.name)) {
          gonganj = "市局管理员";
        }
      }
      // console.log(gonganj);
      this.userData =
        gonganj == "派出所管理员" ? "2" : gonganj == "县局管理员" ? "1" : "0";
      params = {
@@ -597,7 +606,7 @@
      console.log(params, "params");
      params["jurisdiction"] = this.userInfo.jurisdiction;
      // params["usetype"] = this.userData;
      this.option.column[this.option.column.length - 2].prop = "opinionOur";
      // this.option.column[this.option.column.length - 2].prop = "opinionOur";
      // return;
      getList(
        page.currentPage,
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:39:39
 */
<template>
@@ -55,7 +55,7 @@
            :size="size"
            :type="type"
            @click.stop="rowDel(row)"
            v-if="row.type == '2'"
            v-if="row.stateOur == '0'"
            >许可审批
          </el-button>
          <el-button
@@ -63,18 +63,24 @@
            :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 +212,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 +284,13 @@
        column: column,
      },
      data: [],
      user_name: "",
      stateOur: "",
      stateText: "",
      dialogVisibleccsee: false,
      userData: "",
    };
  },
  computed: {
@@ -335,6 +361,73 @@
          console.log(error);
        }
      );
    },
    rowDel(row) {
      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.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 = "";
      });
    },
    rowDel(row) {
      this.dialogVisiblecc = true;
@@ -429,9 +522,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 +596,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();
      });