Merge remote-tracking branch 'origin/dev-nx' into dev-nx
This commit is contained in:
commit
04137f7203
|
|
@ -82,6 +82,7 @@ public class RepairServiceImpl implements RepairService {
|
||||||
List<RepairPartDetails> partList = bean.getPartList();
|
List<RepairPartDetails> partList = bean.getPartList();
|
||||||
BigDecimal sfCosts = new BigDecimal("0");
|
BigDecimal sfCosts = new BigDecimal("0");
|
||||||
BigDecimal bsfCosts = new BigDecimal("0");
|
BigDecimal bsfCosts = new BigDecimal("0");
|
||||||
|
Integer partNum = 0;
|
||||||
String nbType = "1"; // 内部维修
|
String nbType = "1"; // 内部维修
|
||||||
String fcType = "2"; //返厂维修
|
String fcType = "2"; //返厂维修
|
||||||
String sfPart = "1"; //收费
|
String sfPart = "1"; //收费
|
||||||
|
|
@ -135,11 +136,12 @@ public class RepairServiceImpl implements RepairService {
|
||||||
partDetails.setCompanyId(bean.getCompanyId());
|
partDetails.setCompanyId(bean.getCompanyId());
|
||||||
mapper.addPart(partDetails);
|
mapper.addPart(partDetails);
|
||||||
bean.setPartPrice(partDetails.getPartCost());
|
bean.setPartPrice(partDetails.getPartCost());
|
||||||
bean.setPartNum(partDetails.getPartNum());
|
partNum += partDetails.getPartNum();
|
||||||
bean.setRepairContent(partDetails.getRepairContent());
|
bean.setRepairContent(partDetails.getRepairContent());
|
||||||
bean.setPartType(partDetails.getPartType());
|
bean.setPartType(partDetails.getPartType());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
bean.setPartNum(partNum);
|
||||||
}
|
}
|
||||||
if (fcType.equals(bean.getRepairType())) {
|
if (fcType.equals(bean.getRepairType())) {
|
||||||
bean.setPartName(partList.get(0).getPartName());
|
bean.setPartName(partList.get(0).getPartName());
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ export const dialogConfig = {
|
||||||
isSelShow: false,// 表格是否需要复选框
|
isSelShow: false,// 表格是否需要复选框
|
||||||
isFormShow: true, // 是否显示表单查询组件
|
isFormShow: true, // 是否显示表单查询组件
|
||||||
formLabel: [
|
formLabel: [
|
||||||
{ f_label: '关键字', f_model: 'keywords', f_type: 'ipt' },
|
{ f_label: '关键字', f_model: 'keyWord', f_type: 'ipt' },
|
||||||
],
|
],
|
||||||
|
|
||||||
columnsList: [
|
columnsList: [
|
||||||
|
|
|
||||||
|
|
@ -15,9 +15,9 @@
|
||||||
<el-button size="mini" type="primary" @click="addDevice(null)"
|
<el-button size="mini" type="primary" @click="addDevice(null)"
|
||||||
>添加设备</el-button
|
>添加设备</el-button
|
||||||
>
|
>
|
||||||
<el-button size="mini" type="primary" @click="uploadCode()"
|
<!-- <el-button size="mini" type="primary" @click="uploadCode()"
|
||||||
>下载二维码</el-button
|
>下载二维码</el-button
|
||||||
>
|
> -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
|
|
@ -92,6 +92,7 @@
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
style="color: #f56c6c"
|
style="color: #f56c6c"
|
||||||
@click="handleDeleteAndUnbind(row.iotId, 1)"
|
@click="handleDeleteAndUnbind(row.iotId, 1)"
|
||||||
|
v-if="row.bindStatus === 1"
|
||||||
>删除</el-button
|
>删除</el-button
|
||||||
>
|
>
|
||||||
<el-button
|
<el-button
|
||||||
|
|
@ -99,6 +100,7 @@
|
||||||
icon="el-icon-edit"
|
icon="el-icon-edit"
|
||||||
style="color: #67c23a"
|
style="color: #67c23a"
|
||||||
@click="addDevice(row)"
|
@click="addDevice(row)"
|
||||||
|
v-if="row.bindStatus === 1"
|
||||||
>修改</el-button
|
>修改</el-button
|
||||||
>
|
>
|
||||||
<el-button
|
<el-button
|
||||||
|
|
@ -142,9 +144,12 @@
|
||||||
clearable
|
clearable
|
||||||
v-model="addDeviceParams.iotType"
|
v-model="addDeviceParams.iotType"
|
||||||
>
|
>
|
||||||
<el-option :value="125" label="定位设备" />
|
<el-option
|
||||||
<el-option :value="126" label="其他设备" />
|
v-for="item in deviceTypeList"
|
||||||
<el-option :value="127" label="其他设备" />
|
:key="item.iotTypeId"
|
||||||
|
:value="item.iotTypeId"
|
||||||
|
:label="item.iotTypeName"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="设备编号" prop="iotCode">
|
<el-form-item label="设备编号" prop="iotCode">
|
||||||
|
|
@ -154,6 +159,20 @@
|
||||||
v-model="addDeviceParams.iotCode"
|
v-model="addDeviceParams.iotCode"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item
|
||||||
|
label="设备状态: "
|
||||||
|
prop="iotStatus"
|
||||||
|
v-if="dialogConfig.outerTitle === '修改设备'"
|
||||||
|
>
|
||||||
|
<el-switch
|
||||||
|
v-model="addDeviceParams.iotStatus"
|
||||||
|
active-text="在线"
|
||||||
|
inactive-text="离线"
|
||||||
|
:active-value="0"
|
||||||
|
:inactive-value="1"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<el-row style="margin-top: 20px; text-align: right">
|
<el-row style="margin-top: 20px; text-align: right">
|
||||||
|
|
@ -215,6 +234,7 @@ import {
|
||||||
unbindDeviceApi,
|
unbindDeviceApi,
|
||||||
getDeviceBindRecordApi,
|
getDeviceBindRecordApi,
|
||||||
getDeviceBindDetailsApi,
|
getDeviceBindDetailsApi,
|
||||||
|
selectList,
|
||||||
} from '@/api/iotDevice'
|
} from '@/api/iotDevice'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
|
@ -237,6 +257,7 @@ export default {
|
||||||
addDeviceParams: {
|
addDeviceParams: {
|
||||||
iotType: '',
|
iotType: '',
|
||||||
iotCode: '',
|
iotCode: '',
|
||||||
|
iotStatus: 0,
|
||||||
},
|
},
|
||||||
// 新增设备表单校验
|
// 新增设备表单校验
|
||||||
addDeviceRules: {
|
addDeviceRules: {
|
||||||
|
|
@ -261,6 +282,8 @@ export default {
|
||||||
sendParams: {
|
sendParams: {
|
||||||
iotId: '',
|
iotId: '',
|
||||||
},
|
},
|
||||||
|
// 设备类型数据源
|
||||||
|
deviceTypeList: [],
|
||||||
// 复选框选中的数据
|
// 复选框选中的数据
|
||||||
selectList: [],
|
selectList: [],
|
||||||
// 绑定记录Api
|
// 绑定记录Api
|
||||||
|
|
@ -273,6 +296,7 @@ export default {
|
||||||
|
|
||||||
created() {
|
created() {
|
||||||
this.getDeviceList()
|
this.getDeviceList()
|
||||||
|
this.getDeviceTypeList()
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
|
@ -282,6 +306,18 @@ export default {
|
||||||
this.deviceList = res.rows
|
this.deviceList = res.rows
|
||||||
this.total = res.total
|
this.total = res.total
|
||||||
},
|
},
|
||||||
|
|
||||||
|
//** 获取设备类型 */
|
||||||
|
async getDeviceTypeList() {
|
||||||
|
try {
|
||||||
|
const res = await selectList()
|
||||||
|
// this.typeOptions = res.data
|
||||||
|
console.log(res, '设备类型获取成功')
|
||||||
|
this.deviceTypeList = res.data
|
||||||
|
} catch (err) {
|
||||||
|
console.log('🚀 ~ getIotType ~ err:', err)
|
||||||
|
}
|
||||||
|
},
|
||||||
/** 搜索按钮 */
|
/** 搜索按钮 */
|
||||||
handelQuery() {
|
handelQuery() {
|
||||||
this.getDeviceList(this.queryParams)
|
this.getDeviceList(this.queryParams)
|
||||||
|
|
@ -296,7 +332,8 @@ export default {
|
||||||
this.dialogConfig.outerTitle = '修改设备'
|
this.dialogConfig.outerTitle = '修改设备'
|
||||||
this.addDeviceParams.iotId = row.iotId
|
this.addDeviceParams.iotId = row.iotId
|
||||||
this.addDeviceParams.iotCode = row.iotCode
|
this.addDeviceParams.iotCode = row.iotCode
|
||||||
this.addDeviceParams.iotType = parseInt(row.iotType)
|
this.addDeviceParams.iotStatus = row.iotStatus
|
||||||
|
this.addDeviceParams.iotType = row.iotType
|
||||||
}
|
}
|
||||||
this.dialogConfig.outerWidth = '40%'
|
this.dialogConfig.outerWidth = '40%'
|
||||||
this.dialogConfig.outerVisible = true
|
this.dialogConfig.outerVisible = true
|
||||||
|
|
|
||||||
|
|
@ -276,6 +276,13 @@ export default {
|
||||||
},
|
},
|
||||||
// 提交
|
// 提交
|
||||||
submit() {
|
submit() {
|
||||||
|
const isType = this.typeList.some((e) => e == this.IOTForm.iotType)
|
||||||
|
if (isType) {
|
||||||
|
this.$message.error(
|
||||||
|
'当前机具已绑定改IOT类型设备,不可重复绑定!',
|
||||||
|
)
|
||||||
|
return
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
// 校验
|
// 校验
|
||||||
this.$refs.IOTForm.validate(async (valid) => {
|
this.$refs.IOTForm.validate(async (valid) => {
|
||||||
|
|
|
||||||
|
|
@ -13,9 +13,7 @@
|
||||||
<span>({{ deviceType }})</span>
|
<span>({{ deviceType }})</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="equipment">
|
<div class="equipment"> 定位设备编号: {{ iotCode }} </div>
|
||||||
定位设备编号: {{ equipmentNumber }}
|
|
||||||
</div>
|
|
||||||
<div class="equipment" v-if="false">{{ engineering }}工程</div>
|
<div class="equipment" v-if="false">{{ engineering }}工程</div>
|
||||||
<el-row :gutter="24">
|
<el-row :gutter="24">
|
||||||
<el-col :span="16">
|
<el-col :span="16">
|
||||||
|
|
@ -42,6 +40,7 @@
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-tabs type="border-card" class="map-left">
|
<el-tabs type="border-card" class="map-left">
|
||||||
<el-tab-pane label="行程">
|
<el-tab-pane label="行程">
|
||||||
|
<template v-if="tripList.length > 0">
|
||||||
<div
|
<div
|
||||||
class="trip-container"
|
class="trip-container"
|
||||||
@click="handlePreviewTrip(item, index)"
|
@click="handlePreviewTrip(item, index)"
|
||||||
|
|
@ -51,7 +50,9 @@
|
||||||
<div class="left-num">{{ index + 1 }}</div>
|
<div class="left-num">{{ index + 1 }}</div>
|
||||||
<div
|
<div
|
||||||
class="right-info"
|
class="right-info"
|
||||||
:class="{ active: activeIndex === index }"
|
:class="{
|
||||||
|
active: activeIndex === index,
|
||||||
|
}"
|
||||||
>
|
>
|
||||||
<!-- <ul>
|
<!-- <ul>
|
||||||
<li>{{ item.tripdistance }}KM</li>
|
<li>{{ item.tripdistance }}KM</li>
|
||||||
|
|
@ -68,8 +69,12 @@
|
||||||
|
|
||||||
<div style="margin-top: 10px">
|
<div style="margin-top: 10px">
|
||||||
<div class="time-container">
|
<div class="time-container">
|
||||||
<span class="radius-span">始</span>
|
<span class="radius-span"
|
||||||
<span>{{ item.startTime }}</span>
|
>始</span
|
||||||
|
>
|
||||||
|
<span>{{
|
||||||
|
item.startTime
|
||||||
|
}}</span>
|
||||||
</div>
|
</div>
|
||||||
<h3>{{ item.startAddress }}</h3>
|
<h3>{{ item.startAddress }}</h3>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -88,8 +93,13 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
{{ loadingData ? '数据加载中...' : 暂无数据 }}
|
||||||
|
</template>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="停留点">
|
<el-tab-pane label="停留点">
|
||||||
|
<template v-if="parkList.length > 0">
|
||||||
<div
|
<div
|
||||||
class="point-container"
|
class="point-container"
|
||||||
v-for="(item, index) in parkList"
|
v-for="(item, index) in parkList"
|
||||||
|
|
@ -108,8 +118,11 @@
|
||||||
</div>
|
</div>
|
||||||
<h3>{{ item.address }}</h3>
|
<h3>{{ item.address }}</h3>
|
||||||
</div>
|
</div>
|
||||||
|
</template>
|
||||||
|
<template v-else> 暂无数据 </template>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="报警">
|
<el-tab-pane label="报警">
|
||||||
|
<template v-if="warningList.length > 0">
|
||||||
<div
|
<div
|
||||||
class="point-container"
|
class="point-container"
|
||||||
v-for="(item, index) in warningList"
|
v-for="(item, index) in warningList"
|
||||||
|
|
@ -123,6 +136,8 @@
|
||||||
</div>
|
</div>
|
||||||
<h3>{{ item.startAlarm }}</h3>
|
<h3>{{ item.startAlarm }}</h3>
|
||||||
</div>
|
</div>
|
||||||
|
</template>
|
||||||
|
<template v-else> 暂无数据 </template>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
@ -209,18 +224,20 @@ export default {
|
||||||
activeIndex: '',
|
activeIndex: '',
|
||||||
// 停留点信息
|
// 停留点信息
|
||||||
parkList: [],
|
parkList: [],
|
||||||
|
warningList: [],
|
||||||
|
loadingData: true,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {},
|
||||||
this.handleQuery()
|
|
||||||
},
|
|
||||||
mounted() {
|
mounted() {
|
||||||
Promise.all([this.getIotDeviceLocation()])
|
Promise.all([this.getIotDeviceLocation(), this.handleQuery()])
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
this.loadingData = false
|
||||||
this.initMap()
|
this.initMap()
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
console.log(err)
|
console.log(err)
|
||||||
|
this.loadingData = false
|
||||||
})
|
})
|
||||||
|
|
||||||
// this.getIotDeviceLocation()
|
// this.getIotDeviceLocation()
|
||||||
|
|
@ -234,9 +251,12 @@ export default {
|
||||||
this.trackAni.cancel()
|
this.trackAni.cancel()
|
||||||
}
|
}
|
||||||
// 2. 清除地图上面的标点覆盖物 并清除地图实例
|
// 2. 清除地图上面的标点覆盖物 并清除地图实例
|
||||||
|
|
||||||
|
if (this.map) {
|
||||||
this.map.clearOverlays()
|
this.map.clearOverlays()
|
||||||
this.map.destroy()
|
this.map.destroy()
|
||||||
this.map = null
|
this.map = null
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
|
@ -253,6 +273,10 @@ export default {
|
||||||
},
|
},
|
||||||
/** 查询按钮 */
|
/** 查询按钮 */
|
||||||
async handleQuery() {
|
async handleQuery() {
|
||||||
|
if (!this.queryForm.date) {
|
||||||
|
this.$message.error('请选择时间范围!')
|
||||||
|
return
|
||||||
|
}
|
||||||
this.tripParams.iotId = this.iotCode
|
this.tripParams.iotId = this.iotCode
|
||||||
const res = await getIotDeviceTripApi({ ...this.tripParams })
|
const res = await getIotDeviceTripApi({ ...this.tripParams })
|
||||||
console.log(res, '行程信息--')
|
console.log(res, '行程信息--')
|
||||||
|
|
@ -451,8 +475,10 @@ export default {
|
||||||
},
|
},
|
||||||
/** 时间选择器 */
|
/** 时间选择器 */
|
||||||
onChangeTime(val) {
|
onChangeTime(val) {
|
||||||
|
if (val) {
|
||||||
this.tripParams.beginTime = val[0]
|
this.tripParams.beginTime = val[0]
|
||||||
this.tripParams.endTime = val[1]
|
this.tripParams.endTime = val[1]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<!-- 编码设备管理 -->
|
<!-- 编码设备管理 -->
|
||||||
<div class="app-container" id="devices">
|
<div class="app-container" id="devices" v-if="!props.isShow">
|
||||||
<el-form
|
<el-form
|
||||||
:model="queryParams"
|
:model="queryParams"
|
||||||
ref="queryForm"
|
ref="queryForm"
|
||||||
|
|
@ -119,7 +119,7 @@
|
||||||
icon="el-icon-download"
|
icon="el-icon-download"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="handleExport"
|
@click="handleExport"
|
||||||
v-hasPermi="['machinery:debug:export']"
|
v-hasPermi="['machinery:coding:export']"
|
||||||
>导出</el-button
|
>导出</el-button
|
||||||
>
|
>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -135,6 +135,7 @@
|
||||||
<el-table
|
<el-table
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
:data="devicesList"
|
:data="devicesList"
|
||||||
|
border
|
||||||
@selection-change="handleSelectionChange"
|
@selection-change="handleSelectionChange"
|
||||||
>
|
>
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
|
@ -151,13 +152,13 @@
|
||||||
label="设备类型"
|
label="设备类型"
|
||||||
align="center"
|
align="center"
|
||||||
prop="deviceType"
|
prop="deviceType"
|
||||||
:show-overflow-tooltip="true"
|
show-overflow-tooltip
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="规格型号"
|
label="规格型号"
|
||||||
align="center"
|
align="center"
|
||||||
prop="specificationType"
|
prop="specificationType"
|
||||||
:show-overflow-tooltip="true"
|
show-overflow-tooltip
|
||||||
>
|
>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
|
@ -206,37 +207,54 @@
|
||||||
>
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="IOT设备" align="center" prop="ownHouseName">
|
||||||
|
<template slot-scope="{ row }">
|
||||||
|
<el-button type="text" @click="handleBindIOT(row)">{{
|
||||||
|
row.iotNum === 0 ? '未绑定' : row.iotNum
|
||||||
|
}}</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
label="位置信息"
|
||||||
|
align="center"
|
||||||
|
prop="ownHouseName"
|
||||||
|
>
|
||||||
|
<template slot-scope="{ row }">
|
||||||
|
<i
|
||||||
|
class="el-icon-location location-icon"
|
||||||
|
@click="handleMap(row)"
|
||||||
|
v-if="row.iotNum > 0"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<!-- <el-table-column
|
||||||
label="所在仓库"
|
label="所在仓库"
|
||||||
align="center"
|
align="center"
|
||||||
prop="ownHouseName"
|
prop="ownHouseName"
|
||||||
/>
|
/> -->
|
||||||
<!-- <el-table-column label="创建时间" align="center" prop="createTime" width="180">-->
|
<!-- <el-table-column label="创建时间" align="center" prop="createTime" width="180">-->
|
||||||
<!-- <template slot-scope="scope">-->
|
<!-- <template slot-scope="scope">-->
|
||||||
<!-- <span>{{ parseTime(scope.row.createTime) }}</span>-->
|
<!-- <span>{{ parseTime(scope.row.createTime) }}</span>-->
|
||||||
<!-- </template>-->
|
<!-- </template>-->
|
||||||
<!-- </el-table-column>-->
|
<!-- </el-table-column>-->
|
||||||
<el-table-column
|
<el-table-column label="操作" align="center" width="150">
|
||||||
label="操作"
|
|
||||||
align="center"
|
|
||||||
width="150"
|
|
||||||
class-name="small-padding fixed-width"
|
|
||||||
>
|
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
|
style="padding: 6px 10px"
|
||||||
size="mini"
|
size="mini"
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-edit"
|
icon="el-icon-edit"
|
||||||
@click="handleUpdate(scope.row)"
|
@click="handleUpdate(scope.row)"
|
||||||
v-hasPermi="['machinery:debug:edit']"
|
v-hasPermi="['machinery:coding:edit']"
|
||||||
>编辑</el-button
|
>编辑</el-button
|
||||||
>
|
>
|
||||||
<el-button
|
<el-button
|
||||||
|
style="padding: 6px 10px"
|
||||||
size="mini"
|
size="mini"
|
||||||
type="danger"
|
type="danger"
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
@click="handleDelete(scope.row)"
|
@click="handleDelete(scope.row)"
|
||||||
v-hasPermi="['machinery:debug:del']"
|
v-hasPermi="['machinery:coding:del']"
|
||||||
>删除</el-button
|
>删除</el-button
|
||||||
>
|
>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -513,6 +531,16 @@
|
||||||
<!-- <el-button type="primary" @click="downloadCode">下 载</el-button> -->
|
<!-- <el-button type="primary" @click="downloadCode">下 载</el-button> -->
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
<MapDialog
|
||||||
|
v-if="mapDialogVisible"
|
||||||
|
:deviceName="deviceName"
|
||||||
|
:deviceType="deviceType"
|
||||||
|
:iotCode="iotCode"
|
||||||
|
@handelCloseDialog="handelCloseDialog"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div v-else>
|
||||||
|
<BindIOT :props="props" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -534,12 +562,22 @@ import Treeselect from '@riophae/vue-treeselect'
|
||||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||||
import QRCode from 'qrcodejs2'
|
import QRCode from 'qrcodejs2'
|
||||||
|
|
||||||
|
import BindIOT from './component/BindIOT'
|
||||||
|
import MapDialog from './component/MapDIalog'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Devices',
|
name: 'Devices',
|
||||||
dicts: ['sys_normal_disable'],
|
dicts: ['sys_normal_disable'],
|
||||||
components: { Treeselect },
|
components: { Treeselect, BindIOT, MapDialog },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
openMap: false,
|
||||||
|
isShow: false,
|
||||||
|
props: {
|
||||||
|
isShow: false,
|
||||||
|
typeId: '',
|
||||||
|
maCode: '',
|
||||||
|
},
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
loading: true,
|
loading: true,
|
||||||
// 选中数组
|
// 选中数组
|
||||||
|
|
@ -604,6 +642,10 @@ export default {
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
mapDialogVisible: false,
|
||||||
|
deviceName: '',
|
||||||
|
deviceType: '',
|
||||||
|
iotCode: '',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
|
@ -788,6 +830,29 @@ export default {
|
||||||
// ...this.queryParams
|
// ...this.queryParams
|
||||||
// }, `type_${new Date().getTime()}.xlsx`)
|
// }, `type_${new Date().getTime()}.xlsx`)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// iot设备绑定
|
||||||
|
handleBindIOT(row) {
|
||||||
|
console.log('🚀 ~ handleBindIOT ~ row:', row)
|
||||||
|
this.props = {
|
||||||
|
isShow: true,
|
||||||
|
typeId: row.typeId,
|
||||||
|
maCode: row.maCode,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 查看设备地图
|
||||||
|
async handleMap(row) {
|
||||||
|
this.deviceName = row.specificationType
|
||||||
|
this.deviceType = row.maStatusName
|
||||||
|
this.iotCode = row.iotCode
|
||||||
|
|
||||||
|
this.mapDialogVisible = true
|
||||||
|
},
|
||||||
|
|
||||||
|
/** 关闭地图弹框 */
|
||||||
|
handelCloseDialog() {
|
||||||
|
this.mapDialogVisible = false
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
@ -801,8 +866,10 @@ export default {
|
||||||
margin-top: 15px;
|
margin-top: 15px;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
}
|
}
|
||||||
::v-deep.el-table .fixed-width .el-button--mini {
|
|
||||||
width: 60px !important;
|
.location-icon {
|
||||||
margin-bottom: 10px;
|
font-size: 20px;
|
||||||
|
cursor: pointer;
|
||||||
|
color: #409eff;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -209,9 +209,9 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="IOT设备" align="center" prop="ownHouseName">
|
<el-table-column label="IOT设备" align="center" prop="ownHouseName">
|
||||||
<template slot-scope="{ row }">
|
<template slot-scope="{ row }">
|
||||||
<el-button type="text" @click="handleBindIOT(row)"
|
<el-button type="text" @click="handleBindIOT(row)">{{
|
||||||
>未绑定</el-button
|
row.iotNum === 0 ? '未绑定' : row.iotNum
|
||||||
>
|
}}</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
|
@ -223,6 +223,7 @@
|
||||||
<i
|
<i
|
||||||
class="el-icon-location location-icon"
|
class="el-icon-location location-icon"
|
||||||
@click="handleMap(row)"
|
@click="handleMap(row)"
|
||||||
|
v-if="row.iotNum > 0"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue