diff --git a/src/mixins/tableHeightMixin.js b/src/mixins/tableHeightMixin.js new file mode 100644 index 00000000..ad23d16e --- /dev/null +++ b/src/mixins/tableHeightMixin.js @@ -0,0 +1,20 @@ +export default { + data() { + return { + tableH: this.tableHeight(260), + }; + }, + created() { + this.tableH = this?.heightNum ? this.tableHeight(this.heightNum) : this.tableHeight(260); + window.addEventListener('resize', this._setTableHeight); + }, + destroyed() { + window.removeEventListener('resize', this._setTableHeight); + }, + methods: { + _setTableHeight() { + this.tableH = this?.heightNum ? this.tableHeight(this.heightNum) : this.tableHeight(260); + // this.tableH = this.tableHeight(260); + }, + }, +}; diff --git a/src/views/quality/base/basicData/qualityInspectionBoxBtn/dialogForm.vue b/src/views/devConfig/quality/qualityInspectionBoxBtn/dialogForm.vue similarity index 100% rename from src/views/quality/base/basicData/qualityInspectionBoxBtn/dialogForm.vue rename to src/views/devConfig/quality/qualityInspectionBoxBtn/dialogForm.vue diff --git a/src/views/quality/base/basicData/qualityInspectionBoxBtn/index.vue b/src/views/devConfig/quality/qualityInspectionBoxBtn/index.vue similarity index 100% rename from src/views/quality/base/basicData/qualityInspectionBoxBtn/index.vue rename to src/views/devConfig/quality/qualityInspectionBoxBtn/index.vue diff --git a/src/views/quality/base/qualityInspectionDet/index.vue b/src/views/devConfig/quality/qualityInspectionDet/index.vue similarity index 72% rename from src/views/quality/base/qualityInspectionDet/index.vue rename to src/views/devConfig/quality/qualityInspectionDet/index.vue index 602f9fb2..3a4052d3 100644 --- a/src/views/quality/base/qualityInspectionDet/index.vue +++ b/src/views/devConfig/quality/qualityInspectionDet/index.vue @@ -1,53 +1,92 @@ diff --git a/src/views/quality/base/qualityScrapType/index.vue b/src/views/devConfig/quality/qualityScrapType/index.vue similarity index 78% rename from src/views/quality/base/qualityScrapType/index.vue rename to src/views/devConfig/quality/qualityScrapType/index.vue index 6d638e83..dc7e7605 100644 --- a/src/views/quality/base/qualityScrapType/index.vue +++ b/src/views/devConfig/quality/qualityScrapType/index.vue @@ -29,7 +29,7 @@ @cancel="handleCancel" @confirm="handleConfirm" :before-close="handleCancel" - width="30%"> + width="40%"> @@ -42,31 +42,31 @@ import AddOrUpdate from './add-or-updata'; import basicPage from '../../../core/mixins/basic-page'; import { parseTime } from '../../../core/mixins/code-filter'; import { - getQualityScrapTypePage, - deleteQualityScrapType + getQualityScrapTypePage, + deleteQualityScrapType, } from '@/api/base/qualityScrapType'; const tableProps = [ { prop: 'createTime', label: '添加时间', - filter: parseTime - }, - { - prop: 'name', - label: '报废类型' - }, + filter: parseTime, + }, + { + prop: 'name', + label: '报废类型', + }, { prop: 'code', - label: '报废类型编码' + label: '报废类型编码', }, { prop: 'description', - label: '描述信息' + label: '描述信息', }, { prop: 'remark', - label: '备注' + label: '备注', }, ]; @@ -81,25 +81,25 @@ export default { }, tableProps, tableBtn: [ - this.$auth.hasPermi(`base:quality-scrap-type:update`) + this.$auth.hasPermi(`base:quality-scrap-type:update`) ? { type: 'edit', btnName: '编辑', } : undefined, - this.$auth.hasPermi(`base:quality-scrap-type:delete`) + this.$auth.hasPermi(`base:quality-scrap-type:delete`) ? { type: 'delete', btnName: '删除', } : undefined, - ].filter((v)=>v), + ].filter((v) => v), tableData: [], formConfig: [ { type: 'input', label: '报废类型', - placeholder: '报废类型', + placeholder: '报废类型', param: 'name', }, { @@ -112,11 +112,13 @@ export default { type: 'separate', }, { - type: this.$auth.hasPermi('base:quality-scrap-type:create') ? 'button' : '', + type: this.$auth.hasPermi('base:quality-scrap-type:create') + ? 'button' + : '', btnName: '新增', name: 'add', color: 'success', - plain: true + plain: true, }, ], }; @@ -127,14 +129,14 @@ export default { created() {}, methods: { // 获取数据列表 - getDataList() { - this.dataListLoading = true; - this.urlOptions.getDataListURL(this.listQuery).then(response => { - this.tableData = response.data.list; - this.listQuery.total = response.data.total; - this.dataListLoading = false; - }); - }, + getDataList() { + this.dataListLoading = true; + this.urlOptions.getDataListURL(this.listQuery).then((response) => { + this.tableData = response.data.list; + this.listQuery.total = response.data.total; + this.dataListLoading = false; + }); + }, buttonClick(val) { switch (val.btnName) { case 'search': diff --git a/src/views/quality/base/qualityScrapLog/add-or-updata.vue b/src/views/quality/base/qualityScrapLog/add-or-updata.vue deleted file mode 100644 index bcfc9530..00000000 --- a/src/views/quality/base/qualityScrapLog/add-or-updata.vue +++ /dev/null @@ -1,209 +0,0 @@ - - - - diff --git a/src/views/quality/base/qualityScrapLog/detail-or-updata.vue b/src/views/quality/base/qualityScrapLog/detail-or-updata.vue deleted file mode 100644 index a689f27f..00000000 --- a/src/views/quality/base/qualityScrapLog/detail-or-updata.vue +++ /dev/null @@ -1,222 +0,0 @@ - - - - diff --git a/src/views/quality/base/qualityScrapLog/index.vue b/src/views/quality/base/qualityScrapLog/index.vue deleted file mode 100644 index 5237cb8d..00000000 --- a/src/views/quality/base/qualityScrapLog/index.vue +++ /dev/null @@ -1,213 +0,0 @@ - - - diff --git a/src/views/quality/base/qualityScrapType/add-or-updata.vue b/src/views/quality/base/qualityScrapType/add-or-updata.vue deleted file mode 100644 index 6ef00826..00000000 --- a/src/views/quality/base/qualityScrapType/add-or-updata.vue +++ /dev/null @@ -1,86 +0,0 @@ - - - - diff --git a/src/views/quality/monitoring/currentData/dialogForm.vue b/src/views/quality/currentData/dialogForm.vue similarity index 100% rename from src/views/quality/monitoring/currentData/dialogForm.vue rename to src/views/quality/currentData/dialogForm.vue diff --git a/src/views/quality/monitoring/currentData/index.vue b/src/views/quality/currentData/index.vue similarity index 100% rename from src/views/quality/monitoring/currentData/index.vue rename to src/views/quality/currentData/index.vue diff --git a/src/views/quality/monitoring/deviceParameters/index.vue b/src/views/quality/monitoring/deviceParameters/index.vue index 1146b523..e728b035 100644 --- a/src/views/quality/monitoring/deviceParameters/index.vue +++ b/src/views/quality/monitoring/deviceParameters/index.vue @@ -6,663 +6,701 @@ --> diff --git a/src/views/quality/monitoring/equipmentTraceability/index.vue b/src/views/quality/monitoring/equipmentTraceability/index.vue index c88a7f60..77e101eb 100644 --- a/src/views/quality/monitoring/equipmentTraceability/index.vue +++ b/src/views/quality/monitoring/equipmentTraceability/index.vue @@ -186,16 +186,16 @@ export default { }, ], }, - { - prop: 'oee', - label: 'OEE', - filter: (val) => (val != null ? +val.toFixed(3) : '-'), - }, - { - prop: 'teep', - label: 'TEEP', - filter: (val) => (val != null ? +val.toFixed(3) : '-'), - }, + // { + // prop: 'oee', + // label: 'OEE', + // filter: (val) => (val != null ? +val.toFixed(3) : '-'), + // }, + // { + // prop: 'teep', + // label: 'TEEP', + // filter: (val) => (val != null ? +val.toFixed(3) : '-'), + // }, // { // _action: 'view-trend', // label: '趋势', @@ -230,8 +230,9 @@ export default { type: 'select', label: '工单', placeholder: '请选择工单', - param: 'workOrderId', + param: 'workOrderId', selectOptions: [], + filterable: true, }, // { // type: 'select', @@ -252,20 +253,20 @@ export default { // ], // index: 2, // extraOptions: [ - { - // parent: 'dateFilterType', - // 时间段选择 - type: 'datePicker', - // label: '时间段', - dateType: 'daterange', - format: 'yyyy-MM-dd', - valueFormat: 'yyyy-MM-dd HH:mm:ss', - defaultTime: ['00:00:00', '00:00:00'], - rangeSeparator: '-', - startPlaceholder: '开始时间', - endPlaceholder: '结束时间', - param: 'timerange', - }, + { + // parent: 'dateFilterType', + // 时间段选择 + type: 'datePicker', + label: '时间段', + dateType: 'daterange', + format: 'yyyy-MM-dd', + valueFormat: 'yyyy-MM-dd HH:mm:ss', + defaultTime: ['00:00:00', '00:00:00'], + rangeSeparator: '-', + startPlaceholder: '开始时间', + endPlaceholder: '结束时间', + param: 'timerange', + }, // { // parent: 'dateFilterType', // // 日期选择 @@ -285,16 +286,16 @@ export default { name: 'search', color: 'primary', }, - // { - // type: 'separate', - // }, - // { - // type: 'button', - // btnName: '设备可视化', - // name: 'visualization', - // plain: true, - // color: 'success', - // }, + { + type: 'separate', + }, + { + type: 'button', + btnName: '导出', + name: 'export', + plain: true, + color: 'success', + }, // { // type: 'button', // btnName: 'OEE', @@ -315,7 +316,7 @@ export default { // 查询参数 queryParams: { // lineId: null, - workOrderId: null, + workOrderId: null, recordTime: [], }, // 表单参数 @@ -324,20 +325,20 @@ export default { }; }, created() { - this.getWorkOrder() + this.getWorkOrder(); // this.getLine(); this.getList(); }, methods: { /** 准备工厂数据 */ - async getWorkOrder() { - console.log(1111); + async getWorkOrder() { + console.log(1111); const { code, data } = await this.$axios({ - url: '/base/core-work-order/listbyfilter', + url: '/base/core-work-order/listbyfilter', method: 'get', }); - if (code == 0) { - console.log('1111', data); + if (code == 0) { + console.log('1111', data); this.searchBarFormConfig[0].selectOptions = data.map((item) => { return { name: item.name, @@ -394,7 +395,7 @@ export default { this.open = true; } if (btnName == 'search') { - this.queryParams.workOrderId = payload.workOrderId || null; + this.queryParams.workOrderId = payload.workOrderId || null; // this.queryParams.lineId = payload.lineId || null; if (0 == payload.dateFilterType) { this.queryParams.recordTime = payload.timerange; diff --git a/src/views/quality/monitoring/materielDateFrom/index.vue b/src/views/quality/monitoring/materielDateFrom/index.vue index 07efb7d2..e7bd7a88 100644 --- a/src/views/quality/monitoring/materielDateFrom/index.vue +++ b/src/views/quality/monitoring/materielDateFrom/index.vue @@ -6,16 +6,26 @@ * @Description: --> diff --git a/src/views/quality/monitoring/processTraceability/index.vue b/src/views/quality/monitoring/processTraceability/index.vue index 413e6889..53406cd7 100644 --- a/src/views/quality/monitoring/processTraceability/index.vue +++ b/src/views/quality/monitoring/processTraceability/index.vue @@ -6,16 +6,31 @@ * @Description: --> diff --git a/src/views/quality/monitoring/qualityInspectionRecord/dialogForm.vue b/src/views/quality/monitoring/qualityInspectionRecord/dialogForm.vue deleted file mode 100644 index 9199e2fc..00000000 --- a/src/views/quality/monitoring/qualityInspectionRecord/dialogForm.vue +++ /dev/null @@ -1,219 +0,0 @@ - - - - - - - diff --git a/src/views/quality/monitoring/qualityRecentHours/index.vue b/src/views/quality/monitoring/qualityRecentHours/index.vue deleted file mode 100644 index 5d9fb42d..00000000 --- a/src/views/quality/monitoring/qualityRecentHours/index.vue +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - diff --git a/src/views/quality/monitoring/qualityRecentHours/props.json b/src/views/quality/monitoring/qualityRecentHours/props.json deleted file mode 100644 index a8976b08..00000000 --- a/src/views/quality/monitoring/qualityRecentHours/props.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "tableProps": [ - { - "prop": "inspectionContent", - "label": "检测内容", - "align": "center" - }, - { - "prop": "2023-03-18T00:00:00", - "label": "2023-03-18T00:00:00", - "align": "center", - "children": [ - { - "prop": "2023-03-18T00:00:00-产线1", - "label": "产线1", - "align": "center" - }, - { - "prop": "2023-03-18T00:00:00-产线2", - "label": "产线2", - "align": "center" - }, - { - "prop": "2023-03-18T00:00:00-产线3", - "label": "产线3", - "align": "center" - }, - { - "prop": "2023-03-18T00:00:00-产线4", - "label": "产线4", - "align": "center" - }, - { - "prop": "2023-03-18T00:00:00-产线5", - "label": "产线5", - "align": "center" - } - ] - }, - { - "prop": "2023-03-18T01:00:00", - "label": "2023-03-18T01:00:00", - "align": "center", - "children": [ - { - "prop": "2023-03-18T01:00:00-产线1", - "label": "产线1", - "align": "center" - }, - { - "prop": "2023-03-18T01:00:00-产线2", - "label": "产线2", - "align": "center" - }, - { - "prop": "2023-03-18T01:00:00-产线3", - "label": "产线3", - "align": "center" - } - ] - }, - { - "prop": "2023-03-18T02:00:00", - "label": "2023-03-18T02:00:00", - "align": "center", - "children": [ - { - "prop": "2023-03-18T02:00:00-产线1", - "label": "产线1", - "align": "center" - }, - { - "prop": "2023-03-18T02:00:00-产线2", - "label": "产线2", - "align": "center" - } - ] - } - ] -} diff --git a/src/views/quality/monitoring/qualityRecentHours/response.json b/src/views/quality/monitoring/qualityRecentHours/response.json deleted file mode 100644 index 9524dfb4..00000000 --- a/src/views/quality/monitoring/qualityRecentHours/response.json +++ /dev/null @@ -1,176 +0,0 @@ -{ - "code": 0, - "data": { - "data": [ - { - "data": [ - { - "id": "测试222023-08-09T02:00", - "parentId": "测试22", - "dynamicName": "2023-08-09T02:00", - "dynamicValue": 1691517600000, - "children": [ - { - "id": "1672847052717821953", - "parentId": "测试222023-08-09T02:00", - "dynamicName": "产线1", - "dynamicValue": 1 - } - ] - }, - { - "id": "测试222023-08-09T08:00", - "parentId": "测试22", - "dynamicName": "2023-08-09T08:00", - "dynamicValue": 1691539200000, - "children": [ - { - "id": "1672847052717821953", - "parentId": "测试222023-08-09T08:00", - "dynamicName": "产线1", - "dynamicValue": 1 - } - ] - }, - { - "id": "测试222023-08-09T11:00", - "parentId": "测试22", - "dynamicName": "2023-08-09T11:00", - "dynamicValue": 1691550000000, - "children": [ - { - "id": "1672847052717821953", - "parentId": "测试222023-08-09T11:00", - "dynamicName": "产线1", - "dynamicValue": 1 - } - ] - } - ], - "inspectionDetContent": "测试22" - }, - { - "data": [ - { - "id": "测试112023-08-09T02:00", - "parentId": "测试11", - "dynamicName": "2023-08-09T02:00", - "dynamicValue": 1691517600000, - "children": [ - { - "id": "1672847052717821954", - "parentId": "测试112023-08-09T02:00", - "dynamicName": "产线22", - "dynamicValue": 1 - } - ] - }, - { - "id": "测试112023-08-09T08:00", - "parentId": "测试11", - "dynamicName": "2023-08-09T08:00", - "dynamicValue": 1691539200000, - "children": [ - { - "id": "1672847052717821953", - "parentId": "测试112023-08-09T08:00", - "dynamicName": "产线1", - "dynamicValue": 1 - } - ] - }, - { - "id": "测试112023-08-09T09:00", - "parentId": "测试11", - "dynamicName": "2023-08-09T09:00", - "dynamicValue": 1691542800000, - "children": [ - { - "id": "1672847052717821954", - "parentId": "测试112023-08-09T09:00", - "dynamicName": "产线22", - "dynamicValue": 2 - } - ] - } - ], - "inspectionDetContent": "测试11" - } - ], - "nameData": [ - { - "name": "2023-08-09T02:00", - "tree": 1, - "id": "测试222023-08-09T02:00", - "parentId": "测试22" - }, - { - "name": "产线1", - "tree": 2, - "id": "1672847052717821953", - "parentId": "测试222023-08-09T02:00" - }, - { - "name": "2023-08-09T08:00", - "tree": 1, - "id": "测试222023-08-09T08:00", - "parentId": "测试22" - }, - { - "name": "产线1", - "tree": 2, - "id": "1672847052717821953", - "parentId": "测试222023-08-09T08:00" - }, - { - "name": "2023-08-09T11:00", - "tree": 1, - "id": "测试222023-08-09T11:00", - "parentId": "测试22" - }, - { - "name": "产线1", - "tree": 2, - "id": "1672847052717821953", - "parentId": "测试222023-08-09T11:00" - }, - { - "name": "2023-08-09T02:00", - "tree": 1, - "id": "测试112023-08-09T02:00", - "parentId": "测试11" - }, - { - "name": "产线22", - "tree": 2, - "id": "1672847052717821954", - "parentId": "测试112023-08-09T02:00" - }, - { - "name": "2023-08-09T08:00", - "tree": 1, - "id": "测试112023-08-09T08:00", - "parentId": "测试11" - }, - { - "name": "产线1", - "tree": 2, - "id": "1672847052717821953", - "parentId": "测试112023-08-09T08:00" - }, - { - "name": "2023-08-09T09:00", - "tree": 1, - "id": "测试112023-08-09T09:00", - "parentId": "测试11" - }, - { - "name": "产线22", - "tree": 2, - "id": "1672847052717821954", - "parentId": "测试112023-08-09T09:00" - } - ] - }, - "msg": "" -} diff --git a/src/views/quality/monitoring/rawMaterialTraceability/index.vue b/src/views/quality/monitoring/rawMaterialTraceability/index.vue index af0ab14e..dadc1c02 100644 --- a/src/views/quality/monitoring/rawMaterialTraceability/index.vue +++ b/src/views/quality/monitoring/rawMaterialTraceability/index.vue @@ -6,16 +6,26 @@ * @Description: --> diff --git a/src/views/quality/qualityInspectionRecord/dialogForm.vue b/src/views/quality/qualityInspectionRecord/dialogForm.vue new file mode 100644 index 00000000..93836e3b --- /dev/null +++ b/src/views/quality/qualityInspectionRecord/dialogForm.vue @@ -0,0 +1,290 @@ + + + + + + + diff --git a/src/views/quality/monitoring/qualityInspectionRecord/index.vue b/src/views/quality/qualityInspectionRecord/index.vue similarity index 63% rename from src/views/quality/monitoring/qualityInspectionRecord/index.vue rename to src/views/quality/qualityInspectionRecord/index.vue index baac3742..80587137 100644 --- a/src/views/quality/monitoring/qualityInspectionRecord/index.vue +++ b/src/views/quality/qualityInspectionRecord/index.vue @@ -17,7 +17,7 @@ v-if="tableBtn.length" slot="handleBtn" label="操作" - :width="120" + :width="80" fixed="right" :method-list="tableBtn" @clickBtn="handleTableBtnClick" /> @@ -66,94 +66,22 @@ export default { mixins: [basicPageMixin], data() { return { - rows: [ - [ - { - select: true, - label: '检测内容', - url: '/base/quality-inspection-det/listAll', - prop: 'inspectionDetId', - labelKey: 'content', - rules: [{ required: true, message: '检测内容不能为空', trigger: 'blur' }], - bind: { - filterable: true, - }, - }, - { - select: true, - label: '来源', - prop: 'source', - value: 1, // 默认手动 - options: [ - { label: '手动', value: 1 }, - { label: '自动', value: 2 }, - ], - bind: { - filterable: true, - }, - }, - ], - [ - { - select: true, - label: '产线', - url: '/base/production-line/listAll', - prop: 'productionLineId', - bind: { - filterable: true, - }, - rules: [{ required: true, message: '产线不能为空', trigger: 'blur' }], - }, - { - select: true, - label: '工段', - url: '/base/workshop-section/listAll', // 这个 url 其实可加可不加,因为下面会更新 options - options: [], // 这个options也可加可不加, 因为下面会更新 options - prop: 'sectionId', - bind: { - filterable: true, - }, - rules: [{ required: false, message: '不能为空', trigger: 'blur' }], - }, - ], - [ - { - input: true, - label: '检测人员', - prop: 'checkPerson', - }, - { - datetime: true, - label: '检测时间', - prop: 'checkTime', - rules: [{ required: true, message: '检测时间不能为空', trigger: 'blur' }], - bind: { - format: 'yyyy-MM-dd HH:mm:ss', - 'value-format': 'timestamp', - // 'value-format': 'yyyy-MM-dd HH:mm:ss', - clearable: true, - }, - }, - ], - [{ textarea: true, label: '描述', prop: 'explainText' }], - [{ input: true, label: '备注', prop: 'remark' }], - ], searchBarFormConfig: [ { type: 'select', - label: '工单名称', - placeholder: '请选择工单名称', + label: '工单名称', + placeholder: '请选择工单名称', param: 'workOrderId', - selectOptions: [], - filterable:true + selectOptions: [], + filterable: true, }, { - type: 'select', + type: 'select', label: '检测内容', - placeholder: '请输入检测内容', - selectOptions: [], - param: 'inspectionDetContent', - filterable: true + placeholder: '请输入检测内容', + selectOptions: [], + param: 'inspectionDetContent', + filterable: true, }, { type: 'datePicker', @@ -179,9 +107,7 @@ export default { type: 'separate', }, { - type: this.$auth.hasPermi( - 'base:quality-inspection-record:create' - ) + type: this.$auth.hasPermi('base:quality-inspection-record:create') ? 'button' : '', btnName: '新增', @@ -197,7 +123,7 @@ export default { btnName: '修改', } : undefined, - this.$auth.hasPermi('base:quality-inspection-record:delete') + this.$auth.hasPermi('base:quality-inspection-record:delete') ? { type: 'delete', btnName: '删除', @@ -211,12 +137,12 @@ export default { fixed: true, width: 180, filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'), - }, - { - // width: 128, - prop: 'workOrderName', - label: '工单名称', - }, + }, + { + // width: 128, + prop: 'workOrderName', + label: '工单名称', + }, { // width: 128, prop: 'inspectionDetContent', @@ -224,7 +150,7 @@ export default { }, { // width: 128, - prop: 'lineName', + prop: 'productionLineName', label: '产线', }, { @@ -247,25 +173,25 @@ export default { }, ], // 搜索框需要的 keys, 与上面 queryParams 的除 pageNo, pageSize 之外的 key 一一对应 - searchBarKeys: ['inspectionDetContent', 'checkTime', 'productionLineId'], + searchBarKeys: ['workOrderId', 'inspectionDetContent', 'checkTime'], form: { id: undefined, inspectionDetId: undefined, inspectionDetContent: undefined, productionLineId: undefined, sectionId: undefined, - checkPerson: undefined, - workOrderId:undefined, + checkPerson: undefined, + workOrderId: undefined, checkTime: undefined, source: undefined, - explainText: undefined, + workOrderId: undefined, remark: undefined, }, // 查询参数 queryParams: { pageNo: 1, - pageSize: 10, - workOrderId:null, + pageSize: 10, + workOrderId: null, inspectionDetContent: null, checkTime: [], // productionLineId: null, @@ -274,43 +200,20 @@ export default { }, created() { this.getList(); - this.getProductLineList() + this.getProductLineList(); }, watch: { form: { handler: function (val) { console.log('form change:', val); }, - deep: true - } - // 注册弹窗里产线改变时的监听事件 - // 'form.productionLineId': { - // handler: function (val) { - // if (val == null) return; - // this.$axios('/base/workshop-section/listByParentId', { - // params: { - // id: val, - // }, - // }).then((response) => { - // this.$set( - // this.rows[1][1], // 这里索引是硬编码,所以当 this.rows 里数据顺序改变时,此处也要改 - // 'options', - // response.data.map((item) => { - // return { - // label: item.name, - // value: item.id, - // }; - // }) - // ); - // }); - // }, - // immediate: true, - // }, + deep: true, + }, }, methods: { /** 获取搜索栏的产线列表 */ getProductLineList() { - this.$axios('/base/core-work-order/listbyfilter').then((response) => { + this.$axios('/base/core-work-order/listbyfilter').then((response) => { this.searchBarFormConfig[0].selectOptions = response.data.map( (item) => { return { @@ -319,17 +222,17 @@ export default { }; } ); - }) - this.$axios('/base/quality-inspection-det/listAll').then((response) => { - this.searchBarFormConfig[1].selectOptions = response.data.map( - (item) => { - return { - name: item.content, - id: item.content, - }; - } - ); - }); + }); + this.$axios('/base/quality-inspection-det/listAll').then((response) => { + this.searchBarFormConfig[1].selectOptions = response.data.map( + (item) => { + return { + name: item.content, + id: item.content, + }; + } + ); + }); }, /** 查询列表 */ getList() { @@ -356,7 +259,7 @@ export default { checkPerson: undefined, checkTime: undefined, source: undefined, - explainText: undefined, + workOrderId: undefined, remark: undefined, productionLineId: undefined, }; @@ -376,7 +279,7 @@ export default { handleAdd() { this.reset(); this.open = true; - this.title = '添加质量检查信息记录表'; + this.title = '新增'; }, /** 修改按钮操作 */ handleUpdate(row) { @@ -384,13 +287,13 @@ export default { const id = row.id; getQualityInspectionRecord(id).then((response) => { /** 因为后端返回的时间是时间戳格式,需转换 */ - const info = {} - Object.keys(this.form).forEach(key => { - info[key] = response.data[key] + const info = {}; + Object.keys(this.form).forEach((key) => { + info[key] = response.data[key]; }); this.form = info; this.open = true; - this.title = '修改质量检查信息记录表'; + this.title = '编辑'; }); }, /** 提交按钮 */ diff --git a/src/views/quality/base/qualityScrapLog/SmallTitle.vue b/src/views/quality/qualityScrapLog/SmallTitle.vue similarity index 100% rename from src/views/quality/base/qualityScrapLog/SmallTitle.vue rename to src/views/quality/qualityScrapLog/SmallTitle.vue diff --git a/src/views/quality/qualityScrapLog/add-or-updata.vue b/src/views/quality/qualityScrapLog/add-or-updata.vue new file mode 100644 index 00000000..b40e9df9 --- /dev/null +++ b/src/views/quality/qualityScrapLog/add-or-updata.vue @@ -0,0 +1,269 @@ + + + diff --git a/src/views/quality/qualityScrapLog/index.vue b/src/views/quality/qualityScrapLog/index.vue new file mode 100644 index 00000000..8cd6c82b --- /dev/null +++ b/src/views/quality/qualityScrapLog/index.vue @@ -0,0 +1,250 @@ + + +