Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
iBiz-Vue-R7-Res
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz-R7前端标准模板
iBiz-Vue-R7-Res
提交
8119eec6
提交
8119eec6
编写于
6月 16, 2020
作者:
tony001
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'dev'
上级
23497d11
d3ce2798
变更
9
显示空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
598 行增加
和
342 行删除
+598
-342
app-register.ts
src/app-register.ts
+3
-6
app-file-upload.vue
src/components/app-file-upload/app-file-upload.vue
+64
-41
app-form-group.less
src/components/app-form-group/app-form-group.less
+11
-3
app-form-group.vue
src/components/app-form-group/app-form-group.vue
+12
-12
app-form-item.less
src/components/app-form-item/app-form-item.less
+34
-34
app-form-item.vue
src/components/app-form-item/app-form-item.vue
+227
-214
app-image-upload.vue
src/components/app-image-upload/app-image-upload.vue
+59
-31
login.vue
src/components/login/login.vue
+4
-1
navdata-service.ts
src/service/app/navdata-service.ts
+184
-0
未找到文件。
src/app-register.ts
浏览文件 @
8119eec6
...
...
@@ -28,7 +28,6 @@ import AppCheckboxList from './components/app-checkbox-list/app-checkbox-list.vu
import
AppRadioGroup
from
'./components/app-radio-group/app-radio-group.vue'
import
AppEmbedPicker
from
'./components/app-embed-picker/app-embed-picker.vue'
import
AppTreePicker
from
'./components/app-tree-picker/app-tree-picker.vue'
import
AppRichTextEditor
from
'./components/app-rich-text-editor/app-rich-text-editor.vue'
import
AppFileUpload
from
'./components/app-file-upload/app-file-upload.vue'
import
AppImageUpload
from
'./components/app-image-upload/app-image-upload.vue'
import
PropertyLayout
from
'./components/property-layout/property-layout.vue'
...
...
@@ -53,7 +52,6 @@ import AppRate from './components/app-rate/app-rate.vue'
import
AppSwitch
from
'./components/app-switch/app-switch.vue'
import
AppSlider
from
'./components/app-slider/app-slider.vue'
import
AppStepper
from
'./components/app-stepper/app-stepper.vue'
import
AppPortalDesign
from
'./components/app-portal-design/app-portal-design.vue'
import
DatePickerRange
from
'./components/date-picker-range/date-picker-range.vue'
import
AppRangeDate
from
'./components/app-range-date/app-range-date.vue'
import
AppActionBar
from
'./components/app-actionbar/app-actionbar.vue'
...
...
@@ -63,7 +61,6 @@ 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
AppDataUploadView
from
'./components/app-data-upload/app-data-upload.vue'
import
DropDownListDynamic
from
'./components/dropdown-list-dynamic/dropdown-list-dynamic.vue'
import
AppImagePreview
from
'./components/app-image-preview/app-image-preview.vue'
import
AppFormatData
from
'./components/app-format-data/app-format-data.vue'
...
...
@@ -115,7 +112,7 @@ export const AppComponents = {
v
.
component
(
'app-radio-group'
,
AppRadioGroup
);
v
.
component
(
'app-embed-picker'
,
AppEmbedPicker
);
v
.
component
(
'app-tree-picker'
,
AppTreePicker
);
v
.
component
(
'app-rich-text-editor'
,
AppRichTextEditor
);
v
.
component
(
'app-rich-text-editor'
,
()
=>
import
(
'./components/app-rich-text-editor/app-rich-text-editor.vue'
)
);
v
.
component
(
'app-file-upload'
,
AppFileUpload
);
v
.
component
(
'app-image-upload'
,
AppImageUpload
);
v
.
component
(
'property-layout'
,
PropertyLayout
);
...
...
@@ -140,7 +137,7 @@ export const AppComponents = {
v
.
component
(
'app-switch'
,
AppSwitch
);
v
.
component
(
'app-slider'
,
AppSlider
);
v
.
component
(
'app-stepper'
,
AppStepper
);
v
.
component
(
'app-portal-design'
,
AppPortalDesign
);
v
.
component
(
'app-portal-design'
,
()
=>
import
(
'./components/app-portal-design/app-portal-design.vue'
)
);
v
.
component
(
'date-picker-range'
,
DatePickerRange
);
v
.
component
(
'app-range-date'
,
AppRangeDate
);
v
.
component
(
'app-actionbar'
,
AppActionBar
);
...
...
@@ -150,7 +147,7 @@ export const AppComponents = {
v
.
component
(
'app-debug-actions'
,
AppDebugActions
);
v
.
component
(
'app-header-menus'
,
AppHeaderMenus
);
v
.
component
(
'app-column-link'
,
AppColumnLink
);
v
.
component
(
'app-data-upload'
,
AppDataUploadView
);
v
.
component
(
'app-data-upload'
,
()
=>
import
(
'./components/app-data-upload/app-data-upload.vue'
)
);
v
.
component
(
'dropdown-list-dynamic'
,
DropDownListDynamic
);
v
.
component
(
'app-image-preview'
,
AppImagePreview
);
v
.
component
(
'app-format-data'
,
AppFormatData
);
...
...
src/components/app-file-upload/app-file-upload.vue
浏览文件 @
8119eec6
...
...
@@ -100,6 +100,22 @@ export default class AppFileUpload extends Vue {
*/
@
Prop
()
public
data
!
:
string
;
/**
* 视图参数
*
* @type {*}
* @memberof AppFormDRUIPart
*/
@
Prop
()
public
viewparams
!
:
any
;
/**
* 视图上下文
*
* @type {*}
* @memberof AppAutocomplete
*/
@
Prop
()
public
context
!
:
any
;
/**
* 初始化值
*
...
...
@@ -146,7 +162,7 @@ export default class AppFileUpload extends Vue {
* @type {string}
* @memberof AppFileUpload
*/
@
Prop
()
public
uploadparams
?:
string
;
@
Prop
()
public
uploadparams
?:
any
;
/**
* 下载参数
...
...
@@ -154,15 +170,7 @@ export default class AppFileUpload extends Vue {
* @type {string}
* @memberof AppFileUpload
*/
@
Prop
()
public
exportparams
?:
string
;
/**
* 自定义参数
*
* @type {*}
* @memberof AppFileUpload
*/
@
Prop
()
public
customparams
?:
any
;
@
Prop
()
public
exportparams
?:
any
;
/**
* 上传文件路径
...
...
@@ -186,20 +194,20 @@ export default class AppFileUpload extends Vue {
public
files
=
[];
/**
* 上传
key
s
* 上传
param
s
*
* @type {Array<any>}
* @memberof AppFileUpload
*/
public
upload_
key
s
:
Array
<
any
>
=
[];
public
upload_
param
s
:
Array
<
any
>
=
[];
/**
* 导出
key
s
* 导出
param
s
*
* @type {Array<any>}
* @memberof AppFileUpload
*/
public
export_
key
s
:
Array
<
any
>
=
[];
public
export_
param
s
:
Array
<
any
>
=
[];
/**
* 自定义数组
...
...
@@ -239,31 +247,37 @@ export default class AppFileUpload extends Vue {
* @memberof AppFileUpload
*/
private
dataProcess
():
void
{
let
upload_arr
:
Array
<
string
>
=
[];
let
export_arr
:
Array
<
string
>
=
[];
const
_data
:
any
=
JSON
.
parse
(
this
.
data
);
this
.
upload_keys
.
forEach
((
key
:
string
)
=>
{
upload_arr
.
push
(
`
${
key
}
=
${
_data
[
key
]}
`
);
});
this
.
export_keys
.
forEach
((
key
:
string
)
=>
{
export_arr
.
push
(
`
${
key
}
=
${
_data
[
key
]}
`
);
});
let
_url
=
`
${
Environment
.
BaseUrl
}${
Environment
.
UploadFile
}
`
;
if
(
upload_arr
.
length
>
0
||
this
.
custom_arr
.
length
>
0
)
{
_url
=
`
${
_url
}
?
${
upload_arr
.
join
(
'&'
)}${
upload_arr
.
length
>
0
?
'&'
:
''
}${
this
.
custom_arr
.
join
(
'&'
)}
`
;
if
(
this
.
upload_params
.
length
>
0
)
{
_url
+=
'?'
;
this
.
upload_params
.
forEach
((
item
:
any
,
i
:
any
)
=>
{
_url
+=
`
${
Object
.
keys
(
item
)[
0
]}
=
${
Object
.
values
(
item
)[
0
]}
`
;
if
(
i
<
this
.
upload_params
.
length
-
1
){
_url
+=
'&'
;
}
})
}
this
.
uploadUrl
=
_url
;
this
.
files
.
forEach
((
file
:
any
)
=>
{
let
url
=
`
${
this
.
downloadUrl
}
/
${
file
.
id
}
`
;
if
(
upload_arr
.
length
>
0
||
this
.
custom_arr
.
length
>
0
)
{
url
=
`
${
url
}
?
${
upload_arr
.
join
(
'&'
)}${
upload_arr
.
length
>
0
?
'&'
:
''
}${
this
.
custom_arr
.
join
(
'&'
)}
`
;
if
(
this
.
export_params
.
length
>
0
)
{
url
+=
'?'
;
this
.
export_params
.
forEach
((
item
:
any
,
i
:
any
)
=>
{
url
+=
`
${
Object
.
keys
(
item
)[
0
]}
=
${
Object
.
values
(
item
)[
0
]}
`
;
if
(
i
<
this
.
export_params
.
length
-
1
){
url
+=
'&'
;
}
})
}
file
.
url
=
url
;
});
}
/**
* vue 生命周期
*
...
...
@@ -290,28 +304,37 @@ export default class AppFileUpload extends Vue {
public
mounted
()
{
this
.
appData
=
this
.
$store
.
getters
.
getAppData
();
let
uploadparams
:
string
=
''
;
let
exportparams
:
string
=
''
;
let
uploadparams
:
any
=
{}
;
let
exportparams
:
any
=
{}
;
let
upload_
key
s
:
Array
<
string
>
=
[];
let
export_
key
s
:
Array
<
string
>
=
[];
let
upload_
param
s
:
Array
<
string
>
=
[];
let
export_
param
s
:
Array
<
string
>
=
[];
let
custom_arr
:
Array
<
string
>
=
[];
let
param
:
any
=
this
.
viewparams
;
let
context
:
any
=
this
.
context
;
let
_data
:
any
=
JSON
.
parse
(
this
.
data
);
if
(
this
.
uploadparams
&&
!
Object
.
is
(
this
.
uploadparams
,
''
))
{
uploadparams
=
this
.
uploadparams
;
upload_
keys
=
uploadparams
.
split
(
';'
);
upload_
params
=
this
.
$util
.
computedNavData
(
_data
,
param
,
context
,
uploadparams
);
}
if
(
this
.
exportparams
&&
!
Object
.
is
(
this
.
exportparams
,
''
))
{
exportparams
=
this
.
exportparams
;
export_
keys
=
exportparams
.
split
(
';'
);
export_
params
=
this
.
$util
.
computedNavData
(
_data
,
param
,
context
,
exportparams
);
}
if
(
this
.
customparams
&&
!
Object
.
is
(
this
.
customparams
,
''
))
{
Object
.
keys
(
this
.
customparams
).
forEach
((
name
:
string
)
=>
{
custom_arr
.
push
(
`
${
name
}
=
${
this
.
customparams
[
name
]}
`
);
});
for
(
const
item
in
upload_params
)
{
this
.
upload_params
.
push
({
[
item
]:
upload_params
[
item
]
})
}
for
(
const
item
in
export_params
)
{
this
.
export_params
.
push
({
[
item
]:
export_params
[
item
]
})
}
this
.
upload_keys
=
upload_keys
;
this
.
export_keys
=
export_keys
;
this
.
custom_arr
=
custom_arr
;
this
.
setFiles
(
this
.
value
);
this
.
dataProcess
();
...
...
src/components/app-form-group/app-form-group.less
浏览文件 @
8119eec6
.app-form-group {
>.ivu-card-head {
>p {
>i {
...
...
@@ -7,9 +8,12 @@
}
}
}
>.ivu-card-extra {
.item-extract-mode {
display: flex;
.item {
margin-left: 12px;
}
...
...
@@ -18,6 +22,7 @@
}
.app-form-group.app-group-collapse-contant {
.ivu-card-body {
display: none;
}
...
...
@@ -25,9 +30,12 @@
.app-group-flex {
height: 100%;
overflow: auto;
> .ivu-card-body {
overflow-y: auto;
overflow-x: hidden;
>.ivu-card-body {
height: calc(100% - 51px);
overflow: auto;
overflow-y: auto;
overflow-x: hidden;
}
}
\ No newline at end of file
src/components/app-form-group/app-form-group.vue
浏览文件 @
8119eec6
<
template
>
<div
class=
"app-form-group
"
>
<
div
v-if=
"uiStyle=='STYLE2'"
>
<div
:class=
"classes
"
>
<
template
v-if=
"uiStyle=='STYLE2'"
>
<app-form-group2
:caption=
"caption"
:uiStyle=
"uiStyle"
...
...
@@ -10,8 +10,8 @@
:titleBarCloseMode=
"titleBarCloseMode"
>
<slot></slot>
</app-form-group2>
</
div
>
<
div
v-else
>
</
template
>
<
template
v-else
>
<card
v-if=
"isShowCaption === true"
:bordered=
"false"
:dis-hover=
"true"
:class=
"classes"
>
<p
class=
''
slot=
'title'
>
<icon
v-if=
"titleBarCloseMode !== 0"
:type=
"collapseContant ? 'ios-arrow-dropright-circle' : 'ios-arrow-dropdown-circle'"
...
...
@@ -87,17 +87,17 @@
<
/template
>
<
/a
>
<
/template
>
<
div
v
-
if
=
"Object.is(layoutType, 'FLEX')"
>
<
template
v
-
if
=
"Object.is(layoutType, 'FLEX')"
>
<
slot
><
/slot
>
<
/
div
>
<
div
v
-
if
=
"!Object.is(layoutType, 'FLEX')"
>
<
/
template
>
<
template
v
-
if
=
"!Object.is(layoutType, 'FLEX')"
>
<
row
:
gutter
=
"10"
><
slot
><
/slot></
row
>
<
/
div
>
<
/
template
>
<
/card
>
<
row
v
-
if
=
"isShowCaption === false"
:
class
=
"classes
"
>
<
template
v
-
if
=
"isShowCaption === false
"
>
<
slot
><
/slot
>
<
/
row
>
<
/
div
>
<
/
template
>
<
/
template
>
<
/div
>
<
/template
>
...
...
src/components/app-form-item/app-form-item.less
浏览文件 @
8119eec6
.app-form-item {
// margin-bottom: 16px;
>.ivu-form-item-label {
text-decoration: none;
display: block;
overflow: hidden;
white-space: nowrap;
}
>.ivu-form-item-content {
height: 100%;
.editor {
height: 100%;
.ivu-form-item-content {
height: 100%;
min-height: 36px;
}
}
.app-form-item-label {
padding: 6px 10px 6px 0px;
}
}
.app-form-item.label-top, .app-form-item.label-bottom {
.app-form-item-label {
display: block;
}
}
.app-form-item-label-top {
>.ivu-form-item-label {
float: none;
display: inline-block;
padding: 0 0 10px;
.app-form-item.label-left, .app-form-item.label-right {
.app-form-item-label, .editor {
height: 100%;
}
}
.app-form-item
-label-left
{
.app-form-item-label{
.app-form-item
.label-left
{
.app-form-item-label
{
float: left;
text-align: right;
padding-right: 12px;
}
}
.app-form-item-label-right{
.app-form-item-label{
.app-form-item.label-right {
.app-form-item-label {
float: right;
text-align: left;
padding-left: 12px;
}
}
.app-form-item-label-top{
.app-form-item-label{
display: block;
padding-bottom: 10px;
padding: 6px 0px 6px 10px;
}
}
.app-form-item-label-bottom{
.app-form-item-label
{
display: block;
padding-top: 10px
;
.app-form-item.label-none
{
.app-form-item-label {
display: none !important
;
}
}
\ No newline at end of file
src/components/app-form-item/app-form-item.vue
浏览文件 @
8119eec6
<
template
>
<div>
<
div
v-if=
"this.uiStyle === 'STYLE2'"
>
<div
:class=
"classes"
>
<
template
v-if=
"this.uiStyle === 'STYLE2'"
>
<app-form-item2
:caption=
"caption"
:labelStyle=
"labelStyle"
...
...
@@ -14,33 +14,42 @@
:itemRules=
"itemRules"
>
<slot></slot>
</app-form-item2>
</div>
<div
v-if=
"this.uiStyle !== 'STYLE2'"
>
<form-item
:prop=
"name"
:error=
"error"
:required=
"required"
:rules=
"rules"
:class=
"classes"
>
<div
v-if=
"Object.is(this.labelPos,'BOTTOM') || Object.is(this.labelPos,'NONE') || !this.labelPos"
class=
"slot-editor"
:style=
"slotstyle"
>
</
template
>
<
template
v-if=
"this.uiStyle !== 'STYLE2'"
>
<div
v-if=
"Object.is(this.labelPos,'BOTTOM') || Object.is(this.labelPos,'NONE') || !this.labelPos"
class=
"editor"
:style=
"slotstyle"
>
<form-item
:prop=
"name"
:error=
"error"
:required=
"required"
:rules=
"rules"
>
<slot></slot>
</form-item>
</div>
<span
v-if=
"!Object.is(this.labelPos,'NONE') && this.isShowCaption && this.labelWidth > 0"
:style=
"labelstyle"
:class=
"labelclasses"
>
<span
v-if=
"!Object.is(this.labelPos,'NONE') && this.isShowCaption && this.labelWidth > 0"
:style=
"labelstyle"
:class=
"labelclasses"
>
<span
v-if=
"required"
style=
"color:red;"
>
*
</span>
{{
this
.
isEmptyCaption
?
''
:
this
.
caption
}}
</span>
<div
v-if=
"Object.is(this.labelPos,'TOP') || Object.is(this.labelPos,'LEFT') || Object.is(this.labelPos,'RIGHT')"
class=
"slot-editor"
:style=
"slotstyle"
>
<div
v-if=
"Object.is(this.labelPos,'TOP') || Object.is(this.labelPos,'LEFT') || Object.is(this.labelPos,'RIGHT')"
class=
"editor"
:style=
"slotstyle"
>
<form-item
:prop=
"name"
:error=
"error"
:required=
"required"
:rules=
"rules"
>
<slot></slot>
</div>
</form-item>
</div>
</
template
>
</div>
</template>
<
script
lang=
"ts"
>
import
{
Vue
,
Component
,
Prop
,
Watch
}
from
'vue-property-decorator'
;
import
{
Vue
,
Component
,
Prop
,
Watch
}
from
"vue-property-decorator"
;
@
Component
({})
export
default
class
AppFormItem
extends
Vue
{
/**
* 名称
*
...
...
@@ -71,7 +80,13 @@ export default class AppFormItem extends Vue {
* @type {(string | 'BOTTOM' | 'LEFT' | 'NONE' | 'RIGHT' | 'TOP')}
* @memberof AppFormItem
*/
@
Prop
()
public
labelPos
?:
string
|
'BOTTOM'
|
'LEFT'
|
'NONE'
|
'RIGHT'
|
'TOP'
;
@
Prop
()
public
labelPos
?:
|
string
|
"BOTTOM"
|
"LEFT"
|
"NONE"
|
"RIGHT"
|
"TOP"
;
/**
* 标签宽度
...
...
@@ -144,7 +159,7 @@ export default class AppFormItem extends Vue {
* @param {*} oldVal
* @memberof AppFormItem
*/
@
Watch
(
'itemRules'
,{
deep
:
true
})
@
Watch
(
"itemRules"
,
{
deep
:
true
})
onItemRulesChange
(
newVal
:
any
,
oldVal
:
any
)
{
if
(
newVal
)
{
try
{
...
...
@@ -152,14 +167,13 @@ export default class AppFormItem extends Vue {
const
_rules
:
any
[]
=
newVal
;
this
.
rules
=
[...
_rules
];
this
.
rules
.
some
((
rule
:
any
)
=>
{
if
(
rule
.
hasOwnProperty
(
'required'
))
{
if
(
rule
.
hasOwnProperty
(
"required"
))
{
this
.
required
=
rule
.
required
;
return
true
;
}
return
false
;
});
}
catch
(
error
)
{
}
}
catch
(
error
)
{}
}
}
...
...
@@ -171,28 +185,25 @@ export default class AppFormItem extends Vue {
* @memberof AppFormItem
*/
get
classes
():
string
[]
{
let
posClass
=
''
;
let
posClass
=
""
;
switch
(
this
.
labelPos
)
{
case
'TOP'
:
posClass
=
'app-form-item-label-top'
;
case
"TOP"
:
posClass
=
"label-top"
;
break
;
case
'LEFT'
:
posClass
=
'app-form-item-label-left'
;
case
"LEFT"
:
posClass
=
"label-left"
;
break
;
case
'BOTTOM'
:
posClass
=
'app-form-item-label-bottom'
;
case
"BOTTOM"
:
posClass
=
"label-bottom"
;
break
;
case
'RIGHT'
:
posClass
=
'app-form-item-label-right'
;
case
"RIGHT"
:
posClass
=
"label-right"
;
break
;
case
'NONE'
:
posClass
=
'app-form-item-label-none'
;
case
"NONE"
:
posClass
=
"label-none"
;
break
;
}
return
[
'app-form-item'
,
posClass
];
return
[
"app-form-item"
,
posClass
];
}
/**
...
...
@@ -202,8 +213,10 @@ export default class AppFormItem extends Vue {
* @type {string}
* @memberof AppFormItem
*/
get
labelclasses
():
string
{
return
this
.
labelStyle
?
this
.
labelStyle
+
' app-form-item-label'
:
'app-form-item-label'
;
get
labelclasses
():
string
{
return
this
.
labelStyle
?
this
.
labelStyle
+
" app-form-item-label"
:
"app-form-item-label"
;
}
/**
...
...
@@ -213,8 +226,10 @@ export default class AppFormItem extends Vue {
* @type {string}
* @memberof AppFormItem
*/
get
labelstyle
():
any
{
return
{
width
:
this
.
labelWidth
+
'px'
};
get
labelstyle
():
any
{
if
(
Object
.
is
(
this
.
labelPos
,
'LEFT'
)
||
Object
.
is
(
this
.
labelPos
,
'RIGHT'
))
{
return
{
width
:
this
.
labelWidth
+
"px"
};
}
}
/**
...
...
@@ -224,11 +239,11 @@ export default class AppFormItem extends Vue {
* @type {string}
* @memberof AppFormItem
*/
get
slotstyle
():
any
{
if
(
Object
.
is
(
this
.
labelPos
,
'LEFT'
))
{
return
{
marginLeft
:
this
.
labelWidth
+
'px'
};
}
else
if
(
Object
.
is
(
this
.
labelPos
,
'RIGHT'
))
{
return
{
marginRight
:
this
.
labelWidth
+
'px'
};
get
slotstyle
():
any
{
if
(
Object
.
is
(
this
.
labelPos
,
"LEFT"
))
{
return
{
marginLeft
:
this
.
labelWidth
+
"px"
};
}
else
if
(
Object
.
is
(
this
.
labelPos
,
"RIGHT"
))
{
return
{
marginRight
:
this
.
labelWidth
+
"px"
};
}
}
...
...
@@ -243,19 +258,17 @@ export default class AppFormItem extends Vue {
const
_rules
:
any
[]
=
this
.
itemRules
;
this
.
rules
=
[...
_rules
];
this
.
rules
.
some
((
rule
:
any
)
=>
{
if
(
rule
.
hasOwnProperty
(
'required'
))
{
if
(
rule
.
hasOwnProperty
(
"required"
))
{
this
.
required
=
rule
.
required
;
return
true
;
}
return
false
;
});
}
catch
(
error
)
{
}
catch
(
error
)
{}
}
}
}
}
</
script
>
<
style
lang=
'less'
>
@import
'./app-form-item.less'
;
@import
"./app-form-item.less"
;
</
style
>
\ No newline at end of file
src/components/app-image-upload/app-image-upload.vue
浏览文件 @
8119eec6
...
...
@@ -98,6 +98,22 @@ export default class AppImageUpload extends Vue {
*/
@
Prop
()
public
data
!
:
string
;
/**
* 视图参数
*
* @type {*}
* @memberof AppFormDRUIPart
*/
@
Prop
()
public
viewparams
!
:
any
;
/**
* 视图上下文
*
* @type {*}
* @memberof AppAutocomplete
*/
@
Prop
()
public
context
!
:
any
;
/**
* 初始化值
*
...
...
@@ -185,20 +201,20 @@ export default class AppImageUpload extends Vue {
@
Provide
()
public
files
=
[];
/**
* 上传
key
s
* 上传
param
s
*
* @type {Array<any>}
* @memberof AppImageUpload
*/
public
upload_
key
s
:
Array
<
any
>
=
[];
public
upload_
param
s
:
Array
<
any
>
=
[];
/**
* 导出
key
s
* 导出
param
s
*
* @type {Array<any>}
* @memberof AppImageUpload
*/
public
export_
key
s
:
Array
<
any
>
=
[];
public
export_
param
s
:
Array
<
any
>
=
[];
/**
* 自定义数组
...
...
@@ -238,26 +254,31 @@ export default class AppImageUpload extends Vue {
* @memberof AppImageUpload
*/
private
dataProcess
():
void
{
let
upload_arr
:
Array
<
string
>
=
[];
let
export_arr
:
Array
<
string
>
=
[];
const
_data
:
any
=
JSON
.
parse
(
this
.
data
);
this
.
upload_keys
.
forEach
((
key
:
string
)
=>
{
upload_arr
.
push
(
`
${
key
}
=
${
_data
[
key
]}
`
);
});
this
.
export_keys
.
forEach
((
key
:
string
)
=>
{
export_arr
.
push
(
`
${
key
}
=
${
_data
[
key
]}
`
);
});
let
_url
=
`
${
Environment
.
BaseUrl
}${
Environment
.
UploadFile
}
`
;
if
(
upload_arr
.
length
>
0
||
this
.
custom_arr
.
length
>
0
)
{
_url
=
`
${
_url
}
?
${
upload_arr
.
join
(
'&'
)}${
upload_arr
.
length
>
0
?
'&'
:
''
}${
this
.
custom_arr
.
join
(
'&'
)}
`
;
if
(
this
.
upload_params
.
length
>
0
)
{
_url
+=
'?'
;
this
.
upload_params
.
forEach
((
item
:
any
,
i
:
any
)
=>
{
_url
+=
`
${
Object
.
keys
(
item
)[
0
]}
=
${
Object
.
values
(
item
)[
0
]}
`
;
if
(
i
<
this
.
upload_params
.
length
-
1
){
_url
+=
'&'
;
}
})
}
this
.
uploadUrl
=
_url
;
this
.
files
.
forEach
((
file
:
any
)
=>
{
let
url
=
`
${
this
.
downloadUrl
}
/
${
file
.
id
}
`
;
if
(
upload_arr
.
length
>
0
||
this
.
custom_arr
.
length
>
0
)
{
url
=
`
${
url
}
?
${
upload_arr
.
join
(
'&'
)}${
upload_arr
.
length
>
0
?
'&'
:
''
}${
this
.
custom_arr
.
join
(
'&'
)}
`
;
if
(
this
.
export_params
.
length
>
0
)
{
url
+=
'?'
;
this
.
export_params
.
forEach
((
item
:
any
,
i
:
any
)
=>
{
url
+=
`
${
Object
.
keys
(
item
)[
0
]}
=
${
Object
.
values
(
item
)[
0
]}
`
;
if
(
i
<
this
.
export_params
.
length
-
1
){
url
+=
'&'
;
}
})
}
file
.
url
=
url
;
});
...
...
@@ -288,28 +309,35 @@ export default class AppImageUpload extends Vue {
public
mounted
()
{
this
.
appData
=
this
.
$store
.
getters
.
getAppData
();
let
uploadparams
:
string
=
''
;
let
exportparams
:
string
=
''
;
let
uploadparams
:
any
=
{}
;
let
exportparams
:
any
=
{}
;
let
upload_
key
s
:
Array
<
string
>
=
[];
let
export_
key
s
:
Array
<
string
>
=
[];
let
upload_
param
s
:
Array
<
string
>
=
[];
let
export_
param
s
:
Array
<
string
>
=
[];
let
custom_arr
:
Array
<
string
>
=
[];
let
param
:
any
=
this
.
viewparams
;
let
context
:
any
=
this
.
context
;
let
_data
:
any
=
JSON
.
parse
(
this
.
data
);
if
(
this
.
uploadparams
&&
!
Object
.
is
(
this
.
uploadparams
,
''
))
{
uploadparams
=
this
.
uploadparams
;
upload_
keys
=
uploadparams
.
split
(
';'
);
upload_
params
=
this
.
$util
.
computedNavData
(
_data
,
param
,
context
,
uploadparams
);
}
if
(
this
.
exportparams
&&
!
Object
.
is
(
this
.
exportparams
,
''
))
{
exportparams
=
this
.
exportparams
;
export_
keys
=
exportparams
.
split
(
';'
);
export_
params
=
this
.
$util
.
computedNavData
(
_data
,
param
,
context
,
exportparams
);
}
if
(
this
.
customparams
&&
!
Object
.
is
(
this
.
customparams
,
''
))
{
Object
.
keys
(
this
.
customparams
).
forEach
((
name
:
string
)
=>
{
custom_arr
.
push
(
`
${
name
}
=
${
this
.
customparams
[
name
]}
`
);
});
for
(
const
item
in
upload_params
)
{
this
.
upload_params
.
push
({
[
item
]:
upload_params
[
item
]
})
}
for
(
const
item
in
export_params
)
{
this
.
export_params
.
push
({
[
item
]:
export_params
[
item
]
})
}
this
.
upload_keys
=
upload_keys
;
this
.
export_keys
=
export_keys
;
this
.
custom_arr
=
custom_arr
;
this
.
setFiles
(
this
.
value
);
this
.
dataProcess
();
...
...
src/components/login/login.vue
浏览文件 @
8119eec6
...
...
@@ -160,7 +160,10 @@ export default class Login extends Vue {
* @memberof Login
*/
public
handleSubmit
():
void
{
document
.
cookie
=
""
;
// 清除cookie
let
leftTime
=
new
Date
();
leftTime
.
setTime
(
leftTime
.
getSeconds
()
-
1000
);
document
.
cookie
=
"ibzuaa-token=;expires="
+
leftTime
.
toUTCString
();
const
form
:
any
=
this
.
$refs
.
loginForm
;
let
validatestate
:
boolean
=
true
;
form
.
validate
((
valid
:
boolean
)
=>
{
...
...
src/service/app/navdata-service.ts
0 → 100644
浏览文件 @
8119eec6
export
interface
NavDataElement
{
/**
* 主键标识
*
* @memberof NavDataElement
*/
id
:
string
;
/**
* 视图标题
*
* @memberof NavDataElement
*/
title
:
any
;
/**
* 上下文
*
* @memberof NavDataElement
*/
context
:
any
;
/**
* 视图参数
*
* @memberof NavDataElement
*/
viewparams
:
any
;
/**
* 视图数据
*
* @memberof NavDataElement
*/
data
:
any
;
}
/**
* 导航数据服务
*
* @export
* @class CodeListService
*/
export
default
class
NavDataService
{
/**
* 导航数据栈
*
* @memberof NavDataService
*/
public
navDataStack
:
Array
<
NavDataElement
>
=
[];
/**
* 导航数据存储仓库
*
* @memberof NavDataService
*/
public
sessionStore
:
any
;
/**
* 初始化实例
*
* @memberof NavDataService
*/
constructor
(
opts
:
any
=
{}){
this
.
sessionStore
=
window
.
sessionStorage
;
this
.
initNavData
();
}
/**
* 初始化基础导航数据
*
* @memberof NavDataService
*/
public
initNavData
(){
if
(
this
.
sessionStore
&&
this
.
sessionStore
.
getItem
(
'srfnavdata'
)){
this
.
navDataStack
=
JSON
.
parse
(
this
.
sessionStore
.
getItem
(
'srfnavdata'
));
}
}
/**
* 添加基础导航数据到栈中
*
* @memberof NavDataService
*/
public
addNavData
(
curNavData
:
NavDataElement
){
if
(
this
.
navDataStack
.
length
>
0
){
let
tempIndex
:
number
=
this
.
navDataStack
.
findIndex
((
element
:
NavDataElement
)
=>
{
return
Object
.
is
(
element
.
id
,
curNavData
.
id
);
})
if
(
tempIndex
===
-
1
){
this
.
navDataStack
.
push
(
curNavData
);
this
.
sessionStore
.
setItem
(
'srfnavdata'
,
JSON
.
stringify
(
this
.
navDataStack
));
return
curNavData
;
}
else
{
this
.
setNavDataById
(
curNavData
.
id
,
curNavData
);
}
}
else
{
this
.
navDataStack
.
push
(
curNavData
);
this
.
sessionStore
.
setItem
(
'srfnavdata'
,
JSON
.
stringify
(
this
.
navDataStack
));
return
curNavData
;
}
}
/**
* 设置指定数据到基础导航数据栈中
*
* @memberof NavDataService
*/
public
setNavDataById
(
id
:
string
,
curNavData
:
NavDataElement
){
if
(
this
.
navDataStack
.
length
>
0
){
let
tempIndex
:
number
=
this
.
navDataStack
.
findIndex
((
element
:
NavDataElement
)
=>
{
return
Object
.
is
(
element
.
id
,
id
);
})
this
.
navDataStack
[
tempIndex
]
=
curNavData
;
this
.
sessionStore
.
setItem
(
'srfnavdata'
,
JSON
.
stringify
(
this
.
navDataStack
));
return
curNavData
;
}
else
{
return
null
;
}
}
/**
* 从导航数据栈中删除指定数据
*
* @memberof NavDataService
*/
public
removeNavData
(
id
:
string
){
if
(
this
.
navDataStack
.
length
>
0
){
let
tempIndex
:
number
=
this
.
navDataStack
.
findIndex
((
element
:
NavDataElement
)
=>
{
return
Object
.
is
(
element
.
id
,
id
);
})
let
removeNavData
=
this
.
navDataStack
.
splice
(
tempIndex
);
this
.
sessionStore
.
setItem
(
'srfnavdata'
,
JSON
.
stringify
(
this
.
navDataStack
));
return
removeNavData
;
}
else
{
return
null
;
}
}
/**
* 从导航数据栈中获取指定数据
*
* @memberof NavDataService
*/
public
getNavDataById
(
id
:
string
){
if
(
this
.
navDataStack
.
length
>
0
){
let
tempIndex
:
number
=
this
.
navDataStack
.
findIndex
((
element
:
NavDataElement
)
=>
{
return
Object
.
is
(
element
.
id
,
id
);
})
return
this
.
navDataStack
[
tempIndex
];
}
else
{
return
null
;
}
}
/**
* 从导航数据栈中获取指定数据的前一条数据
*
* @memberof NavDataService
*/
public
getPreNavDataById
(
id
:
string
){
if
(
this
.
navDataStack
.
length
>
0
){
let
tempIndex
:
number
=
this
.
navDataStack
.
findIndex
((
element
:
NavDataElement
)
=>
{
return
Object
.
is
(
element
.
id
,
id
);
})
return
this
.
navDataStack
[
tempIndex
-
1
];
}
else
{
return
null
;
}
}
/**
* 清空导航数据栈数据
*
* @memberof NavDataService
*/
public
clearNavData
(
id
:
string
){
this
.
navDataStack
=
[];
this
.
sessionStore
.
setItem
(
'srfnavdata'
,
JSON
.
stringify
(
this
.
navDataStack
));
}
}
\ No newline at end of file
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录