Commit b11f4991 authored by jiangqihao's avatar jiangqihao

企查查

parent f64b5c9a
......@@ -54,7 +54,7 @@
<el-button
type="primary"
@click="handleSearch"
>查询</el-button>
>{{btnTitle}}</el-button>
<el-button
plain
@click="handleReset"
......@@ -75,7 +75,7 @@
highlight-current-row
:header-cell-style="dialogHeaderCellStyle"
style="width: 100%;"
@row-dblclick="handleSelect"
@row-click="handleSelect"
@selection-change="(rows) => (selectedRows = rows)"
>
<el-table-column
......@@ -180,6 +180,10 @@ export default {
placeholder: {
type: String,
default: ''
},
btnTitle: {
type: String,
default: '查询'
}
},
data: function() {
......@@ -204,7 +208,7 @@ export default {
selectedRows: [],
hovering: false,
focused: false,
loading: true
loading: false
}
},
computed: {
......@@ -231,15 +235,17 @@ export default {
var formConfig = Object.assign(this.defaultFormConfig, lovData[this.code])
this.formConfig = formConfig
this.dialogTableVisible = true
this.handleSearch()
// this.handleSearch()
},
handleSearch() {
this.pageData.currentPage = 1
this.fetchTable()
},
handleReset() {
this.tableData = []
this.pageData.total = 0
this.searchData = {}
this.handleSearch()
// this.handleSearch()
},
fetchTable() {
this.loading = true
......@@ -247,10 +253,24 @@ export default {
const data = Object.assign({}, this.initialParams, this.searchData, this.pageData)
const params = this.$translateToC4CData(data)
delete params.total
console.log(params)
if (this.code === 'qcc') {
params.searchKey = params.name
delete params.name
}
console.log("后",params)
this.$request(url, params).then(res => {
this.tableData = res.results.Result || []
this.pageData.total = Number(res.results.Paging.TotalRecords || 0)
// this.pageData.total = 100
if (this.code === 'qcc'){
if (res.results.Paging === null) {
this.pageData.total = 0
} else {
this.pageData.total = Number(res.results.Paging.TotalRecords || 0)
}
}else {
this.pageData.total = Number(res.results.Paging.TotalRecords || 0)
}
// this.pageData.total = Number(res.results.Paging.TotalRecords || 0)
this.loading = false
})
},
......
......@@ -51,6 +51,7 @@ export default {
layout: 16,
code: 'qcc',
displayKey:'Name',
btnTitle: '获取企查查信息',
returnFn: function(row) {
return {
Name: row.Name,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment