App端 待确认调整

This commit is contained in:
huangchenhao 2025-11-21 16:54:23 +08:00
parent 8488a2c547
commit 49696342fa
2 changed files with 32 additions and 3 deletions

View File

@ -11,7 +11,7 @@
<van-cell-group> <van-cell-group>
<van-cell title="当前站点" :value="detailData.mc" /> <van-cell title="当前站点" :value="detailData.mc" />
</van-cell-group> </van-cell-group>
<van-notice-bar mode="link">20台设备待确认</van-notice-bar> <van-notice-bar mode="link" v-if="pendingConfirmList.length">{{ pendingConfirmList.length }}个设备待确认</van-notice-bar>
<div class="content"> <div class="content">
<van-cell-group> <van-cell-group>
@ -413,6 +413,7 @@ const route = useRoute();
const detailData = ref({}); // const detailData = ref({}); //
const searchValue = ref(""); // const searchValue = ref(""); //
const equipmentList = ref([]); const equipmentList = ref([]);
const pendingConfirmList = ref([]); //
const INIT_FORM = { const INIT_FORM = {
equipment: { equipment: {
@ -445,8 +446,9 @@ const form = reactive({ ...INIT_FORM }); // 表单
// //
onMounted(() => { onMounted(() => {
detailData.value = JSON.parse(decodeURIComponent(route.params.data)); detailData.value = JSON.parse(decodeURIComponent(route.params.data));
console.log('detailData',toRaw(detailData.value)); console.log("detailData", toRaw(detailData.value));
getEquipmentList(); getEquipmentList();
getPendingConfirmList();
}); });
watch( watch(
@ -458,6 +460,33 @@ watch(
} }
); );
//
const getPendingConfirmList = async (sbmc) => {
try {
const data = {
yhzid: detailData.value.id,
sbmc,
pageNum: 1,
pageSize: 9999,
};
const res = await request({
url: "/snow-ops-platform/yjsb/pendingConfirmList",
method: "get",
params: data,
});
if (res.code === "00000") {
pendingConfirmList.value = res.data.records;
} else {
throw new Error(res.message);
}
} catch (error) {
showToast({
type: "fail",
message: error.message,
});
}
};
// //
const getEquipmentList = async (sbmc) => { const getEquipmentList = async (sbmc) => {
try { try {

View File

@ -65,7 +65,7 @@ const INIT_FORM = {
czyid: "", czyid: "",
gzrq: "", gzrq: "",
gmfy: "", gmfy: "",
sbzt: "", sbzt: "完好",
sccj: "", sccj: "",
sfyjsb: "", sfyjsb: "",
sfnrsjbz: "", sfnrsjbz: "",