src/views/task/index.vue
@@ -11,6 +11,11 @@
                    除
                </el-button>
            </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>
            <!-- <template slot-scope="scope" slot="menu">
        <el-button type="text" icon="el-icon-circle-plus-outline" size="small"
          @click="taskApply(scope.row)">任务分发
@@ -54,13 +59,16 @@
            datetime: "",
            selectionList: [],
            option: {
                labelWidth: 120,
                searchLabelWidth: 66,
                searchShow: true,
                searchMenuSpan: 3,
                menuWidth: 160,
                height: "auto",
                calcHeight: 54,
                dialogWidth: 950,
                tip: false,
                searchShow: true,
                searchMenuSpan: 3,
                menuWidth: 280,
                border: true,
                //stripe:true,
                index: true,
@@ -75,7 +83,7 @@
                    {
                        label: "类型",
                        prop: "type",
                        span: 12,
                        span: 24,
                        searchSpan: 4,
                        dataType: "number",
                        type: "select",
@@ -87,29 +95,28 @@
                            value: "dictKey",
                        },
                        search: true,
                        span: 15,
                        searchLabelWidth: 46,
                        row: true,
                        labelWidth: 110,
                    },
                    {
                        width: 110,
                        label: "姓名",
                        prop: "realName",
                        span: 12,
                        searchSpan: 4,
                        width: 100,
                        search: true,
                        editDisabled: true,
                        labelWidth: 110,
                    },
                    {
                        width: 120,
                        label: "手机号",
                        prop: "phone",
                        span: 12,
                        width: 100,
                        searchSpan: 4,
                        searchLabelWidth: 76,
                        search: true,
                        editDisabled: true,
                        labelWidth: 110,
                        slot: true
                    },
                    {
                        width: 110,
@@ -127,14 +134,12 @@
                        },
                        span: 24,
                        editDisabled: true,
                        labelWidth: 110,
                    },
                    {
                        overHidden: true,
                        label: "上报事发地址",
                        prop: "address",
                        overHidden: true,
                        editDisabled: true,
                        labelWidth: 110,
                        span: 24
                    },
                    // {
@@ -143,31 +148,29 @@
                    //   overHidden:true
                    // },
                    {
                        width: 144,
                        label: "上报时间",
                        prop: "createTime",
                        width: 160,
                        addDisplay: false,
                        editDisplay: false,
                        type: "date",
                        format: "yyyy-MM-dd HH:mm:ss",
                        valueFormat: "yyyy-MM-dd HH:mm:ss",
                        editDisabled: true,
                        labelWidth: 110,
                    },
                    {
                        overHidden: true,
                        label: "描述",
                        prop: "remark",
                        type: "textarea",
                        span: 24,
                        editDisabled: true,
                        labelWidth: 110,
                    },
                    {
                        label: "接收员",
                        prop: "userIds",
                        type: "tree",
                        hide: true,
                        labelWidth: 110,
                        dicUrl: "/api/blade-gridman/gridman/getGridmanList",
                        props: {
                            label: "gridmanName",
@@ -198,8 +201,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]
        },
        // 任务派发
        taskApply (row) {
            var that = this
@@ -361,6 +382,7 @@
                this.page.total = data.total
                this.data = data.records
                this.data.forEach(item => {
                    this.$set(item, 'phoneflag', false)
                    if (item.imageUrls) {
                        if (item.imageUrls.length > 0) {
                            var urls = []