Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
apaas-ui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gzga-jzapi
apaas-ui
Commits
08a35d3a
Commit
08a35d3a
authored
Jun 03, 2020
by
刘殿昕
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'ldx' into dev
parents
be2ab7ec
00989215
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
160 additions
and
665 deletions
+160
-665
src/App.vue
src/App.vue
+1
-1
src/components/cropper.vue
src/components/cropper.vue
+76
-12
src/components/upload_file.vue
src/components/upload_file.vue
+3
-50
src/pages/example/example_upload.vue
src/pages/example/example_upload.vue
+1
-2
src/pages/login.vue
src/pages/login.vue
+0
-589
src/pages/user/user_info.vue
src/pages/user/user_info.vue
+66
-5
src/request/api.js
src/request/api.js
+3
-1
src/request/api/general.js
src/request/api/general.js
+9
-0
src/request/http.js
src/request/http.js
+1
-0
src/router/index.js
src/router/index.js
+0
-5
No files found.
src/App.vue
View file @
08a35d3a
<
template
>
<div
id=
"app"
>
<bd-menu
v-if=
"this.$route.path != '/login'"
class=
"outmenu"
></bd-menu>
<bd-menu
class=
"outmenu"
></bd-menu>
<router-view
/>
</div>
</
template
>
...
...
src/components/cropper.vue
View file @
08a35d3a
<
template
>
<div
class=
"add_img"
>
<div
class=
"add_pic"
>
<i
class=
"el-icon-plus add_icon"
></i>
<input
type=
"file"
id=
"uploads"
class=
"up_input"
accept=
"image/png, image/jpeg, image/gif, image/jpg"
@
change=
"uploadImg($event,1)"
/>
<div
class=
"img_crop"
>
<div
v-for=
"(item, index) in fileArray"
:key=
"'img' + index"
class=
"list_img"
>
<div
class=
"list_img_back"
>
<i
class=
"el-icon-refresh-right img_replace"
></i>
<input
type=
"file"
class=
"up_input"
accept=
"image/png, image/jpeg, image/gif, image/jpg"
@
change=
"uploadImg($event,1)"
/>
</div>
<el-image
class=
"list_img_item"
:src=
"item.url"
:fit=
"fit"
></el-image>
</div>
<div
class=
"add_img"
v-if=
"fileArray.length
<
=
max
-
1
"
>
<div
class=
"add_pic"
>
<i
class=
"el-icon-plus add_icon"
></i>
<input
type=
"file"
class=
"up_input"
accept=
"image/png, image/jpeg, image/gif, image/jpg"
@
change=
"uploadImg($event,1)"
/>
</div>
</div>
<!-- 弹出层-裁剪 -->
<el-dialog
...
...
@@ -41,8 +54,8 @@
</div>
</div>
<el-row
class=
"footerBtn"
align=
"center"
>
<el-button
type=
"primary"
size=
"small"
round
@
click=
"cut('blob')"
>
确
认
</el-button>
<el-button
type=
"primary"
size=
"small"
round
@
click=
"handleClose"
>
取
消
</el-button>
<el-button
type=
"primary"
class=
"form_t"
size=
"small"
@
click=
"cut('blob')"
>
确
认
</el-button>
<el-button
type=
"primary"
class=
"form_c"
size=
"small"
@
click=
"handleClose"
>
取
消
</el-button>
</el-row>
</div>
</el-dialog>
...
...
@@ -55,6 +68,22 @@ export default {
components
:
{
VueCropper
},
props
:
{
fileArray
:
{
type
:
Array
,
default
:
()
=>
{
[];
}
},
fit
:
{
type
:
String
,
default
:
""
},
max
:
{
type
:
Number
,
default
:
1
}
},
data
()
{
return
{
dialogVisible
:
false
,
...
...
@@ -186,6 +215,41 @@ export default {
justify-content
:
center
;
margin-top
:
15px
;
}
.list_img
{
width
:
140px
;
height
:
140px
;
border-radius
:
5px
;
overflow
:
hidden
;
margin-left
:
10px
;
position
:
relative
;
cursor
:
pointer
;
}
.list_img_back
{
position
:
absolute
;
width
:
100%
;
height
:
100%
;
background-color
:
#000
;
z-index
:
1
;
opacity
:
0
;
}
.list_img
:hover
.list_img_back
{
opacity
:
0.5
;
}
.list_img_item
{
width
:
100%
;
height
:
100%
;
}
.img_replace
{
position
:
absolute
;
top
:
calc
((
100%
-
34px
)
/
2
);
left
:
calc
((
100%
-
34px
)
/
2
);
color
:
#fff
;
font-size
:
34px
;
}
.img_crop
{
display
:
flex
;
align-items
:
center
;
}
</
style
>
<
style
>
.cropper_dia
.el-dialog
{
...
...
src/components/upload_file.vue
View file @
08a35d3a
<
template
>
<div>
<div
class=
"img_crop"
v-if=
"type == 'cropper'"
>
<div
v-for=
"(item, index) in fileArray"
:key=
"'img' + index"
class=
"list_img"
>
<div
v-if=
"!readOnly"
@
click=
"deleteImg(item, index)"
class=
"list_img_back"
>
<i
class=
"el-icon-delete img_del"
></i>
</div>
<el-image
class=
"list_img_item"
:src=
"item.url"
:fit=
"fit"
></el-image>
</div>
<cropper
v-if=
"fileArray.length
<
=
max
-
1
"
@
getNewUrl=
"getNewUrl"
></cropper>
<div
v-if=
"type == 'cropper'"
>
<cropper
:max=
"max"
:readOnly=
"readOnly"
:fileArray=
"fileArray"
:fit=
"fit"
></cropper>
</div>
<div
v-else
>
<el-upload
...
...
@@ -168,13 +162,9 @@ export default {
this
.
$emit
(
"
getNewList
"
,
this
.
fileArray
);
},
getNewUrl
(
val
)
{
this
.
fileArray
.
push
({
name
:
val
,
url
:
val
})
;
this
.
fileArray
=
{
name
:
val
,
url
:
val
}
;
this
.
$emit
(
"
getNewList
"
,
this
.
fileArray
);
console
.
log
(
this
.
fileArray
);
},
deleteImg
(
item
,
index
)
{
this
.
fileArray
.
splice
(
index
,
1
);
this
.
$emit
(
"
getNewList
"
,
this
.
fileArray
);
}
}
};
...
...
@@ -183,41 +173,4 @@ export default {
.hide
.el-upload--picture-card
{
display
:
none
;
}
</
style
>
<
style
scoped
>
.list_img
{
width
:
140px
;
height
:
140px
;
border-radius
:
5px
;
overflow
:
hidden
;
margin-left
:
10px
;
position
:
relative
;
cursor
:
pointer
;
}
.list_img_back
{
position
:
absolute
;
width
:
100%
;
height
:
100%
;
background-color
:
#000
;
z-index
:
1
;
opacity
:
0
;
}
.list_img
:hover
.list_img_back
{
opacity
:
0.5
;
}
.list_img_item
{
width
:
100%
;
height
:
100%
;
}
.img_crop
{
display
:
flex
;
align-items
:
center
;
}
.img_del
{
position
:
absolute
;
top
:
calc
((
100%
-
24px
)
/
2
);
left
:
calc
((
100%
-
24px
)
/
2
);
color
:
#fff
;
font-size
:
24px
;
}
</
style
>
\ No newline at end of file
src/pages/example/example_upload.vue
View file @
08a35d3a
...
...
@@ -12,7 +12,7 @@
<h3>
带有裁剪功能的图片上传
</h3>
<upload-file
:multiple=
"false"
:max=
"
4
"
:max=
"
1
"
type=
"cropper"
:readOnly=
"false"
:list=
"imgList"
...
...
@@ -48,7 +48,6 @@ export default {
return
{
imgList
:
[],
imgList1
:
[
"
https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg
"
,
"
https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg
"
]
};
...
...
src/pages/login.vue
deleted
100644 → 0
View file @
be2ab7ec
This diff is collapsed.
Click to expand it.
src/pages/user/user_info.vue
View file @
08a35d3a
...
...
@@ -9,23 +9,84 @@
<el-tab-pane
label=
"个人信息详情"
name=
"0"
></el-tab-pane>
<el-tab-pane
label=
"业务系统详情"
name=
"1"
></el-tab-pane>
</el-tabs>
<el-form
ref=
"form"
:model=
"form"
>
<el-form-item>
<p>
账号:
</p>
<el-input
v-model=
"form.accountNo"
></el-input>
</el-form-item>
<el-form-item>
<p>
密码:
</p>
<el-input
v-model=
"form.password"
></el-input>
</el-form-item>
<el-form-item>
<p>
昵称:
</p>
<el-input
v-model=
"form.nickname"
></el-input>
</el-form-item>
<el-form-item>
<p>
头像:
</p>
<upload-file
:multiple=
"false"
:max=
"1"
type=
"cropper"
:readOnly=
"false"
:list=
"imgList"
@
getNewList=
"getNewList"
></upload-file>
</el-form-item>
<el-form-item>
<p>
联系人:
</p>
<el-input
v-model=
"form.contactPerson"
></el-input>
</el-form-item>
<el-form-item>
<p>
手机号:
</p>
<el-input
v-model=
"form.phone"
></el-input>
</el-form-item>
<el-form-item>
<p>
邮箱:
</p>
<el-input
v-model=
"form.email"
></el-input>
</el-form-item>
<el-form-item>
<p>
组织机构:
</p>
<el-input
v-model=
"form.organization"
></el-input>
</el-form-item>
<el-form-item>
<p>
当前角色:
</p>
<el-input
v-model=
"form.role"
></el-input>
</el-form-item>
</el-form>
</block-radius>
</div>
</
template
>
<
script
>
import
BlockRadius
from
"
@/components/block-radius
"
;
import
UploadFile
from
"
@/components/upload_file
"
;
export
default
{
components
:
{
BlockRadius
BlockRadius
,
UploadFile
},
data
:
()
=>
({
activeName
:
"
0
"
activeName
:
"
0
"
,
form
:
{
accountNo
:
""
,
password
:
""
,
nickname
:
""
,
contactPerson
:
""
,
phone
:
""
,
email
:
""
,
organization
:
""
,
role
:
""
},
imgList
:
[]
}),
mounted
()
{},
mounted
()
{
this
.
imgList
.
push
(
"
https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg
"
)
},
methods
:
{
changeTab
()
{
changeTab
()
{},
getNewList
(
val
)
{
console
.
log
(
val
);
}
}
};
...
...
src/request/api.js
View file @
08a35d3a
...
...
@@ -2,10 +2,12 @@ import workbench from '@/request/api/workbench';
import
serviceShop
from
'
@/request/api/service_shop
'
;
import
user
from
'
@/request/api/user
'
;
import
authority
from
'
@/request/api/authority
'
;
import
general
from
'
@/request/api/general
'
;
export
default
{
workbench
,
serviceShop
,
user
,
authority
authority
,
general
}
\ No newline at end of file
src/request/api/general.js
0 → 100644
View file @
08a35d3a
import
axios
from
'
@/request/http
'
;
// 导入http中创建的axios实例
import
qs
from
'
qs
'
;
// 根据需求是否导入qs模块
const
general
=
{
// general api
}
export
default
general
;
src/request/http.js
View file @
08a35d3a
...
...
@@ -15,6 +15,7 @@ const tip = msg => {
/**
* 跳转登录页
* 携带当前页面路由,以期在登录页面完成登录后返回当前页面
* 登录用 bg-login ,具体链接晚几天加
*/
const
toLogin
=
()
=>
{
router
.
replace
({
...
...
src/router/index.js
View file @
08a35d3a
...
...
@@ -16,11 +16,6 @@ export default new Router({
path
:
"
/
"
,
redirect
:
"
/index
"
,
},
{
path
:
"
/login
"
,
// 登录注册
name
:
"
login
"
,
component
:
()
=>
import
(
"
@/pages/login
"
),
},
{
path
:
"
/index
"
,
name
:
"
index
"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment