|
@@ -5,7 +5,12 @@
|
|
|
left-text="返回"
|
|
|
left-arrow
|
|
|
@click-left="onClickLeft"
|
|
|
- />
|
|
|
+ @click-right="onClickRight"
|
|
|
+ >
|
|
|
+ <template #right>
|
|
|
+ <van-icon name="plus" />
|
|
|
+ </template>
|
|
|
+ </van-nav-bar>
|
|
|
<div class="body">
|
|
|
<van-dropdown-menu>
|
|
|
<van-dropdown-item v-model="value1" :options="option1" />
|
|
@@ -22,19 +27,30 @@
|
|
|
>
|
|
|
<div
|
|
|
style="padding: 10px 10px; padding-bottom: 0"
|
|
|
- v-for="item in maintainlist" @click="gotodetail(item)"
|
|
|
+ v-for="item in maintainlist"
|
|
|
+ @click="gotodetail(item)"
|
|
|
>
|
|
|
<div class="item">
|
|
|
<div>
|
|
|
<div class="header">
|
|
|
- <div>计划名称:{{ alldevices.filter((i) => i.id === item.facilitiesId)[0]
|
|
|
- ?.roadName ?? "-" }}养护计划</div>
|
|
|
+ <div>
|
|
|
+ 计划名称:{{
|
|
|
+ alldevices.filter((i) => i.id === item.facilitiesId)[0]
|
|
|
+ ?.roadName ?? "-"
|
|
|
+ }}养护计划
|
|
|
+ </div>
|
|
|
<div class="time">{{ item.maintainTime }}</div>
|
|
|
</div>
|
|
|
<div class="body">
|
|
|
- <div class="status">{{maintain_status.filter(
|
|
|
- (i) => i.value.toString() === (item.status??"").toString()
|
|
|
- )[0]?.label ?? "-"}}</div>
|
|
|
+ <div class="status">
|
|
|
+ {{
|
|
|
+ maintain_status.filter(
|
|
|
+ (i) =>
|
|
|
+ i.value.toString() ===
|
|
|
+ (item.status ?? "").toString()
|
|
|
+ )[0]?.label ?? "-"
|
|
|
+ }}
|
|
|
+ </div>
|
|
|
|
|
|
<van-row>
|
|
|
<van-col span="24"
|
|
@@ -48,8 +64,12 @@
|
|
|
}}
|
|
|
</div></van-col
|
|
|
>
|
|
|
- <van-col span="12"> <div>计划年:{{item.maintainYear}}</div></van-col>
|
|
|
- <van-col span="12"><div>计划月:{{item.maintainMonth}}</div></van-col>
|
|
|
+ <van-col span="12">
|
|
|
+ <div>计划年:{{ item.maintainYear }}</div></van-col
|
|
|
+ >
|
|
|
+ <van-col span="12"
|
|
|
+ ><div>计划月:{{ item.maintainMonth }}</div></van-col
|
|
|
+ >
|
|
|
<van-col span="24"
|
|
|
><div>养护单位: {{ item.maintainUnit }}</div></van-col
|
|
|
>
|
|
@@ -83,8 +103,9 @@ const loading = ref(false);
|
|
|
const finished = ref(false);
|
|
|
const refreshing = ref(false);
|
|
|
|
|
|
-const { maintain_status,maintain_type } = useDict(
|
|
|
- "maintain_status","maintain_type"
|
|
|
+const { maintain_status, maintain_type } = useDict(
|
|
|
+ "maintain_status",
|
|
|
+ "maintain_type"
|
|
|
);
|
|
|
|
|
|
const bodyheight = ref(0);
|
|
@@ -96,9 +117,11 @@ const option1 = [
|
|
|
{ text: "全部", value: 1 },
|
|
|
];
|
|
|
const option2 = computed(() => {
|
|
|
- return [{ text: "全部", value: "0" }].concat(maintain_status.value.map((i) => {
|
|
|
- return { text: i.label, value: i.value };
|
|
|
- }));
|
|
|
+ return [{ text: "全部", value: "0" }].concat(
|
|
|
+ maintain_status.value.map((i) => {
|
|
|
+ return { text: i.label, value: i.value };
|
|
|
+ })
|
|
|
+ );
|
|
|
});
|
|
|
const alldevices = ref([]);
|
|
|
listFacilities().then((res) => {
|
|
@@ -113,8 +136,8 @@ const onLoad = () => {
|
|
|
pagec.value = 1;
|
|
|
}
|
|
|
var p = { pageSize: 10, pageNum: pagec.value++ };
|
|
|
- if (value2.value !== '0') {
|
|
|
- p['status'] =parseInt(value2.value)
|
|
|
+ if (value2.value !== "0") {
|
|
|
+ p["status"] = parseInt(value2.value);
|
|
|
}
|
|
|
listMaintain(p).then((res) => {
|
|
|
// finished.value = true;
|
|
@@ -127,10 +150,13 @@ const onLoad = () => {
|
|
|
console.log("----");
|
|
|
};
|
|
|
|
|
|
-watch(() => value2.value, () => {
|
|
|
- refreshing.value = true;
|
|
|
- onLoad();
|
|
|
-})
|
|
|
+watch(
|
|
|
+ () => value2.value,
|
|
|
+ () => {
|
|
|
+ refreshing.value = true;
|
|
|
+ onLoad();
|
|
|
+ }
|
|
|
+);
|
|
|
|
|
|
const onRefresh = () => {
|
|
|
// 清空列表数据
|
|
@@ -143,9 +169,12 @@ const onRefresh = () => {
|
|
|
const onClickLeft = () => {
|
|
|
router.back();
|
|
|
};
|
|
|
+const onClickRight = () => {
|
|
|
+ alert("add");
|
|
|
+};
|
|
|
const gotodetail = (item) => {
|
|
|
router.push(`/mb/maintain/detail/${item.id}`);
|
|
|
-}
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss">
|
|
@@ -160,7 +189,7 @@ body {
|
|
|
|
|
|
.item {
|
|
|
background: #fff;
|
|
|
- border: 1px solid rgba(209, 217, 221,0.4);
|
|
|
+ border: 1px solid rgba(209, 217, 221, 0.4);
|
|
|
padding: 10px 15px;
|
|
|
font-size: 10px;
|
|
|
border-radius: 5px;
|
|
@@ -169,7 +198,7 @@ body {
|
|
|
font-weight: bold;
|
|
|
position: relative;
|
|
|
padding-bottom: 8px;
|
|
|
- border-bottom: 1px solid rgba(209, 217, 221,0.4);
|
|
|
+ border-bottom: 1px solid rgba(209, 217, 221, 0.4);
|
|
|
.time {
|
|
|
position: absolute;
|
|
|
right: 0;
|