master
xy 2 years ago
parent fb755cbb07
commit 9b6c450c9b

@ -107,19 +107,20 @@
:min-width="item.minWidth" :min-width="item.minWidth"
:fixed="item.fixed" :fixed="item.fixed"
:align="item.align" :align="item.align"
:formatter="item.formatter"
> >
<template slot-scope="scope"> <!-- <template slot-scope="scope">-->
<span v-if="item.formatter"> <!-- <span v-if="item.formatter">-->
{{ item.formatter(scope.row, scope.row, scope.row[item.prop]) }} <!-- {{ item.formatter(scope.row, scope.row, scope.row[item.prop]) }}-->
</span> <!-- </span>-->
<span v-else> <!-- <span v-else>-->
{{ <!-- {{-->
item.prop.indexOf(".") > -1 <!-- item.prop.indexOf(".") > -1-->
? scope.row[item.prop.split(".")[0]][item.prop.split(".")[1]] <!-- ? scope.row[item.prop.split(".")[0]][item.prop.split(".")[1]]-->
: scope.row[item.prop] <!-- : scope.row[item.prop]-->
}} <!-- }}-->
</span> <!-- </span>-->
</template> <!-- </template>-->
</el-table-column> </el-table-column>
<el-table-column <el-table-column
fixed="right" fixed="right"
@ -773,8 +774,8 @@ export default {
fixed: "left", fixed: "left",
}, },
{ {
prop: 'type_detail.value',
label: "预算类型", label: "预算类型",
prop: "type_detail.value",
width: 115, width: 115,
}, },
{ {

@ -14,9 +14,19 @@
预算类型 预算类型
</span> </span>
<span> <span>
<Select placeholder="选择预算类型" v-model="select.type" style="width:130px;" clearable> <el-cascader
<Option v-for="item in types" :value="item.id" :key="item.id">{{ item.value }}</Option> :options="types"
</Select> :props="{
checkStrictly: false,
label: 'name',
value: 'id',
}"
:value="select.type"
clearable
size="small"
style="width: 300px"
@change="(e) => (select.type = e[e.length - 1] || '')"
/>
</span> </span>
<span style="padding: 0 6px;"> <span style="padding: 0 6px;">
@ -134,14 +144,8 @@
}, },
{ {
label: "预算类型", label: "预算类型",
prop: 'type', prop: 'type_detail.value',
width: 115, width: 115,
formatter: (cell, data, value) => {
let res = this.types.filter(item => {
return item.id === value
})
return res[0]?.value || '未知'
}
}, },
{ {
label: "所属年份", label: "所属年份",

Loading…
Cancel
Save