Browse Source

消息模块修改

dev
wangmingyong@163.com 1 month ago
parent
commit
e5eeb40f35
  1. 29
      zdxt-web-client/zdxt-efcode-enforcement-app/src/components/FooterBar.vue
  2. 2
      zdxt-web-client/zdxt-efcode-enterprise-app/src/api/enterprise/planNotice.js
  3. 4
      zdxt-web-client/zdxt-efcode-enterprise-app/src/views/enterprise/enforcement/enforcementChat.vue
  4. 73
      zdxt-web-client/zdxt-efcode-enterprise-app/src/views/enterprise/plan/planNoticeList.vue

29
zdxt-web-client/zdxt-efcode-enforcement-app/src/components/FooterBar.vue

@ -1,7 +1,7 @@
<template>
<div class="footer-bar">
<div v-for="item in tabs" :key="item.key"
:class="['footer-item', { 'footer-item--active': item.key === active, 'footer-item--nos': item.key === 'nos' }]"
<div v-for="item in tabs" :key="item.key"
:class="['footer-item', { 'footer-item--active': item.key === active, 'footer-item--nos': item.key === 'nos' }]"
@click="onTabClick(item)">
<div v-if="item.key === 'message'" class="footer-icon-wrap">
<svg viewBox="0 0 24 24" fill="currentColor" v-html="item.path"></svg>
@ -9,7 +9,7 @@
</div>
<img v-else-if="item.key === 'nos'" :src="item.imgSrc" class="footer-icon-img" />
<svg v-else viewBox="0 0 24 24" fill="currentColor" v-html="item.path"></svg>
<span>{{ item.label!='非现场'?item.label:'' }}</span>
<span>{{ item.label != '非现场' ? item.label : '' }}</span>
</div>
</div>
</template>
@ -35,9 +35,11 @@ const tabs = [
{
key: 'home', label: '首页', route: '/enforcement/enforcementHome',
path: '<path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/>'
},
{ key: 'query', label: '查询', route: '/enforcement/query',
path: '<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"/>' },
},
{
key: 'query', label: '查询', route: '/enforcement/query',
path: '<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"/>'
},
// {
// key: 'program', label: '', route: '/enforcement/program',
// path: '<path d="M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z"/>'
@ -63,7 +65,7 @@ const onTabClick = (item) => {
if (item.key === props.active) return;
if (router.currentRoute.value.path !== item.route) {
router.replace(item.route);
}
}
// console.log('2222');
// fetchMessageUnreadCount();
};
@ -153,17 +155,16 @@ onMounted(() => {
.footer-badge {
position: absolute;
top: -4px;
right: -10px;
min-width: 16px;
height: 16px;
line-height: 16px;
padding: 0 4px;
right: -8px;
// width: 16px;
// height: 16px;
padding: 0px 4px;
background: #f5222d;
color: #fff;
font-size: 10px;
text-align: center;
border-radius: 8px;
border-radius: 16px;
border: 2px solid #fff;
box-sizing: content-box;
box-sizing: border-box;
}
</style>

2
zdxt-web-client/zdxt-efcode-enterprise-app/src/api/enterprise/planNotice.js

@ -3,7 +3,7 @@ import { _get, _post, _put } from "../../http/index";
let enterpriseAppBaseUrl = "/app-ent";
//执法预告列表(计划预告-企业端)
export const getPlanNoticeList = (params, success, error) => _get(enterpriseAppBaseUrl +"/planNotice/list",params,success,error);
export const getPlanNoticeList = (params, success, error) => _get(enterpriseAppBaseUrl +"/enterprise/lawNotice/myList",params,success,error);
//执法预告详情
export const getPlanNoticeDetail = (params, success, error) => _get(enterpriseAppBaseUrl +"/planNotice/" + params.id,{},success,error);

4
zdxt-web-client/zdxt-efcode-enterprise-app/src/views/enterprise/enforcement/enforcementChat.vue

@ -13,9 +13,9 @@
</van-nav-bar>
<!-- 聊天对象信息 -->
<div class="chat-header">
<!-- <div class="chat-header">
<div class="chat-target">{{ bureauDeptName }} · {{ contactPerson }}</div>
</div>
</div> -->
<!-- 消息列表 -->
<div class="message-list" ref="messageListRef">

73
zdxt-web-client/zdxt-efcode-enterprise-app/src/views/enterprise/plan/planNoticeList.vue

@ -14,12 +14,7 @@
</van-nav-bar>
<!-- 搜索栏 -->
<van-search v-model="searchText" show-action placeholder="请输入关键字查询" clearable clear-trigger="always"
@clear="onClear" @search="onSearch">
<template #action>
<div @click="onSearch">搜索</div>
</template>
</van-search>
<SearchFilterBar placeholder="请输入关键字查询" @search="onSearchFilter" />
<!-- 列表区域 -->
<div class="list-container">
@ -40,9 +35,9 @@
>
<div class="card-row time-row">
<span class="label">执法时间</span>
<span class="value">{{ item.checkTime }}</span>
<span class="value">{{ item.enforceDate }}</span>
</div>
<div class="card-title">{{ item.checkItemText }}</div>
<!-- <div class="card-title">{{ item.checkItemText }}</div> -->
<div class="card-row">
<span class="label">执法单位</span>
<span class="value">{{ item.bureauDeptName }}</span>
@ -65,8 +60,10 @@ import { ref } from 'vue';
import { useRouter } from 'vue-router';
import { showToast } from 'vant';
import 'vant/es/toast/style';
import { getLawNoticeList } from '@/api/enterprise';
import { getPlanNoticeList } from '@/api/enterprise/planNotice';
import SearchFilterBar from '@/components/common/SearchFilterBar.vue';
const { useCommon } = $globalStore;
const router = useRouter();
// ========== ==========
@ -77,17 +74,26 @@ const refreshing = ref(false);
const pageNum = ref(1);
const pageSize = ref(10);
const searchText = ref('');
const dateType = ref(null);
const dateSearch = ref(null);
// ========== ==========
const fetchList = () => {
const params = {
pageNum: pageNum.value,
pageSize: pageSize.value,
enterpriseNumber: useCommon.enterpriseNumber,
};
if (searchText.value) {
params.searchValue = searchText.value;
}
getLawNoticeList(params, (res) => {
if (dateType.value != null && dateType.value !== 9) {
params.dateType = dateType.value;
}
if (dateSearch.value) {
params.dateSearch = dateSearch.value;
}
getPlanNoticeList(params, (res) => {
if (res.code === 200) {
const rows = res.rows || res.data?.rows || res.data?.list || res.data || [];
const total = res.total ?? res.data?.total ?? 0;
@ -139,8 +145,11 @@ const onClickLeft = () => {
router.back();
};
// ========== ==========
const onSearch = () => {
// ========== ==========
const onSearchFilter = ({ searchText: st, dateType: dt, dateSearch: ds }) => {
searchText.value = st;
dateType.value = dt;
dateSearch.value = ds;
pageNum.value = 1;
list.value = [];
finished.value = false;
@ -148,26 +157,10 @@ const onSearch = () => {
fetchList();
};
// ========== ==========
const onClear = () => {
searchText.value = '';
onSearch();
};
// ========== ==========
const onFilterClick = () => {
showToast('筛选功能开发中');
};
// ========== ==========
const onSearchClick = () => {
showToast('搜索功能开发中');
};
// ========== ==========
const onFeedback = (item) => {
router.push({
path: '/enforcement/enforcementChat',
path: '/enterprise/enforcementChat',
query: {
title: item.title,
bureauDeptName: item.bureauDeptName,
@ -218,6 +211,7 @@ const onFeedback = (item) => {
padding: 0.3rem 0.35rem;
margin-bottom: 0.27rem;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
position: relative;
}
.card-row {
@ -250,6 +244,9 @@ const onFeedback = (item) => {
display: flex;
justify-content: flex-end;
margin-top: 0.2rem;
// position: absolute;
// right: 10px;
// bottom:8px;
}
.feedback-btn {
@ -283,22 +280,4 @@ const onFeedback = (item) => {
}
}
}
/* ===== Vant 搜索框样式覆盖 ===== */
:deep(.van-search__content) {
height: 0.9rem;
border: 1px solid #ececec;
border-radius: 0.15rem 0 0 0.15rem;
}
:deep(.van-search__action) {
margin: 0 3% 0 0;
width: 10%;
height: 0.9rem;
background: #1367fe;
border: 0.01rem solid #1367fe;
border-radius: 0 0.15rem 0.15rem 0;
color: #fff;
text-align: center;
line-height: 0.9rem;
}
</style>

Loading…
Cancel
Save