更新bug

This commit is contained in:
2024-12-27 15:38:14 +08:00
parent 466c822b0f
commit 2c44906bd6
17 changed files with 693 additions and 485 deletions

View File

@@ -37,7 +37,7 @@
<script>
import { createPlanDet, updatePlanDet, getPlanDet } from '@/api/equipment/base/maintain/planconfig';
import { getEquipmentPage } from '@/api/base/equipment'
import { getItemPageData } from '@/api/equipment/base/maintain/items';
import { getByEquId } from '@/api/equipment/base/maintain/items';
export default {
props: {
@@ -94,20 +94,14 @@ export default {
});
},
async handleChange(val) {
console.log(val);
let equipmentTypeId = undefined
this.eqList.forEach((ele) => {
if (ele.id == val) {
equipmentTypeId = ele.equipmentTypeId
}
})
const { code, data } = await getItemPageData({
pageNo: 1,
pageSize: 99,
equipmentTypeId: equipmentTypeId,
})
this.programList = data.list
console.log(data);
// let equipmentTypeId = undefined
// this.eqList.forEach((ele) => {
// if (ele.id == val) {
// equipmentTypeId = ele.equipmentTypeId
// }
// })
const { code, data } = await getByEquId(val)
this.programList = data
},
handleDecChange(val) {
let maintenanceDes = undefined

View File

@@ -70,6 +70,12 @@ import { getList,} from "@/api/base/qualityScrapType";
export default {
mixins: [basicAdd],
props: {
mainId: {
type: String,
},
},
data() {
return {
urlOptions: {
@@ -96,7 +102,7 @@ export default {
id: undefined,
program: undefined,
resultType: undefined,
equipmentTypeId: undefined,
mainId:this.mainId,
minValue: undefined,
maxValue: undefined,
maintainResult:undefined,
@@ -117,7 +123,6 @@ export default {
},
mounted() {
this.getDict()
console.log('我看看', this.dataForm)
},
methods: {
handleClear() {

View File

@@ -1,8 +1,8 @@
/*
* @Author: zwq
* @Date: 2022-08-24 11:19:43
* @LastEditors: zhp
* @LastEditTime: 2024-07-19 14:47:02
* @LastEditors: zwq
* @LastEditTime: 2024-12-13 15:50:49
* @Description:
*/
export default {
@@ -28,10 +28,8 @@ export default {
activated() {
},
methods: {
init(obj) {
console.log(obj);
this.dataForm.id = obj.id || "";
this.dataForm.equipmentTypeId = obj.equipmentTypeId || "";
init(id) {
this.dataForm.id = id || "";
this.visible = true;
if (this.urlOptions.getOption) {
this.getArr()

View File

@@ -1,8 +1,8 @@
/*
* @Author: zhp
* @Date: 2024-07-19 09:49:22
* @LastEditTime: 2024-07-22 09:17:31
* @LastEditors: zhp
* @LastEditTime: 2024-12-13 15:52:24
* @LastEditors: zwq
* @Description:
*/
export default {
@@ -88,12 +88,8 @@ export default {
if (val.type === "edit") {
this.addOrUpdateVisible = true;
this.addOrEditTitle = "编辑"
let obj = {
id: val.data.id,
equipmentTypeId:val.data.equipmentTypeId
}
this.$nextTick(() => {
this.$refs.addOrUpdate.init(obj);
this.$refs.addOrUpdate.init(val.data.id);
});
} else if (val.type === "delete") {
this.deleteHandle(val.data.id, val.data.program, val.data._pageIndex)

View File

@@ -186,7 +186,7 @@ export default {
handleDetail(row) {
this.showDetailVisible = true
this.$nextTick(() => {
this.$refs.showDetail.init(row.equipmentTypeId)
this.$refs.showDetail.init(row.id)
})
// alert('跳转到 保养记录')
// console.log(row)

View File

@@ -1,8 +1,8 @@
<!--
* @Author: zhp
* @Date: 2024-07-12 13:28:21
* @LastEditTime: 2024-07-23 14:00:38
* @LastEditors: zhp
* @LastEditTime: 2024-12-13 16:03:29
* @LastEditors: zwq
* @Description:
-->
<template>
@@ -22,7 +22,7 @@
</el-drawer>
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
@confirm="handleConfirm" :before-close="handleCancel" width="30%">
<add-or-update ref="addOrUpdate" @refreshDataList="successSubmit"></add-or-update>
<add-or-update ref="addOrUpdate" @refreshDataList="successSubmit" :main-id="queryParams.mainId"></add-or-update>
</base-dialog>
</div>
@@ -74,7 +74,7 @@ export default {
queryParams: {
pageNo:1,
pageSize:10,
equipmentTypeId:null,
mainId:null,
},
tableProps,
basePath: 'base/equipment-maintain-program',
@@ -105,21 +105,18 @@ export default {
},
getDataList(id) {
this.dataListLoading = true;
this.queryParams.equipmentTypeId = id
this.urlOptions.getDataListURL(this.listQuery).then(response => {
this.queryParams.mainId = id
this.urlOptions.getDataListURL(this.queryParams).then(response => {
this.tableData = response.data.list;
this.listQuery.total = response.data.total;
this.queryParams.total = response.data.total;
this.dataListLoading = false
});
},
handleAdd() {
this.addOrUpdateVisible = true
this.addOrEditTitle = '新增'
let obj = {
equipmentTypeId: this.queryParams.equipmentTypeId
}
this.$nextTick(() => {
this.$refs.addOrUpdate.init(obj)
this.$refs.addOrUpdate.init()
});
},
init(id) {