|
|
|
@ -37,8 +37,9 @@ |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item :label="'停机代码:'"> |
|
|
|
<el-input @keyup.enter.native="getDownTimeDesc" v-model="pageData.downTimeCode" style="width: 100px"></el-input> |
|
|
|
<el-form-item> |
|
|
|
<span slot="label" style="" @click="getBaseList(90)"><a herf="#">停机代码:</a></span> |
|
|
|
<el-input @keyup.enter.native="getDownTimeDesc" @click="getDownTimeDesc" v-model="pageData.downTimeCode" style="width: 100px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="16"> |
|
|
|
@ -52,16 +53,7 @@ |
|
|
|
<el-container style="margin-left: 50px;"> |
|
|
|
<el-form :inline="true" label-position="top" label-width="80px"> |
|
|
|
<!-- 不良代码 和日期 --> |
|
|
|
<el-row> |
|
|
|
<el-col> |
|
|
|
<el-form-item style="margin-top: 10px;"> |
|
|
|
<el-button type="primary" |
|
|
|
style="margin-left: -10px; margin-bottom: 5px;"> |
|
|
|
列表</el-button> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<el-row style="margin-top: 0px;"> |
|
|
|
<el-col> |
|
|
|
<el-form-item style="margin-top: 15px;"> |
|
|
|
<el-button @click="reportDownTimeFun" type="primary" |
|
|
|
@ -70,11 +62,11 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<el-row style="margin-top: 15px;"> |
|
|
|
<el-col> |
|
|
|
<el-form-item style="margin-top: 15px;"> |
|
|
|
<el-button type="primary" @click="closeDialog" |
|
|
|
style="margin-left: -10px; margin-bottom: 5px;"> |
|
|
|
style="margin-left: -10px; margin-bottom: 10px;"> |
|
|
|
关闭</el-button> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
@ -85,11 +77,14 @@ |
|
|
|
</el-container> |
|
|
|
|
|
|
|
</el-dialog> |
|
|
|
<!--列表的组件--> |
|
|
|
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import { |
|
|
|
import Chooselist from '@/views/modules/common/Chooselist';/*列表组件*/ |
|
|
|
import { |
|
|
|
checkDownTimeCode, |
|
|
|
reportDownTime, |
|
|
|
} |
|
|
|
@ -153,6 +148,10 @@ export default { |
|
|
|
dataListLoading: false, |
|
|
|
} |
|
|
|
}, |
|
|
|
/*组件*/ |
|
|
|
components: { |
|
|
|
Chooselist,/*列表的组件*/ |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
|
|
|
|
//初始化组件的参数 |
|
|
|
@ -187,14 +186,10 @@ export default { |
|
|
|
|
|
|
|
/*检查停机代码*/ |
|
|
|
getDownTimeDesc(){ |
|
|
|
if(this.pageData.downTimeCode == null || this.pageData.downTimeCode == ''){ |
|
|
|
this.$message.error('请扫描停机代码!'); |
|
|
|
return false; |
|
|
|
} |
|
|
|
checkDownTimeCode(this.pageData).then(({data}) => { |
|
|
|
//判断是否存在异常 |
|
|
|
if(data.code == 500){ |
|
|
|
this.$message.error(data.msg); |
|
|
|
//this.$message.error(data.msg); |
|
|
|
}else{ |
|
|
|
let resultMap = data.resultMap; |
|
|
|
this.pageData.downTimeDesc = resultMap.downTimeDesc; |
|
|
|
@ -217,15 +212,25 @@ export default { |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
/*列表方法的回调*/ |
|
|
|
getBaseData(val){ |
|
|
|
if (this.tagNo === 90){ |
|
|
|
this.pageData.downTimeCode = val.ReasonCode; |
|
|
|
this.pageData.downTimeDesc = val.ReasonDescription; |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 获取基础数据列表 |
|
|
|
getBaseList(val){ |
|
|
|
this.tagNo = val |
|
|
|
this.$nextTick(() => { |
|
|
|
let strVal = ""; |
|
|
|
if (val === 90){ |
|
|
|
strVal = this.pageData.downTimeCode; |
|
|
|
} |
|
|
|
this.$refs.baseList.init(val, strVal) |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
}, |
|
|
|
created() { |
|
|
|
|