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/cGovernance/gridWorkLog.vue |   89 +++++++++++++++++++++++++++++---------------
 1 files changed, 58 insertions(+), 31 deletions(-)

diff --git a/src/views/cGovernance/gridWorkLog.vue b/src/views/cGovernance/gridWorkLog.vue
index 2cb7bee..abf4076 100644
--- a/src/views/cGovernance/gridWorkLog.vue
+++ b/src/views/cGovernance/gridWorkLog.vue
@@ -15,20 +15,26 @@
                     @click="handleDelete">删 除
                 </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>
         </avue-crud>
     </basic-container>
 </template>
 
 <script>
-import { getPersonPublicSelect } from "@/api/public"
-import { getDetatils as householdDetail } from "@/api/userHouse/list/houseHold"
-import { getList, remove, update, add, getGridWorkLog } from "@/api/grid/gridWorkLog"
-import { getList as getHouseholdList, getDetatils as getHouseholdDetail } from "@/api/userHouse/list/houseHold"
+import { getPersonPublicSelect } from "@/ssoapi/public"
+import { getDetatils as householdDetail } from "@/ssoapi/userHouse/list/houseHold"
+import { getList, remove, update, add, getGridWorkLog } from "@/ssoapi/grid/gridWorkLog"
+import { getList as getHouseholdList, getDetatils as getHouseholdDetail } from "@/ssoapi/userHouse/list/houseHold"
 import { mapGetters } from "vuex"
 import website from '@/config/website'
 
 export default {
-    data() {
+    data () {
         return {
             form: {},
             query: {},
@@ -51,7 +57,7 @@
                 calcHeight: 54,
                 dialogWidth: 950,
                 tip: false,
-                border: false,
+                border: true,
                 //stripe:true,
                 index: true,
                 viewBtn: true,
@@ -66,8 +72,9 @@
                         span: 12,
                         searchSpan: 4,
                         search: true,
+                        searchLabelWidth: 76,
                         type: "select",
-                        dicUrl: "/api/blade-system/dict-biz/dictionary?code=haveType",
+                        dicUrl: "/ssoapi/blade-system/dict-biz/dictionary?code=haveType",
                         dataType: "number",
                         props: {
                             label: "dictValue",
@@ -88,7 +95,7 @@
                         prop: "personType",
                         span: 12,
                         type: "tree",
-                        dicUrl: "/api/blade-label/label/getLabelList?parentId=100",
+                        dicUrl: "/ssoapi/blade-label/label/getLabelList?parentId=100",
                         props: {
                             label: "name",
                             value: "id"
@@ -147,6 +154,7 @@
                         disabled: true,
                         searchSpan: 4,
                         search: true,
+                        slot: true
                     },
 
                     {
@@ -223,7 +231,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',
@@ -266,7 +274,7 @@
 
     watch: {
         "form.householdId": {
-            handler(val) {
+            handler (val) {
                 if (val) {
 
                     householdDetail(val).then(res => {
@@ -281,7 +289,7 @@
         },
 
         'form.personType': {
-            handler(newData) {
+            handler (newData) {
                 let householdIdColumn = this.findObject(
                     this.option.column,
                     'householdId'
@@ -296,7 +304,7 @@
         },
 
         'form.type': {
-            handler(newData) {
+            handler (newData) {
                 let householdIdColumn = this.findObject(
                     this.option.column,
                     'householdId'
@@ -320,7 +328,7 @@
 
     computed: {
         ...mapGetters(["permission", "userInfo"]),
-        permissionList() {
+        permissionList () {
             return {
                 addBtn: this.vaildData(this.permission.gridWorkLog_add, true),
                 viewBtn: this.vaildData(this.permission.gridWorkLog_view, true),
@@ -328,7 +336,7 @@
                 editBtn: this.vaildData(this.permission.gridWorkLog_edit, true),
             }
         },
-        ids() {
+        ids () {
             let ids = []
             this.selectionList.forEach((ele) => {
                 ids.push(ele.id)
@@ -336,7 +344,7 @@
             return ids.join(",")
         },
 
-        showNamePhone() {
+        showNamePhone () {
             return (data) => {
                 if (data.phoneNumber && data.phoneNumber.trim() != '') {
                     return `${data.name}(${data.phoneNumber})`
@@ -344,21 +352,39 @@
 
                 return data.name
             }
+        },
+
+        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")
+                    }
+                }
+            }
         }
     },
 
-    created() {
+    created () {
         this.getUserList()
     },
 
     methods: {
-        getUserList(param = '') {
-            let dicUrl = `/api/blade-household/household/selectHouseholdList?labelId=${param}&searchKey={{key}}&limit=20`
+        showStringDispose (row, type) {
+            row[type] = !row[type]
+        },
+
+        getUserList (param = '') {
+            let dicUrl = `/ssoapi/blade-household/household/selectHouseholdList?labelId=${param}&searchKey={{key}}&limit=20`
             const column = this.findObject(this.option.column, "householdId")
             column.dicUrl = dicUrl
         },
 
-        rowSave(row, done, loading) {
+        rowSave (row, done, loading) {
             if (row.url.length > 0) {
                 var urls = []
                 var split = row.url.split(",")
@@ -383,7 +409,7 @@
                 }
             )
         },
-        rowUpdate(row, index, done, loading) {
+        rowUpdate (row, index, done, loading) {
             if (row.url.length > 0) {
                 var urls = []
                 var split = row.url.split(",")
@@ -408,7 +434,7 @@
                 }
             )
         },
-        rowDel(row) {
+        rowDel (row) {
             this.$confirm("确定将选择数据删除?", {
                 confirmButtonText: "确定",
                 cancelButtonText: "取消",
@@ -425,24 +451,24 @@
                     })
                 })
         },
-        searchReset() {
+        searchReset () {
             this.query = {}
             this.onLoad(this.page)
         },
-        searchChange(params, done) {
+        searchChange (params, done) {
             this.query = params
             this.page.currentPage = 1
             this.onLoad(this.page, params)
             done()
         },
-        selectionChange(list) {
+        selectionChange (list) {
             this.selectionList = list
         },
-        selectionClear() {
+        selectionClear () {
             this.selectionList = []
             this.$refs.crud.toggleSelection()
         },
-        handleDelete() {
+        handleDelete () {
             if (this.selectionList.length === 0) {
                 this.$message.warning("请选择至少一条数据")
                 return
@@ -464,7 +490,7 @@
                     this.$refs.crud.toggleSelection()
                 })
         },
-        beforeOpen(done, type) {
+        beforeOpen (done, type) {
             if (["edit", "view"].includes(type)) {
                 getGridWorkLog(this.form.id).then((res) => {
                     this.form = res.data.data
@@ -489,16 +515,16 @@
             // con
             done()
         },
-        currentChange(currentPage) {
+        currentChange (currentPage) {
             this.page.currentPage = currentPage
         },
-        sizeChange(pageSize) {
+        sizeChange (pageSize) {
             this.page.pageSize = pageSize
         },
-        refreshChange() {
+        refreshChange () {
             this.onLoad(this.page, this.query)
         },
-        onLoad(page, params = {}) {
+        onLoad (page, params = {}) {
             const { dateTime } = this.query
             let values = {
                 ...params,
@@ -518,6 +544,7 @@
                 this.page.total = data.total
                 this.data = data.records
                 this.data.forEach(item => {
+                    this.$set(item, 'phoneflag', false)
                     if (item.url) {
                         if (item.url.length > 0) {
                             var urls = []

--
Gitblit v1.9.3