From ebfc739bdbbc0dd0fccd0bf47b7d2d5397c3c511 Mon Sep 17 00:00:00 2001
From: lin <sbla5888@163.com>
Date: Fri, 22 Mar 2024 12:44:21 +0800
Subject: [PATCH] 轮播图片
---
src/views/cGovernance/taskECall.vue | 64 +++++++++++++++++++++++++++----
1 files changed, 55 insertions(+), 9 deletions(-)
diff --git a/src/views/cGovernance/taskECall.vue b/src/views/cGovernance/taskECall.vue
index 05ab674..a53d835 100644
--- a/src/views/cGovernance/taskECall.vue
+++ b/src/views/cGovernance/taskECall.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>
</avue-crud>
</basic-container>
</template>
@@ -34,6 +39,19 @@
// import AvueMap from "avue-plugin-map";
export default {
data () {
+
+ //手机号格式校验
+ let validatorPhone = function (rule, value, callback) {
+ if (value) {
+ if (!/^1[3456789]\d{9}$/.test(value)) {
+ callback(new Error('手机号格式有误!'))
+ } else {
+ callback()
+ }
+ }
+ callback()
+ }
+
return {
form: {},
query: {},
@@ -46,13 +64,16 @@
datetime: "",
selectionList: [],
option: {
+ labelWidth: 96,
+ searchLabelWidth: 96,
+ searchShow: true,
+ searchMenuSpan: 3,
+ menuWidth: 210,
+
height: "auto",
calcHeight: 54,
dialogWidth: 950,
tip: false,
- searchShow: true,
- searchMenuSpan: 3,
- menuWidth: 280,
border: true,
//stripe:true,
index: true,
@@ -67,6 +88,7 @@
searchSpan: 4,
width: 100,
search: true,
+ searchLabelWidth: 76,
rules: [{
required: true,
message: "请输入事件名称",
@@ -74,13 +96,13 @@
},],
},
{
+ width: 100,
label: "事件类型",
prop: "type",
span: 12,
searchSpan: 4,
dataType: "number",
type: "select",
- width: 100,
dicUrl: "/api/blade-system/dict-biz/dictionary?code=eCallEventType",
props: {
label: "dictValue",
@@ -142,11 +164,12 @@
// search: true,
},
{
+ width: 110,
label: "姓名",
prop: "realName",
span: 12,
searchSpan: 4,
- width: 100,
+ searchLabelWidth: 66,
search: true,
rules: [{
required: false,
@@ -155,17 +178,22 @@
},],
},
{
+ width: 120,
label: "联系方式",
prop: "phone",
span: 12,
- width: 100,
searchSpan: 4,
search: true,
rules: [{
required: false,
message: "请输入联系方式",
trigger: "blur",
- },],
+ },
+ {
+ validator: validatorPhone,
+ trigger: 'blur'
+ }],
+ slot: true
},
{
label: "事发地点",
@@ -178,9 +206,9 @@
},],
},
{
+ width: 100,
label: "事发时间",
prop: "occurrenceTime",
- width: 100,
type: "date",
format: "yyyy-MM-dd",
valueFormat: "yyyy-MM-dd",
@@ -193,7 +221,7 @@
{
label: "事发位置",
prop: "location",
- submitBtn: "提交",
+ submitBtn: "保存",
hide: true,
type: 'map',
dataType: "string",
@@ -376,8 +404,25 @@
})
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]
+ },
+
rowSave (row, done, loading) {
if (row.imageUrls.length > 0) {
var urls = []
@@ -532,6 +577,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