许宏杰 1 year ago
commit 7402254487

@ -4,6 +4,6 @@ ENV = 'development'
# base api # base api
VUE_APP_BASE_API = '/dashboard' VUE_APP_BASE_API = '/dashboard'
VUE_APP_BASE_API2 = 'http://localhost:9027' VUE_APP_BASE_API2 = 'http://192.168.0.106:9027'
BASE_API = 'http://10.10.3.35:9070' BASE_API = 'http://10.10.3.35:9070'

@ -3,3 +3,6 @@ src/assets
public public
dist dist
mock.js mock.js
src/router
*.vue
*.js

@ -34,6 +34,7 @@ export default {
created() { created() {
if (window.location.search != null && window.location.search !== '') { if (window.location.search != null && window.location.search !== '') {
var tokenObj = qs.parse(window.location.search.substr(1)) var tokenObj = qs.parse(window.location.search.substr(1))
console.log(tokenObj);
if (tokenObj.token != null && tokenObj.token !== '') { if (tokenObj.token != null && tokenObj.token !== '') {
setToken(tokenObj.token) setToken(tokenObj.token)
if (tokenObj.redirect != null) { if (tokenObj.redirect != null) {

@ -0,0 +1,18 @@
import request from '@/utils/request.js'
//网络舆情列表
export function yuqingListA(data) {
return request({
url: '/zongzhi/sentiment/list',
method: 'get',
params:data
})
}
//网络舆情详情
export function getWlyq(id) {
return request({
url: `/zongzhi/sentiment/${id}`,
method: 'get',
})
}

@ -0,0 +1,46 @@
import request from '@/utils/request.js'
//舆情分类
export function yuqingTypes(data) {
return request({
url: '/zongzhi/opinionscreen/sentimenclassification',
method: 'post',
data
})
}
//舆情信息量统计
export function yuqingMsgStats() {
return request({
url: '/zongzhi/opinionscreen/sentimencount',
method: 'get',
})
}
//动态筛选
export function sift() {
return request({
url: '/zongzhi/opinionscreen/sentimenfiltering',
method: 'get',
})
}
// 舆情走势图
export function yuqingChart() {
return request({
url: '/zongzhi/opinionscreen/sentimentype',
method: 'get',
})
}
//词云
export function wordCloud() {
return request({
url: '/zongzhi/opinionscreen/wordcloud',
method: 'get',
})
}
//舆情报告
export function yqbg() {
return request({
url: '/zongzhi/opinionscreen/sentimentreport',
method: 'get',
})
}

@ -17,7 +17,7 @@ const dict = {
getDictType({ commit }) { getDictType({ commit }) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
const query = { const query = {
list: 'sys_user_sex,tc_net_sx,tc_yq_media,tc_enter_type,tc_inlet_yewu,tc_item_type,tc_net_safety_level,tc_yes_no,tc_unit_type,tc_tmt_type,tc_net_safety_level,tc_db_steam_state,tc_attack_type,tc_yh_level,tc_yh_source' list: 'sys_user_sex,tc_net_sx,tc_yq_media,tc_enter_type,tc_inlet_yewu,tc_item_type,tc_net_safety_level,tc_yes_no,tc_unit_type,tc_tmt_type,tc_db_steam_state,tc_attack_type,tc_yh_level,tc_yh_source,tc_yq_type,tc_event_type,tc_cy_type,tc_yq_state'
} }
getDictList(query) getDictList(query)
.then((res) => { .then((res) => {

@ -9,135 +9,124 @@
</template> </template>
<script> <script>
const colors = [ const colors = [
'rgba(0,236,255,0.8)', "rgba(0,236,255,0.8)",
'#fcd338', "#fcd338",
'rgba(0,236,255,0.9)', "rgba(0,236,255,0.9)",
'#fcd338', "#fcd338",
'#fcd338', "#fcd338",
'rgba(255,255,255,0.9)', "rgba(255,255,255,0.9)",
'#fff', "#fff",
'#fff', "#fff",
'#fff', "#fff",
'rgba(255,255,255,0.8)' "rgba(255,255,255,0.8)",
] ];
const RADIUS = 166 // 3d const RADIUS = 166; // 3d
const FALLLENGTH = 420 const FALLLENGTH = 420;
let CX = null let CX = null;
let CY = null let CY = null;
class Tag { class Tag {
constructor(el, x, y, z) { constructor(el, x, y, z) {
this.el = el this.el = el;
this.x = x this.x = x;
this.y = y this.y = y;
this.z = z this.z = z;
} }
move() { move() {
const scale = FALLLENGTH / (FALLLENGTH - this.z) const scale = FALLLENGTH / (FALLLENGTH - this.z);
const alpha = (this.z + RADIUS) / (2 * RADIUS) const alpha = (this.z + RADIUS) / (2 * RADIUS);
const left = this.x + CX - this.el.offsetWidth / 2 + 30 + 'px' // const left = this.x + CX - this.el.offsetWidth / 2 + 30 + "px"; //
const top = this.y + CY - this.el.offsetHeight / 2 + 10 + 'px' // const top = this.y + CY - this.el.offsetHeight / 2 + 10 + "px"; //
this.el.style.opacity = alpha this.el.style.opacity = alpha;
this.el.style.zIndex = parseInt(scale * 100) this.el.style.zIndex = parseInt(scale * 100);
this.el.style.transform = `translate(${left},${top}) scale(${scale})` this.el.style.transform = `translate(${left},${top}) scale(${scale})`;
} }
} }
import { keyWords } from '@/api/common' import { keyWords } from "@/api/common";
import { wordCloud } from "@/api/publicOpinion";
export default { export default {
props: {}, props: {},
data() { data() {
return { return {
tagList: [], tagList: [],
data: [ data: [],
{ name: '太仓市委', count: 200 }, };
{ name: '“交通先行”抢位长三角', count: 400 },
{ name: '太仓速度', count: 600 },
{ name: '开门红', count: 800 },
{ name: '最具幸福感城市', count: 2000 },
{ name: '振翅高飞', count: 350 },
{ name: '娄城防疫', count: 666 },
{ name: '城市更新', count: 899 },
{ name: '争当猛虎尖兵', count: 899 },
{ name: '家在太仓 情暖娄城', count: 899 },
{ name: '城乡文明融合', count: 899 },
{ name: '国土空间全域整治', count: 899 }
]
}
}, },
created() {},
mounted() { mounted() {
// keyWords().then(res => { this.getDataList();
// if (res['T_KEYWORDS[]']) {
// this.data = []
// this.data = res['T_KEYWORDS[]']
// }
// setTimeout(() => {
// this.init()
// this.animate()
// }, 10)
// })
setTimeout(() => {
this.init()
this.animate()
}, 10)
}, },
methods: { methods: {
getDataList() {
wordCloud().then((res) => {
res.data.forEach((value) => {
this.data.push({
name: this.$filterDict("tc_cy_type", value.type),
count: 3,
});
});
this.init();
this.animate();
});
},
init() { init() {
const tags = document.querySelectorAll('.tag') const tags = document.querySelectorAll(".tag");
const wrap = document.querySelector('.tag-wrap') const wrap = document.querySelector(".tag-wrap");
const len = tags.length const len = tags.length;
const valueList = Array.from(new Set(this.data.map((i) => i.count))) const valueList = Array.from(new Set(this.data.map((i) => i.count)));
const min = Math.min(...valueList) const min = Math.min(...valueList);
CX = wrap.offsetWidth / 2 CX = wrap.offsetWidth / 2;
CY = wrap.offsetHeight / 2 CY = wrap.offsetHeight / 2;
tags.forEach((i, index) => { tags.forEach((i, index) => {
const fontScale = (this.data[index].count / min) * 16 const fontScale = (this.data[index].count / min) * 16;
i.style.fontSize = fontScale > 35 ? '35px' : fontScale + 'px' i.style.fontSize = fontScale > 35 ? "35px" : fontScale + "px";
i.style.color = colors[parseInt(Math.random() * 10)] i.style.color = colors[parseInt(Math.random() * 10)];
const k = -1 + (2 * (index + 1) - 1) / len const k = -1 + (2 * (index + 1) - 1) / len;
const a = Math.acos(k) const a = Math.acos(k);
const b = a * Math.sqrt(len * Math.PI) const b = a * Math.sqrt(len * Math.PI);
const x = RADIUS * 1.15 * Math.sin(a) * Math.cos(b) const x = RADIUS * 1.15 * Math.sin(a) * Math.cos(b);
const y = RADIUS * Math.sin(a) * Math.sin(b) const y = RADIUS * Math.sin(a) * Math.sin(b);
const z = RADIUS * Math.cos(a) const z = RADIUS * Math.cos(a);
const tag = new Tag(i, x, y, z) const tag = new Tag(i, x, y, z);
this.tagList.push(tag) this.tagList.push(tag);
}) });
}, },
rotateX() { rotateX() {
const angleX = Math.PI / 300 const angleX = Math.PI / 300;
const cos = Math.cos(angleX) const cos = Math.cos(angleX);
const sin = Math.sin(angleX) const sin = Math.sin(angleX);
this.tagList.forEach((i) => { this.tagList.forEach((i) => {
const y1 = i.y * cos - i.z * sin const y1 = i.y * cos - i.z * sin;
const z1 = i.z * cos + i.y * sin const z1 = i.z * cos + i.y * sin;
i.y = y1 i.y = y1;
i.z = z1 i.z = z1;
}) });
}, },
rotateY() { rotateY() {
const angleY = Math.PI / 500 const angleY = Math.PI / 500;
const cos = Math.cos(angleY) const cos = Math.cos(angleY);
const sin = Math.sin(angleY) const sin = Math.sin(angleY);
this.tagList.forEach((i) => { this.tagList.forEach((i) => {
const x1 = i.x * cos - i.z * sin const x1 = i.x * cos - i.z * sin;
const z1 = i.z * cos + i.x * sin const z1 = i.z * cos + i.x * sin;
i.x = x1 i.x = x1;
i.z = z1 i.z = z1;
}) });
}, },
animate() { animate() {
this.rotateX() this.rotateX();
this.rotateY() this.rotateY();
this.tagList.forEach((i) => { this.tagList.forEach((i) => {
i.move() i.move();
}) });
requestAnimationFrame(this.animate) requestAnimationFrame(this.animate);
} },
} },
} };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.tag-wrap { .tag-wrap {

@ -20,10 +20,14 @@
class="StatisticsInfo" class="StatisticsInfo"
> >
<img :src="item.url" alt="" /> <img :src="item.url" alt="" />
<span style="cursor: pointer" @click="clickDetails(item.name)"> <span
{{ item.name }}</span> style="cursor: pointer"
@click="clickDetails(item.name, item.type)"
>
{{ item.name }}</span
>
<el-progress <el-progress
:percentage="item.value" :percentage="item.value || 0"
:color="item.color" :color="item.color"
></el-progress> ></el-progress>
<div class="StatisticsText"> <div class="StatisticsText">
@ -39,7 +43,8 @@
@mouseover="mouseOver" @mouseover="mouseOver"
@mouseleave="mouseLeave" @mouseleave="mouseLeave"
> >
<module-title>舆情分类 <module-title
>舆情分类
<div slot="operate" class="btn-wrap"> <div slot="operate" class="btn-wrap">
<div <div
v-for="(item, idx) in sentimeentList.options" v-for="(item, idx) in sentimeentList.options"
@ -53,8 +58,8 @@
</div> </div>
</div> </div>
</module-title> </module-title>
<sentimentPie v-show="currentIndex === 1"></sentimentPie>
<media-pie v-show="currentIndex === 0"></media-pie> <media-pie v-show="currentIndex === 0"></media-pie>
<sentimentPie v-show="currentIndex === 1"></sentimentPie>
</div> </div>
<div class="section section-attackRanking" style="padding-top: 35px"> <div class="section section-attackRanking" style="padding-top: 35px">
<module-title>动态筛选</module-title> <module-title>动态筛选</module-title>
@ -92,10 +97,7 @@
</div> </div>
<div class="total_info"> <div class="total_info">
<!-- :value="warningCount" --> <!-- :value="warningCount" -->
<NumberGrow <NumberGrow value="5437" :step="oldWarningCount"></NumberGrow>
value="5437"
:step="oldWarningCount"
></NumberGrow>
</div> </div>
<div class="percent">%</div> <div class="percent">%</div>
</div> </div>
@ -124,11 +126,6 @@
<el-table-column <el-table-column
label="序号" label="序号"
type="index" type="index"
:index="
(index) => {
return index + 1 + (currentPage - 1) * pageSize;
}
"
width="80" width="80"
align="center" align="center"
/> />
@ -146,9 +143,9 @@
</el-table> </el-table>
<div style="text-align: right"> <div style="text-align: right">
<el-pagination <el-pagination
:current-page="currentPage" :current-page="queryData.pageNum"
:page-sizes="[10, 20, 30, 50, 100]" :page-sizes="[10, 20, 30, 50, 100]"
:page-size="pageSize" :page-size="queryData.pageSize"
layout="total, sizes, prev, pager, next, jumper" layout="total, sizes, prev, pager, next, jumper"
:total="total" :total="total"
popper-class="select_bottom" popper-class="select_bottom"
@ -177,15 +174,21 @@
<div style="padding: 0 0 0 80px; height: 730px; overflow: auto"> <div style="padding: 0 0 0 80px; height: 730px; overflow: auto">
<el-row> <el-row>
<el-col :span="3" class="detail_title">标题</el-col> <el-col :span="3" class="detail_title">标题</el-col>
<el-col :span="21" class="detail_text">{{ rowDta.title }}</el-col> <el-col :span="21" class="detail_text">{{
rowDta.sentimentName
}}</el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="3" class="detail_title">内容</el-col> <el-col :span="3" class="detail_title">内容</el-col>
<el-col :span="21" class="detail_text">{{ rowDta.content }}</el-col> <el-col :span="21" class="detail_text">{{
rowDta.sentimentContent || ""
}}</el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="3" class="detail_title">来源</el-col> <el-col :span="3" class="detail_title">来源</el-col>
<el-col :span="21" class="detail_text">{{ rowDta.source }}</el-col> <el-col :span="21" class="detail_text">{{
$filterDict("tc_yq_media", rowDta.source)
}}</el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="3" class="detail_title">时间</el-col> <el-col :span="3" class="detail_title">时间</el-col>
@ -196,10 +199,9 @@
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<span> <span>
<el-button <el-button class="dialog-btn" @click="dialogDetails = false"
class="dialog-btn" > </el-button
@click="dialogDetails = false" >
> </el-button>
</span> </span>
</span> </span>
</el-dialog> </el-dialog>
@ -208,24 +210,36 @@
</template> </template>
<script> <script>
import { echartsJump } from '../../../../../public/static/echartsJump' import { echartsJump } from "../../../../../public/static/echartsJump";
import ModuleTitle from '../../common/ModuleTitle.vue' import ModuleTitle from "../../common/ModuleTitle.vue";
import sentimentPie from './sentimentPie.vue' import sentimentPie from "./sentimentPie.vue";
import mediaPie from './mediaPie.vue' import mediaPie from "./mediaPie.vue";
import NumberGrow from './NumberGrow.vue' import NumberGrow from "./NumberGrow.vue";
import { publicOpinionTrendChart, statisticsOfPublicOpinionInformation, allProjects, newsList, opinionWarningDetail, newswarningList, loaclMedia } from '@/api/common' import {
import { title } from '../../../../settings' publicOpinionTrendChart,
statisticsOfPublicOpinionInformation,
allProjects,
newsList,
opinionWarningDetail,
newswarningList,
loaclMedia,
} from "@/api/common";
import { title } from "../../../../settings";
//=======
import { yuqingChart, yuqingMsgStats, sift } from "@/api/publicOpinion";
import { yuqingListA, getWlyq } from "@/api/consensusList";
export default { export default {
components: { components: {
ModuleTitle, ModuleTitle,
sentimentPie, sentimentPie,
mediaPie, mediaPie,
NumberGrow NumberGrow,
}, },
filters: { filters: {
commaFilter(target) { commaFilter(target) {
return String(target).replace(/(\d)(?=(\d{3})+$)/g, '$1,') return String(target).replace(/(\d)(?=(\d{3})+$)/g, "$1,");
} },
}, },
data() { data() {
return { return {
@ -241,61 +255,65 @@ export default {
// }, // },
{ {
value: 2, value: 2,
name: '本地相关信息量', name: "本地相关信息量",
info: '1735', info: "0",
color: '#4799f8', color: "#4799f8",
url: require('@/assets/sentimeent/舆情icon-2.png') url: require("@/assets/sentimeent/舆情icon-2.png"),
type: 3,
}, },
{ {
value: 3, value: 3,
name: '本地敏感信息量', name: "本地敏感信息量",
info: '1716', info: "0",
color: '#ff5432', color: "#ff5432",
url: require('@/assets/sentimeent/舆情icon-5.png') url: require("@/assets/sentimeent/舆情icon-5.png"),
type: 1,
}, },
{ {
value: 4, value: 4,
name: '推送预警信息量', name: "推送预警信息量",
info: '1436', info: "0",
color: '#ffed61', color: "#ffed61",
url: require('@/assets/sentimeent/舆情icon-4.png') url: require("@/assets/sentimeent/舆情icon-4.png"),
type: 4,
}, },
{ {
value: 5, value: 5,
name: '聚焦本地媒体量', name: "聚焦本地媒体量",
info: '985', info: "0",
color: '#20b028', color: "#20b028",
url: require('@/assets/sentimeent/舆情icon-3.png') url: require("@/assets/sentimeent/舆情icon-3.png"),
} type: 5,
},
], ],
Warning: [ Warning: [
{ {
value: 1, value: 1,
name: '舆情预警标题舆情预警标题舆情预警标题舆情预警标题舆情舆情预警标题舆情预警标题舆情预警标题舆情预警标题舆情舆情预警标题舆情预警标题舆情预警标题舆情预警标题舆情舆情预警标题舆情预警标题舆情预警标题舆情预警标题舆情', name: "舆情预警标题舆情预警标题舆情预警标题舆情预警标题舆情舆情预警标题舆情预警标题舆情预警标题舆情预警标题舆情舆情预警标题舆情预警标题舆情预警标题舆情预警标题舆情舆情预警标题舆情预警标题舆情预警标题舆情预警标题舆情",
time: '2021-12-13 13:30:20', time: "2021-12-13 13:30:20",
from: '舆情来源' from: "舆情来源",
}, },
{ {
value: 2, value: 2,
name: '舆情预警标题舆情预警标题舆情预警标题舆情预警标题舆情舆情预警标题舆情预警标题舆情预警标题舆情预警标题舆情舆情预警标题舆情预警标题舆情预警标题舆情预警标题舆情舆情预警标题舆情预警标题舆情预警标题舆情预警标题舆情', name: "舆情预警标题舆情预警标题舆情预警标题舆情预警标题舆情舆情预警标题舆情预警标题舆情预警标题舆情预警标题舆情舆情预警标题舆情预警标题舆情预警标题舆情预警标题舆情舆情预警标题舆情预警标题舆情预警标题舆情预警标题舆情",
time: '2021-12-13 13:30:20', time: "2021-12-13 13:30:20",
from: '舆情来源' from: "舆情来源",
}, },
{ {
value: 3, value: 3,
name: '舆情预警标题舆情预警标题舆情预警标题舆情预警标题舆情舆情预警标题舆情预警标题舆情预警标题舆情预警标题舆情舆情预警标题舆情预警标题舆情预警标题舆情预警标题舆情舆情预警标题舆情预警标题舆情预警标题舆情预警标题舆情', name: "舆情预警标题舆情预警标题舆情预警标题舆情预警标题舆情舆情预警标题舆情预警标题舆情预警标题舆情预警标题舆情舆情预警标题舆情预警标题舆情预警标题舆情预警标题舆情舆情预警标题舆情预警标题舆情预警标题舆情预警标题舆情",
time: '2021-12-13 13:30:20', time: "2021-12-13 13:30:20",
from: '舆情来源' from: "舆情来源",
}, },
{ {
value: 4, value: 4,
name: '舆情预警标题舆情预警标题舆情预警标题舆情预警标题舆情舆情预警标题舆情预警标题舆情预警标题舆情预警标题舆情舆情预警标题舆情预警标题舆情预警标题舆情预警标题舆情舆情预警标题舆情预警标题舆情预警标题舆情预警标题舆情', name: "舆情预警标题舆情预警标题舆情预警标题舆情预警标题舆情舆情预警标题舆情预警标题舆情预警标题舆情预警标题舆情舆情预警标题舆情预警标题舆情预警标题舆情预警标题舆情舆情预警标题舆情预警标题舆情预警标题舆情预警标题舆情",
time: '2021-12-13 13:30:20', time: "2021-12-13 13:30:20",
from: '舆情来源' from: "舆情来源",
} },
], ],
sentimeentList: { sentimeentList: {
options: ['媒体类型', '涉事类型'] options: ["媒体类型", "涉事类型"],
}, },
dialogStatus: false, dialogStatus: false,
totalPage: 1, // 1 totalPage: 1, // 1
@ -305,38 +323,53 @@ export default {
currentPageData: [], // currentPageData: [], //
tableHeader: [], tableHeader: [],
tableData: [], tableData: [],
dialogTitle: '', dialogTitle: "",
dialogDetails: false, dialogDetails: false,
rowDta: {}, rowDta: {},
opinionTime: [], opinionTime: [],
positiveOpinion: [225389, 190638, 194116, 175397, 173355, 163703, 196261],
negativeOpinion: [20902, 22124, 21617, 20806, 22561, 21754, 22062],
obj: { obj: {
'locNewsTotal': '本地相关信息量', locNewsTotal: "本地相关信息量",
// '': '', // '': '',
'locNegTotal': '本地敏感信息量', locNegTotal: "本地敏感信息量",
'推送预警量': '推送预警信息量', 推送预警量: "推送预警信息量",
'本地媒体量': '聚焦本地媒体量' 本地媒体量: "聚焦本地媒体量",
}, },
newsCount: 0, newsCount: 0,
warningCount: 0, warningCount: 0,
oldNewsCount: 0, oldNewsCount: 0,
oldWarningCount: 0, oldWarningCount: 0,
filterTime: '' filterTime: "",
} //=================
jcMsgData: {},
queryData: {
pageNum: 1,
pageSize: 10,
sentimentType: "",
},
//
positiveOpinion: [],
negativeOpinion: [],
date: [],
};
}, },
computed: {}, computed: {},
watch: { watch: {
newsCount(newVal, oldVal) { newsCount(newVal, oldVal) {
this.oldNewsCount = oldVal this.oldNewsCount = oldVal;
}, },
warningCount(newVal, oldVal) { warningCount(newVal, oldVal) {
this.oldWarningCount = oldVal this.oldWarningCount = oldVal;
} },
},
created() {
//
this.getyqData();
//
this.getyqMsgStats();
}, },
created() { },
destroyed() { destroyed() {
clearInterval(this.attackTime) // clearInterval(this.attackTime); //
}, },
mounted() { mounted() {
// publicOpinionTrendChart().then((res) => { // publicOpinionTrendChart().then((res) => {
@ -375,7 +408,6 @@ export default {
// }) // })
// this.lineBox() // this.lineBox()
// }) // })
this.lineBox()
// statisticsOfPublicOpinionInformation().then(res => { // statisticsOfPublicOpinionInformation().then(res => {
// res['T_GET_PARAMETER[]']?.forEach(item => { // res['T_GET_PARAMETER[]']?.forEach(item => {
// this.Statistics.forEach(e => { // this.Statistics.forEach(e => {
@ -408,105 +440,145 @@ export default {
// } // }
// }) // })
// }) // })
this.changeBtn() this.changeBtn();
this.getFilterData() this.getFilterData();
this.getyqData();
}, },
beforeDestroy() { beforeDestroy() {
clearInterval(this.filterTime) clearInterval(this.filterTime);
}, },
methods: { methods: {
initTime() { initTime() {
const timeArr = [] const timeArr = [];
for (let i = 0; i < 7; i++) { for (let i = 0; i < 7; i++) {
const time = new Date(new Date().setDate(new Date().getDate() + i - 7)) const time = new Date(new Date().setDate(new Date().getDate() + i - 7));
const month = `${time.getMonth() + 1}`.slice(-2) const month = `${time.getMonth() + 1}`.slice(-2);
const strDate = `${time.getDate()}`.slice(-2) const strDate = `${time.getDate()}`.slice(-2);
timeArr.push(`${month}.${strDate}`) timeArr.push(`${month}.${strDate}`);
} }
return timeArr return timeArr;
}, },
getFilterData() { getFilterData() {
this.filterTime = setInterval(() => { this.filterTime = setInterval(() => {
this.getData() this.getData();
}, 600000) }, 600000);
}, },
getData() { getData() {
statisticsOfPublicOpinionInformation().then(res => { statisticsOfPublicOpinionInformation().then((res) => {
res['T_GET_PARAMETER[]'].forEach(item => { res["T_GET_PARAMETER[]"].forEach((item) => {
if (item.NAME === 'newsCount') { if (item.NAME === "newsCount") {
this.newsCount = item.CODE this.newsCount = item.CODE;
} }
if (item.NAME === 'warningCount') { if (item.NAME === "warningCount") {
this.warningCount = item.CODE this.warningCount = item.CODE;
} }
}) });
}) });
}, },
// //
// //
mouseOver() { mouseOver() {
clearInterval(this.attackTime) clearInterval(this.attackTime);
}, },
// //
mouseLeave() { mouseLeave() {
this.changeBtn() this.changeBtn();
}, },
// //
changeBtn() { changeBtn() {
this.attackTime = setInterval(() => { this.attackTime = setInterval(() => {
this.currentIndex === 0 this.currentIndex === 0
? (this.currentIndex = 1) ? (this.currentIndex = 1)
: (this.currentIndex = 0) : (this.currentIndex = 0);
}, 11000) }, 11000);
},
//
getyqData() {
yuqingChart().then((res) => {
console.log(res);
res.data.forEach((value) => {
if (value.type == 2) {
this.positiveOpinion.push(value.count);
} else if (value.type == 1) {
this.negativeOpinion.push(value.count);
}
//
});
// const res = new Map();
// let arr = res.data.filter(
// (item) => !res.has(item[uniId]) && res.set(item[uniId], 1)
// );
this.lineBox();
console.log(this.negativeOpinion);
console.log(this.positiveOpinion);
});
},
//
getyqMsgStats() {
yuqingMsgStats().then((res) => {
let arr = res.data;
this.Statistics.forEach((value1, index1) => {
arr.forEach((value2, index2) => {
if (value1.type == value2.type) {
this.Statistics[index1].info = value2.count;
this.Statistics[index1].value = value2.pt;
return;
}
});
});
});
sift().then((res) => {
console.log(res);
});
}, },
// 线 // 线
lineBox() { lineBox() {
const myChart = this.$echarts.init(document.getElementById('lineBox')) const myChart = this.$echarts.init(document.getElementById("lineBox"));
const options = { const options = {
grid: { grid: {
top: '20%', top: "20%",
bottom: '15%', bottom: "15%",
left: '17%', left: "17%",
right: '1%' right: "1%",
}, },
legend: { legend: {
data: ['非敏感', '敏感'], data: ["非敏感", "敏感"],
top: '3%', top: "3%",
right: '2%', right: "2%",
itemHeight: 10, itemHeight: 10,
itemWidth: 10, itemWidth: 10,
textStyle: { textStyle: {
padding: [10, 30, 10, 14], padding: [10, 30, 10, 14],
color: 'rgba(250,250,250,1)', color: "rgba(250,250,250,1)",
fontSize: 28 fontSize: 28,
} },
}, },
tooltip: { tooltip: {
trigger: 'item', trigger: "item",
formatter: '{a} <br/>{b} : {c} ', formatter: "{a} <br/>{b} : {c} ",
axisPointer: { axisPointer: {
lineStyle: { lineStyle: {
width: 0 width: 0,
} },
}, },
backgroundColor: '#fff', backgroundColor: "#fff",
textStyle: { textStyle: {
color: '#5c6c7c' color: "#5c6c7c",
} },
}, },
xAxis: { xAxis: {
// data: this.opinionTime, // data: this.opinionTime,
data: ['7.23', '7.24', '7.25', '7.26', '7.27', '7.28', '7.29'], data: ["7.23", "7.24", "7.25", "7.26", "7.27", "7.28", "7.29"],
axisLine: { axisLine: {
show: true, // X线 show: true, // X线
lineStyle: { lineStyle: {
color: 'rgb(119,123,132,1)', color: "rgb(119,123,132,1)",
width: 1 width: 1,
} },
}, },
axisTick: { axisTick: {
show: true, // X show: true, // X
length: 0.2 length: 0.2,
}, },
axisLabel: { axisLabel: {
show: true, show: true,
@ -516,14 +588,14 @@ export default {
// margin: 15, // margin: 15,
// position: [100, 100], // position: [100, 100],
textStyle: { textStyle: {
color: '#6ddefb', // X color: "#6ddefb", // X
fontSize: 28 fontSize: 28,
} },
}, },
grid: { grid: {
left: '50%', left: "50%",
bottom: '35%' bottom: "35%",
} },
// splitArea: { // splitArea: {
// interval: 0, // interval: 0,
// show: true, // show: true,
@ -534,210 +606,148 @@ export default {
}, },
yAxis: [ yAxis: [
{ {
name: '单位:件', name: "单位:件",
min: 0, min: 0,
// max: 3500, // max: 3500,
splitNumber: 7, splitNumber: 7,
type: 'value', type: "value",
nameTextStyle: { nameTextStyle: {
padding: [10, 0, 10, 0], padding: [10, 0, 10, 0],
color: 'rgb(255,255,255,1)', color: "rgb(255,255,255,1)",
fontSize: 28, fontSize: 28,
left: 20 left: 20,
}, },
splitLine: { splitLine: {
show: true, show: true,
lineStyle: { lineStyle: {
type: 'dashed', type: "dashed",
color: 'rgba(77, 128, 254, 0.4)', color: "rgba(77, 128, 254, 0.4)",
width: 1 width: 1,
} },
}, },
axisTick: { axisTick: {
show: true show: true,
}, },
axisLine: { axisLine: {
show: false show: false,
}, },
axisLabel: { axisLabel: {
show: true, show: true,
textStyle: { textStyle: {
color: 'rgba(250,250,250,1)', color: "rgba(250,250,250,1)",
fontSize: 28 fontSize: 28,
} },
} },
} },
], ],
series: [ series: [
{ {
name: '非敏感', name: "非敏感",
type: 'bar', type: "bar",
barWidth: 12, barWidth: 12,
itemStyle: { itemStyle: {
normal: { normal: {
color: '#38c5ff' color: "#38c5ff",
} },
}, },
// data: this.positiveOpinion data: this.positiveOpinion,
data: [70, 50, 70, 60, 30, 40, 70]
}, },
{ {
name: '敏感', name: "敏感",
type: 'bar', type: "bar",
barWidth: 12, barWidth: 12,
itemStyle: { itemStyle: {
color: '#fc6a31' color: "#fc6a31",
}, },
// data: this.negativeOpinion data: this.negativeOpinion,
data: [30, 10, 70, 64, 60, 10, 20] },
} ],
] };
} myChart.setOption(options, true);
myChart.setOption(options, true) echartsJump(myChart, options);
echartsJump(myChart, options)
}, },
clickDetails(val) { //
this.currentPage = 1 clickDetails(val, type) {
this.pageSize = 10 this.tableHeader = [
let data = { { key: "标题", value: "sentimentName" },
pageSize: 1000, { key: "来源", width: 120, value: "source" },
{ key: "时间", width: 200, value: "publishTime" },
];
this.queryData = {
pageNum: 1, pageNum: 1,
orientation: '', pageSize: 10,
areaId: '80244', sentimentType: type,
subjectId: this.obj[val] };
} this.dialogTitle = val;
if (val === '本地敏感信息量') { this.wlyqList();
data = { },
pageSize: 1000, // list
pageNum: 1, wlyqList() {
subjectId: this.obj[val], yuqingListA(this.queryData).then((res) => {
orientation: '2', console.log(res);
areaId: '80244' this.currentPageData = res.rows;
} this.currentPageData.forEach((value, index) => {
} this.currentPageData[index].source = this.$filterDict(
if (val === '本地相关信息量' || val === '本地敏感信息量') { "tc_yq_media",
// newsList(data).then(res => { value.source
// this.tableData = res.data.list );
this.tableData = [ });
{ title: '相关信息', this.total = res.total;
source: '抖音', this.dialogStatus = true;
publishTime: '2023-07-31' } });
]
// this.tableData.forEach(item => {
// item.publishTime = item.publishTime.substring(0, 4) + '-' + item.publishTime.substring(4, 6) + '-' + item.publishTime.substring(6, 8) + ' ' + item.publishTime.substring(8, 10) + ':' + item.publishTime.substring(10, 12) + ':' + item.publishTime.substring(12, 14)
// })
this.tableHeader = [
{ key: '标题', value: 'title' }, { key: '来源', width: 120, value: 'source' }, { key: '时间', width: 200, value: 'publishTime' }
]
this.total = this.tableData.length
this.totalPage = Math.ceil(this.tableData.length / this.pageSize)
this.totalPage = this.totalPage === 0 ? 1 : this.totalPage
this.setCurrentPageData()
this.dialogTitle = val
this.dialogStatus = true
// })
} else if (val === '推送预警信息量') {
const warningData = {
pageSize: 1000,
pageNum: 1
}
// newswarningList(warningData).then(res => {
// this.tableData = res.data.list
// this.tableData.forEach(item => {
// item.publishTime = this.format(item.publishTime)
// })
this.tableData = [
{ title: '相关信息',
webSite: '今日头条',
publishTime: '2023-07-31' }
]
this.tableHeader = [
{ key: '标题', value: 'title' }, { key: '来源', width: 120, value: 'webSite' }, { key: '时间', width: 200, value: 'publishTime' }
]
this.total = this.tableData.length
this.totalPage = Math.ceil(this.tableData.length / this.pageSize)
this.totalPage = this.totalPage === 0 ? 1 : this.totalPage
this.setCurrentPageData()
this.dialogTitle = val
this.dialogStatus = true
// })
} else if (val === '聚焦本地媒体量') {
// loaclMedia().then(res => {
// this.tableData = res['T_LOCAL_MEDIA[]']
// if (process.env.NODE_ENV === 'production') {
// this.tableData.forEach(item => {
// item.publishTime = item.publish_time
// })
// } else {
// this.tableData.forEach(item => {
// item.publishTime = item.publish_time.substring(0, 4) + '-' + item.publish_time.substring(4, 6) + '-' + item.publish_time.substring(6, 8) + ' ' + item.publish_time.substring(8, 10) + ':' + item.publish_time.substring(10, 12) + ':' + item.publish_time.substring(12, 14)
// })
// }
this.tableData = [
{ title: '相关信息',
source: '微博',
publishTime: '2023-07-31' }
]
this.tableHeader = [
{ key: '标题', value: 'title' }, { key: '来源', width: 120, value: 'source' }, { key: '时间', width: 200, value: 'publishTime' }
]
this.total = this.tableData.length
this.totalPage = Math.ceil(this.tableData.length / this.pageSize)
this.totalPage = this.totalPage === 0 ? 1 : this.totalPage
this.setCurrentPageData()
this.dialogTitle = val
this.dialogStatus = true
// })
}
}, },
// [0~10],[10~20]..., // [0~10],[10~20]...,
setCurrentPageData() { setCurrentPageData() {
const begin = (this.currentPage - 1) * this.pageSize const begin = (this.currentPage - 1) * this.pageSize;
const end = this.currentPage * this.pageSize const end = this.currentPage * this.pageSize;
this.currentPageData = this.tableData.slice(begin, end) this.currentPageData = this.tableData.slice(begin, end);
}, },
handleSizeChange(val) { handleSizeChange(val) {
this.pageSize = val this.queryData.pageSize = val;
this.setCurrentPageData() this.wlyqList();
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.currentPage = val this.queryData.pageNum = val;
this.setCurrentPageData() this.wlyqList();
}, },
rowClick(row) { rowClick(row) {
if (this.dialogTitle === '聚焦本地媒体量') return this.dialogDetails = true;
this.dialogDetails = true getWlyq(row.id).then((res) => {
Object.assign(this.rowDta, { title: '标题', content: '这是内容', source: '这是来源', publishTime: '2023-08-04' }) this.rowDta = res.data;
// row.publishTime = row.publishTime.substring(0, 10) });
// opinionWarningDetail(
// row
// ).then((res) => {
// Object.assign(this.rowDta, res.data)
// this.dialogDetails = true
// })
}, },
dialogClose() { dialogClose() {
this.dialogStatus = false this.dialogStatus = false;
this.pageSize = 20 this.pageSize = 20;
this.currentPage = 1 this.currentPage = 1;
}, },
format(data) { format(data) {
var time = new Date(data) var time = new Date(data);
var y = time.getFullYear() var y = time.getFullYear();
var m = time.getMonth() + 1 var m = time.getMonth() + 1;
var d = time.getDate() var d = time.getDate();
var hh = time.getHours() var hh = time.getHours();
var mm = time.getMinutes() var mm = time.getMinutes();
var ss = time.getSeconds() var ss = time.getSeconds();
return y + '-' + this.add0(m) + '-' + this.add0(d) + ' ' + this.add0(hh) + ':' + this.add0(mm) + ':' + this.add0(ss) return (
y +
"-" +
this.add0(m) +
"-" +
this.add0(d) +
" " +
this.add0(hh) +
":" +
this.add0(mm) +
":" +
this.add0(ss)
);
}, },
add0(m) { return m < 10 ? '0' + m : m } add0(m) {
} return m < 10 ? "0" + m : m;
} },
},
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@ -799,7 +809,7 @@ export default {
.sx { .sx {
width: 300px; width: 300px;
height: 400px; height: 400px;
background: url('~@/assets/sentimeent/筛选效果.png') no-repeat center; background: url("~@/assets/sentimeent/筛选效果.png") no-repeat center;
position: absolute; position: absolute;
top: 0px; top: 0px;
left: 95px; left: 95px;
@ -808,7 +818,7 @@ export default {
.yellow { .yellow {
width: 400px; width: 400px;
height: 60px; height: 60px;
background: url('~@/assets/sentimeent/黄网.png') no-repeat center; background: url("~@/assets/sentimeent/黄网.png") no-repeat center;
position: absolute; position: absolute;
left: 50px; left: 50px;
top: 40px; top: 40px;
@ -817,7 +827,7 @@ export default {
.blue { .blue {
width: 313px; width: 313px;
height: 47px; height: 47px;
background: url('~@/assets/sentimeent/蓝网.png') no-repeat center; background: url("~@/assets/sentimeent/蓝网.png") no-repeat center;
position: absolute; position: absolute;
left: 100px; left: 100px;
top: 130px; top: 130px;
@ -827,7 +837,7 @@ export default {
.yellow_box { .yellow_box {
width: 243px; width: 243px;
height: 54px; height: 54px;
background: url('~@/assets/sentimeent/黄备注.png') no-repeat left; background: url("~@/assets/sentimeent/黄备注.png") no-repeat left;
position: absolute; position: absolute;
top: 21px; top: 21px;
right: 40px; right: 40px;
@ -867,7 +877,7 @@ export default {
.blue_box { .blue_box {
width: 223px; width: 223px;
height: 54px; height: 54px;
background: url('~@/assets/sentimeent/蓝备注.png') no-repeat left; background: url("~@/assets/sentimeent/蓝备注.png") no-repeat left;
position: absolute; position: absolute;
top: 110px; top: 110px;
right: 90px; right: 90px;
@ -905,7 +915,7 @@ export default {
.total { .total {
width: 292px; width: 292px;
height: 141px; height: 141px;
background: url('~@/assets/sentimeent/bg-筛选.png'); background: url("~@/assets/sentimeent/bg-筛选.png");
position: absolute; position: absolute;
right: 64px; right: 64px;
top: 230px; top: 230px;
@ -960,14 +970,14 @@ export default {
height: 833px; height: 833px;
background: #000; background: #000;
position: absolute; position: absolute;
background: url('~@/assets/sentimeent/右.png'); background: url("~@/assets/sentimeent/右.png");
top: 50px; top: 50px;
left: 0px; left: 0px;
} }
#lineBox { #lineBox {
width: 720px; width: 720px;
height: 400px; height: 400px;
background: url('~@/assets/sentimeent/柱状-12月-bg.png') no-repeat; background: url("~@/assets/sentimeent/柱状-12月-bg.png") no-repeat;
} }
.Statistics { .Statistics {
width: 652px; width: 652px;
@ -1016,7 +1026,7 @@ export default {
.lineInfo { .lineInfo {
width: 646px; width: 646px;
height: 80px; height: 80px;
background: url('~@/assets/sentimeent/bg-舆情预警.png') no-repeat center; background: url("~@/assets/sentimeent/bg-舆情预警.png") no-repeat center;
position: relative; position: relative;
margin-bottom: 20px; margin-bottom: 20px;
} }
@ -1040,7 +1050,7 @@ export default {
width: 22px; width: 22px;
height: 22px; height: 22px;
position: absolute; position: absolute;
background: url('~@/assets/sentimeent/icon-预警.png'); background: url("~@/assets/sentimeent/icon-预警.png");
top: 11px; top: 11px;
left: 20px; left: 20px;
z-index: 9999; z-index: 9999;
@ -1082,7 +1092,7 @@ export default {
height: 833px; height: 833px;
background: #000; background: #000;
position: absolute; position: absolute;
background: url('~@/assets/sentimeent/左.png') no-repeat center; background: url("~@/assets/sentimeent/左.png") no-repeat center;
top: 50px; top: 50px;
right: 0px; right: 0px;
} }
@ -1123,7 +1133,7 @@ export default {
} }
.screen-dialog { .screen-dialog {
.dialog-btn { .dialog-btn {
background: url('~@/assets/dialog/btn-bg.png') no-repeat; background: url("~@/assets/dialog/btn-bg.png") no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
width: 160px; width: 160px;
height: 50px; height: 50px;
@ -1140,7 +1150,7 @@ export default {
} }
.dialog-footer :hover { .dialog-footer :hover {
.dialog-btn { .dialog-btn {
background: url('~@/assets/dialog/btn-bg-act.png') no-repeat; background: url("~@/assets/dialog/btn-bg-act.png") no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
} }
} }
@ -1159,7 +1169,7 @@ export default {
} }
} }
::v-deep .el-dialog { ::v-deep .el-dialog {
background: url('../../../../assets/dialog/弹窗背景-一般.png') no-repeat; background: url("../../../../assets/dialog/弹窗背景-一般.png") no-repeat;
width: 1820px; width: 1820px;
height: 950px; height: 950px;
background-size: 100% 100%; background-size: 100% 100%;
@ -1280,7 +1290,7 @@ export default {
.dialog-explain { .dialog-explain {
margin-top: 39px; margin-top: 39px;
height: 125px; height: 125px;
background: url('~@/assets/dialog/信息-bg.png') no-repeat 100% 100%; background: url("~@/assets/dialog/信息-bg.png") no-repeat 100% 100%;
} }
.dialog-content { .dialog-content {
width: 1073px; width: 1073px;

@ -14,7 +14,8 @@
<word-cloud></word-cloud> <word-cloud></word-cloud>
</div> </div>
<div class="section"> <div class="section">
<module-title>舆情预警 <module-title
>舆情预警
<div slot="operate" class="btn-warning"> <div slot="operate" class="btn-warning">
<i @click="previousWarning"></i> <i @click="previousWarning"></i>
<i @click="nextWarning"></i> <i @click="nextWarning"></i>
@ -22,14 +23,19 @@
</module-title> </module-title>
<div class="warningBox" @click="openDetailLog()"> <div class="warningBox" @click="openDetailLog()">
<div class="warningBox-BJ"></div> <div class="warningBox-BJ"></div>
<div class="warning-title" :title="currentWarningObj.title"> <div class="warning-title" :title="currentWarningObj.sentimentName">
{{ currentWarningObj.title }} {{ currentWarningObj.sentimentName }}
</div> </div>
<div class="warning-content" :title="currentWarningObj.content"> <div
{{ currentWarningObj.content }} class="warning-content"
:title="currentWarningObj.sentimentContent"
>
{{ currentWarningObj.sentimentContent }}
</div> </div>
<div class="warning-time">{{ currentWarningObj.publishTime }}</div> <div class="warning-time">{{ currentWarningObj.publishTime }}</div>
<div class="warning-source">{{ currentWarningObj.source }}</div> <div class="warning-source">
{{ $filterDict("tc_yq_media", currentWarningObj.source) }}
</div>
</div> </div>
</div> </div>
<div class="section" style="padding-top: 35px"> <div class="section" style="padding-top: 35px">
@ -63,17 +69,17 @@
<div class="Special-report" @click="reportDetails('专报')"> <div class="Special-report" @click="reportDetails('专报')">
<div class="Special-icon"></div> <div class="Special-icon"></div>
<div class="Special-title">专报</div> <div class="Special-title">专报</div>
<div class="Special-num">16</div> <div class="Special-num">{{ filteryqbg(1) }}</div>
</div> </div>
<div class="Monthly-report" @click="reportDetails('月报')"> <div class="Monthly-report" @click="reportDetails('月报')">
<div class="Monthly-icon"></div> <div class="Monthly-icon"></div>
<div class="Monthly-title">月报</div> <div class="Monthly-title">月报</div>
<div class="Monthly-num">13</div> <div class="Monthly-num">{{ filteryqbg(2) }}</div>
</div> </div>
<div class="depth-report" @click="reportDetails('深度报告')"> <div class="depth-report" @click="reportDetails('深度报告')">
<div class="depth-icon"></div> <div class="depth-icon"></div>
<div class="depth-title">深度报告</div> <div class="depth-title">深度报告</div>
<div class="depth-num">3</div> <div class="depth-num">{{ filteryqbg(3) }}</div>
</div> </div>
</div> </div>
</div> </div>
@ -117,9 +123,15 @@
class="monitor-list" class="monitor-list"
> >
<!-- @click="rowClick(item.attUrl,'details')" --> <!-- @click="rowClick(item.attUrl,'details')" -->
<span :title="item.attName">{{ item.attName }}</span> <span :title="item.sentimentName">{{
<span :title="item.deptName">{{ item.deptName }}</span> item.sentimentName
<span :title="item.opinionStatusName" :style="activation(item.opinionStatusName)">{{ activationName(item.opinionStatusName) }}</span> }}</span>
<span :title="item.depName">{{ item.depName }}</span>
<span
:title="item.opinionStatusName"
:style="activation(item.sentimentState)"
>{{ $filterDict("tc_yq_state", item.sentimentState) }}</span
>
</div> </div>
</vue-seamless-scroll> </vue-seamless-scroll>
</div> </div>
@ -160,10 +172,10 @@
<el-table-column <el-table-column
v-if="item !== '序号'" v-if="item !== '序号'"
:key="item" :key="item"
:prop="(dialogTitle==='提示单'|| dialogTitle === '转办单')?item.prop:item" prop="sentimentName"
align="center" align="center"
show-overflow-tooltip show-overflow-tooltip
:label="(dialogTitle==='提示单'|| dialogTitle === '转办单')?item.label:item" label="标题名称"
> >
</el-table-column> </el-table-column>
</template> </template>
@ -184,7 +196,12 @@
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<span> <span>
<el-button style="margin-top:112px" class="dialog-btn" @click="dialogClose"> </el-button> <el-button
style="margin-top: 112px"
class="dialog-btn"
@click="dialogClose"
> </el-button
>
</span> </span>
</span> </span>
</el-dialog> </el-dialog>
@ -224,10 +241,9 @@
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<span> <span>
<el-button <el-button class="dialog-btn" @click="dialogDetails = false"
class="dialog-btn" > </el-button
@click="dialogDetails = false" >
> </el-button>
</span> </span>
</span> </span>
</el-dialog> </el-dialog>
@ -245,19 +261,19 @@
<el-row> <el-row>
<el-col :span="3" class="detail_title">标题</el-col> <el-col :span="3" class="detail_title">标题</el-col>
<el-col :span="21" class="detail_text"> <el-col :span="21" class="detail_text">
{{ currentWarningObj.title }} {{ currentWarningObj.sentimentName }}
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="3" class="detail_title">内容</el-col> <el-col :span="3" class="detail_title">内容</el-col>
<el-col :span="21" class="detail_text">{{ <el-col :span="21" class="detail_text">{{
currentWarningObj.content currentWarningObj.sentimentContent
}}</el-col> }}</el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="3" class="detail_title">来源</el-col> <el-col :span="3" class="detail_title">来源</el-col>
<el-col :span="21" class="detail_text">{{ <el-col :span="21" class="detail_text">{{
currentWarningObj.source $filterDict("tc_yq_media", currentWarningObj.source)
}}</el-col> }}</el-col>
</el-row> </el-row>
<el-row> <el-row>
@ -269,10 +285,9 @@
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<span> <span>
<el-button <el-button class="dialog-btn" @click="currentWarningObjShow = false"
class="dialog-btn" > </el-button
@click="currentWarningObjShow = false" >
> </el-button>
</span> </span>
</span> </span>
</el-dialog> </el-dialog>
@ -280,30 +295,42 @@
</template> </template>
<script> <script>
import qs from 'qs' import qs from "qs";
const docx = require('docx-preview') const docx = require("docx-preview");
import axios from 'axios' import axios from "axios";
window.JSZip = require('jszip') window.JSZip = require("jszip");
import vueSeamlessScroll from 'vue-seamless-scroll' import vueSeamlessScroll from "vue-seamless-scroll";
import ModuleTitle from '../../common/ModuleTitle.vue' import ModuleTitle from "../../common/ModuleTitle.vue";
import TransferVolume from './TransferVolume.vue' import TransferVolume from "./TransferVolume.vue";
import WordCloud from './WordCloud.vue' import WordCloud from "./WordCloud.vue";
import pdf from 'vue-pdf' import pdf from "vue-pdf";
import { warningList } from './warningMock' import { warningList } from "./warningMock";
import { opinionWarningList, opinionWarningDetail, getTsdNum, getZbdNum, getyqTsd, getyqZbd, getyqZbdDetails } from '@/api/common' import {
opinionWarningList,
opinionWarningDetail,
getTsdNum,
getZbdNum,
getyqTsd,
getyqZbd,
getyqZbdDetails,
} from "@/api/common";
// import tableObject from '@/views/privateOrder/positiveEnergy/components/data.json' // import tableObject from '@/views/privateOrder/positiveEnergy/components/data.json'
//================
import { yuqingListA } from "@/api/consensusList";
import { yqbg } from "@/api/publicOpinion";
export default { export default {
components: { components: {
vueSeamlessScroll, vueSeamlessScroll,
ModuleTitle, ModuleTitle,
TransferVolume, TransferVolume,
WordCloud, WordCloud,
pdf pdf,
}, },
filters: { filters: {
commaFilter(target) { commaFilter(target) {
return String(target).replace(/(\d)(?=(\d{3})+$)/g, '$1,') return String(target).replace(/(\d)(?=(\d{3})+$)/g, "$1,");
} },
}, },
data() { data() {
return { return {
@ -313,64 +340,42 @@ export default {
turnTime: null, turnTime: null,
tsdNum: 461, tsdNum: 461,
zbdNum: 475, zbdNum: 475,
Transfer: [ Transfer: {},
{ turnDetailsList: [],
index: 1,
name: '专报',
value: '13982'
},
{
index: 2,
name: '月报',
value: '4598'
},
{
index: 3,
name: '深度报告',
value: '3347'
}
],
turnDetailsList: [
{ attName: '国情转办单2023105', deptName: '往建局', opinionStatusName: '待处理' },
{ attName: '国情转办单2023105', deptName: '往建局', opinionStatusName: '待处理' },
{ attName: '国情转办单2023105', deptName: '往建局', opinionStatusName: '待处理' }
],
sentimeentList: { sentimeentList: {
options: ['转办量', '转办详情'] options: ["转办量", "转办详情"],
}, },
currentIndex: 0, currentIndex: 0,
dialogStatus: false, dialogStatus: false,
totalPage: 1, // 1 totalPage: 1, // 1
total: 1, // 1 total: 1, // 1
currentPage: 1, // 1
pageSize: 20, //
currentPageData: [], // currentPageData: [], //
tableHeader: [], tableHeader: [],
tableData: [], tableData: [],
dialogTitle: '', dialogTitle: "",
dialogDetails: false, dialogDetails: false,
rowDta: {}, rowDta: {},
// //
fileExtension: '', fileExtension: "",
numPages: 1, numPages: 1,
pdfUrl: '', pdfUrl: "",
currentWarningObj: { currentWarningObj: {},
author: '用户7726050576', //===================
content: '期待所有在苏州市太仓人民法院诉讼的受害人都可以得到公平公正的对待,而不是因为诉讼反过来让不诚信的人,违反社会正常公德的人,以及社会不良人员,反而获取利益,且没有任何违法成本,那么如果这样,当然我们所有太仓市老百姓和所有在太仓市的外省市老百姓也是只能默默承受的,但我们相信正义只是迟到了而已。', formData: {
imageUrlList: [], pageSize: 1,
isDelete: false, pageNum: 1,
keyword: '太仓市,太仓,太仓市人民法院,纠纷,违法', },
orientation: '负面', //
publishTime: this.getData(), yqTotal: 0,
simhash: '5318318812141012974', bgForm: {
source: '新浪微博', pageNum: 1,
sourceType: 4, pageSize: 10,
summary: '期待所有在苏州市太仓人民法院诉讼的受害人都可以得到公平公正的对待,而不是因为诉讼反过来让不诚信的人,违反社会正常公德的人,以及社会不良人员,反而获取利益,且没有任何违法成本,那么如果这样,当然我们所有太仓市老百姓和所有在太仓市的外省市老百姓也是只能默默承受的,但我们相信正义只是迟到了而已。', },
title: '请大家关注 : 太仓市人民法院( 在中国法院庭审公开网) 农村建房施工合同纠纷:', newbgForm: {},
url: 'https://weibo.com/7726050576/LDPr27y0e', currentPage: 1, // 1
videoImageUrl: '', pageSize: 10, //
videoUrl: '' } };
}
}, },
computed: { computed: {
classOption() { classOption() {
@ -382,11 +387,18 @@ export default {
openWatch: true, // dom openWatch: true, // dom
singleHeight: 0, // (0) direction => 0/1 singleHeight: 0, // (0) direction => 0/1
singleWidth: 0, // (0) direction => 2/3 singleWidth: 0, // (0) direction => 2/3
waitTime: 1000 // (1000ms) waitTime: 1000, // (1000ms)
} };
}, },
activation() { activation() {
return (status) => { return (status) => {
if (status === 1) {
return { color: "#ff4c4c" };
} else if (status === 2) {
return { color: "#ff8839" };
} else if (status === 3) {
return { color: "#35ca29" };
}
// if (status === '') { // if (status === '') {
// return { color: '#ff4c4c' } // return { color: '#ff4c4c' }
// } else if (status === '') { // } else if (status === '') {
@ -398,256 +410,213 @@ export default {
// } else if (status === '') { // } else if (status === '') {
// return { color: '#35ca29' } // return { color: '#35ca29' }
// } // }
const myMap = new Map([ // const myMap = new Map([
['待坐席员录入处理结果', { color: '#ffed1f' }], // ["", { color: "#ffed1f" }],
['待舆情专员核查', { color: '#53edff' }], // ["", { color: "#53edff" }],
['已归档', { color: '#35ca29' }] // ["", { color: "#35ca29" }],
]) // ]);
return myMap.get(status) || { color: '#ff8839' } // return myMap.get(status) || { color: "#ff8839" };
} };
}, },
activationName() { activationName() {
return (status) => { return (status) => {
const myMap = new Map([ const myMap = new Map([
['待坐席员录入处理结果', '待处理'], ["待坐席员录入处理结果", "待处理"],
['待舆情专员核查', '待核查'] ["待舆情专员核查", "待核查"],
]) ]);
return myMap.get(status) || status return myMap.get(status) || status;
} };
} },
}, },
destroyed() { destroyed() {
clearInterval(this.turnTime) // clearInterval(this.turnTime); //
}, },
mounted() { mounted() {
// opinionWarningList().then((res) => { this.changeBtn();
// this.warningChangeList = [] this.getDataList();
// res['[]']?.forEach((item) => { this.getOneList();
// this.warningChangeList.push(item.T_WARNING_LIST)
// })
// opinionWarningDetail(
// this.warningChangeList[this.currentWarningIndex]
// ).then((res) => {
// Object.assign(this.currentWarningObj, res.data)
// })
// })
this.changeBtn()
//
// getTsdNum().then(res => {
// this.tsdNum = res.data
// })
//
// getZbdNum().then(res => {
// this.zbdNum = res.data
// })
//
// getyqZbdDetails().then(res => {
// this.turnDetailsList = res.data
// })
}, },
methods: { methods: {
filteryqbg(e) {
let arr = this.Transfer.reportList.filter((value) => {
return value.sentimentReportType == e;
});
return arr[0].count;
},
getDataList() {
yqbg().then((res) => {
this.tsdNum = res.data.reminder;
this.zbdNum = res.data.isturn;
this.Transfer = res.data;
});
//
yuqingListA().then((res) => {
this.turnDetailsList = res.rows;
});
},
//
getOneList() {
yuqingListA(this.formData).then((res) => {
console.log(res);
this.yqTotal = res.total;
this.currentWarningObj = res.rows[0];
});
},
openDetailLog() { openDetailLog() {
// opinionWarningDetail( this.currentWarningObjShow = true;
// this.warningChangeList[this.currentWarningIndex]
// ).then((res) => {
// Object.assign(this.currentWarningObj, res.data)
// this.currentWarningObjShow = true
// })
Object.assign(this.currentWarningObj, {})
this.currentWarningObjShow = true
}, },
// //
previousWarning() { previousWarning() {
// if (this.currentWarningIndex > 0) { if (this.formData.pageNum <= 1) {
// this.currentWarningIndex-- this.formData.pageNum = this.yqTotal;
// } } else if (this.formData.pageNum <= this.yqTotal) {
// opinionWarningDetail( this.formData.pageNum--;
// this.warningChangeList[this.currentWarningIndex] }
// ).then((res) => { this.getOneList();
// Object.assign(this.currentWarningObj, res.data)
// })
}, },
// //
async nextWarning() { nextWarning() {
// const length = this.warningChangeList.length if (this.formData.pageNum < this.yqTotal) {
// if (this.currentWarningIndex < length - 1) { this.formData.pageNum++;
// this.currentWarningIndex++ } else if (this.formData.pageNum == this.yqTotal) {
// } this.formData.pageNum = 1;
// const res = await opinionWarningDetail( }
// this.warningChangeList[this.currentWarningIndex] this.getOneList();
// )
// this.currentWarningObj = res.data
}, },
// //
mouseOver() { mouseOver() {
clearInterval(this.turnTime) clearInterval(this.turnTime);
}, },
// //
mouseLeave() { mouseLeave() {
this.changeBtn() this.changeBtn();
}, },
// //
changeBtn() { changeBtn() {
this.turnTime = setInterval(() => { this.turnTime = setInterval(() => {
this.currentIndex === 0 this.currentIndex === 0
? (this.currentIndex = 1) ? (this.currentIndex = 1)
: (this.currentIndex = 0) : (this.currentIndex = 0);
}, 11000) }, 11000);
}, },
async reportDetails(val) { async reportDetails(val) {
this.dialogTitle = val this.tableHeader = [{ label: "标题名称", prop: "attName" }];
this.tableHeader = [] this.dialogTitle = val;
this.currentPageData = [] if (val === "提示单") {
if (val === '提示单') { this.newbgForm = {
// const res = await getyqTsd() ...this.bgForm,
this.tableHeader = [{ label: '标题名称', prop: 'attName' }] reminder: 1,
// this.tableData = res.data };
this.tableData = [{ } else if (val === "转办单") {
attName: '民情提示单202201', this.newbgForm = {
'文件路径': '/网信办大屏内容文档/网络舆情/舆情报告/提示单/民情提示单202201.docx' ...this.bgForm,
}] isturn: 1,
} else if (val === '转办单') { };
// const res = await getyqZbd() } else if (val === "专报") {
this.tableHeader = [{ label: '标题名称', prop: 'attName' }] this.newbgForm = {
// this.tableData = res.data ...this.bgForm,
this.tableData = [{ sentimentReportType: 1,
attName: '民情提示单202201', };
'文件路径': '/网信办大屏内容文档/网络舆情/舆情报告/提示单/民情提示单202201.docx' } else if (val === "月报") {
}] this.newbgForm = {
} else { ...this.bgForm,
const tableObject = require('./data.json') sentimentReportType: 2,
this.tableData = tableObject[val] };
for (const item in tableObject[val][0]) { } else if (val === "深度报告") {
if (item !== '文件路径') { this.newbgForm = {
this.tableHeader.push(item) ...this.bgForm,
} sentimentReportType: 3,
} };
} }
this.total = this.tableData.length this.getyqbgType();
this.totalPage = Math.ceil(this.tableData.length / this.pageSize)
this.totalPage = this.totalPage === 0 ? 1 : this.totalPage
this.setCurrentPageData()
this.dialogStatus = true
}, },
setCurrentPageData() { //
const begin = (this.currentPage - 1) * this.pageSize getyqbgType() {
const end = this.currentPage * this.pageSize yuqingListA(this.newbgForm).then((res) => {
this.currentPageData = this.tableData.slice(begin, end) this.currentPageData = res.rows;
this.total = res.total;
this.dialogStatus = true;
});
}, },
handleSizeChange(val) { handleSizeChange(val) {
this.pageSize = val this.newbgForm.pageSize = val;
this.setCurrentPageData() this.getyqbgType();
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.currentPage = val this.newbgForm.pageNum = val;
this.setCurrentPageData() this.getyqbgType();
}, },
rowClick(row, type) { rowClick(row, type) {
this.dialogDetails = true this.dialogDetails = true;
let str = row.fileName.split(".");
// let urlAddress this.fileExtension = str[1];
// if (type === 'details') {
// this.fileExtension = row.substring(row.lastIndexOf('.') + 1)
// urlAddress = window._CONFIG['nginxUrl'] + `${row}`
// } else {
// if (this.dialogTitle === '' || this.dialogTitle === '') {
// this.fileExtension = row.attUrl.substring(row.attUrl.lastIndexOf('.') + 1)
// urlAddress = window._CONFIG['nginxUrl'] + `${row.attUrl}`
// } else {
// this.fileExtension = row[''].substring(
// row[''].lastIndexOf('.') + 1
// )
// urlAddress = `${process.env.NODE_ENV === 'production'
// ? window._CONFIG['fileNginxUrl']
// : '/fileApi'
// }${row['']}`
// }
// }
// console.log('this.fileExtension', this.fileExtension)
// if (this.fileExtension === 'docx' || this.fileExtension === 'doc') {
// axios({
// method: 'get',
// responseType: 'blob', //
// url: urlAddress
// }).then(({ data }) => {
// if (data) {
// this.dialogDetails = true
// this.$nextTick(() => {
// docx.renderAsync(data, this.$refs.file) //
// })
// }
// })
// } else if (this.fileExtension === 'pdf') {
// this.getNumPages(urlAddress)
// }
}, },
getNumPages(url) { getNumPages(url) {
axios({ axios({
method: 'GET', method: "GET",
url: url, // url: url, //
paramsSerializer: function(params) { paramsSerializer: function (params) {
return qs.stringify(params, { arrayFormat: 'brackets' }) return qs.stringify(params, { arrayFormat: "brackets" });
}, },
headers: { headers: {
'Content-Type': "Content-Type":
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
}, },
responseType: 'blob' responseType: "blob",
}) })
.then((response) => { .then((response) => {
this.pdfUrl = this.getObjectURL(response.data) this.pdfUrl = this.getObjectURL(response.data);
const loadingTask = pdf.createLoadingTask(this.pdfUrl) const loadingTask = pdf.createLoadingTask(this.pdfUrl);
loadingTask.promise loadingTask.promise
.then((pdf) => { .then((pdf) => {
this.numPages = pdf.numPages this.numPages = pdf.numPages;
this.dialogDetails = true this.dialogDetails = true;
}) })
.catch((err) => { .catch((err) => {
console.error('pdf 加载失败', err) console.error("pdf 加载失败", err);
}) });
}) })
.catch((error) => { .catch((error) => {
this.$message.error('' + error) this.$message.error("" + error);
}) });
}, },
// url // url
getObjectURL(file) { getObjectURL(file) {
let url = null let url = null;
if (window.createObjectURL !== undefined) { if (window.createObjectURL !== undefined) {
// basic // basic
url = window.createObjectURL(file) url = window.createObjectURL(file);
} else if (window.webkitURL !== undefined) { } else if (window.webkitURL !== undefined) {
// webkit or chrome // webkit or chrome
try { try {
url = window.webkitURL.createObjectURL(file) url = window.webkitURL.createObjectURL(file);
} catch (error) { } catch (error) {
console.log(error) console.log(error);
} }
} else if (window.URL !== undefined) { } else if (window.URL !== undefined) {
// mozilla(firefox) // mozilla(firefox)
try { try {
url = window.URL.createObjectURL(file) url = window.URL.createObjectURL(file);
} catch (error) { } catch (error) {
console.log(error) console.log(error);
} }
} }
return url return url;
}, },
dialogClose() { dialogClose() {
this.dialogStatus = false this.dialogStatus = false;
this.pageSize = 20
this.currentPage = 1
}, },
getData() { getData() {
const d = new Date() const d = new Date();
const month = const month =
d.getMonth() + 1 < 10 ? '0' + (d.getMonth() + 1) : d.getMonth() + 1 d.getMonth() + 1 < 10 ? "0" + (d.getMonth() + 1) : d.getMonth() + 1;
const day = d.getDate() < 10 ? '0' + d.getDate() : d.getDate() const day = d.getDate() < 10 ? "0" + d.getDate() : d.getDate();
const times = d.getFullYear() + '-' + month + '-' + day const times = d.getFullYear() + "-" + month + "-" + day;
return times return times;
} },
} },
} };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@ -705,21 +674,21 @@ export default {
//border: 1px solid #1fb6e5; //border: 1px solid #1fb6e5;
} }
:nth-child(1) { :nth-child(1) {
background: url('~@/assets/sentimeent/arrow-lt.png') no-repeat; background: url("~@/assets/sentimeent/arrow-lt.png") no-repeat;
margin-right: 10px; margin-right: 10px;
cursor: pointer; cursor: pointer;
} }
:nth-child(2) { :nth-child(2) {
background: url('~@/assets/sentimeent/arrow-rt.png') no-repeat; background: url("~@/assets/sentimeent/arrow-rt.png") no-repeat;
cursor: pointer; cursor: pointer;
} }
:nth-child(1):hover { :nth-child(1):hover {
background: url('~@/assets/sentimeent/arrow-lt-act.png') no-repeat; background: url("~@/assets/sentimeent/arrow-lt-act.png") no-repeat;
margin-right: 10px; margin-right: 10px;
cursor: pointer; cursor: pointer;
} }
:nth-child(2):hover { :nth-child(2):hover {
background: url('~@/assets/sentimeent/arrow-rt-act.png') no-repeat; background: url("~@/assets/sentimeent/arrow-rt-act.png") no-repeat;
cursor: pointer; cursor: pointer;
} }
} }
@ -727,7 +696,7 @@ export default {
width: 712px; width: 712px;
height: 392px; height: 392px;
margin-top: 40px; margin-top: 40px;
background: url('~@/assets/sentimeent/舆情报警-bg.png') no-repeat; background: url("~@/assets/sentimeent/舆情报警-bg.png") no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
.warning-title { .warning-title {
text-align: center; text-align: center;
@ -799,13 +768,13 @@ export default {
right: 613px; right: 613px;
width: 100px; width: 100px;
height: 100px; height: 100px;
background: url('~@/assets/sentimeent/warning.png') no-repeat 100% 100%; background: url("~@/assets/sentimeent/warning.png") no-repeat 100% 100%;
} }
.worldClound { .worldClound {
width: 651px; width: 651px;
height: 316px; height: 316px;
margin: 50px 43px 0 26px; margin: 50px 43px 0 26px;
background: url('~@/assets/sentimeent/icon-正面.png') no-repeat center; background: url("~@/assets/sentimeent/icon-正面.png") no-repeat center;
position: relative; position: relative;
} }
.monitor-box { .monitor-box {
@ -844,7 +813,7 @@ export default {
line-height: 100px; line-height: 100px;
display: grid; display: grid;
grid-template-columns: 320px 240px 170px; grid-template-columns: 320px 240px 170px;
background: rgb(19, 52, 88, 0.3) url('~@/assets/sentimeent/bg-部门转办.png') background: rgb(19, 52, 88, 0.3) url("~@/assets/sentimeent/bg-部门转办.png")
no-repeat; no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
span { span {
@ -876,7 +845,7 @@ export default {
> div { > div {
width: 344px; width: 344px;
height: 160px; height: 160px;
background: url('~@/assets/sentimeent/舆情报告-bg-top.png') no-repeat 100% background: url("~@/assets/sentimeent/舆情报告-bg-top.png") no-repeat 100%
100%; 100%;
} }
:nth-child(1) { :nth-child(1) {
@ -887,7 +856,7 @@ export default {
display: inline-block; display: inline-block;
width: 100px; width: 100px;
height: 100px; height: 100px;
background: url('~@/assets/sentimeent/icon-提示单.png') no-repeat; background: url("~@/assets/sentimeent/icon-提示单.png") no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
margin-left: 49px; margin-left: 49px;
} }
@ -895,7 +864,7 @@ export default {
display: inline-block; display: inline-block;
width: 100px; width: 100px;
height: 100px; height: 100px;
background: url('~@/assets/sentimeent/icon-转办单.png') no-repeat; background: url("~@/assets/sentimeent/icon-转办单.png") no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
margin-left: 49px; margin-left: 49px;
} }
@ -922,7 +891,7 @@ export default {
width: 696px; width: 696px;
height: 214px; height: 214px;
margin-top: 9px; margin-top: 9px;
background: url('~@/assets/sentimeent/舆情报告-bg-btm.png') no-repeat 100% background: url("~@/assets/sentimeent/舆情报告-bg-btm.png") no-repeat 100%
100%; 100%;
display: flex; display: flex;
align-content: space-between; align-content: space-between;
@ -936,7 +905,7 @@ export default {
width: 70px; width: 70px;
height: 70px; height: 70px;
background: url('~@/assets/sentimeent/icon-专报.png') no-repeat; background: url("~@/assets/sentimeent/icon-专报.png") no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
margin-top: 34px; margin-top: 34px;
} }
@ -968,7 +937,7 @@ export default {
width: 70px; width: 70px;
height: 70px; height: 70px;
background: url('~@/assets/sentimeent/icon-月报.png') no-repeat; background: url("~@/assets/sentimeent/icon-月报.png") no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
margin-top: 34px; margin-top: 34px;
} }
@ -999,7 +968,7 @@ export default {
display: inline-block; display: inline-block;
width: 70px; width: 70px;
height: 70px; height: 70px;
background: url('~@/assets/sentimeent/icon-深度报告.png') no-repeat; background: url("~@/assets/sentimeent/icon-深度报告.png") no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
margin-top: 34px; margin-top: 34px;
} }
@ -1133,7 +1102,7 @@ export default {
.sx { .sx {
width: 300px; width: 300px;
height: 400px; height: 400px;
background: url('~@/assets/sentimeent/筛选效果.png') no-repeat center; background: url("~@/assets/sentimeent/筛选效果.png") no-repeat center;
position: absolute; position: absolute;
top: 0px; top: 0px;
left: 95px; left: 95px;
@ -1142,7 +1111,7 @@ export default {
.yellow { .yellow {
width: 400px; width: 400px;
height: 60px; height: 60px;
background: url('~@/assets/sentimeent/黄网.png') no-repeat center; background: url("~@/assets/sentimeent/黄网.png") no-repeat center;
position: absolute; position: absolute;
left: 50px; left: 50px;
top: 40px; top: 40px;
@ -1151,7 +1120,7 @@ export default {
.blue { .blue {
width: 313px; width: 313px;
height: 47px; height: 47px;
background: url('~@/assets/sentimeent/蓝网.png') no-repeat center; background: url("~@/assets/sentimeent/蓝网.png") no-repeat center;
position: absolute; position: absolute;
left: 100px; left: 100px;
top: 130px; top: 130px;
@ -1162,7 +1131,7 @@ export default {
.yellow_box { .yellow_box {
width: 243px; width: 243px;
height: 54px; height: 54px;
background: url('~@/assets/sentimeent/黄备注.png') no-repeat left; background: url("~@/assets/sentimeent/黄备注.png") no-repeat left;
position: absolute; position: absolute;
top: 21px; top: 21px;
right: 40px; right: 40px;
@ -1201,7 +1170,7 @@ export default {
.blue_box { .blue_box {
width: 223px; width: 223px;
height: 54px; height: 54px;
background: url('~@/assets/sentimeent/蓝备注.png') no-repeat left; background: url("~@/assets/sentimeent/蓝备注.png") no-repeat left;
position: absolute; position: absolute;
top: 110px; top: 110px;
right: 90px; right: 90px;
@ -1239,7 +1208,7 @@ export default {
.total { .total {
width: 292px; width: 292px;
height: 141px; height: 141px;
background: url('~@/assets/sentimeent/bg-筛选.png'); background: url("~@/assets/sentimeent/bg-筛选.png");
position: absolute; position: absolute;
right: 64px; right: 64px;
top: 230px; top: 230px;
@ -1294,7 +1263,7 @@ export default {
height: 833px; height: 833px;
background: #000; background: #000;
position: absolute; position: absolute;
background: url('~@/assets/sentimeent/右.png'); background: url("~@/assets/sentimeent/右.png");
top: 50px; top: 50px;
left: 0px; left: 0px;
} }
@ -1334,7 +1303,7 @@ export default {
} }
.screen-dialog { .screen-dialog {
.dialog-btn { .dialog-btn {
background: url('~@/assets/dialog/btn-bg.png') no-repeat 100% 100%; background: url("~@/assets/dialog/btn-bg.png") no-repeat 100% 100%;
//background-size: cover; //background-size: cover;
width: 160px; width: 160px;
height: 50px; height: 50px;
@ -1352,7 +1321,7 @@ export default {
} }
.dialog-footer :hover { .dialog-footer :hover {
.dialog-btn { .dialog-btn {
background: url('../../../../assets/dialog/btn-bg-act.png') no-repeat 100% background: url("../../../../assets/dialog/btn-bg-act.png") no-repeat 100%
100%; 100%;
} }
} }
@ -1371,7 +1340,7 @@ export default {
} }
} }
::v-deep .el-dialog { ::v-deep .el-dialog {
background: url('../../../../assets/dialog/弹窗背景-一般.png') no-repeat; background: url("../../../../assets/dialog/弹窗背景-一般.png") no-repeat;
width: 800px; width: 800px;
height: 960px; height: 960px;
background-size: 100% 100%; background-size: 100% 100%;

@ -30,50 +30,53 @@
</div> </div>
</template> </template>
<script> <script>
import { mediaList } from '@/api/common' import { mediaList } from "@/api/common";
import { echartsJump } from "../../../../../public/static/echartsJump";
import { yuqingTypes } from "@/api/publicOpinion";
import { echartsJump } from '../../../../../public/static/echartsJump'
export default { export default {
data() { data() {
return { return {
types: [ 1, 2, 3, 4, 5, 6, 7,8,],
piedata: [ piedata: [
{ {
name: '其他', name: "报刊",
value: 0.0 value: 0,
}, },
{ {
name: '报刊', name: "网媒",
value: 0.1 value: 0,
}, },
{ {
name: '网媒', name: "微信",
value: 28.6 value: 0,
}, },
{ {
name: '微信', name: "微博",
value: 25.2 value: 0,
}, },
{ {
name: '微博', name: "APP",
value: 23.3 value: 0,
}, },
{ {
name: 'APP', name: "论坛",
value: 7.2 value: 0,
}, },
{ {
name: '论坛', name: "短视频",
value: 6.6 value: 0,
}, },
{ {
name: '短视频', name: "其他",
value: 5.5 value: 0,
} },
], ],
lastIndex: 0, lastIndex: 0,
currentIndex: 0 currentIndex: 0,
} };
}, },
mounted() { mounted() {
@ -84,74 +87,88 @@ export default {
// }) // })
// this.pieBox() // this.pieBox()
// }) // })
this.pieBox() this.getData();
}, },
methods: { methods: {
getData() {
yuqingTypes({ type: "1" }).then((res) => {
res.data.forEach((value, index) => {
this.types.forEach((value1, index1) => {
if (value.type == value1) {
this.piedata[index1].value = value.pt;
}
});
});
this.pieBox();
});
},
pieBox() { pieBox() {
const myChart = this.$echarts.init(document.getElementById('box1')) const myChart = this.$echarts.init(document.getElementById("box1"));
const optionFirst = { const optionFirst = {
color: [ color: [
'#316fdc', "#316fdc",
'#ffffff', "#ffffff",
'#5efe01', "#5efe01",
'#ee8605', "#ee8605",
'#08fd94', "#08fd94",
'#fed600', "#fed600",
'#009fff', "#009fff",
'#15ffe6' "#15ffe6",
], ],
tooltip: { tooltip: {
trigger: 'item', trigger: "item",
formatter: '{b} : {c} ', formatter: function (params) {
return `${params.name}:${params.value}%`;
},
textStyle: { textStyle: {
fontSize: 26, fontSize: 26,
fontWight: 'bold' fontWight: "bold",
} },
}, },
series: [ series: [
{ {
name: '数量', name: "数量",
type: 'pie', type: "pie",
radius: ['60%', '80%'], radius: ["60%", "80%"],
avoidLabelOverlap: false, avoidLabelOverlap: false,
center: ['50%', '50%'], center: ["50%", "50%"],
label: { label: {
show: false, show: false,
position: 'center', position: "center",
formatter: (params) => { formatter: (params) => {
return `{a| ${params.name}} \n {b|${params.value}}%` return `{a| ${params.name}} \n {b|${params.value}}%`;
}, },
rich: { rich: {
a: { a: {
fontFamily: 'SourceHanSansCN-Regular', fontFamily: "SourceHanSansCN-Regular",
color: '#06e1ff', color: "#06e1ff",
fontSize: 28 fontSize: 28,
}, },
b: { b: {
fontFamily: 'DIN-Medium', fontFamily: "DIN-Medium",
color: '#ffffff', color: "#ffffff",
fontSize: 32, fontSize: 32,
lineHeight: 50 lineHeight: 50,
} },
} },
}, },
emphasis: { emphasis: {
label: { label: {
show: true, show: true,
fontSize: '28', fontSize: "28",
fontWeight: 'bold' fontWeight: "bold",
} },
}, },
labelLine: { labelLine: {
show: false show: false,
}, },
data: this.piedata data: this.piedata,
} },
] ],
} };
myChart.setOption(optionFirst, true) myChart.setOption(optionFirst, true);
echartsJump(myChart, optionFirst) echartsJump(myChart, optionFirst);
// setInterval(() => { // setInterval(() => {
// myChart.dispatchAction({ // myChart.dispatchAction({
// type: 'downplay', // type: 'downplay',
@ -174,9 +191,9 @@ export default {
// this.currentIndex = 0 // this.currentIndex = 0
// } // }
// }, 2000) // }, 2000)
} },
} },
} };
</script> </script>
<style lang='scss' scoped> <style lang='scss' scoped>
@ -187,7 +204,7 @@ export default {
width: 343px; width: 343px;
height: 343px; height: 343px;
margin: 82px 0 0 5px; margin: 82px 0 0 5px;
background: url('~@/assets/sentimeent/bg-饼图.png') no-repeat center; background: url("~@/assets/sentimeent/bg-饼图.png") no-repeat center;
} }
.moduleCount { .moduleCount {
width: 329px; width: 329px;

@ -31,75 +31,84 @@
</template> </template>
<script> <script>
import { tagsList } from '@/api/common' import { tagsList } from "@/api/common";
import { echartsJump } from '../../../../../public/static/echartsJump' import { echartsJump } from "../../../../../public/static/echartsJump";
import { yuqingTypes } from "@/api/publicOpinion";
export default { export default {
data() { data() {
return { return {
lastIndex: 0, lastIndex: 0,
currentIndex: 0, currentIndex: 0,
imgList: [{ imgList: [
url: require('@/assets/sentimeent/1.png') {
}, url: require("@/assets/sentimeent/1.png"),
{ type: 9,
url: require('@/assets/sentimeent/2.png') },
}, {
{ url: require("@/assets/sentimeent/2.png"),
url: require('@/assets/sentimeent/3.png') type: 10,
}, },
{ {
url: require('@/assets/sentimeent/4.png') url: require("@/assets/sentimeent/3.png"),
}, type: 11,
{ },
url: require('@/assets/sentimeent/5.png') {
}, url: require("@/assets/sentimeent/4.png"),
{ type: 12,
url: require('@/assets/sentimeent/6.png') },
}, {
{ url: require("@/assets/sentimeent/5.png"),
url: require('@/assets/sentimeent/7.png') type: 13,
}, },
{ {
url: require('@/assets/sentimeent/8.png') url: require("@/assets/sentimeent/6.png"),
} type: 14,
},
{
url: require("@/assets/sentimeent/7.png"),
type: 15,
},
{
url: require("@/assets/sentimeent/8.png"),
type: 16,
},
], ],
piedata: [ piedata: [
{ {
name: '治安维稳', name: "治安维护",
value: 10 value: 0,
}, },
{ {
name: '医疗卫生', name: "医疗卫生",
value: 10 value: 0,
}, },
{ {
name: '执政形象', name: "执政形象",
value: 20 value: 0,
}, },
{ {
name: '市场监督', name: "市场监督",
value: 20 value: 0,
}, },
{ {
name: '自然灾害', name: "自然灾害",
value: 10 value: 0,
}, },
{ {
name: '安全事故', name: "安全事故",
value: 10 value: 0,
}, },
{ {
name: '社会保障', name: "社会保障",
value: 20 value: 0,
}, },
{ {
name: '市政管理', name: "市政管理",
value: 20 value: 0,
} },
] ],
} };
}, },
mounted() { mounted() {
// tagsList().then(res => { // tagsList().then(res => {
// this.piedata = [] // this.piedata = []
@ -108,93 +117,110 @@ export default {
// }) // })
// this.pieBox() // this.pieBox()
// }) // })
this.pieBox() this.getData();
}, },
methods: { methods: {
filterUrl(e) {
const result = this.imgList.filter((item) => item.type == e);
console.log(result[0]);
return result[0].url;
},
getData() {
yuqingTypes({ type: "2" }).then((res) => {
res.data.forEach((value, index) => {
this.imgList.forEach((value1, index1) => {
if (value.type == value1.type) {
this.piedata[index1].value = value.pt;
}
});
});
this.pieBox();
});
},
pieBox() { pieBox() {
const myChart = this.$echarts.init(document.getElementById('box')) const myChart = this.$echarts.init(document.getElementById("box"));
const optionFirst = { const optionFirst = {
color: [ color: [
'#316fdc', "#316fdc",
'#ffffff', "#ffffff",
'#96ff00', "#96ff00",
'#ff9314', "#ff9314",
'#08ff95', "#08ff95",
'#f8d748', "#f8d748",
'#4a9ff8', "#4a9ff8",
'#7efbe6' "#7efbe6",
], ],
tooltip: { tooltip: {
trigger: 'item', trigger: "item",
formatter: function(params) { formatter: function (params) {
return `${params.name}:${params.data.count}(${params.percent}%)` return `${params.name}:${params.value}%`;
}, },
textStyle: { textStyle: {
fontSize: 26, fontSize: 26,
fontWight: 'bold' fontWight: "bold",
} },
}, },
emphasis: { emphasis: {
show: true, show: true,
formatter: '{fz41|{a}\n{az24|{b}个}', formatter: "{fz41|{a}\n{az24|{b}个}",
textStyle: { textStyle: {
rich: { rich: {
fz41: { fz41: {
fontSize: 41, fontSize: 41,
padding: [0, 5, 0, 0] padding: [0, 5, 0, 0],
}, },
fz24: { fz24: {
fontSize: 26 fontSize: 26,
} },
} },
} },
}, },
series: [ series: [
{ {
name: '数量', name: "数量",
type: 'pie', type: "pie",
radius: ['60%', '80%'], radius: ["60%", "80%"],
avoidLabelOverlap: false, avoidLabelOverlap: false,
center: ['50%', '50%'], center: ["50%", "50%"],
label: { label: {
show: false, show: false,
position: 'center', position: "center",
formatter: function(params) { formatter: function (params) {
return `{a| ${params.name}} \n {b|${params.data.count}}` return `{a| ${params.name}} \n {b|${params.value}}%`;
}, },
rich: { rich: {
a: { a: {
fontFamily: 'SourceHanSansCN-Regular', fontFamily: "SourceHanSansCN-Regular",
color: '#06e1ff', color: "#06e1ff",
fontSize: 28 fontSize: 28,
}, },
b: { b: {
fontFamily: 'DIN-Medium', fontFamily: "DIN-Medium",
color: '#ffffff', color: "#ffffff",
fontSize: 32, fontSize: 32,
lineHeight: 50 lineHeight: 50,
} },
} },
}, },
emphasis: { emphasis: {
label: { label: {
show: true, show: true,
fontSize: '28', fontSize: "28",
fontWeight: 'bold' fontWeight: "bold",
} },
}, },
labelLine: { labelLine: {
show: false show: false,
}, },
data: this.piedata data: this.piedata,
} },
] ],
} };
myChart.setOption(optionFirst, true) myChart.setOption(optionFirst, true);
echartsJump(myChart, optionFirst) echartsJump(myChart, optionFirst);
} },
} },
} };
</script> </script>
<style lang='scss' scoped> <style lang='scss' scoped>
@ -205,7 +231,7 @@ export default {
width: 343px; width: 343px;
height: 343px; height: 343px;
margin: 82px 0 0 5px; margin: 82px 0 0 5px;
background: url('~@/assets/sentimeent/bg-饼图.png') no-repeat center; background: url("~@/assets/sentimeent/bg-饼图.png") no-repeat center;
} }
.moduleCount { .moduleCount {
width: 329px; width: 329px;

Loading…
Cancel
Save