|
|
@ -42,8 +42,12 @@ |
|
|
:min-width="item.columnWidth" |
|
|
:min-width="item.columnWidth" |
|
|
:label="item.columnLabel"> |
|
|
:label="item.columnLabel"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<!-- 仅 editAble 且整页处于编辑态时才出现控件;否则只读展示 - rqrq --> |
|
|
|
|
|
<template v-if="editMode && item.editAble"> |
|
|
|
|
|
|
|
|
<!-- 编辑态:customEditColumnProps 中的列走「自定义」分支,其余走默认 select/num/text - rqrq --> |
|
|
|
|
|
<template v-if="editMode && item.editAble && (1!=1)"> |
|
|
|
|
|
<!-- rqrq 自定义编辑:在下面增加 <template v-if="item.columnProp === 'xxx'">...</template>,变更后 onCellChange(scope.row) --> |
|
|
|
|
|
<span style="color: #c0c4cc">—</span> |
|
|
|
|
|
</template> |
|
|
|
|
|
<template v-else-if="editMode && item.editAble"> |
|
|
<el-select |
|
|
<el-select |
|
|
v-if="item.editType === 'select'" |
|
|
v-if="item.editType === 'select'" |
|
|
v-model="scope.row[item.columnProp]" |
|
|
v-model="scope.row[item.columnProp]" |
|
|
@ -156,6 +160,11 @@ export default { |
|
|
data () { |
|
|
data () { |
|
|
return { |
|
|
return { |
|
|
masterRows: [], |
|
|
masterRows: [], |
|
|
|
|
|
/** |
|
|
|
|
|
* 需要单独写编辑 UI 的 columnProp 填在这里,才会走模板里「自定义」分支;不在此数组的仍用默认 select/num/text - rqrq |
|
|
|
|
|
* 示例:['mPlanner', 'comments'] |
|
|
|
|
|
*/ |
|
|
|
|
|
customEditColumnProps: [], |
|
|
// 各列下拉:select 列通过 selectOptionsKey 指向此处;也可在列定义里写 selectOptions 数组 - rqrq |
|
|
// 各列下拉:select 列通过 selectOptionsKey 指向此处;也可在列定义里写 selectOptions 数组 - rqrq |
|
|
columnSelectOptions: { |
|
|
columnSelectOptions: { |
|
|
poStatusOptions: [ |
|
|
poStatusOptions: [ |
|
|
@ -1113,6 +1122,7 @@ export default { |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 解析列对应的下拉选项:优先列上 selectOptions,其次 columnSelectOptions[selectOptionsKey] |
|
|
* 解析列对应的下拉选项:优先列上 selectOptions,其次 columnSelectOptions[selectOptionsKey] |
|
|
*/ |
|
|
*/ |
|
|
|