|
|
|
|
@ -46,6 +46,7 @@
|
|
|
|
|
<el-form-item>
|
|
|
|
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="queryDailyTrade">搜索</el-button>
|
|
|
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetDailyTradeQuery">重置</el-button>
|
|
|
|
|
<el-button type="success" icon="el-icon-s-data" size="mini" @click="handleAnalysis">分析</el-button>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
|
|
|
|
|
@ -437,6 +438,29 @@ export default {
|
|
|
|
|
this.getDailyTradeList()
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/** 分析股票数据 */
|
|
|
|
|
handleAnalysis() {
|
|
|
|
|
if (!this.dailyTradeQuery.tradeDate) {
|
|
|
|
|
this.$message.warning('请先选择交易日期')
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
this.$confirm('确定要对所选日期的数据进行分析吗?', '提示', {
|
|
|
|
|
confirmButtonText: '确定',
|
|
|
|
|
cancelButtonText: '取消',
|
|
|
|
|
type: 'warning'
|
|
|
|
|
}).then(() => {
|
|
|
|
|
stockdataApi.analysis({ tradeDate: this.dailyTradeQuery.tradeDate }).then(response => {
|
|
|
|
|
this.$message.success(response.msg || '分析完成')
|
|
|
|
|
// 分析完成后刷新数据列表
|
|
|
|
|
this.getDailyTradeList()
|
|
|
|
|
}).catch(error => {
|
|
|
|
|
this.$message.error('分析失败:' + (error.msg || error.message || '未知错误'))
|
|
|
|
|
})
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
// 取消操作,不做处理
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/** 重置每日交易数据查询 */
|
|
|
|
|
resetDailyTradeQuery() {
|
|
|
|
|
this.$refs.dailyTradeForm.resetFields()
|
|
|
|
|
|