From c703b9fdaa118315f28c86db9a9796e413a030c9 Mon Sep 17 00:00:00 2001
From: guanqb <18720758508@163.com>
Date: Tue, 06 Feb 2024 16:39:59 +0800
Subject: [PATCH] 九小修改

---
 src/views/publicSecurity/ninePlaceManage/patrolRecord.vue           |   62 +++++++++++++++++++-
 src/views/publicSecurity/ninePlaceManage/archivesManage.vue         |   12 +++
 src/views/publicSecurity/ninePlaceManage/situationRectification.vue |   70 ++++++++++++++++++++++-
 src/views/place/index.vue                                           |   23 +++----
 4 files changed, 143 insertions(+), 24 deletions(-)

diff --git a/src/views/place/index.vue b/src/views/place/index.vue
index e92a8c4..f543cbf 100644
--- a/src/views/place/index.vue
+++ b/src/views/place/index.vue
@@ -22,11 +22,6 @@
                 }}</el-tag>
             </template>
 
-            <template slot-scope="{row, size}" slot="confirmFlag">
-                <el-tag :size="size" :type="showConfirmFlag(row.confirmFlag).type">{{ showConfirmFlag(row.confirmFlag).text
-                }}</el-tag>
-            </template>
-
             <template slot-scope="{row, size}" slot="source">
                 <el-tag :size="size" :type="showSource(row.source).type">{{ showSource(row.source).text
                 }}</el-tag>
@@ -138,7 +133,7 @@
                         },],
                     },
 
-                    
+
 
                     {
                         width: 110,
@@ -355,7 +350,7 @@
                         label: "九小分类",
                         prop: "nineType",
                         type: "select",
-                        display:false,
+                        display: false,
                         dicUrl: "/api/blade-system/dict-biz/dictionary?code=nineType",
                         dataType: "number",
                         hide: true,
@@ -386,7 +381,7 @@
                         label: "阵地类型",
                         prop: "frontType",
                         type: "select",
-                        display:false,
+                        display: false,
                         row: true,
                         dicUrl: "/api/blade-system/dict-biz/dictionary?code=frontType",
                         dataType: "number",
@@ -421,7 +416,7 @@
                         prop: "location",
                         type: 'map',
                         dataType: "string",
-                        minWidth:250,
+                        minWidth: 250,
                         span: 12,
                         value: [117.966460, 28.431002, ""],
                         rules: [
@@ -436,7 +431,7 @@
                         label: "备注",
                         prop: "remark",
                         type: 'textarea',
-                        hide:true,
+                        hide: true,
                         span: 24,
                         rules: [
                             {
@@ -453,7 +448,7 @@
                         editDisplay: false,
                         viewDisplay: false,
                         label: "经度",
-                        hide:true,
+                        hide: true,
                         prop: "lng",
                     },
 
@@ -464,7 +459,7 @@
                         editDisplay: false,
                         viewDisplay: false,
                         label: "纬度",
-                        hide:true,
+                        hide: true,
                         prop: "lat",
                     },
 
@@ -528,7 +523,7 @@
 
     watch: {
         'form.isNine': {
-            handler(newData) {
+            handler (newData) {
                 if (newData) {
                     let nineTypeColumn = this.findObject(
                         this.option.column,
@@ -544,7 +539,7 @@
             },
         },
         'form.isFront': {
-            handler(newData) {
+            handler (newData) {
                 if (newData) {
                     let frontTypeColumn = this.findObject(
                         this.option.column,
diff --git a/src/views/publicSecurity/ninePlaceManage/archivesManage.vue b/src/views/publicSecurity/ninePlaceManage/archivesManage.vue
index 354334e..c167ba9 100644
--- a/src/views/publicSecurity/ninePlaceManage/archivesManage.vue
+++ b/src/views/publicSecurity/ninePlaceManage/archivesManage.vue
@@ -12,7 +12,13 @@
             </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>
+                    v-text="textDispose(row, 'principalPhoneflag', 'principalPhone')">
+                </el-button>
+            </template>
+            <template slot-scope="{row, size}" slot="policePhone">
+                <el-button :size="size" type="text" @click="showStringDispose(row, 'policePhoneflag')"
+                    v-text="textDispose(row, 'policePhoneflag', 'policePhone')">
+                </el-button>
             </template>
             <template slot="menuLeft">
                 <el-button type="warning" size="small" plain icon="el-icon-download" @click="handleExport">导出
@@ -147,6 +153,7 @@
                     label: "责任民警联系方式",
                     prop: "policePhone",
                     align: 'center',
+                    slot: true,
                     width: 120
                 }],
             },
@@ -384,7 +391,8 @@
                         return {
                             ...item,
                             'principalIdCardflag': false,
-                            'principalPhoneflag': false
+                            'principalPhoneflag': false,
+                            'policePhoneflag': false
                         }
                     })
                 }
diff --git a/src/views/publicSecurity/ninePlaceManage/patrolRecord.vue b/src/views/publicSecurity/ninePlaceManage/patrolRecord.vue
index 92c1d1e..f27a68e 100644
--- a/src/views/publicSecurity/ninePlaceManage/patrolRecord.vue
+++ b/src/views/publicSecurity/ninePlaceManage/patrolRecord.vue
@@ -5,6 +5,11 @@
             :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="principalPhone">
+                <el-button :size="size" type="text" @click="showStringDispose(row, 'principalPhoneflag')"
+                    v-text="textDispose(row, 'principalPhoneflag', 'principalPhone')">
+                </el-button>
+            </template>
             <template slot-scope="{type,size,row }" slot="menu">
                 <el-button icon="el-icon-detail" :size="size" :type="type" @click.stop="getDetail(row)">
                     详情
@@ -144,7 +149,7 @@
                 searchLabelWidth: 96,
                 searchShow: true,
                 searchMenuSpan: 3,
-                // menuWidth: 450,
+                menuWidth: 100,
                 // menu: false,
                 height: "auto",
                 calcHeight: 54,
@@ -167,6 +172,7 @@
                     row: true,
                     searchSpan: 4,
                     search: true,
+                    align: 'center'
                 },
                 {
                     label: "所属社区",
@@ -175,6 +181,9 @@
                     row: true,
                     searchSpan: 4,
                     search: true,
+                    width: 160,
+                    overHidden: true,
+                    align: 'center'
                 },
                 {
                     label: "所属网格",
@@ -183,6 +192,7 @@
                     row: true,
                     searchSpan: 4,
                     search: true,
+                    align: 'center'
                 },
                 {
                     label: "场所名称",
@@ -191,6 +201,7 @@
                     row: true,
                     searchSpan: 4,
                     search: true,
+                    align: 'center'
                 },
                 {
                     label: "场所隐患",
@@ -198,6 +209,7 @@
                     span: 24,
                     row: true,
                     searchSpan: 4,
+                    align: 'center'
                 },
 
                 {
@@ -207,6 +219,7 @@
                     row: true,
                     searchSpan: 4,
                     search: true,
+                    align: 'center'
                 },
 
                 {
@@ -214,7 +227,9 @@
                     prop: "principalPhone",
                     span: 24,
                     row: true,
+                    slot: true,
                     searchSpan: 4,
+                    align: 'center'
                 },
                 {
                     label: "场所地址",
@@ -223,6 +238,8 @@
                     row: true,
                     searchSpan: 4,
                     searchLabelWidth: 46,
+                    overHidden: true,
+                    align: 'center'
                 },
                 {
                     width: 110,
@@ -231,6 +248,7 @@
                     type: "upload",
                     listType: "picture-img",
                     span: 24,
+                    align: 'center'
                 },
                 {
                     label: "创建时间",
@@ -239,6 +257,7 @@
                     row: true,
                     searchSpan: 4,
                     searchLabelWidth: 46,
+                    align: 'center'
                 },
                 ],
             },
@@ -288,6 +307,21 @@
             }
         },
 
+        textDispose () {
+            return (row, flag, type) => {
+                console.log('row', 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")
+                    }
+                }
+            }
+        }
+
     },
 
     created () {
@@ -296,6 +330,11 @@
     },
 
     methods: {
+        showStringDispose (row, type) {
+            console.log(row, type)
+            row[type] = !row[type]
+        },
+
         // 点击展开收缩
         flodQL (index) {
             this.rowDetail.qTypeList[index].isShowQList = !this.rowDetail.qTypeList[index].isShowQList
@@ -441,10 +480,17 @@
         onLoad (page, params = {}) {
             this.loading = true
             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.data.forEach(item => {
+                const data = {
+                    ...res.data.data,
+                    records: res.data.data.records.map(item => {
+                        return {
+                            ...item,
+                            'createTime': item.createTime.slice(0, 16),
+                            'principalPhoneflag': false,
+                        }
+                    })
+                }
+                data.records.forEach(item => {
                     if (item.signaturePath.length > 0) {
                         var urls = []
                         var names = item.signaturePath.split(",")
@@ -454,6 +500,8 @@
                         item.signaturePath = urls.join(",")
                     }
                 })
+                this.page.total = data.total
+                this.data = data.records
                 this.loading = false
                 this.selectionClear()
             }).catch(err => {
@@ -535,6 +583,10 @@
     background-color: #409EFF;
 }
 
+:deep(.avue-crud__img) {
+    height: 30px !important;
+}
+
 .title {
     margin: 10px;
     height: 40px;
diff --git a/src/views/publicSecurity/ninePlaceManage/situationRectification.vue b/src/views/publicSecurity/ninePlaceManage/situationRectification.vue
index 7fb2236..fc77f47 100644
--- a/src/views/publicSecurity/ninePlaceManage/situationRectification.vue
+++ b/src/views/publicSecurity/ninePlaceManage/situationRectification.vue
@@ -14,6 +14,11 @@
                 <el-button type="warning" size="small" plain icon="el-icon-download" @click="handleExport">导出
                 </el-button>
             </template>
+
+            <template slot-scope="{row, size}" slot="status">
+                <el-tag :size="size" :type="showConfirmFlag(row.status).type">{{ showConfirmFlag(row.status).text
+                }}</el-tag>
+            </template>
             <template slot-scope="{type,size,row }" slot="menu">
                 <el-button icon="el-icon-detail" :size="size" :type="type" @click.stop="getDetail(row)">
                     详情
@@ -192,6 +197,7 @@
                 searchShow: true,
                 searchMenuSpan: 3,
                 menu: true,
+                menuWidth: 120,
                 border: true,
                 index: true,
                 editBtn: false,
@@ -283,6 +289,31 @@
                     searchSpan: 4,
                     searchLabelWidth: 106,
                 }, {
+                    label: "审核状态",
+                    prop: "status",
+                    align: 'center',
+                    dicData: [
+                        {
+                            label: "待审核",
+                            value: 1,
+                        },
+                        {
+                            label: "审核通过",
+                            value: 2,
+                        },
+                        {
+                            label: "审核不通过",
+                            value: 3,
+                        },
+                        {
+                            label: "待上报",
+                            value: 4,
+                        }
+                    ],
+                    search: true,
+                    searchSpan: 4,
+                    searchLabelWidth: 106,
+                }, {
                     label: "检查时间",
                     prop: "dateRange",
                     type: "daterange",
@@ -324,6 +355,37 @@
             return ids.join(",")
         },
 
+        showConfirmFlag () {
+            return (data) => {
+                let tags = {
+                    text: '',
+                    type: ''
+                }
+                if (data == 1) {
+                    tags = {
+                        text: '待审核',
+                        type: 'warning'
+                    }
+                } else if (data == 2) {
+                    tags = {
+                        text: '审核通过',
+                        type: 'success'
+                    }
+                } else if (data == 3) {
+                    tags = {
+                        text: '审核不通过',
+                        type: 'danger'
+                    }
+                } else if (data == 4) {
+                    tags = {
+                        text: '待上报',
+                        type: 'info'
+                    }
+                }
+
+                return tags
+            }
+        }
     },
 
     created () {
@@ -634,10 +696,12 @@
 
         onLoad (page, params = {}) {
             this.loading = true
-            if (this.typeStatus == 3) {
+            if (this.typeStatus == 1) {
+                this.query.status = '1'
+            } else if (this.typeStatus == 2) {
+                this.query.status = '2'
+            } else if (this.typeStatus == 3) {
                 this.query.status = ''
-            } else {
-                this.query.status = this.typeStatus
             }
             getZGQKList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
                 console.log('getZGQKList', res.data.data)

--
Gitblit v1.9.3