From d41edbb26460b513850e6028db75b08f5a552f5c Mon Sep 17 00:00:00 2001 From: "wangmingyong@163.com" Date: Mon, 17 Aug 2026 18:08:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=BA=E5=91=98=E9=80=89=E6=8B=A9=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../efcode/report/registration/indexList.vue | 3 +- .../enforcement/nos/RegisterPopups.vue | 35 ++++-- .../enforcement/register/RegisterPopups.vue | 29 +++-- .../enforcement/my/notice/cp_notice_edit.vue | 112 ++++++++++++++---- .../enforcement/my/plan/cp_plan_edit.vue | 80 +++++++++---- .../vite-env/.env.enforcement-dev-wmy | 4 +- .../enforcement/enforcementChat.vue | 2 +- .../vite-env/.env.enterprise-dev-wmy | 4 +- 8 files changed, 203 insertions(+), 66 deletions(-) diff --git a/zdxt-web-client/zdxt-admin-plus-ui/src/views/efcode/report/registration/indexList.vue b/zdxt-web-client/zdxt-admin-plus-ui/src/views/efcode/report/registration/indexList.vue index e84c00aa..1d08a2a7 100644 --- a/zdxt-web-client/zdxt-admin-plus-ui/src/views/efcode/report/registration/indexList.vue +++ b/zdxt-web-client/zdxt-admin-plus-ui/src/views/efcode/report/registration/indexList.vue @@ -550,9 +550,8 @@ const closeDetailDialog = () => { {{ noScanReasonOptions.find(d => d.dictValue === detailRow.checkCss)?.dictLabel || '-' }} {{ detailRow.otherReasons || '-' }} {{ detailRow.isComplaint === 1 ? '是' : '否' }} - {{ detailRow.createTime ? formatDate(detailRow) : '-' }} + {{ (detailRow.createTime) }} - diff --git a/zdxt-web-client/zdxt-efcode-enforcement-app/src/components/enforcement/nos/RegisterPopups.vue b/zdxt-web-client/zdxt-efcode-enforcement-app/src/components/enforcement/nos/RegisterPopups.vue index 6a6f3073..8cd940d1 100644 --- a/zdxt-web-client/zdxt-efcode-enforcement-app/src/components/enforcement/nos/RegisterPopups.vue +++ b/zdxt-web-client/zdxt-efcode-enforcement-app/src/components/enforcement/nos/RegisterPopups.vue @@ -40,18 +40,18 @@ + :finished-text="personFinishedText" @load="loadPersonList" class="person-list">
{{ person.userName }}
执法证件号:{{ person.lawCertificateNum || person.phonenumber || person.mobileNumber }}
- +
@@ -278,8 +278,17 @@ const personLoading = ref(false) const personFinished = ref(false) const personPageNum = ref(1) const personPageSize = ref(10) +const personSearched = ref(false) + +const personEmptyText = computed(() => personSearched.value ? "暂无数据" : "请输入至少1个字搜索") +const personFinishedText = computed(() => personList.value.length > 0 ? "没有更多了" : "") const loadPersonList = () => { + if ((personSearchKeyword.value || "").trim().length < 1) { + personFinished.value = true + personLoading.value = false + return + } if (personFinished.value) return personLoading.value = true @@ -335,11 +344,11 @@ const loadPersonList = () => { } const initPersonList = () => { - personFinished.value = false + personFinished.value = true personPageNum.value = 1 personList.value = [] personLoading.value = false - loadPersonList() + personSearched.value = false } const handleSelectPerson = (person) => { @@ -347,12 +356,24 @@ const handleSelectPerson = (person) => { } const handlePersonSearch = () => { - initPersonList() + const keyword = (personSearchKeyword.value || "").trim() + if (keyword.length < 1) { + showToast("请输入至少1个字搜索") + return + } + personFinished.value = false + personPageNum.value = 1 + personList.value = [] + personSearched.value = true + loadPersonList() } const clearPersonSearch = () => { personSearchKeyword.value = "" - initPersonList() + personFinished.value = true + personPageNum.value = 1 + personList.value = [] + personSearched.value = false } watch(localPersonPopup, (val) => { diff --git a/zdxt-web-client/zdxt-efcode-enforcement-app/src/components/enforcement/register/RegisterPopups.vue b/zdxt-web-client/zdxt-efcode-enforcement-app/src/components/enforcement/register/RegisterPopups.vue index 1ff31834..6c141784 100644 --- a/zdxt-web-client/zdxt-efcode-enforcement-app/src/components/enforcement/register/RegisterPopups.vue +++ b/zdxt-web-client/zdxt-efcode-enforcement-app/src/components/enforcement/register/RegisterPopups.vue @@ -49,18 +49,18 @@ + :finished-text="personFinishedText" @load="loadPersonList" class="person-list">
{{ person.userName }}
{{person.lawCertificateNum?'执法证件号:':'联系电话:'}}{{ person.lawCertificateNum || person.phonenumber || person.mobileNumber }}
- +
@@ -229,16 +229,25 @@ const personPageNum = ref(1); const personPageSize = ref(10); const personLoading = ref(false); const personFinished = ref(false); +const personSearched = ref(false); + +const personEmptyText = computed(() => personSearched.value ? '暂无数据' : '请输入至少1个字搜索'); +const personFinishedText = computed(() => personList.value.length > 0 ? '没有更多了' : ''); const initPersonList = () => { - personFinished.value = false; + personFinished.value = true; personPageNum.value = 1; personList.value = []; personLoading.value = false; - loadPersonList(); + personSearched.value = false; }; const loadPersonList = () => { + if ((personSearchKeyword.value || '').trim().length < 1) { + personFinished.value = true; + personLoading.value = false; + return; + } personLoading.value = true; const selectedIds = props.selectedPersons.map(p => p.userId).filter(Boolean); @@ -288,18 +297,24 @@ const loadPersonList = () => { }; const handlePersonSearch = () => { + const keyword = (personSearchKeyword.value || '').trim(); + if (keyword.length < 1) { + showToast('请输入至少1个字搜索'); + return; + } personFinished.value = false; personPageNum.value = 1; personList.value = []; + personSearched.value = true; loadPersonList(); }; const clearPersonSearch = () => { personSearchKeyword.value = ''; - personFinished.value = false; + personFinished.value = true; personPageNum.value = 1; personList.value = []; - loadPersonList(); + personSearched.value = false; }; const handleSelectPerson = (person) => { diff --git a/zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/my/notice/cp_notice_edit.vue b/zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/my/notice/cp_notice_edit.vue index 1110e90a..c7eeb93e 100644 --- a/zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/my/notice/cp_notice_edit.vue +++ b/zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/my/notice/cp_notice_edit.vue @@ -170,7 +170,7 @@ @@ -217,17 +217,16 @@ 选择执法人员 - +
@@ -243,7 +242,7 @@
- + @@ -357,6 +356,38 @@ const timeColumns = [ { text: '其他(18:00-21:00)', value: 3 }, ]; +// 可选时段:执法日期为今天时过滤已过去的时段 +const availableTimeColumns = computed(() => { + // 依赖弹窗显隐,打开时重新计算获取最新时间 + void showTimePicker.value; + const dateStr = form.value.enforceDate; + if (!dateStr) return timeColumns; + const todayStr = `${today.getFullYear()}-${String(today.getMonth() + 1).padStart(2, '0')}-${String(today.getDate()).padStart(2, '0')}`; + if (dateStr !== todayStr) return timeColumns; + const now = new Date(); + const nowMinutes = now.getHours() * 60 + now.getMinutes(); + const periodEnds = { 1: 12 * 60, 2: 18 * 60, 3: 21 * 60 }; + return timeColumns.filter(item => nowMinutes < periodEnds[item.value]); +}); + +// 默认时段设为当前可选的第一个 +const syncDefaultEnforceTime = () => { + const available = availableTimeColumns.value; + if (available.length === 0) return; + const dateStr = form.value.enforceDate; + const todayStr = `${today.getFullYear()}-${String(today.getMonth() + 1).padStart(2, '0')}-${String(today.getDate()).padStart(2, '0')}`; + // 非今天(未来日期)默认取第一个(上午) + if (dateStr !== todayStr) { + form.value.enforceTime = available[0].value; + return; + } + // 今天:当前值不可用时取第一个 + const currentValid = available.some(item => item.value === form.value.enforceTime); + if (!currentValid) { + form.value.enforceTime = available[0].value; + } +}; + // 日期+时段展示 const enforceTimeDisplay = computed(() => { const timeText = { 1: '上午(9:00-12:00)', 2: '下午(14:00-18:00)', 3: '其他(18:00-21:00)' }; @@ -385,9 +416,12 @@ const personLoading = ref(false); const personFinished = ref(false); const personPageNum = ref(1); const personPageSize = 10; -let personSearchTimer = null; +const personSearched = ref(false); let personSearchSeq = 0; +const personEmptyText = computed(() => personSearched.value ? '未检索到人员' : '请输入至少1个字搜索'); +const personFinishedText = computed(() => personSearchResult.value.length > 0 ? '没有更多了' : ''); + // 计划列表 const planOptions = ref([]); const planLoading = ref(false); @@ -402,6 +436,8 @@ onMounted(() => { form.value.deptName = useCommon.deptName || ''; // 默认绑定当前用户为首位执法人员 bindCurrentUserAsDefaultPerson(); + // 默认时段设为当前可选的第一个 + syncDefaultEnforceTime(); if (isEdit.value) { loadDetail(route.query.id); @@ -454,6 +490,7 @@ const loadDetail = (id, isReinitiateMode = false) => { const onDateConfirm = ({ selectedValues }) => { form.value.enforceDate = selectedValues.join('-'); showDatePicker.value = false; + syncDefaultEnforceTime(); }; // 时段确认 @@ -526,22 +563,33 @@ const onAddPerson = () => { personSearchKeyword.value = ''; personSearchResult.value = []; personPageNum.value = 1; - personFinished.value = false; + personFinished.value = true; personLoading.value = false; + personSearched.value = false; showPersonPicker.value = true; - // van-list 挂载后自动触发 @load 加载第一页 }; -const onPersonSearchInput = (val) => { - if (personSearchTimer) clearTimeout(personSearchTimer); - const keyword = (val || '').trim(); - personSearchTimer = setTimeout(() => { - personPageNum.value = 1; - personFinished.value = false; - personSearchResult.value = []; - personLoading.value = true; - fetchPersonList(keyword); - }, 300); +const handlePersonSearch = () => { + const keyword = (personSearchKeyword.value || '').trim(); + if (keyword.length < 1) { + showToast('请输入至少1个字搜索'); + return; + } + personPageNum.value = 1; + personFinished.value = false; + personSearchResult.value = []; + personLoading.value = true; + personSearched.value = true; + fetchPersonList(keyword); +}; + +const clearPersonSearch = () => { + personSearchKeyword.value = ''; + personPageNum.value = 1; + personFinished.value = true; + personSearchResult.value = []; + personLoading.value = false; + personSearched.value = false; }; // van-list 触底加载 @@ -551,6 +599,11 @@ const onPersonLoad = () => { // 实际发起人员检索(分页追加) const fetchPersonList = (keyword) => { + if ((keyword || '').trim().length < 1) { + personFinished.value = true; + personLoading.value = false; + return; + } const seq = ++personSearchSeq; personLoading.value = true; searchBureauUnitUsers( @@ -610,7 +663,6 @@ const removePerson = (index) => { }; const syncPersonData = () => { - console.log(personList.value); form.value.enforceUserNames = personList.value.map(p => p.name).join(','); form.value.enforceUserIds = personList.value.map(p => p.id || '').join(','); form.value.enforceUserTels = personList.value.map(p => p.phone || '').join(','); @@ -902,6 +954,20 @@ const doSubmit = (isDraft) => { display: flex; flex-direction: column; height: 100%; + .search-bar { + display: flex; + align-items: center; + margin: 0.3rem; + :deep(.van-search) { + padding-right: 0px; + flex: 1; + height: 34px; + } + .search-btn { + flex: none; + height: 34px; + } + } .person-picker-header { display: flex; justify-content: space-between; diff --git a/zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/my/plan/cp_plan_edit.vue b/zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/my/plan/cp_plan_edit.vue index 3cd91b1e..0f78bef5 100644 --- a/zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/my/plan/cp_plan_edit.vue +++ b/zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/my/plan/cp_plan_edit.vue @@ -175,17 +175,16 @@ 选择执法人员 - +
@@ -203,7 +202,7 @@
@@ -358,9 +357,12 @@ const personLoading = ref(false); const personFinished = ref(false); const personPageNum = ref(1); const personPageSize = 10; -let personSearchTimer = null; +const personSearched = ref(false); let personSearchSeq = 0; +const personEmptyText = computed(() => personSearched.value ? '未检索到人员' : '请输入至少1个字搜索'); +const personFinishedText = computed(() => personSearchResult.value.length > 0 ? '没有更多了' : ''); + // 日期选择值 const datePickerValue = ref([ String(new Date().getFullYear()), @@ -601,23 +603,35 @@ const onAddPerson = () => { personSearchKeyword.value = ''; personSearchResult.value = []; personPageNum.value = 1; - personFinished.value = false; + personFinished.value = true; personLoading.value = false; + personSearched.value = false; showPersonPicker.value = true; - // van-list 挂载后自动触发 @load 加载第一页 }; -// 人员检索输入(防抖) -const onPersonSearchInput = (val) => { - if (personSearchTimer) clearTimeout(personSearchTimer); - const keyword = (val || '').trim(); - personSearchTimer = setTimeout(() => { - personPageNum.value = 1; - personFinished.value = false; - personSearchResult.value = []; - personLoading.value = true; - fetchPersonList(keyword); - }, 300); +// 人员检索(搜索按钮/回车) +const handlePersonSearch = () => { + const keyword = (personSearchKeyword.value || '').trim(); + if (keyword.length <1) { + showToast('请输入至少1个字搜索'); + return; + } + personPageNum.value = 1; + personFinished.value = false; + personSearchResult.value = []; + personLoading.value = true; + personSearched.value = true; + fetchPersonList(keyword); +}; + +// 清除搜索 +const clearPersonSearch = () => { + personSearchKeyword.value = ''; + personPageNum.value = 1; + personFinished.value = true; + personSearchResult.value = []; + personLoading.value = false; + personSearched.value = false; }; // van-list 触底加载 @@ -627,6 +641,11 @@ const onPersonLoad = () => { // 实际发起人员检索(分页追加) const fetchPersonList = (keyword) => { + if ((keyword || '').trim().length < 1) { + personFinished.value = true; + personLoading.value = false; + return; + } const seq = ++personSearchSeq; personLoading.value = true; searchBureauUnitUsers( @@ -1033,6 +1052,23 @@ const doSubmit = () => { flex-direction: column; height: 100%; + .search-bar { + display: flex; + align-items: center; + margin: 0.3rem; + + :deep(.van-search) { + padding-right: 0px; + flex: 1; + height: 34px; + } + + .search-btn { + flex: none; + height: 34px; + } + } + .person-picker-header { display: flex; justify-content: space-between; diff --git a/zdxt-web-client/zdxt-efcode-enforcement-app/vite-env/.env.enforcement-dev-wmy b/zdxt-web-client/zdxt-efcode-enforcement-app/vite-env/.env.enforcement-dev-wmy index 7cca0901..1e2d7f5c 100644 --- a/zdxt-web-client/zdxt-efcode-enforcement-app/vite-env/.env.enforcement-dev-wmy +++ b/zdxt-web-client/zdxt-efcode-enforcement-app/vite-env/.env.enforcement-dev-wmy @@ -4,9 +4,9 @@ VITE_BASE_URL = '/efcode20-enf-app/api' VITE_CONTEXT_PATH = '/efcode20-enf-app/' # VITE_PROXY_TARGET = 'http://139.186.148.21:8080' # VITE_API_URL = 'http://192.168.1.17:8080' -VITE_PROXY_TARGET = 'http://172.16.21.213:8080' +# VITE_PROXY_TARGET = 'http://172.16.21.213:8080' # VITE_PROXY_TARGET = 'http://172.16.21.93:8080' -# VITE_PROXY_TARGET = 'http://172.16.20.72:8080' +VITE_PROXY_TARGET = 'http://172.16.20.72:8080' VITE_DEFAULT_LOGIN = '/enforcement/loginByPassword' VITE_APP_ENV = 'dev' VITE_FILE_URL = '' diff --git a/zdxt-web-client/zdxt-efcode-enterprise-app/src/views/enterprise/enforcement/enforcementChat.vue b/zdxt-web-client/zdxt-efcode-enterprise-app/src/views/enterprise/enforcement/enforcementChat.vue index 5d8146fd..231ce7a4 100644 --- a/zdxt-web-client/zdxt-efcode-enterprise-app/src/views/enterprise/enforcement/enforcementChat.vue +++ b/zdxt-web-client/zdxt-efcode-enterprise-app/src/views/enterprise/enforcement/enforcementChat.vue @@ -57,7 +57,7 @@ @touchmove="onTouchMove" >
{{ msg.msgFrom === 0 ? (msg.bureauDeptName || useCommon.bureauUnitName || '执法单位') : msg.userName }}
- {{ msg.content }} + diff --git a/zdxt-web-client/zdxt-efcode-enterprise-app/vite-env/.env.enterprise-dev-wmy b/zdxt-web-client/zdxt-efcode-enterprise-app/vite-env/.env.enterprise-dev-wmy index 8607253f..f6e2ca5e 100644 --- a/zdxt-web-client/zdxt-efcode-enterprise-app/vite-env/.env.enterprise-dev-wmy +++ b/zdxt-web-client/zdxt-efcode-enterprise-app/vite-env/.env.enterprise-dev-wmy @@ -1,8 +1,8 @@ # 企业端开发环境 VITE_PORT = 12001 # VITE_PROXY_TARGET = 'http://139.186.148.21:8080' -# VITE_PROXY_TARGET = 'http://172.16.21.213:8080' -VITE_PROXY_TARGET = 'http://172.16.21.93:8080' +VITE_PROXY_TARGET = 'http://172.16.21.213:8080' +# VITE_PROXY_TARGET = 'http://172.16.21.93:8080' VITE_BASE_URL = '/efcode20-ent-app/api' VITE_CONTEXT_PATH = '/efcode20-ent-app/' VITE_DEFAULT_LOGIN = '/enterprise/loginByPassword'