许宏杰 1 year ago
commit 23cf99bcc4

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

@ -21,3 +21,10 @@ export function safeRisks() {
method: 'get',
})
}
//部门专办情况
export function sectorZB() {
return request({
url: '/zongzhi/opinionscreen/sentimentdept',
method: 'get',
})
}

@ -11,59 +11,63 @@
</template>
<script>
import { getyqZblNum } from '@/api/common'
import { getyqZblNum } from "@/api/common";
import { sectorZB } from "@/api/wlSafe";
export default {
data() {
return {
lineName: ['消防部', '公安部', '通信部', '档案部', '后勤部', '审查部'],
lineValue: [10, 20, 5, 6, 1, 30]
}
lineName: [],
lineValue: [],
};
},
mounted() {
this.lineBox()
// getyqZblNum().then(res => {
// res.data.forEach(ele => {
// this.lineName.push(ele.deptName)
// this.lineValue.push(ele.referralCount)
// })
// this.lineBox()
// }
// )
this.getData()
},
methods: {
getData() {
sectorZB().then((res) => {
res.data.forEach(value => {
this.lineName.push(value.dep_name)
this.lineValue.push(value.count)
});
this.lineBox();
});
},
lineBox() {
const myChart = this.$echarts.init(document.getElementById('box2'))
const options = ({
const myChart = this.$echarts.init(document.getElementById("box2"));
const options = {
animation: true,
grid: {
top: '6.5%',
bottom: '15%',
right: '5%'
top: "6.5%",
bottom: "15%",
right: "5%",
},
title: {
text: '单位:件',
text: "单位:件",
textStyle: {
align: 'center',
color: 'rgba(255,255,255,0.5)',
fontSize: 24
align: "center",
color: "rgba(255,255,255,0.5)",
fontSize: 24,
},
top: '-4px',
left: '11%'
top: "-4px",
left: "11%",
},
xAxis: {
data: this.lineName,
axisLine: {
show: false // X线
show: false, // X线
},
axisTick: {
show: false // X线
show: false, // X线
},
splitLine: {
show: true,
lineStyle: {
color: 'rgba(77, 128, 254, 0.2)',
width: 2
}
color: "rgba(77, 128, 254, 0.2)",
width: 2,
},
},
axisLabel: {
show: true,
@ -71,184 +75,183 @@ export default {
margin: 20,
fontSize: 18,
textStyle: {
color: '#65D5FF' // X
color: "#65D5FF", // X
},
formatter: function(params) {
var newParamsName = '' //
var paramsNameNumber = params.length //
var provideNumber = 5 //
var rowNumber = Math.ceil(paramsNameNumber / provideNumber) //
formatter: function (params) {
var newParamsName = ""; //
var paramsNameNumber = params.length; //
var provideNumber = 5; //
var rowNumber = Math.ceil(paramsNameNumber / provideNumber); //
if (paramsNameNumber > provideNumber) {
/** 循环每一行,p表示行 */
for (var i = 0; i < rowNumber; i++) {
var tempStr = '' //
var start = i * provideNumber //
var end = start + provideNumber //
var tempStr = ""; //
var start = i * provideNumber; //
var end = start + provideNumber; //
//
if (i === rowNumber - 1) {
tempStr = params.substring(start, paramsNameNumber)
tempStr = params.substring(start, paramsNameNumber);
} else {
tempStr = params.substring(start, end) + '\n'
tempStr = params.substring(start, end) + "\n";
}
newParamsName += tempStr
newParamsName += tempStr;
}
} else {
newParamsName = params
}
return newParamsName
}
newParamsName = params;
}
return newParamsName;
},
},
},
yAxis: [
{
type: 'value',
type: "value",
gridIndex: 0,
min: 0,
max: (value) => {
if (value.max < 10) {
return 10
return 10;
} else {
return Math.ceil(value.max / 10) * 10
return Math.ceil(value.max / 10) * 10;
}
},
splitNumber: 5,
splitLine: {
show: true,
lineStyle: {
color: 'rgba(77, 128, 254, 0.2)',
width: 2
}
color: "rgba(77, 128, 254, 0.2)",
width: 2,
},
},
axisTick: {
show: false
show: false,
},
axisLine: {
show: true,
lineStyle: {
color: 'rgba(77, 128, 254, 0.2)'
}
color: "rgba(77, 128, 254, 0.2)",
},
},
axisLabel: {
show: true,
margin: 14,
fontSize: 20,
textStyle: {
color: '#65D5FF'
}
}
}
color: "#65D5FF",
},
},
},
],
series: [
{
name: '单数',
type: 'bar',
name: "单数",
type: "bar",
barWidth: 16,
itemStyle: {
normal: {
color: new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [
{
offset: 0,
color: 'rgba(146, 225, 255, 1)'
color: "rgba(146, 225, 255, 1)",
},
{
offset: 1,
color: 'rgba(0, 151, 251, 1)'
}
])
}
color: "rgba(0, 151, 251, 1)",
},
]),
},
},
data: this.lineValue,
z: 10,
zlevel: 0,
label: {
show: true,
position: 'top',
position: "top",
textStyle: {
color: '#ffffff'
}
}
color: "#ffffff",
},
},
},
{
//
type: 'pictorialBar',
type: "pictorialBar",
itemStyle: {
normal: {
color: '#0F375F'
}
color: "#0F375F",
},
},
symbolRepeat: 'fixed',
symbolRepeat: "fixed",
symbolMargin: 6,
symbol: 'rect',
symbol: "rect",
symbolClip: true,
symbolSize: [18, 2],
symbolPosition: 'start',
symbolPosition: "start",
symbolOffset: [1, 1],
data: this.lineValue,
width: 2,
z: 0,
zlevel: 1
zlevel: 1,
},
{
type: 'bar',
barGap: '-110%', //
type: "bar",
barGap: "-110%", //
data: [10, 10, 10, 10, 10, 10, 10],
barWidth: 16,
itemStyle: {
normal: {
color: 'transparent', //
color: "transparent", //
// barBorderRadius: 0, //
label: {
//
show: false,
position: 'top' // insideTop insideLeft
}
}
position: "top", // insideTop insideLeft
},
},
z: 0
},
z: 0,
},
{
type: 'line',
type: "line",
smooth: true, // 线
showAllSymbol: false, //
symbolSize: 0,
lineStyle: {
width: 0
width: 0,
},
areaStyle: {
color: 'rgba(0, 151, 251, 0.5)'
color: "rgba(0, 151, 251, 0.5)",
},
data: this.lineValue,
},
data: this.lineValue
}
],
dataZoom: [
{
type: 'slider',
type: "slider",
show: false,
xAxisIndex: [0],
endValue: 5,
startValue: 0
}
]
})
if (options && typeof options === 'object') {
myChart.setOption(options, true)
startValue: 0,
},
],
};
if (options && typeof options === "object") {
myChart.setOption(options, true);
//
setInterval(() => {
if (options.dataZoom[0].endValue === this.lineValue?.length) {
options.dataZoom[0].endValue = 5
options.dataZoom[0].startValue = 0
options.dataZoom[0].endValue = 5;
options.dataZoom[0].startValue = 0;
} else {
options.dataZoom[0].endValue = options.dataZoom[0].endValue + 1
options.dataZoom[0].startValue = options.dataZoom[0].startValue + 1
}
myChart.setOption(options, true)
}, 2000)
}
options.dataZoom[0].endValue = options.dataZoom[0].endValue + 1;
options.dataZoom[0].startValue = options.dataZoom[0].startValue + 1;
}
myChart.setOption(options, true);
}, 2000);
}
}
},
},
};
</script>
<style lang='scss' scoped>
#box2 {

@ -69,17 +69,17 @@
<div class="Special-report" @click="reportDetails('专报')">
<div class="Special-icon"></div>
<div class="Special-title">专报</div>
<div class="Special-num">{{ filteryqbg(1) }}</div>
<div class="Special-num">{{ Transfer[0].bg }}</div>
</div>
<div class="Monthly-report" @click="reportDetails('月报')">
<div class="Monthly-icon"></div>
<div class="Monthly-title">月报</div>
<div class="Monthly-num">{{ filteryqbg(2) }}</div>
<div class="Monthly-num">{{ Transfer[1].bg }}</div>
</div>
<div class="depth-report" @click="reportDetails('深度报告')">
<div class="depth-icon"></div>
<div class="depth-title">深度报告</div>
<div class="depth-num">{{ filteryqbg(3) }}</div>
<div class="depth-num">{{ Transfer[2].bg }}</div>
</div>
</div>
</div>
@ -222,21 +222,23 @@
text-align: center;
display: flex;
justify-content: center;
align-items: center;
"
>
<div
v-if="fileExtension === 'docx' || fileExtension === 'doc'"
ref="file"
ref="file1"
class="file-content"
></div>
<div v-if="fileExtension === 'pdf'" class="file-content">
<pdf
<!-- <pdf
v-for="i in numPages"
ref="pdf"
:key="i"
:src="pdfUrl"
:page="i"
></pdf>
></pdf> -->
<iframe style="height: 100%; width: 100%" :src="pdfUrl"></iframe>
</div>
</div>
<span slot="footer" class="dialog-footer">
@ -340,7 +342,21 @@ export default {
turnTime: null,
tsdNum: 461,
zbdNum: 475,
Transfer: {},
Transfer: [
{
type: 1,
bg: 0,
},
{
type: 2,
bg: 0,
},
{
type: 3,
bg: 0,
},
],
turnDetailsList: [],
sentimeentList: {
options: ["转办量", "转办详情"],
@ -359,9 +375,9 @@ export default {
//
fileExtension: "",
numPages: 1,
pdfUrl: "",
currentWarningObj: {},
//===================
pdfUrl: "",
formData: {
pageSize: 1,
pageNum: 1,
@ -437,17 +453,19 @@ export default {
this.getOneList();
},
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;
res.data.reportList.forEach((value, index) => {
this.Transfer.forEach((value1, index1) => {
if (value.sentimentReportType == value1.type) {
this.Transfer[index1].bg = value.count;
return;
}
});
});
console.log(this.Transfer);
});
//
yuqingListA().then((res) => {
@ -546,40 +564,31 @@ export default {
this.newbgForm.pageNum = val;
this.getyqbgType();
},
rowClick(row, type) {
rowClick(row) {
if (!row.fileName && !row.fileUrl) return;
let str = row.fileUrl.split(',')
let str1 = str[0].split('.')
this.fileExtension = str1[1];
if (this.fileExtension == "pdf") {
this.pdfUrl = process.env.VUE_APP_BASE_API2 + str[0];
this.dialogDetails = true;
let str = row.fileName.split(".");
this.fileExtension = str[1];
},
getNumPages(url) {
} else if (
this.fileExtension === "docx" ||
this.fileExtension === "doc"
) {
axios({
method: "GET",
url: url, //
paramsSerializer: function (params) {
return qs.stringify(params, { arrayFormat: "brackets" });
},
headers: {
"Content-Type":
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
},
responseType: "blob",
})
.then((response) => {
this.pdfUrl = this.getObjectURL(response.data);
const loadingTask = pdf.createLoadingTask(this.pdfUrl);
loadingTask.promise
.then((pdf) => {
this.numPages = pdf.numPages;
method: "get",
responseType: "blob", //
url: process.env.VUE_APP_BASE_API2 + str[0],
}).then(({ data }) => {
if (data) {
this.dialogDetails = true;
})
.catch((err) => {
console.error("pdf 加载失败", err);
this.$nextTick(() => {
docx.renderAsync(data, this.$refs.file1); //
});
})
.catch((error) => {
this.$message.error("" + error);
}
});
}
},
// url
getObjectURL(file) {

Loading…
Cancel
Save