Merge branch 'hi-ucs-dev' of http://15.2.21.221:3000/wuhongjian/hi-ucs into hi-ucs-dev

This commit is contained in:
wuhongjian 2022-06-30 19:06:55 +08:00
commit 2663665321
32 changed files with 1403 additions and 800 deletions

View File

@ -1,7 +1,11 @@
<template> <template>
<div class='container'> <div class='container'>
<span class='title-style'>应用资源</span> <div>
<span class='page-introduction'>发布情况统计</span> <span class='title-style'>应用资源</span>
<span class='page-introduction'>发布情况统计</span>
<button class='back-btn' @click="backBtn">返回</button>
</div>
<div class='container-body'> <div class='container-body'>
<div class='container-body1'> <div class='container-body1'>
<span style='font-size:18px;color;#000000;'>应用贡献组件被调用次数分布</span> <span style='font-size:18px;color;#000000;'>应用贡献组件被调用次数分布</span>
@ -57,31 +61,215 @@
import * as echarts from 'echarts'; import * as echarts from 'echarts';
export default { export default {
props:{
tableId:{
type:String,
default:''
},
fatherId:{
type:Number,
default:null,
}
},
data(){ data(){
return{ return{
data2:[],
data3:[],
data4:[],
data5:[],
data6:[],
data7:[],
data8:[],
data9:[],
data10:[],
data11:[],
colorList:['linear-gradient(to right, rgba(82, 106, 255,0.8),transparent)', 'linear-gradient(to right,rgba(251, 123, 5),transparent)','linear-gradient(to right,rgba(250, 179, 2,.6),transparent)','linear-gradient(to right,rgba(82, 106, 255,.6),transparent','linear-gradient(to right,rgba(82, 106, 255,.6),transparent)',], colorList:['linear-gradient(to right, rgba(82, 106, 255,0.8),transparent)', 'linear-gradient(to right,rgba(251, 123, 5),transparent)','linear-gradient(to right,rgba(250, 179, 2,.6),transparent)','linear-gradient(to right,rgba(82, 106, 255,.6),transparent','linear-gradient(to right,rgba(82, 106, 255,.6),transparent)',],
widthList:['90px','80px','70px','60px','50px'], widthList:['90px','80px','70px','60px','50px'],
numColorList:['#fc5656','#ff8a00','#f9af0a','#808fff','#808fff'], numColorList:['#fc5656','#ff8a00','#f9af0a','#808fff','#808fff'],
usedList:[{name:'组件名称一',count:111},{name:'组件名称一',count:111},{name:'组件名称一',count:111},{name:'组件名称四',count:111},{name:'组件名称五',count:111},], usedList:[{name:'组件名称一',count:111},{name:'组件名称一',count:111},{name:'组件名称一',count:111},{name:'组件名称四',count:111},{name:'组件名称五',count:111},],
} }
},
created(){
this.getDistributedList()
this.getUsedList()
this.getTopList()
this.getApplicationDistribution()
this.getFieldDistribution()
this.getStatuesDistribution()
}, },
mounted(){ mounted(){
this.myEcharts1() this.myEcharts1()
this.myEcharts2() // this.myEcharts2()
this.myEcharts3() // this.myEcharts3()
this.myEcharts4() // this.myEcharts4()
this.myEcharts6() // this.myEcharts6()
this.myEcharts7() // this.myEcharts7()
this.myEcharts8() // this.myEcharts8()
this.myEcharts9() // this.myEcharts9()
}, },
methods:{ methods:{
//
getDistributedList () {
this.$http.get('/census/center/v3/assemblerUseProjectInfo/' ,{
params : {
keyId:'1522550195034857476'
// this.tableId
}
}).then(res => {
let arry=[]
arry=res.data.data
arry.forEach((item)=>{
const single={
value:item.num,
name:item.attr_value
}
this.data2.push(single)
this.data5.push(single.value)
this.data6.push(single.name)
this.myEcharts2()
this.myEcharts4()
})
})
},
// 使
getUsedList () {
this.$http.get('/census/center/v3/applicationUsedCapabilityNum/' ,{
params : {
id:
// '1522550195034857476'
this.tableId
}
}).then(res => {
let arry=[]
arry=res.data.data
arry.forEach((item)=>{
const single={
value:item.useNum,
name:item.name
}
this.data3.push(single.name)
this.data4.push(single.value)
console.log("2222", this.data3);
this.myEcharts3()
})
})
},
//12345
getTopList () {
this.$http.get('/census/center/v3/assemblerScoreInfo/' ,{
params : {
id:this.tableId,
// '1067246875800000066',
resourceType:'应用资源'
}
}).then(res => {
let arry=[]
arry=res.data.data
arry.forEach((item)=>{
const single={
value:item.scoreNum,
name:item.score
}
this.data8.push(single)
this.myEcharts6()
})
})
},
//
getApplicationDistribution() {
this.$http.get('/census/center/v3/applicationReleaseCapabilitySet/' ,{
params : {
id:
// '1067246875800000066',
this.tableId,
resourceType:'应用资源'
}
}).then(res => {
let arry=[]
arry=res.data.data
arry.forEach((item)=>{
const single={
value:item.num,
name:item.publisher
}
this.data7.push(single)
this.myEcharts7()
})
})
},
//
getFieldDistribution() {
this.$http.get('/census/center/v3/applicationAreaCapabilityList/' ,{
params : {
id:
// '1067246875800000066',
this.tableId,
resourceType:'应用资源'
}
}).then(res => {
let arry=[]
arry=res.data.data
arry.forEach((item)=>{
const single={
value:item.total,
name:item.type
}
this.data9.push(single)
this.myEcharts8()
})
})
},
//
getStatuesDistribution() {
this.$http.get('/census/center/v3/applicationStateCapabilitySet/' ,{
params : {
id:
// '1067246875800000066',
this.tableId,
resourceType:'应用资源'
}
}).then(res => {
let arry=[]
arry=res.data.data
arry.forEach((item)=>{
const single={
value:item.num,
name:item.state
}
this.data10.push(single)
this.myEcharts9()
})
})
},
myEcharts1(){ myEcharts1(){
var chartDom = document.getElementById('main1'); var chartDom = document.getElementById('main1');
var myChart = echarts.init(chartDom); var myChart = echarts.init(chartDom);
var option; var option;
option = { option = {
tooltip: { // XY
trigger: 'axis',
backgroundColor: 'rgba(32, 33, 36,.7)',
borderColor: 'rgba(32, 33, 36,0.20)',
borderWidth: 1,
textStyle: { //
color: '#fff',
fontSize: '12'
},
axisPointer: { // 线
type: 'cross',
label: {
backgroundColor: '#6a7985'
}
},
},
grid: { grid: {
bottom: '23%', bottom: '23%',
}, },
@ -231,12 +419,7 @@ export default {
labelLine: { labelLine: {
show: false show: false
}, },
data: [ data:this.data2
{ value: 1048, name: '算法' },
{ value: 735, name: '图层' },
{ value: 580, name: '开发' },
{ value: 484, name: '业务' },
]
} }
] ]
}; };
@ -248,12 +431,29 @@ export default {
var myChart = echarts.init(chartDom); var myChart = echarts.init(chartDom);
var option; var option;
option = { option = {
tooltip: { // XY
trigger: 'axis',
backgroundColor: 'rgba(32, 33, 36,.7)',
borderColor: 'rgba(32, 33, 36,0.20)',
borderWidth: 1,
textStyle: { //
color: '#fff',
fontSize: '12'
},
axisPointer: { // 线
type: 'cross',
label: {
backgroundColor: '#6a7985'
}
},
},
grid: { grid: {
bottom: '23%', bottom: '23%',
}, },
xAxis: { xAxis: {
type: 'category', type: 'category',
data: ['算法', '图层', '开发', '业务'], data:this.data3,
fontSize:12,
color:['#f5f5f5'], color:['#f5f5f5'],
axisTick:{ axisTick:{
show:false,//线 show:false,//线
@ -268,8 +468,17 @@ export default {
} }
}, },
axisLabel: {//x axisLabel: {//x
formatter: val => {
let txt = val
if (val.length > 3) {
txt = val.substr(0, 3) + '...'
}
return txt
},
textStyle: { textStyle: {
color: "#999999",//x color: "#999999",//x
}, },
}, },
}, },
@ -300,7 +509,7 @@ export default {
}, },
series: [ series: [
{ {
data: [5, 5, 5, 5], data: [1, 1, 1, 1, 1, 1],
type: 'bar', type: 'bar',
barWidth: 14, barWidth: 14,
stack: '1', stack: '1',
@ -314,7 +523,7 @@ export default {
}, },
}, },
{ {
data: [60, 90, 50, 80], data: this.data4,
type: 'bar', type: 'bar',
barWidth: 14, barWidth: 14,
stack: '1', stack: '1',
@ -343,7 +552,7 @@ export default {
}, },
xAxis: { xAxis: {
type: 'category', type: 'category',
data: ['组件名称1', '组件名称2', '组件名称3', '组件名称4', '组件名称5', '组件名称6'], data:this.data6,
color:['#f5f5f5'], color:['#f5f5f5'],
axisTick: { // axisTick: { //
show: false, // show: false, //
@ -404,7 +613,7 @@ export default {
}, },
}, },
{ {
data: [60, 90, 50, 80, 50, 80], data:this.data5,
type: 'bar', type: 'bar',
barWidth: 14, barWidth: 14,
stack: '1', stack: '1',
@ -486,13 +695,7 @@ export default {
labelLine: { labelLine: {
show: false show: false
}, },
data: [ data:this.data8
{ value: 1048, name: '1分' },
{ value: 735, name: '2分' },
{ value: 580, name: '3分' },
{ value: 484, name: '4分' },
{ value: 300, name: '5分' }
]
} }
] ]
}; };
@ -564,175 +767,197 @@ export default {
labelLine: { labelLine: {
show: false show: false
}, },
data: [ data:this.data7
{ value: 1048, name: '应用名称1' }, // [
{ value: 735, name: '应用名称2' }, // { value: 1048, name: '1' },
{ value: 580, name: '应用名称3' }, // { value: 735, name: '2' },
{ value: 484, name: '应用名称4' }, // { value: 580, name: '3' },
{ value: 300, name: '应用名称5' } // { value: 484, name: '4' },
] // { value: 300, name: '5' }
// ]
} }
] ]
}; };
option && myChart.setOption(option); option && myChart.setOption(option);
}, },
myEcharts8(){ myEcharts8(){
var chartDom = document.getElementById('main8'); var chartDom = document.getElementById('main8');
var myChart = echarts.init(chartDom); var myChart = echarts.init(chartDom);
var option; var option;
option = { option = {
tooltip: { tooltip: {
trigger: 'item' trigger: 'item'
}, },
legend: { legend: {
orient: '', orient: "vertical", type: 'scroll',
top: '14%', top: '14%',
left: '40%', left: '40%',
width:"auto", width:"auto",
height:"auto", height:"auto",
orient: "vertical", orient: "vertical",
itemGap: 15, itemGap: 15,
itemWidth: 14, itemWidth: 14,
// 使 // 使
formatter: function(name) { formatter: function(name) {
var data = option.series[0].data; var data = option.series[0].data;
var total = 0; var total = 0;
var tarValue; var tarValue;
for (var i = 0; i < data.length; i++) { for (var i = 0; i < data.length; i++) {
total += data[i].value; total += data[i].value;
if (data[i].name == name) { if (data[i].name == name) {
tarValue = data[i].value; tarValue = data[i].value;
} }
} }
var v = tarValue; var v = tarValue;
var p = Math.round(((tarValue / total) * 100)); var p = Math.round(((tarValue / total) * 100));
return `${name} ${p}%`; return `{a|${name}} {b|${p}%}`;
}, },
itemStyle:{}, itemStyle:{},
textStyle: { textStyle: {
color: "#666666", color: "#666666",
fontSize:12, fontSize:12,
padding:[0,8,0,10] rich: {
}, // richoneonetwotwothreethree""
}, a: {
color: ['#0087ff', '#51cb8d', '#fcc549', '#ef6567', '#ff8a00', '#fc5656'], //
series: [ width: 80,
{ color: "#000000",
type: 'pie', fontSize: 12,
radius: ['30%', '45%'], fontWeight: "bolder",
center:['19%', '50%'], },
avoidLabelOverlap: false, b: {
itemStyle: { // 102030
borderRadius: 10, width: 35,
borderColor: '#fff', color: "#333",
borderWidth: 2 fontSize: 12,
}, },
label: { },
show: false, padding:[0,8,0,10]
position: 'center' },
}, },
// emphasis: { color: ['#0087ff', '#51cb8d', '#fcc549', '#ef6567', '#ff8a00', '#fc5656'],
// label: { series: [
// show: true, {
// fontSize: '40', type: 'pie',
// fontWeight: 'bold' radius: ['30%', '45%'],
// } center:['19%', '50%'],
// }, avoidLabelOverlap: false,
labelLine: { itemStyle: {
show: false borderRadius: 10,
}, borderColor: '#fff',
data: [ borderWidth: 2
{ value: 1048, name: '应用领域1' }, },
{ value: 735, name: '应用领域2' }, label: {
{ value: 580, name: '应用领域3' }, show: false,
{ value: 484, name: '应用领域4' }, position: 'center'
{ value: 300, name: '应用领域5' } },
] // emphasis: {
} // label: {
] // show: true,
}; // fontSize: '40',
// fontWeight: 'bold'
// }
// },
labelLine: {
show: false
},
data:this.data9
// [
// { value: 1048, name: '1' },
// { value: 735, name: '2' },
// { value: 580, name: '3' },
// { value: 484, name: '4' },
// { value: 300, name: '5' }
// ]
}
]
};
option && myChart.setOption(option); option && myChart.setOption(option);
}, },
myEcharts9(){ myEcharts9(){
var chartDom = document.getElementById('main9'); var chartDom = document.getElementById('main9');
var myChart = echarts.init(chartDom); var myChart = echarts.init(chartDom);
var option; var option;
option = { option = {
tooltip: { tooltip: {
trigger: 'item' trigger: 'item'
}, },
legend: { legend: {
orient: '', orient: '',
top: '14%', top: '14%',
left: '47%', left: '47%',
width:"auto", width:"auto",
height:"auto", height:"auto",
orient: "vertical", orient: "vertical",
itemGap: 15, itemGap: 15,
itemWidth: 14, itemWidth: 14,
// 使 // 使
formatter: function(name) { formatter: function(name) {
var data = option.series[0].data; var data = option.series[0].data;
var total = 0; var total = 0;
var tarValue; var tarValue;
for (var i = 0; i < data.length; i++) { for (var i = 0; i < data.length; i++) {
total += data[i].value; total += data[i].value;
if (data[i].name == name) { if (data[i].name == name) {
tarValue = data[i].value; tarValue = data[i].value;
} }
} }
var v = tarValue; var v = tarValue;
var p = Math.round(((tarValue / total) * 100)); var p = Math.round(((tarValue / total) * 100));
return `${name} ${p}%`; return `${name} ${p}%`;
}, },
itemStyle:{}, itemStyle:{},
textStyle: { textStyle: {
color: "#666666", color: "#666666",
fontSize:12, fontSize:12,
padding:[0,8,0,10] padding:[0,8,0,10]
}, },
}, },
color: ['#0087ff', '#51cb8d', '#fcc549', '#ef6567', '#ff8a00', '#fc5656'], color: ['#0087ff', '#51cb8d', '#fcc549', '#ef6567', '#ff8a00', '#fc5656'],
series: [ series: [
{ {
type: 'pie', type: 'pie',
radius: ['30%', '45%'], radius: ['30%', '45%'],
center:['22%', '50%'], center:['22%', '50%'],
avoidLabelOverlap: false, avoidLabelOverlap: false,
itemStyle: { itemStyle: {
borderRadius: 10, borderRadius: 10,
borderColor: '#fff', borderColor: '#fff',
borderWidth: 2 borderWidth: 2
}, },
label: { label: {
show: false, show: false,
position: 'center' position: 'center'
}, },
// emphasis: { // emphasis: {
// label: { // label: {
// show: true, // show: true,
// fontSize: '40', // fontSize: '40',
// fontWeight: 'bold' // fontWeight: 'bold'
// } // }
// }, // },
labelLine: { labelLine: {
show: false show: false
}, },
data: [ data:this.data10
{ value: 1048, name: '应用状态1' }, // [
{ value: 735, name: '应用状态2' }, // { value: 1048, name: '1' },
{ value: 580, name: '应用状态3' }, // { value: 735, name: '2' },
{ value: 484, name: '应用状态4' }, // { value: 580, name: '3' },
{ value: 300, name: '应用状态5' } // { value: 484, name: '4' },
] // { value: 300, name: '5' }
} // ]
] }
}; ]
};
option && myChart.setOption(option); option && myChart.setOption(option);
}, },
backBtn(){
this.$emit('closeApplication')
}
} }
} }
</script> </script>
@ -740,6 +965,8 @@ export default {
<style scoped> <style scoped>
.container{ .container{
padding-top: 15px; padding-top: 15px;
display: flex;
flex-direction: column;
} }
.title-style{ .title-style{
font-size: 24px; font-size: 24px;
@ -750,6 +977,13 @@ export default {
font-size: 18px; font-size: 18px;
color:#666666; color:#666666;
margin-left: 20px; margin-left: 20px;
}
.back-btn{
background: #3e8ef7;
border-color: rgba(101, 165, 249,0);
color: #FFF;
margin-left:1030px;
padding-bottom: 3px;
} }
.container-body{ .container-body{
width:1300px; width:1300px;

View File

@ -1,7 +1,11 @@
<template> <template>
<div class='container'> <div class='container'>
<span class='title-style'>组件服务</span> <div>
<span class='page-introduction'>发布情况统计</span> <span class='title-style'>组件服务</span>
<span class='page-introduction'>发布情况统计</span>
<button class='back-btn' @click="backBtn">返回</button>
</div>
<div class='container-body'> <div class='container-body'>
<div class='container-body1'> <div class='container-body1'>
<span style='font-size:18px;color;#000000;'>评分发布情况</span> <span style='font-size:18px;color;#000000;'>评分发布情况</span>
@ -26,7 +30,7 @@
<span style='font-weight:bold' :style="{color:numColorList[index%5]}">{{index+1}}</span> <span style='font-weight:bold' :style="{color:numColorList[index%5]}">{{index+1}}</span>
</div> </div>
<span class='num-style'>{{item.name}}</span> <span class='num-style'>{{item.name}}</span>
<span class='count-style' :style="{color:numColorList[index%5]}">{{item.count}}</span> <span class='count-style' :style="{color:numColorList[index%5]}">{{item.resourceCarNum}}</span>
</div> </div>
</div> </div>
</div> </div>
@ -41,7 +45,7 @@
<span style='font-weight:bold' :style="{color:numColorList[index%5]}">{{index+1}}</span> <span style='font-weight:bold' :style="{color:numColorList[index%5]}">{{index+1}}</span>
</div> </div>
<span class='num-style'>{{item.name}}</span> <span class='num-style'>{{item.name}}</span>
<span class='count-style' :style="{color:numColorList[index%5]}">{{item.count}}</span> <span class='count-style' :style="{color:numColorList[index%5]}">{{item.resourceCarNum}}</span>
</div> </div>
</div> </div>
</div> </div>
@ -57,258 +61,383 @@
import * as echarts from 'echarts'; import * as echarts from 'echarts';
export default { export default {
props:{
tableId:{
type:String,
default:''
},
fatherId:{
type:Number,
default:null,
}
},
data(){ data(){
return{ return{
data1:[],
data2: [
// { value: 1048,name: '' },
// { value: 735, name: '' },
// { nums: 580, attr_value: '' },
// { nums: 484, attr_value: '' },
],
data3: [
// { value: 1048,name: '' },
],
colorList:['linear-gradient(to right, rgba(251, 59, 5,0.6),transparent)', 'linear-gradient(to right,rgba(251, 123, 5),transparent)','linear-gradient(to right,rgba(250, 179, 2,.6),transparent)','linear-gradient(to right,rgba(82, 106, 255,.6),transparent','linear-gradient(to right,rgba(82, 106, 255,.6),transparent)',], colorList:['linear-gradient(to right, rgba(251, 59, 5,0.6),transparent)', 'linear-gradient(to right,rgba(251, 123, 5),transparent)','linear-gradient(to right,rgba(250, 179, 2,.6),transparent)','linear-gradient(to right,rgba(82, 106, 255,.6),transparent','linear-gradient(to right,rgba(82, 106, 255,.6),transparent)',],
widthList:['90px','80px','70px','60px','50px'], widthList:['90px','80px','70px','60px','50px'],
numColorList:['#fc5656','#ff8a00','#f9af0a','#808fff','#808fff'], numColorList:['#fc5656','#ff8a00','#f9af0a','#808fff','#808fff'],
usedList:[{name:'组件名称一',count:111},{name:'组件名称一',count:111},{name:'组件名称一',count:111},{name:'组件名称四',count:111},{name:'组件名称五',count:111},], usedList:[{name:'组件名称一',resourceCarNum:111},{name:'组件名称一',resourceCarNum:111},{name:'组件名称一',resourceCarNum:111},{name:'组件名称四',resourceCarNum:111},{name:'组件名称五',resourceCarNum:111},],
applicationList:[{name:'组件名称一',count:111},{name:'组件名称一',count:111},{name:'组件名称一',count:111},{name:'组件名称四',count:111},{name:'组件名称五',count:111},] applicationList:[{name:'组件名称一',resourceCarNum:111},{name:'组件名称一',resourceCarNum:111},{name:'组件名称一',resourceCarNum:111},{name:'组件名称四',resourceCarNum:111},{name:'组件名称五',resourceCarNum:111},]
} }
}, },
created(){
if(this.fatherId===1){
this.getBeCalled()
this.getBeApplied()
this.getAlgorithm()
this.getDistributed()
this.getScoreList()
}else{
}
},
mounted(){ mounted(){
this.myEcharts1()
this.myEcharts2()
this.myEcharts3()
}, },
methods:{ methods:{
myEcharts1(){ //
var chartDom = document.getElementById('main1'); getScoreList () {
var myChart = echarts.init(chartDom); this.$http.get('/census/center/v3/assemblerScoreInfo' ,{
var option; params : {
option = { id:this.tableId,
tooltip: { resourceType:"应用资源"
trigger: 'item' // pageNo: pageNo || 1,
}, // pageSize: 20
legend: { }
orient: '', }).then(res => {
top: '14%', let arry=[]
left: '55%', arry=res.data.data
width:"auto", arry.forEach((item)=>{
height:"auto",
orient: "vertical", const single={
itemGap: 15, value:item.scoreNum,
itemWidth: 14, name:item.score
// 使 }
formatter: function(name) { // const newList=[]
var data = option.series[0].data; this.data1.push(single)
var total = 0; // this.data2=newList
var tarValue; this.myEcharts1()
for (var i = 0; i < data.length; i++) { })
total += data[i].value; })
if (data[i].name == name) {
tarValue = data[i].value;
}
}
var v = tarValue;
var p = Math.round(((tarValue / total) * 100));
return `${name} ${p}%`;
},
itemStyle:{},
textStyle: {
color: "#666666",
padding:[0,8,0,18]
},
},
color: ['#0087ff', '#51cb8d', '#fcc549', '#ef6567', '#ff8a00', '#fc5656'],
series: [
{
type: 'pie',
radius: ['40%', '60%'],
center:['22%', '50%'],
avoidLabelOverlap: false,
itemStyle: {
borderRadius: 10,
borderColor: '#fff',
borderWidth: 2
}, },
label: { //
show: false, getAlgorithm () {
position: 'center' this.$http.get('/census/center/v3/assemblerUsedInfo' ,{
params : {
id:this.tableId,
resourceType:"组件服务"
// pageNo: pageNo || 1,
// pageSize: 20
}
}).then(res => {
let arry=[]
arry=res.data.data
arry.forEach((item)=>{
const single={
value:item.nums,
name:item.attr_value
}
// const newList=[]
this.data2.push(single)
// this.data2=newList
this.myEcharts2()
})
})
}, },
// emphasis: { //
// label: { getDistributed () {
// show: true, this.$http.get('/census/center/v3/applicationAreaCapabilityList' ,{
// fontSize: '40', params : {
// fontWeight: 'bold' id:this.tableId,
// } resourceType:"应用资源"
// }, }
labelLine: { }).then(res => {
show: false let arry=[]
arry=res.data.data
arry.forEach((item)=>{
const single={
value:item.total,
name:item.type
}
const newList=[]
this.data3.push(single)
// this.data2=newList
this.myEcharts3()
})
})
}, },
data: [ //
{ value: 1048, name: '1分' }, getBeCalled () {
{ value: 735, name: '2分' }, this.$http.get('/census/center/v3/assemblerCaredTopInfo' ,{
{ value: 580, name: '3分' }, params : {
{ value: 484, name: '4分' }, id:this.tableId,
{ value: 300, name: '5分' } resourceType:"应用资源"
// pageNo: pageNo || 1,
// pageSize: 20
}
}).then(res => {
this.applicationList =res.data.data
})
},
//
getBeApplied () {
this.$http.get('/census/center/v3/assemblerCaredTopInfo' ,{
params : {
id:this.tableId,
resourceType:"应用资源"
// pageNo: pageNo || 1,
// pageSize: 20
}
}).then(res => {
this.applicationList =res.data.data
})
},
myEcharts1(){
var chartDom = document.getElementById('main1');
var myChart = echarts.init(chartDom);
var option;
option = {
tooltip: {
trigger: 'item'
},
legend: {
orient: '',
top: '14%',
left: '55%',
width:"auto",
height:"auto",
orient: "vertical",
itemGap: 15,
itemWidth: 14,
// 使
formatter: function(name) {
var data = option.series[0].data;
var total = 0;
var tarValue;
for (var i = 0; i < data.length; i++) {
total += data[i].value;
if (data[i].name == name) {
tarValue = data[i].value;
}
}
var v = tarValue;
var p = Math.round(((v / total) * 100));
return `${name} ${p}%`;
},
itemStyle:{},
textStyle: {
color: "#666666",
padding:[0,8,0,18]
},
},
color: ['#0087ff', '#51cb8d', '#fcc549', '#ef6567', '#ff8a00', '#fc5656'],
series: [
{
type: 'pie',
radius: ['40%', '60%'],
center:['22%', '50%'],
avoidLabelOverlap: false,
itemStyle: {
borderRadius: 10,
borderColor: '#fff',
borderWidth: 2
},
label: {
show: false,
position: 'center'
},
labelLine: {
show: false
},
data: this.data1
}
] ]
} };
]
};
option && myChart.setOption(option); option && myChart.setOption(option);
},
myEcharts2(){
var chartDom = document.getElementById('main2');
var myChart = echarts.init(chartDom);
var option;
option = {
tooltip: {
trigger: 'item'
}, },
myEcharts2(){ legend: {
var chartDom = document.getElementById('main2'); orient: '',
var myChart = echarts.init(chartDom); top: '22%',
var option; left: '50%',
option = { width:"auto",
tooltip: { height:"auto",
trigger: 'item' orient: "vertical",
}, itemGap: 15,
legend: { itemWidth: 14,
orient: '', // 使
top: '22%', formatter: function(name) {
left: '50%', var data = option.series[0].data;
width:"auto", var total = 0;
height:"auto", var tarValue;
orient: "vertical", for (var i = 0; i < data.length; i++) {
itemGap: 15, total += data[i].value;
itemWidth: 14, if (data[i].name == name) {
// 使 tarValue = data[i].value;
formatter: function(name) { }
var data = option.series[0].data; }
var total = 0; var v = tarValue;
var tarValue; var p = Math.round(((tarValue / total) * 100));
for (var i = 0; i < data.length; i++) { return `${name} ${p}%`;
total += data[i].value;
if (data[i].name == name) {
tarValue = data[i].value;
}
}
var v = tarValue;
var p = Math.round(((tarValue / total) * 100));
return `${name} ${p}%`;
},
itemStyle:{},
textStyle: {
color: "#666666",
padding:[0,8,0,18]
},
},
color: ['#0087ff', '#51cb8d', '#fcc549', '#ef6567', '#ff8a00', '#fc5656'],
series: [
{
// name: 'Access From',
type: 'pie',
radius: ['40%', '60%'],
center:['22%', '50%'],
avoidLabelOverlap: false,
itemStyle: {
borderRadius: 10,
borderColor: '#fff',
borderWidth: 2
}, },
label: { itemStyle:{},
show: false, textStyle: {
position: 'center' color: "#666666",
padding:[0,8,0,18]
}, },
// emphasis: {
// label: {
// show: true,
// fontSize: '40',
// fontWeight: 'bold'
// }
// },
labelLine: {
show: false
}, },
data: [ color: ['#0087ff', '#51cb8d', '#fcc549', '#ef6567', '#ff8a00', '#fc5656'],
{ value: 1048, name: '算法' }, series: [
{ value: 735, name: '图层' }, {
{ value: 580, name: '开发' }, // name: 'Access From',
{ value: 484, name: '业务' }, type: 'pie',
radius: ['40%', '60%'],
center:['22%', '50%'],
avoidLabelOverlap: false,
itemStyle: {
borderRadius: 10,
borderColor: '#fff',
borderWidth: 2
},
label: {
show: false,
position: 'center'
},
labelLine: {
show: false
},
data: this.data2
}
] ]
} };
]
};
option && myChart.setOption(option); option && myChart.setOption(option);
},
myEcharts3(){
var chartDom = document.getElementById('main3');
var myChart = echarts.init(chartDom);
var option;
option = {
tooltip: {
trigger: 'item'
}, },
myEcharts3(){ legend: {
var chartDom = document.getElementById('main3'); orient: "vertical", type: 'scroll',
var myChart = echarts.init(chartDom); top: '22%',
var option; left: '50%',
option = { width:"auto",
tooltip: { height:"auto",
trigger: 'item' orient: "vertical",
}, itemGap: 15,
legend: { itemWidth: 14,
orient: '',
top: '22%', // 使
left: '50%', formatter: function(name) {
width:"auto", var data = option.series[0].data;
height:"auto", var total = 0;
orient: "vertical", var tarValue;
itemGap: 15, for (var i = 0; i < data.length; i++) {
itemWidth: 14, total += data[i].value;
// 使 if (data[i].name == name) {
formatter: function(name) { tarValue = data[i].value;
var data = option.series[0].data; }
var total = 0; }
var tarValue; var v = tarValue;
for (var i = 0; i < data.length; i++) { var p = Math.round(((tarValue / total) * 100));
total += data[i].value; return `{a|${name}} {b|${p}%}`;
if (data[i].name == name) { },
tarValue = data[i].value; itemStyle:{},
} textStyle: {
} rich: {
var v = tarValue; // richoneonetwotwothreethree""
var p = Math.round(((tarValue / total) * 100)); a: {
return `${name} ${p}%`; //
}, width: 100,
itemStyle:{}, color: "#000000",
textStyle: { fontSize: 12,
color: "#666666", fontWeight: "bolder",
padding:[0,8,0,18] },
}, b: {
}, // 102030
color: ['#0087ff', '#51cb8d', '#fcc549', '#ef6567', '#ff8a00', '#fc5656'], width: 35,
series: [ color: "#333",
{ fontSize: 12,
// name: 'Access From', },
type: 'pie', },
radius: ['40%', '60%'], color: "#666666",
center:['22%', '50%'], backgroundColor: "transparent",
avoidLabelOverlap: false, padding:[0,8,0,18]
itemStyle: { },
borderRadius: 10,
borderColor: '#fff',
borderWidth: 2
}, },
label: { color: ['#0087ff', '#51cb8d', '#fcc549', '#ef6567', '#ff8a00', '#fc5656'],
show: false, series: [
position: 'center' {
}, // name: 'Access From',
// emphasis: { type: 'pie',
// label: { radius: ['40%', '60%'],
// show: true, center:['22%', '50%'],
// fontSize: '40', avoidLabelOverlap: false,
// fontWeight: 'bold' itemStyle: {
// } borderRadius: 10,
// }, borderColor: '#fff',
labelLine: { borderWidth: 2
show: false },
}, label: {
data: [ show: false,
{ value: 1048, name: '应用领域' }, position: 'center'
{ value: 735, name: '应用领域2' }, },
{ value: 580, name: '应用领域3' }, // emphasis: {
{ value: 484, name: '应用领域4' }, // label: {
// show: true,
// fontSize: '40',
// fontWeight: 'bold'
// }
// },
labelLine: {
show: false
},
data:this.data3
}
] ]
} };
]
};
option && myChart.setOption(option); option && myChart.setOption(option);
} },
backBtn(){
this.$emit('closeChild')
}
} }
} }
</script> </script>
<style scoped> <style scoped>
.container{ .container{
padding-top: 15px; padding-top: 15px;
display: flex;
flex-direction: column;
} }
.title-style{ .title-style{
font-size: 24px; font-size: 24px;
@ -320,6 +449,13 @@ export default {
color:#666666; color:#666666;
margin-left: 20px; margin-left: 20px;
} }
.back-btn{
background: #3e8ef7;
border-color: rgba(101, 165, 249,0);
color: #FFF;
margin-left:1030px;
padding-bottom: 3px;
}
.container-body{ .container-body{
width:1300px; width:1300px;
margin-top:30px; margin-top:30px;
@ -358,7 +494,9 @@ export default {
padding-left: 20px; padding-left: 20px;
margin-top: 20px; margin-top: 20px;
margin-right: 20px; margin-right: 20px;
/* background-image:url("../../../assets/img/排行榜背景图.png"); */ background-image:url("../../../assets/img/排行榜背景图.png");
background-repeat:no-repeat;
background-size: 100% 100%;
} }
.container-body5{ .container-body5{
width:640px; width:640px;
@ -367,6 +505,9 @@ export default {
padding-top:20px; padding-top:20px;
padding-left: 20px; padding-left: 20px;
margin-top: 20px; margin-top: 20px;
background-image:url("../../../assets/img/排行榜背景图.png");
background-repeat:no-repeat;
background-size: 100% 100%;
} }
.footer{ .footer{
display: flex; display: flex;

View File

@ -1,6 +1,7 @@
<template> <template>
<div class='container'> <div >
<div class='container-left'> <div class='container'>
<!-- <div class='container-left' v-if='homeIsShow'>
<div class='left-search'> <div class='left-search'>
<div> <div>
<input type="text" class='input-style' placeholder="请输入部门关键词" v-model="inputTxt"> <input type="text" class='input-style' placeholder="请输入部门关键词" v-model="inputTxt">
@ -20,7 +21,7 @@
{{ node.label }} {{ node.label }}
</span> </span>
</el-tree> </el-tree>
</div> </div> -->
<el-card shadow="never" class="aui-card--fill" v-if='homeIsShow'> <el-card shadow="never" class="aui-card--fill" v-if='homeIsShow'>
<div class="mod-demand__bsdemand"> <div class="mod-demand__bsdemand">
<div class='top-box'> <div class='top-box'>
@ -41,51 +42,51 @@
</div> </div>
<div class='line-style'></div> <div class='line-style'></div>
<el-table <el-table
:data="tableData" :data="tableData"
border border
style="width: 100%"> style="width: 100%">
<el-table-column <el-table-column
prop="name" prop="deptName"
label="部门名称" label="部门名称"
min-width="100%"> min-width="100%">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="releaseNum" prop="resourceNum"
label="发布总数" label="发布总数"
min-width="100%"> min-width="100%">
</el-table-column> </el-table-column>
<el-table-column <el-table-column v-if="this.choseId===0"
prop="applyNum" prop="resourceCarNum"
label="被申请总数" label="被申请总数"
min-width="100%"> min-width="100%">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="browseNmu" prop="resourceBrowseNum"
label="浏览总量" label="浏览总量"
min-width="100%"> min-width="100%">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="collectNum" prop="resourceCollectionNum"
label="收藏量" label="收藏量"
min-width="100%"> min-width="100%">
</el-table-column> </el-table-column>
<el-table-column <el-table-column v-if="this.choseId===0"
prop="transferNum" prop="resourceVisits"
label="被调用总数" label="被调用总数"
min-width="100%"> min-width="100%">
</el-table-column> </el-table-column>
<el-table-column <el-table-column v-if="this.choseId===0"
prop="applicationNum" prop="resourceRelNum"
label="被应用总数" label="被应用总数"
min-width="100%"> min-width="100%">
</el-table-column> </el-table-column>
<el-table-column <el-table-column v-if="this.choseId===0"
prop="needApplicationNum" prop="resourceShareNum"
label="需申请数量" label="需申请数量"
min-width="100%"> min-width="100%">
</el-table-column> </el-table-column>
<el-table-column <el-table-column v-if="this.choseId===0"
prop="reductionNum" prop="resourceShareNonNum"
label="免批数量" label="免批数量"
min-width="100%"> min-width="100%">
</el-table-column> </el-table-column>
@ -99,18 +100,19 @@
</el-table> </el-table>
<div class="block"> <div class="block">
<el-pagination <el-pagination
@size-change="handleSizeChange" @current-change="handleCurrentChange"
@current-change="getALLTree"
:current-page="currentPage4"
:page-sizes="[10, 20, 30, 40]"
layout="total, prev, pager, next, jumper" layout="total, prev, pager, next, jumper"
:total="50"> :total="total"
:page-size="5"
:current-page="currentPage"
>
</el-pagination> </el-pagination>
</div> </div>
</div> </div>
</el-card> </el-card>
<component-services v-if='servicesIsShow' ></component-services> </div>
<application-resources v-if='resourcesIsShow'></application-resources> <component-services v-if='servicesIsShow' :tableId='tableId' :fatherId='fatherId' @closeChild='closeChild'></component-services>
<application-resources v-if='resourcesIsShow' :tableId='tableId' :fatherId='fatherId' @closeApplication='closeApplication'></application-resources>
</div> </div>
</template> </template>
<script> <script>
@ -121,6 +123,8 @@ export default {
data(){ data(){
return{ return{
inputTxt:'', inputTxt:'',
tableId:'',
fatherId:'',
treeData: [{ treeData: [{
label: '一级 1', label: '一级 1',
children: [{ children: [{
@ -156,79 +160,48 @@ export default {
}] }]
}] }]
}], }],
total:null,
defaultProps: { defaultProps: {
children: 'children', children: 'children',
label: 'name' label: 'name'
}, },
choseId:null, choseId:0,
departmentId:1, departmentId:1,
currentPage4: 4, currentPage: 1,
homeIsShow:true, homeIsShow:true,
servicesIsShow:false, servicesIsShow:false,
resourcesIsShow:false, resourcesIsShow:false,
titleList:[ titleList:[
{name:'组件服务',key:1}, {name:'应用资源',key:2}, {name:'基础设施',key:3}, {name:'数据资源',key:3}, {name:'知识库',key:3}, {name:'组件服务',key:1}, {name:'应用资源',key:2}, {name:'基础设施',key:3}, {name:'数据资源',key:3}, {name:'知识库',key:3},
], ],
tableData: [{ tableData: []
name: '部门名称一',
releaseNum: 111,
applyNum: 222,
browseNmu: 333,
collectNum:444,
transferNum:555,
applicationNum:666,
needApplicationNum:777,
reductionNum:888,
},{
name: '部门名称一',
releaseNum: 111,
applyNum: 222,
browseNmu: 333,
collectNum:444,
transferNum:555,
applicationNum:666,
needApplicationNum:777,
reductionNum:888,
},{
name: '部门名称一',
releaseNum: 111,
applyNum: 222,
browseNmu: 333,
collectNum:444,
transferNum:555,
applicationNum:666,
needApplicationNum:777,
reductionNum:888,
},{
name: '部门名称一',
releaseNum: 111,
applyNum: 222,
browseNmu: 333,
collectNum:444,
transferNum:555,
applicationNum:666,
needApplicationNum:777,
reductionNum:888,
},
]
} }
}, },
created(){ created(){
this.getALLTree()
},
mounted(){
this.getFirstTree()
}, },
methods: { methods: {
// //
searchBtn(){ // searchBtn(){
this.getALLTree() // this.getALLTree()
}, // },
// // //
handleNodeClick(data) { // handleNodeClick(data) {
console.log(data.name); // console.log(data.name);
this.getTreeName(data) // this.getTreeName(data)
}, // },
//
handleCurrentChange(val){ handleCurrentChange(val){
this.getALLTree(val) if(this.choseId===0){
this.getFirstTree(val)
}
else if(this.choseId===1){
this.getReleaseTree(val)
}
}, },
getTreeName (data) { getTreeName (data) {
this.$http.get('/census/center/v3/treeList/' ,{ this.$http.get('/census/center/v3/treeList/' ,{
@ -242,78 +215,136 @@ export default {
this.tableData =res.data.data this.tableData =res.data.data
}) })
}, },
// // //
getALLTree () { // getALLTree () {
this.$http.get('/census/center/v3/treeList/' ,{ // this.$http.get('/census/center/v3/treeList/' ,{
params : { // params : {
keywords:this.inputTxt, // keywords:this.inputTxt,
deptId:'1067246875800000066', // deptId:'1067246875800000066',
// pageNo: pageNo || 1, // // pageNo: pageNo || 1,
// pageSize: 20 // // pageSize: 20
} // }
}).then(res => { // }).then(res => {
this.treeData =res.data.data // this.treeData =res.data.data
this.tableData =res.data.data // // this.tableData =res.data.data
}) // })
}, // },
//
getFirstTree () { //
getFirstTree (page) {
this.$http.get('/census/center/v3/resourceReleaseDetails/' ,{ this.$http.get('/census/center/v3/resourceReleaseDetails/' ,{
params : { params : {
limit:100, page:page||1,
page:1, limit:5,
id:null, // id:'1067246875800000066',
resourceType:'资源类型' resourceType:'组件服务'
} }
}).then(res => { }).then(res => {
this.tableData =res.data.data this.tableData =res.data.data.list
this.total = res.data.data.total
}) })
}, },
// 使 // 使
getSecondTree () { getSecondTree () {
this.$http.get('/census/center/v3/resourceUsedDetails/' ,{ this.$http.get('/census/center/v3/resourceUsedDetails/' ,{
params : { params : {
keywords:'', limit:5,
deptId:'1067246875800000066', page:1,
} // id:'1067246875800000064',
resourceType:'组件服务'
}
}).then(res => { }).then(res => {
this.tableData =res.data.data this.tableData =res.data.data.list
console.log('2222',this.tableData)
})
},
//
getReleaseTree (page) {
this.$http.get('/census/center/v3/resourceReleaseDetails/' ,{
params : {
limit:5,
page:page||1,
// id:'1067246875800000066',
resourceType:'应用资源'
}
}).then(res => {
this.tableData =res.data.data.list
this.total = res.data.data.total
})
},
// 使
getUsedTree () {
this.$http.get('/census/center/v3/resourceReleaseDetails/' ,{
params : {
limit:5,
page:1,
// id:'1067246875800000066',
resourceType:'应用资源'
}
}).then(res => {
this.tableData =res.data.data.list
}) })
}, },
handleClick(row) { handleClick(row) {
console.log(row); if(this.choseId===0){
this.homeIsShow=false
this.servicesIsShow=true
this.tableId=row.deptId
this.fatherId=1
}else if(this.choseId===1){
this.homeIsShow=false
this.resourcesIsShow=true
this.tableId=row.deptId
this.fatherId=2
}
}, },
// //
choseBtn(index){ choseBtn(index){
this.choseId=index this.choseId=index
if (index===0){ this.handleChose(1)
this.homeIsShow=false
this.servicesIsShow=true
} else if(index===1){
this.homeIsShow=false
this.servicesIsShow=false
this.resourcesIsShow=true
}
}, },
// choseBtn(index){
// this.choseId=index
// if (index===0){
// this.homeIsShow=false
// this.servicesIsShow=true
// } else if(index===1){
// this.homeIsShow=false
// this.servicesIsShow=false
// this.resourcesIsShow=true
// }
// },
//or使 //or使
handleChose(index){ handleChose(index){
this.departmentId=index this.departmentId=index
if(index===1){ if(index===1){
this.getFirstTree() if(this.choseId===0){
} this.getFirstTree()
else{ }else if(this.choseId===1){
this.getSecondTree() this.getReleaseTree()
}
}else if(index===2){
if(this.choseId===0){
this.getSecondTree()
}else{
this.getUsedTree()
}
} }
}, },
// //
handleSizeChange(val) { handleSizeChange(val) {
console.log(`每页 ${val}`); console.log(`每页 ${val}`);
}, },
handleCurrentChange(val) { closeChild(){
console.log(`当前页: ${val}`); this.homeIsShow=true
this.servicesIsShow=false
},
closeApplication(){
this.homeIsShow=true
this.resourcesIsShow=false
} }
}, },
@ -322,10 +353,12 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.container{ .container{
display: flex; display: flex;
} }
.container-left{ .container-left{
width:250px; width:250px;
height:1000px; height:1000px;
display: inline-block;
// background-color: #ffffff; // background-color: #ffffff;
margin-right:10px margin-right:10px
} }
@ -371,7 +404,9 @@ input::placeholder {
.top-box{ .top-box{
height:80px; height:80px;
width:100%;
background-color: #fafafc; background-color: #fafafc;
display: inline-block;
} }
.title{ .title{
display: flex; display: flex;

View File

@ -15,6 +15,20 @@ function Request({
}) })
}) })
}
function RequestPost({
methods, url, data, success, fali
}) {
return new Promise((resolve, reject) => {
http[methods](url,
data
).then(res => {
resolve(res)
}, err => {
reject(err)
})
})
} }
// /resource/getByDept:获取当前登录用户所在部门发布的资源 // /resource/getByDept:获取当前登录用户所在部门发布的资源
@ -125,9 +139,9 @@ export const getApplyByDept = (data, success, fail) => {
} }
// 部门发布能力被调用趋势 // 部门发布能力被调用趋势
export const getByDept = (data, success, fail) => { export const getByDept = (data, success, fail) => {
Request({ RequestPost({
methods: 'get', methods: 'post',
url: '/resource/getByDept', url: '/resource/trafficDeptResource',
data data
}).then(res => { }).then(res => {
success && success(res) success && success(res)

View File

@ -27,6 +27,6 @@ export default {
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: space-between;
} }
</style> </style>

View File

@ -186,19 +186,19 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.chart-box { .chart-box {
width: 260px; width: 250px;
height: 232px; height: 232px;
margin: 1px; margin: 1px;
} }
.dept-chart-view { .dept-chart-view {
width: 260px; width: 250px;
height: 232px; height: 232px;
margin: 1px; margin: 1px;
} }
.title { .title {
width: 260px; width: 250px;
font-size: 18px; font-size: 18px;
color: #212121; color: #212121;
text-align: center; text-align: center;
@ -206,7 +206,7 @@ export default {
} }
.no-data { .no-data {
width: 260px; width: 250px;
height: 232px; height: 232px;
line-height: 232px; line-height: 232px;
font-size: 16px; font-size: 16px;

View File

@ -67,7 +67,7 @@ export const trendLineChart = (id, chartData, _option) => {
}, },
}], }],
series: [{ series: [{
name: '合格数据百分比', name: '使用量',
type: 'line', type: 'line',
showAllSymbol: true, showAllSymbol: true,
symbolSize: 0, symbolSize: 0,

View File

@ -21,8 +21,8 @@ export default {
} }
.no-data { .no-data {
width: 540px; width: 520px;
height: 300px; height: 287px;
background: #fff; background: #fff;
line-height: 232px; line-height: 232px;
font-size: 16px; font-size: 16px;

View File

@ -23,7 +23,14 @@ export default {
return { return {
titles: ["近七日", "月度"], titles: ["近七日", "月度"],
selectedTitle: 0, selectedTitle: 0,
trendChartData:{} trendChartData: {},
startDate: "",
endDate:
new Date().getFullYear() +
"-" +
(new Date().getMonth() + 1) +
"-" +
new Date().getDate()
}; };
}, },
components: { components: {
@ -32,25 +39,38 @@ export default {
mounted() { mounted() {
this.initChart(); this.initChart();
}, },
watch: {
selectedTitle: {
handler: function(newVal, oldVal) {
this.startDate = this.getData(newVal == 0 ? 7 : 30);
},
deep: true,
immediate: true
}
},
methods: { methods: {
// //
initChart() { initChart() {
let data = {
limit: 10,
page: 1
};
Apis.getByDept( Apis.getByDept(
data, {
startDate: this.startDate,
endDate: this.endDate
},
res => { res => {
if (res.data.code !== 0) { if (res.data.code !== 0) {
return; return;
} }
this.data = res.data.data.records || []; this.data = res.data.data.browseDayList || [];
let xaxis=[],ydata=[] let xaxis = [],
this.data.forEach(v=>{ ydata = [];
xaxis.push(v.createDate) this.data.forEach(v => {
ydata.push(v.visits) Object.keys(v).map((key, value) => {
}) xaxis.push(key);
ydata.push(value);
});
});
console.log(xaxis)
console.log(ydata)
this.trendChartData = { this.trendChartData = {
xaxis: xaxis, xaxis: xaxis,
ydata: ydata ydata: ydata
@ -66,14 +86,34 @@ export default {
}, },
handleTitleSwitch(idx) { handleTitleSwitch(idx) {
this.selectedTitle = idx; this.selectedTitle = idx;
this.startDate = this.getData(this.selectedTitle == 0 ? 7 : 30);
console.log(this.startDate);
this.initChart(); this.initChart();
},
getData(aa) {
let date1 = new Date(),
time1 =
date1.getFullYear() +
"-" +
(date1.getMonth() + 1) +
"-" +
date1.getDate(); //time1
let date2 = new Date(date1);
date2.setDate(date1.getDate() - aa);
let time2 =
date2.getFullYear() +
"-" +
(date2.getMonth() + 1) +
"-" +
date2.getDate();
return time2;
} }
} }
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.trend { .trend {
width: 544px; width: 516px;
height: 335px; height: 335px;
background: #fff; background: #fff;
margin-right: 4px; margin-right: 4px;

View File

@ -2,7 +2,7 @@
* @Author: hisense.wuhongjian * @Author: hisense.wuhongjian
* @Date: 2022-03-29 16:45:25 * @Date: 2022-03-29 16:45:25
* @LastEditors: hisense.wuhongjian * @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-06-30 15:30:25 * @LastEditTime: 2022-06-30 19:06:47
* @Description: 告诉大家这是什么 * @Description: 告诉大家这是什么
--> -->
<!DOCTYPE html> <!DOCTYPE html>

View File

@ -2,7 +2,7 @@
* @Author: hisense.wuhongjian * @Author: hisense.wuhongjian
* @Date: 2020-07-07 16:03:23 * @Date: 2020-07-07 16:03:23
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-06-27 14:22:56 * @LastEditTime: 2022-06-30 11:05:52
* @Description: 数据资源参数配置 * @Description: 数据资源参数配置
*/ */
const newLocation = 'qingdao' const newLocation = 'qingdao'
@ -14,6 +14,8 @@ const whoShow = {}
const launchedDataNumObject = {} const launchedDataNumObject = {}
// //
const navListManagement = {} const navListManagement = {}
//
const infrastructure = {}
// //
const mapTestNum = {} const mapTestNum = {}
// //
@ -21,6 +23,8 @@ const footerDataList = {}
// qingdao // qingdao
if (newLocation === 'qingdao') { if (newLocation === 'qingdao') {
whoShow.itShowQingDao = true whoShow.itShowQingDao = true
infrastructure.deptName = '青岛市大数据发展管理局'
infrastructure.deptId = '1067246875800000066'
navListManagement.navList = [ navListManagement.navList = [
{ name: '共享门户', key: 'home' }, { name: '共享门户', key: 'home' },
{ name: '能力集市', key: 'DetailsPageconetent' }, { name: '能力集市', key: 'DetailsPageconetent' },

View File

@ -2,7 +2,7 @@
* @Author: hisense.wuhongjian * @Author: hisense.wuhongjian
* @Date: 2022-04-01 19:19:40 * @Date: 2022-04-01 19:19:40
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-06-29 14:34:24 * @LastEditTime: 2022-06-30 18:03:17
* @Description: 告诉大家这是什么 * @Description: 告诉大家这是什么
*/ */
import request from '@/utils/request' import request from '@/utils/request'
@ -314,3 +314,11 @@ export function queryPartAppByKeyId2(params) {
}) })
} }
//
export function selectInfrastructureList(params) {
return request({
url: 'resource/selectInfrastructureList',
method: 'get',
params,
})
}

View File

@ -46,7 +46,7 @@
<div class="left" id="left"></div> <div class="left" id="left"></div>
<div class="center"></div> <div class="center"></div>
<div class="right" id="right"></div> <div class="right" id="right"></div>
<div class="right-son1">汇聚量</div> <!-- <div class="right-son1">汇聚量</div> -->
<div class="right-son2">部门数</div> <div class="right-son2">部门数</div>
</div> </div>
</div> </div>
@ -287,6 +287,12 @@
} }
// //
const funnelPlot = (dataList) => { const funnelPlot = (dataList) => {
// let arr = ['0-5', '5-10', '10-15', '15-20', '20']
// dataList.sort((a, b) => {
// console.log(arr.indexOf(a.fanwei), arr.indexOf(b.fanwei))
// return arr.indexOf(b.fanwei) - arr.indexOf(a.fanwei)
// })
console.log('============》', dataList)
echarts.init(document.getElementById('right')).dispose() echarts.init(document.getElementById('right')).dispose()
let chartDom = document.getElementById('right') let chartDom = document.getElementById('right')
let myChart = echarts.init(chartDom) let myChart = echarts.init(chartDom)
@ -318,6 +324,7 @@
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'], data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
}, },
yAxis: { yAxis: {
show: false,
type: 'value', type: 'value',
min: 0, min: 0,
max: 20, max: 20,

View File

@ -27,7 +27,7 @@
</div> </div>
<div class="right"> <div class="right">
<div @click="technical()">技术文档</div> <div @click="technical()">技术文档</div>
<div>新手指引</div> <!-- <div>新手指引</div> -->
</div> </div>
</div> </div>
<div class="content-right"> <div class="content-right">
@ -152,7 +152,6 @@
} }
) )
function technical() { function technical() {
// //
const type = pinyin(props.dataList.type, { const type = pinyin(props.dataList.type, {
pattern: 'initial', pattern: 'initial',

View File

@ -28,18 +28,19 @@
name: '组件展示', name: '组件展示',
key: 'business-presentation', key: 'business-presentation',
}, },
{
name: '关联能力',
key: 'business-associated-ability',
},
{ {
name: '功能介绍', name: '功能介绍',
key: 'function-introduction', key: 'function-introduction',
}, },
{ {
name: '应用场景', name: '应用场景',
key: 'application-scenarios', key: 'application-scenarios',
}, },
{
name: '关联能力',
key: 'business-associated-ability',
},
{ {
name: '应用案例', name: '应用案例',
key: 'application-case', key: 'application-case',
@ -68,6 +69,7 @@
list.value = [] list.value = []
let arr = [ let arr = [
'组件视频介绍', '组件视频介绍',
'关联能力',
'功能介绍', '功能介绍',
'应用场景', '应用场景',
'应用案例', '应用案例',
@ -117,6 +119,7 @@
list.value = [] list.value = []
let arr = [ let arr = [
'组件视频介绍', '组件视频介绍',
'关联能力',
'功能介绍', '功能介绍',
'应用场景', '应用场景',
'应用案例', '应用案例',

View File

@ -115,6 +115,8 @@
// eslint-disable-next-line vue/no-setup-props-destructure // eslint-disable-next-line vue/no-setup-props-destructure
dataFrom.value.content[0].link.value = props.dataList.apiUrl dataFrom.value.content[0].link.value = props.dataList.apiUrl
dataFrom.value.content[0].facilitator.value = props.dataList.deptContacts dataFrom.value.content[0].facilitator.value = props.dataList.deptContacts
dataFrom.value.content[0].people.value = props.dataList.deptContacts
dataFrom.value.content[0].phone.value = props.dataList.deptPhone
console.log('dataList', props.dataList) console.log('dataList', props.dataList)
props.dataList.infoList.map((item) => { props.dataList.infoList.map((item) => {
if (item.attrType === '组件地址') { if (item.attrType === '组件地址') {
@ -139,6 +141,8 @@
} else { } else {
dataFrom.value.content[0].link.value = val.apiUrl dataFrom.value.content[0].link.value = val.apiUrl
dataFrom.value.content[0].facilitator.value = val.deptContacts dataFrom.value.content[0].facilitator.value = val.deptContacts
dataFrom.value.content[0].people.value = val.deptContacts
dataFrom.value.content[0].phone.value = val.deptPhone
console.log('dataList', val) console.log('dataList', val)
val.infoList.map((item) => { val.infoList.map((item) => {
if (item.attrType === '组件地址') { if (item.attrType === '组件地址') {
@ -179,11 +183,14 @@
// // // //
// const id = props.dataList.id // const id = props.dataList.id
// window.open(window.SITE_CONFIG.frontUrl + type + '/' + id + '.md', '_blank') // window.open(window.SITE_CONFIG.frontUrl + type + '/' + id + '.md', '_blank')
console.log('dataFrom.value.link', dataFrom.value.link) let obj = props.dataList.infoList.filter(
(item) => item.attrType === '使用手册'
)[0]
console.log('dataFrom.value.link', obj.attrValue)
window.open( window.open(
window.SITE_CONFIG.previewUrl + window.SITE_CONFIG.previewUrl +
'hisense_office/onlinePreview?url=' + 'hisense_office/onlinePreview?url=' +
btoa(encodeURI(dataFrom.value.link)) btoa(encodeURI(obj.attrValue))
) )
} }
</script> </script>

View File

@ -34,14 +34,14 @@
</div> </div>
</div> </div>
<div class="bottom" v-if="props.dataList.id"> <div class="bottom" v-if="props.dataList.id">
<!-- <a-button type="primary" @click="toView()"> <a-button type="primary" @click="toView()">
<template #icon><form-outlined /></template> <template #icon><form-outlined /></template>
申请使用 申请使用
</a-button> </a-button>
<a-button type="primary" @click="addShoppingCart()"> <a-button type="primary" @click="addShoppingCart()">
<template #icon><shopping-cart-outlined /></template> <template #icon><shopping-cart-outlined /></template>
加入购物车 加入购物车
</a-button> --> </a-button>
<a-button type="primary" @click="goTOCollection()">收藏</a-button> <a-button type="primary" @click="goTOCollection()">收藏</a-button>
</div> </div>
</div> </div>
@ -49,42 +49,42 @@
</div> </div>
</template> </template>
<script setup> <script setup>
// import { ShoppingCartOutlined } from '@ant-design/icons-vue' import { FormOutlined, ShoppingCartOutlined } from '@ant-design/icons-vue'
import { defineProps, ref, watch } from 'vue' import { defineProps, ref, watch } from 'vue'
import { scInsert } from '@/api/personalCenter' import { scInsert } from '@/api/personalCenter'
// import { sgcInsert } from '@/api/home' import { sgcInsert } from '@/api/home'
// import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
// import mybus from '@/myplugins/mybus' import mybus from '@/myplugins/mybus'
import { message } from 'ant-design-vue' import { message } from 'ant-design-vue'
const props = defineProps({ const props = defineProps({
dataList: { type: Object, default: null }, dataList: { type: Object, default: null },
}) })
// const router = useRouter() const router = useRouter()
const applicationArea = ref('') const applicationArea = ref('')
// // //
// const addShoppingCart = () => { const addShoppingCart = () => {
// console.log('==================>', props.dataList) console.log('加入申购车==================>', props.dataList)
// sgcInsert({ sgcInsert({
// delFlag: '0', delFlag: '0',
// resourceId: props.dataList.id, resourceId: props.dataList.id,
// // userId: userId.value, // userId: userId.value,
// }).then((res) => { }).then((res) => {
// console.log(res) console.log(res)
// message.success('') message.success('添加申购车成功!')
// mybus.emit('getSgcNum') mybus.emit('getSgcNum')
// }) })
// } }
// // //
// function toView() { function toView() {
// // window.open(newpage.href, '_blank') // window.open(newpage.href, '_blank')
// router.push({ router.push({
// path: '/apply', path: '/apply',
// query: { query: {
// name: props.dataList.name, name: props.dataList.name,
// resourceId: [props.dataList.id], resourceId: [props.dataList.id],
// }, },
// }) })
// } }
// //
const goTOCollection = () => { const goTOCollection = () => {
console.log('收藏===================》', props.dataList) console.log('收藏===================》', props.dataList)

View File

@ -80,6 +80,16 @@
oInput.remove() // oInput.remove() //
message.success(name + '成功') message.success(name + '成功')
} }
message.config({
top: '100px', //
})
// const success = () => {
// message.success({
// // content: 'This is a prompt message with custom className and style',
// className: 'custom-class',
// style: {},
// })
// }
watch( watch(
() => props.dataList, () => props.dataList,
(val) => { (val) => {
@ -157,3 +167,8 @@
} }
} }
</style> </style>
<style>
.custom-class {
/* top: 100px; */
}
</style>

View File

@ -28,7 +28,8 @@
</div> </div>
<div class="content-right"> <div class="content-right">
<div class="content-right-title"> <div class="content-right-title">
{{ item.contact }}{{ item.facilitator.values }} <!-- {{ item.facilitator.values }} -->
{{ item.contact }}
</div> </div>
<div class="content-right-content"> <div class="content-right-content">
<p> <p>

View File

@ -16,7 +16,17 @@
<span>{{ val.resourceName }}</span> <span>{{ val.resourceName }}</span>
<span>{{ val.type }}</span> <span>{{ val.type }}</span>
</div> </div>
<div class="description">{{ val.description || '--' }}</div> <div class="description">
{{
val.description ||
(val.note1 &&
JSON.parse(val.note1)[0].channelName +
'等' +
JSON.parse(val.note1).length +
'个摄像头') ||
'--'
}}
</div>
<div class="remove" @click="removeFunction(val)"></div> <div class="remove" @click="removeFunction(val)"></div>
</div> </div>
</template> </template>
@ -48,7 +58,7 @@
// //
const removeFunction = (data) => { const removeFunction = (data) => {
dataForm.value.map((val) => { dataForm.value.map((val) => {
val.arr = val.arr.filter((item) => item.resourceId !== data.resourceId) val.arr = val.arr.filter((item) => item.id !== data.id)
}) })
dataForm.value = dataForm.value.filter((val) => val.arr.length !== 0) dataForm.value = dataForm.value.filter((val) => val.arr.length !== 0)
} }

View File

@ -1152,7 +1152,8 @@
}) })
mybus.on('changePage', (page) => { mybus.on('changePage', (page) => {
paramsGetResources.pageNum = page paramsGetResources.pageNum = page
getAppResources() console.log('changePage', paramsGetResources.pageNum)
getAppResources('分页查询')
console.log('paramsGetResources', paramsGetResources) console.log('paramsGetResources', paramsGetResources)
}) })
mybus.on('changeSelcted', () => { mybus.on('changeSelcted', () => {
@ -1246,11 +1247,11 @@
let newQuery = JSON.parse( let newQuery = JSON.parse(
JSON.stringify(router.currentRoute.value.query) JSON.stringify(router.currentRoute.value.query)
) )
if (Cardsname.value == name) { // if (Cardsname.value == name) {
Cardsname.value = '' // Cardsname.value = ''
} else { // } else {
Cardsname.value = name Cardsname.value = name
} // }
console.log( console.log(
'更改前url中的select=====================>', '更改前url中的select=====================>',
router.currentRoute.value.query.select router.currentRoute.value.query.select

View File

@ -84,7 +84,7 @@
<a-select <a-select
v-model:value="formName.applicationSystem" v-model:value="formName.applicationSystem"
show-search show-search
placeholder="请选择应用系统" placeholder="请输入关键字"
style="width: 200px" style="width: 200px"
:options="systemOptions" :options="systemOptions"
@focus="handleFocus" @focus="handleFocus"
@ -378,88 +378,58 @@
} }
let ids = [] let ids = []
formName.system = [] formName.system = []
console.log('list==================', list.value)
list.value.map((val) => { list.value.map((val) => {
val.arr.map((item) => { val.arr.map((item) => {
formName.system.push({ if (item.type !== '基础设施') {
resourceId: item.resourceId, formName.system.push({
resourceName: item.resourceName, resourceId: item.resourceId,
}) resourceName: item.resourceName,
console.log(item.id) })
ids.push(item.id) console.log(item.id)
ids.push(item.id)
} else {
let obj = {}
Object.assign(obj, formName)
console.log('摄像头===============>', obj, item)
obj.system = []
item.note1 = JSON.parse(item.note1)
item.note1.map((sxt) => {
obj.system.push({
resourceId: sxt.idtCameraChannel,
resourceName: sxt.channelName,
cameraId: sxt.channelId,
})
})
submitApply(obj).then((res) => {
applySuccess.value = false
console.log('摄像头申请================>', res)
if (item.id) {
sgcDel({ ids: [item.id] }).then((res) => {
if (res.data.msg === 'success') {
mybus.emit('getSgcNum')
}
})
}
})
}
}) })
}) })
console.log('提交数据==========================>', formName, ids) console.log('提交数据==========================>', formName, ids)
submitApply(formName).then((res) => { if (formName.system.length !== 0) {
applySuccess.value = false submitApply(formName).then((res) => {
message.success('操作成功!') applySuccess.value = false
console.log('能力申请================>', res) message.success('操作成功!')
if (ids) { console.log('能力申请================>', res)
sgcDel({ ids: ids }).then((res) => { if (ids) {
if (res.data.msg === 'success') { sgcDel({ ids: ids }).then((res) => {
mybus.emit('getSgcNum') if (res.data.msg === 'success') {
} mybus.emit('getSgcNum')
}) }
} })
}) }
// if (arr && arr.length !== 0) { })
// console.log('') }
// const obj = ref({})
// for (const key in formName) {
// if (key !== 'formNameSystem') {
// obj.value[key] = formName[key]
// }
// }
// submitApply(obj.value).then((res) => {
// applySuccess.value = false
// message.success('')
// console.log('================>', res)
// if (ids) {
// sgcDel({ ids: ids }).then((res) => {
// if (res.data.msg === 'success') {
// mybus.emit('getSgcNum')
// }
// })
// }
// })
// } else {
// lastestPage({
// key: dataForm.processDefinitionKey,
// })
// .then(({ data: res }) => {
// if (res.code !== 0) {
// return message.error(res.msg)
// }
// if (!res.data.list || res.data.list.length <= 0) {
// return message.error('')
// }
// // proxy.$http['post'](formUrl, rootObj[formName])
// tabilityapplication(formName)
// .then(({ data: res }) => {
// if (res.code !== 0) {
// message.error(res.msg)
// if (callbacks.formSaveErrorCallback) {
// callbacks.formSaveErrorCallback(res)
// }
// }
// if (callbacks.formSaveSuccessCallback) {
// callbacks.formSaveSuccessCallback(res)
// }
// if (!res.data.businessKey) {
// return message.error('KEY')
// // startProcess(dataForm.processDefinitionKey, null, rootObj[formName])
// } else {
// startProcess(
// dataForm.processDefinitionKey,
// res.data.businessKey
// // rootObj[formName]
// )
// }
// })
// .catch(() => {})
// })
// .catch(() => {})
// // })
// }
}) })
} }
} }

View File

@ -172,7 +172,7 @@
router.push({ router.push({
path: '/DetailsPageconetent', path: '/DetailsPageconetent',
query: { query: {
select: '', select: '组件服务',
}, },
}) })
break break
@ -197,7 +197,7 @@
}) })
break break
case '后台管理': case '后台管理':
window.open(window.SITE_CONFIG.backUrl + '/#/bscatalogue-bscatalogue') window.open(window.SITE_CONFIG.backUrl + '/#/login')
window.reload('http://15.2.21.238:9797') window.reload('http://15.2.21.238:9797')
break break
case '赋能案例': case '赋能案例':

View File

@ -157,15 +157,6 @@
v-if="item.isCollect == 'true'" v-if="item.isCollect == 'true'"
@click="addCollect(item)" @click="addCollect(item)"
></span> ></span>
<a-button
style="margin-left: 10px"
v-show="
cardType == '组件服务' &&
findComponentName(item, '智能算法')
"
>
免费试用
</a-button>
</div> </div>
<div <div
class="shopping pk" class="shopping pk"
@ -183,10 +174,24 @@
> >
查看详情 查看详情
</a-button> </a-button>
<a-button
style="margin-left: 10px"
v-show="
cardType == '组件服务' && findComponentName(item, '智能算法')
"
>
免费试用
</a-button>
<a-button <a-button
type="primary" type="primary"
@click="toView('apply', item)" @click="toView('apply', item)"
v-show="cardType !== '数据资源'" v-show="
cardType !== '数据资源' &&
!(
cardType == '组件服务' &&
findComponentName(item, '智能算法')
)
"
> >
{{ {{
item.shareCondition == '免批申请' ? '免批申请' : '立即申请' item.shareCondition == '免批申请' ? '免批申请' : '立即申请'

View File

@ -37,7 +37,7 @@
<i class="boundary"></i> <i class="boundary"></i>
<p> <p>
已选 已选
<span>{{ allClick.length }}</span> <span>{{ selectedRowKeys.length }}</span>
</p> </p>
</div> </div>
@ -86,7 +86,9 @@
@change="handleTableChange" @change="handleTableChange"
:row-selection="{ :row-selection="{
selectedRowKeys: selectedRowKeys, selectedRowKeys: selectedRowKeys,
onChange: onSelectChange, // onChange: onSelectChange,
onSelect: onSelectChange,
onSelectAll: onSelectAll,
}" }"
> >
<template #bodyCell="{ column, record }"> <template #bodyCell="{ column, record }">
@ -115,6 +117,7 @@
import VideoSurveillance from '@/views/home/videoSurveillance' import VideoSurveillance from '@/views/home/videoSurveillance'
import { getCategoryTreePage } from '@/api/personalCenter' import { getCategoryTreePage } from '@/api/personalCenter'
import { dataType } from 'element-plus/es/components/table-v2/src/common' import { dataType } from 'element-plus/es/components/table-v2/src/common'
import { useRouter } from 'vue-router'
import { ref, reactive, onMounted } from 'vue' import { ref, reactive, onMounted } from 'vue'
import { import {
getCameraByParentId, getCameraByParentId,
@ -124,6 +127,7 @@
import { sgcInsert } from '@/api/home' import { sgcInsert } from '@/api/home'
import { message } from 'ant-design-vue' import { message } from 'ant-design-vue'
import mybus from '@/myplugins/mybus' import mybus from '@/myplugins/mybus'
const router = useRouter()
const options = reactive({ const options = reactive({
width: '700px', // width: '700px', //
height: '400px', // height: '400px', //
@ -189,6 +193,7 @@
}) })
}) })
const selectedList = ref([]) const selectedList = ref([])
const selectedRowKeys = ref([])
const tabList = ref([ const tabList = ref([
{ {
title: '设施类型', title: '设施类型',
@ -317,8 +322,35 @@
getCamera() getCamera()
} }
// //
const dept = reactive({})
// eslint-disable-next-line no-undef
if (infrastructure) {
// eslint-disable-next-line no-undef
dept.deptId = infrastructure.deptId
// eslint-disable-next-line no-undef
dept.deptName = infrastructure.deptName
}
const apply = () => { const apply = () => {
console.log('一键申请') console.log('一键申请', selectedList.value)
let arr = [
{
arr: [
{
description: '',
note1: JSON.stringify(selectedList.value),
resourceId: '1522550195055828996',
resourceName: '摄像头列表',
type: '基础设施',
},
],
deptId: dept.deptId,
deptName: dept.deptName,
},
]
localStorage.setItem('applyList', JSON.stringify(arr))
router.push({
path: '/apply',
})
} }
// //
const addShopCar = () => { const addShopCar = () => {
@ -367,11 +399,59 @@
}, },
]) ])
const allClick = ref([]) const allClick = ref([])
const onSelectChange = (selectedRowKeys, selectedRows) => { const onSelectChange = (record, selected, selectedRows, nativeEvent) => {
console.log('hahhahah', selectedRowKeys, selectedRows) console.log('hahhahah', record, selected, selectedRows, nativeEvent)
selectedList.value = selectedRows if (selected) {
if (selectedRowKeys.value.length == 10) {
message.warning('最多只能添加10个摄像头')
} else {
selectedList.value.push(record)
selectedRowKeys.value.push(record.channelCode)
}
} else {
selectedList.value = selectedList.value.filter(
(item) => item.idtCameraChannel !== record.idtCameraChannel
)
selectedRowKeys.value.splice(
selectedRowKeys.value.indexOf(record.channelCode),
1
)
}
console.log('已选中======================>', selectedList.value)
// selectedList.value = selectedRows
// allClick.value = selectedRowKeys // allClick.value = selectedRowKeys
} }
const onSelectAll = (selected, selectedRows, changeRows) => {
if (selected) {
changeRows.map((val) => {
selectedList.value.push(val)
selectedRowKeys.value.push(val.channelCode)
})
if (selectedRowKeys.value.length > 10) {
message.warning('最多只能添加10个摄像头')
changeRows.map((val) => {
selectedList.value = selectedList.value.filter(
(item) => item.idtCameraChannel !== val.idtCameraChannel
)
selectedRowKeys.value.splice(
selectedRowKeys.value.indexOf(val.channelCode),
1
)
})
}
} else {
changeRows.map((val) => {
selectedList.value = selectedList.value.filter(
(item) => item.idtCameraChannel !== val.idtCameraChannel
)
selectedRowKeys.value.splice(
selectedRowKeys.value.indexOf(val.channelCode),
1
)
})
}
console.log('heiheiheiehiehei', selected, selectedRows, changeRows)
}
const handleTableChange = (val) => { const handleTableChange = (val) => {
pagination.value.current = val.current pagination.value.current = val.current
pagination.value.pageSize = val.pageSize pagination.value.pageSize = val.pageSize

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-06-21 11:55:07 * @Date: 2022-06-21 11:55:07
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-06-22 12:20:59 * @LastEditTime: 2022-06-30 18:18:57
* @Description: 告诉大家这是什么 * @Description: 告诉大家这是什么
--> -->
<template> <template>
@ -79,7 +79,7 @@
<a-list-item> <a-list-item>
<a-list-item-meta description=""> <a-list-item-meta description="">
<template #title> <template #title>
<div class="left"> <div class="left" @click="read(item)">
{{ item.content }} {{ item.content }}
</div> </div>
<div class="right">{{ '发布时间:' + item.senderDate }}</div> <div class="right">{{ '发布时间:' + item.senderDate }}</div>
@ -209,28 +209,44 @@
path: url, path: url,
}) })
} }
const read = () => { const read = (item) => {
// console.log(item)
if (selectData.value.length === 0) { if (selectData.value.length === 0) {
message.error('未选择消息!') message.error('未选择消息!')
return return
} }
console.log(selectData.value) console.log(selectData.value)
let str = '' // let str = ''
selectData.value.forEach((val, index) => { // selectData.value.forEach((val, index) => {
str += val // str += val
if (index < selectData.value.length - 1) { // if (index < selectData.value.length - 1) {
str += ';' // str += ';'
} // }
}) // })
mynoticeRead(str).then((res) => { if (item) {
if (res.data.code == 0) { mynoticeRead(item.id).then((res) => {
message.success('操作成功!') if (res.data.code == 0) {
mybus.emit('getMynotice') message.success('操作成功!')
init() mybus.emit('getMynotice')
} else { init()
message.error('操作失败!') } else {
} message.error('操作失败!')
}) }
})
} else {
console.log('提交')
selectData.value.map((val) => {
mynoticeRead(val).then((res) => {
if (res.data.code == 0) {
// message.success('')
mybus.emit('getMynotice')
init()
} else {
message.error('操作失败!')
}
})
})
}
} }
const init = () => { const init = () => {
// from readStatus 0 1 // from readStatus 0 1

View File

@ -38,10 +38,9 @@
class="name" class="name"
v-for="(item, index) in jcList" v-for="(item, index) in jcList"
:key="item.id" :key="item.id"
:class="index == 4 ? 'name-last' : ''" :class="index == 2 ? 'name-last' : ''"
@click="selectOne(item.id)"
> >
{{ index + 1 }}-{{ item.name }} {{ item.name + '-' + item.num + '项' }}
</div> </div>
<div class="btn" @click="jumpPage('基础设施')">查看更多</div> <div class="btn" @click="jumpPage('基础设施')">查看更多</div>
</div> </div>
@ -76,7 +75,11 @@
</div> </div>
</template> </template>
<script setup> <script setup>
import { pageWithAttrs, getDataResource } from '@/api/home.js' import {
pageWithAttrs,
getDataResource,
selectInfrastructureList,
} from '@/api/home.js'
import { ref, reactive } from 'vue' import { ref, reactive } from 'vue'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import { useStore } from 'vuex' import { useStore } from 'vuex'
@ -157,24 +160,36 @@
}) })
} else { } else {
let type = paramsGetResources.type let type = paramsGetResources.type
pageWithAttrs(paramsGetResources).then((res) => { if (type == '基础设施') {
console.log('object个数======>', type) selectInfrastructureList().then((res) => {
obj.value = res.data.data.records console.log('基础设施==========>', res.data.data)
switch (type) { for (const key in res.data.data) {
case '组件服务': jcList.value.push({
assignmentMethod('zjNum', res) name: key,
break num: res.data.data[key],
case '应用资源': })
assignmentMethod('yyNum', res) }
break })
case '基础设施': } else {
assignmentMethod('jcNum', res) pageWithAttrs(paramsGetResources).then((res) => {
break console.log('object个数======>', type)
case '知识库': obj.value = res.data.data.records
assignmentMethod('zsNum', res) switch (type) {
break case '组件服务':
} assignmentMethod('zjNum', res)
}) break
case '应用资源':
assignmentMethod('yyNum', res)
break
case '基础设施':
assignmentMethod('jcNum', res)
break
case '知识库':
assignmentMethod('zsNum', res)
break
}
})
}
} }
} }
const assignmentMethod = (type, res) => { const assignmentMethod = (type, res) => {

View File

@ -157,7 +157,7 @@
'数据资源', '数据资源',
'知识库', '知识库',
]) ])
const select = ref('') const select = ref('组件服务')
let applicationDataList = ref([]) let applicationDataList = ref([])
let technosphereDataList = ref([]) let technosphereDataList = ref([])
const fabubumen = ref([ const fabubumen = ref([
@ -219,11 +219,11 @@
appLiCation: '', appLiCation: '',
}) })
const changeCard = (name) => { const changeCard = (name) => {
if (select.value == name) { // if (select.value == name) {
select.value = '' // select.value = ''
} else { // } else {
select.value = name select.value = name
} // }
snum.value.select = select.value snum.value.select = select.value
} }
function selectCard(value) { function selectCard(value) {

View File

@ -16,7 +16,7 @@
> >
<span <span
class="img" class="img"
:class="sel == '访问量' ? 'fwl' : sel == '申购量' ? 'sgl' : 'scl'" :class="sel == '浏览量' ? 'fwl' : sel == '申购量' ? 'sgl' : 'scl'"
></span> ></span>
<span class="text">{{ sel }}</span> <span class="text">{{ sel }}</span>
</div> </div>
@ -32,7 +32,7 @@
<div class="img" :class="item.imgType"></div> <div class="img" :class="item.imgType"></div>
</div> </div>
<div class="item-right"> <div class="item-right">
<div class="fw" v-if="select == '访问量'"> <div class="fw" v-if="select == '浏览量'">
{{ select }}:{{ item.visits }} {{ select }}:{{ item.visits }}
</div> </div>
<div class="fw" v-if="select == '申购量'"> <div class="fw" v-if="select == '申购量'">
@ -63,8 +63,8 @@
import { useStore } from 'vuex' import { useStore } from 'vuex'
const store = useStore() const store = useStore()
const router = useRouter() const router = useRouter()
const select = ref('访问量') const select = ref('浏览量')
const selList = ref(['访问量', '申购量', '收藏量']) const selList = ref(['浏览量', '申购量', '收藏量'])
const list = ref([]) const list = ref([])
const paramsGetResources = { const paramsGetResources = {
@ -74,13 +74,13 @@
type: '', type: '',
name: '', name: '',
infoList: [], infoList: [],
orderField: 'visits', // total visits 访 applyCount score collectCount orderField: 'visits', // total visits applyCount score collectCount
orderType: 'DESC', // ASC DESC orderType: 'DESC', // ASC DESC
} }
const selectChange = (sel) => { const selectChange = (sel) => {
select.value = sel select.value = sel
switch (select.value) { switch (select.value) {
case '访问量': case '浏览量':
paramsGetResources.orderField = 'visits' paramsGetResources.orderField = 'visits'
break break
case '申购量': case '申购量':

View File

@ -146,9 +146,9 @@
'智能算法', '智能算法',
'图层服务', '图层服务',
'开发组件', '开发组件',
'办公组件', // '',
'业务组件', '业务组件',
'其他', // '',
]) ])
const visible = ref(false) const visible = ref(false)
const showModal = () => { const showModal = () => {

View File

@ -318,9 +318,9 @@
'智能算法', '智能算法',
'图层服务', '图层服务',
'开发组件', '开发组件',
'办公组件', // '',
'业务组件', '业务组件',
'其他', // '',
]) ])
let tabname = ref('组件服务') let tabname = ref('组件服务')
function tabqiehuan(item, index) { function tabqiehuan(item, index) {

View File

@ -4,7 +4,7 @@
<a-checkbox v-model:checked="checkAll" @change="onCheckAllChange"> <a-checkbox v-model:checked="checkAll" @change="onCheckAllChange">
全选 全选
</a-checkbox> </a-checkbox>
<div @click="reverseSelection" class="reverseSelection">反选</div> <!-- <div @click="reverseSelection" class="reverseSelection">反选</div> -->
<p> <p>
已选 已选
<span class="num">{{ checkedListAbility.length || 0 }}</span> <span class="num">{{ checkedListAbility.length || 0 }}</span>
@ -108,9 +108,7 @@
> >
<template #title> <template #title>
<span <span
@click=" @click="showItem(item.id, item.type, item.delFlag)"
showItem(item.resourceId, item.type, item.delFlag)
"
style="cursor: pointer" style="cursor: pointer"
class="name" class="name"
> >
@ -241,7 +239,7 @@
list.value.forEach((val) => { list.value.forEach((val) => {
if (checkedList.value.indexOf(val.deptId) !== -1) { if (checkedList.value.indexOf(val.deptId) !== -1) {
if (val.delFlag == 0) { if (val.delFlag == 0) {
scArr.push({ resourceId: val.resourceId }) scArr.push({ id: val.id })
} }
} }
}) })
@ -267,9 +265,9 @@
} }
if (val.children.length > 0) { if (val.children.length > 0) {
val.children.map((item) => { val.children.map((item) => {
if (checkedListAbility.value.indexOf(item.resourceId) == -1) { if (checkedListAbility.value.indexOf(item.id) == -1) {
checkedListAbility.value.push(item.resourceId) checkedListAbility.value.push(item.id)
val.checkedList.push(item.resourceId) val.checkedList.push(item.id)
checkNum.value++ checkNum.value++
} }
item.checked = true item.checked = true
@ -301,13 +299,13 @@
if (val.children.length > 0) { if (val.children.length > 0) {
val.children.map((item) => { val.children.map((item) => {
// console.log('child=============>', checkedListAbility.value, item) // console.log('child=============>', checkedListAbility.value, item)
if (checkedListAbility.value.indexOf(item.resourceId) > -1) { if (checkedListAbility.value.indexOf(item.id) > -1) {
item.checked = false item.checked = false
checkedListAbility.value.splice( checkedListAbility.value.splice(
checkedListAbility.value.indexOf(item.resourceId), checkedListAbility.value.indexOf(item.id),
1 1
) )
val.checkedList.splice(val.checkedList.indexOf(item.resourceId), 1) val.checkedList.splice(val.checkedList.indexOf(item.id), 1)
} }
}) })
} }
@ -347,8 +345,8 @@
if (val.children.length > 0) { if (val.children.length > 0) {
val.children.map((item) => { val.children.map((item) => {
item.checked = true item.checked = true
checkedListAbility.value.push(item.resourceId) checkedListAbility.value.push(item.id)
val.checkedList.push(item.resourceId) val.checkedList.push(item.id)
}) })
} }
arr.push(val.deptId) arr.push(val.deptId)
@ -446,23 +444,23 @@
item.checkAll == true || item.checkAll == true ||
checkedList.value.indexOf(item.deptId) > -1 checkedList.value.indexOf(item.deptId) > -1
) { ) {
if (checkedListAbility.value.indexOf(val.resourceId) == -1) { if (checkedListAbility.value.indexOf(val.id) == -1) {
checkedListAbility.value.push(val.resourceId) checkedListAbility.value.push(val.id)
item.checkedList.push(val.resourceId) item.checkedList.push(val.id)
} }
val.checked = true val.checked = true
checkNum.value++ checkNum.value++
} else if (checkedListAbility.value.indexOf(val.resourceId) == -1) { } else if (checkedListAbility.value.indexOf(val.id) == -1) {
val.checked = false val.checked = false
} }
} else { } else {
// console.log( // console.log(
// '++++++++++++++', // '++++++++++++++',
// checkedListAbility.value, // checkedListAbility.value,
// val.resourceId // val.id
// ) // )
if ( if (
checkedListAbility.value.indexOf(val.resourceId) > -1 || checkedListAbility.value.indexOf(val.id) > -1 ||
(item.load < Number(item.pageNum) && (item.load < Number(item.pageNum) &&
checkedListAll.value.indexOf(item.deptId) > -1) checkedListAll.value.indexOf(item.deptId) > -1)
) { ) {
@ -515,9 +513,9 @@
if (item.checked) { if (item.checked) {
if (item.children.length > 0) { if (item.children.length > 0) {
item.children.map((val) => { item.children.map((val) => {
if (checkedListAbility.value.indexOf(val.resourceId) == -1) { if (checkedListAbility.value.indexOf(val.id) == -1) {
checkedListAbility.value.push(val.resourceId) checkedListAbility.value.push(val.id)
item.checkedList.push(val.resourceId) item.checkedList.push(val.id)
} }
val.checked = true val.checked = true
}) })
@ -535,12 +533,12 @@
} else { } else {
if (item.children.length > 0) { if (item.children.length > 0) {
item.children.map((val) => { item.children.map((val) => {
if (checkedListAbility.value.indexOf(val.resourceId) > -1) { if (checkedListAbility.value.indexOf(val.id) > -1) {
checkedListAbility.value.splice( checkedListAbility.value.splice(
checkedListAbility.value.indexOf(val.resourceId), checkedListAbility.value.indexOf(val.id),
1 1
) )
item.checkedList.splice(item.checkedList.indexOf(val.resourceId), 1) item.checkedList.splice(item.checkedList.indexOf(val.id), 1)
val.checked = false val.checked = false
} }
}) })
@ -579,7 +577,7 @@
} else { } else {
let all = true let all = true
item.children.map((child) => { item.children.map((child) => {
if (checkedListAbility.value.indexOf(child.resourceId) == -1) { if (checkedListAbility.value.indexOf(child.id) == -1) {
all = false all = false
} }
}) })
@ -596,17 +594,17 @@
item.checked = !item.checked item.checked = !item.checked
if (item.checked) { if (item.checked) {
checkNum.value++ checkNum.value++
if (checkedListAbility.value.indexOf(item.resourceId) == -1) { if (checkedListAbility.value.indexOf(item.id) == -1) {
checkedListAbility.value.push(item.resourceId) checkedListAbility.value.push(item.id)
val.checkedList.push(item.resourceId) val.checkedList.push(item.id)
} }
} else { } else {
checkNum.value-- checkNum.value--
checkedListAbility.value.splice( checkedListAbility.value.splice(
checkedListAbility.value.indexOf(item.resourceId), checkedListAbility.value.indexOf(item.id),
1 1
) )
val.checkedList.splice(val.checkedList.indexOf(item.resourceId), 1) val.checkedList.splice(val.checkedList.indexOf(item.id), 1)
} }
// console.log('===============>', val, checkedListAll.value) // console.log('===============>', val, checkedListAll.value)
if (val.checkedList.length == val.count) { if (val.checkedList.length == val.count) {
@ -681,7 +679,7 @@
let arr = [] let arr = []
list.value.map((val) => { list.value.map((val) => {
val.arr = val.children.filter( val.arr = val.children.filter(
(item) => checkedListAbility.value.indexOf(item.resourceId) > -1 (item) => checkedListAbility.value.indexOf(item.id) > -1
) )
}) })
arr = list.value.filter((val) => val.arr.length !== 0) arr = list.value.filter((val) => val.arr.length !== 0)