|
@@ -84,6 +84,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import { deviceEnable } from '@/api/device'
|
|
|
export default {
|
|
|
name: 'EquipmentModal',
|
|
|
props: {
|
|
@@ -199,16 +200,14 @@ export default {
|
|
|
changeFlagHandle (record) {
|
|
|
const _data = {
|
|
|
id: record.id,
|
|
|
- flag: record.workStatus == 1 ? '0' : '1'
|
|
|
+ flag: record.state == 1 ? '0' : '1'
|
|
|
}
|
|
|
- // changeStatus(_data).then(res => {
|
|
|
- // if (res.status == 200) {
|
|
|
- // this.$message.success(res.message)
|
|
|
- // this.$refs.table.refresh()
|
|
|
- // } else {
|
|
|
- // record.status = !record.status
|
|
|
- // }
|
|
|
- // })
|
|
|
+ deviceEnable(_data).then(res => {
|
|
|
+ if (res.status == 200) {
|
|
|
+ this.$message.success(res.message)
|
|
|
+ this.$refs.table.refresh()
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
watch: {
|