From 7c53a17cab68c2e1c86f0487c7b72ea5d929b2e5 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Fri, 05 Jan 2024 15:48:03 +0800
Subject: [PATCH] 报事报修显示内容调整

---
 src/views/task/reportForRepairs.vue |  193 ++++++++++++++++++++++++++---------------------
 1 files changed, 107 insertions(+), 86 deletions(-)

diff --git a/src/views/task/reportForRepairs.vue b/src/views/task/reportForRepairs.vue
index 5914901..1ca0cf4 100644
--- a/src/views/task/reportForRepairs.vue
+++ b/src/views/task/reportForRepairs.vue
@@ -2,7 +2,7 @@
  * @Author: shuishen 1109946754@qq.com
  * @Date: 2023-12-14 17:10:00
  * @LastEditors: shuishen 1109946754@qq.com
- * @LastEditTime: 2024-01-02 10:14:01
+ * @LastEditTime: 2024-01-05 15:46:34
  * @FilePath: \jczz_web\src\views\task\reportForRepairs.vue
  * @Description:
  *
@@ -143,6 +143,17 @@
 
 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 {
             colors: ['#99A9BF', '#F7BA2A', '#FF9900'],
             form: {},
@@ -173,93 +184,103 @@
                 //stripe:true,
                 // excelBtn: true,
                 dialogClickModal: false,
-                column: [{
-                    label: "类型",
-                    prop: "type",
-                    span: 12,
-                    searchSpan: 4,
-                    dataType: "number",
-                    type: "select",
-                    width: 100,
-                    dicUrl: "/api/blade-system/dict-biz/dictionary?code=reportForRepairsType",
-                    props: {
-                        label: "dictValue",
-                        value: "dictKey",
+                column: [
+                    {
+                        width: 96,
+                        label: "类型",
+                        prop: "type",
+                        span: 12,
+                        searchSpan: 4,
+                        dataType: "number",
+                        type: "select",
+                        dicUrl: "/api/blade-system/dict-biz/dictionary?code=reportForRepairsType",
+                        props: {
+                            label: "dictValue",
+                            value: "dictKey",
+                        },
+                        search: true,
                     },
-                    search: true,
-                },
-                {
-                    label: "姓名",
-                    prop: "realName",
-                    span: 12,
-                    searchSpan: 4,
-                    width: 100,
-                    search: true,
-                },
-                {
-                    label: "手机号",
-                    prop: "phone",
-                    span: 12,
-                    width: 100,
-                    searchSpan: 4,
-                    search: true,
-                },
-                {
-                    label: "图片",
-                    prop: "imageUrls",
-                    width: 80,
-                    type: "upload",
-                    listType: "picture-card",
-                    dataType: "string",
-                    multiple: true,
-                    action: "/api/blade-resource/oss/endpoint/put-file",
-                    propsHttp: {
-                        res: "data",
-                        name: 'name',
-                        url: "link",
+                    {
+                        width: 96,
+                        label: "姓名",
+                        prop: "realName",
+                        span: 12,
+                        searchSpan: 4,
+                        search: true,
                     },
-                    span: 24,
-                },
-                {
-                    label: "地点",
-                    prop: "addressName",
-                    overHidden: true
-                },
-                {
-                    addDisplay: false,
-                    editDisplay: false,
-                    slot: true,
-                    label: "状态",
-                    prop: "confirmFlag",
-                    overHidden: true
-                },
-                {
-                    label: "上报时间",
-                    prop: "createTime",
-                    width: 160,
-                    addDisplay: false,
-                    editDisplay: false,
-                    type: "date",
-                    format: "yyyy-MM-dd HH:mm:ss",
-                    valueFormat: "yyyy-MM-dd HH:mm:ss",
-                },
-                {
-                    label: "处理时间",
-                    prop: "confirmTime",
-                    width: 160,
-                    addDisplay: false,
-                    editDisplay: false,
-                    type: "date",
-                    format: "yyyy-MM-dd HH:mm:ss",
-                    valueFormat: "yyyy-MM-dd HH:mm:ss",
-                },
-                {
-                    label: "描述",
-                    prop: "remark",
-                    type: "textarea",
-                    hide: true,
-                    span: 24,
-                }
+
+                    {
+                        width: 96,
+                        label: "手机号码",
+                        prop: "phone",
+                        search: true,
+                        searchSpan: 3,
+                        slot: true,
+                        rules: [
+                            {
+                                validator: validatorPhone,
+                                trigger: 'blur'
+                            }
+                        ],
+                    },
+
+                    {
+                        width: 160,
+                        label: "图片",
+                        prop: "imageUrls",
+                        type: "upload",
+                        listType: "picture-card",
+                        dataType: "string",
+                        multiple: true,
+                        action: "/api/blade-resource/oss/endpoint/put-file",
+                        propsHttp: {
+                            res: "data",
+                            name: 'name',
+                            url: "link",
+                        },
+                        span: 24,
+                    },
+                    {
+                        label: "地点",
+                        prop: "addressName",
+                        overHidden: true
+                    },
+                    {
+                        width: 120,
+                        addDisplay: false,
+                        editDisplay: false,
+                        slot: true,
+                        label: "状态",
+                        prop: "confirmFlag",
+                        overHidden: true
+                    },
+                    {
+                        label: "上报时间",
+                        prop: "createTime",
+                        width: 160,
+                        addDisplay: false,
+                        editDisplay: false,
+                        type: "date",
+                        format: "yyyy-MM-dd HH:mm:ss",
+                        valueFormat: "yyyy-MM-dd HH:mm:ss",
+                    },
+                    {
+                        label: "处理时间",
+                        prop: "confirmTime",
+                        width: 160,
+                        addDisplay: false,
+                        editDisplay: false,
+                        type: "date",
+                        format: "yyyy-MM-dd HH:mm:ss",
+                        valueFormat: "yyyy-MM-dd HH:mm:ss",
+                    },
+                    {
+                        label: "描述",
+                        prop: "remark",
+                        type: "textarea",
+                        hide: true,
+                        span: 24,
+                    }
                 ],
             },
             data: [],

--
Gitblit v1.9.3