This commit is contained in:
2026-01-21 11:04:40 +08:00
parent a11d3cc2f8
commit 8fe0c4d893
22 changed files with 135 additions and 42 deletions

View File

@@ -1,17 +1,33 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const request_api = require("../../request/api.js");
const _sfc_main = {
__name: "checklist",
setup(__props) {
common_vendor.useRouter();
const list = common_vendor.ref([]);
const edit = () => {
common_vendor.index.navigateTo({
url: "/pages/editchecklist/editchecklist"
});
};
common_vendor.onLoad(() => {
request_api.getCheckTableList().then((res) => {
if (res.code === 0) {
list.value = res.data.records;
}
});
});
return (_ctx, _cache) => {
return {
a: common_vendor.o(($event) => edit())
a: common_vendor.f(list.value, (item, k0, i0) => {
return {
a: common_vendor.t(item.name),
b: common_vendor.o(($event) => edit(), item.id),
c: item.id
};
}),
b: common_vendor.o(($event) => edit())
};
};
}

View File

@@ -1 +1 @@
<view class="{{['page', 'padding', 'data-v-4d00090a', virtualHostClass]}}" style="{{virtualHostStyle}}"><view class="padding bg-white radius flex justify-between data-v-4d00090a"><view class="data-v-4d00090a">危化品使用安全专题检查</view><view class="data-v-4d00090a"><button class="bg-blue cu-btn margin-right-xs data-v-4d00090a" bindtap="{{a}}">编辑</button><button class="bg-red cu-btn data-v-4d00090a">删除</button></view></view><button class="lg cuIcon-add bg-blue round margin-top-xl data-v-4d00090a">新增检查表</button></view>
<view class="{{['page', 'padding', 'data-v-4d00090a', virtualHostClass]}}" style="{{virtualHostStyle}}"><view wx:for="{{a}}" wx:for-item="item" wx:key="c" class="padding bg-white radius flex justify-between margin-bottom data-v-4d00090a"><view class="data-v-4d00090a">{{item.a}}</view><view class="data-v-4d00090a"><button class="bg-blue cu-btn margin-right-xs data-v-4d00090a" bindtap="{{item.b}}">编辑</button><button class="bg-red cu-btn data-v-4d00090a">删除</button></view></view><button class="lg cuIcon-add bg-blue round margin-top-xl data-v-4d00090a" bindtap="{{b}}">新增检查表</button></view>

View File

@@ -1,5 +1,6 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
require("../../request/request.js");
if (!Array) {
const _easycom_up_input2 = common_vendor.resolveComponent("up-input");
const _easycom_up_select2 = common_vendor.resolveComponent("up-select");

View File

@@ -35,10 +35,10 @@ const _sfc_main = {
});
const show = common_vendor.ref(false);
const value1 = common_vendor.ref(Date.now());
const selectedDate = common_vendor.ref("");
common_vendor.ref("");
const cateId = common_vendor.ref("");
const cateList = common_vendor.ref([]);
const selectedUserName = common_vendor.ref("");
const fetchDeptUsers = async () => {
try {
const res = await request_api.getDepartmentPersonUsers();
@@ -170,7 +170,7 @@ const _sfc_main = {
} catch (error) {
console.error("提交整改失败:", error);
common_vendor.index.showToast({
title: "请求失败",
title: "您不是整改人员",
icon: "none"
});
}
@@ -186,9 +186,10 @@ const _sfc_main = {
const selectItem = (item) => {
console.log("选择的整改人员:", item);
cateId.value = item.id;
selectedUserName.value = item.name;
};
return (_ctx, _cache) => {
return {
return common_vendor.e({
a: common_vendor.o(($event) => formData.rectifyPlan = $event),
b: common_vendor.p({
placeholder: "请输入内容",
@@ -211,33 +212,33 @@ const _sfc_main = {
type: "number",
modelValue: formData.actualCost
}),
i: common_vendor.t(selectedDate.value || "请选择日期"),
j: common_vendor.n(selectedDate.value ? "" : "text-gray"),
k: common_vendor.o(($event) => show.value = true),
l: common_vendor.o(($event) => value1.value = $event),
m: common_vendor.p({
i: common_vendor.o(($event) => value1.value = $event),
j: common_vendor.p({
hasInput: true,
show: show.value,
mode: "date",
modelValue: value1.value
}),
n: common_vendor.o(selectItem),
o: common_vendor.o(($event) => cateId.value = $event),
p: common_vendor.p({
label: "整改人员",
k: selectedUserName.value
}, selectedUserName.value ? {
l: common_vendor.t(selectedUserName.value)
} : {}, {
m: common_vendor.o(selectItem),
n: common_vendor.o(($event) => cateId.value = $event),
o: common_vendor.p({
options: cateList.value,
current: cateId.value
}),
q: common_vendor.o(afterRead),
r: common_vendor.o(deletePic),
s: common_vendor.p({
p: common_vendor.o(afterRead),
q: common_vendor.o(deletePic),
r: common_vendor.p({
fileList: fileList1.value,
name: "1",
multiple: true,
maxCount: 10
}),
t: common_vendor.o(handleSubmit)
};
s: common_vendor.o(handleSubmit)
});
};
}
};

View File

@@ -1 +1 @@
<view class="{{['page', 'padding', 'data-v-f18ba0ce', virtualHostClass]}}" style="{{virtualHostStyle}}"><view class="padding bg-white radius data-v-f18ba0ce"><view class="flex margin-bottom data-v-f18ba0ce"><view class="text-gray data-v-f18ba0ce">整改方案</view><view class="text-red data-v-f18ba0ce">*</view></view><up-textarea wx:if="{{b}}" class="data-v-f18ba0ce" virtualHostClass="data-v-f18ba0ce" u-i="f18ba0ce-0" bind:__l="__l" bindupdateModelValue="{{a}}" u-p="{{b}}"></up-textarea><view class="flex margin-bottom margin-top data-v-f18ba0ce"><view class="text-gray data-v-f18ba0ce">整改完成情况</view><view class="text-red data-v-f18ba0ce">*</view></view><up-textarea wx:if="{{d}}" class="data-v-f18ba0ce" virtualHostClass="data-v-f18ba0ce" u-i="f18ba0ce-1" bind:__l="__l" bindupdateModelValue="{{c}}" u-p="{{d}}"></up-textarea><view class="flex margin-bottom data-v-f18ba0ce"><view class="text-gray margin-top data-v-f18ba0ce">投资资金(计划)</view><view class="text-red data-v-f18ba0ce">*</view></view><up-input wx:if="{{f}}" class="data-v-f18ba0ce" virtualHostClass="data-v-f18ba0ce" u-i="f18ba0ce-2" bind:__l="__l" bindupdateModelValue="{{e}}" u-p="{{f}}"></up-input><view class="flex margin-bottom data-v-f18ba0ce"><view class="text-gray margin-top data-v-f18ba0ce">投资资金(实际)</view><view class="text-red data-v-f18ba0ce">*</view></view><up-input wx:if="{{h}}" class="data-v-f18ba0ce" virtualHostClass="data-v-f18ba0ce" u-i="f18ba0ce-3" bind:__l="__l" bindupdateModelValue="{{g}}" u-p="{{h}}"></up-input><view class="flex margin-bottom data-v-f18ba0ce"><view class="text-gray margin-top data-v-f18ba0ce">限定整改时间</view><view class="text-red data-v-f18ba0ce">*</view></view><view class="date-input data-v-f18ba0ce" bindtap="{{k}}"><text class="{{['data-v-f18ba0ce', j]}}">{{i}}</text></view><up-datetime-picker wx:if="{{m}}" class="data-v-f18ba0ce" virtualHostClass="data-v-f18ba0ce" u-i="f18ba0ce-4" bind:__l="__l" bindupdateModelValue="{{l}}" u-p="{{m}}"></up-datetime-picker><view class="margin-bottom margin-top data-v-f18ba0ce"><up-select wx:if="{{p}}" class="data-v-f18ba0ce" virtualHostClass="data-v-f18ba0ce" bindselect="{{n}}" u-i="f18ba0ce-5" bind:__l="__l" bindupdateCurrent="{{o}}" u-p="{{p}}"></up-select></view><view class="flex margin-bottom data-v-f18ba0ce"><view class="text-gray data-v-f18ba0ce">整改图片/视频</view><view class="text-red data-v-f18ba0ce">*</view></view><up-upload wx:if="{{s}}" class="data-v-f18ba0ce" virtualHostClass="data-v-f18ba0ce" bindafterRead="{{q}}" binddelete="{{r}}" u-i="f18ba0ce-6" bind:__l="__l" u-p="{{s}}"></up-upload><button class="bg-blue round margin-top-xl data-v-f18ba0ce" bindtap="{{t}}">提交整改</button></view></view>
<view class="{{['page', 'padding', 'data-v-f18ba0ce', virtualHostClass]}}" style="{{virtualHostStyle}}"><view class="padding bg-white radius data-v-f18ba0ce"><view class="flex margin-bottom data-v-f18ba0ce"><view class="text-gray data-v-f18ba0ce">整改方案</view><view class="text-red data-v-f18ba0ce">*</view></view><up-textarea wx:if="{{b}}" class="data-v-f18ba0ce" virtualHostClass="data-v-f18ba0ce" u-i="f18ba0ce-0" bind:__l="__l" bindupdateModelValue="{{a}}" u-p="{{b}}"></up-textarea><view class="flex margin-bottom margin-top data-v-f18ba0ce"><view class="text-gray data-v-f18ba0ce">整改完成情况</view><view class="text-red data-v-f18ba0ce">*</view></view><up-textarea wx:if="{{d}}" class="data-v-f18ba0ce" virtualHostClass="data-v-f18ba0ce" u-i="f18ba0ce-1" bind:__l="__l" bindupdateModelValue="{{c}}" u-p="{{d}}"></up-textarea><view class="flex margin-bottom data-v-f18ba0ce"><view class="text-gray margin-top data-v-f18ba0ce">投资资金(计划)</view><view class="text-red data-v-f18ba0ce">*</view></view><up-input wx:if="{{f}}" class="data-v-f18ba0ce" virtualHostClass="data-v-f18ba0ce" u-i="f18ba0ce-2" bind:__l="__l" bindupdateModelValue="{{e}}" u-p="{{f}}"></up-input><view class="flex margin-bottom data-v-f18ba0ce"><view class="text-gray margin-top data-v-f18ba0ce">投资资金(实际)</view><view class="text-red data-v-f18ba0ce">*</view></view><up-input wx:if="{{h}}" class="data-v-f18ba0ce" virtualHostClass="data-v-f18ba0ce" u-i="f18ba0ce-3" bind:__l="__l" bindupdateModelValue="{{g}}" u-p="{{h}}"></up-input><view class="flex margin-bottom data-v-f18ba0ce"><view class="text-gray margin-top data-v-f18ba0ce">限定整改时间</view><view class="text-red data-v-f18ba0ce">*</view></view><up-datetime-picker wx:if="{{j}}" class="data-v-f18ba0ce" virtualHostClass="data-v-f18ba0ce" u-i="f18ba0ce-4" bind:__l="__l" bindupdateModelValue="{{i}}" u-p="{{j}}"></up-datetime-picker><view class="flex margin-bottom margin-top data-v-f18ba0ce"><view class="text-gray data-v-f18ba0ce">整改人员</view><view class="text-red data-v-f18ba0ce">*</view><view wx:if="{{k}}" class="margin-left-sm text-black data-v-f18ba0ce">{{l}}</view></view><up-select wx:if="{{o}}" class="data-v-f18ba0ce" virtualHostClass="data-v-f18ba0ce" bindselect="{{m}}" u-i="f18ba0ce-5" bind:__l="__l" bindupdateCurrent="{{n}}" u-p="{{o}}"></up-select><view class="flex margin-bottom data-v-f18ba0ce"><view class="text-gray data-v-f18ba0ce">整改图片/视频</view><view class="text-red data-v-f18ba0ce">*</view></view><up-upload wx:if="{{r}}" class="data-v-f18ba0ce" virtualHostClass="data-v-f18ba0ce" bindafterRead="{{p}}" binddelete="{{q}}" u-i="f18ba0ce-6" bind:__l="__l" u-p="{{r}}"></up-upload><button class="bg-blue round margin-top-xl data-v-f18ba0ce" bindtap="{{s}}">提交整改</button></view></view>