Browse Source

计划预告bug修复

dev-V1.10.2-temp
wangmingyong@163.com 3 months ago
parent
commit
5dd3316292
  1. 14
      zdxt-web-client/zdxt-efcode-enforcement-app/src/util/util.js
  2. 22
      zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/my/notice/cp_notice_edit.vue
  3. 6
      zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/my/notice/cp_notice_tab_content.vue
  4. 8
      zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/my/plan/cp_plan_edit.vue
  5. 2
      zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/my/plan/cp_plan_mine.vue

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

@ -122,9 +122,17 @@ const formatTime = (dateStr) => {
const y = d.getFullYear(); const y = d.getFullYear();
const m = String(d.getMonth() + 1).padStart(2, '0'); const m = String(d.getMonth() + 1).padStart(2, '0');
const day = String(d.getDate()).padStart(2, '0'); const day = String(d.getDate()).padStart(2, '0');
const h = String(d.getHours()).padStart(2, '0'); const h = d.getHours();
const min = String(d.getMinutes()).padStart(2, '0'); const min = d.getMinutes();
return `${y}-${m}-${day} ${h}:${min}:00`; const sec = d.getSeconds();
// 时分秒全为0时只展示日期
if (h === 0 && min === 0 && sec === 0) {
return `${y}-${m}-${day}`;
}
const hh = String(h).padStart(2, '0');
const mm = String(min).padStart(2, '0');
const ss = String(sec).padStart(2, '0');
return `${y}-${m}-${day} ${hh}:${mm}:${ss}`;
}; };
/** /**

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

@ -59,10 +59,10 @@
:key="index" :key="index"
class="person-line" class="person-line"
> >
<span class="person-name">{{ person.name }}</span> <span class="person-name">{{ person.name }} </span>
<span class="person-phone">{{ person.phone }}</span> <span class="person-phone">{{ person.phone }}</span>
<van-icon <van-icon
v-if="personList.length > 1 && person.phone !== useCommon.phonenumber" v-if="personList.length > 1 && person.id !== useCommon.userId"
name="close" name="close"
class="person-remove" class="person-remove"
@click="removePerson(index)" @click="removePerson(index)"
@ -92,6 +92,7 @@
v-model="form.contactPerson" v-model="form.contactPerson"
label="企业联系人" label="企业联系人"
placeholder="请输入联系人" placeholder="请输入联系人"
readonly
/> />
<!-- 企业联系电话 --> <!-- 企业联系电话 -->
@ -99,6 +100,9 @@
v-model="form.contactPhone" v-model="form.contactPhone"
label="企业联系电话" label="企业联系电话"
placeholder="请输入联系电话" placeholder="请输入联系电话"
type="tel"
maxlength="11"
:rules="[{ pattern: /^\d{11}$/, message: '请输入11位手机号码' }]"
/> />
<!-- 执法事项 --> <!-- 执法事项 -->
@ -345,14 +349,14 @@ const datePickerValue = ref([
]); ]);
const timeColumns = [ const timeColumns = [
{ text: '上午', value: 1 }, { text: '上午(9:00-12:00)', value: 1 },
{ text: '下午', value: 2 }, { text: '下午(14:00-18:00)', value: 2 },
{ text: '其他', value: 3 }, { text: '其他(18:00-21:00)', value: 3 },
]; ];
// 日期+时段展示 // 日期+时段展示
const enforceTimeDisplay = computed(() => { const enforceTimeDisplay = computed(() => {
const timeText = { 1: '上午', 2: '下午', 3: '其他' }; const timeText = { 1: '上午(9:00-12:00)', 2: '下午(14:00-18:00)', 3: '其他(18:00-21:00)' };
return timeText[form.value.enforceTime] || ''; return timeText[form.value.enforceTime] || '';
}); });
@ -636,6 +640,12 @@ const validate = (isDraft) => {
if (!form.value.enterpriseName) { showToast('请输入企业名称'); return false; } if (!form.value.enterpriseName) { showToast('请输入企业名称'); return false; }
if (personList.value.length === 0) { showToast('请添加执法人员'); return false; } if (personList.value.length === 0) { showToast('请添加执法人员'); return false; }
if (personList.value.length < 2) { showToast('执法人员不得少于2人'); return false; } if (personList.value.length < 2) { showToast('执法人员不得少于2人'); return false; }
// 校验企业联系电话
const phone = form.value.contactPhone;
if (phone && !/^\d{11}$/.test(phone)) {
showToast('请输入11位手机号码');
return false;
}
return true; return true;
}; };

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

@ -14,12 +14,12 @@
class="notice-card" class="notice-card"
@click="$emit('detail', item)" @click="$emit('detail', item)"
> >
<div class="card-header"> <!-- <div class="card-header">
<div class="status-tag" :class="'status-' + item.status"> <div class="status-tag" :class="'status-' + item.status">
{{ getStatusText(item.status) }} {{ getStatusText(item.status) }}
</div> </div>
<div class="card-date">{{ formatTime(item.createTime) }}</div> <div class="card-date">{{ formatTime(item.createTime) }}</div>
</div> </div> -->
<div class="notice-title">{{ item.enforceContent || '暂无执法事项' }}</div> <div class="notice-title">{{ item.enforceContent || '暂无执法事项' }}</div>
@ -116,7 +116,7 @@ const getStatusText = (status) => {
}; };
const getTimeText = (time) => { const getTimeText = (time) => {
const map = { 1: '上午', 2: '下午', 3: '其他' }; const map = { 1: '上午(9:00-12:00)', 2: '下午(14:00-18:00)', 3: '其他(18:00-21:00)' };
return map[time] || ''; return map[time] || '';
}; };

8
zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/my/plan/cp_plan_edit.vue

@ -49,9 +49,9 @@
<van-field name="planTime" label="执行时段" required :disabled="isPrefillMode"> <van-field name="planTime" label="执行时段" required :disabled="isPrefillMode">
<template #input> <template #input>
<van-radio-group v-model="form.planTime" direction="horizontal" :disabled="isPrefillMode"> <van-radio-group v-model="form.planTime" direction="horizontal" :disabled="isPrefillMode">
<van-radio :name="1">上午</van-radio> <van-radio :name="1">上午(9:00-12:00)</van-radio>
<van-radio :name="2">下午</van-radio> <van-radio :name="2">下午(14:00-18:00)</van-radio>
<van-radio :name="3">其他</van-radio> <van-radio :name="3">其他(18:00-21:00)</van-radio>
</van-radio-group> </van-radio-group>
</template> </template>
</van-field> </van-field>
@ -265,7 +265,7 @@ const submitting = ref(false);
const showDatePicker = ref(false); const showDatePicker = ref(false);
// 下阶段计划提交最晚时间(每月几号前需提交下阶段计划) // 下阶段计划提交最晚时间(每月几号前需提交下阶段计划)
const submitDeadline = ref(26); const submitDeadline = ref(25);
// 手工匹配距计划开始天数 // 手工匹配距计划开始天数
const manualMatchDays = ref(3); const manualMatchDays = ref(3);

2
zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/my/plan/cp_plan_mine.vue

@ -214,7 +214,7 @@ const getStatusText = (status) => {
// 时段文本 // 时段文本
const getPlanTimeText = (time) => { const getPlanTimeText = (time) => {
const map = { 1: '上午', 2: '下午', 3: '其他' }; const map = { 1: '上午(9:00-12:00)', 2: '下午(14:00-18:00)', 3: '其他(18:00-21:00)' };
return map[time] || ''; return map[time] || '';
}; };

Loading…
Cancel
Save