1
This commit is contained in:
@@ -10,7 +10,7 @@
|
|||||||
<el-input v-model="jdQueryParams.productId" placeholder="商品ID" clearable @keyup.enter.native="handleJdQuery" />
|
<el-input v-model="jdQueryParams.productId" placeholder="商品ID" clearable @keyup.enter.native="handleJdQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="产品类型">
|
<el-form-item label="产品类型">
|
||||||
<el-select v-model="jdQueryParams.productType" placeholder="请选择" clearable filterable style="width: 200px;" @change="handleJdProductTypeChange">
|
<el-select v-model="jdQueryParams.productType" placeholder="请选择" clearable filterable style="width: 200px;">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="(value, key) in jdProductTypeMap"
|
v-for="(value, key) in jdProductTypeMap"
|
||||||
:key="key"
|
:key="key"
|
||||||
@@ -111,7 +111,7 @@
|
|||||||
<el-input v-model="tbQueryParams.productId" placeholder="商品ID" clearable @keyup.enter.native="handleTbQuery" />
|
<el-input v-model="tbQueryParams.productId" placeholder="商品ID" clearable @keyup.enter.native="handleTbQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="产品类型">
|
<el-form-item label="产品类型">
|
||||||
<el-select v-model="tbQueryParams.productType" placeholder="请选择" clearable filterable style="width: 200px;" @change="handleTbProductTypeChange">
|
<el-select v-model="tbQueryParams.productType" placeholder="请选择" clearable filterable style="width: 200px;">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="(value, key) in tbProductTypeMap"
|
v-for="(value, key) in tbProductTypeMap"
|
||||||
:key="key"
|
:key="key"
|
||||||
@@ -335,15 +335,7 @@ export default {
|
|||||||
// 京东评论相关
|
// 京东评论相关
|
||||||
getJdList() {
|
getJdList() {
|
||||||
this.jdLoading = true
|
this.jdLoading = true
|
||||||
// 构建查询参数,只传递productId,不传递productType
|
listJdComment(this.addDateRange(this.jdQueryParams, this.jdDateRange)).then(response => {
|
||||||
const queryParams = { ...this.jdQueryParams }
|
|
||||||
// 如果选择了产品类型,转换为productId
|
|
||||||
if (queryParams.productType && this.jdProductTypeMap[queryParams.productType]) {
|
|
||||||
queryParams.productId = this.jdProductTypeMap[queryParams.productType]
|
|
||||||
}
|
|
||||||
// 删除productType,只使用productId查询
|
|
||||||
delete queryParams.productType
|
|
||||||
listJdComment(this.addDateRange(queryParams, this.jdDateRange)).then(response => {
|
|
||||||
this.jdList = response.rows
|
this.jdList = response.rows
|
||||||
this.jdTotal = response.total
|
this.jdTotal = response.total
|
||||||
this.jdLoading = false
|
this.jdLoading = false
|
||||||
@@ -353,24 +345,9 @@ export default {
|
|||||||
this.jdQueryParams.pageNum = 1
|
this.jdQueryParams.pageNum = 1
|
||||||
this.getJdList()
|
this.getJdList()
|
||||||
},
|
},
|
||||||
handleJdProductTypeChange(value) {
|
|
||||||
// 当产品类型改变时,自动设置对应的productId
|
|
||||||
if (value && this.jdProductTypeMap[value]) {
|
|
||||||
this.jdQueryParams.productId = this.jdProductTypeMap[value]
|
|
||||||
} else {
|
|
||||||
this.jdQueryParams.productId = null
|
|
||||||
}
|
|
||||||
},
|
|
||||||
resetJdQuery() {
|
resetJdQuery() {
|
||||||
this.jdDateRange = []
|
this.jdDateRange = []
|
||||||
this.jdQueryParams = {
|
this.resetForm('jdQueryParams')
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
productId: null,
|
|
||||||
productType: null,
|
|
||||||
userName: null,
|
|
||||||
isUse: null
|
|
||||||
}
|
|
||||||
this.handleJdQuery()
|
this.handleJdQuery()
|
||||||
},
|
},
|
||||||
handleJdDateRangeChange(value) {
|
handleJdDateRangeChange(value) {
|
||||||
@@ -392,26 +369,14 @@ export default {
|
|||||||
}).catch(() => {})
|
}).catch(() => {})
|
||||||
},
|
},
|
||||||
handleJdExport() {
|
handleJdExport() {
|
||||||
// 构建导出参数,只传递productId,不传递productType
|
this.download('jarvis/comment/jd/export', {
|
||||||
const exportParams = { ...this.jdQueryParams }
|
...this.jdQueryParams
|
||||||
if (exportParams.productType && this.jdProductTypeMap[exportParams.productType]) {
|
}, `jd_comment_${new Date().getTime()}.xlsx`)
|
||||||
exportParams.productId = this.jdProductTypeMap[exportParams.productType]
|
|
||||||
}
|
|
||||||
delete exportParams.productType
|
|
||||||
this.download('jarvis/comment/jd/export', exportParams, `jd_comment_${new Date().getTime()}.xlsx`)
|
|
||||||
},
|
},
|
||||||
// 淘宝评论相关
|
// 淘宝评论相关
|
||||||
getTbList() {
|
getTbList() {
|
||||||
this.tbLoading = true
|
this.tbLoading = true
|
||||||
// 构建查询参数,只传递productId,不传递productType
|
listTbComment(this.addDateRange(this.tbQueryParams, this.tbDateRange)).then(response => {
|
||||||
const queryParams = { ...this.tbQueryParams }
|
|
||||||
// 如果选择了产品类型,转换为productId
|
|
||||||
if (queryParams.productType && this.tbProductTypeMap[queryParams.productType]) {
|
|
||||||
queryParams.productId = this.tbProductTypeMap[queryParams.productType]
|
|
||||||
}
|
|
||||||
// 删除productType,只使用productId查询
|
|
||||||
delete queryParams.productType
|
|
||||||
listTbComment(this.addDateRange(queryParams, this.tbDateRange)).then(response => {
|
|
||||||
this.tbList = response.rows
|
this.tbList = response.rows
|
||||||
this.tbTotal = response.total
|
this.tbTotal = response.total
|
||||||
this.tbLoading = false
|
this.tbLoading = false
|
||||||
@@ -421,24 +386,9 @@ export default {
|
|||||||
this.tbQueryParams.pageNum = 1
|
this.tbQueryParams.pageNum = 1
|
||||||
this.getTbList()
|
this.getTbList()
|
||||||
},
|
},
|
||||||
handleTbProductTypeChange(value) {
|
|
||||||
// 当产品类型改变时,自动设置对应的productId
|
|
||||||
if (value && this.tbProductTypeMap[value]) {
|
|
||||||
this.tbQueryParams.productId = this.tbProductTypeMap[value]
|
|
||||||
} else {
|
|
||||||
this.tbQueryParams.productId = null
|
|
||||||
}
|
|
||||||
},
|
|
||||||
resetTbQuery() {
|
resetTbQuery() {
|
||||||
this.tbDateRange = []
|
this.tbDateRange = []
|
||||||
this.tbQueryParams = {
|
this.resetForm('tbQueryParams')
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
productId: null,
|
|
||||||
productType: null,
|
|
||||||
userName: null,
|
|
||||||
isUse: null
|
|
||||||
}
|
|
||||||
this.handleTbQuery()
|
this.handleTbQuery()
|
||||||
},
|
},
|
||||||
handleTbDateRangeChange(value) {
|
handleTbDateRangeChange(value) {
|
||||||
@@ -460,13 +410,9 @@ export default {
|
|||||||
}).catch(() => {})
|
}).catch(() => {})
|
||||||
},
|
},
|
||||||
handleTbExport() {
|
handleTbExport() {
|
||||||
// 构建导出参数,只传递productId,不传递productType
|
this.download('jarvis/taobaoComment/export', {
|
||||||
const exportParams = { ...this.tbQueryParams }
|
...this.tbQueryParams
|
||||||
if (exportParams.productType && this.tbProductTypeMap[exportParams.productType]) {
|
}, `tb_comment_${new Date().getTime()}.xlsx`)
|
||||||
exportParams.productId = this.tbProductTypeMap[exportParams.productType]
|
|
||||||
}
|
|
||||||
delete exportParams.productType
|
|
||||||
this.download('jarvis/taobaoComment/export', exportParams, `tb_comment_${new Date().getTime()}.xlsx`)
|
|
||||||
},
|
},
|
||||||
// 统计信息相关
|
// 统计信息相关
|
||||||
getStatistics() {
|
getStatistics() {
|
||||||
|
|||||||
Reference in New Issue
Block a user