From e2c1995f2e135b8a7433b2bdbed2f7758261ace8 Mon Sep 17 00:00:00 2001
From: linwe <872216996@qq.com>
Date: Tue, 09 Jul 2024 15:20:39 +0800
Subject: [PATCH] 公安模块添加时间查询

---
 src/views/backblask/BackblastPubRecord.vue |  101 +++++++++++++++++++++++++++++++-------------------
 1 files changed, 63 insertions(+), 38 deletions(-)

diff --git a/src/views/backblask/BackblastPubRecord.vue b/src/views/backblask/BackblastPubRecord.vue
index 4d1a42f..c9b745b 100644
--- a/src/views/backblask/BackblastPubRecord.vue
+++ b/src/views/backblask/BackblastPubRecord.vue
@@ -100,7 +100,6 @@
           column: [{
               label: "地址",
               prop: "address",
-              // align: 'center',
               minWidth: 100,
               labelWidth: 120,
               search: true,
@@ -109,22 +108,23 @@
               row: true,
               span: 24,
             }, {
+              label: "社区",
+              prop: "communityName",
+              align: 'center',
+              labelWidth: 120,
+              search: true,
+              searchSpan: 4,
+              searchLabelWidth: 96,
+              width: 160,
+            }, {
               label: "小区名称",
               prop: "aoiName",
               labelWidth: 120,
-              // align: 'center',
-              // type: "textarea",
-              row: true,
-              span: 24,
               overHidden: true,
             }, {
               label: "户室信息",
               prop: "houseName",
               labelWidth: 120,
-              // align: 'center',
-              // type: "textarea",
-              row: true,
-              span: 24,
               overHidden: true,
             }, {
               label: "宣防内容",
@@ -139,10 +139,7 @@
               label: "是否下载国家反诈app",
               prop: "isFzApp",
               labelWidth: 120,
-              // align: 'center',
               type: "select",
-              row: true,
-              span: 24,
               overHidden: true,
               hide: true,
               dicData: [{
@@ -159,10 +156,7 @@
               label: "是否打开预警共能",
               prop: "isOpenAlarm",
               labelWidth: 120,
-              // align: 'center',
               type: "select",
-              row: true,
-              span: 24,
               overHidden: true,
               hide: true,
               dicData: [{
@@ -178,7 +172,6 @@
             {
               label: "宣防佐证照片",
               prop: "pubUrls",
-              // align: 'center',
               fileType: 'img',
               labelWidth: 120,
               type: "upload",
@@ -188,45 +181,53 @@
               row: true,
               span: 24,
             }, {
-              label: "时间",
+              label: "宣防时间",
               prop: "createTime",
               align: 'center',
               labelWidth: 120,
               width: 156,
-              row: true,
-            }, {
-              label: "民警姓名",
-              prop: "policeman",
-              align: 'center',
-              // labelWidth: 120,
-              search: true,
-              searchSpan: 4,
-              // searchLabelWidth: 96,
-              width: 110,
-              searchPlaceholder: '请输入民警姓名'
             },
             {
-              label: "民警联系方式",
+              label: "宣防人姓名",
+              prop: "policeman",
+              align: 'center',
+              labelWidth: 120,
+              search: true,
+              searchSpan: 4,
+              searchLabelWidth: 96,
+              width: 110,
+              searchPlaceholder: '请输入宣防人姓名'
+            },
+            {
+              label: "宣防人电话",
               prop: "policemanPhone",
               align: 'center',
               slot: true,
               labelWidth: 120,
               search: true,
-              searchLabelWidth: 110,
+              searchLabelWidth: 120,
               searchSpan: 4,
               width: 120
             },
             {
               label: "所属街道",
-              prop: "townName",
-              align: 'center',
+              parent: false,
               search: true,
               searchSpan: 4,
-              searchLabelWidth: 96,
-              labelWidth: 120,
-              width: 156,
-              searchPlaceholder: '请输入街道'
-            }, {
+              prop: "townName",
+              type: "tree",
+              dicUrl: "/api/blade-system/region/getTownTree",
+              props: {
+                label: "name",
+                value: "name"
+              },
+              rules: [{
+                required: true,
+                message: "请选择所属街道",
+                trigger: "blur",
+              }, ],
+            },
+            {
               label: "宣防单位",
               prop: "deptName",
               align: 'center',
@@ -235,7 +236,6 @@
               searchSpan: 4,
               searchLabelWidth: 96,
               searchPlaceholder: '请输入宣防单位',
-              // hide: true
             },
             {
               label: "宣防对象",
@@ -250,6 +250,24 @@
               span: 24,
               slot: true,
               formslot: true
+            }, {
+              label: "宣防时间",
+              prop: "dateTime",
+              type: "daterange",
+              format: "yyyy-MM-dd",
+              valueFormat: "yyyy-MM-dd",
+              searchSpan: 6,
+              searchRange: true,
+              hide: true,
+              addDisplay: false,
+              editDisplay: false,
+              viewDisplay: false,
+              search: true,
+              rules: [{
+                required: true,
+                message: "请选择事发时间",
+                trigger: "blur",
+              }, ],
             },
           ],
         },
@@ -484,6 +502,13 @@
       },
 
       onLoad(page, params = {}) {
+        const {
+          dateTime
+        } = this.query
+        if (dateTime) {
+          params['startTime'] = dateTime[0]
+          params['endTime'] = dateTime[1]
+        }
         this.loading = true
         getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
           const data = res.data.data

--
Gitblit v1.9.3