Commit e42c7cd1 authored by wuqinghua's avatar wuqinghua

2022/2/12 吴卿华

parent 37139dcb
......@@ -78,15 +78,6 @@ public class TDeviceInfoController extends BaseController
{
//添加设备信息表数据 并且返回新增id
tDeviceInfoService.insertTDeviceInfo(listaw.gettDeviceInfo());
Long deviceId = listaw.gettDeviceInfo().getDeviceId();
if (listaw.gettDeviceInfoS().size()!=0){
//添加 关联设备表 设备id添加
for (int i=0;i<listaw.gettDeviceInfoS().size();i++){
listaw.gettDeviceInfoS().get(i).setRelationDeviceId(Math.toIntExact(deviceId));
}
//添加关联设备信息表数据
tDeviceInfoService.insertDeviceDetailInfo(listaw.gettDeviceInfoS());
}
// TDeviceInfo tDeviceInfo = new TDeviceInfo();
// //根据企业id查询企业名称
// String EnterpriseName = tEmployedPeopleInfoService.selectEnterpriseName(tDeviceInfo.getBeyondEnterpriseId());
......@@ -123,12 +114,46 @@ public class TDeviceInfoController extends BaseController
* 获取设备详细信息列表
*/
@PreAuthorize("@ss.hasPermi('device:device:deviceDetailInfo')")
@GetMapping(value = "/{getdeviceDetailInfo}")
public AjaxResult getdeviceDetailInfo(@PathVariable("deviceId") Long deviceId)
{
@GetMapping("/getdeviceDetailInfo")
public AjaxResult getdeviceDetailInfo(Long deviceId) {
List<TDeviceInfoS> tDeviceInfoS = tDeviceInfoService.getdeviceDetailInfo(deviceId);
System.out.println("111111111");
System.out.println(tDeviceInfoS+"111111111");
return AjaxResult.success(tDeviceInfoS);
}
/**
* 查询无绑定的 关联设备信息
* @return
*/
@RequestMapping("/selectDetailInfo")
public TableDataInfo selectDetailInfo(@RequestBody TDeviceInfoS tDeviceInfos){
List<TDeviceInfoS> tDeviceInfoS = tDeviceInfoService.selectDetailInfo(tDeviceInfos);
return getDataTable(tDeviceInfoS);
}
/**
* 添加关联设备数据接口
*/
@RequestMapping("/insertDetailInfo")
public void insertDetailInfo(@RequestBody TDeviceInfoS tDeviceInfoS){
//添加关联设备信息表数据
tDeviceInfoService.insertDeviceDetailInfo(tDeviceInfoS);
}
/**
* 关联设备批量数据删除接口
*/
@RequestMapping("/deleteDetailInfo")
public void deleteDetailInfo(@RequestBody int deviceId){
tDeviceInfoService.deleteDetailinfOS(deviceId);
}
/**
* 关联设备批量数据删除接口
* @param deviceId
*/
@RequestMapping("/deleteeListDetailInfo")
public void deleteeListDetailInfo(@RequestBody Long[] deviceId){
tDeviceInfoService.deleteDetailInfo(deviceId);
}
}
......@@ -6,8 +6,6 @@ import com.zehong.common.core.domain.BaseEntity;
*/
public class TDeviceInfoS extends BaseEntity {
/**
* 关联设备详情ID
*/
......@@ -31,7 +29,7 @@ public class TDeviceInfoS extends BaseEntity {
/**
* 设备类型:1.压力表 2.流量计
*/
private Integer deviceType;
private String deviceType;
/**
* 物联网编号
......@@ -76,11 +74,11 @@ public class TDeviceInfoS extends BaseEntity {
this.deviceModel = deviceModel;
}
public Integer getDeviceType() {
public String getDeviceType() {
return deviceType;
}
public void setDeviceType(Integer deviceType) {
public void setDeviceType(String deviceType) {
this.deviceType = deviceType;
}
......
......@@ -64,7 +64,7 @@ public interface TDeviceInfoMapper
* 添加关联设备信息表数据
* @param gettDeviceInfoS
*/
void insertDeviceDetailInfo(List<TDeviceInfoS> gettDeviceInfoS);
void insertDeviceDetailInfo(TDeviceInfoS gettDeviceInfoS);
/**
* 获取设备详细信息列表
......@@ -72,4 +72,22 @@ public interface TDeviceInfoMapper
* @return
*/
List<TDeviceInfoS> getdeviceDetailInfo(Long deviceId);
/**
* 查询无绑定的 关联设备信息
* @return
*/
List<TDeviceInfoS> selectDetailInfo(TDeviceInfoS tDeviceInfos);
/**
* 关联设备数据删除接口
* @param deviceIds
*/
void deleteDetailInfo(Long[] deviceIds);
/**
* 关联设备数据删除接口 单条删除
* @param deviceId
*/
void deleteDetailinfOS(int deviceId);
}
......@@ -64,7 +64,7 @@ public interface ITDeviceInfoService
* 添加关联设备信息表数据
* @param gettDeviceInfoS
*/
void insertDeviceDetailInfo(List<TDeviceInfoS> gettDeviceInfoS);
void insertDeviceDetailInfo(TDeviceInfoS gettDeviceInfoS);
/**
* 获取设备详细信息列表
......@@ -72,4 +72,22 @@ public interface ITDeviceInfoService
* @return
*/
List<TDeviceInfoS> getdeviceDetailInfo(Long deviceId);
/**
* 查询无绑定的 关联设备信息
* @return
*/
List<TDeviceInfoS> selectDetailInfo(TDeviceInfoS tDeviceInfos);
/**
* 关联设备数据删除接口
* @param deviceIds
*/
void deleteDetailInfo(Long[] deviceIds);
/**
* 关联设备数据删除接口 单条删除
* @param deviceId
*/
void deleteDetailinfOS(int deviceId);
}
......@@ -100,7 +100,7 @@ public class TDeviceInfoServiceImpl implements ITDeviceInfoService
* @param gettDeviceInfoS
*/
@Override
public void insertDeviceDetailInfo(List<TDeviceInfoS> gettDeviceInfoS) {
public void insertDeviceDetailInfo(TDeviceInfoS gettDeviceInfoS) {
tDeviceInfoMapper.insertDeviceDetailInfo(gettDeviceInfoS);
}
......@@ -114,4 +114,32 @@ public class TDeviceInfoServiceImpl implements ITDeviceInfoService
List<TDeviceInfoS> tDeviceInfoS = tDeviceInfoMapper.getdeviceDetailInfo(deviceId);
return tDeviceInfoS;
}
/**
* 查询无绑定的 关联设备信息
* @return
*/
@Override
public List<TDeviceInfoS> selectDetailInfo(TDeviceInfoS tDeviceInfos) {
List<TDeviceInfoS> tDeviceInfoS = tDeviceInfoMapper.selectDetailInfo(tDeviceInfos);
return tDeviceInfoS;
}
/**
* 关联设备数据删除接口
* @param deviceIds
*/
@Override
public void deleteDetailInfo(Long[] deviceIds) {
tDeviceInfoMapper.deleteDetailInfo(deviceIds);
}
/**
* 关联设备数据删除接口 单条删除
* @param deviceId
*/
@Override
public void deleteDetailinfOS(int deviceId) {
tDeviceInfoMapper.deleteDetailinfOS(deviceId);
}
}
......@@ -150,12 +150,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update>
<!--添加关联设备信息表数据-->
<insert id="insertDeviceDetailInfo" parameterType="java.util.List">
INSERT INTO t_relation_device_detail_info (relation_device_id,device_name,device_model,device_type,iot_no)
<!-- <insert id="insertDeviceDetailInfo" parameterType="java.util.List">-->
<!-- INSERT INTO t_relation_device_detail_info (relation_device_id,device_name,device_model,device_type,iot_no)-->
<!-- VALUES-->
<!-- <foreach collection="list" item="item" index="key" separator=",">-->
<!-- (#{item.relationDeviceId},#{item.deviceName},#{item.deviceModel},#{item.deviceType},#{item.iotNo})-->
<!-- </foreach>-->
<!-- </insert>-->
<insert id="insertDeviceDetailInfo">
INSERT INTO t_relation_device_detail_info (relation_device_id,device_name,device_model,device_type,iot_no,remarks)
VALUES
<foreach collection="list" item="item" index="key" separator=",">
(#{item.relationDeviceId},#{item.deviceName},#{item.deviceModel},#{item.deviceType},#{item.iotNo})
</foreach>
(#{relationDeviceId},#{deviceName},#{deviceModel},#{deviceType},#{iotNo},#{remarksn})
</insert>
<!--获取设备详细信息列表-->
......@@ -164,4 +170,27 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
from t_relation_device_detail_info where relation_device_id =#{deviceId}
</select>
<!--查询无绑定的 关联设备信息-->
<select id="selectDetailInfo" resultMap="TDeviceInfoResultS">
select relation_device_detail_id,relation_device_id,device_name,device_model,iot_no,remarks, (CASE device_type WHEN '1' THEN '压力表' WHEN '2' THEN '流量计' end) as device_type
from t_relation_device_detail_info where is_del='0' and relation_device_id is null
<if test="deviceName != null and deviceName != ''"> and device_name like concat('%', #{deviceName}, '%')</if>
<if test="deviceModel != null and deviceModel != ''"> and device_model like concat('%', #{deviceModel}, '%')</if>
<if test="iotNo != null and iotNo != ''"> and iot_no like concat('%', #{iotNo}, '%')</if>
group by relation_device_detail_id desc
</select>
<!--关联设备数据删除接口-->
<update id="deleteDetailInfo">
update t_relation_device_detail_info set is_del='1' where relation_device_detail_id in
<foreach item="deviceId" collection="array" open="(" separator="," close=")">
#{deviceId}
</foreach>
</update>
<!--关联设备数据删除接口 单条删除-->
<update id="deleteDetailinfOS">
update t_relation_device_detail_info set is_del='1' where relation_device_detail_id = #{deviceId}
</update>
</mapper>
......@@ -61,9 +61,39 @@ export function selectTEnterprise() {
}
// 关联设备详情信息
export function getDdeviceDetailInfo(deviceId) {
export function getDdeviceDetailInfo(data) {
return request({
url: '/device/device/getdeviceDetailInfo' + deviceId,
method: 'get'
url: '/device/device/selectDetailInfo',
method: 'post',
data:data
})
}
// 新增关联设备信息
export function addDetailInfos(data) {
return request({
url: '/device/device/insertDetailInfo',
method: 'post',
data: data
})
}
// 删除关联设备信息
export function deleteDetailInfo(deviceId) {
return request({
url: '/device/device/deleteDetailInfo',
method: 'delete',
data:deviceId
})
}
// 删除关联设备信息
export function deleteeListDetailInfo(deviceId) {
return request({
url: '/device/device/deleteeListDetailInfo',
method: 'delete',
data: deviceId
})
}
......@@ -123,6 +123,150 @@
@pagination="getList"
/>
<!--绑定关联设备弹出框-->
<el-dialog title="选择关联设备" :visible.sync="dialogTableVisible" formLabelWidth="120px">
<template>
<el-form :model="dateQueryParams" ref="queryForm" :inline="true" v-show="showSearch" >
<el-form-item label="设备名称" prop="deviceName">
<el-input
v-model="dateQueryParams.deviceName"
placeholder="请输入设备名称"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="设备型号" prop="deviceCode">
<el-input
v-model="dateQueryParams.deviceModel"
placeholder="请输入设备型号"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="物联网编号" prop="deviceAddr">
<el-input
v-model="dateQueryParams.iotNo"
placeholder="请输入物联网编号"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQueryData">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQueryDate">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="dialogFormVisible = true"
v-hasPermi="['device:device:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['device:device:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="deleteListDetailInfo"
v-hasPermi="['device:device:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
:loading="exportLoading"
@click="handleExport"
v-hasPermi="['device:device:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getDataList"></right-toolbar>
</el-row>
<el-table v-loading="loadings" ref="multipleTable" :data="tableData" tooltip-effect="dark" style="width: 100%" max-height="250" @selection-change="tableDataSelectionChange">
<el-table-column type="selection" width="55" align="center"></el-table-column>
<el-table-column label="设备名称" align="center" prop="deviceName" />
<el-table-column label="设备型号" align="center" prop="deviceModel" />
<el-table-column label="设备类型" align="center" prop="deviceType" />
<el-table-column label="物联网编号" align="center" prop="iotNo" />
<el-table-column label="备注" align="center" prop="remarksn" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="deleteDetailInfo(scope.row)"
v-hasPermi="['device:device:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="insertListDetailInfo"> </el-button>
<el-button @click="dialogTableVisible=false"> </el-button>
</div>
</template>
</el-dialog>
<!--添加关联设备弹出框-->
<el-dialog title="添加关联设备" :visible.sync="dialogFormVisible">
<el-form :model="formDetailInfo" label-width="90px" style="height: 270px">
<el-form-item label="设备名称">
<el-input v-model="formDetailInfo.deviceName" placeholder="请输入设备名称" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="设备型号" >
<el-input v-model="formDetailInfo.deviceModel" placeholder="请输入设备型号" />
</el-form-item>
<el-form-item label="设备类型" >
<el-select v-model="formDetailInfo.deviceType" placeholder="请选择设备类型">
<el-option label="压力表" value="1" />
<el-option label="流量计" value="2" />
</el-select>
</el-form-item>
<el-form-item label="物联网编号" >
<el-input v-model="formDetailInfo.iotNo" placeholder="请输入物联网编号" />
</el-form-item>
<el-form-item label="备注" >
<el-input v-model="formDetailInfo.remarksn" placeholder="请输入备注" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="addDetailInfo"> </el-button>
<el-button @click="dialogFormVisible=false"> </el-button>
</div>
</el-dialog>
<!-- 添加或修改设备信息对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
......@@ -143,8 +287,6 @@
<el-select v-model="form.deviceType" placeholder="请选择设备类型">
<el-option label="阀井" value="1" />
<el-option label="调压箱" value="2" />
<el-option label="巡检员" value="3" />
<el-option label="视频" value="4" />
</el-select>
</el-form-item>
......@@ -199,55 +341,18 @@
</el-form-item>
</el-form>
<!--自增关联设备信息-->
<el-form :model="dynamicValidateForm" ref="dynamicValidateForm" label-width="100px" class="demo-dynamic" >
<div v-for="(domain, index) in dynamicValidateForm.domains" :key="domain.key">
<el-divider content-position="left">关联设备</el-divider>
<el-form-item label="设备名称" prop="deviceModel">
<el-input v-model="domain.deviceName" placeholder="请输入设备名称" />
</el-form-item>
<el-form-item label="设备型号" prop="deviceModel">
<el-input v-model="domain.deviceModel" placeholder="请输入设备型号" />
</el-form-item>
<el-form-item label="设备类型" prop="deviceModel" >
<el-select v-model="domain.deviceType" placeholder="请选择设备类型">
<el-option label="压力表" value="1" />
<el-option label="流量计" value="2" />
</el-select>
</el-form-item>
<el-form-item label="物联网编号" prop="deviceModel">
<el-input v-model="domain.iotNo" placeholder="请输入物联网编号" />
</el-form-item>
<el-form-item label="备注" prop="remarks" >
<el-input v-model="domain.remarksn" placeholder="请输入备注" />
</el-form-item>
<el-button @click.prevent="removeDomain(domain)">删除</el-button>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="dialogTableVisible = true">选择关联设备</el-button>
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
<el-form-item>
<el-button type="primary" @click="submitForm('dynamicValidateForm')">提交</el-button>
<el-button @click="addDomain">新增关联设备</el-button>
</el-form-item>
</el-form>
<!--表单提交-->
<!-- <div slot="footer" class="dialog-footer">-->
<!-- <el-button type="primary" @click="submitForm"> </el-button>-->
<!-- <el-button @click="cancel"> </el-button>-->
<!-- </div>-->
</el-dialog>
</div>
</template>
<script>
import { listDevice, getDevice, delDevice, addDevice, updateDevice, exportDevice, selectTEnterprise } from "@/api/regulation/device";
import { listDevice, getDevice, delDevice, addDevice, updateDevice, exportDevice, selectTEnterprise,getDdeviceDetailInfo,addDetailInfos,deleteDetailInfo,deleteeListDetailInfo } from "@/api/regulation/device";
export default {
name: "Device",
......@@ -255,6 +360,35 @@ export default {
},
data() {
return {
/**弹出层*/
//下级设备数据数组
tableData: [],
//存储已被选中的下级数据id
DetailInfoListId :[],
multipleSelection: [],
dialogTableVisible: false,
dialogFormVisible: false,
form: {
name: '',
region: '',
date1: '',
date2: '',
delivery: false,
type: [],
resource: '',
desc: ''
},
formLabelWidth: '120px',
/*添加关联设备*/
formDetailInfo:{
relationDeviceDetailId:'',
deviceName: '',
deviceModel:'',
deviceType:'',
iotNo:'',
remarksn:''
},
/*动态添加输入框*/
dynamicValidateForm: {
domains: [{
deviceName: '',
......@@ -267,6 +401,8 @@ export default {
// 遮罩层
loading: true,
//下级数据的遮罩层
loadings:true,
// 导出遮罩层
exportLoading: false,
// 选中数组
......@@ -279,6 +415,8 @@ export default {
showSearch: true,
// 总条数
total: 0,
//下级关联设备条数
detailTotal:0,
// 设备信息表格数据
deviceList: [],
// 弹出层标题
......@@ -293,6 +431,17 @@ export default {
deviceCode: null,
deviceAddr: null,
},
// 查询参数
dateQueryParams: {
deviceName: null,
deviceModel: null,
iotNo: null,
},
//下级参数
detailInfoParams:{
pageNum: 1,
pageSize: 10,
},
// 表单参数
form: {},
// 关联设备表单参数
......@@ -310,12 +459,26 @@ export default {
methods: {
/** 查询设备信息列表 */
getList() {
this.loading = true;
listDevice(this.queryParams).then(response => {
this.deviceList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/**查询下级数据列表方法*/
getDataList(){
this.loadings = true;
// console.log(this.dateQueryParams)
//查询下级设备数据
getDdeviceDetailInfo(this.dateQueryParams).then(response => {
//下级设备数据 到时候换成下级数据
this.tableData = response.rows;
this.detailTotal = response.total;
this.loadings = false;
});
},
// 取消按钮
cancel() {
......@@ -347,37 +510,59 @@ export default {
isDel: null,
remarks: null
};
this.forms = {
deviceName:null,
deviceModel:null,
deviceType:null,
iotNo:null,
remarksn:null
}
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 下级数据搜索*/
handleQueryData(){
this.getDataList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
/** 下级数据重置按钮操作 搜索框重置*/
resetQueryDate(){
this.dateQueryParams={
deviceName: null,
deviceModel: null,
iotNo: null,
}
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.deviceId)
this.single = selection.length!==1
this.multiple = !selection.length
},
//关联数据多选框选中数据
tableDataSelectionChange(selection){
this.ids = selection.map(item => item.relationDeviceDetailId)
//按钮 非选中禁用
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
//查询企业名称下拉框数据
selectTEnterprise().then(response => {
this.test = response.data;
});
this.loadings = true;
//查询下级设备数据
getDdeviceDetailInfo(this.dateQueryParams).then(response => {
//下级设备数据 到时候换成下级数据
this.tableData = response.rows;
this.detailTotal = response.total;
this.loadings = false;
});
this.reset();
this.open = true;
this.title = "添加设备信息";
......@@ -388,12 +573,13 @@ export default {
selectTEnterprise().then(response => {
this.test = response.data;
});
const deviceId = row.deviceId || this.ids
//查询关联设备信息数据
getDdeviceDetailInfo().then(response => {
this.dynamicValidateForm.domains = response.data;
});
// getDdeviceDetailInfo(deviceId).then(response => {
// this.dynamicValidateForm.domains = response.data;
// });
this.reset();
const deviceId = row.deviceId || this.ids
getDevice(deviceId).then(response => {
this.form = response.data;
this.open = true;
......@@ -403,6 +589,7 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const deviceIds = row.deviceId || this.ids;
// const deviceIds = row.relationDeviceDetailId || this.ids;
this.$confirm('是否确认删除设备信息编号为"' + deviceIds + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
......@@ -447,8 +634,6 @@ export default {
this.dynamicValidateForm.domains.splice(index, 1)
}
},
/**提交数据方法*/
submitForm(formName) {
......@@ -465,7 +650,7 @@ export default {
if (valid) {
var tDeviceInfon={
tDeviceInfo:this.form,
tDeviceInfoS:this.dynamicValidateForm.domains
// tDeviceInfoS:this.dynamicValidateForm.domains
}
addDevice(JSON.stringify(tDeviceInfon)).then(response => {
this.msgSuccess("新增成功");
......@@ -482,7 +667,82 @@ export default {
});
},
/**关联设备添加方法*/
addDetailInfo(){
addDetailInfos(this.formDetailInfo).then(response => {
// this.tableData.push(this.formDetailInfo)
//关闭弹出层
this.dialogFormVisible = false;
//数据表单重置
this.formDetailInfo={
deviceName: null,
deviceModel:null,
deviceType:null,
iotNo:null,
remarksn:null
};
this.getDataList();
this.msgSuccess("新增成功");
});
},
/*关联设备单条删除方法*/
deleteDetailInfo(row){
const deviceIds = row.relationDeviceDetailId;
this.$confirm('是否确认删除设备信息编号为"' + deviceIds + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return deleteDetailInfo(deviceIds);
}).then(() => {
// this.tableData.splice(index,1);
this.getDataList();
this.msgSuccess("删除成功");
}).catch(() => {});
},
/**
* 批量删除关联设备方法
* @param row
*/
deleteListDetailInfo(row){
const deviceIds = this.ids;
this.$confirm('是否确认删除设备信息编号为"' + deviceIds + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return deleteeListDetailInfo(deviceIds);
}).then(() => {
this.getDataList();
this.msgSuccess("删除成功");
}).catch(() => {});
},
/**添加关联设备与设备绑定的数据 (存储到数组中)*/
insertListDetailInfo(row){
//获取已经选中的下级设备id
const deviceIds = this.ids;
this.$confirm('是否确认添加关联设备信息?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
}).then(() => {
//清空数组数据 将之前的数据清空
this.DetailInfoListId.splice(row);
//添加到数组中 以便下次使用
this.DetailInfoListId.push(deviceIds);
alert(this.DetailInfoListId)
console.log(deviceIds)
this.dialogTableVisible=false
this.msgSuccess("添加成功");
}).catch(() => {});
}
}
};
</script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment