<template>
|
<div>
|
<a-modal
|
:visible="visible"
|
:width="1200"
|
:confirm-loading="confirmLoading"
|
@ok="handleOk"
|
:footer="null"
|
@cancel="handleCancel"
|
>
|
<a-spin :spinning="loading">
|
<weekly-list-compent :model='model' :loadingMore="false" :showLoadModel="false"
|
:zpDisabled='false'></weekly-list-compent>
|
</a-spin>
|
</a-modal>
|
</div>
|
</template>
|
|
<script>
|
import WeeklyListCompent from "@views/week/modules/WeeklyListCompent";
|
import {getAction} from "@api/manage";
|
|
export default {
|
name: "WeeklyDetailModal",
|
components: {WeeklyListCompent},
|
data() {
|
return {
|
ModalText: 'Content of the modal',
|
model: {
|
weekList: []
|
},
|
visible: false,
|
confirmLoading: false,
|
loading: false,
|
}
|
},
|
methods: {
|
showModal(params) {
|
this.visible = true;
|
this.model = {
|
weekList: []
|
}
|
this.queryWeeklyDetail(params)
|
},
|
handleOk(e) {
|
this.ModalText = 'The modal will be closed after two seconds';
|
this.confirmLoading = true;
|
setTimeout(() => {
|
this.visible = false;
|
this.confirmLoading = false;
|
}, 2000);
|
},
|
handleCancel(e) {
|
console.log('Clicked cancel button');
|
this.visible = false;
|
},
|
queryWeeklyDetail(params) {
|
this.loading = true;
|
getAction('/wek/record/queryWeeklyListByWeekNo', params).then((res) => {
|
this.loading = false;
|
if (res.success && res.result) {
|
this.model.weekList = res.result
|
this.model.weekLis = this.model.weekList.map(item => {
|
item.wekEvaluate.showEvaluate = false
|
item.showDetail = false
|
return item
|
})
|
|
} else {
|
this.$message.warning(res.message)
|
}
|
this.loadingMore = false;
|
this.$nextTick(() => {
|
window.dispatchEvent(new Event('resize'));
|
});
|
})
|
},
|
|
}
|
}
|
</script>
|
|
<style lang="less" scoped>
|
|
/deep/ .ant-modal-header {
|
padding: 0;
|
height: 0;
|
}
|
|
/deep/ .ant-modal-body {
|
padding: 4px;
|
}
|
|
/deep/ .ant-list {
|
padding-bottom: 0 !important;
|
}
|
|
/deep/ .ant-list > div:nth-child(2) {
|
background-color: red;
|
height: 0 !important;
|
}
|
|
</style>
|