From 127188cb84a91dd76bf467423501436b94e019de Mon Sep 17 00:00:00 2001
From: guanqb <18720758508@163.com>
Date: Fri, 02 Feb 2024 15:55:17 +0800
Subject: [PATCH] 九小场所修改

---
 src/views/publicSecurity/ninePlaceManage/archivesManage.vue         |  109 +++++++++++++-
 src/views/publicSecurity/ninePlaceManage/situationRectification.vue |   84 ++++++++++-
 src/api/publicSecurity/ninePlaceManage.js                           |   40 +++++
 src/views/publicSecurity/ninePlaceManage/hiddenDangerStatistics.vue |  174 ++++++++++++++++++------
 4 files changed, 341 insertions(+), 66 deletions(-)

diff --git a/src/api/publicSecurity/ninePlaceManage.js b/src/api/publicSecurity/ninePlaceManage.js
new file mode 100644
index 0000000..a6aea67
--- /dev/null
+++ b/src/api/publicSecurity/ninePlaceManage.js
@@ -0,0 +1,40 @@
+import request from "@/router/axios"
+
+// 档案管理列表
+export const getDAGLList = (current, size, params) => {
+    return request({
+        url: "/api/blade-place/place/ninePage",
+        method: "get",
+        params: {
+            current,
+            size,
+            ...params
+        },
+    })
+}
+
+// 整改情况
+export const getZGQKList = (current, size, params) => {
+    return request({
+        url: "/api/blade-taskPlaceRectification/taskPlaceRectification/getTaskPlaceRectificationList",
+        method: "get",
+        params: {
+            current,
+            size,
+            ...params
+        },
+    })
+}
+
+// 隐患统计
+export const getYHTJList = (current, size, params) => {
+    return request({
+        url: "/api/blade-taskPlaceRectification/taskPlaceRectification/rectificationStatistics",
+        method: "get",
+        params: {
+            current,
+            size,
+            ...params
+        },
+    })
+}
diff --git a/src/views/publicSecurity/ninePlaceManage/archivesManage.vue b/src/views/publicSecurity/ninePlaceManage/archivesManage.vue
index ee37fbd..1e8d774 100644
--- a/src/views/publicSecurity/ninePlaceManage/archivesManage.vue
+++ b/src/views/publicSecurity/ninePlaceManage/archivesManage.vue
@@ -5,6 +5,15 @@
             :before-open="beforeOpen" @search-change="searchChange" @search-reset="searchReset"
             @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
             @refresh-change="refreshChange" @on-load="onLoad">
+            <template slot-scope="{row, size}" slot="principalIdCard">
+                <el-button :size="size" type="text" @click="showStringDispose(row, 'principalIdCardflag')">
+                    {{ textDispose(row, 'principalIdCardflag', 'principalIdCard') }}
+                </el-button>
+            </template>
+            <template slot-scope="{row, size}" slot="principalPhone">
+                <el-button :size="size" type="text" @click="showStringDispose(row, 'principalPhoneflag')"
+                    v-text="textDispose(row, 'principalPhoneflag', 'principalPhone')"></el-button>
+            </template>
         </avue-crud>
     </basic-container>
 </template>
@@ -13,7 +22,9 @@
 import {
     mapGetters
 } from "vuex"
-import website from '@/config/website'
+import {
+    getDAGLList
+} from "@/api/publicSecurity/ninePlaceManage"
 
 export default {
     data () {
@@ -46,44 +57,77 @@
                 dialogClickModal: false,
                 column: [{
                     label: "地区",
-                    prop: "regionName",
+                    prop: "townStreetName",
                     align: 'center',
+                    search: true,
+                    searchSpan: 4,
+                    searchLabelWidth: 46,
+                    labelWidth: 120,
+                    width: 156
                 }, {
                     label: "场所名称",
-                    prop: "regionName",
+                    prop: "placeName",
                     align: 'center',
+                    search: true,
+                    searchSpan: 4,
+                    searchLabelWidth: 96,
+                    width: 156
                 }, {
                     label: "场所地址",
-                    prop: "regionName",
+                    prop: "location",
                     align: 'center',
                 }, {
                     label: "场所类别",
-                    prop: "regionName",
+                    prop: "nineType",
                     align: 'center',
+                    dicUrl: "/api/blade-system/dict-biz/tree?code=nineType",
+                    props: {
+                        label: "title",
+                        value: "key",
+                    },
+                    search: true,
+                    searchSpan: 4,
+                    searchLabelWidth: 96
                 }, {
                     label: "场所负责人",
-                    prop: "regionName",
+                    prop: "principal",
                     align: 'center',
+                    search: true,
+                    searchSpan: 4,
+                    searchLabelWidth: 106,
+                    width: 110
                 }, {
                     label: "身份证信息",
-                    prop: "regionName",
+                    prop: "principalIdCard",
                     align: 'center',
+                    slot: true,
+                    width: 160
                 }, {
                     label: "联系方式",
-                    prop: "regionName",
+                    prop: "principalPhone",
                     align: 'center',
+                    slot: true,
+                    width: 120
                 }, {
                     label: "辖区派出所",
-                    prop: "regionName",
+                    prop: "deptName",
                     align: 'center',
+                    search: true,
+                    searchSpan: 4,
+                    searchLabelWidth: 106
                 }, {
                     label: "责任民警",
-                    prop: "regionName",
+                    prop: "policeName",
                     align: 'center',
+                    search: true,
+                    searchSpan: 4,
+                    searchLabelWidth: 96,
+                    width: 110
                 }, {
                     label: "责任民警联系方式",
-                    prop: "regionName",
+                    prop: "policePhone",
                     align: 'center',
+                    width: 120
                 }],
             },
             data: []
@@ -108,8 +152,25 @@
             return ids.join(",")
         },
 
+        textDispose () {
+            return (row, flag, type) => {
+                if (row[flag] || row[type] == null) {
+                    return row[type]
+                } else {
+                    if (type == 'principalIdCard') {
+                        return row[type].replace(/^(.{6})(?:\d+)(.{4})$/, "$1******$2")
+                    } else {
+                        return row[type].replace(/^(.{3})(?:\d+)(.{4})$/, "$1****$2")
+                    }
+                }
+            }
+        }
     },
     methods: {
+        showStringDispose (row, type) {
+            row[type] = !row[type]
+        },
+
         rowSave (row, done, loading) {
             if (row.imageUrls.length > 0) {
                 var urls = []
@@ -274,7 +335,23 @@
 
         onLoad (page, params = {}) {
             this.loading = true
-            this.loading = false
+            getDAGLList(page.currentPage, page.pageSize, { ...Object.assign(params, this.query), isNine: 1 }).then(res => {
+                console.log('getDAGLList', res.data.data.records)
+                const data = {
+                    ...res.data.data,
+                    records: res.data.data.records.map(item => {
+                        return {
+                            ...item,
+                            'principalIdCardflag': false,
+                            'principalPhoneflag': false
+                        }
+                    })
+                }
+                this.page.total = data.total
+                this.data = data.records
+                this.loading = false
+                this.selectionClear()
+            })
         }
     }
 }
@@ -284,4 +361,12 @@
 .avue-upload__icon {
     line-height: 6;
 }
+
+:deep(.el-form-item__content) {
+    text-align: left !important;
+}
+
+:deep(.avue-form__menu--center .el-button) {
+    margin: 0 5px 0 0;
+}
 </style>
diff --git a/src/views/publicSecurity/ninePlaceManage/hiddenDangerStatistics.vue b/src/views/publicSecurity/ninePlaceManage/hiddenDangerStatistics.vue
index ee37fbd..3ce5978 100644
--- a/src/views/publicSecurity/ninePlaceManage/hiddenDangerStatistics.vue
+++ b/src/views/publicSecurity/ninePlaceManage/hiddenDangerStatistics.vue
@@ -13,7 +13,9 @@
 import {
     mapGetters
 } from "vuex"
-import website from '@/config/website'
+import {
+    getYHTJList
+} from "@/api/publicSecurity/ninePlaceManage"
 
 export default {
     data () {
@@ -44,47 +46,93 @@
                 delBtn: false,
                 addBtn: false,
                 dialogClickModal: false,
-                column: [{
-                    label: "地区",
-                    prop: "regionName",
-                    align: 'center',
-                }, {
-                    label: "场所名称",
-                    prop: "regionName",
-                    align: 'center',
-                }, {
-                    label: "场所地址",
-                    prop: "regionName",
-                    align: 'center',
-                }, {
-                    label: "场所类别",
-                    prop: "regionName",
-                    align: 'center',
-                }, {
-                    label: "场所负责人",
-                    prop: "regionName",
-                    align: 'center',
-                }, {
-                    label: "身份证信息",
-                    prop: "regionName",
-                    align: 'center',
-                }, {
-                    label: "联系方式",
-                    prop: "regionName",
-                    align: 'center',
-                }, {
-                    label: "辖区派出所",
-                    prop: "regionName",
-                    align: 'center',
-                }, {
-                    label: "责任民警",
-                    prop: "regionName",
-                    align: 'center',
-                }, {
-                    label: "责任民警联系方式",
-                    prop: "regionName",
-                    align: 'center',
-                }],
+                column: [
+                    {
+                        label: "地区",
+                        prop: "name",
+                        align: 'center',
+                    }, {
+                        label: "小商店",
+                        prop: "xsd",
+                        align: 'center',
+                    },
+                    {
+                        label: "小旅馆",
+                        prop: "xlg",
+                        align: 'center',
+                    },
+                    {
+                        label: "小学校(幼儿园、校外培训机构)",
+                        align: 'center',
+                        children: [
+                            {
+                                label: "学校",
+                                prop: "xxx",
+                                align: 'center',
+                            },
+                            {
+                                label: "幼儿园",
+                                prop: "yey",
+                                align: 'center',
+                            },
+                            {
+                                label: "校外培训机构",
+                                prop: "xwpxjg",
+                                align: 'center',
+                            }
+                        ]
+                    },
+                    {
+                        label: "小医院(诊所、养老院)",
+                        align: 'center',
+                        children: [
+                            {
+                                label: "医院",
+                                prop: "yy",
+                                align: 'center',
+                            },
+                            {
+                                label: "诊所",
+                                prop: "zs",
+                                align: 'center',
+                            },
+                            {
+                                label: "养老院",
+                                prop: "yly",
+                                align: 'center',
+                            }
+                        ]
+                    },
+                    {
+                        label: "小网吧",
+                        prop: "xwb",
+                        align: 'center',
+                    },
+                    {
+                        label: "小餐饮场所",
+                        prop: "xcycs",
+                        align: 'center',
+                    },
+                    {
+                        label: "小歌舞娱乐场所",
+                        prop: "xgwylcs",
+                        align: 'center',
+                    },
+                    {
+                        label: "小美容洗浴场所",
+                        prop: "xmrxycs",
+                        align: 'center',
+                    },
+                    {
+                        label: "小生产加工企业",
+                        prop: "xscjgqy",
+                        align: 'center',
+                    },
+                    {
+                        label: "总数",
+                        prop: "count",
+                        align: 'center',
+                    }],
             },
             data: []
         }
@@ -274,7 +322,47 @@
 
         onLoad (page, params = {}) {
             this.loading = true
-            this.loading = false
+            getYHTJList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+                console.log('getZGQKList', res.data.data)
+                const data = res.data.data
+                data.forEach(item => {
+                    // 统计总数
+                    item.count = 0
+                    item.nineTypeStatistics.forEach(element => {
+                        item.count += Number(element.number)
+                        if (element.dict_value == '小生产加工企业') {
+                            item.xscjgqy = element.number
+                        } else if (element.dict_value == '小美容洗浴场所') {
+                            item.xmrxycs = element.number
+                        } else if (element.dict_value == '小歌舞娱乐场所') {
+                            item.xgwylcs = element.number
+                        } else if (element.dict_value == '小餐饮场所') {
+                            item.xcycs = element.number
+                        } else if (element.dict_value == '小网吧') {
+                            item.xwb = element.number
+                        } else if (element.dict_value == '小旅馆') {
+                            item.xlg = element.number
+                        } else if (element.dict_value == '小商店') {
+                            item.xsd = element.number
+                        } else if (element.dict_value == '幼儿园') {
+                            item.yey = element.number
+                        } else if (element.dict_value == '养老院') {
+                            item.yly = element.number
+                        } else if (element.dict_value == '校外培训机构') {
+                            item.xwpxjg = element.number
+                        } else if (element.dict_value == '小学校') {
+                            item.xxx = element.number
+                        } else if (element.dict_value == '诊所') {
+                            item.zs = element.number
+                        } else if (element.dict_value == '医院') {
+                            item.yy = element.number
+                        }
+                    })
+                })
+                this.data = data
+                this.loading = false
+                this.selectionClear()
+            })
         }
     }
 }
diff --git a/src/views/publicSecurity/ninePlaceManage/situationRectification.vue b/src/views/publicSecurity/ninePlaceManage/situationRectification.vue
index 62c0357..13952c5 100644
--- a/src/views/publicSecurity/ninePlaceManage/situationRectification.vue
+++ b/src/views/publicSecurity/ninePlaceManage/situationRectification.vue
@@ -13,7 +13,9 @@
 import {
     mapGetters
 } from "vuex"
-import website from '@/config/website'
+import {
+    getZGQKList
+} from "@/api/publicSecurity/ninePlaceManage"
 
 export default {
     data () {
@@ -46,36 +48,80 @@
                 dialogClickModal: false,
                 column: [{
                     label: "场所名称",
-                    prop: "regionName",
+                    prop: "placeName",
                     align: 'center',
+                    search: true,
+                    searchSpan: 4,
+                    searchLabelWidth: 76,
                 }, {
                     label: "地址名称",
-                    prop: "regionName",
+                    prop: "addressName",
                     align: 'center',
+                    search: true,
+                    searchSpan: 4,
+                    searchLabelWidth: 96,
                 }, {
                     label: "场所类别",
-                    prop: "regionName",
+                    prop: "nineType",
                     align: 'center',
+                    dicUrl: "/api/blade-system/dict-biz/tree?code=nineType",
+                    props: {
+                        label: "title",
+                        value: "key",
+                    },
+                    search: true,
+                    searchSpan: 4,
+                    searchLabelWidth: 96,
                 }, {
                     label: "存在安全隐患或违法行为",
-                    prop: "regionName",
+                    prop: "hiddenDanger",
                     align: 'center',
                 }, {
                     label: "是否下发《责令改正通知书》或是否处罚",
-                    prop: "regionName",
+                    prop: "rectificationNoticeFlag",
                     align: 'center',
+                    dicData: [
+                        {
+                            label: "否",
+                            value: 1,
+                        },
+                        {
+                            label: "是",
+                            value: 2,
+                        }
+                    ]
                 }, {
                     label: "是否整改完毕",
-                    prop: "regionName",
+                    prop: "rectificationFlag",
                     align: 'center',
+                    dicData: [
+                        {
+                            label: "否",
+                            value: 1,
+                        },
+                        {
+                            label: "是",
+                            value: 2,
+                        }
+                    ],
+                    search: true,
+                    searchSpan: 4,
+                    searchLabelWidth: 124,
                 }, {
                     label: "完成整改时限",
-                    prop: "regionName",
+                    prop: "rectificationEndTime",
                     align: 'center',
                 }, {
-                    label: "xx派出所",
-                    prop: "regionName",
+                    label: "检查时间",
+                    prop: "createTime",
                     align: 'center',
+                }, {
+                    label: "派出所名称",
+                    prop: "deptName",
+                    align: 'center',
+                    search: true,
+                    searchSpan: 4,
+                    searchLabelWidth: 106,
                 }],
             },
             data: []
@@ -266,7 +312,23 @@
 
         onLoad (page, params = {}) {
             this.loading = true
-            this.loading = false
+            getZGQKList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+                console.log('getZGQKList', res.data.data)
+                const data = {
+                    ...res.data.data,
+                    records: res.data.data.records.map(item => {
+                        return {
+                            ...item,
+
+                            'principalPhoneflag': false
+                        }
+                    })
+                }
+                this.page.total = data.total
+                this.data = data.records
+                this.loading = false
+                this.selectionClear()
+            })
         }
     }
 }

--
Gitblit v1.9.3