From 5841016a20c475e63d1d290435c8d480fb901c70 Mon Sep 17 00:00:00 2001
From: guanqb <18720758508@163.com>
Date: Mon, 19 Feb 2024 17:34:34 +0800
Subject: [PATCH] 加隐藏显示:1.取保候审手机号2.消防自查3.维修基金管理4.项目经理

---
 src/views/publicSecurity/keynotePlaceManage.vue           |   28 +++
 src/views/publicSecurity/bailReporting.vue                |   27 ++
 src/views/propertySupervision/propertyCapitalManage.vue   |  426 +++++++++++++++++++++++++---------------------
 src/views/propertySupervision/propertyCompanyDistrict.vue |   36 +++
 4 files changed, 316 insertions(+), 201 deletions(-)

diff --git a/src/views/propertySupervision/propertyCapitalManage.vue b/src/views/propertySupervision/propertyCapitalManage.vue
index 55f5350..32f0bc1 100644
--- a/src/views/propertySupervision/propertyCapitalManage.vue
+++ b/src/views/propertySupervision/propertyCapitalManage.vue
@@ -1,215 +1,247 @@
 <template>
-  <basic-container>
-    <avue-crud :option="option" :table-loading="loading" :data="data" ref="crud" v-model="form"
-      @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, index}" slot="menu">
-        <el-button type="text" :size="size" icon="el-icon-s-check" v-if="permission.work_todo_handle"
-          @click.stop="handleWork(row)">处理
-        </el-button>
-        <el-button type="text" :size="size" icon="el-icon-info" v-if="permission.work_todo_detail"
-          @click.stop="handleDetail(row)">详情
-        </el-button>
-        <el-button type="text" :size="size" icon="el-icon-search" v-if="permission.work_todo_follow"
-          @click.stop="handleImage(row, index)">流程图
-        </el-button>
-      </template>
-      <template slot-scope="{row, size}" slot="processDefinitionVersion">
-        <el-tag :size="size">v{{ row.processDefinitionVersion }}</el-tag>
-      </template>
-    </avue-crud>
-    <flow-design is-dialog :is-display.sync="flowBox" :process-instance-id="processInstanceId"></flow-design>
-  </basic-container>
+    <basic-container>
+        <avue-crud :option="option" :table-loading="loading" :data="data" ref="crud" v-model="form"
+            @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, index}" slot="menu">
+                <el-button type="text" :size="size" icon="el-icon-s-check" v-if="permission.work_todo_handle"
+                    @click.stop="handleWork(row)">处理
+                </el-button>
+                <el-button type="text" :size="size" icon="el-icon-info" v-if="permission.work_todo_detail"
+                    @click.stop="handleDetail(row)">详情
+                </el-button>
+                <el-button type="text" :size="size" icon="el-icon-search" v-if="permission.work_todo_follow"
+                    @click.stop="handleImage(row, index)">流程图
+                </el-button>
+            </template>
+            <template slot-scope="{row, size}" slot="processDefinitionVersion">
+                <el-tag :size="size">v{{ row.processDefinitionVersion }}</el-tag>
+            </template>
+            <template slot-scope="{row, size}" slot="linkPhone">
+                <el-button :size="size" type="text" @click="showStringDispose(row, 'linkPhoneflag')"
+                    v-text="textDispose(row, 'linkPhoneflag', 'linkPhone')">
+                </el-button>
+            </template>
+        </avue-crud>
+        <flow-design is-dialog :is-display.sync="flowBox" :process-instance-id="processInstanceId"></flow-design>
+    </basic-container>
 </template>
 
 <script>
-  import {
+import {
     mapGetters
-  } from "vuex"
-  import {
+} from "vuex"
+import {
     todoList
-  } from "@/api/work/work"
-  import {
+} from "@/api/work/work"
+import {
     flowCategory,
     flowRoute
-  } from "@/util/flow"
+} from "@/util/flow"
 
-  export default {
-    data() {
-      return {
-        form: {},
-        selectionId: '',
-        selectionList: [],
-        query: {},
-        loading: true,
-        page: {
-          pageSize: 10,
-          currentPage: 1,
-          total: 0
-        },
-        processInstanceId: '',
-        flowBox: false,
-        workBox: false,
-        option: {
-          labelWidth: 120,
-          searchLabelWidth: 96,
-          searchShow: true,
-          searchMenuSpan: 3,
-          menuWidth: 210,
+export default {
+    data () {
+        return {
+            form: {},
+            selectionId: '',
+            selectionList: [],
+            query: {},
+            loading: true,
+            page: {
+                pageSize: 10,
+                currentPage: 1,
+                total: 0
+            },
+            processInstanceId: '',
+            flowBox: false,
+            workBox: false,
+            option: {
+                labelWidth: 120,
+                searchLabelWidth: 96,
+                searchShow: true,
+                searchMenuSpan: 3,
+                menuWidth: 210,
 
-          height: 'auto',
-          calcHeight: 30,
-          tip: false,
-          simplePage: true,
-          border: true,
-          index: true,
-          // selection: true,
-          editBtn: false,
-          addBtn: false,
-          viewBtn: false,
-          delBtn: false,
-          dialogWidth: 900,
-          dialogClickModal: false,
-          column: [{
-              label: "流程分类",
-              type: "select",
-              row: true,
-              dicUrl: "/api/blade-system/dict/dictionary?code=flow",
-              props: {
-                label: "dictValue",
-                value: "dictKey"
-              },
-              dataType: "number",
-              slot: true,
-              prop: "category",
-              // search: true,
-              hide: true,
-              width: 100,
+                height: 'auto',
+                calcHeight: 30,
+                tip: false,
+                simplePage: true,
+                border: true,
+                index: true,
+                // selection: true,
+                editBtn: false,
+                addBtn: false,
+                viewBtn: false,
+                delBtn: false,
+                dialogWidth: 900,
+                dialogClickModal: false,
+                column: [{
+                    label: "流程分类",
+                    type: "select",
+                    row: true,
+                    dicUrl: "/api/blade-system/dict/dictionary?code=flow",
+                    props: {
+                        label: "dictValue",
+                        value: "dictKey"
+                    },
+                    dataType: "number",
+                    slot: true,
+                    prop: "category",
+                    // search: true,
+                    hide: true,
+                    width: 100,
+                },
+                {
+                    width: 100,
+                    label: '申请类型',
+                    prop: 'categoryName',
+                    // search: true,
+                },
+                {
+                    width: 220,
+                    overHidden: true,
+                    label: "小区",
+                    prop: "districtId",
+                    // search: true,
+                    type: 'tree',
+                    dicUrl: `/api/blade-district/district/getDistrictTree`,
+                    props: {
+                        label: "name",
+                        value: "id"
+                    },
+                    defaultExpandedKeys: ["361102003"],
+                    searchSpan: 5,
+                    span: 12,
+                },
+                {
+                    width: 110,
+                    label: '联系人',
+                    prop: 'linkman',
+                    // search: true,
+                },
+                {
+                    width: 120,
+                    label: '联系电话',
+                    prop: 'linkPhone',
+                    // search: true,
+                    slot: true
+                },
+                {
+                    label: '项目名称',
+                    prop: 'name',
+                    // search: true,
+                },
+                {
+                    label: '当前步骤',
+                    prop: 'taskName',
+                },
+                // {
+                //   label: '流程版本',
+                //   prop: 'processDefinitionVersion',
+                //   // slot: true,
+                //   width: 80,
+                // },
+                {
+                    width: 144,
+                    label: '申请时间',
+                    prop: 'createTime',
+                },
+                ]
             },
-            {
-              width: 100,
-              label: '申请类型',
-              prop: 'categoryName',
-              // search: true,
-            },
-            {
-              width: 220,
-              overHidden: true,
-              label: "小区",
-              prop: "districtId",
-              // search: true,
-              type: 'tree',
-              dicUrl: `/api/blade-district/district/getDistrictTree`,
-              props: {
-                label: "name",
-                value: "id"
-              },
-              defaultExpandedKeys: ["361102003"],
-              searchSpan: 5,
-              span: 12,
-            },
-            {
-              width: 110,
-              label: '联系人',
-              prop: 'linkman',
-              // search: true,
-            },
-            {
-              width: 120,
-              label: '联系电话',
-              prop: 'linkPhone',
-              // search: true,
-            },
-            {
-              label: '项目名称',
-              prop: 'name',
-              // search: true,
-            },
-            {
-              label: '当前步骤',
-              prop: 'taskName',
-            },
-            // {
-            //   label: '流程版本',
-            //   prop: 'processDefinitionVersion',
-            //   // slot: true,
-            //   width: 80,
-            // },
-            {
-              width: 144,
-              label: '申请时间',
-              prop: 'createTime',
-            },
-          ]
-        },
-        data: []
-      }
+            data: []
+        }
     },
     computed: {
-      ...mapGetters(["permission", "flowRoutes"]),
-      ids() {
-        let ids = []
-        this.selectionList.forEach(ele => {
-          ids.push(ele.id)
-        })
-        return ids.join(",")
-      },
+        ...mapGetters(["permission", "flowRoutes"]),
+        ids () {
+            let ids = []
+            this.selectionList.forEach(ele => {
+                ids.push(ele.id)
+            })
+            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: {
-      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()
-      },
-      handleWork(row) {
-        this.$router.push({
-          path: `/work/process/${flowRoute(this.flowRoutes, row.category)}/handle/${row.taskId}/${row.processInstanceId}/${row.businessId}`
-        })
-      },
-      handleDetail(row) {
-        this.$router.push({
-          path: `/work/process/${flowRoute(this.flowRoutes, row.category)}/detail/${row.processInstanceId}/${row.businessId}`
-        })
-      },
-      handleImage(row) {
-        this.processInstanceId = row.processInstanceId
-        this.flowBox = true
-      },
-      currentChange(currentPage) {
-        this.page.currentPage = currentPage
-      },
-      sizeChange(pageSize) {
-        this.page.pageSize = pageSize
-      },
-      refreshChange() {
-        this.onLoad(this.page, this.query)
-      },
-      onLoad(page, params = {}) {
-        const query = {
-          ...this.query,
-          category: (params.category) ? flowCategory(params.category) : null
+        showStringDispose (row, type) {
+            row[type] = !row[type]
+        },
+
+        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()
+        },
+        handleWork (row) {
+            this.$router.push({
+                path: `/work/process/${flowRoute(this.flowRoutes, row.category)}/handle/${row.taskId}/${row.processInstanceId}/${row.businessId}`
+            })
+        },
+        handleDetail (row) {
+            this.$router.push({
+                path: `/work/process/${flowRoute(this.flowRoutes, row.category)}/detail/${row.processInstanceId}/${row.businessId}`
+            })
+        },
+        handleImage (row) {
+            this.processInstanceId = row.processInstanceId
+            this.flowBox = true
+        },
+        currentChange (currentPage) {
+            this.page.currentPage = currentPage
+        },
+        sizeChange (pageSize) {
+            this.page.pageSize = pageSize
+        },
+        refreshChange () {
+            this.onLoad(this.page, this.query)
+        },
+        onLoad (page, params = {}) {
+            const query = {
+                ...this.query,
+                category: (params.category) ? flowCategory(params.category) : null
+            }
+            this.loading = true
+            todoList(page.currentPage, page.pageSize, Object.assign(params, query)).then(res => {
+                const data = {
+                    ...res.data.data,
+                    records: res.data.data.records.map(item => {
+                        return {
+                            ...item,
+                            'linkPhoneflag': false
+                        }
+                    })
+                }
+                this.page.total = data.total
+                this.data = data.records
+                this.loading = false
+                this.selectionClear()
+            })
         }
-        this.loading = true
-        todoList(page.currentPage, page.pageSize, Object.assign(params, query)).then(res => {
-          const data = res.data.data
-          this.page.total = data.total
-          this.data = data.records
-          this.loading = false
-          this.selectionClear()
-        })
-      }
     }
-  }
+}
 </script>
\ No newline at end of file
diff --git a/src/views/propertySupervision/propertyCompanyDistrict.vue b/src/views/propertySupervision/propertyCompanyDistrict.vue
index a526101..f4e1eea 100644
--- a/src/views/propertySupervision/propertyCompanyDistrict.vue
+++ b/src/views/propertySupervision/propertyCompanyDistrict.vue
@@ -11,6 +11,11 @@
                     @click="handleDelete">删 除
                 </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>
@@ -72,7 +77,7 @@
                 viewBtn: true,
                 selection: true,
                 dialogClickModal: false,
-                addBtn:false,
+                addBtn: false,
                 column: [{
                     overHidden: true,
                     label: '小区名称',
@@ -164,6 +169,7 @@
                     label: '联系方式',
                     prop: 'principalPhone',
                     span: 12,
+                    slot: true,
                     rules: [{
                         required: true,
                         message: "请输入联系方式",
@@ -255,8 +261,26 @@
             })
             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) {
             row.userId = func.join(row.userId)
             add(row).then(
@@ -383,7 +407,15 @@
             }
             this.loading = true
             getList(page.currentPage, page.pageSize, values).then((res) => {
-                const data = 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
diff --git a/src/views/publicSecurity/bailReporting.vue b/src/views/publicSecurity/bailReporting.vue
index 6ebb8f3..ec7c919 100644
--- a/src/views/publicSecurity/bailReporting.vue
+++ b/src/views/publicSecurity/bailReporting.vue
@@ -22,6 +22,11 @@
                     {{ showStatus(row.status).text }}
                 </el-tag>
             </template>
+            <template slot-scope="{row, size}" slot="phone">
+                <el-button :size="size" type="text" @click="showStringDispose(row, 'phoneflag')"
+                    v-text="textDispose(row, 'phoneflag', 'phone')">
+                </el-button>
+            </template>
         </avue-crud>
 
         <el-dialog class="place-info-box audit-info-box" title="" append-to-body :visible.sync="auditBasePopup" width="60%">
@@ -102,7 +107,7 @@
                 editBtn: false,
                 selection: true,
                 dialogClickModal: false,
-                header:false,
+                header: false,
                 column: [{
                     span: 12,
                     label: "社区",
@@ -136,6 +141,7 @@
                     prop: "phone",
                     searchSpan: 4,
                     search: true,
+                    slot: true,
                     rules: [{
                         validator: validatorPhone,
                         trigger: 'blur'
@@ -304,9 +310,27 @@
 
                 return tags
             }
+        },
+
+        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]
+        },
+
         colseDetail () {
             this.auditBasePopup = false
             this.onLoad(this.page)
@@ -479,6 +503,7 @@
                 this.page.total = data.total
                 this.data = data.records
                 this.data.forEach(item => {
+                    this.$set(item, 'phoneflag', false)
                     if (item.imageUrls && item.imageUrls != '' && item.imageUrls != null && item.imageUrls.length) {
                         var urls = []
                         var names = item.imageUrls.split(",").filter(item => item != '')
diff --git a/src/views/publicSecurity/keynotePlaceManage.vue b/src/views/publicSecurity/keynotePlaceManage.vue
index 090aeb2..7825f5d 100644
--- a/src/views/publicSecurity/keynotePlaceManage.vue
+++ b/src/views/publicSecurity/keynotePlaceManage.vue
@@ -11,7 +11,7 @@
                     @click="lookDetail(row, 0)">查 看
                 </el-button>
                 <el-button type="text" :size="size" icon="el-icon-s-check" v-if="permission.place_check && row.status == 1"" plain
-                                        @click=" goAudit(row)">审 核
+                                                            @click=" goAudit(row)">审 核
                 </el-button>
                 <el-button type="text" :size="size" icon="el-icon-delete" v-if="permission.place_del" plain
                     @click="rowDel(row)">删 除
@@ -22,6 +22,12 @@
                 <el-tag :size="size" :type="showStatus(row.status).type">
                     {{ showStatus(row.status).text }}
                 </el-tag>
+            </template>
+
+            <template slot-scope="{row, size}" slot="phone">
+                <el-button :size="size" type="text" @click="showStringDispose(row, 'phoneflag')"
+                    v-text="textDispose(row, 'phoneflag', 'phone')">
+                </el-button>
             </template>
         </avue-crud>
 
@@ -154,6 +160,7 @@
                     prop: "phone",
                     searchSpan: 4,
                     search: true,
+                    slot: true,
                     rules: [{
                         validator: validatorPhone,
                         trigger: 'blur'
@@ -314,9 +321,27 @@
 
                 return tags
             }
+        },
+
+        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]
+        },
+
         // 弹窗关闭回调
         handleClose () {
             this.cancelAudit()
@@ -595,6 +620,7 @@
                 this.page.total = data.total
                 this.data = data.records
                 this.data.forEach(item => {
+                    this.$set(item, 'phoneflag', false)
                     if (item.imageUrls && item.imageUrls != '' && item.imageUrls != null && item.imageUrls.length) {
                         var urls = []
                         var names = item.imageUrls.split(",").filter(item => item != '')

--
Gitblit v1.9.3