diff --git a/acs/nladmin-ui/src/views/acs/task/index.vue b/acs/nladmin-ui/src/views/acs/task/index.vue index a02b7a249..1f0c69f75 100644 --- a/acs/nladmin-ui/src/views/acs/task/index.vue +++ b/acs/nladmin-ui/src/views/acs/task/index.vue @@ -80,15 +80,15 @@ - - + + - + @@ -282,7 +282,7 @@ @@ -295,29 +295,113 @@ - + - + - + - + - + - + - + - + + + + 添加新行 + + + + + + + + + + + + + + + + + + + + + + + @@ -491,6 +575,7 @@ export default { edit: ['admin', 'task:edit'], del: ['admin', 'task:del'] }, + showAddRowButton: true, form: { task_id: null, vehicle_code: null, @@ -521,7 +606,18 @@ export default { truss_type: null, version: null, bushing_num: null, - is_bushing: null + is_bushing: null, + paperArray: [{ + device_code: '', + material_code: '', + qty: '' + }/* , + { + device_code: '', + material_code: '', + qty: '' + } */ + ] }, rules: { start_height: [ @@ -574,10 +670,24 @@ export default { } }) }, + addNewRow() { + this.form.paperArray.push({ + device_code: '', + material_code: '', + qty: '' + }) + }, // 钩子:在获取表格数据之前执行,false 则代表不获取数据 [CRUD.HOOK.beforeRefresh]() { return true }, + deleteField(index) { // 添加字段的时候删除一条数据 + console.log(index) + if (this.form.paperArray.length > 1) { + this.form.paperArray.splice(index, 1) + } + console.log(this.form.paperArray) + }, finish(index, row) { crudTask.finish(row.task_id).then(res => { this.crud.toQuery()