研发图纸文件管理系统-前端项目
longyvfengyun
2024-01-02 bb89a0a6111a9c98d54411d41ec2e63575eea53f
内容修改
3个文件已修改
1个文件已添加
317 ■■■■ 已修改文件
src/main.js 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/components/TodayLog.vue 149 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/workplace/WorkPlace.vue 142 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router/config.js 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main.js
@@ -31,6 +31,27 @@
bootstrap({router, store, i18n, message: Vue.prototype.$message})
//格式化时间
Date.prototype.format = function (format) {
  var o = {
    "M+": this.getMonth() + 1, //month
    "d+": this.getDate(), //day
    "h+": this.getHours(), //hour
    "m+": this.getMinutes(), //minute
    "s+": this.getSeconds(), //second
    "q+": Math.floor((this.getMonth() + 3) / 3), //quarter
    "S": this.getMilliseconds() //millisecond
  };
  if (/(y+)/.test(format)) format = format.replace(RegExp.$1,
    (this.getFullYear() + "").substr(4 - RegExp.$1.length));
  for (var k in o)
    if (new RegExp("(" + k + ")").test(format))
      format = format.replace(RegExp.$1,
        RegExp.$1.length == 1 ? o[k] :
          ("00" + o[k]).substr(("" + o[k]).length));
  return format;
};
new Vue({
  router,
  store,
src/pages/components/TodayLog.vue
New file
@@ -0,0 +1,149 @@
<script>
import createWs from "@/assets/js/websocket";
const WSMixin = createWs("log");
export default {
    name: "TodayLog",
    mixins: [WSMixin],
    data() {
        return {
            list: []
        }
    },
    methods: {
        onWSMessage(res) {
            let rs = JSON.parse(res.data);
            let data = rs.data;
            this.list = data.map(item=>{
                return {
                    name: item.name,
                    oprateDay: new Date(item.oprateDay).format("hh:mm"),
                    oprateType: item.oprateType,
                    oprateMsg: item.oprateMsg,
                    operateTypeName: item.operateTypeName
                };
            });
        },
        goToLogsMore() {
            this.$router.push({
                path: "/system/logs"
            });
        }
    },
    mounted() {
    }
}
</script>
<template>
    <a-card class="a-flex-card" size="small" title="最新动态">
        <template #extra>
            <span class="href-text" @click="goToLogsMore">更多</span>
        </template>
        <div class="list-wrapper">
            <ul class="timeline timeline-tag-left">
                <li v-for="(item, key) in list" :key="'key'+key">
                    <div>
                        <span class="timeline-tag">{{ item.oprateDay }}</span>
                        <span class="timeline-text">
                            {{ item.name }}
                            <span class="label-action">{{ item.operateTypeName }}</span>
                            <span class="href-text" :title="item.oprateMsg">{{ item.oprateMsg }}</span>
                        </span>
                    </div>
                </li>
            </ul>
        </div>
    </a-card>
</template>
<style scoped>
.a-flex-card.ant-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
}
/deep/.ant-card-body {
    flex: 1;
    position: relative;
    overflow: hidden;
}
.list-wrapper {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow-y: auto;
}
.timeline-tag-left {
    padding-left: 50px;
}
.timeline>li {
    position: relative;
    list-style: none;
}
.timeline > li:before {
    left: -26px;
}
.timeline > li:before {
    position: absolute;
    display: block;
    top: 8px;
    left: -16px;
    z-index: 3;
    width: 7px;
    height: 7px;
    background-color: #c4c4c4;
    border: 1px solid #c4c4c4;
    content: ' ';
    border-radius: 50%;
}
.timeline > li > div:after {
    position: absolute;
    display: block;
    content: ' ';
    top: 11px;
    left: -27px;
    z-index: 3;
    width: 9px;
    height: 9px;
    background-color: #2e7fff;
    border-radius: 50%;
    opacity: 0;
}
.timeline-tag {
    position: absolute;
    top: 2px;
    left: -50px;
    font-size: 12px;
}
.timeline-text {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 24px;
    font-size: 14px;
}
.timeline>li+li:after {
    position: absolute;
    top: -8px;
    bottom: 10px;
    left: -13px;
    z-index: 1;
    display: block;
    content: ' ';
    border-left: 1px solid #eee;
}
.label-action {
    display: inline-block;
    padding: 0 2px 0 0;
}
.list-wrapper {
    height: 100%;
    overflow: auto;
}
.href-text {
    cursor: pointer;
    color: #13c2c2;
}
</style>
src/pages/workplace/WorkPlace.vue
@@ -1,59 +1,66 @@
<template>
  <div class="work-place">
    <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" :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>
      <feedback-list
        :is-show="'sendFk' == cardName ||'recevierFk' == cardName"
        :type="cardName"
        :y="y"
        @resize="resize"
      ></feedback-list>
        <!-- v-if="'sendFk' == cardName"
        v-if="'recevierFk' == cardName" -->
      <!-- <feedback-list
        :is-show="'recevierFk' == cardName"
        :type="cardName"
        :y="y"
        @resize="resize"
      ></feedback-list> -->
    </div>
  </div>
    <div class="work-place-wrapper">
        <div class="work-place-container">
            <div class="work-place">
                <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" :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>
                    <feedback-list
                        :is-show="'sendFk' == cardName ||'recevierFk' == cardName"
                        :type="cardName"
                        :y="y"
                        @resize="resize"
                    ></feedback-list>
                    <!-- v-if="'sendFk' == cardName"
                    v-if="'recevierFk' == cardName" -->
                    <!-- <feedback-list
                        :is-show="'recevierFk' == cardName"
                        :type="cardName"
                        :y="y"
                        @resize="resize"
                    ></feedback-list> -->
                </div>
            </div>
        </div>
        <div class="log-wrapper">
            <today-log></today-log>
        </div>
    </div>
</template>
<script>
@@ -70,11 +77,13 @@
import HandledList from "@/pages/workplace/handledList/HandledList";
import FeedbackList from "@/pages/workplace/feedbackList/feedbackList";
import createWs from "@/assets/js/websocket";
import TodayLog from "@/pages/components/TodayLog.vue";
const WSMixin = createWs("worksheet");
export default {
  name: "WorkPlace",
  components: {
      TodayLog,
    HandledList,
    HandlingList,
    ApprovedList,
@@ -191,7 +200,28 @@
</script>
<style scoped>
.work-place-wrapper {
    display: flex;
    height: 100%;
}
.work-place-container {
    flex:1;
    position: relative;
    height: 100%;
}
.work-place {
  padding-top: 8px;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}
.log-wrapper {
    width: 450px;
    height: 100%;
    overflow-y: auto;
    padding-left: 4px;
    padding-bottom: 4px;
    position: relative;
}
</style>
src/router/config.js
@@ -44,7 +44,7 @@
          path: 'workplaceList',
          name: '问题反馈查询',
          meta: {
            icon: "profile"
            icon: "exceptionOutlined"
          },
          component: () => import('@/pages/workplace/workplaceList')
        },
@@ -191,9 +191,6 @@
            page: {
              cacheAble: false
            },
            authority: {
              role: '1004',
            }
          },
          component: BlankView,
          children: [