Authored by 王涛

Merge branch 'master-500-dev-lushangqing' into 'master-500-dev'

表格分页组件增加空数据



See merge request !47
... ... @@ -5,7 +5,8 @@ const prodEnv = require('./prod.env')
module.exports = merge(prodEnv, {
NODE_ENV: '"development"',
BASE_API: '"http://192.168.0.75:9095"',
// MONITOR_GATEWAY: '"https://192.168.0.69:8080"'
MONITOR_GATEWAY: '"http://192.168.0.75:8080"'
// BASE_API: '"http://10.108.26.197:9095"'
// BASE_API: '"http://192.168.1.50:9095"',
// MONITOR_GATEWAY: '"http://192.168.1.50:8080"'
})
... ...
... ... @@ -21,7 +21,8 @@
size="small"
>编辑</el-button
>-->
<el-switch size="mini" @change="switchChange" v-model.trim="scope.row.isDisplay" />
{{scope.row.isDisplay}}
<el-switch active-value="1" inactive-value="2" size="mini" @change="switchChange" v-model.trim="scope.row.isDisplay" />
</div>
</template>
... ...
... ... @@ -323,14 +323,14 @@ export const monitorBasicInformationTwo = {
]
},
],
{
/*{
type: 'el-input-text',
label: '属性key',
name: 'attKey',
required: false,
placeholder: '请输入Key值,以逗号分割',
value: 'vmware,ipAddress,resPool,host,vMachine'
},
},*/
{
type: 'dynamic-detail-table-information',
label: '',
... ... @@ -339,10 +339,11 @@ export const monitorBasicInformationTwo = {
chartType:'detail-table',
placeholder: '',
value: [
{name: 'IP地址', key: 'ipAddress', width: '50%',isDisplay:true},
{name: '资源池', key: 'resPool', width: '50%',isDisplay:true},
{name: '宿主机', key: 'host', width: '50%',isDisplay:true},
{name: '虚拟机', key: 'vMachine', width: '50%',isDisplay:true},
{name: 'vmware-80.12.89.77', key: 'vmware', width: '50%',isDisplay:'1'},
{name: 'IP地址', key: 'ipAddress', width: '50%',isDisplay:'1'},
{name: '资源池', key: 'resPool', width: '50%',isDisplay:'1'},
{name: '宿主机', key: 'host', width: '50%',isDisplay:'1'},
{name: '虚拟机', key: 'vMachine', width: '50%',isDisplay:'1'},
]
}
],
... ...
... ... @@ -30,7 +30,7 @@ export const monitorProgressInformation = {
placeholder: '',
value: ''
},
{
/*{
type: 'el-switch',
label: '加边框',
name: 'isBorder',
... ... @@ -53,6 +53,14 @@ export const monitorProgressInformation = {
required: false,
placeholder: '',
value: 'rgba(151, 151, 151, 0.13)',
},*/
{
type: 'vue-color',
label: '每块背景颜色',
name: 'itemBackground',
required: false,
placeholder: '',
value: ''
},
{
type: 'el-select',
... ...
... ... @@ -62,28 +62,28 @@ export const monitorTreeShape = {
// placeholder: '',
// value: '18'
// },
// {
// type: 'vue-color',
// label: '字体颜色',
// name: 'titleColor',
// required: false,
// placeholder: '',
// value: '#666'
// },
// {
// type: 'el-select',
// label: '字体粗细',
// name: 'titleFontWeight',
// required: false,
// placeholder: '',
// selectOptions: [
// {code: 'normal', name: '正常'},
// {code: 'bold', name: '粗体'},
// {code: 'bolder', name: '特粗体'},
// {code: 'lighter', name: '细体'}
// ],
// value: 'normal'
// },
{
type: 'vue-color',
label: '字体颜色',
name: 'titleColor',
required: false,
placeholder: '',
value: '#666'
},
{
type: 'el-select',
label: '字体粗细',
name: 'titleFontWeight',
required: false,
placeholder: '',
selectOptions: [
{code: 'normal', name: '正常'},
{code: 'bold', name: '粗体'},
{code: 'bolder', name: '特粗体'},
{code: 'lighter', name: '细体'}
],
value: 'normal'
},
],
// 数据
... ... @@ -125,25 +125,28 @@ export const monitorTreeShape = {
relactiveDomValue: 'staticData',
value: [
{
label: 'Level one 1',
label: '核心征管',
id:1,
children: [
{
label: 'Level two 1-1',
label: '小型机分区',
id:"1-1",
children: [
{
label:'核心征管镜像库26',
id:'1-1-1'
}
],
},
{
label: 'Level three 1-2',
label: 'PC服务器',
id:'1-2',
children:[]
},
],
},
{
label: 'Level one 2',
label: '电子税务局',
id:2,
children: [
{
... ...
... ... @@ -12,7 +12,7 @@
</div>
<!-- <dynamicTableComponents :formData="dtInformationData"></dynamicTableComponents>-->
<div class="basic-ul-right" :style="borderStyleF" >
<div @mouseenter="mouseFun" @mouseleave="leaveFun">
<div @mouseenter="mouseFun" @mouseleave="leaveFun" v-if="informationData[0].isDisplay=='1'">
<el-row class="backColor">
<el-col class="padding-10" :style="[borderStlye,tableTitleStyle]" aria-colspan="2">
<a class="link-type" :style="tableTitleStyle" :href="jkAddress.jkUrl" target="_blank">{{informationData[0].name}}</a>
... ... @@ -21,7 +21,7 @@
</el-row>
</div>
<div class="basic-tbody basic-border-wrap" :style="wrapStyle">
<el-row class="basic-item" :style="itemStyle" v-if="item.isDisplay" v-for="(item,index) in informationData" :key="index">
<el-row class="basic-item" :style="itemStyle" v-if="item.isDisplay=='1' && index>0" v-for="(item,index) in informationData" :key="index">
<!-- <el-col :style="headStyle" v-if="attrKey.attrKeyVal.indexOf(item.code)>0 && index>0" class="basic-border basic-item-title basic-flex backColor" :span="10">-->
<el-col :style="[headStyle,borderStlye,lineHeightStyle]" v-if="index>0" class="basic-border basic-item-title basic-flex backColor" :span="10">
{{ item.name }}
... ... @@ -31,13 +31,12 @@
</el-col>
<!-- && attrKey.attrKeyVal.includes(item.code)-->
</el-row>
<el-row class="basic-item" :style="[itemStyle,borderStlyeLast]" v-if="informationData.length%2==0">
<!-- <el-row class="basic-item 111" :style="[itemStyle,borderStlyeLast]" v-if="dataLength==informationData.length && informationData.length%2==0">
<el-col class="basic-border basic-item-title basic-flex" :span="10">
</el-col>
<el-col class="basic-border basic-flex basic-item-content" :span="14"><span></span>
</el-col>
<!-- && attrKey.attrKeyVal.includes(item.code)-->
</el-row>
</el-row>-->
</div>
</div>
... ... @@ -72,6 +71,7 @@
optionsData: {},
informationData: [{name:'',code:''}],
informationDataAll: [],
dataLength:0,
tableDate: [],
pressingVisible: false,
pressingVisibleTip: false,
... ... @@ -254,6 +254,7 @@
this.optionsPosition = val.position;
this.optionsData = val.data;
this.handlerData();
// this.setDisplay();
},
deep: true
}
... ... @@ -287,10 +288,29 @@
},
handlerStaticData(data) {
this.informationDataAll = data;
this.setDisplay();
if (this.imgStyle.dataNum) {
this.informationData = this.informationDataAll.slice(0, this.imgStyle.dataNum);
if (this.informationDataAll && this.informationDataAll.length > 0) {
this.informationDataAll.map(item => {
if (typeof (item.value) != 'string') {
item.value = item.value[0].state;
}
item.isDisplay='1';
})
}
this.setDisplay();
this.dataLength=this.informationData.length;
console.log("this.dataLength",this.dataLength)
let addTableData=[];
this.informationDataAll.map((item,index)=>{
addTableData.push({
key:item.code,
name:item.name,
width:"50%",
isDisplay:item.isDisplay
})
})
this.$store.commit('CHANGW_HEAD_INFO', addTableData);
},
handlerDynamicData(data, refreshTime) {
if (!data) return;
... ... @@ -311,20 +331,24 @@
if (this.informationDataAll && this.informationDataAll.length > 0) {
this.informationDataAll.map(item => {
if (typeof (item.value) != 'string') {
item.value = item.value[0].state
item.value = item.value[0].state;
}
item.isDisplay='1';
})
}
this.setDisplay();
if (this.imgStyle.dataNum) {
this.informationData = this.informationDataAll.slice(0, this.imgStyle.dataNum);
}
this.dataLength=this.informationData.length;
let addTableData=[];
this.informationDataAll.map((item,index)=>{
addTableData.push({
key:item.code,
name:item.name,
width:"50%"
width:"50%",
isDisplay:item.isDisplay
})
})
this.$store.commit('CHANGW_HEAD_INFO', addTableData);
... ... @@ -342,13 +366,24 @@
//设置信息列表数据每一行是否显示
setDisplay() {
let head=this.optionsSetUp.dynamicAddTable;
let arr=[];
head.map(hv=>{
arr.push({
code:hv.key,
isDisplay:hv.isDisplay
})
})
this.informationDataAll.map(item=>{
head.map(hv=>{
arr.map(hv=>{
if(item.code==hv.key){
item.isDisplay=hv.isDisplay
item.isDisplay=hv.isDisplay;
}
})
})
if (this.imgStyle.dataNum) {
this.informationData = this.informationDataAll.slice(0, this.imgStyle.dataNum);
}
console.log(" this.informationData", this.informationData)
},
pressingTimes() {
this.pressingVisible = true;
... ...
<template>
<div :style="styleObj" class="flex-div">
<div :style="styleObj" class="flex-div" @click="goJump">
<div class="percent-title" :style="titleStyle">
<img :src="imgStyle.imageAdress" alt="" class="icon-title">
{{ optionsSetup.titleName }}
... ... @@ -412,6 +412,23 @@ export default {
this.percentData=res;
this.setPercentData()
});
},
goJump(){
let locationUrl=this.$route.query;
console.log("reportCode",locationUrl.second_router)
//二级路由传递给iframe父页面
/*let param={
type:'second_router',
data:{
reportCode: this.$route.query.second_router
}
}
window.parent.postMessage(param, '*')
*/
this.$router.push({
path: `/bigscreen/viewer`,
query: { reportCode: this.$route.query.second_router },
})
}
}
};
... ...
... ... @@ -68,8 +68,9 @@ export default {
itemStyle(){
return{
width:this.optionsSetup.flexFlow=='column'?'100%':'auto',
'border':this.optionsSetup.isBorder?'0.5px solid '+this.optionsSetup.borderColor:'none',
'box-shadow':this.optionsSetup.isShadow?'0px 3px 12px '+this.optionsSetup.borderColor:'none'
// 'border':this.optionsSetup.isBorder?'0.5px solid '+this.optionsSetup.borderColor:'none',
// 'box-shadow':this.optionsSetup.isShadow?'0px 3px 12px '+this.optionsSetup.borderColor:'none',
'background':this.optionsSetup.itemBackground
}
},
//标题样式设置
... ... @@ -195,12 +196,16 @@ export default {
text-align: left;
flex:1;
padding:10px 20px;
border:1px solid #ccc;
//border:1px solid #ccc;
display: flex;
flex-flow: column;
justify-content: space-around;
margin-bottom: 5px;
}
.progress-item:last-child{
margin-bottom: 0;
}
.progress-title-proposal{
margin-top:20px;
}
... ...
... ... @@ -157,8 +157,8 @@ export default {
rowHeight:'50px'
},
header: [],
list: [],
listAll: [],
list: [{},{},{},{},{}],
listAll: [{},{},{},{},{}],
optionsSetUp: {},
optionsPosition: {},
optionsData: {}
... ...