|
|
@@ -25,7 +25,7 @@ export default function () { |
|
|
|
subcomponent: TableOperaionComponent, |
|
|
|
options: [ |
|
|
|
{ name: "edit", label: "编辑", icon: "edit-outline", }, |
|
|
|
{ name: 'delete', label: '删除', icon: 'delete' }, |
|
|
|
{ name: 'delete', label: '删除', icon: 'delete', emitFull: true }, |
|
|
|
|
|
|
|
// 只有 injectRow.task 为手动时,才允许编辑 |
|
|
|
// { name:"edit", label: "编辑", icon: "edit-outline", enable: injectRow => { return 'task' in injectRow && injectRow.task === 'Manual' } }, |
|
|
@@ -92,6 +92,21 @@ export default function () { |
|
|
|
const dialogJustFormConfigs = { |
|
|
|
// extra blenderOrderId |
|
|
|
// extraIds: {}, |
|
|
|
extraFields: [{ |
|
|
|
prop: 'hisId', |
|
|
|
disableWatcherOnEdit: true, |
|
|
|
listenTo: { |
|
|
|
prop: 'carId', // 应该监听 carId,随 carId 而更新, |
|
|
|
handler: function (carList, carId) { |
|
|
|
console.log('this. ', carList, this.cachedList) |
|
|
|
const car = carList.find(item => item.carId === carId) |
|
|
|
console.log('car. ', car) |
|
|
|
// 需要 bind |
|
|
|
this.$set(this.dataForm, 'hisId', car.id) |
|
|
|
console.log('this.dataForm.hisId', this.dataForm, this.dataForm.hisId) |
|
|
|
} |
|
|
|
} |
|
|
|
}], |
|
|
|
form: { |
|
|
|
rows: [ |
|
|
|
[ |
|
|
@@ -154,6 +169,7 @@ export default function () { |
|
|
|
prop: "orderId", |
|
|
|
options: [], |
|
|
|
optionLabel: 'orderCode', |
|
|
|
optionValue: 'orderId', |
|
|
|
// toggleFetchData: 'carId', // 当 carId 改变的时候,也会 fetchData |
|
|
|
hasPrev: 'carId', // 当 carId 改变的时候,也会 fetchData |
|
|
|
fetchDataParam: { search: 'carId', get: 'id' }, // 伴随着 hasPrev 出现 |
|
|
|