研发图纸文件管理系统-前端项目
longyvfengyun
2022-09-01 8d8d1831dee7dc7872599e9738c20e3e6186cda3
工作台内容修改
5个文件已修改
86 ■■■■ 已修改文件
src/layouts/AdminLayout.vue 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/workplace/WorkPlace.vue 46 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/workplace/myDraw/MyDraw.vue 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/workplace/totalCard.vue 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/store/modules/setting.js 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/layouts/AdminLayout.vue
@@ -84,10 +84,10 @@
    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
    },
@@ -106,14 +106,21 @@
          }
        }
      }
    },
    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>
src/pages/workplace/WorkPlace.vue
@@ -1,17 +1,17 @@
<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>
@@ -46,13 +46,41 @@
  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;
@@ -100,10 +128,14 @@
      }).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);
src/pages/workplace/myDraw/MyDraw.vue
@@ -7,6 +7,7 @@
          :loading="loading"
          title=""
          row-key="id"
          :scroll="{x: '100%', y}"
          @search="onSearch"
          @refresh="onRefresh"
          @reset="onReset"
@@ -123,6 +124,10 @@
      type: Boolean,
      default: false,
    },
    y: {
      type: Number,
      default: 400
    }
  },
  components: {
    SubmitForm,
@@ -170,6 +175,7 @@
          dataIndex: 'jobStatus',
          key: 'jobStatus',
          align: "center",
          width: 180,
          scopedSlots: { customRender: 'jobStatus' }
        },
        {
@@ -177,18 +183,21 @@
          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: '操作',
@@ -196,6 +205,7 @@
          key: 'operation',
          align: "center",
          fixed: 'right',
          width: 180,
          scopedSlots: { customRender: 'action' }
        },
      ],
@@ -247,6 +257,7 @@
        }
        this.total = rs.data.total;
        this.dataSource = data;
        this.$emit('resize');
      });
    },
    handleRemove(file) {
src/pages/workplace/totalCard.vue
@@ -1,5 +1,5 @@
<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>
@@ -40,15 +40,18 @@
</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;
src/store/modules/setting.js
@@ -21,7 +21,8 @@
    customTitles,
    ...config,
    ...localSetting,
    affixed: false
    affixed: false,
    minHeight: window.innerHeight - 64 - 122,
  },
  getters: {
    menuData(state, getters, rootState) {
@@ -52,6 +53,9 @@
    },
    affixed(state) {
      return state.affixed;
    },
    minHeight(state) {
      return state.minHeight;
    }
  },
  mutations: {
@@ -116,6 +120,9 @@
    },
    setAffixed(state, affixed) {
      state.affixed = affixed;
    },
    setMinHeight(state, minHeight) {
      state.minHeight = minHeight;
    }
  }
}