This commit is contained in:
parent
563f188f9e
commit
98c23b4154
|
|
@ -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];
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue