Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
GaoQuIncubator
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kimber
GaoQuIncubator
Commits
829119a5
Commit
829119a5
authored
Oct 17, 2024
by
xinzhedeai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
企业孵化首页
parent
3f7285f6
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
135 additions
and
83 deletions
+135
-83
dict.js
src/api/system/dict.js
+9
-1
AppMain.vue
src/layout/components/AppMain.vue
+2
-1
routers.js
src/router/routers.js
+15
-0
enterprise.vue
src/views/system/home/enterprise.vue
+109
-81
No files found.
src/api/system/dict.js
View file @
829119a5
...
@@ -31,4 +31,12 @@ export function edit(data) {
...
@@ -31,4 +31,12 @@ export function edit(data) {
})
})
}
}
export
default
{
add
,
edit
,
del
}
export
function
getCompanyDicts
()
{
return
request
({
url
:
'
api/company/dic
'
,
method
:
'
get
'
})
}
export
default
{
add
,
edit
,
del
,
getCompanyDicts
}
src/layout/components/AppMain.vue
View file @
829119a5
...
@@ -45,7 +45,8 @@ export default {
...
@@ -45,7 +45,8 @@ export default {
display
:flex
;
display
:flex
;
flex-direction
:column
;
flex-direction
:column
;
//padding:.925vh 0;
//padding:.925vh 0;
background-color
:
#00154e
;
// background-color:#00154e;
background-color
:
#fff
;
height
:
100%
;
height
:
100%
;
.common-page
{
margin-top
:
75px
;}
.common-page
{
margin-top
:
75px
;}
box-sizing
:
border-box
;
box-sizing
:
border-box
;
...
...
src/router/routers.js
View file @
829119a5
...
@@ -53,6 +53,21 @@ export const constantRouterMap = [
...
@@ -53,6 +53,21 @@ export const constantRouterMap = [
}
}
]
]
},
},
// {
// path: "/home/enterprise",
// //component: Layout,
// component: HomeLayout,
// redirect: "noredirect",
// hidden:true,
// children: [
// {
// path: "center",
// component: resolve => require(["@/views/system/home/enterprise"], resolve),
// name: "首页-企业",
// meta: { title: "首页", affix:true }
// }
// ]
// },
{
{
path
:
"
/edge/Screen
"
,
path
:
"
/edge/Screen
"
,
component
:
(
resolve
)
=>
{
component
:
(
resolve
)
=>
{
...
...
src/views/system/home/enterprise.vue
View file @
829119a5
...
@@ -27,8 +27,7 @@
...
@@ -27,8 +27,7 @@
style=
"width: 320px"
style=
"width: 320px"
size=
"middle"
size=
"middle"
>
>
<el-option
label=
"区域一"
value=
"shanghai"
></el-option>
<el-option
:label=
"item.name"
:value=
"item.value"
v-for=
"item in companyLevelList"
:key=
"item.name"
></el-option>
<el-option
label=
"区域二"
value=
"beijing"
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"联系人"
>
<el-form-item
label=
"联系人"
>
...
@@ -73,7 +72,7 @@
...
@@ -73,7 +72,7 @@
v-model=
"formInline.address"
v-model=
"formInline.address"
placeholder=
""
placeholder=
""
size=
"small"
size=
"small"
style=
"width: 360px
;
"
style=
"width: 360px"
disabled
disabled
></el-input>
></el-input>
<div
<div
...
@@ -83,7 +82,7 @@
...
@@ -83,7 +82,7 @@
<cu-amap
ref=
"amap"
:options=
"amapOptions()"
/>
<cu-amap
ref=
"amap"
:options=
"amapOptions()"
/>
</div>
</div>
</el-form-item>
</el-form-item>
<el-form-item
style=
"margin-left: 80px
;
"
>
<el-form-item
style=
"margin-left: 80px"
>
<el-upload
<el-upload
class=
"upload-demo"
class=
"upload-demo"
:action=
"`$
{baseAPI}api/file/upload?modelName=incubator`"
:action=
"`$
{baseAPI}api/file/upload?modelName=incubator`"
...
@@ -96,30 +95,40 @@
...
@@ -96,30 +95,40 @@
:on-exceed="handleExceed"
:on-exceed="handleExceed"
:file-list="fileList"
:file-list="fileList"
:show-file-list="false"
:show-file-list="false"
style="margin-bottom: 6px
;
"
style="margin-bottom: 6px"
>
>
<span
style=
"margin-right: 14px"
>
孵化器展示上传
</span>
<span
style=
"margin-right: 14px"
>
孵化器展示上传
</span>
<el-button
size=
"mini"
type=
"default"
>
上传图片
</el-button>
<el-button
size=
"mini"
type=
"default"
>
上传图片
</el-button>
</el-upload>
</el-upload>
<div
:style=
"'width:500px;' + 'height:300px' + ';'"
>
<div
:style=
"'width:500px;' + 'height:300px' + ';'"
>
<div
class=
"imgShowraper"
>
<div
class=
"imgShowraper"
>
<img
:src=
"`$
{baseAPI}file/${formInline.incubatorImage}`" alt="" width="500" height="300px" />
<img
:src=
"`$
{baseAPI}file/${formInline.incubatorImage}`"
alt=""
width="500"
height="300px"
/>
</div>
</div>
</div>
</div>
</el-form-item>
</el-form-item>
<el-row
style=
" display: flex;
<el-row
justify-content: center; margin-top: 60px;"
><el-button
type=
"primary"
size=
"small"
@
click=
"edit"
>
保存修改信息
</el-button></el-row>
style=
"display: flex; justify-content: center; margin-top: 60px"
><el-button
type=
"primary"
size=
"small"
@
click=
"edit"
>
保存修改信息
</el-button
></el-row
>
</el-row>
</el-row>
</el-form>
</el-form>
</div>
</div>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
var
baseAPI
=
var
baseAPI
=
process
.
env
.
NODE_ENV
===
'
development
'
?
process
.
env
.
VUE_APP_LOCAL_API
+
'
/
'
:
(
VUE_APP_API
.
ServiceURL
||
process
.
env
.
VUE_APP_LOCAL_API
)
+
'
/
'
;
process
.
env
.
NODE_ENV
===
"
development
"
?
process
.
env
.
VUE_APP_LOCAL_API
+
"
/
"
:
(
VUE_APP_API
.
ServiceURL
||
process
.
env
.
VUE_APP_LOCAL_API
)
+
"
/
"
;
import
crudHome
from
"
@/api/system/home
"
;
import
crudHome
from
"
@/api/system/home
"
;
import
IconSelect
from
"
@/components/IconSelect
"
;
import
IconSelect
from
"
@/components/IconSelect
"
;
import
Treeselect
from
"
@riophae/vue-treeselect
"
;
import
Treeselect
from
"
@riophae/vue-treeselect
"
;
...
@@ -131,6 +140,9 @@ import crudOperation from "@crud/CRUD.operation";
...
@@ -131,6 +140,9 @@ import crudOperation from "@crud/CRUD.operation";
import
udOperation
from
"
@crud/UD.operation
"
;
import
udOperation
from
"
@crud/UD.operation
"
;
import
DateRangePicker
from
"
@/components/DateRangePicker
"
;
import
DateRangePicker
from
"
@/components/DateRangePicker
"
;
import
dic
from
"
@/api/system/dict
"
;
import
cuAmap
from
"
@/components/AMap
"
;
import
cuAmap
from
"
@/components/AMap
"
;
// crud交由presenter持有
// crud交由presenter持有
...
@@ -171,24 +183,24 @@ export default {
...
@@ -171,24 +183,24 @@ export default {
mixins
:
[
presenter
(),
header
(),
form
(
defaultForm
),
crud
()],
mixins
:
[
presenter
(),
header
(),
form
(
defaultForm
),
crud
()],
data
()
{
data
()
{
return
{
return
{
baseAPI
:
baseAPI
,
baseAPI
:
baseAPI
,
labelPosition
:
"
right
"
,
labelPosition
:
"
right
"
,
fileList
:
[],
fileList
:
[],
cmap
:
null
,
Dict
:
{
selectList
:
[]
},
Dict
:
{
selectList
:
[]
},
formInline
:
{
formInline
:
{
address
:
""
,
address
:
""
,
contactPerson
:
""
,
contactPerson
:
""
,
contactPhone
:
""
,
contactPhone
:
""
,
id
:
''
,
id
:
""
,
incubationArea
:
''
,
incubationArea
:
""
,
incubatorImage
:
''
,
incubatorImage
:
""
,
incubatorLevel
:
''
,
incubatorLevel
:
""
,
incubatorName
:
''
,
incubatorName
:
""
,
latitude
:
''
,
latitude
:
""
,
longitude
:
''
,
longitude
:
""
,
operatingAgency
:
''
,
operatingAgency
:
""
,
totalArea
:
''
,
totalArea
:
""
,
},
},
menus
:
[],
menus
:
[],
...
@@ -206,17 +218,21 @@ export default {
...
@@ -206,17 +218,21 @@ export default {
computed
:
{
computed
:
{
remainingArea
()
{
remainingArea
()
{
return
this
.
formInline
.
totalArea
-
this
.
formInline
.
incubationArea
;
return
this
.
formInline
.
totalArea
-
this
.
formInline
.
incubationArea
;
}
},
},
mounted
(){
},
this
.
getData
()
mounted
()
{
// this.getData();
dic
.
getCompanyDicts
().
then
((
res
)
=>
{
console
.
log
(
res
)
this
.
companyLevelList
=
res
.
body
.
companyLevel
||
[]
});
},
},
methods
:
{
methods
:
{
handleSuccess
(
response
,
file
)
{
handleSuccess
(
response
,
file
)
{
// 处理上传成功
// 处理上传成功
console
.
log
(
'
Upload success:
'
,
response
,
file
);
console
.
log
(
"
Upload success:
"
,
response
,
file
);
this
.
formInline
.
incubatorImage
=
response
.
body
this
.
formInline
.
incubatorImage
=
response
.
body
;
// this.fileList.push(file); // 存储已上传文件
// this.fileList.push(file); // 存储已上传文件
// this.tableData.push({
// this.tableData.push({
// name: file.name,
// name: file.name,
...
@@ -225,10 +241,10 @@ export default {
...
@@ -225,10 +241,10 @@ export default {
},
},
handleError
(
err
,
file
)
{
handleError
(
err
,
file
)
{
// 处理上传错误
// 处理上传错误
console
.
error
(
'
Upload failed:
'
,
err
,
file
);
console
.
error
(
"
Upload failed:
"
,
err
,
file
);
this
.
tableData
.
push
({
this
.
tableData
.
push
({
name
:
file
.
name
,
name
:
file
.
name
,
status
:
'
上传失败
'
,
status
:
"
上传失败
"
,
});
});
},
},
handleRemove
(
file
,
fileList
)
{
handleRemove
(
file
,
fileList
)
{
...
@@ -247,19 +263,9 @@ export default {
...
@@ -247,19 +263,9 @@ export default {
beforeRemove
(
file
,
fileList
)
{
beforeRemove
(
file
,
fileList
)
{
return
this
.
$confirm
(
`确定移除
${
file
.
name
}
?`
);
return
this
.
$confirm
(
`确定移除
${
file
.
name
}
?`
);
},
},
initMap
(
lng
,
lat
){
// var opts = {
// center:[lng || 107.260044, lat || 36.737982],
// showLabel: true,
// pitch: 40,
// zoom: 4,
// mapStyle: 'amap://styles/blue',
// };
var
cmap
=
this
.
$refs
.
amap
.
init
(
amapOptions
());
},
amapOptions
(
cmap
)
{
amapOptions
(
cmap
)
{
var
item
=
this
.
formInline
.
item
,
var
VUE
=
this
;
self
=
this
,
var
self
=
this
,
form
=
this
.
formInline
;
form
=
this
.
formInline
;
return
{
return
{
zoom
:
12
,
zoom
:
12
,
...
@@ -267,7 +273,9 @@ export default {
...
@@ -267,7 +273,9 @@ export default {
//showLabel: true,
//showLabel: true,
//pitch: 40,
//pitch: 40,
onload
:
function
(
cmap
)
{
onload
:
function
(
cmap
)
{
this
.
Dict
.
cmap
=
cmap
;
// debugger
VUE
.
cmap
=
cmap
;
var
center
=
cmap
.
options
.
center
;
var
center
=
cmap
.
options
.
center
;
var
lng
=
form
.
longitude
||
center
[
0
],
var
lng
=
form
.
longitude
||
center
[
0
],
lat
=
form
.
latitude
||
center
[
1
];
lat
=
form
.
latitude
||
center
[
1
];
...
@@ -290,6 +298,8 @@ export default {
...
@@ -290,6 +298,8 @@ export default {
},
},
});
});
}
}
VUE
.
getData
(
function
()
{});
},
},
click
:
function
(
e
,
cmap
)
{
click
:
function
(
e
,
cmap
)
{
var
lnglat
=
e
.
lnglat
;
var
lnglat
=
e
.
lnglat
;
...
@@ -320,21 +330,33 @@ export default {
...
@@ -320,21 +330,33 @@ export default {
onSubmit
()
{
onSubmit
()
{
console
.
log
(
"
submit!
"
);
console
.
log
(
"
submit!
"
);
},
},
edit
(){
edit
()
{
crudHome
.
edit
(
this
.
formInline
).
then
((
res
)
=>
{
crudHome
.
edit
(
this
.
formInline
).
then
((
res
)
=>
{
if
(
res
&&
res
.
code
===
200
)
{
if
(
res
&&
res
.
code
===
200
)
{
this
.
$message
.
warning
(
res
.
msg
)
this
.
$message
.
success
(
'
保存成功
'
);
// res.msg
}
}
});
});
},
},
getData
()
{
getData
(
fn
)
{
crudHome
.
getData
().
then
((
res
)
=>
{
crudHome
.
getData
().
then
((
res
)
=>
{
this
.
formInline
=
res
.
body
this
.
formInline
=
res
.
body
;
this
.
formInline
.
incubatorImage
=
res
.
body
.
incubatorImage
this
.
formInline
.
incubatorImage
=
res
.
body
.
incubatorImage
;
const
lat
=
this
.
formInline
.
latitude
const
lng
=
this
.
formInline
.
longitude
// this.$refs.amap.init(amapOptions());
// this.$refs.amap.init(amapOptions());
const
center
=
[
this
.
formInline
.
lat
,
this
.
formInline
.
lng
];
const
center
=
[
lng
,
lat
];
this
.
$refs
.
amap
.
map
.
setCenter
(
center
);
// setTimeout(() => {
this
.
Dict
.
cmap
.
marker
.
setPosition
(
new
AMap
.
LngLat
(
this
.
formInline
.
lng
,
this
.
formInline
.
lat
));
// 定位中心地址
this
.
$refs
.
amap
.
setCenter
(
center
);
console
.
log
(
"
map
"
,
this
.
cmap
);
// 定位marker设置
this
.
cmap
.
marker
.
setPosition
(
new
AMap
.
LngLat
(
lng
,
lat
)
);
// }, 3000);
console
.
log
();
fn
&&
fn
()
});
});
},
},
// 选中图标
// 选中图标
...
@@ -345,11 +367,14 @@ export default {
...
@@ -345,11 +367,14 @@ export default {
};
};
</
script
>
</
script
>
<
style
>
<
style
>
.app-main
{
/*
.app-main {
background-color: #fff !important;
background-color: #fff !important;
}
}
*/
</
style
>
</
style
>
<
style
rel=
"stylesheet/scss"
lang=
"scss"
scoped
>
<
style
rel=
"stylesheet/scss"
lang=
"scss"
scoped
>
.app-container
{
background-color
:
#f5f6fb
;
}
.header
{
.header
{
background
:
#f5f6fb
;
background
:
#f5f6fb
;
height
:
52px
;
height
:
52px
;
...
@@ -363,7 +388,7 @@ export default {
...
@@ -363,7 +388,7 @@ export default {
display
:
block
;
display
:
block
;
background
:
no-repeat
top
left
url("~@/assets/images/iconNew/icon1.png")
;
background
:
no-repeat
top
left
url("~@/assets/images/iconNew/icon1.png")
;
position
:
absolute
;
position
:
absolute
;
top
:
25
px
;
top
:
32
px
;
left
:
28px
;
left
:
28px
;
height
:
100%
;
height
:
100%
;
width
:
1
.58rem
;
width
:
1
.58rem
;
...
@@ -371,7 +396,7 @@ export default {
...
@@ -371,7 +396,7 @@ export default {
}
}
}
}
.body
{
.body
{
background-color
:
#fff
;
.title
{
.title
{
color
:
#1890ff
;
color
:
#1890ff
;
height
:
48px
;
height
:
48px
;
...
@@ -391,7 +416,10 @@ export default {
...
@@ -391,7 +416,10 @@ export default {
}
}
}
}
}
}
::v-deep
.el-input__inner
{
::v-deep
.el-input
{
width
:
320px
;
}
::v-deep
.el-input__inner
{
height
:
38px
;
height
:
38px
;
}
}
::v-deep
.el-input-number
.el-input__inner
{
::v-deep
.el-input-number
.el-input__inner
{
...
...
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