Commit fb6f0eea authored by qinj's avatar qinj

Merge branch 'dev' of http://120.25.63.219:6088/rex/portalhtml into dev

parents 9cf0274e 46a344bb
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
<el-button <el-button
type="primary" type="primary"
@click="handleSearch" @click="handleSearch"
>查询</el-button> >{{btnTitle}}</el-button>
<el-button <el-button
plain plain
@click="handleReset" @click="handleReset"
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
highlight-current-row highlight-current-row
:header-cell-style="dialogHeaderCellStyle" :header-cell-style="dialogHeaderCellStyle"
style="width: 100%;" style="width: 100%;"
@row-dblclick="handleSelect" @row-click="handleSelect"
@selection-change="(rows) => (selectedRows = rows)" @selection-change="(rows) => (selectedRows = rows)"
> >
<el-table-column <el-table-column
...@@ -180,6 +180,10 @@ export default { ...@@ -180,6 +180,10 @@ export default {
placeholder: { placeholder: {
type: String, type: String,
default: '' default: ''
},
btnTitle: {
type: String,
default: '查询'
} }
}, },
data: function() { data: function() {
...@@ -204,7 +208,7 @@ export default { ...@@ -204,7 +208,7 @@ export default {
selectedRows: [], selectedRows: [],
hovering: false, hovering: false,
focused: false, focused: false,
loading: true loading: false
} }
}, },
computed: { computed: {
...@@ -231,15 +235,17 @@ export default { ...@@ -231,15 +235,17 @@ export default {
var formConfig = Object.assign(this.defaultFormConfig, lovData[this.code]) var formConfig = Object.assign(this.defaultFormConfig, lovData[this.code])
this.formConfig = formConfig this.formConfig = formConfig
this.dialogTableVisible = true this.dialogTableVisible = true
this.handleSearch() // this.handleSearch()
}, },
handleSearch() { handleSearch() {
this.pageData.currentPage = 1 this.pageData.currentPage = 1
this.fetchTable() this.fetchTable()
}, },
handleReset() { handleReset() {
this.tableData = []
this.pageData.total = 0
this.searchData = {} this.searchData = {}
this.handleSearch() // this.handleSearch()
}, },
fetchTable() { fetchTable() {
this.loading = true this.loading = true
...@@ -247,10 +253,24 @@ export default { ...@@ -247,10 +253,24 @@ export default {
const data = Object.assign({}, this.initialParams, this.searchData, this.pageData) const data = Object.assign({}, this.initialParams, this.searchData, this.pageData)
const params = this.$translateToC4CData(data) const params = this.$translateToC4CData(data)
delete params.total 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.$request(url, params).then(res => {
this.tableData = res.results.Result || [] this.tableData = res.results.Result || []
this.pageData.total = Number(res.results.Paging.TotalRecords || 0) if (this.code === 'qcc'){
// this.pageData.total = 100 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 this.loading = false
}) })
}, },
......
...@@ -51,6 +51,7 @@ export default { ...@@ -51,6 +51,7 @@ export default {
layout: 16, layout: 16,
code: 'qcc', code: 'qcc',
displayKey:'Name', displayKey:'Name',
btnTitle: '获取企查查信息',
returnFn: function(row) { returnFn: function(row) {
return { return {
Name: row.Name, 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