|
|
@@ -21,7 +21,7 @@
|
|
|
ref="orgTree"
|
|
|
></org-tree>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="Iot名称" prop="iotName">
|
|
|
+ <el-form-item label="主机名称" prop="iotName">
|
|
|
<el-input
|
|
|
v-model="queryParams.iotName"
|
|
|
clearable
|
|
|
@@ -42,7 +42,7 @@
|
|
|
/>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="Iot注册码" prop="registerCode">
|
|
|
+ <el-form-item label="主机注册码" prop="registerCode">
|
|
|
<el-input
|
|
|
v-model="queryParams.registerCode"
|
|
|
clearable
|
|
|
@@ -116,10 +116,10 @@
|
|
|
<el-table-column label="地区" align="center" prop="firstOrgName" width="120"/>
|
|
|
<el-table-column label="行社名称" align="center" prop="secondOrgName" width="220"/>
|
|
|
<el-table-column label="所属机构" align="center" prop="orgName" width="150"/>
|
|
|
- <el-table-column label="Iot名称" align="center" prop="iotName" width="150"/>
|
|
|
- <el-table-column label="Iot编码" align="center" prop="iotCode" width="220" :show-overflow-tooltip="true"/>
|
|
|
- <el-table-column label="Iot注册码" align="center" prop="registerCode" width="220"/>
|
|
|
- <el-table-column label="Iot服务IP" align="center" prop="iotIp" width="150"/>
|
|
|
+ <el-table-column label="主机名称" align="center" prop="iotName" width="150"/>
|
|
|
+ <el-table-column label="主机编码" align="center" prop="iotCode" width="220" :show-overflow-tooltip="true"/>
|
|
|
+ <el-table-column label="主机注册码" align="center" prop="registerCode" width="220"/>
|
|
|
+ <el-table-column label="主机服务IP" align="center" prop="iotIp" width="150"/>
|
|
|
<el-table-column label="链接状态" align="center" prop="iotStatus" width="150">
|
|
|
<template slot-scope="r"
|
|
|
>{{
|
|
|
@@ -156,6 +156,13 @@
|
|
|
@click="handleUpdate(scope.row)"
|
|
|
>编辑
|
|
|
</el-button>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-edit-outline"
|
|
|
+ @click="handleDelete(scope.row)"
|
|
|
+ >删除
|
|
|
+ </el-button>
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
@@ -234,7 +241,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import {add, edit, getIot, list} from "@/api/iot/server";
|
|
|
+import {add, edit, getIot, list,deleted} from "@/api/iot/server";
|
|
|
import {getLabel} from "./../../commonOption";
|
|
|
import OrgTree from "@/components/orgTree/orgQuerySelector.vue";
|
|
|
import {mapGetters} from "vuex";
|
|
|
@@ -397,6 +404,25 @@ export default {
|
|
|
this.title = "编辑Iot服务";
|
|
|
});
|
|
|
},
|
|
|
+ /** 修改按钮操作 */
|
|
|
+ handleDelete(row) {
|
|
|
+ if (row.iotStatus==1) {
|
|
|
+ this.$modal.alert("删除该主机信息,请先停用主机服务!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.$modal
|
|
|
+ .confirm("是否确认删除该主机信息?")
|
|
|
+ .then(function () {
|
|
|
+ return deleted(row.id);
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.$modal.msgSuccess("删除成功");
|
|
|
+ this.open = false;
|
|
|
+ this.getList();
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ });
|
|
|
+ },
|
|
|
/** 重置按钮操作 */
|
|
|
resetQuery() {
|
|
|
this.resetForm("queryForm");
|