Commit 66735bd1 authored by 李翠鸿's avatar 李翠鸿

第二轮测试

parent 7c625929
......@@ -23,10 +23,11 @@
/*每个页面公共css */
page {
background-color: #f2f2f2;
font-family: PingFang TC;
font-family: 'PingFang TC';
/* padding:0 24rpx; */
}
// .uni-tabbar{
// box-shadow: 0px -8px 8px 0px rgba(220, 220, 220, 0.24);
......
......@@ -22,3 +22,65 @@
white-space: nowrap;
text-overflow: ellipsis;
}
@font-face {
font-family: "KaiTi";
src: url("fonts/KaiTi.ttf");
// font-weight: bold;
}
@font-face {
font-family: "PingFangSC";
src: url("fonts/PingFangMedium.ttf");
// font-weight: bold;
}
@font-face {
font-family: "SourceHanSansCN";
src: url("fonts/SourceHanSansCN-Medium.otf");
// font-weight: bold;
}
@font-face {
font-family:"FangSong";
src: url("fonts/FangSong.TTF");
// font-weight: bold;
}
@font-face {
font-family: "YouYuan";
src: url("fonts/YouYuan.TTF");
// font-weight: bold;
}
@font-face {
font-family: "FZShuTi";
src: url("fonts/FZShuTi.TTF");
// font-weight: bold;
}
@font-face {
font-family: "LiSu";
src: url("fonts/LiSu.TTF");
// font-weight: bold;
}
@font-face {
font-family: "FZYaoti";
src: url("fonts/FZYaoti.ttf");
// font-weight: bold;
}
@font-face {
font-family: "SimHei";
src: url("fonts/SimHei.TTF");
// font-weight: bold;
}
@font-face {
font-family: "Microsoft YaHei";
src: url("fonts/MicrosoftYaHei.ttf");
// font-weight: bold;
}
@font-face {
font-family: "SimSun";
src: url("fonts/SimSun.TTF");
// font-weight: bold;
}
......@@ -32,3 +32,34 @@ export const historyApiData = (startTime,date,variables,level,skipTime) => {
}
return getData
}
//统计数据源 startTime-开始时间,date-结束时间,variables-变量集合,level-时间层级,skipTime-是否分层,timeSetting-时间表类型
export const statisticApiData = (startTime,date,variables,level,skipTime,timeSetting) => {
let getData = {
"filterControls": [{
"value1": startTime,
"controlType": "AssociateDateTimePicker",
"pickerType": "BeginTime",
"name": "a1"
},
{
"value1": date,
"controlType": "AssociateDateTimePicker",
"pickerType": "EndTime",
"name": "a2"
}
],
"variables": variables,
"layoutSettings": level,
"skipTime":skipTime,
"sourceType": "Statistic",
"statisticsSettings": {
"shiftName": "AAA",
"valueMethod": "Origin",
"xAxisSetting": "Time",
"timeSetting":timeSetting,
"shiftsType": "All"
}
}
return getData
}
//8位hex颜色转rgba
export const getRgbaFun = (sHex,a) => {
export const getRgbaFun = (sHex, a) => {
// 十六进制颜色值的正则表达式
var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/
/* 16进制颜色转为RGB格式 */
......@@ -63,6 +63,17 @@ export const colorRgba = (sHex, a) => {
}
}
//判断字符串是否是数字
export const isNumber = (val) => {
var regPos = /^\d+(\.\d+)?$/; //非负浮点数
var regNeg = /^(-(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*)))$/; //负浮点数
if (regPos.test(val) || regNeg.test(val)) {
return true;
} else {
return false;
}
}
export const unique = (arr) => {
var newArr = [];
for (var i = 0; i < arr.length; i++) {
......@@ -197,7 +208,7 @@ export const getTimeType = (str) => {
type = 'Quarter'
} else if (str == '年') {
type = 'Year'
}else if(str == '最新'){
} else if (str == '最新') {
type = 'Second'
}
return type
......@@ -264,9 +275,13 @@ export const heavyCount = (list) => {
return list2
}
export const getBoxShadow = (boxShadow) => {
let str = boxShadow.horizontal + ' ' + boxShadow.vertical + ' ' + boxShadow.size + ' ' + boxShadow.color + ' ' +
boxShadow.location
export const getBoxShadow = (boxShadow,location) => {
let str = boxShadow.horizontal + ' ' + boxShadow.vertical + ' ' + boxShadow.size + ' ' + boxShadow.color
if(location){
str = str + ' ' + location
}else{
str += boxShadow.location?' '+boxShadow.location:''
}
return str
}
......
......@@ -6,6 +6,7 @@ import interceptor from './js/interceptor.js'
import api from './request/api.js'
import uView from "uview-ui"
import MyTooltip from './pages/common/tooltip.vue'
import TipsPage from './pages/common/tips-page.vue'
// import VConsole from 'vconsole'
// const vConsole = new VConsole()
......@@ -18,6 +19,7 @@ Vue.prototype.$toast = $
App.mpType = 'app'
Vue.component("my-tooltip", MyTooltip);
Vue.component("tips-page", TipsPage);
const app = new Vue({
...App,
......
......@@ -940,7 +940,7 @@
var Runsymbol
var ArrValue
var resValueNumber = data[j].Value
resValue = data[j].Value.toLowerCase()
resValue = data[j].Value
ArrValue = TextAnimation.Compare == null ?
TextAnimation.Compare : TextAnimation.Compare.toLowerCase()
Runsymbol = TextAnimation.Condition
......@@ -1541,7 +1541,7 @@
var Runsymbol
var ArrValue
var resValueNumber = Value
resValue = Value.toLowerCase()
resValue = Value
ArrValue = textColorListArr.Compare == null ? textColorListArr.Compare : textColorListArr.Compare
.toLowerCase()
Runsymbol = textColorListArr.Condition
......
......@@ -630,12 +630,16 @@
var wantnum;
var end = {};
setTimeout(() => {
// console.log(this.cavantable)
for (let i = 0; i < this.cavantable.length; i++) {
this.page[i] = {
pageIndex: 0,
pageNum: [1]
}
var z = 0;
if(!this.cavantable[i].ParameterReportItemtList) break
if(!this.cavantable[i].ParameterReportItemtList.dd) break
if (parseInt(this.cavantable[i].ParameterReportItemtList.dd.startpoy)) {
z = parseInt(this.cavantable[i].ParameterReportItemtList.dd.startpoy)
} else {
......
......@@ -63,7 +63,7 @@
styleConfig.margin = arrayToString(styleConfig.margin)
styleConfig.padding = arrayToString(styleConfig.padding)
styleConfig.borderRadius = arrayToString(styleConfig.borderRadius)
styleConfig.boxShadow = getBoxShadow(styleConfig.boxShadow)
// styleConfig.boxShadow = getBoxShadow(styleConfig.boxShadow)
let componentConfig = item.componentConfig
item.layout = item.componentConfig.layout
this.styleConfigList.push(styleConfig)
......
......@@ -7,8 +7,10 @@
:style="';width:'+(100/Number(layout.column))+'%'">
<view @click="jumpView(item1,index1)"
:style="'background:'+item1.color+';min-height: 30px;margin:6px;text-align: center;border-radius: 4px;'"
style="display: flex;justify-content: center;align-items: center;line-height: 20px;padding: 5px;">
<view>{{item1.title}}</view>
style="display: flex;justify-content: center;align-items: center;line-height: 20px;padding: 5px;height: calc(100% - 22px)">
<view style="height: 100%;display: flex;justify-content: center;align-items: center;">
<view> {{item1.title}}</view>
</view>
</view>
</view>
</view>
......@@ -56,10 +58,12 @@
styleConfig.margin = arrayToString(styleConfig.margin)
styleConfig.padding = arrayToString(styleConfig.padding)
styleConfig.borderRadius = arrayToString(styleConfig.borderRadius)
styleConfig.boxShadow = getBoxShadow(styleConfig.boxShadow)
// styleConfig.boxShadow = getBoxShadow(styleConfig.boxShadow)
let componentConfig = item.componentConfig
this.layout = componentConfig.layout
this.cardListData = componentConfig.list
// this.cardListData = componentConfig.list
this.cardListData = JSON.parse(JSON.stringify(componentConfig.list))
this.getTextHeightFun() //获取列表高度
item.layout = item.componentConfig.layout
this.styleConfigList.push(styleConfig)
this.componentList.push(item)
......@@ -73,6 +77,20 @@
url: '/pages/data/jump-view/index?viewName=' + item.pageName + '&viewId=' + item.pageId
});
// console.log(JSON.stringify(item.pageId))
},
getTextHeightFun() {
let cardListData = this.cardListData
let _this = this
// async cardListData.forEach((item,index1) => {
// this.$nextTick(function(){
// await uni.createSelectorQuery().in(this).select('.cardListText'+_this.index+'-'+index1).boundingClientRect((data) => {
// console.log(data)
// }) .exec();
// })
// })
},
getHistoryExternalData() {}
......
......@@ -57,7 +57,7 @@
styleConfig.padding = arrayToString(styleConfig.padding)
styleConfig.borderRadius = arrayToString(styleConfig.borderRadius)
// let boxShadow = styleConfig.boxShadow
styleConfig.boxShadow = getBoxShadow(styleConfig.boxShadow)
// styleConfig.boxShadow = getBoxShadow(styleConfig.boxShadow)
let componentConfig = this.componentsData.componentConfig
this.imgName = componentConfig.imgName
this.styleConfigList.push(styleConfig)
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<!-- 数据组件-选项卡 -->
<template>
<view :class="'tabs'+index">
<view :class="'tabs'+index" style="position: relative;">
<view :class="{'stopTop':stopTop,'data-conponent-style':stopTop}"
:style="stopTop?componentsData.styleConfig:''">
<view :style="{'height':theme=='theme3'?'40px':'auto'}">
......@@ -111,28 +111,6 @@
// windowHeight = res.windowHeight
windowHeight = res.screenHeight
// if(detail.y+40>= windowHeight){
// console.log(data.height)
// // let heightNum =data.height+140
// // console.log(heightNum)
// uni.pageScrollTo({
// scrollTop:3000,
// duration: 300
// });
// let obj = uni.createSelectorQuery(_this).select('.mainStyleConfigCalss')
// obj.boundingClientRect(function(data) { // data - 各种参数
// let detail = e.detail
// console.log(detail)
// if(detail.y+40>= windowHeight){
// console.log(data.height)
// // let heightNum =data.height+140
// // console.log(heightNum)
// uni.pageScrollTo({
// scrollTop:3000,
// duration: 300
// });
// }
// }).exec()
}
});
uni.pageScrollTo({
......@@ -152,19 +130,41 @@
this.isTooltip = false
},
//显示名称
showTips(e, item) {
async showTips(e, item) {
// console.log(this.componentsData)
let _this = this
let windowHeight = 665
await uni.getSystemInfo({
success: function (res) {
windowHeight = res.windowHeight
}
});
await uni.createSelectorQuery().in(this).select(".tabs"+_this.index).boundingClientRect((data) => {
console.log(e)
let dataHeight = data.height
let dataTop = data.top
let dataBottom = data.bottom
if (e.type == 'longpress') {
let lenHeight = item.name.length / 4 * 14
this.isTooltip = true
this.heightNum = lenHeight
_this.isTooltip = true
_this.heightNum = lenHeight
let changedTouche = e.changedTouches[0]
let target = e.target
let clientX = changedTouche.clientX - 30
let clientY = changedTouche.clientY - lenHeight - 60
this.topNum = clientY
this.leftNum = clientX
this.tooltipText = item.name
let currentTarget = e.currentTarget
let pageY = changedTouche.pageY
let pageX = changedTouche.pageX
_this.topNum = dataHeight+10
if(dataBottom+lenHeight+dataHeight>windowHeight){
_this.topNum = -dataHeight-lenHeight
}
_this.leftNum = changedTouche.clientX-4 * 14
_this.tooltipText = item.name
}
})
.exec();
},
//获取组件列表
......@@ -177,7 +177,7 @@
styleConfig.margin = arrayToString(styleConfig.margin)
styleConfig.padding = arrayToString(styleConfig.padding)
styleConfig.borderRadius = arrayToString(styleConfig.borderRadius)
styleConfig.boxShadow = getBoxShadow(styleConfig.boxShadow)
// styleConfig.boxShadow = getBoxShadow(styleConfig.boxShadow)
// this.$set(this.styleConfig,item.styleConfig)
// this.styleConfig = {
// "background-color":styleConfig.backgroundColor,
......
......@@ -49,7 +49,7 @@
styleConfig.margin = arrayToString(styleConfig.margin)
styleConfig.padding = arrayToString(styleConfig.padding)
styleConfig.borderRadius = arrayToString(styleConfig.borderRadius)
styleConfig.boxShadow = getBoxShadow(styleConfig.boxShadow)
// styleConfig.boxShadow = getBoxShadow(styleConfig.boxShadow)
let componentConfig = item.componentConfig
// componentConfig.textContent = componentConfig.textContent.replace(/'↵'/g, '<br/>')
this.$set(componentConfig.nameFormat,'textAlign',componentConfig.nameFormat.alignHorizontal)
......
......@@ -2,20 +2,26 @@
<template>
<view class="mainStyleConfigCalss" style="overflow:auto;height: auto;" :style="mainStyleConfig">
<view class="data-style data-conponent-style" v-if="isShowCompons" v-for="(item,index) in componentsChildren" :key="index" :style="item.styleConfig">
<view class="data-style data-conponent-style" v-if="isShowCompons" v-for="(item,index) in componentsChildren"
:key="index" :style="item.styleConfig">
<rectangular v-if="item.type == 'rectangular'" :ref="'rectangular'+index" :componentsData="item">
</rectangular>
<kpi v-if="item.type == 'kpi'" :ref="item.type+index" :componentsData="item" :index="index" imgType="0"></kpi>
<text-item v-if="item.type == 'text'" :ref="item.type+index" :componentsData="item" :index="index"></text-item>
<list-item v-if="item.type == 'list'" :ref="item.type+index" :index="index" :componentsData="item"></list-item>
<kpi v-if="item.type == 'kpi'" :ref="item.type+index" :componentsData="item" :index="index" imgType="0">
</kpi>
<text-item v-if="item.type == 'text'" :ref="item.type+index" :componentsData="item" :index="index">
</text-item>
<list-item v-if="item.type == 'list'" :ref="item.type+index" :index="index" :componentsData="item">
</list-item>
<progress-bar v-if="item.type == 'progressBar'" :ref="item.type+index" :index="index"
:componentsData="item"></progress-bar>
<pie-echart v-if="item.type == 'chartPie'" :ref="item.type+index" :componentsData="item" :index="index">
</pie-echart>
<line-bar-echart v-if="item.type == 'chartLineBar'" :ref="item.type+index" :index="index"
:componentsData="item"></line-bar-echart>
<banner v-if="item.type == 'banner'" :ref="item.type+index" :componentsData="item" :index="index" :homeViewName="homeViewName" @jump-view="jumpView"></banner>
<card-list v-if="item.type == 'cardList'" :ref="item.type+index" :index="index" :componentsData="item" @jump-view="jumpView">
<banner v-if="item.type == 'banner'" :ref="item.type+index" :componentsData="item" :index="index"
:homeViewName="homeViewName" @jump-view="jumpView"></banner>
<card-list v-if="item.type == 'cardList'" :ref="item.type+index" :index="index" :componentsData="item"
@jump-view="jumpView">
</card-list>
<tabs v-if="item.type == 'tabs'" :ref="item.type+index" :componentsData="item" :index="index"
@select-tab-fun="selectTabFun" class="tabs-box"></tabs>
......@@ -25,12 +31,15 @@
<button @click="test">fhsjsh</button>
</div> -->
</view>
<tips-page v-if="showTips" :text="tipsText"></tips-page>
</view>
</template>
<script>
import {
arrayToString,getBoxShadow
arrayToString,
getBoxShadow
} from '../../js/tool.js'
import jsonData from '../../js/test.json'
import Rectangular from '../data-conponent/rectangular.vue'
......@@ -71,10 +80,12 @@
newTagDataArr: '', //实时变量数据,
tagArr: [], //控件绑定变量集合
timer1: null, //实时定时轮询
timer2:null,//历史,统计、外部轮询
timer2: null, //历史,统计、外部轮询
realTimeList: [], //实时组件列表
historyExternalList: [], //历史、外部、统计组件列表
tabsList:[],//选项卡列表
tabsList: [], //选项卡列表
showTips: false,
tipsText: '暂无数据~'
// children:null
}
......@@ -88,12 +99,7 @@
onResize() {
try {
const res = uni.getSystemInfoSync();
console.log(res.model);
console.log(res.pixelRatio);
console.log(res.windowWidth);
console.log(res.windowHeight);
console.log(res.screenWidth);
console.log(res.screenHeight);
} catch (e) {
// error
......@@ -104,7 +110,7 @@
},
methods: {
//跳转页面
jumpView(){
jumpView() {
this.eliminateTimer()
// console.log('主页面')
},
......@@ -115,7 +121,7 @@
this.$nextTick(function() {
let filter = tabData.filter[0]
let content = filter.content
if(dataType == this.$store.state.dataType[3] || dataType == this.$store.state.dataType[2]){
if (dataType == this.$store.state.dataType[3] || dataType == this.$store.state.dataType[2]) {
content = tabData.filter
}
this.componentsChildren.forEach((item, index) => {
......@@ -133,12 +139,16 @@
//获取页面数据
getViewJson() {
let projectInfo = uni.getStorageSync('projectInfo')
console.log(JSON.stringify(projectInfo))
this.homeViewName = projectInfo.homeViewName
if(this.homeViewName.indexOf("\\")>-1){
this.homeViewName =this.homeViewName.substring(this.homeViewName.indexOf("\\")+1);
if (this.homeViewName.indexOf("\\") > -1) {
this.homeViewName = this.homeViewName.substring(this.homeViewName.indexOf("\\") + 1);
}
let homeViewId = projectInfo.homeViewId
if (!homeViewId) {
this.showTips = true
this.tipsText = '页面找不到,请重新刷新喔~'
return
}
this.projectName = projectInfo.projectName
this.tagArr = []
this.realTimeList = []
......@@ -147,9 +157,13 @@
this.componentsChildren = []
this.$api.getView(this.projectName, homeViewId).then(res => {
uni.stopPullDownRefresh();
if (res.data) {
// console.log(JSON.stringify(res.data))
this.componentsData = res.data
if (!res.data) {
this.showTips = true
this.tipsText = '页面找不到,请重新刷新喔~'
return
}
// console.log(JSON.parse(JSON.stringify(res.data)))
this.componentsData = JSON.parse(JSON.stringify(res.data))
let _this = this
let realTime = 0
let showHistoryExternal = 0
......@@ -161,8 +175,19 @@
let componentConfig = children[i].componentConfig
let styleConfig = children[i].styleConfig
let widthList = JSON.parse(JSON.stringify(styleConfig.margin))
let width = parseFloat(styleConfig.width)+parseFloat(widthList[1])+parseFloat(widthList[3])
styleConfig.width = (width>100?parseFloat(styleConfig.width)-(width-100):parseFloat(styleConfig.width))+'%'
let width = parseFloat(styleConfig.width) + parseFloat(widthList[1]) + parseFloat(
widthList[3]) //获取组件总长度
styleConfig.width = (width > 100 ? parseFloat(styleConfig.width) - (width - 100) :
parseFloat(styleConfig.width)) + '%' //计算组件的宽度
if (styleConfig.boxShadow.internal && styleConfig.boxShadow.internal) {
let internal = getBoxShadow(styleConfig.boxShadow.internal, 'inset')
let external = getBoxShadow(styleConfig.boxShadow.external)
styleConfig.boxShadow = internal + ',' + external
} else {
styleConfig.boxShadow = getBoxShadow(styleConfig.boxShadow)
}
// console.log(styleConfig)
if (componentConfig) {
if (componentConfig.dataset) {
let dataset = componentConfig.dataset
......@@ -170,7 +195,9 @@
realTime = 1
let refName = children[i].type + i
this.realTimeList.push(refName)
} else if(dataset.dataType == this.$store.state.dataType[1] || dataset.dataType == this.$store.state.dataType[2] || dataset.dataType == this.$store.state.dataType[3]){
} else if (dataset.dataType == this.$store.state.dataType[1] || dataset
.dataType == this.$store.state.dataType[2] || dataset.dataType == this
.$store.state.dataType[3]) {
showHistoryExternal = 1
let refName = children[i].type + i
this.historyExternalList.push(refName)
......@@ -184,10 +211,10 @@
})
}
}
if(children[i].type == 'tabs'){
if (children[i].type == 'tabs') {
this.tabsList.push({
index:i,
name:children[i].type+i
index: i,
name: children[i].type + i
})
}
}
......@@ -218,8 +245,7 @@
}, 6000)
}
}
}
}).catch(err=>{
}).catch(err => {
uni.stopPullDownRefresh();
this.$toast.toast(err)
})
......@@ -281,7 +307,7 @@
},
//添加定时器
getTimer(){
getTimer() {
this.eliminateTimer()
console.log('添加定时器')
this.timer1 = setInterval(() => {
......@@ -292,7 +318,7 @@
}, 6000)
},
//消除定时器
eliminateTimer(){
eliminateTimer() {
console.log('消除定时器')
if (this.timer1) {
clearInterval(Number(this.timer1))
......@@ -311,13 +337,13 @@
},
//监听页面滚动
onPageScroll:function(e) { //nvue暂不支持滚动监听,可用bindingx代替
onPageScroll: function(e) { //nvue暂不支持滚动监听,可用bindingx代替
// console.log("滚动距离为:" + e.scrollTop);
// let _this = this
// console.log(this.tabsList)
let tabsList = this.tabsList
for(let i=0;i<tabsList.length;i++){
this.$refs[tabsList[i].name][0].shopTop(e.scrollTop,tabsList[i].name,tabsList[i].index)
for (let i = 0; i < tabsList.length; i++) {
this.$refs[tabsList[i].name][0].shopTop(e.scrollTop, tabsList[i].name, tabsList[i].index)
}
},
......@@ -330,7 +356,7 @@
// }, 1000);
},
onShow() {
this.$nextTick(function(){
this.$nextTick(function() {
this.getTimer()
})
// this.getViewJson()
......@@ -352,6 +378,11 @@
beforeDestroy() {
this.eliminateTimer()
},
onLoad() {
// #ifdef APP-PLUS
plus.screen.lockOrientation('portrait-primary'); //锁定
// #endif
}
}
</script>
......@@ -368,6 +399,7 @@
// min-height: 100%;
// background: red;
}
.stopTop {
position: fixed;
top: 50px;
......
......@@ -97,9 +97,13 @@
},
onLoad(option){
console.log(6473)
console.log(JSON.stringify(option))
this.homeViewName = option.viewName
this.homeViewId = option.viewId
// #ifdef APP-PLUS
plus.screen.lockOrientation('portrait-primary'); //锁定
// #endif
// this.getViewJson()
},
methods: {
......@@ -110,7 +114,6 @@
//添加定时器
getTimer(){
this.eliminateTimer()
console.log('添加定时器1')
this.timer1 = setInterval(() => {
this.postRediusTestFun(this.tagArr)
}, 3000)
......@@ -120,7 +123,6 @@
},
//选项卡点击 dataType-数据类型 associatedComponent-绑定控件ID tabData点击选项卡筛选数据
selectTabFun(dataType, associatedComponent, tabData) {
console.log(tabData)
// if (dataType === '历史数据') {
this.$nextTick(function() {
let filter = tabData.filter[0]
......@@ -145,12 +147,12 @@
getViewJson() {
let projectInfo = uni.getStorageSync('projectInfo')
// this.homeViewName = projectInfo.homeViewName
if(this.homeViewName && this.homeViewName.indexOf("\\")>-1){
this.homeViewName =this.homeViewName.substring(this.homeViewName.indexOf("\\")+1);
}
if(this.homeViewName.indexOf('.view')< 0){
this.homeViewName = this.homeViewName +'.view'
}
// if(this.homeViewName && this.homeViewName.indexOf("\\")>-1){
// this.homeViewName =this.homeViewName.substring(this.homeViewName.indexOf("\\")+1);
// }
// if(this.homeViewName.indexOf('.view')< 0){
// this.homeViewName = this.homeViewName +'.view'
// }
// this.homeViewName = '标准组件'
// console.log(JSON.stringify(projectInfo))
this.projectName = projectInfo.projectName
......@@ -162,8 +164,9 @@
this.$api.getView(this.projectName, this.homeViewId).then(res => {
uni.stopPullDownRefresh();
if (res.data) {
console.log(res.data)
this.componentsData = res.data
console.log(JSON.parse(JSON.stringify(res.data)))
this.componentsData = JSON.parse(JSON.stringify(res.data))
console.log(this.componentsData)
let _this = this
let realTime = 0
let showHistoryExternal = 0
......@@ -177,6 +180,13 @@
let widthList = JSON.parse(JSON.stringify(styleConfig.margin))
let width = parseFloat(styleConfig.width)+parseFloat(widthList[1])+parseFloat(widthList[3])
styleConfig.width = (width>100?parseFloat(styleConfig.width)-(width-100):parseFloat(styleConfig.width))+'%'
if(styleConfig.boxShadow.internal && styleConfig.boxShadow.external){
let internal = getBoxShadow(styleConfig.boxShadow.internal,'inset')
let external = getBoxShadow(styleConfig.boxShadow.external)
styleConfig.boxShadow = internal+','+external
}else{
styleConfig.boxShadow = getBoxShadow(styleConfig.boxShadow)
}
if (componentConfig) {
if (componentConfig.dataset) {
let dataset = componentConfig.dataset
......@@ -353,6 +363,7 @@
// }
},
}
</script>
......
......@@ -33,8 +33,8 @@
data() {
return {
height: '100vh',
userName: 'SuperAdmin',
password: 'SYC888888',
userName: '',
password: '',
logoImg: '../../static/img/hello.png'
}
},
......
<!-- 消息页面 -->
<template>
<view></view>
<view>
<tips-page :text="'功能开发中,请敬请期待~'"></tips-page>
</view>
</template>
<script>
......
<!-- 监控列表页面 -->
<template>
<view class="page-view">
<view>
<view v-if="!showTips" class="page-view">
<view v-for="(item,index) in dataList" :key="index" style="margin-bottom: 10px;">
<collapse :data="item" @collaspe-item-fun="getMonitoringViewInfo"></collapse>
</view>
</view>
<tips-page v-if="showTips" :text="'暂无配置~'"></tips-page>
</view>
</template>
<script>
......@@ -16,8 +19,9 @@
},
data() {
return {
projectName:'',
dataList: []
projectName: '',
dataList: [],
showTips: false
}
},
......@@ -34,10 +38,11 @@
let title = item.SCMSChildMenuKey
let id = item.SCMSChildMenuID
uni.navigateTo({
url: '/pages/monitoring/monitoring-view/index?id=' + id + '&title=' + title+'&projectName='+this.projectName
url: '/pages/monitoring/monitoring-view/index?id=' + id + '&title=' + title +
'&projectName=' + this.projectName
})
}else{
} else {
this.$toast.toast('此菜单不是监控画面,不可查看')
}
......@@ -91,9 +96,14 @@
// this.$store.state.routerInfo = JSON.stringify(data.data)
uni.removeStorageSync('routerChildMenusInfo')
uni.setStorageSync('routerChildMenusInfo', childMenus);
if (mainMenus.length <= 0) {
this.showTips = true
}
// const value = uni.getStorageSync('routerChildMenusInfo');
// console.log(childMenus)
mainMenus.sort(function(a, b){return a.SCMSMainMenuKey - b.SCMSMainMenuKey});
// console.log(mainMenus)
mainMenus.sort(function(a, b) {
return a.SCMSMainMenuRank - b.SCMSMainMenuRank
});
let lastVistInfos = data1.lastVistInfos
mainMenus.forEach(item => {
item.title = item.SCMSMainMenuName
......@@ -101,14 +111,20 @@
for (let i = 0; i < childMenus.length; i++) {
let childMenusItem = childMenus[i]
let SCMSChildMenuKey = childMenusItem.SCMSChildMenuKey
let SCMSChildMenuRank = childMenusItem.SCMSChildMenuRank
if (childMenusItem.SCMSMainMenuID == item.SCMSMainMenuID) {
childMenusItem.img = '../../static/img1/jiankongBg.png'
childMenusItem.textTitle = childMenusItem.SCMSChildMenuName
childMenusItem.textTime = lastVistInfos[SCMSChildMenuKey]?lastVistInfos[SCMSChildMenuKey].lastTime:null
childMenusItem.textTime = lastVistInfos[SCMSChildMenuKey] ?
lastVistInfos[SCMSChildMenuKey].lastTime : null
item.textList.push(childMenusItem)
}
}
item.textList.sort(function(a, b) {
return a.SCMSChildMenuRank - b.SCMSChildMenuRank
});
})
this.dataList = mainMenus
......
......@@ -307,13 +307,10 @@
},
//图表历史,业务数据初始化查询
async initEchart() {
console.log('434=>')
this.$nextTick(() => {
// console.log('444=>'+JSON.stringify(this.$refs.queryButton25.dataValue))
let queryButtonList = this.$refs.queryButton25.dataValue
queryButtonList.forEach((item, index) => {
console.log('434=>545434')
this.searchBtnFun(item)
})
......@@ -340,15 +337,26 @@
}
var myPicker = new Set(picker)
var pickerArray = [...myPicker]
let dataValue = this.$refs.dataTimePicker282.dataValue
let dataValue = this.$refs.dataTimePicker282.dataValue //时间控件
let ComboboxList = this.$refs.combobox299.dataValue //下拉控件
console.log(ComboboxList)
let getDataTimeList = {}
for (let i = 0; i < dataValue.length; i++) {
for (let j = 0; j < pickerArray.length; j++) {
if (dataValue[i].class == pickerArray[j]) {
getDataTimeList[pickerArray[j]] = {
getDataTimeList[dataValue[i].class] = {
Value: dataValue[i].value
}
// for (let j = 0; j < pickerArray.length; j++) {
// if (dataValue[i].class == pickerArray[j]) {
// getDataTimeList[pickerArray[j]] = {
// Value: dataValue[i].value
// }
// }
// }
}
for (let i = 0; i < ComboboxList.length; i++) {
let ComboboxData = ComboboxList[i]
getDataTimeList[ComboboxData.class] = {
Value: ComboboxData.value
}
}
let queryChartData = {
......@@ -682,7 +690,7 @@
// this.initEchart()
setTimeout(() => {
this.initEchart()
},1000)
}, 1000)
// this.$nextTick(function(){
// })
......
......@@ -2,6 +2,7 @@
<template>
<view class="charts-box">
<!-- <qiun-data-charts type="column" :chartData="chartData" /> -->
<tips-page :text="'功能开发中,请敬请期待~'"></tips-page>
</view>
</template>
......@@ -66,6 +67,10 @@
}
</script>
<style>
<style lang="scss" scoped>
.charts-box{
position: relative;
height: 100%;
}
</style>
......@@ -136,6 +136,11 @@ function getStartTime(time,recent,setting){
return api.baseRequest(`/api/Data/GetTime?endTime=${time}&recent=${recent}&setting=${setting}`,"GET",1)
}
//获取最新时间点数据
function getNewest(data){
return api.baseRequest(`/api/Data/GetNewest`,"POST",1,data)
}
export default {
......@@ -164,8 +169,7 @@ export default {
getGlobalProps,
getQueryMulitySource,
getStartTime,
checkTag
checkTag,
getNewest
}
......@@ -70,8 +70,8 @@ const store = new Vuex.Store({
// #ifndef APP-PLUS || APP-NVUE
uni.removeStorageSync('projectInfo');
// let projectName = 'http://192.168.1.85:5000/api/view/GetAppInfo?projectName=0826APP项目A'
let projectName = 'http://192.168.1.85:5002/api/view/GetAppInfo?projectName=Test02'
// let projectName = 'http://192.168.1.85:5000/api/view/GetAppInfo?projectName=测试项目'
// let projectName = 'http://192.168.1.85:5002/api/view/GetAppInfo?projectName=Test02'
let projectName = 'http://192.168.1.85:5000/api/view/GetAppInfo?projectName=测试项目'
$api.getAppInfo(projectName).then(res => {
const code = res.data.code
if (code == 1) {
......
......@@ -58,13 +58,13 @@ module.exports = {
}
for (let i in res) {
let value = '--'
if (res[i].data !== null) {
if (res[i].value != null) {
if(isNaN(res[i].axisValueLabel)&&!isNaN(Date.parse(res[i].axisValueLabel))){
//   result += res[0].axisValueLabel
}else{
result += res[i].axisValueLabel
}
value = res[i].data
value = res[i].value
// #ifdef H5
result += '\n' + res[i].seriesName + ':' + value
// #endif
......@@ -77,6 +77,33 @@ module.exports = {
}
return result;
},
webTooltipfun1:function(res){
console.log(res)
let result = ''
// if(isNaN(res[0].axisValueLabel)&&!isNaN(Date.parse(res[0].axisValueLabel))){
//   result += res[0].axisValueLabel
// }
// for (let i in res) {
// let value = '--'
// if (res[i].data !== null) {
// if(isNaN(res[i].axisValueLabel)&&!isNaN(Date.parse(res[i].axisValueLabel))){
// //   result += res[0].axisValueLabel
// }else{
// result += res[i].axisValueLabel
// }
// value = res[i].data
// // #ifdef H5
// result += '\n' + res[i].seriesName + ':' + value
// // #endif
// // #ifdef APP-PLUS
// result += '<br/>' + res[i].marker + res[i].seriesName + ':' + value
// // #endif
// }
// }
return res;
},
legendFormat: function(name) {
return "自定义图例+" + name;
},
......
......@@ -2,7 +2,7 @@
var isReady=false;var onReadyCallbacks=[];
var isServiceReady=false;var onServiceReadyCallbacks=[];
var __uniConfig = {"pages":["pages/scan-code/index","pages/login/index","pages/monitoring/index","pages/data/index","pages/working/index","pages/message/index","pages/my/index","pages/monitoring/monitoring-view/index","pages/scan-code/app-scan/index","pages/data/jump-view/index"],"window":{"navigationBarTextStyle":"white","navigationBarTitleText":"cms","navigationBarBackgroundColor":"#00B2A5","backgroundColor":"#f2f2f2","pageOrientation":"portrait-primary"},"tabBar":{"color":"#2D2D2D","selectedColor":"#2D2D2D","borderStyle":"rgba(220, 220, 220, 0.24)","backgroundColor":"#ffffff","height":"50px","fontSize":"10px","iconWidth":"22px","spacing":"2px","list":[{"pagePath":"pages/monitoring/index","iconPath":"static/img1/jiankong.png","selectedIconPath":"static/img1/jiankong1.png","text":"监控"},{"pagePath":"pages/data/index","iconPath":"static/img1/shuju.png","selectedIconPath":"static/img1/shuju1.png","text":"数据"},{"pagePath":"pages/working/index","iconPath":"static/img1/gongzuo.png","selectedIconPath":"static/img1/gongzuo1.png","text":"工作"},{"pagePath":"pages/message/index","iconPath":"static/img1/xiaoxi.png","selectedIconPath":"static/img1/xiaoxi1.png","text":"消息","backgroundColor":"#000"},{"pagePath":"pages/my/index","iconPath":"static/img1/wo.png","selectedIconPath":"static/img1/wo1.png","text":"我的"}]},"nvueCompiler":"uni-app","nvueStyleCompiler":"uni-app","renderer":"auto","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":false},"appname":"SYC","compilerVersion":"3.1.22","entryPagePath":"pages/scan-code/index","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000}};
var __uniRoutes = [{"path":"/pages/scan-code/index","meta":{"isQuit":true},"window":{"navigationBarTitleText":"扫码","titleNView":false}},{"path":"/pages/login/index","meta":{},"window":{"titleNView":false}},{"path":"/pages/monitoring/index","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"监控"}},{"path":"/pages/data/index","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"数据"}},{"path":"/pages/working/index","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"工作"}},{"path":"/pages/message/index","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"消息"}},{"path":"/pages/my/index","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"我的"}},{"path":"/pages/monitoring/monitoring-view/index","meta":{},"window":{"titleNView":false,"bounce":false}},{"path":"/pages/scan-code/app-scan/index","meta":{"isNVue":true},"window":{"navigationBarTitleText":"扫码"}},{"path":"/pages/data/jump-view/index","meta":{},"window":{}}];
var __uniRoutes = [{"path":"/pages/scan-code/index","meta":{"isQuit":true},"window":{"navigationBarTitleText":"扫码","titleNView":false}},{"path":"/pages/login/index","meta":{},"window":{"titleNView":false}},{"path":"/pages/monitoring/index","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"监控"}},{"path":"/pages/data/index","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"数据","enablePullDownRefresh":true}},{"path":"/pages/working/index","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"工作"}},{"path":"/pages/message/index","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"消息"}},{"path":"/pages/my/index","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"我的"}},{"path":"/pages/monitoring/monitoring-view/index","meta":{},"window":{"titleNView":false,"bounce":false}},{"path":"/pages/scan-code/app-scan/index","meta":{"isNVue":true},"window":{"navigationBarTitleText":"扫码"}},{"path":"/pages/data/jump-view/index","meta":{},"window":{"enablePullDownRefresh":true}}];
__uniConfig.onReady=function(callback){if(__uniConfig.ready){callback()}else{onReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"ready",{get:function(){return isReady},set:function(val){isReady=val;if(!isReady){return}const callbacks=onReadyCallbacks.slice(0);onReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
__uniConfig.onServiceReady=function(callback){if(__uniConfig.serviceReady){callback()}else{onServiceReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"serviceReady",{get:function(){return isServiceReady},set:function(val){isServiceReady=val;if(!isServiceReady){return}const callbacks=onServiceReadyCallbacks.slice(0);onServiceReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
service.register("uni-app-config",{create(a,b,c){if(!__uniConfig.viewport){var d=b.weex.config.env.scale,e=b.weex.config.env.deviceWidth,f=Math.ceil(e/d);Object.assign(__uniConfig,{viewport:f,defaultFontSize:Math.round(f/20)})}return{instance:{__uniConfig:__uniConfig,__uniRoutes:__uniRoutes,global:void 0,window:void 0,document:void 0,frames:void 0,self:void 0,location:void 0,navigator:void 0,localStorage:void 0,history:void 0,Caches:void 0,screen:void 0,alert:void 0,confirm:void 0,prompt:void 0,fetch:void 0,XMLHttpRequest:void 0,WebSocket:void 0,webkit:void 0,print:void 0}}}});
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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