This commit is contained in:
parent
24bc952231
commit
eb5fe96f1c
|
|
@ -281,7 +281,7 @@ export default {
|
||||||
purchaseNumber: '',
|
purchaseNumber: '',
|
||||||
standardConfig: undefined,
|
standardConfig: undefined,
|
||||||
bmFileInfos: [],
|
bmFileInfos: [],
|
||||||
fitNum: 1,
|
fitNum: 1
|
||||||
},
|
},
|
||||||
lastFitNum: 1,
|
lastFitNum: 1,
|
||||||
standardConfigList: [],
|
standardConfigList: [],
|
||||||
|
|
@ -354,7 +354,7 @@ export default {
|
||||||
}
|
}
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.fitNum = this.maForm.fitNum
|
this.fitNum = this.maForm.fitNum
|
||||||
}, 500);
|
}, 500)
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
maForm: {
|
maForm: {
|
||||||
|
|
@ -372,7 +372,7 @@ export default {
|
||||||
fitNumChange() {
|
fitNumChange() {
|
||||||
const newVal = Math.min(5, Math.max(1, parseInt(this.maForm.fitNum) || 1))
|
const newVal = Math.min(5, Math.max(1, parseInt(this.maForm.fitNum) || 1))
|
||||||
const ratio = newVal / this.lastFitNum
|
const ratio = newVal / this.lastFitNum
|
||||||
this.equipmentList.forEach((item) => {
|
this.equipmentList.forEach(item => {
|
||||||
if (typeof item.preNum === 'number') {
|
if (typeof item.preNum === 'number') {
|
||||||
item.preNum = Math.max(1, Math.floor(item.preNum * ratio)) // 向下取整,且至少为1
|
item.preNum = Math.max(1, Math.floor(item.preNum * ratio)) // 向下取整,且至少为1
|
||||||
}
|
}
|
||||||
|
|
@ -446,7 +446,11 @@ export default {
|
||||||
},
|
},
|
||||||
/** 机具类型 */
|
/** 机具类型 */
|
||||||
equipmentType() {
|
equipmentType() {
|
||||||
equipmentTypeTree({ agreementIdList: this.agreementId }).then(response => {
|
equipmentTypeTree({
|
||||||
|
agreementIdList: this.agreementId,
|
||||||
|
proId: this.maForm.projectId,
|
||||||
|
teamId: this.maForm.teamId
|
||||||
|
}).then(response => {
|
||||||
this.equipmentTypeList = response.data
|
this.equipmentTypeList = response.data
|
||||||
// 处理并扁平化所有类型数据
|
// 处理并扁平化所有类型数据
|
||||||
this.flattenTypeOptions = this.processTypeData(response.data)
|
this.flattenTypeOptions = this.processTypeData(response.data)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue