Bladeren bron

Merge branch 'dev' of http://39.106.8.246:3003/web/ibms into mainteance

# Conflicts:
#	src/components/business_space/dialogs/list/firm.vue
#	src/components/dialogs/list/firm.vue
#	src/components/ledger/handsontables/device.vue
shaun-sheep 5 jaren geleden
bovenliggende
commit
d5b17b08f0
1 gewijzigde bestanden met toevoegingen van 55 en 16 verwijderingen
  1. 55 16
      src/components/dialogs/list/firm.vue

+ 55 - 16
src/components/dialogs/list/firm.vue

@@ -54,13 +54,12 @@
   </el-dialog>
 </template>
 <script>
-
 import myPagination from "@/components/ledger/lib/myPagination";
 import paramDetails from "@/components/dialogs/list/paramDetails"
 import { getSpecList, getBrandList, getManufacturerList } from "@/api/scan/request"
 
-    export default {
-        components: {
+export default {
+  components: {
     myPagination,
     paramDetails
   },
@@ -84,6 +83,17 @@ import { getSpecList, getBrandList, getManufacturerList } from "@/api/scan/reque
             return {
                 search: "", //搜索文案
                 radio: "",
+                value: "specification",//当前选择的查看类型
+                options: [{
+                    value: 'specification',
+                    label: '选型号'
+                }, {
+                    value: 'brand',
+                    label: '选生产厂家-品牌'
+                }, {
+                    value: 'manufacturer',
+                    label: '选生产厂家'
+                }],
                 tableData: [],
                 data: {},
                 isLoad: {
@@ -132,19 +142,48 @@ import { getSpecList, getBrandList, getManufacturerList } from "@/api/scan/reque
                 this.getData()
             },
             getData() {
-                getSpecList({
-                    limit: {
-                        skip: this.page.size * (this.page.currentPage - 1),
-                        count: this.page.size
-                    },
-                    eqFamily: this.mess.deviceId,
-                    name: this.search
-                }, res => {
-                    this.page.total = res.totalCount
-                    this.tableData = res.content
-                    console.log(this.tableData)
-                })
-            }
+                if (this.value == 'specification') {//型号
+                    getSpecList({
+                        limit: {
+                            skip: this.page.size * (this.page.currentPage - 1),
+                            count: this.page.size
+                        },
+                        eqFamily: this.mess.deviceId,
+                        name: this.search
+                    }, res => {
+                        this.page.total = res.totalCount
+                        this.tableData = res.content
+                    })
+                } else if (this.value == 'brand') {//生产厂家-品牌
+                    getBrandList({
+                        limit: {
+                            skip: this.page.size * (this.page.currentPage - 1),
+                            count: this.page.size
+                        },
+                        name: this.search
+                    }, res => {
+                        this.page.total = res.totalCount
+                        this.tableData = res.content
+                    })
+                } else if (this.value == 'manufacturer') {//生产厂家
+                    getManufacturerList({
+                        limit: {
+                            skip: this.page.size * (this.page.currentPage - 1),
+                            count: this.page.size
+                        },
+                        name: this.search
+                    }, res => {
+                        this.page.total = res.totalCount
+                        this.tableData = res.content
+                    })
+                }
+                console.log(this.tableData)
+            },
+            handleChangeType(item) {
+                this.page.total = 0
+                this.tableData = []
+                this.getData()
+            },
         },
         watch: {
     dialog: {