add:子卷包装页面增加调用MES接口
This commit is contained in:
@@ -206,6 +206,14 @@
|
||||
{{ new Date(scope.row.create_time).toLocaleString() }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作">
|
||||
<template scope="scope">
|
||||
<el-button v-if="scope.row.result==false && scope.row.url" type="danger"
|
||||
class="filter-item"
|
||||
size="mini" icon="el-icon-position"
|
||||
@click.native.prevent="syncMes(scope.row)">同步</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<span slot="footer" class="dialog-footer">
|
||||
@@ -789,6 +797,20 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
async syncMes(row) {
|
||||
const url = 'http://10.1.3.16:8081/'+row.url
|
||||
const response = await fetch(url, {
|
||||
method: 'POST', // *GET, POST, PUT, DELETE, etc.
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
// 'Content-Type': 'application/x-www-form-urlencoded',
|
||||
},
|
||||
body: JSON.stringify(row.param) // body 数据类型必须与“Content-Type”头匹配
|
||||
});
|
||||
const data = await response.json();
|
||||
window.alert(JSON.stringify(data))
|
||||
},
|
||||
|
||||
initQuery() {
|
||||
const end = new Date()
|
||||
const start = new Date()
|
||||
|
||||
Reference in New Issue
Block a user