guanqb
2024-02-22 ab701df859cd79ae036f8cc86268137d2c8da8ee
src/views/property/todo.vue
@@ -17,6 +17,12 @@
            <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 +76,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 +161,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 +200,12 @@
        },
        handleWork (row) {
            this.$router.push({
                path: `/work/process/${flowRoute(this.flowRoutes, row.category)}/handle/${row.taskId}/${row.processInstanceId}/${row.businessId}`
                path: `/property/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: `/property/process/${flowRoute(this.flowRoutes, row.category)}/detail/${row.processInstanceId}/${row.businessId}`
            })
        },
        handleImage (row) {
@@ -204,7 +228,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