修改敏感元器件
This commit is contained in:
@@ -4,32 +4,18 @@
|
|||||||
<el-form label-width='auto' :inline='true'>
|
<el-form label-width='auto' :inline='true'>
|
||||||
<el-form-item label='生产线'>
|
<el-form-item label='生产线'>
|
||||||
<el-select v-model='form.productLineId'>
|
<el-select v-model='form.productLineId'>
|
||||||
<el-option
|
<el-option v-for='item in productLineOptions' :key='item.id' :label='item.name'
|
||||||
v-for='item in productLineOptions'
|
:value='item.id' />
|
||||||
:key='item.id'
|
|
||||||
:label='item.name'
|
|
||||||
:value='item.id'
|
|
||||||
/>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label='终端'>
|
<el-form-item label='终端'>
|
||||||
<el-select v-model='form.machineId' placeholder='暂无终端'>
|
<el-select v-model='form.machineId' placeholder='暂无终端'>
|
||||||
<el-option
|
<el-option v-for='item in machineOptions' :key='item.id' :label='item.name' :value='item.id' />
|
||||||
v-for='item in machineOptions'
|
|
||||||
:key='item.id'
|
|
||||||
:label='item.name'
|
|
||||||
:value='item.id'
|
|
||||||
/>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label='敏感元器件'>
|
<el-form-item label='敏感元器件'>
|
||||||
<el-select v-model='form.unitId' placeholder='暂无元器件'>
|
<el-select v-model='form.unitId' placeholder='暂无元器件' @change="changeUnit" clearable>
|
||||||
<el-option
|
<el-option v-for='item in unitOptions' :key='item.id' :label='item.name' :value='item.id' />
|
||||||
v-for='item in unitOptions'
|
|
||||||
:key='item.id'
|
|
||||||
:label='item.name'
|
|
||||||
:value='item.id'
|
|
||||||
/>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
@@ -153,8 +139,9 @@ const search = async (id: string, beginTime: string, endTime: string) => {
|
|||||||
unitOptions.value = res.data
|
unitOptions.value = res.data
|
||||||
if (unitOptions.value.length > 0) {
|
if (unitOptions.value.length > 0) {
|
||||||
form.unitId = unitOptions.value[0].id
|
form.unitId = unitOptions.value[0].id
|
||||||
unit.value = unitOptions.value[0]
|
unit.value = JSON.parse(JSON.stringify(unitOptions.value[0]))
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
const data = {
|
const data = {
|
||||||
@@ -168,6 +155,13 @@ const search = async (id: string, beginTime: string, endTime: string) => {
|
|||||||
reDrawPic()
|
reDrawPic()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
const changeUnit = (id: any) => {
|
||||||
|
if (id == undefined) return
|
||||||
|
let list = unitOptions.value.filter((item: any) => item.id == id)
|
||||||
|
unit.value = JSON.parse(JSON.stringify(list[0]))
|
||||||
|
reDrawPic()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const options = ref()
|
const options = ref()
|
||||||
|
|||||||
Reference in New Issue
Block a user