Browse Source

refactor: 参数设置周期上线设置7*24*60;修复统计图表点与时间不匹配的问题;太阳能板-》光伏板

feature-with-login
wally 4 years ago
parent
commit
05371f71aa
  1. 2
      .env.production
  2. 4
      package.json
  3. 2
      src/components/config/function-config-applied.vue
  4. 4
      src/components/config/function-config-pending.vue
  5. 2
      src/components/history/device.vue
  6. 2
      src/components/history/local.vue
  7. 20
      src/utils/statistical.js
  8. 2
      src/views/data-realtime.vue
  9. 38
      t

2
.env.production

@ -1 +1 @@
VITE_API_URL=https://www.tall.wiki
VITE_API_URL=http://139.196.27.233:29001

4
package.json

@ -5,8 +5,8 @@
"dev": "vite --mode test",
"dev:prod": "vite --mode production",
"dev-test": "vite --mode development",
"build": "vite build --mode test",
"build:prod": "vite build --mode production",
"build:test": "vite build --mode test",
"build": "vite build --mode production",
"serve": "vite preview",
"cz": "git add . && git cz",
"format": "prettier --write ./src",

2
src/components/config/function-config-applied.vue

@ -26,7 +26,7 @@
<span>{{ data.batteryHigh }}</span>
</el-col>
<el-col :lg="8" :md="12" :xl="6" :xs="24" class="text-sm text-gray-500 py-3">
<span>太阳能板电压高阈值(V)</span>
<span>光伏板电压高阈值(V)</span>
<span>{{ data.sunHigh }}</span>
</el-col>
<el-col :lg="8" :md="12" :xl="6" :xs="24" class="text-sm text-gray-500 py-3">

4
src/components/config/function-config-pending.vue

@ -37,7 +37,7 @@
</el-col>
<el-col :lg="8" :md="12" :span="12" :xl="6" :xs="24">
<el-form-item label="太阳能板电压高阈值(V)" prop="sunHigh">
<el-form-item label="光伏板电压高阈值(V)" prop="sunHigh">
<el-input-number v-model="data.sunHigh" :min="0" :step="0.1" />
</el-form-item>
</el-col>
@ -102,7 +102,7 @@
<el-row v-else :gutter="20">
<el-col :span="12">
<el-form-item prop="report.cycle">
<el-input-number v-model="data.report.cycle" :max="1440" :min="10" step="10" />
<el-input-number v-model="data.report.cycle" :max="10080" :min="10" step="10" />
</el-form-item>
</el-col>
</el-row>

2
src/components/history/device.vue

@ -25,7 +25,7 @@
<el-table-column align="center" label="盐分阻抗(Ω)" min-width="110" prop="saltR" />
<el-table-column align="center" label="机箱温度(℃)" min-width="110" prop="deviceTemperature" />
<el-table-column align="center" label="机箱湿度(RH%)" min-width="130" prop="deviceHumidity" />
<el-table-column align="center" label="太阳能板电压(V)" min-width="140" prop="solarVoltage" />
<el-table-column align="center" label="光伏板电压(V)" min-width="140" prop="solarVoltage" />
<el-table-column align="center" label="锂电池电压(V)" min-width="120" prop="batteryVoltage" />
<el-table-column align="center" label="电量百分比" min-width="94" prop="batteryVoltagePercentage" />
<el-table-column align="center" label="剩余电量(mAH)" min-width="140" prop="batteryVoltageRemain" />

2
src/components/history/local.vue

@ -23,7 +23,7 @@
<el-table-column align="center" label="SO2(ppb)" min-width="90" prop="so2" />
<el-table-column align="center" label="盐分温度(℃)" min-width="110" prop="saltT" />
<el-table-column align="center" label="盐分阻抗(Ω)" min-width="110" prop="saltR" />
<el-table-column align="center" label="太阳能板电压(V)" min-width="140" prop="solarVoltage" />
<el-table-column align="center" label="光伏板电压(V)" min-width="140" prop="solarVoltage" />
<el-table-column align="center" label="锂电池电压(V)" min-width="120" prop="batteryVoltage" />
<el-table-column align="center" label="机箱温度(℃)" min-width="110" prop="deviceTemperature" />
<el-table-column align="center" label="机箱湿度(RH%)" min-width="130" prop="deviceHumidity" />

20
src/utils/statistical.js

@ -34,15 +34,17 @@ function generateParams(data) {
};
data.forEach(item => {
result.time.push(dayjs(new Date(+item.time)).format('YY/MM/DD HH:mm'));
!isNaN(+item.so2) ? result.so2.push(+item.so2) : '';
!isNaN(+item.saltR) ? result.saltR.push(+item.saltR) : '';
!isNaN(+item.saltT) ? result.saltT.push(+item.saltT) : '';
!isNaN(+item.environmentTemperature) ? result.environmentTemperature.push(+item.environmentTemperature) : '';
!isNaN(+item.environmentHumidity) ? result.environmentHumidity.push(+item.environmentHumidity) : '';
!isNaN(+item.corrosion1) ? result.corrosionXIN.push(+item.corrosion1) : '';
!isNaN(+item.corrosion2) ? result.corrosionTONG.push(+item.corrosion2) : '';
!isNaN(+item.corrosion3) ? result.corrosionLV.push(+item.corrosion3) : '';
!isNaN(+item.corrosion4) ? result.corrosionGANG.push(+item.corrosion4) : '';
!isNaN(+item.so2) ? result.so2.push(+item.so2) : result.so2.push('');
!isNaN(+item.saltR) ? result.saltR.push(+item.saltR) : result.saltR.push('');
!isNaN(+item.saltT) ? result.saltT.push(+item.saltT) : result.saltT.push('');
!isNaN(+item.environmentTemperature)
? result.environmentTemperature.push(+item.environmentTemperature)
: result.environmentTemperature.push('');
!isNaN(+item.environmentHumidity) ? result.environmentHumidity.push(+item.environmentHumidity) : result.environmentHumidity.push('');
!isNaN(+item.corrosion1) ? result.corrosionXIN.push(+item.corrosion1) : result.corrosionXIN.push('');
!isNaN(+item.corrosion2) ? result.corrosionTONG.push(+item.corrosion2) : result.corrosionTONG.push('');
!isNaN(+item.corrosion3) ? result.corrosionLV.push(+item.corrosion3) : result.corrosionLV.push('');
!isNaN(+item.corrosion4) ? result.corrosionGANG.push(+item.corrosion4) : result.corrosionGANG.push('');
});
return result;
}

2
src/views/data-realtime.vue

@ -26,7 +26,7 @@
<el-table-column align="center" label="盐分阻抗(Ω)" min-width="110" prop="saltR" />
<el-table-column align="center" label="机箱温度(℃)" min-width="110" prop="deviceTemperature" />
<el-table-column align="center" label="机箱湿度(RH%)" min-width="130" prop="deviceHumidity" />
<el-table-column align="center" label="太阳能板电压(V)" min-width="140" prop="solarVoltage" />
<el-table-column align="center" label="光伏板电压(V)" min-width="140" prop="solarVoltage" />
<el-table-column align="center" label="锂电池电压(V)" min-width="120" prop="batteryVoltage" />
<el-table-column align="center" label="电量百分比" min-width="94" prop="batteryVoltagePercentage" />
<el-table-column align="center" label="剩余电量(mAH)" min-width="140" prop="batteryVoltageRemain" />

38
t

@ -1,38 +0,0 @@
usage: git tag [-a | -s | -u <key-id>] [-f] [-m <msg> | -F <file>]
<tagname> [<head>]
or: git tag -d <tagname>...
or: git tag -l [-n[<num>]] [--contains <commit>] [--no-contains <commit>] [--points-at <object>]
[--format=<format>] [--[no-]merged [<commit>]] [<pattern>...]
or: git tag -v [--format=<format>] <tagname>...
-l, --list list tag names
-n[<n>] print <n> lines of each tag message
-d, --delete delete tags
-v, --verify verify tags
Tag creation options
-a, --annotate annotated tag, needs a message
-m, --message <message>
tag message
-F, --file <file> read message from file
-e, --edit force edit of tag message
-s, --sign annotated and GPG-signed tag
--cleanup <mode> how to strip spaces and #comments from message
-u, --local-user <key-id>
use another key to sign the tag
-f, --force replace the tag if exists
--create-reflog create a reflog
Tag listing options
--column[=<style>] show tag list in columns
--contains <commit> print only tags that contain the commit
--no-contains <commit>
print only tags that don't contain the commit
--merged <commit> print only tags that are merged
--no-merged <commit> print only tags that are not merged
--sort <key> field name to sort on
--points-at <object> print only tags of the object
--format <format> format to use for the output
--color[=<when>] respect format colors
-i, --ignore-case sorting and filtering are case insensitive
Loading…
Cancel
Save