修改敏感元器件
This commit is contained in:
@@ -4,32 +4,18 @@
|
||||
<el-form label-width='auto' :inline='true'>
|
||||
<el-form-item label='生产线'>
|
||||
<el-select v-model='form.productLineId'>
|
||||
<el-option
|
||||
v-for='item in productLineOptions'
|
||||
:key='item.id'
|
||||
:label='item.name'
|
||||
:value='item.id'
|
||||
/>
|
||||
<el-option v-for='item in productLineOptions' :key='item.id' :label='item.name'
|
||||
:value='item.id' />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label='终端'>
|
||||
<el-select v-model='form.machineId' placeholder='暂无终端'>
|
||||
<el-option
|
||||
v-for='item in machineOptions'
|
||||
:key='item.id'
|
||||
:label='item.name'
|
||||
:value='item.id'
|
||||
/>
|
||||
<el-option v-for='item in machineOptions' :key='item.id' :label='item.name' :value='item.id' />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label='敏感元器件'>
|
||||
<el-select v-model='form.unitId' placeholder='暂无元器件'>
|
||||
<el-option
|
||||
v-for='item in unitOptions'
|
||||
:key='item.id'
|
||||
:label='item.name'
|
||||
:value='item.id'
|
||||
/>
|
||||
<el-select v-model='form.unitId' placeholder='暂无元器件' @change="changeUnit" clearable>
|
||||
<el-option v-for='item in unitOptions' :key='item.id' :label='item.name' :value='item.id' />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@@ -59,12 +45,12 @@
|
||||
<div>
|
||||
<div>
|
||||
<el-input-number v-model='unit.vtcAmpUpper' controls-position='right'
|
||||
@change='reDrawPic' />
|
||||
@change='reDrawPic' />
|
||||
<span class='ml10' style='color: #333'>p.u.</span>
|
||||
</div>
|
||||
<div class='mt10'>
|
||||
<el-input-number v-model='unit.vtcTimeUpper' controls-position='right'
|
||||
@change='reDrawPic' />
|
||||
@change='reDrawPic' />
|
||||
<span class='ml10' style='color: #333'>ms</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -73,12 +59,12 @@
|
||||
<div>
|
||||
<div>
|
||||
<el-input-number v-model='unit.vtcAmpLower' controls-position='right'
|
||||
@change='reDrawPic' />
|
||||
@change='reDrawPic' />
|
||||
<span class='ml10' style='color: #333'>p.u.</span>
|
||||
</div>
|
||||
<div class='mt10'>
|
||||
<el-input-number v-model='unit.vtcTimeLower' controls-position='right'
|
||||
@change='reDrawPic' />
|
||||
@change='reDrawPic' />
|
||||
<span class='ml10' style='color: #333'>ms</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -153,8 +139,9 @@ const search = async (id: string, beginTime: string, endTime: string) => {
|
||||
unitOptions.value = res.data
|
||||
if (unitOptions.value.length > 0) {
|
||||
form.unitId = unitOptions.value[0].id
|
||||
unit.value = unitOptions.value[0]
|
||||
unit.value = JSON.parse(JSON.stringify(unitOptions.value[0]))
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
const data = {
|
||||
@@ -168,6 +155,13 @@ const search = async (id: string, beginTime: string, endTime: string) => {
|
||||
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()
|
||||
@@ -178,7 +172,7 @@ const initOptions = () => {
|
||||
left: '10px'
|
||||
},
|
||||
tooltip: {
|
||||
formatter: function(a: any) {
|
||||
formatter: function (a: any) {
|
||||
if (a[0].value[3] == undefined) {
|
||||
return
|
||||
}
|
||||
@@ -209,7 +203,7 @@ const initOptions = () => {
|
||||
series: [
|
||||
{
|
||||
type: 'line',
|
||||
color:'#ff0000',
|
||||
color: '#ff0000',
|
||||
data: [
|
||||
[unit.value.vtcTimeUpper / 1000, 0],
|
||||
[unit.value.vtcTimeUpper / 1000, unit.value.vtcAmpUpper],
|
||||
@@ -222,7 +216,7 @@ const initOptions = () => {
|
||||
},
|
||||
{
|
||||
type: 'line',
|
||||
color:'#ff0000',
|
||||
color: '#ff0000',
|
||||
data: [
|
||||
[unit.value.vtcTimeLower / 1000, 0],
|
||||
[unit.value.vtcTimeLower / 1000, unit.value.vtcAmpLower],
|
||||
@@ -261,9 +255,9 @@ const initOptions = () => {
|
||||
const reDrawPic = () => {
|
||||
//清洗要显示的数据
|
||||
if (eventData.value.length > 0) {
|
||||
unOverEvent.value=[]
|
||||
overEvent.value=[]
|
||||
unKnownEvent.value=[]
|
||||
unOverEvent.value = []
|
||||
overEvent.value = []
|
||||
unKnownEvent.value = []
|
||||
for (let event of eventData.value) {
|
||||
//判断落在哪个区域内
|
||||
let eventTime = Number(event.duration) / 1000
|
||||
|
||||
Reference in New Issue
Block a user