styles(): 样式优化
parent
051881323a
commit
849ee99c3f
|
|
@ -1,399 +1,444 @@
|
||||||
<template>
|
<template>
|
||||||
<view :style="{height:'100vh',overflow:'hidden',backgroundColor:'#fff'}">
|
<view :style="{height:'100vh',overflow:'hidden',backgroundColor:'#fff'}">
|
||||||
<u-status-bar></u-status-bar>
|
<u-status-bar></u-status-bar>
|
||||||
<u-navbar title="安全监测" :autoBack="true" :titleStyle="{
|
<u-navbar title="安全监测" :autoBack="true" :titleStyle="{
|
||||||
fontSize:'18px'
|
fontSize:'18px'
|
||||||
}" :height='44' :safeAreaInsetTop=true leftIconSize='20' leftIconColor='rgb(153, 153, 153)'>
|
}" :height='44' :safeAreaInsetTop=true leftIconSize='20' leftIconColor='rgb(153, 153, 153)'>
|
||||||
</u-navbar>
|
</u-navbar>
|
||||||
<picker @change="bindPickerChange" :range="array" range-key="profileName" style="margin-top:50px;padding: 0 10px;">
|
<picker @change="bindPickerChange" :range="array" range-key="profileName" style="margin-top:50px;padding: 0 10px;">
|
||||||
<view class="uni-input12" >
|
<view class="uni-input12">
|
||||||
<view>{{profileName}}</view>
|
<view>{{profileName}}</view>
|
||||||
<u-icon name="arrow-down-fill" color="#000" size="15" ></u-icon>
|
<u-icon name="arrow-down-fill" color="#000" size="15"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
</picker>
|
</picker>
|
||||||
|
|
||||||
<view class="jcsj-box">
|
<view class="jcsj-box">
|
||||||
<view class="time-ranger" >
|
<view class="time-ranger">
|
||||||
<view class="start-time">
|
<view class="start-time">
|
||||||
<text>开始时间</text>
|
<text>开始时间</text>
|
||||||
<text @click="showTime=true" style="margin-left:15%;color:#3399ef">{{stm}}</text>
|
<text @click="showTime=true" style="margin-left:15%;color:#3399ef">{{stm}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="end-time">
|
<view class="end-time">
|
||||||
<text>结束时间</text>
|
<text>结束时间</text>
|
||||||
<text @click="showTime1=true" style="margin:0 15%;color:#3399ef">{{etm}}</text>
|
<text @click="showTime1=true" style="margin:0 15%;color:#3399ef">{{etm}}</text>
|
||||||
<view class="search-btn" @click="searchHandle">
|
<view class="search-btn" @click="searchHandle">
|
||||||
搜索
|
搜索
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view class="jcsj-content">
|
<view class="jcsj-content">
|
||||||
<view class="tool-btn">
|
<view class="tool-btn">
|
||||||
<view class="scale-btn">
|
<view class="scale-btn">
|
||||||
<button style="margin-right:10px" @click="fd">+</button>
|
<u-button style="margin-right:10px" @click="fd" class="aqjc-custom-style">+</u-button>
|
||||||
<button @click="sx">-</button>
|
<u-button @click="sx" class="aqjc-custom-style">-</u-button>
|
||||||
|
</view>
|
||||||
|
<view class="play-btn">
|
||||||
|
<uni-icons type="videocam" size="40" @click="play"></uni-icons>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="play-btn">
|
<view class="jcsj-charts">
|
||||||
<uni-icons type="videocam" size="40" @click="play"></uni-icons>
|
<movable-area :style="areaStyle">
|
||||||
|
<movable-view @scale="scale" direction="all" :scale-value="scaleValue" scale-min="0.5" scale="true"
|
||||||
|
scale-max="4" out-of-bounds="true">
|
||||||
|
<qiun-data-charts :chartData="chartData.chartData" :echartsApp="true" :eopts="chartData.eopts" />
|
||||||
|
</movable-view>
|
||||||
|
</movable-area>
|
||||||
|
</view>
|
||||||
|
<view style="margin-top: 20px;">
|
||||||
|
<JcsjTable :columns="columns" :data="dataSources" :newCol="newCol" :cols2="cols2" />
|
||||||
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
<u-datetime-picker :show="showTime" v-model="startTime" mode="datetime" @confirm="handleStartTime"
|
||||||
<view class="jcsj-charts" >
|
@cancel="showTime=false"></u-datetime-picker>
|
||||||
<movable-area :style="areaStyle">
|
<u-datetime-picker :show="showTime1" v-model="endTime" mode="datetime" @confirm="handleEndTime"
|
||||||
<movable-view @scale="scale" direction="all" :scale-value="scaleValue" scale-min="0.5" scale="true" scale-max="4" out-of-bounds="true">
|
@cancel="showTime1=false"></u-datetime-picker>
|
||||||
<qiun-data-charts :chartData="chartData.chartData" :echartsApp="true" :eopts="chartData.eopts" />
|
|
||||||
</movable-view>
|
|
||||||
</movable-area>
|
|
||||||
</view>
|
|
||||||
<view style="margin-top: 20px;">
|
|
||||||
<JcsjTable :columns="columns" :data="dataSources" :newCol="newCol" :cols2="cols2"/>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<u-datetime-picker
|
</view>
|
||||||
:show="showTime"
|
|
||||||
v-model="startTime"
|
|
||||||
mode="datetime"
|
|
||||||
@confirm="handleStartTime"
|
|
||||||
@cancel="showTime=false"
|
|
||||||
></u-datetime-picker>
|
|
||||||
<u-datetime-picker
|
|
||||||
:show="showTime1"
|
|
||||||
v-model="endTime"
|
|
||||||
mode="datetime"
|
|
||||||
@confirm="handleEndTime"
|
|
||||||
@cancel="showTime1=false"
|
|
||||||
></u-datetime-picker>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import moment from "moment"
|
import moment from "moment"
|
||||||
import drpOption from './jrxOptions';
|
import drpOption from './jrxOptions';
|
||||||
import JcsjTable from "./jcsjTable"
|
import JcsjTable from "./jcsjTable"
|
||||||
const stm = moment().subtract(1, 'days').add(1, 'hour').set({minute: 0, second: 0}).format("YYYY-MM-DD HH:mm");
|
const stm = moment().subtract(1, 'days').add(1, 'hour').set({
|
||||||
const etm = moment().add(1, 'hour').set({minute: 0, second: 0}).format("YYYY-MM-DD HH:mm");
|
minute: 0,
|
||||||
export default {
|
second: 0
|
||||||
|
}).format("YYYY-MM-DD HH:mm");
|
||||||
|
const etm = moment().add(1, 'hour').set({
|
||||||
|
minute: 0,
|
||||||
|
second: 0
|
||||||
|
}).format("YYYY-MM-DD HH:mm");
|
||||||
|
export default {
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
startTime:stm,
|
startTime: stm,
|
||||||
endTime:etm,
|
endTime: etm,
|
||||||
stm,
|
stm,
|
||||||
etm,
|
etm,
|
||||||
showTime:false,
|
showTime: false,
|
||||||
showTime1:false,
|
showTime1: false,
|
||||||
array:[],
|
array: [],
|
||||||
profileCode:'',
|
profileCode: '',
|
||||||
dbType:'',
|
dbType: '',
|
||||||
trData:[],
|
trData: [],
|
||||||
dataSources:[],
|
dataSources: [],
|
||||||
chartData: {chartData:{},eopts:{}},
|
chartData: {
|
||||||
areaStyle:{left:"-450px"},
|
chartData: {},
|
||||||
scaleValue:0.5,
|
eopts: {}
|
||||||
swiper:false,
|
|
||||||
timer:100,
|
|
||||||
columns:[],
|
|
||||||
cols1:[
|
|
||||||
{
|
|
||||||
title: '序号',
|
|
||||||
key: 'index',
|
|
||||||
width: 60,
|
|
||||||
align: 'center',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '时间',
|
|
||||||
key: 'time',
|
|
||||||
width: 120,
|
|
||||||
align: 'center',
|
|
||||||
},
|
|
||||||
{ title: '库水位(m)', key: 'rz', dataIndex: 'rz', width: 150, align: "center" },
|
|
||||||
],
|
|
||||||
cols2:[
|
|
||||||
{title: '结果分析', key: 'status', dataIndex: 'status', width: 150, align: "center",}
|
|
||||||
],
|
|
||||||
newCol:[]
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
components:{
|
areaStyle: {
|
||||||
|
left: "-450px"
|
||||||
|
},
|
||||||
|
scaleValue: 0.5,
|
||||||
|
swiper: false,
|
||||||
|
timer: 100,
|
||||||
|
columns: [],
|
||||||
|
cols1: [{
|
||||||
|
title: '序号',
|
||||||
|
key: 'index',
|
||||||
|
width: 60,
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '时间',
|
||||||
|
key: 'time',
|
||||||
|
width: 120,
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '库水位(m)',
|
||||||
|
key: 'rz',
|
||||||
|
dataIndex: 'rz',
|
||||||
|
width: 150,
|
||||||
|
align: "center"
|
||||||
|
},
|
||||||
|
],
|
||||||
|
cols2: [{
|
||||||
|
title: '结果分析',
|
||||||
|
key: 'status',
|
||||||
|
dataIndex: 'status',
|
||||||
|
width: 150,
|
||||||
|
align: "center",
|
||||||
|
}],
|
||||||
|
newCol: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
components: {
|
||||||
JcsjTable
|
JcsjTable
|
||||||
},
|
},
|
||||||
computed:{
|
computed: {
|
||||||
profileName(){
|
profileName() {
|
||||||
if(this.array.length > 0){
|
if (this.array.length > 0) {
|
||||||
return this.array.find(item => item.profileCode == this.profileCode).profileName;
|
return this.array.find(item => item.profileCode == this.profileCode).profileName;
|
||||||
}else{
|
} else {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
profileCode: {
|
||||||
|
handler(newVal, oldVal) {
|
||||||
|
if (newVal) {
|
||||||
|
let name = this.array.find(item => item.profileCode == newVal).profileName;
|
||||||
|
this.dbType = name == "大坝B0+060" ? "1" :
|
||||||
|
name == "大坝B0+090" ? "2" :
|
||||||
|
name == "大坝B0+120" ? "2" : '1'
|
||||||
|
this.getDmTree();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
watch:{
|
immediate: true,
|
||||||
profileCode:{
|
},
|
||||||
handler(newVal, oldVal) {
|
trData: {
|
||||||
if(newVal){
|
handler(newVal, oldVal) {
|
||||||
let name = this.array.find(item => item.profileCode == newVal).profileName;
|
if (newVal) {
|
||||||
this.dbType = name == "大坝B0+060" ? "1" :
|
this.getTableData()
|
||||||
name == "大坝B0+090" ? "2" :
|
}
|
||||||
name == "大坝B0+120" ? "2" : '1'
|
},
|
||||||
}
|
deep: true,
|
||||||
},
|
},
|
||||||
immediate: true,
|
dataSources: {
|
||||||
},
|
handler(newVal, oldVal) {
|
||||||
trData:{
|
if (newVal) {
|
||||||
handler(newVal, oldVal) {
|
this.chartData = {
|
||||||
if(newVal){
|
...drpOption(newVal[0], this.dbType)
|
||||||
this.getTableData()
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
deep: true,
|
deep: true,
|
||||||
},
|
immediate: true,
|
||||||
dataSources:{
|
},
|
||||||
handler(newVal, oldVal) {
|
swiper(newVal) {
|
||||||
if(newVal){
|
console.log("ww", newVal);
|
||||||
this.chartData = {...drpOption(newVal[0],this.dbType)}
|
|
||||||
}
|
if (newVal) {
|
||||||
},
|
this.InitialScroll(this.dataSources)
|
||||||
deep: true,
|
} else {
|
||||||
immediate: true,
|
clearInterval(this.timer)
|
||||||
},
|
}
|
||||||
swiper(newVal){
|
}
|
||||||
console.log("ww", newVal);
|
},
|
||||||
|
methods: {
|
||||||
if(newVal){
|
InitialScroll(data) {
|
||||||
this.InitialScroll(this.dataSources)
|
let index = 0;
|
||||||
}else{
|
this.timer = setInterval(() => {
|
||||||
clearInterval(this.timer)
|
console.log("data", data[index % data.length]);
|
||||||
|
|
||||||
|
this.chartData = {
|
||||||
|
...drpOption(data[index % data.length], this.dbType)
|
||||||
|
}
|
||||||
|
index++;
|
||||||
|
}, 1000)
|
||||||
|
},
|
||||||
|
// 播放
|
||||||
|
play() {
|
||||||
|
this.swiper = !this.swiper;
|
||||||
|
},
|
||||||
|
// 放大回调
|
||||||
|
fd() {
|
||||||
|
if (this.scaleValue == 4) {
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
this.scaleValue += 0.1;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 缩小回调
|
||||||
|
sx() {
|
||||||
|
if (this.scaleValue == 0.5) {
|
||||||
|
return ''
|
||||||
|
} else {
|
||||||
|
this.scaleValue -= 0.1;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 缩放
|
||||||
|
scale(e) {
|
||||||
|
this.areaStyle.left = -(e.detail.scale + 1) * 450 + 'px';
|
||||||
|
},
|
||||||
|
searchHandle() {
|
||||||
|
this.getTableData();
|
||||||
|
},
|
||||||
|
handleStartTime(e) {
|
||||||
|
let time = moment(e.value).format("YYYY-MM-DD HH:mm")
|
||||||
|
console.log("time", time);
|
||||||
|
|
||||||
|
this.stm = time
|
||||||
|
this.showTime = false
|
||||||
|
},
|
||||||
|
handleEndTime(e) {
|
||||||
|
let time = moment(e.value).format("YYYY-MM-DD HH:mm")
|
||||||
|
this.etm = time;
|
||||||
|
this.showTime1 = false
|
||||||
|
},
|
||||||
|
handleRanger(e) {
|
||||||
|
console.log(e);
|
||||||
|
this.tm = [...e]
|
||||||
|
},
|
||||||
|
bindPickerChange(e) {
|
||||||
|
this.profileCode = this.array[e.target.value].profileCode
|
||||||
|
},
|
||||||
|
// 获取监测点数据
|
||||||
|
async getMonthData() {
|
||||||
|
try {
|
||||||
|
const {
|
||||||
|
data
|
||||||
|
} = await uni.$http.post(
|
||||||
|
`/gunshiApp/xyt/attDamProfile/list`, )
|
||||||
|
if (data.code == 200) {
|
||||||
|
this.array = data.data
|
||||||
|
this.profileCode = data.data[0].profileCode;
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
uni.$showMsg();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// 获取坝面上点位数据
|
||||||
|
async getTableData() {
|
||||||
|
try {
|
||||||
|
const {
|
||||||
|
data
|
||||||
|
} = await uni.$http.post(
|
||||||
|
"/gunshiApp/xyt/osmoticPressR/infiltra/line", {
|
||||||
|
stationCodes: this.trData,
|
||||||
|
dateTimeRangeSo: {
|
||||||
|
start: moment(this.stm).format("YYYY-MM-DD HH:mm:00"),
|
||||||
|
end: moment(this.etm).format("YYYY-MM-DD HH:mm:00"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
)
|
||||||
methods:{
|
if (data.code == 200) {
|
||||||
InitialScroll(data){
|
let newArr = [];
|
||||||
let index = 0;
|
let newData = data.data.map((s, i) => {
|
||||||
this.timer = setInterval(() => {
|
newArr.push(s.list.map(c => ({
|
||||||
console.log("data",data[index % data.length]);
|
[c.stationCode]: c.value || '-',
|
||||||
|
tm: c.tm,
|
||||||
this.chartData = {...drpOption(data[index % data.length],this.dbType)}
|
|
||||||
index++;
|
|
||||||
},1000)
|
|
||||||
},
|
|
||||||
// 播放
|
|
||||||
play(){
|
|
||||||
this.swiper = !this.swiper;
|
|
||||||
},
|
|
||||||
// 放大回调
|
|
||||||
fd(){
|
|
||||||
if(this.scaleValue == 4){
|
|
||||||
return;
|
|
||||||
}else{
|
|
||||||
this.scaleValue += 0.1;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 缩小回调
|
|
||||||
sx(){
|
|
||||||
if(this.scaleValue == 0.5){
|
|
||||||
return''
|
|
||||||
}else{
|
|
||||||
this.scaleValue -= 0.1;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 缩放
|
|
||||||
scale(e){
|
|
||||||
this.areaStyle.left = -(e.detail.scale + 1) * 450 + 'px';
|
|
||||||
},
|
|
||||||
searchHandle(){
|
|
||||||
this.getTableData();
|
|
||||||
},
|
|
||||||
handleStartTime(e){
|
|
||||||
let time = moment(e.value).format("YYYY-MM-DD HH:mm")
|
|
||||||
console.log("time",time);
|
|
||||||
|
|
||||||
this.stm = time
|
|
||||||
this.showTime = false
|
|
||||||
},
|
|
||||||
handleEndTime(e){
|
|
||||||
let time = moment(e.value).format("YYYY-MM-DD HH:mm")
|
|
||||||
this.etm = time;
|
|
||||||
this.showTime1 = false
|
|
||||||
},
|
|
||||||
handleRanger(e){
|
|
||||||
console.log(e);
|
|
||||||
this.tm = [...e]
|
|
||||||
},
|
|
||||||
bindPickerChange(e) {
|
|
||||||
this.profileCode = this.array[e.target.value].profileCode
|
|
||||||
},
|
|
||||||
// 获取监测点数据
|
|
||||||
async getMonthData(){
|
|
||||||
try{
|
|
||||||
const {data} = await uni.$http.post(
|
|
||||||
`/gunshiApp/xyt/attDamProfile/list`,)
|
|
||||||
if(data.code == 200){
|
|
||||||
this.array =data.data
|
|
||||||
this.profileCode = data.data[0].profileCode;
|
|
||||||
}
|
|
||||||
}catch(e){
|
|
||||||
uni.$showMsg();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
// 获取坝面上点位数据
|
})))
|
||||||
async getTableData(){
|
return {
|
||||||
try {
|
tm: s.tm,
|
||||||
const {data} = await uni.$http.post(
|
rz: s.rz,
|
||||||
"/gunshiApp/xyt/osmoticPressR/infiltra/line",
|
status: s.status || '',
|
||||||
{
|
inx: i + 1
|
||||||
stationCodes:this.trData,
|
}
|
||||||
dateTimeRangeSo:
|
})
|
||||||
{
|
let filterData = newArr.filter(s => s.length > 0).flat()
|
||||||
start:moment(this.stm).format("YYYY-MM-DD HH:mm:00"),
|
let result = newData.map(s => {
|
||||||
end:moment(this.etm).format("YYYY-MM-DD HH:mm:00"),
|
let tm1 = s.tm;
|
||||||
}
|
let r = filterData.filter(t => {
|
||||||
}
|
return t.tm == tm1
|
||||||
)
|
})
|
||||||
if(data.code == 200){
|
let obj = {};
|
||||||
let newArr = [];
|
r.forEach(s1 => {
|
||||||
let newData = data.data.map((s, i) => {
|
obj = {
|
||||||
newArr.push(s.list.map(c => ({
|
...s1,
|
||||||
[c.stationCode]: c.value || '-',
|
...obj
|
||||||
tm: c.tm,
|
|
||||||
|
|
||||||
})))
|
|
||||||
return {
|
|
||||||
tm: s.tm,
|
|
||||||
rz: s.rz,
|
|
||||||
status: s.status || '',
|
|
||||||
inx:i+1
|
|
||||||
}
|
|
||||||
})
|
|
||||||
let filterData = newArr.filter(s => s.length > 0).flat()
|
|
||||||
let result = newData.map(s => {
|
|
||||||
let tm1 = s.tm;
|
|
||||||
let r = filterData.filter(t => {
|
|
||||||
return t.tm == tm1
|
|
||||||
})
|
|
||||||
let obj = {};
|
|
||||||
r.forEach(s1 => {
|
|
||||||
obj = {...s1,...obj}
|
|
||||||
})
|
|
||||||
return {
|
|
||||||
...s,
|
|
||||||
...obj,
|
|
||||||
}
|
|
||||||
})
|
|
||||||
let res1 = result.map(item => ({...item,rz:(item.rz - 100).toFixed(2)})) //为了测试 最后需要删除
|
|
||||||
this.dataSources = [...res1];
|
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
uni.$showMsg();
|
|
||||||
}
|
}
|
||||||
},
|
})
|
||||||
// 获取各点
|
return {
|
||||||
async getDmTree(){
|
...s,
|
||||||
try {
|
...obj,
|
||||||
const {data} = await uni.$http.post("/gunshiApp/xyt/attDamProfile/tree")
|
}
|
||||||
if(data.code == 200){
|
})
|
||||||
console.log("data",data);
|
let res1 = result.map(item => ({
|
||||||
|
...item,
|
||||||
let filterData = data.data.filter(s => s.profileCode == this.profileCode)
|
rz: (item.rz - 100).toFixed(2)
|
||||||
this.trData = filterData[0]?.children;
|
})) //为了测试 最后需要删除
|
||||||
const newCol = filterData[0]?.children.map(s => ({
|
this.dataSources = [...res1];
|
||||||
title: `${s}(m)`,
|
}
|
||||||
key: s,
|
} catch (error) {
|
||||||
dataIndex: s,
|
uni.$showMsg();
|
||||||
width: 150,
|
}
|
||||||
align: "center",
|
},
|
||||||
}))
|
// 获取各点
|
||||||
this.columns=[...this.cols1,...newCol,...this.cols2]
|
async getDmTree() {
|
||||||
this.newCol = newCol;
|
try {
|
||||||
}
|
const {
|
||||||
} catch (error) {
|
data
|
||||||
uni.$showMsg();
|
} = await uni.$http.post("/gunshiApp/xyt/attDamProfile/tree")
|
||||||
}
|
if (data.code == 200) {
|
||||||
},
|
console.log("data", data);
|
||||||
|
|
||||||
// 拖动回调
|
let filterData = data.data.filter(s => s.profileCode == this.profileCode)
|
||||||
onChange(e){
|
this.trData = filterData[0].children;
|
||||||
console.log(e);
|
const newCol = filterData[0].children.map(s => ({
|
||||||
},
|
title: `${s}(m)`,
|
||||||
},
|
key: s,
|
||||||
mounted() {
|
dataIndex: s,
|
||||||
this.getMonthData()
|
width: 150,
|
||||||
this.getDmTree()
|
align: "center",
|
||||||
},
|
}))
|
||||||
}
|
this.columns = [...this.cols1, ...newCol, ...this.cols2]
|
||||||
|
this.newCol = newCol;
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
uni.$showMsg();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// 拖动回调
|
||||||
|
onChange(e) {
|
||||||
|
console.log(e);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.getMonthData()
|
||||||
|
this.getDmTree()
|
||||||
|
},
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.uni-input12{
|
.uni-input12 {
|
||||||
display:flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
column-gap: 30px;
|
column-gap: 30px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding:5px 0;
|
padding: 5px 0;
|
||||||
border: 1px solid #f2f2f2;
|
border: 1px solid #f2f2f2;
|
||||||
border-left: none;
|
border-left: none;
|
||||||
border-right: none;
|
border-right: none;
|
||||||
// background-image: '../../static/images/';
|
// background-image: '../../static/images/';
|
||||||
}
|
|
||||||
.jcsj-box{
|
|
||||||
padding: 0 10px;
|
|
||||||
.time-ranger{
|
|
||||||
// display: flex;
|
|
||||||
// align-items: center;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
.start-time, .end-time{
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
padding: 10px 0;
|
|
||||||
border-bottom: 1px solid #dfdfdf;
|
|
||||||
}
|
|
||||||
.search-btn{
|
|
||||||
margin: 3px 0 0 5px;
|
|
||||||
// color: #3399ef;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
.jcsj-content{
|
|
||||||
max-height:100vh;
|
.jcsj-box {
|
||||||
width: 100%;
|
padding: 0 10px;
|
||||||
overflow-y:auto;
|
|
||||||
overflow-x: hidden;
|
.time-ranger {
|
||||||
.tool-btn{
|
// display: flex;
|
||||||
display: flex;
|
// align-items: center;
|
||||||
justify-content: space-between;
|
margin-bottom: 10px;
|
||||||
align-items: "center";
|
|
||||||
padding: 5px ;
|
.start-time,
|
||||||
.scale-btn{
|
.end-time {
|
||||||
display: flex;
|
display: flex;
|
||||||
button{
|
align-items: center;
|
||||||
height: 40px;
|
padding: 10px 0;
|
||||||
|
border-bottom: 1px solid #dfdfdf;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-btn {
|
||||||
|
margin: 3px 0 0 5px;
|
||||||
|
// color: #3399ef;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.jcsj-content {
|
||||||
|
max-height: 100vh;
|
||||||
|
width: 100%;
|
||||||
|
overflow-y: auto;
|
||||||
|
overflow-x: hidden;
|
||||||
|
|
||||||
|
.tool-btn {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: "center";
|
||||||
|
padding: 5px;
|
||||||
|
|
||||||
|
.scale-btn {
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
button {
|
||||||
|
height: 40px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.jcsj-charts {
|
||||||
|
width: 1310px;
|
||||||
|
height: 250px;
|
||||||
|
overflow-y: auto;
|
||||||
|
|
||||||
|
// margin-top: 20px;
|
||||||
|
&>movable-area {
|
||||||
|
height: 250px;
|
||||||
|
width: 3000px;
|
||||||
|
// position:fixed;
|
||||||
|
overflow: hidden;
|
||||||
|
z-index: 1000;
|
||||||
|
background-color: #efefef;
|
||||||
|
|
||||||
|
movable-view {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
width: 1310px;
|
||||||
|
height: 380px;
|
||||||
|
background-color: #fff;
|
||||||
|
left: 450px;
|
||||||
|
top: 10px
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.active {
|
||||||
|
border-color: #68bbff !important;
|
||||||
|
color: #68bbff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.aqjc-custom-style {
|
||||||
|
width: 80rpx;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.jcsj-charts{
|
|
||||||
width: 1310px;
|
|
||||||
height: 250px;
|
|
||||||
overflow-y: auto;
|
|
||||||
// margin-top: 20px;
|
|
||||||
&>movable-area {
|
|
||||||
height: 250px;
|
|
||||||
width: 3000px;
|
|
||||||
// position:fixed;
|
|
||||||
overflow: hidden;
|
|
||||||
z-index: 1000;
|
|
||||||
background-color: #efefef;
|
|
||||||
movable-view{
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
width: 1310px;
|
|
||||||
height: 380px;
|
|
||||||
background-color: #fff;
|
|
||||||
left:450px;
|
|
||||||
top:10px
|
|
||||||
}}
|
|
||||||
.active{
|
|
||||||
border-color: #68bbff !important;
|
|
||||||
color: #68bbff;
|
|
||||||
}}
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|
@ -40,10 +40,9 @@
|
||||||
<view class="warn">
|
<view class="warn">
|
||||||
<sk-info />
|
<sk-info />
|
||||||
</view>
|
</view>
|
||||||
<view class="warn" v-for="item in Ylzlist" :key="item.stnm">
|
<view class="warn1" v-for="item in Ylzlist" :key="item.stnm">
|
||||||
<ylz-list :item='item' />
|
<ylz-list :item='item' />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="info_24"
|
<view class="info_24"
|
||||||
:style="{display:'flex',justifyContent:'center',alignItems:'center',padding:'5px 0',margin:'0'}">
|
:style="{display:'flex',justifyContent:'center',alignItems:'center',padding:'5px 0',margin:'0'}">
|
||||||
<image :style="{width:'20px',height:'20px',marginRight:'10px'}" src="../../static/logoc.png"></image>
|
<image :style="{width:'20px',height:'20px',marginRight:'10px'}" src="../../static/logoc.png"></image>
|
||||||
|
|
@ -56,7 +55,7 @@
|
||||||
import moment from 'moment'
|
import moment from 'moment'
|
||||||
const stm = moment().startOf('year').format("YYYY-MM-DD HH:mm:ss");
|
const stm = moment().startOf('year').format("YYYY-MM-DD HH:mm:ss");
|
||||||
const etm = moment().format("YYYY-MM-DD HH:mm:ss");
|
const etm = moment().format("YYYY-MM-DD HH:mm:ss");
|
||||||
const warnStm = moment().subtract(1,"days").format("YYYY-MM-DD HH:mm:ss")
|
const warnStm = moment().subtract(1, "days").format("YYYY-MM-DD HH:mm:ss")
|
||||||
const warnetm = moment().format("YYYY-MM-DD HH:mm:ss")
|
const warnetm = moment().format("YYYY-MM-DD HH:mm:ss")
|
||||||
import SkInfo from '../skInfo/index.vue'
|
import SkInfo from '../skInfo/index.vue'
|
||||||
import YlzList from '../ylzList/index.vue'
|
import YlzList from '../ylzList/index.vue'
|
||||||
|
|
@ -134,7 +133,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
getYlzList() {
|
getYlzList() {
|
||||||
uni.$http.post('/gunshiApp/xyt/stPptnRReal/list').then(res => {
|
uni.$http.post('/gunshiApp/xyt/stPptnRReal/list').then(res => {
|
||||||
if (res.data.code == 200) {
|
if (res.data.code == 200) {
|
||||||
|
|
@ -207,8 +206,8 @@
|
||||||
"pageNumber": 1
|
"pageNumber": 1
|
||||||
},
|
},
|
||||||
"dateTimeRangeSo": {
|
"dateTimeRangeSo": {
|
||||||
start:stm,
|
start: stm,
|
||||||
end:etm
|
end: etm
|
||||||
},
|
},
|
||||||
"isHandle": 0,
|
"isHandle": 0,
|
||||||
"inspectUserId": uni.getStorageSync('value').userId
|
"inspectUserId": uni.getStorageSync('value').userId
|
||||||
|
|
@ -226,12 +225,17 @@
|
||||||
async getYjData() {
|
async getYjData() {
|
||||||
const params = {
|
const params = {
|
||||||
start: warnStm,
|
start: warnStm,
|
||||||
end:warnetm
|
end: warnetm
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
const res = await uni.$http.post("/gunshiApp/xyt/stQxWarnR/home/warn", params)
|
const res = await uni.$http.post("/gunshiApp/xyt/stQxWarnR/home/warn", params)
|
||||||
const {flowWarn,pressWarn,qxWarn,shiftWarn} = res.data.data
|
const {
|
||||||
const arr = [...flowWarn,...pressWarn,...qxWarn,...shiftWarn]
|
flowWarn,
|
||||||
|
pressWarn,
|
||||||
|
qxWarn,
|
||||||
|
shiftWarn
|
||||||
|
} = res.data.data
|
||||||
|
const arr = [...flowWarn, ...pressWarn, ...qxWarn, ...shiftWarn]
|
||||||
if (arr.length > 0) {
|
if (arr.length > 0) {
|
||||||
this.warnStatus = true
|
this.warnStatus = true
|
||||||
}
|
}
|
||||||
|
|
@ -259,6 +263,7 @@
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.container {
|
.container {
|
||||||
|
position: relative;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
line-height: 24px;
|
line-height: 24px;
|
||||||
background-color: #f3f5f8;
|
background-color: #f3f5f8;
|
||||||
|
|
@ -337,11 +342,19 @@
|
||||||
background: #fff;
|
background: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.warn1 {
|
||||||
|
padding: 18rpx 20rpx;
|
||||||
|
text-align: left;
|
||||||
|
// margin-bottom: 12rpx;
|
||||||
|
background: #fff;
|
||||||
|
}
|
||||||
.info_24 {
|
.info_24 {
|
||||||
|
width: 100%;
|
||||||
|
// position: fixed;
|
||||||
// padding: 15px;
|
// padding: 15px;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
// margin-bottom: 12rpx;
|
// margin-bottom: 12rpx;
|
||||||
// height: 40px;
|
height: 100px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title .line {
|
.title .line {
|
||||||
|
|
|
||||||
|
|
@ -23,14 +23,14 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view style="height:calc(100vh - 150px);overflow: auto;" v-if='list.length !== 0'>
|
<view style="height:calc(100vh - 150px);overflow: auto;" v-if='list.length !== 0'>
|
||||||
<view class="" v-for="(item,index) in list" :key="index"
|
<view class="" v-for="(item,index) in list" :key="index" @click="toDetail(item)"
|
||||||
style="margin:10px;background-color: #fff;padding: 10px;">
|
style="margin:10px;background-color: #fff;padding: 10px;">
|
||||||
<view class="item">
|
<view class="item">
|
||||||
<!-- {{item.title}} -->
|
<!-- {{item.title}} -->
|
||||||
<view class="title">
|
<view class="title">
|
||||||
{{item.taskTitle}}
|
{{item.taskTitle}}
|
||||||
</view>
|
</view>
|
||||||
<view class="titleRight" @click="toDetail(item)">
|
<view class="titleRight" >
|
||||||
<view class="border">
|
<view class="border">
|
||||||
{{item.isHandle==1?'已处理':'待处理'}}
|
{{item.isHandle==1?'已处理':'待处理'}}
|
||||||
</view>
|
</view>
|
||||||
|
|
|
||||||
|
|
@ -21,13 +21,13 @@
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view class="" style='overflow: auto;max-height:calc(100vh - 180px)' v-if="list.length !== 0">
|
<view class="" style='overflow: auto;max-height:calc(100vh - 180px)' v-if="list.length !== 0">
|
||||||
<view class="" v-for="(item,i) in list" :key="i" style="background-color: #fff;margin-top:10px;padding: 10px;">
|
<view class="" v-for="(item,i) in list" :key="i" @click="toDetail(item)" style="background-color: #fff;margin-top:10px;padding: 10px;">
|
||||||
<view class="item">
|
<view class="item">
|
||||||
<!-- {{item.title}} -->
|
<!-- {{item.title}} -->
|
||||||
<view class="title">
|
<view class="title">
|
||||||
{{item.taskTitle}}
|
{{item.taskTitle}}
|
||||||
</view>
|
</view>
|
||||||
<view class="titleRight" @click="toDetail(item)">
|
<view class="titleRight" >
|
||||||
<view class="border">
|
<view class="border">
|
||||||
{{status[item.status]}}
|
{{status[item.status]}}
|
||||||
</view>
|
</view>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
|
|
||||||
import echarts from 'echarts/lib/echarts';
|
import echarts from 'echarts/lib/echarts';
|
||||||
|
import { format } from 'echarts/lib/export';
|
||||||
export default function DrpOption(data,num) {
|
export default function DrpOption(data,num) {
|
||||||
const minL = Math.floor(Math.min(...data?.map(s => s.q)));
|
const minL = Math.floor(Math.min(...data?.map(s => s.q)));
|
||||||
const maxL = Math.ceil(Math.max(...data?.map(s => s.q)));
|
const maxL = Math.ceil(Math.max(...data?.map(s => s.q)));
|
||||||
|
|
@ -20,8 +21,8 @@ export default function DrpOption(data,num) {
|
||||||
},
|
},
|
||||||
grid: {
|
grid: {
|
||||||
top: '20%',
|
top: '20%',
|
||||||
left: '10%',
|
left: '7%',
|
||||||
right: '14%',
|
right: '11%',
|
||||||
bottom: '10%',
|
bottom: '10%',
|
||||||
borderWidth: 0
|
borderWidth: 0
|
||||||
},
|
},
|
||||||
|
|
@ -40,7 +41,8 @@ export default function DrpOption(data,num) {
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
color: '#333',
|
color: '#333',
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
formatter: val => val.substr(0,'2020-11-11 11:11'.length)
|
// formatter: val => val.substr(0,'2020-11-11 11:11'.length)
|
||||||
|
format:"waterXaxis"
|
||||||
},
|
},
|
||||||
axisLine: {
|
axisLine: {
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
|
|
@ -57,7 +59,10 @@ export default function DrpOption(data,num) {
|
||||||
{
|
{
|
||||||
type: 'value',
|
type: 'value',
|
||||||
position: 'left',
|
position: 'left',
|
||||||
name:"流量(m³/s)",
|
name: "流量(m³/s)",
|
||||||
|
nameTextStyle: {
|
||||||
|
padding: [0, 0, 0, 30]
|
||||||
|
},
|
||||||
splitLine: {
|
splitLine: {
|
||||||
show: true,
|
show: true,
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
|
|
|
||||||
|
|
@ -22,13 +22,13 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="" v-if="list.length !== 0" style="height:calc(100vh - 180px);overflow: auto;">
|
<view class="" v-if="list.length !== 0" style="height:calc(100vh - 180px);overflow: auto;">
|
||||||
<view class="" v-for="item in list" style="margin: 10px;background-color: #fff;padding: 10px;" >
|
<view class="" v-for="(item,i) in list" @click="toDetail(item)" :key="i" style="margin: 10px;background-color: #fff;padding: 10px;" >
|
||||||
<view class="item">
|
<view class="item">
|
||||||
<!-- {{item.title}} -->
|
<!-- {{item.title}} -->
|
||||||
<view class="title">
|
<view class="title">
|
||||||
{{item.taskTitle}}
|
{{item.taskTitle}}
|
||||||
</view>
|
</view>
|
||||||
<view class="titleRight" @click="toDetail(item)">
|
<view class="titleRight" >
|
||||||
<view class="border">
|
<view class="border">
|
||||||
{{isHandle==0?'已处理':'待处理'}}
|
{{isHandle==0?'已处理':'待处理'}}
|
||||||
</view>
|
</view>
|
||||||
|
|
|
||||||
|
|
@ -21,13 +21,13 @@
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view class="" style='overflow: auto;height:calc(100vh - 150px)' v-if="list.length !== 0">
|
<view class="" style='overflow: auto;height:calc(100vh - 150px)' v-if="list.length !== 0">
|
||||||
<view class="" v-for="(item,i) in list" :key="i" style="background-color: #fff;margin-top:10px;padding: 10px;">
|
<view class="" v-for="(item,i) in list" :key="i" @click="toDetail(item)" style="background-color: #fff;margin-top:10px;padding: 10px;">
|
||||||
<view class="item">
|
<view class="item">
|
||||||
<!-- {{item.title}} -->
|
<!-- {{item.title}} -->
|
||||||
<view class="title">
|
<view class="title">
|
||||||
{{item.taskTitle}}
|
{{item.taskTitle}}
|
||||||
</view>
|
</view>
|
||||||
<view class="titleRight" @click="toDetail(item)">
|
<view class="titleRight" >
|
||||||
<view class="border">
|
<view class="border">
|
||||||
{{status[item.status]}}
|
{{status[item.status]}}
|
||||||
</view>
|
</view>
|
||||||
|
|
|
||||||
|
|
@ -97,6 +97,9 @@ const cfe = {
|
||||||
return value
|
return value
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"waterXaxis": function (val) {
|
||||||
|
return val.substr(0,'2020-11-11 11:11'.length)
|
||||||
|
},
|
||||||
yAxisFormatDemo:function (value, index) {
|
yAxisFormatDemo:function (value, index) {
|
||||||
return value + '元';
|
return value + '元';
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue