diff --git a/pages.json b/pages.json
index 277aa7d..f90d8ee 100644
--- a/pages.json
+++ b/pages.json
@@ -56,6 +56,22 @@
}
}
+ ,{
+ "path" : "pages/modules/command-manage",
+ "style" :
+ {
+ "navigationStyle": "custom"
+ }
+
+ }
+ ,{
+ "path" : "pages/modules/task-manage",
+ "style" :
+ {
+ "navigationStyle": "custom"
+ }
+
+ }
],
"globalStyle": {
// "pageOrientation": "landscape",
diff --git a/pages/home/home.vue b/pages/home/home.vue
index 68f7ebb..9ea4e54 100644
--- a/pages/home/home.vue
+++ b/pages/home/home.vue
@@ -35,7 +35,9 @@
{id: '1', name: '工单管理', icon: 'RF01', path: '/pages/modules/man-paichan'},
{id: '2', name: '涂线板', icon: 'RF02', path: '/pages/modules/wire-board'},
{id: '3', name: '物料库存', icon: 'RF03', path: '/pages/modules/mater-inventory'},
- {id: '4', name: '库存管理', icon: 'RF04', path: '/pages/modules/point-manage'}
+ {id: '4', name: '库存管理', icon: 'RF04', path: '/pages/modules/point-manage'},
+ {id: '5', name: '指令管理', icon: 'RF05', path: '/pages/modules/command-manage'},
+ {id: '6', name: '任务管理', icon: 'RF06', path: '/pages/modules/task-manage'}
]
};
},
diff --git a/pages/login/setup.vue b/pages/login/setup.vue
index 8b88e02..dd828ba 100644
--- a/pages/login/setup.vue
+++ b/pages/login/setup.vue
@@ -3,17 +3,19 @@
-
- 服务器地址
+
+ LMS地址
-
-
+
+
@@ -29,9 +31,8 @@
},
data() {
return {
- options: [],
- index: '',
addrip: this.$store.getters.baseUrl,
+ acsip: this.$store.getters.acsUrl,
setTime: this.$store.getters.setTime / 1000
};
},
@@ -49,15 +50,22 @@
})
return
}
- if (this.setTime === '') {
+ if (this.acsip === '') {
uni.showToast({
- title: '请填写刷新时间',
+ title: '请填写ACS地址',
icon: 'none'
})
return
}
+ // if (this.setTime === '') {
+ // uni.showToast({
+ // title: '请填写刷新时间',
+ // icon: 'none'
+ // })
+ // return
+ // }
// 存值
- this.$store.dispatch('setConfig',{baseUrl: this.addrip, setTime: this.setTime * 1000, setPrintName: this.index})
+ this.$store.dispatch('setConfig',{baseUrl: this.addrip, acsUrl: this.acsip, setTime: this.setTime * 1000})
uni.redirectTo({
url: '/pages/login/login'
})
@@ -68,15 +76,16 @@
diff --git a/pages/modules/command-manage.vue b/pages/modules/command-manage.vue
new file mode 100644
index 0000000..22a4307
--- /dev/null
+++ b/pages/modules/command-manage.vue
@@ -0,0 +1,166 @@
+
+
+
+
+
+
+ 关键字
+
+
+
+
+
+ 起始设备
+
+
+
+
+
+ 目标设备
+
+
+
+
+
+
+
+
+
+
+ | 任务号 |
+ 指令号 |
+ 起点 |
+ 终点 |
+ 状态 |
+ 执行步骤 |
+ 载具号 |
+ 优先级 |
+ 时间 |
+ agv车号 |
+
+
+
+
+ | {{e.task_no}} |
+ {{e.instruction_code}} |
+ {{e.start_devicecode}} |
+ {{e.next_devicecode}} |
+ {{e.inst_status_name}} |
+ {{e.inst_step}} |
+ {{e.carrier}} |
+ {{e.priority}} |
+ {{e.create_time}} |
+ {{e.carno}} |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/modules/task-manage.vue b/pages/modules/task-manage.vue
new file mode 100644
index 0000000..cf1e1b0
--- /dev/null
+++ b/pages/modules/task-manage.vue
@@ -0,0 +1,151 @@
+
+
+
+
+
+
+ 关键字
+
+
+
+
+
+ 起始设备
+
+
+
+
+
+ 目标设备
+
+
+
+
+
+
+
+
+
+
+ | 任务号 |
+ 起点 |
+ 终点 |
+ 状态 |
+ 优先级 |
+ 时间 |
+ 载具号 |
+
+
+
+
+ | {{e.task_no}} |
+ {{e.start_devicecode}} |
+ {{e.next_devicecode}} |
+ {{e.task_status_name}} |
+ {{e.priority}} |
+ {{e.create_time}} |
+ {{e.carrier}} |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/static/image/menu/RF02.png b/static/image/menu/RF02.png
index ab42ca3..1bc47ed 100644
Binary files a/static/image/menu/RF02.png and b/static/image/menu/RF02.png differ
diff --git a/static/image/menu/RF03.png b/static/image/menu/RF03.png
index 796026f..f5ea753 100644
Binary files a/static/image/menu/RF03.png and b/static/image/menu/RF03.png differ
diff --git a/static/image/menu/RF05.png b/static/image/menu/RF05.png
new file mode 100644
index 0000000..4de6e93
Binary files /dev/null and b/static/image/menu/RF05.png differ
diff --git a/static/image/menu/RF06.png b/static/image/menu/RF06.png
new file mode 100644
index 0000000..b48d6da
Binary files /dev/null and b/static/image/menu/RF06.png differ
diff --git a/utils/getData1.js b/utils/getData1.js
deleted file mode 100644
index b8e2f24..0000000
--- a/utils/getData1.js
+++ /dev/null
@@ -1 +0,0 @@
-import request from './request.js'
diff --git a/utils/getData2.js b/utils/getData2.js
index f67763b..31cba85 100644
--- a/utils/getData2.js
+++ b/utils/getData2.js
@@ -1,5 +1,4 @@
import request from './request.js'
-import request1 from './request1.js'
// 版本更新测试
export const pdaUpdate = () => request({
@@ -97,4 +96,49 @@ export const changePointQty = (id, qty) => request({
group_id: id,
qty: qty
}
+})
+
+/**
+ * 指令管理
+ */
+// 1.1 查询未完成指令(生成任务号为-开头)
+export const handInsts = (key, scode, ncode) => request({
+ url:'api/hand/insts',
+ acsurl: true,
+ data: {
+ keyword: key,
+ start_devicecode: scode,
+ next_devicecode: ncode
+ }
+})
+// 1.2 指令操作
+export const handInst = (type, id) => request({
+ url:'api/hand/inst',
+ acsurl: true,
+ data: {
+ type: type,
+ inst_uuid: id
+ }
+})
+/**
+ * 任务管理
+ */
+// 1.1 1.1 查询无指令的任务(任务号为-开头)
+export const handTasks = (key, scode, ncode) => request({
+ url:'api/hand/tasks',
+ acsurl: true,
+ data: {
+ keyword: key,
+ start_devicecode: scode,
+ next_devicecode: ncode
+ }
+})
+// 1.2 任务操作
+export const handTaskoperation = (type, id) => request({
+ url:'api/hand/taskoperation',
+ acsurl: true,
+ data: {
+ type: type,
+ task_uuid: id
+ }
})
\ No newline at end of file
diff --git a/utils/request.js b/utils/request.js
index a924e7c..f56c5ba 100644
--- a/utils/request.js
+++ b/utils/request.js
@@ -5,6 +5,7 @@ const request = (params) => {
let url = params.url;
let method = params.method || 'POST';
let data = params.data || {};
+ let acsurl = params.acsurl
// data.token = "default-access_token"
// if (!params.token) {
// let token = uni.getStorageSync('token');
@@ -34,7 +35,10 @@ const request = (params) => {
}
// data = qs.stringify(data)
}
- const requestUrl = `${store.getters.baseUrl}/` + url;
+ let requestUrl = `${store.getters.baseUrl}/` + url;
+ if (acsurl) {
+ requestUrl = `${store.getters.acsUrl}/` + url;
+ }
uni.showLoading({
title: '加载中...'
});
diff --git a/utils/request1.js b/utils/request1.js
deleted file mode 100644
index 6f36217..0000000
--- a/utils/request1.js
+++ /dev/null
@@ -1,126 +0,0 @@
-import store from '@/vuex/store'
-const request1 = (params) => {
- let _self = this;
- let url = params.url;
- let method = params.method || 'POST';
- let data = params.data || {};
- // data.token = "default-access_token"
- // if (!params.token) {
- // let token = uni.getStorageSync('token');
- // if (!token) {
- // uni.navigateTo({
- // url: '/pages/login/login'
- // });
- // } else {
- // data.token = '179509245-9c91827e0224bdc18d0b118b8be1b5af';
- // }
- // }
- let token = ''
- if (store.getters.saveToken !== '') {
- token = store.getters.saveToken
- }
- let defaultOpot = {
- // 'Content-Type': 'application/x-www-form-urlencoded',
- 'Terminal-Type': 'innerH5',
- 'Content-Type': 'application/json;charset=UTF-8',
- }
- let header = {}
- method = method.toUpperCase()
- if (method == 'POST') {
- header = {
- 'Content-Type': 'application/json;charset=UTF-8',
- 'Authorization': token
- }
- // data = qs.stringify(data)
- }
- const requestUrl = url;
- uni.showLoading({
- title: '加载中...'
- });
- return new Promise((resolve, reject) => {
- uni.request({
- url: requestUrl,
- method: method,
- header: Object.assign({}, defaultOpot, header),
- data: data,
- dataType: 'json',
- })
- .then(res => { // 成功
- if (res.length === 1) {
- uni.showModal({
- content: 'request:fail',
- showCancel: false
- })
- reject('request:fail')
- } else if (res[1] && res[1].statusCode === 400) {
- uni.showModal({
- content: res[1].data.message,
- showCancel: false
- })
- reject(res[1].data.message)
- } else if (res[1] && res[1].statusCode === 401) {
- uni.showModal({
- content: res[1].data.message,
- showCancel: false
- })
- store.dispatch('delUserInfo', '')
- uni.redirectTo({
- url: '/pages/login/login'
- })
- } else if (res[1] && res[1].statusCode === 200) {
- let {
- data: dataType
- } = res[1]
- resolve(dataType)
- // switch (dataType.code * 1) { // 拦截返回参数
- // case 0:
- // resolve(dataType)
- // break;
- // case 1003:
- // uni.showModal({
- // title: '登录已过期',
- // content: '很抱歉,登录已过期,请重新登录',
- // confirmText: '重新登录',
- // success: function(res) {
- // if (res.confirm) {
- // uni.navigateTo({
- // // 切记这儿需要哈pages.json保持一致;不能有.vue后缀
- // url: '/pages/login/login'
- // });
- // } else if (res.cancel) {
- // console.log('用户点击取消');
- // }
- // }
- // })
- // break;
- // case -1:
- // uni.showModal({
- // title: '请求数据失败',
- // content: '获取数据失败!',
- // confirmText: '确定',
- // showCancel: false,
- // success: function(res) {
- // if (res.confirm) {} else if (res.cancel) {
- // console.log('用户点击取消');
- // }
- // }
- // })
- // break
- // }
- }else {
- uni.showModal({
- content: res[1].data.message,
- showCancel: false
- })
- reject(res[1].data.message)
- }
- })
- .catch(err => { // 错误
- reject(err)
- })
- .finally(() => {
- uni.hideLoading();
- })
- })
-}
-export default request1
\ No newline at end of file
diff --git a/vuex/modules/user.js b/vuex/modules/user.js
index 0e70daa..995dbca 100644
--- a/vuex/modules/user.js
+++ b/vuex/modules/user.js
@@ -1,8 +1,10 @@
import * as types from '../types'
const baseUrl = process.env.NODE_ENV === 'development' ? 'http://10.1.3.90:8010' : 'http://10.1.3.90:8010'
+const acsUrl = process.env.NODE_ENV === 'development' ? 'http://10.1.3.90:8010' : 'http://10.1.3.90:8010'
const state = {
baseUrl: uni.getStorageSync('baseUrl') || baseUrl,
+ acsUrl: uni.getStorageSync('acsUrl') || acsUrl,
setTime: uni.getStorageSync('setTime') || 5000,
setPrintName: uni.getStorageSync('setPrintName') || '',
loginName: uni.getStorageSync('loginName') ? uni.getStorageSync('loginName') : '',
@@ -11,6 +13,7 @@ const state = {
}
const getters = {
baseUrl: state => state.baseUrl,
+ acsUrl: state => state.acsUrl,
setTime: state => state.setTime,
setPrintName: state => state.setPrintName,
loginName: state => state.loginName,
@@ -20,6 +23,7 @@ const getters = {
const actions = {
setConfig ({commit}, res) {
uni.setStorageSync('baseUrl', res.baseUrl)
+ uni.setStorageSync('acsUrl', res.acsUrl)
uni.setStorageSync('setTime', res.setTime)
uni.setStorageSync('setPrintName', res.setPrintName)
commit(types.COM_CONFIG, res)
@@ -49,6 +53,7 @@ const actions = {
const mutations = {
[types.COM_CONFIG] (state, res) {
state.baseUrl = res.baseUrl
+ state.acsUrl = res.acsUrl
state.setTime = res.setTime
state.setPrintName = res.setPrintName
},