Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
design
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abookCheck
design
Commits
fa9227de
Commit
fa9227de
authored
Jun 28, 2021
by
Takatoshi Miura
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.4.0_miura_iOSの作業一覧対応(Json連動)
parent
58e6e236
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
60 additions
and
5 deletions
+60
-5
app/index.html
+1
-0
app/script/check-foriOS.js
+27
-4
app/script/check.js
+32
-1
No files found.
app/index.html
View file @
fa9227de
...
@@ -14,6 +14,7 @@
...
@@ -14,6 +14,7 @@
<script
src=
"js/jquery-1.11.2.min.js?__UPDATEID__"
></script>
<script
src=
"js/jquery-1.11.2.min.js?__UPDATEID__"
></script>
<script
src=
"script/check.js?__UPDATEID__"
></script>
<script
src=
"script/check.js?__UPDATEID__"
></script>
<script
src=
"script/check-list.js?__UPDATEID__"
></script>
<script
src=
"script/check-list.js?__UPDATEID__"
></script>
<script
src=
"script/check-foriOS.js"
></script>
</head>
</head>
<body
onload=
"CHK_L.init();"
>
<body
onload=
"CHK_L.init();"
>
...
...
app/script/check-foriOS.js
View file @
fa9227de
...
@@ -19,9 +19,31 @@ function callNativeApp(iosKey, jsonData) {
...
@@ -19,9 +19,31 @@ function callNativeApp(iosKey, jsonData) {
return
result
;
return
result
;
}
}
// CHK_iOS.getBeforeRoomType
= function () {
CHK_iOS
.
getCachePath
=
function
()
{
// return callNativeApp(NATIVE_KEY_IOS.getBeforeRoomType
, {});
return
callNativeApp
(
NATIVE_KEY_IOS
.
getCachePath
,
{});
//
};
};
CHK_iOS
.
getOperationListJson
=
function
()
{
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getOperationListJson
,
{})
);
};
CHK_iOS
.
getOperationGroupMasterListJson
=
function
()
{
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getOperationGroupMasterListJson
,
{})
);
};
CHK_iOS
.
getOperationGroupMasterRelationListJson
=
function
()
{
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getOperationGroupMasterRelationListJson
,
{})
);
};
CHK_iOS
.
getPushMessageListJson
=
function
()
{
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getPushMessageListJson
,
{})
);
};
\ No newline at end of file
app/script/check.js
View file @
fa9227de
...
@@ -5,6 +5,7 @@ CHK.operationType; //プロジェクトタイプ 0:リストコンテン
...
@@ -5,6 +5,7 @@ CHK.operationType; //プロジェクトタイプ 0:リストコンテン
CHK
.
isCms
=
false
;
//true:CMSモード
CHK
.
isCms
=
false
;
//true:CMSモード
CHK
.
isWeb
=
false
;
//true:Web表示モード
CHK
.
isWeb
=
false
;
//true:Web表示モード
CHK
.
isAndroid
=
false
;
CHK
.
isAndroid
=
false
;
CHK
.
isIOS
=
false
;
CHK
.
reportMode
=
"1"
;
//報告モード default1で、定期点検で変更される
CHK
.
reportMode
=
"1"
;
//報告モード default1で、定期点検で変更される
CHK
.
debug
;
//1:デバッグモード
CHK
.
debug
;
//1:デバッグモード
CHK
.
isMobile
;
//1:モバイル対応で表示
CHK
.
isMobile
;
//1:モバイル対応で表示
...
@@ -163,6 +164,14 @@ CHK.actCmd = {
...
@@ -163,6 +164,14 @@ CHK.actCmd = {
deleteReport
:
"actTaskReport"
,
//作業報告削除
deleteReport
:
"actTaskReport"
,
//作業報告削除
deleteRoutineTaskReport
:
"actRoutineTaskReport"
,
//点検作業報告保存・更新
deleteRoutineTaskReport
:
"actRoutineTaskReport"
,
//点検作業報告保存・更新
};
};
//iOS送信用コマンド
const
NATIVE_KEY_IOS
=
{
getCachePath
:
"getCachePath"
,
getOperationListJson
:
"getOperationListJson"
,
getOperationGroupMasterListJson
:
"getOperationGroupMasterListJson"
,
getOperationGroupMasterRelationListJson
:
"getOperationGroupMasterRelationListJson"
,
getPushMessageListJson
:
"getPushMessageListJson"
};
// レポートファイル保存タイプ
// レポートファイル保存タイプ
CHK
.
REPORT_SAVE_TYPE
=
{
CHK
.
REPORT_SAVE_TYPE
=
{
OZD
:
"0"
,
OZD
:
"0"
,
...
@@ -258,6 +267,7 @@ CHK.initCommon = function() {
...
@@ -258,6 +267,7 @@ CHK.initCommon = function() {
CHK
.
isWeb
=
urlParam
.
is_web
;
CHK
.
isWeb
=
urlParam
.
is_web
;
CHK
.
isWindows
=
urlParam
.
app
&&
urlParam
.
app
==
"windows"
;
// windowsアプリの対応追加 v1.1.0
CHK
.
isWindows
=
urlParam
.
app
&&
urlParam
.
app
==
"windows"
;
// windowsアプリの対応追加 v1.1.0
CHK
.
isAndroid
=
urlParam
.
app
&&
urlParam
.
app
==
"android"
;
CHK
.
isAndroid
=
urlParam
.
app
&&
urlParam
.
app
==
"android"
;
CHK
.
isIOS
=
urlParam
.
app
&&
urlParam
.
app
==
"ios"
;
// ウェブの場合、作業一覧の表示広さを変更
// ウェブの場合、作業一覧の表示広さを変更
if
(
CHK
.
isWeb
)
{
if
(
CHK
.
isWeb
)
{
$
(
"#checkList"
).
addClass
(
"web"
);
$
(
"#checkList"
).
addClass
(
"web"
);
...
@@ -372,7 +382,7 @@ CHK.initReport = function(callback) {
...
@@ -372,7 +382,7 @@ CHK.initReport = function(callback) {
CHK
.
initReportApp
=
function
(
callback
)
{
CHK
.
initReportApp
=
function
(
callback
)
{
// 作業一覧JSONデータ
// 作業一覧JSONデータ
CHK
.
loadJson
(
CHK
.
jsonPath
.
operationList
,
function
(
json
)
{
CHK
.
loadJson
(
CHK
.
jsonPath
.
operationList
,
function
(
json
)
{
if
(
CHK
.
isAndroid
)
{
if
(
CHK
.
isAndroid
||
CHK
.
isIOS
)
{
$
(
'#operationTable'
).
empty
();
$
(
'#operationTable'
).
empty
();
}
}
CHK
.
operation
=
json
;
CHK
.
operation
=
json
;
...
@@ -478,10 +488,29 @@ CHK.updateReportJsonWeb = function(json, callback) {
...
@@ -478,10 +488,29 @@ CHK.updateReportJsonWeb = function(json, callback) {
CHK
.
loadJson
=
function
(
fileName
,
callback
)
{
CHK
.
loadJson
=
function
(
fileName
,
callback
)
{
if
(
CHK
.
isAndroid
)
{
if
(
CHK
.
isAndroid
)
{
fileName
=
android
.
getCachePath
()
+
"/"
+
fileName
;
fileName
=
android
.
getCachePath
()
+
"/"
+
fileName
;
}
else
if
(
CHK
.
isIOS
)
{
}
else
{
}
else
{
//キャッシュ対応
//キャッシュ対応
fileName
=
fileName
+
"?"
+
new
Date
().
getTime
().
toString
(
16
);
fileName
=
fileName
+
"?"
+
new
Date
().
getTime
().
toString
(
16
);
}
}
if
(
CHK
.
isIOS
)
{
if
(
fileName
==
CHK
.
jsonPath
.
operationList
)
{
json
=
CHK_iOS
.
getOperationListJson
();
callback
(
json
);
}
else
if
(
fileName
==
CHK
.
jsonPath
.
operationGroupMasterList
)
{
json
=
CHK_iOS
.
getOperationGroupMasterListJson
();
callback
(
json
);
}
else
if
(
fileName
==
CHK
.
jsonPath
.
operationGroupMasterRelationList
)
{
json
=
CHK_iOS
.
getOperationGroupMasterRelationListJson
();
callback
(
json
);
}
else
if
(
fileName
==
CHK
.
jsonPath
.
pushMessageList
)
{
json
=
CHK_iOS
.
getPushMessageListJson
();
callback
(
json
);
}
return
;
}
$
.
getJSON
(
fileName
,
function
(
json
)
{
$
.
getJSON
(
fileName
,
function
(
json
)
{
console
.
log
(
"load json file"
,
fileName
,
json
);
console
.
log
(
"load json file"
,
fileName
,
json
);
callback
(
json
);
callback
(
json
);
...
@@ -970,6 +999,8 @@ CHK.sendABookCheckApi = function(param, callback) {
...
@@ -970,6 +999,8 @@ CHK.sendABookCheckApi = function(param, callback) {
window
.
external
.
notify
(
JSON
.
stringify
(
param
));
window
.
external
.
notify
(
JSON
.
stringify
(
param
));
}
else
if
(
CHK
.
isAndroid
){
}
else
if
(
CHK
.
isAndroid
){
android
.
sendParam
(
JSON
.
stringify
(
param
));
android
.
sendParam
(
JSON
.
stringify
(
param
));
}
else
if
(
CHK
.
isIOS
){
webkit
.
messageHandlers
.
sendParam
.
postMessage
(
JSON
.
stringify
(
param
));
}
else
{
}
else
{
var
query
=
""
;
var
query
=
""
;
for
(
var
key
in
param
)
{
for
(
var
key
in
param
)
{
...
...
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