|
@@ -60,8 +60,8 @@
|
|
/>
|
|
/>
|
|
</el-select>
|
|
</el-select>
|
|
<el-select placeholder="刷新状态" v-model="selectOption.state" @change="selectOptionChange('state')">
|
|
<el-select placeholder="刷新状态" v-model="selectOption.state" @change="selectOptionChange('state')">
|
|
- <el-option label="启用刷新" :value="1"/>
|
|
|
|
- <el-option label="暂停刷新" :value="2"/>
|
|
|
|
|
|
+ <el-option label="启用刷新" value="启用"/>
|
|
|
|
+ <el-option label="暂停刷新" value="暂停"/>
|
|
</el-select>
|
|
</el-select>
|
|
</div>
|
|
</div>
|
|
<div class="select-other">
|
|
<div class="select-other">
|
|
@@ -98,7 +98,12 @@
|
|
</template> -->
|
|
</template> -->
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
- <el-pagination></el-pagination>
|
|
|
|
|
|
+ <el-pagination
|
|
|
|
+ :current-page="currentPage"
|
|
|
|
+ :page-size="pageSize"
|
|
|
|
+ :total="total"
|
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
|
+ />
|
|
</div>
|
|
</div>
|
|
<!-- 默认刷新时间,设置刷新时间 -->
|
|
<!-- 默认刷新时间,设置刷新时间 -->
|
|
<el-dialog custom-class="refresh-setting-dialog"
|
|
<el-dialog custom-class="refresh-setting-dialog"
|
|
@@ -180,28 +185,31 @@ export default {
|
|
userList:[],
|
|
userList:[],
|
|
|
|
|
|
selectOption:{
|
|
selectOption:{
|
|
- frequency:'',
|
|
|
|
- user:'',
|
|
|
|
- classify:'',
|
|
|
|
- state:'',
|
|
|
|
- terminalCode:'',
|
|
|
|
- keyWord:''
|
|
|
|
|
|
+ frequency:'',//频度
|
|
|
|
+ user:'',//创建人
|
|
|
|
+ classify:'',//分类
|
|
|
|
+ state:'',//状态
|
|
|
|
+ terminalCode:'',//终端编码
|
|
|
|
+ keyWord:''//关键字
|
|
},
|
|
},
|
|
hasSelectOption:false,
|
|
hasSelectOption:false,
|
|
selectOptionLoading:false,
|
|
selectOptionLoading:false,
|
|
|
|
|
|
columns: [
|
|
columns: [
|
|
- {key: 'code',label: '指标编码'},
|
|
|
|
- {key: 'name',label: '指标全称'},
|
|
|
|
- {key: 'newTime',label: '最新日期'},
|
|
|
|
- {key: 'newValue',label: '最新值'},
|
|
|
|
- {key: 'creater',label: '创建人'},
|
|
|
|
- {key: 'times',label: '频度'},
|
|
|
|
- {key: 'time',label: '刷新时间'},
|
|
|
|
- {key: 'statue',label: '刷新状态'}
|
|
|
|
|
|
+ {key: 'EdbInfoId',label: '指标编码'},
|
|
|
|
+ {key: 'IndexName',label: '指标全称'},
|
|
|
|
+ {key: 'EndDate',label: '最新日期'},
|
|
|
|
+ {key: 'EndValue',label: '最新值'},
|
|
|
|
+ {key: 'SysUserRealName',label: '创建人'},
|
|
|
|
+ {key: 'Frequency',label: '频度'},
|
|
|
|
+ {key: 'RefreshTime',label: '刷新时间'},
|
|
|
|
+ {key: 'IsStop',label: '刷新状态'}
|
|
],
|
|
],
|
|
- tableData: [{ code: 'aaa' },{code:'bbb'},{code:'ccc'}],
|
|
|
|
|
|
+ tableData: [],
|
|
|
|
+ tableDataIds:[],
|
|
pageSize:10,
|
|
pageSize:10,
|
|
|
|
+ currentPage:1,
|
|
|
|
+ total:12,
|
|
|
|
|
|
isSetTimeDialogShow: false,//设置刷新时间弹窗
|
|
isSetTimeDialogShow: false,//设置刷新时间弹窗
|
|
defaultDialogLoading:false,//可能需要获取默认设置,增加loading
|
|
defaultDialogLoading:false,//可能需要获取默认设置,增加loading
|
|
@@ -266,11 +274,13 @@ export default {
|
|
//如果没有二级数据源,则请求表格筛选项数据;钢联化工,SMM没有筛选项数据
|
|
//如果没有二级数据源,则请求表格筛选项数据;钢联化工,SMM没有筛选项数据
|
|
if(!this.SubSourceList.length&&this.hasSelectOption){
|
|
if(!this.SubSourceList.length&&this.hasSelectOption){
|
|
this.getSelectOption()
|
|
this.getSelectOption()
|
|
|
|
+ this.getTableData()
|
|
}
|
|
}
|
|
},
|
|
},
|
|
handleSubSourceChange(){
|
|
handleSubSourceChange(){
|
|
if(this.SubSource){
|
|
if(this.SubSource){
|
|
this.getSelectOption()
|
|
this.getSelectOption()
|
|
|
|
+ this.getTableData()
|
|
}
|
|
}
|
|
},
|
|
},
|
|
//获取终端编码列表
|
|
//获取终端编码列表
|
|
@@ -326,11 +336,38 @@ export default {
|
|
console.log('触发了',type)
|
|
console.log('触发了',type)
|
|
this.getTableData('optionChange')
|
|
this.getTableData('optionChange')
|
|
},
|
|
},
|
|
- getTableData(type){
|
|
|
|
|
|
+ handleCurrentChange(page){
|
|
|
|
+ this.currentPage = page
|
|
|
|
+ this.getTableData()
|
|
|
|
+ },
|
|
|
|
+ async getTableData(type){
|
|
|
|
+ const {frequency,user,classify,state,terminalCode,keyWord} = this.selectOption
|
|
|
|
+ const res = await dataRefreshInterface.getEdbTableList({
|
|
|
|
+ Source:Number(this.Source),
|
|
|
|
+ SubSource:Number(this.SubSource),
|
|
|
|
+ ClassifyId:classify,
|
|
|
|
+ TerminalCode:terminalCode,
|
|
|
|
+ SysUserId:user,
|
|
|
|
+ Frequency:frequency,
|
|
|
|
+ Keyword:keyWord,
|
|
|
|
+ Status:state,
|
|
|
|
+ PageSize:Number(this.pageSize),
|
|
|
|
+ CurrentIndex:Number(this.currentPage)
|
|
|
|
+ })
|
|
|
|
+ if(res.Ret!==200) return
|
|
|
|
+ const {Paging,List} = res.Data||{}
|
|
|
|
+ this.tableData = List||[]
|
|
|
|
+ this.total = Paging.Totals||0
|
|
|
|
+ if(this.tableData.length>0){
|
|
|
|
+ this.tableDataIds = this.tableData.map(it => it.EdbInfoId)
|
|
|
|
+ }else{
|
|
|
|
+ this.tableDataIds = []
|
|
|
|
+ }
|
|
if(type==='optionChange'){
|
|
if(type==='optionChange'){
|
|
//如果是表格筛选项改变导致重新请求数据
|
|
//如果是表格筛选项改变导致重新请求数据
|
|
//数据获取完成后,列表全选,表格全选
|
|
//数据获取完成后,列表全选,表格全选
|
|
this.selectList = []
|
|
this.selectList = []
|
|
|
|
+ this.listCheckAllChange(true)
|
|
}else{
|
|
}else{
|
|
//若不是,数据获取完成后,查询列表全选的值
|
|
//若不是,数据获取完成后,查询列表全选的值
|
|
//若当页有数据在selectList内,则勾选/剔除
|
|
//若当页有数据在selectList内,则勾选/剔除
|
|
@@ -342,7 +379,7 @@ export default {
|
|
this.selectionReactCancel=true
|
|
this.selectionReactCancel=true
|
|
if(!this.isSelectAll){
|
|
if(!this.isSelectAll){
|
|
this.selectList.map(it =>{
|
|
this.selectList.map(it =>{
|
|
- let row = this.tableData.find(da => da.code==it)
|
|
|
|
|
|
+ let row = this.tableData.find(da => da.EdbInfoId==it)
|
|
if(row){
|
|
if(row){
|
|
setTimeout(()=>{
|
|
setTimeout(()=>{
|
|
this.$refs.edbDataRef.toggleRowSelection(row,true)
|
|
this.$refs.edbDataRef.toggleRowSelection(row,true)
|
|
@@ -350,9 +387,10 @@ export default {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}else{
|
|
}else{
|
|
- this.$refs.edbDataRef.toggleAllSelection()
|
|
|
|
|
|
+ this.$refs.edbDataRef && this.$refs.edbDataRef.clearSelection()
|
|
|
|
+ this.$refs.edbDataRef &&this.$refs.edbDataRef.toggleAllSelection()
|
|
this.selectList.map(it =>{
|
|
this.selectList.map(it =>{
|
|
- let row = this.tableData.find(da => da.code==it)
|
|
|
|
|
|
+ let row = this.tableData.find(da => da.EdbInfoId==it)
|
|
if(row){
|
|
if(row){
|
|
setTimeout(()=>{
|
|
setTimeout(()=>{
|
|
this.$refs.edbDataRef.toggleRowSelection(row,false)
|
|
this.$refs.edbDataRef.toggleRowSelection(row,false)
|
|
@@ -399,7 +437,7 @@ export default {
|
|
selectHandle(selection,row){
|
|
selectHandle(selection,row){
|
|
if(this.selectionReactCancel) return
|
|
if(this.selectionReactCancel) return
|
|
let check = false;
|
|
let check = false;
|
|
- if(selection.some(it => it.code == row.code)){
|
|
|
|
|
|
+ if(selection.some(it => it.EdbInfoId == row.EdbInfoId)){
|
|
// 勾选
|
|
// 勾选
|
|
if(this.isSelectAll){
|
|
if(this.isSelectAll){
|
|
check=false
|
|
check=false
|
|
@@ -415,9 +453,9 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if(check){
|
|
if(check){
|
|
- this.selectList.push(row.code)
|
|
|
|
|
|
+ this.selectList.push(row.EdbInfoId)
|
|
}else{
|
|
}else{
|
|
- this.selectList=this.selectList.filter(it => it!=row.code)
|
|
|
|
|
|
+ this.selectList=this.selectList.filter(it => it!=row.EdbInfoId)
|
|
}
|
|
}
|
|
},
|
|
},
|
|
selectAllHandle(selection){
|
|
selectAllHandle(selection){
|