Commit 306b20a9 by LJM

bug

parent faff67be
......@@ -425,60 +425,62 @@ export default {
}).then((res) => {
if (res.code === 0) {
let htmlArr = [];
let data = JSON.parse(res.data.list[0].msg_data);
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) {
that.countDown();//开启定时轮询
return;
if (res.data.list.length > 0) {
let data = JSON.parse(res.data.list[0].msg_data);
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) {
that.countDown();//开启定时轮询
return;
}
}
}
this.msg_id = res.data.list[0].id;//存储最新id
let has_more = data.has_more;//判断是否出现更多,样式有区别
let html = '';
let cate_id = data.cate_id;
let colorStyle = '';
//定义颜色提醒
if (cate_id) {
if (cate_id == 6) {
colorStyle = 'color:' + this.color_arr[0].value;
} else if (cate_id == 7) {
colorStyle = 'color:' + this.color_arr[1].value;
} else if (cate_id == 8) {
colorStyle = 'color:' + this.color_arr[2].value;
} else if (cate_id == 9) {
colorStyle = 'color:' + this.color_arr[3].value;
this.msg_id = res.data.list[0].id;//存储最新id
let has_more = data.has_more;//判断是否出现更多,样式有区别
let html = '';
let cate_id = data.cate_id;//记录tab切换id
let colorStyle = '';
//定义颜色提醒
if (cate_id) {
if (cate_id == 6) {
colorStyle = 'color:' + this.color_arr[0].value;
} else if (cate_id == 7) {
colorStyle = 'color:' + this.color_arr[1].value;
} else if (cate_id == 8) {
colorStyle = 'color:' + this.color_arr[2].value;
} else if (cate_id == 9) {
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 {
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 (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 {
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) {
htmlArr.push(html +
'<p>' + data.content[0].name + '' + data.content[0].value + '</p>' +
'<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();//开启定时轮询
if (data.content.length > 0) {
htmlArr.push(html +
'<p>' + data.content[0].name + '' + data.content[0].value + '</p>' +
'<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();//开启定时轮询
}
});
}
} else {
this.$message({
message: res.msg,
......
......@@ -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="i_status" label="状态" width="100" :show-overflow-tooltip="true" align="center">
<template slot-scope="scope">
<span v-if="scope.row.i_status==2" class="f-green">已报价</span>
<span v-else-if="scope.row.i_status==1" class="f-yellow1">待报价</span>
<span v-else-if="scope.row.i_status==9">已删除</span>
<span v-else-if="scope.row.i_status==-1" class="f-red1">已关闭</span>
<el-tag v-if="scope.row.i_status==2" type="success">已报价</el-tag>
<el-tag v-else-if="scope.row.i_status==1">待报价</el-tag>
<el-tag v-else-if="scope.row.i_status==9" type="danger">已删除</el-tag>
<el-tag v-else-if="scope.row.i_status==-1" type="warning">已关闭</el-tag>
</template>
</el-table-column>
<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