| | |
| | | //设备类型 |
| | | deviceTypeCreate: '/devicetype/create', |
| | | deviceTypeUpdate: '/devicetype/update', |
| | | deviceTypeDelete: '/devicetype/delete', |
| | | // 车间 工段下啦数据 |
| | | getWsl: '/machine/workshopList', |
| | | getPcl: '/machine/protocolList' |
| | |
| | | url: '/devicetype/update', |
| | | method: 'POST' |
| | | }, |
| | | deviceTypeDel: { |
| | | deviceTypeDelete: { |
| | | url: '/devicetype/delete', |
| | | method: 'POST' |
| | | }, |
| | |
| | | export function deviceTypeUpdate(params) { |
| | | return sendRequest(HttpConstants.deviceTypeUpdate, params) |
| | | } |
| | | export function deviceTypeDelete(ids) { |
| | | console.log(HttpConstants.deviceTypeDelete) |
| | | return sendRequest(HttpConstants.deviceTypeDelete, { ids: ids }) |
| | | } |
| | | |
| | | // |
| | | export function getWsl(params) { |
| | |
| | | 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: '已取消删除' |
| | | }) |
| | | }) |
| | | } |
| | | |
| | | }, |