udpate 混料批次编辑
This commit is contained in:
@@ -451,10 +451,11 @@ export default {
|
||||
if (this.attachListQueryExtra && this.listQueryExtra.length) {
|
||||
this.listQueryExtra.forEach((item) => {
|
||||
let found = item[this.attachListQueryExtra];
|
||||
if (found !== null && found !== undefined) extraParams = found;
|
||||
if (found !== null && found !== undefined) extraParams = item;
|
||||
});
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
console.log(`[edit-dialog] extraParams: ${extraParams}`)
|
||||
this.$refs["edit-dialog"].init(/** some args... */ row_id, detail_mode, tag_info, extraParams);
|
||||
});
|
||||
},
|
||||
|
||||
@@ -29,9 +29,9 @@ export default function () {
|
||||
prop: "operations",
|
||||
name: "操作",
|
||||
fixed: "right",
|
||||
width: 160,
|
||||
width: 120,
|
||||
subcomponent: TableOperaionComponent,
|
||||
options: ['add', { name: 'edit', enable: injectRow => { return 'task' in injectRow && injectRow.task === 'Manual'} }] // 只有 injectRow.task 为手动时,才允许编辑
|
||||
options: [{ name: 'edit', enable: injectRow => { return 'task' in injectRow && injectRow.task === 'Manual' } }] // 只有 injectRow.task 为手动时,才允许编辑
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ export default {
|
||||
computed: {
|
||||
// 混料订单id
|
||||
id() {
|
||||
return this.$route.params.id || "";
|
||||
return this.$route.query.id || "";
|
||||
},
|
||||
},
|
||||
data() {
|
||||
@@ -39,10 +39,10 @@ export default {
|
||||
},
|
||||
watch: {
|
||||
$route: {
|
||||
handler: function (val) {
|
||||
if (val.params.id) {
|
||||
handler: function (route) {
|
||||
if (route.query.id) {
|
||||
this.triggerUpdateKey = Math.random().toString()
|
||||
console.log('[$oute changed] val.params.id', val.params.id, this.triggerUpdateKey)
|
||||
console.log('[$oute changed] val.params.id', route.query.id, this.triggerUpdateKey)
|
||||
}
|
||||
},
|
||||
immediate: true,
|
||||
|
||||
@@ -212,7 +212,7 @@ export default {
|
||||
case 'view-batch': {
|
||||
this.$router.push({
|
||||
name: toRouter,
|
||||
params: {
|
||||
query: {
|
||||
id: data // 混料订单id
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user