From d16d10d94fddff86bdfd87113e7fd2cebe8b7cd7 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Wed, 24 Jan 2024 18:15:06 +0800
Subject: [PATCH] 居民监管样式调整

---
 src/views/grid/index.vue |   51 +++++++++++++++++++++++++++++++--------------------
 1 files changed, 31 insertions(+), 20 deletions(-)

diff --git a/src/views/grid/index.vue b/src/views/grid/index.vue
index 847b9c1..2386b77 100644
--- a/src/views/grid/index.vue
+++ b/src/views/grid/index.vue
@@ -19,6 +19,18 @@
 // import website from '@/config/website'
 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: {},
@@ -31,13 +43,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,
@@ -46,11 +61,11 @@
                 dialogClickModal: false,
                 column: [
                     {
+                        overHidden: true,
+                        label: "所属社区",
                         addDisplay: false,
                         editDisplay: false,
                         viewDisplay: false,
-                        width: 160,
-                        label: "所属社区",
                         prop: "communityName",
                         search: true,
                         searchSpan: 4,
@@ -67,7 +82,6 @@
                         label: "所属社区",
                         prop: "communityCode",
                         search: false,
-                        width: 150,
                         type: "tree",
                         dicUrl: "/api/blade-system/region/tree",
                         props: {
@@ -84,6 +98,7 @@
                     },
 
                     {
+                        overHidden: true,
                         label: "网格名称",
                         prop: "gridName",
                         searchSpan: 4,
@@ -96,7 +111,9 @@
                             },
                         ],
                     },
+
                     {
+                        width: 110,
                         label: "负责人",
                         prop: "principal",
                         searchSpan: 4,
@@ -110,6 +127,7 @@
                         ],
                     },
                     {
+                        width: 120,
                         label: "联系电话",
                         prop: "principalPhone",
                         searchSpan: 4,
@@ -120,6 +138,11 @@
                                 message: "请输入联系电话",
                                 trigger: "blur",
                             },
+
+                            {
+                                validator: validatorPhone,
+                                trigger: 'blur'
+                            }
                         ],
                     },
                     {
@@ -299,21 +322,9 @@
             this.onLoad(this.page, this.query)
         },
         onLoad (page, params = {}) {
-            const { dateTime } = this.query
-            let values = {
-                ...params,
-            }
-            if (dateTime) {
-                values = {
-                    ...params,
-                    startTime: dateTime[0],
-                    endTime: dateTime[1],
-                    ...this.query,
-                }
-                values.dateTime = null
-            }
             this.loading = true
-            getList(page.currentPage, page.pageSize, values).then((res) => {
+
+            getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then((res) => {
                 const data = res.data.data
                 this.page.total = data.total
                 this.data = data.records

--
Gitblit v1.9.3