Jelajahi Sumber

设备列表

DESKTOP-SVI9JE1\muzen 1 tahun lalu
induk
melakukan
8a558fbbf5
1 mengubah file dengan 8 tambahan dan 8 penghapusan
  1. 8 8
      src/views/device/list/index.vue

+ 8 - 8
src/views/device/list/index.vue

@@ -84,9 +84,9 @@
 </template>
 
 <script>
-import { List, Delete, upDown } from '@/api/device/list'
+import { list, remove, change } from '@/api/device/list'
 import { devMixin, onOrOffMixin } from '@/mixin/index'
-import { categoryList } from "@/api/device/category";
+import { list as classList } from "@/api/device/class";
 export default {
   mixins: [devMixin, onOrOffMixin],
   data() {
@@ -131,13 +131,13 @@ export default {
   },
   mounted() {
     this.getList()
-    this.getCategory()
+    this.getClass()
   },
   methods: {
     // 列表
     getList() {
       this.loading = true
-      List(this.form).then(res => {
+      list(this.form).then(res => {
         this.tableData = res.data.records
         this.total = res.data.total
         this.loading = false
@@ -167,8 +167,8 @@ export default {
     },
 
     // 设备分类
-    getCategory() {
-      categoryList().then(res => {
+    getClass() {
+      classList().then(res => {
         this.categoryOptions = res.data
       })
     },
@@ -180,7 +180,7 @@ export default {
       }
       let title = key === 1 ? '上架' : '下架'
       this.changeForm.type = key
-      upDown(this.changeForm).then(res => {
+      change(this.changeForm).then(res => {
         if (res.code === 0) {
           this.$message.success(`${title}成功!`)
           this.getList()
@@ -217,7 +217,7 @@ export default {
       this.$confirm('确定要删除?', {
         type: 'warning'
       }).then(() => {
-        Delete(id).then(res => {
+        remove(id).then(res => {
           if (res.code === 0) {
             this.getList()
             this.$message.success('删除成功!')