From 5455230326af3e930771fbb688536b3483f076b7 Mon Sep 17 00:00:00 2001
From: lin <sbla5888@163.com>
Date: Wed, 08 May 2024 16:33:55 +0800
Subject: [PATCH] 无诈调整

---
 src/components/Approval/Approval.vue |  545 ++++++++++++++++++++++++++---------------------------
 1 files changed, 269 insertions(+), 276 deletions(-)

diff --git a/src/components/Approval/Approval.vue b/src/components/Approval/Approval.vue
index b41e0a8..dc701bd 100644
--- a/src/components/Approval/Approval.vue
+++ b/src/components/Approval/Approval.vue
@@ -2,28 +2,12 @@
   <div v-if="ApprovalShow">
     <slot name="close"></slot>
     <basic-container class="Approval">
-      <avue-crud
-        :option="option1"
-        :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 class="tdtype" slot-scope="{ row }" slot="type">
+      <avue-crud :option="option1" :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 class="tdtype" slot-scope="{ row }" slot="type">
           <el-tag class="dtype">
             {{
               row.type == "0" ? "通过" : row.type == "1" ? "不通过" : "待审核"
@@ -32,25 +16,15 @@
             <i class="yj" v-if="row.type == '1'"></i>
             <i class="zc" v-if="row.type == '2'"></i>
           </el-tag>
-        </template>
+        </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="icon-zhengjian" :size="size" :type="type" class="zhengJian-icon"
+            @click.stop="handleCredentials(row)">查看</el-button>
         </template>
       </avue-crud>
     </basic-container>
     <div class="seeOnces" v-if="openOnceShow">
-      <i
-        class="el-icon-close openOnceCLoce"
-        style="color: #000 !important"
-        @click="openClose"
-      >
+      <i class="el-icon-close openOnceCLoce" style="color: #000 !important" @click="openClose">
       </i>
       <div class="seeOncesMain">
         <cardPopuponce class="openOnce" :paredData="paredData"></cardPopuponce>
@@ -60,257 +34,276 @@
 </template>
 
 <script>
-import {
-  getDetail,
-  getList,
-  getListre,
-  getListrek,
-  getListrev,
-} from "@/api/permit/permit";
-import { mapGetters } from "vuex";
-import cardPopuponce from "../cardPopup/cardPopuponce.vue";
-export default {
-  components: {
-    cardPopuponce,
-  },
-  props: {
-    visible: {
-      type: Boolean,
-      default: false,
+  import {
+    getDetail,
+    getList,
+    getListre,
+    getListrek,
+    getListrev,
+  } from "@/api/permit/permit";
+  import {
+    mapGetters
+  } from "vuex";
+  import cardPopuponce from "../cardPopup/cardPopuponce.vue";
+  export default {
+    components: {
+      cardPopuponce,
     },
-    data: {
-      type: Array,
-      default: [],
+    props: {
+      visible: {
+        type: Boolean,
+        default: false,
+      },
+      data: {
+        type: Array,
+        default: [],
+      },
     },
-  },
-  computed: {
-    ...mapGetters(["ApprovalShow", "userInfo"]),
-  },
-  created() {
-    var d = this.data,
-      b = [];
-    for (var k in d) {
-      // console.log({
-      //   label: d[k].menuName,
-      //   value: d[k].type + "",
-      // });
-      b.push({
-        label: d[k].menuName,
-        value: d[k].type + "",
-      });
-    }
-    this.option1.column[1].dicData = b;
-  },
-  data() {
-    return {
-      useWhere: "",
-      paredData: "",
-      openOnceShow: false,
+    computed: {
+      ...mapGetters(["ApprovalShow", "userInfo"]),
+    },
+    created() {
 
-      data: [],
-      query: {},
-      loading: false,
-      page: {
-        pageSize: 10,
-        currentPage: 1,
-        total: 0,
-      },
-      option1: {
-        delBtn: false,
-        editBtn: false,
-        addBtn: false,
-        height: "auto",
-        calcHeight: 260,
-        tip: false,
-        searchShow: true,
-        searchMenuSpan: 8,
-        labelWidth: 130,
-        menuWidth: 100,
-        headerAlign: "center",
-        align: "center",
-        border: true,
-        index: true,
-        viewBtn: false,
-        selection: true,
-        dialogClickModal: false,
-        column: [
-          {
-            label: "企业名称",
-            prop: "enterprisename",
-            labelWidth: 160,
-            span: 12,
-            rules: [
-              {
-                required: true,
-                message: "请输入企业名称",
-                trigger: "blur",
-              },
-            ],
-          },
-          {
-            label: "许可类型",
-            prop: "ptype",
-            type: "select",
-            dicData: [],
-          },
-          {
-            label: "审批意见",
-            prop: "approve",
-          },
-          {
-            label: "提交时间",
-            prop: "permitime",
-            addDisplay: false,
-            type: "date",
-            format: "yyyy-MM-dd HH:mm:ss",
-            valueFormat: "yyyy-MM-dd HH:mm:ss",
-          },
-          {
-            label: "截止受理时间",
-            prop: "overtime",
-            addDisplay: false,
-            type: "date",
-            format: "yyyy-MM-dd",
-            valueFormat: "yyyy-MM-dd",
-          },
-          {
-            label: "所属辖区",
-            prop: "jurisdiction",
-            type: "tree",
-            dicUrl: "/api/jurisdiction/lazy-trees",
-            // hide: true,
-            props: {
-              label: "title",
-              value: "id",
+    },
+    data() {
+      return {
+        useWhere: "",
+        paredData: "",
+        openOnceShow: false,
+
+        data: [],
+        query: {},
+        loading: false,
+        page: {
+          pageSize: 10,
+          currentPage: 1,
+          total: 0,
+        },
+        option1: {
+          delBtn: false,
+          editBtn: false,
+          addBtn: false,
+          height: "auto",
+          calcHeight: 260,
+          tip: false,
+          searchShow: false,
+          // searchMenuSpan: 8,
+          labelWidth: 130,
+          menuWidth: 100,
+          headerAlign: "center",
+          align: "center",
+          border: true,
+          index: true,
+          viewBtn: false,
+          selection: true,
+          dialogClickModal: false,
+          column: [{
+              label: "场所名称",
+              prop: "placeName",
+              span: 24,
+              row: true,
+              searchSpan: 4,
+              search: true,
+              align: 'center'
             },
-            labelWidth: 160,
-            span: 12,
-            rules: [
-              {
-                required: true,
-                message: "请输入发证时间",
-                trigger: "blur",
+            {
+              label: "场所地址",
+              prop: "location",
+              span: 24,
+              row: true,
+              searchSpan: 4,
+              searchLabelWidth: 46,
+              overHidden: true,
+              align: 'center'
+            }, {
+              label: "无诈类别",
+              prop: "noExplosionCategory",
+              align: 'center',
+              dicUrl: "/api/blade-system/dict-biz/tree?code=noExplosionCategory",
+              props: {
+                label: "title",
+                value: "key",
               },
-            ],
-          },
-          {
-            label: "审核状态",
-            prop: "type",
-            addDisplay: false,
-            type: "select",
-            dicData: [
-              {
-                label: "通过",
-                value: "0",
-              },
-              {
-                label: "不通过",
-                value: "1",
-              },
-              {
-                label: "待审核",
-                value: "2",
-              },
-            ],
-          },
-        ],
+              type: 'select',
+              search: true,
+              searchSpan: 4,
+              searchLabelWidth: 96,
+              align: 'center'
+            }, {
+              label: "所属街道",
+              prop: "streetName",
+              span: 24,
+              row: true,
+              searchSpan: 4,
+              search: true,
+              align: 'center'
+            },
+            {
+              label: "所属社区",
+              prop: "communityName",
+              span: 24,
+              row: true,
+              searchSpan: 4,
+              search: true,
+              width: 160,
+              overHidden: true,
+              align: 'center'
+            },
+            {
+              label: "派出所",
+              prop: "pcsName",
+              span: 24,
+              row: true,
+              searchSpan: 4,
+              search: true,
+              align: 'center'
+            },
+
+            {
+              label: "场所负责人",
+              prop: "principal",
+              span: 24,
+              row: true,
+              searchSpan: 4,
+              search: true,
+              align: 'center'
+            },
+            {
+              label: "场所负责人电话",
+              prop: "principalPhone",
+              span: 24,
+              row: true,
+              slot: true,
+              searchSpan: 4,
+              align: 'center'
+            },
+            // {
+            //   label: "无诈上报数量",
+            //   prop: "number",
+            //   span: 24,
+            //   row: true,
+            //   slot: true,
+            //   searchSpan: 4,
+            //   align: 'center'
+            // },
+            // {
+            //   width: 110,
+            //   label: "审核状态",
+            //   prop: "status",
+            //   span: 24,
+            //   align: 'center',
+            //   slot: true,
+            // },
+            {
+              label: "创建时间",
+              prop: "createTime",
+              span: 24,
+              row: true,
+              searchSpan: 4,
+              searchLabelWidth: 46,
+              align: 'center'
+            },
+
+            {
+              label: "审核状态",
+              prop: "status",
+              addDisplay: false,
+              type: "select",
+              dicData: [{
+                  label: "待审核",
+                  value: 1,
+                },
+                {
+                  label: "已审核",
+                  value: 2,
+                },
+                {
+                  label: "未通过",
+                  value: 3,
+                }, {
+                  label: "待完成",
+                  value: 4,
+                },
+              ],
+            },
+          ],
+        },
+      };
+    },
+    methods: {
+      refreshChange() {
+        this.onLoad(this.page);
       },
-    };
-  },
-  methods: {
-    refreshChange() {
-      this.onLoad(this.page);
-    },
-    beforeOpen(done, type) {
-      if (["edit", "view"].includes(type)) {
-        getDetail(this.form.id).then((res) => {
-          this.form = res.data.data;
-        });
-      }
-      done();
-    },
-    handleCredentials(val) {
-      this.openOnceShow = true;
-      this.paredData = val;
-      // console.log(val);
-    },
-    openClose() {
-      this.paredData = "";
-      this.openOnceShow = false;
-    },
-    onLoad(page, params = {}) {
-      this.loading = true;
-      //   console.log(this.userInfo);
-      params["cardid"] = this.userInfo.Id;
-      var num = 0;
-      getList(
-        page.currentPage,
-        page.pageSize,
-        Object.assign(params, this.query)
-      ).then((res) => {
-        num += res.data.data.total;
-        this.data = res.data.data.records;
-        this.loading = false;
-        getListre(
+      beforeOpen(done, type) {
+        if (["edit", "view"].includes(type)) {
+          // getDetail(this.form.id).then((res) => {
+          //   this.form = res.data.data;
+          // });
+        }
+        done();
+      },
+      handleCredentials(val) {
+        this.openOnceShow = true;
+        this.paredData = val;
+        // console.log(val);
+      },
+      openClose() {
+        this.paredData = "";
+        this.openOnceShow = false;
+      },
+      onLoad(page, params = {}) {
+        console.log("userId*****" + window.localStorage.getItem("saber-userInfo"))
+        console.log("userId2*****" + JSON.parse(window.localStorage.getItem("saber-userInfo")).content.user_id)
+        this.loading = true;
+        params.createUser = JSON.parse(window.localStorage.getItem("saber-userInfo")).content.user_id
+        getList(
           page.currentPage,
           page.pageSize,
           Object.assign(params, this.query)
-        ).then((ress) => {
-          num += ress.data.data.total;
-          this.data = this.data.concat(ress.data.data.records);
-          getListrek(
-            page.currentPage,
-            page.pageSize,
-            Object.assign(params, this.query)
-          ).then((resk) => {
-            num += resk.data.data.total;
-            this.data = this.data.concat(resk.data.data.records);
-            getListrev(
-              page.currentPage,
-              page.pageSize,
-              Object.assign(params, this.query)
-            ).then((resv) => {
-              num += resv.data.data.total;
-              this.data = this.data.concat(resv.data.data.records);
-              this.page.total = num;
-            });
-          });
+        ).then((res) => {
+          this.loading = false;
+          this.page.total = res.data.data.total;
+          this.data = res.data.data.records;
+
         });
-      });
+      },
     },
-  },
-};
+  };
 </script>
 
 <style lang="scss">
-.seeOnces {
-  position: absolute;
-  top: -50px;
-  left: 6px;
-  width: 1251px;
-  height: 850px;
-  background-color: #fff;
-  z-index: 10;
-  border-radius: 4px;
-}
-.openOnce {
-  width: 100%;
-  height: 100%;
-}
-.seeOncesMain {
-  width: 100%;
-  height: 100%;
-  overflow: scroll;
-}
-.openOnceCLoce {
-  position: absolute;
-  top: 17px;
-  font-size: 20px;
-  right: 11px;
-  z-index: 10;
-  color: #fff;
-}
-.openOnceCLoce:hover {
-  color: red;
-}
-</style>
\ No newline at end of file
+  .seeOnces {
+    position: absolute;
+    top: -50px;
+    left: 6px;
+    width: 1251px;
+    height: 850px;
+    background-color: #fff;
+    z-index: 10;
+    border-radius: 4px;
+  }
+
+  .openOnce {
+    width: 100%;
+    height: 100%;
+  }
+
+  .seeOncesMain {
+    width: 100%;
+    height: 100%;
+    overflow: scroll;
+  }
+
+  .openOnceCLoce {
+    position: absolute;
+    top: 17px;
+    font-size: 20px;
+    right: 11px;
+    z-index: 10;
+    color: #fff;
+  }
+
+  .openOnceCLoce:hover {
+    color: red;
+  }
+</style>

--
Gitblit v1.9.3