Skip to content
项目
群组
代码片段
帮助
正在加载...
登录/注册
切换导航
广
广东建设用地-前端
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
广东建设用地
广东建设用地-前端
Commits
75cde285
提交
75cde285
authored
1月 22, 2024
作者:
wqq
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
一张图调试样式
上级
90e8105d
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
216 行增加
和
5 行删除
+216
-5
utilsDramAdmin.js
src/utils/utilsDramAdmin.js
+10
-2
index.vue
src/views/dashboard/OnePic/index.vue
+3
-3
index1.vue
src/views/dashboard/OnePic/index1.vue
+203
-0
没有找到文件。
src/utils/utilsDramAdmin.js
浏览文件 @
75cde285
...
@@ -20,10 +20,18 @@ export function useIndex(appRef,W,H) {
...
@@ -20,10 +20,18 @@ export function useIndex(appRef,W,H) {
const
currentRate
=
parseFloat
((
window
.
innerWidth
/
window
.
innerHeight
).
toFixed
(
5
));
const
currentRate
=
parseFloat
((
window
.
innerWidth
/
window
.
innerHeight
).
toFixed
(
5
));
if
(
appRef
)
{
if
(
appRef
)
{
if
(
currentRate
>
baseProportion
)
{
if
(
currentRate
>
baseProportion
)
{
// 表示更宽
// 表示更宽
// scale.width = ((window.innerHeight * baseProportion) / baseWidth).toFixed(5);
if
(
window
.
innerWidth
==
1920
)
{
scale
.
width
=
1
//宽度还是1的比例不改变
scale
.
width
=
1
}
else
if
(
window
.
innerWidth
==
2560
)
{
scale
.
width
=
1.333
}
else
{
scale
.
width
=
((
window
.
innerHeight
*
baseProportion
)
/
baseWidth
).
toFixed
(
5
);
}
scale
.
height
=
(
window
.
innerHeight
/
baseHeight
).
toFixed
(
5
);
scale
.
height
=
(
window
.
innerHeight
/
baseHeight
).
toFixed
(
5
);
// scale.width = 1;
appRef
.
style
.
transform
=
`scale(
${
scale
.
width
}
,
${
scale
.
height
}
) translate(-50%, -50%)`
appRef
.
style
.
transform
=
`scale(
${
scale
.
width
}
,
${
scale
.
height
}
) translate(-50%, -50%)`
}
else
{
}
else
{
// 表示更高
// 表示更高
...
...
src/views/dashboard/OnePic/index.vue
浏览文件 @
75cde285
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
"
"
>
{{
time
}}
>
{{
time
}}
</span>
</span>
<
span
class=
"fullbtn ml-4 w-15 h-7 leading-6 cursor-pointer"
@
click=
"FullScreen"
>
{{
!
full_Screen
?
'全屏'
:
'退出'
}}
</span
>
<
!--
<span
class=
"fullbtn ml-4 w-15 h-7 leading-6 cursor-pointer"
@
click=
"FullScreen"
>
{{
!
full_Screen
?
'全屏'
:
'退出'
}}
</span>
--
>
</div>
</div>
</div>
</div>
<div
class=
"flex w-full"
>
<div
class=
"flex w-full"
>
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
<Region
@
changes=
"change"
/>
<Region
@
changes=
"change"
/>
<Industry
class=
"mt-5"
v-if=
"show"
:curnt=
"curnt"
/>
<Industry
class=
"mt-5"
v-if=
"show"
:curnt=
"curnt"
/>
<!--
<Soil
class=
"mt-10"
/>
<!--
<Soil
class=
"mt-10"
/>
<Water
class=
"mt-10"
/>
-->
<Water
class=
"mt-10"
/>
-->
</div>
</div>
<div
class=
"w-3/7"
>
<div
class=
"w-3/7"
>
<Map
/>
<Map
/>
...
@@ -172,7 +172,7 @@
...
@@ -172,7 +172,7 @@
transform-origin: 0 0;
transform-origin: 0 0;
position: absolute;
position: absolute;
left: 50%;
left: 50%;
top:
50
%;
top:
49
%;
// transition: 0.3s;
// transition: 0.3s;
background: url('@/assets/images/onePic/zhezhao_bg@2x.png') no-repeat;
background: url('@/assets/images/onePic/zhezhao_bg@2x.png') no-repeat;
background-size: 100% 100%;
background-size: 100% 100%;
...
...
src/views/dashboard/OnePic/index1.vue
0 → 100644
浏览文件 @
75cde285
<
template
>
<div
class=
"onepic text-#fff"
ref=
"appRef"
>
<div
class=
"h-22 text-center titleBg grid grid-cols-3"
>
<div
class=
"text-[#00C9D8] grid grid-cols-3"
>
<span></span>
<div>
<img
:src=
"filterWeather(dataWwather?.text)"
/>
<span
class=
"mx-2"
>
{{
dataWwather
?.
text
}}
</span>
<span>
{{
dataWwather
?.
temp
}}
℃
</span>
</div>
<span></span>
</div>
<div
class=
"text-3xl mt-5"
>
广东省建设用地污染地块信息系统
</div>
<div
class=
"grid grid-cols-4 mt-5"
>
<span></span>
<span
class=
"text-[#00C9D8] text-base"
>
{{
date
}}
星期
{{
week
}}
</span>
<span
class=
"text-[#D8F0FF] text-2xl xf"
style=
"
text-shadow:
0px 0px 10px #00c9d8,
0px 0px 4px #00c9d8;
"
>
{{
time
}}
</span>
<span
class=
"fullbtn ml-4 w-15 h-7 leading-6 cursor-pointer"
@
click=
"FullScreen"
>
{{
!
full_Screen
?
'全屏'
:
'退出'
}}
</span>
</div>
</div>
<div
class=
"flex w-full"
>
<div
class=
"w-2/7"
>
<Region
@
changes=
"change"
/>
<Industry
class=
"mt-5"
v-if=
"show"
:curnt=
"curnt"
/>
<!--
<Soil
class=
"mt-10"
/>
<Water
class=
"mt-10"
/>
-->
</div>
<div
class=
"w-3/7"
>
<Map
/>
<Soil
class=
"mt-2"
/>
</div>
<div
class=
"w-2/7 ml-3"
>
<DkNum
/>
<Fxgkxf
class=
"mt-5"
/>
<FxpgNum
class=
"mt-5"
/>
</div>
</div>
</div>
</
template
>
<
script
setup
lang=
"ts"
>
import
{
ref
,
onMounted
}
from
'vue'
;
import
{
useIndex
}
from
'@/utils/utilsDramAdmin'
;
import
{
getAction
}
from
'@/api/mange'
;
import
dayjs
from
'dayjs'
;
import
Region
from
'./components/region.vue'
;
import
Industry
from
'./components/industry.vue'
;
// import Water from './components/water.vue';
// 右侧
import
DkNum
from
'./components/DkNum.vue'
;
import
FxpgNum
from
'./components/FxpgNum.vue'
;
import
Fxgkxf
from
'./components/Fxgkxf.vue'
;
//中间
import
Map
from
'./components/map/index.vue'
;
import
Soil
from
'./components/soil.vue'
;
import
img1
from
'@/assets/images/onePic/qing.png'
;
import
img2
from
'@/assets/images/onePic/yin.png'
;
import
img3
from
'@/assets/images/onePic/lei.png'
;
import
img4
from
'@/assets/images/onePic/xue.png'
;
import
img5
from
'@/assets/images/onePic/yu.png'
;
import
img6
from
'@/assets/images/onePic/yun.png'
;
import
img7
from
'@/assets/images/onePic/wu.png'
;
import
img8
from
'@/assets/images/onePic/shachen.png'
;
import
img9
from
'@/assets/images/onePic/qing.png'
;
const
appRef
=
ref
<
any
>
();
const
date
=
ref
(
'2014.01.18'
);
const
week
=
ref
(
'星期四'
);
const
time
=
ref
(
'10:49:59'
);
const
dataWwather
=
ref
({
text
:
''
,
temp
:
''
});
const
full_Screen
=
ref
(
false
);
const
curnt
=
ref
(
0
);
const
show
=
ref
(
true
);
function
getTime
()
{
date
.
value
=
dayjs
().
format
(
'YYYY-MM-DD'
);
week
.
value
=
dayjs
().
format
(
'dd'
);
time
.
value
=
dayjs
().
format
(
'HH:mm:ss'
);
}
setInterval
(()
=>
{
getTime
();
},
1000
);
function
filterWeather
(
val
)
{
if
(
val
==
'晴'
)
{
return
img1
;
}
else
if
(
val
==
'阴'
)
{
return
img2
;
}
else
if
(
/雷/
.
test
(
val
))
{
return
img3
;
}
else
if
(
/雪/
.
test
(
val
))
{
return
img4
;
}
else
if
(
/雨/
.
test
(
val
))
{
return
img5
;
}
else
if
(
/云/
.
test
(
val
))
{
return
img6
;
}
else
if
(
/雾/
.
test
(
val
))
{
return
img7
;
}
else
if
(
/沙/
.
test
(
val
))
{
return
img8
;
}
else
{
return
img9
;
}
}
function
getTianQi
()
{
getAction
(
'https://devapi.qweather.com/v7/weather/now'
,
{
location
:
'101280101'
,
// 郑州市id
key
:
'0a4535e4dffe4a6190e6432dde78899d'
,
}).
then
((
res
:
any
)
=>
{
console
.
log
(
res
,
'res'
);
dataWwather
.
value
=
res
.
data
.
now
;
});
}
getTianQi
();
const
setScale
=
()
=>
{
const
{
calcRate
,
windowDraw
}
=
useIndex
(
appRef
.
value
,
1920
,
1080
);
calcRate
();
windowDraw
();
};
// 测试的自适应高度
onMounted
(()
=>
{
setScale
();
});
function
FullScreen
()
{
const
element
=
appRef
.
value
;
if
(
document
.
fullscreenElement
)
{
full_Screen
.
value
=
false
;
document
.
exitFullscreen
();
// 如果已经处于全屏状态,则退出全屏模式
}
else
{
full_Screen
.
value
=
true
;
if
(
element
?.
requestFullscreen
)
{
element
.
requestFullscreen
();
}
else
if
(
element
?.
mozRequestFullScreen
)
{
/* Firefox */
element
.
mozRequestFullScreen
();
}
else
if
(
element
?.
webkitRequestFullscreen
)
{
/* Chrome、Safari 和 Opera */
element
?.
webkitRequestFullscreen
();
}
else
if
(
element
?.
msRequestFullscreen
)
{
/* IE/Edge */
element
?.
msRequestFullscreen
();
}
}
}
function
change
(
v
)
{
curnt
.
value
=
v
;
show
.
value
=
false
;
setTimeout
(()
=>
{
show
.
value
=
true
;
},
100
);
}
</
script
>
<
style
lang=
"less"
scoped
>
.onepic {
overflow: hidden;
width: 1920px;
height: 1019px;
transform: scale(var(--scale)) translate(-50%, -50%);
transform-origin: 0 0;
position: absolute;
left: 50%;
top: 50%;
// transition: 0.3s;
background: url('@/assets/images/onePic/zhezhao_bg@2x.png') no-repeat;
background-size: 100% 100%;
background-position: center;
background-color: #020711;
.titleBg {
background: url('@/assets/images/onePic/titleBg.png') no-repeat;
background-size: 100% 100%;
background-position: center;
}
.fullbtn {
background: linear-gradient(180deg, rgba(15, 74, 159, 0) 0%, #00c9d8 100%);
border-radius: 0px 0px 0px 0px;
border: 1px solid rgba(30, 123, 214, 0.8);
font-size: 12px !important;
}
}
@font-face {
font-family: 'zcool-gdh-Medium';
src: url('/@/assets/font/zcoo.TTF');
}
.xf {
font-family: 'zcool-gdh-Medium';
}
//
</
style
>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论