Commit 575e7461 authored by 李苏's avatar 李苏 💬

新增同步大数据平台检修信息

parent 1491b86a
......@@ -2,10 +2,11 @@
<BasePage :power='power' class="min_full" :config="config">
<template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
<Sync :app='ctx.basePage' v-if="ctx.basePage.showDialog" />
</template>
<template #toolbar="ctx">
<!-- 嵌入默认页面工具栏的插槽 ctx.pagePage来操作默认页面 -->
<!-- <el-button @click="demo(ctx.basePage)" size='mini' type="primary">示例按钮</el-button> -->
<el-button @click="sync(ctx.basePage)" size='mini' type="primary">同步大数据平台检修信息</el-button>
</template>
</BasePage>
......@@ -13,6 +14,7 @@
<script>
import Edit from './edit.vue'
import Sync from './sync.vue'
export default {
name: 'sbjxxx',
data() {
......@@ -155,6 +157,11 @@
},
methods: {
sync(ctx){
ctx.DialogTitle='同步大数据平台检修信息'
ctx.DialogWidth='30vw'
ctx.showDialog=true
},
/* 示例*/
getRow(row) {
......@@ -162,7 +169,7 @@
}
},
components: {
Edit,
Edit,Sync
}
......
<template>
<DefaultDialog :app='app'>
<div v-loading="loading" element-loading-text='正在同步请稍后!' slot="form" style="display: flex;padding: 30px;padding-bottom: 60px;" class="flex-center" >
<RelDatetimerangeV2 :form='form' start='startTime' end='endTime' />
</div>
<div slot="reFooter" class="refooter" >
<span slot="footer" class="dialog-footer" >
<el-button @click="app.showDialog=false">取 消</el-button>
<el-button type="primary" @click="save()">同 步</el-button>
</span>
</div>
</DefaultDialog>
</template>
<script>
export default {
props: {
app: {
type: Object,
default: ()=>{
return {}
}
}
},
async mounted() {
},
data() {
return {
loading:false,
form:{
startTime:new Date().getTime() - 7*24*60*60*1000,
endTime:new Date().getTime()
}
}
},
methods: {
save(){
if(this.form.startTime&&this.form.endTime){
this.$confirm('是否继续该操作?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(res=>{
if(this.form.startTime&&this.form.endTime){
this.loading=true
this.$post('jxgl/usbjx/sync/jx',this.form).then(res=>{
if(res.success){
this.$success('操作成功!')
this.loading=false
this.app.showDialog=false
}
})
}else{
this.$warning('请选择同步时间')
}
})
}else{
this.$warning('请选择同步时间')
}
}
}
}
</script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment