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

第二轮测试

parent 7c625929
...@@ -23,9 +23,10 @@ ...@@ -23,9 +23,10 @@
/*每个页面公共css */ /*每个页面公共css */
page { page {
background-color: #f2f2f2; background-color: #f2f2f2;
font-family: PingFang TC; font-family: 'PingFang TC';
/* padding:0 24rpx; */ /* padding:0 24rpx; */
} }
// .uni-tabbar{ // .uni-tabbar{
// box-shadow: 0px -8px 8px 0px rgba(220, 220, 220, 0.24); // box-shadow: 0px -8px 8px 0px rgba(220, 220, 220, 0.24);
......
...@@ -21,4 +21,66 @@ ...@@ -21,4 +21,66 @@
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
\ No newline at end of file
@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) => { ...@@ -32,3 +32,34 @@ export const historyApiData = (startTime,date,variables,level,skipTime) => {
} }
return getData 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 //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})$/ var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/
/* 16进制颜色转为RGB格式 */ /* 16进制颜色转为RGB格式 */
...@@ -63,6 +63,17 @@ export const colorRgba = (sHex, a) => { ...@@ -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) => { export const unique = (arr) => {
var newArr = []; var newArr = [];
for (var i = 0; i < arr.length; i++) { for (var i = 0; i < arr.length; i++) {
...@@ -197,7 +208,7 @@ export const getTimeType = (str) => { ...@@ -197,7 +208,7 @@ export const getTimeType = (str) => {
type = 'Quarter' type = 'Quarter'
} else if (str == '年') { } else if (str == '年') {
type = 'Year' type = 'Year'
}else if(str == '最新'){ } else if (str == '最新') {
type = 'Second' type = 'Second'
} }
return type return type
...@@ -264,9 +275,13 @@ export const heavyCount = (list) => { ...@@ -264,9 +275,13 @@ export const heavyCount = (list) => {
return list2 return list2
} }
export const getBoxShadow = (boxShadow) => { export const getBoxShadow = (boxShadow,location) => {
let str = boxShadow.horizontal + ' ' + boxShadow.vertical + ' ' + boxShadow.size + ' ' + boxShadow.color + ' ' + let str = boxShadow.horizontal + ' ' + boxShadow.vertical + ' ' + boxShadow.size + ' ' + boxShadow.color
boxShadow.location if(location){
str = str + ' ' + location
}else{
str += boxShadow.location?' '+boxShadow.location:''
}
return str return str
} }
......
...@@ -6,6 +6,7 @@ import interceptor from './js/interceptor.js' ...@@ -6,6 +6,7 @@ import interceptor from './js/interceptor.js'
import api from './request/api.js' import api from './request/api.js'
import uView from "uview-ui" import uView from "uview-ui"
import MyTooltip from './pages/common/tooltip.vue' import MyTooltip from './pages/common/tooltip.vue'
import TipsPage from './pages/common/tips-page.vue'
// import VConsole from 'vconsole' // import VConsole from 'vconsole'
// const vConsole = new VConsole() // const vConsole = new VConsole()
...@@ -18,6 +19,7 @@ Vue.prototype.$toast = $ ...@@ -18,6 +19,7 @@ Vue.prototype.$toast = $
App.mpType = 'app' App.mpType = 'app'
Vue.component("my-tooltip", MyTooltip); Vue.component("my-tooltip", MyTooltip);
Vue.component("tips-page", TipsPage);
const app = new Vue({ const app = new Vue({
...App, ...App,
......
...@@ -940,7 +940,7 @@ ...@@ -940,7 +940,7 @@
var Runsymbol var Runsymbol
var ArrValue var ArrValue
var resValueNumber = data[j].Value var resValueNumber = data[j].Value
resValue = data[j].Value.toLowerCase() resValue = data[j].Value
ArrValue = TextAnimation.Compare == null ? ArrValue = TextAnimation.Compare == null ?
TextAnimation.Compare : TextAnimation.Compare.toLowerCase() TextAnimation.Compare : TextAnimation.Compare.toLowerCase()
Runsymbol = TextAnimation.Condition Runsymbol = TextAnimation.Condition
...@@ -1541,7 +1541,7 @@ ...@@ -1541,7 +1541,7 @@
var Runsymbol var Runsymbol
var ArrValue var ArrValue
var resValueNumber = Value var resValueNumber = Value
resValue = Value.toLowerCase() resValue = Value
ArrValue = textColorListArr.Compare == null ? textColorListArr.Compare : textColorListArr.Compare ArrValue = textColorListArr.Compare == null ? textColorListArr.Compare : textColorListArr.Compare
.toLowerCase() .toLowerCase()
Runsymbol = textColorListArr.Condition Runsymbol = textColorListArr.Condition
......
...@@ -630,12 +630,16 @@ ...@@ -630,12 +630,16 @@
var wantnum; var wantnum;
var end = {}; var end = {};
setTimeout(() => { setTimeout(() => {
// console.log(this.cavantable)
for (let i = 0; i < this.cavantable.length; i++) { for (let i = 0; i < this.cavantable.length; i++) {
this.page[i] = { this.page[i] = {
pageIndex: 0, pageIndex: 0,
pageNum: [1] pageNum: [1]
} }
var z = 0; var z = 0;
if(!this.cavantable[i].ParameterReportItemtList) break
if(!this.cavantable[i].ParameterReportItemtList.dd) break
if (parseInt(this.cavantable[i].ParameterReportItemtList.dd.startpoy)) { if (parseInt(this.cavantable[i].ParameterReportItemtList.dd.startpoy)) {
z = parseInt(this.cavantable[i].ParameterReportItemtList.dd.startpoy) z = parseInt(this.cavantable[i].ParameterReportItemtList.dd.startpoy)
} else { } else {
......
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
styleConfig.margin = arrayToString(styleConfig.margin) styleConfig.margin = arrayToString(styleConfig.margin)
styleConfig.padding = arrayToString(styleConfig.padding) styleConfig.padding = arrayToString(styleConfig.padding)
styleConfig.borderRadius = arrayToString(styleConfig.borderRadius) styleConfig.borderRadius = arrayToString(styleConfig.borderRadius)
styleConfig.boxShadow = getBoxShadow(styleConfig.boxShadow) // styleConfig.boxShadow = getBoxShadow(styleConfig.boxShadow)
let componentConfig = item.componentConfig let componentConfig = item.componentConfig
item.layout = item.componentConfig.layout item.layout = item.componentConfig.layout
this.styleConfigList.push(styleConfig) this.styleConfigList.push(styleConfig)
......
...@@ -7,8 +7,10 @@ ...@@ -7,8 +7,10 @@
:style="';width:'+(100/Number(layout.column))+'%'"> :style="';width:'+(100/Number(layout.column))+'%'">
<view @click="jumpView(item1,index1)" <view @click="jumpView(item1,index1)"
:style="'background:'+item1.color+';min-height: 30px;margin:6px;text-align: center;border-radius: 4px;'" :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;"> style="display: flex;justify-content: center;align-items: center;line-height: 20px;padding: 5px;height: calc(100% - 22px)">
<view>{{item1.title}}</view> <view style="height: 100%;display: flex;justify-content: center;align-items: center;">
<view> {{item1.title}}</view>
</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -56,10 +58,12 @@ ...@@ -56,10 +58,12 @@
styleConfig.margin = arrayToString(styleConfig.margin) styleConfig.margin = arrayToString(styleConfig.margin)
styleConfig.padding = arrayToString(styleConfig.padding) styleConfig.padding = arrayToString(styleConfig.padding)
styleConfig.borderRadius = arrayToString(styleConfig.borderRadius) styleConfig.borderRadius = arrayToString(styleConfig.borderRadius)
styleConfig.boxShadow = getBoxShadow(styleConfig.boxShadow) // styleConfig.boxShadow = getBoxShadow(styleConfig.boxShadow)
let componentConfig = item.componentConfig let componentConfig = item.componentConfig
this.layout = componentConfig.layout 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 item.layout = item.componentConfig.layout
this.styleConfigList.push(styleConfig) this.styleConfigList.push(styleConfig)
this.componentList.push(item) this.componentList.push(item)
...@@ -67,12 +71,26 @@ ...@@ -67,12 +71,26 @@
//跳转页面 //跳转页面
jumpView(item, index) { jumpView(item, index) {
this.$emit('jump-view', item) this.$emit('jump-view', item)
console.log(item) console.log(item)
// this.$parent.test() // this.$parent.test()
uni.navigateTo({ uni.navigateTo({
url: '/pages/data/jump-view/index?viewName=' + item.pageName + '&viewId=' + item.pageId url: '/pages/data/jump-view/index?viewName=' + item.pageName + '&viewId=' + item.pageId
}); });
// console.log(JSON.stringify(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() {} getHistoryExternalData() {}
......
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
styleConfig.padding = arrayToString(styleConfig.padding) styleConfig.padding = arrayToString(styleConfig.padding)
styleConfig.borderRadius = arrayToString(styleConfig.borderRadius) styleConfig.borderRadius = arrayToString(styleConfig.borderRadius)
// let boxShadow = styleConfig.boxShadow // let boxShadow = styleConfig.boxShadow
styleConfig.boxShadow = getBoxShadow(styleConfig.boxShadow) // styleConfig.boxShadow = getBoxShadow(styleConfig.boxShadow)
let componentConfig = this.componentsData.componentConfig let componentConfig = this.componentsData.componentConfig
this.imgName = componentConfig.imgName this.imgName = componentConfig.imgName
this.styleConfigList.push(styleConfig) 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> <template>
<view :class="'tabs'+index"> <view :class="'tabs'+index" style="position: relative;">
<view :class="{'stopTop':stopTop,'data-conponent-style':stopTop}" <view :class="{'stopTop':stopTop,'data-conponent-style':stopTop}"
:style="stopTop?componentsData.styleConfig:''"> :style="stopTop?componentsData.styleConfig:''">
<view :style="{'height':theme=='theme3'?'40px':'auto'}"> <view :style="{'height':theme=='theme3'?'40px':'auto'}">
...@@ -111,28 +111,6 @@ ...@@ -111,28 +111,6 @@
// windowHeight = res.windowHeight // windowHeight = res.windowHeight
windowHeight = res.screenHeight 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({ uni.pageScrollTo({
...@@ -152,19 +130,41 @@ ...@@ -152,19 +130,41 @@
this.isTooltip = false this.isTooltip = false
}, },
//显示名称 //显示名称
showTips(e, item) { async showTips(e, item) {
if (e.type == 'longpress') { // console.log(this.componentsData)
let lenHeight = item.name.length / 4 * 14 let _this = this
this.isTooltip = true let windowHeight = 665
this.heightNum = lenHeight await uni.getSystemInfo({
let changedTouche = e.changedTouches[0] success: function (res) {
let target = e.target windowHeight = res.windowHeight
let clientX = changedTouche.clientX - 30
let clientY = changedTouche.clientY - lenHeight - 60 }
this.topNum = clientY });
this.leftNum = clientX await uni.createSelectorQuery().in(this).select(".tabs"+_this.index).boundingClientRect((data) => {
this.tooltipText = item.name 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
let changedTouche = e.changedTouches[0]
let target = e.target
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 @@ ...@@ -177,7 +177,7 @@
styleConfig.margin = arrayToString(styleConfig.margin) styleConfig.margin = arrayToString(styleConfig.margin)
styleConfig.padding = arrayToString(styleConfig.padding) styleConfig.padding = arrayToString(styleConfig.padding)
styleConfig.borderRadius = arrayToString(styleConfig.borderRadius) styleConfig.borderRadius = arrayToString(styleConfig.borderRadius)
styleConfig.boxShadow = getBoxShadow(styleConfig.boxShadow) // styleConfig.boxShadow = getBoxShadow(styleConfig.boxShadow)
// this.$set(this.styleConfig,item.styleConfig) // this.$set(this.styleConfig,item.styleConfig)
// this.styleConfig = { // this.styleConfig = {
// "background-color":styleConfig.backgroundColor, // "background-color":styleConfig.backgroundColor,
......
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
styleConfig.margin = arrayToString(styleConfig.margin) styleConfig.margin = arrayToString(styleConfig.margin)
styleConfig.padding = arrayToString(styleConfig.padding) styleConfig.padding = arrayToString(styleConfig.padding)
styleConfig.borderRadius = arrayToString(styleConfig.borderRadius) styleConfig.borderRadius = arrayToString(styleConfig.borderRadius)
styleConfig.boxShadow = getBoxShadow(styleConfig.boxShadow) // styleConfig.boxShadow = getBoxShadow(styleConfig.boxShadow)
let componentConfig = item.componentConfig let componentConfig = item.componentConfig
// componentConfig.textContent = componentConfig.textContent.replace(/'↵'/g, '<br/>') // componentConfig.textContent = componentConfig.textContent.replace(/'↵'/g, '<br/>')
this.$set(componentConfig.nameFormat,'textAlign',componentConfig.nameFormat.alignHorizontal) this.$set(componentConfig.nameFormat,'textAlign',componentConfig.nameFormat.alignHorizontal)
......
This diff is collapsed.
...@@ -97,9 +97,13 @@ ...@@ -97,9 +97,13 @@
}, },
onLoad(option){ onLoad(option){
console.log(6473)
console.log(JSON.stringify(option)) console.log(JSON.stringify(option))
this.homeViewName = option.viewName this.homeViewName = option.viewName
this.homeViewId = option.viewId this.homeViewId = option.viewId
// #ifdef APP-PLUS
plus.screen.lockOrientation('portrait-primary'); //锁定
// #endif
// this.getViewJson() // this.getViewJson()
}, },
methods: { methods: {
...@@ -110,7 +114,6 @@ ...@@ -110,7 +114,6 @@
//添加定时器 //添加定时器
getTimer(){ getTimer(){
this.eliminateTimer() this.eliminateTimer()
console.log('添加定时器1')
this.timer1 = setInterval(() => { this.timer1 = setInterval(() => {
this.postRediusTestFun(this.tagArr) this.postRediusTestFun(this.tagArr)
}, 3000) }, 3000)
...@@ -120,7 +123,6 @@ ...@@ -120,7 +123,6 @@
}, },
//选项卡点击 dataType-数据类型 associatedComponent-绑定控件ID tabData点击选项卡筛选数据 //选项卡点击 dataType-数据类型 associatedComponent-绑定控件ID tabData点击选项卡筛选数据
selectTabFun(dataType, associatedComponent, tabData) { selectTabFun(dataType, associatedComponent, tabData) {
console.log(tabData)
// if (dataType === '历史数据') { // if (dataType === '历史数据') {
this.$nextTick(function() { this.$nextTick(function() {
let filter = tabData.filter[0] let filter = tabData.filter[0]
...@@ -145,12 +147,12 @@ ...@@ -145,12 +147,12 @@
getViewJson() { getViewJson() {
let projectInfo = uni.getStorageSync('projectInfo') let projectInfo = uni.getStorageSync('projectInfo')
// this.homeViewName = projectInfo.homeViewName // this.homeViewName = projectInfo.homeViewName
if(this.homeViewName && this.homeViewName.indexOf("\\")>-1){ // if(this.homeViewName && this.homeViewName.indexOf("\\")>-1){
this.homeViewName =this.homeViewName.substring(this.homeViewName.indexOf("\\")+1); // this.homeViewName =this.homeViewName.substring(this.homeViewName.indexOf("\\")+1);
} // }
if(this.homeViewName.indexOf('.view')< 0){ // if(this.homeViewName.indexOf('.view')< 0){
this.homeViewName = this.homeViewName +'.view' // this.homeViewName = this.homeViewName +'.view'
} // }
// this.homeViewName = '标准组件' // this.homeViewName = '标准组件'
// console.log(JSON.stringify(projectInfo)) // console.log(JSON.stringify(projectInfo))
this.projectName = projectInfo.projectName this.projectName = projectInfo.projectName
...@@ -162,8 +164,9 @@ ...@@ -162,8 +164,9 @@
this.$api.getView(this.projectName, this.homeViewId).then(res => { this.$api.getView(this.projectName, this.homeViewId).then(res => {
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
if (res.data) { if (res.data) {
console.log(res.data) console.log(JSON.parse(JSON.stringify(res.data)))
this.componentsData = res.data this.componentsData = JSON.parse(JSON.stringify(res.data))
console.log(this.componentsData)
let _this = this let _this = this
let realTime = 0 let realTime = 0
let showHistoryExternal = 0 let showHistoryExternal = 0
...@@ -177,6 +180,13 @@ ...@@ -177,6 +180,13 @@
let widthList = JSON.parse(JSON.stringify(styleConfig.margin)) let widthList = JSON.parse(JSON.stringify(styleConfig.margin))
let width = parseFloat(styleConfig.width)+parseFloat(widthList[1])+parseFloat(widthList[3]) let width = parseFloat(styleConfig.width)+parseFloat(widthList[1])+parseFloat(widthList[3])
styleConfig.width = (width>100?parseFloat(styleConfig.width)-(width-100):parseFloat(styleConfig.width))+'%' 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) {
if (componentConfig.dataset) { if (componentConfig.dataset) {
let dataset = componentConfig.dataset let dataset = componentConfig.dataset
...@@ -353,6 +363,7 @@ ...@@ -353,6 +363,7 @@
// } // }
}, },
} }
</script> </script>
......
...@@ -33,8 +33,8 @@ ...@@ -33,8 +33,8 @@
data() { data() {
return { return {
height: '100vh', height: '100vh',
userName: 'SuperAdmin', userName: '',
password: 'SYC888888', password: '',
logoImg: '../../static/img/hello.png' logoImg: '../../static/img/hello.png'
} }
}, },
......
<!-- 消息页面 --> <!-- 消息页面 -->
<template> <template>
<view></view> <view>
<tips-page :text="'功能开发中,请敬请期待~'"></tips-page>
</view>
</template> </template>
<script> <script>
......
<!-- 监控列表页面 --> <!-- 监控列表页面 -->
<template> <template>
<view class="page-view"> <view>
<view v-for="(item,index) in dataList" :key="index" style="margin-bottom: 10px;"> <view v-if="!showTips" class="page-view">
<collapse :data="item" @collaspe-item-fun="getMonitoringViewInfo"></collapse> <view v-for="(item,index) in dataList" :key="index" style="margin-bottom: 10px;">
<collapse :data="item" @collaspe-item-fun="getMonitoringViewInfo"></collapse>
</view>
</view> </view>
<tips-page v-if="showTips" :text="'暂无配置~'"></tips-page>
</view> </view>
</template> </template>
...@@ -16,8 +19,9 @@ ...@@ -16,8 +19,9 @@
}, },
data() { data() {
return { return {
projectName:'', projectName: '',
dataList: [] dataList: [],
showTips: false
} }
}, },
...@@ -34,10 +38,11 @@ ...@@ -34,10 +38,11 @@
let title = item.SCMSChildMenuKey let title = item.SCMSChildMenuKey
let id = item.SCMSChildMenuID let id = item.SCMSChildMenuID
uni.navigateTo({ 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('此菜单不是监控画面,不可查看') this.$toast.toast('此菜单不是监控画面,不可查看')
} }
...@@ -91,9 +96,14 @@ ...@@ -91,9 +96,14 @@
// this.$store.state.routerInfo = JSON.stringify(data.data) // this.$store.state.routerInfo = JSON.stringify(data.data)
uni.removeStorageSync('routerChildMenusInfo') uni.removeStorageSync('routerChildMenusInfo')
uni.setStorageSync('routerChildMenusInfo', childMenus); uni.setStorageSync('routerChildMenusInfo', childMenus);
if (mainMenus.length <= 0) {
this.showTips = true
}
// const value = uni.getStorageSync('routerChildMenusInfo'); // const value = uni.getStorageSync('routerChildMenusInfo');
// console.log(childMenus) // console.log(mainMenus)
mainMenus.sort(function(a, b){return a.SCMSMainMenuKey - b.SCMSMainMenuKey}); mainMenus.sort(function(a, b) {
return a.SCMSMainMenuRank - b.SCMSMainMenuRank
});
let lastVistInfos = data1.lastVistInfos let lastVistInfos = data1.lastVistInfos
mainMenus.forEach(item => { mainMenus.forEach(item => {
item.title = item.SCMSMainMenuName item.title = item.SCMSMainMenuName
...@@ -101,14 +111,20 @@ ...@@ -101,14 +111,20 @@
for (let i = 0; i < childMenus.length; i++) { for (let i = 0; i < childMenus.length; i++) {
let childMenusItem = childMenus[i] let childMenusItem = childMenus[i]
let SCMSChildMenuKey = childMenusItem.SCMSChildMenuKey let SCMSChildMenuKey = childMenusItem.SCMSChildMenuKey
let SCMSChildMenuRank = childMenusItem.SCMSChildMenuRank
if (childMenusItem.SCMSMainMenuID == item.SCMSMainMenuID) { if (childMenusItem.SCMSMainMenuID == item.SCMSMainMenuID) {
childMenusItem.img = '../../static/img1/jiankongBg.png' childMenusItem.img = '../../static/img1/jiankongBg.png'
childMenusItem.textTitle = childMenusItem.SCMSChildMenuName 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.push(childMenusItem)
} }
} }
item.textList.sort(function(a, b) {
return a.SCMSChildMenuRank - b.SCMSChildMenuRank
});
}) })
this.dataList = mainMenus this.dataList = mainMenus
...@@ -121,7 +137,7 @@ ...@@ -121,7 +137,7 @@
console.log(err) console.log(err)
}) })
}, },
}, },
mounted() { mounted() {
......
...@@ -307,14 +307,11 @@ ...@@ -307,14 +307,11 @@
}, },
//图表历史,业务数据初始化查询 //图表历史,业务数据初始化查询
async initEchart() { async initEchart() {
console.log('434=>')
this.$nextTick(() => { this.$nextTick(() => {
// console.log('444=>'+JSON.stringify(this.$refs.queryButton25.dataValue)) // console.log('444=>'+JSON.stringify(this.$refs.queryButton25.dataValue))
let queryButtonList = this.$refs.queryButton25.dataValue let queryButtonList = this.$refs.queryButton25.dataValue
queryButtonList.forEach((item, index) => { queryButtonList.forEach((item, index) => {
console.log('434=>545434') this.searchBtnFun(item)
this.searchBtnFun(item)
}) })
}) })
...@@ -340,15 +337,26 @@ ...@@ -340,15 +337,26 @@
} }
var myPicker = new Set(picker) var myPicker = new Set(picker)
var pickerArray = [...myPicker] 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 = {} let getDataTimeList = {}
for (let i = 0; i < dataValue.length; i++) { for (let i = 0; i < dataValue.length; i++) {
for (let j = 0; j < pickerArray.length; j++) { getDataTimeList[dataValue[i].class] = {
if (dataValue[i].class == pickerArray[j]) { Value: dataValue[i].value
getDataTimeList[pickerArray[j]] = { }
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 = { let queryChartData = {
...@@ -362,7 +370,7 @@ ...@@ -362,7 +370,7 @@
// console.log(22+JSON.stringify(getDataTimeList)) // console.log(22+JSON.stringify(getDataTimeList))
} }
await this.$nextTick(function() { await this.$nextTick(function() {
this.$refs.customreport.searchReport(item) this.$refs.customreport.searchReport(item)
}) })
// setTimeout(()=>{ // setTimeout(()=>{
...@@ -682,11 +690,11 @@ ...@@ -682,11 +690,11 @@
// this.initEchart() // this.initEchart()
setTimeout(() => { setTimeout(() => {
this.initEchart() this.initEchart()
},1000) }, 1000)
// this.$nextTick(function(){ // this.$nextTick(function(){
// }) // })
}, },
//获取画布数据 //获取画布数据
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
<template> <template>
<view class="charts-box"> <view class="charts-box">
<!-- <qiun-data-charts type="column" :chartData="chartData" /> --> <!-- <qiun-data-charts type="column" :chartData="chartData" /> -->
<tips-page :text="'功能开发中,请敬请期待~'"></tips-page>
</view> </view>
</template> </template>
...@@ -66,6 +67,10 @@ ...@@ -66,6 +67,10 @@
} }
</script> </script>
<style> <style lang="scss" scoped>
.charts-box{
position: relative;
height: 100%;
}
</style> </style>
...@@ -136,6 +136,11 @@ function getStartTime(time,recent,setting){ ...@@ -136,6 +136,11 @@ function getStartTime(time,recent,setting){
return api.baseRequest(`/api/Data/GetTime?endTime=${time}&recent=${recent}&setting=${setting}`,"GET",1) 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 { export default {
...@@ -164,8 +169,7 @@ export default { ...@@ -164,8 +169,7 @@ export default {
getGlobalProps, getGlobalProps,
getQueryMulitySource, getQueryMulitySource,
getStartTime, getStartTime,
checkTag checkTag,
getNewest
} }
...@@ -69,9 +69,9 @@ const store = new Vuex.Store({ ...@@ -69,9 +69,9 @@ const store = new Vuex.Store({
// #endif // #endif
// #ifndef APP-PLUS || APP-NVUE // #ifndef APP-PLUS || APP-NVUE
uni.removeStorageSync('projectInfo'); uni.removeStorageSync('projectInfo');
// let projectName = 'http://192.168.1.85:5000/api/view/GetAppInfo?projectName=0826APP项目A' // 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: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:5000/api/view/GetAppInfo?projectName=测试项目'
$api.getAppInfo(projectName).then(res => { $api.getAppInfo(projectName).then(res => {
const code = res.data.code const code = res.data.code
if (code == 1) { if (code == 1) {
......
...@@ -58,13 +58,13 @@ module.exports = { ...@@ -58,13 +58,13 @@ module.exports = {
} }
for (let i in res) { for (let i in res) {
let value = '--' let value = '--'
if (res[i].data !== null) { if (res[i].value != null) {
if(isNaN(res[i].axisValueLabel)&&!isNaN(Date.parse(res[i].axisValueLabel))){ if(isNaN(res[i].axisValueLabel)&&!isNaN(Date.parse(res[i].axisValueLabel))){
//   result += res[0].axisValueLabel //   result += res[0].axisValueLabel
}else{ }else{
result += res[i].axisValueLabel result += res[i].axisValueLabel
} }
value = res[i].data value = res[i].value
// #ifdef H5 // #ifdef H5
result += '\n' + res[i].seriesName + ':' + value result += '\n' + res[i].seriesName + ':' + value
// #endif // #endif
...@@ -77,6 +77,33 @@ module.exports = { ...@@ -77,6 +77,33 @@ module.exports = {
} }
return result; 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) { legendFormat: function(name) {
return "自定义图例+" + name; return "自定义图例+" + name;
}, },
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
var isReady=false;var onReadyCallbacks=[]; var isReady=false;var onReadyCallbacks=[];
var isServiceReady=false;var onServiceReadyCallbacks=[]; 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 __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.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()})}}); __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}}}}); 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