This commit is contained in:
bb_pan 2025-06-18 17:44:03 +08:00
parent 563f188f9e
commit 98c23b4154
2 changed files with 14 additions and 31 deletions

View File

@ -301,7 +301,7 @@ import Treeselect from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
export default {
name: "AddTools",
name: "AddToolsApply",
dicts: ["purchase_task_status"],
components: { Treeselect },
props: {
@ -586,7 +586,6 @@ export default {
this.equipmentTypeList = response.data;
//
this.flattenTypeOptions = this.processTypeData(response.data);
debugger
//
this.filteredOptions = [...this.flattenTypeOptions];

View File

@ -695,39 +695,21 @@ export default {
equipmentType() {
equipmentTypeTree().then(response => {
this.equipmentTypeList = response.data
// this.equipmentTypeList.forEach((item, index) => {
// if (item.children && item.children.length > 0) {
// item.children.forEach((item2, index2) => {
// if (item2.children && item2.children.length > 0) {
// item2.children.forEach((item3) => {
// if (
// item3.children &&
// item3.children.length > 0
// ) {
// item3.children.forEach((item4) => {
// item4.maTypeName = item3.typeName
// item4.specificationType = item4.typeName
// this.$set(item4, 'purchaseTaxPrice', 0)
// this.$set(item4, 'purchasePrice', 0)
// })
// }
// })
// }
// })
// }
// })
//
this.flattenTypeOptions = this.processTypeData(response.data)
//
this.filteredOptions = [...this.flattenTypeOptions]
//
let selectList = []
console.log(this.equipmentList)
this.equipmentList.forEach(e => {
console.log(this.equipmentList)
selectList.push(this.getParentsById(this.equipmentTypeList, e.typeId, e.status))
})
this.deviceType = selectList
// let selectList = []
// console.log(this.equipmentList)
// this.equipmentList.forEach(e => {
// console.log(this.equipmentList)
// selectList.push(this.getParentsById(this.equipmentTypeList, e.typeId, e.status))
// })
// this.deviceType = selectList
if (this.equipmentList.length > 0) {
this.deviceType = this.equipmentList.map(item => item.typeId);
}
})
},
//
@ -747,6 +729,7 @@ export default {
specificationType: node.typeName,
unitName: node.unitName,
unitValue: node.unitValue,
maxSortPriority: node.maxSortPriority
// rentPrice: node.rentPrice,
})
}
@ -757,6 +740,7 @@ export default {
}
data.forEach(node => traverse(node))
result.sort((a, b) => b.maxSortPriority - a.maxSortPriority)
return result
},
//
@ -1398,7 +1382,7 @@ export default {
}
}
</script>
<style lang="scss">
<style lang="scss" scoped>
::v-deep .el-picker-panel {
z-index: 999999 !important;
}