From ab701df859cd79ae036f8cc86268137d2c8da8ee Mon Sep 17 00:00:00 2001
From: guanqb <18720758508@163.com>
Date: Thu, 22 Feb 2024 18:00:56 +0800
Subject: [PATCH] 消防自查导出、消防自查和场所检查增加场所类别字段

---
 src/views/gzll/todo.vue |  175 ++++++++++++++++++++++++++++++++++------------------------
 1 files changed, 103 insertions(+), 72 deletions(-)

diff --git a/src/views/gzll/todo.vue b/src/views/gzll/todo.vue
index abfd19d..7c8d446 100644
--- a/src/views/gzll/todo.vue
+++ b/src/views/gzll/todo.vue
@@ -17,6 +17,11 @@
             <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>
@@ -70,77 +75,77 @@
                 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,
+                column: [{
+                    label: "流程分类",
+                    type: "select",
+                    row: true,
+                    dicUrl: "/api/blade-system/dict/dictionary?code=flow",
+                    props: {
+                        label: "dictValue",
+                        value: "dictKey"
                     },
-                    {
-                        width: 100,
-                        label: '申请类型',
-                        prop: 'categoryName',
-                        // search: true,
+                    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"
                     },
-                    {
-                        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',
-                    },
+                    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',
+                },
                 ]
             },
             data: []
@@ -155,8 +160,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]
+        },
+
         searchReset () {
             this.query = {}
             this.onLoad(this.page)
@@ -176,12 +199,12 @@
         },
         handleWork (row) {
             this.$router.push({
-                path: `/work/process/${flowRoute(this.flowRoutes, row.category)}/handle/${row.taskId}/${row.processInstanceId}/${row.businessId}`
+                path: `/gzll/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}`
+                path: `/gzll/process/${flowRoute(this.flowRoutes, row.category)}/detail/${row.processInstanceId}/${row.businessId}`
             })
         },
         handleImage (row) {
@@ -204,7 +227,15 @@
             }
             this.loading = true
             todoList(page.currentPage, page.pageSize, Object.assign(params, query)).then(res => {
-                const data = res.data.data
+                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

--
Gitblit v1.9.3