Commit d31cf9ad authored by “yiyousong”'s avatar “yiyousong”

pref:修改跳转详情页

parent 9da7db52
...@@ -18,6 +18,13 @@ export default { ...@@ -18,6 +18,13 @@ export default {
linkDom: null, // 换皮 linkDom: null, // 换皮
}; };
}, },
watch: {
"$route.path"(newVal) {
if (newVal == "/" || newVal == "/home") {
this.getHomeInfo();
}
},
},
created() { created() {
this.getInfo(); this.getInfo();
// 开发环境 // 开发环境
......
...@@ -18,9 +18,9 @@ ...@@ -18,9 +18,9 @@
> >
<div <div
class="matterDatumList-item flex flexc aic" class="matterDatumList-item flex flexc aic"
v-for="(v, i) in matterInfo.matterDatumList" v-for="v in matterInfo.matterDatumList"
:key="v.id" :key="v.id"
@click="handleCheck(i)" @click="handleCheck(v)"
> >
<div class="pic-box"> <div class="pic-box">
<div class="pic-img-box"> <div class="pic-img-box">
...@@ -84,13 +84,13 @@ export default { ...@@ -84,13 +84,13 @@ export default {
}, },
}, },
methods: { methods: {
handleCheck(index) { handleCheck(row) {
this.$router.push({ this.$router.push({
path: "/showMaterials", path: "/showMaterials",
query: { query: {
matterName: this.matterInfo.matterName, matterName: this.matterInfo.matterName,
matterId: this.matterInfo.id, matterId: this.matterInfo.id,
index, id: row.id,
}, },
}); });
}, },
......
...@@ -98,7 +98,7 @@ ...@@ -98,7 +98,7 @@
<img v-if="i < 3" :src="checkTopImg(i)" /> <img v-if="i < 3" :src="checkTopImg(i)" />
<span v-else>{{ i + 1 }}.</span> <span v-else>{{ i + 1 }}.</span>
</div> </div>
<p class="flex1" v-ellipsis @click="checkMaterial(i, v)"> <p class="flex1" v-ellipsis @click="checkMaterial(v)">
{{ v.materialName ? v.materialName : v.materiaFullName }} {{ v.materialName ? v.materialName : v.materiaFullName }}
</p> </p>
</div> </div>
...@@ -299,12 +299,12 @@ export default { ...@@ -299,12 +299,12 @@ export default {
this.visible = true; this.visible = true;
}, },
// 查看材料 // 查看材料
checkMaterial(index, row) { checkMaterial(row) {
this.$router.push({ this.$router.push({
path: "/showmaterials", path: "/showmaterials",
query: { query: {
matterId: row.matterId, matterId: row.matterId,
index, id: row.id,
}, },
}); });
}, },
......
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
:key="v.id" :key="v.id"
@click="active = i" @click="active = i"
> >
{{ v.materiaFullName }} {{ v.materialName ? v.materialName : v.materiaFullName }}
<div class="line"></div> <div class="line"></div>
</div> </div>
</div> </div>
...@@ -145,7 +145,8 @@ export default { ...@@ -145,7 +145,8 @@ export default {
}; };
}); });
this.materailsList = data; this.materailsList = data;
this.active = +this.$route.query.index; let id = this.$route.query.id;
this.active = this.materailsList.findIndex((v) => v.id == id);
}, },
// 放大 // 放大
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment