| | |
| | | <el-table-column label="操作" min-width="180"> |
| | | <template slot-scope="scope"> |
| | | <!-- 加入 --> |
| | | <span class="iconfont option" @click="joinCluster(scope.row)" |
| | | <span |
| | | class="iconfont option" |
| | | @click="joinCluster(scope.row)" |
| | | v-if="scope.row.clusterId" |
| | | ></span |
| | | > |
| | | <!-- 退出 --> |
| | | <span |
| | | class="iconfont option" |
| | | @click="quitCluster(scope.row)" |
| | | v-if="false" |
| | | <span class="iconfont option" @click="quitCluster(scope.row)" v-else |
| | | ></span |
| | | > |
| | | <!-- 算法详情 --> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { findDevList } from "@/api/device"; |
| | | import { findDevList, findClustersBySearch } from "@/api/device"; |
| | | import AddBox from "@/views/equipmentManagement/equipmentList/components/AddBox"; |
| | | import UnbindBox from "@/views/equipmentManagement/equipmentDetail/components/UnbindBox"; |
| | | import QuitClusterBox from "@/views/equipmentManagement/equipmentList/components/QuitClusterBox"; |
| | |
| | | UnbindBox, |
| | | QuitClusterBox, |
| | | JoinClusterBox, |
| | | }, |
| | | created() { |
| | | this.getCluster(); |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | isShowAdd: false, //是否展示新增弹窗 |
| | | isShowUnbind: false, //是否展示解绑弹窗 |
| | | unbindId: "", |
| | | clusterArr: [ |
| | | { |
| | | value: 0, |
| | | label: "集群1", |
| | | }, |
| | | { |
| | | value: 1, |
| | | label: "集群2", |
| | | }, |
| | | ], //所属集群下拉框 |
| | | clusterArr: [], //所属集群下拉框 |
| | | cluster: null, //选中的集群类型 |
| | | showQuit: false, //展示退出集群的弹窗 |
| | | showJoin: false, //展示加入集群的弹窗 |
| | |
| | | }; |
| | | }, |
| | | methods: { |
| | | async getCluster() { |
| | | const res = await findClustersBySearch({ |
| | | InputText: "", |
| | | Page: 1, |
| | | Size: 10000, |
| | | userId: JSON.parse(sessionStorage.getItem("userInfo")).id, |
| | | }); |
| | | if (res && res.success) { |
| | | res.data.list.forEach((item) => { |
| | | this.clusterArr.push({ |
| | | label: item.clusterName, |
| | | value: item.clusterId, |
| | | }); |
| | | }); |
| | | } |
| | | }, |
| | | |
| | | // 跳到设备详情 |
| | | checkDetail(row) { |
| | | this.$router.push({ |
| | | path: "/equipmentDetail", |
| | | query: { |
| | | id: row.devId, |
| | | ip: row.devIp, |
| | | port: row.serverPort, |
| | | ndid: row.id, |
| | | }, |
| | | }); |
| | | }, |
| | |
| | | path: "/algorithmDetail", |
| | | query: { |
| | | id: row.devId, |
| | | ip: row.devIp, |
| | | port: row.serverPort, |
| | | }, |
| | | }); |
| | | }, |
| | |
| | | //解绑按钮 |
| | | Untying(row) { |
| | | console.log(row); |
| | | this.unbindId = row.id; |
| | | this.unbindId = row.devId; |
| | | this.isShowUnbind = true; |
| | | /* this.$confirm( |
| | | "解绑后该设备将从设备列表中移除,是否确认操作?", |
| | | "解绑提示", |
| | | { |
| | | type: "warning", |
| | | center: true, |
| | | } |
| | | ) |
| | | .then(() => { |
| | | unbind({ ids: [row.id] }) |
| | | .then(() => { |
| | | this.$notify({ |
| | | type: "success", |
| | | message: "解绑成功", |
| | | duration: 2500, |
| | | offset: 57, |
| | | }); |
| | | this.searchingBtn(); |
| | | }) |
| | | .catch(() => { |
| | | this.$notify({ |
| | | type: "error", |
| | | message: "解绑失败,请联系客服", |
| | | duration: 2500, |
| | | offset: 57, |
| | | }); |
| | | }); |
| | | }) |
| | | .catch((e) => { |
| | | console.log(e); |
| | | }); */ |
| | | }, |
| | | |
| | | //获得默认时间 |
| | |
| | | align-items: center; |
| | | } |
| | | |
| | | .cluster { |
| | | .el-select { |
| | | width: 200px; |
| | | height: 40px; |
| | | line-height: 40px; |
| | | |
| | | ::v-deep input { |
| | | height: 40px; |
| | | } |
| | | |
| | | .el-icon-arrow-up { |
| | | line-height: 40px; |
| | | } |
| | | |
| | | ::v-deep .el-icon-arrow-up { |
| | | height: 40px; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .id .el-input ::v-deep { |
| | | width: 180px; |
| | | } |