diff --git a/yanzhu-bigscreen/src/api/index.js b/yanzhu-bigscreen/src/api/index.js
index 9ae29104..971db610 100644
--- a/yanzhu-bigscreen/src/api/index.js
+++ b/yanzhu-bigscreen/src/api/index.js
@@ -14,6 +14,7 @@ import labor from "./labor";
import bim from "./bim"
import machMater from './machmater'
import checked from './checked'
+import pitmonit from './pitmonit'
export default {
http: axios,
@@ -32,5 +33,6 @@ export default {
labor,
bim,
machMater,
- checked
+ checked,
+ pitmonit
};
diff --git a/yanzhu-bigscreen/src/api/pitmonit.js b/yanzhu-bigscreen/src/api/pitmonit.js
new file mode 100644
index 00000000..678f1ea7
--- /dev/null
+++ b/yanzhu-bigscreen/src/api/pitmonit.js
@@ -0,0 +1,45 @@
+import request from "@/utils/request";
+
+const totalCount=(prjId)=>{
+ return request({
+ url: `/manage/bgscreen/pitmonit/totalCount?prjId=${prjId}`,
+ method: 'get'
+ })
+}
+
+const alarmList=(prjId)=>{
+ return request({
+ url: `/manage/bgscreen/pitmonit/alarm?prjId=${prjId}`,
+ method: 'get'
+ })
+}
+
+const getLastDataForElement=(prjId)=>{
+ return request({
+ url: `/manage/bgscreen/pitmonit/getLastDataForElement?prjId=${prjId}`,
+ method: 'get'
+ })
+}
+
+const selectByDate=data=>{
+ return request({
+ url: `/manage/bgscreen/pitmonit/selectByDate`,
+ method: 'post',
+ data:data
+ })
+}
+
+const monitDays=(prjId)=>{
+ return request({
+ url: `/manage/bgscreen/pitmonit/monitDays?prjId=${prjId}`,
+ method: 'get'
+ })
+}
+
+export default{
+ totalCount,
+ alarmList,
+ getLastDataForElement,
+ selectByDate,
+ monitDays
+}
\ No newline at end of file
diff --git a/yanzhu-bigscreen/src/components/classify-bar.js b/yanzhu-bigscreen/src/components/classify-bar.js
new file mode 100644
index 00000000..b84e5523
--- /dev/null
+++ b/yanzhu-bigscreen/src/components/classify-bar.js
@@ -0,0 +1,256 @@
+import Vue from 'vue'
+Vue.component("classify-bar", {
+ template: `
+
+
+
+ `,
+ props: {
+ data:{
+ type:Array
+ },
+ height:{
+ type:Number
+ },
+ legend:{
+ type:Array
+ },
+ },
+ data() {
+ return {
+ classData:[],
+ }
+ },
+ mounted(){
+ this.init()
+ },
+ methods: {
+ init(){
+ this.getChartData()
+ },
+ getChartData(){
+ //品类金额占比 饼图
+ var chChartPie = echarts.init(this.$refs.chart);
+ this.echartPie(chChartPie,this.data)
+ },
+ echartPie(chChart,data){
+ let newPromise = new Promise((resolve) => {
+ resolve()
+ })
+
+ //然后异步执行echarts的初始化函数
+ newPromise.then(() => {
+ if(data.length==0){
+ return;
+ }
+ var max = data[0].total
+ var nameData = [];
+ var totalData = []
+ var background = []
+ var yesMonitor = []
+ var notMonitor = []
+ var yesProp = []
+ var notProp = []
+ var unitData = []
+
+ for (let i = data.length-1; i >=0 ; i--) {
+ nameData.push(data[i].name);
+ totalData.push(data[i].total)
+ unitData.push(data[i].unit)
+ background.push(100);
+ yesMonitor.push(data[i].yesMonitor);
+ notMonitor.push(data[i].notMonitor);
+ yesProp.push((data[i].yesMonitor/max)*100)
+ notProp.push((data[i].notMonitor/max)*100)
+ }
+
+ var legend = ["已监控", "未监控"]
+ if(this.legend){
+ legend = this.legend
+ }
+
+ this.option = {
+ grid: {
+ //图表的位置
+ top: "8%",
+ left: "3%",
+ right: "5%",
+ bottom: "-12%",
+ containLabel: true,
+ },
+ legend: {
+ right: "0",
+ top: "0",
+ //icon: "circle",
+ itemWidth: 15,
+ itemHeight:10,
+ itemGap: 8,
+ textStyle: {
+ fontSize: 12,
+ color:'#c6d9fa'
+ },
+ data: legend,
+ },
+ xAxis: [{
+ show: false,
+ },
+ //由于下边X轴已经是百分比刻度了,所以需要在顶部加一个X轴,刻度是金额,也隐藏掉
+ {
+ show: false,
+ }
+ ],
+ yAxis: [
+ {
+ type: 'category',
+ axisLabel: {
+ show: false, //让Y轴数据不显示
+ },
+ itemStyle: {
+
+ },
+ axisTick: {
+ show: false, //隐藏Y轴刻度
+ },
+ axisLine: {
+ show: false, //隐藏Y轴线段
+ },
+ data: [],
+ },{
+ show: false,
+ data: [],
+ axisLine: {
+ show: false
+ }
+ }],
+ series: [
+ //数据条--------------------我是分割线君------------------------------//
+ {
+ show: true,
+ type: 'bar',
+ xAxisIndex: 1, //代表使用第二个X轴刻度!!!!!!!!!!!!!!!!!!!!!!!!
+ barGap: '-100%',
+ barWidth: '6', //统计条宽度
+ itemStyle: {
+ normal: {
+ color: 'rgba(22,203,115,0.05)'
+ },
+ },
+ label: {
+ normal: {
+ show: true,
+ //label 的position位置可以是top bottom left,right,也可以是固定值
+ //在这里需要上下统一对齐,所以用固定值
+ position: [0, '-25'],
+ rich: { //富文本
+ prop: { //自定义颜色
+ color: '#c6d9fa',
+ fontSize:'14',
+ },
+ unit:{
+ color: '#6c829a',
+ fontSize:'12',
+ },
+ yes:{
+ color: '#55adf7',
+ fontSize:'14',
+ },
+ not:{
+ color: '#4677fa',
+ fontSize:'14',
+ },
+ index:{
+ color: '#fcbc02',
+ fontStyle: 'italic',
+ padding:[0,0,0,5],
+ fontSize:'14',
+ },
+ name: {
+ width: 200,
+ color: '#c6d9fa',
+ padding:[0,0,0,10],
+ fontSize:'14',
+ },
+ color:{
+ color: '#8ca2be',
+ fontSize:'14',
+ },
+ arrow:{
+ width:12,
+ height:8,
+ backgroundColor: {
+ image: "/cdn/images/WEB_2B7C06210CD44D55BFEE6205A35DE4A7.png",
+ },
+ },
+
+ },
+ formatter: function(data) {
+ //富文本固定格式{colorName|这里填你想要写的内容}
+ //return '{arrow|}'
+ return '{arrow|}{index|No.'+(nameData.length-data.dataIndex)+'}{name|' + nameData[data.dataIndex] + '}{prop|' + totalData[data.dataIndex] + '}{unit| '+unitData[data.dataIndex]+'}{prop|(} {yes|'+yesMonitor[data.dataIndex]+'}{unit| '+unitData[data.dataIndex]+'/}{not|'+notMonitor[data.dataIndex]+'}{unit| '+unitData[data.dataIndex]+'}{prop|)} ';
+ },
+ }
+ },
+ data: background
+ },
+ {
+ type: 'bar',
+
+ silent: true,
+ yAxisIndex: 1,
+ barWidth: 6,
+ itemStyle: {
+ normal: {
+ color: 'rgba(0,82,198,0.3)'
+ },
+ emphasis: {
+ color: 'rgba(0,82,198,0.3)'
+ }
+ },
+ data: background
+ },
+ {
+ type: 'bar',
+ name:legend[0],
+
+ stack: '1',
+ legendHoverLink: false,
+ barWidth: 6,
+ itemStyle: {
+ normal: {
+ color: '#52adf4'
+ },
+ emphasis: {
+ color: '#52adf4'
+ }
+ },
+ data: yesProp
+ }, {
+ type: 'bar',
+ name:legend[1],
+ stack: '1',
+ legendHoverLink: false,
+ barWidth: 6,
+ itemStyle: {
+ normal: {
+ color: '#4677ff'
+ },
+ emphasis: {
+ color: '#4677ff'
+ }
+ },
+ data: notProp
+ }]
+ };
+
+ chChart.setOption(this.option);
+ window.onresize = chChart.resize;
+ })
+ },
+ },
+ watch:{
+ data: function (n,o) {
+ this.getChartData()
+ }
+ }
+
+})
diff --git a/yanzhu-bigscreen/src/components/header.vue b/yanzhu-bigscreen/src/components/header.vue
index ceb87df9..3183a9b5 100644
--- a/yanzhu-bigscreen/src/components/header.vue
+++ b/yanzhu-bigscreen/src/components/header.vue
@@ -7,80 +7,113 @@
项目详情
劳务管理
-