zhuguifei
2025-04-28 442928123f63ee497d766f9a7a14f0a6ee067e25
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<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>