Browse Source

adm:feat> 修改设备筛选

onlyh 3 years ago
parent
commit
9a619fbff1
2 changed files with 12 additions and 12 deletions
  1. 10 10
      src/views/maintain/device/index.vue
  2. 2 2
      vue.config.js

+ 10 - 10
src/views/maintain/device/index.vue

@@ -198,13 +198,13 @@ export default class extends Vue {
     }
 
     handleChangeDevice() {
-        if (this.deviceType[1]) {
+        if (this.deviceType[2]) {
             this.loading = true
             let param = {
-                category: this.deviceType[1]
+                category: this.deviceType[2]
             }
             let param2 = {
-                filters: this.deviceType[1] ? `classCode='${this.deviceType[1]}'` : undefined,
+                filters: this.deviceType[2] ? `classCode='${this.deviceType[2]}'` : undefined,
                 pageNumber: this.paginationList.page,
                 pageSize: this.paginationList.size,
                 orders: "createTime desc, id asc",
@@ -241,11 +241,11 @@ export default class extends Vue {
     }
 
     async handleNext() {
-        if (this.deviceVal[1]) {
+        if (this.deviceVal[2]) {
             this.next = false
             this.isWidth = true
             let param = {
-                category: this.deviceVal[1]
+                category: this.deviceVal[2]
             }
             await dictInfo(param).then(res => {
                 const basicInfos = [{path: 'bimTypeName', aliasName: '构件分类名称', category: "STATIC", editable: true},
@@ -408,19 +408,19 @@ export default class extends Vue {
     // 搜索
     SearchValue(val: string) {
         this.inputSearch = val
-        this.handleChangeDevice(this.deviceType[1])
+        this.handleChangeDevice(this.deviceType[2])
     }
 
     // 当前分页
     handleCurrentChange(val: number) {
         console.log(val)
         this.paginationList.page = val
-        this.handleChangeDevice(this.deviceType[1])
+        this.handleChangeDevice(this.deviceType[2])
     }
 
     handleSizeChange(val: number) {
         this.paginationList.size = val
-        this.handleChangeDevice(this.deviceType[1])
+        this.handleChangeDevice(this.deviceType[2])
     }
 
     // 添加设备
@@ -465,7 +465,7 @@ export default class extends Vue {
             //更新
             this.handleUpdateEquip(eq);
         } else {
-            eq.classCode = this.deviceVal[1]
+            eq.classCode = this.deviceVal[2]
             // 创建
             this.handleCreateEquip(eq);
         }
@@ -510,7 +510,7 @@ export default class extends Vue {
             //更新
             this.handleUpdateEquip(this.curEquip);
         } else {
-            this.curEquip.classCode = this.deviceVal[1]
+            this.curEquip.classCode = this.deviceVal[2]
             // 创建
             this.handleCreateEquip(this.curEquip);
         }

+ 2 - 2
vue.config.js

@@ -4,7 +4,7 @@ const devServerPort = 28888;
 const stageServerPort = 28889;
 module.exports = {
     // TODO: 更改 publicPath 打包静态文件目录的配置
-    publicPath: process.env.NODE_ENV === "production" ? "/" : "/wanda-adm/",
+    publicPath: process.env.NODE_ENV === "production" ? "/" : "/",
     // TODO:打包名称
     outputDir: "wanda-adm",
 
@@ -15,7 +15,7 @@ module.exports = {
         //         use: {
         //             loader: "file-loader",
         //             options: {
-        //                 name: "fonts/[name].[ext]",
+        //                 name: " fonts/[name].[ext]",
         //             },
         //         },
         //     },