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
ab092009
Commit
ab092009
authored
Jun 03, 2020
by
徐一鸣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
应用构建接口调试
parent
d90cb6d6
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
431 additions
and
287 deletions
+431
-287
src/assets/css/index.css
src/assets/css/index.css
+6
-0
src/components/apass-table.vue
src/components/apass-table.vue
+1
-1
src/components/cropper.vue
src/components/cropper.vue
+19
-17
src/pages/service_shop/sjfwDetail.vue
src/pages/service_shop/sjfwDetail.vue
+11
-19
src/pages/workbench/app_build.vue
src/pages/workbench/app_build.vue
+394
-250
No files found.
src/assets/css/index.css
View file @
ab092009
...
...
@@ -499,6 +499,7 @@ width: 620px!important;
/* 应用超市详情页公共样式 */
.sevice_detail
{
max-width
:
1200px
;
padding-top
:
1px
;
margin
:
0
auto
;
}
...
...
@@ -535,6 +536,11 @@ width: 620px!important;
background-color
:
#e1e4fb
;
border-color
:
#e1e4fb
;
}
.apass_button
.el-button.is-disabled
,
.apass_button
.el-button.is-disabled
:focus
,
.apass_button
.el-button.is-disabled
:hover
{
cursor
:
not-allowed
;
}
.apass_table
.el-table
th
>
.cell
{
color
:
#1a2236
;
}
...
...
src/components/apass-table.vue
View file @
ab092009
<
template
>
<div
class=
"apass_table"
>
<el-table
:data=
"data"
>
<el-table-column
:width=
"
paddingLeft - 10
"
></el-table-column>
<el-table-column
:width=
"
Math.max(paddingLeft - 10, 0)
"
></el-table-column>
<el-table-column
v-for=
"(item, index) in header"
:label=
"item.label"
...
...
src/components/cropper.vue
View file @
ab092009
...
...
@@ -7,7 +7,7 @@
id=
"uploads"
class=
"up_input"
accept=
"image/png, image/jpeg, image/gif, image/jpg"
@
change=
"uploadImg($event,1)"
@
change=
"uploadImg($event,
1)"
/>
</div>
<!-- 弹出层-裁剪 -->
...
...
@@ -41,8 +41,12 @@
</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"
size=
"small"
round
@
click=
"cut('blob')"
>
确认
</el-button
>
<el-button
type=
"primary"
size=
"small"
round
@
click=
"handleClose"
>
取消
</el-button
>
</el-row>
</div>
</el-dialog>
...
...
@@ -53,7 +57,7 @@
import
{
VueCropper
}
from
"
vue-cropper
"
;
export
default
{
components
:
{
VueCropper
VueCropper
,
},
data
()
{
return
{
...
...
@@ -64,7 +68,7 @@ export default {
canMoveBox
:
true
,
//截图框不能拖动
autoCropWidth
:
200
,
//截图框宽度
autoCropHeight
:
200
,
//截图框高度
centerBox
:
false
//截图框被限制在图片里面
centerBox
:
false
,
//截图框被限制在图片里面
},
previews
:
{},
//实时预览图数据
attach
:
{
...
...
@@ -72,10 +76,10 @@ export default {
userId
:
""
,
customaryUrl
:
""
,
//原图片路径
laterUrl
:
""
,
//裁剪后图片路径
attachType
:
"
photo
"
//附件类型
attachType
:
"
photo
"
,
//附件类型
},
fileName
:
""
,
//本机文件地址
uploadImgRelaPath
:
""
//上传后图片地址
uploadImgRelaPath
:
""
,
//上传后图片地址
};
},
methods
:
{
...
...
@@ -90,7 +94,7 @@ export default {
//加载图片信息
find
()
{
this
.
userId
=
sessionStorage
.
getItem
(
"
userId
"
);
this
.
$http
.
post
(
"
ssapi
"
,
this
.
attach
).
then
(
res
=>
{
this
.
$http
.
post
(
"
ssapi
"
,
this
.
attach
).
then
(
(
res
)
=>
{
console
.
log
(
res
);
});
},
...
...
@@ -105,7 +109,7 @@ export default {
//fileReader 接口,用于异步读取文件数据
var
reader
=
new
FileReader
();
reader
.
readAsDataURL
(
file
);
//重要 以dataURL形式读取文件
reader
.
onload
=
e
=>
{
reader
.
onload
=
(
e
)
=>
{
// data = window.URL.createObjectURL(new Blob([e.target.result])) 转化为blob格式
let
data
=
e
.
target
.
result
;
...
...
@@ -120,25 +124,23 @@ export default {
//确认截图,上传
cut
(
type
)
{
var
formData
=
new
FormData
();
this
.
$refs
.
cropper
.
getCropBlob
(
res
=>
{
this
.
$refs
.
cropper
.
getCropBlob
(
(
res
)
=>
{
//res是裁剪后图片的bolb对象
formData
.
append
(
"
file
"
,
res
,
this
.
userId
);
formData
.
append
(
"
directory
"
,
"
image
"
);
let
url
=
"
/awecloud/static/image/upload
"
;
this
.
$http
.
post
(
url
,
formData
,
{
contentType
:
false
,
processData
:
false
,
headers
:
{
"
Content-Type
"
:
"
multipart/form-data
"
}
headers
:
{
"
Content-Type
"
:
"
multipart/form-data
"
},
})
.
then
(
res
=>
{
.
then
(
(
res
)
=>
{
// 上传图片后服务器返回访问路径
this
.
$emit
(
"
getNewUrl
"
,
res
.
data
.
data
);
this
.
handleClose
();
});
});
}
}
}
,
}
,
};
</
script
>
...
...
src/pages/service_shop/sjfwDetail.vue
View file @
ab092009
...
...
@@ -42,27 +42,19 @@ export default {
},
},
methods
:
{
getDataFromApi
(
_url
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
init
()
{
this
.
$http
.
get
(
_url
)
.
get
(
"
/apaas/serviceapp/v3/servicemarket/detail
"
,
{
params
:
{
serviceId
:
666
,
},
})
.
then
((
response
)
=>
{
resolve
(
response
.
body
);
console
.
log
(
response
.
data
);
})
.
catch
(
function
(
error
)
{
reject
(
error
);
});
});
},
init
()
{
this
.
getDataFromApi
(
`/static/serviceBaseInfo.json`
).
then
(
({
sjfw
})
=>
{
this
.
baseInfo
=
sjfw
;
},
(
error
)
=>
{
console
.
log
(
error
);
}
);
});
},
},
mounted
()
{
...
...
src/pages/workbench/app_build.vue
View file @
ab092009
This diff is collapsed.
Click to expand it.
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