[1078] 优化终端参数查询和设置
This commit is contained in:
@@ -63,6 +63,9 @@ export default {
|
|||||||
this.isLoading = true
|
this.isLoading = true
|
||||||
this.$store.dispatch('jtDevice/queryConfig', this.phoneNumber)
|
this.$store.dispatch('jtDevice/queryConfig', this.phoneNumber)
|
||||||
.then((data) => {
|
.then((data) => {
|
||||||
|
if (!data.cameraTimer) {
|
||||||
|
data.cameraTimer = {}
|
||||||
|
}
|
||||||
this.form = data
|
this.form = data
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
|
|||||||
89
web/src/views/jtDevice/deviceParam/carInfo.vue
Executable file
89
web/src/views/jtDevice/deviceParam/carInfo.vue
Executable file
@@ -0,0 +1,89 @@
|
|||||||
|
<template>
|
||||||
|
<div style="width: 100%;">
|
||||||
|
<div style="height: calc(100vh - 260px);">
|
||||||
|
<el-form ref="form" :model="form" label-width="240px" style="width: 50%; margin: 0 auto">
|
||||||
|
<el-form-item label="里程表读数(1/10km)" prop="mileage">
|
||||||
|
<el-input type="number" v-model="form.mileage" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="省域ID" prop="provincialId">
|
||||||
|
<el-input v-model="form.provincialId" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="市域ID" prop="cityId">
|
||||||
|
<el-input v-model="form.cityId" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="机动车号牌" prop="licensePlate">
|
||||||
|
<el-input v-model="form.licensePlate" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="车牌颜色" prop="licensePlateColor">
|
||||||
|
<el-select
|
||||||
|
v-model="form.licensePlateColor"
|
||||||
|
style="width: 100%"
|
||||||
|
placeholder="请选择车牌颜色"
|
||||||
|
>
|
||||||
|
<el-option label="未上牌" :value="0" />
|
||||||
|
<el-option label="蓝色" :value="1" />
|
||||||
|
<el-option label="黄色" :value="2" />
|
||||||
|
<el-option label="黑色" :value="3" />
|
||||||
|
<el-option label="白色" :value="4" />
|
||||||
|
<el-option label="绿色" :value="5" />
|
||||||
|
<el-option label="农黄色" :value="91" />
|
||||||
|
<el-option label="农绿色" :value="92" />
|
||||||
|
<el-option label="黄绿色" :value="93" />
|
||||||
|
<el-option label="渐变绿" :value="94" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
<p style="text-align: right">
|
||||||
|
<el-button type="primary" @click="onSubmit">确认</el-button>
|
||||||
|
<el-button @click="showDevice">取消</el-button>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'communication',
|
||||||
|
components: {
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
phoneNumber: {
|
||||||
|
type: String,
|
||||||
|
default: null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
form: {},
|
||||||
|
isLoading: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
mounted() {
|
||||||
|
this.initData()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
initData: function() {
|
||||||
|
this.isLoading = true
|
||||||
|
this.$store.dispatch('jtDevice/queryConfig', this.phoneNumber)
|
||||||
|
.then((data) => {
|
||||||
|
this.form = data
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
console.log(e)
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
this.isLoading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onSubmit: function() {
|
||||||
|
this.$emit('submit', this.form)
|
||||||
|
},
|
||||||
|
showDevice: function() {
|
||||||
|
this.$emit('show-device')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
89
web/src/views/jtDevice/deviceParam/gnssParam.vue
Executable file
89
web/src/views/jtDevice/deviceParam/gnssParam.vue
Executable file
@@ -0,0 +1,89 @@
|
|||||||
|
<template>
|
||||||
|
<div style="width: 100%;">
|
||||||
|
<div style="height: calc(100vh - 260px);">
|
||||||
|
<el-form ref="form" :model="form" label-width="240px" style="width: 50%; margin: 0 auto">
|
||||||
|
<el-form-item label="里程表读数(1/10km)" prop="mileage">
|
||||||
|
<el-input type="number" v-model="form.mileage" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="省域ID" prop="provincialId">
|
||||||
|
<el-input v-model="form.provincialId" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="市域ID" prop="cityId">
|
||||||
|
<el-input v-model="form.cityId" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="机动车号牌" prop="licensePlate">
|
||||||
|
<el-input v-model="form.licensePlate" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="车牌颜色" prop="licensePlateColor">
|
||||||
|
<el-select
|
||||||
|
v-model="form.licensePlateColor"
|
||||||
|
style="width: 100%"
|
||||||
|
placeholder="请选择车牌颜色"
|
||||||
|
>
|
||||||
|
<el-option label="未上牌" :value="0" />
|
||||||
|
<el-option label="蓝色" :value="1" />
|
||||||
|
<el-option label="黄色" :value="2" />
|
||||||
|
<el-option label="黑色" :value="3" />
|
||||||
|
<el-option label="白色" :value="4" />
|
||||||
|
<el-option label="绿色" :value="5" />
|
||||||
|
<el-option label="农黄色" :value="91" />
|
||||||
|
<el-option label="农绿色" :value="92" />
|
||||||
|
<el-option label="黄绿色" :value="93" />
|
||||||
|
<el-option label="渐变绿" :value="94" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
<p style="text-align: right">
|
||||||
|
<el-button type="primary" @click="onSubmit">确认</el-button>
|
||||||
|
<el-button @click="showDevice">取消</el-button>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'communication',
|
||||||
|
components: {
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
phoneNumber: {
|
||||||
|
type: String,
|
||||||
|
default: null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
form: {},
|
||||||
|
isLoading: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
mounted() {
|
||||||
|
this.initData()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
initData: function() {
|
||||||
|
this.isLoading = true
|
||||||
|
this.$store.dispatch('jtDevice/queryConfig', this.phoneNumber)
|
||||||
|
.then((data) => {
|
||||||
|
this.form = data
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
console.log(e)
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
this.isLoading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onSubmit: function() {
|
||||||
|
this.$emit('submit', this.form)
|
||||||
|
},
|
||||||
|
showDevice: function() {
|
||||||
|
this.$emit('show-device')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@@ -36,6 +36,12 @@
|
|||||||
<el-tab-pane label="休眠唤醒" name="awakenParam">
|
<el-tab-pane label="休眠唤醒" name="awakenParam">
|
||||||
<awakenParam v-if="activeTab === 'awakenParam'" :phone-number="phoneNumber" @submit="onSubmit" @show-device="showDevice"></awakenParam>
|
<awakenParam v-if="activeTab === 'awakenParam'" :phone-number="phoneNumber" @submit="onSubmit" @show-device="showDevice"></awakenParam>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="车辆信息" name="carInfo">
|
||||||
|
<carInfo v-if="activeTab === 'carInfo'" :phone-number="phoneNumber" @submit="onSubmit" @show-device="showDevice"></carInfo>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="卫星定位" name="gnssParam">
|
||||||
|
<gnssParam v-if="activeTab === 'gnssParam'" :phone-number="phoneNumber" @submit="onSubmit" @show-device="showDevice"></gnssParam>
|
||||||
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -51,11 +57,13 @@ import cameraTimer from './cameraTimer.vue'
|
|||||||
import imageConfig from './imageConfig.vue'
|
import imageConfig from './imageConfig.vue'
|
||||||
import videoParam from './videoParam.vue'
|
import videoParam from './videoParam.vue'
|
||||||
import awakenParam from './awakenParam.vue'
|
import awakenParam from './awakenParam.vue'
|
||||||
|
import carInfo from './carInfo.vue'
|
||||||
|
import gnssParam from './gnssParam.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'JTDeviceParam',
|
name: 'JTDeviceParam',
|
||||||
components: {
|
components: {
|
||||||
communication, server, position, phoneNumber, alarm, driving, cameraTimer, imageConfig, videoParam, awakenParam
|
communication, server, position, phoneNumber, alarm, driving, cameraTimer, imageConfig, videoParam, awakenParam, carInfo, gnssParam
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
phoneNumber: {
|
phoneNumber: {
|
||||||
|
|||||||
Reference in New Issue
Block a user