Commit 462e8ad2 authored by mahui's avatar mahui

init

parent 3d013f62
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -8,6 +8,10 @@
<title><%= htmlWebpackPlugin.options.title %></title>
</head>
<body>
<script src="./echarts.min.js">
</script>
<script src="https://api.map.baidu.com/api?v=1.0&type=webgl&ak=fklOeUwr7Y1amxhGFZL8lvE6QvIKpGNi&callback=initialize">
</script>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
......
......@@ -36,4 +36,5 @@
<glyph unicode="&#xe91a;" glyph-name="27" d="M0.030 448.294l416.786 416.786 77.706-77.706-416.786-416.786-77.706 77.706zM77.726 526.001l416.786-416.786-77.706-77.706-416.786 416.786 77.706 77.706zM153.7 494.854h868.951v-109.893h-868.951v109.893z" />
<glyph unicode="&#xe91b;" glyph-name="28" d="M1022.667 448.335l-416.786-416.786-77.706 77.706 416.786 416.786 77.706-77.706zM944.971 370.618l-416.786 416.786 77.706 77.706 416.786-416.786-77.706-77.706zM868.951 401.745h-868.951v109.893h868.951v-109.893z" />
<glyph unicode="&#xe91c;" glyph-name="29" horiz-adv-x="835" d="M417.31-64.008l-417.336 417.336 77.808 77.808 417.336-417.336-77.808-77.808zM339.501 13.801l417.336 417.336 77.808-77.808-417.336-417.336-77.808 77.808zM370.727 89.903v870.097h110.038v-870.097h-110.038z" />
<glyph unicode="&#xe91d;" glyph-name="30" d="M511.959 960c-282.712-0.046-511.878-229.241-511.878-511.959 0-282.747 229.212-511.959 511.959-511.959s511.959 229.212 511.959 511.959v0c-0.046 282.757-229.277 511.959-512.041 511.959v0zM511.959 799.376c108.073 0 195.684-87.611 195.684-195.684s-87.611-195.684-195.684-195.684c-108.073 0-195.684 87.611-195.684 195.684v0c0 108.073 87.611 195.684 195.684 195.684v0zM511.959 56.509c-0.016 0-0.035 0-0.054 0-123.032 0-232.755 56.985-304.214 146l-0.592 0.763c72.128 89.679 181.849 146.585 304.86 146.585s232.732-56.906 304.272-145.829l0.588-0.756c-72.021-89.777-181.719-146.763-304.728-146.763-0.046 0-0.093 0-0.139 0h0.007z" />
</font></defs></svg>
\ No newline at end of file
@font-face {
font-family: 'icomoon';
src: url('fonts/icomoon.eot?e6yl7u');
src: url('fonts/icomoon.eot?e6yl7u#iefix') format('embedded-opentype'),
url('fonts/icomoon.ttf?e6yl7u') format('truetype'),
url('fonts/icomoon.woff?e6yl7u') format('woff'),
url('fonts/icomoon.svg?e6yl7u#icomoon') format('svg');
src: url('fonts/icomoon.eot?ecryv7');
src: url('fonts/icomoon.eot?ecryv7#iefix') format('embedded-opentype'),
url('fonts/icomoon.ttf?ecryv7') format('truetype'),
url('fonts/icomoon.woff?ecryv7') format('woff'),
url('fonts/icomoon.svg?ecryv7#icomoon') format('svg');
font-weight: normal;
font-style: normal;
font-display: block;
......@@ -112,3 +112,6 @@
.icon-29:before {
content: "\e91c";
}
.icon-30:before {
content: "\e91d";
}
This diff is collapsed.
......@@ -8,10 +8,7 @@ export const useStore = defineStore('app',{
},
info:{
username:'银河环卫工',
area:{
areaName:'青山湖街道'
}
username:'admin'
},
tabs:[
{
......
import axios from 'axios'
import { ref } from 'vue'
const weatherInfo = ref('');
const amapKey = '89e4bcbcfe9cbe7560782e22719d31a6';
export const useWeatherInfo = () => {
ip();
return weatherInfo
};
export const ip = async() => {
// key换成你自己的 https://console.amap.com/dev/index
if (amapKey === '') {
return false
}
const res = await axios.get('https://restapi.amap.com/v3/ip?key=' + amapKey)
if (res.data.adcode) {
getWeather(res.data.adcode)
}
};
const getWeather = async(code) => {
const response = await axios.get('https://restapi.amap.com/v3/weather/weatherInfo?key=' + amapKey + '&extensions=base&city=' + code)
if (response.data.status === '1') {
const s = response.data.lives[0];
// weatherInfo.value = s.city + ' 天气:' + s.weather + ' 温度:' + s.temperature + '摄氏度 风向:' + s.winddirection + ' 风力:' + s.windpower + '级 空气湿度:' + s.humidity
weatherInfo.value = s.weather
}
};
This diff is collapsed.
<template>
<div class="order-detail">
<div class="detail-header">
<span class="detail-title">公厕点位详情【{{detail.name}}</span>
<span class="btn" @click="close">退出</span>
</div>
<div class="tabs">
<span class="tab-one" :class="{selected:tab==item.value}" v-for="(item,index) in tabs" :key="index"
@click="tabActive(item)">{{item.name}}</span>
</div>
<div class="detail-body">
<div class="body-one">
<div class="poster">
<div class="blur-mask" :style="`background-image:url('${detail.poster[detail.index]}')`"></div>
<div class="banner">
<el-carousel :interval="5000" arrow="never" style="height: 480px;"
@change="(val)=>{detail.index=val}">
<el-carousel-item style="height: 480px;" v-for="item in detail.poster" :key="item">
<div class="banner-bg" :style="`background-image:url('${item}')`"></div>
</el-carousel-item>
</el-carousel>
</div>
</div>
<div class="info">
<p class="info-title">公厕点位基本信息</p>
<div class="info-content">
<div class="table">
<div class="table-left">
<div class="table-row">
<div class="table-header-cell cell">
点位名称
</div>
<div class="table-content-cell cell">
</div>
</div>
<div class="table-row">
<div class="table-header-cell cell">
公厕类型
</div>
<div class="table-content-cell cell">
</div>
</div>
<div class="table-row">
<div class="table-header-cell cell">
管理人员
</div>
<div class="table-content-cell cell">
</div>
</div>
<div class="table-row">
<div class="table-header-cell cell">
联系电话
</div>
<div class="table-content-cell cell">
</div>
</div>
<div class="table-row">
<div class="table-header-cell cell">
地址
</div>
<div class="table-content-cell cell">
</div>
</div>
</div>
<div class="table-right">
<div class="table-row">
<div class="table-header-cell cell">
液位
</div>
<div class="table-content-cell cell">
<div class="chart" ref="chart"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
// @ is an alias to /src
import {ref,reactive, toRefs, onMounted,nextTick} from "vue"
import {ElMessage} from "element-plus"
import api from "@/api/methods/index"
export default {
name: 'order-detail',
emits: ['update:modelValue'],
props: {
modelValue: {
type: Boolean,
default: false
},
order_id: {
type: String,
default: ''
},
},
setup(props, {emit}) {
const state = reactive({
detail: {
name: '三号路公共厕所GC-004',
poster: [
require("@/assets/img/banner-1.png"),
require("@/assets/img/banner-1.png"),
require("@/assets/img/banner-1.png"),
require("@/assets/img/banner-1.png"),
require("@/assets/img/banner-1.png"),
require("@/assets/img/banner-1.png"),
],
index: 0,
yewei:0.7
},
tabs: [
{
name: '点位基本信息',
value: 'base'
},
{
name: '历史数据',
value: 'history'
},
{
name: '监控画面',
value: 'monitor'
},
{
name: '工艺流程',
value: 'process'
},
{
name: '巡检工单',
value: 'order'
},
],
tab: 'base',
myChart:null
});
const chart = ref(null);
function getDetail() {
}
function close() {
emit('update:modelValue', false);
}
function tabActive(item) {
if (state.tab != item.value) {
state.tab = item.value;
}
}
function initGauge(){
state.myChart = echarts.init(chart.value);
let option = {
series: [
{
type: 'gauge',
progress: {
show: true,
width: 18,
itemStyle:{
color:'#3396fb',
}
},
pointer: {
icon: 'path://M2.9,0.7L2.9,0.7c1.4,0,2.6,1.2,2.6,2.6v115c0,1.4-1.2,2.6-2.6,2.6l0,0c-1.4,0-2.6-1.2-2.6-2.6V3.3C0.3,1.9,1.4,0.7,2.9,0.7z',
width: 4,
length: '60%',
offsetCenter: [0, '8%']
},
itemStyle:{
color:'#3396fb'
},
axisLine: {
lineStyle: {
width: 18
}
},
axisTick: {
show: true,
distance: 0,
},
splitLine: {
distance: 5,
length: 8,
lineStyle: {
width: 1,
color: '#999'
}
},
axisLabel: {
distance: 22,
color: '#999',
fontSize: 12
},
anchor: {
show: true,
showAbove: true,
size: 20,
itemStyle: {
borderWidth: 4,
borderColor: '#3396fb',
color:'#fff',
}
},
title: {
show: false
},
detail: {
valueAnimation: true,
fontSize: 24,
offsetCenter: [0, '85%'],
formatter(p){
return `{a|${p}m}\n{b|液位}`
},
rich: {
a: {
color: '#333',
lineHeight: 20,
fontSize:18
},
b: {
color: '#666',
lineHeight: 20,
fontSize:14
}
}
},
data: [
{
value: state.detail.yewei
}
],
radius:"95%",
max:1
}
]
};
state.myChart.setOption(option);
}
onMounted(async () => {
getDetail();
await nextTick(()=>{
initGauge();
})
});
return {
...toRefs(state),
close,
tabActive,
chart
}
},
components: {}
}
</script>
<style lang="less">
.order-detail {
position: absolute;
width: 100%;
height: 100%;
-webkit-user-select: none;
background-color: #fff;
display: flex;
flex-direction: column;
overflow: hidden;
z-index: 11;
.detail-header {
flex-shrink: 0;
height: 70px;
display: flex;
align-items: center;
justify-content: space-between;
background-color: #2d71e2;
color: #fff;
padding: 0 30px 0 20px;
.detail-title {
font-size: 20px;
}
.btn {
width: 80px;
line-height: 36px;
text-align: center;
background-color: #6c9ef1;
border-radius: 6px;
cursor: pointer;
font-size: 16px;
&:hover {
opacity: .8;
}
}
}
.tabs {
flex-shrink: 0;
padding: 0 40px;
.tab-one {
display: inline-flex;
align-items: center;
height: 70px;
color: #666;
cursor: pointer;
padding: 0 10px;
}
.selected {
position: relative;
color: #3396fb;
&:after {
content: '';
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 5px;
background-color: #3396fb;
}
}
}
.detail-body {
flex: 1;
display: flex;
flex-direction: column;
overflow: hidden;
background-color: #ebedef;
padding: 20px;
.body-one {
flex: 1;
display: flex;
flex-direction: column;
overflow: hidden;
background-color: #fff;
padding: 20px;
border-radius: 6px;
.poster {
flex-shrink: 0;
position: relative;
overflow: hidden;
.banner {
position: relative;
height: 480px;
z-index: 3;
.banner-bg {
display: block;
width: 1140px;
height: 100%;
background-repeat: no-repeat;
background-position: center;
background-size: cover;
margin: 0 auto;
}
}
.blur-mask {
position: absolute;
width: 100%;
display: block;
height: 480px;
background-repeat: no-repeat;
background-position: center;
background-size: cover;
filter: blur(5px);
z-index: 2;
}
}
.info {
flex: 1;
display: flex;
flex-direction: column;
background-color: #fff;
padding-top: 10px;
overflow: hidden;
.info-title {
flex-shrink: 0;
font-weight: bolder;
padding: 15px 0;
}
.info-content{
flex: 1;
overflow-y: auto;
.table {
flex-shrink: 0;
display: flex;
.table-left, .table-right {
flex: 1;
display: flex;
flex-direction: column;
overflow: hidden;
border-top: 1px solid #dfdfdf;
border-left: 1px solid #dfdfdf;
.table-header-cell {
min-width: 120px;
max-width: 180px;
font-weight: bolder;
}
.table-content-cell {
flex: 1;
min-width: 120px;
}
}
.table-right {
border-left: none
}
.table-row {
height: 100%;
display: flex;
overflow: hidden;
&:nth-child(even) {
background-color: #f7f8f8;
}
}
.cell {
display: inline-flex;
align-items: center;
min-height: 45px;
border-right: 1px solid #dfdfdf;
border-bottom: 1px solid #dfdfdf;
padding: 0 14px;
}
.chart{
flex: 1;
height: 100%;
}
}
}
}
}
}
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment