Merge branch 'dev' of http://222.212.85.86:8222/bdzl2/bxztApp into dev
This commit is contained in:
commit
ce9614295d
@ -36,8 +36,6 @@ const routes = [
|
||||
name: 'MaterialDetail',
|
||||
component: () => import('../views//Material/MaterialDetails.vue')
|
||||
},
|
||||
{
|
||||
}
|
||||
]
|
||||
|
||||
const router = createRouter({
|
||||
|
||||
@ -1,87 +1,116 @@
|
||||
<template>
|
||||
<div class="home">
|
||||
<van-nav-bar title="物资管理" fixed left-arrow @click-left="onClickLeft" />
|
||||
|
||||
<div class="home">
|
||||
<van-nav-bar title="物资管理" fixed left-arrow @click-left="onClickLeft" />
|
||||
|
||||
<van-cell-group>
|
||||
<van-cell title="当前站点" :value="yhzDetail.mc" />
|
||||
</van-cell-group>
|
||||
|
||||
<div class="content">
|
||||
<van-cell-group>
|
||||
<van-cell title="当前站点" :value="yhzDetail.mc" />
|
||||
<van-cell
|
||||
title="物资信息"
|
||||
style="font-size: 18px; font-weight: bold; line-height: inherit"
|
||||
>
|
||||
</van-cell>
|
||||
<van-cell :title="'物资名称: ' + wzDetailData.wzmc"> </van-cell>
|
||||
<van-cell :title="'数量: ' + wzDetailData.sl"> </van-cell>
|
||||
<van-cell :title="'余量: ' + wzDetailData.ye"> </van-cell>
|
||||
<van-cell :title="'单位: ' + wzDetailData.dw"> </van-cell>
|
||||
<van-cell :title="'存放地点: ' + wzDetailData.cfdd"> </van-cell>
|
||||
<van-cell :title="'区县名称: ' + wzDetailData.qxmc"> </van-cell>
|
||||
<van-cell :title="'负责人: ' + wzDetailData.fzr"> </van-cell>
|
||||
<van-cell :title="'联系电话: ' + wzDetailData.lxdh"> </van-cell>
|
||||
<van-cell :title="'入库日期: ' + wzDetailData.rkrq"> </van-cell>
|
||||
</van-cell-group>
|
||||
|
||||
<div class="content">
|
||||
<van-cell-group>
|
||||
<van-cell
|
||||
title="物资信息"
|
||||
style="font-size: 18px; font-weight: bold; line-height: inherit"
|
||||
>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import "vant/es/toast/style";
|
||||
import "vant/es/popup/style";
|
||||
import { ref, onMounted, toRaw, reactive } from "vue";
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
import { showToast, showLoadingToast } from "vant";
|
||||
import { request } from "../../../../shared/utils/request";
|
||||
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
import "vant/es/toast/style";
|
||||
import "vant/es/popup/style";
|
||||
import { ref, onMounted, toRaw, reactive } from "vue";
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
import { showToast, showLoadingToast } from "vant";
|
||||
import { request } from "../../../../shared/utils/request";
|
||||
|
||||
const yhzDetail = ref({});
|
||||
const wzData = ref([]);
|
||||
const wzDetailData = ref({}); // 物资详情数据
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
|
||||
|
||||
onMounted(() => {
|
||||
const data = JSON.parse(decodeURIComponent(route.params.data));
|
||||
yhzDetail.value = data.yhzDetail;
|
||||
wzData.value = data.material;
|
||||
console.log('传递过来的参数:',data);
|
||||
|
||||
});
|
||||
|
||||
const onClickLeft = () => {
|
||||
router.push({
|
||||
name: "MaterialManage",
|
||||
params: { data: encodeURIComponent(JSON.stringify(yhzDetail.value)) },
|
||||
const yhzDetail = ref({});
|
||||
const wzData = ref([]);
|
||||
const wzDetailData = ref({}); // 物资详情数据
|
||||
|
||||
onMounted(() => {
|
||||
const data = JSON.parse(decodeURIComponent(route.params.data));
|
||||
yhzDetail.value = data.yhzDetail;
|
||||
wzData.value = data.material;
|
||||
console.log("传递过来的参数:", data);
|
||||
getwzDetail();
|
||||
});
|
||||
|
||||
// 获取物资详情
|
||||
const getwzDetail = async () => {
|
||||
try {
|
||||
const res = await request({
|
||||
url: `/snow-ops-platform/yjwz/getById?rid=${wzData.value.rid}`,
|
||||
method: "GET",
|
||||
});
|
||||
};
|
||||
</script>
|
||||
if (res.code && res.code === "00000") {
|
||||
wzDetailData.value = res.data;
|
||||
} else {
|
||||
throw new Error(res.message);
|
||||
}
|
||||
} catch (error) {
|
||||
showToast({
|
||||
message: error.message,
|
||||
type: "error",
|
||||
});
|
||||
console.log("error", error);
|
||||
}
|
||||
};
|
||||
|
||||
const onClickLeft = () => {
|
||||
router.push({
|
||||
name: "MaterialManage",
|
||||
params: { data: encodeURIComponent(JSON.stringify(yhzDetail.value)) },
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.home {
|
||||
padding-top: var(--van-nav-bar-height); /* 自动匹配导航栏高度 */
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
.grid {
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
.btn {
|
||||
margin-top: 24px;
|
||||
}
|
||||
|
||||
.status-tag {
|
||||
display: inline-block;
|
||||
padding: 3px 8px;
|
||||
border-radius: 4px;
|
||||
color: white;
|
||||
font-size: 12px;
|
||||
}
|
||||
.status-good {
|
||||
background-color: #07c160;
|
||||
}
|
||||
.status-warning {
|
||||
background-color: #ff976a;
|
||||
}
|
||||
.status-danger {
|
||||
background-color: #ee0a24;
|
||||
}
|
||||
</style>
|
||||
.home {
|
||||
padding-top: var(--van-nav-bar-height); /* 自动匹配导航栏高度 */
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
.grid {
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
.btn {
|
||||
margin-top: 24px;
|
||||
}
|
||||
|
||||
.status-tag {
|
||||
display: inline-block;
|
||||
padding: 3px 8px;
|
||||
border-radius: 4px;
|
||||
color: white;
|
||||
font-size: 12px;
|
||||
}
|
||||
.status-good {
|
||||
background-color: #07c160;
|
||||
}
|
||||
.status-warning {
|
||||
background-color: #ff976a;
|
||||
}
|
||||
.status-danger {
|
||||
background-color: #ee0a24;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -18,15 +18,20 @@ const routes = [
|
||||
component: () => import('../views/ServiceStationManagePage/index.vue')
|
||||
},
|
||||
{
|
||||
path: '/yhzsb/:data',
|
||||
path: '/yhzsb/:data?',
|
||||
name: 'yhzsb',
|
||||
component: () => import('../views/EquipmentManagement/index.vue')
|
||||
},
|
||||
{
|
||||
path: '/yhzwz/:data',
|
||||
path: '/yhzwz/:data?',
|
||||
name: 'yhzwz',
|
||||
component: () => import('../views/MaterialManagement/index.vue')
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/yhzevent',
|
||||
name: 'yhzevent',
|
||||
component: () => import('../views/SnowEventManagement/index.vue')
|
||||
},
|
||||
]
|
||||
|
||||
const router = createRouter({
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
import { h, ref, onMounted, reactive, watch, toRaw, nextTick } from "vue";
|
||||
import { request } from "@/utils/request";
|
||||
import { Search } from "@element-plus/icons-vue";
|
||||
import DetailDialog from "./detailDialog.vue";
|
||||
import EditDialog from "./editDialog.vue";
|
||||
import AddDialog from "./addDialog.vue";
|
||||
// import DetailDialog from "./detailDialog.vue";
|
||||
// import EditDialog from "./editDialog.vue";
|
||||
// import AddDialog from "./addDialog.vue";
|
||||
import { useRoute } from 'vue-router'
|
||||
|
||||
const treeData = ref([]);
|
||||
@ -17,7 +17,9 @@ const tableData = ref([]);
|
||||
const qxmc = ref(''); // 区县名称
|
||||
const yhzid = ref(''); // 养护站id
|
||||
const filterData = reactive({
|
||||
wzmc: '',
|
||||
routeNo: '', // 线路编号
|
||||
stakeNo: '', // 桩号
|
||||
reportTime: '', // 填报时间
|
||||
}); // 表格过滤条件
|
||||
const pagination = reactive({
|
||||
current: 1,
|
||||
@ -94,7 +96,7 @@ const getTreeData = async () => {
|
||||
type: 'area',
|
||||
children: sites.map(site => ({
|
||||
id: site.id,
|
||||
name: `${site.mc}(${site.wzsl})`,
|
||||
name: `${site.mc}`,
|
||||
type: 'site'
|
||||
})),
|
||||
rawName: areaName // 原始名称
|
||||
@ -130,18 +132,21 @@ const handleNodeClick = (data, node) => {
|
||||
}
|
||||
};
|
||||
|
||||
// 获取养护站物资列表
|
||||
const getyhzwzList = async (qxmc, yhzid, filterData) => {
|
||||
// 获取养护站冰雪事件列表
|
||||
const getyhzeventList = async (qxmc, yhzid, filterData) => {
|
||||
try {
|
||||
const data = {
|
||||
qxmc: qxmc,
|
||||
yhzid: yhzid,
|
||||
wzmc: filterData?.wzmc || '',
|
||||
routeNo: filterData?.routeNo || '',
|
||||
stakeNo: filterData?.stakeNo || '',
|
||||
reportTimeStart: filterData?.reportTime[0] || '',
|
||||
reportTimeEnd: filterData?.reportTime[1] || '',
|
||||
pageNum: pagination.current,
|
||||
pageSize: pagination.pageSize,
|
||||
}
|
||||
const res = await request({
|
||||
url: '/snow-ops-platform/yjwz/list',
|
||||
url: '/snow-ops-platform/event/list',
|
||||
method: 'GET',
|
||||
params: data,
|
||||
})
|
||||
@ -251,7 +256,7 @@ const columns = [
|
||||
});
|
||||
if (res.code === '00000') {
|
||||
ElMessage.success('删除成功');
|
||||
getyhzwzList(qxmc.value, yhzid.value, filterData);
|
||||
getyhzeventList(qxmc.value, yhzid.value, filterData);
|
||||
} else {
|
||||
throw new Error(res.message);
|
||||
}
|
||||
@ -281,7 +286,7 @@ const handleEdit = async () => {
|
||||
ElMessage.success('编辑成功');
|
||||
dialogType.value = '';
|
||||
modelVisible.value = false;
|
||||
getyhzwzList(qxmc.value, yhzid.value, filterData);
|
||||
getyhzeventList(qxmc.value, yhzid.value, filterData);
|
||||
} else {
|
||||
throw new Error(res.message);
|
||||
}
|
||||
@ -371,7 +376,7 @@ const openAddModel = () => {
|
||||
ElMessage.success('新增成功');
|
||||
dialogType.value = '';
|
||||
modelVisible.value = false;
|
||||
getyhzwzList(qxmc.value, yhzid.value, filterData);
|
||||
getyhzeventList(qxmc.value, yhzid.value, filterData);
|
||||
} else {
|
||||
throw new Error(res.message);
|
||||
}
|
||||
@ -427,7 +432,7 @@ export default () => {
|
||||
watch(
|
||||
[() => filterData, qxmc, yhzid],
|
||||
([newFilterData, newQxmc, newYhzid]) => {
|
||||
getyhzwzList(newQxmc, newYhzid, newFilterData)
|
||||
getyhzeventList(newQxmc, newYhzid, newFilterData)
|
||||
},
|
||||
{ deep: true }
|
||||
)
|
||||
@ -437,7 +442,7 @@ export default () => {
|
||||
|
||||
onMounted(async () => {
|
||||
await getTreeData();
|
||||
await getyhzwzList();
|
||||
await getyhzeventList();
|
||||
const rowData = JSON.parse(decodeURIComponent(route.params.data));
|
||||
if (rowData) {
|
||||
filterText.value = rowData.mc;
|
||||
|
||||
@ -22,14 +22,22 @@
|
||||
<div class="right-form">
|
||||
<div class="select-box">
|
||||
<div class="inline-flex">
|
||||
<label>物资名称:</label>
|
||||
<el-input v-model="script.filterData.wzmc"></el-input>
|
||||
<label>线路编号:</label>
|
||||
<el-input v-model="script.filterData.routeNo"></el-input>
|
||||
</div>
|
||||
<div class="inline-flex">
|
||||
<label>桩号:</label>
|
||||
<el-input v-model="script.filterData.stakeNo"></el-input>
|
||||
</div>
|
||||
<div class="inline-flex">
|
||||
<label>填报时间:</label>
|
||||
<el-input v-model="script.filterData.reportTime"></el-input>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-box">
|
||||
<div class="event-box">
|
||||
<el-button type="primary" size="large" @click="script.openAddModel"
|
||||
>新增物资</el-button
|
||||
<el-button type="primary" size="large" @click="script.generateReport"
|
||||
>生成报告</el-button
|
||||
>
|
||||
<el-button type="info" size="large" @click="script.handelExport"
|
||||
>导出</el-button
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user