Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
huarun-binjiang-ipad
/
ipad
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
181d93fc
authored
Oct 23, 2021
by
liuwange1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测试通讯
parent
b40b4441
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
58 additions
and
12 deletions
+58
-12
public/index.html
+0
-1
src/App.vue
+9
-7
src/store/index.js
+4
-0
src/views/xiaofang.vue
+45
-4
No files found.
public/index.html
View file @
181d93fc
...
@@ -9,7 +9,6 @@
...
@@ -9,7 +9,6 @@
<title>
<title>
<
%=
htmlWebpackPlugin
.
options
.
title
%
>
<
%=
htmlWebpackPlugin
.
options
.
title
%
>
</title>
</title>
<script
src=
"https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.min.js"
></script>
</head>
</head>
<body>
<body>
...
...
src/App.vue
View file @
181d93fc
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"right"
>
<div
class=
"right"
v-if=
"showRight"
>
<router-view
/>
<router-view
/>
</div>
</div>
</main>
</main>
...
@@ -126,13 +126,11 @@ export default {
...
@@ -126,13 +126,11 @@ export default {
activeIndex
:
0
,
activeIndex
:
0
,
pageY
:
0
,
pageY
:
0
,
top
:
"90vh"
,
top
:
"90vh"
,
showRight
:
false
,
};
};
},
},
created
()
{
created
()
{
this
.
$axios
.
get
(
"/smartOperation/workOrderList"
).
then
((
e
)
=>
{
this
.
getBuildListData
();
console
.
log
(
e
);
console
.
log
(
JSON
.
stringify
(
e
.
data
[
0
]));
});
// this.$axios.get("/building/getBuildingList").then((e) => {
// this.$axios.get("/building/getBuildingList").then((e) => {
// console.log(e);
// console.log(e);
// });
// });
...
@@ -154,6 +152,12 @@ export default {
...
@@ -154,6 +152,12 @@ export default {
// });
// });
},
},
methods
:
{
methods
:
{
getBuildListData
()
{
this
.
$axios
.
get
(
"/building/getBuildingList"
).
then
((
e
)
=>
{
this
.
$store
.
commit
(
"setBuildList"
,
e
.
data
);
this
.
showRight
=
true
;
});
},
getLeftDistance
(
index
)
{
getLeftDistance
(
index
)
{
if
(
index
<=
2
)
{
if
(
index
<=
2
)
{
return
index
*
10
;
return
index
*
10
;
...
@@ -201,9 +205,7 @@ export default {
...
@@ -201,9 +205,7 @@ export default {
// 总时长 300ms
// 总时长 300ms
// let time1 = time || 300;
// let time1 = time || 300;
let
sp
=
(
newTop
-
oldTop
)
/
count
;
let
sp
=
(
newTop
-
oldTop
)
/
count
;
console
.
log
(
"sp: "
,
sp
);
let
timer
=
setInterval
(()
=>
{
let
timer
=
setInterval
(()
=>
{
console
.
log
(
this
.
top
);
this
.
top
=
Number
(
this
.
top
.
replace
(
"px"
,
""
))
+
Number
(
sp
)
+
"px"
;
this
.
top
=
Number
(
this
.
top
.
replace
(
"px"
,
""
))
+
Number
(
sp
)
+
"px"
;
count
--
;
count
--
;
if
(
count
==
0
)
{
if
(
count
==
0
)
{
...
...
src/store/index.js
View file @
181d93fc
...
@@ -5,8 +5,12 @@ Vue.use(Vuex)
...
@@ -5,8 +5,12 @@ Vue.use(Vuex)
export
default
new
Vuex
.
Store
({
export
default
new
Vuex
.
Store
({
state
:
{
state
:
{
buildList
:
[]
},
},
mutations
:
{
mutations
:
{
setBuildList
(
state
,
data
)
{
state
.
buildList
=
data
}
},
},
actions
:
{
actions
:
{
},
},
...
...
src/views/xiaofang.vue
View file @
181d93fc
...
@@ -10,8 +10,14 @@
...
@@ -10,8 +10,14 @@
<div
class=
"select-item select-left"
>
<div
class=
"select-item select-left"
>
<div
class=
"select-title"
>
楼栋
</div>
<div
class=
"select-title"
>
楼栋
</div>
<div
class=
"select-options"
>
<div
class=
"select-options"
>
<gaojing
v-for=
"item in 10"
:key=
"item"
:number=
"4"
>
<gaojing
v-for=
"(item, index) in listL"
:key=
"index"
>
<div
class=
"btn1"
>
{{
item
}}
</div>
<div
class=
"btn1"
:class=
"
{ active: activeIndex == index }"
@click="buildClickHandle(index)"
>
{{
item
.
buildingName
}}
</div>
</gaojing>
</gaojing>
</div>
</div>
</div>
</div>
...
@@ -19,7 +25,13 @@
...
@@ -19,7 +25,13 @@
<div
class=
"select-item select-right"
>
<div
class=
"select-item select-right"
>
<div
class=
"select-title"
>
楼层
</div>
<div
class=
"select-title"
>
楼层
</div>
<div
class=
"select-options"
>
<div
class=
"select-options"
>
<div
class=
"btn2"
v-for=
"item in 10"
:key=
"item"
>
{{
item
}}
</div>
<div
class=
"btn2"
v-for=
"(item, index) in listR"
:key=
"index + 'a'"
>
{{
item
.
name
}}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -55,7 +67,36 @@ export default {
...
@@ -55,7 +67,36 @@ export default {
name
:
"xiaofang"
,
name
:
"xiaofang"
,
components
:
{
gaojing
},
components
:
{
gaojing
},
data
()
{
data
()
{
return
{};
return
{
listL
:
[],
listR
:
[],
activeIndex
:
0
,
};
},
created
()
{
this
.
init
();
},
methods
:
{
init
()
{
let
buildList
=
this
.
$store
.
state
.
buildList
;
buildList
.
unshift
({
buildingName
:
"全部楼栋"
,
});
this
.
listL
=
buildList
;
},
buildClickHandle
(
index
)
{
this
.
activeIndex
=
index
;
this
.
$axios
.
post
(
"/osc/sendInt"
,
{
arg
:
1
,
name
:
"/EZ_XF"
,
});
},
},
watch
:
{
activeIndex
(
n
)
{
console
.
log
(
n
);
this
.
listR
=
this
.
listL
[
n
].
subList
||
[];
},
},
},
};
};
</
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