|
@@ -8,14 +8,16 @@
|
|
|
'box-shadow': `${
|
|
|
curQue.isShadow ? '4px 4px 4px rgba(0, 0, 0, 0.3)' : ''
|
|
|
}`,
|
|
|
- border: `${curQue.marginHighlight ? '1.1px solid #949494' : ''}`
|
|
|
+ border: `${curQue.marginHighlight ? '1.1px solid #949494' : ''}`,
|
|
|
+ width: curQue.tableData.body.length > 5 ? width_total + 'px' : '',
|
|
|
+ fontSize: baseSizePhone + 2 + 'px'
|
|
|
}"
|
|
|
>
|
|
|
<colgroup>
|
|
|
<col
|
|
|
v-for="(col, i) in curQue.tableData.colsConfig.width"
|
|
|
:key="`col-${i}`"
|
|
|
- :style="{ width: `${col.val}px` }"
|
|
|
+ :style="{ width: `${col.val}px`, fontSize: baseSizePhone + 6 + 'px' }"
|
|
|
/>
|
|
|
</colgroup>
|
|
|
|
|
@@ -30,7 +32,11 @@
|
|
|
v-for="({ content }, i) in curQue.tableData.headers"
|
|
|
:key="`thead-${i}`"
|
|
|
:style="{
|
|
|
- 'background-color': `${curQue.headerBgColor}`
|
|
|
+ 'background-color':
|
|
|
+ `${curQue.headerBgColor}` === '#fff' ||
|
|
|
+ `${curQue.headerBgColor}` === '#ffffff'
|
|
|
+ ? 'transparent'
|
|
|
+ : `${curQue.headerBgColor}`
|
|
|
}"
|
|
|
>
|
|
|
<template v-for="({ text, colspan, rowspan }, j) in content">
|
|
@@ -70,7 +76,13 @@
|
|
|
: ''
|
|
|
: ''
|
|
|
]"
|
|
|
- :style="{ 'background-color': `${col.background}` }"
|
|
|
+ :style="{
|
|
|
+ 'background-color':
|
|
|
+ `${col.background}` === '#fff' ||
|
|
|
+ `${col.background}` === '#ffffff'
|
|
|
+ ? 'transparent'
|
|
|
+ : `${col.background}`
|
|
|
+ }"
|
|
|
>
|
|
|
<div
|
|
|
class="cell-wrap"
|
|
@@ -286,7 +298,7 @@
|
|
|
:fn_check_list="[]"
|
|
|
:py-number="col.pyNumber && col.pyNumber[sdIndex]"
|
|
|
:heng-leg="sdItem.hengLeg"
|
|
|
- :max-fontsize="sdItem.maxFontsize"
|
|
|
+ :max-fontsize="baseSizePhone"
|
|
|
/>
|
|
|
<template
|
|
|
v-if="
|
|
@@ -347,6 +359,9 @@ export default {
|
|
|
},
|
|
|
TaskModel: {
|
|
|
type: String
|
|
|
+ },
|
|
|
+ baseSizePhone: {
|
|
|
+ type: String
|
|
|
}
|
|
|
},
|
|
|
data() {
|
|
@@ -357,7 +372,8 @@ export default {
|
|
|
completeInput: []
|
|
|
},
|
|
|
userBookanswer: [],
|
|
|
- chsFhList: [",", "。", "”", ":", "》", "?", "!", ";"]
|
|
|
+ chsFhList: [",", "。", "”", ":", "》", "?", "!", ";"],
|
|
|
+ width_total: 0 //总宽度
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
@@ -516,6 +532,7 @@ export default {
|
|
|
},
|
|
|
// 计算单元格是否显示
|
|
|
computedTableCellShow() {
|
|
|
+ this.width_total = 0;
|
|
|
this.curQue.tableData.body.forEach(({ content }, i, arr) => {
|
|
|
content.forEach(({ colspan, rowspan, is_show_cell }, j, arr2) => {
|
|
|
let col = colspan === undefined ? 1 : Number(colspan);
|
|
@@ -545,6 +562,9 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
+ this.curQue.tableData.colsConfig.width.forEach(width => {
|
|
|
+ this.width_total += width.val;
|
|
|
+ });
|
|
|
},
|
|
|
handleData() {
|
|
|
let Bookanswer = [];
|
|
@@ -724,7 +744,8 @@ export default {
|
|
|
<style lang="scss" scoped>
|
|
|
.config-table {
|
|
|
width: 100%;
|
|
|
- margin-bottom: 16px;
|
|
|
+ overflow: auto;
|
|
|
+ // margin-bottom: 16px;
|
|
|
|
|
|
table {
|
|
|
table-layout: fixed;
|
|
@@ -796,6 +817,8 @@ export default {
|
|
|
.text-#{$type} {
|
|
|
::v-deep .el-textarea__inner {
|
|
|
text-align: $type;
|
|
|
+
|
|
|
+ background-color: transparent;
|
|
|
}
|
|
|
}
|
|
|
}
|