Browse Source

执法人员对其

master
wangmingyong@163.com 4 weeks ago
parent
commit
65f6856403
  1. 6
      zdxt-web-client/zdxt-efcode-enforcement-app/src/util/util.js
  2. 22
      zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/enforce/enforcementEvaluateDetail.vue
  3. 29
      zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/enforce/enforcementList.vue
  4. 22
      zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/my/notice/cp_notice_tab_content.vue

6
zdxt-web-client/zdxt-efcode-enforcement-app/src/util/util.js

@ -168,15 +168,13 @@ const getDeviceType = () =>{
const formatEnforcer = (item) => {
const enforcers = [];
if (item.lawEnforcer) {
// 处理逗号分隔的多个执法人员
const names = item.lawEnforcer.split(',').map(n => n.trim()).filter(n => n);
const ids = item.lawEnforcerId ? item.lawEnforcerId.split(',').map(id => id.trim()).filter(id => id) : [];
names.forEach((name, index) => {
const id = ids[index] || '';
enforcers.push(id ? `${name} ${id}` : name);
enforcers.push({ name, id });
});
}
// 支持两种字段名:lawEnforcerTwo 或 lawEnforcerOther
const secondName = item.lawEnforcerTwo || item.lawEnforcerOther;
const secondId = item.lawEnforcerIdTwo || item.lawEnforcerIdOther;
if (secondName) {
@ -184,7 +182,7 @@ const formatEnforcer = (item) => {
const ids = secondId ? secondId.split(',').map(id => id.trim()).filter(id => id) : [];
names.forEach((name, index) => {
const id = ids[index] || '';
enforcers.push(id ? `${name} ${id}` : name);
enforcers.push({ name, id });
});
}
return enforcers;

22
zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/enforce/enforcementEvaluateDetail.vue

@ -28,8 +28,9 @@
<div class="info-row">
<span class="info-label">执法人员</span>
<div class="info-value enforcer-value">
<div v-for="(enforcer, index) in formatEnforcer(detail)" :key="index">
{{ enforcer }}
<div v-for="(enforcer, index) in formatEnforcer(detail)" :key="index" class="enforcer-line">
<span class="enforcer-name">{{ enforcer.name }}</span>
<span v-if="enforcer.id" class="enforcer-id">{{ enforcer.id }}</span>
</div>
</div>
</div>
@ -535,6 +536,23 @@ const onSubmit = () => {
flex-direction: column;
}
.enforcer-line {
display: flex;
align-items: baseline;
white-space: nowrap;
}
.enforcer-name {
display: inline-block;
min-width: 3em;
text-align: justify;
text-align-last: justify;
}
.enforcer-id {
margin-left: 0.4em;
}
.result-row {
align-items: center;

29
zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/enforce/enforcementList.vue

@ -25,9 +25,10 @@
</div>
<div class="card-row">
<div class="card-label">执法人员</div>
<div>
<div v-for="(enforcer, index) in formatEnforcer(item)" :key="index">
{{ enforcer }}
<div class="enforcer-list">
<div v-for="(enforcer, index) in formatEnforcer(item)" :key="index" class="enforcer-line">
<span class="enforcer-name">{{ enforcer.name }}</span>
<span v-if="enforcer.id" class="enforcer-id">{{ enforcer.id }}</span>
</div>
</div>
</div>
@ -295,6 +296,28 @@ onMounted(() => {
white-space: nowrap;
}
}
.enforcer-list {
display: flex;
flex-direction: column;
}
.enforcer-line {
display: flex;
align-items: baseline;
white-space: nowrap;
}
.enforcer-name {
display: inline-block;
min-width: 3em;
text-align: justify;
text-align-last: justify;
}
.enforcer-id {
margin-left: 0.4em;
}
}
.enforcer-block {

22
zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/my/notice/cp_notice_tab_content.vue

@ -4,10 +4,13 @@
<van-list
v-model:loading="loading"
:finished="finished"
finished-text="没有更多了"
finished-text=""
@load="onLoad"
>
<div class="notice-list">
<div v-if="!loading && noticeList.length === 0" class="notice-empty">
<van-empty description="暂无预告" />
</div>
<div v-else class="notice-list">
<section
v-for="item in noticeList"
:key="item.id"
@ -78,9 +81,7 @@
</div>
</section>
</div>
<!-- 空状态 -->
<van-empty v-if="!loading && noticeList.length === 0" description="暂无预告" />
<div v-if="finished && noticeList.length > 0" class="list-finished">没有更多了</div>
</van-list>
</van-pull-refresh>
@ -194,6 +195,17 @@ defineExpose({ refresh });
gap: 14px;
}
.notice-empty {
padding: 40px 0;
}
.list-finished {
text-align: center;
font-size: 13px;
color: #969799;
padding: 16px 0;
}
.notice-card {
background: #fff;
border-radius: 14px;

Loading…
Cancel
Save