From d3c63720894bd25e88b6e3b7094e1bf678da33f3 Mon Sep 17 00:00:00 2001 From: cxc Date: Mon, 11 Apr 2022 21:20:23 +0800 Subject: [PATCH] bugfix --- src/views/components/footer/index.vue | 4 +-- src/views/home/home.vue | 52 ++++++++++++++++++++------- src/views/index.vue | 44 +++++++++++++++++++---- src/views/portrait.vue | 12 +++++-- src/views/result.vue | 11 +++++- src/views/search.vue | 46 ++++++++++++------------ 6 files changed, 120 insertions(+), 49 deletions(-) diff --git a/src/views/components/footer/index.vue b/src/views/components/footer/index.vue index 2440359..2a509c3 100644 --- a/src/views/components/footer/index.vue +++ b/src/views/components/footer/index.vue @@ -174,8 +174,8 @@ export default { .footer_right { display: flex; .item:nth-child(1) { - font-size: 18px; - color: #333; + // font-size: 18px; + // color: #000; margin-right: 40px; text-align: center; } diff --git a/src/views/home/home.vue b/src/views/home/home.vue index e8bed22..360a0aa 100644 --- a/src/views/home/home.vue +++ b/src/views/home/home.vue @@ -128,8 +128,15 @@ @mouseover=" (queryParams.labelId = '1415156808053559296'), handleClick() " - @click="jumpToDetails('1415156808053559296')" - >政策转发 + > + 政策转发 + 申报通知 + > + 申报通知 + 公示转发 + > + 公示转发 + 公告转发 + > + 公告转发 + @@ -19,7 +27,7 @@
- +
@@ -30,7 +38,7 @@
- +
@@ -47,7 +55,7 @@
+
--> @@ -64,7 +72,7 @@
-
--> + -->
@@ -133,6 +141,27 @@ export default { // } // }, methods: { + setLink(item) { + if (!item.url) { + return + } + const imgEl = this.$refs[`advimg${item.id}`][0] + console.log(imgEl.offsetHeight); + const imgHeight = imgEl.offsetHeight + const imgWidth = imgEl.offsetWidth + const mapEl = document.querySelector(`#advimg${item.id}`) + const urls = item.url.split(',') + // console.log(imgEl); + urls.forEach((url, index) => { + const areaEl = document.createElement('area') + areaEl.href = url + areaEl.coords = `0 ${imgHeight / urls.length * index} ${imgWidth} ${imgHeight / (urls.length - index)}` + mapEl.appendChild(areaEl) + }) + // console.log(urls); + // console.log(mapEl); + // console.log(item); + }, toSearch() { if (!this.input.length) return this.msgError('请输入搜索关键字'); this.$router.push({ path: '/search', query: { val: this.input } }); @@ -187,8 +216,9 @@ export default { // } .couplet { position: fixed; + z-index: 999; top: 30%; - width: 100px; + width: 120px; height: 300px; .couplet-close { width: 43px; diff --git a/src/views/portrait.vue b/src/views/portrait.vue index 6ac6c3a..b249d1c 100644 --- a/src/views/portrait.vue +++ b/src/views/portrait.vue @@ -67,7 +67,7 @@ id: item.id } }" - >{{ item.title }} + >{{ removeBr(item.title) }} {{ item.listDate }} {{ item.createTime }} @@ -176,6 +176,9 @@ export default { ...mapGetters(['token']) }, methods: { + removeBr(str) { + return str && str.replaceAll('
', '') + }, // 获取企业画像数据列表 getPortraitList() { if (this.type == 'policy') { @@ -240,8 +243,11 @@ export default { } else if (key == 'information') { this.getPortraitList(); } else if (key == 'policyNotice') { - // this.queryParams.labelId = this.policyNoticeOptions[0].value; - this.queryParams.labelId = this.$route.query.labelId + if (this.$route.query.labelId) { + this.queryParams.labelId = this.$route.query.labelId + } else { + this.queryParams.labelId = this.policyNoticeOptions[0].value; + } this.getPortraitList(); } else { this.msgError('非法进入'); diff --git a/src/views/result.vue b/src/views/result.vue index 509c7f6..0a0d038 100644 --- a/src/views/result.vue +++ b/src/views/result.vue @@ -35,7 +35,7 @@
-

{{ formData.title }}

+

{{ removeBr(formData.title) }}

来源:{{ formData.source }} 价格:{{ setNumber(formData.price) }} @@ -196,6 +196,10 @@ export default { this.formData.collected = 0; this.msgSuccess('操作成功'); }); + }, + removeBr(str) { + console.log(str); + return str && str.replaceAll('
', '') } }, created() { @@ -227,6 +231,11 @@ export default { this.formData = data; }); } + // this.$nextTick(() => { + // this.formData.title = this.formData.title.replaceAll('
', '') + // }) + + // console.log(this.formData); getRead({ id }).then(({ data }) => { this.total = data; }); diff --git a/src/views/search.vue b/src/views/search.vue index c7573ff..5994be8 100644 --- a/src/views/search.vue +++ b/src/views/search.vue @@ -18,31 +18,23 @@ {{ item.title }} + >{{ item.title }}
来源:{{ item.source }}
发布:{{ item.listDate }}
-
+
发布:{{ parseTime(item.listDate, '{y}-{m}-{d}') }}
-
+
- - {{ item.fieldName }} - - - {{ item.typeName || item.labelName }} - + {{ item.fieldName }} + {{ item.typeName || item.labelName }}
发布:{{ parseTime(item.createTime, '{y}-{m}-{d}') }}
@@ -53,10 +45,12 @@

- 抱歉,没有找到您查询的“{{ - $route.query.val - }}”信息 + 抱歉,没有找到您查询的“ + + {{ + $route.query.val + }} + ”信息

    建议: @@ -73,7 +67,7 @@ :type="type" :formData="formData" @close="dialogVisible = false" - /> --> + />-->