Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
iBiz-Vue-R7-Res
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz-R7前端标准模板
iBiz-Vue-R7-Res
提交
24d1285a
提交
24d1285a
编写于
12月 08, 2022
作者:
tony001
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update:更新
上级
94628718
变更
30
显示空白字符变更
内嵌
并排
正在显示
30 个修改的文件
包含
447 行增加
和
982 行删除
+447
-982
copy.js
copy.js
+4
-3
avue.min.js
public/assets/js/avue.min.js
+0
-8
App.vue
src/App.vue
+0
-1
app-register.ts
src/app-register.ts
+0
-6
app-data-upload.less
src/components/app-data-upload/app-data-upload.less
+3
-1
app-data-upload.vue
src/components/app-data-upload/app-data-upload.vue
+96
-53
app-debug-actions.less
src/components/app-debug-actions/app-debug-actions.less
+0
-35
app-debug-actions.vue
src/components/app-debug-actions/app-debug-actions.vue
+0
-48
app-header-menus.less
src/components/app-header-menus/app-header-menus.less
+0
-73
app-header-menus.vue
src/components/app-header-menus/app-header-menus.vue
+0
-78
app-rawitem.vue
src/components/app-rawitem/app-rawitem.vue
+10
-1
app-studioaction.less
src/components/app-studioaction/app-studioaction.less
+0
-22
app-studioaction.vue
src/components/app-studioaction/app-studioaction.vue
+0
-84
app-field-image-dynamic.vue
...media/app-field-image-dynamic/app-field-image-dynamic.vue
+2
-8
ui-logic-active-ctrl-param.ts
src/logic/ui-logic/logic-param/ui-logic-active-ctrl-param.ts
+5
-3
ui-logic-entity-list-param.ts
src/logic/ui-logic/logic-param/ui-logic-entity-list-param.ts
+33
-0
panel-detail.ts
src/model/panel-detail/panel-detail.ts
+0
-1
entity-service.ts
src/service/entity-service.ts
+251
-226
default.less
src/styles/default.less
+18
-8
template.html
src/template.html
+0
-1
app-drawer.ts
src/utils/app-drawer/app-drawer.ts
+1
-0
app-modal.ts
src/utils/app-modal/app-modal.ts
+1
-1
app-popover.tsx
src/utils/app-popover/app-popover.tsx
+1
-0
index.ts
src/utils/index.ts
+1
-3
interceptor.ts
src/utils/interceptor/interceptor.ts
+0
-7
printarea.js
src/utils/print/packages/printarea.js
+1
-1
StudioActionUtil.ts
src/utils/studio-action/StudioActionUtil.ts
+0
-183
imgurl-base64.ts
src/utils/util/imgurl-base64.ts
+0
-126
util.ts
src/utils/util/util.ts
+18
-0
tsconfig.json
tsconfig.json
+2
-1
未找到文件。
copy.js
浏览文件 @
24d1285a
...
@@ -19,10 +19,11 @@ function copyFolder(copiedPath, resultPath, direct) {
...
@@ -19,10 +19,11 @@ function copyFolder(copiedPath, resultPath, direct) {
console
.
log
(
`form
${
ccp
}
copy to
${
crp
}
`
);
console
.
log
(
`form
${
ccp
}
copy to
${
crp
}
`
);
}
else
{
}
else
{
try
{
try
{
fs
.
accessSync
(
path
.
join
(
crp
,
'..'
),
fs
.
constants
.
W_OK
);
fs
.
accessSync
(
crp
,
fs
.
constants
.
F_OK
);
copyFolder
(
ccp
,
crp
,
true
);
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
log
(
'folder write error:'
,
error
);
fs
.
mkdirSync
(
crp
);
}
finally
{
copyFolder
(
ccp
,
crp
,
true
);
}
}
}
}
...
...
public/assets/js/avue.min.js
已删除
100644 → 0
浏览文件 @
94628718
因为 它太大了无法显示 源差异 。您可以改为
查看blob
。
src/App.vue
浏览文件 @
24d1285a
<
template
>
<
template
>
<div
id=
'app'
>
<div
id=
'app'
>
<app-debug-actions
/>
<router-view
v-if=
"isRouterAlive"
/>
<router-view
v-if=
"isRouterAlive"
/>
</div>
</div>
</
template
>
</
template
>
...
...
src/app-register.ts
浏览文件 @
24d1285a
...
@@ -63,9 +63,6 @@ import AppRangeDate from './components/app-range-date/app-range-date.vue'
...
@@ -63,9 +63,6 @@ import AppRangeDate from './components/app-range-date/app-range-date.vue'
import
AppActionBar
from
'./components/app-actionbar/app-actionbar.vue'
import
AppActionBar
from
'./components/app-actionbar/app-actionbar.vue'
import
AppOrgSector
from
'./components/app-orgsector/app-orgsector.vue'
import
AppOrgSector
from
'./components/app-orgsector/app-orgsector.vue'
import
AppBuild
from
'./components/app-build/app-build.vue'
import
AppBuild
from
'./components/app-build/app-build.vue'
import
AppStudioAction
from
'./components/app-studioaction/app-studioaction.vue'
import
AppDebugActions
from
'./components/app-debug-actions/app-debug-actions.vue'
import
AppHeaderMenus
from
'./components/app-header-menus/app-header-menus.vue'
import
AppColumnLink
from
'./components/app-column-link/app-column-link.vue'
import
AppColumnLink
from
'./components/app-column-link/app-column-link.vue'
import
DropDownListDynamic
from
'./components/dropdown-list-dynamic/dropdown-list-dynamic.vue'
import
DropDownListDynamic
from
'./components/dropdown-list-dynamic/dropdown-list-dynamic.vue'
import
AppImagePreview
from
'./components/app-image-preview/app-image-preview.vue'
import
AppImagePreview
from
'./components/app-image-preview/app-image-preview.vue'
...
@@ -222,9 +219,6 @@ export const AppComponents = {
...
@@ -222,9 +219,6 @@ export const AppComponents = {
v
.
component
(
'app-actionbar'
,
AppActionBar
);
v
.
component
(
'app-actionbar'
,
AppActionBar
);
v
.
component
(
'app-orgsector'
,
AppOrgSector
);
v
.
component
(
'app-orgsector'
,
AppOrgSector
);
v
.
component
(
'app-build'
,
AppBuild
);
v
.
component
(
'app-build'
,
AppBuild
);
v
.
component
(
'app-studioaction'
,
AppStudioAction
);
v
.
component
(
'app-debug-actions'
,
AppDebugActions
);
v
.
component
(
'app-header-menus'
,
AppHeaderMenus
);
v
.
component
(
'app-column-link'
,
AppColumnLink
);
v
.
component
(
'app-column-link'
,
AppColumnLink
);
v
.
component
(
'app-data-upload'
,
()
=>
import
(
'./components/app-data-upload/app-data-upload.vue'
));
v
.
component
(
'app-data-upload'
,
()
=>
import
(
'./components/app-data-upload/app-data-upload.vue'
));
v
.
component
(
'dropdown-list-dynamic'
,
DropDownListDynamic
);
v
.
component
(
'dropdown-list-dynamic'
,
DropDownListDynamic
);
...
...
src/components/app-data-upload/app-data-upload.less
浏览文件 @
24d1285a
// 导入视图样式
// 导入视图样式
.app-data-upload-view{
.app-data-upload-view{
font-family: "Microsoft YaHei";
font-family: "Microsoft YaHei";
display: flex;
flex-direction: column;
.main-content{
.main-content{
height: calc(100% - 68px);
height: calc(100% - 68px);
background: #FAFAFB;
background: #FAFAFB;
...
@@ -41,7 +43,7 @@
...
@@ -41,7 +43,7 @@
}
}
}
}
.message-container{
.message-container{
height:
150px
;
height:
calc(100% - 26px)
;
display: flex;
display: flex;
justify-content: space-between;
justify-content: space-between;
ul li{
ul li{
...
...
src/components/app-data-upload/app-data-upload.vue
浏览文件 @
24d1285a
<
template
>
<
template
>
<div
<div
class=
"app-data-upload-view"
v-loading
.
fullscreen=
"isUploading"
class=
"app-data-upload-view"
element-loading-background=
"rgba(57, 57, 57, 0.2)"
>
v-loading
.
fullscreen=
"isUploading"
<input
ref=
"inputUpLoad"
type=
"file"
style=
"display: none"
element-loading-background=
"rgba(57, 57, 57, 0.2)"
accept=
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
@
change=
"importFile"
/>
>
<input
ref=
"inputUpLoad"
type=
"file"
style=
"display: none"
accept=
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
@
change=
"importFile"
/>
<div
class=
"main-content"
>
<div
class=
"main-content"
>
<div
v-if=
"importDataArray.length === 0 && !isUploading && uploadProgress !== 100"
class=
"upload-container"
@
click=
"handleUpLoad"
>
<div
v-if=
"importDataArray.length === 0 && !isUploading && uploadProgress !== 100"
class=
"upload-container"
@
click=
"handleUpLoad"
>
<img
class=
"icon-import"
src=
"@/assets/img/icon-import.svg"
/>
<img
class=
"icon-import"
src=
"@/assets/img/icon-import.svg"
/>
<span
class=
"select-file-text"
>
{{
$t
(
"components.appDataUploadView.selectfile"
)
}}
</span>
<span
class=
"select-file-text"
>
{{
$t
(
"components.appDataUploadView.selectfile"
)
}}
</span>
</div>
</div>
<div
class=
"data-info-container"
v-if=
"importDataArray.length > 0 || isUploading || uploadProgress == 100"
>
<div
class=
"data-info-container"
v-if=
"importDataArray.length > 0 || isUploading || uploadProgress == 100"
>
<el-progress
<el-progress
class=
"progress"
v-show=
"isUploading"
:text-inside=
"true"
:stroke-width=
"14"
class=
"progress"
:percentage=
"uploadProgress"
></el-progress>
v-show=
"isUploading"
<div
class=
"message-container"
>
:text-inside=
"true"
<div
class=
"result-list"
>
:stroke-width=
"14"
<template
v-if=
"(errorInfos.length === 0)"
>
:percentage=
"uploadProgress"
<span>
{{
promptInfo
}}
</span>
></el-progress>
</
template
>
<span
class=
"font-class"
>
{{
promptInfo
}}
</span>
<
template
v-else
>
<span>
导入错误信息
</span>
<ui>
<li
class=
"error-item"
v-for=
"(item, index) in errorInfos"
:key=
"index"
>
<span
v-if=
"item.index"
>
{{
$t
(
'components.appDataUploadView.start'
)
}}
{{
item
.
index
}}
{{
$t
(
'components.appDataUploadView.row'
)
}}
:
</span><span
v-html=
"item.info"
></span>
</li>
</ui>
</
template
>
</div>
</div>
</div>
</div>
<div
class=
"second-content"
>
<div
class=
"import-template-message"
>
{{ $t('components.appDataUploadView.datatemplatemessage') }}
</div>
<div
class=
"import-template"
>
<img
class=
"icon-link"
src=
"@/assets/img/icon-link.svg"
/>
<span
style=
"cursor: pointer;"
@
click=
"downloadTemp"
>
{{ $t('components.appDataUploadView.datatemplate') }}
</span>
</div>
</div>
</div>
</div>
<el-row
class=
"button-container"
>
<el-row
class=
"button-container"
>
<el-button
type=
"primary"
@
click=
"handleCancel"
>
{{ $t("components.appDataUploadView.cancel") }}
</el-button>
<el-button
type=
"primary"
@
click=
"handleCancel"
>
{{ $t("components.appDataUploadView.cancel") }}
</el-button>
<el-button
<el-button
:disabled=
"importDataArray.length === 0"
:loading=
"isUploading"
type=
"primary"
:disabled=
"importDataArray.length === 0"
class=
"primary-button"
@
click=
"uploadServer"
>
{{ $t("components.appDataUploadView.uploadserver")
:loading=
"isUploading"
}}
</el-button>
type=
"primary"
class=
"primary-button"
@
click=
"uploadServer"
>
{{
$t
(
"components.appDataUploadView.uploadserver"
)
}}
</el-button
>
</el-row>
</el-row>
</div>
</div>
</template>
</template>
...
@@ -149,14 +154,6 @@ export default class AppDataUploadView extends Vue {
...
@@ -149,14 +154,6 @@ export default class AppDataUploadView extends Vue {
*/
*/
public
isUploading
:
boolean
=
false
;
public
isUploading
:
boolean
=
false
;
/**
* 导入成功数据
*
* @type {string}
* @memberof AppDataUploadView
*/
public
importSuccessData
:
Array
<
any
>
=
[];
/**
/**
* 导入失败数据
* 导入失败数据
*
*
...
@@ -205,6 +202,30 @@ export default class AppDataUploadView extends Vue {
...
@@ -205,6 +202,30 @@ export default class AppDataUploadView extends Vue {
*/
*/
public
uploadProgress
:
number
=
0
;
public
uploadProgress
:
number
=
0
;
/**
* 是否忽略导入错误
*
* @type {boolean}
* @memberof AppDataUploadView
*/
public
ignoreError
:
boolean
=
false
;
/**
* 错误消息集合
*
* @type {any[]}
* @memberof AppDataUploadView
*/
public
errorInfos
:
any
[]
=
[];
/**
* 导入成功计数
*
* @type {number}
* @memberof AppDataUploadView
*/
public
successCount
:
number
=
0
;
/**
/**
* 视图参数变化
* 视图参数变化
*
*
...
@@ -242,6 +263,7 @@ export default class AppDataUploadView extends Vue {
...
@@ -242,6 +263,7 @@ export default class AppDataUploadView extends Vue {
if
(
this
.
viewparams
.
serviceName
)
{
if
(
this
.
viewparams
.
serviceName
)
{
this
.
entityService
=
await
window
.
entityServiceRegister
.
getService
(
this
.
viewparams
.
serviceName
.
toLowerCase
());
this
.
entityService
=
await
window
.
entityServiceRegister
.
getService
(
this
.
viewparams
.
serviceName
.
toLowerCase
());
}
}
this
.
ignoreError
=
this
.
viewparams
.
ignoreError
===
true
||
this
.
viewparams
.
ignoreError
===
'true'
?
true
:
false
;
//获取代码表值
//获取代码表值
this
.
allCodeList
=
await
this
.
getChartAllCodeList
();
this
.
allCodeList
=
await
this
.
getChartAllCodeList
();
}
}
...
@@ -272,7 +294,7 @@ export default class AppDataUploadView extends Vue {
...
@@ -272,7 +294,7 @@ export default class AppDataUploadView extends Vue {
* @memberof AppDataUploadView
* @memberof AppDataUploadView
*/
*/
public
downloadTemp
()
{
public
downloadTemp
()
{
this
.
importExcel
(
this
.
viewparams
.
appDeLogicName
+
this
.
$t
(
"components.appDataUploadView.datatemp"
),
[]);
this
.
importExcel
(
this
.
viewparams
.
appDeLogicName
+
this
.
$t
(
"components.appDataUploadView.datatemp
late
"
),
[]);
}
}
/**
/**
...
@@ -281,7 +303,6 @@ export default class AppDataUploadView extends Vue {
...
@@ -281,7 +303,6 @@ export default class AppDataUploadView extends Vue {
* @memberof AppDataUploadView
* @memberof AppDataUploadView
*/
*/
public
handleUpLoad
()
{
public
handleUpLoad
()
{
this
.
importSuccessData
=
[];
(
this
.
$refs
.
inputUpLoad
as
any
).
click
();
(
this
.
$refs
.
inputUpLoad
as
any
).
click
();
}
}
...
@@ -299,6 +320,7 @@ export default class AppDataUploadView extends Vue {
...
@@ -299,6 +320,7 @@ export default class AppDataUploadView extends Vue {
this
.
hasImported
=
true
;
this
.
hasImported
=
true
;
this
.
isUploading
=
true
;
this
.
isUploading
=
true
;
this
.
uploadProgress
=
0
;
this
.
uploadProgress
=
0
;
this
.
successCount
=
0
;
this
.
importDataArray
=
[];
this
.
importDataArray
=
[];
this
.
sliceUploadService
(
tempDataArray
,
0
);
this
.
sliceUploadService
(
tempDataArray
,
0
);
}
}
...
@@ -309,11 +331,11 @@ export default class AppDataUploadView extends Vue {
...
@@ -309,11 +331,11 @@ export default class AppDataUploadView extends Vue {
* @memberof AppDataUploadView
* @memberof AppDataUploadView
*/
*/
public
sliceUploadService
(
dataArray
:
Array
<
any
>
,
cnt
:
number
)
{
public
sliceUploadService
(
dataArray
:
Array
<
any
>
,
cnt
:
number
)
{
if
(
cnt
>
dataArray
.
length
)
{
if
(
cnt
>
=
dataArray
.
length
)
{
this
.
isUploading
=
false
;
this
.
isUploading
=
false
;
this
.
uploadProgress
=
100
;
this
.
uploadProgress
=
100
;
this
.
$Notice
.
success
({
desc
:
this
.
$t
(
"components.appDataUploadView.completed"
)
as
string
});
this
.
$Notice
.
success
({
desc
:
this
.
$t
(
"components.appDataUploadView.completed"
)
as
string
});
this
.
handleCancel
()
;
this
.
promptInfo
=
`
${
this
.
$t
(
'components.appDataUploadView.completed'
)}
,
${
this
.
$t
(
'components.appDataUploadView.totaldata'
)}
${
this
.
successCount
}
${
this
.
$t
(
'components.appDataUploadView.total'
)}
`
;
return
;
return
;
}
}
let
sliceArray
:
Array
<
any
>
=
[];
let
sliceArray
:
Array
<
any
>
=
[];
...
@@ -322,16 +344,17 @@ export default class AppDataUploadView extends Vue {
...
@@ -322,16 +344,17 @@ export default class AppDataUploadView extends Vue {
}
}
try
{
try
{
this
.
entityService
this
.
entityService
.
ImportData
(
this
.
viewdata
,
{
name
:
this
.
importId
,
importData
:
sliceArray
})
.
ImportData
(
this
.
viewdata
,
{
name
:
this
.
importId
,
importData
:
sliceArray
,
ignoreError
:
this
.
ignoreError
})
.
then
((
res
:
any
)
=>
{
.
then
((
res
:
any
)
=>
{
const
result
:
any
=
res
.
data
;
const
result
:
any
=
res
.
data
;
if
(
result
&&
result
.
rst
!==
0
)
{
this
.
successCount
+=
result
.
success
;
this
.
promptInfo
=
this
.
$t
(
"components.appDataUploadView.importfailed"
)
as
string
;
if
(
result
.
total
!==
result
.
success
)
{
this
.
handleErrorInfo
(
result
.
errorinfo
,
cnt
);
if
(
!
this
.
ignoreError
)
{
this
.
isUploading
=
false
;
this
.
isUploading
=
false
;
return
;
return
;
}
}
this
.
importSuccessData
=
result
.
data
;
}
this
.
promptInfo
=
this
.
$t
(
"components.appDataUploadView.completed"
)
as
string
;
this
.
uploadProgress
=
Number
(((
cnt
/
dataArray
.
length
)
*
100
).
toFixed
(
2
));
this
.
uploadProgress
=
Number
(((
cnt
/
dataArray
.
length
)
*
100
).
toFixed
(
2
));
this
.
sliceUploadService
(
dataArray
,
cnt
+
this
.
sliceUploadCnt
);
this
.
sliceUploadService
(
dataArray
,
cnt
+
this
.
sliceUploadCnt
);
})
})
...
@@ -340,8 +363,28 @@ export default class AppDataUploadView extends Vue {
...
@@ -340,8 +363,28 @@ export default class AppDataUploadView extends Vue {
this
.
promptInfo
=
this
.
$t
(
"components.appDataUploadView.importfailed"
)
as
string
;
this
.
promptInfo
=
this
.
$t
(
"components.appDataUploadView.importfailed"
)
as
string
;
});
});
}
catch
(
error
:
any
)
{
}
catch
(
error
:
any
)
{
this
.
handleErrorInfo
(
error
.
errorinfo
,
cnt
);
if
(
!
this
.
ignoreError
)
{
this
.
isUploading
=
false
;
this
.
isUploading
=
false
;
this
.
promptInfo
=
this
.
$t
(
"components.appDataUploadView.importfailed"
)
as
string
;
return
;
}
this
.
uploadProgress
=
Number
(((
cnt
/
dataArray
.
length
)
*
100
).
toFixed
(
2
));
this
.
sliceUploadService
(
dataArray
,
cnt
+
this
.
sliceUploadCnt
);
}
}
/**
* 处理错误信息
*
* @memberof AppDataUploadView
*/
public
handleErrorInfo
(
infos
:
any
[],
cnt
:
number
)
{
if
(
infos
&&
infos
.
length
)
{
infos
.
forEach
((
item
:
any
)
=>
{
this
.
errorInfos
.
push
(
Object
.
assign
({
index
:
cnt
+
item
.
row
},
item
));
})
}
}
}
}
...
@@ -351,7 +394,7 @@ export default class AppDataUploadView extends Vue {
...
@@ -351,7 +394,7 @@ export default class AppDataUploadView extends Vue {
* @memberof AppDataUploadView
* @memberof AppDataUploadView
*/
*/
public
handleCancel
()
{
public
handleCancel
()
{
this
.
$emit
(
"close"
,
[]);
this
.
$emit
(
"close"
,
this
.
successCount
>
0
?
[{
count
:
this
.
successCount
}]
:
[]);
}
}
/**
/**
...
@@ -381,7 +424,7 @@ export default class AppDataUploadView extends Vue {
...
@@ -381,7 +424,7 @@ export default class AppDataUploadView extends Vue {
* @memberof AppDataUploadView
* @memberof AppDataUploadView
*/
*/
public
handleOK
()
{
public
handleOK
()
{
this
.
$emit
(
"close"
,
this
.
importSuccessData
);
this
.
$emit
(
"close"
,
this
.
successCount
>
0
?
[{
count
:
this
.
successCount
}]
:
[]
);
}
}
/**
/**
...
@@ -403,7 +446,7 @@ export default class AppDataUploadView extends Vue {
...
@@ -403,7 +446,7 @@ export default class AppDataUploadView extends Vue {
let
list1
=
this
.
getFirstRow
(
this
.
workBookData
);
let
list1
=
this
.
getFirstRow
(
this
.
workBookData
);
xlsxData
=
this
.
addXlsxData
(
xlsxData
,
list1
);
xlsxData
=
this
.
addXlsxData
(
xlsxData
,
list1
);
this
.
importDataArray
=
Util
.
deepCopy
(
xlsxData
);
this
.
importDataArray
=
Util
.
deepCopy
(
xlsxData
);
this
.
promptInfo
=
`
${
this
.
$t
(
'components.appDataUploadView.selectfilesucess'
)}
,
${
this
.
$t
(
'components.appDataUploadView.totaldata'
)}
${
this
.
importDataArray
.
length
}
${
this
.
$t
(
'components.appDataUploadView.total'
)}
`
;
this
.
promptInfo
=
this
.
$t
(
'components.appDataUploadView.read'
)
as
string
;
(
this
.
$refs
.
inputUpLoad
as
any
).
value
=
""
;
(
this
.
$refs
.
inputUpLoad
as
any
).
value
=
""
;
};
};
reader
.
readAsBinaryString
(
f
);
reader
.
readAsBinaryString
(
f
);
...
...
src/components/app-debug-actions/app-debug-actions.less
已删除
100644 → 0
浏览文件 @
94628718
.app-debug-actions {
position: absolute;
top: 0px;
left: 50%;
z-index: 10000;
text-align: center;
transition: all 0.3s;
margin-top: -32px;
>.actions {
.ivu-btn {
width: 100%;
}
}
>.show-buttons {
width: 100%;
height: 18px;
border-width: 0px 1px 1px 1px;
border-style: solid;
border-color: #8893a7;
text-align: center;
color: #8893a7;
cursor: pointer;
>.button {
margin-top: -5px;
}
}
}
.app-debug-actions:hover {
margin-top: 0px;
}
\ No newline at end of file
src/components/app-debug-actions/app-debug-actions.vue
已删除
100644 → 0
浏览文件 @
94628718
<
template
>
<div
class=
"app-debug-actions"
v-if=
"isShow"
>
<div
class=
"actions"
>
<button-group
vertical
>
<i-button
:title=
"$t('components.appDebugActions.button')"
:type=
"sdc.isShowTool ? 'warning' : 'info'"
ghost
@
click=
"() => sdc.showToolChange()"
:icon=
"sdc.isShowTool ? 'ios-bug' : 'ios-bug-outline'"
></i-button>
</button-group>
</div>
<div
class=
"show-buttons"
>
<div
class=
"button"
><i
class=
"ivu-icon ivu-icon-ios-arrow-down"
/></div>
</div>
</div>
</
template
>
<
script
lang =
'ts'
>
import
{
Vue
,
Component
}
from
'vue-property-decorator'
;
import
{
StudioActionUtil
}
from
'@/utils'
;
import
{
Environment
}
from
'@/environments/environment'
;
/**
* 开发模式控制行为组
*
* @export
* @class AppDebugActions
* @extends {Vue}
*/
@
Component
({
})
export
default
class
AppDebugActions
extends
Vue
{
/**
* 是否显示
*
* @type {boolean}
* @memberof AppDebugActions
*/
public
isShow
:
boolean
=
Environment
.
devMode
;
/**
* 配置平台操作控制器
*
* @type {StudioActionController}
* @memberof AppDebugActions
*/
public
sdc
:
StudioActionUtil
=
StudioActionUtil
.
getInstance
();
}
</
script
>
<
style
lang =
"less"
>
@import "./app-debug-actions.less";
</
style
>
\ No newline at end of file
src/components/app-header-menus/app-header-menus.less
已删除
100644 → 0
浏览文件 @
94628718
.app-header-menus {
display: flex;
align-items: center;
height: 100%;
line-height: 20px;
>.app-header-menu-item{
height: 24px;
display: flex;
align-items: center;
margin-right: 16px;
color: #8893a7;
border: 1px solid rgba(0, 0, 0, 0);
cursor: pointer;
}
>.app-header-menu-item.icon {
>.app-header-menu-item-icon {
font-size: 20px;
}
>.app-header-menu-item-img {
height: 20px;
width: 20px;
>img {
height: 100%;
width: 100%;
}
}
}
>.app-header-menu-item.icon:hover{
color: #68758e;
text-decoration: none;
}
>.app-header-menu-item.text {
border-radius: 4px;
border: 1px solid #8893a7;
text-align: center;
font-size: 12px;
padding: 2px 4px;
>.app-header-menu-item-icon {
width: 20px;
height: 20px;
overflow: hidden;
font-size: 16px;
margin-right: 3px;
margin-top: -3px;
}
>.app-header-menu-item-img {
height: 16px;
width: 16px;
margin-right: 3px;
>img {
height: 100%;
width: 100%;
}
}
}
>.app-header-menu-item.text:hover {
color: #107fff;
border: 1px solid #107fff;
}
}
.app-header-menus:hover {
background: none !important;
}
\ No newline at end of file
src/components/app-header-menus/app-header-menus.vue
已删除
100644 → 0
浏览文件 @
94628718
<
template
>
<div
class=
"app-header-menus"
v-if=
"isShow"
>
<div
v-for=
"(menu,index) in menus"
:key=
"index"
class=
"app-header-menu-item text"
@
click=
"openWindow(menu)"
>
<div
class=
"app-header-menu-item-icon"
>
<i
:class=
"menu.iconcls"
:aria-hidden=
"true"
/>
</div>
<div
class=
"app-header-menu-item-text"
>
{{
$t
(
menu
.
title
)
}}
</div>
</div>
</div>
</
template
>
<
script
lang=
"ts"
>
import
{
Vue
,
Component
,
Prop
,
Model
,
Emit
}
from
"vue-property-decorator"
;
import
{
Subject
}
from
"rxjs"
;
import
{
Environment
}
from
'@/environments/environment'
;
@
Component
({
})
export
default
class
AppHeaderMenus
extends
Vue
{
/**
* 是否显示
*
* @type {boolean}
* @memberof AppHeaderMenus
*/
public
isShow
:
boolean
=
Environment
.
devMode
;
/**
* 菜单数据
*
* @type {any}
* @memberof AppHeaderMenus
*/
public
menus
:
any
=
[
{
name
:
"ibizlab"
,
title
:
"components.appHeaderMenus.ibizlab.title"
,
url
:
Environment
.
ibizlabtUrl
,
iconcls
:
'fa fa-home'
,
},
{
name
:
"publishProject"
,
title
:
"components.appHeaderMenus.publishProject.title"
,
url
:
Environment
.
PublishProjectUrl
,
iconcls
:
'fa fa-folder-open-o'
,
},
{
name
:
"ibizstudio"
,
title
:
"components.appHeaderMenus.ibizstudio.title"
,
url
:
`
${
Environment
.
StudioUrl
}
?#/common_mosindex/srfkeys=
${
Environment
.
SysId
}
`
,
iconcls
:
'fa fa-wrench'
,
},
{
name
:
"ibizbbs"
,
title
:
"components.appHeaderMenus.ibizbbs.title"
,
url
:
Environment
.
ibizbbstUrl
,
iconcls
:
'fa fa-comments-o'
,
},
];
/**
* 触发界面行为
*
* @memberof AppHeaderMenus
*/
public
openWindow
(
menu
:
any
){
window
.
open
(
menu
.
url
,
'_blank'
);
}
}
</
script
>
<
style
lang=
'less'
>
@import "./app-header-menus.less";
</
style
>
\ No newline at end of file
src/components/app-rawitem/app-rawitem.vue
浏览文件 @
24d1285a
...
@@ -6,7 +6,8 @@
...
@@ -6,7 +6,8 @@
</div>
</div>
<div
v-else-if=
"Object.is(contentType,'HTML')"
:class=
"contentStyle"
v-html=
"htmlContent"
/>
<div
v-else-if=
"Object.is(contentType,'HTML')"
:class=
"contentStyle"
v-html=
"htmlContent"
/>
<div
v-else-if=
"Object.is(contentType,'IMAGE')"
:class=
"contentStyle"
>
<div
v-else-if=
"Object.is(contentType,'IMAGE')"
:class=
"contentStyle"
>
<i
:class=
"imageClass ? imageClass : ''"
></i>
<img
v-if=
"imageSrc && imageSrc !== ''"
:src=
"imageSrc"
/>
<i
v-if=
"imageClass"
:class=
"imageClass"
></i>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
...
@@ -57,6 +58,14 @@ export default class AppRawItem extends Vue {
...
@@ -57,6 +58,14 @@ export default class AppRawItem extends Vue {
*/
*/
@
Prop
()
public
imageClass
?:
string
;
@
Prop
()
public
imageClass
?:
string
;
/**
* 图片路径
*
* @type {strin}
* @memberof AppRawItem
*/
@
Prop
()
public
imageSrc
?:
string
;
/**
/**
* 标题
* 标题
*
*
...
...
src/components/app-studioaction/app-studioaction.less
已删除
100644 → 0
浏览文件 @
94628718
.app-studioaction {
.studio-config-container {
position: absolute;
top: 10px;
right: 30px;
z-index: 1;
background: rgba(22, 22, 22, 0.6);
border-radius: 5px;
display: flex;
>.title {
color: white;
border-right: 1px solid #333;
padding: 5px;
text-align: center;
}
>.actions {
display: flex;
}
}
}
\ No newline at end of file
src/components/app-studioaction/app-studioaction.vue
已删除
100644 → 0
浏览文件 @
94628718
<
template
>
<div
class=
"app-studioaction"
v-if=
"isDevMode"
>
<div
v-show=
"sdc.isShowTool"
class=
"studio-config-container"
>
<div
class=
"title"
>
{{
viewTitle
}}
</div>
<div
class=
"actions"
>
<div
class=
"action-item"
:title=
"$t('components.appStudioAction.configTitle')"
>
<i-button
type=
"text"
ghost
@
click=
"configView()"
>
{{
$t
(
'components.appStudioAction.configButton'
)
}}
</i-button>
</div>
<div
class=
"action-item"
:title=
"$t('components.appStudioAction.issueTitle')"
>
<i-button
type=
"text"
ghost
@
click=
"createIssues()"
>
{{
$t
(
'components.appStudioAction.issueButton'
)
}}
</i-button>
</div>
</div>
</div>
</div>
</
template
>
<
script
lang =
'ts'
>
import
{
Vue
,
Component
,
Inject
,
Prop
}
from
"vue-property-decorator"
;
import
{
Environment
}
from
'@/environments/environment'
;
import
{
StudioActionUtil
}
from
'@/utils'
;
@
Component
({
})
export
default
class
AppStudioAction
extends
Vue
{
/**
* 视图标题
*
* @type {string}
* @memberof AppStudioAction
*/
@
Prop
()
public
viewTitle
!
:
string
;
/**
* 视图名称
*
* @type {string}
* @memberof AppStudioAction
*/
@
Prop
()
public
viewName
!
:
string
;
/**
* 是否开发为环境
*
* @type {boolean}
* @memberof AppStudioAction
*/
public
isDevMode
:
boolean
=
Environment
.
devMode
;
/**
* 配置平台操作控制器
*
* @type {StudioActionController}
* @memberof AppStudioAction
*/
public
sdc
:
StudioActionUtil
=
StudioActionUtil
.
getInstance
();
/**
* 触发配置
*
* @protected
* @memberof AppStudioAction
*/
protected
configView
():
void
{
this
.
sdc
.
openStudioConfigView
(
this
.
viewName
);
}
/**
* 新建issues
*
* @protected
* @memberof AppStudioAction
*/
protected
createIssues
():
void
{
this
.
sdc
.
createdIssues
(
this
.
viewName
);
}
}
</
script
>
<
style
lang=
"less"
>
@import "./app-studioaction.less";
</
style
>
\ No newline at end of file
src/components/layout-element/media/app-field-image-dynamic/app-field-image-dynamic.vue
浏览文件 @
24d1285a
...
@@ -5,7 +5,6 @@
...
@@ -5,7 +5,6 @@
</
template
>
</
template
>
<
script
lang =
'ts'
>
<
script
lang =
'ts'
>
import
{
Vue
,
Component
,
Prop
,
Watch
}
from
'vue-property-decorator'
;
import
{
Vue
,
Component
,
Prop
,
Watch
}
from
'vue-property-decorator'
;
import
{
ImgurlBase64
}
from
'@/utils'
;
import
{
Environment
}
from
"@/environments/environment"
;
import
{
Environment
}
from
"@/environments/environment"
;
@
Component
({})
@
Component
({})
export
default
class
AppFieldImageDynamic
extends
Vue
{
export
default
class
AppFieldImageDynamic
extends
Vue
{
...
@@ -119,13 +118,8 @@ export default class AppFieldImageDynamic extends Vue {
...
@@ -119,13 +118,8 @@ export default class AppFieldImageDynamic extends Vue {
try
{
try
{
const
_files
=
JSON
.
parse
(
this
.
value
);
const
_files
=
JSON
.
parse
(
this
.
value
);
const
file
=
_files
instanceof
Array
?
_files
[
0
]
:
null
;
const
file
=
_files
instanceof
Array
?
_files
[
0
]
:
null
;
const
url
=
const
url
=
file
&&
file
.
id
?
`
${
this
.
downloadUrl
}
/
${
file
.
id
}
`
:
""
;
file
&&
file
.
id
?
`
${
this
.
downloadUrl
}
/
${
file
.
id
}
`
:
""
;
this
.
dynaImgUrl
=
url
;
ImgurlBase64
.
getInstance
()
.
getImgURLOfBase64
(
url
)
.
then
((
res
:
any
)
=>
{
this
.
dynaImgUrl
=
res
;
});
}
catch
(
error
)
{
}
catch
(
error
)
{
this
.
dynaImgUrl
=
this
.
value
;
this
.
dynaImgUrl
=
this
.
value
;
}
}
...
...
src/logic/ui-logic/logic-param/ui-logic-active-ctrl-param.ts
浏览文件 @
24d1285a
...
@@ -37,10 +37,12 @@ export class UILogicActiveCtrlParam extends UILogicParamBase {
...
@@ -37,10 +37,12 @@ export class UILogicActiveCtrlParam extends UILogicParamBase {
* @memberof UILogicActiveCtrlParam
* @memberof UILogicActiveCtrlParam
*/
*/
private
getActiveCtrl
(
params
:
any
)
{
private
getActiveCtrl
(
params
:
any
)
{
const
{
actioncontext
}
=
params
;
const
{
actioncontext
,
xData
}
=
params
;
if
(
actioncontext
.
viewCtx
&&
actioncontext
.
viewCtx
.
ctrl
)
{
if
(
xData
)
{
return
xData
;
}
else
if
(
actioncontext
.
viewCtx
&&
actioncontext
.
viewCtx
.
ctrl
)
{
return
actioncontext
.
viewCtx
.
ctrl
;
return
actioncontext
.
viewCtx
.
ctrl
;
}
else
{
}
else
{
return
null
;
return
null
;
}
}
}
}
...
...
src/logic/ui-logic/logic-param/ui-logic-entity-list-param.ts
浏览文件 @
24d1285a
...
@@ -60,4 +60,37 @@ export class AppDeUILogicEntityListParam extends UILogicParamBase {
...
@@ -60,4 +60,37 @@ export class AppDeUILogicEntityListParam extends UILogicParamBase {
this
.
realValue
=
[];
this
.
realValue
=
[];
}
}
/**
* 获取指定属性值
*
* @param {string} strName
* @memberof AppDeUILogicEntityListParam
*/
public
get
(
strName
:
string
)
{
if
(
Object
.
prototype
.
toString
.
call
(
this
.
realValue
)
!==
'[object Array]'
)
{
throw
new
Error
(
`逻辑参数
${
this
.
strCodeName
}
非对象类型参数无法执行获取指定属性值`
);
}
if
(
!
isNaN
(
Number
(
strName
)))
{
return
this
.
realValue
[
Number
(
strName
)];
}
throw
new
Error
(
`逻辑参数
${
this
.
strCodeName
}
对象列表类型参数无法获取非数值下标属性`
);
}
/**
* 设置指定属性值
*
* @param {string} strName
* @param {*} value
* @memberof AppDeUILogicEntityListParam
*/
public
set
(
strName
:
string
,
value
:
any
)
{
if
(
Object
.
prototype
.
toString
.
call
(
this
.
realValue
)
!==
'[object Array]'
)
{
throw
new
Error
(
`逻辑参数
${
this
.
strCodeName
}
无法执行绑定非对象列表类型参数`
);
}
if
(
isNaN
(
Number
(
strName
)))
{
throw
new
Error
(
`逻辑参数
${
this
.
strCodeName
}
对象列表类型参数无法执行绑定到非数值下标`
);
}
this
.
realValue
[
Number
(
strName
)]
=
value
;
}
}
}
\ No newline at end of file
src/model/panel-detail/panel-detail.ts
浏览文件 @
24d1285a
...
@@ -442,7 +442,6 @@ export class PanelDetailModel {
...
@@ -442,7 +442,6 @@ export class PanelDetailModel {
// 识别父FLEX
// 识别父FLEX
if
(
parentItem
)
{
if
(
parentItem
)
{
if
(
parentItem
.
layout
==
'FLEX'
)
{
if
(
parentItem
.
layout
==
'FLEX'
)
{
Object
.
assign
(
boxStyle
,
{
'display'
:
'contents'
});
Object
.
assign
(
boxStyle
,
{
'flex-grow'
:
this
.
flexGrow
?
this
.
flexGrow
:
0
});
Object
.
assign
(
boxStyle
,
{
'flex-grow'
:
this
.
flexGrow
?
this
.
flexGrow
:
0
});
}
}
// 识别SIMPLEFLEX
// 识别SIMPLEFLEX
...
...
src/service/entity-service.ts
浏览文件 @
24d1285a
import
{
Http
}
from
'@/utils'
;
import
{
Http
,
Util
}
from
'@/utils'
;
import
CodeListService
from
"@/codelist/codelist-service"
;
import
CodeListService
from
"@/codelist/codelist-service"
;
/**
/**
...
@@ -28,7 +28,7 @@ export default class EntityService {
...
@@ -28,7 +28,7 @@ export default class EntityService {
* @type {(string)}
* @type {(string)}
* @memberof EntityService
* @memberof EntityService
*/
*/
public
tempStorage
:
any
;
public
tempStorage
:
any
;
/**
/**
* 当前DE标识
* 当前DE标识
...
@@ -37,7 +37,7 @@ export default class EntityService {
...
@@ -37,7 +37,7 @@ export default class EntityService {
* @type {(string)}
* @type {(string)}
* @memberof EntityService
* @memberof EntityService
*/
*/
public
APPDEKEY
:
string
=
''
;
public
APPDEKEY
:
string
=
''
;
/**
/**
* 当前APPDE标识
* 当前APPDE标识
...
@@ -46,7 +46,7 @@ export default class EntityService {
...
@@ -46,7 +46,7 @@ export default class EntityService {
* @type {(string)}
* @type {(string)}
* @memberof EntityService
* @memberof EntityService
*/
*/
public
APPLYDEKEY
:
string
=
''
;
public
APPLYDEKEY
:
string
=
''
;
/**
/**
* 当前NAME
* 当前NAME
...
@@ -55,7 +55,7 @@ export default class EntityService {
...
@@ -55,7 +55,7 @@ export default class EntityService {
* @type {(string)}
* @type {(string)}
* @memberof EntityService
* @memberof EntityService
*/
*/
public
APPDENAME
:
string
=
''
;
public
APPDENAME
:
string
=
''
;
/**
/**
* 当前主信息名
* 当前主信息名
...
@@ -64,7 +64,7 @@ export default class EntityService {
...
@@ -64,7 +64,7 @@ export default class EntityService {
* @type {(string)}
* @type {(string)}
* @memberof EntityService
* @memberof EntityService
*/
*/
public
APPDETEXT
:
string
=
''
;
public
APPDETEXT
:
string
=
''
;
/**
/**
* 当前系统名
* 当前系统名
...
@@ -73,7 +73,7 @@ export default class EntityService {
...
@@ -73,7 +73,7 @@ export default class EntityService {
* @type {(string)}
* @type {(string)}
* @memberof EntityService
* @memberof EntityService
*/
*/
public
SYSTEMNAME
:
string
=
''
;
public
SYSTEMNAME
:
string
=
''
;
/**
/**
* 当前应用名
* 当前应用名
...
@@ -82,7 +82,7 @@ export default class EntityService {
...
@@ -82,7 +82,7 @@ export default class EntityService {
* @type {(string)}
* @type {(string)}
* @memberof EntityService
* @memberof EntityService
*/
*/
public
APPNAME
:
string
=
''
;
public
APPNAME
:
string
=
''
;
/**
/**
* Creates an instance of EntityService.
* Creates an instance of EntityService.
...
@@ -100,17 +100,17 @@ export default class EntityService {
...
@@ -100,17 +100,17 @@ export default class EntityService {
*
*
* @memberof EntityService
* @memberof EntityService
*/
*/
public
getCodeList
(
tag
:
string
,
codelistType
:
string
,
context
:
any
=
{},
param
:
any
=
{})
{
public
getCodeList
(
tag
:
string
,
codelistType
:
string
,
context
:
any
=
{},
param
:
any
=
{})
{
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
let
codeListService
=
new
CodeListService
();
let
codeListService
=
new
CodeListService
();
if
(
tag
&&
Object
.
is
(
codelistType
,
"STATIC"
))
{
if
(
tag
&&
Object
.
is
(
codelistType
,
"STATIC"
))
{
codeListService
.
getStaticItems
(
tag
).
then
((
items
:
any
)
=>
{
codeListService
.
getStaticItems
(
tag
).
then
((
items
:
any
)
=>
{
resolve
(
items
);
resolve
(
items
);
})
})
}
else
if
(
tag
&&
Object
.
is
(
codelistType
,
"DYNAMIC"
))
{
}
else
if
(
tag
&&
Object
.
is
(
codelistType
,
"DYNAMIC"
))
{
codeListService
.
getItems
(
tag
,
context
,
param
).
then
((
res
:
any
)
=>
{
codeListService
.
getItems
(
tag
,
context
,
param
).
then
((
res
:
any
)
=>
{
resolve
(
res
);
resolve
(
res
);
}).
catch
((
error
:
any
)
=>
{
}).
catch
((
error
:
any
)
=>
{
reject
(
`
${
tag
}
代码表不存在`
);
reject
(
`
${
tag
}
代码表不存在`
);
});
});
}
}
...
@@ -122,7 +122,7 @@ export default class EntityService {
...
@@ -122,7 +122,7 @@ export default class EntityService {
*
*
* @memberof EntityService
* @memberof EntityService
*/
*/
public
initBasicData
(){
public
initBasicData
()
{
}
}
...
@@ -135,8 +135,8 @@ export default class EntityService {
...
@@ -135,8 +135,8 @@ export default class EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof EntityService
* @memberof EntityService
*/
*/
public
async
Select
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Select
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
this
.
SelectTemp
(
context
,
data
,
isloading
);
return
this
.
SelectTemp
(
context
,
data
,
isloading
);
}
}
/**
/**
...
@@ -148,17 +148,17 @@ export default class EntityService {
...
@@ -148,17 +148,17 @@ export default class EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof EntityService
* @memberof EntityService
*/
*/
public
async
SelectTemp
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
SelectTemp
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
srfsessionkey
&&
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_'
+
this
.
APPDENAME
),
'undefined'
))
{
if
(
context
.
srfsessionkey
&&
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_'
+
this
.
APPDENAME
),
'undefined'
))
{
let
result
:
any
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_'
+
this
.
APPDENAME
)
as
any
);
let
result
:
any
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_'
+
this
.
APPDENAME
)
as
any
);
if
(
result
)
{
if
(
result
)
{
let
tempResult
:
any
=
result
.
filter
((
item
:
any
)
=>
{
let
tempResult
:
any
=
result
.
filter
((
item
:
any
)
=>
{
return
Object
.
is
(
item
[
this
.
APPDEKEY
],
data
[
this
.
APPDEKEY
]);
return
Object
.
is
(
item
[
this
.
APPDEKEY
],
data
[
this
.
APPDEKEY
]);
})
})
let
tempResultData
:
any
=
tempResult
.
length
>
0
?
tempResult
[
0
]:
Object
.
assign
({},
data
);
let
tempResultData
:
any
=
tempResult
.
length
>
0
?
tempResult
[
0
]
:
Object
.
assign
({},
data
);
return
{
"status"
:
200
,
"data"
:
tempResultData
};
return
{
"status"
:
200
,
"data"
:
tempResultData
};
}
else
{
}
else
{
return
{
"status"
:
500
,
"data"
:
null
};
return
{
"status"
:
500
,
"data"
:
null
};
}
}
}
}
}
}
...
@@ -172,16 +172,19 @@ export default class EntityService {
...
@@ -172,16 +172,19 @@ export default class EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof EntityService
* @memberof EntityService
*/
*/
public
async
CreateTemp
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
CreateTemp
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
srfsessionkey
&&
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_'
+
this
.
APPDENAME
),
'undefined'
))
{
if
(
context
.
srfsessionkey
&&
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_'
+
this
.
APPDENAME
),
'undefined'
))
{
let
tempData
:
any
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_'
+
this
.
APPDENAME
)
as
any
);
let
tempData
:
any
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_'
+
this
.
APPDENAME
)
as
any
);
data
.
srffrontuf
=
"0"
;
data
.
srffrontuf
=
"0"
;
data
[
this
.
APPDEKEY
]
=
null
;
data
[
this
.
APPDEKEY
]
=
null
;
if
(
!
tempData
||
tempData
===
null
||
tempData
===
undefined
)
{
tempData
=
[];
}
tempData
.
push
(
data
);
tempData
.
push
(
data
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_'
+
this
.
APPDENAME
,
JSON
.
stringify
(
tempData
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_'
+
this
.
APPDENAME
,
JSON
.
stringify
(
tempData
));
return
{
"status"
:
200
,
"data"
:
data
};
return
{
"status"
:
200
,
"data"
:
data
};
}
else
{
}
else
{
return
{
"status"
:
200
,
"data"
:{}
};
return
{
"status"
:
200
,
"data"
:
{}
};
}
}
}
}
...
@@ -194,17 +197,17 @@ export default class EntityService {
...
@@ -194,17 +197,17 @@ export default class EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof EntityService
* @memberof EntityService
*/
*/
public
async
GetTemp
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
GetTemp
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
srfsessionkey
&&
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_'
+
this
.
APPDENAME
),
'undefined'
))
{
if
(
context
.
srfsessionkey
&&
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_'
+
this
.
APPDENAME
),
'undefined'
))
{
let
result
:
any
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_'
+
this
.
APPDENAME
)
as
any
);
let
result
:
any
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_'
+
this
.
APPDENAME
)
as
any
);
if
(
result
)
{
if
(
result
)
{
let
tempResult
:
any
=
result
.
filter
((
item
:
any
)
=>
{
let
tempResult
:
any
=
result
.
filter
((
item
:
any
)
=>
{
return
Object
.
is
(
item
[
this
.
APPDEKEY
],
data
[
this
.
APPDEKEY
]);
return
Object
.
is
(
item
[
this
.
APPDEKEY
],
data
[
this
.
APPDEKEY
]);
})
})
let
tempResultData
:
any
=
tempResult
.
length
>
0
?
tempResult
[
0
]:
Object
.
assign
({},
data
);
let
tempResultData
:
any
=
tempResult
.
length
>
0
?
tempResult
[
0
]
:
Object
.
assign
({},
data
);
return
{
"status"
:
200
,
"data"
:
tempResultData
};
return
{
"status"
:
200
,
"data"
:
tempResultData
};
}
else
{
}
else
{
return
{
"status"
:
500
,
"data"
:
null
};
return
{
"status"
:
500
,
"data"
:
null
};
}
}
}
}
}
}
...
@@ -218,8 +221,8 @@ export default class EntityService {
...
@@ -218,8 +221,8 @@ export default class EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof EntityService
* @memberof EntityService
*/
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
this
.
UpdateTemp
(
context
,
data
,
isloading
);
return
this
.
UpdateTemp
(
context
,
data
,
isloading
);
}
}
/**
/**
...
@@ -231,8 +234,8 @@ export default class EntityService {
...
@@ -231,8 +234,8 @@ export default class EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof EntityService
* @memberof EntityService
*/
*/
public
async
UpdateTempMajor
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
UpdateTempMajor
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
this
.
Update
(
context
,
data
,
isloading
);
return
this
.
Update
(
context
,
data
,
isloading
);
}
}
/**
/**
...
@@ -244,8 +247,21 @@ export default class EntityService {
...
@@ -244,8 +247,21 @@ export default class EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof EntityService
* @memberof EntityService
*/
*/
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
{
status
:
500
,
data
:
{
title
:
'失败'
,
message
:
'预置实体行为 Save 未实现'
}};
return
{
status
:
500
,
data
:
{
title
:
'失败'
,
message
:
'预置实体行为 Save 未实现'
}
};
}
/**
* SaveDraft接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EntityService
*/
public
async
SaveDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
{
status
:
500
,
data
:
{
title
:
'失败'
,
message
:
'预置实体行为 SaveDraft 未实现'
}
};
}
}
/**
/**
...
@@ -257,28 +273,28 @@ export default class EntityService {
...
@@ -257,28 +273,28 @@ export default class EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof EntityService
* @memberof EntityService
*/
*/
public
async
UpdateTemp
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
UpdateTemp
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
srfsessionkey
&&
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_'
+
this
.
APPDENAME
),
'undefined'
))
{
if
(
context
.
srfsessionkey
&&
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_'
+
this
.
APPDENAME
),
'undefined'
))
{
let
result
:
any
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_'
+
this
.
APPDENAME
)
as
any
);
let
result
:
any
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_'
+
this
.
APPDENAME
)
as
any
);
let
tempData
:
Array
<
any
>
=
[];
let
tempData
:
Array
<
any
>
=
[];
if
(
result
&&
result
.
length
>
0
)
{
if
(
result
&&
result
.
length
>
0
)
{
result
.
forEach
((
item
:
any
)
=>
{
result
.
forEach
((
item
:
any
)
=>
{
let
singleData
:
any
=
{};
let
singleData
:
any
=
{};
if
(
Object
.
is
(
item
[
this
.
APPDEKEY
],
data
[
this
.
APPDEKEY
]))
{
if
(
Object
.
is
(
item
[
this
.
APPDEKEY
],
data
[
this
.
APPDEKEY
]))
{
Object
.
keys
(
item
).
forEach
((
field
:
any
)
=>
{
Object
.
keys
(
item
).
forEach
((
field
:
any
)
=>
{
singleData
[
field
]
=
data
[
field
]
?
data
[
field
]:
item
[
field
];
singleData
[
field
]
=
data
[
field
]
?
data
[
field
]
:
item
[
field
];
})
})
}
}
if
(
Object
.
keys
(
singleData
).
length
>
0
)
{
if
(
Object
.
keys
(
singleData
).
length
>
0
)
{
tempData
.
push
(
singleData
);
tempData
.
push
(
singleData
);
}
else
{
}
else
{
tempData
.
push
(
item
);
tempData
.
push
(
item
);
}
}
});
});
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_'
+
this
.
APPDENAME
,
JSON
.
stringify
(
tempData
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_'
+
this
.
APPDENAME
,
JSON
.
stringify
(
tempData
));
return
{
"status"
:
200
,
"data"
:
data
};
return
{
"status"
:
200
,
"data"
:
data
};
}
else
{
}
else
{
return
{
"status"
:
500
,
"data"
:
null
};
return
{
"status"
:
500
,
"data"
:
null
};
}
}
}
}
}
}
...
@@ -292,18 +308,18 @@ export default class EntityService {
...
@@ -292,18 +308,18 @@ export default class EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof EntityService
* @memberof EntityService
*/
*/
public
async
RemoveTemp
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
RemoveTemp
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
srfsessionkey
&&
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_'
+
this
.
APPDENAME
),
'undefined'
))
{
if
(
context
.
srfsessionkey
&&
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_'
+
this
.
APPDENAME
),
'undefined'
))
{
let
result
:
any
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_'
+
this
.
APPDENAME
)
as
any
);
let
result
:
any
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_'
+
this
.
APPDENAME
)
as
any
);
if
(
result
)
{
if
(
result
)
{
let
tempResult
:
any
=
result
.
filter
((
item
:
any
)
=>
{
let
tempResult
:
any
=
result
.
filter
((
item
:
any
)
=>
{
// return !( Object.is(item[this.APPDEKEY],data[this.APPDEKEY]) && Object.is(item[this.APPDETEXT],data[this.APPDETEXT]));
// return !( Object.is(item[this.APPDEKEY],data[this.APPDEKEY]) && Object.is(item[this.APPDETEXT],data[this.APPDETEXT]));
return
!
Object
.
is
(
item
[
this
.
APPDEKEY
],
data
[
this
.
APPDEKEY
]);
return
!
Object
.
is
(
item
[
this
.
APPDEKEY
],
data
[
this
.
APPDEKEY
]);
})
})
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_'
+
this
.
APPDENAME
,
JSON
.
stringify
(
tempResult
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_'
+
this
.
APPDENAME
,
JSON
.
stringify
(
tempResult
));
return
{
"status"
:
200
,
"data"
:
data
};
return
{
"status"
:
200
,
"data"
:
data
};
}
else
{
}
else
{
return
{
"status"
:
500
,
"data"
:
null
};
return
{
"status"
:
500
,
"data"
:
null
};
}
}
}
}
}
}
...
@@ -317,19 +333,19 @@ export default class EntityService {
...
@@ -317,19 +333,19 @@ export default class EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof EntityService
* @memberof EntityService
*/
*/
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
srfsessionkey
&&
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_'
+
this
.
APPDENAME
),
'undefined'
))
{
if
(
context
.
srfsessionkey
&&
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_'
+
this
.
APPDENAME
),
'undefined'
))
{
let
result
:
any
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_'
+
this
.
APPDENAME
)
as
any
);
let
result
:
any
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_'
+
this
.
APPDENAME
)
as
any
);
if
(
result
)
{
if
(
result
)
{
let
flag
:
boolean
=
false
;
let
flag
:
boolean
=
false
;
result
.
forEach
((
item
:
any
)
=>
{
result
.
forEach
((
item
:
any
)
=>
{
if
(
Object
.
is
(
item
[
this
.
APPDEKEY
],
data
[
this
.
APPDEKEY
]))
{
if
(
Object
.
is
(
item
[
this
.
APPDEKEY
],
data
[
this
.
APPDEKEY
]))
{
flag
=
true
;
flag
=
true
;
}
}
});
});
return
{
"status"
:
200
,
"data"
:
flag
};
return
{
"status"
:
200
,
"data"
:
flag
};
}
else
{
}
else
{
return
{
"status"
:
500
,
"data"
:
null
};
return
{
"status"
:
500
,
"data"
:
null
};
}
}
}
}
}
}
...
@@ -343,8 +359,8 @@ export default class EntityService {
...
@@ -343,8 +359,8 @@ export default class EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof EntityService
* @memberof EntityService
*/
*/
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
this
.
GetDraftTemp
(
context
,
data
,
isloading
);
return
this
.
GetDraftTemp
(
context
,
data
,
isloading
);
}
}
/**
/**
...
@@ -356,8 +372,8 @@ export default class EntityService {
...
@@ -356,8 +372,8 @@ export default class EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof EntityService
* @memberof EntityService
*/
*/
public
async
Remove
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Remove
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
this
.
RemoveTemp
(
context
,
data
,
isloading
);
return
this
.
RemoveTemp
(
context
,
data
,
isloading
);
}
}
/**
/**
...
@@ -369,8 +385,8 @@ export default class EntityService {
...
@@ -369,8 +385,8 @@ export default class EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof EntityService
* @memberof EntityService
*/
*/
public
async
CreateTempMajor
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
CreateTempMajor
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
this
.
Create
(
context
,
data
,
isloading
);
return
this
.
Create
(
context
,
data
,
isloading
);
}
}
/**
/**
...
@@ -382,8 +398,8 @@ export default class EntityService {
...
@@ -382,8 +398,8 @@ export default class EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof EntityService
* @memberof EntityService
*/
*/
public
async
RemoveTempMajor
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
RemoveTempMajor
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
this
.
Remove
(
context
,
data
,
isloading
);
return
this
.
Remove
(
context
,
data
,
isloading
);
}
}
/**
/**
...
@@ -395,8 +411,8 @@ export default class EntityService {
...
@@ -395,8 +411,8 @@ export default class EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof EntityService
* @memberof EntityService
*/
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
this
.
GetTemp
(
context
,
data
,
isloading
);
return
this
.
GetTemp
(
context
,
data
,
isloading
);
}
}
/**
/**
...
@@ -408,8 +424,8 @@ export default class EntityService {
...
@@ -408,8 +424,8 @@ export default class EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof EntityService
* @memberof EntityService
*/
*/
public
async
GetDraftTempMajor
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
GetDraftTempMajor
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
this
.
GetDraft
(
context
,
data
,
isloading
);
return
this
.
GetDraft
(
context
,
data
,
isloading
);
}
}
/**
/**
...
@@ -421,8 +437,8 @@ export default class EntityService {
...
@@ -421,8 +437,8 @@ export default class EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof EntityService
* @memberof EntityService
*/
*/
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
this
.
CreateTemp
(
context
,
data
,
isloading
);
return
this
.
CreateTemp
(
context
,
data
,
isloading
);
}
}
/**
/**
...
@@ -434,8 +450,8 @@ export default class EntityService {
...
@@ -434,8 +450,8 @@ export default class EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof EntityService
* @memberof EntityService
*/
*/
public
async
GetTempMajor
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
GetTempMajor
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
this
.
Get
(
context
,
data
,
isloading
);
return
this
.
Get
(
context
,
data
,
isloading
);
}
}
/**
/**
...
@@ -447,14 +463,14 @@ export default class EntityService {
...
@@ -447,14 +463,14 @@ export default class EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof EntityService
* @memberof EntityService
*/
*/
public
async
GetDraftTemp
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
GetDraftTemp
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
tempData
=
{
srfsessionkey
:
context
.
srfsessionkey
};
let
tempData
=
{
srfsessionkey
:
context
.
srfsessionkey
};
Object
.
defineProperty
(
tempData
,
this
.
APPDEKEY
,
{
Object
.
defineProperty
(
tempData
,
this
.
APPDEKEY
,
{
enumerable
:
true
,
enumerable
:
true
,
value
:
data
[
this
.
APPDEKEY
]
value
:
data
[
this
.
APPDEKEY
]
});
});
Object
.
assign
(
data
,
tempData
);
Object
.
assign
(
data
,
tempData
);
return
{
"status"
:
200
,
"data"
:
data
};
return
{
"status"
:
200
,
"data"
:
data
};
}
}
/**
/**
...
@@ -466,8 +482,8 @@ export default class EntityService {
...
@@ -466,8 +482,8 @@ export default class EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof EntityService
* @memberof EntityService
*/
*/
public
async
FetchDefault
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
FetchDefault
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
{
status
:
500
,
data
:
{
title
:
'失败'
,
message
:
'预置实体行为 FetchDefault 未实现'
}};
return
{
status
:
500
,
data
:
{
title
:
'失败'
,
message
:
'预置实体行为 FetchDefault 未实现'
}
};
}
}
/**
/**
...
@@ -479,8 +495,17 @@ export default class EntityService {
...
@@ -479,8 +495,17 @@ export default class EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof EntityService
* @memberof EntityService
*/
*/
public
async
FetchTempDefault
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
FetchTempDefault
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
{
status
:
500
,
data
:
{
title
:
'失败'
,
message
:
'预置实体行为 FetchDefault 未实现'
}};
if
(
context
.
srfsessionkey
&&
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
`_
${
this
.
APPDENAME
.
toLowerCase
()}
`
),
'undefined'
))
{
let
result
:
any
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
`_
${
this
.
APPDENAME
.
toLowerCase
()}
`
)
as
any
);
if
(
result
)
{
return
{
"status"
:
200
,
"data"
:
result
};
}
else
{
return
{
"status"
:
200
,
"data"
:
[]
};
}
}
else
{
return
{
"status"
:
200
,
"data"
:
[]
};
}
}
}
/**
/**
...
@@ -492,8 +517,8 @@ export default class EntityService {
...
@@ -492,8 +517,8 @@ export default class EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof EntityService
* @memberof EntityService
*/
*/
public
async
FilterUpdate
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
FilterUpdate
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
this
.
Update
(
context
,
data
,
isloading
);
return
this
.
Update
(
context
,
data
,
isloading
);
}
}
/**
/**
...
@@ -505,8 +530,8 @@ export default class EntityService {
...
@@ -505,8 +530,8 @@ export default class EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof EntityService
* @memberof EntityService
*/
*/
public
async
FilterSearch
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
FilterSearch
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
this
.
FetchDefault
(
context
,
data
,
isloading
);
return
this
.
FetchDefault
(
context
,
data
,
isloading
);
}
}
/**
/**
...
@@ -518,8 +543,8 @@ export default class EntityService {
...
@@ -518,8 +543,8 @@ export default class EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof EntityService
* @memberof EntityService
*/
*/
public
async
FilterGet
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
FilterGet
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
this
.
Get
(
context
,
data
,
isloading
);
return
this
.
Get
(
context
,
data
,
isloading
);
}
}
/**
/**
...
@@ -531,8 +556,8 @@ export default class EntityService {
...
@@ -531,8 +556,8 @@ export default class EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof EntityService
* @memberof EntityService
*/
*/
public
async
FilterCreate
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
FilterCreate
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
this
.
Create
(
context
,
data
,
isloading
);
return
this
.
Create
(
context
,
data
,
isloading
);
}
}
/**
/**
...
@@ -544,8 +569,8 @@ export default class EntityService {
...
@@ -544,8 +569,8 @@ export default class EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof EntityService
* @memberof EntityService
*/
*/
public
async
FilterGetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
FilterGetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
this
.
GetDraft
(
context
,
data
,
isloading
);
return
this
.
GetDraft
(
context
,
data
,
isloading
);
}
}
/**
/**
...
@@ -557,8 +582,8 @@ export default class EntityService {
...
@@ -557,8 +582,8 @@ export default class EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof EntityService
* @memberof EntityService
*/
*/
public
async
FilterRemove
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
FilterRemove
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
this
.
Remove
(
context
,
data
,
isloading
);
return
this
.
Remove
(
context
,
data
,
isloading
);
}
}
/**
/**
...
@@ -570,8 +595,8 @@ export default class EntityService {
...
@@ -570,8 +595,8 @@ export default class EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof EntityService
* @memberof EntityService
*/
*/
public
async
FilterFetch
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
FilterFetch
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
this
.
FetchDefault
(
context
,
data
,
isloading
);
return
this
.
FetchDefault
(
context
,
data
,
isloading
);
}
}
/**
/**
...
@@ -583,10 +608,10 @@ export default class EntityService {
...
@@ -583,10 +608,10 @@ export default class EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof EntityService
* @memberof EntityService
*/
*/
public
async
ImportData
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
ImportData
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
_data
:
Array
<
any
>
=
[];
let
_data
:
Array
<
any
>
=
[];
if
(
data
&&
data
.
importData
)
_data
=
data
.
importData
;
if
(
data
&&
data
.
importData
)
_data
=
data
.
importData
;
return
Http
.
getInstance
().
post
(
`/
${
this
.
APPDENAME
}
/import?config=
${
data
.
name
}
`
,
_data
,
isloading
);
return
Http
.
getInstance
().
post
(
`/
${
this
.
APPDENAME
}
/import?config=
${
data
.
name
}
&ignoreerror=
${
data
.
ignoreerror
?
true
:
false
}
`
,
_data
,
isloading
);
}
}
/**
/**
...
@@ -598,8 +623,8 @@ export default class EntityService {
...
@@ -598,8 +623,8 @@ export default class EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof EntityService
* @memberof EntityService
*/
*/
public
async
createBatch
(
context
:
any
=
{},
data
:
any
,
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
createBatch
(
context
:
any
=
{},
data
:
any
,
isloading
?:
boolean
):
Promise
<
any
>
{
return
Http
.
getInstance
().
post
(
`/
${
this
.
APPDENAME
}
/batch`
,
data
,
isloading
);
return
Http
.
getInstance
().
post
(
`/
${
this
.
APPDENAME
}
/batch`
,
data
,
isloading
);
}
}
/**
/**
...
@@ -611,8 +636,8 @@ export default class EntityService {
...
@@ -611,8 +636,8 @@ export default class EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof EntityService
* @memberof EntityService
*/
*/
public
async
saveBatch
(
context
:
any
=
{},
data
:
any
,
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
saveBatch
(
context
:
any
=
{},
data
:
any
,
isloading
?:
boolean
):
Promise
<
any
>
{
return
Http
.
getInstance
().
post
(
`/
${
this
.
APPDENAME
}
/savebatch`
,
data
,
isloading
);
return
Http
.
getInstance
().
post
(
`/
${
this
.
APPDENAME
}
/savebatch`
,
data
,
isloading
);
}
}
/**
/**
...
@@ -624,8 +649,8 @@ export default class EntityService {
...
@@ -624,8 +649,8 @@ export default class EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof EntityService
* @memberof EntityService
*/
*/
public
async
updateBatch
(
context
:
any
=
{},
data
:
any
,
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
updateBatch
(
context
:
any
=
{},
data
:
any
,
isloading
?:
boolean
):
Promise
<
any
>
{
return
Http
.
getInstance
().
put
(
`/
${
this
.
APPDENAME
}
/batch`
,
data
,
isloading
);
return
Http
.
getInstance
().
put
(
`/
${
this
.
APPDENAME
}
/batch`
,
data
,
isloading
);
}
}
/**
/**
...
@@ -637,8 +662,8 @@ export default class EntityService {
...
@@ -637,8 +662,8 @@ export default class EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof EntityService
* @memberof EntityService
*/
*/
public
async
removeBatch
(
context
:
any
=
{},
data
:
any
,
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
removeBatch
(
context
:
any
=
{},
data
:
any
,
isloading
?:
boolean
):
Promise
<
any
>
{
return
Http
.
getInstance
().
delete
(
`/
${
this
.
APPDENAME
}
/batch`
,
isloading
,
data
[
this
.
APPDEKEY
]
);
return
Http
.
getInstance
().
delete
(
`/
${
this
.
APPDENAME
}
/batch`
,
data
[
this
.
APPDEKEY
],
isloading
);
}
}
/**
/**
...
@@ -650,9 +675,9 @@ export default class EntityService {
...
@@ -650,9 +675,9 @@ export default class EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof EntityService
* @memberof EntityService
*/
*/
public
async
getDataInfo
(
context
:
any
=
{},
data
:
any
,
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
getDataInfo
(
context
:
any
=
{},
data
:
any
,
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
[
this
.
APPLYDEKEY
])
{
if
(
context
[
this
.
APPLYDEKEY
])
{
return
this
.
Get
(
context
,
data
,
isloading
);
return
this
.
Get
(
context
,
data
,
isloading
);
}
}
}
}
...
@@ -665,8 +690,8 @@ export default class EntityService {
...
@@ -665,8 +690,8 @@ export default class EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof EntityService
* @memberof EntityService
*/
*/
public
async
getDynaModel
(
context
:
any
=
{},
data
:
any
,
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
getDynaModel
(
context
:
any
=
{},
data
:
any
,
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
data
&&
data
.
configType
&&
data
.
targetType
)
{
if
(
data
&&
data
.
configType
&&
data
.
targetType
)
{
return
Http
.
getInstance
().
get
(
`/configs/
${
data
.
configType
}
/
${
data
.
targetType
}
`
);
return
Http
.
getInstance
().
get
(
`/configs/
${
data
.
configType
}
/
${
data
.
targetType
}
`
);
}
}
}
}
...
@@ -680,9 +705,9 @@ export default class EntityService {
...
@@ -680,9 +705,9 @@ export default class EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof EntityService
* @memberof EntityService
*/
*/
public
async
setDynaModel
(
context
:
any
=
{},
data
:
any
,
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
setDynaModel
(
context
:
any
=
{},
data
:
any
,
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
data
&&
data
.
configType
&&
data
.
targetType
)
{
if
(
data
&&
data
.
configType
&&
data
.
targetType
)
{
return
Http
.
getInstance
().
put
(
`/configs/
${
data
.
configType
}
/
${
data
.
targetType
}
`
,
{
model
:
data
.
model
});
return
Http
.
getInstance
().
put
(
`/configs/
${
data
.
configType
}
/
${
data
.
targetType
}
`
,
{
model
:
data
.
model
});
}
}
}
}
...
@@ -696,16 +721,16 @@ export default class EntityService {
...
@@ -696,16 +721,16 @@ export default class EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof EntityService
* @memberof EntityService
*/
*/
public
async
WFStart
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
,
localdata
?:
any
):
Promise
<
any
>
{
public
async
WFStart
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
,
localdata
?:
any
):
Promise
<
any
>
{
if
(
localdata
&&
Object
.
keys
(
localdata
).
length
>
0
)
{
if
(
localdata
&&
Object
.
keys
(
localdata
).
length
>
0
)
{
const
requestData
:
any
=
{};
const
requestData
:
any
=
{};
Object
.
assign
(
requestData
,
{
activedata
:
data
});
Object
.
assign
(
requestData
,
{
activedata
:
data
});
Object
.
assign
(
requestData
,
localdata
);
Object
.
assign
(
requestData
,
localdata
);
return
Http
.
getInstance
().
post
(
`/wfcore/
${
this
.
SYSTEMNAME
}
-app-
${
this
.
APPNAME
}
/
${
this
.
APPDENAME
}
/
${
data
[
this
.
APPDEKEY
]}
/process-instances`
,
requestData
,
isloading
);
return
Http
.
getInstance
().
post
(
`/wfcore/
${
this
.
SYSTEMNAME
}
-app-
${
this
.
APPNAME
}
/
${
this
.
APPDENAME
}
/
${
data
[
this
.
APPDEKEY
]}
/process-instances`
,
requestData
,
isloading
);
}
else
{
}
else
{
const
requestData
:
any
=
{};
const
requestData
:
any
=
{};
Object
.
assign
(
requestData
,
{
wfdata
:
data
});
Object
.
assign
(
requestData
,
{
wfdata
:
data
});
return
Http
.
getInstance
().
post
(
`/
${
this
.
APPDENAME
}
/
${
data
[
this
.
APPDEKEY
]}
/wfstart`
,
requestData
,
isloading
);
return
Http
.
getInstance
().
post
(
`/
${
this
.
APPDENAME
}
/
${
data
[
this
.
APPDEKEY
]}
/wfstart`
,
requestData
,
isloading
);
}
}
}
}
...
@@ -719,8 +744,8 @@ export default class EntityService {
...
@@ -719,8 +744,8 @@ export default class EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof EntityService
* @memberof EntityService
*/
*/
public
async
WFClose
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
WFClose
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
Http
.
getInstance
().
post
(
`/
${
this
.
APPDENAME
}
/
${
data
[
this
.
APPDEKEY
]}
/wfclose`
,
data
,
isloading
);
return
Http
.
getInstance
().
post
(
`/
${
this
.
APPDENAME
}
/
${
data
[
this
.
APPDEKEY
]}
/wfclose`
,
data
,
isloading
);
}
}
...
@@ -733,8 +758,8 @@ export default class EntityService {
...
@@ -733,8 +758,8 @@ export default class EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof EntityService
* @memberof EntityService
*/
*/
public
async
WFMarkRead
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
WFMarkRead
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
Http
.
getInstance
().
post
(
`/
${
this
.
APPDENAME
}
/
${
data
[
this
.
APPDEKEY
]}
/wfmarkread`
,
data
,
isloading
);
return
Http
.
getInstance
().
post
(
`/
${
this
.
APPDENAME
}
/
${
data
[
this
.
APPDEKEY
]}
/wfmarkread`
,
data
,
isloading
);
}
}
/**
/**
...
@@ -746,8 +771,8 @@ export default class EntityService {
...
@@ -746,8 +771,8 @@ export default class EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof EntityService
* @memberof EntityService
*/
*/
public
async
WFGoto
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
WFGoto
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
Http
.
getInstance
().
post
(
`/
${
this
.
APPDENAME
}
/
${
data
[
this
.
APPDEKEY
]}
/wfgoto`
,
data
,
isloading
);
return
Http
.
getInstance
().
post
(
`/
${
this
.
APPDENAME
}
/
${
data
[
this
.
APPDEKEY
]}
/wfgoto`
,
data
,
isloading
);
}
}
/**
/**
...
@@ -759,8 +784,8 @@ export default class EntityService {
...
@@ -759,8 +784,8 @@ export default class EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof EntityService
* @memberof EntityService
*/
*/
public
async
WFRollback
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
WFRollback
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
Http
.
getInstance
().
post
(
`/
${
this
.
APPDENAME
}
/
${
data
[
this
.
APPDEKEY
]}
/wfrollback`
,
data
,
isloading
);
return
Http
.
getInstance
().
post
(
`/
${
this
.
APPDENAME
}
/
${
data
[
this
.
APPDEKEY
]}
/wfrollback`
,
data
,
isloading
);
}
}
/**
/**
...
@@ -772,8 +797,8 @@ export default class EntityService {
...
@@ -772,8 +797,8 @@ export default class EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof EntityService
* @memberof EntityService
*/
*/
public
async
WFRestart
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
WFRestart
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
Http
.
getInstance
().
post
(
`/
${
this
.
APPDENAME
}
/
${
data
[
this
.
APPDEKEY
]}
/wfrestart`
,
data
,
isloading
);
return
Http
.
getInstance
().
post
(
`/
${
this
.
APPDENAME
}
/
${
data
[
this
.
APPDEKEY
]}
/wfrestart`
,
data
,
isloading
);
}
}
/**
/**
...
@@ -785,8 +810,8 @@ export default class EntityService {
...
@@ -785,8 +810,8 @@ export default class EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof EntityService
* @memberof EntityService
*/
*/
public
async
WFReassign
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
WFReassign
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
Http
.
getInstance
().
post
(
`/
${
this
.
APPDENAME
}
/
${
data
[
this
.
APPDEKEY
]}
/wfreassign`
,
data
,
isloading
);
return
Http
.
getInstance
().
post
(
`/
${
this
.
APPDENAME
}
/
${
data
[
this
.
APPDEKEY
]}
/wfreassign`
,
data
,
isloading
);
}
}
...
@@ -799,7 +824,7 @@ export default class EntityService {
...
@@ -799,7 +824,7 @@ export default class EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof EntityService
* @memberof EntityService
*/
*/
public
async
WFGetWorkFlow
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
WFGetWorkFlow
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
Http
.
getInstance
().
get
(
`/wfcore/
${
this
.
SYSTEMNAME
}
-app-
${
this
.
APPNAME
}
/
${
this
.
APPDENAME
}
/process-definitions`
);
return
Http
.
getInstance
().
get
(
`/wfcore/
${
this
.
SYSTEMNAME
}
-app-
${
this
.
APPNAME
}
/
${
this
.
APPDENAME
}
/process-definitions`
);
}
}
...
@@ -812,7 +837,7 @@ export default class EntityService {
...
@@ -812,7 +837,7 @@ export default class EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof EntityService
* @memberof EntityService
*/
*/
public
async
WFGetWFStep
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
WFGetWFStep
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
Http
.
getInstance
().
get
(
`/wfcore/
${
this
.
SYSTEMNAME
}
-app-
${
this
.
APPNAME
}
/
${
this
.
APPDENAME
}
/process-definitions-nodes`
);
return
Http
.
getInstance
().
get
(
`/wfcore/
${
this
.
SYSTEMNAME
}
-app-
${
this
.
APPNAME
}
/
${
this
.
APPDENAME
}
/process-definitions-nodes`
);
}
}
...
@@ -825,7 +850,7 @@ export default class EntityService {
...
@@ -825,7 +850,7 @@ export default class EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof EntityService
* @memberof EntityService
*/
*/
public
async
GetWFLink
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
GetWFLink
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
Http
.
getInstance
().
get
(
`/wfcore/
${
this
.
SYSTEMNAME
}
-app-
${
this
.
APPNAME
}
/
${
this
.
APPDENAME
}
/
${
context
[
this
.
APPLYDEKEY
]}
/usertasks/
${
data
[
'taskDefinitionKey'
]}
/ways`
);
return
Http
.
getInstance
().
get
(
`/wfcore/
${
this
.
SYSTEMNAME
}
-app-
${
this
.
APPNAME
}
/
${
this
.
APPDENAME
}
/
${
context
[
this
.
APPLYDEKEY
]}
/usertasks/
${
data
[
'taskDefinitionKey'
]}
/ways`
);
}
}
...
@@ -838,7 +863,7 @@ export default class EntityService {
...
@@ -838,7 +863,7 @@ export default class EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof EntityService
* @memberof EntityService
*/
*/
public
async
getWFLinks
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
getWFLinks
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
Http
.
getInstance
().
get
(
`/wfcore/
${
this
.
SYSTEMNAME
}
-app-
${
this
.
APPNAME
}
/
${
this
.
APPDENAME
}
/process-definitions/
${
data
[
'processDefinitionKey'
]}
/usertasks/
${
data
[
'userTaskId'
]}
/ways`
);
return
Http
.
getInstance
().
get
(
`/wfcore/
${
this
.
SYSTEMNAME
}
-app-
${
this
.
APPNAME
}
/
${
this
.
APPDENAME
}
/process-definitions/
${
data
[
'processDefinitionKey'
]}
/usertasks/
${
data
[
'userTaskId'
]}
/ways`
);
}
}
...
@@ -851,8 +876,8 @@ export default class EntityService {
...
@@ -851,8 +876,8 @@ export default class EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof EntityService
* @memberof EntityService
*/
*/
public
async
wfSubmitBatch
(
context
:
any
=
{},
data
:
any
=
{},
localdata
:
any
,
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
wfSubmitBatch
(
context
:
any
=
{},
data
:
any
=
{},
localdata
:
any
,
isloading
?:
boolean
):
Promise
<
any
>
{
return
Http
.
getInstance
().
post
(
`/wfcore/
${
this
.
SYSTEMNAME
}
-app-
${
this
.
APPNAME
}
/
${
this
.
APPDENAME
}
/process-definitions/
${
localdata
[
'processDefinitionKey'
]}
/usertasks/
${
localdata
[
'taskDefinitionKey'
]}
/ways/
${
localdata
[
'sequenceFlowId'
]}
/submit`
,
data
);
return
Http
.
getInstance
().
post
(
`/wfcore/
${
this
.
SYSTEMNAME
}
-app-
${
this
.
APPNAME
}
/
${
this
.
APPDENAME
}
/process-definitions/
${
localdata
[
'processDefinitionKey'
]}
/usertasks/
${
localdata
[
'taskDefinitionKey'
]}
/ways/
${
localdata
[
'sequenceFlowId'
]}
/submit`
,
data
);
}
}
/**
/**
...
@@ -864,7 +889,7 @@ export default class EntityService {
...
@@ -864,7 +889,7 @@ export default class EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof EntityService
* @memberof EntityService
*/
*/
public
async
GetWFHistory
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
GetWFHistory
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
Http
.
getInstance
().
get
(
`/wfcore/
${
this
.
SYSTEMNAME
}
-app-
${
this
.
APPNAME
}
/
${
this
.
APPDENAME
}
/
${
context
[
this
.
APPLYDEKEY
]}
/process-instances/alls/history`
);
return
Http
.
getInstance
().
get
(
`/wfcore/
${
this
.
SYSTEMNAME
}
-app-
${
this
.
APPNAME
}
/
${
this
.
APPDENAME
}
/
${
context
[
this
.
APPLYDEKEY
]}
/process-instances/alls/history`
);
}
}
...
@@ -877,8 +902,8 @@ export default class EntityService {
...
@@ -877,8 +902,8 @@ export default class EntityService {
* @return {*} {Promise<any>}
* @return {*} {Promise<any>}
* @memberof EntityService
* @memberof EntityService
*/
*/
public
async
BeforeSign
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
BeforeSign
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
Http
.
getInstance
().
post
(
`/wfcore/
${
this
.
SYSTEMNAME
}
-app-
${
this
.
APPNAME
}
/
${
this
.
APPDENAME
}
/
${
context
[
this
.
APPLYDEKEY
]}
/tasks/
${
context
.
taskId
}
/beforesign`
,
data
);
return
Http
.
getInstance
().
post
(
`/wfcore/
${
this
.
SYSTEMNAME
}
-app-
${
this
.
APPNAME
}
/
${
this
.
APPDENAME
}
/
${
context
[
this
.
APPLYDEKEY
]}
/tasks/
${
context
.
taskId
}
/beforesign`
,
data
);
}
}
/**
/**
...
@@ -890,8 +915,8 @@ export default class EntityService {
...
@@ -890,8 +915,8 @@ export default class EntityService {
* @return {*} {Promise<any>}
* @return {*} {Promise<any>}
* @memberof EntityService
* @memberof EntityService
*/
*/
public
async
TransFerTask
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
TransFerTask
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
Http
.
getInstance
().
post
(
`/wfcore/
${
this
.
SYSTEMNAME
}
-app-
${
this
.
APPNAME
}
/
${
this
.
APPDENAME
}
/
${
context
[
this
.
APPLYDEKEY
]}
/tasks/
${
context
.
taskId
}
/transfer`
,
data
);
return
Http
.
getInstance
().
post
(
`/wfcore/
${
this
.
SYSTEMNAME
}
-app-
${
this
.
APPNAME
}
/
${
this
.
APPDENAME
}
/
${
context
[
this
.
APPLYDEKEY
]}
/tasks/
${
context
.
taskId
}
/transfer`
,
data
);
}
}
/**
/**
...
@@ -903,7 +928,7 @@ export default class EntityService {
...
@@ -903,7 +928,7 @@ export default class EntityService {
* @return {*} {Promise<any>}
* @return {*} {Promise<any>}
* @memberof EntityService
* @memberof EntityService
*/
*/
public
async
SendBack
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
SendBack
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
Http
.
getInstance
().
post
(
`/wfcore/
${
this
.
SYSTEMNAME
}
-app-
${
this
.
APPNAME
}
/
${
this
.
APPDENAME
}
/
${
context
[
this
.
APPLYDEKEY
]}
/tasks/
${
context
.
taskId
}
/sendback`
);
return
Http
.
getInstance
().
post
(
`/wfcore/
${
this
.
SYSTEMNAME
}
-app-
${
this
.
APPNAME
}
/
${
this
.
APPDENAME
}
/
${
context
[
this
.
APPLYDEKEY
]}
/tasks/
${
context
.
taskId
}
/sendback`
);
}
}
...
@@ -917,27 +942,27 @@ export default class EntityService {
...
@@ -917,27 +942,27 @@ export default class EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof EntityService
* @memberof EntityService
*/
*/
public
async
WFSubmit
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
,
localdata
?:
any
):
Promise
<
any
>
{
public
async
WFSubmit
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
,
localdata
?:
any
):
Promise
<
any
>
{
if
(
localdata
&&
Object
.
keys
(
localdata
).
length
>
0
)
{
if
(
localdata
&&
Object
.
keys
(
localdata
).
length
>
0
)
{
const
requestData
:
any
=
{};
const
requestData
:
any
=
{};
if
(
data
.
viewparams
)
{
if
(
data
.
viewparams
)
{
delete
data
.
viewparams
;
delete
data
.
viewparams
;
}
}
Object
.
assign
(
requestData
,
{
activedata
:
data
});
Object
.
assign
(
requestData
,
{
activedata
:
data
});
Object
.
assign
(
requestData
,
localdata
);
Object
.
assign
(
requestData
,
localdata
);
return
Http
.
getInstance
().
post
(
`/wfcore/
${
this
.
SYSTEMNAME
}
-app-
${
this
.
APPNAME
}
/
${
this
.
APPDENAME
}
/
${
data
[
this
.
APPDEKEY
]}
/tasks/
${
localdata
[
'taskId'
]}
`
,
requestData
,
isloading
);
return
Http
.
getInstance
().
post
(
`/wfcore/
${
this
.
SYSTEMNAME
}
-app-
${
this
.
APPNAME
}
/
${
this
.
APPDENAME
}
/
${
data
[
this
.
APPDEKEY
]}
/tasks/
${
localdata
[
'taskId'
]}
`
,
requestData
,
isloading
);
}
else
{
}
else
{
const
requestData
:
any
=
{};
const
requestData
:
any
=
{};
if
(
data
.
srfwfmemo
)
{
if
(
data
.
srfwfmemo
)
{
requestData
.
srfwfmemo
=
JSON
.
parse
(
JSON
.
stringify
(
data
)).
srfwfmemo
;
requestData
.
srfwfmemo
=
JSON
.
parse
(
JSON
.
stringify
(
data
)).
srfwfmemo
;
delete
data
.
srfwfmemo
;
delete
data
.
srfwfmemo
;
}
}
if
(
data
.
viewparams
)
{
if
(
data
.
viewparams
)
{
delete
data
.
viewparams
;
delete
data
.
viewparams
;
}
}
Object
.
assign
(
requestData
,
{
wfdata
:
data
});
Object
.
assign
(
requestData
,
{
wfdata
:
data
});
Object
.
assign
(
requestData
,
{
opdata
:{
srfwfiatag
:
context
.
srfwfiatag
,
srfwfstep
:
context
.
srfwfstep
}
});
Object
.
assign
(
requestData
,
{
opdata
:
{
srfwfiatag
:
context
.
srfwfiatag
,
srfwfstep
:
context
.
srfwfstep
}
});
return
Http
.
getInstance
().
post
(
`/
${
this
.
APPDENAME
}
/
${
data
[
this
.
APPDEKEY
]}
/wfsubmit`
,
requestData
,
isloading
);
return
Http
.
getInstance
().
post
(
`/
${
this
.
APPDENAME
}
/
${
data
[
this
.
APPDEKEY
]}
/wfsubmit`
,
requestData
,
isloading
);
}
}
}
}
...
@@ -967,8 +992,8 @@ export default class EntityService {
...
@@ -967,8 +992,8 @@ export default class EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof EntityService
* @memberof EntityService
*/
*/
public
async
WFGetProxyData
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
WFGetProxyData
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
Http
.
getInstance
().
get
(
`/
${
this
.
APPDENAME
}
/
${
context
[
this
.
APPLYDEKEY
]}
/wfgetproxydata`
,
data
,
isloading
);
return
Http
.
getInstance
().
get
(
`/
${
this
.
APPDENAME
}
/
${
context
[
this
.
APPLYDEKEY
]}
/wfgetproxydata`
,
data
,
isloading
);
}
}
/**
/**
...
@@ -978,9 +1003,9 @@ export default class EntityService {
...
@@ -978,9 +1003,9 @@ export default class EntityService {
* @param data
* @param data
* @param isloading
* @param isloading
*/
*/
public
async
testDataInWF
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
testDataInWF
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
!
context
.
stateField
||
!
context
.
stateValue
)
return
false
;
if
(
!
context
.
stateField
||
!
context
.
stateValue
)
return
false
;
if
(
context
.
stateValue
==
data
[
context
.
stateField
])
{
if
(
context
.
stateValue
==
data
[
context
.
stateField
])
{
return
true
;
return
true
;
}
}
return
false
;
return
false
;
...
@@ -993,7 +1018,7 @@ export default class EntityService {
...
@@ -993,7 +1018,7 @@ export default class EntityService {
* @param data
* @param data
* @param isloading
* @param isloading
*/
*/
public
async
testUserWFSubmit
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
testUserWFSubmit
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
true
;
return
true
;
}
}
...
@@ -1004,10 +1029,10 @@ export default class EntityService {
...
@@ -1004,10 +1029,10 @@ export default class EntityService {
* @param data
* @param data
* @param isloading
* @param isloading
*/
*/
public
async
testUserExistWorklist
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
testUserExistWorklist
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
requestData
:
any
=
{};
const
requestData
:
any
=
{};
Object
.
assign
(
requestData
,
{
wfdata
:
data
});
Object
.
assign
(
requestData
,
{
wfdata
:
data
});
return
Http
.
getInstance
().
post
(
`/
${
this
.
APPDENAME
}
/
${
data
[
this
.
APPDEKEY
]}
/testuserexistworklist`
,
requestData
,
isloading
);
return
Http
.
getInstance
().
post
(
`/
${
this
.
APPDENAME
}
/
${
data
[
this
.
APPDEKEY
]}
/testuserexistworklist`
,
requestData
,
isloading
);
}
}
/**
/**
...
@@ -1017,8 +1042,8 @@ export default class EntityService {
...
@@ -1017,8 +1042,8 @@ export default class EntityService {
* @param data
* @param data
* @param isloading
* @param isloading
*/
*/
public
async
getAllApp
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
getAllApp
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
Http
.
getInstance
().
get
(
`/uaa/access-center/app-switcher/default`
,
data
,
isloading
);
return
Http
.
getInstance
().
get
(
`/uaa/access-center/app-switcher/default`
,
data
,
isloading
);
}
}
/**
/**
...
@@ -1028,8 +1053,8 @@ export default class EntityService {
...
@@ -1028,8 +1053,8 @@ export default class EntityService {
* @param data
* @param data
* @param isloading
* @param isloading
*/
*/
public
async
updateChooseApp
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
updateChooseApp
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
Http
.
getInstance
().
put
(
`/uaa/access-center/app-switcher/default`
,
data
,
isloading
);
return
Http
.
getInstance
().
put
(
`/uaa/access-center/app-switcher/default`
,
data
,
isloading
);
}
}
/**
/**
...
@@ -1039,8 +1064,8 @@ export default class EntityService {
...
@@ -1039,8 +1064,8 @@ export default class EntityService {
* @param data
* @param data
* @param isloading
* @param isloading
*/
*/
public
async
changPassword
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
changPassword
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
Http
.
getInstance
().
post
(
`/v7/changepwd`
,
data
,
isloading
);
return
Http
.
getInstance
().
post
(
`/v7/changepwd`
,
data
,
isloading
);
}
}
/**
/**
...
@@ -1050,8 +1075,8 @@ export default class EntityService {
...
@@ -1050,8 +1075,8 @@ export default class EntityService {
* @param data
* @param data
* @param isloading
* @param isloading
*/
*/
public
async
getPredefinedCodelist
(
tag
:
string
,
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
getPredefinedCodelist
(
tag
:
string
,
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
Http
.
getInstance
().
get
(
`/dictionarys/codelist/
${
tag
}
`
,
data
,
isloading
);
return
Http
.
getInstance
().
get
(
`/dictionarys/codelist/
${
tag
}
`
,
data
,
isloading
);
}
}
}
}
\ No newline at end of file
src/styles/default.less
浏览文件 @
24d1285a
...
@@ -45,18 +45,28 @@
...
@@ -45,18 +45,28 @@
.el-table th {
.el-table th {
padding: 5px 0;
padding: 5px 0;
}
}
.el-table th.gutter:last-of-type {
// 解决横向滚动条错位问题
display: block !important;
.el-scrollbar__wrap {
width: 10px !important;
// 滚动条样式
}
&::-webkit-scrollbar {
.grid .el-table__body-wrapper .el-table__row td{
width: 10px;
border-left: 1px solid rgb(245,245,245);
height: 10px;
border-top: 1px solid rgb(245,245,245);
border: none;
}
&::-webkit-scrollbar-thumb {
border-radius: 10px;
}
&::-webkit-scrollbar-track {
border-radius: 10px;
}
}
}
.el-table--enable-row-hover .el-table__body tr:hover>td {
.el-table--enable-row-hover .el-table__body tr:hover>td {
background-color: #badfffba !important;
background-color: #badfffba !important;
}
}
.grid .
el-table__body-wrapper .
grid-selected-row{
.grid .grid-selected-row{
background-color: #badfffba !important;
background-color: #badfffba !important;
}
}
...
...
src/template.html
浏览文件 @
24d1285a
...
@@ -13,6 +13,5 @@
...
@@ -13,6 +13,5 @@
</noscript>
</noscript>
<div
id=
"app"
></div>
<div
id=
"app"
></div>
<script
src=
"./environments/environment.js"
></script>
<script
src=
"./environments/environment.js"
></script>
<script
src=
"./assets/js/avue.min.js"
></script>
</body>
</body>
</html>
</html>
src/utils/app-drawer/app-drawer.ts
浏览文件 @
24d1285a
...
@@ -65,6 +65,7 @@ export class AppDrawer {
...
@@ -65,6 +65,7 @@ export class AppDrawer {
const
vm
=
new
Vue
({
const
vm
=
new
Vue
({
store
:
store
,
store
:
store
,
i18n
:
i18n
,
i18n
:
i18n
,
router
:
(
window
as
any
).
appRouter
,
render
(
h
)
{
render
(
h
)
{
return
h
(
component
,
{
props
});
return
h
(
component
,
{
props
});
}
}
...
...
src/utils/app-modal/app-modal.ts
浏览文件 @
24d1285a
...
@@ -2,7 +2,6 @@ import Vue from 'vue';
...
@@ -2,7 +2,6 @@ import Vue from 'vue';
import
{
Subject
}
from
'rxjs'
;
import
{
Subject
}
from
'rxjs'
;
import
store
from
'../../store'
;
import
store
from
'../../store'
;
import
i18n
from
'@/locale'
;
import
i18n
from
'@/locale'
;
import
{
ViewTool
}
from
'../view-tool/view-tool'
;
import
AppModalCompponent
from
"./app-modal.vue"
;
import
AppModalCompponent
from
"./app-modal.vue"
;
import
'./app-modal.less'
;
import
'./app-modal.less'
;
...
@@ -64,6 +63,7 @@ export class AppModal {
...
@@ -64,6 +63,7 @@ export class AppModal {
this
.
VueExample
=
new
Vue
({
this
.
VueExample
=
new
Vue
({
store
:
store
,
store
:
store
,
i18n
:
i18n
,
i18n
:
i18n
,
router
:
(
window
as
any
).
appRouter
,
render
(
h
)
{
render
(
h
)
{
return
h
(
AppModalCompponent
,
{
props
});
return
h
(
AppModalCompponent
,
{
props
});
}
}
...
...
src/utils/app-popover/app-popover.tsx
浏览文件 @
24d1285a
...
@@ -103,6 +103,7 @@ export class AppPopover {
...
@@ -103,6 +103,7 @@ export class AppPopover {
this
.
vueExample
=
new
Vue
({
this
.
vueExample
=
new
Vue
({
el
:
div
,
el
:
div
,
store
:
store
,
store
:
store
,
router
:
(
window
as
any
).
appRouter
,
i18n
:
i18n
,
i18n
:
i18n
,
data
:
{
content
:
null
,
width
:
300
,
height
:
300
},
data
:
{
content
:
null
,
width
:
300
,
height
:
300
},
methods
:
{
methods
:
{
...
...
src/utils/index.ts
浏览文件 @
24d1285a
...
@@ -11,5 +11,3 @@ export { Errorlog } from './decorators/errorlog';
...
@@ -11,5 +11,3 @@ export { Errorlog } from './decorators/errorlog';
export
{
UIActionTool
}
from
'./uiaction-tool/uiaction-tool'
;
export
{
UIActionTool
}
from
'./uiaction-tool/uiaction-tool'
;
export
{
LoadAppData
}
from
'./load-app-data/load-app-data'
;
export
{
LoadAppData
}
from
'./load-app-data/load-app-data'
;
export
{
Interceptors
}
from
'./interceptor/interceptor'
;
export
{
Interceptors
}
from
'./interceptor/interceptor'
;
export
{
StudioActionUtil
}
from
'./studio-action/StudioActionUtil'
;
export
{
ImgurlBase64
}
from
'./util/imgurl-base64'
;
\ No newline at end of file
src/utils/interceptor/interceptor.ts
浏览文件 @
24d1285a
...
@@ -86,13 +86,6 @@ export class Interceptors {
...
@@ -86,13 +86,6 @@ export class Interceptors {
if
(
appdata
&&
appdata
.
context
)
{
if
(
appdata
&&
appdata
.
context
)
{
config
.
headers
[
'srforgsectorid'
]
=
appdata
.
context
.
srforgsectorid
;
config
.
headers
[
'srforgsectorid'
]
=
appdata
.
context
.
srforgsectorid
;
}
}
if
(
!
window
.
localStorage
.
getItem
(
'token'
)){
let
arr
;
let
reg
=
new
RegExp
(
"(^| )ibzuaa-token=([^;]*)(;|$)"
);
if
(
arr
=
document
.
cookie
.
match
(
reg
)){
window
.
localStorage
.
setItem
(
'token'
,
unescape
(
arr
[
2
]));
}
}
if
(
window
.
localStorage
.
getItem
(
'token'
))
{
if
(
window
.
localStorage
.
getItem
(
'token'
))
{
const
token
=
window
.
localStorage
.
getItem
(
'token'
);
const
token
=
window
.
localStorage
.
getItem
(
'token'
);
config
.
headers
[
'Authorization'
]
=
`Bearer
${
token
}
`
;
config
.
headers
[
'Authorization'
]
=
`Bearer
${
token
}
`
;
...
...
src/utils/print/packages/printarea.js
浏览文件 @
24d1285a
...
@@ -198,7 +198,7 @@ export default class {
...
@@ -198,7 +198,7 @@ export default class {
}
}
// 处理textarea
// 处理textarea
}
else
{
}
else
{
copiedInput
.
innerHTML
=
item
.
value
;
copiedInput
.
textContent
=
item
.
value
;
copiedInput
.
setAttribute
(
'html'
,
item
.
value
);
copiedInput
.
setAttribute
(
'html'
,
item
.
value
);
}
}
}
}
...
...
src/utils/studio-action/StudioActionUtil.ts
已删除
100644 → 0
浏览文件 @
94628718
import
Vue
from
'vue'
;
import
{
Http
}
from
'@/utils'
;
import
{
Environment
}
from
'@/environments/environment'
;
import
{
on
}
from
'@/utils/dom/dom'
;
/**
* Studio Debug工具类
*
* @export
* @class StudioActionUtil
*/
export
class
StudioActionUtil
{
/**
* 唯一实例
*
* @private
* @static
* @type {StudioActionUtil}
* @memberof StudioActionUtil
*/
private
static
readonly
instance
:
StudioActionUtil
=
new
StudioActionUtil
();
/**
* 是否启用
*
* @protected
* @type {boolean}
* @memberof StudioActionUtil
*/
protected
isEnable
:
boolean
=
Environment
.
devMode
;
/**
* 请求对象
*
* @protected
* @type {Http}
* @memberof StudioActionUtil
*/
protected
http
:
Http
=
Http
.
getInstance
();
/**
* 配置信息
*
* @protected
* @type {*}
* @memberof StudioActionUtil
*/
protected
config
:
any
=
null
;
/**
* 配置平台界面
*
* @protected
* @type {Window}
* @memberof StudioActionUtil
*/
protected
studioWin
:
Window
|
null
=
null
;
/**
* 是否显示开发配置工具栏
*
* @type {boolean}
* @memberof StudioActionUtil
*/
public
isShowTool
:
boolean
=
false
;
/**
* Creates an instance of StudioActionUtil.
* @memberof StudioActionUtil
*/
constructor
()
{
if
(
StudioActionUtil
.
instance
)
{
return
StudioActionUtil
.
instance
;
}
if
(
Environment
.
devMode
)
{
on
(
window
,
'keydown'
,
(
e
:
KeyboardEvent
)
=>
{
if
((
e
.
ctrlKey
||
e
.
metaKey
)
&&
e
.
keyCode
===
123
)
{
this
.
showToolChange
();
}
});
}
}
/**
* 为当前视图建立issues
*
* @param {string} viewName
* @returns {Promise<void>}
* @memberof StudioActionUtil
*/
public
async
createdIssues
(
viewName
:
string
):
Promise
<
void
>
{
const
config
:
any
=
await
this
.
getConfig
(
viewName
);
if
(
config
)
{
const
context
:
string
=
`视图模块:
${
config
.
viewmodule
}
\n视图标识:
${
config
.
viewname
}
\n视图类型:
${
config
.
viewtype
}
\n`
;
window
.
open
(
`
${
Environment
.
ProjectUrl
}
/issues/new?issue[title]=
${
encodeURIComponent
(
'问题'
)}
&issue[description]=
${
encodeURIComponent
(
context
)}
`
,
'_blank'
);
}
}
/**
* 打开Studio配置界面
*
* @param {string} viewName
* @returns {Promise<void>}
* @memberof StudioActionUtil
*/
public
async
openStudioConfigView
(
viewName
:
string
):
Promise
<
void
>
{
const
config
:
any
=
await
this
.
getConfig
(
viewName
);
if
(
config
)
{
const
params
:
any
=
{
"appType"
:
"APPSTUDIO"
,
"appKey"
:
Environment
.
AppId
,
"dataType"
:
"AppDesign_PSAppViewDesignRedirectView"
,
"srfkey"
:
config
.
viewtag
};
if
(
this
.
studioWin
&&
this
.
studioWin
.
closed
===
false
)
{
this
.
studioWin
.
postMessage
({
type
:
'OpenView'
,
params
},
'*'
);
Vue
.
prototype
.
$message
.
warning
(
'请在已打开的配置平台查看!'
);
}
else
{
if
(
Environment
.
debugOpenMode
===
'sln'
){
console
.
log
(
"打开sln未支持"
);
// this.studioWin = window.open(`${Environment.StudioUrl}?ov=${encodeURIComponent(JSON.stringify(params))}#/common_slnindex/srfkeys=${Environment.SlnId}/sysdesign_psdevslnsysmodeltreeexpview/srfkey=${Environment.SysId}`, '_blank');
}
else
{
this
.
studioWin
=
window
.
open
(
`
${
Environment
.
StudioUrl
}
?ov=
${
encodeURIComponent
(
JSON
.
stringify
(
params
))}
#/common_mosindex/srfkeys=
${
Environment
.
SysId
}
`
,
'_blank'
);
}
}
}
}
/**
* 获取视图配置参数
*
* @protected
* @param {string} viewName
* @returns {Promise<any>}
* @memberof StudioActionUtil
*/
protected
async
getConfig
(
viewName
:
string
):
Promise
<
any
>
{
if
(
!
this
.
config
)
{
await
this
.
loadConfig
();
}
return
this
.
config
[
viewName
];
}
/**
* 加载配置信息
*
* @protected
* @returns {Promise<void>}
* @memberof StudioActionUtil
*/
protected
async
loadConfig
():
Promise
<
void
>
{
const
response
:
any
=
await
this
.
http
.
get
(
'./assets/json/view-config.json'
);
if
(
response
&&
response
.
status
===
200
&&
response
.
data
)
{
this
.
config
=
response
.
data
}
else
{
console
.
warn
(
'Studio操作控制器,视图参数信息加载失败!'
);
}
}
/**
* 展示配置工具栏状态变更
*
* @memberof StudioActionController
*/
public
showToolChange
():
void
{
this
.
isShowTool
=
!
this
.
isShowTool
;
}
/**
* 获取实例
*
* @static
* @returns {StudioActionUtil}
* @memberof StudioActionUtil
*/
public
static
getInstance
():
StudioActionUtil
{
return
this
.
instance
;
}
}
\ No newline at end of file
src/utils/util/imgurl-base64.ts
已删除
100644 → 0
浏览文件 @
94628718
import
axios
from
'axios'
;
export
class
ImgurlBase64
{
/**
* 单例变量声明
*
* @memberof ImgurlBase64
*/
private
static
imgurlBase64
:
ImgurlBase64
;
/**
* 图片缓存(加载中)
*
* @type {Map<string,any>}
* @memberof ImgurlBase64
*/
public
static
imgCache
:
Map
<
string
,
any
>
=
new
Map
();
/**
* 图片缓存(已完成)
*
* @type {Map<string,any>}
* @memberof ImgurlBase64
*/
public
static
imgCached
:
Map
<
string
,
any
>
=
new
Map
();
/**
* 获取 ImgurlBase64 单例对象
*
* @memberof ImgurlBase64
*/
public
static
getInstance
()
{
if
(
!
this
.
imgurlBase64
)
{
this
.
imgurlBase64
=
new
ImgurlBase64
();
}
return
this
.
imgurlBase64
;
}
/**
* 手动获取图片
*
*
* @param url 图片url路径
* @returns
*/
public
async
getImgURLOfBase64
(
url
:
string
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
let
img
=
'/'
;
// 富文本CV上传图片与鼠标移出抛值冲突问题,上传成功回调还没执行时就抛值
var
reg
=
/^
\s
*data:
([
a-z
]
+
\/[
a-z0-9-+.
]
+
(
;
[
a-z-
]
+=
[
a-z0-9-
]
+
)?)?(
;base64
)?
,
([
a-z0-9!$&',()*+;=
\-
._~:@
\/
?%
\s]
*
?)\s
*$/i
;
if
(
reg
.
test
(
url
))
{
return
resolve
(
url
);
}
// 缓存中有从缓存中拿
if
(
ImgurlBase64
.
imgCached
.
get
(
url
))
{
let
img
=
ImgurlBase64
.
imgCached
.
get
(
url
);
resolve
(
img
);
}
const
callback
:
Function
=
(
url
:
string
,
promise
:
Promise
<
any
>
)
=>
{
promise
.
then
((
response
:
any
)
=>
{
if
(
response
&&
response
.
status
===
200
&&
response
.
data
)
{
// 获取文件名
const
disposition
=
response
.
headers
[
'content-disposition'
];
const
filename
=
disposition
.
split
(
'filename='
)[
1
];
let
type
=
'image/png'
;
if
(
filename
&&
filename
.
indexOf
(
'.'
)
>
0
)
{
const
start
=
filename
.
lastIndexOf
(
'.'
);
const
expandedName
=
filename
.
substring
(
start
+
1
);
if
(
expandedName
.
match
(
/
(
bmp|jpg|jpeg|png|tif|gif|pcx|tga|exif|fpx|svg|psd|cdr|pcd|dxf|ufo|eps|ai|raw|WMF|webp
)
/gi
)
!=
null
)
{
type
=
'image/'
+
expandedName
;
}
else
{
resolve
(
img
);
}
}
let
blob
=
new
Blob
([
response
.
data
],{
type
:
type
});
this
.
blobToBase64
(
blob
).
then
((
res
)
=>
{
// 转化后的base64
img
=
`
${
res
}
`
;
// 缓存图片
ImgurlBase64
.
imgCached
.
set
(
url
,
img
);
resolve
(
img
);
})
}
else
{
resolve
(
img
);
}
}).
catch
((
result
:
any
)
=>
{
return
resolve
(
img
);
})
}
// 加载中
if
(
ImgurlBase64
.
imgCache
.
get
(
url
))
{
callback
(
url
,
ImgurlBase64
.
imgCache
.
get
(
url
));
}
else
{
let
_url
=
url
;
if
(
!
Object
.
is
(
'/'
,
_url
.
substring
(
0
,
1
)))
{
_url
=
'/'
+
_url
;
}
let
result
:
Promise
<
any
>
=
axios
({
method
:
'get'
,
url
:
_url
,
responseType
:
'blob'
});
ImgurlBase64
.
imgCache
.
set
(
url
,
result
);
callback
(
url
,
result
);
}
});
}
/**
* 将blob转为base64
*
*
* @param blob blob对象
* @returns
*/
public
blobToBase64
(
blob
:
any
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
const
fileReader
=
new
FileReader
();
fileReader
.
onload
=
(
e
:
any
)
=>
{
resolve
(
e
.
target
.
result
);
};
// readAsDataURL
fileReader
.
readAsDataURL
(
blob
);
fileReader
.
onerror
=
()
=>
{
reject
(
new
Error
(
'blobToBase64 error'
));
};
});
}
}
\ No newline at end of file
src/utils/util/util.ts
浏览文件 @
24d1285a
...
@@ -589,4 +589,22 @@ export class Util {
...
@@ -589,4 +589,22 @@ export class Util {
throw
new
Error
(
`
${
layoutModelItem
.
itemType
}
暂不支持`
);
throw
new
Error
(
`
${
layoutModelItem
.
itemType
}
暂不支持`
);
}
}
}
}
/**
* 清除附加数据(源数据里面有的数据在目标数据中都清除)
*
* @param source 源数据
* @param target 目标数据
*
* @memberof Util
*/
public
static
clearAdditionalData
(
source
:
any
,
target
:
any
)
{
if
(
target
&&
(
Object
.
keys
(
target
).
length
>
0
)
&&
source
&&
(
Object
.
keys
(
source
).
length
>
0
))
{
Object
.
keys
(
source
).
forEach
((
key
:
string
)
=>
{
if
(
target
.
hasOwnProperty
(
key
))
{
delete
target
[
key
];
}
})
}
}
}
}
\ No newline at end of file
tsconfig.json
浏览文件 @
24d1285a
...
@@ -56,6 +56,7 @@
...
@@ -56,6 +56,7 @@
"tests/**/*.tsx"
,
"tests/**/*.tsx"
,
],
],
"exclude"
:
[
"exclude"
:
[
"node_modules"
"node_modules"
,
"user"
]
]
}
}
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录