|
@@ -1,39 +1,18 @@
|
|
-// 设备类型
|
|
|
|
-const typeMixin = {
|
|
|
|
- data() {
|
|
|
|
- return {
|
|
|
|
- typeOptions: [{
|
|
|
|
- value: 1,
|
|
|
|
- label: "蓝牙",
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- value: 2,
|
|
|
|
- label: "WiFi",
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- value: 3,
|
|
|
|
- label: "传统蓝牙",
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- value: 4,
|
|
|
|
- label: "4G",
|
|
|
|
- },
|
|
|
|
- ]
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-// 设备型号
|
|
|
|
import {
|
|
import {
|
|
getClientTypeList
|
|
getClientTypeList
|
|
} from '@/api/device/version'
|
|
} from '@/api/device/version'
|
|
-const clientTypeMixin = {
|
|
|
|
|
|
+import {
|
|
|
|
+ categoryList
|
|
|
|
+} from "@/api/device/category";
|
|
|
|
+
|
|
|
|
+const clientType = {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
clientTypeOptions: [],
|
|
clientTypeOptions: [],
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
|
|
+ // 设备型号
|
|
getClientTypeList().then(res => {
|
|
getClientTypeList().then(res => {
|
|
if (res.code === 0) {
|
|
if (res.code === 0) {
|
|
let index = 1
|
|
let index = 1
|
|
@@ -49,44 +28,25 @@ const clientTypeMixin = {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-// 使用分类
|
|
|
|
-const deviceTypeMixin = {
|
|
|
|
|
|
+const category = {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
- deviceTypeOptions: [{
|
|
|
|
- value: 0,
|
|
|
|
- label: '音响'
|
|
|
|
- }, {
|
|
|
|
- value: 1,
|
|
|
|
- label: '耳机'
|
|
|
|
- }, {
|
|
|
|
- value: 3,
|
|
|
|
- label: '穿戴'
|
|
|
|
- }],
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-// 升级方式
|
|
|
|
-const upgradeTypeMixin = {
|
|
|
|
- data() {
|
|
|
|
- return {
|
|
|
|
- upgradeTypeOptions: [{
|
|
|
|
- value: 1,
|
|
|
|
- label: "强制",
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- value: 2,
|
|
|
|
- label: "指定",
|
|
|
|
- },
|
|
|
|
- ],
|
|
|
|
|
|
+ categoryOptions: []
|
|
}
|
|
}
|
|
|
|
+ },
|
|
|
|
+ created() {
|
|
|
|
+ // 设备类型
|
|
|
|
+ categoryList({
|
|
|
|
+ status: 1,
|
|
|
|
+ }).then((res) => {
|
|
|
|
+ if (res.data.code === 0) {
|
|
|
|
+ this.categoryOptions = res.data.data;
|
|
|
|
+ }
|
|
|
|
+ });
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
export {
|
|
export {
|
|
- typeMixin,
|
|
|
|
- clientTypeMixin,
|
|
|
|
- deviceTypeMixin,
|
|
|
|
- upgradeTypeMixin
|
|
|
|
|
|
+ clientType,
|
|
|
|
+ category
|
|
}
|
|
}
|