|
@@ -8,10 +8,7 @@
|
|
|
>
|
|
>
|
|
|
<thead>
|
|
<thead>
|
|
|
<tr height="40px">
|
|
<tr height="40px">
|
|
|
- <th
|
|
|
|
|
- width="50px"
|
|
|
|
|
- class="fixed-cell"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <th width="50px" class="fixed-cell">
|
|
|
<input
|
|
<input
|
|
|
autocomplete="off"
|
|
autocomplete="off"
|
|
|
:checked="allSelected"
|
|
:checked="allSelected"
|
|
@@ -44,11 +41,7 @@
|
|
|
</tr>
|
|
</tr>
|
|
|
</thead>
|
|
</thead>
|
|
|
<tbody>
|
|
<tbody>
|
|
|
- <tr
|
|
|
|
|
- v-for="rowData in dataList"
|
|
|
|
|
- :key="rowData.id"
|
|
|
|
|
- height="40px"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <tr v-for="rowData in dataList" :key="rowData.id" height="40px">
|
|
|
<td class="fixed-cell">
|
|
<td class="fixed-cell">
|
|
|
<input
|
|
<input
|
|
|
v-model="rowData.checked"
|
|
v-model="rowData.checked"
|
|
@@ -74,11 +67,21 @@
|
|
|
autocomplete="off"
|
|
autocomplete="off"
|
|
|
type="number"
|
|
type="number"
|
|
|
class="form-control"
|
|
class="form-control"
|
|
|
- :value="getDisplayValue(rowData,infoGridField)"
|
|
|
|
|
|
|
+ :value="getDisplayValue(rowData, infoGridField)"
|
|
|
@keyup="valueChange($event, rowData, infoGridField)"
|
|
@keyup="valueChange($event, rowData, infoGridField)"
|
|
|
/>
|
|
/>
|
|
|
- <span v-if="infoGridField.simpleDisplayType == null || infoGridField.simpleDisplayType == '' || infoGridField.simpleDisplayType == 'NONE'">
|
|
|
|
|
- {{ rowData.data[infoGridField.fieldName] == undefined ? "" : rowData.data[infoGridField.fieldName].displayValue[0] }}
|
|
|
|
|
|
|
+ <span
|
|
|
|
|
+ v-if="
|
|
|
|
|
+ infoGridField.simpleDisplayType == null ||
|
|
|
|
|
+ infoGridField.simpleDisplayType == '' ||
|
|
|
|
|
+ infoGridField.simpleDisplayType == 'NONE'
|
|
|
|
|
+ "
|
|
|
|
|
+ >
|
|
|
|
|
+ {{
|
|
|
|
|
+ rowData.data[infoGridField.fieldName] == undefined
|
|
|
|
|
+ ? ""
|
|
|
|
|
+ : rowData.data[infoGridField.fieldName].displayValue[0]
|
|
|
|
|
+ }}
|
|
|
</span>
|
|
</span>
|
|
|
</td>
|
|
</td>
|
|
|
</tr>
|
|
</tr>
|
|
@@ -86,16 +89,13 @@
|
|
|
</table>
|
|
</table>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
- <div
|
|
|
|
|
- class="flex-footer-1"
|
|
|
|
|
- style="margin-top: 10px;"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <div class="flex-footer-1" style="margin-top: 10px">
|
|
|
<div class="pull-left">
|
|
<div class="pull-left">
|
|
|
<span>
|
|
<span>
|
|
|
第
|
|
第
|
|
|
- {{ (pagination.current_page-1)*pagination.per_page+1 }}
|
|
|
|
|
|
|
+ {{ (pagination.current_page - 1) * pagination.per_page + 1 }}
|
|
|
-
|
|
-
|
|
|
- {{ pagination.current_page*pagination.per_page }}
|
|
|
|
|
|
|
+ {{ pagination.current_page * pagination.per_page }}
|
|
|
条,共计
|
|
条,共计
|
|
|
{{ pagination.total }}
|
|
{{ pagination.total }}
|
|
|
条,每页
|
|
条,每页
|
|
@@ -105,10 +105,7 @@
|
|
|
<span>条</span>
|
|
<span>条</span>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="pull-right">
|
|
<div class="pull-right">
|
|
|
- <Pagination
|
|
|
|
|
- :pagination="pagination"
|
|
|
|
|
- :callback="refreshSearch"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ <Pagination :pagination="pagination" :callback="refreshSearch" />
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -121,16 +118,14 @@ import Pagination from '../../vue-bootstrap-pagination/src/vue-bootstrap-paginat
|
|
|
import PageSizeSelect from '../../page-size-select/src/PageSizeSelect.vue';
|
|
import PageSizeSelect from '../../page-size-select/src/PageSizeSelect.vue';
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
-
|
|
|
|
|
components: {
|
|
components: {
|
|
|
Pagination,
|
|
Pagination,
|
|
|
PageSizeSelect,
|
|
PageSizeSelect,
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
-
|
|
|
|
|
props: {
|
|
props: {
|
|
|
// 查询窗口编号
|
|
// 查询窗口编号
|
|
|
- infoWindowNo : {
|
|
|
|
|
|
|
+ infoWindowNo: {
|
|
|
type: String,
|
|
type: String,
|
|
|
default: null,
|
|
default: null,
|
|
|
},
|
|
},
|
|
@@ -158,9 +153,9 @@ export default {
|
|
|
dataList: [],
|
|
dataList: [],
|
|
|
pagination: {
|
|
pagination: {
|
|
|
total: 0,
|
|
total: 0,
|
|
|
- per_page: Common.pageSize, // required
|
|
|
|
|
|
|
+ per_page: Common.pageSize, // required
|
|
|
current_page: 1, // required
|
|
current_page: 1, // required
|
|
|
- last_page: 10, // required
|
|
|
|
|
|
|
+ last_page: 10, // required
|
|
|
},
|
|
},
|
|
|
sortStyle: '',
|
|
sortStyle: '',
|
|
|
sortClause: '',
|
|
sortClause: '',
|
|
@@ -169,16 +164,18 @@ export default {
|
|
|
|
|
|
|
|
computed: {
|
|
computed: {
|
|
|
/**
|
|
/**
|
|
|
- * 自动计算表格的宽度
|
|
|
|
|
- * @author YangZhiJie 20210909
|
|
|
|
|
- */
|
|
|
|
|
|
|
+ * 自动计算表格的宽度
|
|
|
|
|
+ * @author YangZhiJie 20210909
|
|
|
|
|
+ */
|
|
|
tableWidth: function () {
|
|
tableWidth: function () {
|
|
|
var totalWidth = 50;
|
|
var totalWidth = 50;
|
|
|
if (this.infoGridFields !== undefined) {
|
|
if (this.infoGridFields !== undefined) {
|
|
|
this.infoGridFields.forEach(function (infoGridField) {
|
|
this.infoGridFields.forEach(function (infoGridField) {
|
|
|
- if (infoGridField.width !== undefined
|
|
|
|
|
- && infoGridField.width !== null
|
|
|
|
|
- && infoGridField.width !== '') {
|
|
|
|
|
|
|
+ if (
|
|
|
|
|
+ infoGridField.width !== undefined &&
|
|
|
|
|
+ infoGridField.width !== null &&
|
|
|
|
|
+ infoGridField.width !== ''
|
|
|
|
|
+ ) {
|
|
|
totalWidth += Number(infoGridField.width);
|
|
totalWidth += Number(infoGridField.width);
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
@@ -187,16 +184,24 @@ export default {
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 是否选择了全部的数据
|
|
|
|
|
- * @author YangZhiJie 20210909
|
|
|
|
|
- */
|
|
|
|
|
|
|
+ * 是否选择了全部的数据
|
|
|
|
|
+ * @author YangZhiJie 20210909
|
|
|
|
|
+ */
|
|
|
allSelected: function () {
|
|
allSelected: function () {
|
|
|
var _self = this;
|
|
var _self = this;
|
|
|
- if (this.dataList === undefined || this.dataList === null || this.dataList.length == 0) {
|
|
|
|
|
|
|
+ if (
|
|
|
|
|
+ this.dataList === undefined ||
|
|
|
|
|
+ this.dataList === null ||
|
|
|
|
|
+ this.dataList.length == 0
|
|
|
|
|
+ ) {
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- for (let index = 0, length = this.dataList.length; index < length; index++) {
|
|
|
|
|
|
|
+ for (
|
|
|
|
|
+ let index = 0, length = this.dataList.length;
|
|
|
|
|
+ index < length;
|
|
|
|
|
+ index++
|
|
|
|
|
+ ) {
|
|
|
if (this.dataList[index].checked === false) {
|
|
if (this.dataList[index].checked === false) {
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
@@ -207,21 +212,22 @@ export default {
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
watch: {
|
|
watch: {
|
|
|
-
|
|
|
|
|
infoWindowData: function (newValue, oldValue) {
|
|
infoWindowData: function (newValue, oldValue) {
|
|
|
this.setDataList(newValue);
|
|
this.setDataList(newValue);
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
dataList: {
|
|
dataList: {
|
|
|
- handler: function(newValue, oldValue){
|
|
|
|
|
|
|
+ handler: function (newValue, oldValue) {
|
|
|
// 清除延迟执行
|
|
// 清除延迟执行
|
|
|
- if(this.selectChangedTimeout !== undefined && this.selectChangedTimeout !== null){
|
|
|
|
|
|
|
+ if (
|
|
|
|
|
+ this.selectChangedTimeout !== undefined &&
|
|
|
|
|
+ this.selectChangedTimeout !== null
|
|
|
|
|
+ ) {
|
|
|
window.clearTimeout(this.selectChangedTimeout);
|
|
window.clearTimeout(this.selectChangedTimeout);
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
// 设置延迟执行
|
|
// 设置延迟执行
|
|
|
- this.selectChangedTimeout = setTimeout(()=>{
|
|
|
|
|
- console.log('selectChanged');
|
|
|
|
|
|
|
+ this.selectChangedTimeout = setTimeout(() => {
|
|
|
this.$emit('selectChanged', this.dataList);
|
|
this.$emit('selectChanged', this.dataList);
|
|
|
}, 500);
|
|
}, 500);
|
|
|
},
|
|
},
|
|
@@ -231,10 +237,10 @@ export default {
|
|
|
|
|
|
|
|
methods: {
|
|
methods: {
|
|
|
/**
|
|
/**
|
|
|
- * 重新设置分页
|
|
|
|
|
- * 供外部组件调用
|
|
|
|
|
- * @author YangZhiJie 20210909
|
|
|
|
|
- */
|
|
|
|
|
|
|
+ * 重新设置分页
|
|
|
|
|
+ * 供外部组件调用
|
|
|
|
|
+ * @author YangZhiJie 20210909
|
|
|
|
|
+ */
|
|
|
resetPagination: function () {
|
|
resetPagination: function () {
|
|
|
this.pagination.current_page = 1;
|
|
this.pagination.current_page = 1;
|
|
|
this.pagination.last_page = 10;
|
|
this.pagination.last_page = 10;
|
|
@@ -242,19 +248,19 @@ export default {
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 设置分页
|
|
|
|
|
- * @author YangZhiJie 20210909
|
|
|
|
|
- */
|
|
|
|
|
|
|
+ * 设置分页
|
|
|
|
|
+ * @author YangZhiJie 20210909
|
|
|
|
|
+ */
|
|
|
setPagination: function (total, lastPage) {
|
|
setPagination: function (total, lastPage) {
|
|
|
this.pagination.last_page = lastPage;
|
|
this.pagination.last_page = lastPage;
|
|
|
this.pagination.total = total;
|
|
this.pagination.total = total;
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 获取查询参数
|
|
|
|
|
- * 供外部组件调用
|
|
|
|
|
- * @author YangZhiJie 20210909
|
|
|
|
|
- */
|
|
|
|
|
|
|
+ * 获取查询参数
|
|
|
|
|
+ * 供外部组件调用
|
|
|
|
|
+ * @author YangZhiJie 20210909
|
|
|
|
|
+ */
|
|
|
getQueryParam: function () {
|
|
getQueryParam: function () {
|
|
|
return {
|
|
return {
|
|
|
infoWindowNo: this.infoWindowNo,
|
|
infoWindowNo: this.infoWindowNo,
|
|
@@ -265,18 +271,18 @@ export default {
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 页码数量改变
|
|
|
|
|
- * @author YangZhiJie 20210909
|
|
|
|
|
- */
|
|
|
|
|
|
|
+ * 页码数量改变
|
|
|
|
|
+ * @author YangZhiJie 20210909
|
|
|
|
|
+ */
|
|
|
gridSizeSelect: function (newPageSize) {
|
|
gridSizeSelect: function (newPageSize) {
|
|
|
this.pagination.per_page = newPageSize;
|
|
this.pagination.per_page = newPageSize;
|
|
|
this.pagination.current_page = 1;
|
|
this.pagination.current_page = 1;
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 列开始拖动
|
|
|
|
|
- * @author YangZhiJie 20210909
|
|
|
|
|
- */
|
|
|
|
|
|
|
+ * 列开始拖动
|
|
|
|
|
+ * @author YangZhiJie 20210909
|
|
|
|
|
+ */
|
|
|
ondragstart: function (event, gridFieldItem) {
|
|
ondragstart: function (event, gridFieldItem) {
|
|
|
var _self = this;
|
|
var _self = this;
|
|
|
_self.startX = event.pageX;
|
|
_self.startX = event.pageX;
|
|
@@ -286,19 +292,18 @@ export default {
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 列拖动
|
|
|
|
|
- * @author YangZhiJie 20210909
|
|
|
|
|
- */
|
|
|
|
|
|
|
+ * 列拖动
|
|
|
|
|
+ * @author YangZhiJie 20210909
|
|
|
|
|
+ */
|
|
|
ondrag: function (event, gridFieldItem) {
|
|
ondrag: function (event, gridFieldItem) {
|
|
|
var _self = this;
|
|
var _self = this;
|
|
|
gridFieldItem.width = _self.startWidth + (event.pageX - _self.startX);
|
|
gridFieldItem.width = _self.startWidth + (event.pageX - _self.startX);
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
-
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 列结束拖动
|
|
|
|
|
- * @author YangZhiJie 20210909
|
|
|
|
|
- */
|
|
|
|
|
|
|
+ * 列结束拖动
|
|
|
|
|
+ * @author YangZhiJie 20210909
|
|
|
|
|
+ */
|
|
|
ondragend: function (event, gridFieldItem, index) {
|
|
ondragend: function (event, gridFieldItem, index) {
|
|
|
var _self = this;
|
|
var _self = this;
|
|
|
|
|
|
|
@@ -310,7 +315,6 @@ export default {
|
|
|
|
|
|
|
|
//gridFieldItem.width = gridFieldItemClone.width;
|
|
//gridFieldItem.width = gridFieldItemClone.width;
|
|
|
InfoUtil.saveInfoGridFields(_self.infoWindowDto.no, _self.infoGridFields);
|
|
InfoUtil.saveInfoGridFields(_self.infoWindowDto.no, _self.infoGridFields);
|
|
|
-
|
|
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
ondragover: function (event, gridFieldItem) {
|
|
ondragover: function (event, gridFieldItem) {
|
|
@@ -319,13 +323,16 @@ export default {
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 排序
|
|
|
|
|
- * @author YangZhiJie 20210909
|
|
|
|
|
- */
|
|
|
|
|
|
|
+ * 排序
|
|
|
|
|
+ * @author YangZhiJie 20210909
|
|
|
|
|
+ */
|
|
|
onSort: function (infoGridField) {
|
|
onSort: function (infoGridField) {
|
|
|
var _self = this;
|
|
var _self = this;
|
|
|
var fieldName = null;
|
|
var fieldName = null;
|
|
|
- if (infoGridField.sortFieldName != undefined && infoGridField.sortFieldName != '') {
|
|
|
|
|
|
|
+ if (
|
|
|
|
|
+ infoGridField.sortFieldName != undefined &&
|
|
|
|
|
+ infoGridField.sortFieldName != ''
|
|
|
|
|
+ ) {
|
|
|
fieldName = infoGridField.sortFieldName;
|
|
fieldName = infoGridField.sortFieldName;
|
|
|
} else {
|
|
} else {
|
|
|
fieldName = infoGridField.fieldName;
|
|
fieldName = infoGridField.fieldName;
|
|
@@ -334,21 +341,21 @@ export default {
|
|
|
|
|
|
|
|
this.$emit('refreshSearch');
|
|
this.$emit('refreshSearch');
|
|
|
|
|
|
|
|
- _self.sortStyle = ((_self.sortStyle === ' ASC') ? ' DESC' : ' ASC');
|
|
|
|
|
|
|
+ _self.sortStyle = _self.sortStyle === ' ASC' ? ' DESC' : ' ASC';
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 发送查询请求
|
|
|
|
|
- * @author YangZhiJie 20210909
|
|
|
|
|
- */
|
|
|
|
|
- refreshSearch: function(){
|
|
|
|
|
|
|
+ * 发送查询请求
|
|
|
|
|
+ * @author YangZhiJie 20210909
|
|
|
|
|
+ */
|
|
|
|
|
+ refreshSearch: function () {
|
|
|
this.$emit('refreshSearch');
|
|
this.$emit('refreshSearch');
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 冻结表头
|
|
|
|
|
- * @author YangZhiJie 20210909
|
|
|
|
|
- */
|
|
|
|
|
|
|
+ * 冻结表头
|
|
|
|
|
+ * @author YangZhiJie 20210909
|
|
|
|
|
+ */
|
|
|
fixedTableHeader: function () {
|
|
fixedTableHeader: function () {
|
|
|
let _self = this;
|
|
let _self = this;
|
|
|
_self.$nextTick(function () {
|
|
_self.$nextTick(function () {
|
|
@@ -361,11 +368,10 @@ export default {
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
-
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 表格中填写的值发生了改变
|
|
|
|
|
- * @author YangZhiJie 20210909
|
|
|
|
|
- */
|
|
|
|
|
|
|
+ * 表格中填写的值发生了改变
|
|
|
|
|
+ * @author YangZhiJie 20210909
|
|
|
|
|
+ */
|
|
|
valueChange: function (event, rowData, infoGridField) {
|
|
valueChange: function (event, rowData, infoGridField) {
|
|
|
var _self = this;
|
|
var _self = this;
|
|
|
var value = event.target.value;
|
|
var value = event.target.value;
|
|
@@ -374,17 +380,17 @@ export default {
|
|
|
var tempFieldValue = {
|
|
var tempFieldValue = {
|
|
|
displayValue: [value],
|
|
displayValue: [value],
|
|
|
};
|
|
};
|
|
|
- rowData.data[fieldName]=tempFieldValue;
|
|
|
|
|
|
|
+ rowData.data[fieldName] = tempFieldValue;
|
|
|
} else {
|
|
} else {
|
|
|
- rowData.data[fieldName].displayValue[0]=value;
|
|
|
|
|
|
|
+ rowData.data[fieldName].displayValue[0] = value;
|
|
|
}
|
|
}
|
|
|
rowData.checked = true;
|
|
rowData.checked = true;
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 获取显示的值
|
|
|
|
|
- * @author YangZhiJie 20210909
|
|
|
|
|
- */
|
|
|
|
|
|
|
+ * 获取显示的值
|
|
|
|
|
+ * @author YangZhiJie 20210909
|
|
|
|
|
+ */
|
|
|
getDisplayValue(rowData, infoGridField) {
|
|
getDisplayValue(rowData, infoGridField) {
|
|
|
let fieldValue = rowData.data[infoGridField.fieldName];
|
|
let fieldValue = rowData.data[infoGridField.fieldName];
|
|
|
if (fieldValue === undefined || fieldValue === null) {
|
|
if (fieldValue === undefined || fieldValue === null) {
|
|
@@ -394,27 +400,34 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
-
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 选择所有/取消选择的数据
|
|
|
|
|
- * @author YangZhiJie 20210909
|
|
|
|
|
- */
|
|
|
|
|
|
|
+ * 选择所有/取消选择的数据
|
|
|
|
|
+ * @author YangZhiJie 20210909
|
|
|
|
|
+ */
|
|
|
selectAll: function (event) {
|
|
selectAll: function (event) {
|
|
|
var isChecked = event.currentTarget.checked;
|
|
var isChecked = event.currentTarget.checked;
|
|
|
|
|
|
|
|
- if (this.dataList === undefined || this.dataList === null || this.dataList.length == 0) {
|
|
|
|
|
|
|
+ if (
|
|
|
|
|
+ this.dataList === undefined ||
|
|
|
|
|
+ this.dataList === null ||
|
|
|
|
|
+ this.dataList.length == 0
|
|
|
|
|
+ ) {
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- for (let index = 0, length = this.dataList.length; index < length; index++) {
|
|
|
|
|
|
|
+ for (
|
|
|
|
|
+ let index = 0, length = this.dataList.length;
|
|
|
|
|
+ index < length;
|
|
|
|
|
+ index++
|
|
|
|
|
+ ) {
|
|
|
this.dataList[index].checked = isChecked;
|
|
this.dataList[index].checked = isChecked;
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 设置dataList数据
|
|
|
|
|
- * @author YangZhiJie 20210908
|
|
|
|
|
- */
|
|
|
|
|
|
|
+ * 设置dataList数据
|
|
|
|
|
+ * @author YangZhiJie 20210908
|
|
|
|
|
+ */
|
|
|
setDataList: function (dataList) {
|
|
setDataList: function (dataList) {
|
|
|
let _self = this;
|
|
let _self = this;
|
|
|
if (dataList === null || dataList === undefined) {
|
|
if (dataList === null || dataList === undefined) {
|
|
@@ -428,17 +441,23 @@ export default {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const tempDataList = JSON.parse(JSON.stringify(dataList));
|
|
const tempDataList = JSON.parse(JSON.stringify(dataList));
|
|
|
- for (let index = 0, length = tempDataList.length; index < length; index++) {
|
|
|
|
|
- if(this.isSelectedById != null){
|
|
|
|
|
- tempDataList[index].checked = this.isSelectedById(tempDataList[index].id);
|
|
|
|
|
- }else{
|
|
|
|
|
|
|
+ for (
|
|
|
|
|
+ let index = 0, length = tempDataList.length;
|
|
|
|
|
+ index < length;
|
|
|
|
|
+ index++
|
|
|
|
|
+ ) {
|
|
|
|
|
+ if (this.isSelectedById != null) {
|
|
|
|
|
+ tempDataList[index].checked = this.isSelectedById(
|
|
|
|
|
+ tempDataList[index].id,
|
|
|
|
|
+ );
|
|
|
|
|
+ } else {
|
|
|
tempDataList[index].checked = false;
|
|
tempDataList[index].checked = false;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
this.dataList = tempDataList;
|
|
this.dataList = tempDataList;
|
|
|
|
|
|
|
|
- this.$nextTick(function(){
|
|
|
|
|
|
|
+ this.$nextTick(function () {
|
|
|
_self.fixedTableHeader();
|
|
_self.fixedTableHeader();
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
@@ -448,76 +467,76 @@ export default {
|
|
|
|
|
|
|
|
<style scoped>
|
|
<style scoped>
|
|
|
.flex-container-1 {
|
|
.flex-container-1 {
|
|
|
- display: flex;
|
|
|
|
|
- flex-direction: column;
|
|
|
|
|
- width: 100%;
|
|
|
|
|
- height: calc(100% - 10px);
|
|
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ flex-direction: column;
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ height: calc(100% - 10px);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.flex-content-1 {
|
|
.flex-content-1 {
|
|
|
- flex: 1;
|
|
|
|
|
- overflow: auto;
|
|
|
|
|
- width: 100%;
|
|
|
|
|
- margin-top: 5px;
|
|
|
|
|
|
|
+ flex: 1;
|
|
|
|
|
+ overflow: auto;
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ margin-top: 5px;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.flex-footer-1 {
|
|
.flex-footer-1 {
|
|
|
- height: 35px;
|
|
|
|
|
- /*放大缩小比例为0 */
|
|
|
|
|
- flex: 0 0 35px;
|
|
|
|
|
|
|
+ height: 35px;
|
|
|
|
|
+ /*放大缩小比例为0 */
|
|
|
|
|
+ flex: 0 0 35px;
|
|
|
}
|
|
}
|
|
|
</style>
|
|
</style>
|
|
|
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
|
<style scoped>
|
|
|
.fixed-table {
|
|
.fixed-table {
|
|
|
- table-layout: fixed;
|
|
|
|
|
|
|
+ table-layout: fixed;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
table.fixed-table th {
|
|
table.fixed-table th {
|
|
|
- position: relative;
|
|
|
|
|
- min-width: 10px;
|
|
|
|
|
|
|
+ position: relative;
|
|
|
|
|
+ min-width: 10px;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
table.fixed-table tr td:first-child,
|
|
table.fixed-table tr td:first-child,
|
|
|
table.fixed-table tr th:first-child {
|
|
table.fixed-table tr th:first-child {
|
|
|
- text-align: center;
|
|
|
|
|
|
|
+ text-align: center;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
table.fixed-table th,
|
|
table.fixed-table th,
|
|
|
table.fixed-table td {
|
|
table.fixed-table td {
|
|
|
- text-align: left;
|
|
|
|
|
- overflow: hidden;
|
|
|
|
|
- white-space: nowrap;
|
|
|
|
|
- text-overflow: ellipsis;
|
|
|
|
|
- padding: 0.1em;
|
|
|
|
|
- border-right: 1px solid rgba(0, 0, 0, 0.05);
|
|
|
|
|
- background-color: white;
|
|
|
|
|
|
|
+ text-align: left;
|
|
|
|
|
+ overflow: hidden;
|
|
|
|
|
+ white-space: nowrap;
|
|
|
|
|
+ text-overflow: ellipsis;
|
|
|
|
|
+ padding: 0.1em;
|
|
|
|
|
+ border-right: 1px solid rgba(0, 0, 0, 0.05);
|
|
|
|
|
+ background-color: white;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
table.fixed-table th .rz-handle {
|
|
table.fixed-table th .rz-handle {
|
|
|
- width: 10px;
|
|
|
|
|
- height: 100%;
|
|
|
|
|
- position: absolute;
|
|
|
|
|
- top: 0;
|
|
|
|
|
- right: 0;
|
|
|
|
|
- background: repeating-linear-gradient(
|
|
|
|
|
- 45deg,
|
|
|
|
|
- transparent,
|
|
|
|
|
- transparent 2px,
|
|
|
|
|
- rgba(0, 0, 0, 0.05) 2px,
|
|
|
|
|
- rgba(0, 0, 0, 0.05) 4px
|
|
|
|
|
- );
|
|
|
|
|
- cursor: ew-resize !important;
|
|
|
|
|
|
|
+ width: 10px;
|
|
|
|
|
+ height: 100%;
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ top: 0;
|
|
|
|
|
+ right: 0;
|
|
|
|
|
+ background: repeating-linear-gradient(
|
|
|
|
|
+ 45deg,
|
|
|
|
|
+ transparent,
|
|
|
|
|
+ transparent 2px,
|
|
|
|
|
+ rgba(0, 0, 0, 0.05) 2px,
|
|
|
|
|
+ rgba(0, 0, 0, 0.05) 4px
|
|
|
|
|
+ );
|
|
|
|
|
+ cursor: ew-resize !important;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
table.fixed-table th .rz-handle.rz-handle-active {
|
|
table.fixed-table th .rz-handle.rz-handle-active {
|
|
|
- border-right: 2px solid #000;
|
|
|
|
|
- transform: scaleX(100);
|
|
|
|
|
- background: rgba(0, 0, 0, 0.05) 2px;
|
|
|
|
|
|
|
+ border-right: 2px solid #000;
|
|
|
|
|
+ transform: scaleX(100);
|
|
|
|
|
+ background: rgba(0, 0, 0, 0.05) 2px;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.rz-handle:hover {
|
|
.rz-handle:hover {
|
|
|
- background: rgba(0, 0, 0, 0.2) 4px;
|
|
|
|
|
|
|
+ background: rgba(0, 0, 0, 0.2) 4px;
|
|
|
}
|
|
}
|
|
|
</style>
|
|
</style>
|