交办时间年月日,整改时回显整改人
This commit is contained in:
@@ -12,7 +12,7 @@ const _sfc_main = {
|
||||
list.value = res.data.records || [];
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at pages/checklist/checklist.vue:36", "获取检查表列表失败:", error);
|
||||
common_vendor.index.__f__("error", "at pages/checklist/checklist.vue:44", "获取检查表列表失败:", error);
|
||||
}
|
||||
};
|
||||
const goToAdd = () => {
|
||||
@@ -20,16 +20,36 @@ const _sfc_main = {
|
||||
url: "/pages/editchecklist/editchecklist"
|
||||
});
|
||||
};
|
||||
const goToDetail = (item) => {
|
||||
if (!(item == null ? void 0 : item.id))
|
||||
return;
|
||||
common_vendor.index.navigateTo({
|
||||
url: `/pages/checklist/detail?id=${item.id}`
|
||||
});
|
||||
};
|
||||
common_vendor.onShow(() => {
|
||||
fetchList();
|
||||
});
|
||||
return (_ctx, _cache) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.f(list.value, (item, k0, i0) => {
|
||||
return {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.t(item.name),
|
||||
b: item.id
|
||||
};
|
||||
b: item.deptName || item.pointCount
|
||||
}, item.deptName || item.pointCount ? common_vendor.e({
|
||||
c: item.deptName
|
||||
}, item.deptName ? {
|
||||
d: common_vendor.t(item.deptName)
|
||||
} : {}, {
|
||||
e: item.deptName && item.pointCount
|
||||
}, item.deptName && item.pointCount ? {} : {}, {
|
||||
f: item.pointCount
|
||||
}, item.pointCount ? {
|
||||
g: common_vendor.t(item.pointCount)
|
||||
} : {}) : {}, {
|
||||
h: common_vendor.o(($event) => goToDetail(item), item.id),
|
||||
i: item.id
|
||||
});
|
||||
}),
|
||||
b: list.value.length === 0
|
||||
}, list.value.length === 0 ? {} : {}, {
|
||||
|
||||
@@ -1 +1 @@
|
||||
<view class="{{['page', 'padding', 'data-v-4d00090a', virtualHostClass]}}" style="{{virtualHostStyle}}" hidden="{{virtualHostHidden || false}}" id="{{d}}"><view wx:for="{{a}}" wx:for-item="item" wx:key="b" class="checklist-card data-v-4d00090a"><view class="card-name data-v-4d00090a">{{item.a}}</view></view><view wx:if="{{b}}" class="empty-tip data-v-4d00090a"><text class="data-v-4d00090a">暂无检查表</text></view><button class="add-btn data-v-4d00090a" bindtap="{{c}}"><text class="data-v-4d00090a">新增检查表</text></button></view>
|
||||
<view class="{{['page', 'padding', 'data-v-4d00090a', virtualHostClass]}}" style="{{virtualHostStyle}}" hidden="{{virtualHostHidden || false}}" id="{{d}}"><view wx:for="{{a}}" wx:for-item="item" wx:key="i" class="checklist-card data-v-4d00090a"><view class="card-main data-v-4d00090a"><view class="card-info data-v-4d00090a"><view class="card-name data-v-4d00090a">{{item.a}}</view><view wx:if="{{item.b}}" class="card-meta data-v-4d00090a"><text wx:if="{{item.c}}" class="data-v-4d00090a">{{item.d}}</text><text wx:if="{{item.e}}" class="meta-dot data-v-4d00090a">·</text><text wx:if="{{item.f}}" class="data-v-4d00090a">检查项 {{item.g}} 项</text></view></view><button class="detail-btn data-v-4d00090a" catchtap="{{item.h}}">详情</button></view></view><view wx:if="{{b}}" class="empty-tip data-v-4d00090a"><text class="data-v-4d00090a">暂无检查表</text></view><button class="add-btn data-v-4d00090a" bindtap="{{c}}"><text class="data-v-4d00090a">新增检查表</text></button></view>
|
||||
@@ -32,14 +32,58 @@
|
||||
.checklist-card.data-v-4d00090a {
|
||||
background: #fff;
|
||||
border-radius: 16rpx;
|
||||
padding: 30rpx;
|
||||
padding: 24rpx 28rpx;
|
||||
margin-bottom: 20rpx;
|
||||
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
.checklist-card .card-name.data-v-4d00090a {
|
||||
.card-main.data-v-4d00090a {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 20rpx;
|
||||
}
|
||||
.card-info.data-v-4d00090a {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
.card-name.data-v-4d00090a {
|
||||
font-size: 32rpx;
|
||||
color: #333;
|
||||
font-weight: 500;
|
||||
line-height: 1.4;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
word-break: break-all;
|
||||
}
|
||||
.card-meta.data-v-4d00090a {
|
||||
margin-top: 10rpx;
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
line-height: 1.4;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.meta-dot.data-v-4d00090a {
|
||||
margin: 0 8rpx;
|
||||
}
|
||||
.detail-btn.data-v-4d00090a {
|
||||
flex-shrink: 0;
|
||||
width: 120rpx;
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
background: #fff;
|
||||
border: 2rpx solid #2667E9;
|
||||
border-radius: 30rpx;
|
||||
color: #2667E9;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
.detail-btn.data-v-4d00090a::after {
|
||||
border: none;
|
||||
}
|
||||
.empty-tip.data-v-4d00090a {
|
||||
text-align: center;
|
||||
@@ -62,7 +106,6 @@
|
||||
justify-content: center;
|
||||
box-shadow: 0 8rpx 20rpx rgba(102, 126, 234, 0.4);
|
||||
}
|
||||
.add-btn .cuIcon-add.data-v-4d00090a {
|
||||
margin-right: 10rpx;
|
||||
font-size: 36rpx;
|
||||
.add-btn.data-v-4d00090a::after {
|
||||
border: none;
|
||||
}
|
||||
101
unpackage/dist/dev/mp-weixin/pages/checklist/detail.js
vendored
Normal file
101
unpackage/dist/dev/mp-weixin/pages/checklist/detail.js
vendored
Normal file
@@ -0,0 +1,101 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const common_assets = require("../../common/assets.js");
|
||||
const request_api = require("../../request/api.js");
|
||||
const _sfc_main = {
|
||||
__name: "detail",
|
||||
setup(__props) {
|
||||
const loading = common_vendor.ref(true);
|
||||
const oneTableId = common_vendor.ref("");
|
||||
const detail = common_vendor.ref({});
|
||||
const checkItems = common_vendor.ref([]);
|
||||
const typeMap = { 1: "日常检查", 2: "专项检查", 3: "设备检查" };
|
||||
const cycleMap = { 1: "每天一次", 2: "每周", 3: "每月", 4: "每季度" };
|
||||
const runModeMap = { 1: "单人完成", 2: "全员", 3: "指定分组" };
|
||||
const weekendMap = { 1: "包含周末", 2: "不包含周末" };
|
||||
const typeLabel = common_vendor.computed(() => detail.value.typeName || typeMap[detail.value.type] || "-");
|
||||
const cycleLabel = common_vendor.computed(() => detail.value.cycleName || cycleMap[detail.value.cycle] || "-");
|
||||
const runModeLabel = common_vendor.computed(() => detail.value.runModeName || runModeMap[detail.value.runMode] || "-");
|
||||
const weekendLabel = common_vendor.computed(() => detail.value.isWeekendName || weekendMap[detail.value.isWeekend] || "-");
|
||||
const executorLabel = common_vendor.computed(() => {
|
||||
if (Number(detail.value.runMode) === 2)
|
||||
return "全员";
|
||||
return detail.value.executorName || "-";
|
||||
});
|
||||
const formatDate = (value) => {
|
||||
if (!value)
|
||||
return "-";
|
||||
return String(value).split(" ")[0];
|
||||
};
|
||||
const fetchDetail = async () => {
|
||||
if (!oneTableId.value)
|
||||
return;
|
||||
loading.value = true;
|
||||
try {
|
||||
const res = await request_api.getOneTableInfo(oneTableId.value);
|
||||
if (res.code === 0) {
|
||||
const data = res.data || {};
|
||||
detail.value = data;
|
||||
checkItems.value = data.itemDetailList || [];
|
||||
} else {
|
||||
common_vendor.index.showToast({ title: res.msg || "获取详情失败", icon: "none" });
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at pages/checklist/detail.vue:137", "获取检查计划详情失败:", error);
|
||||
common_vendor.index.showToast({ title: "获取详情失败", icon: "none" });
|
||||
} finally {
|
||||
loading.value = false;
|
||||
}
|
||||
};
|
||||
common_vendor.onLoad((options) => {
|
||||
oneTableId.value = options.id || "";
|
||||
if (!oneTableId.value) {
|
||||
common_vendor.index.showToast({ title: "缺少检查表ID", icon: "none" });
|
||||
loading.value = false;
|
||||
return;
|
||||
}
|
||||
fetchDetail();
|
||||
});
|
||||
return (_ctx, _cache) => {
|
||||
return common_vendor.e({
|
||||
a: loading.value
|
||||
}, loading.value ? {} : common_vendor.e({
|
||||
b: common_vendor.t(detail.value.name || "-"),
|
||||
c: common_vendor.t(detail.value.deptName || "-"),
|
||||
d: common_vendor.t(typeLabel.value),
|
||||
e: common_vendor.t(runModeLabel.value),
|
||||
f: common_vendor.t(executorLabel.value),
|
||||
g: common_vendor.t(cycleLabel.value),
|
||||
h: detail.value.description
|
||||
}, detail.value.description ? {
|
||||
i: detail.value.description
|
||||
} : {}, {
|
||||
j: common_assets._imports_0$1,
|
||||
k: common_vendor.t(detail.value.itemNames || "-"),
|
||||
l: common_vendor.t(checkItems.value.length),
|
||||
m: checkItems.value.length === 0
|
||||
}, checkItems.value.length === 0 ? {} : {
|
||||
n: common_vendor.f(checkItems.value, (item, index, i0) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.t(index + 1),
|
||||
b: common_vendor.t(item.checkItemName || "-"),
|
||||
c: item.industryName
|
||||
}, item.industryName ? {
|
||||
d: common_vendor.t(item.industryName)
|
||||
} : {}, {
|
||||
e: item.pointId || index
|
||||
});
|
||||
})
|
||||
}, {
|
||||
o: common_vendor.t(weekendLabel.value),
|
||||
p: common_vendor.t(formatDate(detail.value.planStartTime)),
|
||||
q: common_vendor.t(formatDate(detail.value.planEndTime))
|
||||
}), {
|
||||
r: common_vendor.gei(_ctx, "")
|
||||
});
|
||||
};
|
||||
}
|
||||
};
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-b95d4ca2"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/checklist/detail.js.map
|
||||
4
unpackage/dist/dev/mp-weixin/pages/checklist/detail.json
vendored
Normal file
4
unpackage/dist/dev/mp-weixin/pages/checklist/detail.json
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"navigationBarTitleText": "检查计划详情",
|
||||
"usingComponents": {}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/pages/checklist/detail.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/pages/checklist/detail.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="{{['page', 'data-v-b95d4ca2', virtualHostClass]}}" style="{{virtualHostStyle}}" hidden="{{virtualHostHidden || false}}" id="{{r}}"><view wx:if="{{a}}" class="loading-wrap data-v-b95d4ca2"><text class="loading-text data-v-b95d4ca2">加载中...</text></view><block wx:else><view class="section-card data-v-b95d4ca2"><view class="section-title data-v-b95d4ca2">基本信息</view><view class="info-row data-v-b95d4ca2"><text class="info-label data-v-b95d4ca2">检查表名称</text><text class="info-value data-v-b95d4ca2">{{b}}</text></view><view class="info-row data-v-b95d4ca2"><text class="info-label data-v-b95d4ca2">分派单位</text><text class="info-value data-v-b95d4ca2">{{c}}</text></view><view class="info-row data-v-b95d4ca2"><text class="info-label data-v-b95d4ca2">检查表类型</text><text class="info-value data-v-b95d4ca2">{{d}}</text></view><view class="info-row data-v-b95d4ca2"><text class="info-label data-v-b95d4ca2">模式</text><text class="info-value data-v-b95d4ca2">{{e}}</text></view><view class="info-row data-v-b95d4ca2"><text class="info-label data-v-b95d4ca2">执行人员</text><text class="info-value data-v-b95d4ca2">{{f}}</text></view><view class="info-row data-v-b95d4ca2"><text class="info-label data-v-b95d4ca2">循环周期</text><text class="info-value data-v-b95d4ca2">{{g}}</text></view><view class="info-row column data-v-b95d4ca2"><text class="info-label data-v-b95d4ca2">检查说明</text><view class="info-block data-v-b95d4ca2"><rich-text wx:if="{{h}}" class="data-v-b95d4ca2" nodes="{{i}}"></rich-text><text wx:else class="info-empty data-v-b95d4ca2">-</text></view></view></view><view class="section-card data-v-b95d4ca2"><view class="section-title data-v-b95d4ca2">关联表项</view><view class="related-box data-v-b95d4ca2"><image class="related-icon data-v-b95d4ca2" src="{{j}}" mode="aspectFit"></image><text class="related-text data-v-b95d4ca2">{{k}}</text></view></view><view class="section-card data-v-b95d4ca2"><view class="section-title data-v-b95d4ca2"> 检查项明细 <text class="item-count data-v-b95d4ca2">({{l}}项)</text></view><view wx:if="{{m}}" class="empty-block data-v-b95d4ca2">暂无检查项</view><view wx:else class="item-list data-v-b95d4ca2"><view wx:for="{{n}}" wx:for-item="item" wx:key="e" class="item-row data-v-b95d4ca2"><text class="item-no data-v-b95d4ca2">{{item.a}}</text><view class="item-content data-v-b95d4ca2"><text class="item-name data-v-b95d4ca2">{{item.b}}</text><text wx:if="{{item.c}}" class="item-industry data-v-b95d4ca2">{{item.d}}</text></view></view></view></view><view class="section-card data-v-b95d4ca2"><view class="section-title data-v-b95d4ca2">计划安排</view><view class="info-row data-v-b95d4ca2"><text class="info-label data-v-b95d4ca2">仅工作日</text><text class="info-value data-v-b95d4ca2">{{o}}</text></view><view class="info-row data-v-b95d4ca2"><text class="info-label data-v-b95d4ca2">计划开始日期</text><text class="info-value data-v-b95d4ca2">{{p}}</text></view><view class="info-row data-v-b95d4ca2"><text class="info-label data-v-b95d4ca2">计划结束日期</text><text class="info-value data-v-b95d4ca2">{{q}}</text></view></view></block></view>
|
||||
168
unpackage/dist/dev/mp-weixin/pages/checklist/detail.wxss
vendored
Normal file
168
unpackage/dist/dev/mp-weixin/pages/checklist/detail.wxss
vendored
Normal file
@@ -0,0 +1,168 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* uni.scss */
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
.page.data-v-b95d4ca2 {
|
||||
min-height: 100vh;
|
||||
background: #EBF2FC;
|
||||
padding: 24rpx;
|
||||
padding-bottom: 40rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.loading-wrap.data-v-b95d4ca2 {
|
||||
padding: 120rpx 0;
|
||||
text-align: center;
|
||||
}
|
||||
.loading-text.data-v-b95d4ca2 {
|
||||
font-size: 28rpx;
|
||||
color: #999;
|
||||
}
|
||||
.section-card.data-v-b95d4ca2 {
|
||||
background: #fff;
|
||||
border-radius: 16rpx;
|
||||
padding: 28rpx;
|
||||
margin-bottom: 20rpx;
|
||||
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.04);
|
||||
}
|
||||
.section-title.data-v-b95d4ca2 {
|
||||
font-size: 30rpx;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
margin-bottom: 20rpx;
|
||||
padding-left: 16rpx;
|
||||
border-left: 6rpx solid #2667E9;
|
||||
}
|
||||
.item-count.data-v-b95d4ca2 {
|
||||
font-size: 26rpx;
|
||||
font-weight: 400;
|
||||
color: #999;
|
||||
}
|
||||
.info-row.data-v-b95d4ca2 {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
padding: 18rpx 0;
|
||||
border-bottom: 1rpx solid #f0f0f0;
|
||||
}
|
||||
.info-row.data-v-b95d4ca2:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
.info-row.column.data-v-b95d4ca2 {
|
||||
flex-direction: column;
|
||||
}
|
||||
.info-label.data-v-b95d4ca2 {
|
||||
width: 180rpx;
|
||||
flex-shrink: 0;
|
||||
font-size: 26rpx;
|
||||
color: #999;
|
||||
line-height: 1.5;
|
||||
}
|
||||
.info-value.data-v-b95d4ca2 {
|
||||
flex: 1;
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
line-height: 1.5;
|
||||
word-break: break-all;
|
||||
}
|
||||
.info-block.data-v-b95d4ca2 {
|
||||
width: 100%;
|
||||
margin-top: 12rpx;
|
||||
padding: 20rpx;
|
||||
background: #f8f9fb;
|
||||
border: 1rpx solid #ebeef5;
|
||||
border-radius: 8rpx;
|
||||
font-size: 28rpx;
|
||||
color: #606266;
|
||||
line-height: 1.6;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.info-empty.data-v-b95d4ca2 {
|
||||
color: #c0c4cc;
|
||||
}
|
||||
.related-box.data-v-b95d4ca2 {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: 12rpx;
|
||||
padding: 20rpx;
|
||||
background: #f8f9fb;
|
||||
border: 1rpx solid #ebeef5;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
.related-icon.data-v-b95d4ca2 {
|
||||
flex-shrink: 0;
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
margin-top: 4rpx;
|
||||
}
|
||||
.related-text.data-v-b95d4ca2 {
|
||||
flex: 1;
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
line-height: 1.5;
|
||||
word-break: break-all;
|
||||
}
|
||||
.empty-block.data-v-b95d4ca2 {
|
||||
text-align: center;
|
||||
padding: 40rpx 0;
|
||||
font-size: 26rpx;
|
||||
color: #999;
|
||||
}
|
||||
.item-list.data-v-b95d4ca2 {
|
||||
border-top: 1rpx solid #f0f0f0;
|
||||
}
|
||||
.item-row.data-v-b95d4ca2 {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: 16rpx;
|
||||
padding: 24rpx 0;
|
||||
border-bottom: 1rpx solid #f0f0f0;
|
||||
}
|
||||
.item-row.data-v-b95d4ca2:last-child {
|
||||
border-bottom: none;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
.item-no.data-v-b95d4ca2 {
|
||||
width: 36rpx;
|
||||
font-size: 26rpx;
|
||||
color: #999;
|
||||
line-height: 1.5;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.item-content.data-v-b95d4ca2 {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
.item-name.data-v-b95d4ca2 {
|
||||
display: block;
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
line-height: 1.5;
|
||||
word-break: break-all;
|
||||
}
|
||||
.item-industry.data-v-b95d4ca2 {
|
||||
display: inline-block;
|
||||
margin-top: 8rpx;
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
}
|
||||
Reference in New Issue
Block a user