|
@@ -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: {
|