Browse Source

系统管理 弹框样式统一

master
x_ying 3 years ago
parent
commit
09bc3b32d9
  1. 48
      src/views/system/log/errorLog.vue
  2. 50
      src/views/system/log/index.vue
  3. 5
      src/views/system/timing/index.vue

48
src/views/system/log/errorLog.vue

@ -10,7 +10,7 @@
icon="el-icon-delete" icon="el-icon-delete"
size="mini" size="mini"
:loading="crud.delAllLoading" :loading="crud.delAllLoading"
@click="confirmDelAll()"
@click="delVisible=true"
> >
清空 清空
</el-button> </el-button>
@ -50,6 +50,17 @@
</el-dialog> </el-dialog>
<!--分页组件--> <!--分页组件-->
<pagination /> <pagination />
<!-- 清空 -->
<el-dialog :visible.sync="delVisible" title="确认清空">
<span class="dialog-right-top" />
<span class="dialog-left-bottom" />
<div class="setting-dialog">
<p class="delMsg" style="padding-top:20px">确认清空所有操作日志吗?</p>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="confirmDelAll">确定</el-button>
</div>
</div>
</el-dialog>
</div> </div>
</div> </div>
</template> </template>
@ -70,7 +81,7 @@ export default {
mixins: [presenter()], mixins: [presenter()],
data() { data() {
return { return {
errorInfo: '', dialog: false
errorInfo: '', dialog: false, delVisible: false
} }
}, },
created() { created() {
@ -90,23 +101,24 @@ export default {
}) })
}, },
confirmDelAll() { confirmDelAll() {
this.$confirm(`确认清空所有异常日志吗?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.crud.delAllLoading = true
delAllError().then(res => {
this.crud.delAllLoading = false
this.crud.dleChangePage(1)
this.crud.delSuccessNotify()
this.crud.toQuery()
}).catch(err => {
this.crud.delAllLoading = false
console.log(err.response.data.message)
})
}).catch(() => {
// this.$confirm(`?`, '', {
// confirmButtonText: '',
// cancelButtonText: '',
// type: 'warning'
// }).then(() => {
this.crud.delAllLoading = true
delAllError().then(res => {
this.crud.delAllLoading = false
this.crud.dleChangePage(1)
this.crud.delSuccessNotify()
this.crud.toQuery()
this.delVisible = false
}).catch(err => {
this.crud.delAllLoading = false
console.log(err.response.data.message)
}) })
// }).catch(() => {
// })
} }
} }
} }

50
src/views/system/log/index.vue

@ -9,7 +9,7 @@
icon="el-icon-delete" icon="el-icon-delete"
size="mini" size="mini"
:loading="crud.delAllLoading" :loading="crud.delAllLoading"
@click="confirmDelAll()"
@click="delVisible = true"
> >
清空 清空
</el-button> </el-button>
@ -48,6 +48,17 @@
</el-table> </el-table>
<!--分页组件--> <!--分页组件-->
<pagination /> <pagination />
<!-- 清空 -->
<el-dialog :visible.sync="delVisible" title="确认清空">
<span class="dialog-right-top" />
<span class="dialog-left-bottom" />
<div class="setting-dialog">
<p class="delMsg">确认清空所有操作日志吗?</p>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="confirmDelAll">确定</el-button>
</div>
</div>
</el-dialog>
</div> </div>
</div> </div>
@ -67,6 +78,11 @@ export default {
return CRUD({ title: '日志', url: 'api/logs' }) return CRUD({ title: '日志', url: 'api/logs' })
}, },
mixins: [presenter()], mixins: [presenter()],
data() {
return {
delVisible: false
}
},
created() { created() {
this.crud.optShow = { this.crud.optShow = {
add: false, add: false,
@ -77,23 +93,23 @@ export default {
}, },
methods: { methods: {
confirmDelAll() { confirmDelAll() {
this.$confirm(`确认清空所有操作日志吗?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.crud.delAllLoading = true
delAllInfo().then(res => {
this.crud.delAllLoading = false
this.crud.dleChangePage(1)
this.crud.delSuccessNotify()
this.crud.toQuery()
}).catch(err => {
this.crud.delAllLoading = false
console.log(err.response.data.message)
})
}).catch(() => {
// this.$confirm(`?`, '', {
// confirmButtonText: '',
// cancelButtonText: '',
// type: 'warning'
// }).then(() => {
this.crud.delAllLoading = true
delAllInfo().then(res => {
this.crud.delAllLoading = false
this.crud.dleChangePage(1)
this.crud.delSuccessNotify()
this.crud.toQuery()
this.delVisible = false
}).catch(err => {
this.crud.delAllLoading = false
console.log(err.response.data.message)
}) })
// })
} }
} }
} }

5
src/views/system/timing/index.vue

@ -27,7 +27,7 @@
</div> </div>
</el-dialog> --> </el-dialog> -->
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" append-to-body width="730px">
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" append-to-body>
<span class="dialog-right-top" /> <span class="dialog-right-top" />
<span class="dialog-left-bottom" /> <span class="dialog-left-bottom" />
<div class="setting-dialog"> <div class="setting-dialog">
@ -237,6 +237,9 @@ export default {
.crud-opts{ .crud-opts{
display: flex; display: flex;
} }
::v-deep .el-dialog{
width: 730px;
}
::v-deep .el-dialog .el-dialog__header .el-dialog__close::before{ ::v-deep .el-dialog .el-dialog__header .el-dialog__close::before{
position: absolute; position: absolute;
right: -47px; right: -47px;

Loading…
Cancel
Save