574 lines
15 KiB
Vue
574 lines
15 KiB
Vue
<template>
|
||
<div>
|
||
<container2 title="信息化责任令完成概况">
|
||
<el-row style="height: 100%; width: 100%; padding: 0 10px 0 20px">
|
||
<!-- <div style="display: flex; align-items: center; margin-bottom: 28px">
|
||
<span>·已完成任务/完成率</span>
|
||
<span>55/80%</span>
|
||
<progressBar :percentage="" />
|
||
</div> -->
|
||
<div class="than">
|
||
<span style="font-size: 25px; margin-right: 3px">·</span>
|
||
<span>已完成任务/完成率</span>
|
||
<i class="num"
|
||
>{{ totalAndRate.total }}/{{
|
||
Math.floor(totalAndRate.rate * 100) / 100 || 0
|
||
}}%</i
|
||
>
|
||
<progressBar :percentage="totalAndRate.rate" />
|
||
</div>
|
||
<el-col :span="24" style="margin-bottom: 1px">
|
||
<el-row
|
||
style="
|
||
height: 42px;
|
||
line-height: 42px;
|
||
background: rgba(0, 255, 255, 0.3);
|
||
"
|
||
>
|
||
<!-- <el-col style="text-align: center" :span="3">序号</el-col> -->
|
||
<el-col style="text-align: center" :span="7">责任令</el-col>
|
||
<el-col style="text-align: center" :span="7">部门</el-col>
|
||
<el-col style="text-align: center" :span="7">完成情况</el-col>
|
||
</el-row>
|
||
</el-col>
|
||
<vue-seamless-scroll
|
||
:data="dataList"
|
||
ref="seamlessScroll"
|
||
class="warp-scroll"
|
||
:class-option="{
|
||
singleHeight: 43,
|
||
}"
|
||
>
|
||
<ul class="item">
|
||
<li v-for="item in dataList" :key="item.id">
|
||
<el-row>
|
||
<!-- <el-col style="text-align: center" :span="3">{{
|
||
item.id
|
||
}}</el-col> -->
|
||
<el-col
|
||
style="text-align: center"
|
||
:span="7"
|
||
:title="item.responsibilityContent"
|
||
>{{ item.responsibilityContent }}</el-col
|
||
>
|
||
<el-col
|
||
style="text-align: center"
|
||
:span="7"
|
||
:title="item.deptName"
|
||
>{{ item.deptName }}</el-col
|
||
>
|
||
<el-col style="text-align: center" :span="7">
|
||
<section class="box">
|
||
<span
|
||
v-if="item.completionStatus == '已完成'"
|
||
style="color: #6fd1b4; font-size: 25px; margin-right: 3px"
|
||
>·</span
|
||
>
|
||
<span
|
||
v-else-if="item.completionStatus == '未完成'"
|
||
style="color: #f64f58; font-size: 25px; margin-right: 3px"
|
||
>·</span
|
||
>
|
||
<span
|
||
v-else
|
||
style="color: #fa8c16; font-size: 25px; margin-right: 3px"
|
||
>·</span
|
||
>
|
||
<span v-if="item.completionStatus == '已完成'">已完成</span>
|
||
<span v-else-if="item.completionStatus == '未完成'"
|
||
>未完成</span
|
||
>
|
||
<span v-else>进行中</span>
|
||
</section>
|
||
</el-col>
|
||
</el-row>
|
||
</li>
|
||
</ul>
|
||
</vue-seamless-scroll>
|
||
</el-row>
|
||
</container2>
|
||
<container2 title="项目工作计划" style="margin-top: 10px">
|
||
<div slot="datePicker">
|
||
<bigScreenTabs
|
||
v-model="index"
|
||
:titleArr="['完成率', '明细']"
|
||
></bigScreenTabs>
|
||
</div>
|
||
<el-row
|
||
v-if="index == 0"
|
||
style="
|
||
height: 100%;
|
||
width: 100%;
|
||
padding: 0 10px 0 20px;
|
||
display: flex;
|
||
flex-direction: column;
|
||
justify-content: space-between;
|
||
"
|
||
>
|
||
<div class="than">
|
||
<span style="font-size: 25px; margin-right: 3px">·</span>
|
||
<span>已完成任务/完成率</span>
|
||
<i class="num"
|
||
>{{ totalAndRateTwo.total }}/{{ totalAndRateTwo.rate }}%</i
|
||
>
|
||
<progressBar :percentage="totalAndRateTwo.rate" />
|
||
</div>
|
||
<div style="height: 100%; width: 100%" ref="chart"></div>
|
||
</el-row>
|
||
<el-row v-else style="height: 100%; width: 100%; padding: 0 10px 0 20px">
|
||
<el-col :span="24" style="margin-bottom: 1px">
|
||
<el-row
|
||
style="
|
||
height: 42px;
|
||
line-height: 42px;
|
||
background: rgba(0, 255, 255, 0.3);
|
||
"
|
||
>
|
||
<!-- <el-col style="text-align: center" :span="3">序号</el-col> -->
|
||
<el-col style="text-align: center" :span="7">项目名称</el-col>
|
||
<el-col style="text-align: center" :span="7">计划名称</el-col>
|
||
<!-- <el-col style="text-align: center" :span="7">部门</el-col> -->
|
||
<el-col style="text-align: center" :span="7">完成情况</el-col>
|
||
</el-row>
|
||
</el-col>
|
||
<vue-seamless-scroll
|
||
:data="listData"
|
||
ref="seamlessScroll2"
|
||
class="warp-scroll"
|
||
:class-option="{
|
||
singleHeight: 43,
|
||
}"
|
||
style="height: 168px"
|
||
>
|
||
<ul class="item">
|
||
<li v-for="item in listData" :key="item.id">
|
||
<el-row>
|
||
<!-- <el-col style="text-align: center" :span="3">{{
|
||
item.id
|
||
}}</el-col> -->
|
||
<el-col
|
||
style="text-align: center"
|
||
:title="item.projectName"
|
||
:span="7"
|
||
>{{ item.projectName }}</el-col
|
||
>
|
||
<el-col
|
||
style="text-align: center"
|
||
:title="item.workPlanName"
|
||
:span="7"
|
||
>{{ item.workPlanName }}</el-col
|
||
>
|
||
<!-- <el-col
|
||
style="text-align: center"
|
||
:title="item.deptName"
|
||
:span="7"
|
||
>{{ item.deptName }}</el-col
|
||
> -->
|
||
<el-col style="text-align: center" :span="7">
|
||
<section class="box">
|
||
<span
|
||
v-if="item.completedStatus == '已完成'"
|
||
style="color: #6fd1b4; font-size: 25px; margin-right: 3px"
|
||
>·</span
|
||
>
|
||
<span
|
||
v-else-if="item.completedStatus == '未完成'"
|
||
style="color: #f64f58; font-size: 25px; margin-right: 3px"
|
||
>·</span
|
||
>
|
||
<span
|
||
v-else
|
||
style="color: #fa8c16; font-size: 25px; margin-right: 3px"
|
||
>·</span
|
||
>
|
||
<span v-if="item.completedStatus == '已完成'">已完成</span>
|
||
<span v-else-if="item.completedStatus == '未完成'"
|
||
>未完成</span
|
||
>
|
||
<span v-else>进行中</span>
|
||
</section>
|
||
</el-col>
|
||
</el-row>
|
||
</li>
|
||
</ul>
|
||
</vue-seamless-scroll>
|
||
</el-row>
|
||
</container2>
|
||
</div>
|
||
</template>
|
||
|
||
<script>
|
||
import rocketTit from "../components/rocketTit/index.vue";
|
||
import container2 from "./components/container2/index.vue";
|
||
import bigScreenTabs from "../components/bigScreenTabs/index.vue";
|
||
import progressBar from "@/views/bigScreen/components/progress/index.vue";
|
||
import vueSeamlessScroll from "vue-seamless-scroll";
|
||
import colorList from "@/utils/colorPalette";
|
||
// import {Liquid} from '@antv/g2plot';
|
||
// import resize from '../../dashboard/mixins/resize'
|
||
import echarts from "echarts";
|
||
require("echarts/theme/macarons"); // echarts theme
|
||
export default {
|
||
// mixins: [resize],
|
||
name: "left1",
|
||
components: {
|
||
rocketTit,
|
||
container2,
|
||
bigScreenTabs,
|
||
progressBar,
|
||
vueSeamlessScroll,
|
||
},
|
||
data() {
|
||
return {
|
||
dataList: [],
|
||
totalAndRate: {
|
||
total: 0,
|
||
rate: 0,
|
||
},
|
||
totalAndRateTwo: {
|
||
total: 0,
|
||
rate: 0,
|
||
},
|
||
index: 0,
|
||
chart: null,
|
||
colorList,
|
||
listData: [],
|
||
// scrollList: [
|
||
// {
|
||
// id: 1,
|
||
// name: '计划一',
|
||
// level: '一级',
|
||
// status: 1,
|
||
// },
|
||
// {
|
||
// id: 2,
|
||
// name: '计划二',
|
||
// level: '二级',
|
||
// status: 2,
|
||
// },
|
||
// {
|
||
// id: 3,
|
||
// name: '计划三',
|
||
// level: '三级',
|
||
// status: 3,
|
||
// },
|
||
// {
|
||
// id: 4,
|
||
// name: '计划四',
|
||
// level: '二级',
|
||
// status: 2,
|
||
// },
|
||
// {
|
||
// id: 5,
|
||
// name: '计划五',
|
||
// level: '三级',
|
||
// status: 3,
|
||
// },
|
||
// ],
|
||
};
|
||
},
|
||
watch: {
|
||
index(newVal, oldVal) {
|
||
if (newVal == 0) {
|
||
this.$nextTick(() => {
|
||
this.initChart();
|
||
});
|
||
} else {
|
||
this.getData2();
|
||
}
|
||
},
|
||
},
|
||
mounted() {
|
||
this.$nextTick(() => {
|
||
this.initChart();
|
||
});
|
||
},
|
||
beforeDestroy() {},
|
||
methods: {
|
||
getData() {
|
||
this.request({
|
||
url: "/hx/informationManagement/getHxResponsibilityStatusPic",
|
||
method: "get",
|
||
}).then(({ data }) => {
|
||
this.dataList = data.list;
|
||
this.totalAndRate = data.totalAndRate;
|
||
this.$refs.seamlessScroll.reset();
|
||
});
|
||
},
|
||
getData2() {
|
||
this.request({
|
||
url: "/hx/informationManagement/getHxWorkPlanPic",
|
||
method: "get",
|
||
params: {
|
||
type: "2",
|
||
},
|
||
}).then(({ data }) => {
|
||
this.listData = data.list;
|
||
this.$refs.seamlessScroll2.reset();
|
||
});
|
||
},
|
||
initChart() {
|
||
this.request({
|
||
url: "/hx/informationManagement/getHxWorkPlanPic",
|
||
method: "get",
|
||
params: {
|
||
type: "1",
|
||
},
|
||
}).then(({ data }) => {
|
||
this.totalAndRateTwo = data.totalAndRate;
|
||
this.chart = echarts.init(this.$refs.chart);
|
||
this.setOptions(data.list);
|
||
});
|
||
},
|
||
setOptions(resData) {
|
||
// console.log(resData)
|
||
let titList = [];
|
||
let rate = [];
|
||
let completedNum = [];
|
||
for (let i = 0; i < resData.length; i++) {
|
||
const item = resData[i];
|
||
titList.push(item.name);
|
||
rate.push(item.value.rate);
|
||
completedNum.push(item.value.completedNum);
|
||
}
|
||
this.chart.setOption({
|
||
tooltip: {
|
||
trigger: "axis",
|
||
// formatter: '{a1}<br/>{b1}:{c1}',
|
||
},
|
||
legend: {
|
||
data: ["数量", "完成率"],
|
||
textStyle: {
|
||
color: "#fff", //legend字体颜色
|
||
},
|
||
// selectedMode: false,
|
||
},
|
||
grid: {
|
||
containLabel: true,
|
||
left: 20,
|
||
right: 10,
|
||
top: 30,
|
||
bottom: 50,
|
||
},
|
||
xAxis: {
|
||
data: titList,
|
||
axisLine: {
|
||
lineStyle: {
|
||
color: "rgb(255, 255, 255)",
|
||
},
|
||
},
|
||
},
|
||
// dataZoom: {
|
||
// type: "slider",
|
||
// start: 0,
|
||
// end: this.dataZoomEnd(titList.length, 5),
|
||
// textStyle: {
|
||
// color: "#fff",
|
||
// },
|
||
// },
|
||
dataZoom: [
|
||
{
|
||
type: "slider",
|
||
textStyle: {
|
||
color: "#fff",
|
||
},
|
||
startValue: this.dataZoomStart(titList.length, 4, "start"),
|
||
endValue: this.dataZoomStart(titList.length, 4, "end"),
|
||
},
|
||
{
|
||
type: "inside",
|
||
},
|
||
],
|
||
color: ["#ccc", "red"],
|
||
yAxis: [
|
||
{
|
||
name: "个",
|
||
splitLine: {
|
||
show: true,
|
||
// 改变轴线颜色
|
||
lineStyle: {
|
||
// 使用深浅的间隔色
|
||
color: ["rgba(255, 255, 255,.5)"],
|
||
},
|
||
},
|
||
axisLabel: {
|
||
formatter: "{value}",
|
||
},
|
||
axisLine: {
|
||
lineStyle: {
|
||
color: "rgb(255, 255, 255)",
|
||
},
|
||
},
|
||
},
|
||
{
|
||
type: "value",
|
||
min: 0,
|
||
max: 100,
|
||
interval: 20,
|
||
axisLabel: {
|
||
formatter: "{value} %",
|
||
},
|
||
splitLine: {
|
||
show: false, //不显示网格线
|
||
},
|
||
splitArea: {
|
||
show: false, //不显示网格区域
|
||
},
|
||
axisLine: {
|
||
lineStyle: {
|
||
color: "rgb(255, 255, 255)",
|
||
},
|
||
},
|
||
},
|
||
],
|
||
series: [
|
||
{
|
||
name: "数量",
|
||
type: "bar",
|
||
barWidth: 30,
|
||
position: [0, 0],
|
||
data: completedNum,
|
||
itemStyle: {
|
||
color: {
|
||
type: "linear", // 线性渐变
|
||
x: 0,
|
||
y: 0,
|
||
x2: 0,
|
||
y2: 1,
|
||
colorStops: [
|
||
{
|
||
offset: 0,
|
||
color: "#B5D3FE",
|
||
},
|
||
{
|
||
offset: 1,
|
||
color: "#7EA7FC",
|
||
},
|
||
],
|
||
},
|
||
},
|
||
},
|
||
{
|
||
name: "完成率",
|
||
type: "scatter",
|
||
symbol: "rect",
|
||
symbolSize: [30, 4],
|
||
symbolOffset: [0, 0],
|
||
position: [0, 0],
|
||
yAxisIndex: 1,
|
||
itemStyle: {
|
||
color: "#F6D97E",
|
||
},
|
||
data: rate,
|
||
},
|
||
],
|
||
});
|
||
},
|
||
},
|
||
created() {
|
||
this.getData();
|
||
},
|
||
};
|
||
</script>
|
||
|
||
<style lang="scss" scoped>
|
||
.warp-scroll {
|
||
height: 126px;
|
||
width: 100%;
|
||
margin: 0 auto;
|
||
overflow: hidden;
|
||
ul {
|
||
list-style: none;
|
||
padding: 0;
|
||
margin: 0 auto;
|
||
li,
|
||
a {
|
||
display: block;
|
||
display: flex;
|
||
justify-content: space-between;
|
||
font-size: 15px;
|
||
}
|
||
li {
|
||
display: block;
|
||
height: 42px;
|
||
line-height: 42px;
|
||
background: rgba(42, 67, 125, 0.25);
|
||
// box-shadow: 0px 1px 0px 0px rgba(139, 177, 237, 0.5);
|
||
margin-bottom: 1px;
|
||
img {
|
||
vertical-align: sub;
|
||
margin-right: 5px;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
.box {
|
||
display: flex;
|
||
justify-content: center;
|
||
align-items: center;
|
||
}
|
||
.than {
|
||
padding: 0 0 5px 15px;
|
||
display: flex;
|
||
align-items: center;
|
||
.num {
|
||
font-size: 24px;
|
||
font-weight: 600;
|
||
margin: 0 10px;
|
||
}
|
||
}
|
||
|
||
.content1 {
|
||
// height: 200px;
|
||
height: 100%;
|
||
|
||
.chart1 {
|
||
margin: 0 auto;
|
||
width: 100%;
|
||
height: 192px;
|
||
background: transparent;
|
||
}
|
||
}
|
||
|
||
.num {
|
||
font-size: 30px;
|
||
font-family: Roboto-BlackItalic, Roboto;
|
||
font-weight: normal;
|
||
color: #91d5fe;
|
||
vertical-align: sub;
|
||
// margin-right: 3px;
|
||
}
|
||
|
||
.content2 {
|
||
padding: 20px;
|
||
flex: 1;
|
||
height: 100%;
|
||
box-sizing: border-box;
|
||
display: flex;
|
||
flex-direction: column;
|
||
.chart2 {
|
||
height: 100%;
|
||
}
|
||
|
||
.tit {
|
||
font-size: 16px;
|
||
font-family: PingFangSC-Semibold, PingFang SC;
|
||
font-weight: 600;
|
||
color: #ffffff;
|
||
line-height: 22px;
|
||
position: relative;
|
||
padding-left: 15px;
|
||
}
|
||
.tit::after {
|
||
content: "";
|
||
display: block;
|
||
position: absolute;
|
||
top: 3px;
|
||
left: 0px;
|
||
width: 4px;
|
||
height: 16px;
|
||
background: #00ffff;
|
||
}
|
||
}
|
||
</style>
|