diff --git a/packDetail/pages/analysis/index.vue b/packDetail/pages/analysis/index.vue index 25f609d..a7ab2a7 100644 --- a/packDetail/pages/analysis/index.vue +++ b/packDetail/pages/analysis/index.vue @@ -33,6 +33,22 @@ + + + + + + + @@ -73,7 +89,7 @@ - {{item.stationName}} + {{item.stationName}} @@ -127,7 +143,7 @@ array1: [], arrays: [], list: [], - tabList: ['站点名称', '告警指标', '指标值','告警时间'], + tabList: ['站点名称', '告警指标', '指标值', '告警时间'], pjlist: [], ec: { option: { @@ -182,7 +198,7 @@ '12月' ], }], - + yAxis: [{ type: 'value' }], @@ -205,8 +221,8 @@ stationName1: '', stationCode1: null, stationCode: '', - arrays1:[], - zxtdata:[] + arrays1: [], + zxtdata: [] } }, onLoad() { @@ -216,7 +232,6 @@ var ktxStatusHeight = res.statusBarHeight * pxToRpxScale var navigationHeight = 44 * pxToRpxScale this.height = res.windowHeight * pxToRpxScale //将px 转换rpx - console.log(this.height, ktxStatusHeight, navigationHeight) this.scorllheight = this.height } }); @@ -233,12 +248,10 @@ this.array = [] this.arrays = [] this.array1 = ['全部监测站点', ] - this.arrays1 = [ - { - label:'全部监测站点', - value:'' - } - ] + this.arrays1 = [{ + label: '全部监测站点', + value: '' + }] this.$http.get('/applet/survStationInfo/list').then(res => { for (var i = 0; i < res.data.data.length; i++) { this.arrays.push({ @@ -251,7 +264,6 @@ }) this.array.push(res.data.data[i].stationName) this.array1.push(res.data.data[i].stationName) - // console.log(this.array,this.array1) } }) }, @@ -281,32 +293,26 @@ data[i].miao = data[i].times[5]; data[i].datetime = data[i].yue + '-' + data[i].ri + ' ' + data[i].shi + ':' + data[i] .fen - if(data[i].alertContent.indexOf('监测数据名称:') != -1){ - data[i].alertContent = data[i].alertContent.replace('监测数据名称:','') + if (data[i].alertContent.indexOf('监测数据名称:') != -1) { + data[i].alertContent = data[i].alertContent.replace('监测数据名称:', '') } } this.list = this.list.concat(data) this.total = res.data.data.total if (res.data.data.total != 0) { this.allNum = Number(res.data.data.total) / Number(this.pageSize) + ''; - console.log(this.allNum, '总页数') if (this.allNum.indexOf('.') == -1) { this.allNum = this.allNum; - console.log(this.allNum, 'if') } else { this.allNum = parseInt(Number(this.allNum) + 1); - console.log(this.allNum, 'else') } - console.log(this.pageNo, this.allNum, '156156') if (this.pageNo == this.allNum) { this.isLastpage = true; this.loadStatus = 'nomore' - console.log(this.isLastpage, 'true', 'nomore') } else { this.isLastpage = false; // this.isLoadMore=true this.loadStatus = 'more' - console.log(this.isLastpage, 'false') } } else { this.isLastpage = true; @@ -319,7 +325,6 @@ }, // 分页加载 lower() { - console.log("最后一页了,取消下拉功能"); // 最后一页了,取消下拉功能 if (this.isLastpage) { return @@ -329,7 +334,6 @@ this.intervalId = setInterval(() => { num = num + 1; }, 1000) - console.log(this.intervalId, num) this.pageNo = this.pageNo + 1; let params = {} params.pageNo = this.pageNo @@ -351,8 +355,8 @@ data[i].miao = data[i].times[5]; data[i].datetime = data[i].yue + '-' + data[i].ri + ' ' + data[i].shi + ':' + data[i] .fen - if(data[i].alertContent.indexOf('监测数据名称:') != -1){ - data[i].alertContent = data[i].alertContent.replace('监测数据名称:','') + if (data[i].alertContent.indexOf('监测数据名称:') != -1) { + data[i].alertContent = data[i].alertContent.replace('监测数据名称:', '') } } this.list = this.list.concat(data) @@ -360,12 +364,10 @@ if (this.pageNo == this.allNum) { this.isLastpage = true; this.loadStatus = 'nomore' - console.log(this.isLastpage, 'true') } else { this.isLastpage = false; // this.isLoadMore=true this.loadStatus = 'more' - console.log(this.isLastpage, 'false') } } else { this.isLastpage = true; @@ -386,6 +388,10 @@ } }) }, + // 选择年月日 + radioChange(e){ + console.log("选择年月日.......",e) + }, // 获取折线图 gettj() { if (!this.stationCode) { @@ -393,94 +399,91 @@ } this.$http.post('/applet/wxclient/getPplutionSummry?stationCode=' + this.stationCode).then(res => { this.zxtdata = res.data.data[0] - console.log(this.array[this.index],'弄哦文') - this.ec.option.legend.data = ['总磷', '总氮','硝态氮'] - this.ec.option.color = ['#19D58A', '#FFC53B', '#3BA0FF'] - this.ec.option.series = [ - { - name: '总磷', - type: 'line', - stack: 'Total1', - areaStyle: { //区域填充渐变颜色 - color: { - type: 'linear', - x: 0, - y: 0, - x2: 0, - y2: 1, - colorStops: [{ - offset: 0, - color: 'rgba(25, 213, 138, 1)' // 0% 处的颜色 - }, { - offset: 1, - color: 'rgba(255, 255, 255, 1)' // 100% 处的颜色 - }], - global: false // 缺省为 false - } - }, - emphasis: { - focus: 'series' - }, - data: this.zxtdata.TPSummry + this.ec.option.legend.data = ['总磷', '总氮', '硝态氮'] + this.ec.option.color = ['#19D58A', '#FFC53B', '#3BA0FF'] + this.ec.option.series = [{ + name: '总磷', + type: 'line', + stack: 'Total1', + areaStyle: { //区域填充渐变颜色 + color: { + type: 'linear', + x: 0, + y: 0, + x2: 0, + y2: 1, + colorStops: [{ + offset: 0, + color: 'rgba(25, 213, 138, 1)' // 0% 处的颜色 + }, { + offset: 1, + color: 'rgba(255, 255, 255, 1)' // 100% 处的颜色 + }], + global: false // 缺省为 false + } }, - { - name: '总氮', - type: 'line', - stack: 'Total2', - areaStyle: { //区域填充渐变颜色 - color: { - type: 'linear', - x: 0, - y: 0, - x2: 0, - y2: 1, - colorStops: [{ - offset: 0, - color: 'rgba(255, 197, 59, 1)' // 0% 处的颜色 - }, { - offset: 1, - color: 'rgba(255, 255, 255, 1)' // 100% 处的颜色 - }], - global: false // 缺省为 false - } - }, - emphasis: { - focus: 'series' - }, - data: this.zxtdata.TNSummry + emphasis: { + focus: 'series' }, - { - name: '硝态氮', - type: 'line', - stack: 'Total3', - areaStyle: { //区域填充渐变颜色 - color: { - type: 'linear', - x: 0, - y: 0, - x2: 0, - y2: 1, - colorStops: [{ - offset: 0, - color: 'rgba(59, 160, 255, 1)' // 0% 处的颜色 - }, { - offset: 1, - color: 'rgba(255, 255, 255, 1)' // 100% 处的颜色 - }], - global: false // 缺省为 false - } - }, - emphasis: { - focus: 'series' - }, - data: this.zxtdata.NOSummry + data: this.zxtdata.TPSummry + }, + { + name: '总氮', + type: 'line', + stack: 'Total2', + areaStyle: { //区域填充渐变颜色 + color: { + type: 'linear', + x: 0, + y: 0, + x2: 0, + y2: 1, + colorStops: [{ + offset: 0, + color: 'rgba(255, 197, 59, 1)' // 0% 处的颜色 + }, { + offset: 1, + color: 'rgba(255, 255, 255, 1)' // 100% 处的颜色 + }], + global: false // 缺省为 false + } }, - ] - if(this.array[this.index].indexOf('畜禽') != -1){ - this.ec.option.legend.data = ['总磷', '总氮','COD','氨氮'] - this.ec.option.color = ['#19D58A', '#FFC53B', '#3BA0FF','#FF3B3B'] - this.ec.option.series = [ - { + emphasis: { + focus: 'series' + }, + data: this.zxtdata.TNSummry + }, + { + name: '硝态氮', + type: 'line', + stack: 'Total3', + areaStyle: { //区域填充渐变颜色 + color: { + type: 'linear', + x: 0, + y: 0, + x2: 0, + y2: 1, + colorStops: [{ + offset: 0, + color: 'rgba(59, 160, 255, 1)' // 0% 处的颜色 + }, { + offset: 1, + color: 'rgba(255, 255, 255, 1)' // 100% 处的颜色 + }], + global: false // 缺省为 false + } + }, + emphasis: { + focus: 'series' + }, + data: this.zxtdata.NOSummry + }, + ] + if (this.array[this.index].indexOf('畜禽') != -1) { + this.ec.option.legend.data = ['总磷', '总氮', 'COD', '氨氮'] + this.ec.option.color = ['#19D58A', '#FFC53B', '#3BA0FF', '#FF3B3B'] + this.ec.option.series = [{ name: '总磷', type: 'line', stack: 'Total1', @@ -590,7 +593,6 @@ }, // 折线图切换站点 bindPickerChange: function(e) { - console.log('picker发送选择改变,携带值为', e.detail.value) this.index = e.detail.value this.stationName = this.array[this.index] for (var i = 0; i < this.arrays.length; i++) { @@ -602,7 +604,6 @@ }, // 预警切换站点 bindPickerChange1: function(e) { - console.log('picker发送选择改变,携带值为', e.detail.value) this.index1 = e.detail.value this.stationName1 = this.array1[this.index1] for (var i = 0; i < this.arrays.length; i++) { @@ -876,22 +877,25 @@ padding-bottom: 26rpx; } - .tabitem:first-child{ + .tabitem:first-child { width: 31%; // text-align: center } - .tabitem:nth-child(2){ + + .tabitem:nth-child(2) { width: 27%; // text-align: center } - .tabitem:nth-child(3){ + + .tabitem:nth-child(3) { width: 19%; // text-align: center } - .tabitem:nth-child(4){ - flex:1 - // text-align: center + + .tabitem:nth-child(4) { + flex: 1 // text-align: center } + .scroll-Y { box-sizing: border-box; } @@ -955,6 +959,7 @@ text-overflow: ellipsis; // text-align: center } + .load { // height: 50rpx; // line-height: 50rpx; @@ -965,4 +970,65 @@ .pagebot { height: 100rpx; } + // 选择年月日 + .radio-group { + display: flex; + justify-content: space-around; + margin: 20rpx 32rpx 0; + background: #F6F9FF; + border-radius: 16rpx; + .radio-label { + display: flex; + align-items: center; + padding: 16rpx 32rpx; + border-radius: 12rpx; + transition: all 0.3s ease; + + &:active { + background: rgba(15, 110, 254, 0.1); + } + + .radio-item { + transform: scale(0.9); + + // 选中状态样式 + &.radio-checked { + background-color: #0f6efe; + border-color: #0f6efe; + } + } + + .radio-text { + font-size: 28rpx; + font-family: Source Han Sans SC; + font-weight: 500; + color: #667482; + margin-left: 16rpx; + transition: color 0.3s ease; + } + + // 选中状态的文字样式 + // .radio-item[checked] + .radio-text { + // color: #0f6efe; + // font-weight: 600; + // } + } + } + + // 适配暗色模式 + @media (prefers-color-scheme: dark) { + .radio-group { + background: #1a1a1a; + + .radio-label { + .radio-text { + color: #999; + } + + .radio-item[checked] + .radio-text { + color: #0f6efe; + } + } + } + } \ No newline at end of file diff --git a/packDetail/pages/sjdyj/index.vue b/packDetail/pages/sjdyj/index.vue index 2ea8f12..9f37f26 100644 --- a/packDetail/pages/sjdyj/index.vue +++ b/packDetail/pages/sjdyj/index.vue @@ -11,63 +11,28 @@ - - - - - 搜索 + + + + 设备选择: + + + + 时间区间: + + - - - - - - - - 编号:{{item.deviceNo}} - - - - - - 报警原因: - - {{item.flg}} - - - {{item.flg}} - - - - 用户设备编号: - {{item.userDeviceNo}} - - - 报警时间: - 解除时间: - {{item.alertTime}} - - - 上报时间: - {{item.reveiveTime}} - - - - - - - - - + + @@ -171,7 +136,12 @@ dictLabel:'异常趋势图' } ], + value:0, + rangeList: [], isActive:0, + rangetime: [Date.now(), Date.now()], + deployId:'', + resolt:[], } }, onLoad() { @@ -181,7 +151,6 @@ var ktxStatusHeight = res.statusBarHeight * pxToRpxScale var navigationHeight = 44 * pxToRpxScale this.height = res.windowHeight * pxToRpxScale//将px 转换rpx - console.log(this.height,ktxStatusHeight,navigationHeight) this.scorllheight = this.height - 174 this.scorllheights = this.height - 90 } @@ -195,12 +164,19 @@ var ktxStatusHeight = res.statusBarHeight * pxToRpxScale var navigationHeight = 44 * pxToRpxScale this.height = res.windowHeight * pxToRpxScale//将px 转换rpx - console.log(this.height,ktxStatusHeight,navigationHeight) this.scorllheight = this.height - 174 this.scorllheights = this.height - 90 } }); }, + watch: { + rangetime(newval) { + console.log('范围选:', this.rangetime); + this.startTime = this.rangetime[0] + this.endTime = this.rangetime[1] + this.qushiList() + }, + }, methods:{ // 下拉刷新被触发 refresherrefreshFun() { @@ -218,6 +194,9 @@ this.pageNo = 1 this.deviceNo = '' this.getList() + if(index==1){ + this.sbeiList() + } }, getList(){ var params = {} @@ -238,36 +217,21 @@ this.$http.get(url,{params:params}).then(res =>{ if(res.data.code == 0){ var data = res.data.data.records - // for(var i=0;i { num = num+1; },1000) - console.log(this.intervalId,num) this.pageNo = this.pageNo + 1; var params = {} params.pageNo = this.pageNo @@ -305,26 +267,15 @@ this.$http.get(url,{params:params}).then(res =>{ if(res.data.code == 0){ var data = res.data.data.records - // for(var i=0;i { + console.log("趋势数据",res.data.data) + let ovelit = res.data.data + this.resolt = ovelit.itemList.map(item=>{ + return { + ...item, + data:ovelit.dataMap[item.entity] || [] + } + }) + console.log("666666666666",this.resolt) + }) + }, + sbeiList(){ + uni.showLoading({ + title: '加载中' + }); + this.$http.get('/applet/survDeviceDeploy/deviceList?stationCode=').then(res =>{ + let sbList = [] + this.rangeList = res.data.data.map((lit,index)=>{ + return{ + "value":index, + "text":lit.deployDes, + "id":lit.id, + } + }) + this.deployId = this.rangeList[this.value].id + this.qushiList() + uni.hideLoading(); + }) + }, + // 选择deployid + change(e) { + console.log("单选值", this.rangeList[this.value].id) + this.deployId = this.rangeList[this.value].id + // this.sbeiList() + }, + // 选择日期范围 + maskClick(e){ + console.log('maskClick事件:', e); + this.startTime = e[0] + this.endTime = e[1] + } } } @@ -345,37 +344,18 @@ \ No newline at end of file + diff --git a/uni_modules/uni-icons/changelog.md b/uni_modules/uni-icons/changelog.md index 6449885..62e7682 100644 --- a/uni_modules/uni-icons/changelog.md +++ b/uni_modules/uni-icons/changelog.md @@ -1,3 +1,25 @@ +## 2.0.12(2025-08-26) +- 优化 uni-app x 下 size 类型问题 +## 2.0.11(2025-08-18) +- 修复 图标点击事件返回 +## 2.0.9(2024-01-12) +fix: 修复图标大小默认值错误的问题 +## 2.0.8(2023-12-14) +- 修复 项目未使用 ts 情况下,打包报错的bug +## 2.0.7(2023-12-14) +- 修复 size 属性为 string 时,不加单位导致尺寸异常的bug +## 2.0.6(2023-12-11) +- 优化 兼容老版本icon类型,如 top ,bottom 等 +## 2.0.5(2023-12-11) +- 优化 兼容老版本icon类型,如 top ,bottom 等 +## 2.0.4(2023-12-06) +- 优化 uni-app x 下示例项目图标排序 +## 2.0.3(2023-12-06) +- 修复 nvue下引入组件报错的bug +## 2.0.2(2023-12-05) +-优化 size 属性支持单位 +## 2.0.1(2023-12-05) +- 新增 uni-app x 支持定义图标 ## 1.3.5(2022-01-24) - 优化 size 属性可以传入不带单位的字符串数值 ## 1.3.4(2022-01-24) diff --git a/uni_modules/uni-icons/components/uni-icons/uni-icons.vue b/uni_modules/uni-icons/components/uni-icons/uni-icons.vue index 86e7444..1bd3d5e 100644 --- a/uni_modules/uni-icons/components/uni-icons/uni-icons.vue +++ b/uni_modules/uni-icons/components/uni-icons/uni-icons.vue @@ -1,24 +1,28 @@