Commit e4e4cc5e authored by xinzhedeai's avatar xinzhedeai

add:商户信息明文加密处理;特种工作也报备详情明文加密处理

parent bc731524
......@@ -67,7 +67,7 @@ if (window.env == 'dev') {
// 管理员 线上
// 'Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsImxvZ2luX3VzZXJfa2V5IjoiZGFiZWMwMTAtYzM1MS00NGUzLTk5OTAtZGJjMmRhMzgyNGU5In0.SgeTLyYLDbJyvPxvPSpX6rRg2anfR12_40x9cKcTFXOmPzyiLv5OHMdYufBlW5btrver7aBcCLm7QQEFYBTemA'
// 管理员 本地
'Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsImxvZ2luX3VzZXJfa2V5IjoiNGM3MDViODYtNjI1ZC00ZTM2LTk0MjktMGI0YzI3M2RmYzgzIn0.VBLduy3ERQ8wsNDiV8iuEHzisqWjrbocL2d4cOTCHkLax44iqA1q8vDNF7dlESIpSPU6Hk8BFkGKgfynyEguvw'
'Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsImxvZ2luX3VzZXJfa2V5IjoiZjA5OWU0ZTAtNzMxMS00MDlkLTg3YTUtYjhkNDNjMWVjNjQ4In0.qrivFnf68QSQ9mG0tOg9jeSB7loDMnP4NlpNthEBywPLkIaGZoE74IrTGSzFvajyay2-gBJ8GCunVOTyvTEebw'
// 街道
// 'Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJqaWVkYW8iLCJsb2dpbl91c2VyX2tleSI6ImNjNjRkMmZhLWQzNmItNGRkZi05MjcxLTliYTA0ZDJkYzM4NiJ9.G2BAs3XnlqR6QgDRWDfXkOpdLYhFdqEaTxvE8GxLAgU8vcsHPEKdhQ4VvOwsiNAtIaUpMDXirOb-FrHVNvZo4g'
......
......@@ -237,3 +237,10 @@ select:disabled {
height: 0.88rem;
line-height: 0.88rem;
} */
/* 图标样式优化 */
.van-icon-closed-eye, .van-icon-eye-o {
font-size: 16px;
transition: color 0.2s;
}
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<head>
<meta charset="UTF-8" />
<meta
http-equiv="X-UA-Compatible"
content="IE=edge"
/>
<meta
name="viewport"
content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0, viewprot-fit:cover"
/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport"
content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0, viewprot-fit:cover" />
<title>高区“码”上</title>
<script
type="text/javascript"
src="../sdk/includeHead.js"
></script>
<script
type="text/javascript"
src="../sdk/axios_http3.js"
></script>
<script type="text/javascript" src="../sdk/includeHead.js"></script>
<script type="text/javascript" src="../sdk/axios_http3.js"></script>
<style></style>
<style>
/* 添加禁用状态文字颜色保持 */
input:disabled,
input[disabled] {
color: #333 !important; /* 保持与正常状态相同的颜色 */
-webkit-text-fill-color: #333 !important; /* 兼容iOS Safari */
color: #333 !important;
/* 保持与正常状态相同的颜色 */
-webkit-text-fill-color: #333 !important;
/* 兼容iOS Safari */
}
.van-uploader__preview-delete{
.van-uploader__preview-delete {
cursor: pointer;
}
</style>
</head>
<body>
</head>
<body>
<div id="app">
<div
class="wrapper"
v-cloak
>
<van-tabs
v-model:active="activeTab"
@click="clickTab"
title-active-color="#1989fa"
line-height="2px"
style="margin-bottom: 15px"
>
<div class="wrapper" v-cloak>
<van-tabs v-model:active="activeTab" @click="clickTab" title-active-color="#1989fa" line-height="2px"
style="margin-bottom: 15px">
<van-tab title="基础信息"></van-tab>
<van-tab title="经营信息"></van-tab>
<van-tab title="消费者安全建议"></van-tab>
......@@ -52,46 +38,51 @@
</van-tabs>
<!-- form开始 -->
<div
class="form-container"
v-if="activeTab==0"
>
<div class="form-container" v-if="activeTab==0">
<div class="form-item">
<span class="form-label">商家名称</span>
<div class="form-input-wrap">
<input
maxlength="25"
type="text"
v-model="formData.unitName"
class="form-input"
:disabled="flag=='XQ'"
placeholder="请输入商家名称"
/>
<input maxlength="25" type="text" v-model="formData.unitName" class="form-input" :disabled="flag=='XQ'"
placeholder="请输入商家名称" />
</div>
</div>
<div class="form-item">
<span class="form-label">负责人</span>
<div class="form-input-wrap">
<input
maxlength="4"
type="text"
v-model="formData.merchantName"
class="form-input"
:disabled="flag=='XQ'"
placeholder="请输入负责人"
<div class="form-input-wrap" style="display: flex; align-items: center;">
<template v-if="flag=='XQ'"><!-- 详情模式 -->
<span :class="'form-input'" style="line-height: .7rem;">
{{ showOriginal.merchantName ? formData.merchantName : desensitize(formData.merchantName, 'name') }}
</span>
<van-icon
:name="showOriginal.merchantName ? 'eye-o' : 'closed-eye'"
@click="toggleShow('merchantName')"
style="margin-left: 8px; color: #1989fa; cursor: pointer;"
/>
</template>
<input v-else maxlength="4" type="text" v-model="formData.merchantName" class="form-input" :disabled="flag=='XQ'"
placeholder="请输入负责人" />
</div>
</div>
<div class="form-item">
<span class="form-label">电话</span>
<div class="form-input-wrap">
<input
type="number" maxlength="11"
<div class="form-input-wrap" style="display: flex; align-items: center;">
<template v-if="flag=='XQ'"><!-- 详情模式 -->
<span class="form-input" style="line-height: .7rem;">
{{ showOriginal.merchantPhone ? formData.merchantPhone : desensitize(formData.merchantPhone, 'phone') }}
</span>
<van-icon
:name="showOriginal.merchantPhone ? 'eye-o' : 'closed-eye'"
@click="toggleShow('merchantPhone')"
style="margin-left: 8px; color: #1989fa; cursor: pointer;"
/>
</template>
<input v-else
type="number"
maxlength="11"
v-model="formData.merchantPhone"
class="form-input"
:disabled="flag=='XQ'"
placeholder="请输入电话"
/>
</div>
......@@ -100,14 +91,8 @@
<div class="form-item">
<span class="form-label">地址</span>
<div class="form-input-wrap">
<input
maxlength="100"
type="text"
v-model="formData.businessAddress"
class="form-input"
:disabled="flag=='XQ'"
placeholder="请输入地址"
/>
<input maxlength="100" type="text" v-model="formData.businessAddress" class="form-input"
:disabled="flag=='XQ'" placeholder="请输入地址" />
</div>
</div>
......@@ -145,78 +130,58 @@
/>
</van-popup> -->
<div
class="form-item"
v-if="flag=='XQ'"
>
<div class="form-item" v-if="flag=='XQ'">
<span class="form-label">网格员</span>
<div class="form-input-wrap">
<input
type="text"
v-model="formData.gridMemberName"
class="form-input"
:disabled="flag=='XQ'"
<div class="form-input-wrap" style="display: flex; align-items: center;">
<template v-if="flag=='XQ'"><!-- 详情模式 -->
<span class="form-input" style="line-height: .7rem;">
{{ showOriginal.gridMemberName ? formData.gridMemberName : desensitize(formData.gridMemberName, 'name') }}
</span>
<van-icon
:name="showOriginal.gridMemberName ? 'eye-o' : 'closed-eye'"
@click="toggleShow('gridMemberName')"
style="margin-left: 8px; color: #1989fa; cursor: pointer;"
/>
</template>
<input v-else type="text" v-model="formData.gridMemberName" class="form-input" :disabled="flag=='XQ'" />
</div>
</div>
<div
class="form-item"
v-if="flag=='XQ'"
>
<div class="form-item" v-if="flag=='XQ'">
<span class="form-label">网格员联系方式</span>
<div class="form-input-wrap">
<input
maxlength="11"
type="number"
v-model="formData.gridMemberPhone"
class="form-input"
:disabled="flag=='XQ'"
placeholder="请输入网格员联系方式"
<div class="form-input-wrap" style="display: flex; align-items: center;">
<template v-if="flag=='XQ'">
<span class="form-input" style="line-height: .7rem;">
{{ showOriginal.gridMemberPhone ? formData.gridMemberPhone : desensitize(formData.gridMemberPhone, 'phone') }}
</span>
<van-icon
:name="showOriginal.gridMemberPhone ? 'eye-o' : 'closed-eye'"
@click="toggleShow('gridMemberPhone')"
style="margin-left: 8px; color: #1989fa; cursor: pointer;"
/>
</template>
<input v-else maxlength="11" type="number" v-model="formData.gridMemberPhone" class="form-input" placeholder="请输入网格员联系方式" />
</div>
</div>
<div class="form-item">
<span class="form-label">生产经营类型</span>
<div class="form-input-wrap">
<select
class="selector"
v-model="formData.businessType"
:disabled="flag=='XQ'"
>
<option
v-for="(item, i) in dict4businessType"
:key="i"
:label="item.dictLabel"
:value="item.dictValue"
></option>
<select class="selector" v-model="formData.businessType" :disabled="flag=='XQ'">
<option v-for="(item, i) in dict4businessType" :key="i" :label="item.dictLabel" :value="item.dictValue">
</option>
</select>
</div>
</div>
<div class="form-item">
<span class="form-label">行业类型</span>
<div class="form-input-wrap">
<select
class="selector"
v-model="formData.industryType"
:disabled="flag=='XQ'"
>
<option
v-for="(item, i) in dict4industryType"
:key="i"
:label="item.industryName"
:value="item.id"
></option>
<select class="selector" v-model="formData.industryType" :disabled="flag=='XQ'">
<option v-for="(item, i) in dict4industryType" :key="i" :label="item.industryName" :value="item.id">
</option>
</select>
</div>
</div>
<!-- 特殊处理:编辑没有详情有 -->
<div
class="form-item"
style="max-height: 1.4rem; height:auto;"
v-if="flag=='XQ'"
>
<div class="form-item" style="max-height: 1.4rem; height:auto;" v-if="flag=='XQ'">
<span class="form-label">行业主管</span>
<div class="form-input-wrap" style="color: #333;font-size: .3rem;padding-top:.2rem;padding-bottom: .2rem;">
{{ formData.industryDeptName }}
......@@ -226,18 +191,9 @@
<div class="form-item">
<span class="form-label">场所类型</span>
<div class="form-input-wrap">
<select
class="selector"
name=""
v-model="formData.smallPlaceTypeId"
:disabled="flag=='XQ'"
>
<option
v-for="(item, i) in dict4changhsuoType"
:key="i"
:label="item.categoryName"
:value="item.id"
></option>
<select class="selector" name="" v-model="formData.smallPlaceTypeId" :disabled="flag=='XQ'">
<option v-for="(item, i) in dict4changhsuoType" :key="i" :label="item.categoryName" :value="item.id">
</option>
</select>
</div>
</div>
......@@ -249,21 +205,15 @@
<!-- 详情模式 -->
<div class="img-wrapper" style="display: flex;gap:.16rem;">
<div style="position: relative;" v-for="(imgItem, index) in formData.floorPlanPhotos">
<img
:src="previewUrl + imgItem"
style="width: 1.6rem; height: 1.6rem;"
@click="showImage(formData.floorPlanPhotos, index)"
/>
<div v-if="flag=='XG'" class="van-uploader__preview-delete" @click="handleDeleteFloorPlan(index, 'floorPlan')"><i class="van-icon van-icon-cross van-uploader__preview-delete-icon"></i></div>
<img :src="previewUrl + imgItem" style="width: 1.6rem; height: 1.6rem;"
@click="showImage(formData.floorPlanPhotos, index)" />
<div v-if="flag=='XG'" class="van-uploader__preview-delete"
@click="handleDeleteFloorPlan(index, 'floorPlan')"><i
class="van-icon van-icon-cross van-uploader__preview-delete-icon"></i></div>
</div>
<div v-if="formData.floorPlanPhotos.length<4 && flag=='XG' ">
<van-uploader
:before-read="beforeRead"
:after-read="(file) => afterRead(file, 'floorPlan')"
class="uploader-wrapper"
:deletable="false"
:preview-image="false"
>
<van-uploader :before-read="beforeRead" :after-read="(file) => afterRead(file, 'floorPlan')"
class="uploader-wrapper" :deletable="false" :preview-image="false">
<img src="../image/code/upload.png" style="width:1.6rem;height: 1.6rem;" alt="" srcset="">
</van-uploader>
</div>
......@@ -277,21 +227,15 @@
<!-- 详情模式 -->
<div class="img-wrapper" style="display: flex;gap:.16rem;">
<div style="position: relative;" v-for="(imgItem, index) in formData.floorEvacuationPlan">
<img
:src="previewUrl + imgItem"
style="width: 1.6rem; height: 1.6rem;"
@click="showImage(formData.floorEvacuationPlan, index)"
/>
<div v-if="flag=='XG'" class="van-uploader__preview-delete" @click="handleDeleteFloorPlan(index, 'floorEvacuationPlan')"><i class="van-icon van-icon-cross van-uploader__preview-delete-icon"></i></div>
<img :src="previewUrl + imgItem" style="width: 1.6rem; height: 1.6rem;"
@click="showImage(formData.floorEvacuationPlan, index)" />
<div v-if="flag=='XG'" class="van-uploader__preview-delete"
@click="handleDeleteFloorPlan(index, 'floorEvacuationPlan')"><i
class="van-icon van-icon-cross van-uploader__preview-delete-icon"></i></div>
</div>
<div v-if="formData.floorEvacuationPlan.length<4 && flag=='XG' ">
<van-uploader
:before-read="beforeRead"
:after-read="(file) => afterRead(file, 'floorEvacuationPlan')"
class="uploader-wrapper"
:deletable="false"
:preview-image="false"
>
<van-uploader :before-read="beforeRead" :after-read="(file) => afterRead(file, 'floorEvacuationPlan')"
class="uploader-wrapper" :deletable="false" :preview-image="false">
<img src="../image/code/upload.png" style="width:1.6rem;height: 1.6rem;" alt="" srcset="">
</van-uploader>
</div>
......@@ -305,21 +249,15 @@
<!-- 详情模式 -->
<div class="img-wrapper" style="display: flex;gap:.16rem;">
<div style="position: relative;" v-for="(imgItem, index) in formData.businessLicensePhotos">
<img
:src="previewUrl + imgItem"
style="width: 1.6rem; height: 1.6rem;"
@click="showImage(formData.businessLicensePhotos, index)"
/>
<div v-if="flag=='XG'" class="van-uploader__preview-delete" @click="handleDeleteFloorPlan(index, 'license')"><i class="van-icon van-icon-cross van-uploader__preview-delete-icon"></i></div>
<img :src="previewUrl + imgItem" style="width: 1.6rem; height: 1.6rem;"
@click="showImage(formData.businessLicensePhotos, index)" />
<div v-if="flag=='XG'" class="van-uploader__preview-delete"
@click="handleDeleteFloorPlan(index, 'license')"><i
class="van-icon van-icon-cross van-uploader__preview-delete-icon"></i></div>
</div>
<div v-if="formData.businessLicensePhotos.length<1 && flag=='XG' ">
<van-uploader
:before-read="beforeRead"
:after-read="(file) => afterRead(file, 'license')"
class="uploader-wrapper"
:deletable="false"
:preview-image="false"
>
<van-uploader :before-read="beforeRead" :after-read="(file) => afterRead(file, 'license')"
class="uploader-wrapper" :deletable="false" :preview-image="false">
<img src="../image/code/upload.png" style="width:1.6rem;height: 1.6rem;" alt="" srcset="">
</van-uploader>
</div>
......@@ -333,104 +271,77 @@
<!-- 详情模式 -->
<div class="img-wrapper" style="display: flex;gap:.16rem;">
<div style="position: relative;" v-for="(imgItem, index) in formData.storefrontPhotos">
<img
:src="previewUrl + imgItem"
style="width: 1.6rem; height: 1.6rem;"
@click="showImage(formData.storefrontPhotos, index)"
/>
<div v-if="flag=='XG'" class="van-uploader__preview-delete" @click="handleDeleteFloorPlan(index, 'storeFront')"><i class="van-icon van-icon-cross van-uploader__preview-delete-icon"></i></div>
<img :src="previewUrl + imgItem" style="width: 1.6rem; height: 1.6rem;"
@click="showImage(formData.storefrontPhotos, index)" />
<div v-if="flag=='XG'" class="van-uploader__preview-delete"
@click="handleDeleteFloorPlan(index, 'storeFront')"><i
class="van-icon van-icon-cross van-uploader__preview-delete-icon"></i></div>
</div>
<div v-if="formData.storefrontPhotos.length<1 && flag=='XG' ">
<van-uploader
:before-read="beforeRead"
:after-read="(file) => afterRead(file, 'storeFront')"
class="uploader-wrapper"
:deletable="false"
:preview-image="false"
>
<van-uploader :before-read="beforeRead" :after-read="(file) => afterRead(file, 'storeFront')"
class="uploader-wrapper" :deletable="false" :preview-image="false">
<img src="../image/code/upload.png" style="width:1.6rem;height: 1.6rem;" alt="" srcset="">
</van-uploader>
</div>
</div>
</div>
<button
v-if="flag=='XG'"
class="save-btn"
style="margin-left: 50%; transform: translateX(-50%)"
@click="save"
>
<button v-if="flag=='XG'" class="save-btn" style="margin-left: 50%; transform: translateX(-50%)" @click="save">
保存
</button>
<div>
<h5
class="imager-item-title"
style="border: none"
>
<h5 class="imager-item-title" style="border: none">
<span class="form-label">安全二维码</span>
<span></span>
</h5>
<div>
<img
:src="formData.qrCodeUrl"
style="margin-left: 50%; transform: translateX(-50%)"
@click="showImage(formData.storefrontPhotos)"
/>
<img :src="formData.qrCodeUrl" style="margin-left: 50%; transform: translateX(-50%)"
@click="showImage(formData.storefrontPhotos)" />
</div>
</div>
<button
v-if="userType==='shop'"
class="save-btn"
style="margin-left: 50%; transform: translateX(-50%)"
@click="saveCanvas"
>
<button v-if="userType==='shop'" class="save-btn" style="margin-left: 50%; transform: translateX(-50%)"
@click="saveCanvas">
保存二维码
</button>
</div>
<!-- form结束 -->
<!-- 经营信息开始 -->
<div
class="form-container"
v-if="activeTab==1"
>
<div class="form-container" v-if="activeTab==1">
<div class="form-item">
<span class="form-label">建筑面积(㎡)</span>
<div class="form-input-wrap">
<input
maxlength="4"
type="number"
v-model="formData.area"
class="form-input"
:disabled="flag=='XQ'"
placeholder="请输入建筑面积(㎡)"
/>
<input maxlength="4" type="number" v-model="formData.area" class="form-input" :disabled="flag=='XQ'"
placeholder="请输入建筑面积(㎡)" />
</div>
</div>
<div class="form-item">
<span class="form-label">建筑结构</span>
<div class="form-input-wrap">
<input
maxlength="25"
type="text"
v-model="formData.buildingStructure"
class="form-input"
:disabled="flag=='XQ'"
placeholder="请输入建筑结构"
/>
<input maxlength="25" type="text" v-model="formData.buildingStructure" class="form-input"
:disabled="flag=='XQ'" placeholder="请输入建筑结构" />
</div>
</div>
<div class="form-item">
<span class="form-label">产权人</span>
<div class="form-input-wrap">
<input
maxlength="4"
<div class="form-input-wrap" style="display: flex; align-items: center;">
<template v-if="flag=='XQ'"><!-- 详情模式 -->
<span class="form-input" style="line-height: .7rem;">
{{ showOriginal.owner ? formData.owner : desensitize(formData.owner, 'name') }}
</span>
<van-icon
:name="showOriginal.owner ? 'eye-o' : 'closed-eye'"
@click="toggleShow('owner')"
style="margin-left: 8px; color: #1989fa; cursor: pointer;"
/>
</template>
<input v-else
type="text"
maxlength="4"
v-model="formData.owner"
class="form-input"
:disabled="flag=='XQ'"
placeholder="请输入产权人"
/>
</div>
......@@ -438,13 +349,22 @@
<div class="form-item">
<span class="form-label">产权人联系方式</span>
<div class="form-input-wrap">
<input
maxlength="11"
<div class="form-input-wrap" style="display: flex; align-items: center;">
<template v-if="flag=='XQ'"><!-- 详情模式 -->
<span class="form-input" style="line-height: .7rem;">
{{ showOriginal.ownerPhone ? formData.ownerPhone : desensitize(formData.ownerPhone, 'phone') }}
</span>
<van-icon
:name="showOriginal.ownerPhone ? 'eye-o' : 'closed-eye'"
@click="toggleShow('ownerPhone')"
style="margin-left: 8px; color: #1989fa; cursor: pointer;"
/>
</template>
<input v-else
type="number"
maxlength="11"
v-model="formData.ownerPhone"
class="form-input"
:disabled="flag=='XQ'"
placeholder="请输入产权人联系方式"
/>
</div>
......@@ -452,13 +372,22 @@
<div class="form-item">
<span class="form-label">经营人</span>
<div class="form-input-wrap">
<input
maxlength="4"
<div class="form-input-wrap" style="display: flex; align-items: center;">
<template v-if="flag=='XQ'"><!-- 详情模式 -->
<span class="form-input" style="line-height: .7rem;">
{{ showOriginal.operator ? formData.operator : desensitize(formData.operator, 'name') }}
</span>
<van-icon
:name="showOriginal.operator ? 'eye-o' : 'closed-eye'"
@click="toggleShow('operator')"
style="margin-left: 8px; color: #1989fa; cursor: pointer;"
/>
</template>
<input v-else
type="text"
maxlength="4"
v-model="formData.operator"
class="form-input"
:disabled="flag=='XQ'"
placeholder="请输入经营人"
/>
</div>
......@@ -466,13 +395,22 @@
<!-- 新增字段 -->
<div class="form-item">
<span class="form-label">经营人联系方式</span>
<div class="form-input-wrap">
<input
maxlength="11"
<div class="form-input-wrap" style="display: flex; align-items: center;">
<template v-if="flag=='XQ'"><!-- 详情模式 -->
<span class="form-input" style="line-height: .7rem;">
{{ showOriginal.operatorPhone ? formData.operatorPhone : desensitize(formData.operatorPhone, 'phone') }}
</span>
<van-icon
:name="showOriginal.operatorPhone ? 'eye-o' : 'closed-eye'"
@click="toggleShow('operatorPhone')"
style="margin-left: 8px; color: #1989fa; cursor: pointer;"
/>
</template>
<input v-else
type="number"
maxlength="11"
v-model="formData.operatorPhone"
class="form-input"
:disabled="flag=='XQ'"
placeholder="请输入经营人联系方式"
/>
</div>
......@@ -481,69 +419,66 @@
<div class="form-item">
<span class="form-label">房屋类型</span>
<div class="form-input-wrap">
<select
class="selector"
v-model="formData.houseType"
:disabled="flag=='XQ'"
>
<option
v-for="(item, i) in dict4fangwuType"
:key="i"
:label="item.dictLabel"
:value="item.dictValue"
></option>
<select class="selector" v-model="formData.houseType" :disabled="flag=='XQ'">
<option v-for="(item, i) in dict4fangwuType" :key="i" :label="item.dictLabel" :value="item.dictValue">
</option>
</select>
</div>
</div>
<div class="form-item">
<span class="form-label">房屋用途</span>
<div class="form-input-wrap">
<select
class="selector"
v-model="formData.houseUsage"
:disabled="flag=='XQ'"
>
<option
v-for="(item, i) in dict4fangwuyongtuType"
:key="i"
:label="item.dictLabel"
:value="item.dictValue"
></option>
<select class="selector" v-model="formData.houseUsage" :disabled="flag=='XQ'">
<option v-for="(item, i) in dict4fangwuyongtuType" :key="i" :label="item.dictLabel"
:value="item.dictValue"></option>
</select>
</div>
</div>
<div class="form-item">
<span class="form-label">房东姓名</span>
<div class="form-input-wrap">
<input
maxlength="4"
<div class="form-input-wrap" style="display: flex; align-items: center;">
<template v-if="flag=='XQ'"><!-- 详情模式 -->
<span class="form-input" style="line-height: .7rem;">
{{ showOriginal.landlordName ? formData.landlordName : desensitize(formData.landlordName, 'name') }}
</span>
<van-icon
:name="showOriginal.landlordName ? 'eye-o' : 'closed-eye'"
@click="toggleShow('landlordName')"
style="margin-left: 8px; color: #1989fa; cursor: pointer;"
/>
</template>
<input v-else
type="text"
maxlength="4"
v-model="formData.landlordName"
class="form-input"
:disabled="flag=='XQ'"
placeholder="请输入房东姓名"
/>
</div>
</div>
<div class="form-item">
<span class="form-label">房东联系方式</span>
<div class="form-input-wrap">
<input
maxlength="11"
<div class="form-input-wrap" style="display: flex; align-items: center;">
<template v-if="flag=='XQ'"><!-- 详情模式 -->
<span class="form-input" style="line-height: .7rem;">
{{ showOriginal.landlordContact ? formData.landlordContact : desensitize(formData.landlordContact, 'phone') }}
</span>
<van-icon
:name="showOriginal.landlordContact ? 'eye-o' : 'closed-eye'"
@click="toggleShow('landlordContact')"
style="margin-left: 8px; color: #1989fa; cursor: pointer;"
/>
</template>
<input v-else
type="number"
maxlength="11"
v-model="formData.landlordContact"
class="form-input"
:disabled="flag=='XQ'"
placeholder="请输入房东联系方式"
/>
</div>
</div>
<button
v-if="flag=='XG'"
class="save-btn"
style="margin-left: 50%; transform: translateX(-50%)"
@click="save"
>
<button v-if="flag=='XG'" class="save-btn" style="margin-left: 50%; transform: translateX(-50%)" @click="save">
保存
</button>
</div>
......@@ -551,17 +486,16 @@
<!-- 消费者安全建议列表 -->
<div v-if="activeTab==2">
<van-list v-model:loading="loading" :offset="10" :finished="finished" finished-text="没有更多了" @load="getConsumerSuggestList" :immediate-check="false">
<van-cell
v-for="(item, index) in consumerSuggestList"
:key="item.id"
@click="viewDetail(item)"
>
<van-list v-model:loading="loading" :offset="10" :finished="finished" finished-text="没有更多了"
@load="getConsumerSuggestList" :immediate-check="false">
<van-cell v-for="(item, index) in consumerSuggestList" :key="item.id" @click="viewDetail(item)">
<div style="width: 100%">
<div style="display: flex; justify-content: space-between; margin: 8px 0">
<span style="color: #737373; font-size: 0.28rem">日期:{{ item.submitDate }}</span>
</div>
<div style="white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #333; font-size: 0.3rem; font-weight: bold; font-family: PingFang SC">{{item.content}}</div>
<div
style="white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #333; font-size: 0.3rem; font-weight: bold; font-family: PingFang SC">
{{item.content}}</div>
</div>
</van-cell>
</van-list>
......@@ -569,5 +503,6 @@
<!-- 消费者安全建议列表结束 -->
</div>
</div>
</body>
</body>
</html>
\ No newline at end of file
......@@ -57,6 +57,19 @@ window.addEventListener('load', function () {
dict4community: [],
dict4industryType: [],
consumerSuggestList: [],
// 添加显示状态管理对象
showOriginal: {
merchantName: false,
merchantPhone: false,
businessAddress: false,
owner: false,
ownerPhone: false,
operator: false,
operatorPhone: false,
landlordName: false,
landlordContact: false
}
}
},
computed: {
......@@ -93,6 +106,26 @@ window.addEventListener('load', function () {
}
},
methods: {
// 添加脱敏处理函数
desensitize(value, type) {
if (!value) return '';
switch(type) {
case 'name': // 姓名脱敏:保留姓氏
return value.length > 1 ? value.charAt(0) + '*'.repeat(value.length - 1) : value;
case 'phone': // 手机号脱敏:保留前3后4
return value.replace(/^(\d{3})\d{4}(\d{4})$/, '$1****$2');
case 'address': // 地址脱敏:保留前5后5
if (value.length <= 10) return value;
return value.substring(0, 5) + '*****' + value.substring(value.length - 5);
default: // 默认脱敏:保留前3后3
if (value.length <= 6) return value;
return value.substring(0, 3) + '*****' + value.substring(value.length - 3);
}
},
// 切换显示状态方法
toggleShow(field) {
this.$set(this.showOriginal, field, !this.showOriginal[field]);
},
reset(){
this.page = 1
this.size = 9999
......
......@@ -397,3 +397,10 @@ iframe{
color: #FFFFFF; /* 文字颜色 */
line-height: 1.2; /* 行高 */
}
/* 图标样式优化 */
.van-icon-closed-eye, .van-icon-eye-o {
font-size: 16px;
transition: color 0.2s;
}
\ No newline at end of file
......@@ -30,14 +30,32 @@
<div class="form-item">
<span class="form-label title_require">联系人</span>
<div class="form-input-wrap" style="font-size: 15px;color: #737373;">
{{ formData.merchantName }}
<template>
<span :class="'form-input'" style="line-height: .7rem;">
{{ showOriginal.merchantName ? formData.merchantName : desensitize(formData.merchantName, 'name') }}
</span>
<van-icon
:name="showOriginal.merchantName ? 'eye-o' : 'closed-eye'"
@click="toggleShow('merchantName')"
style="margin-left: 8px; color: #1989fa; cursor: pointer;"
/>
</template>
</div>
</div>
<div class="form-item">
<span class="form-label title_require">电话</span>
<div class="form-input-wrap" style="font-size: 15px;color: #737373;">
{{ formData.merchantPhone }}
<template><!-- 详情模式 -->
<span class="form-input" style="line-height: .7rem;">
{{ showOriginal.merchantPhone ? formData.merchantPhone : desensitize(formData.merchantPhone, 'phone') }}
</span>
<van-icon
:name="showOriginal.merchantPhone ? 'eye-o' : 'closed-eye'"
@click="toggleShow('merchantPhone')"
style="margin-left: 8px; color: #1989fa; cursor: pointer;"
/>
</template>
</div>
</div>
<div class="form-item">
......
......@@ -38,7 +38,12 @@ window.addEventListener("load", function () {
},
id: '',
errorReqCount: 0,
iosFlag: gemhoUtil.isIOSStrict()
iosFlag: gemhoUtil.isIOSStrict(),
// 添加显示状态管理对象
showOriginal: {
merchantName: false,
merchantPhone: false,
}
}
},
created() {
......@@ -56,6 +61,26 @@ window.addEventListener("load", function () {
this.getDict4tab1()
},
methods: {
// 添加脱敏处理函数
desensitize(value, type) {
if (!value) return '';
switch(type) {
case 'name': // 姓名脱敏:保留姓氏
return value.length > 1 ? value.charAt(0) + '*'.repeat(value.length - 1) : value;
case 'phone': // 手机号脱敏:保留前3后4
return value.replace(/^(\d{3})\d{4}(\d{4})$/, '$1****$2');
case 'address': // 地址脱敏:保留前5后5
if (value.length <= 10) return value;
return value.substring(0, 5) + '*****' + value.substring(value.length - 5);
default: // 默认脱敏:保留前3后3
if (value.length <= 6) return value;
return value.substring(0, 3) + '*****' + value.substring(value.length - 3);
}
},
// 切换显示状态方法
toggleShow(field) {
this.$set(this.showOriginal, field, !this.showOriginal[field]);
},
goback4ios() { // 全部标记为已读
let params = {
merId: gemhoUtil.getCookie('merId') || '',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment