Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
rongtong-app
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
融通安全管理系统
rongtong-app
Commits
2f1305e4
Commit
2f1305e4
authored
Jul 08, 2023
by
dlkong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
房间创建提交校验
parent
37e23fbf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
11 deletions
+22
-11
src/views/drawCanvas/riskView.vue
src/views/drawCanvas/riskView.vue
+20
-10
vue.config.js
vue.config.js
+2
-1
No files found.
src/views/drawCanvas/riskView.vue
View file @
2f1305e4
...
...
@@ -4,8 +4,8 @@
<header
class=
"header"
>
<span
@
click=
"close"
class=
"iconLeft"
>
关闭
</span>
<span>
{{
text
}}
</span>
<span
@
click=
"confim"
class=
"iconRight"
v-show=
"!isView"
>
确定
</span>
<span
class=
"iconRight"
v-show=
"isView"
></span>
<span
@
click=
"confim"
class=
"iconRight"
v-show=
"!isView
s
"
>
确定
</span>
<span
class=
"iconRight"
v-show=
"isView
s
"
></span>
</header>
</van-sticky>
<grid-layout
:layout.sync=
"layout"
...
...
@@ -35,8 +35,8 @@
</grid-item>
</grid-layout>
<div
class=
"setBtns"
>
<van-button
@
click=
"addItem"
type=
"info"
size=
"mini"
v-if=
"!isView"
>
添加房间
</van-button>
<van-grid
direction=
"horizontal"
:column-num=
"2"
class=
"footer"
v-if=
"isView"
>
<van-button
@
click=
"addItem"
type=
"info"
size=
"mini"
v-if=
"!isView
s
"
>
添加房间
</van-button>
<van-grid
direction=
"horizontal"
:column-num=
"2"
class=
"footer"
v-if=
"isView
s
"
>
风险等级图例:
<span
class=
"riskTab type1"
></span>
重大风险
<span
class=
"riskTab type2"
></span>
较大风险
...
...
@@ -101,12 +101,12 @@ export default {
roomName
:
''
,
columns
:
[
'
办公
'
,
'
餐饮
'
,
'
住宅
'
,
'
超市
'
],
colorList
:[
'
#FF4433
'
,
'
#FF9800
'
,
'
#FFFF00
'
,
'
#0091EA
'
],
isView
:
false
,
// true:查看页面; false: 添加页面
isView
s
:
false
,
// true:查看页面; false: 添加页面
showHeader
:
true
}
},
props
:{
isView
s
:
{
isView
:
{
type
:
Boolean
,
default
:
false
,
},
...
...
@@ -117,13 +117,13 @@ export default {
// this.rotateBox();
this
.
initRotate
();
});
if
(
this
.
_props
.
isView
s
)
{
if
(
this
.
_props
.
isView
)
{
console
.
log
(
'
作为组件传值==>>
'
,)
this
.
isView
=
true
this
.
isView
s
=
true
this
.
showHeader
=
false
}
if
(
this
.
$route
.
params
.
isView
)
{
this
.
isView
=
true
this
.
isView
s
=
true
}
this
.
getRoomInfo
()
window
.
addEventListener
(
"
onorientationchange
"
in
window
?
"
orientationchange
"
:
"
resize
"
,
this
.
orientationChange
,
false
);
...
...
@@ -208,7 +208,7 @@ export default {
item
.
position
.
i
=
item
.
id
item
.
position
.
isDraggable
=
false
item
.
position
.
isResizable
=
false
if
(
!
this
.
isView
)
{
//添加页面不显示颜色
if
(
!
this
.
isView
s
)
{
//添加页面不显示颜色
item
.
position
.
c
=
'
#eee
'
}
else
{
item
.
position
.
c
=
this
.
colorList
[
Math
.
floor
(
Math
.
random
()
*
4
)]
...
...
@@ -269,6 +269,14 @@ export default {
},
// 确定 保存房间信息
confim
(){
if
(
this
.
roomName
==
''
)
{
Toast
.
fail
({
title
:
'
提示
'
,
forbidClick
:
true
,
message
:
'
请先添加房间!
'
,
})
return
}
let
data
=
{
floorId
:
this
.
$route
.
params
.
floorId
?
this
.
$route
.
params
.
floorId
:
'
18
'
,
name
:
this
.
roomName
,
...
...
@@ -279,6 +287,8 @@ export default {
if
(
res
.
code
==
200
)
{
Toast
.
success
(
'
提交成功
'
);
this
.
getRoomInfo
()
this
.
roomType
=
''
this
.
roomName
=
''
}
}).
catch
((
err
)
=>
{
console
.
log
(
'
err==>>
'
,
err
)
...
...
vue.config.js
View file @
2f1305e4
...
...
@@ -8,9 +8,10 @@ module.exports = {
//以上的ip和端口是我们本机的;下面为需要跨域的
proxy
:
{
//配置跨域
'
/app-api
'
:
{
target
:
'
http://192.168.4.232:8080/
'
,
//这里是后台的地址
//
target: 'http://192.168.4.232:8080/', //这里是后台的地址
// target: 'http://192.168.15.124:8080/', //这里是杨帆的地址
// target: 'http://192.168.10.137:8080/', //这里是昊哥的地址
target
:
'
http://192.168.10.36:8080/
'
,
//这里是昊哥的地址
// target: 'http://localhost:8080/', //这里是后台的地址
ws
:
true
,
changOrigin
:
true
,
//允许跨域
...
...
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