|
@@ -1,76 +1,11 @@
|
|
<template>
|
|
<template>
|
|
<div class="vehicleConfigurationDetailPanel">
|
|
<div class="vehicleConfigurationDetailPanel">
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="108px">
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="108px">
|
|
- <!-- <div class="inputBox flexBox">
|
|
|
|
|
|
+ <div class="inputBox flexBox">
|
|
<span class="label">配置ID</span>
|
|
<span class="label">配置ID</span>
|
|
<div>{{ form.configCode }}</div>
|
|
<div>{{ form.configCode }}</div>
|
|
- </div> -->
|
|
|
|
-
|
|
|
|
- <el-row class="rowBox">
|
|
|
|
- <el-col :span="6">
|
|
|
|
- <el-form-item label="配置名称:" prop="configName">
|
|
|
|
- <el-input
|
|
|
|
- placeholder="请输入"
|
|
|
|
- maxlength="60"
|
|
|
|
- v-autoTrim="{ obj: form, key: 'configName' }"
|
|
|
|
- v-model="form.configName"
|
|
|
|
- >
|
|
|
|
- </el-input>
|
|
|
|
- </el-form-item>
|
|
|
|
- </el-col>
|
|
|
|
- <el-col :span="6">
|
|
|
|
- <el-form-item label="配置描述:" prop="configDescription">
|
|
|
|
- <el-input
|
|
|
|
- placeholder="请输入"
|
|
|
|
- maxlength="200"
|
|
|
|
- v-autoTrim="{
|
|
|
|
- obj: form,
|
|
|
|
- key: 'configDescription',
|
|
|
|
- }"
|
|
|
|
- v-model="form.configDescription"
|
|
|
|
- >
|
|
|
|
- </el-input>
|
|
|
|
- </el-form-item>
|
|
|
|
- </el-col>
|
|
|
|
- <el-col :span="6">
|
|
|
|
- <el-form-item label="车辆名称:" prop="vehicleId">
|
|
|
|
- <el-select
|
|
|
|
- v-model="form.vehicleId"
|
|
|
|
- @change="vehicleChange"
|
|
|
|
- >
|
|
|
|
- <el-option
|
|
|
|
- v-for="item in vehicleNameList"
|
|
|
|
- :label="item.vehicleName"
|
|
|
|
- :value="item.id"
|
|
|
|
- :key="item.id"
|
|
|
|
- ></el-option>
|
|
|
|
- </el-select>
|
|
|
|
- </el-form-item>
|
|
|
|
- </el-col>
|
|
|
|
- <el-col :span="6">
|
|
|
|
- <el-form-item label="车辆描述:" prop="vehicleDescription">
|
|
|
|
- <el-input
|
|
|
|
- placeholder="请输入"
|
|
|
|
- maxlength="200"
|
|
|
|
- v-autoTrim="{
|
|
|
|
- obj: form,
|
|
|
|
- key: 'vehicleDescription',
|
|
|
|
- }"
|
|
|
|
- v-model="form.vehicleDescription"
|
|
|
|
- disabled
|
|
|
|
- >
|
|
|
|
- </el-input>
|
|
|
|
- </el-form-item>
|
|
|
|
- </el-col>
|
|
|
|
- </el-row>
|
|
|
|
-
|
|
|
|
- <!-- <div>
|
|
|
|
- <el-button type="primary" @click="drawer = true"
|
|
|
|
- >设置</el-button
|
|
|
|
- >
|
|
|
|
- </div> -->
|
|
|
|
-
|
|
|
|
- <!-- <div class="flexBox headBox">
|
|
|
|
|
|
+ </div>
|
|
|
|
+ <div class="flexBox headBox">
|
|
<el-form-item label="配置名称:" prop="configName">
|
|
<el-form-item label="配置名称:" prop="configName">
|
|
<el-input
|
|
<el-input
|
|
placeholder="请输入"
|
|
placeholder="请输入"
|
|
@@ -80,16 +15,11 @@
|
|
>
|
|
>
|
|
</el-input>
|
|
</el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- </div>
|
|
|
|
- <div class="flexBox headBox">
|
|
|
|
<el-form-item label="配置描述:" prop="configDescription">
|
|
<el-form-item label="配置描述:" prop="configDescription">
|
|
<el-input
|
|
<el-input
|
|
placeholder="请输入"
|
|
placeholder="请输入"
|
|
maxlength="200"
|
|
maxlength="200"
|
|
- v-autoTrim="{
|
|
|
|
- obj: form,
|
|
|
|
- key: 'configDescription',
|
|
|
|
- }"
|
|
|
|
|
|
+ v-autoTrim="{ obj: form, key: 'configDescription' }"
|
|
v-model="form.configDescription"
|
|
v-model="form.configDescription"
|
|
>
|
|
>
|
|
</el-input>
|
|
</el-input>
|
|
@@ -106,255 +36,158 @@
|
|
></el-option>
|
|
></el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- </div>
|
|
|
|
- <div class="flexBox headBox">
|
|
|
|
<el-form-item label="车辆描述:" prop="vehicleDescription">
|
|
<el-form-item label="车辆描述:" prop="vehicleDescription">
|
|
<el-input
|
|
<el-input
|
|
placeholder="请输入"
|
|
placeholder="请输入"
|
|
maxlength="200"
|
|
maxlength="200"
|
|
- v-autoTrim="{
|
|
|
|
- obj: form,
|
|
|
|
- key: 'vehicleDescription',
|
|
|
|
- }"
|
|
|
|
|
|
+ v-autoTrim="{ obj: form, key: 'vehicleDescription' }"
|
|
v-model="form.vehicleDescription"
|
|
v-model="form.vehicleDescription"
|
|
disabled
|
|
disabled
|
|
>
|
|
>
|
|
</el-input>
|
|
</el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- </div> -->
|
|
|
|
|
|
+ </div>
|
|
</el-form>
|
|
</el-form>
|
|
|
|
|
|
- <div class="panelContent">
|
|
|
|
- <!-- <div class="infoLeft"> -->
|
|
|
|
- <div class="infoLeft contentBox">
|
|
|
|
- <div
|
|
|
|
- class="handleList"
|
|
|
|
- v-bind:class="{
|
|
|
|
- handleListA: form.share === '0' || form.share === '1',
|
|
|
|
- }"
|
|
|
|
- >
|
|
|
|
- <el-scrollbar
|
|
|
|
- id="elScrollBarA"
|
|
|
|
- ref="scrollbarA"
|
|
|
|
- view-class="scroll"
|
|
|
|
- >
|
|
|
|
- <handle-config-list
|
|
|
|
- ref="handleConfigList"
|
|
|
|
- @curItem="curItem"
|
|
|
|
- @addOne="addOne"
|
|
|
|
- @delOne="delOne"
|
|
|
|
- :configList="configList"
|
|
|
|
- :curOne="curOne"
|
|
|
|
- ></handle-config-list>
|
|
|
|
- </el-scrollbar>
|
|
|
|
- </div>
|
|
|
|
-
|
|
|
|
- <div class="btns">
|
|
|
|
- <el-button
|
|
|
|
- v-if="form.share === '0' || form.share === ''"
|
|
|
|
- type="primary"
|
|
|
|
- @click="save(false)"
|
|
|
|
- >保存</el-button
|
|
|
|
- >
|
|
|
|
- <el-button
|
|
|
|
- v-if="form.share === '1'"
|
|
|
|
- type="primary"
|
|
|
|
- @click="save(true)"
|
|
|
|
- >另存为</el-button
|
|
|
|
- >
|
|
|
|
- <el-button type="primary" plain @click="cancel"
|
|
|
|
- >取消</el-button
|
|
|
|
- >
|
|
|
|
- </div>
|
|
|
|
-
|
|
|
|
- <div class="btnsA" v-if="form.share === '0'">
|
|
|
|
- <el-button
|
|
|
|
- v-if="form.share === '0'"
|
|
|
|
- type="primary"
|
|
|
|
- @click="save(true)"
|
|
|
|
- >另存为</el-button
|
|
|
|
- >
|
|
|
|
- </div>
|
|
|
|
|
|
+ <div class="contentBox">
|
|
|
|
+ <div>
|
|
|
|
+ <handle-config-list
|
|
|
|
+ ref="handleConfigList"
|
|
|
|
+ @curItem="curItem"
|
|
|
|
+ @addOne="addOne"
|
|
|
|
+ @delOne="delOne"
|
|
|
|
+ :configList="configList"
|
|
|
|
+ :curOne="curOne"
|
|
|
|
+ ></handle-config-list>
|
|
|
|
+ </div>
|
|
|
|
|
|
- <!-- <canvas-sensor
|
|
|
|
|
|
+ <div
|
|
|
|
+ class="model"
|
|
|
|
+ v-bind:style="{ width: width + 'px', height: width / 2 + 'px' }"
|
|
|
|
+ >
|
|
|
|
+ <!-- <img :src="modelImgSrc" width="100%" /> -->
|
|
|
|
+ <canvas-sensor
|
|
ref="canvasSensor"
|
|
ref="canvasSensor"
|
|
:coordinate="coordinate"
|
|
:coordinate="coordinate"
|
|
:modelImgSrc="modelImgSrc"
|
|
:modelImgSrc="modelImgSrc"
|
|
:curOneName="curOne.name"
|
|
:curOneName="curOne.name"
|
|
- ></canvas-sensor> -->
|
|
|
|
- <!-- </div> -->
|
|
|
|
- <!-- </div> -->
|
|
|
|
|
|
+ ></canvas-sensor>
|
|
</div>
|
|
</div>
|
|
- <div class="threeRight">
|
|
|
|
- <div class="viewBox">
|
|
|
|
- <span
|
|
|
|
- class="view el-icon-view"
|
|
|
|
- @click="showAll"
|
|
|
|
- title="显示全部"
|
|
|
|
- ></span>
|
|
|
|
- </div>
|
|
|
|
|
|
|
|
- <three-sensor
|
|
|
|
- ref="threeSensor"
|
|
|
|
- :xValue="coordinate.x"
|
|
|
|
- :yValue="coordinate.y"
|
|
|
|
- :zValue="coordinate.z"
|
|
|
|
- :hValue="coordinate.p"
|
|
|
|
- :pValue="coordinate.r"
|
|
|
|
- :rValue="coordinate.h"
|
|
|
|
- :carModel="carModel"
|
|
|
|
- :isAdd="!!$route.query.id"
|
|
|
|
- :configList="configList"
|
|
|
|
- @posChange="posChange"
|
|
|
|
- ></three-sensor>
|
|
|
|
-
|
|
|
|
- <div v-show="configBox" class="conditions">
|
|
|
|
- <el-form
|
|
|
|
- ref="formA"
|
|
|
|
- :model="formA"
|
|
|
|
- :rules="rulesA"
|
|
|
|
- label-width="99px"
|
|
|
|
|
|
+ <div class="conditions">
|
|
|
|
+ <div class="btnBox">
|
|
|
|
+ <el-button type="primary" @click="saveConfig"
|
|
|
|
+ >保存设置</el-button
|
|
>
|
|
>
|
|
- <div class="forms">
|
|
|
|
- <el-form-item label="X(mm):" prop="sensorX">
|
|
|
|
- <el-input
|
|
|
|
- placeholder="请输入"
|
|
|
|
- maxlength="12"
|
|
|
|
- v-autoTrim="{
|
|
|
|
- obj: formA,
|
|
|
|
- key: 'sensorX',
|
|
|
|
- }"
|
|
|
|
- v-model="formA.sensorX"
|
|
|
|
- @input="inputChange"
|
|
|
|
- type="number"
|
|
|
|
- step="1"
|
|
|
|
- >
|
|
|
|
- </el-input>
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="Y(mm):" prop="sensorY">
|
|
|
|
- <el-input
|
|
|
|
- placeholder="请输入"
|
|
|
|
- maxlength="12"
|
|
|
|
- v-autoTrim="{
|
|
|
|
- obj: formA,
|
|
|
|
- key: 'sensorY',
|
|
|
|
- }"
|
|
|
|
- v-model="formA.sensorY"
|
|
|
|
- @input="inputChange"
|
|
|
|
- type="number"
|
|
|
|
- step="1"
|
|
|
|
- >
|
|
|
|
- </el-input>
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="Z(mm):" prop="sensorZ">
|
|
|
|
- <el-input
|
|
|
|
- placeholder="请输入"
|
|
|
|
- maxlength="12"
|
|
|
|
- v-autoTrim="{
|
|
|
|
- obj: formA,
|
|
|
|
- key: 'sensorZ',
|
|
|
|
- }"
|
|
|
|
- v-model="formA.sensorZ"
|
|
|
|
- @input="inputChange"
|
|
|
|
- type="number"
|
|
|
|
- step="1"
|
|
|
|
- >
|
|
|
|
- </el-input>
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="横摆角(deg):" prop="sensorH">
|
|
|
|
- <el-input
|
|
|
|
- placeholder="请输入"
|
|
|
|
- maxlength="12"
|
|
|
|
- v-autoTrim="{
|
|
|
|
- obj: formA,
|
|
|
|
- key: 'sensorH',
|
|
|
|
- }"
|
|
|
|
- v-model="formA.sensorH"
|
|
|
|
- @input="inputChange"
|
|
|
|
- type="number"
|
|
|
|
- step="1"
|
|
|
|
- >
|
|
|
|
- </el-input>
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="俯仰角(deg):" prop="sensorP">
|
|
|
|
- <el-input
|
|
|
|
- placeholder="请输入"
|
|
|
|
- maxlength="12"
|
|
|
|
- v-autoTrim="{
|
|
|
|
- obj: formA,
|
|
|
|
- key: 'sensorP',
|
|
|
|
- }"
|
|
|
|
- v-model="formA.sensorP"
|
|
|
|
- @input="inputChange"
|
|
|
|
- type="number"
|
|
|
|
- step="1"
|
|
|
|
- >
|
|
|
|
- </el-input>
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="翻滚角(deg):" prop="sensorR">
|
|
|
|
- <el-input
|
|
|
|
- placeholder="请输入"
|
|
|
|
- maxlength="12"
|
|
|
|
- v-autoTrim="{
|
|
|
|
- obj: formA,
|
|
|
|
- key: 'sensorR',
|
|
|
|
- }"
|
|
|
|
- v-model="formA.sensorR"
|
|
|
|
- @input="inputChange"
|
|
|
|
- type="number"
|
|
|
|
- step="1"
|
|
|
|
- >
|
|
|
|
- </el-input>
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item
|
|
|
|
- label="端口"
|
|
|
|
- prop="sensorPort"
|
|
|
|
- v-show="curOne.name === 'ogt'"
|
|
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <el-form
|
|
|
|
+ ref="formA"
|
|
|
|
+ :model="formA"
|
|
|
|
+ :rules="rulesA"
|
|
|
|
+ label-width="108px"
|
|
|
|
+ >
|
|
|
|
+ <div class="forms">
|
|
|
|
+ <el-form-item label="X(mm):" prop="sensorX">
|
|
|
|
+ <el-input
|
|
|
|
+ placeholder="请输入"
|
|
|
|
+ maxlength="12"
|
|
|
|
+ v-autoTrim="{ obj: formA, key: 'sensorX' }"
|
|
|
|
+ v-model="formA.sensorX"
|
|
|
|
+ @input="inputChange"
|
|
>
|
|
>
|
|
- <el-input
|
|
|
|
- placeholder="请输入"
|
|
|
|
- maxlength="9"
|
|
|
|
- v-autoTrim="{
|
|
|
|
- obj: formA,
|
|
|
|
- key: 'sensorPort',
|
|
|
|
- }"
|
|
|
|
- v-model="formA.sensorPort"
|
|
|
|
- >
|
|
|
|
- </el-input>
|
|
|
|
- </el-form-item>
|
|
|
|
- </div>
|
|
|
|
- </el-form>
|
|
|
|
-
|
|
|
|
- <div class="btnBox">
|
|
|
|
- <el-button
|
|
|
|
- type="primary"
|
|
|
|
- @click="saveConfig"
|
|
|
|
- size="small"
|
|
|
|
- >保存设置</el-button
|
|
|
|
- >
|
|
|
|
- <el-button
|
|
|
|
- type="primary"
|
|
|
|
- @click="closeConfig"
|
|
|
|
- plain
|
|
|
|
- size="small"
|
|
|
|
- >关闭</el-button
|
|
|
|
|
|
+ </el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="Y(mm):" prop="sensorY">
|
|
|
|
+ <el-input
|
|
|
|
+ placeholder="请输入"
|
|
|
|
+ maxlength="12"
|
|
|
|
+ v-autoTrim="{ obj: formA, key: 'sensorY' }"
|
|
|
|
+ v-model="formA.sensorY"
|
|
|
|
+ @input="inputChange"
|
|
|
|
+ >
|
|
|
|
+ </el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="Z(mm):" prop="sensorZ">
|
|
|
|
+ <el-input
|
|
|
|
+ placeholder="请输入"
|
|
|
|
+ maxlength="12"
|
|
|
|
+ v-autoTrim="{ obj: formA, key: 'sensorZ' }"
|
|
|
|
+ v-model="formA.sensorZ"
|
|
|
|
+ >
|
|
|
|
+ </el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="横摆角(deg):" prop="sensorH">
|
|
|
|
+ <el-input
|
|
|
|
+ placeholder="请输入"
|
|
|
|
+ maxlength="12"
|
|
|
|
+ v-autoTrim="{ obj: formA, key: 'sensorH' }"
|
|
|
|
+ v-model="formA.sensorH"
|
|
|
|
+ @input="inputChange"
|
|
|
|
+ >
|
|
|
|
+ </el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="俯仰角(deg):" prop="sensorP">
|
|
|
|
+ <el-input
|
|
|
|
+ placeholder="请输入"
|
|
|
|
+ maxlength="12"
|
|
|
|
+ v-autoTrim="{ obj: formA, key: 'sensorP' }"
|
|
|
|
+ v-model="formA.sensorP"
|
|
|
|
+ >
|
|
|
|
+ </el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="翻滚角(deg):" prop="sensorR">
|
|
|
|
+ <el-input
|
|
|
|
+ placeholder="请输入"
|
|
|
|
+ maxlength="12"
|
|
|
|
+ v-autoTrim="{ obj: formA, key: 'sensorR' }"
|
|
|
|
+ v-model="formA.sensorR"
|
|
|
|
+ >
|
|
|
|
+ </el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item
|
|
|
|
+ label="端口"
|
|
|
|
+ prop="sensorPort"
|
|
|
|
+ v-show="curOne.name === 'ogt'"
|
|
>
|
|
>
|
|
|
|
+ <el-input
|
|
|
|
+ placeholder="请输入"
|
|
|
|
+ maxlength="9"
|
|
|
|
+ v-autoTrim="{ obj: formA, key: 'sensorPort' }"
|
|
|
|
+ v-model="formA.sensorPort"
|
|
|
|
+ >
|
|
|
|
+ </el-input>
|
|
|
|
+ </el-form-item>
|
|
</div>
|
|
</div>
|
|
- </div>
|
|
|
|
|
|
+ </el-form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+ <div class="btns">
|
|
|
|
+ <el-button
|
|
|
|
+ v-if="form.share === '0' || form.share === ''"
|
|
|
|
+ type="primary"
|
|
|
|
+ @click="save(false)"
|
|
|
|
+ >保存</el-button
|
|
|
|
+ >
|
|
|
|
+ <el-button
|
|
|
|
+ v-if="form.share === '0' || form.share === '1'"
|
|
|
|
+ type="primary"
|
|
|
|
+ @click="save(true)"
|
|
|
|
+ >另存为</el-button
|
|
|
|
+ >
|
|
|
|
+ <el-button type="primary" plain @click="cancel">取消</el-button>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import handleConfigList from "./components/handleConfigList.vue";
|
|
import handleConfigList from "./components/handleConfigList.vue";
|
|
import canvasSensor from "./components/canvasVehicleConfiguration.vue";
|
|
import canvasSensor from "./components/canvasVehicleConfiguration.vue";
|
|
-import threeSensor from "./components/threeVehicleConfiguration.vue";
|
|
|
|
import { mapState } from "vuex";
|
|
import { mapState } from "vuex";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: "vehicleConfigurationDetail", // 车辆配置详情
|
|
name: "vehicleConfigurationDetail", // 车辆配置详情
|
|
- components: { handleConfigList, canvasSensor, threeSensor },
|
|
|
|
|
|
+ components: { handleConfigList, canvasSensor },
|
|
data() {
|
|
data() {
|
|
// 校验最多4位小数
|
|
// 校验最多4位小数
|
|
let validateNum = (rule, value, callback) => {
|
|
let validateNum = (rule, value, callback) => {
|
|
@@ -419,7 +252,7 @@ export default {
|
|
},
|
|
},
|
|
{
|
|
{
|
|
validator: validateNum,
|
|
validator: validateNum,
|
|
- message: "最多带有4位小数",
|
|
|
|
|
|
+ message: "请输入最多带有4位小数的数字",
|
|
trigger: ["blur"],
|
|
trigger: ["blur"],
|
|
},
|
|
},
|
|
],
|
|
],
|
|
@@ -431,7 +264,7 @@ export default {
|
|
},
|
|
},
|
|
{
|
|
{
|
|
validator: validateNum,
|
|
validator: validateNum,
|
|
- message: "最多带有4位小数",
|
|
|
|
|
|
+ message: "请输入最多带有4位小数的数字",
|
|
trigger: ["blur"],
|
|
trigger: ["blur"],
|
|
},
|
|
},
|
|
],
|
|
],
|
|
@@ -443,7 +276,7 @@ export default {
|
|
},
|
|
},
|
|
{
|
|
{
|
|
validator: validateNum,
|
|
validator: validateNum,
|
|
- message: "最多带有4位小数",
|
|
|
|
|
|
+ message: "请输入最多带有4位小数的数字",
|
|
trigger: ["blur"],
|
|
trigger: ["blur"],
|
|
},
|
|
},
|
|
],
|
|
],
|
|
@@ -451,12 +284,12 @@ export default {
|
|
{ required: true, message: "请输入", trigger: "blur" },
|
|
{ required: true, message: "请输入", trigger: "blur" },
|
|
{
|
|
{
|
|
validator: validateNum,
|
|
validator: validateNum,
|
|
- message: "最多带有4位小数",
|
|
|
|
|
|
+ message: "请输入最多带有4位小数的数字",
|
|
trigger: ["blur"],
|
|
trigger: ["blur"],
|
|
},
|
|
},
|
|
{
|
|
{
|
|
validator: validateNumC,
|
|
validator: validateNumC,
|
|
- message: "-180至180",
|
|
|
|
|
|
+ message: "请输入不小于-180且不大于180的数字",
|
|
trigger: ["blur"],
|
|
trigger: ["blur"],
|
|
},
|
|
},
|
|
],
|
|
],
|
|
@@ -464,12 +297,12 @@ export default {
|
|
{ required: true, message: "请输入", trigger: "blur" },
|
|
{ required: true, message: "请输入", trigger: "blur" },
|
|
{
|
|
{
|
|
validator: validateNum,
|
|
validator: validateNum,
|
|
- message: "最多带有4位小数",
|
|
|
|
|
|
+ message: "请输入最多带有4位小数的数字",
|
|
trigger: ["blur"],
|
|
trigger: ["blur"],
|
|
},
|
|
},
|
|
{
|
|
{
|
|
validator: validateNumC,
|
|
validator: validateNumC,
|
|
- message: "-180至180",
|
|
|
|
|
|
+ message: "请输入不小于-180且不大于180的数字",
|
|
trigger: ["blur"],
|
|
trigger: ["blur"],
|
|
},
|
|
},
|
|
],
|
|
],
|
|
@@ -477,12 +310,12 @@ export default {
|
|
{ required: true, message: "请输入", trigger: "blur" },
|
|
{ required: true, message: "请输入", trigger: "blur" },
|
|
{
|
|
{
|
|
validator: validateNum,
|
|
validator: validateNum,
|
|
- message: "最多带有4位小数",
|
|
|
|
|
|
+ message: "请输入最多带有4位小数的数字",
|
|
trigger: ["blur"],
|
|
trigger: ["blur"],
|
|
},
|
|
},
|
|
{
|
|
{
|
|
validator: validateNumC,
|
|
validator: validateNumC,
|
|
- message: "-180至180",
|
|
|
|
|
|
+ message: "请输入不小于-180且不大于180的数字",
|
|
trigger: ["blur"],
|
|
trigger: ["blur"],
|
|
},
|
|
},
|
|
],
|
|
],
|
|
@@ -504,13 +337,7 @@ export default {
|
|
},
|
|
},
|
|
modelImgSrc: require("@/assets/common/image/others/carTopView.png"), // 车辆图片地址
|
|
modelImgSrc: require("@/assets/common/image/others/carTopView.png"), // 车辆图片地址
|
|
width: 300,
|
|
width: 300,
|
|
- // 若都是0,第一个input改变时,如果值为0,会出现值变了,
|
|
|
|
- // 但传感器没有变化的问题,输入其他值和后续输入均无问题
|
|
|
|
- // 每切换一次也有此问题,故不能给0
|
|
|
|
- coordinate: { x: 0.1, y: 0.1, z: 0.1, h: 0.1, p: 0.1, r: 0.1 }, // 存放传递给展示的值
|
|
|
|
- // coordinate: { x: 20, y: 20, z: 20, h: 20, p: 20, r: 20 }, // 存放传递给展示的值
|
|
|
|
- configBox: false, // 配置项box
|
|
|
|
- carModel: "", // 车模型
|
|
|
|
|
|
+ coordinate: { x: 0, y: 0 }, // 存放传递给canvas的值
|
|
};
|
|
};
|
|
},
|
|
},
|
|
|
|
|
|
@@ -596,17 +423,6 @@ export default {
|
|
let item = this.vehicleNameList.find((i) => i.id == id);
|
|
let item = this.vehicleNameList.find((i) => i.id == id);
|
|
this.form.vehicleDescription = item.description;
|
|
this.form.vehicleDescription = item.description;
|
|
this.modelImgSrc = this.getImgUrl(item.vehicleTopView);
|
|
this.modelImgSrc = this.getImgUrl(item.vehicleTopView);
|
|
-
|
|
|
|
- // console.log('change');
|
|
|
|
- // if (/[0-9]/.test(+id.slice(-1))) {
|
|
|
|
- // this.carModel = "2";
|
|
|
|
- // } else {
|
|
|
|
- // if (id.slice(-1) === "f") {
|
|
|
|
- // this.carModel = "f";
|
|
|
|
- // } else {
|
|
|
|
- // this.carModel = "7";
|
|
|
|
- // }
|
|
|
|
- // }
|
|
|
|
// this.$refs.canvasSensor.drawBg();
|
|
// this.$refs.canvasSensor.drawBg();
|
|
},
|
|
},
|
|
// 验证各传感器数组的每一项表单数据是否齐全
|
|
// 验证各传感器数组的每一项表单数据是否齐全
|
|
@@ -696,7 +512,6 @@ export default {
|
|
}
|
|
}
|
|
//若直接传info即this.form,可能是由于传入了响应式,造成数据会变动
|
|
//若直接传info即this.form,可能是由于传入了响应式,造成数据会变动
|
|
this.configList[type].unshift({ ...info });
|
|
this.configList[type].unshift({ ...info });
|
|
- this.configBox = true;
|
|
|
|
},
|
|
},
|
|
delOne(type, index) {
|
|
delOne(type, index) {
|
|
this.configList[type].splice(index, 1);
|
|
this.configList[type].splice(index, 1);
|
|
@@ -720,14 +535,6 @@ export default {
|
|
this.formA,
|
|
this.formA,
|
|
this.configList[item.name][item.index]
|
|
this.configList[item.name][item.index]
|
|
); */
|
|
); */
|
|
- this.coordinate = {
|
|
|
|
- x: 0.1,
|
|
|
|
- y: 0.1,
|
|
|
|
- z: 0.1,
|
|
|
|
- h: 0.1,
|
|
|
|
- p: 0.1,
|
|
|
|
- r: 0.1,
|
|
|
|
- };
|
|
|
|
let formA = this.configList[item.name][item.index];
|
|
let formA = this.configList[item.name][item.index];
|
|
|
|
|
|
this.formA.sensorX = formA.sensorX;
|
|
this.formA.sensorX = formA.sensorX;
|
|
@@ -740,13 +547,8 @@ export default {
|
|
this.formA.sensorPort = formA.sensorPort;
|
|
this.formA.sensorPort = formA.sensorPort;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- // this.$refs.canvasSensor.clear();
|
|
|
|
- // this.$refs.threeSensor.reset();
|
|
|
|
- setTimeout(() => {
|
|
|
|
- this.$refs.threeSensor.reset(this.curOne.name);
|
|
|
|
- }, 0);
|
|
|
|
- this.configBox = true;
|
|
|
|
- // this.inputChange();
|
|
|
|
|
|
+ this.$refs.canvasSensor.clear();
|
|
|
|
+ this.inputChange();
|
|
},
|
|
},
|
|
saveConfig() {
|
|
saveConfig() {
|
|
if (this.curOne.index < 0) {
|
|
if (this.curOne.index < 0) {
|
|
@@ -780,53 +582,21 @@ export default {
|
|
if (
|
|
if (
|
|
this.formA.sensorX === "" ||
|
|
this.formA.sensorX === "" ||
|
|
this.formA.sensorY === "" ||
|
|
this.formA.sensorY === "" ||
|
|
- this.formA.sensorZ === "" ||
|
|
|
|
- this.formA.sensorH === "" ||
|
|
|
|
- this.formA.sensorP === "" ||
|
|
|
|
- this.formA.sensorR === ""
|
|
|
|
|
|
+ this.formA.sensorH === ""
|
|
)
|
|
)
|
|
return;
|
|
return;
|
|
this.coordinate = {
|
|
this.coordinate = {
|
|
- x: +this.formA.sensorX,
|
|
|
|
- y: +this.formA.sensorY,
|
|
|
|
- z: +this.formA.sensorZ,
|
|
|
|
- h: +this.formA.sensorH,
|
|
|
|
- p: +this.formA.sensorP,
|
|
|
|
- r: +this.formA.sensorR,
|
|
|
|
|
|
+ x: this.formA.sensorX,
|
|
|
|
+ y: this.formA.sensorY,
|
|
|
|
+ h: this.formA.sensorH,
|
|
};
|
|
};
|
|
},
|
|
},
|
|
- posChange(val, type) {
|
|
|
|
- switch (type) {
|
|
|
|
- case "x":
|
|
|
|
- this.coordinate.x = +val;
|
|
|
|
- this.formA.sensorX = val;
|
|
|
|
- break;
|
|
|
|
- case "y":
|
|
|
|
- this.coordinate.y = +val;
|
|
|
|
- this.formA.sensorY = val;
|
|
|
|
- break;
|
|
|
|
- case "z":
|
|
|
|
- this.coordinate.z = +val;
|
|
|
|
- this.formA.sensorZ = val;
|
|
|
|
- break;
|
|
|
|
- default:
|
|
|
|
- break;
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- closeConfig() {
|
|
|
|
- this.configBox = false;
|
|
|
|
- },
|
|
|
|
- // 显示全部传感器
|
|
|
|
- showAll() {
|
|
|
|
- this.$refs.threeSensor.showAll();
|
|
|
|
- this.closeConfig();
|
|
|
|
- },
|
|
|
|
},
|
|
},
|
|
|
|
|
|
mounted() {
|
|
mounted() {
|
|
- // setTimeout(() => {
|
|
|
|
- // this.domHandle();
|
|
|
|
- // }, 0);
|
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ this.domHandle();
|
|
|
|
+ }, 0);
|
|
|
|
|
|
this.getMyVehicleList();
|
|
this.getMyVehicleList();
|
|
|
|
|
|
@@ -835,26 +605,26 @@ export default {
|
|
this.form.id = id = this.$route.query.id;
|
|
this.form.id = id = this.$route.query.id;
|
|
this.form.share = this.$route.query.share;
|
|
this.form.share = this.$route.query.share;
|
|
|
|
|
|
- // if (id) {
|
|
|
|
- this.$axios({
|
|
|
|
- method: "post",
|
|
|
|
- url: this.$api.modelLibrary.getConfigInfo,
|
|
|
|
- data: {
|
|
|
|
- id,
|
|
|
|
- },
|
|
|
|
- }).then((res) => {
|
|
|
|
- if (res.code == 200 && res.info) {
|
|
|
|
- this.form = res.info;
|
|
|
|
- this.configList = res.info.configSensors;
|
|
|
|
- this.modelImgSrc = this.getImgUrl(res.info.vehicleTopView);
|
|
|
|
- // this.$refs.threeSensor.initCar();
|
|
|
|
- this.carModel = "1";
|
|
|
|
- // this.validateSensorsList();
|
|
|
|
- } else {
|
|
|
|
- this.$message.error(res.message || "获取信息失败");
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- // }
|
|
|
|
|
|
+ if (id) {
|
|
|
|
+ this.$axios({
|
|
|
|
+ method: "post",
|
|
|
|
+ url: this.$api.modelLibrary.getConfigInfo,
|
|
|
|
+ data: {
|
|
|
|
+ id,
|
|
|
|
+ },
|
|
|
|
+ }).then((res) => {
|
|
|
|
+ if (res.code == 200 && res.info) {
|
|
|
|
+ this.form = res.info;
|
|
|
|
+ this.configList = res.info.configSensors;
|
|
|
|
+ this.modelImgSrc = this.getImgUrl(
|
|
|
|
+ res.info.vehicleTopView
|
|
|
|
+ );
|
|
|
|
+ // this.validateSensorsList();
|
|
|
|
+ } else {
|
|
|
|
+ this.$message.error(res.message || "获取信息失败");
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
}
|
|
}
|
|
},
|
|
},
|
|
};
|
|
};
|
|
@@ -862,20 +632,7 @@ export default {
|
|
|
|
|
|
<style lang='less' scoped>
|
|
<style lang='less' scoped>
|
|
.vehicleConfigurationDetailPanel {
|
|
.vehicleConfigurationDetailPanel {
|
|
- margin: 20px 0 -60px 20px;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-.rowBox {
|
|
|
|
- padding-right: 20px;
|
|
|
|
-
|
|
|
|
- .el-input,
|
|
|
|
- .el-select {
|
|
|
|
- width: 100%;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- .el-select /deep/ .el-input {
|
|
|
|
- width: 100%;
|
|
|
|
- }
|
|
|
|
|
|
+ margin: 55px 50px 0;
|
|
}
|
|
}
|
|
|
|
|
|
.headBox {
|
|
.headBox {
|
|
@@ -896,128 +653,34 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-#elScrollBarA {
|
|
|
|
- width: 100%;
|
|
|
|
- height: 100%;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-/deep/ .el-scrollbar__wrap {
|
|
|
|
- overflow: auto;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-/deep/ .el-scrollbar__bar {
|
|
|
|
- opacity: 0.3 !important;
|
|
|
|
-}
|
|
|
|
-/deep/ .el-scrollbar__bar:hover {
|
|
|
|
- opacity: 0.6 !important;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-.panelContent {
|
|
|
|
|
|
+.contentBox {
|
|
display: flex;
|
|
display: flex;
|
|
- // height: calc(100vh - 260px);
|
|
|
|
-
|
|
|
|
- .infoLeft {
|
|
|
|
- width: 220px;
|
|
|
|
- padding-right: 10px;
|
|
|
|
|
|
+ justify-content: space-between;
|
|
|
|
+ margin-top: 30px;
|
|
|
|
|
|
- // .contentBox {
|
|
|
|
- // display: flex;
|
|
|
|
- // justify-content: space-between;
|
|
|
|
- margin-top: 30px;
|
|
|
|
-
|
|
|
|
- .handleList {
|
|
|
|
- width: 210px;
|
|
|
|
- height: calc(100vh - 240px);
|
|
|
|
- overflow-y: auto;
|
|
|
|
-
|
|
|
|
- &.handleListA {
|
|
|
|
- height: calc(100vh - 270px);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ .model {
|
|
|
|
+ // width: 400px;
|
|
|
|
+ flex: 1;
|
|
|
|
+ margin: 0 10%;
|
|
|
|
+ }
|
|
|
|
|
|
- .model {
|
|
|
|
- // width: 400px;
|
|
|
|
- // flex: 1;
|
|
|
|
- margin: 0 10%;
|
|
|
|
|
|
+ .conditions {
|
|
|
|
+ .btnBox {
|
|
|
|
+ padding: 0 0 30px;
|
|
}
|
|
}
|
|
- // }
|
|
|
|
|
|
|
|
- .btns {
|
|
|
|
- padding-top: 30px;
|
|
|
|
- text-align: center;
|
|
|
|
-
|
|
|
|
- // .el-button {
|
|
|
|
- // // min-width: none;
|
|
|
|
- // // width: 70px !important;
|
|
|
|
- // margin-bottom: 10px;
|
|
|
|
- // }
|
|
|
|
|
|
+ .forms /deep/ .el-form-item__label {
|
|
|
|
+ width: 120px !important;
|
|
}
|
|
}
|
|
|
|
|
|
- .btnsA {
|
|
|
|
- padding-top: 10px;
|
|
|
|
- text-align: center;
|
|
|
|
|
|
+ .forms /deep/ .el-form-item__content {
|
|
|
|
+ margin-left: 120px !important;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+}
|
|
|
|
|
|
- .threeRight {
|
|
|
|
- position: relative;
|
|
|
|
- flex: 1;
|
|
|
|
- // height: calc(100vh - 360px);
|
|
|
|
-
|
|
|
|
- .viewBox {
|
|
|
|
- position: absolute;
|
|
|
|
- left: 2px;
|
|
|
|
- top: 2px;
|
|
|
|
- width: 40px;
|
|
|
|
- height: 40px;
|
|
|
|
- line-height: 40px;
|
|
|
|
- text-align: center;
|
|
|
|
- background-color: #ffffff;
|
|
|
|
- opacity: 0.75;
|
|
|
|
-
|
|
|
|
- .view {
|
|
|
|
- font-size: 18px;
|
|
|
|
- cursor: pointer;
|
|
|
|
- color: @themeColor;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- .conditions {
|
|
|
|
- position: absolute;
|
|
|
|
- right: 2px;
|
|
|
|
- top: 2px;
|
|
|
|
- width: 219px;
|
|
|
|
- height: 372px;
|
|
|
|
- padding: 10px;
|
|
|
|
- background-color: #ffffff;
|
|
|
|
-
|
|
|
|
- .btnBox {
|
|
|
|
- padding: 0 0 10px;
|
|
|
|
- text-align: center;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- .forms /deep/ .el-form-item__label {
|
|
|
|
- // width: 120px !important;
|
|
|
|
- padding-right: 10px;
|
|
|
|
- line-height: 22px;
|
|
|
|
- font-size: 12px;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- .forms /deep/ .el-form-item__content {
|
|
|
|
- // margin-left: 120px !important;
|
|
|
|
- line-height: 22px;
|
|
|
|
- font-size: 12px;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- .el-input {
|
|
|
|
- width: 100px;
|
|
|
|
- font-size: 12px;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- .forms /deep/ .el-input__inner {
|
|
|
|
- height: 22px;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+.btns {
|
|
|
|
+ padding-top: 30px;
|
|
|
|
+ text-align: center;
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|