Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
功
功能演示系统
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
示例
功能演示系统
提交
41a24732
提交
41a24732
编写于
11月 02, 2022
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ShineKOT 发布系统代码 [后台服务,演示应用]
上级
f0d2097c
变更
10
显示空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
325 行增加
和
294 行删除
+325
-294
app-standard-container.less
...tainer/app-standard-container/app-standard-container.less
+1
-2
app-login-third.vue
.../layout-element/login/app-login-third/app-login-third.vue
+2
-251
panel-container.ts
app_Web/src/model/panel-detail/panel-container.ts
+9
-0
panel-detail.ts
app_Web/src/model/panel-detail/panel-detail.ts
+202
-0
ibizcustomer-media-test-edit-view-base.vue
...test-edit-view/ibizcustomer-media-test-edit-view-base.vue
+30
-0
app-index-view-base.vue
.../src/pages/ungroup/app-index-view/app-index-view-base.vue
+18
-0
util.ts
app_Web/src/utils/util/util.ts
+34
-1
default-searchform-base.vue
...s/ibizbook/default-searchform/default-searchform-base.vue
+2
-2
usr2-dataview-base.vue
...src/widgets/ibizbook/usr2-dataview/usr2-dataview-base.vue
+26
-26
usr2-dataview-model.ts
...src/widgets/ibizbook/usr2-dataview/usr2-dataview-model.ts
+1
-12
未找到文件。
app_Web/src/components/layout-element/container/app-standard-container/app-standard-container.less
浏览文件 @
41a24732
.app-standard-container{
width: 100%;
height: 100%;
display: block;
}
\ No newline at end of file
app_Web/src/components/layout-element/login/app-login-third/app-login-third.vue
浏览文件 @
41a24732
...
...
@@ -14,10 +14,6 @@
<
script
lang=
"ts"
>
import
{
Component
,
Vue
}
from
"vue-property-decorator"
;
import
qs
from
"qs"
;
// import * as dd from "dingtalk-jsapi";
import
axios
from
"axios"
;
import
{
Util
}
from
"@/utils"
;
@
Component
({})
export
default
class
AppThirdLogin
extends
Vue
{
/**
...
...
@@ -46,33 +42,7 @@ export default class AppThirdLogin extends Vue {
* @memberof AppThirdLogin
*/
async
dingTalkHandleClick
()
{
let
result
:
any
=
await
this
.
dingtalkLogin
();
if
(
result
)
{
if
(
result
.
state
&&
Object
.
is
(
result
.
state
,
"SUCCESS"
))
{
const
data
=
result
.
data
;
// 截取地址,拼接需要部分组成新地址
const
baseUrl
=
this
.
getNeedLocation
();
// 1.钉钉开放平台提供的appId
const
appId
=
data
.
appid
;
// 2.钉钉扫码后回调地址,需要UrlEncode转码
const
redirect_uri
=
baseUrl
+
"assets/third/dingdingRedirect.html?id="
+
data
.
appid
;
const
redirect_uri_encode
=
encodeURIComponent
(
redirect_uri
);
// 3.钉钉扫码url
const
url
=
"https://oapi.dingtalk.com/connect/qrconnect?response_type=code"
+
"&appid="
+
appId
+
"&redirect_uri="
+
redirect_uri_encode
+
"&scope=snsapi_login"
+
"&state=STATE"
;
// 4.跳转钉钉扫码
window
.
location
.
href
=
url
;
}
else
if
(
result
.
message
)
{
throw
new
Error
(
result
.
message
);
}
}
}
/**
...
...
@@ -81,226 +51,7 @@ export default class AppThirdLogin extends Vue {
* @memberof AppThirdLogin
*/
async
wxWorkHandleClick
()
{
let
result
:
any
=
await
this
.
wxWorkLogin
();
if
(
result
)
{
if
(
result
.
state
&&
Object
.
is
(
result
.
state
,
"SUCCESS"
))
{
const
data
=
result
.
data
;
// 截取地址,拼接需要部分组成新地址
const
baseUrl
=
this
.
getNeedLocation
();
// 1.微信平台提供的appId
const
appId
=
data
.
corp_id
;
const
agentId
=
data
.
agentid
;
// 2.微信扫码后回调地址,需要UrlEncode转码
const
redirect_uri
=
baseUrl
+
"assets/third/wxWorkRedirect.html?id="
+
data
.
appid
;
const
redirect_uri_encode
=
encodeURIComponent
(
redirect_uri
);
// 3.微信扫码url
const
url
=
"https://open.work.weixin.qq.com/wwopen/sso/qrConnect?state=STATE"
+
"&appid="
+
appId
+
"&agentid="
+
agentId
+
"&redirect_uri="
+
redirect_uri_encode
;
// 4.跳转微信扫码
window
.
location
.
href
=
url
;
}
else
if
(
result
.
message
)
{
throw
new
Error
(
result
.
message
);
}
}
}
/**
* 截取地址
*
* @memberof AppThirdLogin
*/
private
getNeedLocation
()
{
// 截取地址,拼接需要部分组成新地址
const
scheme
=
window
.
location
.
protocol
;
const
host
=
window
.
location
.
host
;
let
baseUrl
:
any
=
scheme
+
"//"
+
host
;
const
port
=
window
.
location
.
port
;
if
(
port
)
{
if
(
port
==
"80"
||
port
==
"443"
)
{
baseUrl
+=
"/"
;
}
else
{
baseUrl
+=
":"
+
port
+
"/"
;
}
}
else
{
baseUrl
+=
"/"
;
}
return
baseUrl
;
}
/**
* 钉钉授权登录
*
* @memberof AppThirdService
*/
public
dingtalkLogin
():
Promise
<
any
>
{
return
new
Promise
((
resolve
)
=>
{
// 请求头
const
headers
=
{};
const
tempViewParam
=
Util
.
getDcSystemIdViewParam
();
if
(
tempViewParam
&&
tempViewParam
.
srfdcsystem
)
{
Object
.
assign
(
headers
,
{
srfdcsystem
:
tempViewParam
.
srfdcsystem
});
}
const
get
:
Promise
<
any
>
=
this
.
getData
(
"/uaa/open/dingtalk/appid"
,
{},
false
,
headers
);
get
.
then
((
response
:
any
)
=>
{
if
(
response
&&
response
.
status
===
200
)
{
const
data
=
response
.
data
;
if
(
data
&&
data
.
appid
)
{
resolve
({
state
:
"SUCCESS"
,
data
:
data
});
}
else
{
resolve
({
state
:
"ERROR"
,
message
:
`获取网站应用appid失败,
${
data
.
detail
}
`
,
});
}
}
}).
catch
((
error
:
any
)
=>
{
const
data
=
error
.
data
;
if
(
data
&&
data
.
detail
)
{
resolve
({
state
:
"ERROR"
,
message
:
`获取网站应用appid失败,
${
data
.
detail
}
`
,
});
}
else
{
resolve
({
state
:
"ERROR"
,
message
:
`获取网站应用appid失败`
});
}
});
});
}
/**
* 企业微信授权登录
*
* @memberof AppThirdService
*/
public
wxWorkLogin
():
Promise
<
any
>
{
return
new
Promise
((
resolve
)
=>
{
// 请求头
const
headers
=
{};
const
tempViewParam
=
Util
.
getDcSystemIdViewParam
();
if
(
tempViewParam
&&
tempViewParam
.
srfdcsystem
)
{
Object
.
assign
(
headers
,
{
srfdcsystem
:
tempViewParam
.
srfdcsystem
});
}
const
get
:
Promise
<
any
>
=
this
.
getData
(
"/uaa/open/wxwork/appid"
,
{},
false
,
headers
);
get
.
then
((
response
:
any
)
=>
{
if
(
response
&&
response
.
status
===
200
)
{
const
data
=
response
.
data
;
if
(
data
&&
(
data
.
corp_id
||
data
.
appid
))
{
resolve
({
state
:
"SUCCESS"
,
data
:
data
});
}
else
{
resolve
({
state
:
"ERROR"
,
message
:
`获取网站应用appid失败,
${
data
.
detail
}
`
,
});
}
}
}).
catch
((
error
:
any
)
=>
{
const
data
=
error
.
data
;
if
(
data
&&
data
.
detail
)
{
resolve
({
state
:
"ERROR"
,
message
:
`获取网站应用appid失败,
${
data
.
detail
}
`
,
});
}
else
{
resolve
({
state
:
"ERROR"
,
message
:
`获取网站应用appid失败`
});
}
});
});
}
/**
* 钉钉内部免登
*
* @memberof AppThirdService
*/
public
embedDingTalkLogin
(
Environment
:
any
):
Promise
<
any
>
{
return
new
Promise
((
resolve
)
=>
{
// 请求头
const
headers
=
{};
const
tempViewParam
=
Util
.
getDcSystemIdViewParam
();
if
(
tempViewParam
&&
tempViewParam
.
srfdcsystem
)
{
Object
.
assign
(
headers
,
{
srfdcsystem
:
tempViewParam
.
srfdcsystem
});
}
const
param
=
Util
.
handleViewParam
(
window
.
location
.
href
);
if
(
param
.
corpId
)
{
let
corpId
:
string
=
param
.
corpId
;
if
(
corpId
.
indexOf
(
"#"
)
>
-
1
)
{
corpId
=
corpId
.
split
(
"#"
)[
0
];
}
// dd.runtime.permission
// .requestAuthCode({ corpId })
// .then((res: any) => {
// if (res && res.code) {
// this.getData(`/uaa/open/dingtalk/auth/${res.code}`, {}, false, headers).then((res: any) => {
// if (res.status == 200 && (res.data.token || res.data.user)) {
// resolve({ state: "SUCCESS", data: res.data });
// } else {
// resolve({ state: "ERROR", message: `${res.data.message}` });
// }
// });
// } else {
// resolve({ state: "ERROR", message: `钉钉用户信息获取失败` });
// }
// })
// .catch((error: any) => {
// resolve({ state: "ERROR", message: `钉钉用户信息获取失败` });
// });
}
else
{
resolve
({
state
:
"ERROR"
,
message
:
`获取企业ID失败`
});
}
});
}
/**
* 获取数据
*
* @memberof AppThirdService
*/
public
getData
(
url
:
string
,
params
:
any
=
{},
isloading
?:
boolean
,
headers
:
any
=
{})
{
params
=
this
.
handleRequestData
(
params
);
if
(
params
.
srfparentdata
)
{
Object
.
assign
(
params
,
params
.
srfparentdata
);
delete
params
.
srfparentdata
;
}
if
(
Object
.
keys
(
params
).
length
>
0
)
{
let
tempParam
:
any
=
{};
Object
.
keys
(
params
).
forEach
((
item
:
any
)
=>
{
if
(
params
[
item
]
||
Object
.
is
(
params
[
item
],
0
))
{
tempParam
[
item
]
=
params
[
item
];
}
});
if
(
Object
.
keys
(
tempParam
).
length
>
0
)
{
url
+=
`?
${
qs
.
stringify
(
tempParam
)}
`
;
}
}
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
axios
.
get
(
url
,
{
headers
:
headers
}).
then
((
response
:
any
)
=>
{
resolve
(
response
);
});
});
}
/**
* 处理请求数据
*
* @memberof AppThirdService
*/
public
handleRequestData
(
data
:
any
)
{
if
(
data
.
srfsessionkey
)
{
delete
data
.
srfsessionkey
;
}
if
(
data
.
srfsessionid
)
{
delete
data
.
srfsessionid
;
}
if
(
data
.
srfparentdemapname
)
{
delete
data
.
srfparentdemapname
;
}
return
data
;
}
}
</
script
>
...
...
app_Web/src/model/panel-detail/panel-container.ts
浏览文件 @
41a24732
...
...
@@ -17,6 +17,14 @@ export class PanelContainerModel extends PanelDetailModel {
*/
public
details
:
string
[]
=
[];
/**
* 标题关闭模式
*
* @type {number}
* @memberof PanelContainerModel
*/
public
titleBarCloseMode
:
number
=
0
;
/**
* Creates an instance of PanelContainerModel.
* @param {*} [opts={}]
...
...
@@ -25,6 +33,7 @@ export class PanelContainerModel extends PanelDetailModel {
public
constructor
(
opts
:
any
=
{})
{
super
(
opts
);
this
.
details
=
opts
.
details
;
this
.
titleBarCloseMode
=
opts
.
titleBarCloseMode
;
}
...
...
app_Web/src/model/panel-detail/panel-detail.ts
浏览文件 @
41a24732
import
{
Util
}
from
"@/utils"
;
/**
* 面板成员模型
*
...
...
@@ -150,6 +152,30 @@ export class PanelDetailModel {
*/
public
flexGrow
:
number
=
0
;
/**
* flex布局参数
*
* @type {*}
* @memberof PanelDetailModel
*/
public
flexParams
:
any
=
{};
/**
* 是否显示标题
*
* @type {boolean}
* @memberof PanelDetailModel
*/
public
isShowCaption
:
boolean
=
false
;
/**
* 界面样式表
*
* @type {string}
* @memberof PanelDetailModel
*/
public
sysCss
:
string
=
''
/**
* Creates an instance of PanelDetailModel.
* PanelDetailModel 实例
...
...
@@ -176,6 +202,182 @@ export class PanelDetailModel {
this
.
hAlignSelf
=
opts
.
hAlignSelf
;
this
.
vAlignSelf
=
opts
.
vAlignSelf
;
this
.
flexGrow
=
opts
.
flexGrow
;
this
.
flexParams
=
opts
.
flexParams
;
this
.
isShowCaption
=
opts
.
isShowCaption
;
this
.
sysCss
=
opts
.
sysCss
;
}
/**
* 获取元素样式(元素,包含内容盒子 大小/边距/内容 的样式)
*
* @memberof PanelDetailModel
*/
public
getElementStyle
()
{
const
elementStyle
=
{};
Object
.
assign
(
elementStyle
,
this
.
getBoxSizeStyle
());
Object
.
assign
(
elementStyle
,
this
.
getBoxSpacingStyle
());
Object
.
assign
(
elementStyle
,
this
.
getBoxContentStyle
());
return
elementStyle
;
}
/**
* 获取盒子间隔样式(元素)
*
* @memberof PanelDetailModel
*/
public
getBoxSpacingStyle
()
{
const
boxStyle
=
{};
// 上方间隔模式
if
(
this
.
spacingTop
)
{
Object
.
assign
(
boxStyle
,
Util
.
getItemSpacingStyle
(
this
.
spacingTop
,
'top'
));
}
// 下方间隔模式
if
(
this
.
spacingBottom
)
{
Object
.
assign
(
boxStyle
,
Util
.
getItemSpacingStyle
(
this
.
spacingBottom
,
'bottom'
));
}
// 左侧间隔模式
if
(
this
.
spacingLeft
)
{
Object
.
assign
(
boxStyle
,
Util
.
getItemSpacingStyle
(
this
.
spacingLeft
,
'left'
));
}
// 右侧间隔模式
if
(
this
.
spacingRight
)
{
Object
.
assign
(
boxStyle
,
Util
.
getItemSpacingStyle
(
this
.
spacingRight
,
'right'
));
}
return
boxStyle
;
}
/**
* 获取盒子大小样式(元素)
*
* @memberof PanelDetailModel
*/
public
getBoxSizeStyle
()
{
const
boxStyle
=
{};
if
(
this
.
widthMode
||
this
.
layoutWidth
)
{
Object
.
assign
(
boxStyle
,
Util
.
getBoxSize
(
"WIDTH"
,
this
.
widthMode
,
this
.
layoutWidth
));
}
if
(
this
.
heightMode
||
this
.
layoutHeight
)
{
Object
.
assign
(
boxStyle
,
Util
.
getBoxSize
(
"HEIGHT"
,
this
.
heightMode
,
this
.
layoutHeight
));
}
return
boxStyle
;
}
/**
* 获取盒子内容样式(元素,包含内容换行模式,内容水平对齐,内容垂直对齐)
*
* @memberof PanelDetailModel
*/
public
getBoxContentStyle
()
{
const
boxStyle
=
{};
return
boxStyle
;
}
/**
* 获取盒子边框样式(元素)
*
* @memberof PanelDetailModel
*/
public
getBoxBorderStyle
()
{
const
boxStyle
=
{};
return
boxStyle
;
}
/**
* 获取布局样式(布局,包含约束内容布局的样式,包含内容的对齐方式)
*
* @return {*}
* @memberof PanelDetailModel
*/
public
getLayoutStyle
()
{
const
layoutStyle
=
{};
Object
.
assign
(
layoutStyle
,
this
.
getBoxSelfAlignStyle
());
Object
.
assign
(
layoutStyle
,
this
.
getBoxLayOutStyle
());
return
layoutStyle
;
}
/**
* 获取自身对齐模式(布局)
*
* @memberof PanelDetailModel
*/
public
getBoxSelfAlignStyle
()
{
const
boxStyle
=
{};
// 自身对齐方式
if
(
this
.
vAlignSelf
||
this
.
hAlignSelf
)
{
Object
.
assign
(
boxStyle
,
{
'display'
:
'flex'
});
// 自身垂直对齐模式
switch
(
this
.
vAlignSelf
)
{
case
'TOP'
:
Object
.
assign
(
boxStyle
,
{
'align-items'
:
'flex-start'
});
break
;
case
'MIDDLE'
:
Object
.
assign
(
boxStyle
,
{
'align-items'
:
'center'
});
break
;
case
'BOTTOM'
:
Object
.
assign
(
boxStyle
,
{
'align-items'
:
'flex-end'
});
break
;
default
:
break
;
}
// 自身水平对齐模式
switch
(
this
.
hAlignSelf
)
{
case
'LEFT'
:
Object
.
assign
(
boxStyle
,
{
'justify-content'
:
'flex-start'
});
break
;
case
'CENTER'
:
Object
.
assign
(
boxStyle
,
{
'justify-content'
:
'center'
});
break
;
case
'RIGHT'
:
Object
.
assign
(
boxStyle
,
{
'justify-content'
:
'flex-end'
});
break
;
case
'JUSTIFY'
:
Object
.
assign
(
boxStyle
,
{
'justify-content'
:
'space-between'
});
break
;
default
:
break
;
}
}
return
boxStyle
;
}
/**
* 获取盒子布局样式(布局)
*
* @memberof PanelDetailModel
*/
public
getBoxLayOutStyle
()
{
const
boxStyle
=
{};
// 识别FLEX
if
(
this
.
layout
==
'FLEX'
)
{
Object
.
assign
(
boxStyle
,
{
'display'
:
'flex'
,
'flex-grow'
:
this
.
flexGrow
?
this
.
flexGrow
:
0
});
}
// 识别flex布局方向,横轴对齐,纵轴对齐
if
(
this
.
flexParams
.
align
||
this
.
flexParams
.
dir
||
this
.
flexParams
.
vAlign
)
{
Object
.
assign
(
boxStyle
,
{
'display'
:
'flex'
});
if
(
this
.
flexParams
.
dir
)
{
Object
.
assign
(
boxStyle
,
{
'flex-direction'
:
this
.
flexParams
.
dir
});
}
if
(
this
.
flexParams
.
align
)
{
Object
.
assign
(
boxStyle
,
{
'justify-content'
:
this
.
flexParams
.
align
});
}
if
(
this
.
flexParams
.
vAlign
)
{
Object
.
assign
(
boxStyle
,
{
'align-items'
:
this
.
flexParams
.
vAlign
});
}
}
// 识别SIMPLEFLEX
if
(
this
.
layout
==
'SIMPLEFLEX'
)
{
if
(
this
.
flexGrow
)
{
Object
.
assign
(
boxStyle
,
{
'width'
:
`
${(
100
/
12
)
*
this
.
flexGrow
}
%`
,
'height'
:
'100%'
});
}
else
{
// 简单FLEX布局自适应
Object
.
assign
(
boxStyle
,
{
'flex-grow'
:
1
,
'min-width'
:
`
${(
100
/
12
)}
%`
,
'height'
:
'100%'
});
}
}
// 识别边缘布局
if
(
this
.
layout
==
'BORDER'
)
{
Object
.
assign
(
boxStyle
,
{
'display'
:
'flex'
});
}
return
boxStyle
;
}
}
\ No newline at end of file
app_Web/src/pages/sample/ibizcustomer-media-test-edit-view/ibizcustomer-media-test-edit-view-base.vue
浏览文件 @
41a24732
...
...
@@ -57,6 +57,12 @@
<template
#
container4
>
<app-simpleflex-container
name=
"container4"
:layoutModelDetails=
"layoutModelDetails"
>
<template
#
static_label1
>
<app-preset-text
predefinedType=
"STATIC_LABEL"
renderMode=
"PARAGRAPH"
contentType=
"RAW"
value=
"图片"
contentStyle=
""
/>
</
template
>
<
template
#
static_image1
>
<span>
这里放图片
</span>
...
...
@@ -66,6 +72,12 @@
<
template
#
container5
>
<app-simpleflex-container
name=
"container5"
:layoutModelDetails=
"layoutModelDetails"
>
<template
#
static_label2
>
<app-preset-text
predefinedType=
"STATIC_LABEL"
renderMode=
"PARAGRAPH"
contentType=
"RAW"
value=
"图片-动态"
contentStyle=
""
/>
</
template
>
<
template
#
field_image
>
<span>
属性项
</span>
...
...
@@ -79,6 +91,12 @@
<template
#
container6
>
<app-simpleflex-container
name=
"container6"
:layoutModelDetails=
"layoutModelDetails"
>
<template
#
static_label3
>
<app-preset-text
predefinedType=
"STATIC_LABEL"
renderMode=
"PARAGRAPH"
contentType=
"RAW"
value=
"轮播图"
contentStyle=
""
/>
</
template
>
<
template
#
static_carousel1
>
<span>
这里放轮播图
</span>
...
...
@@ -88,6 +106,12 @@
<
template
#
container7
>
<app-simpleflex-container
name=
"container7"
:layoutModelDetails=
"layoutModelDetails"
>
<template
#
static_label4
>
<app-preset-text
predefinedType=
"STATIC_LABEL"
renderMode=
"PARAGRAPH"
contentType=
"RAW"
value=
"轮播图-动态"
contentStyle=
""
/>
</
template
>
<
template
#
field_carousel
>
<span>
属性项
</span>
...
...
@@ -99,6 +123,12 @@
<
template
#
container8
>
<app-standard-container
name=
"container8"
:layoutModelDetails=
"layoutModelDetails"
>
<template
#
static_label5
>
<app-preset-text
predefinedType=
"STATIC_LABEL"
renderMode=
"PARAGRAPH"
contentType=
"RAW"
value=
"视图"
contentStyle=
""
/>
</
template
>
<
template
#
static_videoplayer1
>
<span>
这里放视频
</span>
...
...
app_Web/src/pages/ungroup/app-index-view/app-index-view-base.vue
浏览文件 @
41a24732
...
...
@@ -2,6 +2,12 @@
<
template
>
<div
class=
"app-view-layout"
style=
"height: '100%'; width: '100%';'display': 'flex'; 'flex-direction': 'column';"
>
<app-preset-text
predefinedType=
"STATIC_LABEL"
renderMode=
"PARAGRAPH"
contentType=
"RAW"
value=
"标签"
contentStyle=
""
/>
<app-scroll-container
name=
"container_scroll1"
:layoutModelDetails=
"layoutModelDetails"
>
<template
#
container_scroll_main1
>
<app-scroll-container
name=
"container_scroll_main1"
:layoutModelDetails=
"layoutModelDetails"
>
...
...
@@ -12,8 +18,20 @@
<span>
属性项
</span>
</
template
>
<
template
#
static_label2
>
<app-preset-text
predefinedType=
"STATIC_LABEL"
renderMode=
"PARAGRAPH"
contentType=
"RAW"
value=
"标签爱仕达多"
contentStyle=
""
/>
</
template
>
<
template
#
static_text1
>
<app-preset-text
predefinedType=
"STATIC_TEXT"
renderMode=
"TEXT"
contentType=
"RAW"
value=
"文本内容"
contentStyle=
""
/>
</
template
>
<
template
#
field_text_dynamic
>
<span>
属性项
</span>
...
...
app_Web/src/utils/util/util.ts
浏览文件 @
41a24732
...
...
@@ -472,9 +472,12 @@ export class Util {
* @returns
*/
public
static
getBoxSize
(
mode
:
"WIDTH"
|
"HEIGHT"
,
style
:
string
,
value
:
number
)
{
if
(
!
mode
||
!
style
)
{
if
(
!
mode
)
{
return
{};
}
if
(
!
style
){
style
=
'PX'
;
}
if
(
style
===
"FULL"
)
{
return
{
[
mode
.
toLowerCase
()]:
"100%"
};
}
else
{
...
...
@@ -488,4 +491,34 @@ export class Util {
}
}
}
/**
* 获取项间隔样式
*
* @param {string} spacingType
* @param {string} direction
* @return {*}
*/
public
static
getItemSpacingStyle
(
spacingType
:
string
,
direction
:
string
)
{
switch
(
spacingType
)
{
case
'OUTERNONE'
:
return
{
[
`margin-
${
direction
}
`
]:
'0px'
};
case
'OUTERSMALL'
:
return
{
[
`margin-
${
direction
}
`
]:
'8px'
};
case
'OUTERMEDIUM'
:
return
{
[
`margin-
${
direction
}
`
]:
'16px'
};
case
'OUTERLARGE'
:
return
{
[
`margin-
${
direction
}
`
]:
'24px'
};
case
'INNERNONE'
:
return
{
[
`padding-
${
direction
}
`
]:
'0px'
};
case
'INNERSMALL'
:
return
{
[
`padding-
${
direction
}
`
]:
'8px'
};
case
'INNERMEDIUM'
:
return
{
[
`padding-
${
direction
}
`
]:
'16px'
};
case
'INNERLARGE'
:
return
{
[
`padding-
${
direction
}
`
]:
'24px'
};
default
:
return
{};
}
}
}
\ No newline at end of file
app_Web/src/widgets/ibizbook/default-searchform/default-searchform-base.vue
浏览文件 @
41a24732
...
...
@@ -663,7 +663,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
*/
public
load
(
opt
:
any
=
{}):
void
{
if
(
!
this
.
loadAction
){
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZBOOK
GroupByCodelistList
View'
+
(
this
.
$t
(
'app.searchForm.notConfig.loadAction'
)
as
string
)
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZBOOK
Usr8Grid
View'
+
(
this
.
$t
(
'app.searchForm.notConfig.loadAction'
)
as
string
)
});
return
;
}
const
arg
:
any
=
{
...
opt
};
...
...
@@ -699,7 +699,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
*/
public
loadDraft
(
opt
:
any
=
{},
mode
?:
string
):
void
{
if
(
!
this
.
loaddraftAction
){
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZBOOK
GroupByCodelistList
View'
+
(
this
.
$t
(
'app.searchForm.notConfig.loaddraftAction'
)
as
string
)
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZBOOK
Usr8Grid
View'
+
(
this
.
$t
(
'app.searchForm.notConfig.loaddraftAction'
)
as
string
)
});
return
;
}
const
arg
:
any
=
{
...
opt
}
;
...
...
app_Web/src/widgets/ibizbook/usr2-dataview/usr2-dataview-base.vue
浏览文件 @
41a24732
...
...
@@ -48,18 +48,18 @@
<div
v-show=
"flag"
class=
"batch-toolbar"
>
<div
class=
'toolbar-container'
>
<tooltip
:transfer=
"true"
:max-width=
"600"
>
<i-button
v-show=
"
usr2dataviewdataview_batchtoolbarModels.deuiaction1.visabled"
:disabled=
"usr2dataviewdataview_batchtoolbarModels.deuiaction1.disabled"
class=
''
v-loading:i-button
@
click=
"
dataview_batchtoolbar_click({ tag: 'deuiaction1' }, $event)"
>
<i-button
v-show=
"
dataviewexpviewdataviewexpbar_dataview_batchtoolbarModels.deuiaction1.visabled"
:disabled=
"dataviewexpviewdataviewexpbar_dataview_batchtoolbarModels.deuiaction1.disabled"
class=
''
v-loading:i-button
@
click=
"dataviewexpbar_
dataview_batchtoolbar_click({ tag: 'deuiaction1' }, $event)"
>
<i
class=
'fa fa-edit'
></i>
<span
class=
'caption'
>
{{$t('entities.ibizbook.
usr2dataview
dataview_batchtoolbar_toolbar.deuiaction1.caption')}}
</span>
<span
class=
'caption'
>
{{$t('entities.ibizbook.
dataviewexpviewdataviewexpbar_
dataview_batchtoolbar_toolbar.deuiaction1.caption')}}
</span>
</i-button>
<div
slot=
'content'
>
{{$t('entities.ibizbook.
usr2dataview
dataview_batchtoolbar_toolbar.deuiaction1.tip')}}
</div>
<div
slot=
'content'
>
{{$t('entities.ibizbook.
dataviewexpviewdataviewexpbar_
dataview_batchtoolbar_toolbar.deuiaction1.tip')}}
</div>
</tooltip>
<tooltip
:transfer=
"true"
:max-width=
"600"
>
<i-button
v-show=
"
usr2dataviewdataview_batchtoolbarModels.deuiaction2.visabled"
:disabled=
"usr2dataviewdataview_batchtoolbarModels.deuiaction2.disabled"
class=
''
v-loading:i-button
@
click=
"
dataview_batchtoolbar_click({ tag: 'deuiaction2' }, $event)"
>
<i-button
v-show=
"
dataviewexpviewdataviewexpbar_dataview_batchtoolbarModels.deuiaction2.visabled"
:disabled=
"dataviewexpviewdataviewexpbar_dataview_batchtoolbarModels.deuiaction2.disabled"
class=
''
v-loading:i-button
@
click=
"dataviewexpbar_
dataview_batchtoolbar_click({ tag: 'deuiaction2' }, $event)"
>
<i
class=
'fa fa-remove'
></i>
<span
class=
'caption'
>
{{$t('entities.ibizbook.
usr2dataview
dataview_batchtoolbar_toolbar.deuiaction2.caption')}}
</span>
<span
class=
'caption'
>
{{$t('entities.ibizbook.
dataviewexpviewdataviewexpbar_
dataview_batchtoolbar_toolbar.deuiaction2.caption')}}
</span>
</i-button>
<div
slot=
'content'
>
{{$t('entities.ibizbook.
usr2dataview
dataview_batchtoolbar_toolbar.deuiaction2.tip')}}
</div>
<div
slot=
'content'
>
{{$t('entities.ibizbook.
dataviewexpviewdataviewexpbar_
dataview_batchtoolbar_toolbar.deuiaction2.tip')}}
</div>
</tooltip>
</div>
</div>
...
...
@@ -174,18 +174,18 @@ export default class Usr2Base extends Vue implements ControlInterface {
public
appEntityService
:
IBIZBOOKEntityService
=
new
IBIZBOOKEntityService
({
$store
:
this
.
$store
});
/**
* dataview_batchtoolbar 部件 click 事件
* dataview
expbar_dataview
_batchtoolbar 部件 click 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof Usr2Base
*/
public
dataview_batchtoolbar_click
(
$event
:
any
,
$event2
?:
any
)
{
public
dataview
expbar_dataview
_batchtoolbar_click
(
$event
:
any
,
$event2
?:
any
)
{
if
(
Object
.
is
(
$event
.
tag
,
'deuiaction1'
))
{
this
.
dataview
_batchtoolbar_deuiaction1_click
(
null
,
'
dataview_batchtoolbar'
,
$event2
);
this
.
dataview
expbar_dataview_batchtoolbar_deuiaction1_click
(
null
,
'dataviewexpbar_
dataview_batchtoolbar'
,
$event2
);
}
if
(
Object
.
is
(
$event
.
tag
,
'deuiaction2'
))
{
this
.
dataview
_batchtoolbar_deuiaction2_click
(
null
,
'
dataview_batchtoolbar'
,
$event2
);
this
.
dataview
expbar_dataview_batchtoolbar_deuiaction2_click
(
null
,
'dataviewexpbar_
dataview_batchtoolbar'
,
$event2
);
}
}
...
...
@@ -198,7 +198,7 @@ export default class Usr2Base extends Vue implements ControlInterface {
* @param {*} [$event]
* @memberof
*/
public
dataview_batchtoolbar_deuiaction1_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
public
dataview
expbar_dataview
_batchtoolbar_deuiaction1_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
// 参数
// 取数
let
datas
:
any
[]
=
[];
...
...
@@ -226,7 +226,7 @@ export default class Usr2Base extends Vue implements ControlInterface {
* @param {*} [$event]
* @memberof
*/
public
dataview_batchtoolbar_deuiaction2_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
public
dataview
expbar_dataview
_batchtoolbar_deuiaction2_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
// 参数
// 取数
let
datas
:
any
[]
=
[];
...
...
@@ -254,7 +254,7 @@ export default class Usr2Base extends Vue implements ControlInterface {
* @param {*} [$event]
* @memberof
*/
public
dataview_memo1_u37f11a8_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
public
dataview
expbar_dataview
_memo1_u37f11a8_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
// 取数
let
datas
:
any
[]
=
[];
let
xData
:
any
=
null
;
...
...
@@ -281,7 +281,7 @@ export default class Usr2Base extends Vue implements ControlInterface {
* @param {*} [$event]
* @memberof
*/
public
dataview_memo1_uc365542_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
public
dataview
expbar_dataview
_memo1_uc365542_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
// 取数
let
datas
:
any
[]
=
[];
let
xData
:
any
=
null
;
...
...
@@ -309,7 +309,7 @@ export default class Usr2Base extends Vue implements ControlInterface {
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof IBIZBOOK
Usr2Data
ViewBase
* @memberof IBIZBOOK
DataViewExp
ViewBase
*/
public
Edit
(
args
:
any
[],
contextJO
?:
any
,
params
?:
any
,
$event
?:
any
,
xData
?:
any
,
actionContext
?:
any
,
srfParentDeName
?:
string
)
{
if
(
args
.
length
===
0
)
{
...
...
@@ -335,7 +335,7 @@ export default class Usr2Base extends Vue implements ControlInterface {
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof IBIZBOOK
Usr2Data
ViewBase
* @memberof IBIZBOOK
DataViewExp
ViewBase
*/
public
Remove
(
args
:
any
[],
contextJO
?:
any
,
params
?:
any
,
$event
?:
any
,
xData
?:
any
,
actionContext
?:
any
,
srfParentDeName
?:
string
)
{
const
_this
:
any
=
this
;
...
...
@@ -629,9 +629,9 @@ export default class Usr2Base extends Vue implements ControlInterface {
* 工具栏模型
*
* @type {*}
* @memberof IBIZBOOK
Usr2Data
View
* @memberof IBIZBOOK
DataViewExp
View
*/
public
usr2dataview
dataview_batchtoolbarModels
:
any
=
{
public
dataviewexpviewdataviewexpbar_
dataview_batchtoolbarModels
:
any
=
{
deuiaction1
:
{
name
:
'deuiaction1'
,
actiontarget
:
'NONE'
,
caption
:
'编辑'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'Edit'
,
target
:
'SINGLEKEY'
}
},
deuiaction2
:
{
name
:
'deuiaction2'
,
actiontarget
:
'NONE'
,
caption
:
'删除'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'Remove'
,
target
:
'MULTIKEY'
}
},
...
...
@@ -956,7 +956,7 @@ export default class Usr2Base extends Vue implements ControlInterface {
*/
public
load
(
opt
:
any
=
{},
isReset
:
boolean
=
false
):
void
{
if
(
!
this
.
fetchAction
){
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZBOOK
Usr2Data
View'
+
(
this
.
$t
(
'app.list.notConfig.fetchAction'
)
as
string
)
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZBOOK
DataViewExp
View'
+
(
this
.
$t
(
'app.list.notConfig.fetchAction'
)
as
string
)
});
return
;
}
const
arg
:
any
=
{...
opt
};
...
...
@@ -1036,7 +1036,7 @@ export default class Usr2Base extends Vue implements ControlInterface {
*/
public
async
remove
(
datas
:
any
[]):
Promise
<
any
>
{
if
(
!
this
.
removeAction
){
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZBOOK
Usr2Data
View'
+
(
this
.
$t
(
'app.gridpage.notConfig.removeAction'
)
as
string
)
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZBOOK
DataViewExp
View'
+
(
this
.
$t
(
'app.gridpage.notConfig.removeAction'
)
as
string
)
});
return
;
}
let
_datas
:
any
[]
=
[];
...
...
@@ -1146,7 +1146,7 @@ export default class Usr2Base extends Vue implements ControlInterface {
try
{
if
(
Object
.
is
(
item
.
rowDataState
,
'create'
)){
if
(
!
this
.
createAction
){
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZBOOK
Usr2Data
View'
+
(
this
.
$t
(
'app.list.notConfig.createAction'
)
as
string
)
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZBOOK
DataViewExp
View'
+
(
this
.
$t
(
'app.list.notConfig.createAction'
)
as
string
)
});
}
else
{
Object
.
assign
(
item
,{
viewparams
:
this
.
viewparams
});
let
response
=
await
this
.
service
.
add
(
this
.
createAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
item
,
this
.
showBusyIndicator
);
...
...
@@ -1154,7 +1154,7 @@ export default class Usr2Base extends Vue implements ControlInterface {
}
}
else
if
(
Object
.
is
(
item
.
rowDataState
,
'update'
)){
if
(
!
this
.
updateAction
){
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZBOOK
Usr2Data
View'
+
(
this
.
$t
(
'app.list.notConfig.updateAction'
)
as
string
)
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZBOOK
DataViewExp
View'
+
(
this
.
$t
(
'app.list.notConfig.updateAction'
)
as
string
)
});
}
else
{
Object
.
assign
(
item
,{
viewparams
:
this
.
viewparams
});
if
(
item
.
ibizbook
){
...
...
@@ -1245,16 +1245,16 @@ export default class Usr2Base extends Vue implements ControlInterface {
public
uiAction
(
data
:
any
,
tag
:
any
,
$event
:
any
)
{
$event
.
stopPropagation
();
if
(
Object
.
is
(
'Edit'
,
tag
))
{
this
.
dataview_batchtoolbar_deuiaction1_click
(
data
,
tag
,
$event
);
this
.
dataview
expbar_dataview
_batchtoolbar_deuiaction1_click
(
data
,
tag
,
$event
);
}
if
(
Object
.
is
(
'Remove'
,
tag
))
{
this
.
dataview_batchtoolbar_deuiaction2_click
(
data
,
tag
,
$event
);
this
.
dataview
expbar_dataview
_batchtoolbar_deuiaction2_click
(
data
,
tag
,
$event
);
}
if
(
Object
.
is
(
'Edit'
,
tag
))
{
this
.
dataview_memo1_u37f11a8_click
(
data
,
tag
,
$event
);
this
.
dataview
expbar_dataview
_memo1_u37f11a8_click
(
data
,
tag
,
$event
);
}
if
(
Object
.
is
(
'Remove'
,
tag
))
{
this
.
dataview_memo1_uc365542_click
(
data
,
tag
,
$event
);
this
.
dataview
expbar_dataview
_memo1_uc365542_click
(
data
,
tag
,
$event
);
}
}
...
...
app_Web/src/widgets/ibizbook/usr2-dataview/usr2-dataview-model.ts
浏览文件 @
41a24732
...
...
@@ -10,7 +10,7 @@ export default class Usr2Model {
* 获取数据项集合
*
* @returns {any[]}
* @memberof Usr2Data
V
iewMode
* @memberof Usr2Data
viewexpbar_datav
iewMode
*/
public
getDataItems
():
any
[]
{
return
[
...
...
@@ -39,17 +39,6 @@ export default class Usr2Model {
dataType
:
'FONTKEY'
,
},
{
name
:
'n_ibizbookname_like'
,
prop
:
'n_ibizbookname_like'
,
dataType
:
'QUERYPARAM'
},
{
name
:
'n_price_gtandeq'
,
prop
:
'n_price_gtandeq'
,
dataType
:
'QUERYPARAM'
},
{
name
:
'size'
,
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录