master
lishuaia 1 year ago
parent a450f8da87
commit b33e9ecd66

@ -4,8 +4,8 @@
"description": "A vue admin template with Element UI & axios & iconfont & permission control & lint", "description": "A vue admin template with Element UI & axios & iconfont & permission control & lint",
"author": "Pan <panfree23@gmail.com>", "author": "Pan <panfree23@gmail.com>",
"scripts": { "scripts": {
"dev": "vue-cli-service serve", "dev": "set NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve ",
"build:prod": "vue-cli-service build", "build:prod": "set NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build",
"build:stage": "vue-cli-service build --mode staging", "build:stage": "vue-cli-service build --mode staging",
"preview": "node build/index.js --preview", "preview": "node build/index.js --preview",
"svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml", "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml",

@ -24,6 +24,14 @@ export function getSensorTypeList(params) {
}) })
} }
export function getSensorTypeMyList(params) {
return request({
url: 'sensortype/my-list',
method: 'get',
params
})
}
export function getSensorData(params) { export function getSensorData(params) {
return request({ return request({
url: '/sensor/page-list', url: '/sensor/page-list',

@ -196,15 +196,15 @@
</el-table-column> </el-table-column>
<el-table-column prop="maxvalue" align="center" show-overflow-tooltip label="数据范围"> <el-table-column prop="maxData" align="center" show-overflow-tooltip label="数据范围">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input <el-input
v-model="scope.row.datadown" v-model="scope.row.minData"
placeholder="下限" placeholder="下限"
style="width:80px;height: 20px;" style="width:80px;height: 20px;"
size="mini" size="mini"
/>-- />--
<el-input v-model="scope.row.dataup" placeholder="上限" style="width:80px;" size="mini" /> <el-input v-model="scope.row.maxData" placeholder="上限" style="width:80px;" size="mini" />
<br> <br>
<div v-if="sensorTableData[scope.row.id - 1]['name'] =='水位'" style="margin-top:5px"> <div v-if="sensorTableData[scope.row.id - 1]['name'] =='水位'" style="margin-top:5px">
<el-input v-model="scope.row.p1" placeholder="表面积" style="width:80px;" size="mini" />-- <el-input v-model="scope.row.p1" placeholder="表面积" style="width:80px;" size="mini" />--
@ -214,8 +214,8 @@
</el-table-column> </el-table-column>
<el-table-column prop="minvalue" align="center" show-overflow-tooltip label="测量范围"> <el-table-column prop="minvalue" align="center" show-overflow-tooltip label="测量范围">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.p3" placeholder="下限" style="width:80px;" size="mini" />-- <el-input v-model="scope.row.minValue" placeholder="下限" style="width:80px;" size="mini" />--
<el-input v-model="scope.row.p4" placeholder="上限" style="width:80px;" size="mini" /> <el-input v-model="scope.row.maxValue" placeholder="上限" style="width:80px;" size="mini" />
</template> </template>
</el-table-column> </el-table-column>
@ -377,6 +377,8 @@ export default {
upperLimitYellow: 0, upperLimitYellow: 0,
lowerLimitOrange: 0, lowerLimitOrange: 0,
upperLimitOrange: 0, upperLimitOrange: 0,
minData: 0,
maxValue: 0,
p1: '', p1: '',
p2: '', p2: '',
state: 0, state: 0,
@ -489,8 +491,8 @@ export default {
console.log(val) console.log(val)
for (let index = 0; index < this.sensorNameList.length; index++) { for (let index = 0; index < this.sensorNameList.length; index++) {
if (this.sensorNameList[index]['value'] === val) { if (this.sensorNameList[index]['value'] === val) {
this.sensorTableData[id - 1]['dataup'] = this.sensorNameList[index]['maxValue'] this.sensorTableData[id - 1]['maxValue'] = this.sensorNameList[index]['maxValue']
this.sensorTableData[id - 1]['datadown'] = this.sensorNameList[index]['minValue'] this.sensorTableData[id - 1]['minValue'] = this.sensorNameList[index]['minValue']
this.sensorTableData[id - 1]['name'] = this.sensorNameList[index]['name'] this.sensorTableData[id - 1]['name'] = this.sensorNameList[index]['name']
this.sensorTableData[id - 1]['unitName'] = this.sensorNameList[index]['unitName'] this.sensorTableData[id - 1]['unitName'] = this.sensorNameList[index]['unitName']
} }
@ -519,8 +521,8 @@ export default {
sid: rDatas[index]['id'], sid: rDatas[index]['id'],
sensoName: rDatas[index]['type'], sensoName: rDatas[index]['type'],
interface: rDatas[index]['devPort'], interface: rDatas[index]['devPort'],
dataup: rDatas[index]['maxValue'], maxValue: rDatas[index]['maxValue'],
datadown: rDatas[index]['minValue'], minValue: rDatas[index]['minValue'],
unitName: rDatas[index]['unitName'], unitName: rDatas[index]['unitName'],
name: rDatas[index]['name'], name: rDatas[index]['name'],
p4: '', p4: '',
@ -531,6 +533,8 @@ export default {
upperLimitYellow: rDatas[index]['upperLimitYellow'], upperLimitYellow: rDatas[index]['upperLimitYellow'],
lowerLimitOrange: rDatas[index]['lowerLimitOrange'], lowerLimitOrange: rDatas[index]['lowerLimitOrange'],
upperLimitOrange: rDatas[index]['upperLimitOrange'], upperLimitOrange: rDatas[index]['upperLimitOrange'],
minData: rDatas[index]['minData'],
maxData: rDatas[index]['maxData'],
state: rDatas[index]['status'], state: rDatas[index]['status'],
p1: rDatas[index]['p1'], p1: rDatas[index]['p1'],
p2: rDatas[index]['p2'], p2: rDatas[index]['p2'],
@ -555,8 +559,8 @@ export default {
type: this.sensorTableData[index]['sensoName'], type: this.sensorTableData[index]['sensoName'],
name: this.sensorTableData[index]['name'], name: this.sensorTableData[index]['name'],
unitName: this.sensorTableData[index]['unitName'], unitName: this.sensorTableData[index]['unitName'],
minValue: this.sensorTableData[index]['datadown'], minValue: this.sensorTableData[index]['minValue'],
maxValue: this.sensorTableData[index]['dataup'], maxValue: this.sensorTableData[index]['maxValue'],
lowerLimit: this.sensorTableData[index]['datadown'], lowerLimit: this.sensorTableData[index]['datadown'],
upperLimit: this.sensorTableData[index]['dataup'], upperLimit: this.sensorTableData[index]['dataup'],
lowerLimitRed: this.sensorTableData[index]['lowerLimitRed'], lowerLimitRed: this.sensorTableData[index]['lowerLimitRed'],
@ -564,6 +568,8 @@ export default {
lowerLimitYellow: this.sensorTableData[index]['lowerLimitYellow'], lowerLimitYellow: this.sensorTableData[index]['lowerLimitYellow'],
upperLimitYellow: this.sensorTableData[index]['upperLimitYellow'], upperLimitYellow: this.sensorTableData[index]['upperLimitYellow'],
lowerLimitOrange: this.sensorTableData[index]['lowerLimitOrange'], lowerLimitOrange: this.sensorTableData[index]['lowerLimitOrange'],
minData: this.sensorTableData[index]['minData'],
maxData: this.sensorTableData[index]['maxData'],
upperLimitOrange: this.sensorTableData[index]['upperLimitOrange'] upperLimitOrange: this.sensorTableData[index]['upperLimitOrange']
}) })
} }

@ -81,8 +81,8 @@ export default {
} }
return { return {
loginForm: { loginForm: {
username: 'admin', username: '',
password: '123456' password: ''
}, },
loginRules: { loginRules: {
username: [{ required: true, trigger: 'blur', validator: validateUsername }], username: [{ required: true, trigger: 'blur', validator: validateUsername }],

@ -89,7 +89,6 @@
<span v-if="scope.row.type ==3">{{ reFengxiang(scope.row.currentValue ) }}</span> <span v-if="scope.row.type ==3">{{ reFengxiang(scope.row.currentValue ) }}</span>
<span v-if="!scope.row.sensors" class="warnstyle" title="已达到预警值,请及时处理"> <span v-if="!scope.row.sensors" class="warnstyle" title="已达到预警值,请及时处理">
<svg-icon <svg-icon
icon-class="jinggao" icon-class="jinggao"
class-name="jinggao" class-name="jinggao"
:style="reWarn(scope.row.linkStatus,scope.row.redWarning,scope.row.yellowWarning,scope.row.orangeWarning)" :style="reWarn(scope.row.linkStatus,scope.row.redWarning,scope.row.yellowWarning,scope.row.orangeWarning)"
@ -135,7 +134,7 @@
<script> <script>
import { getDeviceList, getDevReport } from '@/api/device' import { getDeviceList, getDevReport } from '@/api/device'
import { getDeviceGroupList } from '@/api/devgroup' import { getDeviceGroupList } from '@/api/devgroup'
import { getSensorLog, getSensorTypeList } from '@/api/sensor' import { getSensorLog, getSensorTypeMyList } from '@/api/sensor'
import elDragDialog from '@/directive/el-drag-dialog' import elDragDialog from '@/directive/el-drag-dialog'
import Pagination from '@/components/Pagination' // Secondary package based on el-pagination import Pagination from '@/components/Pagination' // Secondary package based on el-pagination
import linechart from './components/LineChart' import linechart from './components/LineChart'
@ -377,7 +376,7 @@ export default {
}) })
}, },
getSensorList() { getSensorList() {
getSensorTypeList().then(response => { getSensorTypeMyList().then(response => {
const rData = response.data const rData = response.data
this.sensorData = rData this.sensorData = rData
const tempData = {} const tempData = {}

Loading…
Cancel
Save