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
36ec01f3
Commit
36ec01f3
authored
Nov 04, 2024
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加检测是否首次安装
parent
6b181946
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
150 additions
and
8 deletions
+150
-8
admin/setup-project-manager-ui.tar.gz
admin/setup-project-manager-ui.tar.gz
+0
-0
admin/src/assets/mixins/tree.js
admin/src/assets/mixins/tree.js
+4
-1
admin/src/views/setup/project/list.vue
admin/src/views/setup/project/list.vue
+146
-7
No files found.
admin/setup-project-manager-ui.tar.gz
View file @
36ec01f3
No preview for this file type
admin/src/assets/mixins/tree.js
View file @
36ec01f3
...
@@ -26,10 +26,13 @@ export default {
...
@@ -26,10 +26,13 @@ export default {
},
},
renderContent
:
function
(
h
,
{
node
,
data
,
store
})
{
renderContent
:
function
(
h
,
{
node
,
data
,
store
})
{
console
.
log
(
"
node~~~~~~
"
,
node
)
return
(
return
(
<
span
>
<
span
>
<
i
style
=
"
font-size:16px;color:#409EFF
"
class
=
{
data
.
icon
}
><
/i
>
<
i
style
=
"
font-size:16px;color:#409EFF
"
class
=
{
data
.
icon
}
><
/i
>
<
span
style
=
"
padding-left: 2px;font-size:14px
"
>
{
node
.
label
}
({
data
.
siteCount
}
家
)
<
/span
>
<
span
style
=
"
padding-left: 2px;font-size:14px
"
>
{
node
.
label
}
<
/span
>
<
/span
>
<
/span
>
);
);
},
},
...
...
admin/src/views/setup/project/list.vue
View file @
36ec01f3
...
@@ -54,13 +54,11 @@
...
@@ -54,13 +54,11 @@
</div>
</div>
</el-dialog>
</el-dialog>
<!-- 项目引导导入对话框 -->
<!-- 项目引导导入对话框 -->
<el-dialog
<el-dialog
:title=
"guide.title"
:title=
"guide.title"
:visible.sync=
"guide.open"
:visible.sync=
"guide.open"
width=
"
8
00px"
width=
"
4
00px"
show-close=
false
show-close=
false
close-on-click-modal=
false
close-on-click-modal=
false
append-to-body
append-to-body
...
@@ -94,6 +92,62 @@
...
@@ -94,6 +92,62 @@
</div>
</div>
</el-dialog>
</el-dialog>
<el-dialog
:title=
"tree.title"
:visible.sync=
"tree.open"
width=
"40%"
append-to-body
>
<span
style=
"font-size: 14px"
><b>
当前选择区域:
</b>
(
<el-link
style=
"margin-left: 10px;margin-bottom: 5px"
type=
"primary"
class=
"addclass"
:underline=
"false"
>
{{
areaName
}}
</el-link
>
区域编码:
{{
areaCode
}}
)
</span
>
<el-divider></el-divider>
<div>
<el-input
placeholder=
"请输入内容"
v-model=
"siteName"
>
<template
slot=
"prepend"
>
站点名称
</
template
>
</el-input>
</div>
<el-divider></el-divider>
<el-scrollbar
style=
"height: 100%"
>
<el-tree
size=
"mini"
ref=
"areaTree"
:data=
"areaData"
id=
"el-tree"
node-key=
"id"
indent=
"4"
:props=
"treeProps"
:load=
"loadNode"
lazy
highlight-current
:expand-on-click-node=
"false"
:render-content=
"renderContent"
@
node-click=
"handleNodeClick"
>
</el-tree>
</el-scrollbar>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
class=
"addclass"
@
click=
"updateSiteConform"
>
确 定
</el-button
>
<el-button
@
click=
"tree.open = false"
>
取 消
</el-button>
</div>
</el-dialog>
</div>
</div>
</template>
</template>
...
@@ -101,14 +155,14 @@
...
@@ -101,14 +155,14 @@
/** 表单弹出框模式需引入 */
/** 表单弹出框模式需引入 */
import
drawerShow
from
"
./drawershow
"
;
import
drawerShow
from
"
./drawershow
"
;
import
table
from
"
@/assets/mixins/table
"
;
import
table
from
"
@/assets/mixins/table
"
;
import
tree
from
"
@/assets/mixins/tree
"
;
export
default
{
export
default
{
name
:
"
SetupProjectList
"
,
name
:
"
SetupProjectList
"
,
components
:
{
components
:
{
drawerShow
drawerShow
},
},
mixins
:
[
table
],
mixins
:
[
table
,
tree
],
created
()
{
created
()
{
//检测是否初始安装
//检测是否初始安装
this
.
$get
(
"
/setup/project/check
"
)
this
.
$get
(
"
/setup/project/check
"
)
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
...
@@ -133,12 +187,71 @@
...
@@ -133,12 +187,71 @@
this
.
$message
.
error
(
error
.
message
);
this
.
$message
.
error
(
error
.
message
);
});
});
//获取区域树
this
.
$get
(
"
/base/area/getListByParentId
"
,
{
parentId
:
"
0
"
,
})
.
then
((
res
)
=>
{
if
(
res
.
code
==
1
)
{
//this.info=res.data
this
.
areaData
=
res
.
data
.
result
console
.
log
(
this
.
areaData
)
// this.tree.open=true
}
})
.
catch
((
error
)
=>
{
this
.
$message
.
error
(
error
.
message
);
});
},
},
methods
:
{
methods
:
{
handleNodeClick
(
node
)
{
this
.
currentNode
=
node
;
this
.
areaCode
=
node
.
areaCode
this
.
areaName
=
node
.
label
console
.
log
(
"
node:
"
,
node
)
},
updateSiteConform
()
{
if
(
this
.
areaCode
===
''
||
this
.
areaCode
===
'
undefined
'
){
this
.
$message
.
error
(
"
请选择需要创建站点的区域!
"
);
return
;
}
if
(
this
.
siteName
===
''
||
this
.
siteName
===
'
undefined
'
){
this
.
$message
.
error
(
"
请选择需要创建站点的名称!
"
);
return
;
}
return
;
//todo
this
.
loading
=
true
;
this
.
$post
(
"
/setup/project/site/updateSite
"
,
{
areaCode
:
this
.
areaCode
,
siteName
:
this
.
siteName
,
})
.
then
((
res
)
=>
{
if
(
res
.
code
==
1
)
{
this
.
$message
.
success
(
"
创建站点成功!
"
);
this
.
tree
.
open
=
false
;
//todo
// this.getData();
}
})
.
catch
((
error
)
=>
{
this
.
loading
=
false
;
this
.
$message
.
error
(
error
.
message
);
});
},
/** 导入 */
/** 导入 */
handleImport
()
{
handleImport
()
{
this
.
upload
.
title
=
"
项目文件包导入
"
;
this
.
upload
.
title
=
"
项目文件包导入
"
;
this
.
upload
.
open
=
true
;
//this.upload.open = true;
this
.
tree
.
open
=
true
console
.
log
(
this
.
areaData
)
},
},
/** 重写新增方法 */
/** 重写新增方法 */
toAdd
(
row
)
{
toAdd
(
row
)
{
...
@@ -347,8 +460,18 @@
...
@@ -347,8 +460,18 @@
/** 提交上传文件 */
/** 提交上传文件 */
submitGuideFileForm
()
{
submitGuideFileForm
()
{
this
.
$refs
.
guide
.
submit
();
this
.
$refs
.
guide
.
submit
();
},
async
loadNode
(
node
,
resolve
)
{
console
.
log
(
11111111111
,
node
)
if
(
node
.
areaLevel
===
0
)
{
return
;
}
this
.
$get
(
"
/base/area/getListByParentId
"
,
{
parentId
:
node
.
data
.
id
,
}).
then
(({
data
})
=>
{
resolve
(
data
.
result
);
});
},
},
},
},
...
@@ -380,6 +503,20 @@
...
@@ -380,6 +503,20 @@
// 上传的地址
// 上传的地址
url
:
"
/m/setup/project/importProjectData
"
,
url
:
"
/m/setup/project/importProjectData
"
,
},
},
tree
:
{
// 是否显示弹出层(设备导入)
open
:
false
,
// 弹出层标题(设备导入)
title
:
"
选择区域创建站点
"
},
areaName
:
""
,
areaCode
:
""
,
siteName
:
""
,
siteCode
:
""
,
siteInfo
:
{},
updateSiteId
:
null
,
updateSiteName
:
""
,
updateSiteCode
:
""
,
config
:
{
config
:
{
search
:
[
search
:
[
...
@@ -534,3 +671,5 @@
...
@@ -534,3 +671,5 @@
}
}
};
};
</
script
>
</
script
>
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