|
|
@ -5,7 +5,7 @@
|
|
|
|
<div class="title">
|
|
|
|
<div class="title">
|
|
|
|
<div
|
|
|
|
<div
|
|
|
|
v-for="(item, index) in header"
|
|
|
|
v-for="(item, index) in header"
|
|
|
|
:style="headerTableStlye"
|
|
|
|
:style="[headerTableStlye,tableFiledWidth(index),tableRowHeight()]"
|
|
|
|
:key="index"
|
|
|
|
:key="index"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
{{ item.name }}
|
|
|
|
{{ item.name }}
|
|
|
@ -14,11 +14,11 @@
|
|
|
|
<!--数据-->
|
|
|
|
<!--数据-->
|
|
|
|
<div class="bd">
|
|
|
|
<div class="bd">
|
|
|
|
<ul class="infoList">
|
|
|
|
<ul class="infoList">
|
|
|
|
<li v-for="(item, index) in list" :key="index">
|
|
|
|
<li v-for="(item, index) in list" :key="index" :style="tableRowHeight()" >
|
|
|
|
<div
|
|
|
|
<div
|
|
|
|
v-for="(itemChild, idx) in header"
|
|
|
|
v-for="(itemChild, idx) in header"
|
|
|
|
:key="idx"
|
|
|
|
:key="idx"
|
|
|
|
:style="[bodyTableStyle, bodyTable(index)]"
|
|
|
|
:style="[bodyTableStyle, bodyTable(index),tableFiledWidth(idx),tableRowHeight()]"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
{{ item[itemChild.key] }}
|
|
|
|
{{ item[itemChild.key] }}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
@ -48,7 +48,8 @@ export default {
|
|
|
|
autoPage: true,
|
|
|
|
autoPage: true,
|
|
|
|
//effect: "top",
|
|
|
|
//effect: "top",
|
|
|
|
autoPlay: true,
|
|
|
|
autoPlay: true,
|
|
|
|
vis: 5
|
|
|
|
vis: 5,
|
|
|
|
|
|
|
|
rowHeight:'50px'
|
|
|
|
},
|
|
|
|
},
|
|
|
|
header: [],
|
|
|
|
header: [],
|
|
|
|
list: [],
|
|
|
|
list: [],
|
|
|
@ -172,15 +173,32 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 计算 奇偶背景色
|
|
|
|
// 计算 奇偶背景色
|
|
|
|
bodyTable(index) {
|
|
|
|
bodyTable(index) {
|
|
|
|
|
|
|
|
var styleJson = {};
|
|
|
|
if (index % 2) {
|
|
|
|
if (index % 2) {
|
|
|
|
return {
|
|
|
|
styleJson["background-color"] = this.optionsSetUp.eventColor
|
|
|
|
"background-color": this.optionsSetUp.eventColor
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
return {
|
|
|
|
styleJson["background-color"] = this.optionsSetUp.oldColor
|
|
|
|
"background-color": this.optionsSetUp.oldColor
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return styleJson;
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
tableRowHeight(){
|
|
|
|
|
|
|
|
var styleJson = {};
|
|
|
|
|
|
|
|
if(this.optionsSetUp.rowHeight){
|
|
|
|
|
|
|
|
styleJson['height'] = this.optionsSetUp.rowHeight+'px';
|
|
|
|
|
|
|
|
styleJson['line-height'] = this.optionsSetUp.rowHeight+'px';
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
styleJson['height'] =this.options.rowHeight
|
|
|
|
|
|
|
|
styleJson['line-height'] = this.optionsSetUp.rowHeight+'px';
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return styleJson;
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
tableFiledWidth(index){
|
|
|
|
|
|
|
|
var styleJson = {};
|
|
|
|
|
|
|
|
debugger
|
|
|
|
|
|
|
|
if(this.optionsSetUp.dynamicAddTable[index].width ){
|
|
|
|
|
|
|
|
styleJson["width"] = this.optionsSetUp.dynamicAddTable[index].width
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return styleJson
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|