交办时间年月日,整改时回显整改人
This commit is contained in:
1
unpackage/dist/dev/mp-weixin/app.js
vendored
1
unpackage/dist/dev/mp-weixin/app.js
vendored
@@ -13,6 +13,7 @@ if (!Math) {
|
||||
"./pages/corporateInformation/corporateInformation.js";
|
||||
"./pages/editcompanInformation/editcompanInformation.js";
|
||||
"./pages/checklist/checklist.js";
|
||||
"./pages/checklist/detail.js";
|
||||
"./pages/editchecklist/editchecklist.js";
|
||||
"./pages/Inspectionlog/Inspectionlog.js";
|
||||
"./pages/Inspectionchecklist/Inspectionchecklist.js";
|
||||
|
||||
1
unpackage/dist/dev/mp-weixin/app.json
vendored
1
unpackage/dist/dev/mp-weixin/app.json
vendored
@@ -10,6 +10,7 @@
|
||||
"pages/corporateInformation/corporateInformation",
|
||||
"pages/editcompanInformation/editcompanInformation",
|
||||
"pages/checklist/checklist",
|
||||
"pages/checklist/detail",
|
||||
"pages/editchecklist/editchecklist",
|
||||
"pages/Inspectionlog/Inspectionlog",
|
||||
"pages/Inspectionchecklist/Inspectionchecklist",
|
||||
|
||||
20
unpackage/dist/dev/mp-weixin/common/assets.js
vendored
20
unpackage/dist/dev/mp-weixin/common/assets.js
vendored
@@ -1,5 +1,6 @@
|
||||
"use strict";
|
||||
const _imports_0$7 = "/static/home_icon/jianbianbeijing.png";
|
||||
const _imports_0$8 = "/static/home_icon/jianbianbeijing.png";
|
||||
const _imports_0$7 = "/static/jianchabiao/biaodan.svg";
|
||||
const _imports_0$6 = "/static/yinhuan_detail/status.png";
|
||||
const _imports_1$4 = "/static/yinhuan_detail/date.png";
|
||||
const _imports_0$5 = "/static/yujin/yujin_sousuo.png";
|
||||
@@ -13,14 +14,15 @@ const _imports_0$2 = "/static/index/index_bg.png";
|
||||
const _imports_0$1 = "/static/index/phone.png";
|
||||
const _imports_1 = "/static/index/lock.png";
|
||||
const _imports_0 = "/static/index/蒙版组 260.png";
|
||||
exports._imports_0 = _imports_0$7;
|
||||
exports._imports_0$1 = _imports_0$6;
|
||||
exports._imports_0$2 = _imports_0$5;
|
||||
exports._imports_0$3 = _imports_0$4;
|
||||
exports._imports_0$4 = _imports_0$3;
|
||||
exports._imports_0$5 = _imports_0$2;
|
||||
exports._imports_0$6 = _imports_0$1;
|
||||
exports._imports_0$7 = _imports_0;
|
||||
exports._imports_0 = _imports_0$8;
|
||||
exports._imports_0$1 = _imports_0$7;
|
||||
exports._imports_0$2 = _imports_0$6;
|
||||
exports._imports_0$3 = _imports_0$5;
|
||||
exports._imports_0$4 = _imports_0$4;
|
||||
exports._imports_0$5 = _imports_0$3;
|
||||
exports._imports_0$6 = _imports_0$2;
|
||||
exports._imports_0$7 = _imports_0$1;
|
||||
exports._imports_0$8 = _imports_0;
|
||||
exports._imports_1 = _imports_1$4;
|
||||
exports._imports_1$1 = _imports_1$3;
|
||||
exports._imports_1$2 = _imports_1$2;
|
||||
|
||||
@@ -7139,9 +7139,9 @@ function isConsoleWritable() {
|
||||
return isWritable;
|
||||
}
|
||||
function initRuntimeSocketService() {
|
||||
const hosts = "192.168.1.144,127.0.0.1,172.22.80.1";
|
||||
const hosts = "172.22.80.1,192.168.1.144,127.0.0.1";
|
||||
const port = "8090";
|
||||
const id = "mp-weixin_VsFItf";
|
||||
const id = "mp-weixin_VwRpzI";
|
||||
const lazy = typeof swan !== "undefined";
|
||||
let restoreError = lazy ? () => {
|
||||
} : initOnError();
|
||||
|
||||
@@ -158,7 +158,7 @@ const _sfc_main = {
|
||||
});
|
||||
return (_ctx, _cache) => {
|
||||
return common_vendor.e({
|
||||
a: common_assets._imports_0$2,
|
||||
a: common_assets._imports_0$3,
|
||||
b: common_vendor.t(searchForm.startDate || "请选择"),
|
||||
c: common_vendor.n(searchForm.startDate ? "date-value" : "date-placeholder"),
|
||||
d: common_vendor.o(($event) => showStartDatePicker.value = true),
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
@@ -32,28 +32,113 @@ const _sfc_main = {
|
||||
modeName: "",
|
||||
selectDeptId: "",
|
||||
selectDeptName: "",
|
||||
executorIds: [],
|
||||
// 执行人员ID数组
|
||||
executorId: "",
|
||||
executorNames: "",
|
||||
// 执行人员名称(显示用)
|
||||
cycleId: "",
|
||||
cycleName: "",
|
||||
isWeekend: 1,
|
||||
startDate: "",
|
||||
endDate: ""
|
||||
});
|
||||
const workdaySwitch = common_vendor.ref(false);
|
||||
const onSwitchChange = (e) => {
|
||||
workdaySwitch.value = e.detail.value;
|
||||
};
|
||||
const getTodayTimestamp = () => {
|
||||
const now = /* @__PURE__ */ new Date();
|
||||
return new Date(now.getFullYear(), now.getMonth(), now.getDate()).getTime();
|
||||
};
|
||||
const formatDate = (timestamp) => {
|
||||
const date = new Date(timestamp);
|
||||
const year = date.getFullYear();
|
||||
const month = String(date.getMonth() + 1).padStart(2, "0");
|
||||
const day = String(date.getDate()).padStart(2, "0");
|
||||
return `${year}-${month}-${day}`;
|
||||
};
|
||||
const handleTree = (data, id = "deptId", parentId = "parentId", children = "children") => {
|
||||
const childrenListMap = {};
|
||||
const tree = [];
|
||||
data.forEach((item) => {
|
||||
childrenListMap[item[id]] = { ...item, [children]: item[children] || [] };
|
||||
});
|
||||
data.forEach((item) => {
|
||||
const node = childrenListMap[item[id]];
|
||||
const parentObj = childrenListMap[item[parentId]];
|
||||
if (!parentObj) {
|
||||
tree.push(node);
|
||||
} else {
|
||||
parentObj[children].push(node);
|
||||
}
|
||||
});
|
||||
return tree;
|
||||
};
|
||||
const isWeekendDate = (date) => {
|
||||
const day = date.getDay();
|
||||
return day === 0 || day === 6;
|
||||
};
|
||||
const isWeekendDateString = (dateStr) => {
|
||||
if (!dateStr)
|
||||
return false;
|
||||
const [year, month, day] = String(dateStr).split(" ")[0].split("-").map(Number);
|
||||
return isWeekendDate(new Date(year, month - 1, day));
|
||||
};
|
||||
const isDateDisabled = (dateStr) => {
|
||||
const todayStr = formatDate(getTodayTimestamp());
|
||||
if (dateStr < todayStr)
|
||||
return true;
|
||||
if (Number(formData.isWeekend) === 2 && isWeekendDateString(dateStr))
|
||||
return true;
|
||||
return false;
|
||||
};
|
||||
const setIsWeekend = (value) => {
|
||||
formData.isWeekend = value;
|
||||
if (Number(value) === 2) {
|
||||
if (isWeekendDateString(formData.startDate)) {
|
||||
formData.startDate = "";
|
||||
}
|
||||
if (isWeekendDateString(formData.endDate)) {
|
||||
formData.endDate = "";
|
||||
}
|
||||
}
|
||||
};
|
||||
const startPickerContext = common_vendor.ref(getTodayTimestamp());
|
||||
const endPickerContext = common_vendor.ref(getTodayTimestamp());
|
||||
const buildWeekendDayFilter = (contextRef) => {
|
||||
return (type, values) => {
|
||||
if (Number(formData.isWeekend) !== 2 || type !== "day") {
|
||||
return values;
|
||||
}
|
||||
const current = new Date(contextRef.value);
|
||||
const year = current.getFullYear();
|
||||
const month = current.getMonth();
|
||||
const filtered = values.filter((dayStr) => {
|
||||
const date = new Date(year, month, Number(dayStr));
|
||||
return !isWeekendDate(date);
|
||||
});
|
||||
return filtered.length > 0 ? filtered : values;
|
||||
};
|
||||
};
|
||||
const startDateFilter = common_vendor.computed(() => {
|
||||
return Number(formData.isWeekend) === 2 ? buildWeekendDayFilter(startPickerContext) : null;
|
||||
});
|
||||
const endDateFilter = common_vendor.computed(() => {
|
||||
return Number(formData.isWeekend) === 2 ? buildWeekendDayFilter(endPickerContext) : null;
|
||||
});
|
||||
const getNextAvailableTimestamp = (timestamp, minTimestamp = getTodayTimestamp()) => {
|
||||
let date = new Date(Math.max(timestamp, minTimestamp));
|
||||
let guard = 0;
|
||||
while (guard < 366) {
|
||||
const isPast = date.getTime() < minTimestamp;
|
||||
const isWeekendBlocked = Number(formData.isWeekend) === 2 && isWeekendDate(date);
|
||||
if (!isPast && !isWeekendBlocked) {
|
||||
return date.getTime();
|
||||
}
|
||||
date.setDate(date.getDate() + 1);
|
||||
guard++;
|
||||
}
|
||||
return date.getTime();
|
||||
};
|
||||
const todayMinDate = common_vendor.computed(() => getTodayTimestamp());
|
||||
const endDateMinDate = common_vendor.computed(() => {
|
||||
if (formData.startDate) {
|
||||
const [year, month, day] = formData.startDate.split("-").map(Number);
|
||||
return new Date(year, month - 1, day).getTime();
|
||||
return new Date(year, month - 1, day + 1).getTime();
|
||||
}
|
||||
return getTodayTimestamp();
|
||||
});
|
||||
@@ -68,20 +153,22 @@ const _sfc_main = {
|
||||
const showEndDatePicker = common_vendor.ref(false);
|
||||
common_vendor.ref([["湘西自治州和谐网络科技有限公司", "湘西自治州和谐云大数据科技有限公司", "湘西网络有限公司"]]);
|
||||
const typeColumns = common_vendor.ref([["日常检查", "专项检查", "设备检查"]]);
|
||||
const modeColumns = common_vendor.ref([["全员", "指定人员"]]);
|
||||
const modeColumns = common_vendor.ref([["单人完成", "全员"]]);
|
||||
const cycleColumns = common_vendor.ref([["每天一次", "每周一次", "每月一次", "每季度一次"]]);
|
||||
const showExecutorPopup = common_vendor.ref(false);
|
||||
const executorList = common_vendor.ref([]);
|
||||
const selectedExecutorIds = common_vendor.ref([]);
|
||||
const selectedExecutorId = common_vendor.ref(null);
|
||||
const deptTree = common_vendor.ref([]);
|
||||
const deptCascaderColumns = common_vendor.ref([]);
|
||||
const deptCascaderIndexs = common_vendor.ref([0]);
|
||||
const selectedDeptPath = common_vendor.ref([]);
|
||||
const onDeptConfirm = (e) => {
|
||||
const onDeptConfirm = () => {
|
||||
const lastSelected = selectedDeptPath.value[selectedDeptPath.value.length - 1];
|
||||
if (lastSelected) {
|
||||
formData.deptId = lastSelected.deptId;
|
||||
formData.deptName = selectedDeptPath.value.map((d) => d.deptName).join(" / ");
|
||||
clearExecutorSelection();
|
||||
fetchDeptUsers(lastSelected.deptId);
|
||||
}
|
||||
showDeptPicker.value = false;
|
||||
};
|
||||
@@ -101,75 +188,84 @@ const _sfc_main = {
|
||||
if (e.value && e.value.length > 0) {
|
||||
formData.modeName = e.value[0];
|
||||
if (e.value[0] === "全员") {
|
||||
formData.executorIds = [];
|
||||
formData.executorNames = "";
|
||||
selectedExecutorIds.value = [];
|
||||
clearExecutorSelection();
|
||||
}
|
||||
}
|
||||
showModePicker.value = false;
|
||||
};
|
||||
const fetchDeptUsers = async () => {
|
||||
const clearExecutorSelection = () => {
|
||||
formData.executorId = "";
|
||||
formData.executorNames = "";
|
||||
selectedExecutorId.value = null;
|
||||
};
|
||||
const fetchDeptUsers = async (deptId) => {
|
||||
if (!deptId) {
|
||||
executorList.value = [];
|
||||
return;
|
||||
}
|
||||
try {
|
||||
const res = await request_api.getDeptUsers();
|
||||
const res = await request_api.getDeptUsers(deptId);
|
||||
if (res.code === 0 && res.data) {
|
||||
executorList.value = res.data || [];
|
||||
} else {
|
||||
executorList.value = [];
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at pages/editchecklist/editchecklist.vue:522", "获取部门用户失败:", error);
|
||||
common_vendor.index.__f__("error", "at pages/editchecklist/editchecklist.vue:641", "获取部门用户失败:", error);
|
||||
executorList.value = [];
|
||||
}
|
||||
};
|
||||
const toggleExecutorSelect = (item) => {
|
||||
const index = selectedExecutorIds.value.indexOf(item.userId);
|
||||
if (index > -1) {
|
||||
selectedExecutorIds.value.splice(index, 1);
|
||||
} else {
|
||||
selectedExecutorIds.value.push(item.userId);
|
||||
}
|
||||
const selectExecutor = (item) => {
|
||||
selectedExecutorId.value = item.userId;
|
||||
};
|
||||
const confirmExecutorSelect = () => {
|
||||
formData.executorIds = [...selectedExecutorIds.value];
|
||||
const selectedUsers = executorList.value.filter((u) => selectedExecutorIds.value.includes(u.userId));
|
||||
formData.executorNames = selectedUsers.map((u) => u.nickName).join("、");
|
||||
if (!selectedExecutorId.value) {
|
||||
common_vendor.index.showToast({ title: "请选择执行人员", icon: "none" });
|
||||
return;
|
||||
}
|
||||
const selectedUser = executorList.value.find((u) => u.userId === selectedExecutorId.value);
|
||||
formData.executorId = selectedExecutorId.value;
|
||||
formData.executorNames = (selectedUser == null ? void 0 : selectedUser.nickName) || (selectedUser == null ? void 0 : selectedUser.nickname) || "";
|
||||
showExecutorPopup.value = false;
|
||||
};
|
||||
const openExecutorPopup = () => {
|
||||
selectedExecutorIds.value = [...formData.executorIds];
|
||||
if (!formData.deptId) {
|
||||
common_vendor.index.showToast({ title: "请先选择分派单位", icon: "none" });
|
||||
return;
|
||||
}
|
||||
selectedExecutorId.value = formData.executorId || null;
|
||||
fetchDeptUsers(formData.deptId);
|
||||
showExecutorPopup.value = true;
|
||||
};
|
||||
const fetchParentDepts = async () => {
|
||||
const fetchDeptChildren = async () => {
|
||||
try {
|
||||
const res = await request_api.getParentDepts();
|
||||
const res = await request_api.getDeptChildren();
|
||||
if (res.code === 0 && res.data) {
|
||||
deptTree.value = res.data;
|
||||
initDeptCascader(res.data);
|
||||
const list = Array.isArray(res.data) ? res.data : [];
|
||||
deptTree.value = handleTree(list, "deptId");
|
||||
initDeptCascader(deptTree.value);
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at pages/editchecklist/editchecklist.vue:560", "获取部门树失败:", error);
|
||||
common_vendor.index.__f__("error", "at pages/editchecklist/editchecklist.vue:680", "获取部门树失败:", error);
|
||||
}
|
||||
};
|
||||
const initDeptCascader = (data) => {
|
||||
if (!data)
|
||||
const initDeptCascader = (treeData) => {
|
||||
const roots = Array.isArray(treeData) ? treeData : treeData ? [treeData] : [];
|
||||
if (roots.length === 0)
|
||||
return;
|
||||
const firstColumn = buildDeptColumn(data);
|
||||
const firstColumn = roots.map((item) => ({ text: item.deptName, ...item }));
|
||||
deptCascaderColumns.value = [firstColumn];
|
||||
deptCascaderIndexs.value = [0];
|
||||
selectedDeptPath.value = [data];
|
||||
if (data.children && data.children.length > 0) {
|
||||
const secondColumn = data.children.map((item) => ({ text: item.deptName, ...item }));
|
||||
deptCascaderColumns.value.push(secondColumn);
|
||||
selectedDeptPath.value = [roots[0]];
|
||||
let current = roots[0];
|
||||
while (current.children && current.children.length > 0) {
|
||||
const nextColumn = current.children.map((item) => ({ text: item.deptName, ...item }));
|
||||
deptCascaderColumns.value.push(nextColumn);
|
||||
deptCascaderIndexs.value.push(0);
|
||||
selectedDeptPath.value.push(data.children[0]);
|
||||
if (data.children[0].children && data.children[0].children.length > 0) {
|
||||
const thirdColumn = data.children[0].children.map((item) => ({ text: item.deptName, ...item }));
|
||||
deptCascaderColumns.value.push(thirdColumn);
|
||||
deptCascaderIndexs.value.push(0);
|
||||
selectedDeptPath.value.push(data.children[0].children[0]);
|
||||
}
|
||||
selectedDeptPath.value.push(current.children[0]);
|
||||
current = current.children[0];
|
||||
}
|
||||
};
|
||||
const buildDeptColumn = (data) => {
|
||||
return [{ text: data.deptName, ...data }];
|
||||
};
|
||||
const onDeptCascaderChange = (e) => {
|
||||
const { columnIndex, index, value } = e;
|
||||
deptCascaderIndexs.value[columnIndex] = index;
|
||||
@@ -196,13 +292,6 @@ const _sfc_main = {
|
||||
}
|
||||
showCyclePicker.value = false;
|
||||
};
|
||||
const formatDate = (timestamp) => {
|
||||
const date = new Date(timestamp);
|
||||
const year = date.getFullYear();
|
||||
const month = String(date.getMonth() + 1).padStart(2, "0");
|
||||
const day = String(date.getDate()).padStart(2, "0");
|
||||
return `${year}-${month}-${day}`;
|
||||
};
|
||||
const parseDateValue = (dateStr) => {
|
||||
if (!dateStr)
|
||||
return 0;
|
||||
@@ -211,37 +300,56 @@ const _sfc_main = {
|
||||
return new Date(year, month - 1, day).getTime();
|
||||
};
|
||||
const openStartDatePicker = () => {
|
||||
const today = getTodayTimestamp();
|
||||
if (startDateValue.value < today) {
|
||||
startDateValue.value = today;
|
||||
}
|
||||
const candidate = formData.startDate ? parseDateValue(formData.startDate) : getTodayTimestamp();
|
||||
startDateValue.value = getNextAvailableTimestamp(candidate);
|
||||
startPickerContext.value = startDateValue.value;
|
||||
showStartDatePicker.value = true;
|
||||
};
|
||||
const openEndDatePicker = () => {
|
||||
const minDate = endDateMinDate.value;
|
||||
if (endDateValue.value < minDate) {
|
||||
endDateValue.value = minDate;
|
||||
if (!formData.startDate) {
|
||||
common_vendor.index.showToast({ title: "请先选择计划开始日期", icon: "none" });
|
||||
return;
|
||||
}
|
||||
const minDate = endDateMinDate.value;
|
||||
const candidate = formData.endDate ? parseDateValue(formData.endDate) : minDate;
|
||||
endDateValue.value = getNextAvailableTimestamp(candidate, minDate);
|
||||
endPickerContext.value = endDateValue.value;
|
||||
showEndDatePicker.value = true;
|
||||
};
|
||||
const onStartDatePickerChange = (e) => {
|
||||
startPickerContext.value = e.value;
|
||||
startDateValue.value = e.value;
|
||||
};
|
||||
const onEndDatePickerChange = (e) => {
|
||||
endPickerContext.value = e.value;
|
||||
endDateValue.value = e.value;
|
||||
};
|
||||
const onStartDateConfirm = (e) => {
|
||||
const selectedDate = formatDate(e.value);
|
||||
const todayStr = formatDate(getTodayTimestamp());
|
||||
if (selectedDate < todayStr) {
|
||||
common_vendor.index.showToast({ title: "开始时间不能早于今天", icon: "none" });
|
||||
if (isDateDisabled(selectedDate)) {
|
||||
common_vendor.index.showToast({
|
||||
title: Number(formData.isWeekend) === 2 ? "不能选择周末或今天之前的日期" : "开始日期不能早于今天",
|
||||
icon: "none"
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (formData.endDate && parseDateValue(selectedDate) > parseDateValue(formData.endDate)) {
|
||||
common_vendor.index.showToast({ title: "开始时间不能晚于结束时间", icon: "none" });
|
||||
return;
|
||||
if (formData.endDate && parseDateValue(selectedDate) >= parseDateValue(formData.endDate)) {
|
||||
formData.endDate = "";
|
||||
}
|
||||
formData.startDate = selectedDate;
|
||||
showStartDatePicker.value = false;
|
||||
};
|
||||
const onEndDateConfirm = (e) => {
|
||||
const selectedDate = formatDate(e.value);
|
||||
if (formData.startDate && parseDateValue(selectedDate) < parseDateValue(formData.startDate)) {
|
||||
common_vendor.index.showToast({ title: "结束时间不能早于开始时间", icon: "none" });
|
||||
if (isDateDisabled(selectedDate)) {
|
||||
common_vendor.index.showToast({
|
||||
title: Number(formData.isWeekend) === 2 ? "不能选择周末或今天之前的日期" : "结束日期不能早于今天",
|
||||
icon: "none"
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (formData.startDate && parseDateValue(selectedDate) <= parseDateValue(formData.startDate)) {
|
||||
common_vendor.index.showToast({ title: "计划结束日期必须晚于计划开始日期", icon: "none" });
|
||||
return;
|
||||
}
|
||||
formData.endDate = selectedDate;
|
||||
@@ -284,7 +392,7 @@ const _sfc_main = {
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.hideLoading();
|
||||
common_vendor.index.__f__("error", "at pages/editchecklist/editchecklist.vue:740", "删除检查项失败:", error);
|
||||
common_vendor.index.__f__("error", "at pages/editchecklist/editchecklist.vue:867", "删除检查项失败:", error);
|
||||
common_vendor.index.showToast({ title: "删除失败", icon: "none" });
|
||||
}
|
||||
} else {
|
||||
@@ -360,7 +468,7 @@ const _sfc_main = {
|
||||
hasMoreLaw.value = lawList.value.length < total;
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at pages/editchecklist/editchecklist.vue:827", "获取法规列表失败:", error);
|
||||
common_vendor.index.__f__("error", "at pages/editchecklist/editchecklist.vue:954", "获取法规列表失败:", error);
|
||||
} finally {
|
||||
lawLoading.value = false;
|
||||
}
|
||||
@@ -440,7 +548,7 @@ const _sfc_main = {
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.hideLoading();
|
||||
common_vendor.index.__f__("error", "at pages/editchecklist/editchecklist.vue:927", "添加检查项失败:", error);
|
||||
common_vendor.index.__f__("error", "at pages/editchecklist/editchecklist.vue:1054", "添加检查项失败:", error);
|
||||
common_vendor.index.showToast({ title: "添加失败", icon: "none" });
|
||||
}
|
||||
};
|
||||
@@ -489,7 +597,7 @@ const _sfc_main = {
|
||||
hasMoreLibrary.value = libraryList.value.length < total;
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at pages/editchecklist/editchecklist.vue:987", "获取检查库列表失败:", error);
|
||||
common_vendor.index.__f__("error", "at pages/editchecklist/editchecklist.vue:1114", "获取检查库列表失败:", error);
|
||||
} finally {
|
||||
libraryLoading.value = false;
|
||||
}
|
||||
@@ -592,7 +700,7 @@ const _sfc_main = {
|
||||
selectedLibraries.value = [];
|
||||
} catch (error) {
|
||||
common_vendor.index.hideLoading();
|
||||
common_vendor.index.__f__("error", "at pages/editchecklist/editchecklist.vue:1107", "获取检查库详情失败:", error);
|
||||
common_vendor.index.__f__("error", "at pages/editchecklist/editchecklist.vue:1234", "获取检查库详情失败:", error);
|
||||
common_vendor.index.showToast({ title: "添加失败", icon: "none" });
|
||||
}
|
||||
};
|
||||
@@ -610,10 +718,10 @@ const _sfc_main = {
|
||||
return;
|
||||
}
|
||||
if (!formData.modeName) {
|
||||
common_vendor.index.showToast({ title: "请选择运行模式", icon: "none" });
|
||||
common_vendor.index.showToast({ title: "请选择模式", icon: "none" });
|
||||
return;
|
||||
}
|
||||
if (formData.modeName === "指定人员" && formData.executorIds.length === 0) {
|
||||
if (formData.modeName === "单人完成" && !formData.executorId) {
|
||||
common_vendor.index.showToast({ title: "请选择执行人员", icon: "none" });
|
||||
return;
|
||||
}
|
||||
@@ -622,11 +730,11 @@ const _sfc_main = {
|
||||
return;
|
||||
}
|
||||
if (!formData.startDate || !formData.endDate) {
|
||||
common_vendor.index.showToast({ title: "请选择计划时间", icon: "none" });
|
||||
common_vendor.index.showToast({ title: "请选择计划日期", icon: "none" });
|
||||
return;
|
||||
}
|
||||
if (parseDateValue(formData.endDate) < parseDateValue(formData.startDate)) {
|
||||
common_vendor.index.showToast({ title: "结束时间不能早于开始时间", icon: "none" });
|
||||
if (parseDateValue(formData.endDate) <= parseDateValue(formData.startDate)) {
|
||||
common_vendor.index.showToast({ title: "计划结束日期必须晚于计划开始日期", icon: "none" });
|
||||
return;
|
||||
}
|
||||
const items = [];
|
||||
@@ -645,7 +753,7 @@ const _sfc_main = {
|
||||
return;
|
||||
}
|
||||
const runModeMap = {
|
||||
"指定人员": 1,
|
||||
"单人完成": 1,
|
||||
"全员": 2
|
||||
};
|
||||
const cycleMap = {
|
||||
@@ -668,12 +776,12 @@ const _sfc_main = {
|
||||
itemIds,
|
||||
// 从检查库选择的库id数组
|
||||
cycle: cycleMap[formData.cycleName] || 1,
|
||||
isWeekend: workdaySwitch.value ? 1 : 2,
|
||||
isWeekend: formData.isWeekend,
|
||||
planStartTime: `${formData.startDate} 00:00:00`,
|
||||
planEndTime: `${formData.endDate} 23:59:59`
|
||||
planEndTime: `${formData.endDate} 00:00:00`
|
||||
};
|
||||
if (formData.modeName === "指定人员" && formData.executorIds.length > 0) {
|
||||
params.executorId = formData.executorIds[0];
|
||||
if (formData.modeName === "单人完成" && formData.executorId) {
|
||||
params.executorId = formData.executorId;
|
||||
}
|
||||
try {
|
||||
common_vendor.index.showLoading({ title: "保存中..." });
|
||||
@@ -689,13 +797,12 @@ const _sfc_main = {
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.hideLoading();
|
||||
common_vendor.index.__f__("error", "at pages/editchecklist/editchecklist.vue:1225", "保存失败:", error);
|
||||
common_vendor.index.__f__("error", "at pages/editchecklist/editchecklist.vue:1349", "保存失败:", error);
|
||||
common_vendor.index.showToast({ title: "保存失败", icon: "none" });
|
||||
}
|
||||
};
|
||||
common_vendor.onMounted(() => {
|
||||
fetchDeptUsers();
|
||||
fetchParentDepts();
|
||||
fetchDeptChildren();
|
||||
});
|
||||
return (_ctx, _cache) => {
|
||||
return common_vendor.e({
|
||||
@@ -732,7 +839,7 @@ const _sfc_main = {
|
||||
show: showTypePicker.value,
|
||||
columns: typeColumns.value
|
||||
}),
|
||||
t: common_vendor.t(formData.modeName || "请选择运行模式"),
|
||||
t: common_vendor.t(formData.modeName || "请选择模式"),
|
||||
v: common_vendor.n(formData.modeName ? "picker-value" : "picker-placeholder"),
|
||||
w: common_vendor.o(($event) => showModePicker.value = true),
|
||||
x: common_vendor.o(onModeConfirm),
|
||||
@@ -742,9 +849,9 @@ const _sfc_main = {
|
||||
show: showModePicker.value,
|
||||
columns: modeColumns.value
|
||||
}),
|
||||
B: formData.modeName === "指定人员"
|
||||
}, formData.modeName === "指定人员" ? {
|
||||
C: common_vendor.t(formData.executorNames || "请选择执行人员"),
|
||||
B: formData.modeName === "单人完成"
|
||||
}, formData.modeName === "单人完成" ? {
|
||||
C: common_vendor.t(formData.executorNames || (formData.deptId ? "请选择执行人员" : "请先选择分派单位")),
|
||||
D: common_vendor.n(formData.executorNames ? "picker-value" : "picker-placeholder"),
|
||||
E: common_vendor.o(openExecutorPopup)
|
||||
} : {}, {
|
||||
@@ -758,38 +865,44 @@ const _sfc_main = {
|
||||
show: showCyclePicker.value,
|
||||
columns: cycleColumns.value
|
||||
}),
|
||||
M: workdaySwitch.value,
|
||||
N: common_vendor.o(onSwitchChange),
|
||||
O: common_vendor.t(formData.startDate || "请选择开始时间"),
|
||||
P: common_vendor.n(formData.startDate ? "picker-value" : "picker-placeholder"),
|
||||
Q: common_vendor.o(openStartDatePicker),
|
||||
R: common_vendor.o(onStartDateConfirm),
|
||||
S: common_vendor.o(($event) => showStartDatePicker.value = false),
|
||||
T: common_vendor.o(($event) => showStartDatePicker.value = false),
|
||||
U: common_vendor.o(($event) => startDateValue.value = $event),
|
||||
V: common_vendor.p({
|
||||
M: formData.isWeekend === 1 ? 1 : "",
|
||||
N: common_vendor.o(($event) => setIsWeekend(1)),
|
||||
O: formData.isWeekend === 2 ? 1 : "",
|
||||
P: common_vendor.o(($event) => setIsWeekend(2)),
|
||||
Q: common_vendor.t(formData.startDate || "请选择计划开始日期"),
|
||||
R: common_vendor.n(formData.startDate ? "picker-value" : "picker-placeholder"),
|
||||
S: common_vendor.o(openStartDatePicker),
|
||||
T: common_vendor.o(onStartDatePickerChange),
|
||||
U: common_vendor.o(onStartDateConfirm),
|
||||
V: common_vendor.o(($event) => showStartDatePicker.value = false),
|
||||
W: common_vendor.o(($event) => showStartDatePicker.value = false),
|
||||
X: common_vendor.o(($event) => startDateValue.value = $event),
|
||||
Y: common_vendor.p({
|
||||
show: showStartDatePicker.value,
|
||||
mode: "date",
|
||||
minDate: todayMinDate.value,
|
||||
filter: startDateFilter.value,
|
||||
modelValue: startDateValue.value
|
||||
}),
|
||||
W: common_vendor.t(formData.endDate || "请选择结束时间"),
|
||||
X: common_vendor.n(formData.endDate ? "picker-value" : "picker-placeholder"),
|
||||
Y: common_vendor.o(openEndDatePicker),
|
||||
Z: common_vendor.o(onEndDateConfirm),
|
||||
aa: common_vendor.o(($event) => showEndDatePicker.value = false),
|
||||
ab: common_vendor.o(($event) => showEndDatePicker.value = false),
|
||||
ac: common_vendor.o(($event) => endDateValue.value = $event),
|
||||
ad: common_vendor.p({
|
||||
Z: common_vendor.t(formData.endDate || "请选择计划结束日期"),
|
||||
aa: common_vendor.n(formData.endDate ? "picker-value" : "picker-placeholder"),
|
||||
ab: common_vendor.o(openEndDatePicker),
|
||||
ac: common_vendor.o(onEndDatePickerChange),
|
||||
ad: common_vendor.o(onEndDateConfirm),
|
||||
ae: common_vendor.o(($event) => showEndDatePicker.value = false),
|
||||
af: common_vendor.o(($event) => showEndDatePicker.value = false),
|
||||
ag: common_vendor.o(($event) => endDateValue.value = $event),
|
||||
ah: common_vendor.p({
|
||||
show: showEndDatePicker.value,
|
||||
mode: "date",
|
||||
minDate: endDateMinDate.value,
|
||||
filter: endDateFilter.value,
|
||||
modelValue: endDateValue.value
|
||||
}),
|
||||
ae: common_vendor.t(checkItemCount.value),
|
||||
af: checkItemCount.value === 0
|
||||
ai: common_vendor.t(checkItemCount.value),
|
||||
aj: checkItemCount.value === 0
|
||||
}, checkItemCount.value === 0 ? {} : {}, {
|
||||
ag: common_vendor.f(manualCheckItems.value, (item, index, i0) => {
|
||||
ak: common_vendor.f(manualCheckItems.value, (item, index, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(index + 1),
|
||||
b: common_vendor.t(item.name),
|
||||
@@ -799,7 +912,7 @@ const _sfc_main = {
|
||||
f: "manual-" + index
|
||||
};
|
||||
}),
|
||||
ah: common_vendor.f(libraryCheckItems.value, (item, index, i0) => {
|
||||
al: common_vendor.f(libraryCheckItems.value, (item, index, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item.sourceLibraryName || "-"),
|
||||
b: common_vendor.t(item.name),
|
||||
@@ -809,41 +922,41 @@ const _sfc_main = {
|
||||
f: "lib-" + item.pointId
|
||||
};
|
||||
}),
|
||||
ai: common_vendor.o(($event) => showAddPopup.value = true),
|
||||
aj: common_vendor.o(openLibraryPopup),
|
||||
ak: common_vendor.o(handleSave),
|
||||
al: common_vendor.o(($event) => showAddPopup.value = false),
|
||||
am: common_vendor.o(($event) => checkForm.name = $event),
|
||||
an: common_vendor.p({
|
||||
am: common_vendor.o(($event) => showAddPopup.value = true),
|
||||
an: common_vendor.o(openLibraryPopup),
|
||||
ao: common_vendor.o(handleSave),
|
||||
ap: common_vendor.o(($event) => showAddPopup.value = false),
|
||||
aq: common_vendor.o(($event) => checkForm.name = $event),
|
||||
ar: common_vendor.p({
|
||||
placeholder: "请输入检查名称",
|
||||
border: "surround",
|
||||
modelValue: checkForm.name
|
||||
}),
|
||||
ao: common_vendor.o(($event) => checkForm.point = $event),
|
||||
ap: common_vendor.p({
|
||||
as: common_vendor.o(($event) => checkForm.point = $event),
|
||||
at: common_vendor.p({
|
||||
placeholder: "请输入检查内容",
|
||||
height: 150,
|
||||
modelValue: checkForm.point
|
||||
}),
|
||||
aq: common_vendor.t(checkForm.regulationName || "选择法规"),
|
||||
ar: common_vendor.n(checkForm.regulationName ? "" : "text-gray"),
|
||||
as: common_vendor.o(openLawPopup),
|
||||
at: common_vendor.o(($event) => showAddPopup.value = false),
|
||||
av: common_vendor.o(handleAddCheck),
|
||||
aw: common_vendor.o(($event) => showAddPopup.value = false),
|
||||
ax: common_vendor.p({
|
||||
av: common_vendor.t(checkForm.regulationName || "选择法规"),
|
||||
aw: common_vendor.n(checkForm.regulationName ? "" : "text-gray"),
|
||||
ax: common_vendor.o(openLawPopup),
|
||||
ay: common_vendor.o(($event) => showAddPopup.value = false),
|
||||
az: common_vendor.o(handleAddCheck),
|
||||
aA: common_vendor.o(($event) => showAddPopup.value = false),
|
||||
aB: common_vendor.p({
|
||||
show: showAddPopup.value,
|
||||
mode: "center",
|
||||
round: "20"
|
||||
}),
|
||||
ay: common_vendor.o(($event) => showLawPopup.value = false),
|
||||
az: common_vendor.o(searchRegulation),
|
||||
aA: lawKeyword.value,
|
||||
aB: common_vendor.o(($event) => lawKeyword.value = $event.detail.value),
|
||||
aC: common_vendor.o(searchRegulation),
|
||||
aD: lawLoading.value && lawList.value.length === 0
|
||||
aC: common_vendor.o(($event) => showLawPopup.value = false),
|
||||
aD: common_vendor.o(searchRegulation),
|
||||
aE: lawKeyword.value,
|
||||
aF: common_vendor.o(($event) => lawKeyword.value = $event.detail.value),
|
||||
aG: common_vendor.o(searchRegulation),
|
||||
aH: lawLoading.value && lawList.value.length === 0
|
||||
}, lawLoading.value && lawList.value.length === 0 ? {} : !lawLoading.value && lawList.value.length === 0 ? {} : common_vendor.e({
|
||||
aF: common_vendor.f(lawList.value, (item, k0, i0) => {
|
||||
aJ: common_vendor.f(lawList.value, (item, k0, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item.depict),
|
||||
b: common_vendor.t(item.legalBasis),
|
||||
@@ -852,26 +965,26 @@ const _sfc_main = {
|
||||
e: common_vendor.o(($event) => selectLaw(item), item.id)
|
||||
};
|
||||
}),
|
||||
aG: lawLoading.value
|
||||
aK: lawLoading.value
|
||||
}, lawLoading.value ? {} : {}), {
|
||||
aE: !lawLoading.value && lawList.value.length === 0,
|
||||
aH: common_vendor.o(loadMoreLaw),
|
||||
aI: common_vendor.o(($event) => showLawPopup.value = false),
|
||||
aJ: common_vendor.o(confirmLaw),
|
||||
aK: common_vendor.o(($event) => showLawPopup.value = false),
|
||||
aL: common_vendor.p({
|
||||
aI: !lawLoading.value && lawList.value.length === 0,
|
||||
aL: common_vendor.o(loadMoreLaw),
|
||||
aM: common_vendor.o(($event) => showLawPopup.value = false),
|
||||
aN: common_vendor.o(confirmLaw),
|
||||
aO: common_vendor.o(($event) => showLawPopup.value = false),
|
||||
aP: common_vendor.p({
|
||||
show: showLawPopup.value,
|
||||
mode: "center",
|
||||
round: "20"
|
||||
}),
|
||||
aM: common_vendor.o(closeLibraryPopup),
|
||||
aN: common_vendor.o(searchLibrary),
|
||||
aO: libraryKeyword.value,
|
||||
aP: common_vendor.o(($event) => libraryKeyword.value = $event.detail.value),
|
||||
aQ: common_vendor.o(searchLibrary),
|
||||
aR: libraryLoading.value && libraryList.value.length === 0
|
||||
aQ: common_vendor.o(closeLibraryPopup),
|
||||
aR: common_vendor.o(searchLibrary),
|
||||
aS: libraryKeyword.value,
|
||||
aT: common_vendor.o(($event) => libraryKeyword.value = $event.detail.value),
|
||||
aU: common_vendor.o(searchLibrary),
|
||||
aV: libraryLoading.value && libraryList.value.length === 0
|
||||
}, libraryLoading.value && libraryList.value.length === 0 ? {} : !libraryLoading.value && libraryList.value.length === 0 ? {} : common_vendor.e({
|
||||
aT: common_vendor.f(libraryList.value, (item, k0, i0) => {
|
||||
aX: common_vendor.f(libraryList.value, (item, k0, i0) => {
|
||||
return common_vendor.e({
|
||||
a: selectedLibraries.value.includes(item.id)
|
||||
}, selectedLibraries.value.includes(item.id) ? {} : {}, {
|
||||
@@ -882,40 +995,40 @@ const _sfc_main = {
|
||||
f: common_vendor.o(($event) => toggleLibrarySelect(item), item.id)
|
||||
});
|
||||
}),
|
||||
aU: libraryLoading.value
|
||||
aY: libraryLoading.value
|
||||
}, libraryLoading.value ? {} : {}), {
|
||||
aS: !libraryLoading.value && libraryList.value.length === 0,
|
||||
aV: common_vendor.o(loadMoreLibrary),
|
||||
aW: common_vendor.o(addSelectedLibrary),
|
||||
aX: common_vendor.o(closeLibraryPopup),
|
||||
aY: common_vendor.p({
|
||||
aW: !libraryLoading.value && libraryList.value.length === 0,
|
||||
aZ: common_vendor.o(loadMoreLibrary),
|
||||
ba: common_vendor.o(addSelectedLibrary),
|
||||
bb: common_vendor.o(closeLibraryPopup),
|
||||
bc: common_vendor.p({
|
||||
show: showLibraryPopup.value,
|
||||
mode: "center",
|
||||
round: "20"
|
||||
}),
|
||||
aZ: common_vendor.o(($event) => showExecutorPopup.value = false),
|
||||
ba: executorList.value.length === 0
|
||||
bd: common_vendor.o(($event) => showExecutorPopup.value = false),
|
||||
be: executorList.value.length === 0
|
||||
}, executorList.value.length === 0 ? {} : {
|
||||
bb: common_vendor.f(executorList.value, (item, k0, i0) => {
|
||||
bf: common_vendor.f(executorList.value, (item, k0, i0) => {
|
||||
return common_vendor.e({
|
||||
a: selectedExecutorIds.value.includes(item.userId)
|
||||
}, selectedExecutorIds.value.includes(item.userId) ? {} : {}, {
|
||||
b: selectedExecutorIds.value.includes(item.userId) ? 1 : "",
|
||||
a: selectedExecutorId.value === item.userId
|
||||
}, selectedExecutorId.value === item.userId ? {} : {}, {
|
||||
b: selectedExecutorId.value === item.userId ? 1 : "",
|
||||
c: common_vendor.t(item.nickName),
|
||||
d: item.userId,
|
||||
e: common_vendor.o(($event) => toggleExecutorSelect(item), item.userId)
|
||||
e: common_vendor.o(($event) => selectExecutor(item), item.userId)
|
||||
});
|
||||
})
|
||||
}, {
|
||||
bc: common_vendor.o(($event) => showExecutorPopup.value = false),
|
||||
bd: common_vendor.o(confirmExecutorSelect),
|
||||
be: common_vendor.o(($event) => showExecutorPopup.value = false),
|
||||
bf: common_vendor.p({
|
||||
bg: common_vendor.o(($event) => showExecutorPopup.value = false),
|
||||
bh: common_vendor.o(confirmExecutorSelect),
|
||||
bi: common_vendor.o(($event) => showExecutorPopup.value = false),
|
||||
bj: common_vendor.p({
|
||||
show: showExecutorPopup.value,
|
||||
mode: "center",
|
||||
round: "20"
|
||||
}),
|
||||
bg: common_vendor.gei(_ctx, "")
|
||||
bk: common_vendor.gei(_ctx, "")
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -83,6 +83,26 @@
|
||||
align-items: center;
|
||||
gap: 30rpx;
|
||||
}
|
||||
.weekend-options.data-v-98282eb3 {
|
||||
display: flex;
|
||||
gap: 20rpx;
|
||||
}
|
||||
.weekend-option.data-v-98282eb3 {
|
||||
flex: 1;
|
||||
height: 72rpx;
|
||||
line-height: 72rpx;
|
||||
text-align: center;
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
background: #fff;
|
||||
border: 2rpx solid #E5E5E5;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
.weekend-option.active.data-v-98282eb3 {
|
||||
color: #2667E9;
|
||||
border-color: #2667E9;
|
||||
background: #F0F6FF;
|
||||
}
|
||||
.empty-check-tip.data-v-98282eb3 {
|
||||
text-align: center;
|
||||
padding: 60rpx 0;
|
||||
@@ -432,21 +452,25 @@
|
||||
padding: 24rpx;
|
||||
border-bottom: 1rpx solid #f0f0f0;
|
||||
}
|
||||
.executor-checkbox.data-v-98282eb3 {
|
||||
.executor-radio.data-v-98282eb3 {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
border: 2rpx solid #ccc;
|
||||
border-radius: 8rpx;
|
||||
border-radius: 50%;
|
||||
margin-right: 20rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.executor-checkbox-active.data-v-98282eb3 {
|
||||
background: #2667E9;
|
||||
.executor-radio-active.data-v-98282eb3 {
|
||||
border-color: #2667E9;
|
||||
color: #fff;
|
||||
}
|
||||
.executor-radio-dot.data-v-98282eb3 {
|
||||
width: 20rpx;
|
||||
height: 20rpx;
|
||||
border-radius: 50%;
|
||||
background: #2667E9;
|
||||
}
|
||||
.executor-info.data-v-98282eb3 {
|
||||
flex: 1;
|
||||
|
||||
@@ -83,7 +83,7 @@ const _sfc_main = {
|
||||
};
|
||||
const details = (item) => {
|
||||
common_vendor.index.navigateTo({
|
||||
url: `/pages/hiddendanger/view?hazardId=${item.hazardId}&assignId=${item.assignId}`
|
||||
url: `/pages/hiddendanger/detail2?hazardId=${item.hazardId}&assignId=${item.assignId || ""}`
|
||||
});
|
||||
};
|
||||
const Rectification = (item) => {
|
||||
@@ -91,6 +91,12 @@ const _sfc_main = {
|
||||
if (item.deadline) {
|
||||
url += `&deadline=${encodeURIComponent(item.deadline)}`;
|
||||
}
|
||||
if (item.assigneeId) {
|
||||
url += `&assigneeId=${item.assigneeId}`;
|
||||
}
|
||||
if (item.assigneeName) {
|
||||
url += `&assigneeName=${encodeURIComponent(item.assigneeName)}`;
|
||||
}
|
||||
common_vendor.index.navigateTo({ url });
|
||||
};
|
||||
const editRectification = (item) => {
|
||||
|
||||
@@ -112,15 +112,11 @@ const _sfc_main = {
|
||||
}
|
||||
};
|
||||
const onDateConfirm = (e) => {
|
||||
common_vendor.index.__f__("log", "at pages/hiddendanger/assignment.vue:209", "选择的日期时间:", e);
|
||||
const date = new Date(e.value);
|
||||
const year = date.getFullYear();
|
||||
const month = String(date.getMonth() + 1).padStart(2, "0");
|
||||
const day = String(date.getDate()).padStart(2, "0");
|
||||
const hours = String(date.getHours()).padStart(2, "0");
|
||||
const minutes = String(date.getMinutes()).padStart(2, "0");
|
||||
const seconds = String(date.getSeconds()).padStart(2, "0");
|
||||
selectedDate.value = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
|
||||
selectedDate.value = `${year}-${month}-${day}`;
|
||||
showDatePicker.value = false;
|
||||
};
|
||||
const handleCancel = () => {
|
||||
@@ -145,7 +141,7 @@ const _sfc_main = {
|
||||
assignRemark: ""
|
||||
// 交办备注(可选)
|
||||
};
|
||||
common_vendor.index.__f__("log", "at pages/hiddendanger/assignment.vue:245", "提交数据:", params);
|
||||
common_vendor.index.__f__("log", "at pages/hiddendanger/assignment.vue:241", "提交数据:", params);
|
||||
try {
|
||||
const res = await request_api.assignHiddenDanger(params);
|
||||
if (res.code === 0) {
|
||||
@@ -158,7 +154,7 @@ const _sfc_main = {
|
||||
common_vendor.index.showToast({ title: res.msg || "交办失败", icon: "none" });
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/assignment.vue:259", "交办失败:", error);
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/assignment.vue:255", "交办失败:", error);
|
||||
common_vendor.index.showToast({ title: "请求失败", icon: "none" });
|
||||
}
|
||||
};
|
||||
@@ -227,7 +223,7 @@ const _sfc_main = {
|
||||
x: common_vendor.o(($event) => dateValue.value = $event),
|
||||
y: common_vendor.p({
|
||||
show: showDatePicker.value,
|
||||
mode: "datetime",
|
||||
mode: "date",
|
||||
modelValue: dateValue.value
|
||||
}),
|
||||
z: common_vendor.o(handleCancel),
|
||||
|
||||
@@ -87,7 +87,7 @@ const _sfc_main = {
|
||||
autoBack: true,
|
||||
border: false
|
||||
}),
|
||||
b: common_assets._imports_0$1,
|
||||
b: common_assets._imports_0$2,
|
||||
c: common_vendor.t(detailData.value.statusName || "-"),
|
||||
d: common_assets._imports_1,
|
||||
e: common_vendor.t(detailData.value.createdAt || "-"),
|
||||
|
||||
@@ -170,6 +170,22 @@ const _sfc_main = {
|
||||
selectedDeadlineDate.value = String(deadline).trim().replace("T", " ");
|
||||
}
|
||||
};
|
||||
const applyAssigneeFromOptions = (assigneeId, assigneeName) => {
|
||||
if (!assigneeId)
|
||||
return;
|
||||
const id = String(assigneeId);
|
||||
const name = assigneeName ? decodeURIComponent(String(assigneeName)).trim() : "";
|
||||
const exists = detailPersonPool.value.some((user) => String(user.userId) === id);
|
||||
if (!exists) {
|
||||
detailPersonPool.value.push({
|
||||
userId: assigneeId,
|
||||
nickName: name,
|
||||
deptName: ""
|
||||
});
|
||||
}
|
||||
selectedUserIds.value = [id];
|
||||
syncSelectedUsersFromIds(selectedUserIds.value);
|
||||
};
|
||||
const parseIdList = (raw) => {
|
||||
if (raw === null || raw === void 0 || raw === "")
|
||||
return [];
|
||||
@@ -389,11 +405,11 @@ const _sfc_main = {
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/rectification.vue:690", "获取安全管理人员列表失败:", error);
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/rectification.vue:706", "获取安全管理人员列表失败:", error);
|
||||
}
|
||||
};
|
||||
const fetchRectifyDeptUsers = async () => {
|
||||
common_vendor.index.__f__("log", "at pages/hiddendanger/rectification.vue:696", "当前hazardId:", hazardId.value);
|
||||
common_vendor.index.__f__("log", "at pages/hiddendanger/rectification.vue:712", "当前hazardId:", hazardId.value);
|
||||
try {
|
||||
const res = await request_api.getDeptUsersWithSubordinates({ hazardId: hazardId.value });
|
||||
if (res.code === 0 && res.data) {
|
||||
@@ -401,10 +417,10 @@ const _sfc_main = {
|
||||
if (selectedUserIds.value.length > 0) {
|
||||
syncSelectedUsersFromIds(selectedUserIds.value);
|
||||
}
|
||||
common_vendor.index.__f__("log", "at pages/hiddendanger/rectification.vue:704", "整改责任人部门树:", deptList.value);
|
||||
common_vendor.index.__f__("log", "at pages/hiddendanger/rectification.vue:720", "整改责任人部门树:", deptList.value);
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/rectification.vue:707", "获取整改责任人列表失败:", error);
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/rectification.vue:723", "获取整改责任人列表失败:", error);
|
||||
}
|
||||
};
|
||||
const fetchPersonnelLists = async () => {
|
||||
@@ -463,7 +479,7 @@ const _sfc_main = {
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.hideLoading();
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/rectification.vue:778", "提交整改失败:", error);
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/rectification.vue:794", "提交整改失败:", error);
|
||||
common_vendor.index.showToast({
|
||||
title: "操作失败",
|
||||
icon: "none"
|
||||
@@ -489,7 +505,7 @@ const _sfc_main = {
|
||||
} catch (err) {
|
||||
isSubmitting.value = false;
|
||||
common_vendor.index.hideLoading();
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/rectification.vue:808", "签名上传失败:", err);
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/rectification.vue:824", "签名上传失败:", err);
|
||||
common_vendor.index.showToast({ title: "签名上传失败,请重试", icon: "none" });
|
||||
}
|
||||
};
|
||||
@@ -573,7 +589,7 @@ const _sfc_main = {
|
||||
} catch (err) {
|
||||
isSubmitting.value = false;
|
||||
common_vendor.index.hideLoading();
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/rectification.vue:899", "签名上传失败:", err);
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/rectification.vue:915", "签名上传失败:", err);
|
||||
common_vendor.index.showToast({ title: "签名上传失败,请重试", icon: "none" });
|
||||
}
|
||||
}
|
||||
@@ -598,7 +614,7 @@ const _sfc_main = {
|
||||
applyRectifyTimeValue(data.rectifyTime);
|
||||
}
|
||||
const signPath = resolveSignPathFromData(data);
|
||||
common_vendor.index.__f__("log", "at pages/hiddendanger/rectification.vue:1002", "整改详情签名路径:", signPath);
|
||||
common_vendor.index.__f__("log", "at pages/hiddendanger/rectification.vue:1018", "整改详情签名路径:", signPath);
|
||||
applySignatureFromServer(signPath);
|
||||
hazardId.value = data.hazardId || "";
|
||||
assignId.value = data.assignId || "";
|
||||
@@ -624,7 +640,7 @@ const _sfc_main = {
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.hideLoading();
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/rectification.vue:1036", "获取整改详情失败:", error);
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/rectification.vue:1052", "获取整改详情失败:", error);
|
||||
common_vendor.index.showToast({ title: "获取详情失败", icon: "none" });
|
||||
}
|
||||
};
|
||||
@@ -655,7 +671,7 @@ const _sfc_main = {
|
||||
common_vendor.index.showToast({ title: aiRes.msg || "AI生成失败", icon: "none" });
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/rectification.vue:1073", "AI生成整改方案失败:", error);
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/rectification.vue:1089", "AI生成整改方案失败:", error);
|
||||
common_vendor.index.showToast({ title: "AI生成失败,请重试", icon: "none" });
|
||||
} finally {
|
||||
aiGenerating.value = false;
|
||||
@@ -772,7 +788,7 @@ const _sfc_main = {
|
||||
const sysInfo = common_vendor.index.getSystemInfoSync();
|
||||
signatureWidth.value = sysInfo.windowWidth - 40;
|
||||
} catch (e) {
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/rectification.vue:1207", "获取系统信息失败:", e);
|
||||
common_vendor.index.__f__("error", "at pages/hiddendanger/rectification.vue:1223", "获取系统信息失败:", e);
|
||||
}
|
||||
if (options.hazardId) {
|
||||
hazardId.value = options.hazardId;
|
||||
@@ -780,6 +796,9 @@ const _sfc_main = {
|
||||
if (options.assignId) {
|
||||
assignId.value = options.assignId;
|
||||
}
|
||||
if (!options.rectifyId && options.assigneeId) {
|
||||
applyAssigneeFromOptions(options.assigneeId, options.assigneeName);
|
||||
}
|
||||
if (!options.rectifyId)
|
||||
fetchPersonnelLists();
|
||||
if (options.rectifyId) {
|
||||
|
||||
@@ -14,7 +14,7 @@ const _easycom_u_icon = () => "../../uni_modules/uview-plus/components/u-icon/u-
|
||||
if (!Math) {
|
||||
(_easycom_u_navbar + _easycom_u_icon)();
|
||||
}
|
||||
const defaultAvatar = "https://ossweb-img.qq.com/images/lol/web201310/skin/big99008.jpg";
|
||||
const defaultAvatar = "/static/my/default_avater.png";
|
||||
const PLAN_INITIAL_SIZE = 4;
|
||||
const _sfc_main = {
|
||||
__name: "index",
|
||||
@@ -306,6 +306,12 @@ const _sfc_main = {
|
||||
if (item.deadline) {
|
||||
url += `&deadline=${encodeURIComponent(item.deadline)}`;
|
||||
}
|
||||
if (item.assigneeId) {
|
||||
url += `&assigneeId=${item.assigneeId}`;
|
||||
}
|
||||
if (item.assigneeName) {
|
||||
url += `&assigneeName=${encodeURIComponent(item.assigneeName)}`;
|
||||
}
|
||||
common_vendor.index.navigateTo({ url });
|
||||
};
|
||||
const goAcceptance = (item) => {
|
||||
|
||||
@@ -147,7 +147,7 @@ const _sfc_main = {
|
||||
a: common_vendor.p({
|
||||
isBack: true
|
||||
}),
|
||||
b: common_assets._imports_0$6,
|
||||
b: common_assets._imports_0$7,
|
||||
c: phone.value,
|
||||
d: common_vendor.o(($event) => phone.value = $event.detail.value),
|
||||
e: common_assets._imports_1$4,
|
||||
|
||||
@@ -75,8 +75,8 @@ const _sfc_main = {
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
return {
|
||||
a: common_assets._imports_0$5,
|
||||
b: common_assets._imports_0$6,
|
||||
a: common_assets._imports_0$6,
|
||||
b: common_assets._imports_0$7,
|
||||
c: username.value,
|
||||
d: common_vendor.o(($event) => username.value = $event.detail.value),
|
||||
e: common_assets._imports_1$4,
|
||||
|
||||
@@ -9,7 +9,7 @@ const _sfc_main = {
|
||||
return common_vendor.e({
|
||||
a: success
|
||||
}, {
|
||||
b: common_assets._imports_0$7
|
||||
b: common_assets._imports_0$8
|
||||
}, {
|
||||
d: common_vendor.gei(_ctx, "")
|
||||
});
|
||||
|
||||
@@ -4,7 +4,7 @@ const common_assets = require("../../common/assets.js");
|
||||
const _sfc_main = {};
|
||||
function _sfc_render(_ctx, _cache) {
|
||||
return {
|
||||
a: common_assets._imports_0$4,
|
||||
a: common_assets._imports_0$5,
|
||||
b: common_assets._imports_1$3,
|
||||
c: common_vendor.gei(_ctx, "")
|
||||
};
|
||||
|
||||
@@ -11,7 +11,7 @@ const _easycom_u_navbar = () => "../../uni_modules/uview-plus/components/u-navba
|
||||
if (!Math) {
|
||||
_easycom_u_navbar();
|
||||
}
|
||||
const defaultAvatar = "https://ossweb-img.qq.com/images/lol/web201310/skin/big99008.jpg";
|
||||
const defaultAvatar = "/static/my/default_avater.png";
|
||||
const _sfc_main = {
|
||||
__name: "my",
|
||||
setup(__props) {
|
||||
@@ -82,7 +82,7 @@ const _sfc_main = {
|
||||
b: getImageUrl(userInfo.avatar) || defaultAvatar,
|
||||
c: common_vendor.t(userInfo.nickName || "未设置昵称"),
|
||||
d: common_vendor.t(userInfo.phonenumber || "未绑定手机"),
|
||||
e: common_assets._imports_0$3,
|
||||
e: common_assets._imports_0$4,
|
||||
f: common_vendor.o(($event) => editinfo()),
|
||||
g: common_assets._imports_1$2,
|
||||
h: common_vendor.o(($event) => editinfo()),
|
||||
|
||||
20
unpackage/dist/dev/mp-weixin/request/api.js
vendored
20
unpackage/dist/dev/mp-weixin/request/api.js
vendored
@@ -226,6 +226,12 @@ function addCheckTable(params) {
|
||||
data: params
|
||||
});
|
||||
}
|
||||
function getOneTableInfo(id) {
|
||||
return request_request.requestAPI({
|
||||
url: `/admin/oneTable/info/${id}`,
|
||||
method: "GET"
|
||||
});
|
||||
}
|
||||
function getEnterprisetype() {
|
||||
return request_request.requestAPI({
|
||||
url: "/frontend/enterprise/type/select",
|
||||
@@ -299,16 +305,15 @@ function getCheckItemListDetail(params) {
|
||||
data: params
|
||||
});
|
||||
}
|
||||
function getDeptUsers(params) {
|
||||
function getDeptUsers(deptId) {
|
||||
return request_request.requestAPI({
|
||||
url: "/admin/user/dept/users",
|
||||
method: "GET",
|
||||
data: params
|
||||
url: deptId ? `/admin/user/dept/users/${deptId}` : "/admin/user/dept/users",
|
||||
method: "GET"
|
||||
});
|
||||
}
|
||||
function getParentDepts() {
|
||||
function getDeptChildren() {
|
||||
return request_request.requestAPI({
|
||||
url: "/admin/dept/parents",
|
||||
url: "/admin/dept/children",
|
||||
method: "GET"
|
||||
});
|
||||
}
|
||||
@@ -365,6 +370,7 @@ exports.getCheckPlanList = getCheckPlanList;
|
||||
exports.getCheckTableList = getCheckTableList;
|
||||
exports.getCheckTaskDetail = getCheckTaskDetail;
|
||||
exports.getDepartmentPersonUsers = getDepartmentPersonUsers;
|
||||
exports.getDeptChildren = getDeptChildren;
|
||||
exports.getDeptUsers = getDeptUsers;
|
||||
exports.getDeptUsersWithSubordinates = getDeptUsersWithSubordinates;
|
||||
exports.getEnterpriseinfo = getEnterpriseinfo;
|
||||
@@ -377,7 +383,7 @@ exports.getInspectionWarningList = getInspectionWarningList;
|
||||
exports.getMemberList = getMemberList;
|
||||
exports.getMyHiddenDangerList = getMyHiddenDangerList;
|
||||
exports.getMyWriteOffList = getMyWriteOffList;
|
||||
exports.getParentDepts = getParentDepts;
|
||||
exports.getOneTableInfo = getOneTableInfo;
|
||||
exports.getPlanTableDetail = getPlanTableDetail;
|
||||
exports.getQiniuUploadToken = getQiniuUploadToken;
|
||||
exports.getRectifyDetail = getRectifyDetail;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../common/vendor.js");
|
||||
const request_luchRequest_core_Request = require("./luch-request/core/Request.js");
|
||||
const baseUrl = "https://yingji.hexieapi.com/prod-api";
|
||||
const baseUrl = "http://192.168.1.140:5004";
|
||||
const imageBaseUrl = baseUrl.replace(/\/prod-api\/?$/, "");
|
||||
new request_luchRequest_core_Request.Request({
|
||||
baseURL: baseUrl,
|
||||
|
||||
1
unpackage/dist/dev/mp-weixin/static/jianchabiao/biaodan.svg
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/static/jianchabiao/biaodan.svg
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1782184474076" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5377" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M307.2 768h102.4v51.2h-102.4zM307.2 614.4h409.6v51.2H307.2zM307.2 460.8h409.6v51.2H307.2zM307.2 307.2h358.4v51.2H307.2z" fill="#335056" p-id="5378"></path><path d="M716.8 102.4V51.2H307.2v51.2H153.6v870.4h716.8V102.4h-153.6zM358.4 102.4h307.2v51.2H358.4V102.4z m460.8 819.2H204.8V153.6h102.4v51.2h409.6V153.6h102.4v768z" fill="#335056" p-id="5379"></path><path d="M358.4 102.4h307.2v51.2H358.4z" fill="#78BDCC" p-id="5380"></path></svg>
|
||||
|
After Width: | Height: | Size: 769 B |
BIN
unpackage/dist/dev/mp-weixin/static/my/default_avater.png
vendored
Normal file
BIN
unpackage/dist/dev/mp-weixin/static/my/default_avater.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 39 KiB |
Reference in New Issue
Block a user