|
@@ -26,6 +26,21 @@
|
|
type="primary"
|
|
type="primary"
|
|
@click="$router.push({path: '/batchDelList' })"
|
|
@click="$router.push({path: '/batchDelList' })"
|
|
><!-- 批量删除 -->{{$t('ManualEntryPage.batch_del')}}</el-button>
|
|
><!-- 批量删除 -->{{$t('ManualEntryPage.batch_del')}}</el-button>
|
|
|
|
+ <el-select
|
|
|
|
+ @change="changeFrequency"
|
|
|
|
+ v-model="frequencySelect"
|
|
|
|
+ :placeholder="$t('Edb.InputHolderAll.select_fre')"
|
|
|
|
+ style="width: 240px;margin-left: 10px"
|
|
|
|
+ clearable
|
|
|
|
+ >
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in frequencyArr"
|
|
|
|
+ :key="item.label"
|
|
|
|
+ :label="item.label"
|
|
|
|
+ :value="item.value"
|
|
|
|
+ >
|
|
|
|
+ </el-option>
|
|
|
|
+ </el-select>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="right-wrap">
|
|
<div class="right-wrap">
|
|
@@ -133,7 +148,7 @@
|
|
>
|
|
>
|
|
<template slot-scope="{row}">
|
|
<template slot-scope="{row}">
|
|
<div>
|
|
<div>
|
|
- <span class="editsty" @click="handleEdb({item:row,type:'edit'})" v-if="permissionBtn.isShowBtn('dataSourcePermission','manualDataWrite_edit')">{{$t('Table.edit_btn')}}</span>
|
|
|
|
|
|
+ <span class="editsty" @click="handleEdb({item:row,type:'edit',from:1})" v-if="permissionBtn.isShowBtn('dataSourcePermission','manualDataWrite_edit')">{{$t('Table.edit_btn')}}</span>
|
|
|
|
|
|
<span v-if="row.IsJoinEdb===0&&permissionBtn.isShowBtn('dataSourcePermission','manualDataWrite_add')" class="editsty" @click="handleEdb({item:row,type:'addToBase'})"><!-- 加入指标库 -->{{$t('ManualEntryPage.add_tobase')}}</span>
|
|
<span v-if="row.IsJoinEdb===0&&permissionBtn.isShowBtn('dataSourcePermission','manualDataWrite_add')" class="editsty" @click="handleEdb({item:row,type:'addToBase'})"><!-- 加入指标库 -->{{$t('ManualEntryPage.add_tobase')}}</span>
|
|
|
|
|
|
@@ -202,6 +217,7 @@ import edbDetail from './components/edbDetail.vue'
|
|
import operateLogsDia from './components/operateLogsDia.vue';
|
|
import operateLogsDia from './components/operateLogsDia.vue';
|
|
import insertData from '../components/insertData.vue';
|
|
import insertData from '../components/insertData.vue';
|
|
import completeTargetDia from '../databaseComponents/completeTargetDia.vue';
|
|
import completeTargetDia from '../databaseComponents/completeTargetDia.vue';
|
|
|
|
+import { frequencySelectList } from '@/utils/defaultOptions';
|
|
export default {
|
|
export default {
|
|
components: {
|
|
components: {
|
|
mPage,
|
|
mPage,
|
|
@@ -232,6 +248,9 @@ export default {
|
|
}&StartDate=&EndDate=&Mobile=&${localStorage.getItem("auth")}`;
|
|
}&StartDate=&EndDate=&Mobile=&${localStorage.getItem("auth")}`;
|
|
return str.replace(/#/g, encodeURIComponent("#")).replace(/;/g, encodeURIComponent(";"));
|
|
return str.replace(/#/g, encodeURIComponent("#")).replace(/;/g, encodeURIComponent(";"));
|
|
},
|
|
},
|
|
|
|
+ frequencyArr(){
|
|
|
|
+ return frequencySelectList(['月度'])
|
|
|
|
+ }
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
search_txt(nval) {
|
|
search_txt(nval) {
|
|
@@ -245,6 +264,8 @@ export default {
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ tableSearch:{},
|
|
|
|
+ frequencySelect:'',
|
|
defaultProp: {
|
|
defaultProp: {
|
|
label: 'ClassifyName',
|
|
label: 'ClassifyName',
|
|
children: 'Child',
|
|
children: 'Child',
|
|
@@ -284,9 +305,43 @@ export default {
|
|
},
|
|
},
|
|
mounted(){
|
|
mounted(){
|
|
this.getClassify();
|
|
this.getClassify();
|
|
- this.getTableData()
|
|
|
|
|
|
+ if(sessionStorage.getItem('cacheDataList')){
|
|
|
|
+ this.cacheDataList()
|
|
|
|
+ }else{
|
|
|
|
+ this.getTableData()
|
|
|
|
+ }
|
|
},
|
|
},
|
|
methods:{
|
|
methods:{
|
|
|
|
+ // 缓存列表页面
|
|
|
|
+ cacheDataList(){
|
|
|
|
+ const cacheData=JSON.parse(sessionStorage.getItem('cacheDataList'))
|
|
|
|
+ console.log(cacheData)
|
|
|
|
+ if(cacheData.editType===1){
|
|
|
|
+ // 列表进入编辑
|
|
|
|
+ const dataArr=[
|
|
|
|
+ {key:'ClassifyId',value:'selectClassifyId'},
|
|
|
|
+ {key:'CurrentIndex',value:'pageNo'},
|
|
|
|
+ {key:'PageSize',value:'pageSize'},
|
|
|
|
+ {key:'Frequency',value:'frequencySelect'},
|
|
|
|
+ {key:'total',value:'total'}
|
|
|
|
+ ]
|
|
|
|
+ dataArr.forEach(el=>{
|
|
|
|
+ this[el.value]=cacheData.tableSearch[el.key]
|
|
|
|
+ })
|
|
|
|
+ this.getTableData()
|
|
|
|
+ }else{
|
|
|
|
+ // 详情进入编辑
|
|
|
|
+ this.selectedEdb = cacheData.id;
|
|
|
|
+ this.searchHandle(cacheData.id)
|
|
|
|
+ }
|
|
|
|
+ sessionStorage.removeItem('cacheDataList')
|
|
|
|
+ },
|
|
|
|
+ // 改变频度
|
|
|
|
+ changeFrequency(){
|
|
|
|
+ this.selectedEdb=''
|
|
|
|
+ this.pageNo = 1;
|
|
|
|
+ this.getTableData()
|
|
|
|
+ },
|
|
lookDetailHandle(row) {
|
|
lookDetailHandle(row) {
|
|
this.selectClassifyId = 0;
|
|
this.selectClassifyId = 0;
|
|
this.selectNode = '';
|
|
this.selectNode = '';
|
|
@@ -328,12 +383,13 @@ export default {
|
|
},
|
|
},
|
|
|
|
|
|
async getTableData() {
|
|
async getTableData() {
|
|
- const res = await dataInterence.getEdbListV2({
|
|
|
|
|
|
+ this.tableSearch={
|
|
ClassifyId: this.selectClassifyId,
|
|
ClassifyId: this.selectClassifyId,
|
|
CurrentIndex: this.pageNo,
|
|
CurrentIndex: this.pageNo,
|
|
- PageSize: this.pageSize
|
|
|
|
- })
|
|
|
|
-
|
|
|
|
|
|
+ PageSize: this.pageSize,
|
|
|
|
+ Frequency:this.frequencySelect
|
|
|
|
+ }
|
|
|
|
+ const res = await dataInterence.getEdbListV2(this.tableSearch)
|
|
if(res.Ret !==200) return
|
|
if(res.Ret !==200) return
|
|
this.tableData = res.Data.List || [];
|
|
this.tableData = res.Data.List || [];
|
|
this.total = res.Data.Paging.Totals;
|
|
this.total = res.Data.Paging.Totals;
|
|
@@ -396,7 +452,7 @@ export default {
|
|
},
|
|
},
|
|
|
|
|
|
/* 操作 */
|
|
/* 操作 */
|
|
- handleEdb({item,type}) {
|
|
|
|
|
|
+ handleEdb({item,type,from}) {
|
|
const typeMap = {
|
|
const typeMap = {
|
|
'edit': this.handleEditEdb,
|
|
'edit': this.handleEditEdb,
|
|
'addToBase': this.handleAddToBase,
|
|
'addToBase': this.handleAddToBase,
|
|
@@ -404,14 +460,20 @@ export default {
|
|
'del': this.handleDelEdb
|
|
'del': this.handleDelEdb
|
|
}
|
|
}
|
|
|
|
|
|
- typeMap[type]&&typeMap[type](item)
|
|
|
|
|
|
+ typeMap[type]&&typeMap[type](item,from)
|
|
},
|
|
},
|
|
|
|
|
|
- handleEditEdb(item) {
|
|
|
|
|
|
+ handleEditEdb(item,from) {
|
|
|
|
+ let cacheData={
|
|
|
|
+ editType:from, // 1-列表编辑 2-详情编辑
|
|
|
|
+ id:item.TradeCode,
|
|
|
|
+ tableSearch:{...this.tableSearch,total:this.total}
|
|
|
|
+ }
|
|
|
|
+ sessionStorage.setItem('cacheDataList',JSON.stringify(cacheData))
|
|
this.$router.push({
|
|
this.$router.push({
|
|
path: '/dataEdit',
|
|
path: '/dataEdit',
|
|
query: {
|
|
query: {
|
|
- id: item.TradeCode
|
|
|
|
|
|
+ id: item.TradeCode,
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|