Authored by XuHaoJie

Merge branch 'master' of http://113.200.75.45:82/monitor_v3/hg-monitor-web into master-V32-XuHaoJie

Showing 17 changed files with 177 additions and 47 deletions
@@ -42,7 +42,6 @@ export default { @@ -42,7 +42,6 @@ export default {
42 type: Boolean, 42 type: Boolean,
43 default: false 43 default: false
44 }, 44 },
45 -  
46 }, 45 },
47 data() { 46 data() {
48 return { 47 return {
@@ -418,6 +417,11 @@ export default { @@ -418,6 +417,11 @@ export default {
418 * 搜索 417 * 搜索
419 */ 418 */
420 let searchFile = () => { 419 let searchFile = () => {
  420 + let keyWords = keyWord.value;
  421 + if(keyWords == ''){
  422 + proxy.$global.showMsg("请输入关键字!","warning")
  423 + return;
  424 + }
421 getPage(''); 425 getPage('');
422 426
423 } 427 }
@@ -587,7 +591,6 @@ export default { @@ -587,7 +591,6 @@ export default {
587 if(msg){ 591 if(msg){
588 proxy.$global.showMsg(msg, 'warning'); 592 proxy.$global.showMsg(msg, 'warning');
589 } 593 }
590 -  
591 } 594 }
592 }) 595 })
593 reNameFileFlg.value[item.id] = false; 596 reNameFileFlg.value[item.id] = false;
@@ -604,6 +607,7 @@ export default { @@ -604,6 +607,7 @@ export default {
604 if (!props.isView) { 607 if (!props.isView) {
605 getTree(); 608 getTree();
606 } else { 609 } else {
  610 + isUserFolder.value = true;
607 layout.value = { 611 layout.value = {
608 left: 0, 612 left: 0,
609 right: 24 613 right: 24
@@ -45,7 +45,7 @@ export default { @@ -45,7 +45,7 @@ export default {
45 45
46 getData () { 46 getData () {
47 let that=this; 47 let that=this;
48 - $.get(this.domainName +this.apiUrl+this.newCommandVal,function (ret){ 48 + $.get(this.domainName +this.apiUrl+this.newCommandVal+'&access_token='+localStorage.getItem('access_token'),function (ret){
49 if(ret){ 49 if(ret){
50 let dataArr=[]; 50 let dataArr=[];
51 let xAxisData=[]; 51 let xAxisData=[];
@@ -70,7 +70,7 @@ export default { @@ -70,7 +70,7 @@ export default {
70 async getData () { 70 async getData () {
71 // await this.$http.get() 71 // await this.$http.get()
72 // const { data: ret } = await this.$http.get('volume') 72 // const { data: ret } = await this.$http.get('volume')
73 - const { data: ret } = await $.get(this.domainName +this.apiUrl) 73 + const { data: ret } = await $.get(this.domainName +this.apiUrl+'?access_token='+localStorage.getItem('access_token'))
74 //本月业务量 74 //本月业务量
75 // const { data: ret1 } = await $.get(this.domainName +this.apiUrl1) 75 // const { data: ret1 } = await $.get(this.domainName +this.apiUrl1)
76 let retData=[]; 76 let retData=[];
@@ -39,7 +39,12 @@ export default { @@ -39,7 +39,12 @@ export default {
39 numerTitle: 'KPIDA0ACBBG' 39 numerTitle: 'KPIDA0ACBBG'
40 } 40 }
41 }, 41 },
42 - 42 + setUp(){
  43 + const allData=ref({});
  44 + return{
  45 + allData
  46 + }
  47 + },
43 mounted () { 48 mounted () {
44 49
45 this.getData(this) 50 this.getData(this)
@@ -64,7 +69,7 @@ export default { @@ -64,7 +69,7 @@ export default {
64 access_token:localStorage.getItem("access_token") 69 access_token:localStorage.getItem("access_token")
65 }; 70 };
66 // proxy.$http.get("/api-web/detail/his/line/base", params, function (res) { 71 // proxy.$http.get("/api-web/detail/his/line/base", params, function (res) {
67 - var res={ 72 + var res1={
68 code:'0', 73 code:'0',
69 data:{ 74 data:{
70 kpiUnit:'%', 75 kpiUnit:'%',
@@ -78,9 +83,10 @@ export default { @@ -78,9 +83,10 @@ export default {
78 ] 83 ]
79 } 84 }
80 } 85 }
81 - if(res && res.data){  
82 - let resData=res.data;  
83 - that.allData.polyline.data.push(resData.series) 86 + if(res1 && res1.data){
  87 + let resData=res1.data;
  88 + that.allData.polyline.data.push(resData.series[0])
  89 + console.log("123",that.allData)
84 that.updateChart() 90 that.updateChart()
85 91
86 } 92 }
@@ -114,11 +120,14 @@ export default { @@ -114,11 +120,14 @@ export default {
114 } 120 }
115 if(res && res.data){ 121 if(res && res.data){
116 let resData=res.data; 122 let resData=res.data;
  123 + let seriesData1=[];
  124 + seriesData1.push(resData.series[0])
  125 + // that.seriesData1=resData.series;
117 that.allData = { 126 that.allData = {
118 polyline: { 127 polyline: {
119 title: "申报库CPU监控", 128 title: "申报库CPU监控",
120 unit: "cpu%", 129 unit: "cpu%",
121 - data: resData.series 130 + data: seriesData1
122 }, 131 },
123 xAxis: { 132 xAxis: {
124 today:resData.names 133 today:resData.names
@@ -155,7 +164,11 @@ export default { @@ -155,7 +164,11 @@ export default {
155 164
156 let seriesData=[]; 165 let seriesData=[];
157 166
  167 + console.log("***",seriesArr)
158 $.each(seriesArr,function (index,item){ 168 $.each(seriesArr,function (index,item){
  169 + console.log("&&&",item)
  170 + console.log("/*/*/*",item.name)
  171 +
159 seriesData .push({ 172 seriesData .push({
160 name: item.name, 173 name: item.name,
161 type: 'line', 174 type: 'line',
@@ -85,7 +85,7 @@ export default { @@ -85,7 +85,7 @@ export default {
85 rateTitle: that.rateTitle, 85 rateTitle: that.rateTitle,
86 numerTitle: that.numerTitle 86 numerTitle: that.numerTitle
87 }; 87 };
88 - proxy.$http.get("/api-web/bigScreen/declarePolyline", params, function (res) { 88 + proxy.$http.get("/api-web/bigScreen/declarePolyline"+"?access_token="+localStorage.getItem('access_token'), params, function (res) {
89 if(res.success){ 89 if(res.success){
90 that.allData = res.obj; 90 that.allData = res.obj;
91 that.updateChart() 91 that.updateChart()
@@ -25,13 +25,23 @@ export default { @@ -25,13 +25,23 @@ export default {
25 today: ["00", "02", "04", "06", "08", "10", "12", "14", "16", "18", "20", "22"] 25 today: ["00", "02", "04", "06", "08", "10", "12", "14", "16", "18", "20", "22"]
26 } 26 }
27 }, 27 },
  28 + titleFontSize: 30,
  29 + kpiIds:'KPI20352505',
  30 + resId:'166eb917fe734dafa2d2474b0a66c37b',
  31 + resId1:'0002fe6fd00c4ab3b6383104b1565c18',
28 startValue: 0, // 区域缩放的起点值 32 startValue: 0, // 区域缩放的起点值
29 endValue: 6, // 区域缩放的终点值 33 endValue: 6, // 区域缩放的终点值
30 timerId: null // 定时器的标识 34 timerId: null // 定时器的标识
31 } 35 }
32 }, 36 },
  37 + setUp(){
  38 + const allData=ref({});
  39 + return{
  40 + allData
  41 + }
  42 + },
33 mounted () { 43 mounted () {
34 - this.getData() 44 + this.getData(this)
35 window.addEventListener('resize', this.screenAdapter) 45 window.addEventListener('resize', this.screenAdapter)
36 this.screenAdapter() 46 this.screenAdapter()
37 }, 47 },
@@ -41,13 +51,86 @@ export default { @@ -41,13 +51,86 @@ export default {
41 }, 51 },
42 methods: { 52 methods: {
43 53
44 - async getData () {  
45 - // await this.$http.get()  
46 - // const { data: ret } = await this.$http.get('documentcpu')  
47 - // this.allData = ret  
48 - // console.log(ret)  
49 - this.updateChart()  
50 - this.startInterval() 54 + getData1(that){
  55 + const { proxy } = Vue.getCurrentInstance();
  56 +
  57 + var params = {
  58 + resId: that.resId1,
  59 + kpiIds: that.kpiIds,
  60 + subResId: 'vmem',
  61 + startTime:'',
  62 + endTime:'',
  63 + access_token:localStorage.getItem("access_token")
  64 + };
  65 + // proxy.$http.get("/api-web/detail/his/line/base", params, function (res) {
  66 + var res1={
  67 + code:'0',
  68 + data:{
  69 + kpiUnit:'%',
  70 + names:['20:10','21:10','22:15','23:15'],
  71 + series:[
  72 + {
  73 + name:'89.12.97.3',
  74 + datas:[0.7,1,1,0.7,1,0.7,0.5,1],
  75 + flag:'vmem'
  76 + }
  77 + ]
  78 + }
  79 + }
  80 + if(res1 && res1.data){
  81 + let resData=res1.data;
  82 + that.allData.polyline.data.push(resData.series[0])
  83 + console.log("123",that.allData)
  84 + that.updateChart()
  85 +
  86 + }
  87 + // });
  88 + },
  89 +
  90 + getData (that) {
  91 + const { proxy } = Vue.getCurrentInstance();
  92 + var params = {
  93 + resId: that.resId,
  94 + kpiIds: that.kpiIds,
  95 + subResId: 'vmem',
  96 + startTime:'',
  97 + endTime:'',
  98 + access_token:localStorage.getItem("access_token")
  99 + };
  100 + // proxy.$http.get("/api-web/detail/his/line/base", params, function (res) {
  101 + var res={
  102 + code:'0',
  103 + data:{
  104 + kpiUnit:'%',
  105 + names:['20:10','21:10','22:15','23:15'],
  106 + series:[
  107 + {
  108 + name:'89.12.97.2',
  109 + datas:[0.9,0.9,1,1,0.9,1,1,1],
  110 + flag:'vmem'
  111 + }
  112 + ]
  113 + }
  114 + }
  115 + if(res && res.data){
  116 + let resData=res.data;
  117 + let seriesData1=[];
  118 + seriesData1.push(resData.series[0])
  119 + // that.seriesData1=resData.series;
  120 + that.allData = {
  121 + polyline: {
  122 + title: "文书库CPU监控",
  123 + unit: "cpu%",
  124 + data: seriesData1
  125 + },
  126 + xAxis: {
  127 + today:resData.names
  128 + }
  129 + };
  130 + that.getData1(that)
  131 + }
  132 + // });
  133 +
51 }, 134 },
52 updateChart () { 135 updateChart () {
53 // 半透明的颜色值 136 // 半透明的颜色值
@@ -69,11 +152,21 @@ export default { @@ -69,11 +152,21 @@ export default {
69 'rgba(250, 105, 0, 0)' 152 'rgba(250, 105, 0, 0)'
70 ] 153 ]
71 const timeArr = this.allData.xAxis.today 154 const timeArr = this.allData.xAxis.today
72 - const seriesArr = this.allData.polyline.data.map((item, index) => {  
73 - return { 155 + const seriesArr = this.allData.polyline.data;
  156 + const title=this.allData.polyline.title;
  157 + const unit=this.allData.polyline.unit;
  158 +
  159 + let seriesData=[];
  160 +
  161 + console.log("***",seriesArr)
  162 + $.each(seriesArr,function (index,item){
  163 + console.log("&&&",item)
  164 + console.log("/*/*/*",item.name)
  165 +
  166 + seriesData .push({
74 name: item.name, 167 name: item.name,
75 type: 'line', 168 type: 'line',
76 - data: item.data, 169 + data: item.datas,
77 smooth: true, 170 smooth: true,
78 showSymbol:false, 171 showSymbol:false,
79 itemStyle : { 172 itemStyle : {
@@ -97,15 +190,13 @@ export default { @@ -97,15 +190,13 @@ export default {
97 } // 100%的颜色值 190 } // 100%的颜色值
98 ]) 191 ])
99 } 192 }
100 - } 193 + })
101 }) 194 })
  195 +
102 // 图例的数据 196 // 图例的数据
103 const legendArr = this.allData.polyline.data.map(item => { 197 const legendArr = this.allData.polyline.data.map(item => {
104 return item.name 198 return item.name
105 }) 199 })
106 - const title = this.allData.polyline.title  
107 - const unit = this.allData.polyline.unit  
108 - const seriesData=seriesArr;  
109 let xAxisData=timeArr; 200 let xAxisData=timeArr;
110 this.optionData = { 201 this.optionData = {
111 title: { 202 title: {
@@ -33,7 +33,7 @@ export default { @@ -33,7 +33,7 @@ export default {
33 // 挂载完 33 // 挂载完
34 Vue.onMounted(() => { 34 Vue.onMounted(() => {
35 proxy.screenAdapter(); 35 proxy.screenAdapter();
36 - $.get(proxy.domainName +proxy.apiUrl,function (res) { 36 + $.get(proxy.domainName +proxy.apiUrl+'&access_token='+localStorage.getItem('access_token'),function (res) {
37 const data = res; 37 const data = res;
38 if (data && data.data) { 38 if (data && data.data) {
39 let monitoringBarData=data.data; 39 let monitoringBarData=data.data;
@@ -51,7 +51,7 @@ export default { @@ -51,7 +51,7 @@ export default {
51 let that=this; 51 let that=this;
52 // await this.$http.get() 52 // await this.$http.get()
53 // const { data: ret } = await proxy.$http.get('bigScreen/monitoring?function=') 53 // const { data: ret } = await proxy.$http.get('bigScreen/monitoring?function=')
54 - $.get(this.domainName +this.apiUrl+this.newCommandVal,(ret)=>{ 54 + $.get(this.domainName +this.apiUrl+this.newCommandVal+'&access_token='+localStorage.getItem('access_token'),(ret)=>{
55 if(ret){ 55 if(ret){
56 let dataArr=[]; 56 let dataArr=[];
57 let xAxisData=''; 57 let xAxisData='';
@@ -19,7 +19,7 @@ export default { @@ -19,7 +19,7 @@ export default {
19 const {proxy} = Vue.getCurrentInstance(); 19 const {proxy} = Vue.getCurrentInstance();
20 // 挂载完 20 // 挂载完
21 Vue.onMounted(() => { 21 Vue.onMounted(() => {
22 - $.get(proxy.domainName +proxy.apiUrl,function (res) { 22 + $.get(proxy.domainName +proxy.apiUrl+'?access_token='+localStorage.getItem('access_token'),function (res) {
23 const data = res; 23 const data = res;
24 // const data = res.object; 24 // const data = res.object;
25 //状态 25 //状态
@@ -7,7 +7,7 @@ export default { @@ -7,7 +7,7 @@ export default {
7 }, 7 },
8 data(){ 8 data(){
9 return { 9 return {
10 - domainName:'http://192.168.0.245:8180/api-web', 10 + domainName:sessionStorage.getItem('domainName'),
11 isActive:false, 11 isActive:false,
12 cloudData:'' 12 cloudData:''
13 } 13 }
@@ -18,7 +18,7 @@ export default { @@ -18,7 +18,7 @@ export default {
18 // 挂载完 18 // 挂载完
19 Vue.onMounted(() => { 19 Vue.onMounted(() => {
20 let yptRunTimer = null; 20 let yptRunTimer = null;
21 - $.get(proxy.domainName +"/datavis/getCloudInfo",function(res){ 21 + $.get(proxy.domainName +"/api-web/datavis/getCloudInfo"+'?access_token='+localStorage.getItem('access_token'),function(res){
22 const data = res.data; 22 const data = res.data;
23 if(data && data.length > 0){ 23 if(data && data.length > 0){
24 proxy.cloudData=data; 24 proxy.cloudData=data;
@@ -14,7 +14,7 @@ export default { @@ -14,7 +14,7 @@ export default {
14 14
15 // 挂载完 15 // 挂载完
16 Vue.onMounted(() => { 16 Vue.onMounted(() => {
17 - $.get(proxy.domainName +proxy.apiUrl,function (res) { 17 + $.get(proxy.domainName +proxy.apiUrl+'?access_token='+localStorage.getItem('access_token'),function (res) {
18 if(res.data){ 18 if(res.data){
19 proxy.jfdata=res.data; 19 proxy.jfdata=res.data;
20 /* const html = $("#sjzx_machineroom_id_Tmpl").render(res.data); 20 /* const html = $("#sjzx_machineroom_id_Tmpl").render(res.data);
@@ -34,7 +34,7 @@ export default { @@ -34,7 +34,7 @@ export default {
34 const {proxy} = Vue.getCurrentInstance(); 34 const {proxy} = Vue.getCurrentInstance();
35 // 挂载完 35 // 挂载完
36 Vue.onMounted(() => { 36 Vue.onMounted(() => {
37 - $.get(proxy.domainName +proxy.apiUrl+'?kipValue1=KPIDA0ACBBF&kipValue2=KPIDA0ACBBD',function (res) { 37 + $.get(proxy.domainName +proxy.apiUrl+'?kipValue1=KPIDA0ACBBF&kipValue2=KPIDA0ACBBD'+'&access_token='+localStorage.getItem('access_token'),function (res) {
38 const data = res; 38 const data = res;
39 if(data && data.map){ 39 if(data && data.map){
40 let reportableMonth=data.map.rightNumber; 40 let reportableMonth=data.map.rightNumber;
@@ -59,7 +59,7 @@ export default { @@ -59,7 +59,7 @@ export default {
59 59
60 }) 60 })
61 61
62 - $.get(proxy.domainName +proxy.apiUrl+'?kipValue1=KPIDA0ACBBS&kipValue2=KPIDA0ACBBE',function (res) { 62 + $.get(proxy.domainName +proxy.apiUrl+'?kipValue1=KPIDA0ACBBS&kipValue2=KPIDA0ACBBE'+'&access_token='+localStorage.getItem('access_token'),function (res) {
63 const data = res; 63 const data = res;
64 if(data && data.map){ 64 if(data && data.map){
65 let reportableToday=data.map.rightNumber; 65 let reportableToday=data.map.rightNumber;
@@ -69,7 +69,7 @@ export default { @@ -69,7 +69,7 @@ export default {
69 }) 69 })
70 70
71 //业务量 71 //业务量
72 - $.get(proxy.domainName +proxy.apiUrl1,function (res) { 72 + $.get(proxy.domainName +proxy.apiUrl1+'?access_token='+localStorage.getItem('access_token'),function (res) {
73 const data = res; 73 const data = res;
74 if(data && data.data){ 74 if(data && data.data){
75 let volumeData=data.data; 75 let volumeData=data.data;
@@ -34,7 +34,7 @@ export default { @@ -34,7 +34,7 @@ export default {
34 const {colorData}=Vue.toRefs(props) 34 const {colorData}=Vue.toRefs(props)
35 proxy.colorData=colorData.value 35 proxy.colorData=colorData.value
36 } 36 }
37 - $.get(proxy.domainName +proxy.apiUrl,function (res) { 37 + $.get(proxy.domainName +proxy.apiUrl+'?access_token='+localStorage.getItem('access_token'),function (res) {
38 const data = res; 38 const data = res;
39 let ySeriesCommon=[]; 39 let ySeriesCommon=[];
40 if (data && data.data) { 40 if (data && data.data) {
@@ -27,7 +27,7 @@ export default { @@ -27,7 +27,7 @@ export default {
27 27
28 // 挂载完 28 // 挂载完
29 Vue.onMounted(() => { 29 Vue.onMounted(() => {
30 - $.get(proxy.domainName +proxy.apiUrl,function (res) { 30 + $.get(proxy.domainName +proxy.apiUrl+'&access_token='+localStorage.getItem('access_token'),function (res) {
31 const data = res; 31 const data = res;
32 if (data && data.data) { 32 if (data && data.data) {
33 let monitoringBarData=data.data; 33 let monitoringBarData=data.data;
@@ -67,7 +67,7 @@ export default { @@ -67,7 +67,7 @@ export default {
67 // 注册地图,传入数据 67 // 注册地图,传入数据
68 echarts.registerMap('echarts', geoJson); 68 echarts.registerMap('echarts', geoJson);
69 //获取浙江各地市链路信息 69 //获取浙江各地市链路信息
70 - $.get(proxy.domainName +proxy.cityUrl,function(res){ 70 + $.get(proxy.domainName +proxy.cityUrl+'?access_token='+localStorage.getItem('access_token'),function(res){
71 if(res.data && res.data.length > 0){ 71 if(res.data && res.data.length > 0){
72 const mapData = res.data; 72 const mapData = res.data;
73 proxy.mapData=mapData; 73 proxy.mapData=mapData;
@@ -21,6 +21,9 @@ export default { @@ -21,6 +21,9 @@ export default {
21 }, 21 },
22 setup(props, {attrs, slots, emit}) { 22 setup(props, {attrs, slots, emit}) {
23 const {proxy} = Vue.getCurrentInstance(); 23 const {proxy} = Vue.getCurrentInstance();
  24 + const xAxisData=Vue.ref();
  25 + const yAxisData=Vue.ref([]);
  26 + const legendData=Vue.ref([]);
24 // 半透明的颜色值 27 // 半透明的颜色值
25 const colorArr1 = [ 28 const colorArr1 = [
26 'rgba(151,213,244, 0.8)', 29 'rgba(151,213,244, 0.8)',
@@ -50,18 +53,34 @@ export default { @@ -50,18 +53,34 @@ export default {
50 endTime:'', 53 endTime:'',
51 access_token:localStorage.getItem('access_token') 54 access_token:localStorage.getItem('access_token')
52 }; 55 };
53 - $.get(proxy.domainName +proxy.apiUrl,params,function (res) { 56 + $.get(proxy.domainName +proxy.apiUrl+'?access_token='+localStorage.getItem('access_token'),params,function (res) {
54 const data = res; 57 const data = res;
55 - console.log("ttttt",data)  
56 - if (data && data.map) {  
57 - let resData=data.map;  
58 - proxy.legendData=resData.legend;  
59 - proxy.xAxisData=resData.x;  
60 - proxy.yAxisData=resData.y; 58 + if (data ) {
  59 + if(data.map){
  60 + let resData=data.map;
  61 + proxy.legendData=resData.legend;
  62 + proxy.xAxisData=resData.x;
  63 + proxy.yAxisData=resData.y;
  64 + }else{
  65 + let nullArr=[];
  66 + for(let i=0;i<4;i++){
  67 + nullArr.push(i)
  68 + proxy.legendData.push({
  69 + name:''
  70 + })
  71 + }
  72 + proxy.xAxisData=nullArr;
  73 + for(let i=0;i<4;i++){
  74 + proxy.yAxisData.push(nullArr);
  75 +
  76 + }
  77 +
  78 + }
  79 +
61 80
  81 + proxy.optionInit();
62 82
63 } 83 }
64 - proxy.optionInit();  
65 84
66 }) 85 })
67 // proxy.optionInit(); 86 // proxy.optionInit();
@@ -358,6 +377,9 @@ export default { @@ -358,6 +377,9 @@ export default {
358 calMax, 377 calMax,
359 calMin, 378 calMin,
360 getData, 379 getData,
  380 + xAxisData,
  381 + yAxisData,
  382 + legendData,
361 optionInit 383 optionInit
362 } 384 }
363 } 385 }
@@ -40,7 +40,7 @@ export default { @@ -40,7 +40,7 @@ export default {
40 40
41 }) 41 })
42 const getData=()=>{ 42 const getData=()=>{
43 - $.get(proxy.domainName +proxy.apiUrl+'?busId='+proxy.busId,function (res) { 43 + $.get(proxy.domainName +proxy.apiUrl+'?busId='+proxy.busId+'&access_token='+localStorage.getItem('access_token'),function (res) {
44 const data = res; 44 const data = res;
45 if(data && data.data){ 45 if(data && data.data){
46 // proxy.resourceStatisticsData=data.data; 46 // proxy.resourceStatisticsData=data.data;