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,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>