This commit is contained in:
parent
8276fba8dd
commit
2311c4e288
|
|
@ -215,7 +215,7 @@
|
|||
@click="openAddCode(scope.row)"
|
||||
v-if="scope.row.manageType == 0"
|
||||
>
|
||||
添加编码
|
||||
{{ scope.row.maCodeList && scope.row.maCodeList.length > 0 ? scope.row.maCodeList.length : '添加编码' }}
|
||||
</div>
|
||||
<el-input
|
||||
v-if="scope.row.manageType == 1"
|
||||
|
|
@ -722,12 +722,12 @@ export default {
|
|||
agreementId: agreementId
|
||||
}
|
||||
const res = await getDeviceTreeByAgreementId(params)
|
||||
console.log('resgetUseTypeTreee==========', res)
|
||||
// console.log('resgetUseTypeTreee==========', res)
|
||||
this.deviceTypeTree = res.data
|
||||
|
||||
// 处理并扁平化所有类型数据
|
||||
this.flattenTypeOptions = this.processTypeData(res.data)
|
||||
console.log('🚀 ~ GetDeviceTypeTreeFn ~ this.flattenTypeOptions:', this.flattenTypeOptions)
|
||||
// console.log('🚀 ~ GetDeviceTypeTreeFn ~ this.flattenTypeOptions:', this.flattenTypeOptions)
|
||||
// 初始显示所有选项
|
||||
this.filteredOptions = [...this.flattenTypeOptions]
|
||||
|
||||
|
|
@ -885,7 +885,10 @@ export default {
|
|||
this.queryParams.remark = data.backApplyInfo.remark
|
||||
this.equipmentList = data.backApplyDetailsList
|
||||
this.equipmentList.forEach(item => {
|
||||
item.tempMaCodeList = item.maCodeList
|
||||
// item.tempMaCodeList = item.maCodeList
|
||||
const list = Array.isArray(item.maCodeList) ? item.maCodeList : []
|
||||
item.goodNum = list.filter(code => code.apDetection === '1' || code.apDetection === '完好').length
|
||||
item.badNum = list.filter(code => code.apDetection === '0' || code.apDetection === '不合格').length
|
||||
})
|
||||
this.GetDeviceTypeTreeFn(data.backApplyInfo.agreementId)
|
||||
},
|
||||
|
|
@ -1120,7 +1123,7 @@ export default {
|
|||
typeId: typeId
|
||||
}
|
||||
await getMachineById(param).then(res => {
|
||||
console.log('🚀 ~ awaitgetMachineById ~ res.data:', res.data)
|
||||
// console.log('🚀 ~ awaitgetMachineById ~ res.data:', res.data)
|
||||
this.machineList = res.data
|
||||
this.machineList.forEach(item => {
|
||||
item.bmFileInfos = []
|
||||
|
|
@ -1134,13 +1137,18 @@ export default {
|
|||
await this.getMachineById(row.typeId)
|
||||
// this.maId=""
|
||||
if (this.rowData.maCodeList && this.rowData.maCodeList.length > 0) {
|
||||
console.log(this.maCodeList)
|
||||
console.log(this.machineList)
|
||||
// console.log(this.maCodeList)
|
||||
// console.log(this.machineList)
|
||||
if (this.rowId != '') {
|
||||
this.maCodeList = this.rowData.maCodeList
|
||||
console.log('🚀 ~ 编辑 ~ this.maCodeList:', this.maCodeList)
|
||||
this.machineList.forEach(item => {
|
||||
this.maCodeList.forEach(sub => {
|
||||
if (sub.apDetection == '完好') {
|
||||
sub.apDetection = '1'
|
||||
} else if (sub.apDetection == '不合格') {
|
||||
sub.apDetection = '0'
|
||||
}
|
||||
if (sub.maId == item.maId) {
|
||||
this.$nextTick(() => {
|
||||
setTimeout(() => {
|
||||
|
|
@ -1287,7 +1295,7 @@ export default {
|
|||
},
|
||||
// 高亮文本
|
||||
highlightText(text, keyword) {
|
||||
console.log("vvvvvvvvvvv",text,keyword)
|
||||
// console.log("vvvvvvvvvvv",text,keyword)
|
||||
if (!keyword) return text
|
||||
const reg = new RegExp(keyword, 'gi')
|
||||
return text.replace(reg, match => `<span class="highlight-text">${match}</span>`)
|
||||
|
|
|
|||
Loading…
Reference in New Issue