修改并优化了一些功能及bug
This commit is contained in:
@@ -33,6 +33,20 @@ const _sfc_main = {
|
||||
const dataList = common_vendor.ref([]);
|
||||
const pageNum = common_vendor.ref(1);
|
||||
const pageSize = common_vendor.ref(20);
|
||||
const statusTabs = common_vendor.ref([
|
||||
{ label: "全部状态", value: 0, count: null },
|
||||
{ label: "逾期未检", value: 1, count: null },
|
||||
{ label: "严重逾期", value: 2, count: null },
|
||||
{ label: "期限内待检", value: 3, count: null },
|
||||
{ label: "逾期已完成", value: 4, count: null },
|
||||
{ label: "按期已完成", value: 5, count: null }
|
||||
]);
|
||||
const activeStatusTab = common_vendor.ref(0);
|
||||
const switchStatusTab = (index) => {
|
||||
activeStatusTab.value = index;
|
||||
pageNum.value = 1;
|
||||
fetchData();
|
||||
};
|
||||
const formatDate = (timestamp) => {
|
||||
const date = new Date(timestamp);
|
||||
const year = date.getFullYear();
|
||||
@@ -89,6 +103,10 @@ const _sfc_main = {
|
||||
if (searchForm.deptName && searchForm.deptName.trim()) {
|
||||
params.deptName = searchForm.deptName.trim();
|
||||
}
|
||||
const statusValue = statusTabs.value[activeStatusTab.value].value;
|
||||
if (statusValue !== 0) {
|
||||
params.inspectionStatus = statusValue;
|
||||
}
|
||||
const res = await request_api.getInspectionWarningList(params);
|
||||
if (res.code === 0) {
|
||||
if (res.data.statistics) {
|
||||
@@ -102,7 +120,7 @@ const _sfc_main = {
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at pages/Inspectionwarning/Inspectionwarning.vue:255", "获取预警列表失败:", error);
|
||||
common_vendor.index.__f__("error", "at pages/Inspectionwarning/Inspectionwarning.vue:277", "获取预警列表失败:", error);
|
||||
}
|
||||
};
|
||||
const handleSearch = () => {
|
||||
@@ -114,64 +132,66 @@ const _sfc_main = {
|
||||
});
|
||||
return (_ctx, _cache) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.f(_ctx.warningList, (item, index, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item.name),
|
||||
b: _ctx.activeIndex === index ? 1 : "",
|
||||
c: index,
|
||||
d: common_vendor.o(($event) => _ctx.switchTab(index), index)
|
||||
};
|
||||
}),
|
||||
b: common_assets._imports_0$1,
|
||||
c: common_vendor.t(searchForm.startDate || "请选择"),
|
||||
d: common_vendor.n(searchForm.startDate ? "date-value" : "date-placeholder"),
|
||||
e: common_vendor.o(($event) => showStartDatePicker.value = true),
|
||||
f: common_vendor.o(onStartDateConfirm),
|
||||
a: common_assets._imports_0$1,
|
||||
b: common_vendor.t(searchForm.startDate || "请选择"),
|
||||
c: common_vendor.n(searchForm.startDate ? "date-value" : "date-placeholder"),
|
||||
d: common_vendor.o(($event) => showStartDatePicker.value = true),
|
||||
e: common_vendor.o(onStartDateConfirm),
|
||||
f: common_vendor.o(($event) => showStartDatePicker.value = false),
|
||||
g: common_vendor.o(($event) => showStartDatePicker.value = false),
|
||||
h: common_vendor.o(($event) => showStartDatePicker.value = false),
|
||||
i: common_vendor.o(($event) => startDateValue.value = $event),
|
||||
j: common_vendor.p({
|
||||
h: common_vendor.o(($event) => startDateValue.value = $event),
|
||||
i: common_vendor.p({
|
||||
show: showStartDatePicker.value,
|
||||
mode: "date",
|
||||
modelValue: startDateValue.value
|
||||
}),
|
||||
k: common_vendor.t(searchForm.endDate || "请选择"),
|
||||
l: common_vendor.n(searchForm.endDate ? "date-value" : "date-placeholder"),
|
||||
m: common_vendor.o(($event) => showEndDatePicker.value = true),
|
||||
n: common_vendor.o(onEndDateConfirm),
|
||||
j: common_vendor.t(searchForm.endDate || "请选择"),
|
||||
k: common_vendor.n(searchForm.endDate ? "date-value" : "date-placeholder"),
|
||||
l: common_vendor.o(($event) => showEndDatePicker.value = true),
|
||||
m: common_vendor.o(onEndDateConfirm),
|
||||
n: common_vendor.o(($event) => showEndDatePicker.value = false),
|
||||
o: common_vendor.o(($event) => showEndDatePicker.value = false),
|
||||
p: common_vendor.o(($event) => showEndDatePicker.value = false),
|
||||
q: common_vendor.o(($event) => endDateValue.value = $event),
|
||||
r: common_vendor.p({
|
||||
p: common_vendor.o(($event) => endDateValue.value = $event),
|
||||
q: common_vendor.p({
|
||||
show: showEndDatePicker.value,
|
||||
mode: "date",
|
||||
modelValue: endDateValue.value
|
||||
}),
|
||||
s: common_vendor.o(($event) => searchForm.deptName = $event),
|
||||
t: common_vendor.p({
|
||||
r: common_vendor.o(($event) => searchForm.deptName = $event),
|
||||
s: common_vendor.p({
|
||||
placeholder: "请输入公司名称",
|
||||
border: "surround",
|
||||
modelValue: searchForm.deptName
|
||||
}),
|
||||
v: common_vendor.o(handleSearch),
|
||||
w: common_assets._imports_1,
|
||||
x: common_vendor.t(statistics.total),
|
||||
y: common_vendor.t(statistics.overdue),
|
||||
z: common_vendor.t(statistics.completed),
|
||||
A: common_vendor.t(statistics.pending),
|
||||
t: common_vendor.o(handleSearch),
|
||||
v: common_assets._imports_1,
|
||||
w: common_vendor.t(statistics.total),
|
||||
x: common_vendor.t(statistics.overdue),
|
||||
y: common_vendor.t(statistics.completed),
|
||||
z: common_vendor.t(statistics.pending),
|
||||
A: common_vendor.f(statusTabs.value, (tab, index, i0) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.t(tab.label),
|
||||
b: common_vendor.t(tab.count != null ? tab.count : ""),
|
||||
c: activeStatusTab.value === index
|
||||
}, activeStatusTab.value === index ? {} : {}, {
|
||||
d: index,
|
||||
e: activeStatusTab.value === index ? 1 : "",
|
||||
f: common_vendor.o(($event) => switchStatusTab(index), index)
|
||||
});
|
||||
}),
|
||||
B: common_vendor.f(dataList.value, (item, index, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(getStatusText(item.overdueDays, item.statusName)),
|
||||
b: common_vendor.n(getStatusClass(item.overdueDays)),
|
||||
c: common_vendor.t(index + 1),
|
||||
d: common_vendor.t(item.deptName || "-"),
|
||||
e: common_vendor.t(item.planName || "-"),
|
||||
f: common_vendor.t(item.cycleName || "-"),
|
||||
g: common_vendor.t(item.taskDate || "-"),
|
||||
h: common_vendor.t(item.finishTime || "未完成"),
|
||||
i: common_vendor.t(item.executorName || "-"),
|
||||
j: common_vendor.t(item.overdueDays || "-"),
|
||||
k: item.id
|
||||
a: common_vendor.t(item.deptName || "-"),
|
||||
b: common_vendor.t(getStatusText(item.overdueDays, item.statusName)),
|
||||
c: common_vendor.n(getStatusClass(item.overdueDays)),
|
||||
d: common_vendor.t(item.planName || "-"),
|
||||
e: common_vendor.t(item.cycleName || "-"),
|
||||
f: common_vendor.t(item.taskDate || "-"),
|
||||
g: common_vendor.t(item.finishTime || "未完成"),
|
||||
h: common_vendor.t(item.executorName || "-"),
|
||||
i: common_vendor.t(item.overdueDays || "-"),
|
||||
j: item.id
|
||||
};
|
||||
}),
|
||||
C: dataList.value.length === 0
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -120,17 +120,38 @@
|
||||
margin-right: 12rpx;
|
||||
}
|
||||
.list-card.data-v-00b99536 {
|
||||
position: relative;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0rpx 2rpx 10rpx rgba(0, 0, 0, 0.08);
|
||||
border-left: 8rpx solid #2667E9;
|
||||
border-radius: 16rpx;
|
||||
padding: 30rpx;
|
||||
padding: 0;
|
||||
margin-bottom: 20rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
.list-card .card-header.data-v-00b99536 {
|
||||
margin-bottom: 20rpx;
|
||||
.list-card .card-title-row.data-v-00b99536 {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
background: linear-gradient(135deg, #4A7CF7 0%, #2667E9 100%);
|
||||
padding: 24rpx 30rpx;
|
||||
}
|
||||
.list-card .card-company-name.data-v-00b99536 {
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
color: #fff;
|
||||
flex: 1;
|
||||
margin-right: 16rpx;
|
||||
}
|
||||
.list-card .card-status-tag.data-v-00b99536 {
|
||||
padding: 8rpx 24rpx;
|
||||
border-radius: 8rpx;
|
||||
white-space: nowrap;
|
||||
flex-shrink: 0;
|
||||
font-size: 24rpx;
|
||||
color: #fff;
|
||||
font-weight: 500;
|
||||
}
|
||||
.list-card .card-body.data-v-00b99536 {
|
||||
padding: 30rpx;
|
||||
}
|
||||
.list-card .card-row.data-v-00b99536 {
|
||||
display: flex;
|
||||
@@ -138,6 +159,9 @@
|
||||
font-size: 28rpx;
|
||||
line-height: 1.5;
|
||||
}
|
||||
.list-card .card-row.data-v-00b99536:first-of-type {
|
||||
margin-top: 0;
|
||||
}
|
||||
.list-card .card-row .row-label.data-v-00b99536 {
|
||||
color: #999;
|
||||
white-space: nowrap;
|
||||
@@ -147,23 +171,6 @@
|
||||
color: #333;
|
||||
word-break: break-all;
|
||||
}
|
||||
.status-tag.data-v-00b99536 {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
width: 160rpx;
|
||||
height: 50rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
transform: rotate(0deg);
|
||||
border-radius: 0 16rpx 0 16rpx;
|
||||
}
|
||||
.status-tag .status-text.data-v-00b99536 {
|
||||
font-size: 22rpx;
|
||||
color: #fff;
|
||||
font-weight: 500;
|
||||
}
|
||||
.status-serious.data-v-00b99536 {
|
||||
background: linear-gradient(135deg, #FF6B6B 0%, #EE5A5A 100%);
|
||||
}
|
||||
@@ -181,4 +188,42 @@
|
||||
padding: 100rpx 0;
|
||||
color: #999;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.status-tabs.data-v-00b99536 {
|
||||
white-space: nowrap;
|
||||
background: #fff;
|
||||
border-radius: 16rpx;
|
||||
margin-bottom: 20rpx;
|
||||
padding: 0 10rpx;
|
||||
}
|
||||
.status-tabs-inner.data-v-00b99536 {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
height: 88rpx;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.status-tab-item.data-v-00b99536 {
|
||||
display: inline-flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 0 24rpx;
|
||||
height: 88rpx;
|
||||
position: relative;
|
||||
}
|
||||
.status-tab-text.data-v-00b99536 {
|
||||
font-size: 26rpx;
|
||||
color: #666;
|
||||
}
|
||||
.status-tab-active .status-tab-text.data-v-00b99536 {
|
||||
color: #2667E9;
|
||||
font-weight: bold;
|
||||
}
|
||||
.status-tab-bar.data-v-00b99536 {
|
||||
position: absolute;
|
||||
bottom: 8rpx;
|
||||
width: 40rpx;
|
||||
height: 6rpx;
|
||||
background: #2667E9;
|
||||
border-radius: 3rpx;
|
||||
}
|
||||
Reference in New Issue
Block a user