Selaa lähdekoodia

设备管理 设备列表

DESKTOP-O04BTUJ\muzen 3 vuotta sitten
vanhempi
commit
a4faf6edb0
2 muutettua tiedostoa jossa 5 lisäystä ja 29 poistoa
  1. 5 2
      src/views/device/list/index.vue
  2. 0 27
      src/views/device/mixin/index.js

+ 5 - 2
src/views/device/list/index.vue

@@ -6,7 +6,9 @@
         <el-input v-model="form.name" placeholder="请输入设备名称" clearable />
       </el-form-item>
       <el-form-item label="设备型号:">
-        <el-input v-model="form.clientType" placeholder="请输入设备型号" clearable />
+        <el-select v-model="form.clientTypeId" placeholder="请选择设备型号" filterable clearable>
+          <el-option v-for="item in devOptions" :key="item.value" :label="item.label" :value="item.value" />
+        </el-select>
       </el-form-item>
       <el-form-item>
         <el-button type="primary" icon="el-icon-search" @click="getSearch">搜索</el-button>
@@ -43,7 +45,8 @@
       <el-table-column label="操作" align="center">
         <template slot-scope="scope">
           <el-button type="text" @click="getChange(scope.row.id, '查看')">查看</el-button>
-          <el-button v-if="scope.row.status === 2" type="text" @click="getChange(scope.row.id)" v-hasPermi="['device:list:edit']">
+          <el-button v-if="scope.row.status === 2" type="text" @click="getChange(scope.row.id)"
+            v-hasPermi="['device:list:edit']">
             编辑
           </el-button>
           <el-button v-if="scope.row.status === 2" type="text" @click="getShelves(1, scope.row.id)"

+ 0 - 27
src/views/device/mixin/index.js

@@ -1,36 +1,10 @@
 import {
-  getClientTypeList
-} from '@/api/device/version'
-import {
   categoryList
 } from "@/api/device/category";
 import {
   functionList
 } from "@/api/device/function";
 
-const clientType = {
-  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 category = {
   data() {
     return {
@@ -68,7 +42,6 @@ const functions = {
 }
 
 export {
-  clientType,
   category,
   functions
 }