冰雪专题App端 物资管理 添加和详情
This commit is contained in:
parent
cbf4e4e327
commit
81412db42f
@ -13,15 +13,24 @@
|
|||||||
style="font-size: 18px; font-weight: bold; line-height: inherit"
|
style="font-size: 18px; font-weight: bold; line-height: inherit"
|
||||||
>
|
>
|
||||||
</van-cell>
|
</van-cell>
|
||||||
<van-cell :title="'物资名称: ' + wzDetailData.wzmc"> </van-cell>
|
<van-cell :title="'物资名称: ' + wzDetailData.wzmc">
|
||||||
<van-cell :title="'数量: ' + wzDetailData.sl"> </van-cell>
|
<template #right-icon>
|
||||||
<van-cell :title="'余量: ' + wzDetailData.ye"> </van-cell>
|
<van-image
|
||||||
<van-cell :title="'单位: ' + wzDetailData.dw"> </van-cell>
|
:src="photos[0]?.photoUrl"
|
||||||
<van-cell :title="'存放地点: ' + wzDetailData.cfdd"> </van-cell>
|
fit="cover"
|
||||||
<van-cell :title="'区县名称: ' + wzDetailData.qxmc"> </van-cell>
|
width="100px"
|
||||||
|
@click="showImage(photos)"
|
||||||
|
></van-image>
|
||||||
|
</template>
|
||||||
|
</van-cell>
|
||||||
|
<van-cell :title="'余量: ' + wzDetailData.ye + ' ' + wzDetailData.dw">
|
||||||
|
</van-cell>
|
||||||
|
<van-cell :title="'物资经度: ' + wzDetailData.jd"> </van-cell>
|
||||||
|
<van-cell :title="'物资纬度: ' + wzDetailData.wd"> </van-cell>
|
||||||
<van-cell :title="'负责人: ' + wzDetailData.fzr"> </van-cell>
|
<van-cell :title="'负责人: ' + wzDetailData.fzr"> </van-cell>
|
||||||
<van-cell :title="'联系电话: ' + wzDetailData.lxdh"> </van-cell>
|
<van-cell :title="'入库日期: ' + wzDetailData.rksj"> </van-cell>
|
||||||
<van-cell :title="'入库日期: ' + wzDetailData.rkrq"> </van-cell>
|
<van-cell :title="'所属养护站: ' + wzDetailData.yhzMc"> </van-cell>
|
||||||
|
<van-cell :title="'备注: ' + wzDetailData.remark"> </van-cell>
|
||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -32,7 +41,7 @@ import "vant/es/toast/style";
|
|||||||
import "vant/es/popup/style";
|
import "vant/es/popup/style";
|
||||||
import { ref, onMounted, toRaw, reactive } from "vue";
|
import { ref, onMounted, toRaw, reactive } from "vue";
|
||||||
import { useRouter, useRoute } from "vue-router";
|
import { useRouter, useRoute } from "vue-router";
|
||||||
import { showToast, showLoadingToast } from "vant";
|
import { showToast, showLoadingToast, showImagePreview } from "vant";
|
||||||
import { request } from "../../../../shared/utils/request";
|
import { request } from "../../../../shared/utils/request";
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
@ -41,6 +50,7 @@ const route = useRoute();
|
|||||||
const yhzDetail = ref({});
|
const yhzDetail = ref({});
|
||||||
const wzData = ref([]);
|
const wzData = ref([]);
|
||||||
const wzDetailData = ref({}); // 物资详情数据
|
const wzDetailData = ref({}); // 物资详情数据
|
||||||
|
const photos = ref([]); // 物资图片数据
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
const data = JSON.parse(decodeURIComponent(route.params.data));
|
const data = JSON.parse(decodeURIComponent(route.params.data));
|
||||||
@ -59,6 +69,7 @@ const getwzDetail = async () => {
|
|||||||
});
|
});
|
||||||
if (res.code && res.code === "00000") {
|
if (res.code && res.code === "00000") {
|
||||||
wzDetailData.value = res.data.material;
|
wzDetailData.value = res.data.material;
|
||||||
|
photos.value = res.data.photos;
|
||||||
} else {
|
} else {
|
||||||
throw new Error(res.message);
|
throw new Error(res.message);
|
||||||
}
|
}
|
||||||
@ -77,6 +88,14 @@ const onClickLeft = () => {
|
|||||||
params: { data: encodeURIComponent(JSON.stringify(yhzDetail.value)) },
|
params: { data: encodeURIComponent(JSON.stringify(yhzDetail.value)) },
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const showImage = (photos) => {
|
||||||
|
const photosArr = photos.map((item) => item.photoUrl);
|
||||||
|
showImagePreview({
|
||||||
|
images: photosArr,
|
||||||
|
closeable: true,
|
||||||
|
});
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user