App端 待确认调整
This commit is contained in:
parent
8488a2c547
commit
49696342fa
@ -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 {
|
||||||
|
|||||||
@ -65,7 +65,7 @@ const INIT_FORM = {
|
|||||||
czyid: "",
|
czyid: "",
|
||||||
gzrq: "",
|
gzrq: "",
|
||||||
gmfy: "",
|
gmfy: "",
|
||||||
sbzt: "",
|
sbzt: "完好",
|
||||||
sccj: "",
|
sccj: "",
|
||||||
sfyjsb: "",
|
sfyjsb: "",
|
||||||
sfnrsjbz: "",
|
sfnrsjbz: "",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user