| | |
| | | <!-- |
| | | * @Date: 2024-01-06 17:40:19 |
| | | * @LastEditors: Sneed |
| | | * @LastEditTime: 2024-01-13 11:35:29 |
| | | * @LastEditTime: 2024-01-14 14:12:18 |
| | | * @FilePath: /belleson-frontend/Users/mache/Documents/demo/mdc/src/container/deviceType/index.vue |
| | | --> |
| | | <template> |
| | |
| | | <el-input class="item-value" v-model="queryInfo.name"></el-input> |
| | | |
| | | </div> |
| | | |
| | | |
| | | <div class="item"> |
| | | <el-button type="primary" size="small" @click="query">查询</el-button> |
| | | </div> |
| | |
| | | label="名称" |
| | | width="180"> |
| | | </el-table-column> |
| | | |
| | | <el-table-column align="center" label="操作" prop="editor"> |
| | | <template slot-scope="scope"> |
| | | <el-button size="mini" type="text" @click="editDeviceType(scope.row)">编辑</el-button> |
| | | <el-button size="mini" type="text" @click="deleteHandle(scope.row)">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </template> |
| | | |
| | | </List> |
| | |
| | | <script> |
| | | import List from '../list/index.vue' |
| | | import ManageAddUpdate from './Manage-add-update' |
| | | import { getUrl } from '@/api/Api' |
| | | import { getUrl,deviceTypeDelete } from '@/api/Api' |
| | | export default { |
| | | components: { |
| | | List, |
| | |
| | | this.addOrUpdateVisible = true |
| | | |
| | | }, |
| | | editDeviceType(row){ |
| | | this.row = row; |
| | | this.addOrUpdateVisible = true; |
| | | }, |
| | | close() { |
| | | this.addOrUpdateVisible = false |
| | | }, |
| | |
| | | addOrUpdateHandle(row) { |
| | | this.row = row |
| | | this.addOrUpdateVisible = true |
| | | }, |
| | | deleteHandle(row) { |
| | | let ids = [] |
| | | |
| | | ids.push(row.id) |
| | | |
| | | ids = ids.join(',') |
| | | this.$confirm('确定要永久删除此项?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | deviceTypeDelete(ids).then(res => { |
| | | // if(res.result == ""){} |
| | | this.$message({ |
| | | type: 'success', |
| | | message: '删除成功!' |
| | | }) |
| | | this.submitForm() |
| | | }) |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已取消删除' |
| | | }) |
| | | }) |
| | | } |
| | | |
| | | }, |