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