From fa0fc3195858a592d2ad1bdad0fa6126602ebf55 Mon Sep 17 00:00:00 2001
From: zrj <646384940@qq.com>
Date: Fri, 07 Jun 2024 14:17:10 +0800
Subject: [PATCH] 路径配置修改

---
 src/views/task/index.vue |   33 +++++++++++++++++++++++++++++----
 1 files changed, 29 insertions(+), 4 deletions(-)

diff --git a/src/views/task/index.vue b/src/views/task/index.vue
index 09e97d0..e3f52e3 100644
--- a/src/views/task/index.vue
+++ b/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)">任务分发
@@ -25,7 +30,7 @@
 </template>
 
 <script>
-import { getList, remove, update, add, getReportForRepairs } from "@/api/task/reportForRepairs"
+import { getList, remove, update, add, getReportForRepairs } from "@/ssoapi/task/reportForRepairs"
 import { mapGetters } from "vuex"
 import website from '@/config/website'
 
@@ -84,7 +89,7 @@
                         type: "select",
                         width: 100,
                         editDisabled: true,
-                        dicUrl: "/api/blade-system/dict-biz/dictionary?code=reportForRepairsType",
+                        dicUrl: "/ssoapi/blade-system/dict-biz/dictionary?code=reportForRepairsType",
                         props: {
                             label: "dictValue",
                             value: "dictKey",
@@ -111,6 +116,7 @@
                         searchLabelWidth: 76,
                         search: true,
                         editDisabled: true,
+                        slot: true
                     },
                     {
                         width: 110,
@@ -120,7 +126,7 @@
                         listType: "picture-card",
                         dataType: "string",
                         multiple: true,
-                        action: "/api/blade-resource/oss/endpoint/put-file",
+                        action: "/ssoapi/blade-resource/oss/endpoint/put-file",
                         propsHttp: {
                             res: "data",
                             name: 'name',
@@ -165,7 +171,7 @@
                         prop: "userIds",
                         type: "tree",
                         hide: true,
-                        dicUrl: "/api/blade-gridman/gridman/getGridmanList",
+                        dicUrl: "/ssoapi/blade-gridman/gridman/getGridmanList",
                         props: {
                             label: "gridmanName",
                             value: "id",
@@ -195,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
@@ -358,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 = []

--
Gitblit v1.9.3