Commit 95eed628 by LJM

bug

parent 01af1f3d
...@@ -294,7 +294,6 @@ export default { ...@@ -294,7 +294,6 @@ export default {
notReadCount: {}, notReadCount: {},
msg_status: '',//消息状态,0-未读,1-已读,-4-已删除 msg_status: '',//消息状态,0-未读,1-已读,-4-已删除
msg_category_id: '',//消息目的地系统下的分类id, 1-关注,2-报价,3-订单,4-系统通知,5-采购提醒不传代表全部 msg_category_id: '',//消息目的地系统下的分类id, 1-关注,2-报价,3-订单,4-系统通知,5-采购提醒不传代表全部
msg_id: '',//记录上一次的id
noticeMsg: [],//系统公告消息 noticeMsg: [],//系统公告消息
total: 0, total: 0,
limit: 10, limit: 10,
...@@ -344,7 +343,7 @@ export default { ...@@ -344,7 +343,7 @@ export default {
}, },
created() { created() {
var self = this var self = this
this.getData(); this.getData();//获取个人信息
this.tabUi(); this.tabUi();
this.getLatestMsg();//获取最新消息 this.getLatestMsg();//获取最新消息
this.getCategoryMsgList();//获取系统公告 this.getCategoryMsgList();//获取系统公告
...@@ -388,12 +387,7 @@ export default { ...@@ -388,12 +387,7 @@ export default {
*/ */
getLatestMsg() { getLatestMsg() {
var msg_id_val = sessionStorage.getItem('msg_id') || ''; var msg_id_val = sessionStorage.getItem('msg_id') || '';
//判断是不是最新的消息 var that = this;
if (msg_id_val) {
if (this.msg_id == msg_id_val) {
return;
}
}
axios.post(NODE_ENVS_MSG + '/get_latest_msg', { axios.post(NODE_ENVS_MSG + '/get_latest_msg', {
page: 1, page: 1,
limit: 1, limit: 1,
...@@ -405,9 +399,16 @@ export default { ...@@ -405,9 +399,16 @@ export default {
let htmlArr = []; let htmlArr = [];
let data = JSON.parse(res.data.list[0].msg_data); let data = JSON.parse(res.data.list[0].msg_data);
sessionStorage.removeItem('msg_id'); sessionStorage.removeItem('msg_id');
sessionStorage.setItem('msg_id', res.data.list[0].id); sessionStorage.setItem('msg_id', res.data.list[0].id);//存储最新id
//判断是不是最新的消息
if (msg_id_val) {
if (res.data.list[0].id == msg_id_val) {
that.countDown();//开启定时轮询
return;
}
}
this.msg_id = res.data.list[0].id;//存储最新id this.msg_id = res.data.list[0].id;//存储最新id
let has_more = data.has_more; let has_more = data.has_more;//判断是否出现更多,样式有区别
let html = ''; let html = '';
if (has_more) { if (has_more) {
html = '<P class="notify-text"><b>' + data.date + '</b><b>' + data.title + '</b><a class="alink" target="_blank" href="' + data.link + '">' + data.title_suffix + '</a><a style="margin-left: 8px" class="alink" target="_blank" href="' + data.has_more + '">更多>>></a></P>'; html = '<P class="notify-text"><b>' + data.date + '</b><b>' + data.title + '</b><a class="alink" target="_blank" href="' + data.link + '">' + data.title_suffix + '</a><a style="margin-left: 8px" class="alink" target="_blank" href="' + data.has_more + '">更多>>></a></P>';
...@@ -424,14 +425,15 @@ export default { ...@@ -424,14 +425,15 @@ export default {
} else { } else {
htmlArr.push(html + '上架有效期到期后,该型号将会从【猎芯网】下架,不再进行展示;并且不参与【猎芯询报价】系统的自动推送询价'); htmlArr.push(html + '上架有效期到期后,该型号将会从【猎芯网】下架,不再进行展示;并且不参与【猎芯询报价】系统的自动推送询价');
} }
this.countDown();
this.$notify({ this.$notify({
title: '提示', title: '提示',
duration: 20000, duration: 20000,
dangerouslyUseHTMLString: true, dangerouslyUseHTMLString: true,
message: htmlArr.join(''), message: htmlArr.join(''),
position: 'bottom-right' position: 'bottom-right',
onClose() {
that.countDown();//开启定时轮询
}
}); });
} else { } else {
......
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
<!--操作区--> <!--操作区-->
<div class="operation-area row verCenter bothSide"> <div class="operation-area row verCenter bothSide">
<div class="operation-button row verCenter"> <div class="operation-button row verCenter">
<!-- <el-button type="primary" @click="updateBrand">编辑商品</el-button>-->
<el-button type="primary" @click="downOut">导出</el-button> <el-button type="primary" @click="downOut">导出</el-button>
<a :href="downHref" ref="downs" target="_blank" style="display:none">下载</a> <a :href="downHref" ref="downs" target="_blank" style="display:none">下载</a>
</div> </div>
...@@ -35,9 +34,9 @@ ...@@ -35,9 +34,9 @@
<div class="data-box th-all" v-if="tableData"> <div class="data-box th-all" v-if="tableData">
<el-table :data="tableData" border max-height="600" @selection-change="handleSelectionChange"> <el-table :data="tableData" border max-height="600" @selection-change="handleSelectionChange">
<el-table-column fixed type="selection" width="40" align="center"></el-table-column> <el-table-column fixed type="selection" width="40" align="center"></el-table-column>
<el-table-column prop="spu_name" label="型号" width="200" :show-overflow-tooltip="true" align="center"></el-table-column> <el-table-column prop="spu_name" label="型号" min-width="200" :show-overflow-tooltip="true" align="center"></el-table-column>
<el-table-column prop="brand_name" label="品牌" width="200" :show-overflow-tooltip="true" align="center"></el-table-column> <el-table-column prop="brand_name" label="品牌" min-width="200" :show-overflow-tooltip="true" align="center"></el-table-column>
<el-table-column prop="brand_name" label="猎芯标准品牌名" width="200" :show-overflow-tooltip="true" align="center"></el-table-column> <el-table-column prop="brand_standard_name" label="猎芯标准品牌名" min-width="200" :show-overflow-tooltip="true" align="center"></el-table-column>
<el-table-column prop="encap" label="封装" width="100" :show-overflow-tooltip="true" align="center"></el-table-column> <el-table-column prop="encap" label="封装" width="100" :show-overflow-tooltip="true" align="center"></el-table-column>
<el-table-column prop="images_l" label="图片" width="130" align="center"> <el-table-column prop="images_l" label="图片" width="130" align="center">
<template slot-scope="scope" v-if="scope.row.images_l"> <template slot-scope="scope" v-if="scope.row.images_l">
...@@ -49,7 +48,6 @@ ...@@ -49,7 +48,6 @@
<a :href="scope.row.pdf" target="_blank" class="pdf"><span class="icon iconfont"></span></a> <a :href="scope.row.pdf" target="_blank" class="pdf"><span class="icon iconfont"></span></a>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="create_time" label="授权书" align="center"></el-table-column>
<el-table-column prop="create_time" label="创建时间" width="140" align="center"></el-table-column> <el-table-column prop="create_time" label="创建时间" width="140" align="center"></el-table-column>
<el-table-column prop="update_time" label="更新时间" width="140" align="center"></el-table-column> <el-table-column prop="update_time" label="更新时间" width="140" align="center"></el-table-column>
</el-table> </el-table>
...@@ -286,7 +284,7 @@ export default { ...@@ -286,7 +284,7 @@ export default {
brand_id: this.formParam.brand_id, brand_id: this.formParam.brand_id,
class_id2: this.formParam.class_id2, class_id2: this.formParam.class_id2,
class_id1: this.formParam.class_id1, class_id1: this.formParam.class_id1,
keyword: this.formParam.keyword, keyword: this.formParam.keyword
}).then(res => { }).then(res => {
if (res.code == 0) { if (res.code == 0) {
this.disabled = true; this.disabled = true;
...@@ -332,7 +330,6 @@ export default { ...@@ -332,7 +330,6 @@ export default {
this.$message('网络出现问题,请检查网络'); this.$message('网络出现问题,请检查网络');
this.disabled = false this.disabled = false
}) })
}, },
handleSizeChange(val) { handleSizeChange(val) {
this.limit = val; this.limit = val;
......
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
<a href="javascript:;" class="alink" @click="view(scope.row)">{{ scope.row.title }}</a> <a href="javascript:;" class="alink" @click="view(scope.row)">{{ scope.row.title }}</a>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="content" label="消息内容" :show-overflow-tooltip="true" align="center"></el-table-column>
<el-table-column prop="attach_file" label="附件" :show-overflow-tooltip="true" align="center"> <el-table-column prop="attach_file" label="附件" :show-overflow-tooltip="true" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<a :href="scope.row.attachment_url" class="alink" target="_blank" v-if="scope.row.attachment_name">{{ scope.row.attachment_name }}</a> <a :href="scope.row.attachment_url" class="alink" target="_blank" v-if="scope.row.attachment_name">{{ scope.row.attachment_name }}</a>
......
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 sign in to comment