123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803 |
- <template>
- <div class="app-container">
- <!--工具栏-->
- <div class="head-container">
- <div v-if="crud.props.searchToggle">
- <el-input
- v-model="query.code"
- clearable
- size="small"
- placeholder="输入可视对讲编号"
- style="width: 160px"
- class="filter-item"
- @keyup.enter.native="crud.toQuery"
- />
- <el-input
- v-model="query.name"
- clearable
- size="small"
- placeholder="输入可视对讲名称"
- style="width: 160px"
- class="filter-item"
- @keyup.enter.native="crud.toQuery"
- />
- <el-select
- v-model="query.type"
- filterable
- clearable
- size="small"
- placeholder="请选择类型"
- class="filter-item"
- style="width: 160px"
- @change="crud.toQuery"
- >
- <el-option
- v-for="item in optionsObj.VisualIntercomType"
- :key="item.value"
- :label="item.label"
- :value="+item.value"
- />
- </el-select>
- <el-select
- v-model="query.buildId"
- filterable
- clearable
- size="small"
- placeholder="请选择建筑名称"
- class="filter-item"
- style="width: 160px"
- @change="handleChangeBuildId"
- >
- <el-option
- v-for="item in optionsObj.Build"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- />
- </el-select>
- <el-select
- v-model="query.floorNo"
- filterable
- clearable
- size="small"
- placeholder="请选择楼层"
- class="filter-item"
- style="width: 160px"
- @change="crud.toQuery"
- >
- <el-option
- v-for="item in optionsObj.FloorNo"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- />
- </el-select>
- <el-select
- v-model="query.faceRecognition"
- clearable
- size="small"
- placeholder="人脸识别"
- class="filter-item"
- style="width: 160px"
- @change="crud.toQuery"
- >
- <el-option
- v-for="item in 2"
- :key="item"
- :label="item == '1' ? '是' : '否'"
- :value="item == '1' ? true : false"
- />
- </el-select>
- <el-select
- v-model="query.enable"
- clearable
- size="small"
- placeholder="启用状态"
- class="filter-item"
- style="width: 160px"
- @change="crud.toQuery"
- >
- <el-option
- v-for="item in 2"
- :key="item"
- :label="item == '1' ? '启用' : '禁用'"
- :value="item == '1' ? true : false"
- />
- </el-select>
- <rrOperation />
- </div>
- <crudOperation :permission="permission" />
- </div>
- <!-- 表单组件 -->
- <el-dialog
- append-to-body
- :close-on-click-modal="false"
- :before-close="crud.cancelCU"
- :visible.sync="crudCU"
- :title="crud.status.title"
- width="1200px"
- >
- <el-row :gutter="40">
- <el-col :span="8">
- <el-form ref="form" :model="form" :rules="rules" size="small" label-width="100px">
- <el-form-item label="编号" prop="code">
- <el-input v-model="form.code" size="small" class="filter-item" style="width: 280px" />
- </el-form-item>
- <el-form-item label="名称" prop="name">
- <el-input v-model="form.name" size="small" class="filter-item" style="width: 280px" />
- </el-form-item>
- <el-form-item label="类型" prop="type">
- <el-select v-model="form.type" size="small" class="filter-item" style="width: 280px">
- <el-option
- v-for="item in optionsObj.VisualIntercomType"
- :key="item.value"
- :label="item.label"
- :value="+item.value"
- />
- </el-select>
- </el-form-item>
- <el-form-item label="建筑名称" prop="buildId">
- <el-select
- v-model="form.buildId"
- size="small"
- class="filter-item"
- style="width: 280px"
- disabled
- >
- <el-option
- v-for="item in optionsObj.Build"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- />
- </el-select>
- </el-form-item>
- <el-form-item label="楼层" prop="floorNo">
- <el-input
- v-model="form.floorNo"
- size="small"
- class="filter-item"
- style="width: 280px"
- disabled
- />
- </el-form-item>
- <el-form-item label="高度" prop="height">
- <el-input
- v-model="form.height"
- size="small"
- class="filter-item"
- style="width: 280px"
- />
- </el-form-item>
- <el-form-item label="序列号" prop="sn">
- <el-input v-model="form.sn" size="small" class="filter-item" style="width: 280px" />
- </el-form-item>
- <el-form-item label="MAC地址" prop="mac">
- <el-input v-model="form.mac" size="small" class="filter-item" style="width: 280px" />
- </el-form-item>
- <el-form-item label="ip地址" prop="ip">
- <el-input v-model="form.ip" size="small" class="filter-item" style="width: 280px" />
- </el-form-item>
- <el-form-item label="端口号" prop="port">
- <el-input v-model="form.port" size="small" class="filter-item" style="width: 280px" />
- </el-form-item>
- <el-form-item label="用户名" prop="userName">
- <el-input
- v-model="form.userName"
- size="small"
- class="filter-item"
- style="width: 280px"
- />
- </el-form-item>
- <el-form-item label="密码" prop="password">
- <el-input
- v-model="form.password"
- show-password
- size="small"
- class="filter-item"
- style="width: 280px"
- />
- </el-form-item>
- <el-form-item label="关联摄像头" prop="cameraID">
- <el-select
- v-model="form.cameraID"
- size="small"
- class="filter-item"
- style="width: 280px"
- filterable
- clearable
- >
- <el-option
- v-for="item in optionsObj.Camera"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- />
- </el-select>
- </el-form-item>
- <el-form-item label="人脸识别" prop="faceRecognition">
- <el-switch
- v-model="form.faceRecognition"
- active-color="#13ce66"
- inactive-color="#ff4949"
- :active-value="true"
- :inactive-value="false"
- >
- </el-switch>
- </el-form-item>
- <el-form-item label="备注" prop="remark">
- <el-input
- v-model="form.remark"
- size="small"
- class="filter-item"
- style="width: 280px"
- />
- </el-form-item>
- <el-form-item label="启用" prop="enable">
- <el-switch
- v-model="form.enable"
- active-color="#13ce66"
- inactive-color="#ff4949"
- :active-value="true"
- :inactive-value="false"
- >
- </el-switch>
- </el-form-item>
- </el-form>
- </el-col>
- <el-col :span="16">
- <relative-map
- v-if="crudCU"
- ref="relativeMap"
- v-model="mapData"
- drawShow
- :buildFloor="buildFloor"
- drawMode="Point"
- />
- </el-col>
- </el-row>
- <div slot="footer" class="dialog-footer">
- <el-button type="text" @click="crud.cancelCU"> 取消 </el-button>
- <el-button :loading="crud.status.cu === 2" type="primary" @click="crud.submitCU">
- 确认
- </el-button>
- </div>
- </el-dialog>
- <!--表格渲染-->
- <el-table
- ref="table"
- v-loading="crud.loading"
- :data="crud.data"
- style="width: 100%"
- @selection-change="crud.selectionChangeHandler"
- >
- <el-table-column type="selection" width="55" />
- <el-table-column
- v-for="item in visualIntercomConfigTableOptions"
- :key="item.prop"
- :label="item.label"
- :prop="item.prop"
- :width="item.width"
- :align="item.align"
- :fixed="item.fixed"
- :sortable="item.sortable"
- >
- </el-table-column>
- <!-- 编辑与删除 -->
- <el-table-column
- v-if="checkPer(['admin', 'visualintercom:config:edit', 'visualintercom:config:del'])"
- label="操作"
- width="130px"
- align="center"
- fixed="right"
- >
- <template slot-scope="scope">
- <udOperation :data="scope.row" :permission="permission" />
- </template>
- </el-table-column>
- </el-table>
- <!--分页组件-->
- <pagination />
- </div>
- </template>
- <script>
- import permission from '@/directive/permission'
- import crudVisualIntercom from '@/api/visualIntercom/config'
- import { getOptions } from '@/api/visualIntercom/public'
- import CRUD, { presenter, header, form, crud } from '@crud/crud'
- // import { crudOperation, rrOperation, udOperation, pagination } from '@crud'
- import crudComps from '@crud'
- import DateRangePicker from '@/components/DateRangePicker'
- import { visualIntercomConfigTableOptions } from '../tableConfig'
- import { initData } from '@/api/data'
- //import CameraMap from './cameraMap'
- import {
- isPosNumber,
- isNegNumber,
- isNumber,
- isPosInteger,
- isNegInteger,
- isInteger,
- } from '@/utils/validate'
- import RelativeMap from '@/components/RelativeMap'
- const defaultForm = {
- id: '0',
- code: '', //编号
- name: '', //名称
- type: '',
- buildId: '', //建筑ID
- floorNo: null, //楼层号
- location: null, //坐标
- height: 0, //高度
- faceRecognition: false,
- enable: true, //是否显示在GIS
- sn: '', //序列号
- mac: '', //mac地址
- ip: '', //ip地址
- port: '', //端口号
- userName: '', //用户名
- password: '', // 密码
- cameraID: '', // 绑定摄像头
- remark: '', //备注
- }
- export default {
- name: 'Robot',
- directives: { permission },
- mixins: [presenter(), header(), form(defaultForm), crud()],
- components: { ...crudComps, DateRangePicker, RelativeMap },
- cruds() {
- return CRUD({
- title: '可视对讲配置',
- url: 'visualIntercom/config/getPageListJson',
- listOrder: [],
- crudMethod: { ...crudVisualIntercom },
- optShow: {
- add: true,
- edit: true,
- del: true,
- reset: true,
- import: true,
- export: true,
- },
- robotList: [
- {
- id: '', //主键ID
- modelId: '', //模型ID
- number: '', //设备编号
- category: '', //设备类型
- issueDate: '', //发售时间
- sequence: '', //出厂号
- title: '', //名称
- profile: '', //头像
- desc: '', //描述
- func: '', //功能说明
- battery: '', //剩余电量
- deviceStatus: '', //设备状态
- taskMode: '', //机器人任务执行模式
- createTime: '', //创建时间
- },
- ],
- recognizeTypeList: [
- {
- id: '', //主键ID
- name: '', //识别类型名称
- code: '', //编号
- desc: '', //描述信息
- createTime: '', //创建时间
- },
- ],
- areaTree: {
- id: '', //主键ID
- parentId: '', //父节点ID
- parent: '', //父节点名称
- path: '', //区域树路径
- level: '', //层级
- sort: '', //排序比重值
- name: '', //区域名称
- memo: '', //备注
- editor: '', //编辑人
- createTime: '', //创建时间
- subList: '', //下级区域节点
- naviList: '', //下辖导航点
- },
- navPointList: [
- {
- id: '', //主键ID
- robotId: '', //机器人ID
- robot: '', //机器人名称
- mapId: '', //地图ID
- map: '', //地图名称
- areaId: '', //区域ID
- area: '', //区域名称
- alias: '', //导航点别名
- naviType: '', //导航点类型
- sequence: '', //导航点编号
- coordinateX: '', //横坐标
- coordinateY: '', //纵坐标
- yaw: '', //航向角
- longitude: '', //经度
- latitude: '', //维度
- distance: '', //与原点距离
- chargingDeviceId: '', //充电设备ID
- positionCount: '', //巡检点个数
- positionList: '', //巡检点列表
- createTime: '', //创建时间
- },
- ],
- patrolPostionList: [
- {
- id: '', //主键ID
- robotId: '', //机器人ID
- mapId: '', //地图ID
- areaId: '', //区域ID
- area: '', //区域名称
- naviId: '', //导航点ID
- naviSequence: '', //导航点别名
- indicatorId: '', //指标ID
- indicatorName: '', //指标名称
- categoryId: '', //指标类目ID
- categoryName: '', //指标类目名称
- recognizeId: '', //识别类型ID
- recognizeName: '', //识别类型名称
- recognizeCode: '', //识别类型编码
- regionSequence: '', //区域编号
- panRotateAngleLocationH: '', //云台水平算法定位转动角度
- panRotateAngleLocationV: '', //云台垂直算法定位转动角度
- panRotateAngleRecognizeH: '', //云台水平算法识别转动角度
- panRotateAngleRecognizeV: '', //云台垂直算法识别转动角度
- visibleCameraLocationZoom: '', //可见光相机算法定位变焦
- visibleCameraLocationFocus: '', //可见光相机算法定位聚焦
- visibleCameraRecognizeZoom: '', //可见光相机算法识别变焦
- visibleCameraRecognizeFocus: '', //可见光相机算法识别聚焦
- infraredCameraRadiation: '', //红外相机辐射
- infraredCameraZoom: '', //红外相机变焦
- infraredCameraFocus: '', //红外相机聚焦
- infraredDistance: '', //红外线距离
- needFillLight: '', //是否开启补光灯
- hasObstacle: '', //是否有障碍
- recordVoiceSecond: '', //录音时间
- cycleTaskPicturePtzStepDegree: '', //循环拍照的步长
- cycleRangeDegree: '', //环测范围
- cycleIsClockwise: '', //环测旋转方向
- cyclePtzSpeed: '', //环测转动速度
- sceneList: '', //已设置阈值场景列表
- resourceList: [
- {
- id: '', //主键ID
- mapId: '', //地图ID
- naviId: '', //导航点ID
- positionId: '', //巡检点ID
- index: '', //序号
- type: '', //资源类型
- url: '', //资源路径
- createTime: '', //创建时间
- },
- ], //算法资源列表
- createTime: '', //创建时间
- },
- ],
- taskList: [
- {
- //任务
- id: '', //主键ID
- periodicTaskId: '', //任务模板ID
- orgId: '', //组织ID
- robotId: '', //机器人Id
- robot: '', //机器人名称
- mapId: '', //地图ID
- map: '', //地图名称
- sceneId: '', //巡检场景ID
- scene: '', //场景名称
- title: '', //任务名称
- type: '', //任务类型
- taskFrom: '', //任务下发来源
- priority: '', //任务优先级
- exitOnPrior: '', //遇更高优先级任务提前终止
- finalJob: '', //任务完成后指令
- scheduleTime: '', //计划开始时间
- beginTime: '', //任务开始时间
- endTime: '', //任务结束时间
- state: '', //任务状态
- progress: '', //运行进度
- totalNumber: '', //须检测总数
- finishedNumber: '', //已检测总数
- defectNumber: '', //缺陷总数
- unrecognizeNumber: '', //未识别总数
- areaList: '', //关联区域列表
- positionList: '', //检测点列表
- nextPosition: '', //当前任务下一个检测点位
- editor: '', //编辑人
- createTime: '', //创建时间
- },
- ],
- patrolRecordList: [
- {
- id: '', //主键ID
- orgId: '', //组织ID
- robotId: '', //机器人ID
- robot: '', //机器人名称
- taskId: '', //任务ID
- task: '', //任务名称
- sceneId: '', //场景ID
- scene: '', //场景名称
- mapId: '', //地图ID
- map: '', //地图名称
- areaId: '', //区域ID
- area: '', //区域名称
- naviId: '', //导航点ID
- naviSequence: '', //导航点编号
- positionId: '', //巡检点ID
- indicatorId: '', //指标ID
- indicatorName: '', //指标名称
- categoryId: '', //指标类目ID
- categoryName: '', //指标类目名称
- recognizeId: '', //识别类型ID
- recognizeCode: '', //识别类型编码
- recognizeName: '', //识别类型名称
- unit: '', //单位
- index: '', //序号
- patrolTime: '', //巡检时间
- recognizeState: '', //识别状态
- thresholdId: '', //识别阈值ID
- defectGrade: '', //缺陷等级
- value: '', //检测值
- detail: '', //检测值明细
- adjustTime: '', //矫正时间
- recognizeTime: '', //识别时间
- modifiedGrade: '', //修正后等级
- defectReview: '', //缺陷追溯
- reviewMemo: '', //缺陷审核备注
- reviewState: '', //缺陷处理状态
- confirmTime: '', //缺陷确认时间
- reviewerId: '', //缺陷确认人ID
- reviewer: '', //缺陷确认人名
- solveTime: '', //缺陷解决时间
- solverId: '', //缺陷解决人ID
- solver: '', //缺陷解决人名
- guardLine: '', //警戒线
- resourceList: [
- {
- index: '', //序号
- type: '', //资源类型
- originUrl: '', //原始资源路径
- processedUrl: '', //已处理资源路径
- },
- ], //算法资源列表
- createTime: '', //创建时间
- },
- ],
- RobotRealtimeInfoList: [
- {
- id: '', //主键ID
- orgId: '', //组织ID
- robotId: '', //机器人ID
- robot: '', //机器人名称
- taskId: '', //任务ID
- task: '', //任务名称
- sceneId: '', //场景ID
- scene: '', //场景名称
- mapId: '', //地图ID
- map: '', //地图名称
- areaId: '', //区域ID
- area: '', //区域名称
- naviId: '', //导航点ID
- naviSequence: '', //导航点编号
- positionId: '', //巡检点ID
- indicatorId: '', //指标ID
- indicatorName: '', //指标名称
- categoryId: '', //指标类目ID
- categoryName: '', //指标类目名称
- recognizeId: '', //识别类型ID
- recognizeCode: '', //识别类型编码
- recognizeName: '', //识别类型名称
- unit: '', //单位
- index: '', //序号
- patrolTime: '', //巡检时间
- recognizeState: '', //识别状态
- thresholdId: '', //识别阈值ID
- defectGrade: '', //缺陷等级
- value: '', //检测值
- detail: '', //检测值明细
- adjustTime: '', //矫正时间
- recognizeTime: '', //识别时间
- modifiedGrade: '', //修正后等级
- defectReview: '', //缺陷追溯
- reviewMemo: '', //缺陷审核备注
- reviewState: '', //缺陷处理状态
- confirmTime: '', //缺陷确认时间
- reviewerId: '', //缺陷确认人ID
- reviewer: '', //缺陷确认人名
- solveTime: '', //缺陷解决时间
- solverId: '', //缺陷解决人ID
- solver: '', //缺陷解决人名
- guardLine: '', //警戒线
- resourceList: [
- {
- id: '', //主键ID
- orgId: '', //组织ID
- robotId: '', //机器人ID
- robot: '', //机器人名称
- mapId: '', //地图ID
- health: '', //机器人本体是否正常
- reportTime: '', //上报时间
- leftWheelSpeed: '', //左轮速度
- rightWheelSpeed: '', //右轮速度
- speed: '', //实时速度
- angularSpeed: '', //实时角速度
- cpuUsed: '', //CPU使用率
- memUsed: '', //内存使用率
- diskUsed: '', //磁盘使用率
- batteryRatio: '', //剩余电量比率
- batteryVolt: '', //当前电池电压
- batteryCurrent: '', //当前电池电流
- temperature: '', //舱内温度
- humidity: '', //舱内湿度
- mileage: '', //当前行驶里程
- rotation: '', //当前旋转角度
- direction: '', //当前行驶方向
- distance: '', //距原点距离
- laserDistance: '', //激光距离
- panRotateAngleH: '', //云台水平转动角度
- panRotateAngleV: '', //云台垂直转动角度
- visibleFocus: '', //可见光相机焦距
- visibleZoom: '', //可见光相机变焦
- infraredFocus: '', //红外相机焦距
- coordinateX: '', //横坐标
- coordinateY: '', //纵坐标
- yaw: '', //航向角
- longitude: '', //经度
- latitude: '', //维度
- controlSysState: '', //控制系统状态
- chargeSysState: '', //充电系统状态
- visibleCameraState: '', //可见光相机状态
- infraredCameraState: '', //红外相机状态
- panState: '', //云台状态
- bridgeState: '', //网桥状态
- laserObstacleState: '', //激光避障器状态
- mmwObstacleState: '', //毫米波避障器状态
- backObstacleState: '', //后置避障器状态
- pitObstacleState: '', //测坑避障器状态
- wiperState: '', //雨刷状态
- lightState: '', //补光灯状态
- recordState: '', //录音状态
- intercomState: '', //对讲机状态
- eStopState: '', //急停按钮状态
- runState: '', //机器人运行状态
- taskMode: '', //机器人任务执行模式
- createTime: '', //创建时间
- },
- ], //算法资源列表
- createTime: '', //创建时间
- },
- ],
- })
- },
- computed: {
- crudCU() {
- return this.crud.status.cu > 0
- },
- VUE_APP_BASE_API() {
- return process.env.VUE_APP_BASE_API
- },
- VUE_APP_BASE_WS() {
- return 'ws://' + window.location.host + process.env.VUE_APP_BASE_API
- },
- },
- data() {
- var chackHeight = (rule, value, callback) => {
- if (!isPosNumber(value)) return callback(new Error('请输入正确的高度'))
- return callback()
- }
- return {
- visualIntercomConfigTableOptions,
- permission: {
- add: ['admin', 'visualintercom:config:add'],
- edit: ['admin', 'visualintercom:config:edit'],
- del: ['admin', 'visualintercom:config:del'],
- },
- rules: {
- code: [{ required: true, message: '请选输入编号', trigger: 'blur' }],
- name: [{ required: true, message: '请输入名称', trigger: 'blur' }],
- type: [{ required: true, message: '选择类型', trigger: 'blur' }],
- buildId: [{ required: true, message: '请在地图上画点', trigger: 'blur' }],
- floorNo: [{ required: true, message: '请在地图上画点', trigger: 'blur' }],
- height: [{ required: true, validator: chackHeight, trigger: 'blur' }],
- ip: [{ required: true, message: '请输入IP地址', trigger: 'blur' }],
- userName: [{ required: true, message: '请输入用户名', trigger: 'blur' }],
- },
- optionsObj: {
- Camera: [],
- Build: [],
- FloorNo: [],
- VisualIntercomType: [],
- },
- mapData: [],
- buildFloor: {},
- }
- },
- created() {
- this.getOptions()
- },
- methods: {
- [CRUD.HOOK.beforeToAdd]() {
- this.mapData = []
- this.buildFloor = {}
- },
- // 打开
- [CRUD.HOOK.beforeToEdit]() {
- this.mapData = [
- {
- buildId: this.form.buildId,
- floorNo: this.form.floorNo,
- geometries: [
- {
- type: 'Point',
- points: [{ x: this.form.location.x, y: this.form.location.y }],
- },
- ],
- },
- ]
- this.buildFloor = {
- buildId: this.form.buildId,
- floorNo: this.form.floorNo,
- }
- },
- //验证前处理
- [CRUD.HOOK.beforeValidateCU]() {
- if (
- this.mapData &&
- this.mapData.length > 0 &&
- this.mapData[0].geometries &&
- this.mapData[0].geometries.length > 0 &&
- this.mapData[0].geometries[0].points &&
- this.mapData[0].geometries[0].points.length > 0
- ) {
- this.form.buildId = this.mapData[0].buildId
- this.form.floorNo = this.mapData[0].floorNo
- this.form.location = {
- buildId: this.mapData[0].buildId,
- floorNo: this.mapData[0].floorNo,
- x: this.mapData[0].geometries[0].points[0].x,
- y: this.mapData[0].geometries[0].points[0].y,
- }
- } else {
- this.$message.error('请绘制正确的点')
- return false
- }
- },
- // 提交前的验证
- [CRUD.HOOK.afterValidateCU]() {},
- async handleChangeBuildId(val) {
- await this.getFloorNoOption(val)
- this.crud.toQuery()
- },
- getOptions() {
- Object.keys(this.optionsObj).forEach(async (key) => {
- if (key == 'FloorNo') return
- try {
- let res = await getOptions(key)
- if (res.code === 20000) this.optionsObj[key] = res.data.content
- } catch (error) {
- console.log(error)
- }
- })
- },
- async getFloorNoOption(buildId) {
- try {
- let res = await getOptions('FloorNo', { buildId: buildId })
- if (res.code === 20000) {
- this.optionsObj.FloorNo = res.data.content
- this.query.floorNo = null
- }
- } catch (error) {}
- },
- },
- }
- </script>
- <style></style>
|