update:更新格式化配置

This commit is contained in:
zk
2023-11-27 10:38:51 +08:00
parent 29cd60a2f2
commit 6a2d442c79
19 changed files with 53948 additions and 202408 deletions
+5 -3
View File
@@ -1,6 +1,7 @@
// @ts-check // @ts-check
const { defineConfig } = require('eslint-define-config'); import {defineConfig} from 'eslint-define-config'
module.exports = defineConfig({ // const {defineConfig} = require('eslint-define-config');
export default {
root: true, root: true,
env: { env: {
browser: true, browser: true,
@@ -25,6 +26,7 @@ module.exports = defineConfig({
'plugin:jest/recommended', 'plugin:jest/recommended',
], ],
rules: { rules: {
'prettier/prettier': 'error',
'vue/script-setup-uses-vars': 'error', 'vue/script-setup-uses-vars': 'error',
'@typescript-eslint/ban-ts-ignore': 'off', '@typescript-eslint/ban-ts-ignore': 'off',
'@typescript-eslint/explicit-function-return-type': 'off', '@typescript-eslint/explicit-function-return-type': 'off',
@@ -75,4 +77,4 @@ module.exports = defineConfig({
}, },
], ],
}, },
}); }
+8 -1
View File
@@ -4,7 +4,14 @@
<meta charset="UTF-8"/> <meta charset="UTF-8"/>
<link rel="icon" type="image/svg+xml" href="/vite.svg"/> <link rel="icon" type="image/svg+xml" href="/vite.svg"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>Vite + Vue + TS</title> <title>应急就医服务中心</title>
<!-- 全局配置 -->
<script>
window._CONFIG = {};
window._AMapSecurityConfig = {
securityJsCode: "1b3b86585c863d22db1e7f7636a9e495",
}
</script>
</head> </head>
<style> <style>
html, body, #app { html, body, #app {
+1
View File
@@ -14,6 +14,7 @@
"path": "^0.12.7", "path": "^0.12.7",
"prettier": "^3.1.0", "prettier": "^3.1.0",
"vue": "^3.3.4", "vue": "^3.3.4",
"@amap/amap-jsapi-loader": "^1.0.1",
"vue-seamless-scroll": "^1.1.23", "vue-seamless-scroll": "^1.1.23",
"vue3-seamless-scroll": "^2.0.1" "vue3-seamless-scroll": "^2.0.1"
}, },
+1 -1
View File
@@ -1,4 +1,4 @@
module.exports = { export default {
printWidth: 150, printWidth: 150,
tabWidth: 4, tabWidth: 4,
useTabs: false, useTabs: false,
+4 -6
View File
@@ -1,11 +1,9 @@
<script setup lang="ts"> <script setup lang="ts">
import index from './views/index.vue' import index from './views/index.vue';
</script> </script>
<template> <template>
<index/> <index />
</template> </template>
<style lang="less" src="./assets/less/index.less"> <style lang="less" src="./assets/less/index.less"></style>
</style> <style lang="less" scoped></style>
<style lang="less" scoped>
</style>
+39 -39
View File
@@ -1,51 +1,51 @@
.type-time { .type-time {
text-align: right; text-align: right;
padding-right: 4%; padding-right: 4%;
padding-top: 5%; padding-top: 5%;
font-size: 18px; font-size: 18px;
span { span {
padding: 0 2%; padding: 0 2%;
cursor: pointer; cursor: pointer;
}
.select {
color: #45A2FF;
position: relative;
&:after {
content: '';
position: absolute;
display: block;
width: 70%;
left: 8px;
bottom: -14px;
height: 8px;
background: url("../images/light.png") no-repeat;
background-size: 100% 100%;
} }
}
.unSelect { .select {
color: #A3A4A4; color: #45a2ff;
} position: relative;
&:after {
content: '';
position: absolute;
display: block;
width: 70%;
left: 8px;
bottom: -14px;
height: 8px;
background: url('../images/light.png') no-repeat;
background-size: 100% 100%;
}
}
.unSelect {
color: #a3a4a4;
}
} }
*::-webkit-scrollbar { *::-webkit-scrollbar {
width: 12px; width: 12px;
height: 12px; height: 12px;
} }
*::-webkit-scrollbar-button { *::-webkit-scrollbar-button {
width: 0; width: 0;
height: 0; height: 0;
display: none; display: none;
} }
*::-webkit-scrollbar-corner { *::-webkit-scrollbar-corner {
background-color: transparent; background-color: transparent;
} }
*::-webkit-scrollbar-thumb { *::-webkit-scrollbar-thumb {
border: 4px solid rgba(0, 0, 0, 0); border: 4px solid rgba(0, 0, 0, 0);
height: 6px; height: 6px;
border-radius: 25px; border-radius: 25px;
background-clip: padding-box; background-clip: padding-box;
background-color: rgba(0, 0, 0, 0.30); background-color: rgba(0, 0, 0, 0.3);
} }
+82 -75
View File
@@ -1,88 +1,95 @@
<template> <template>
<div> <div>
<public-title title="服务详情数据"/> <public-title title="服务详情数据" />
<div class="inner"> <div class="inner">
<div class="type-time"> <div class="type-time">
<span :class="selectIndex===index?'select':'unSelect'" v-for="(item,index) in typeTime" :key="index" @click="handleSelect(index)">{{item.name}}</span> <span
</div> :class="selectIndex === index ? 'select' : 'unSelect'"
<div class="server-container"> v-for="(item, index) in typeTime"
<div class="server-item" v-for="(item,index) in dataLists" :key="index"> :key="index"
<span>{{item.title}}</span> @click="handleSelect(index)"
<span>{{item.iphone}}</span> >{{ item.name }}</span
>
</div>
<div class="server-container">
<div class="server-item" v-for="(item, index) in dataLists" :key="index">
<span>{{ item.title }}</span>
<span>{{ item.iphone }}</span>
</div>
</div> </div>
</div>
</div> </div>
</div> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref } from 'vue'; import { ref } from 'vue';
import PublicTitle from "../publicTitle.vue"; import PublicTitle from '../publicTitle.vue';
const typeTime = ref([ const typeTime = ref([
{ {
name:'全部', name: '全部',
value:'all', value: 'all',
},{ },
name:'本年', {
value:'year', name: '本年',
}, value: 'year',
{ },
name:'本月', {
value:'month', name: '本月',
}, value: 'month',
{ },
name:'本周', {
value:'week', name: '本周',
} value: 'week',
]) },
const dataLists = ref([ ]);
{ const dataLists = ref([
title:'最新呼入电话', {
iphone:'18394578789' title: '最新呼入电话',
}, iphone: '18394578789',
{ },
title:'最新呼入电话', {
iphone:'18394578789' title: '最新呼入电话',
}, iphone: '18394578789',
{ },
title:'最新呼入电话', {
iphone:'18394578789' title: '最新呼入电话',
}, iphone: '18394578789',
{ },
title:'最新呼入电话', {
iphone:'18394578789' title: '最新呼入电话',
}, iphone: '18394578789',
]) },
const selectIndex = ref(0) ]);
const selectIndex = ref(0);
function handleSelect(index:number){ function handleSelect(index: number) {
selectIndex.value = index; selectIndex.value = index;
} }
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
.inner { .inner {
height: calc(100% - 40px); height: calc(100% - 40px);
.server-container{ .server-container {
color: #A3A4A4; color: #a3a4a4;
padding-top: 4%; padding-top: 4%;
height: 88%; height: 88%;
display: grid; display: grid;
align-items: start; align-items: start;
.server-item{ .server-item {
font-size: 18px; font-size: 18px;
span{ span {
display: inline-block; display: inline-block;
width: 50%; width: 50%;
font-weight: bold; font-weight: bold;
}
span:nth-child(1) {
text-align: left;
padding-left: 5%;
}
span:nth-child(2) {
text-align: right;
padding-right: 6%;
}
}
} }
span:nth-child(1){
text-align: left;
padding-left: 5%;
}
span:nth-child(2){
text-align: right;
padding-right: 6%;
}
}
} }
} </style>
</style>
+96 -85
View File
@@ -1,98 +1,109 @@
<template> <template>
<div> <div>
<public-title title="体检数据"/> <public-title title="体检数据" />
<div class="inner"> <div class="inner">
<div class="type-time"> <div class="type-time">
<span :class="selectIndex===index?'select':'unSelect'" v-for="(item,index) in typeTime" :key="index" @click="handleSelect(index)">{{item.name}}</span> <span
</div> :class="selectIndex === index ? 'select' : 'unSelect'"
<div class="physical-container"> v-for="(item, index) in typeTime"
<div class="physical-item"> :key="index"
<span>10444</span> @click="handleSelect(index)"
<span>兴隆圆医院</span> >{{ item.name }}</span
>
</div> </div>
<div class="physical-item"> <div class="physical-container">
<span>144</span> <div class="physical-item">
<span>兴隆圆医院</span> <span>10444</span>
<span>兴隆圆医院</span>
</div>
<div class="physical-item">
<span>144</span>
<span>兴隆圆医院</span>
</div>
<div class="physical-item">
<span>344</span>
<span>兴隆圆医院</span>
</div>
<div class="physical-item">
<span>144</span>
<span>兴隆圆医院</span>
</div>
<div class="physical-item">
<span>144</span>
<span>兴隆圆医院</span>
</div>
<div class="physical-item">
<span>144</span>
<span>延安</span>
</div>
</div> </div>
<div class="physical-item">
<span>344</span>
<span>兴隆圆医院</span>
</div>
<div class="physical-item">
<span>144</span>
<span>兴隆圆医院</span>
</div>
<div class="physical-item">
<span>144</span>
<span>兴隆圆医院</span>
</div>
<div class="physical-item">
<span>144</span>
<span>延安</span>
</div>
</div>
</div> </div>
</div> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref } from 'vue'; import { ref } from 'vue';
import PublicTitle from "../publicTitle.vue"; import PublicTitle from '../publicTitle.vue';
const typeTime = ref([ const typeTime = ref([
{ {
name:'全部', name: '全部',
value:'all', value: 'all',
},{ },
name:'本年', {
value:'year', name: '本年',
}, value: 'year',
{ },
name:'本月', {
value:'month', name: '本月',
}, value: 'month',
{ },
name:'本周', {
value:'week', name: '本周',
} value: 'week',
]) },
const physical = ref(); ]);
const selectIndex = ref(0) const physical = ref();
function handleSelect(index:number){ const selectIndex = ref(0);
selectIndex.value = index; function handleSelect(index: number) {
} selectIndex.value = index;
}
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
.inner { .inner {
height: calc(100% - 40px); height: calc(100% - 40px);
.physical-container{ .physical-container {
width: 96%; width: 96%;
height: 92%; height: 92%;
padding-top: 2%; padding-top: 2%;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
align-content: space-around; align-content: space-around;
.physical-item{ .physical-item {
width: 33%; width: 33%;
height: 46%; height: 46%;
color: #FFFFFF; color: #ffffff;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
span:nth-child(1){ span:nth-child(1) {
font-size: 28px; font-size: 28px;
font-weight: bold; font-weight: bold;
}
span:nth-child(2) {
padding-top: 6%;
font-size: 22px;
}
}
.physical-item:nth-child(1),
.physical-item:nth-child(2),
.physical-item:nth-child(3) {
background: url('../../assets/images/physical-top.png') no-repeat;
background-size: 100% 100%;
}
.physical-item:nth-child(4),
.physical-item:nth-child(5),
.physical-item:nth-child(6) {
background: url('../../assets/images/physical-bottom.png') no-repeat;
background-size: 100% 100%;
}
} }
span:nth-child(2){
padding-top: 6%;
font-size: 22px;
}
}
.physical-item:nth-child(1),.physical-item:nth-child(2),.physical-item:nth-child(3){
background: url("../../assets/images/physical-top.png") no-repeat;
background-size: 100% 100%;
}
.physical-item:nth-child(4),.physical-item:nth-child(5),.physical-item:nth-child(6){
background: url("../../assets/images/physical-bottom.png") no-repeat;
background-size: 100% 100%;
}
} }
} </style>
</style>
+91 -87
View File
@@ -1,99 +1,103 @@
<template> <template>
<div> <div>
<public-title title="主诉分类"/> <public-title title="主诉分类" />
<div class="inner"> <div class="inner">
<div class=""> <div class="">
<div class="type-time"> <div class="type-time">
<span :class="selectIndex===index?'select':'unSelect'" v-for="(item,index) in typeTime" :key="index" @click="handleSelect(index)">{{item.name}}</span> <span
:class="selectIndex === index ? 'select' : 'unSelect'"
v-for="(item, index) in typeTime"
:key="index"
@click="handleSelect(index)"
>{{ item.name }}</span
>
</div>
<div>全部数据</div>
</div> </div>
<div>全部数据</div> <div class="line-chart" ref="chiefChart"></div>
</div>
<div class="line-chart" ref="chiefChart"></div>
</div> </div>
</div> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref,onMounted } from 'vue'; import { ref, onMounted } from 'vue';
import PublicTitle from "../publicTitle.vue"; import PublicTitle from '../publicTitle.vue';
import * as echarts from 'echarts'; import * as echarts from 'echarts';
const typeTime = ref([ const typeTime = ref([
{ {
name:'男', name: '男',
value:'man', value: 'man',
},{ },
name:'女', {
value:'women', name: '',
}, value: 'women',
]) },
const selectIndex = ref(0) ]);
const chiefChart = ref<HTMLElement>() const selectIndex = ref(0);
onMounted(()=>{ const chiefChart = ref<HTMLElement>();
let xdata = ['创伤类', '心血管', '心神类', '呼吸类' , '消化类', '肿瘤类', '其他']; onMounted(() => {
let ydata = [120, 200, 150, 80, 70, 110, 130]; let xdata = ['创伤类', '心血管', '心神类', '呼吸类', '消化类', '肿瘤类', '其他'];
initChart(xdata,ydata) let ydata = [120, 200, 150, 80, 70, 110, 130];
}) initChart(xdata, ydata);
function initChart(xData,ydata){ });
let myChart = echarts.init(chiefChart.value) function initChart(xData, ydata) {
let options = { let myChart = echarts.init(chiefChart.value);
grid:{ let options = {
top: '10%', grid: {
left:'8%', top: '10%',
right:'8%', left: '8%',
bottom: '20%' right: '8%',
}, bottom: '20%',
xAxis: { },
type: 'category', xAxis: {
data: xData, type: 'category',
axisLabel: { data: xData,
color: '#FFFFFF', axisLabel: {
fontSize:16, color: '#FFFFFF',
}, fontSize: 16,
}, },
yAxis: { },
type: 'value', yAxis: {
axisLabel: { type: 'value',
color: '#FFFFFF', axisLabel: {
fontSize:16, color: '#FFFFFF',
}, fontSize: 16,
splitLine: { },
show: true, splitLine: {
lineStyle:{ show: true,
type:'dashed', lineStyle: {
color:'rgba(217, 231, 255, 0.2)' type: 'dashed',
} color: 'rgba(217, 231, 255, 0.2)',
} },
}, },
series: [ },
{ series: [
data:ydata , {
type: 'bar', data: ydata,
barWidth: '20%', type: 'bar',
itemStyle:{ barWidth: '20%',
color:new echarts.graphic.LinearGradient( itemStyle: {
0, 0, 0, 1, color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
[ { offset: 0, color: '#008CFF' },
{ offset: 0, color: '#008CFF' }, { offset: 1, color: '#33CBFE' },
{ offset: 1, color: '#33CBFE' } ]),
] },
) },
} ],
} };
] myChart.setOption(options);
} window.addEventListener('resize', () => {
myChart.setOption(options) myChart.resize();
window.addEventListener('resize', () => { });
myChart.resize(); }
});
}
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
.inner { .inner {
height: calc(100% - 40px); height: calc(100% - 40px);
.line-chart{ .line-chart {
margin: 0 auto; margin: 0 auto;
width: 96%; width: 96%;
height: 80%; height: 80%;
}
} }
} </style>
</style>
+92 -92
View File
@@ -1,103 +1,103 @@
<template> <template>
<div class="terminal-container"> <div class="terminal-container">
<public-title title="健康终端报警" :isShowMore="true" @clickMore="handleDialog"/> <public-title title="健康终端报警" :isShowMore="true" @clickMore="handleDialog" />
<div class="inner"> <div class="inner">
<vue3-seamless-scroll :list="policeLists" class="scroll" :hover="true" :limitScrollNum="7"> <vue3-seamless-scroll :list="policeLists" class="scroll" :hover="true" :limitScrollNum="7">
<div class="item" v-for="(item, index) in policeLists" :key="index"> <div class="item" v-for="(item, index) in policeLists" :key="index">
<span>{{item.name}}</span> <span>{{ item.name }}</span>
<span>{{item.abnormal}}</span> <span>{{ item.abnormal }}</span>
<div class="time-icon"> <div class="time-icon">
<span>{{item.time}}</span> <span>{{ item.time }}</span>
<span class="terminal-icon"></span> <span class="terminal-icon"></span>
</div> </div>
</div>
</vue3-seamless-scroll>
</div> </div>
</vue3-seamless-scroll> <Dialog :openVis="open" width="40%" title="健康终端报警列表" @close="handleClose">
<template #container>
<div>34534</div>
</template>
</Dialog>
</div> </div>
<Dialog :openVis="open" width="40%" title="健康终端报警列表" @close="handleClose">
<template #container>
<div>34534</div>
</template>
</Dialog>
</div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref } from 'vue'; import { ref } from 'vue';
import PublicTitle from "../publicTitle.vue"; import PublicTitle from '../publicTitle.vue';
import Dialog from '../dialog/Dialog.vue'; import Dialog from '../dialog/Dialog.vue';
import { Vue3SeamlessScroll } from "vue3-seamless-scroll"; import { Vue3SeamlessScroll } from 'vue3-seamless-scroll';
const policeLists = ref([ const policeLists = ref([
{ {
name: '陈天宇', name: '陈天宇',
abnormal: '压力异常(82)', abnormal: '压力异常(82)',
time: '2023-8-25', time: '2023-8-25',
}, },
{ {
name: '陈天宇', name: '陈天宇',
abnormal: '压力异常(82)', abnormal: '压力异常(82)',
time: '2023-8-25', time: '2023-8-25',
}, },
{ {
name: '陈天宇', name: '陈天宇',
abnormal: '压力异常(82)', abnormal: '压力异常(82)',
time: '2023-8-25', time: '2023-8-25',
}, },
{ {
name: '陈天宇', name: '陈天宇',
abnormal: '压力异常(82)', abnormal: '压力异常(82)',
time: '2023-8-25', time: '2023-8-25',
}, },
{ {
name: '陈天宇', name: '陈天宇',
abnormal: '压力异常(82)', abnormal: '压力异常(82)',
time: '2023-8-25', time: '2023-8-25',
}, },
{ {
name: '陈天宇', name: '陈天宇',
abnormal: '压力异常(82)', abnormal: '压力异常(82)',
time: '2023-8-25', time: '2023-8-25',
} },
]) ]);
const open = ref<boolean>(false); const open = ref<boolean>(false);
function handleDialog(){ function handleDialog() {
open.value = true open.value = true;
} }
function handleClose(){ function handleClose() {
open.value = false open.value = false;
} }
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
.inner { .inner {
height: calc(100% - 40px); height: calc(100% - 40px);
display: flex;
align-items: center;
justify-content: center;
.scroll {
width: 90%;
height: 88%;
overflow: hidden;
.item {
display: flex;
align-items: center;
justify-content: space-between;
padding: 18px 0;
span{
color:#ffffff;
font-size: 16px;
}
.time-icon {
display: flex; display: flex;
align-items: center; align-items: center;
} justify-content: center;
.terminal-icon { .scroll {
margin-left: 20px; width: 90%;
display: inline-block; height: 88%;
width: 18px; overflow: hidden;
height: 18px; .item {
background: url("../../assets/images/terminal.png") no-repeat; display: flex;
background-size: 100% 100%; align-items: center;
} justify-content: space-between;
padding: 18px 0;
span {
color: #ffffff;
font-size: 16px;
}
.time-icon {
display: flex;
align-items: center;
}
.terminal-icon {
margin-left: 20px;
display: inline-block;
width: 18px;
height: 18px;
background: url('../../assets/images/terminal.png') no-repeat;
background-size: 100% 100%;
}
}
}
} }
} </style>
}
</style>
+7 -11
View File
@@ -1,18 +1,14 @@
<template> <template>
<div> <div>
<public-title title="基层医疗点远程会诊"/> <public-title title="基层医疗点远程会诊" />
<div class="inner"> <div class="inner"> </div>
</div>
</div> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import PublicTitle from '../publicTitle.vue';
import PublicTitle from "../publicTitle.vue";
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
.inner { .inner {
height: calc(100% - 40px); height: calc(100% - 40px);
}
} </style>
</style>
+74 -74
View File
@@ -1,83 +1,83 @@
<template> <template>
<div> <div>
<public-title title="长庆油田大病人数"/> <public-title title="长庆油田大病人数" />
<div class="inner" ref="healthChart"></div> <div class="inner" ref="healthChart"></div>
</div> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref, onMounted } from 'vue'; import { ref, onMounted } from 'vue';
import * as echarts from 'echarts'; import * as echarts from 'echarts';
import PublicTitle from "../publicTitle.vue"; import PublicTitle from '../publicTitle.vue';
const healthChart = ref<HTMLElement>() const healthChart = ref<HTMLElement>();
onMounted(()=>{ onMounted(() => {
let xdata = ['创伤类', '心血管', '心神类', '呼吸类' , '消化类', '肿瘤类', '其他']; let xdata = ['创伤类', '心血管', '心神类', '呼吸类', '消化类', '肿瘤类', '其他'];
let ydata = [120, 200, 150, 80, 70, 110, 130]; let ydata = [120, 200, 150, 80, 70, 110, 130];
initChart(xdata,ydata) initChart(xdata, ydata);
}) });
function initChart(xData,ydata){ function initChart(xData, ydata) {
let myChart = echarts.init(healthChart.value) let myChart = echarts.init(healthChart.value);
let options = { let options = {
title:{ title: {
text:'总人数\n', text: '总人数\n',
subtext: '1980', subtext: '1980',
x: 'center', x: 'center',
y: 'center', y: 'center',
textStyle: { textStyle: {
fontSize:18, fontSize: 18,
color: '#ffffff', color: '#ffffff',
}, },
subtextStyle: { subtextStyle: {
color: '#ffffff', color: '#ffffff',
fontSize: 32, fontSize: 32,
}, },
}, },
color:['#0098FA','#0CD9B5','#3B72AD'], color: ['#0098FA', '#0CD9B5', '#3B72AD'],
tooltip: { tooltip: {
trigger: 'item' trigger: 'item',
}, },
legend: { legend: {
bottom: '0', bottom: '0',
left: 'center', left: 'center',
icon: 'circle', icon: 'circle',
textStyle:{ textStyle: {
color:'#ffffff', color: '#ffffff',
fontSize:18, fontSize: 18,
}, },
}, },
series: [ series: [
{ {
type: 'pie', type: 'pie',
radius: ['50%', '80%'], radius: ['50%', '80%'],
avoidLabelOverlap: false, avoidLabelOverlap: false,
label: { label: {
show: true, show: true,
position: 'inner', position: 'inner',
formatter: '{d}%', formatter: '{d}%',
color:'#ffffff', color: '#ffffff',
fontSize:16 fontSize: 16,
}, },
labelLine: { labelLine: {
show: false show: false,
}, },
data: [ data: [
{ value: 1048, name: '高危人数' }, { value: 1048, name: '高危人数' },
{ value: 735, name: '中危人数' }, { value: 735, name: '中危人数' },
{ value: 580, name: '可控人数' }, { value: 580, name: '可控人数' },
] ],
} },
] ],
} };
myChart.setOption(options) myChart.setOption(options);
window.addEventListener('resize', () => { window.addEventListener('resize', () => {
myChart.resize(); myChart.resize();
}); });
} }
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
.inner { .inner {
width: 90%; width: 90%;
margin: 0 auto; margin: 0 auto;
height: calc(100% - 40px); height: calc(100% - 40px);
} }
</style> </style>
+45
View File
@@ -0,0 +1,45 @@
export const tabList = [
{
name: '所有资源',
},
{
name: '油田医院',
},
{
name: '医疗点',
},
{
name: '救护车',
},
{
name: '合作医院',
},
{
name: '地方医院',
},
{
name: '直升机',
},
{
name: '急救路线',
}
]
export const mapIcon1 = new URL('/@/assets/img/mapIcon1.png', import.meta.url).href
export const mapIcon2 = new URL('/@/assets/img/mapIcon2.png', import.meta.url).href
export const mapIcon3 = new URL('/@/assets/img/mapIcon3.png', import.meta.url).href
export const mapIcon4 = new URL('/@/assets/img/mapIcon4.png', import.meta.url).href
export const mapIcon5 = new URL('/@/assets/img/mapIcon5.png', import.meta.url).href
export const mapIcon6 = new URL('/@/assets/img/mapIcon6.png', import.meta.url).href
export const legend1 = new URL('/@/assets/img/legend1.png', import.meta.url).href
export const legend2 = new URL('/@/assets/img/legend2.png', import.meta.url).href
export const legend3 = new URL('/@/assets/img/legend3.png', import.meta.url).href
export const legend4 = new URL('/@/assets/img/legend4.png', import.meta.url).href
export const legend5 = new URL('/@/assets/img/legend5.png', import.meta.url).href
export const legend6 = new URL('/@/assets/img/legend6.png', import.meta.url).href
export const mapIcons = [mapIcon1, mapIcon2, mapIcon3, mapIcon4, mapIcon5, mapIcon6]
export const legendList = [{img: legend1, text: '油田医院'}, {img: legend2, text: '医疗点'}, {
img: legend3,
text: '救护车'
}, {img: legend4, text: '合作医院'}, {img: legend5, text: '地方医院'}, {img: legend6, text: '直升机'}]
+372 -440
View File
@@ -2,23 +2,17 @@
<div class="center-map"> <div class="center-map">
<div class="china-map-box"> <div class="china-map-box">
<div class="tab-list"> <div class="tab-list">
<div v-for="(item,i) in list" :class="[currentIndex==i?'active':'']" class="tab" @click="changeTab(i)"> <div v-for="(item, i) in list" :class="[currentIndex == i ? 'active' : '']" class="tab" @click="changeTab(i)">
{{ item.name }} {{ item.name }}
</div> </div>
</div> </div>
<div v-show="currentIndex==list.length-1" class="route-navigation"> <div v-show="currentIndex == list.length - 1" class="route-navigation">
<a-form <a-form :model="formState" layout="inline">
:model="formState" <a-form-item class="form-item-self" label="起点">
layout="inline" <a-input v-model:value="formState.user"></a-input>
>
<a-form-item class="form-item-self" label="起点"
>
<a-input v-model:value="formState.user">
</a-input>
</a-form-item> </a-form-item>
<a-form-item class="form-item-self" label="终点"> <a-form-item class="form-item-self" label="终点">
<a-input v-model:value="formState.password"> <a-input v-model:value="formState.password"></a-input>
</a-input>
</a-form-item> </a-form-item>
<a-form-item> <a-form-item>
<a-button class="reset-btn">清空</a-button> <a-button class="reset-btn">清空</a-button>
@@ -27,9 +21,7 @@
</a-form> </a-form>
<div class="line-container"> <div class="line-container">
<div class="has-data"> <div class="has-data">
<div class="line-title"> <div class="line-title"> 全程2小时37分钟(172.15公里)</div>
全程2小时37分钟(172.15公里)
</div>
<div class="line-content"> <div class="line-content">
<div class="start">起点</div> <div class="start">起点</div>
<div class="line-body"> <div class="line-body">
@@ -60,16 +52,14 @@
<div class="end">终点</div> <div class="end">终点</div>
</div> </div>
</div> </div>
<div v-show="false" class="empty-data"> <div v-show="false" class="empty-data"> 暂无数据</div>
暂无数据
</div>
</div> </div>
</div> </div>
<div class="china-map-container"></div> <div class="china-map-container"></div>
<div class="map-legend"> <div class="map-legend">
<div v-for="(item,i) in legendList" :key="i" class="legend-item"> <div v-for="(item, i) in legendList" :key="i" class="legend-item">
<div><img :src="item.img" alt="" class="legend-img"> {{ item.text }}</div> <div><img :src="item.img" alt="" class="legend-img" /> {{ item.text }}</div>
</div> </div>
</div> </div>
</div> </div>
@@ -86,443 +76,385 @@
</div> </div>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import {onMounted, ref} from 'vue' import { onMounted, ref } from 'vue';
import * as echarts from 'echarts'; import * as echarts from 'echarts';
import mapJson from '/@/components/chinaMap/json/c' import mapJson from '/@/components/chinaMap/json/c';
import { tabList, mapIcons, legendList } from './chinaHooks.ts';
// import bgImg from '/@/assets/images/china-textur.png' const bgImg = new URL('/@/assets/images/china-textur.jpg', import.meta.url).href;
const bgImg = new URL('/@/assets/images/china-textur.jpg', import.meta.url).href
const mapIcon1 = new URL('/@/assets/img/mapIcon1.png', import.meta.url).href
const mapIcon2 = new URL('/@/assets/img/mapIcon2.png', import.meta.url).href
const mapIcon3 = new URL('/@/assets/img/mapIcon3.png', import.meta.url).href
const mapIcon4 = new URL('/@/assets/img/mapIcon4.png', import.meta.url).href
const mapIcon5 = new URL('/@/assets/img/mapIcon5.png', import.meta.url).href
const mapIcon6 = new URL('/@/assets/img/mapIcon6.png', import.meta.url).href
const legend1 = new URL('/@/assets/img/legend1.png', import.meta.url).href const formState = ref({
const legend2 = new URL('/@/assets/img/legend2.png', import.meta.url).href user: '',
const legend3 = new URL('/@/assets/img/legend3.png', import.meta.url).href password: '',
const legend4 = new URL('/@/assets/img/legend4.png', import.meta.url).href
const legend5 = new URL('/@/assets/img/legend5.png', import.meta.url).href
const legend6 = new URL('/@/assets/img/legend6.png', import.meta.url).href
const mapIcons = [mapIcon1, mapIcon2, mapIcon3, mapIcon4, mapIcon5, mapIcon6]
const legendList = [{img: legend1, text: '油田医院'}, {img: legend2, text: '医疗点'}, {
img: legend3,
text: '救护车'
}, {img: legend4, text: '合作医院'}, {img: legend5, text: '地方医院'}, {img: legend6, text: '直升机'}]
const formState = ref({
user: '',
password: "",
});
const list = ref([
{
name: '所有资源',
isChecked: true
},
{
name: '油田医院',
isChecked: false
},
{
name: '医疗点',
isChecked: false
},
{
name: '救护车',
isChecked: false
},
{
name: '合作医院',
isChecked: false
},
{
name: '地方医院',
isChecked: false
},
{
name: '直升机',
isChecked: false
},
{
name: '急救路线',
isChecked: false
}
])
const currentIndex = ref(0);
const icons = ref([{
type: "scatter",
zlevel: 100,
coordinateSystem: "geo",
//自定义图片的 位置(lng, lat)
data: [{name: '西安', value: ['108.88', '34.40'], id: 'xian'}],
//自定义图片的 大小
symbolSize: [25, 63],
//自定义图片的 路径
// symbol: 'image://http://192.168.1.7:9200/src/assets/img/tree.png', // 图片 URL
// symbol: 'image://https://img2.baidu.com/it/u=1568770988,2090980470&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=567', // 图片 URL
symbol: 'image://' + mapIcon1, // 图片 URL
},
{
type: "scatter",
zlevel: 100,
coordinateSystem: "geo",
//自定义图片的 位置(lng, lat)
data: [{name: '太原', value: [112.55, 37.98], id: 'taiyuan'}],
//自定义图片的 大小
symbolSize: [25, 63],
symbol: 'image://' + mapIcon2, // 图片 URL
}])
function changeTab(i) {
let x = Math.random() + 3 - Math.random() - i;
let y = Math.random() - 2 + Math.random() + i
const o = {
type: "scatter",
zlevel: 100,
coordinateSystem: "geo",
//自定义图片的 位置(lng, lat)
data: [{name: '太原', value: [112.55 + Math.random() + x, 37.98 + Math.random() + y], id: 'taiyuan'}],
//自定义图片的 大小
symbolSize: [25, 63],
symbol: 'image://' + mapIcons[Math.floor(Math.random() * 6)], // 图片 URL
}
icons.value = []
icons.value.push(o)
currentIndex.value = i
list.value = list.value.map(item => {
item.isChecked = false
return item
})
let myChart = echarts.init(document.querySelector('.china-map-container'));
initMap(myChart)
}
onMounted(() => {
console.log('reload')
let myChart = echarts.init(document.querySelector('.china-map-container'));
echarts.registerMap('china', mapJson);
initMap(myChart);
})
function initMap(myChart) {
let option = {
tooltip: {
show: false,
formatter: "{b0}: {c0}"
},
geo: [
{
map: 'china',
zlevel: 3,
aspectScale: .8, //长宽比
zoom: 1.1,
roam: false,
top: '60',
left: 'center',
itemStyle: {
areaColor: "#173a58",
shadowColor: "#173a58",
shadowOffsetX: 0,
shadowOffsetY: 5,
borderWidth: 6,//外部边框
borderColor: "#6ccffe",
}
},
{
map: 'china',
zlevel: 2,
aspectScale: .8, //长宽比
zoom: 1.1,
roam: false,
top: '60',
left: 'center',
itemStyle: {
areaColor: "#1e2c38",
shadowColor: "#1e2c38",
shadowOffsetX: 0,
shadowOffsetY: 10,
borderWidth: 6,//外部边框
borderColor: "#384d61",
}
},
],
series: [
{
map: 'china',// 这个是上面注册时的名字哦,registerMap'这个名字保持一致'
name: '中国地图',
type: 'map',
zlevel: 9,
zoom: 1.1,
aspectScale: .8, //长宽比
hoverAnimation: false,
silent: false,
top: '60',
left: 'center',
label: {
show: true,
padding: [0, 10],
height: 31,
lineHeight: 31,
textStyle: {
color: "#fff",
fontSize: 13,
marginLeft: 5
},
},
itemStyle: {
// 给地图添加背景图片
areaColor: {
type: 'pattern',
image: bgImg,
repeat: 'no-repeat'
},
borderColor: "#359de5",
borderWidth: 2,//内部边框
},
},
...icons.value
],
};
// myChart.value.clear()
myChart.setOption(option);
myChart.on('click', function (res) {
if ('scatter' === res.componentSubType) {
alert(`点击了 ${res.name} 图标`);
}
if ('map' === res.componentSubType) {
alert(`点击了 ${res.name} 地图`);
}
}); });
window.addEventListener('resize', () => { const list = ref(tabList);
myChart.resize() const currentIndex = ref(0);
}) const icons = ref([
} {
type: 'scatter',
zlevel: 100,
coordinateSystem: 'geo',
//自定义图片的 位置(lng, lat)
data: [{ name: '西安', value: ['108.88', '34.40'], id: 'xian' }],
//自定义图片的 大小
symbolSize: [25, 63],
//自定义图片的 路径
// symbol: 'image://https://img2.baidu.com/it/u=1568770988,2090980470&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=567', // 图片 URL
symbol: 'image://' + mapIcons[0], // 图片 URL
},
{
type: 'scatter',
zlevel: 100,
coordinateSystem: 'geo',
//自定义图片的 位置(lng, lat)
data: [{ name: '太原', value: [112.55, 37.98], id: 'taiyuan' }],
//自定义图片的 大小
symbolSize: [25, 63],
symbol: 'image://' + mapIcons[1], // 图片 URL
},
]);
function changeTab(i) {
let x = Math.random() + 3 - Math.random() - i;
let y = Math.random() - 2 + Math.random() + i;
const o = {
type: 'scatter',
zlevel: 100,
coordinateSystem: 'geo',
//自定义图片的 位置(lng, lat)
data: [{ name: '太原', value: [112.55 + Math.random() + x, 37.98 + Math.random() + y], id: 'taiyuan' }],
//自定义图片的 大小
symbolSize: [25, 63],
symbol: 'image://' + mapIcons[Math.floor(Math.random() * 6)], // 图片 URL
};
icons.value = [];
icons.value.push(o);
currentIndex.value = i;
let myChart = echarts.init(document.querySelector('.china-map-container'));
initMap(myChart);
}
onMounted(() => {
console.log('reload');
let myChart = echarts.init(document.querySelector('.china-map-container'));
echarts.registerMap('china', mapJson);
initMap(myChart);
});
function initMap(myChart) {
let option = {
tooltip: {
show: false,
formatter: '{b0}: {c0}',
},
geo: [
{
map: 'china',
zlevel: 3,
aspectScale: 0.8, //长宽比
zoom: 1.1,
roam: false,
top: '60',
left: 'center',
itemStyle: {
areaColor: '#173a58',
shadowColor: '#173a58',
shadowOffsetX: 0,
shadowOffsetY: 5,
borderWidth: 6, //外部边框
borderColor: '#6ccffe',
},
},
{
map: 'china',
zlevel: 2,
aspectScale: 0.8, //长宽比
zoom: 1.1,
roam: false,
top: '60',
left: 'center',
itemStyle: {
areaColor: '#1e2c38',
shadowColor: '#1e2c38',
shadowOffsetX: 0,
shadowOffsetY: 10,
borderWidth: 6, //外部边框
borderColor: '#384d61',
},
},
],
series: [
{
map: 'china', // 这个是上面注册时的名字哦,registerMap'这个名字保持一致'
name: '中国地图',
type: 'map',
zlevel: 9,
zoom: 1.1,
aspectScale: 0.8, //长宽比
hoverAnimation: false,
silent: false,
top: '60',
left: 'center',
label: {
show: true,
padding: [0, 10],
height: 31,
lineHeight: 31,
textStyle: {
color: '#fff',
fontSize: 13,
marginLeft: 5,
},
},
itemStyle: {
// 给地图添加背景图片
areaColor: {
type: 'pattern',
image: bgImg,
repeat: 'no-repeat',
},
borderColor: '#359de5',
borderWidth: 2, //内部边框
},
},
...icons.value,
],
};
// myChart.value.clear()
myChart.setOption(option);
myChart.on('click', function (res) {
if ('scatter' === res.componentSubType) {
alert(`点击了 ${res.name} 图标`);
}
if ('map' === res.componentSubType) {
alert(`点击了 ${res.name} 地图`);
}
});
window.addEventListener('resize', () => {
myChart.resize();
});
}
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.center-map { .center-map {
flex: 1;
color: #fff;
display: flex;
flex-direction: column;
align-content: space-between;
.china-map-box {
flex: 1; flex: 1;
color: #fff;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
position: relative; align-content: space-between;
}
.tab-list { .china-map-box {
display: flex; flex: 1;
flex-wrap: wrap;
justify-content: space-between;
.tab {
width: calc(100% / 8);
height: 43px;
display: flex; display: flex;
justify-content: center;
align-items: center;
color: #29F1FA;
background: url("/@/assets/img/tab-default.png") no-repeat;
background-size: 100%;
cursor: pointer;
transition: all 0.3s;
//background-position: -5px -10px;
&.active {
color: #fff;
background: url("/@/assets/img/tab-active.png") no-repeat;
background-size: 100%;
}
}
}
.route-navigation {
margin: 12px 0;
width: 100%;
height: 46px;
display: flex;
align-items: center;
justify-content: center;
background: #002E64;
border-radius: 6px;
position: absolute;
top: 40px;
z-index: 999;
transition: all 0.3s;
:deep(.form-item-self) {
label {
color: #29F1FA;
}
.ant-input {
width: 280px;
color: #d6d9e0;
background: #2A4164;
border-radius: 2px 2px 2px 2px;
border: 1px solid #1B7EF2;
}
}
.reset-btn {
width: 64px;
height: 32px;
border-radius: 5px;
color: #45A2FF;
background: #002E64;
border: 1px solid #45A2FF;
}
.search-btn {
margin-left: 10px;
width: 88px;
height: 32px;
color: #EFEFEF;
background: #45A2FF;
border-radius: 5px;
border-color: #45A2FF;
}
.line-container {
position: absolute;
right: 0;
top: 54px;
width: 288px;
padding: 9px 18px;
min-height: 200px;
max-height: 473px;
overflow: auto;
background: #2A4164;
border-radius: 2px;
border: 1px solid #1B7EF2;
.line-title {
margin-bottom: 9px;
font-size: 14px;
font-weight: 700;
color: rgba(255, 255, 255, 0.8);
}
.line-content {
font-size: 12px;
.start {
display: flex;
align-items: center;
&::before {
content: '起';
color: #fff;
width: 20px;
height: 20px;
margin-right: 7px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
background: #1478F5;
}
}
.end {
display: flex;
align-items: center;
&::before {
content: '终';
color: #fff;
width: 20px;
height: 20px;
margin-right: 7px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
background: #1478F5;
}
}
.line-body {
display: flex;
//max-height: 370px;
}
.line {
width: 1px;
//max-height: 370px;
background-color: #1478f5;
margin: 5px 19px 5px 8px;
}
.line-sesc {
flex: 1;
}
}
}
}
.china-map-container {
flex: 1;
margin: 10px;
//border: 1px solid red;
}
.map-legend {
position: absolute;
bottom: 20px;
left: 0;
width: 200px;
//border: 1px solid red;
display: flex;
flex-wrap: wrap;
.legend-item {
width: 50%;
font-size: 12px;
font-weight: 400;
line-height: 30px;
.legend-img {
width: 20px;
}
}
}
.center-footer {
display: flex;
justify-content: center;
margin-bottom: 10px;
gap: 20px;
.count-item {
width: 340px;
height: 80px;
display: flex;
color: #FFFFFF;
flex-direction: column; flex-direction: column;
position: relative;
}
.tab-list {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
.tab {
width: calc(100% / 8);
height: 43px;
display: flex;
justify-content: center;
align-items: center;
color: #29f1fa;
background: url('/@/assets/img/tab-default.png') no-repeat;
background-size: 100%;
cursor: pointer;
transition: all 0.3s;
//background-position: -5px -10px;
&.active {
color: #fff;
background: url('/@/assets/img/tab-active.png') no-repeat;
background-size: 100%;
}
}
}
.route-navigation {
margin: 12px 0;
width: 100%;
height: 46px;
display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
background: #00071B; background: #002e64;
box-shadow: inset 0 0 40px 0 #1B7EF2; border-radius: 6px;
border-radius: 4px; position: absolute;
top: 40px;
z-index: 999;
transition: all 0.3s;
.num { :deep(.form-item-self) {
font-size: 24px; label {
font-weight: 700; color: #29f1fa;
}
.ant-input {
width: 280px;
color: #d6d9e0;
background: #2a4164;
border-radius: 2px 2px 2px 2px;
border: 1px solid #1b7ef2;
}
} }
.text { .reset-btn {
font-size: 16px; width: 64px;
height: 32px;
border-radius: 5px;
color: #45a2ff;
background: #002e64;
border: 1px solid #45a2ff;
}
.search-btn {
margin-left: 10px;
width: 88px;
height: 32px;
color: #efefef;
background: #45a2ff;
border-radius: 5px;
border-color: #45a2ff;
}
.line-container {
position: absolute;
right: 0;
top: 54px;
width: 288px;
padding: 9px 18px;
min-height: 200px;
max-height: 473px;
overflow: auto;
background: #2a4164;
border-radius: 2px;
border: 1px solid #1b7ef2;
.line-title {
margin-bottom: 9px;
font-size: 14px;
font-weight: 700;
color: rgba(255, 255, 255, 0.8);
}
.line-content {
font-size: 12px;
.start {
display: flex;
align-items: center;
&::before {
content: '起';
color: #fff;
width: 20px;
height: 20px;
margin-right: 7px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
background: #1478f5;
}
}
.end {
display: flex;
align-items: center;
&::before {
content: '终';
color: #fff;
width: 20px;
height: 20px;
margin-right: 7px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
background: #1478f5;
}
}
.line-body {
display: flex;
//max-height: 370px;
}
.line {
width: 1px;
//max-height: 370px;
background-color: #1478f5;
margin: 5px 19px 5px 8px;
}
.line-sesc {
flex: 1;
}
}
}
}
.china-map-container {
flex: 1;
margin: 10px;
//border: 1px solid red;
}
.map-legend {
position: absolute;
bottom: 20px;
left: 0;
width: 200px;
//border: 1px solid red;
display: flex;
flex-wrap: wrap;
.legend-item {
width: 50%;
font-size: 12px;
font-weight: 400; font-weight: 400;
line-height: 30px;
.legend-img {
width: 20px;
}
}
}
.center-footer {
display: flex;
justify-content: center;
margin-bottom: 10px;
gap: 20px;
.count-item {
width: 340px;
height: 80px;
display: flex;
color: #ffffff;
flex-direction: column;
align-items: center;
justify-content: center;
background: #00071b;
box-shadow: inset 0 0 40px 0 #1b7ef2;
border-radius: 4px;
.num {
font-size: 24px;
font-weight: 700;
}
.text {
font-size: 16px;
font-weight: 400;
}
} }
} }
} }
} </style>
</style>
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+54 -55
View File
@@ -1,63 +1,62 @@
<template> <template>
<a-modal <a-modal v-model:visible="props.openVis" :title="props.title" :width="props.width" :maskClosable="true" @cancel="handleCancel">
v-model:visible="props.openVis" <slot name="container"></slot>
:title="props.title" <template #footer></template>
:width="props.width" </a-modal>
:maskClosable="true"
@cancel="handleCancel"
>
<slot name="container"></slot>
<template #footer></template>
</a-modal>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { defineProps, defineEmits } from 'vue'; import { defineProps, defineEmits } from 'vue';
const emit = defineEmits(['close']) const emit = defineEmits(['close']);
const props = defineProps({ const props = defineProps({
width:{ width: {
type: String type: String,
}, },
openVis:{ openVis: {
type:Boolean type: Boolean,
}, },
title:{ title: {
type:String type: String,
} },
}) });
function handleCancel(){ function handleCancel() {
emit('close') emit('close');
} }
</script> </script>
<style lang="less"> <style lang="less">
.ant-modal-header{ .ant-modal-header {
position: relative; position: relative;
background: linear-gradient(270deg, rgba(106,112,124,0.4) 0%, rgba(106,112,124,0) 70%, rgba(106,112,124,0) 100%); background: linear-gradient(270deg, rgba(106, 112, 124, 0.4) 0%, rgba(106, 112, 124, 0) 70%, rgba(106, 112, 124, 0) 100%);
opacity: 1; opacity: 1;
border: 1px solid; border: 1px solid;
border-image: linear-gradient(270deg, rgba(217.0000022649765, 231.00000143051147, 255, 0.5), rgba(217.0000022649765, 231.00000143051147, 255, 0)) 1 1; border-image: linear-gradient(
&:before { 270deg,
position: absolute; rgba(217.0000022649765, 231.00000143051147, 255, 0.5),
content: ''; rgba(217.0000022649765, 231.00000143051147, 255, 0)
width: 7px; )
height: 100%; 1 1;
top: 0; &:before {
left: 0; position: absolute;
background-color: #45A2FF; content: '';
width: 7px;
height: 100%;
top: 0;
left: 0;
background-color: #45a2ff;
}
} }
} .ant-modal-title {
.ant-modal-title{ color: #ffffff !important;
color: #ffffff!important; }
} .ant-modal-header,
.ant-modal-header,.ant-modal-content{ .ant-modal-content {
background-color: transparent!important; background-color: transparent !important;
} }
.ant-modal-body{ .ant-modal-body {
padding: 0!important; padding: 0 !important;
} }
:deep(.anticon){ :deep(.anticon) {
color: #999999; color: #999999;
} }
</style>
</style>
+46 -41
View File
@@ -2,53 +2,58 @@
<div class="title-d"> <div class="title-d">
<span>{{ props.title }}</span> <span>{{ props.title }}</span>
<div> <div>
<span v-if="isShowMore" style="font-size: 14px;font-weight: 100;cursor: pointer;margin-right: 3px" @click="clickMore">更多&gt;</span> <span v-if="isShowMore" style="font-size: 14px; font-weight: 100; cursor: pointer; margin-right: 3px" @click="clickMore">更多&gt;</span>
<img src="../assets/img/point.png" alt=""> <img src="../assets/img/point.png" alt="" />
</div> </div>
</div> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
const props = defineProps({ const props = defineProps({
title: { title: {
type: String, type: String,
default: () => '' default: () => '',
}, },
isShowMore: { isShowMore: {
type: Boolean, type: Boolean,
default: () => false default: () => false,
},
});
const emit = defineEmits(['clickMore']);
function clickMore() {
emit('clickMore');
} }
})
const emit = defineEmits(['clickMore'])
function clickMore() {
emit('clickMore')
}
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
.title-d { .title-d {
padding-left: 17px; padding-left: 17px;
position: relative; position: relative;
text-align: left; text-align: left;
height: 40px; height: 40px;
line-height: 40px; line-height: 40px;
background: linear-gradient(90deg, rgba(106, 112, 124, 0.4) 0%, rgba(106, 112, 124, 0) 70%, rgba(106, 112, 124, 0) 100%); background: linear-gradient(90deg, rgba(106, 112, 124, 0.4) 0%, rgba(106, 112, 124, 0) 70%, rgba(106, 112, 124, 0) 100%);
opacity: 1; opacity: 1;
border-top: 1px solid #6A707C; border-top: 1px solid #6a707c;
border-bottom: 1px solid #6A707C; border-bottom: 1px solid #6a707c;
border-image: linear-gradient(90deg, rgba(217.0000022649765, 231.00000143051147, 255, 0.5), rgba(217.0000022649765, 231.00000143051147, 255, 0)) 1 1; border-image: linear-gradient(
color: #ffffff; 90deg,
font-size: 20px; rgba(217.0000022649765, 231.00000143051147, 255, 0.5),
font-weight: 700; rgba(217.0000022649765, 231.00000143051147, 255, 0)
display: flex; )
justify-content: space-between; 1 1;
color: #ffffff;
font-size: 20px;
font-weight: 700;
display: flex;
justify-content: space-between;
&:before { &:before {
position: absolute; position: absolute;
content: ''; content: '';
width: 7px; width: 7px;
height: 100%; height: 100%;
top: 0; top: 0;
left: 0; left: 0;
background-color: #45A2FF; background-color: #45a2ff;
}
} }
} </style>
</style>
+117 -114
View File
@@ -2,147 +2,150 @@
<div class="outer"> <div class="outer">
<div class="title-d"> <div class="title-d">
<div class="title-d-left"> <div class="title-d-left">
{{dayTimeO}} {{ dayTimeO }}
</div>
<div class="title-d-middle">
应急就医服务中心
</div>
<div class="title-d-right">
累计运行时间{{dayTimeT}}
</div> </div>
<div class="title-d-middle"> 应急就医服务中心 </div>
<div class="title-d-right"> 累计运行时间{{ dayTimeT }} </div>
</div> </div>
<div class="body-d"> <div class="body-d">
<div class="body-d-left"> <div class="body-d-left">
<one-l/> <one-l />
<two-l/> <two-l />
<three-l/> <three-l />
</div> </div>
<div class="body-d-middle"> <div class="body-d-middle">
<china-map /> <china-map />
</div> </div>
<div class="body-d-right"> <div class="body-d-right">
<one-r/> <one-r />
<two-r/> <two-r />
<three-r/> <three-r />
</div> </div>
</div> </div>
<div class="bottom-d"></div> <div class="bottom-d"></div>
</div> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import {ref} from "vue"; import { ref } from 'vue';
import OneL from "../components/body-d-left/oneL.vue"; import OneL from '../components/body-d-left/oneL.vue';
import TwoL from "../components/body-d-left/twoL.vue"; import TwoL from '../components/body-d-left/twoL.vue';
import ThreeL from "../components/body-d-left/threeL.vue"; import ThreeL from '../components/body-d-left/threeL.vue';
import OneR from "../components/body-d-right/oneR.vue"; import OneR from '../components/body-d-right/oneR.vue';
import TwoR from "../components/body-d-right/twoR.vue"; import TwoR from '../components/body-d-right/twoR.vue';
import ThreeR from "../components/body-d-right/threeR.vue"; import ThreeR from '../components/body-d-right/threeR.vue';
import ChinaMap from '../components/chinaMap/chinaMap.vue' import ChinaMap from '../components/chinaMap/chinaMap.vue';
import * as dayjs from "dayjs"; import * as dayjs from 'dayjs';
const dayTimeO = ref(); const dayTimeO = ref();
const dayTimeT = ref(); const dayTimeT = ref();
function init() { function init() {
getTime();
setInterval(() => {
getTime(); getTime();
}, 1000) setInterval(() => {
} getTime();
}, 1000);
function getTime() {
dayTimeO.value = dayjs().format('YYYY年MM月DD日 HH时mm分ss秒')
dayTimeT.value = dayjs().diff(dayjs('2020-01-01'), 'day')+'天'
+getZero(dayjs().diff(dayjs(dayjs().format('YYYY-MM-DD')+' 00:00:00'), 'hours'))+'时'
+getZero(dayjs().diff(dayjs(dayjs().format('YYYY-MM-DD HH')+':00:00'), 'minutes'))+'分'
+getZero(dayjs().diff(dayjs(dayjs().format('YYYY-MM-DD HH:mm')+':00'), 'seconds'))+'秒';
}
function getZero(num: any) {
if (num < 10) {
return '0'+num;
} }
return num
}
init(); function getTime() {
dayTimeO.value = dayjs().format('YYYY年MM月DD日 HH时mm分ss秒');
dayTimeT.value =
dayjs().diff(dayjs('2020-01-01'), 'day') +
'天' +
getZero(dayjs().diff(dayjs(dayjs().format('YYYY-MM-DD') + ' 00:00:00'), 'hours')) +
'时' +
getZero(dayjs().diff(dayjs(dayjs().format('YYYY-MM-DD HH') + ':00:00'), 'minutes')) +
'分' +
getZero(dayjs().diff(dayjs(dayjs().format('YYYY-MM-DD HH:mm') + ':00'), 'seconds')) +
'秒';
}
function getZero(num: any) {
if (num < 10) {
return '0' + num;
}
return num;
}
init();
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.outer { .outer {
height: 100%; height: 100%;
box-sizing: border-box; box-sizing: border-box;
background: url("../assets/images/bg.png") no-repeat; background: url('../assets/images/bg.png') no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
}
.title-d {
height: 80px;
line-height: 80px;
display: flex;
padding-bottom: 9px;
background: url("../assets/images/top-title.png") no-repeat;
background-size: 100% 100%;
.title-d-left, .title-d-middle, .title-d-right {
font-size: 27px;
color: #ffffff;
line-height: 60px;
text-align: center;
} }
.title-d {
height: 80px;
line-height: 80px;
display: flex;
padding-bottom: 9px;
background: url('../assets/images/top-title.png') no-repeat;
background-size: 100% 100%;
> :nth-child(1) { .title-d-left,
width: 29%; .title-d-middle,
} .title-d-right {
font-size: 27px;
color: #ffffff;
line-height: 60px;
text-align: center;
}
> :nth-child(2) { > :nth-child(1) {
width: 42%; width: 29%;
font-size: 40px; }
font-weight: bold;
}
> :nth-child(3) { > :nth-child(2) {
width: 29%; width: 42%;
} font-size: 40px;
} font-weight: bold;
}
.body-d { > :nth-child(3) {
display: flex; width: 29%;
height: calc(100% - 120px);
padding-top: 10px;
> :nth-child(1) {
width: 25%;
}
> :nth-child(2) {
width: 50%;
}
> :nth-child(3) {
width: 25%;
}
.body-d-left, .body-d-right {
text-align: center;
}
.body-d-left, .body-d-right {
> :nth-child(n) {
width: 100%;
height: calc(100% / 3);
padding: 10px;
} }
} }
.body-d-middle{
display: flex;
flex-direction: column;
}
}
.bottom-d { .body-d {
height: 40px; display: flex;
background: url("../assets/images/bottom-b.png") no-repeat; height: calc(100% - 120px);
background-size: 100% 100%; padding-top: 10px;
}
</style> > :nth-child(1) {
width: 25%;
}
> :nth-child(2) {
width: 50%;
}
> :nth-child(3) {
width: 25%;
}
.body-d-left,
.body-d-right {
text-align: center;
}
.body-d-left,
.body-d-right {
> :nth-child(n) {
width: 100%;
height: calc(100% / 3);
padding: 10px;
}
}
.body-d-middle {
display: flex;
flex-direction: column;
}
}
.bottom-d {
height: 40px;
background: url('../assets/images/bottom-b.png') no-repeat;
background-size: 100% 100%;
}
</style>