| | |
| | | sideMenuData() { |
| | | const {layout, menuData, subMenu} = this |
| | | return layout === 'mix' ? subMenu : menuData |
| | | } |
| | | }, |
| | | }, |
| | | methods: { |
| | | ...mapMutations('setting', ['correctPageMinHeight', 'setActivatedFirst']), |
| | | ...mapMutations('setting', ['correctPageMinHeight', 'setActivatedFirst', 'setMinHeight']), |
| | | toggleCollapse () { |
| | | this.collapsed = !this.collapsed |
| | | }, |
| | |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | resize() { |
| | | this.minHeight = window.innerHeight - 64 - 122; |
| | | this.setMinHeight(this.minHeight); |
| | | } |
| | | }, |
| | | created() { |
| | | this.correctPageMinHeight(this.minHeight - 24) |
| | | this.setActivated(this.$route) |
| | | this.resize(); |
| | | window.addEventListener('resize', this.resize); |
| | | }, |
| | | beforeDestroy() { |
| | | this.correctPageMinHeight(-this.minHeight + 24) |
| | | window.removeEventListener('resize', this.resize); |
| | | } |
| | | } |
| | | </script> |
| | |
| | | <template> |
| | | <div class="work-place"> |
| | | <a-row :gutter="18"> |
| | | <a-row :gutter="18" class="work-place-top"> |
| | | <a-col :span="item.span" v-for="(item, key) in totals" :key="'key'+key"> |
| | | <total-card :info="item" :type="item.type" :title="item.title" :num="item.value" @click="changeTotalCard"></total-card> |
| | | </a-col> |
| | | </a-row> |
| | | <div style="margin-top: 8px"> |
| | | <my-draw :is-show="'my'==cardName"></my-draw> |
| | | <not-approved :is-show="'approving'==cardName"></not-approved> |
| | | <rejected-list :is-show="'rejected'==cardName"></rejected-list> |
| | | <approved-list :is-show="'approved'==cardName"></approved-list> |
| | | <handling-list :is-show="'handling'==cardName"></handling-list> |
| | | <handled-list :is-show="'handled'==cardName"></handled-list> |
| | | <my-draw :is-show="'my'==cardName" :y="y" @resize="resize"></my-draw> |
| | | <not-approved :is-show="'approving'==cardName" :y="y" @resize="resize"></not-approved> |
| | | <rejected-list :is-show="'rejected'==cardName" :y="y" @resize="resize"></rejected-list> |
| | | <approved-list :is-show="'approved'==cardName" :y="y" @resize="resize"></approved-list> |
| | | <handling-list :is-show="'handling'==cardName" :y="y" @resize="resize"></handling-list> |
| | | <handled-list :is-show="'handled'==cardName" :y="y" @resize="resize"></handled-list> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | data() { |
| | | return { |
| | | loading: false, |
| | | update: -1, |
| | | y: 400, |
| | | drawUploadVisible: false, |
| | | cardName: "my", |
| | | totals: const_total.normal, |
| | | radio: 0, |
| | | } |
| | | }, |
| | | watch: { |
| | | update(n) { |
| | | if (-1 != n) { |
| | | const bar = document.querySelectorAll(".header-bar")[0].clientHeight; |
| | | const workPlaceTop = document.querySelectorAll(".work-place-top")[0].clientHeight; |
| | | this.y = this.minHeight-bar-workPlaceTop-56; |
| | | if(this.affixed) { |
| | | this.y = this.y+60; |
| | | } |
| | | } |
| | | }, |
| | | affixed() { |
| | | this.resize(); |
| | | }, |
| | | cardName() { |
| | | this.resize(); |
| | | }, |
| | | minHeight() { |
| | | this.resize(); |
| | | } |
| | | }, |
| | | methods: { |
| | | resize() { |
| | | setTimeout(() => { |
| | | this.update = Math.random(); |
| | | }, 200); |
| | | }, |
| | | onWSMessage(res) { |
| | | let rs = JSON.parse(res.data); |
| | | let data = rs.data; |
| | |
| | | }).catch(error => { |
| | | console.log(error); |
| | | }); |
| | | }, |
| | | activeFN() { |
| | | this.resize(); |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapGetters('account', ['roles', "roleList", "departmentList", "downloadFlag"]), |
| | | ...mapGetters("setting", ["affixed", "minHeight"]), |
| | | }, |
| | | mounted() { |
| | | let role = getItemByKey(this.roles[0].id, this.roleList); |
| | |
| | | :loading="loading" |
| | | title="" |
| | | row-key="id" |
| | | :scroll="{x: '100%', y}" |
| | | @search="onSearch" |
| | | @refresh="onRefresh" |
| | | @reset="onReset" |
| | |
| | | type: Boolean, |
| | | default: false, |
| | | }, |
| | | y: { |
| | | type: Number, |
| | | default: 400 |
| | | } |
| | | }, |
| | | components: { |
| | | SubmitForm, |
| | |
| | | dataIndex: 'jobStatus', |
| | | key: 'jobStatus', |
| | | align: "center", |
| | | width: 180, |
| | | scopedSlots: { customRender: 'jobStatus' } |
| | | }, |
| | | { |
| | |
| | | dataIndex: 'typeTxt', |
| | | key: 'typeTxt', |
| | | align: "center", |
| | | width: 180, |
| | | }, |
| | | { |
| | | title: '创建日期', |
| | | dataIndex: 'beginTime', |
| | | key: 'beginTime', |
| | | align: "center", |
| | | width: 180, |
| | | }, |
| | | { |
| | | title: '结束日期', |
| | | dataIndex: 'endTime', |
| | | key: 'endTime', |
| | | align: "center", |
| | | width: 180, |
| | | }, |
| | | { |
| | | title: '操作', |
| | |
| | | key: 'operation', |
| | | align: "center", |
| | | fixed: 'right', |
| | | width: 180, |
| | | scopedSlots: { customRender: 'action' } |
| | | }, |
| | | ], |
| | |
| | | } |
| | | this.total = rs.data.total; |
| | | this.dataSource = data; |
| | | this.$emit('resize'); |
| | | }); |
| | | }, |
| | | handleRemove(file) { |
| | |
| | | <template> |
| | | <a-card @click="handleClick"> |
| | | <a-card @click="handleClick" size="small"> |
| | | <div class="total-title">{{ title }}</div> |
| | | <div class="total-num" :class="type">{{ num }}</div> |
| | | </a-card> |
| | |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .ant-card-body { |
| | | padding: 8px; |
| | | } |
| | | .total-title { |
| | | font-size: 20px; |
| | | font-size: 18px; |
| | | font-weight: bold; |
| | | } |
| | | .total-num { |
| | | user-select: none; |
| | | text-align: center; |
| | | font-weight: bold; |
| | | font-size: 26px; |
| | | font-size: 24px; |
| | | } |
| | | .total-num:hover { |
| | | cursor: pointer; |
| | |
| | | customTitles, |
| | | ...config, |
| | | ...localSetting, |
| | | affixed: false |
| | | affixed: false, |
| | | minHeight: window.innerHeight - 64 - 122, |
| | | }, |
| | | getters: { |
| | | menuData(state, getters, rootState) { |
| | |
| | | }, |
| | | affixed(state) { |
| | | return state.affixed; |
| | | }, |
| | | minHeight(state) { |
| | | return state.minHeight; |
| | | } |
| | | }, |
| | | mutations: { |
| | |
| | | }, |
| | | setAffixed(state, affixed) { |
| | | state.affixed = affixed; |
| | | }, |
| | | setMinHeight(state, minHeight) { |
| | | state.minHeight = minHeight; |
| | | } |
| | | } |
| | | } |