Commit 306b20a9 by LJM

bug

parent faff67be
...@@ -425,60 +425,62 @@ export default { ...@@ -425,60 +425,62 @@ export default {
}).then((res) => { }).then((res) => {
if (res.code === 0) { if (res.code === 0) {
let htmlArr = []; let htmlArr = [];
let data = JSON.parse(res.data.list[0].msg_data); if (res.data.list.length > 0) {
sessionStorage.removeItem('msg_id'); let data = JSON.parse(res.data.list[0].msg_data);
sessionStorage.setItem('msg_id', res.data.list[0].id);//存储最新id sessionStorage.removeItem('msg_id');
//判断是不是最新的消息 sessionStorage.setItem('msg_id', res.data.list[0].id);//存储最新id
if (msg_id_val) { //判断是不是最新的消息
if (res.data.list[0].id == msg_id_val) { if (msg_id_val) {
that.countDown();//开启定时轮询 if (res.data.list[0].id == msg_id_val) {
return; 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 = ''; let cate_id = data.cate_id;//记录tab切换id
let cate_id = data.cate_id; let colorStyle = '';
let colorStyle = ''; //定义颜色提醒
//定义颜色提醒 if (cate_id) {
if (cate_id) { if (cate_id == 6) {
if (cate_id == 6) { colorStyle = 'color:' + this.color_arr[0].value;
colorStyle = 'color:' + this.color_arr[0].value; } else if (cate_id == 7) {
} else if (cate_id == 7) { colorStyle = 'color:' + this.color_arr[1].value;
colorStyle = 'color:' + this.color_arr[1].value; } else if (cate_id == 8) {
} else if (cate_id == 8) { colorStyle = 'color:' + this.color_arr[2].value;
colorStyle = 'color:' + this.color_arr[2].value; } else if (cate_id == 9) {
} else if (cate_id == 9) { colorStyle = 'color:' + this.color_arr[3].value;
colorStyle = 'color:' + this.color_arr[3].value; } else {
colorStyle = 'color:' + this.color_arr[0].value;
}
}
if (has_more) {
html = '<P class="notify-text"><b>' + data.date + '</b><b>' + data.title + '</b><a style="' + colorStyle + '" target="_blank" href="' + data.link + '">' + data.title_suffix + '</a><a style="margin-left: 8px;" class="alink" target="_blank" href="' + data.has_more + '">更多>>></a></P>';
} else { } else {
colorStyle = 'color:' + this.color_arr[0].value; html = '<P class="notify-text"><b>' + data.date + '</b><b>' + data.title + '</b><a style="' + colorStyle + '" target="_blank" href="' + data.link + '">' + data.title_suffix + '</a></P>';
} }
} if (data.content.length > 0) {
if (has_more) { htmlArr.push(html +
html = '<P class="notify-text"><b>' + data.date + '</b><b>' + data.title + '</b><a style="' + colorStyle + '" target="_blank" href="' + data.link + '">' + data.title_suffix + '</a><a style="margin-left: 8px;" class="alink" target="_blank" href="' + data.has_more + '">更多>>></a></P>'; '<p>' + data.content[0].name + '' + data.content[0].value + '</p>' +
} else { '<p>' + data.content[1].name + '' + data.content[1].value + '</p>' +
html = '<P class="notify-text"><b>' + data.date + '</b><b>' + data.title + '</b><a style="' + colorStyle + '" target="_blank" href="' + data.link + '">' + data.title_suffix + '</a></P>'; '<p>' + data.content[2].name + '' + data.content[2].value + '</p>' +
} '<p>' + data.content[3].name + '' + data.content[3].value + '</p>' +
if (data.content.length > 0) { '<p>' + data.content[4].name + '' + data.content[4].value + '</p>');
htmlArr.push(html + } else {
'<p>' + data.content[0].name + '' + data.content[0].value + '</p>' + htmlArr.push(html + '上架有效期到期后,该型号将会从【猎芯网】下架,不再进行展示;并且不参与【猎芯询报价】系统的自动推送询价');
'<p>' + data.content[1].name + '' + data.content[1].value + '</p>' +
'<p>' + data.content[2].name + '' + data.content[2].value + '</p>' +
'<p>' + data.content[3].name + '' + data.content[3].value + '</p>' +
'<p>' + data.content[4].name + '' + data.content[4].value + '</p>');
} else {
htmlArr.push(html + '上架有效期到期后,该型号将会从【猎芯网】下架,不再进行展示;并且不参与【猎芯询报价】系统的自动推送询价');
}
this.$notify({
title: '提示',
duration: 20000,
dangerouslyUseHTMLString: true,
message: htmlArr.join(''),
position: 'bottom-right',
onClose() {
that.countDown();//开启定时轮询
} }
}); this.$notify({
title: '提示',
duration: 20000,
dangerouslyUseHTMLString: true,
message: htmlArr.join(''),
position: 'bottom-right',
onClose() {
that.countDown();//开启定时轮询
}
});
}
} else { } else {
this.$message({ this.$message({
message: res.msg, message: res.msg,
......
...@@ -87,10 +87,10 @@ ...@@ -87,10 +87,10 @@
<el-table-column prop="quote_num" label="报价数" width="80" :show-overflow-tooltip="true" align="center"></el-table-column> <el-table-column prop="quote_num" label="报价数" width="80" :show-overflow-tooltip="true" align="center"></el-table-column>
<el-table-column prop="i_status" label="状态" width="100" :show-overflow-tooltip="true" align="center"> <el-table-column prop="i_status" label="状态" width="100" :show-overflow-tooltip="true" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.i_status==2" class="f-green">已报价</span> <el-tag v-if="scope.row.i_status==2" type="success">已报价</el-tag>
<span v-else-if="scope.row.i_status==1" class="f-yellow1">待报价</span> <el-tag v-else-if="scope.row.i_status==1">待报价</el-tag>
<span v-else-if="scope.row.i_status==9">已删除</span> <el-tag v-else-if="scope.row.i_status==9" type="danger">已删除</el-tag>
<span v-else-if="scope.row.i_status==-1" class="f-red1">已关闭</span> <el-tag v-else-if="scope.row.i_status==-1" type="warning">已关闭</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="buyer_info" label="猎芯采购员" width="100" :show-overflow-tooltip="true" align="center"> <el-table-column prop="buyer_info" label="猎芯采购员" width="100" :show-overflow-tooltip="true" align="center">
......
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