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
| <script>
export default { data () { return { dataForm: { calValue: new Date(), checkValList: [], checkOptions: [] }, isIndeterminate: true, checkAll: false, infoForm: {}, activeName: 'first', tableHeight: 0, dataList: [], pageIndex: 1, pageSize: 50, totalPage: 0, dataListLoading: false, dataListSelections: [], dialogVisible: false } }, components: {}, activated () { this.$sysDic.otcEventRemindTypeEnumList.forEach(item => { this.dataForm.checkOptions.push(item.value) })
this.getDataList() }, watch: { 'dataForm.calValue': function () { this.getDataList() } }, methods: { calTableHeight () { this.tableHeight = window.innerHeight - this.$refs['tableData'].$el.offsetTop - 169 }, getDataList () { this.dataListLoading = true this.$http({ url: this.$http.adornUrl('xxx'), method: 'get', params: this.$http.adornParams({ 'checked': this.dataForm.checkValList.join(','), 'calValue': this.getDateStr(this.dataForm.calValue) }) }).then(({data}) => { if (data && data.code === 0) { this.dataList = data.list this.calTableHeight() } else { this.dataList = [] this.totalPage = 0 } this.dataListLoading = false }) }, handleClick (tab, event) { switch (tab.name) { case 'first': this.getDataList() break } }, dataHandler (data) { console.log(data.day) }, isDialog (data) { this.dialogVisible = false }, handleDialogClose () { }, handleCheckAllChange (val) { this.dataForm.checkValList = val ? this.dataForm.checkOptions : [] this.isIndeterminate = false }, handleChecked (val) { this.getDataList() let checkedCount = val.length this.checkAll = checkedCount === this.dataForm.checkValList.length this.isIndeterminate = checkedCount > 0 && checkedCount < this.checkValList.length } } } </script>
|