Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MES_PAD
Project
Project
Details
Activity
Releases
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
Administrator
MES_PAD
Commits
ace52c26
Commit
ace52c26
authored
Jan 10, 2019
by
王文琼
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
搜索栏优化,等
parent
486eec8b
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
234 additions
and
217 deletions
+234
-217
index.js
dest/js/index/index.js
+220
-213
FormingV2.js
dest/js/mes/FormingV2.js
+3
-1
NeedleMatch.js
dest/js/mes/NeedleMatch.js
+2
-0
NeedlecarHandover.js
dest/js/mes/NeedlecarHandover.js
+2
-0
NeedlecarreportV2.js
dest/js/mes/NeedlecarreportV2.js
+2
-0
cutting.js
dest/js/mes/cutting.js
+1
-0
update.min.js
dest/js/update.min.js
+2
-1
work.html
html/work.html
+1
-1
manifest.json
manifest.json
+1
-1
No files found.
dest/js/index/index.js
View file @
ace52c26
var
minepage_style
=
{
top
:
"0px"
,
top
:
"0px"
,
bottom
:
'0px'
};
mui
.
init
();
var
subpages
=
[{
url
:
'html/message.html'
,
id
:
'message'
},
{
url
:
'html/task.html'
,
id
:
'task'
},
{
url
:
'html/application.html'
,
id
:
'application'
},
{
url
:
'html/mine.html'
,
id
:
'mine'
}];
var
subpage_style
=
{
// top:"44px",
top
:
'0px'
,
};
mui
.
init
();
var
subpages
=
[{
url
:
'html/message.html'
,
id
:
'message'
},
{
url
:
'html/task.html'
,
id
:
'task'
},
{
url
:
'html/application.html'
,
id
:
'application'
},
{
url
:
'html/mine.html'
,
id
:
'mine'
}];
var
subpage_style
=
{
// top:"44px",
top
:
'0px'
,
bottom
:
'0px'
,
navigationbar
:
{
backgroundColor
:
'#1b83fe'
,
titleText
:
''
,
titleColor
:
'#FFFFFF'
,
splitLine
:
{
color
:
'#cccccc'
,
height
:
'1px'
}
}
};
var
aniShow
=
{};
/**
navigationbar
:
{
backgroundColor
:
'#1b83fe'
,
titleText
:
''
,
titleColor
:
'#FFFFFF'
,
splitLine
:
{
color
:
'#cccccc'
,
height
:
'1px'
}
}
};
var
aniShow
=
{};
/**
* 根据id查询子页面的信息
* @param {Object[]} infoList 子页面信息
* @param {String} id 对比的id值
* */
var
getSubInfoById
=
function
(
infoList
,
id
)
{
var
getSubInfoById
=
function
(
infoList
,
id
)
{
var
result
=
null
;
for
(
var
i
=
0
,
length
=
infoList
.
length
;
i
<
length
;
i
+=
1
)
{
for
(
var
i
=
0
,
length
=
infoList
.
length
;
i
<
length
;
i
+=
1
)
{
var
info
=
infoList
[
i
];
if
(
info
.
id
==
id
)
{
if
(
info
.
id
==
id
)
{
result
=
info
;
break
;
}
}
return
result
;
};
//--------------------------------------
var
wgtVer
=
null
;
var
checkUrl
=
"http://11wangjp.oss-cn-shanghai.aliyuncs.com/ftt_mes/version.txt"
;
// 下载wgt文件
var
wgtUrl
=
"http://11wangjp.oss-cn-shanghai.aliyuncs.com/ftt_mes/ftt_mes_hot.wgt"
;
console
.
log
(
"检测更新地址:"
+
wgtUrl
);
function
downWgtHot
(){
};
//--------------------------------------
var
wgtVer
=
null
;
var
t
=
(
new
Date
()).
valueOf
();
var
checkUrl
=
"http://11wangjp.oss-cn-shanghai.aliyuncs.com/ftt_mes/version.txt?data="
+
t
;
// 下载wgt文件
var
wgtUrl
=
"http://11wangjp.oss-cn-shanghai.aliyuncs.com/ftt_mes/ftt_mes_hot.wgt"
;
console
.
log
(
"检测更新地址:"
+
checkUrl
);
function
downWgtHot
()
{
plus
.
nativeUI
.
showWaiting
(
"下载补丁文件..."
);
plus
.
downloader
.
createDownload
(
wgtUrl
,
{
filename
:
"_doc/update/"
},
function
(
d
,
status
){
if
(
status
==
200
)
{
console
.
log
(
"下载补丁成功:"
+
d
.
filename
);
plus
.
downloader
.
createDownload
(
wgtUrl
,
{
filename
:
"_doc/update/"
},
function
(
d
,
status
)
{
if
(
status
==
200
)
{
console
.
log
(
"下载补丁成功:"
+
d
.
filename
);
installWgtHOt
(
d
.
filename
);
// 安装wgt包
}
else
{
console
.
log
(
"下载补丁失败!"
);
...
...
@@ -66,52 +71,54 @@ var minepage_style = {
}
plus
.
nativeUI
.
closeWaiting
();
}).
start
();
}
function
compareVersion
(
ov
,
nv
){
}
if
(
!
ov
||
!
nv
||
ov
==
""
||
nv
==
""
){
function
compareVersion
(
ov
,
nv
)
{
if
(
!
ov
||
!
nv
||
ov
==
""
||
nv
==
""
)
{
return
false
;
}
var
b
=
false
,
ova
=
ov
.
split
(
"."
,
4
),
nva
=
nv
.
split
(
"."
,
4
),
ova
=
ov
.
split
(
"."
,
4
),
nva
=
nv
.
split
(
"."
,
4
),
j
=
ova
.
length
,
k
=
nva
.
length
;
// console.log("ova:"+ova+"nva:"+nva);
for
(
var
i
=
0
;
i
<
j
&&
i
<
k
;
i
+=
1
)
{
for
(
var
i
=
0
;
i
<
j
&&
i
<
k
;
i
+=
1
)
{
var
so
=
ova
[
i
],
no
=
parseInt
(
so
),
sn
=
nva
[
i
],
nn
=
parseInt
(
sn
);
if
(
nn
>
no
||
sn
.
length
>
so
.
length
)
{
if
(
nn
>
no
||
sn
.
length
>
so
.
length
)
{
return
true
;
}
else
if
(
nn
<
no
)
{
}
else
if
(
nn
<
no
)
{
return
false
;
}
}
if
(
k
>
j
&&
0
==
nv
.
indexOf
(
ov
))
{
if
(
k
>
j
&&
0
==
nv
.
indexOf
(
ov
))
{
return
true
;
}
}
function
checkUpdateHot
(){
}
function
checkUpdateHot
()
{
// plus.nativeUI.showWaiting("检测更新...");
var
xhr
=
new
XMLHttpRequest
();
xhr
.
onreadystatechange
=
function
()
{
switch
(
xhr
.
readyState
)
{
var
xhr
=
new
XMLHttpRequest
();
xhr
.
onreadystatechange
=
function
()
{
switch
(
xhr
.
readyState
)
{
case
4
:
plus
.
nativeUI
.
closeWaiting
();
if
(
xhr
.
status
==
200
)
{
console
.
log
(
"检测更新成功:"
+
xhr
.
responseText
);
if
(
xhr
.
status
==
200
)
{
console
.
log
(
"检测更新成功:"
+
xhr
.
responseText
);
var
newVer
=
xhr
.
responseText
;
if
(
compareVersion
(
wgtVer
,
newVer
))
{
var
newVer
=
xhr
.
responseText
;
if
(
compareVersion
(
wgtVer
,
newVer
))
{
downWgtHot
();
// 下载升级包
}
else
{
}
else
{
//plus.nativeUI.alert("无新版本可更新!");
}
}
else
{
}
else
{
console
.
log
(
"检测更新失败!"
);
plus
.
nativeUI
.
alert
(
"检测更新失败!"
);
}
...
...
@@ -120,51 +127,51 @@ var minepage_style = {
break
;
}
}
xhr
.
open
(
'GET'
,
checkUrl
);
xhr
.
open
(
'GET'
,
checkUrl
);
xhr
.
send
();
}
// 更新应用资源
function
installWgtHOt
(
path
){
// 更新应用资源
function
installWgtHOt
(
path
)
{
plus
.
nativeUI
.
showWaiting
(
"安装wgt文件..."
);
plus
.
runtime
.
install
(
path
,{},
function
()
{
plus
.
runtime
.
install
(
path
,
{},
function
()
{
plus
.
nativeUI
.
closeWaiting
();
console
.
log
(
"安装wgt文件成功!"
);
plus
.
nativeUI
.
alert
(
"应用资源更新完成!"
,
function
()
{
plus
.
nativeUI
.
alert
(
"应用资源更新完成!"
,
function
()
{
plus
.
runtime
.
restart
();
});
},
function
(
e
)
{
},
function
(
e
)
{
plus
.
nativeUI
.
closeWaiting
();
console
.
log
(
"安装wgt文件失败["
+
e
.
code
+
"]:"
+
e
.
message
);
plus
.
nativeUI
.
alert
(
"安装wgt文件失败["
+
e
.
code
+
"]:"
+
e
.
message
);
console
.
log
(
"安装wgt文件失败["
+
e
.
code
+
"]:"
+
e
.
message
);
plus
.
nativeUI
.
alert
(
"安装wgt文件失败["
+
e
.
code
+
"]:"
+
e
.
message
);
});
}
mui
.
plusReady
(
function
()
{
mui
.
plusReady
(
function
()
{
// 获取本地应用资源版本号
plus
.
runtime
.
getProperty
(
plus
.
runtime
.
appid
,
function
(
inf
)
{
wgtVer
=
inf
.
version
;
console
.
log
(
"当前应用版本:"
+
wgtVer
);
plus
.
runtime
.
getProperty
(
plus
.
runtime
.
appid
,
function
(
inf
)
{
wgtVer
=
inf
.
version
;
console
.
log
(
"当前应用版本:"
+
wgtVer
);
checkUpdateHot
()
});
var
mineView
=
mui
.
preload
({
url
:
'html/application.html'
,
id
:
'application'
,
styles
:
minepage_style
url
:
'html/application.html'
,
id
:
'application'
,
styles
:
minepage_style
});
mui
.
initUpdate
(
false
);
var
self
=
plus
.
webview
.
getLaunchWebview
();
var
second
=
plus
.
webview
.
getSecondWebview
();
var
isLogin
=
localStorage
.
getItem
(
'$state'
);
// isLogin = false;
if
(
isLogin
)
{
// isLogin = false;
if
(
isLogin
)
{
//关闭splash页面;
var
data
=
{
var
data
=
{
}
// plus.navigator.closeSplashscreen();
// plus.navigator.closeSplashscreen();
plus
.
navigator
.
setFullscreen
(
false
);
}
else
{
}
else
{
//显示启动导航
mui
.
openWindow
({
id
:
'login'
,
...
...
@@ -181,30 +188,30 @@ function installWgtHOt(path){
});
}
var
activeTab
=
subpages
[
0
].
id
;
mui
(
".mui-bar-tab"
).
on
(
'tap'
,
'a.mui-tab-item'
,
function
()
{
mui
(
".mui-bar-tab"
).
on
(
'tap'
,
'a.mui-tab-item'
,
function
()
{
var
_self
=
this
,
targetTab
=
_self
.
getAttribute
(
'data-id'
).
trim
(),
tabText
=
_self
.
getAttribute
(
'data-text'
).
trim
(),
webview_style
=
{
webview_style
=
{
};
if
(
targetTab
==
activeTab
)
{
if
(
targetTab
==
activeTab
)
{
return
;
}
if
(
~
targetTab
.
indexOf
(
'task'
)
||~
targetTab
.
indexOf
(
'mine'
))
{
if
(
~
targetTab
.
indexOf
(
'task'
)
||
~
targetTab
.
indexOf
(
'mine'
))
{
//启用硬件加速,测试用
webview_style
.
hardwareAccelerated
=
true
;
}
var
_subView
=
plus
.
webview
.
getWebviewById
(
targetTab
);
//若不存在则创建
if
(
!
_subView
)
{
var
_subInfo
=
getSubInfoById
(
subpages
,
targetTab
);
if
(
targetTab
==
"mine"
)
{
_subView
=
plus
.
webview
.
create
(
_subInfo
.
url
,
_subInfo
.
id
,
minepage_style
);
if
(
!
_subView
)
{
var
_subInfo
=
getSubInfoById
(
subpages
,
targetTab
);
if
(
targetTab
==
"mine"
)
{
_subView
=
plus
.
webview
.
create
(
_subInfo
.
url
,
_subInfo
.
id
,
minepage_style
);
}
else
{
}
else
{
subpage_style
.
navigationbar
.
titleText
=
tabText
;
_subView
=
plus
.
webview
.
create
(
_subInfo
.
url
,
_subInfo
.
id
,
subpage_style
);
_subView
=
plus
.
webview
.
create
(
_subInfo
.
url
,
_subInfo
.
id
,
subpage_style
);
}
self
.
append
(
_subView
);
...
...
@@ -217,4 +224,4 @@ function installWgtHOt(path){
//更改当前活跃的选项卡
activeTab
=
targetTab
;
});
});
\ No newline at end of file
});
dest/js/mes/FormingV2.js
View file @
ace52c26
...
...
@@ -376,9 +376,10 @@ var app = new Vue({
that
.
rightInfor
=
[];
that
.
itemsDetail
=
[];
that
.
cur
=
0
;
mui
.
toast
(
"没有对应的数据哦!"
)
}
},
function
(
xhr
,
type
,
res
)
{
mui
.
toast
(
JSON
.
stringify
(
res
.
message
))
mui
.
toast
(
JSON
.
stringify
(
res
.
message
))
;
});
}
else
{
Api
.
post
(
'/api/vMES/ProductionReportV2/SearchDone'
,
para
,
function
(
e
)
{
...
...
@@ -394,6 +395,7 @@ var app = new Vue({
that
.
rightInfor
=
[];
that
.
itemsDetail
=
[];
that
.
cur
=
0
;
mui
.
toast
(
"没有对应的数据哦!"
);
}
},
function
(
xhr
,
type
,
res
)
{
mui
.
toast
(
JSON
.
stringify
(
res
.
message
))
...
...
dest/js/mes/NeedleMatch.js
View file @
ace52c26
...
...
@@ -374,6 +374,7 @@ var app = new Vue({
that
.
itemsLeft
=
[];
that
.
itemsDetail
=
[];
that
.
cur
=
0
;
mui
.
toast
(
"没有对应的数据哦!"
);
}
}
},
function
(
xhr
,
type
,
res
)
{
...
...
@@ -393,6 +394,7 @@ var app = new Vue({
that
.
itemsLeft2
=
[];
that
.
itemsDetail
=
[];
that
.
cur
=
0
;
mui
.
toast
(
"没有对应的数据哦!"
);
}
}
},
function
(
xhr
,
type
,
res
)
{
...
...
dest/js/mes/NeedlecarHandover.js
View file @
ace52c26
...
...
@@ -376,6 +376,7 @@ var app = new Vue({
that
.
itemsLeft
=
[];
that
.
itemsDetail
=
[];
that
.
cur
=
0
;
mui
.
toast
(
"没有对应的数据哦!"
);
}
}
},
function
(
xhr
,
type
,
res
)
{
...
...
@@ -395,6 +396,7 @@ var app = new Vue({
that
.
itemsLeft2
=
[];
that
.
itemsDetail
=
[];
that
.
cur
=
0
;
mui
.
toast
(
"没有对应的数据哦!"
);
}
}
},
function
(
xhr
,
type
,
res
)
{
...
...
dest/js/mes/NeedlecarreportV2.js
View file @
ace52c26
...
...
@@ -375,6 +375,7 @@ var app = new Vue({
that
.
rightInfor
=
[];
that
.
itemsDetail
=
[];
that
.
cur
=
0
;
mui
.
toast
(
"没有对应的数据哦!"
);
}
},
function
(
xhr
,
type
,
res
)
{
mui
.
toast
(
JSON
.
stringify
(
res
.
message
))
...
...
@@ -393,6 +394,7 @@ var app = new Vue({
that
.
rightInfor
=
[];
that
.
itemsDetail
=
[];
that
.
cur
=
0
;
mui
.
toast
(
"没有对应的数据哦!"
);
}
},
function
(
xhr
,
type
,
res
)
{
mui
.
toast
(
JSON
.
stringify
(
res
.
message
))
...
...
dest/js/mes/cutting.js
View file @
ace52c26
...
...
@@ -374,6 +374,7 @@ var app = new Vue({
that
.
rightInfor
=
[];
that
.
itemsDetail
=
[];
that
.
cur
=
0
;
mui
.
toast
(
"没有对应的数据哦!"
)
}
},
function
(
xhr
,
type
,
res
)
{
mui
.
toast
(
JSON
.
stringify
(
res
.
message
))
...
...
dest/js/update.min.js
View file @
ace52c26
(
function
(
$
){
var
t
=
(
new
Date
()).
valueOf
();
var
wgtVer
=
null
,
checkUrl
=
"http://11wangjp.oss-cn-shanghai.aliyuncs.com/ftt_mes"
,
localDir
=
"update"
,
...
...
@@ -13,7 +14,6 @@
// 从设置那边调用 ,不检查"跳过此版本",如果没有新版本,也要跳出来提示框
var
is_invoke_from_setting
=
false
;
/**
* 创建升级目录
*/
...
...
@@ -127,6 +127,7 @@ function getUpdateData(){
}
else
{
mui
.
toast
(
"xhr请求失败:"
+
xhr
.
status
)
console
.
log
(
"xhr请求失败:"
+
xhr
.
status
);
}
break
;
...
...
html/work.html
View file @
ace52c26
...
...
@@ -44,7 +44,7 @@
border-radius
:
8px
;
}
.application-box
{
display
:
block
;
display
:
none
;
}
</style>
</head>
...
...
manifest.json
View file @
ace52c26
...
...
@@ -3,7 +3,7 @@
"id"
:
"H544710A8"
,
/*应用的标识,创建应用时自动生成,勿手动修改*/
"name"
:
"飞天兔MES"
,
/*应用名称,程序桌面图标名称*/
"version"
:
{
"name"
:
"1.0.
0.97
"
,
/*应用版本名称*/
"name"
:
"1.0.
1.2
"
,
/*应用版本名称*/
"code"
:
338
},
"description"
:
"飞天兔MES平板版"
,
/*应用描述信息*/
...
...
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