123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710 |
- <template>
- <view>
- <view class="all">
- <view class="chart">
- <view class="charts-box">
- <best-gauge :config="gaugeOption"></best-gauge>
- </view>
- <view class="charts-box">
- <best-gauge :config="gaugeOption2"></best-gauge>
- </view>
- </view>
- <view class="white">
- <view class="title1">
- <text class="param">空调排风温度变化</text>
- <view class="tiao"></view>
- </view>
- <view>
- <canvas canvas-id="canvasLineA" id="canvasLineA" class="charts" @touchmove="moveLineA"
- @touchend="moveLineA"></canvas>
- <!-- 画布,图表的HTML部分-->
- </view>
- </view>
- <view class="white1">
- <view class="title1">
- <text class="param">空调排风湿度变化</text>
- <view class="tiao"></view>
- </view>
- <view>
- <canvas canvas-id="canvasLineA11" id="canvasLineA11" class="charts" @touchmove="moveLineA11"
- @touchend="moveLineA11"></canvas>
- <!-- 画布,图表的HTML部分-->
- </view>
- </view>
- <view class="anniu">
- <image class="anniu" src="../../static/设备菜单/前往列表@2x.png" @tap="back"></image>
- </view>
- </view>
- </view>
- </template>
- <script>
- //仪表盘组件
- import bestGauge from '@/components/best-gauge/best-gauge.vue'
- //引入u-charts组件
- import uCharts from '@/components/u-charts/u-charts.js'
- var _self; //用于全局使用this
- var _self11; //用于全局使用this
- var canvaLineA = null; //uCharts实例
- var canvaLineA11 = null; //uCharts实例
- export default {
- components: {
- bestGauge,
- },
- data() {
- let _width = uni.upx2px(350);
- return {
- timeData: {
- time1: '',
- time2: '',
- time3: '',
- time4: '',
- time5: ''
- },
- WDdata: {
- WD1: '',
- WD2: '',
- WD3: '',
- WD4: '',
- WD5: '',
- WD6: '',
- WD7: '',
- WD8: '',
- WD9: '',
- WD10: '',
- WD11: '',
- WD12: '',
- WD13: '',
- WD14: '',
- WD15: '',
- WD16: '',
- WD17: '',
- WD18: '',
- WD19: '',
- WD20: '',
- WD21: '',
- WD22: '',
- WD23: '',
- WD24: '',
- },
- SDdata: {
- SD1: '',
- SD2: '',
- SD3: '',
- SD4: '',
- SD5: '',
- SD6: '',
- SD7: '',
- SD8: '',
- SD9: '',
- SD10: '',
- SD11: '',
- SD12: '',
- SD13: '',
- SD14: '',
- SD15: '',
- SD16: '',
- SD17: '',
- SD18: '',
- SD19: '',
- SD20: '',
- SD21: '',
- SD22: '',
- SD23: '',
- SD24: '',
- },
- WDSDdata: {
- WDSD1: '',
- WDSD2: '',
- WDSD3: '',
- WDSD4: '',
- WDSD5: '',
- WDSD6: '',
- WDSD7: '',
- WDSD8: '',
- WDSD9: '',
- WDSD10: '',
- WDSD11: '',
- WDSD12: '',
- WDSD13: '',
- WDSD14: '',
- WDSD15: '',
- WDSD16: '',
- WDSD17: '',
- WDSD18: '',
- WDSD19: '',
- WDSD20: '',
- WDSD21: '',
- WDSD22: '',
- WDSD23: '',
- WDSD24: '',
- },
- SDSDdata: {
- SDSD1: '',
- SDSD2: '',
- SDSD3: '',
- SDSD4: '',
- SDSD5: '',
- SDSD6: '',
- SDSD7: '',
- SDSD8: '',
- SDSD9: '',
- SDSD10: '',
- SDSD11: '',
- SDSD12: '',
- SDSD13: '',
- SDSD14: '',
- SDSD15: '',
- SDSD16: '',
- SDSD17: '',
- SDSD18: '',
- SDSD19: '',
- SDSD20: '',
- SDSD21: '',
- SDSD22: '',
- SDSD23: '',
- SDSD24: '',
- },
- formData: {
- WD_1: '',
- SD_1: '',
- QX: '2', //星期
- WD_SJ: '12',
- SD_SJ: '23',
- WD_SD: '34',
- SD_SD: '45',
- },
- cWidth: '',
- cHeight: '', //画布的宽高
- //仪表盘部分
- gaugeOption: { //定义参数
- id: 'gaugeId0',
- value: '',
- axisTickLength: 2 //该属性与axisTick互斥,存在axisTickLength并大于0,axisTick就无效
- },
- gaugeOption2: { //定义参数
- name: 'CK01排风湿度显示',
- id: 'gaugeId1',
- value: '',
- unit: '%',
- axisTickLength: 2 //该属性与axisTick互斥,存在axisTickLength并大于0,axisTick就无效
- },
- //折线图部分
- //温度
- data: { //数据
- categories: ['3时', '6时', '9时', '12时', '15时', '18时', '21时', '24时'],
- series: [{
- name: "温度实际值",
- data: [1, 1, 1, 1, 1, 1, 1, 1],
- }, {
- name: "温度设定值",
- data: [10, 25, 23, 33, 23, 23, 23, 23],
- color: "#336633"
- }]
- },
- //湿度
- data11: { //数据
- categories11: ['3时', '6时', '9时', '12时', '15时', '18时', '21时', '24时'],
- series11: [{
- name: "湿度实际值",
- data: [40, 30, 36, 44, 38, 45, 45, 45],
- }, {
- name: "湿度设定值",
- data: [10, 25, 23, 33, 23, 45, 45, 45],
- color: "red"
- }]
- },
- }
- },
- onLoad() {
- this.getWD1()
- this.getWD2()
- this.getWD3()
- this.getWD4()
- this.getWD5()
- this.getWD6()
- this.getWD7()
- this.getWD8()
- this.getWD9()
- this.getWD10()
- this.getWD11()
- this.getWD12()
- this.getWD13()
- this.getWD14()
- this.getWD15()
- this.getWD16()
- this.getWD17()
- this.getWD18()
- this.getWD19()
- this.getWD20()
- this.getWD21()
- this.getWD22()
- this.getWD23()
- this.getWD24()
- this.getSD1()
- this.getSD2()
- this.getSD3()
- this.getSD4()
- this.getSD5()
- this.getSD6()
- this.getSD7()
- this.getSD8()
- this.getSD9()
- this.getSD10()
- this.getSD11()
- this.getSD12()
- this.getSD13()
- this.getSD14()
- this.getSD15()
- this.getSD16()
- this.getSD17()
- this.getSD18()
- this.getSD19()
- this.getSD20()
- this.getSD21()
- this.getSD22()
- this.getSD23()
- this.getSD24()
- this.getWDSD1()
- this.getWDSD2()
- this.getWDSD3()
- this.getWDSD4()
- this.getWDSD5()
- this.getWDSD6()
- this.getWDSD7()
- this.getWDSD8()
- this.getWDSD9()
- this.getWDSD10()
- this.getWDSD11()
- this.getWDSD12()
- this.getWDSD13()
- this.getWDSD14()
- this.getWDSD15()
- this.getWDSD16()
- this.getWDSD17()
- this.getWDSD18()
- this.getWDSD19()
- this.getWDSD20()
- this.getWDSD21()
- this.getWDSD22()
- this.getWDSD23()
- this.getWDSD24()
- this.getSDSD1()
- this.getSDSD2()
- this.getSDSD3()
- this.getSDSD4()
- this.getSDSD5()
- this.getSDSD6()
- this.getSDSD7()
- this.getSDSD8()
- this.getSDSD9()
- this.getSDSD10()
- this.getSDSD11()
- this.getSDSD12()
- this.getSDSD13()
- this.getSDSD14()
- this.getSDSD15()
- this.getSDSD16()
- this.getSDSD17()
- this.getSDSD18()
- this.getSDSD19()
- this.getSDSD20()
- this.getSDSD21()
- this.getSDSD22()
- this.getSDSD23()
- this.getSDSD24()
- this.getWD_SJ()
- this.getSD_SJ()
- this.getWD_1()
- this.getSD_1()
- this.cWidth = uni.upx2px(702);
- this.cHeight = uni.upx2px(500); //设置宽高
- _self = this //声明this
- _self.showLineA("canvasLineA", _self.data); //触发执行函数
- _self11 = this //声明this
- _self11.showLineA11("canvasLineA11", _self11.data11); //触发执行函数
- },
- methods: {
- async getWD_SJ(e) {
- let vm = this;
- let url = uni.$api.deviceParam.detail;
- let data = {
- id: "292",
- };
- let res = await uni.$http.get(url, data);
- this.formData.WD_SJ = res.data.data.deviceParam.value;
- console.log(this.formData.WD_SJ);
- this.data.series[0].data[0] = this.formData.WD_SJ
- console.log("实际温度:" + this.data.series[0].data[0]);
- },
- async getSD_SJ(e) {
- let vm = this;
- let url = uni.$api.deviceParam.detail;
- let data = {
- id: "280",
- };
- let res = await uni.$http.get(url, data);
- this.formData.SD_SJ = res.data.data.deviceParam.value;
- console.log(this.formData.SD_SJ);
- this.data11.series11[0].data[0] = this.formData.SD_SJ
- console.log("实际湿度:" + this.data11.series11[0].data[0]);
- },
- async getWD_SD(e) {
- let vm = this;
- let url = uni.$api.deviceParam.detail;
- let data = {
- id: "296",
- };
- let res = await uni.$http.get(url, data);
- this.formData.WD_SD = res.data.data.deviceParam.value;
- console.log(this.formData.WD_SD);
- this.data.series[1].data[0] = this.formData.WD_SD
- console.log("设定温度:" + this.data.series[1].data[0]);
- },
- async getSD_SD(e) {
- let vm = this;
- var XQ = this.formData.QX;
- let url = uni.$api.deviceParam.detail;
- let data = {
- id: "231",
- };
- let res = await uni.$http.get(url, data);
- this.formData.SD_SD = res.data.data.deviceParam.value;
- console.log(this.formData.SD_SD);
- if (XQ == 1) {
- this.data11.series11[1].data[0] = this.formData.SD_SD
- console.log("周一设定湿度:" + this.data11.series11[1].data[0]);
- }
- if (XQ == 2) {
- this.data11.series11[1].data[1] = this.formData.SD_SD
- console.log("周二设定湿度:" + this.data11.series11[1].data[1]);
- }
- },
- back() {
- uni.navigateTo({
- url: '/pages/device/deviceInfo/deviceInfo'
- })
- },
- showLineA(canvasId, chartData) {
- canvaLineA = new uCharts({ //这些配置项的意思看这:https://www.kancloud.cn/qiun/ucharts/1172125
- $this: _self, //指针
- canvasId: canvasId, //id
- type: 'line', //类型
- colors: ['#F45E41'], //每一条的颜色
- fontSize: 14, //字体大小
- padding: [15, 15, 0, 15], //空白区域值
- legend: { //图例相关配置
- show: true,
- padding: 5,
- lineHeight: 11,
- margin: 0,
- },
- dataLabel: false, //显示数据标签内容值
- categories: chartData.categories, //数据类别
- series: chartData.series, //数据列表
- xAxis: { //X轴配置
- gridColor: '#CCCCCC', //X轴网格颜色
- gridType: 'dash', //X轴网格线型 'solid'为实线、'dash'为虚线`
- dashLength: 8, //X轴网格为虚线时,单段虚线长度
- },
- yAxis: { //y轴配置
- gridType: 'dash',
- gridColor: '#CCCCCC',
- dashLength: 8,
- min: 0, //取0为最小刻度
- max: 50, //取100为最大刻度
- },
- width: _self.cWidth, //canvas宽度,单位为px
- height: _self.cHeight, //canvas高度,单位为px
- extra: { //扩展配置
- line: {
- type: 'curve' //曲线 curve曲线,straight直线
- }
- }
- });
- },
- moveLineA(e) {
- canvaLineA.showToolTip(e, { //详情框
- format: function(item, category) {
- return category + ' ' + item.name + ':' + item.data + '℃'
- }
- });
- },
- //湿度
- showLineA11(canvasId, chartData) {
- canvaLineA11 = new uCharts({ //这些配置项的意思看这:https://www.kancloud.cn/qiun/ucharts/1172125
- $this: _self11, //指针
- canvasId: canvasId, //id
- type: 'line', //类型
- colors: ['#007AFF'], //每一条的颜色
- fontSize: 14, //字体大小
- padding: [15, 15, 0, 15], //空白区域值
- legend: { //图例相关配置
- show: true,
- padding: 5,
- lineHeight: 11,
- margin: 0,
- },
- dataLabel: false, //显示数据标签内容值
- categories: chartData.categories11, //数据类别
- series: chartData.series11, //数据列表
- xAxis: { //X轴配置
- gridColor: '#CCCCCC', //X轴网格颜色
- gridType: 'dash', //X轴网格线型 'solid'为实线、'dash'为虚线`
- dashLength: 8, //X轴网格为虚线时,单段虚线长度
- },
- yAxis: { //y轴配置
- gridType: 'dash',
- gridColor: '#CCCCCC',
- dashLength: 8,
- min: 0, //取0为最小刻度
- max: 80, //取100为最大刻度
- },
- width: _self11.cWidth, //canvas宽度,单位为px
- height: _self11.cHeight, //canvas高度,单位为px
- extra: { //扩展配置
- line: {
- type: 'curve' //曲线 curve曲线,straight直线
- }
- }
- });
- },
- moveLineA11(e) {
- canvaLineA11.showToolTip(e, { //详情框
- format: function(item, category) {
- return category + ' ' + item.name + ':' + item.data + '%'
- }
- });
- },
- async getWD_1(e) {
- let vm = this;
- let url = uni.$api.deviceParam.detail;
- let data = {
- id: "207",
- };
- let res = await uni.$http.get(url, data);
- this.gaugeOption.value = res.data.data.deviceParam.value;
- },
- async getSD_1(e) {
- let vm = this;
- let url = uni.$api.deviceParam.detail;
- let data = {
- id: "293",
- };
- let res = await uni.$http.get(url, data);
- this.gaugeOption2.value = res.data.data.deviceParam.value;
- },
- //获取24个小时的温度
- async getWD1(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "311",
- };
- let res = await uni.$http.get(url, data);
- this.WDdata.WD1 = res.data.data.deviceParam.value;
- },
- async getWD2(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "312",
- };
- let res = await uni.$http.get(url, data);
- this.WDdata.WD2 = res.data.data.deviceParam.value;
- },
- async getWD3(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "313",
- };
- let res = await uni.$http.get(url, data);
- this.WDdata.WD3 = res.data.data.deviceParam.value;
- this.data.series[0].data[0] = res.data.data.deviceParam.value;
- },
- async getWD4(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "314",
- };
- let res = await uni.$http.get(url, data);
- this.WDdata.WD4 = res.data.data.deviceParam.value;
- },
- async getWD5(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "315",
- };
- let res = await uni.$http.get(url, data);
- this.WDdata.WD5 = res.data.data.deviceParam.value;
- },
- async getWD6(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "316",
- };
- let res = await uni.$http.get(url, data);
- this.data.series[0].data[1] = res.data.data.deviceParam.value;
- this.WDdata.WD6 = res.data.data.deviceParam.value;
- },
- async getWD7(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "317",
- };
- let res = await uni.$http.get(url, data);
- this.WDdata.WD7 = res.data.data.deviceParam.value;
- },
- async getWD8(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "318",
- };
- let res = await uni.$http.get(url, data);
- this.WDdata.WD8 = res.data.data.deviceParam.value;
- },
- async getWD9(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "319",
- };
- let res = await uni.$http.get(url, data);
- this.data.series[0].data[2] = res.data.data.deviceParam.value;
- this.WDdata.WD9 = res.data.data.deviceParam.value;
- },
- async getWD10(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "320",
- };
- let res = await uni.$http.get(url, data);
- this.WDdata.WD10 = res.data.data.deviceParam.value;
- },
- async getWD11(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "321",
- };
- let res = await uni.$http.get(url, data);
- this.WDdata.WD11 = res.data.data.deviceParam.value;
- },
- async getWD12(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "322",
- };
- let res = await uni.$http.get(url, data);
- this.data.series[0].data[3] = res.data.data.deviceParam.value;
- this.WDdata.WD12 = res.data.data.deviceParam.value;
- },
- async getWD13(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "323",
- };
- let res = await uni.$http.get(url, data);
- this.WDdata.WD13 = res.data.data.deviceParam.value;
- },
- async getWD14(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "324",
- };
- let res = await uni.$http.get(url, data);
- this.WDdata.WD14 = res.data.data.deviceParam.value;
- },
- async getWD15(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "325",
- };
- let res = await uni.$http.get(url, data);
- this.data.series[0].data[4] = res.data.data.deviceParam.value;
- this.WDdata.WD15 = res.data.data.deviceParam.value;
- },
- async getWD16(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "326",
- };
- let res = await uni.$http.get(url, data);
- this.WDdata.WD16 = res.data.data.deviceParam.value;
- },
- async getWD17(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "327",
- };
- let res = await uni.$http.get(url, data);
- this.WDdata.WD17 = res.data.data.deviceParam.value;
- },
- async getWD18(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "328",
- };
- let res = await uni.$http.get(url, data);
- this.data.series[0].data[5] = res.data.data.deviceParam.value;
- this.WDdata.WD18 = res.data.data.deviceParam.value;
- },
- async getWD19(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "329",
- };
- let res = await uni.$http.get(url, data);
- this.WDdata.WD19 = res.data.data.deviceParam.value;
- },
- async getWD20(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "330",
- };
- let res = await uni.$http.get(url, data);
- this.WDdata.WD20 = res.data.data.deviceParam.value;
- },
- async getWD21(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "331",
- };
- let res = await uni.$http.get(url, data);
- this.data.series[0].data[6] = res.data.data.deviceParam.value;
- this.WDdata.WD21 = res.data.data.deviceParam.value;
- },
- async getWD22(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "332",
- };
- let res = await uni.$http.get(url, data);
- this.WDdata.WD22 = res.data.data.deviceParam.value;
- },
- async getWD23(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "333",
- };
- let res = await uni.$http.get(url, data);
- this.WDdata.WD23 = res.data.data.deviceParam.value;
- },
- async getWD24(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "334",
- };
- let res = await uni.$http.get(url, data);
- this.data.series[0].data[7] = res.data.data.deviceParam.value;
- this.WDdata.WD24 = res.data.data.deviceParam.value;
- },
- //获取24个小时的湿度
- async getSD1(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "335",
- };
- let res = await uni.$http.get(url, data);
- this.SDdata.SD1 = res.data.data.deviceParam.value;
- },
- async getSD2(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "336",
- };
- let res = await uni.$http.get(url, data);
- this.SDdata.SD2 = res.data.data.deviceParam.value;
- },
- async getSD3(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "337",
- };
- let res = await uni.$http.get(url, data);
- this.data11.series11[0].data[0] = res.data.data.deviceParam.value;
- this.SDdata.SD3 = res.data.data.deviceParam.value;
- },
- async getSD4(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "338",
- };
- let res = await uni.$http.get(url, data);
- this.SDdata.SD4 = res.data.data.deviceParam.value;
- },
- async getSD5(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "339",
- };
- let res = await uni.$http.get(url, data);
- this.SDdata.SD5 = res.data.data.deviceParam.value;
- },
- async getSD6(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "340",
- };
- let res = await uni.$http.get(url, data);
- this.data11.series11[0].data[1] = res.data.data.deviceParam.value;
- this.SDdata.SD6 = res.data.data.deviceParam.value;
- },
- async getSD7(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "341",
- };
- let res = await uni.$http.get(url, data);
- this.SDdata.SD7 = res.data.data.deviceParam.value;
- },
- async getSD8(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "342",
- };
- let res = await uni.$http.get(url, data);
- this.SDdata.SD8 = res.data.data.deviceParam.value;
- },
- async getSD9(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "343",
- };
- let res = await uni.$http.get(url, data);
- this.data11.series11[0].data[2] = res.data.data.deviceParam.value;
- this.SDdata.SD9 = res.data.data.deviceParam.value;
- },
- async getSD10(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "344",
- };
- let res = await uni.$http.get(url, data);
- this.SDdata.SD10 = res.data.data.deviceParam.value;
- },
- async getSD11(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "345",
- };
- let res = await uni.$http.get(url, data);
- this.SDdata.SD11 = res.data.data.deviceParam.value;
- },
- async getSD12(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "346",
- };
- let res = await uni.$http.get(url, data);
- this.data11.series11[0].data[3] = res.data.data.deviceParam.value;
- this.SDdata.SD12 = res.data.data.deviceParam.value;
- },
- async getSD13(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "347",
- };
- let res = await uni.$http.get(url, data);
- this.SDdata.SD13 = res.data.data.deviceParam.value;
- },
- async getSD14(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "348",
- };
- let res = await uni.$http.get(url, data);
- this.SDdata.SD14 = res.data.data.deviceParam.value;
- },
- async getSD15(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "349",
- };
- let res = await uni.$http.get(url, data);
- this.data11.series11[0].data[4] = res.data.data.deviceParam.value;
- this.SDdata.SD15 = res.data.data.deviceParam.value;
- },
- async getSD16(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "350",
- };
- let res = await uni.$http.get(url, data);
- this.SDdata.SD16 = res.data.data.deviceParam.value;
- },
- async getSD17(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "351",
- };
- let res = await uni.$http.get(url, data);
- this.SDdata.SD17 = res.data.data.deviceParam.value;
- },
- async getSD18(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "352",
- };
- let res = await uni.$http.get(url, data);
- this.data11.series11[0].data[5] = res.data.data.deviceParam.value;
- this.SDdata.SD18 = res.data.data.deviceParam.value;
- },
- async getSD19(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "353",
- };
- let res = await uni.$http.get(url, data);
- this.SDdata.SD19 = res.data.data.deviceParam.value;
- },
- async getSD20(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "354",
- };
- let res = await uni.$http.get(url, data);
- this.SDdata.SD20 = res.data.data.deviceParam.value;
- },
- async getSD21(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "355",
- };
- let res = await uni.$http.get(url, data);
- this.data11.series11[0].data[6] = res.data.data.deviceParam.value;
- this.SDdata.SD21 = res.data.data.deviceParam.value;
- },
- async getSD22(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "356",
- };
- let res = await uni.$http.get(url, data);
- this.SDdata.SD22 = res.data.data.deviceParam.value;
- },
- async getSD23(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "357",
- };
- let res = await uni.$http.get(url, data);
- this.SDdata.SD23 = res.data.data.deviceParam.value;
- },
- async getSD24(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "358",
- };
- let res = await uni.$http.get(url, data);
- this.data11.series11[0].data[7] = res.data.data.deviceParam.value;
- this.SDdata.SD24 = res.data.data.deviceParam.value;
- },
- //获取24个小时的温度设定
- async getWDSD1(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "359",
- };
- let res = await uni.$http.get(url, data);
- this.WDSDdata.WDSD1 = res.data.data.deviceParam.value;
- },
- async getWDSD2(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "360",
- };
- let res = await uni.$http.get(url, data);
- this.WDSDdata.WDSD2 = res.data.data.deviceParam.value;
- },
- async getWDSD3(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "361",
- };
- let res = await uni.$http.get(url, data);
- this.data.series[1].data[0] = res.data.data.deviceParam.value;
- this.WDSDdata.WDSD3 = res.data.data.deviceParam.value;
- },
- async getWDSD4(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "362",
- };
- let res = await uni.$http.get(url, data);
- this.WDSDdata.WDSD4 = res.data.data.deviceParam.value;
- },
- async getWDSD5(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "363",
- };
- let res = await uni.$http.get(url, data);
- this.WDSDdata.WDSD5 = res.data.data.deviceParam.value;
- },
- async getWDSD6(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "364",
- };
- let res = await uni.$http.get(url, data);
- this.data.series[1].data[1] = res.data.data.deviceParam.value;
- this.WDSDdata.WDSD6 = res.data.data.deviceParam.value;
- },
- async getWDSD7(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "365",
- };
- let res = await uni.$http.get(url, data);
- this.WDSDdata.WDSD7 = res.data.data.deviceParam.value;
- },
- async getWDSD8(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "366",
- };
- let res = await uni.$http.get(url, data);
- this.WDSDdata.WDSD8 = res.data.data.deviceParam.value;
- },
- async getWDSD9(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "367",
- };
- let res = await uni.$http.get(url, data);
- this.data.series[1].data[2] = res.data.data.deviceParam.value;
- this.WDSDdata.WDSD9 = res.data.data.deviceParam.value;
- },
- async getWDSD10(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "368",
- };
- let res = await uni.$http.get(url, data);
- this.WDSDdata.WDSD10 = res.data.data.deviceParam.value;
- },
- async getWDSD11(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "369",
- };
- let res = await uni.$http.get(url, data);
- this.WDSDdata.WDSD11 = res.data.data.deviceParam.value;
- },
- async getWDSD12(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "370",
- };
- let res = await uni.$http.get(url, data);
- this.data.series[1].data[3] = res.data.data.deviceParam.value;
- this.WDSDdata.WDSD12 = res.data.data.deviceParam.value;
- },
- async getWDSD13(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "371",
- };
- let res = await uni.$http.get(url, data);
- this.WDSDdata.WDSD13 = res.data.data.deviceParam.value;
- },
- async getWDSD14(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "372",
- };
- let res = await uni.$http.get(url, data);
- this.WDSDdata.WDSD14 = res.data.data.deviceParam.value;
- },
- async getWDSD15(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "373",
- };
- let res = await uni.$http.get(url, data);
- this.data.series[1].data[4] = res.data.data.deviceParam.value;
- this.WDSDdata.WDSD15 = res.data.data.deviceParam.value;
- },
- async getWDSD16(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "374",
- };
- let res = await uni.$http.get(url, data);
- this.WDSDdata.WDSD16 = res.data.data.deviceParam.value;
- },
- async getWDSD17(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "375",
- };
- let res = await uni.$http.get(url, data);
- this.WDSDdata.WDSD17 = res.data.data.deviceParam.value;
- },
- async getWDSD18(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "376",
- };
- let res = await uni.$http.get(url, data);
- this.data.series[1].data[5] = res.data.data.deviceParam.value;
- this.WDSDdata.WDSD18 = res.data.data.deviceParam.value;
- },
- async getWDSD19(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "377",
- };
- let res = await uni.$http.get(url, data);
- this.WDSDdata.WDSD19 = res.data.data.deviceParam.value;
- },
- async getWDSD20(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "378",
- };
- let res = await uni.$http.get(url, data);
- this.WDSDdata.WDSD20 = res.data.data.deviceParam.value;
- },
- async getWDSD21(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "379",
- };
- let res = await uni.$http.get(url, data);
- this.data.series[1].data[6] = res.data.data.deviceParam.value;
- this.WDSDdata.WDSD21 = res.data.data.deviceParam.value;
- },
- async getWDSD22(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "380",
- };
- let res = await uni.$http.get(url, data);
- this.WDSDdata.WDSD22 = res.data.data.deviceParam.value;
- },
- async getWDSD23(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "381",
- };
- let res = await uni.$http.get(url, data);
- this.WDSDdata.WDSD23 = res.data.data.deviceParam.value;
- },
- async getWDSD24(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "382",
- };
- let res = await uni.$http.get(url, data);
- this.data.series[1].data[7] = res.data.data.deviceParam.value;
- this.WDSDdata.WDSD24 = res.data.data.deviceParam.value;
- },
- //获取24个小时的湿度设定
- async getSDSD1(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "383",
- };
- let res = await uni.$http.get(url, data);
- this.SDSDdata.SDSD1 = res.data.data.deviceParam.value;
- },
- async getSDSD2(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "384",
- };
- let res = await uni.$http.get(url, data);
- this.SDSDdata.SDSD2 = res.data.data.deviceParam.value;
- },
- async getSDSD3(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "385",
- };
- let res = await uni.$http.get(url, data);
- this.data11.series11[1].data[0] = res.data.data.deviceParam.value;
- this.SDSDdata.SDSD3 = res.data.data.deviceParam.value;
- },
- async getSDSD4(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "386",
- };
- let res = await uni.$http.get(url, data);
- this.SDSDdata.SDSD4 = res.data.data.deviceParam.value;
- },
- async getSDSD5(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "387",
- };
- let res = await uni.$http.get(url, data);
- this.SDSDdata.SDSD5 = res.data.data.deviceParam.value;
- },
- async getSDSD6(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "388",
- };
- let res = await uni.$http.get(url, data);
- this.data11.series11[1].data[1] = res.data.data.deviceParam.value;
- this.SDSDdata.SDSD6 = res.data.data.deviceParam.value;
- },
- async getSDSD7(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "389",
- };
- let res = await uni.$http.get(url, data);
- this.SDSDdata.SDSD7 = res.data.data.deviceParam.value;
- },
- async getSDSD8(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "390",
- };
- let res = await uni.$http.get(url, data);
- this.SDSDdata.SDSD8 = res.data.data.deviceParam.value;
- },
- async getSDSD9(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "391",
- };
- let res = await uni.$http.get(url, data);
- this.data11.series11[1].data[2] = res.data.data.deviceParam.value;
- this.SDSDdata.SDSD9 = res.data.data.deviceParam.value;
- },
- async getSDSD10(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "392",
- };
- let res = await uni.$http.get(url, data);
- this.SDSDdata.SDSD10 = res.data.data.deviceParam.value;
- },
- async getSDSD11(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "393",
- };
- let res = await uni.$http.get(url, data);
- this.SDSDdata.SDSD11 = res.data.data.deviceParam.value;
- },
- async getSDSD12(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "394",
- };
- let res = await uni.$http.get(url, data);
- this.data11.series11[1].data[3] = res.data.data.deviceParam.value;
- this.SDSDdata.SDSD12 = res.data.data.deviceParam.value;
- },
- async getSDSD13(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "395",
- };
- let res = await uni.$http.get(url, data);
- this.SDSDdata.SDSD13 = res.data.data.deviceParam.value;
- },
- async getSDSD14(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "396",
- };
- let res = await uni.$http.get(url, data);
- this.SDSDdata.SDSD14 = res.data.data.deviceParam.value;
- },
- async getSDSD15(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "397",
- };
- let res = await uni.$http.get(url, data);
- this.data11.series11[1].data[4] = res.data.data.deviceParam.value;
- this.SDSDdata.SDSD15 = res.data.data.deviceParam.value;
- },
- async getSDSD16(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "398",
- };
- let res = await uni.$http.get(url, data);
- this.SDSDdata.SDSD16 = res.data.data.deviceParam.value;
- },
- async getSDSD17(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "399",
- };
- let res = await uni.$http.get(url, data);
- this.SDSDdata.SDSD17 = res.data.data.deviceParam.value;
- },
- async getSDSD18(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "400",
- };
- let res = await uni.$http.get(url, data);
- this.data11.series11[1].data[5] = res.data.data.deviceParam.value;
- this.SDSDdata.SDSD18 = res.data.data.deviceParam.value;
- },
- async getSDSD19(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "401",
- };
- let res = await uni.$http.get(url, data);
- this.SDSDdata.SDSD19 = res.data.data.deviceParam.value;
- },
- async getSDSD20(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "402",
- };
- let res = await uni.$http.get(url, data);
- this.SDSDdata.SDSD20 = res.data.data.deviceParam.value;
- },
- async getSDSD21(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "403",
- };
- let res = await uni.$http.get(url, data);
- this.data11.series11[1].data[6] = res.data.data.deviceParam.value;
- this.SDSDdata.SDSD21 = res.data.data.deviceParam.value;
- },
- async getSDSD22(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "404",
- };
- let res = await uni.$http.get(url, data);
- this.SDSDdata.SDSD22 = res.data.data.deviceParam.value;
- },
- async getSDSD23(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "405",
- };
- let res = await uni.$http.get(url, data);
- this.SDSDdata.SDSD23 = res.data.data.deviceParam.value;
- },
- async getSDSD24(e) {
- let vm = this;
- let url = uni.$api.deviceParam.getTimeData;
- let data = {
- id: "406",
- };
- let res = await uni.$http.get(url, data);
- this.data11.series11[1].data[7] = res.data.data.deviceParam.value;
- this.SDSDdata.SDSD24 = res.data.data.deviceParam.value;
- _self = this //声明this
- _self.showLineA("canvasLineA", _self.data); //触发执行函数
- _self11 = this //声明this
- _self11.showLineA11("canvasLineA11", _self11.data11); //触发执行函数
- },
- }
- }
- </script>
- <style>
- .anniu {
- width: 116rpx;
- height: 116rpx;
- float: right;
- margin-top: 20rpx;
- }
- .charts {
- margin-top: 60rpx;
- width: 702rpx;
- height: 500rpx;
- background-color: #FFFFFF;
- }
- .title1 {
- display: flex;
- flex-direction: column;
- align-items: center;
- }
- .tiao {
- width: 60px;
- height: 3px;
- margin-top: 20rpx;
- background: #007AFF;
- }
- .param {
- font-size: 38rpx;
- font-weight: 550;
- margin-top: 40rpx;
- }
- .white {
- width: 702rpx;
- height: 720rpx;
- margin-left: 24rpx;
- background-color: white;
- margin-top: 28rpx;
- border-radius: 10rpx;
- }
- .white1 {
- width: 702rpx;
- height: 720rpx;
- margin-left: 24rpx;
- background-color: white;
- margin-top: 28rpx;
- border-radius: 10rpx;
- }
- .chart {
- font-size: 26rpx;
- height: 300px;
- /* background:white; */
- background: rgb(30, 130, 250);
- display: flex;
- flex-direction: row;
- align-items: center;
- justify-content: center;
- }
- .charts-box {
- margin-left: 8rpx;
- margin-right: 8rpx;
- }
- </style>
|