diff --git a/zdxt-web-client/zdxt-efcode-enterprise-app/src/api/enterprise/index.js b/zdxt-web-client/zdxt-efcode-enterprise-app/src/api/enterprise/index.js
index 0b620bbf..1c698dbc 100644
--- a/zdxt-web-client/zdxt-efcode-enterprise-app/src/api/enterprise/index.js
+++ b/zdxt-web-client/zdxt-efcode-enterprise-app/src/api/enterprise/index.js
@@ -16,7 +16,7 @@ export const getUserRefEnterpriseInfo = (params, success, error) => _get(enterpr
export const getEnterpriseMerchantAuthorization = (params, success, error) => _get(enterpriseAppBaseUrl + "/authorization/queryList",params,success,error);
//查询企业二维码
-export const queryEnterpriseInformationQrCode = (enterpriseNumber, success, error) => _get(enterpriseAppBaseUrl+"/enterpriseInfo/getQrCode/"+enterpriseNumber,null,success,error)
+export const queryEnterpriseInformationQrCode = (params, success, error) => _get(enterpriseAppBaseUrl+"/enterpriseInfo/getQrCode",params,success,error)
//查询企业执法登记列表-企业端(含投诉标记、字典翻译、超时计算等)
export const getEnterpriseEnforcementRegistrationList = (params, success, error) => _get(enterpriseAppBaseUrl+"/lawEnforcementCase/list",params,success,error)
@@ -73,13 +73,13 @@ export const getComplaintDisposalProgress = (params, success, error) => _get(ent
export const addComplaint = (params, success, error) => _post(enterpriseAppBaseUrl+"/complaint/add",params,success,error)
//查询字典数据(公共)
-export const queryDict = (params, success, error) => _get(enterpriseAppBaseUrl +"/common/dict/queryDict",params,success,error)
+export const queryDict = (params, success, error) => _get("/common/dict/queryDict",params,success,error)
//执法单位(部门)列表
-export const getDeptList = (params, success, error) => _get(enterpriseAppBaseUrl +"/enforcementcode/virtualUnit/list",params,success,error)
+export const getDeptList = (params, success, error) => _get("/enforcementcode/virtualUnit/list",params,success,error)
//投诉事项列表
-export const getComplaintItemList = (params, success, error) => _get(enterpriseAppBaseUrl +"/complaint/listNotComplaint",params,success,error)
+export const getComplaintItemList = (params, success, error) => _post(enterpriseAppBaseUrl +"/complaint/listNotComplaint",params,success,error)
//深i企登录-暂时没有环境调通
export const getSiqLoginAuth = (params, success, error) => _post(enterpriseAppBaseUrl +"/thirdLogin/siqLogin",params,success,error);
@@ -87,4 +87,10 @@ export const getSiqLoginAuth = (params, success, error) => _post(enterpriseAppBa
//深i企模拟登录(通过userId模拟)
export const getSiqLoginAuthMock = (params, success, error) => _post(enterpriseAppBaseUrl +"/thirdLogin/siqLoginMock",params,success,error);
+//强制生成二维码
+export const forceGenerateQrCode = (params, success, error) => _get(enterpriseAppBaseUrl+"/enterpriseInfo/forceGenerateQrCode",params,success,error)
+
+//消息数据统计接口(未读数量)
+export const getMessageUnreadCount = (params, success, error) => _get(enterpriseAppBaseUrl +"/enterprise/todoitem/statisticsUnReadCount",params,success,error);
+
// endregion
diff --git a/zdxt-web-client/zdxt-efcode-enterprise-app/src/components/complaint/ComplaintItemPicker.vue b/zdxt-web-client/zdxt-efcode-enterprise-app/src/components/complaint/ComplaintItemPicker.vue
index 532259b5..93e43b28 100644
--- a/zdxt-web-client/zdxt-efcode-enterprise-app/src/components/complaint/ComplaintItemPicker.vue
+++ b/zdxt-web-client/zdxt-efcode-enterprise-app/src/components/complaint/ComplaintItemPicker.vue
@@ -30,29 +30,37 @@
-
+
-
执法时间:{{ item.time }}
+
执法时间:{{ item.enforcementTime }}
{{ item.title }}
{{ item.subName }}
-
执法单位:{{ item.unit }}
-
执法人员:{{ item.personnel.join('、') }}
-
执法类别:{{ item.category }}
+
执法单位:{{ item.bureauDeptName }}
+
+
执法人员:
+
+
{{ item.lawEnforcer }}{{ item.lawEnforcerId }}
+
{{ item.lawEnforcerOther }}{{ item.lawEnforcerOtherId }}
+
+
+
+
执法类别:{{ getDictText('check_category',item.lawEnforcementType)}}
-
没有更多了
+
加载中...
+
没有更多了
-
-
@@ -60,13 +68,15 @@
diff --git a/zdxt-web-client/zdxt-efcode-enterprise-app/src/views/enterprise/law/lawServiceDetail.vue b/zdxt-web-client/zdxt-efcode-enterprise-app/src/views/enterprise/law/lawServiceDetail.vue
index 4efe5c0b..a5e8d7e5 100644
--- a/zdxt-web-client/zdxt-efcode-enterprise-app/src/views/enterprise/law/lawServiceDetail.vue
+++ b/zdxt-web-client/zdxt-efcode-enterprise-app/src/views/enterprise/law/lawServiceDetail.vue
@@ -24,23 +24,34 @@
{{ detail.time }}
-
-
+
+
+
+
-
-
-
![]()
-
+
+
+
![]()
+
+
+
+
+
+
+
+
+
@@ -60,6 +71,7 @@ const detail = ref({
title: '',
source: '',
time: '',
+ contentType: 1, // 1: 文本详情, 2: 超链接
content: [],
images: [],
});
@@ -86,7 +98,8 @@ const fetchDetail = () => {
title: res.data.title || '',
source: res.data.source || '',
time: res.data.time || '',
- content: res.data.content ? (Array.isArray(res.data.content) ? res.data.content : [res.data.content]) : [],
+ contentType: res.data.contentType || 1, // 1: 文本详情, 2: 超链接
+ content: res.data.content || '',
images: res.data.images || [],
};
} else {
@@ -190,13 +203,55 @@ const previewImage = (index) => {
}
.detail-body {
+ font-size: 0.37rem;
+ color: #333;
+ line-height: 1.8;
+
p {
- font-size: 0.37rem;
- color: #333;
- line-height: 1.8;
text-indent: 2em;
margin-bottom: 0.3rem;
}
+
+ h1, h2, h3, h4, h5, h6 {
+ font-weight: bold;
+ margin-top: 0.4rem;
+ margin-bottom: 0.2rem;
+ color: #1a1a1a;
+ }
+
+ h1 { font-size: 0.5rem; }
+ h2 { font-size: 0.45rem; }
+ h3 { font-size: 0.4rem; }
+ h4, h5, h6 { font-size: 0.37rem; }
+
+ ul, ol {
+ padding-left: 0.5rem;
+ margin-bottom: 0.3rem;
+ }
+
+ li {
+ margin-bottom: 0.15rem;
+ }
+
+ img {
+ max-width: 100%;
+ height: auto;
+ border-radius: 0.15rem;
+ margin: 0.2rem 0;
+ }
+
+ a {
+ color: #2d94fa;
+ text-decoration: underline;
+ }
+
+ blockquote {
+ border-left: 4px solid #2d94fa;
+ padding-left: 0.3rem;
+ margin: 0.3rem 0;
+ color: #666;
+ font-style: italic;
+ }
}
.detail-images {
@@ -209,4 +264,19 @@ const previewImage = (index) => {
display: block;
}
}
+
+/* ===== iframe 样式 ===== */
+.detail-iframe-wrap {
+ width: 100%;
+ margin-top: 0.2rem;
+ border-radius: 0.15rem;
+ overflow: hidden;
+ background: #f5f5f5;
+}
+
+.detail-iframe {
+ width: 100%;
+ height: 500px;
+ background: #fff;
+}
diff --git a/zdxt-web-client/zdxt-efcode-enterprise-app/src/views/enterprise/law/lawServiceList.vue b/zdxt-web-client/zdxt-efcode-enterprise-app/src/views/enterprise/law/lawServiceList.vue
index 00af19fc..25ef390f 100644
--- a/zdxt-web-client/zdxt-efcode-enterprise-app/src/views/enterprise/law/lawServiceList.vue
+++ b/zdxt-web-client/zdxt-efcode-enterprise-app/src/views/enterprise/law/lawServiceList.vue
@@ -37,18 +37,19 @@
+
{{ item.title || '-' }}
- {{ item.summary || item.content || '' }}
+ {{ stripHtml(item.summary || item.content || '') }}
@@ -88,6 +89,15 @@ const formatTime = (val) => {
return `${y}-${m}-${day} ${h}:${mi}:${s}`;
};
+// ========== 移除HTML标签 ==========
+const stripHtml = (html) => {
+ if (!html) return '';
+ // 移除HTML标签
+ const text = html.replace(/<[^>]*>/g, '');
+ // 移除多余的空白字符
+ return text.replace(/\s+/g, ' ').trim();
+};
+
// ========== 加载数据 ==========
const fetchList = () => {
const params = {
@@ -157,6 +167,8 @@ const onSearchClick = () => {
// ========== 跳转详情 ==========
const toDetail = (item) => {
+ // 无论 contentType 是多少,都跳转到详情页
+ // 详情页会根据 contentType 决定是显示文本还是 iframe
router.push({
path: '/enterprise/lawServiceDetail',
query: { id: item.id },
@@ -222,11 +234,23 @@ const toDetail = (item) => {
display: flex;
align-items: center;
justify-content: center;
+ position: relative;
svg {
width: 100%;
height: 100%;
}
+
+ .unread-dot {
+ position: absolute;
+ top: -0.05rem;
+ right: -0.05rem;
+ width: 0.12rem;
+ height: 0.12rem;
+ min-width: 0.12rem;
+ background-color: #ee0a24;
+ border-radius: 50%;
+ }
}
.item-title {
diff --git a/zdxt-web-client/zdxt-efcode-enterprise-app/src/views/enterprise/message/messageCenter.vue b/zdxt-web-client/zdxt-efcode-enterprise-app/src/views/enterprise/message/messageCenter.vue
index 30148de9..b002d3e5 100644
--- a/zdxt-web-client/zdxt-efcode-enterprise-app/src/views/enterprise/message/messageCenter.vue
+++ b/zdxt-web-client/zdxt-efcode-enterprise-app/src/views/enterprise/message/messageCenter.vue
@@ -82,17 +82,19 @@
import { showToast } from 'vant';
import 'vant/es/toast/style';
import * as w6s from 'szient-js-sdk';
+import { getMessageUnreadCount } from '@/api/enterprise';
const { useCommon } = $globalStore;
const router = useRouter();
// ========== Tab 状态 ==========
const activeTab = ref(0);
+const route = useRoute();
// ========== 消息列表状态 ==========
const messageList = ref([]);
const messageLoading = ref(false);
-const messageFinished = ref(false);
+const messageFinished = ref(true); // 默认已完成,不需要加载更多
const messageRefreshing = ref(false);
const messagePageNum = ref(1);
const messagePageSize = ref(10);
@@ -100,14 +102,42 @@ const messagePageSize = ref(10);
// ========== 待办列表状态 ==========
const todoList = ref([]);
const todoLoading = ref(false);
-const todoFinished = ref(false);
+const todoFinished = ref(true); // 默认已完成,不需要加载更多
const todoRefreshing = ref(false);
const todoPageNum = ref(1);
const todoPageSize = ref(10);
-// ========== 生成消息假数据 ==========
-const generateMessageMockData = () => {
- return [
+// ========== 消息统计数据 ==========
+const messageStats = ref({
+ pffwCount: 0, // 普法服务未读数量
+ zfpjcount: 0, // 执法评价未读数量
+ zfygCount: 0, // 执法预告未读数量
+ totalCount: 0, // 未读总数
+});
+
+// ========== 获取消息未读数量 ==========
+const fetchMessageStats = () => {
+ getMessageUnreadCount({}, (res) => {
+ if (res && res.code === 200 && res.data) {
+ messageStats.value = {
+ pffwCount: Number(res.data.pffwCount) || 0,
+ zfpjcount: Number(res.data.zfpjcount) || 0,
+ zfygCount: Number(res.data.zfygCount) || 0,
+ totalCount: Number(res.data.totalCount) || 0,
+ };
+ // 更新消息列表和待办列表的未读数量
+ initMessageList();
+ initTodoList();
+ updateUnreadCount();
+ }
+ }, () => {
+ // 如果接口调用失败,保持默认数据
+ });
+};
+
+// ========== 初始化默认消息列表 ==========
+const initMessageList = () => {
+ messageList.value = [
{
id: 1,
title: '普法服务',
@@ -115,31 +145,31 @@ const generateMessageMockData = () => {
time: '2026-04-15 10:07',
icon: 'law',
iconBg: 'icon-blue',
- unreadCount: 1,
+ unreadCount: messageStats.value.pffwCount,
},
];
};
-// ========== 生成待办假数据 ==========
-const generateTodoMockData = () => {
- return [
+// ========== 初始化默认待办列表 ==========
+const initTodoList = () => {
+ todoList.value = [
{
id: 101,
title: '执法预告',
- desc: '您有一条执法预告,请及时查看',
+ desc: messageStats.value.zfygCount > 0 ? `您有${messageStats.value.zfygCount}条执法预告,请及时查看` : '暂无执法预告',
time: '2026-04-15 09:30',
icon: 'check',
iconBg: 'icon-red',
- unreadCount: 3,
+ unreadCount: messageStats.value.zfygCount,
},
{
id: 102,
title: '待评价执法',
- desc: '您有2条执法记录待评价',
+ desc: messageStats.value.zfpjcount > 0 ? `您有${messageStats.value.zfpjcount}条执法记录待评价` : '暂无待评价执法',
time: '2026-04-14 15:00',
icon: 'check',
iconBg: 'icon-orange',
- unreadCount: 2,
+ unreadCount: messageStats.value.zfpjcount,
},
];
};
@@ -221,6 +251,8 @@ const onTodoRefresh = () => {
// ========== 消息点击 ==========
const onMessageClick = (item) => {
if (item.title === '普法服务') {
+ // 点击普法服务,返回时显示消息tab页(0)
+ sessionStorage.setItem('messageReturnTab', '0');
router.push({
path: '/enterprise/lawServiceList',
});
@@ -232,10 +264,14 @@ const onMessageClick = (item) => {
// ========== 待办点击 ==========
const onTodoClick = (item) => {
if (item.title === '执法预告') {
+ // 点击执法预告,返回时显示待办tab页(1)
+ sessionStorage.setItem('messageReturnTab', '1');
router.push({
path: '/enterprise/enforcementNoticeList',
});
} else if (item.title === '待评价执法') {
+ // 点击待评价执法,返回时显示待办tab页(1)
+ sessionStorage.setItem('messageReturnTab', '1');
router.push({
path: '/enterprise/enforcementEvaluate',
});
@@ -254,6 +290,29 @@ onMounted(() => {
w6s.ready(() => {
w6s.header.setTitle('消息中心');
});
+ // 优先从sessionStorage获取返回时要显示的tab页(用于页面返回时定位)
+ const returnTab = sessionStorage.getItem('messageReturnTab');
+ if (returnTab === '1') {
+ activeTab.value = 1;
+ sessionStorage.removeItem('messageReturnTab');
+ } else if (returnTab === '0') {
+ activeTab.value = 0;
+ sessionStorage.removeItem('messageReturnTab');
+ } else {
+ // 从路由参数获取要显示的tab页(0=消息,1=待办)
+ const tab = route.query.tab;
+ if (tab === 'todo' || tab === '1') {
+ activeTab.value = 1;
+ } else {
+ activeTab.value = 0;
+ }
+ }
+ // 立即初始化列表数据(不需要等待接口)
+ initMessageList();
+ initTodoList();
+ updateUnreadCount();
+ // 后台异步获取最新统计数据(不阻塞页面显示)
+ fetchMessageStats();
});
diff --git a/zdxt-web-client/zdxt-efcode-enterprise-app/src/views/enterprise/my/complaintDetail.vue b/zdxt-web-client/zdxt-efcode-enterprise-app/src/views/enterprise/my/complaintDetail.vue
index 857b6eb2..5c466263 100644
--- a/zdxt-web-client/zdxt-efcode-enterprise-app/src/views/enterprise/my/complaintDetail.vue
+++ b/zdxt-web-client/zdxt-efcode-enterprise-app/src/views/enterprise/my/complaintDetail.vue
@@ -18,7 +18,7 @@
投诉类型
- {{ detail.complaintType==0?'默认':'联合检查' }}
+ {{ getComplaintTypeText(detail.enforceType) }}
投诉事项
@@ -59,7 +59,7 @@
联系人
- {{ detail.linkman ||'' }}
+ {{ detail.linkman || '' }}
联系电话
@@ -71,7 +71,7 @@
是否授权
- {{ detail.authorized ? '同意' : '不同意' }}
+ {{ detail.authorized ? '是' : '否' }}
@@ -82,12 +82,8 @@
-
+
@@ -118,6 +114,9 @@
import { showToast } from 'vant';
import 'vant/es/toast/style';
import { getComplaintDetail, getComplaintDisposalProgress } from '@/api/enterprise';
+// 引入字典工具
+import { loadDict } from '@/util/dictUtil';
+import { reactive } from 'vue';
const router = useRouter();
const route = useRoute();
@@ -125,6 +124,20 @@ const route = useRoute();
// 当前激活 tab
const activeTab = ref('detail');
+// 投诉类型字典(与新增页面保持一致)
+const complaintTypeDict = reactive({});
+
+// 加载投诉类型字典
+const loadComplaintTypeDict = () => {
+ loadDict('caseType', (columns) => {
+ columns.forEach(item => {
+ complaintTypeDict[item.value] = item.text;
+ });
+ }, () => {
+ // 加载失败不做处理,使用默认值
+ });
+};
+
const detail = ref({
time: '',
bureauDept: '',
@@ -167,7 +180,19 @@ const MOCK_PROGRESS_LIST = [
},
];
+// 根据编码获取投诉类型显示文本
+const getComplaintTypeText = (code) => {
+ console.log('投诉类型字典项111:', code);
+ if (complaintTypeDict[code] !== undefined) {
+ console.log('投诉类型字典项111:', code, complaintTypeDict[code]);
+ return complaintTypeDict[code];
+ }
+ // 默认值(兼容旧数据)
+ return code == 0 ? '默认' : code == 1 ? '联合检查' : (code || '');
+};
+
onMounted(() => {
+
const id = route.query.id;
if (!id) {
showToast('缺少投诉ID');
@@ -175,12 +200,49 @@ onMounted(() => {
}
fetchDetail(id);
fetchDisposalProgress(id);
+ // 加载投诉类型字典
+ loadComplaintTypeDict();
});
+
+
+// 获取环境变量中的文件服务地址
+const VITE_FILE_URL = import.meta.env.VITE_FILE_URL || '';
+
+// 拼接完整的图片URL
+const buildImageUrl = (path) => {
+ if (!path) return '';
+ // 如果已经是完整URL则直接返回
+ if (path.startsWith('http://') || path.startsWith('https://')) {
+ return path;
+ }
+ // 拼接后台地址
+ return VITE_FILE_URL + path;
+};
+
const fetchDetail = (id) => {
getComplaintDetail({ id }, (res) => {
if (res && res.code === 200) {
- detail.value = res.data || {};
+ const data = res.data || {};
+ // 处理附件图片,从fileList中提取uploadPath
+ const images = [];
+ if (data.fileList && Array.isArray(data.fileList)) {
+ data.fileList.forEach(file => {
+ if (file && file.uploadPath) {
+ images.push(buildImageUrl(file.uploadPath));
+ }
+ });
+ }
+ // 兼容旧的images字段
+ if (images.length === 0 && data.images && Array.isArray(data.images)) {
+ data.images.forEach(img => {
+ images.push(buildImageUrl(img));
+ });
+ }
+ detail.value = {
+ ...data,
+ images: images
+ };
}
}, () => { });
};
diff --git a/zdxt-web-client/zdxt-efcode-enterprise-app/src/views/enterprise/my/complaintSuggestion.vue b/zdxt-web-client/zdxt-efcode-enterprise-app/src/views/enterprise/my/complaintSuggestion.vue
index ce2ea3a0..9aca7181 100644
--- a/zdxt-web-client/zdxt-efcode-enterprise-app/src/views/enterprise/my/complaintSuggestion.vue
+++ b/zdxt-web-client/zdxt-efcode-enterprise-app/src/views/enterprise/my/complaintSuggestion.vue
@@ -68,7 +68,7 @@
-
+
同意
@@ -76,7 +76,7 @@
-
+
不同意
@@ -94,7 +94,8 @@
+ :loading="complaintLoading" :finished="complaintFinished"
+ @select="onComplaintItemSelect" @loadMore="loadComplaintItemList" @search="onComplaintItemSearch" />
@@ -113,8 +114,9 @@