master
xy 2 years ago
parent fb755cbb07
commit 9b6c450c9b

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

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

Loading…
Cancel
Save