| | |
| | | <el-header> |
| | | <div class="left-panel"> |
| | | <el-button @click="table_add" type="primary" icon="el-icon-plus"></el-button> |
| | | <el-button type="danger" plain icon="el-icon-delete"></el-button> |
| | | <el-button type="danger" plain icon="el-icon-delete" @click="batchDel"></el-button> |
| | | <!-- <el-button type="primary" plain>导入</el-button> |
| | | <el-button type="primary" plain>批量操作</el-button> --> |
| | | </div> |
| | |
| | | <el-button text type="primary" size="small">删除</el-button> |
| | | </template> |
| | | </el-popconfirm> |
| | | <el-popconfirm title="确定停用吗?" |
| | | <!-- <el-popconfirm title="确定停用吗?" |
| | | @confirm="table_del(scope.row, scope.$index,'1')"> |
| | | <template #reference> |
| | | <el-button text type="primary" size="small">停用</el-button> |
| | | </template> |
| | | </el-popconfirm> |
| | | </el-popconfirm> --> |
| | | </el-button-group> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | <li>工位编号 {{previewData.code}}</li> |
| | | <li>工位组 {{previewData.groupName}}</li> |
| | | <li>工位名称 {{previewData.name}}</li> |
| | | <li>工位类型 {{previewData.type}}</li> |
| | | <li>工位类型 {{types.find(v => v.value == previewData.type)?.label}}</li> |
| | | <li>工位日历 {{previewData.calendarName}}</li> |
| | | <li>状态 {{previewData.status}}</li> |
| | | <li>状态 {{previewData.status ? '启用' : '禁用'}}</li> |
| | | </ul> |
| | | </div> |
| | | <el-tabs tab-position="top" class="custom-tabs" v-model="normal"> |
| | |
| | | |
| | | </el-tabs> |
| | | </el-card> |
| | | <Dialog ref="dialog" :option="{types,status,group}"></Dialog> |
| | | <Dialog ref="dialog" @success="success" :option="{types,status,group}"></Dialog> |
| | | </el-main> |
| | | </template> |
| | | |
| | |
| | | params: {}, |
| | | keyWord: '', |
| | | type: '', |
| | | statu: '1', |
| | | statu: 1, |
| | | types: [ |
| | | { |
| | | label: '所有', |
| | | value: '' |
| | | }, |
| | | { |
| | | label: '机器', |
| | | value: '0' |
| | | value: 0 |
| | | }, |
| | | { |
| | | label: '人工', |
| | | value: '1' |
| | | value: 1 |
| | | }, |
| | | ], |
| | | status: [ |
| | | { |
| | | label: '启用', |
| | | value: '1' |
| | | value: 1 |
| | | }, |
| | | { |
| | | label: '停用', |
| | | value: '0' |
| | | value: 0 |
| | | } |
| | | ], |
| | | previewData: {}, |
| | |
| | | treeCheckKey: [], |
| | | beltline_type: [], |
| | | group_tag: [], |
| | | addGroupShow: false |
| | | addGroupShow: false, |
| | | selection: [] |
| | | } |
| | | }, |
| | | watch: { |
| | |
| | | this.group_tag = res.data |
| | | }) |
| | | |
| | | }, |
| | | success () { |
| | | this.search() |
| | | }, |
| | | async queryList(flag) { |
| | | this.showGrouploading = true |
| | |
| | | this.$refs.dialog.open('edit',row) |
| | | }, |
| | | table_del(row, index,type) { |
| | | this.$API.workstation.deleteWork.delete({ |
| | | type, |
| | | workstationIds:row.id |
| | | }).then(() => { |
| | | this.$HTTP.delete(`/api/blade-cps/workstation?type=0&workstationIds=${row.id}`).then(res => { |
| | | this.search() |
| | | }) |
| | | }, |
| | | selectionChange (selection) { |
| | | this.selection = selection |
| | | }, |
| | | batchDel () { |
| | | this.$HTTP.delete(`/api/blade-cps/workstation?type=0&workstationIds=${this.selection.map(item => item.id).join(',')}`).then(res => { |
| | | this.search() |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |