Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mes-pad
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ximai
mes-pad
Commits
97a0ed43
Commit
97a0ed43
authored
Feb 24, 2024
by
李驰骋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
登录改为选择作业单元
parent
d0ca3384
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
219 additions
and
209 deletions
+219
-209
http.api.js
common/http.api.js
+2
-0
index.vue
pages/index/index.vue
+204
-198
index.vue
pages/mes/prodReport/index.vue
+9
-8
index.js
store/index.js
+4
-3
No files found.
common/http.api.js
View file @
97a0ed43
...
...
@@ -26,6 +26,8 @@ const install = (Vue, vm) => {
params
),
getWorkstationList
:
(
params
=
{})
=>
vm
.
$u
.
get
(
config
.
adminPath
+
'/mobile/md/workstation/getWorkstationList'
,
params
),
getWorkUnitList
:
(
params
=
{})
=>
vm
.
$u
.
get
(
config
.
adminPath
+
'/md/workunit/getListByUser'
,
params
),
/**
* 生产管理相关API
**/
...
...
pages/index/index.vue
View file @
97a0ed43
This diff is collapsed.
Click to expand it.
pages/mes/prodReport/index.vue
View file @
97a0ed43
...
...
@@ -63,9 +63,9 @@
</view>
<view
class=
"prod-body-right"
>
<view
style=
"text-align: center;line-height: 80rpx;font-size: 28rpx;font-weight: 600;"
>
{{
this
.
vuex_work
station
==
null
?
'请选择工作站'
:
this
.
vuex_workstation
.
workstation
Name
}}
{{
this
.
vuex_work
unit
==
null
?
'请选择工作单元'
:
this
.
vuex_workunit
.
workunit
Name
}}
</view>
<u-button
type=
"primary"
@
click=
"changeWorkstation"
>
切换工作
站
</u-button>
<u-button
type=
"primary"
@
click=
"changeWorkstation"
>
切换工作
单元
</u-button>
<br/>
<u-button
type=
"warning"
@
click=
"commonClick('KnifeTemp')"
>
刀模版上下机
</u-button>
<u-button
type=
"primary"
@
click=
"commonClick('Refresh')"
>
刷新
</u-button>
...
...
@@ -716,7 +716,7 @@ export default {
}
},
mounted
()
{
//监听工作站切换事件
uni
.
$on
(
'switchWork
station
'
,
(
station
)
=>
{
uni
.
$on
(
'switchWork
unit
'
,
(
station
)
=>
{
this
.
getTaskList
();
})
},
...
...
@@ -728,7 +728,7 @@ export default {
}
})
//监听工作站切换事件
uni
.
$on
(
'switchWork
station
'
,
(
station
)
=>
{
uni
.
$on
(
'switchWork
unit
'
,
(
station
)
=>
{
// this.reset();
this
.
getTaskList
();
})
...
...
@@ -737,7 +737,7 @@ export default {
this
.
getTaskList
();
//刷新任务状态
})
if
(
this
.
vuex_work
station
!=
null
)
{
if
(
this
.
vuex_work
unit
!=
null
)
{
this
.
getTaskList
();
}
// if (this.vuex_task != null) {
...
...
@@ -745,7 +745,7 @@ export default {
// }
},
destroyed
()
{
uni
.
$off
(
'switchWork
station
'
);
uni
.
$off
(
'switchWork
unit
'
);
uni
.
$off
(
'taskStatusChanged'
);
},
methods
:
{
...
...
@@ -759,7 +759,7 @@ export default {
console
.
log
(
'99999999'
,
arg
)
},
changeWorkstation
()
{
uni
.
$emit
(
'changeWork
station
'
);
uni
.
$emit
(
'changeWork
unit
'
);
},
commonClick
(
oper
)
{
if
([
'Refresh'
,
'MaterialUsageRecord'
].
indexOf
(
oper
)
===
-
1
&&
this
.
tableSelectData
.
length
===
0
)
{
...
...
@@ -929,8 +929,9 @@ export default {
},
getTaskList
()
{
this
.
form
=
{}
const
t
=
this
;
this
.
$u
.
api
.
getTaskList
({
work
stationId
:
this
.
vuex_workstation
.
workstation
Id
,
work
unitId
:
t
.
vuex_workunit
.
workunit
Id
,
}).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
this
.
tableData
=
res
.
rows
;
...
...
store/index.js
View file @
97a0ed43
...
...
@@ -12,7 +12,7 @@ try{
// 尝试获取本地是否存在lifeData变量,第一次启动APP时是不存在的
lifeData
=
uni
.
getStorageSync
(
'lifeData'
);
}
catch
(
e
){
}
// 需要永久存储,且下次APP启动需要取出的,在state中的变量名
...
...
@@ -41,14 +41,15 @@ const store = new Vuex.Store({
vuex_remember
:
lifeData
.
vuex_remember
?
lifeData
.
vuex_remember
:
''
,
vuex_locale
:
lifeData
.
vuex_locale
?
lifeData
.
vuex_locale
:
''
,
vuex_isAgent
:
lifeData
.
vuex_isAgent
?
lifeData
.
vuex_isAgent
:
''
,
// 如果vuex_version无需保存到本地永久存储,无需lifeData.vuex_version方式
vuex_config
:
config
,
//当前设备绑定的工作站
vuex_workstation
:
null
,
vuex_workunit
:
null
,
//当前工作站正在进行的生产任务
vuex_task
:
null
,
// 自定义tabbar数据
// vuex_tabbar: [{
// iconPath: "/static/uview/example/component.png",
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment