This commit is contained in:
liushuai
2019-11-02 12:42:08 +08:00
parent 65dca8fb90
commit 25983b8e49
3 changed files with 6 additions and 5 deletions

View File

@@ -4,6 +4,7 @@ export const wsuri = `ws://192.168.1.232:61101//WebMoudule//websocket`
export const name = `OP8888` export const name = `OP8888`
export const name1 = `OP1000` export const name1 = `OP1000`
export const name3 = `OP2000` export const name3 = `OP2000`
export const name4 = `OP9999`
// 创建axios实例 // 创建axios实例
export const readFile = `http://192.168.1.231:8411/webpage/file/` // invoice export const readFile = `http://192.168.1.231:8411/webpage/file/` // invoice

View File

@@ -117,7 +117,7 @@
import { getMachines, getGroups, getTable, gettabledata1, submitEdit, searchPartNumber } from '@/api/ManufacturingCenter/MaterialArrival' import { getMachines, getGroups, getTable, gettabledata1, submitEdit, searchPartNumber } from '@/api/ManufacturingCenter/MaterialArrival'
import Cookie from 'js-cookie' import Cookie from 'js-cookie'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import { wsuri, name } from '@/utils/request' import { wsuri, name4 } from '@/utils/request'
export default { export default {
data() { data() {
@@ -304,7 +304,7 @@ export default {
// 打开 // 打开
websocketopen() { websocketopen() {
console.log('WebSocket连接成功') console.log('WebSocket连接成功')
this.websock.send('{<' + name + '>}') this.websock.send('{<' + name4 + '>}')
}, },
// 数据接收 // 数据接收
websocketonmessage(msg) { websocketonmessage(msg) {
@@ -340,7 +340,7 @@ export default {
}, },
getRow(row) { getRow(row) {
this.processSerialNumber = row.工序流水号 this.processSerialNumber = row.工序流水号
row.完成时间 ? this.Name = 1 : this.Name = 0 row.完成日期 ? this.Name = 1 : this.Name = 0
}, },
handleSizeChange(val) { handleSizeChange(val) {
this.pageSize = val this.pageSize = val

View File

@@ -355,11 +355,11 @@ export default {
}, },
save() { save() {
for (let i = 0; i < this.multipleSelection.length; i++) { for (let i = 0; i < this.multipleSelection.length; i++) {
if (this.multipleSelection[i].人员编号 === '') { if (this.multipleSelection[i].工艺员 === '') {
this.$message.error('请选择工艺员') this.$message.error('请选择工艺员')
} else { } else {
this.result = 0 this.result = 0
save(this.multipleSelection[i].工艺计划流水号, this.multipleSelection[i].人员编号, this.multipleSelection[i].零件号).then(response => { save(this.multipleSelection[i].工艺计划流水号, this.multipleSelection[i].工艺员, this.multipleSelection[i].零件号).then(response => {
this.result += parseInt(response.data[0].result) this.result += parseInt(response.data[0].result)
if (this.result === this.multipleSelection.length) { if (this.result === this.multipleSelection.length) {
this.$message.success('保存成功') this.$message.success('保存成功')