feat: 智聪记账管理,投资管理,新增期货行情。
This commit is contained in:
@@ -108,12 +108,31 @@
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<!-- 查询记录对话框 -->
|
||||
<el-dialog :title="titleSyn" v-model="openSyn" width="500px" append-to-body>
|
||||
<el-form ref="CreditQueryRecordAnalysisRef" :model="formSyn" :rules="dailyRules" label-width="100px">
|
||||
<el-form-item label="开始日期">
|
||||
<el-date-picker clearable v-model="formSyn.start_date" type="date" value-format="YYYY-MM-DD" placeholder="请选择开始日期"> </el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="结束日期">
|
||||
<el-date-picker clearable v-model="formSyn.end_date" type="date" value-format="YYYY-MM-DD" placeholder="请选择结束日期"> </el-date-picker>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button type="primary" icon="Search" @click="handleSynFuture">同步</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="FutureBaseInfor">
|
||||
import { listFutureBaseInfor, getFutureBaseInfor, delFutureBaseInfor, addFutureBaseInfor, updateFutureBaseInfor } from '@/api/invest/futureBaseInfor'
|
||||
import { listFutureStandardInfor, getFutureStandardInfor } from '@/api/invest/futureStandardInfor'
|
||||
import { synFuturesDailyHistory } from '@/api/invest/futuresDailyHistory'
|
||||
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
import { require } from '@/utils/require'
|
||||
const { proxy } = getCurrentInstance()
|
||||
@@ -131,14 +150,20 @@ const multiple = ref(true)
|
||||
const total = ref(0)
|
||||
const standardInforId = ref(null)
|
||||
const title = ref('')
|
||||
|
||||
const openSyn = ref(false)
|
||||
const titleSyn = ref('')
|
||||
|
||||
const operateList = ref([
|
||||
{ id: 'view', icon: 'View', title: '查看', hasPermi: ['invest:futureBaseInfor:query'] },
|
||||
{ id: 'edit', icon: 'Edit', title: '修改', hasPermi: ['invest:futureBaseInfor:edit'] },
|
||||
{ id: 'copy', icon: 'Link', title: '复制', hasPermi: ['health:futureBaseInfor:edit'] },
|
||||
{ id: 'syn', icon: 'Refresh', title: '同步历史行情', hasPermi: ['invest:stockBaseInfor:edit'] },
|
||||
{ id: 'delete', icon: 'Delete', title: '删除', hasPermi: ['invest:futureBaseInfor:remove'] }
|
||||
])
|
||||
const data = reactive({
|
||||
form: {},
|
||||
formSyn: {},
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
@@ -179,12 +204,15 @@ const handleOperate = (operate, row) => {
|
||||
case 'copy':
|
||||
handleCopy(row)
|
||||
break
|
||||
case 'syn':
|
||||
handleSyn(row)
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
const { queryParams, queryStandardParams, form, rules } = toRefs(data)
|
||||
const { queryParams, queryStandardParams, form, formSyn, rules } = toRefs(data)
|
||||
|
||||
const handleStandardChange = (standardId) => {
|
||||
standardInforId.value = standardId
|
||||
@@ -319,6 +347,28 @@ function handleCopy(row) {
|
||||
})
|
||||
}
|
||||
|
||||
/** 同步按钮操作 */
|
||||
function handleSyn(row) {
|
||||
formSyn.value.ts_code = row.tsCode
|
||||
formSyn.value.ts_id = row.id
|
||||
openSyn.value = true
|
||||
titleSyn.value = '同步-' + row.name + '-' + row.code + '-日行情历史数据'
|
||||
}
|
||||
/** 查询记录统计按钮操作 */
|
||||
function handleSynFuture() {
|
||||
if (formSyn.value.start_date == undefined) {
|
||||
proxy.$modal.msgError('开始日期必须填写')
|
||||
return
|
||||
}
|
||||
if (formSyn.value.end_date == undefined) {
|
||||
proxy.$modal.msgError('结束日期必须填写')
|
||||
return
|
||||
}
|
||||
synFuturesDailyHistory(formSyn.value).then((response) => {
|
||||
proxy.$modal.msgSuccess('同步成功')
|
||||
})
|
||||
}
|
||||
|
||||
/** 提交按钮 */
|
||||
function submitForm() {
|
||||
proxy.$refs.futureBaseInforRef.validate((valid) => {
|
||||
|
||||
Reference in New Issue
Block a user