数据脱敏

This commit is contained in:
hongchao 2025-01-10 17:44:30 +08:00
parent 02485efff3
commit 160894a9aa
4 changed files with 28 additions and 8 deletions

View File

@ -141,7 +141,7 @@
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="字典类型">
<el-input v-model="form.dictType" :disabled="true" />
<el-input v-model="desensitizedDictType" :disabled="true" />
</el-form-item>
<el-form-item label="单位类型" prop="dictLabel">
<el-input v-model="form.dictLabel" placeholder="请输入单位类型" />
@ -355,7 +355,22 @@ export default {
created() {
this.getList();
},
computed: {
desensitizedDictType() {
const dictType = this.form.dictType;
if (!dictType) {
return "";
}
const len = dictType.length;
const start = Math.floor(len / 2) - 4;
const end = Math.floor(len / 2) + 4;
return dictType.substring(0, start) + "****" + dictType.substring(end);
},
},
methods: {
dictCrypto(value) {
return value.replace(reg, "$1****$2")
},
/** 查询字典类型列表 */
getList() {
this.loading = true;

View File

@ -89,14 +89,14 @@
<el-table-column label="采购数量" align="center" prop="purchaseMaNumber" :show-overflow-tooltip="true"/>
<el-table-column label="物资厂家" align="center" prop="supplier" :show-overflow-tooltip="true"/>
<el-table-column label="创建人" align="center" prop="createBy" :show-overflow-tooltip="true"/>
<el-table-column label="创建时间" align="center" prop="createTime" width="150" :show-overflow-tooltip="true"/>
<el-table-column label="创建时间" align="center" prop="createTime" width="200" :show-overflow-tooltip="true"/>
<el-table-column label="状态" align="center" prop="taskStatusName" :show-overflow-tooltip="true">
<!-- <template slot-scope="scope">-->
<!-- <dict-tag :options="dict.type.purchase_task_status" :value="scope.row.taskStatus"/>-->
<!-- </template>-->
</el-table-column>
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true"/>
<el-table-column label="操作" align="center" width="250">
<el-table-column label="操作" align="center" width="200">
<template slot-scope="scope">
<el-button
size="mini"
@ -114,9 +114,10 @@
<el-button
size="mini"
type="warning"
v-if="scope.row.taskStatusName == '已完成'"
@click="handlePrint(scope.row)"
>
验收
入库
</el-button>
</template>

View File

@ -617,7 +617,9 @@ export default {
let index2 =this.equipmentList.findIndex(item=>item.purchaseTaxPrice==0)
if(index>-1){
this.$modal.msgError('采购数量不能为0')
}else{
}else if(index2>-1){
this.$modal.msgError('含税单价不能为0')
}else {
this.$modal.confirm('是否确认保存当前页面').then(function () {})
.then(() => {
if (this.isEdit) {

View File

@ -16,7 +16,7 @@
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
style="width: 240px"
>
</el-date-picker>
</el-form-item>
@ -110,6 +110,7 @@
label="采购物资"
align="center"
prop="purchaseMaTypeName"
width="140"
:show-overflow-tooltip="true"
/>
<el-table-column
@ -178,7 +179,7 @@
prop="remark"
show-overflow-tooltip
/>
<el-table-column label="操作" align="center" width="300">
<el-table-column label="操作" align="center" width="230">
<template slot-scope="scope">
<el-button
size="mini"
@ -199,7 +200,8 @@
>
<el-button size="mini" type="warning" @click="handlePrint(scope.row)"
>验收单</el-button
v-if="scope.row.taskStatusName == '已完成'"
>入库单</el-button
>
<el-button