|
@@ -1,3 +1,5 @@
|
|
|
+// @ts-check
|
|
|
+
|
|
|
/**
|
|
|
* @typedef {import('@/api/forecast/types').ForecastSummaryQueryParams} ForecastSummaryQueryParams
|
|
|
* @typedef {import('@/api/forecast/types').ForecastSummaryRecord} ForecastSummaryRecord
|
|
@@ -304,8 +306,9 @@ export default {
|
|
|
|
|
|
/**
|
|
|
* 搜索条件变化处理
|
|
|
- * @param {Object} params - 搜索参数
|
|
|
- * @param {Function} done - 完成回调
|
|
|
+ * @this {ForecastSummaryComponent & Vue}
|
|
|
+ * @param {Record<string, any>} params - 搜索参数
|
|
|
+ * @param {() => void} done - 完成回调
|
|
|
*/
|
|
|
searchChange(params, done) {
|
|
|
// 处理年月字段拆分
|
|
@@ -338,6 +341,7 @@ export default {
|
|
|
|
|
|
/**
|
|
|
* 搜索重置处理
|
|
|
+ * @this {ForecastSummaryComponent & Vue}
|
|
|
*/
|
|
|
searchReset() {
|
|
|
this.query = { ...DEFAULT_FORECAST_SUMMARY_QUERY }
|
|
@@ -346,7 +350,8 @@ export default {
|
|
|
|
|
|
/**
|
|
|
* 选择变化处理
|
|
|
- * @param {Array<Object>} selection - 选中的行数据
|
|
|
+ * @this {ForecastSummaryComponent & Vue}
|
|
|
+ * @param {Array<ForecastSummaryRecord>} selection - 选中的行数据
|
|
|
*/
|
|
|
selectionChange(selection) {
|
|
|
this.selectionList = selection
|
|
@@ -354,6 +359,7 @@ export default {
|
|
|
|
|
|
/**
|
|
|
* 当前页变化处理
|
|
|
+ * @this {ForecastSummaryComponent & Vue}
|
|
|
* @param {number} currentPage - 当前页码
|
|
|
*/
|
|
|
currentChange(currentPage) {
|
|
@@ -362,6 +368,7 @@ export default {
|
|
|
|
|
|
/**
|
|
|
* 页大小变化处理
|
|
|
+ * @this {ForecastSummaryComponent & Vue}
|
|
|
* @param {number} pageSize - 页大小
|
|
|
*/
|
|
|
sizeChange(pageSize) {
|
|
@@ -370,6 +377,7 @@ export default {
|
|
|
|
|
|
/**
|
|
|
* 刷新处理
|
|
|
+ * @this {ForecastSummaryComponent & Vue}
|
|
|
*/
|
|
|
refreshChange() {
|
|
|
this.onLoad(this.page, this.query)
|
|
@@ -413,7 +421,7 @@ export default {
|
|
|
this.page.currentPage = current || 1
|
|
|
this.page.pageSize = size || 10
|
|
|
} else {
|
|
|
- this.$message.error(response?.msg || '获取数据失败')
|
|
|
+ this.$message.error(response?.data?.message || '获取数据失败')
|
|
|
this.data = []
|
|
|
this.page.total = 0
|
|
|
}
|
|
@@ -439,7 +447,7 @@ export default {
|
|
|
if (response && response.data && response.data.code === 200) {
|
|
|
return response.data.data
|
|
|
} else {
|
|
|
- this.$message.error(response.data.msg || '获取详情失败')
|
|
|
+ this.$message.error(response.data.message || '获取详情失败')
|
|
|
return null
|
|
|
}
|
|
|
} catch (error) {
|