Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
setup-project-manager-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
赵啸非
setup-project-manager-ui
Commits
74008034
Commit
74008034
authored
Oct 31, 2024
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加检测是否首次安装
parent
fdb46f26
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
59 additions
and
10 deletions
+59
-10
admin/src/views/setup/project/list.vue
admin/src/views/setup/project/list.vue
+59
-10
No files found.
admin/src/views/setup/project/list.vue
View file @
74008034
...
...
@@ -58,20 +58,20 @@
<!-- 项目引导导入对话框 -->
<el-dialog
:title=
"
upload
.title"
:visible.sync=
"
upload
.open"
:title=
"
guide
.title"
:visible.sync=
"
guide
.open"
width=
"400px"
append-to-body
>
<el-upload
ref=
"
upload
"
ref=
"
guide
"
:limit=
"1"
accept=
".zip,.tar.gz"
:headers=
"
upload
.headers"
:action=
"
upload
.url"
:disabled=
"
upload
.isUploading"
:on-progress=
"handleFileUploadProgress"
:on-success=
"handleFileSuccess"
:headers=
"
guide
.headers"
:action=
"
guide
.url"
:disabled=
"
guide
.isUploading"
:on-progress=
"handle
Guide
FileUploadProgress"
:on-success=
"handle
Guide
FileSuccess"
:auto-upload=
"false"
drag
>
...
...
@@ -85,10 +85,10 @@
</div>
</el-upload>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
class=
"addclass"
@
click=
"submitFileForm"
<el-button
type=
"primary"
class=
"addclass"
@
click=
"submit
Guide
FileForm"
>
确 定
</el-button
>
<el-button
@
click=
"
upload
.open = false"
>
取 消
</el-button>
<el-button
@
click=
"
guide
.open = false"
>
取 消
</el-button>
</div>
</el-dialog>
...
...
@@ -107,6 +107,26 @@
mixins
:
[
table
],
created
()
{
//检测是否初始安装
this
.
$get
(
"
/setup/project/check
"
)
.
then
((
res
)
=>
{
if
(
res
.
code
==
1
)
{
console
.
log
(
res
)
let
bool
=
res
.
data
if
(
bool
){
}
else
{
//弹框引导页面
this
.
upload
.
open
=
true
;
}
//this.$message.success("项目部署成功!");
// this.getData();
}
})
.
catch
((
error
)
=>
{
this
.
$message
.
error
(
error
.
message
);
});
},
methods
:
{
/** 导入 */
...
...
@@ -306,6 +326,23 @@
this
.
$refs
.
upload
.
submit
();
},
/** 文件上传中处理 */
handleGuideFileUploadProgress
(
event
,
file
,
fileList
)
{
this
.
guide
.
isUploading
=
true
;
},
/** 文件上传成功处理 */
handleGuideFileSuccess
(
response
,
file
,
fileList
)
{
this
.
guide
.
open
=
false
;
this
.
guide
.
isUploading
=
false
;
this
.
$refs
.
guide
.
clearFiles
();
this
.
$alert
(
response
.
msg
,
"
导入结果
"
,
{
dangerouslyUseHTMLString
:
true
});
},
/** 提交上传文件 */
submitGuideFileForm
()
{
this
.
$refs
.
guide
.
submit
();
},
},
data
()
{
return
{
...
...
@@ -324,6 +361,18 @@
// 上传的地址
url
:
"
/m/setup/project/importProjectData
"
,
},
guide
:
{
// 是否显示弹出层(设备导入)
open
:
false
,
// 弹出层标题(设备导入)
title
:
"
上传项目工程包
"
,
// 是否禁用上传
isUploading
:
false
,
// 上传的地址
url
:
"
/m/setup/project/importProjectData
"
,
},
config
:
{
search
:
[
],
...
...
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