|
@@ -156,7 +156,7 @@ let app = new Vue({
|
|
configMark: {
|
|
configMark: {
|
|
waitTime: 2000,
|
|
waitTime: 2000,
|
|
// header: ["单位名称", "人员数量", "月份", "预警项"],
|
|
// header: ["单位名称", "人员数量", "月份", "预警项"],
|
|
- header: ["单位名称", "月份", "人员数量", "预警项"],
|
|
|
|
|
|
+ header: ["单位名称", "月份", "人员数量", "预警项"],
|
|
rowNum: 6,
|
|
rowNum: 6,
|
|
data: [
|
|
data: [
|
|
["<span class='red'>西山煤电</span>", "<span class='red'>71</span>", "<span class='red'>7月</span>", "<span class='red'>薪资低于4000元</span>"],
|
|
["<span class='red'>西山煤电</span>", "<span class='red'>71</span>", "<span class='red'>7月</span>", "<span class='red'>薪资低于4000元</span>"],
|
|
@@ -511,27 +511,33 @@ let app = new Vue({
|
|
},
|
|
},
|
|
beforeCreate() {
|
|
beforeCreate() {
|
|
// 跳转地址
|
|
// 跳转地址
|
|
- let AddUrl = location.protocol + "//" + location.host + "/ierp"
|
|
|
|
- return
|
|
|
|
- if (!window.location.search) {
|
|
|
|
- // alert("链接已失效,请重新打开")
|
|
|
|
- window.location.href = AddUrl
|
|
|
|
- }
|
|
|
|
- let arr = window.location.search.split("&")
|
|
|
|
- let dataList = []
|
|
|
|
- arr.forEach(item => {
|
|
|
|
- dataList.push(item.split("=")[1])
|
|
|
|
- })
|
|
|
|
- window.user = dataList[0]
|
|
|
|
- let newDate = new Date().getTime()
|
|
|
|
- let authorityType = window.sessionStorage.getItem("authorityType") || false
|
|
|
|
- if (!authorityType) {
|
|
|
|
- if (newDate - dataList[1] > 30000) {
|
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ let AddUrl = location.protocol + "//" + location.host + "/ierp"
|
|
|
|
+ // return
|
|
|
|
+ if (!window.location.search) {
|
|
// alert("链接已失效,请重新打开")
|
|
// alert("链接已失效,请重新打开")
|
|
window.location.href = AddUrl
|
|
window.location.href = AddUrl
|
|
}
|
|
}
|
|
- window.sessionStorage.setItem("authorityType", true)
|
|
|
|
- }
|
|
|
|
|
|
+ console.log(window.location);
|
|
|
|
+ let arr = window.location.search.split("&")
|
|
|
|
+ let dataList = []
|
|
|
|
+ arr.forEach(item => {
|
|
|
|
+ dataList.push(item.split("=")[1])
|
|
|
|
+ })
|
|
|
|
+ window.user = dataList[0]
|
|
|
|
+ let newDate = new Date().getTime()
|
|
|
|
+ let authorityType = window.sessionStorage.getItem("authorityType") || false
|
|
|
|
+ console.log(authorityType);
|
|
|
|
+ if (!authorityType) {
|
|
|
|
+ if (newDate - parseInt(dataList[1]) < 30000) {
|
|
|
|
+ // alert("链接已失效,请重新打开")
|
|
|
|
+ console.log(newDate - parseInt(dataList[1]) < 30000);
|
|
|
|
+ window.location.href = AddUrl
|
|
|
|
+ }
|
|
|
|
+ window.sessionStorage.setItem("authorityType", true)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+
|
|
},
|
|
},
|
|
beforeDestroy() {
|
|
beforeDestroy() {
|
|
window.sessionStorage.removeItem("authorityType")
|
|
window.sessionStorage.removeItem("authorityType")
|
|
@@ -931,7 +937,7 @@ let app = new Vue({
|
|
that.initLineElseEchartsR(echarts90, { x: that.sx[0], y: that.sy[0] })
|
|
that.initLineElseEchartsR(echarts90, { x: that.sx[0], y: that.sy[0] })
|
|
|
|
|
|
let leftEnd = that.$refs.leftEnd
|
|
let leftEnd = that.$refs.leftEnd
|
|
- that.initBarEchartsElse(leftEnd, leftEndList, ["累计月平均工资", "同期累计月平均工资"])
|
|
|
|
|
|
+ that.initBarEchartsElseJM(leftEnd, leftEndList, ["累计月平均工资", "同期累计月平均工资"])
|
|
|
|
|
|
let el = this.$refs.container
|
|
let el = this.$refs.container
|
|
// this.initProvinceChart(el)
|
|
// this.initProvinceChart(el)
|
|
@@ -3791,6 +3797,210 @@ let app = new Vue({
|
|
chart.resize();
|
|
chart.resize();
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+ initBarEchartsElseJM(el, data, nameList) {
|
|
|
|
+ let chart = echarts.init(el);
|
|
|
|
+ var scale = 2;
|
|
|
|
+ var singleData = data.y1;
|
|
|
|
+ var multipleData = data.y2;
|
|
|
|
+ var color = "#fff";
|
|
|
|
+ option = {
|
|
|
|
+ textStyle: {
|
|
|
|
+ fontSize: 30,
|
|
|
|
+ color: '#A3E2F4'
|
|
|
|
+ },
|
|
|
|
+ tooltip: {
|
|
|
|
+ show: true,
|
|
|
|
+ backgroundColor: 'rgba(0, 0, 0, 0.5)',
|
|
|
|
+ borderColor: "rgba(0,0,0,0.5)",
|
|
|
|
+ trigger: 'axis',
|
|
|
|
+ textStyle: {
|
|
|
|
+ fontSize: 30,
|
|
|
|
+ color: '#A3E2F4'
|
|
|
|
+ },
|
|
|
|
+ axisPointer: { // 坐标轴指示器,坐标轴触发有效
|
|
|
|
+ type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
|
|
|
|
+ },
|
|
|
|
+ formatter: '{b}<br />{a0}: ****<br />{a1}: ****',
|
|
|
|
+ },
|
|
|
|
+ legend: {
|
|
|
|
+ data: nameList,
|
|
|
|
+ align: 'left',
|
|
|
|
+ // itemGap: 50,
|
|
|
|
+ // x: 'right',
|
|
|
|
+ right: '1%',
|
|
|
|
+ y: '1%',
|
|
|
|
+ // icon: 'rect',
|
|
|
|
+ textStyle: {
|
|
|
|
+ color: "#fff",
|
|
|
|
+ fontSize: 30
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ grid: {
|
|
|
|
+ top: "10%",
|
|
|
|
+ left: '6%',
|
|
|
|
+ right: '4%',
|
|
|
|
+ bottom: '20%',
|
|
|
|
+ },
|
|
|
|
+ xAxis: [{
|
|
|
|
+ type: 'category',
|
|
|
|
+ data: data.x,
|
|
|
|
+ axisLabel: {
|
|
|
|
+ // inside: true,
|
|
|
|
+ // rotate: 30,
|
|
|
|
+ interval: 0,
|
|
|
|
+ padding: [15, 0, 0, 0],
|
|
|
|
+ textStyle: {
|
|
|
|
+ color: "#fff",
|
|
|
|
+ fontSize: 30,
|
|
|
|
+ },
|
|
|
|
+ formatter: function (value) {
|
|
|
|
+ // 将文字进行换行
|
|
|
|
+ let list = value.split("")
|
|
|
|
+ if (list.length == 5) {
|
|
|
|
+ list[3] = ""
|
|
|
|
+ }
|
|
|
|
+ if (list.length > 4) {
|
|
|
|
+ list[4] = ""
|
|
|
|
+ }
|
|
|
|
+ return list[0] + list[1] + "\n" + list[2] + list[3];
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ axisTick: {
|
|
|
|
+ show: false,
|
|
|
|
+ inside: true,
|
|
|
|
+ length: 8 * scale,
|
|
|
|
+ lineStyle: {
|
|
|
|
+ color: color,
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ axisLine: {
|
|
|
|
+ show: false,
|
|
|
|
+ lineStyle: {
|
|
|
|
+ color: color,
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ splitLine: {
|
|
|
|
+ show: false,
|
|
|
|
+ lineStyle: {
|
|
|
|
+ color: 'rgba(80,224,255,0.3)',
|
|
|
|
+ type: 'dashed'
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }],
|
|
|
|
+ yAxis: [{
|
|
|
|
+ type: 'value',
|
|
|
|
+ axisLabel: {
|
|
|
|
+ // inside: true,
|
|
|
|
+ padding: [0, 15, 0, 0],
|
|
|
|
+ textStyle: {
|
|
|
|
+ color: color,
|
|
|
|
+ fontSize: 28,
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ axisTick: {
|
|
|
|
+ show: false,
|
|
|
|
+ lineStyle: {
|
|
|
|
+ color: color,
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ axisLine: {
|
|
|
|
+ show: false,
|
|
|
|
+ lineStyle: {
|
|
|
|
+ color: color,
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ splitLine: {
|
|
|
|
+ show: false,
|
|
|
|
+ lineStyle: {
|
|
|
|
+ color: '#fff',
|
|
|
|
+ type: 'dashed'
|
|
|
|
+ },
|
|
|
|
+ show: false,
|
|
|
|
+ },
|
|
|
|
+ nameTextStyle: {
|
|
|
|
+ color: "#fff",
|
|
|
|
+ fontSize: 16 * scale,
|
|
|
|
+ padding: [0, 0, 10, 0]
|
|
|
|
+ }
|
|
|
|
+ }],
|
|
|
|
+ series: [{
|
|
|
|
+ name: nameList[0],
|
|
|
|
+ type: 'bar',
|
|
|
|
+ itemStyle: {
|
|
|
|
+ color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
|
|
|
|
+ offset: 1,
|
|
|
|
+ color: "#02355C",
|
|
|
|
+ }, //柱图渐变色
|
|
|
|
+ {
|
|
|
|
+ offset: 0,
|
|
|
|
+ color: "#45DAD1",
|
|
|
|
+ },
|
|
|
|
+ ], false),
|
|
|
|
+ },
|
|
|
|
+ barWidth: 20,
|
|
|
|
+ label: {
|
|
|
|
+ show: false,
|
|
|
|
+ position: "top",
|
|
|
|
+ align: "center",
|
|
|
|
+ },
|
|
|
|
+ data: singleData
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name: nameList[1],
|
|
|
|
+ type: 'line',
|
|
|
|
+ symbolSize: 20,
|
|
|
|
+ itemStyle: {
|
|
|
|
+ color: '#40A9FF',
|
|
|
|
+ },
|
|
|
|
+ smooth: false,
|
|
|
|
+ showSymbol: true, // 节点长显
|
|
|
|
+ barWidth: 20,
|
|
|
|
+
|
|
|
|
+ data: multipleData
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ // {
|
|
|
|
+ // name: nameList[1],
|
|
|
|
+ // type: 'line',
|
|
|
|
+ // barWidth: '15%',
|
|
|
|
+ // barGap: '40%',
|
|
|
|
+ // label: {
|
|
|
|
+ // show: false,
|
|
|
|
+ // position: "top",
|
|
|
|
+ // align: "center",
|
|
|
|
+ // },
|
|
|
|
+ // itemStyle: {
|
|
|
|
+ // color: '#ffc72b',
|
|
|
|
+ // },
|
|
|
|
+ // data: multipleData
|
|
|
|
+ // },
|
|
|
|
+ // {
|
|
|
|
+ // name: nameList[1],
|
|
|
|
+ // type: 'bar',
|
|
|
|
+ // barWidth: '15%',
|
|
|
|
+ // barGap: '40%',
|
|
|
|
+
|
|
|
|
+ // itemStyle: {
|
|
|
|
+ // color: 'rgba(94,218,255,0.4)',
|
|
|
|
+ // },
|
|
|
|
+ // label: {
|
|
|
|
+ // show: false,
|
|
|
|
+ // position: "top",
|
|
|
|
+ // align: "center",
|
|
|
|
+ // },
|
|
|
|
+ // data: multipleData
|
|
|
|
+ // },
|
|
|
|
+ ]
|
|
|
|
+ };
|
|
|
|
+ chart.setOption(option);
|
|
|
|
+ tools.loopShowTooltip(chart, option, {
|
|
|
|
+ nterval: 2000,
|
|
|
|
+ loopSeries: true,
|
|
|
|
+ });
|
|
|
|
+ window.addEventListener("resize", function () {
|
|
|
|
+ chart.resize();
|
|
|
|
+ });
|
|
|
|
+ },
|
|
initStereoscopic(el, data) {
|
|
initStereoscopic(el, data) {
|
|
this.stereoscopic = echarts.init(el);
|
|
this.stereoscopic = echarts.init(el);
|
|
option = {
|
|
option = {
|
|
@@ -6535,8 +6745,16 @@ let app = new Vue({
|
|
y1,
|
|
y1,
|
|
y2,
|
|
y2,
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ if (res.mdnb_encryption) {
|
|
|
|
+ that.initBarEchartsElse(leftEnd, leftEndList, ["累计月平均工资", "同期累计月平均工资"])
|
|
|
|
+
|
|
|
|
+ } else {
|
|
|
|
+ that.initBarEchartsElseJM(leftEnd, leftEndList, ["累计月平均工资", "同期累计月平均工资"])
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
- that.initBarEchartsElse(leftEnd, leftEndList, ["累计月平均工资", "同期累计月平均工资"])
|
|
|
|
|
|
|
|
|
|
|
|
})
|
|
})
|