| | |
| | | <el-table-column prop="barcode" :label="$t('Complete')">
|
| | | <template slot-scope='scope'>
|
| | | <el-button type="primary" style="padding: 4px 10px;font-size: 12px;" :disabled="!isAllowQueue"
|
| | | @click="CompleteQueue(scope.row.id,scope.row.barcode)">{{ $t('Complete') }}</el-button>
|
| | | @click="CompleteQueue(scope.row.id,scope.row.barcode,scope.row.glassId)">{{ $t('Complete') }}</el-button>
|
| | | </template>
|
| | | </el-table-column>
|
| | | <el-table-column :width="280" :label="$t('Operate')">
|
| | |
| | | created() {
|
| | | this.load();
|
| | | this.init();
|
| | | setInterval(() => {
|
| | | if(socket.readyState != 1){
|
| | | this.init();
|
| | | }
|
| | | }, 20000);
|
| | | }
|
| | | ,
|
| | | methods: {
|
| | |
| | | //打开事件
|
| | | socket.onopen = function () {
|
| | | console.log("websocket已打开");
|
| | | // setInterval(()=>{
|
| | | // if(socket){
|
| | | // if(socket.readyState==socket.OPEN){
|
| | | // socket.send('');
|
| | | // }
|
| | | // }
|
| | | // },5000);
|
| | | };
|
| | | // 浏览器端收消息,获得从服务端发送过来的文本消息
|
| | | socket.onmessage = function (msg) {
|
| | |
| | | this.form5 = {};
|
| | | },
|
| | | //手动完成出片任务
|
| | | CompleteQueue(id,frameid) {
|
| | | CompleteQueue(id,frameid).then(res => {
|
| | | CompleteQueue(id,frameid,glassid) {
|
| | | CompleteQueue(id,frameid,glassid).then(res => {
|
| | | if (res.data.message == 200) {
|
| | | this.$message.success(this.$t('Operation successful'));
|
| | | }
|