|
@@ -15,11 +15,11 @@
|
|
|
<el-button type="primary" @click="showDialog(true)">默认刷新时间</el-button>
|
|
|
</div>
|
|
|
|
|
|
- <el-input placeholder="指标ID/指标名称" prefix-icon="el-icon-search"></el-input>
|
|
|
+ <el-input placeholder="指标ID/指标名称" prefix-icon="el-icon-search" v-model="selectOption.keyWord" v-if="![34,11].includes(Source)"></el-input>
|
|
|
|
|
|
</div>
|
|
|
<div class="table-box" v-if="hasSelectOption">
|
|
|
- <div class="table-select">
|
|
|
+ <div class="table-select" v-loading="selectOptionLoading">
|
|
|
<div class="select-list">
|
|
|
<el-select placeholder="终端编码" no-match-text="请选择完整数据源"
|
|
|
v-model="selectOption.terminalCode">
|
|
@@ -57,12 +57,13 @@
|
|
|
</el-select>
|
|
|
<el-select placeholder="刷新状态" v-model="selectOption.state">
|
|
|
<el-option label="启用刷新" :value="1"/>
|
|
|
- <el-option label="禁用刷新" :value="2"/>
|
|
|
+ <el-option label="暂停刷新" :value="2"/>
|
|
|
</el-select>
|
|
|
</div>
|
|
|
<div class="select-other">
|
|
|
<el-checkbox :indeterminate="isIndeterminate" v-model="isCheckAll">列表全选</el-checkbox>
|
|
|
<el-button type="primary" @click="showDialog(false)">设置刷新时间</el-button>
|
|
|
+ <el-button type="primary" @click="isSetStateDialogShow=true">设置刷新状态</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
<el-table :data="tableData" border>
|
|
@@ -98,7 +99,7 @@
|
|
|
v-dialogDrag
|
|
|
center
|
|
|
>
|
|
|
- <div class="dialog-container">
|
|
|
+ <div class="dialog-container" v-loading="defaultDialogLoading">
|
|
|
<!-- 默认刷新时间设置数据频度 -->
|
|
|
<div class="default-box" v-if="isDefault">
|
|
|
<label style="display: block;width:88px;text-align:right;padding-right: 12px;">数据频度</label>
|
|
@@ -110,7 +111,10 @@
|
|
|
</div>
|
|
|
<!-- 刷新配置 -->
|
|
|
<div class="refresh-box">
|
|
|
- <RefreshConfig></RefreshConfig>
|
|
|
+ <RefreshConfig
|
|
|
+ :isDefault="isDefault"
|
|
|
+ :defaultForm="defaultForm"
|
|
|
+ ></RefreshConfig>
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
@@ -120,6 +124,28 @@
|
|
|
<el-button type="primary">确定</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+ <!-- 设置刷新状态 -->
|
|
|
+ <el-dialog custom-class="refresh-setting-dialog"
|
|
|
+ title="设置刷新状态"
|
|
|
+ :visible.sync="isSetStateDialogShow"
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ :modal-append-to-body="false"
|
|
|
+ @close="isSetStateDialogShow=false"
|
|
|
+ width="578px"
|
|
|
+ top="5vh"
|
|
|
+ v-dialogDrag
|
|
|
+ center
|
|
|
+ >
|
|
|
+ <div class="dialog-container" style="text-align: center;margin:60px 0;">
|
|
|
+ <el-radio label="暂停刷新" v-model="isState"></el-radio>
|
|
|
+ <el-radio label="启用刷新" v-model="isState"></el-radio>
|
|
|
+ </div>
|
|
|
+ <!-- 弹窗按钮 -->
|
|
|
+ <div class="dialog-btn">
|
|
|
+ <el-button type="primary" plain>取消</el-button>
|
|
|
+ <el-button type="primary">确定</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -145,9 +171,11 @@ export default {
|
|
|
user:'',
|
|
|
classify:'',
|
|
|
state:'',
|
|
|
- terminalCode:''
|
|
|
+ terminalCode:'',
|
|
|
+ keyWord:''
|
|
|
},
|
|
|
hasSelectOption:false,
|
|
|
+ selectOptionLoading:false,
|
|
|
|
|
|
columns: [
|
|
|
{key: 'code',label: '指标编码'},
|
|
@@ -160,8 +188,15 @@ export default {
|
|
|
{key: 'statue',label: '刷新状态'}
|
|
|
],
|
|
|
tableData: [{ code: 'aaa' }],
|
|
|
- isSetTimeDialogShow: false,
|
|
|
- defaultFrequency:'日度',
|
|
|
+
|
|
|
+ isSetTimeDialogShow: false,//设置刷新时间弹窗
|
|
|
+ defaultDialogLoading:false,//可能需要获取默认设置,增加loading
|
|
|
+ isDefault:false,//是否是默认刷新时间
|
|
|
+ defaultForm:{},//默认刷新时间的配置
|
|
|
+ defaultFrequency:'日度',//默认刷新时间的频率
|
|
|
+
|
|
|
+ isSetStateDialogShow:false,//设置刷新状态弹窗
|
|
|
+ isState:'',//启用刷新or暂停刷新
|
|
|
//全部全选
|
|
|
isIndeterminate:false,
|
|
|
isCheckAll:false,
|
|
@@ -181,14 +216,17 @@ export default {
|
|
|
}
|
|
|
this.isDefault = isDefault
|
|
|
this.isSetTimeDialogShow = true
|
|
|
+ this.isDefault&&this.handleDefaultChange()
|
|
|
},
|
|
|
handleDefaultChange(){
|
|
|
//获取默认设置
|
|
|
+ this.defaultDialogLoading = true
|
|
|
dataRefreshInterface.getDefaultConfig({
|
|
|
Frequency:this.defaultFrequency,
|
|
|
Source:Number(this.Source),
|
|
|
SubSource:Number(this.SubSource)
|
|
|
}).then(res=>{
|
|
|
+ this.defaultDialogLoading = false
|
|
|
if(res.Ret!==200) return
|
|
|
|
|
|
})
|
|
@@ -220,18 +258,22 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
//获取终端编码列表
|
|
|
- getTerminalCodeList(){
|
|
|
+ async getTerminalCodeList(){
|
|
|
if(!this.Source) return
|
|
|
- dataRefreshInterface.getTerminalList({
|
|
|
+ const res = await dataRefreshInterface.getTerminalList({
|
|
|
Source:Number(this.Source)
|
|
|
- }).then(res=>{
|
|
|
- if(res.Ret!==200) return
|
|
|
- this.terminalCodeList = res.Data?res.Data.List||[]:[]
|
|
|
})
|
|
|
+ if(res.Ret!==200) return
|
|
|
+ this.terminalCodeList = res.Data?res.Data.List||[]:[]
|
|
|
},
|
|
|
//获取分类列表
|
|
|
- getClassifyList(){
|
|
|
-
|
|
|
+ async getClassifyList(){
|
|
|
+ if(!this.Source) return
|
|
|
+ const res = await dataRefreshInterface.getClassifyList({
|
|
|
+ Source:Number(this.Source)
|
|
|
+ })
|
|
|
+ if(res.Ret!==200) return
|
|
|
+ this.edbClassifyList = res.Data||[]
|
|
|
},
|
|
|
//获取用户列表
|
|
|
getUserList() {
|
|
@@ -242,14 +284,18 @@ export default {
|
|
|
this.userList = res.Data||[]
|
|
|
})
|
|
|
},
|
|
|
- getSelectOption(){
|
|
|
+ async getSelectOption(){
|
|
|
+ this.selectOptionLoading = true
|
|
|
//获取终端编码列表
|
|
|
+ await this.getClassifyList()
|
|
|
//获取分类列表
|
|
|
+ await this.getTerminalCodeList()
|
|
|
+ this.selectOptionLoading = false
|
|
|
},
|
|
|
//切换数据源时重置表格选项
|
|
|
resetSelect(){
|
|
|
-
|
|
|
this.terminalCodeList=[]
|
|
|
+ this.edbClassifyList = []
|
|
|
this.selectOption = {
|
|
|
frequency:'',
|
|
|
user:'',
|