|
@@ -2,7 +2,7 @@
|
|
firm 厂商
|
|
firm 厂商
|
|
-->
|
|
-->
|
|
<template>
|
|
<template>
|
|
- <el-dialog title="选择型号" :visible.sync="dialog.firm" width="900px">
|
|
|
|
|
|
+ <el-dialog title="选择生产厂家/品牌/型号" :visible.sync="dialog.firm" width="900px">
|
|
<div>
|
|
<div>
|
|
<div id="firm">
|
|
<div id="firm">
|
|
<div class="title-search query-form" style="padding: 10px;margin-bottom: 10px;">
|
|
<div class="title-search query-form" style="padding: 10px;margin-bottom: 10px;">
|
|
@@ -14,6 +14,9 @@
|
|
clearable
|
|
clearable
|
|
></el-input>
|
|
></el-input>
|
|
<el-button @click="searchKey" size="small">查找</el-button>
|
|
<el-button @click="searchKey" size="small">查找</el-button>
|
|
|
|
+ <el-select v-model="value" style="margin-left:10px;" @change="handleChangeType" placeholder="请选择">
|
|
|
|
+ <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"></el-option>
|
|
|
|
+ </el-select>
|
|
</div>
|
|
</div>
|
|
<el-radio-group v-model="radio" style="width:100%;">
|
|
<el-radio-group v-model="radio" style="width:100%;">
|
|
<el-table class='data-table' :data="tableData" style="width: 100%" height="300px" border>
|
|
<el-table class='data-table' :data="tableData" style="width: 100%" height="300px" border>
|
|
@@ -26,7 +29,7 @@
|
|
<el-table-column prop="name" label="型号" header-align='center'></el-table-column>
|
|
<el-table-column prop="name" label="型号" header-align='center'></el-table-column>
|
|
<el-table-column label="技术参数" header-align='center'>
|
|
<el-table-column label="技术参数" header-align='center'>
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <el-button type="text" @click="lookParam(scope.row)">技术参数</el-button>
|
|
|
|
|
|
+ <el-button :disabled="scope.row.specificationId?false:true" type="text" @click="lookParam(scope.row)">技术参数</el-button>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
@@ -53,7 +56,7 @@
|
|
<script>
|
|
<script>
|
|
import myPagination from "@/components/ledger/lib/myPagination";
|
|
import myPagination from "@/components/ledger/lib/myPagination";
|
|
import paramDetails from "@/components/dialogs/list/paramDetails"
|
|
import paramDetails from "@/components/dialogs/list/paramDetails"
|
|
-import { getSpecList } from "@/api/scan/request"
|
|
|
|
|
|
+import { getSpecList, getBrandList, getManufacturerList } from "@/api/scan/request"
|
|
|
|
|
|
export default {
|
|
export default {
|
|
components: {
|
|
components: {
|
|
@@ -77,8 +80,18 @@ export default {
|
|
return {
|
|
return {
|
|
search: "", //搜索文案
|
|
search: "", //搜索文案
|
|
radio: "",
|
|
radio: "",
|
|
- tableData: [
|
|
|
|
- ],
|
|
|
|
|
|
+ value: "specification",//当前选择的查看类型
|
|
|
|
+ options: [{
|
|
|
|
+ value: 'specification',
|
|
|
|
+ label: '选型号'
|
|
|
|
+ }, {
|
|
|
|
+ value: 'brand',
|
|
|
|
+ label: '选生产厂家-品牌'
|
|
|
|
+ }, {
|
|
|
|
+ value: 'manufacturer',
|
|
|
|
+ label: '选生产厂家'
|
|
|
|
+ }],
|
|
|
|
+ tableData: [],
|
|
data: {},
|
|
data: {},
|
|
isLoad: {
|
|
isLoad: {
|
|
paramShow: false
|
|
paramShow: false
|
|
@@ -123,19 +136,48 @@ export default {
|
|
}
|
|
}
|
|
this.getData()
|
|
this.getData()
|
|
},
|
|
},
|
|
|
|
+ handleChangeType(item) {
|
|
|
|
+ this.page.total = 0
|
|
|
|
+ this.tableData = []
|
|
|
|
+ this.getData()
|
|
|
|
+ },
|
|
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)
|
|
}
|
|
}
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
@@ -143,7 +185,7 @@ export default {
|
|
deep: true,
|
|
deep: true,
|
|
handler: function () {
|
|
handler: function () {
|
|
if (this.dialog.firm) {
|
|
if (this.dialog.firm) {
|
|
- console.log(this.mess)
|
|
|
|
|
|
+ this.value = 'specification'
|
|
this.changePage()
|
|
this.changePage()
|
|
}
|
|
}
|
|
}
|
|
}
|