|
|
|
@ -12,13 +12,13 @@
|
|
|
|
</el-button>
|
|
|
|
</el-button>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="8">
|
|
|
|
<el-col :span="8">
|
|
|
|
<el-button type="success" icon="el-icon-upload2" @click="handleImport('stockBasic')">
|
|
|
|
<el-button type="warning" icon="el-icon-upload2" @click="handleImport('stockDailyTrade')">
|
|
|
|
导入个股基础信息
|
|
|
|
导入每日交易数据
|
|
|
|
</el-button>
|
|
|
|
</el-button>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="8">
|
|
|
|
<el-col :span="8">
|
|
|
|
<el-button type="warning" icon="el-icon-upload2" @click="handleImport('stockDailyTrade')">
|
|
|
|
<el-button type="success" icon="el-icon-upload2" @click="handleImport('stockHighLow')">
|
|
|
|
导入每日交易数据
|
|
|
|
导入新高新低数据
|
|
|
|
</el-button>
|
|
|
|
</el-button>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
</el-row>
|
|
|
|
@ -181,6 +181,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
<pagination v-show="industryIndexTotal > 0" :total="industryIndexTotal" :page.sync="industryIndexQuery.pageNum" :limit.sync="industryIndexQuery.pageSize" @pagination="getIndustryIndexList" />
|
|
|
|
<pagination v-show="industryIndexTotal > 0" :total="industryIndexTotal" :page.sync="industryIndexQuery.pageNum" :limit.sync="industryIndexQuery.pageSize" @pagination="getIndustryIndexList" />
|
|
|
|
</el-tab-pane>
|
|
|
|
</el-tab-pane>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 新高新低数据 Tab -->
|
|
|
|
|
|
|
|
<el-tab-pane label="新高新低数据" name="stockHighLow">
|
|
|
|
|
|
|
|
<el-form :model="stockHighLowQuery" ref="stockHighLowForm" size="small" :inline="true" label-width="80px">
|
|
|
|
|
|
|
|
<el-form-item label="证券代码" prop="stockCode">
|
|
|
|
|
|
|
|
<el-input v-model="stockHighLowQuery.stockCode" placeholder="请输入证券代码" clearable @keyup.enter.native="queryStockHighLow" />
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item label="证券名称" prop="stockName">
|
|
|
|
|
|
|
|
<el-input v-model="stockHighLowQuery.stockName" placeholder="请输入证券名称" clearable @keyup.enter.native="queryStockHighLow" />
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item label="交易日期" prop="tradeDate">
|
|
|
|
|
|
|
|
<el-date-picker v-model="stockHighLowQuery.tradeDate" type="date" value-format="yyyy-MM-dd" placeholder="选择交易日期" clearable />
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item label="创新高" prop="isNewHigh">
|
|
|
|
|
|
|
|
<el-select v-model="stockHighLowQuery.isNewHigh" placeholder="请选择" clearable>
|
|
|
|
|
|
|
|
<el-option label="是" :value="1" />
|
|
|
|
|
|
|
|
<el-option label="否" :value="0" />
|
|
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item>
|
|
|
|
|
|
|
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="queryStockHighLow">搜索</el-button>
|
|
|
|
|
|
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetStockHighLowQuery">重置</el-button>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
</el-form>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-table v-loading="stockHighLowLoading" :data="stockHighLowList" border fit highlight-current-row>
|
|
|
|
|
|
|
|
<el-table-column label="证券代码" align="center" prop="stockCode" width="130" />
|
|
|
|
|
|
|
|
<el-table-column label="证券名称" align="center" prop="stockName" width="120" />
|
|
|
|
|
|
|
|
<el-table-column label="交易日期" align="center" prop="tradeDate" width="120" />
|
|
|
|
|
|
|
|
<el-table-column label="创新高" align="center" prop="isNewHigh" width="90">
|
|
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
|
|
<el-tag v-if="scope.row.isNewHigh === 1" type="success" size="mini">是</el-tag>
|
|
|
|
|
|
|
|
<el-tag v-else type="info" size="mini">否</el-tag>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
<el-table-column label="创新低" align="center" prop="isNewLow" width="90">
|
|
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
|
|
<el-tag v-if="scope.row.isNewLow === 1" type="warning" size="mini">是</el-tag>
|
|
|
|
|
|
|
|
<el-tag v-else type="info" size="mini">否</el-tag>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
<el-table-column label="创建时间" align="center" prop="createTime" width="160" />
|
|
|
|
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<pagination v-show="stockHighLowTotal > 0" :total="stockHighLowTotal" :page.sync="stockHighLowQuery.pageNum" :limit.sync="stockHighLowQuery.pageSize" @pagination="getStockHighLowList" />
|
|
|
|
|
|
|
|
</el-tab-pane>
|
|
|
|
</el-tabs>
|
|
|
|
</el-tabs>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 导入对话框 -->
|
|
|
|
<!-- 导入对话框 -->
|
|
|
|
@ -278,6 +324,19 @@ export default {
|
|
|
|
tradeDate: null
|
|
|
|
tradeDate: null
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ========================= 新高新低数据 =========================
|
|
|
|
|
|
|
|
stockHighLowLoading: false,
|
|
|
|
|
|
|
|
stockHighLowList: [],
|
|
|
|
|
|
|
|
stockHighLowTotal: 0,
|
|
|
|
|
|
|
|
stockHighLowQuery: {
|
|
|
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
|
|
|
stockCode: null,
|
|
|
|
|
|
|
|
stockName: null,
|
|
|
|
|
|
|
|
tradeDate: null,
|
|
|
|
|
|
|
|
isNewHigh: null
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
// ========================= 上传相关 =========================
|
|
|
|
// ========================= 上传相关 =========================
|
|
|
|
upload: {
|
|
|
|
upload: {
|
|
|
|
open: false,
|
|
|
|
open: false,
|
|
|
|
@ -301,7 +360,7 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
// ========================= 通用方法 =========================
|
|
|
|
// ========================= 通用方法 =========================
|
|
|
|
|
|
|
|
|
|
|
|
/** 获取行业选项列表 */
|
|
|
|
/** 获取行业选项列表 */
|
|
|
|
getIndustryOptions() {
|
|
|
|
getIndustryOptions() {
|
|
|
|
stockdataApi.getDistinctIndustryIndexList().then(response => {
|
|
|
|
stockdataApi.getDistinctIndustryIndexList().then(response => {
|
|
|
|
@ -317,6 +376,8 @@ export default {
|
|
|
|
this.getStockBasicList()
|
|
|
|
this.getStockBasicList()
|
|
|
|
} else if (tab.name === 'industryIndex' && this.industryIndexList.length === 0) {
|
|
|
|
} else if (tab.name === 'industryIndex' && this.industryIndexList.length === 0) {
|
|
|
|
this.getIndustryIndexList()
|
|
|
|
this.getIndustryIndexList()
|
|
|
|
|
|
|
|
} else if (tab.name === 'stockHighLow' && this.stockHighLowList.length === 0) {
|
|
|
|
|
|
|
|
this.getStockHighLowList()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
@ -409,6 +470,40 @@ export default {
|
|
|
|
this.getStockBasicList()
|
|
|
|
this.getStockBasicList()
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ========================= 新高新低数据方法 =========================
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 获取新高新低数据列表 */
|
|
|
|
|
|
|
|
getStockHighLowList() {
|
|
|
|
|
|
|
|
this.stockHighLowLoading = true
|
|
|
|
|
|
|
|
stockdataApi.listStockHighLowStatusWithBasic(this.stockHighLowQuery).then(response => {
|
|
|
|
|
|
|
|
this.stockHighLowList = response.rows
|
|
|
|
|
|
|
|
this.stockHighLowTotal = response.total
|
|
|
|
|
|
|
|
this.stockHighLowLoading = false
|
|
|
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
|
|
|
this.stockHighLowLoading = false
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 查询新高新低数据 */
|
|
|
|
|
|
|
|
queryStockHighLow() {
|
|
|
|
|
|
|
|
this.stockHighLowQuery.pageNum = 1
|
|
|
|
|
|
|
|
this.getStockHighLowList()
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 重置新高新低数据查询 */
|
|
|
|
|
|
|
|
resetStockHighLowQuery() {
|
|
|
|
|
|
|
|
this.$refs.stockHighLowForm.resetFields()
|
|
|
|
|
|
|
|
this.stockHighLowQuery = {
|
|
|
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
|
|
|
stockCode: null,
|
|
|
|
|
|
|
|
stockName: null,
|
|
|
|
|
|
|
|
tradeDate: null,
|
|
|
|
|
|
|
|
isNewHigh: null
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
this.getStockHighLowList()
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
// ========================= 行业指数数据方法 =========================
|
|
|
|
// ========================= 行业指数数据方法 =========================
|
|
|
|
|
|
|
|
|
|
|
|
/** 获取行业指数数据列表 */
|
|
|
|
/** 获取行业指数数据列表 */
|
|
|
|
@ -451,7 +546,7 @@ export default {
|
|
|
|
this.upload.updateSupport = false
|
|
|
|
this.upload.updateSupport = false
|
|
|
|
this.upload.tradeDate = null
|
|
|
|
this.upload.tradeDate = null
|
|
|
|
this.fileList = []
|
|
|
|
this.fileList = []
|
|
|
|
|
|
|
|
|
|
|
|
if (type === 'industryIndex') {
|
|
|
|
if (type === 'industryIndex') {
|
|
|
|
this.upload.title = '导入行业指数数据'
|
|
|
|
this.upload.title = '导入行业指数数据'
|
|
|
|
this.upload.url = IMPORT_URLS.industryIndex
|
|
|
|
this.upload.url = IMPORT_URLS.industryIndex
|
|
|
|
@ -461,6 +556,9 @@ export default {
|
|
|
|
} else if (type === 'stockDailyTrade') {
|
|
|
|
} else if (type === 'stockDailyTrade') {
|
|
|
|
this.upload.title = '导入每日交易数据'
|
|
|
|
this.upload.title = '导入每日交易数据'
|
|
|
|
this.upload.url = IMPORT_URLS.stockDailyTrade
|
|
|
|
this.upload.url = IMPORT_URLS.stockDailyTrade
|
|
|
|
|
|
|
|
} else if (type === 'stockHighLow') {
|
|
|
|
|
|
|
|
this.upload.title = '导入新高新低数据'
|
|
|
|
|
|
|
|
this.upload.url = IMPORT_URLS.stockHighLow
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 清除已选文件
|
|
|
|
// 清除已选文件
|
|
|
|
@ -482,8 +580,8 @@ export default {
|
|
|
|
this.$message.error('请选择要上传的文件')
|
|
|
|
this.$message.error('请选择要上传的文件')
|
|
|
|
return
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (this.upload.type !== 'stockBasic' && !this.upload.tradeDate) {
|
|
|
|
if (['industryIndex', 'stockDailyTrade', 'stockHighLow'].includes(this.upload.type) && !this.upload.tradeDate) {
|
|
|
|
this.$message.error('请选择交易日期')
|
|
|
|
this.$message.error('请选择交易日期')
|
|
|
|
return
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -533,6 +631,8 @@ export default {
|
|
|
|
this.getStockBasicList()
|
|
|
|
this.getStockBasicList()
|
|
|
|
} else if (this.upload.type === 'stockDailyTrade') {
|
|
|
|
} else if (this.upload.type === 'stockDailyTrade') {
|
|
|
|
this.getDailyTradeList()
|
|
|
|
this.getDailyTradeList()
|
|
|
|
|
|
|
|
} else if (this.upload.type === 'stockHighLow') {
|
|
|
|
|
|
|
|
this.getStockHighLowList()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|