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

@@ -245,26 +245,26 @@
{
"pagePath": "pages/index/index",
"text": "首页",
"iconPath": "static/tabBar/home.png",
"iconPath": "static/tabBar/home1.png",
"selectedIconPath": "static/tabBar/home.png"
},
{
"pagePath": "pages/map/map",
"text": "一张图",
"iconPath": "static/tabBar/map.png",
"selectedIconPath": "static/tabBar/map.png"
"selectedIconPath": "static/tabBar/map1.png"
},
{
"pagePath": "pages/Inspectionwarning/Inspectionwarning",
"text": "预警",
"iconPath": "static/tabBar/warning.png",
"selectedIconPath": "static/tabBar/warning.png"
"selectedIconPath": "static/tabBar/warning1.png"
},
{
"pagePath": "pages/personalcenter/my",
"text": "我的",
"iconPath": "static/tabBar/my.png",
"selectedIconPath": "static/tabBar/my.png"
"selectedIconPath": "static/tabBar/my1.png"
}
]
},

View File

@@ -1,13 +1,13 @@
<template>
<view class="page padding">
<view class="padding bg-white radius flex justify-between">
<view>危化品使用安全专题检查</view>
<view class="padding bg-white radius flex justify-between margin-bottom" v-for="item in list" :key="item.id">
<view>{{ item.name }}</view>
<view>
<button class="bg-blue cu-btn margin-right-xs" @click="edit()">编辑</button>
<button class="bg-red cu-btn">删除</button>
</view>
</view>
<button class="lg cuIcon-add bg-blue round margin-top-xl">新增检查表</button>
<button class="lg cuIcon-add bg-blue round margin-top-xl" @click="edit()">新增检查表</button>
</view>
</template>
@@ -15,12 +15,22 @@
import { ref } from 'vue'
import { onLoad } from '@dcloudio/uni-app'
import { useRouter } from 'vue-router'
import { getCheckTableList } from '@/request/api.js'
const router = useRouter()
const list = ref([])
const edit = () => {
uni.navigateTo({
url: '/pages/editchecklist/editchecklist'
})
}
onLoad(() => {
getCheckTableList().then(res => {
if (res.code === 0) {
list.value = res.data.records
}
})
})
</script>
<style lang="scss" scoped>

View File

@@ -184,6 +184,7 @@
<script setup>
import { ref, reactive, computed } from 'vue'
import {addCheckTable} from '/request/api.js'
// 响应式数据
const cateId = ref('')

View File

@@ -25,15 +25,13 @@
<view class="text-gray margin-top">限定整改时间</view>
<view class="text-red">*</view>
</view>
<view class="date-input" @click="show = true">
<text :class="selectedDate ? '' : 'text-gray'">{{ selectedDate || '请选择日期' }}</text>
</view>
<up-datetime-picker hasInput :show="show" v-model="value1" mode="date"></up-datetime-picker>
<view class=" margin-bottom margin-top">
<!-- <view class="text-gray">整改人员</view>
<view class="text-red">*</view> -->
<up-select v-model:current="cateId" label="整改人员" :options="cateList" @select="selectItem"></up-select>
<view class="flex margin-bottom margin-top">
<view class="text-gray">整改人员</view>
<view class="text-red">*</view>
<view class="margin-left-sm text-black" v-if="selectedUserName">{{ selectedUserName }}</view>
</view>
<up-select v-model:current="cateId" :options="cateList" @select="selectItem"></up-select>
<view class="flex margin-bottom">
<view class="text-gray">整改图片/视频</view>
@@ -66,12 +64,12 @@
const show = ref(false);
const value1 = ref(Date.now());
const selectedDate = ref('');
const radiovalue1 = ref('');
// 整改人员
const cateId = ref('')
const cateList = ref([])
const selectedUserName = ref('') // 选中的人员名称
// 获取部门人员列表
const fetchDeptUsers = async () => {
@@ -222,7 +220,7 @@
} catch (error) {
console.error('提交整改失败:', error);
uni.showToast({
title: '请求失败',
title: '您不是整改人员',
icon: 'none'
});
}
@@ -240,6 +238,7 @@
const selectItem = (item) => {
console.log('选择的整改人员:', item);
cateId.value = item.id;
selectedUserName.value = item.name; // 显示选中的人员名称
};
</script>

View File

@@ -169,4 +169,28 @@ export function login(params) {
data: params,
noAuth: true // 登录接口不需要 Authorization
});
}
//获取检查表
export function getCheckTableList(params) {
return requestAPI({
url: '/admin/oneTable/list',
method: 'GET',
data: params
});
}
//新增安全隐患常见病检查
export function addCheckTable(params) {
return requestAPI({
url: '/admin/oneTable/add',
method: 'POST',
data: params
});
}
//获取检查表详情
export function getCheckTableDetail(params) {
return requestAPI({
url: '/admin/oneTable/detail/{id}',
method: 'GET',
data: params
});
}

View File

Before

Width:  |  Height:  |  Size: 630 B

After

Width:  |  Height:  |  Size: 630 B

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

Before

Width:  |  Height:  |  Size: 709 B

After

Width:  |  Height:  |  Size: 709 B

View File

Before

Width:  |  Height:  |  Size: 953 B

After

Width:  |  Height:  |  Size: 953 B

View File

@@ -50,26 +50,26 @@
{
"pagePath": "pages/index/index",
"text": "首页",
"iconPath": "static/tabBar/home.png",
"iconPath": "static/tabBar/home1.png",
"selectedIconPath": "static/tabBar/home.png"
},
{
"pagePath": "pages/map/map",
"text": "一张图",
"iconPath": "static/tabBar/map.png",
"selectedIconPath": "static/tabBar/map.png"
"selectedIconPath": "static/tabBar/map1.png"
},
{
"pagePath": "pages/Inspectionwarning/Inspectionwarning",
"text": "预警",
"iconPath": "static/tabBar/warning.png",
"selectedIconPath": "static/tabBar/warning.png"
"selectedIconPath": "static/tabBar/warning1.png"
},
{
"pagePath": "pages/personalcenter/my",
"text": "我的",
"iconPath": "static/tabBar/my.png",
"selectedIconPath": "static/tabBar/my.png"
"selectedIconPath": "static/tabBar/my1.png"
}
]
},

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>

View File

@@ -20,9 +20,26 @@
},
"compileType": "miniprogram",
"libVersion": "3.12.0",
"appid": "touristappid",
"appid": "wxe3533791db8a8734",
"projectname": "sanchayibaoguang",
"condition": {},
"condition": {
"search": {
"current": -1,
"list": []
},
"conversation": {
"current": -1,
"list": []
},
"game": {
"current": -1,
"list": []
},
"miniprogram": {
"current": -1,
"list": []
}
},
"editorSetting": {
"tabIndent": "insertSpaces",
"tabSize": 2

View File

@@ -0,0 +1,16 @@
{
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"condition": {
"miniprogram": {
"list": [
{
"name": "pages/index/index",
"pathName": "pages/index/index",
"query": "",
"launchMode": "default",
"scene": null
}
]
}
}
}

View File

@@ -132,6 +132,13 @@ function login(params) {
// 登录接口不需要 Authorization
});
}
function getCheckTableList(params) {
return request_request.requestAPI({
url: "/admin/oneTable/list",
method: "GET",
data: params
});
}
exports.acceptanceRectification = acceptanceRectification;
exports.addHiddenDanger = addHiddenDanger;
exports.addMember = addMember;
@@ -139,6 +146,7 @@ exports.applyDelete = applyDelete;
exports.assignHiddenDanger = assignHiddenDanger;
exports.enterCheckPlan = enterCheckPlan;
exports.getCheckPlanList = getCheckPlanList;
exports.getCheckTableList = getCheckTableList;
exports.getCheckTaskDetail = getCheckTaskDetail;
exports.getDepartmentPersonUsers = getDepartmentPersonUsers;
exports.getHiddenDangerDetail = getHiddenDangerDetail;

View File

Before

Width:  |  Height:  |  Size: 630 B

After

Width:  |  Height:  |  Size: 630 B

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

Before

Width:  |  Height:  |  Size: 709 B

After

Width:  |  Height:  |  Size: 709 B

View File

Before

Width:  |  Height:  |  Size: 953 B

After

Width:  |  Height:  |  Size: 953 B