抽离列表弹窗为新窗口并去掉网站进来时的loading效果

This commit is contained in:
熊丽君
2021-08-10 11:00:58 +08:00
parent 3e922d69ce
commit 83bb450a22
5 changed files with 371 additions and 214 deletions

View File

@ -13,13 +13,24 @@
<el-divider></el-divider>
<div class="item_i" v-for="(item, index2) in value" :key="index2">
<div>
<h4 class="pointer" @click="handleItem(key, item.id)">
{{ item.title }}
<h4 class="pointer">
<router-link
target="_blank"
:to="{ path: '/result', query: { key, id: item.id } }"
>{{ item.title }}</router-link
>
</h4>
<div class="info" v-if="key == 'policy' || key == 'policyRead'">
<div>来源{{ item.source }}</div>
<div>发布{{ item.listDate }}</div>
</div>
<div
class="info"
style="justify-content: flex-end"
v-if="key == 'information'"
>
<div>发布{{ parseTime(item.listDate, '{y}-{m}-{d}') }}</div>
</div>
<div
class="info"
v-else-if="key == 'companyNeed' || key == 'scienceResult'"
@ -83,38 +94,7 @@ export default {
},
deep: true
},
methods: {
handleItem(key, id) {
this.type = key;
this.dialogVisible = true;
if (key == 'policy') {
// 政策
getPolicyInfo({ policyId: id }).then(({ data }) => {
this.formData = data;
});
} else if (key == 'policyRead') {
// 政策解读
getPolicyReadInfo({ readId: id }).then(({ data }) => {
this.formData = data;
});
} else if (key == 'information') {
// 资讯快报
getInfo({ id }).then(({ data }) => {
this.formData = data;
});
} else if (key == 'companyNeed') {
// 企业需求
getInfo2({ id }).then(({ data }) => {
this.formData = data;
});
} else if (key == 'scienceResult') {
// 科学成功
getInfo3({ id }).then(({ data }) => {
this.formData = data;
});
}
}
},
methods: {},
created() {
let { val: param } = this.$route.query;
search({ param }).then(({ data }) => {