Commit 802605b4 authored by tianhongyang's avatar tianhongyang

fix

parent 23f27215
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
<template slot-scope="scope">{{pagingHandler(hasQueryParams,queryParams,scope)}}</template> <template slot-scope="scope">{{pagingHandler(hasQueryParams,queryParams,scope)}}</template>
</el-table-column> </el-table-column>
<template v-for="(item,index) in formColum"> <template v-for="(item,index) in formColum">
<!-- 自定义表头组件 不恒等false才展示当前列 -->
<template v-if="item.use !== false"> <template v-if="item.use !== false">
<!-- 复选框列 --> <!-- 复选框列 -->
<el-table-column v-if="item.type == 'selection'" type="selection" :key="item.uid ? item.uid : index" <el-table-column v-if="item.type == 'selection'" type="selection" :key="item.uid ? item.uid : index"
...@@ -24,33 +25,25 @@ ...@@ -24,33 +25,25 @@
:resizable="false"> :resizable="false">
<template slot-scope="scope">{{pagingHandler(hasQueryParams,queryParams,scope)}}</template> <template slot-scope="scope">{{pagingHandler(hasQueryParams,queryParams,scope)}}</template>
</el-table-column> </el-table-column>
<!-- 普通列 --> <!-- 正常列 -->
<el-table-column v-else :key="item.uid ? item.uid : index" :label="item.label" :prop="item.prop" :width="item.width" <el-table-column v-else :key="item.uid ? item.uid : index" :label="item.label" :prop="item.prop" :width="item.width"
:min-width="item.minWidth" :align="item.align?item.align:'left'" :fixed="item.fixed" :min-width="item.minWidth" :align="item.align?item.align:'left'" :fixed="item.fixed"
:sortable="item.sortable ?item.sortable=='custom'? 'custom':true : false" :resizable="false" :sortable="item.sortable ?item.sortable=='custom'? 'custom':true : false" :resizable="false"
:show-overflow-tooltip="item.showOverflowTooltip"> :show-overflow-tooltip="item.showOverflowTooltip">
<template v-if="item.children&&item.children.length"> <!-- 自定义表头 -->
<el-table-column v-for="(cld, i) in item.children" :key="i" :prop="cld.prop" :label="cld.label" :width="cld.width" :resizable="false"> <template v-if="item.slotHeader" slot="header">
<template slot-scope="cldscope">
<template v-if="cld.slot">
<slot :name="cld.prop" :row="cldscope.row" :data="cld"></slot>
</template>
<template v-else>
<span>{{cldscope.row[cld.prop] || '-'}}</span>
</template>
</template>
</el-table-column>
</template>
<template v-else-if="item.slotHeader" slot="header">
<slot :name="item.slotName"></slot> <slot :name="item.slotName"></slot>
</template> </template>
<!-- 非自定义表头 -->
<template slot-scope="scope"> <template slot-scope="scope">
<!-- 有自定义插槽 -->
<slot v-if="item.slot" :name="item.prop" :row="scope.row" :index="scope.$index" :data="item"></slot> <slot v-if="item.slot" :name="item.prop" :row="scope.row" :index="scope.$index" :data="item"></slot>
<!-- 操作栏 --> <!-- 操作栏 -->
<slot v-else-if="item.prop == 'action-field-bar'" name="action-field-bar" :row="scope.row" :index="scope.$index" :data="item"></slot> <slot v-else-if="item.prop == 'action-field-bar'" name="action-field-bar" :row="scope.row" :index="scope.$index" :data="item"></slot>
<span v-else> <!-- 没有插槽 -->
<div v-else>
{{ scope.row[item.prop] || '-' }} {{ scope.row[item.prop] || '-' }}
</span> </div>
</template> </template>
</el-table-column> </el-table-column>
</template> </template>
......
...@@ -38,9 +38,7 @@ ...@@ -38,9 +38,7 @@
<dsk-skeleton v-if="tableLoading"></dsk-skeleton> <dsk-skeleton v-if="tableLoading"></dsk-skeleton>
<table-list-com :tableData="tableDataList" :formColum="formColum" v-else-if="!tableLoading" :maxHeight="true" :tableDataTotal="total" <table-list-com :tableData="tableDataList" :formColum="formColum" v-else-if="!tableLoading" :maxHeight="true" :tableDataTotal="total"
:paging="false"> :paging="false">
<template slot="jhcb">
</template>
</table-list-com> </table-list-com>
</div> </div>
</div> </div>
...@@ -105,7 +103,7 @@ export default { ...@@ -105,7 +103,7 @@ export default {
total: 0, total: 0,
// 列表表头 // 列表表头
formColum: [ formColum: [
{ label: '序号', prop: "staticSerialNumber", type: "index", lock: true, width: "52", fixed: false, uid: v4() }, { label: '序号', prop: "staticSerialNumber", type: "index", lock: true, width: "53", fixed: false, uid: v4() },
{ label: '成本科目', prop: "cbSubjectName", width: "137", uid: v4() }, { label: '成本科目', prop: "cbSubjectName", width: "137", uid: v4() },
{ label: '公司编码', prop: "companyNo", width: "137", uid: v4() }, { label: '公司编码', prop: "companyNo", width: "137", uid: v4() },
{ label: '集团编码', prop: "orgNo", width: "137", uid: v4() }, { label: '集团编码', prop: "orgNo", width: "137", uid: v4() },
...@@ -114,7 +112,11 @@ export default { ...@@ -114,7 +112,11 @@ export default {
{ label: '计算规则', prop: "calculationRule", width: "137", uid: v4() }, { label: '计算规则', prop: "calculationRule", width: "137", uid: v4() },
{ label: '单位', prop: "unit", width: "57", uid: v4() }, { label: '单位', prop: "unit", width: "57", uid: v4() },
{ label: '甲供材料说明', prop: "materialDescription", width: "137", uid: v4() }, { label: '甲供材料说明', prop: "materialDescription", width: "137", uid: v4() },
{ label: '计划成本', prop: "jhcb", width: "137", align: "center", slot: true, uid: v4() }, {
label: '计划成本', prop: "jhcb", width: "809", align: "center", slot: true, uid: v4(), children: [
{ label: '指导价格', prop: "guidePrice", width: "81", uid: v4() }
]
},
], ],
// 已记录月份集合 // 已记录月份集合
monthList: [], monthList: [],
...@@ -234,8 +236,6 @@ export default { ...@@ -234,8 +236,6 @@ export default {
// 默认以当前月数据为准 若不包含当前月 需要手动push数据 // 默认以当前月数据为准 若不包含当前月 需要手动push数据
if (!data.includes(_now)) { if (!data.includes(_now)) {
data.push(_now); data.push(_now);
data.push("202401");
data.push("202312");
} }
this.monthList = data.map(item => { this.monthList = data.map(item => {
return { return {
...@@ -410,8 +410,19 @@ export default { ...@@ -410,8 +410,19 @@ export default {
height: 100%; height: 100%;
} }
.table-list-com-ins { ::v-deep .table-list-com-ins {
height: 100%; height: 100%;
.table-item {
.el-table {
th {
height: 80px;
}
.cell {
font-size: 14px;
font-weight: 350;
}
}
}
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment