| | |
| | | <!-- |
| | | * @Date: 2024-04-27 20:04:34 |
| | | * @LastEditors: Sneed |
| | | * @LastEditTime: 2024-05-07 22:23:47 |
| | | * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/tpm/MachineTab.vue |
| | | * @LastEditors: gaoshp |
| | | * @LastEditTime: 2024-09-24 21:03:08 |
| | | * @FilePath: /cps-web/src/views/tpm/MachineTab.vue |
| | | --> |
| | | <template> |
| | | <el-container> |
| | | <el-aside width="200px" v-loading="showGrouploading"> |
| | | <el-container> |
| | | <el-main class="nopadding"> |
| | | <el-tree ref="group" default-expand-all node-key="id" :data="group" |
| | | <el-tree :expand-on-click-node="false" ref="group" default-expand-all node-key="id" :data="group" |
| | | :current-node-key="params.groupId" :highlight-current="true" @node-click="nodeClick"></el-tree> |
| | | </el-main> |
| | | </el-container> |
| | |
| | | <el-button-group> |
| | | <el-button text type="primary" size="small" |
| | | @click="table_edit(scope.row, scope.$index)">编辑</el-button> |
| | | <el-popconfirm cancel-button-text="停用" confirm-button-text="删除" |
| | | <el-popconfirm width="220" cancel-button-text="停用" confirm-button-text="删除" |
| | | title="删除数据会影响已关联的业务 ,若您想在已关联的业务中依然显示这些数据, 您可以选择 停用 操作。停用后此数据将不能再被新业务使用。" |
| | | @confirm="table_del(scope.row, scope.$index, '0')" |
| | | @cancel="table_del(scope.row, scope.$index, '1')"> |
| | |
| | | this.$refs.table.reload(this.params) |
| | | }, |
| | | table_add() { |
| | | this.$refs.dialog.open('add') |
| | | this.$refs.dialog.open('add', { |
| | | groupId: this.params.groupId |
| | | }) |
| | | }, |
| | | table_edit(row) { |
| | | this.$refs.dialog.open('add', { id: row.id }) |
| | | this.$refs.dialog.open('edit', { id: row.id }) |
| | | }, |
| | | success() { |
| | | this.getTreeData() |
| | |
| | | if (res.code === 200) { |
| | | this.$message.success("操作成功"); |
| | | this.getTreeData() |
| | | } else { |
| | | this.$message.error(res.msg); |
| | | } |
| | | }) |
| | | }, |
| | |
| | | if (res.code === 200) { |
| | | this.$message.success("操作成功"); |
| | | this.getTreeData() |
| | | } else { |
| | | this.$message.error(res.msg); |
| | | } |
| | | }) |
| | | }, |