研发图纸文件管理系统-前端项目
longyvfengyun
2022-07-29 87bc1e2ae39ab8f8f7aaf7d6b039bb456df2db85
Merge branch 'master' of http://118.89.139.230:10101/r/docManageSystem
1个文件已添加
8个文件已修改
539 ■■■■ 已修改文件
src/config/default/setting.config.js 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/layouts/AdminLayout.vue 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/layouts/footer/PageFooter.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/layouts/tabs/TabsHead.vue 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/layouts/tabs/TabsView.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/drawManage/details/details.vue 315 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/drawManage/details/yclist.vue 100 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/drawManage/drawCenter/DrawCenter.vue 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/user/list.vue 79 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/config/default/setting.config.js
@@ -28,8 +28,8 @@
    direction: 'left'                   //动画方向,切换页面时动画的方向,参考 ./animate.config.js
  },
  footerLinks: [                        //页面底部链接,{link: '链接地址', name: '名称/显示文字', icon: '图标,支持 ant design vue 图标库'}
    {link: '', name: ''},
    {link: '', icon: ''},
    {link: '', name: ''}
    // {link: '', name: ''},
    // {link: '', icon: ''},
    // {link: '', name: ''}
  ],
}
src/layouts/AdminLayout.vue
@@ -15,7 +15,7 @@
      <admin-header :class="[{'fixed-tabs': fixedTabs, 'fixed-header': fixedHeader, 'multi-page': multiPage}]" :style="headerStyle" :menuData="headMenuData" :collapsed="collapsed" @toggleCollapse="toggleCollapse"/>
      <a-layout-header :class="['virtual-header', {'fixed-tabs' : fixedTabs, 'fixed-header': fixedHeader, 'multi-page': multiPage}]" v-show="fixedHeader"></a-layout-header>
      <a-layout-content class="admin-layout-content" :style="`min-height: ${minHeight}px;`">
        <div style="position: relative">
        <div class="admin-layout-content-inner" style="position: relative">
          <slot></slot>
        </div>
      </a-layout-content>
@@ -153,6 +153,14 @@
      padding: 24px 24px 0;
      /*overflow-x: hidden;*/
      /*min-height: calc(100vh - 64px - 122px);*/
      // display: flex;
      // flex-direction: column;
      .admin-layout-content-inner {
        // flex: 1;
        height: 100%;
        display: flex;
        flex-direction: column;
      }
    }
    .setting{
      background-color: @primary-color;
src/layouts/footer/PageFooter.vue
@@ -20,7 +20,8 @@
<style lang="less" scoped>
  .footer{
    padding: 48px 16px 24px;
    // padding: 48px 16px 24px;
    padding: 16px;
    /*margin: 48px 0 24px;*/
    text-align: center;
    .copyright{
src/layouts/tabs/TabsHead.vue
@@ -141,6 +141,9 @@
    &.head.fixed{
      width: 1400px;
    }
    &.side {
      margin: 0;
    }
  }
  .tabs-container{
    margin: -16px auto 8px;
src/layouts/tabs/TabsView.vue
@@ -1,5 +1,5 @@
<template>
  <admin-layout>
  <admin-layout class="main">
    <contextmenu :itemList="menuItemList" :visible.sync="menuVisible" @select="onMenuSelect" />
    <tabs-head
        v-if="multiPage"
@@ -314,6 +314,9 @@
</script>
<style scoped lang="less">
  .main {
    height: 100%;
  }
  .tabs-view{
    margin: -16px auto 8px;
    &.head.fixed{
@@ -321,6 +324,7 @@
    }
  }
  .tabs-view-content{
    flex: 1;
    position: relative;
    &.head.fixed{
      width: 1400px;
src/pages/drawManage/details/details.vue
@@ -1,64 +1,107 @@
<template>
  <a-spin :spinning="spinning" tip="拼命加载中...">
    <a-card>
      <a-descriptions title="图纸信息">
        <a-descriptions-item label="母料型号">{{
          info.parentModel
        }}</a-descriptions-item>
        <a-descriptions-item label="母料名称">{{
          info.parentName
        }}</a-descriptions-item>
        <a-descriptions-item v-if="info.parentCode" label="母料编号">{{
          info.parentCode
        }}</a-descriptions-item>
        <a-descriptions-item label="类别">{{
          info.category
        }}</a-descriptions-item>
        <a-descriptions-item label="子件型号">{{
          info.subModel
        }}</a-descriptions-item>
        <a-descriptions-item label="子件名称">{{
          info.subName
        }}</a-descriptions-item>
      </a-descriptions>
      <advance-table
        :data-source="dataSource"
        :columns="columns"
        :loading="loading"
        title=""
        row-key="subCode"
        @search="onSearch"
        @refresh="onRefresh"
        @reset="onReset"
        :format-conditions="true"
        :scroll="{ x: 2700 }"
      >
        <template slot="title">
          <span class="title">图纸历史版本</span>
  <a-layout class="main">
    <a-layout-sider width="260">
      <yc-list
        class="list"
        :list="dataSource"
        @select="selectChanged"
      ></yc-list>
    </a-layout-sider>
    <a-layout>
      <a-layout-header>
        <a-descriptions title="图纸信息">
          <a-descriptions-item label="母料型号">{{
            info.parentModel
          }}</a-descriptions-item>
          <a-descriptions-item label="母料名称">{{
            info.parentName
          }}</a-descriptions-item>
          <a-descriptions-item v-if="info.parentCode" label="母料编号">{{
            info.parentCode
          }}</a-descriptions-item>
          <a-descriptions-item label="类别">{{
            info.category
          }}</a-descriptions-item>
          <a-descriptions-item label="子件型号">{{
            info.subModel
          }}</a-descriptions-item>
          <a-descriptions-item label="子件名称">{{
            info.subName
          }}</a-descriptions-item>
        </a-descriptions>
      </a-layout-header>
      <a-layout-content>
        <template v-if="record.subCode">
          <a-descriptions title="详情">
            <a-descriptions-item label="子件编码">{{
              record.subCode
            }}</a-descriptions-item>
            <a-descriptions-item label="子件型号">{{
              record.subModel
            }}</a-descriptions-item>
            <a-descriptions-item label="子件名称">{{
              record.subName
            }}</a-descriptions-item>
            <a-descriptions-item label="单位">{{
              record.unit
            }}</a-descriptions-item>
            <a-descriptions-item label="子件数量">{{
              record.quantity
            }}</a-descriptions-item>
            <a-descriptions-item label="生产商">{{
              record.producer
            }}</a-descriptions-item>
            <a-descriptions-item label="封装类型/材质">{{
              record.material
            }}</a-descriptions-item>
            <a-descriptions-item label="元件编号/料厚">{{
              record.thickness
            }}</a-descriptions-item>
            <a-descriptions-item label="表面处理/物料详情">{{
              record.surfaceDetail
            }}</a-descriptions-item>
            <a-descriptions-item label="备注">{{
              record.notes
            }}</a-descriptions-item>
            <a-descriptions-item label="图片"
              ><image-view
                v-if="record"
                :url="webUrl + record.pictureUrl"
              ></image-view
            ></a-descriptions-item>
            <a-descriptions-item label="上传人">{{
              record.upUser
            }}</a-descriptions-item>
            <a-descriptions-item label="创建日期">{{
              record.createDate
            }}</a-descriptions-item>
            <a-descriptions-item label="更新日期">{{
              record.updateDate
            }}</a-descriptions-item>
            <a-descriptions-item label="版本">{{
              record.eversion
            }}</a-descriptions-item>
          </a-descriptions>
        </template>
        <template slot="pictureUrl" slot-scope="{ record }">
          <image-view
            v-if="record"
            :url="webUrl + record.pictureUrl"
            @load="imageLoad"
          ></image-view>
        <template v-else>
          <a-empty description="请选择相关版本" />
        </template>
        <template slot="action" slot-scope="{ record }">
          <div v-if="record.dwgUrl">
            <a @click="dwgReview(record.dwgUrl)">预览</a>
            <a-divider type="vertical"></a-divider>
            <a :href="webUrl + record.dwgUrl" download>下载</a>
          </div>
      </a-layout-content>
      <a-layout-footer>
        <template v-if="record.subCode">
          <a-button @click="dwgReview(record.dwgUrl)">预览</a-button>
          <a-button @click="download(record.dwgUrl)">下载</a-button>
        </template>
      </advance-table>
    </a-card>
  </a-spin>
      </a-layout-footer>
    </a-layout>
  </a-layout>
</template>
<script>
import AdvanceTable from "@/components/table/advance/AdvanceTable";
import ImageView from "@/pages/components/ImageView";
import getWebUrl from "@/assets/js/tools/getWebUrl";
import YcList from "./yclist";
import { dwgReview } from "@/pages/workplace/apis";
import { getInfo, getHistory } from "./apis";
export default {
@@ -68,140 +111,14 @@
      scode: this.$route.params.subCode,
      info: {},
      webUrl: getWebUrl(),
      loading: false,
      spinning: false,
      y: 500,
      conditions: {},
      columns: [
        {
          title: "子件编码",
          dataIndex: "subCode",
          key: "subCode",
          align: "center",
          width: 130,
        },
        {
          title: "子件型号",
          dataIndex: "subModel",
          key: "subModel",
          width: 180,
          align: "center",
          noSearch: true,
        },
        {
          title: "子件名称",
          dataIndex: "subName",
          key: "subName",
          align: "center",
          width: 180,
          noSearch: true,
        },
        {
          title: "单位",
          dataIndex: "unit",
          key: "unit",
          align: "center",
          width: 80,
          noSearch: true,
        },
        {
          title: "子件数量",
          dataIndex: "quantity",
          key: "quantity",
          align: "center",
          width: 120,
          noSearch: true,
        },
        {
          title: "生产商",
          dataIndex: "producer",
          key: "producer",
          align: "center",
          width: 80,
        },
        {
          title: "封装类型/材质",
          dataIndex: "material",
          key: "material",
          align: "center",
          width: 180,
        },
        {
          title: "元件编号/料厚",
          dataIndex: "thickness",
          key: "thickness",
          align: "center",
          noSearch: true,
          width: 180,
        },
        {
          title: "表面处理/物料详情",
          dataIndex: "surfaceDetail",
          key: "surfaceDetail",
          align: "center",
          noSearch: true,
          width: 180,
        },
        {
          title: "备注",
          dataIndex: "notes",
          key: "notes",
          align: "center",
        },
        {
          title: "图片",
          dataIndex: "pictureUrl",
          key: "pictureUrl",
          align: "center",
          noSearch: true,
          width: 120,
          scopedSlots: { customRender: "pictureUrl" },
        },
        {
          title: "上传人",
          dataIndex: "upUser",
          key: "upUser",
          align: "center",
        },
        {
          title: "创建日期",
          dataIndex: "createDate",
          key: "createDate",
          align: "center",
          noSearch: true,
          width: 120,
        },
        {
          title: "更新日期",
          dataIndex: "updateDate",
          key: "updateDate",
          align: "center",
          noSearch: true,
          width: 120,
        },
        {
          title: "版本",
          dataIndex: "version",
          key: "version",
          align: "center",
          width: 120,
        },
        {
          title: "操作",
          dataIndex: "operation",
          key: "operation",
          align: "center",
          width: 140,
          fixed: "right",
          scopedSlots: { customRender: "action" },
        },
      ],
      record: {},
      dataSource: [],
    };
  },
  components: {
    AdvanceTable,
    ImageView,
    YcList,
  },
  methods: {
    getInfo() {
@@ -242,17 +159,9 @@
          console.log(error);
        });
    },
    onSearch(conditions, searchOptions) {
      this.conditions = conditions;
      this.searchData();
    },
    onRefresh(conditions) {
      this.conditions = conditions;
      this.searchData();
    },
    onReset(conditions) {
      this.conditions = conditions;
      this.searchData();
    selectChanged(obj) {
      console.log(obj, "--==");
      this.record = obj;
    },
  },
@@ -262,5 +171,29 @@
};
</script>
<style scoped>
<style scoped lang="less">
.main {
  height: 100%;
  .ant-layout-header,
  .ant-layout-sider {
    background: transparent;
  }
  .ant-layout-header {
    height: auto;
  }
  .list {
    height: 100%;
  }
  /deep/.ant-layout {
    margin-left: 10px;
  }
  .ant-layout-header {
    padding: 0;
    line-height: inherit;
    margin-bottom: 20px;
  }
  .ant-btn + .ant-btn {
    margin-left: 1em;
  }
}
</style>
src/pages/drawManage/details/yclist.vue
New file
@@ -0,0 +1,100 @@
<template>
  <div class="posR">
    <div class="inner">
      <a-card class="main">
        <a-input v-model="keyword" placeholder="输入关键字过滤" />
        <!-- 列表 -->
        <div class="contain">
          <div
            class="item"
            v-for="(item, idx) in data"
            :key="'item_' + idx"
            @click="selectHandle(item)"
          >
            <div class=""><span>版本:</span> {{item.eversion}}</div>
            <div class=""><span>子件编号:</span> {{item.subCode}}</div>
          </div>
        </div>
      </a-card>
    </div>
  </div>
</template>
<script>
export default {
  name: "",
  props: {
    list: {
      type: Array,
      default() {
        return [];
      },
    },
    keyword: {
      type: String,
      default: "",
    },
  },
  computed: {
    data() {
      return this.list.filter((v) => {
        const reg = new RegExp(this.keyword, "i");
        return reg.test(v.eversion) || reg.test(v.subCode);
      });
    },
  },
  data() {
    return {
      // keyword: '',
    };
  },
  components: {},
  methods: {
    selectHandle(item) {
      console.log(item, "0-0-0");
      this.$emit("select", item);
    },
  },
  mounted() {},
};
</script>
<style scoped lang="less">
.posR {
  position: relative;
}
.inner {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
}
.main {
  height: 100%;
  /deep/.ant-card-body {
    height: 100%;
    display: flex;
    flex-direction: column;
  }
}
.contain {
  margin-top: 8px;
  border: 1px solid #e8e8e8;
  flex: 1;
  overflow: auto;
}
.item {
  cursor: pointer;
  box-shadow: 0px 2px 5px -2px #000;
  span {
    display: inline-block;
    width: 5em;
    text-align: right;
  }
  & + .item {
    margin-top: 4px;
  }
}
</style>
src/pages/drawManage/drawCenter/DrawCenter.vue
@@ -47,12 +47,14 @@
          ></image-view>
        </template>
        <template slot="action" slot-scope="{ record }">
          <div v-if="record.dwgUrl">
          <template v-if="record.dwgUrl">
            <a @click="dwgReview(record.dwgUrl)">预览</a>
            <a-divider type="vertical"></a-divider>
            <a :href="webUrl + record.dwgUrl" download>下载</a>
            <a-divider type="vertical"></a-divider>
          </div>
            <template v-if="downloadFlag">
              <a :href="webUrl + record.dwgUrl" download>下载</a>
              <a-divider type="vertical"></a-divider>
            </template>
          </template>
          <a @click="goDetails(record)">详情</a>
        </template>
      </advance-table>
@@ -66,6 +68,7 @@
import getWebUrl from "@/assets/js/tools/getWebUrl";
import { dwgReview } from "@/pages/workplace/apis";
import { searchCadDrawer, packageDoc } from "./apis";
import { mapGetters } from 'vuex';
export default {
  name: "DrawCenter",
@@ -236,7 +239,7 @@
          dataIndex: "operation",
          key: "operation",
          align: "center",
          width: 140,
          width: 168,
          fixed: "right",
          scopedSlots: { customRender: "action" },
        },
@@ -351,7 +354,9 @@
      });
    },
  },
  computed: {},
  computed: {
    ...mapGetters('account', ['downloadFlag'])
  },
  mounted() {
    this.searchData();
  },
src/pages/user/list.vue
@@ -63,7 +63,8 @@
<script>
import AdvanceTable from "@/components/table/advance/AdvanceTable";
import UserInfo from "./components/userInfo";
import { getAllUser, deleteUser, getAllRole, getAllDepart } from "./apis";
import { getAllUser, deleteUser } from "./apis";
import { mapGetters } from "vuex";
export default {
  name: "",
@@ -99,8 +100,7 @@
          searchAble: true,
          dataType: "select",
          search: {
            selectOptions: [
            ],
            selectOptions: [],
          },
        },
        {
@@ -110,9 +110,8 @@
          searchAble: true,
          dataType: "select",
          search: {
              selectOptions: [
              ]
            }
            selectOptions: [],
          },
        },
        {
          title: "创建时间",
@@ -135,11 +134,11 @@
    editTitle() {
      return this.isEdit ? "编辑用户信息" : "新增用户";
    },
    ...mapGetters("account", ["roleList", "departmentList"]),
  },
  created() {
    this.init();
    this.getList();
    this.getAllRole();
    this.getAllDepart();
  },
  methods: {
    getList() {
@@ -148,11 +147,11 @@
      let params = {};
      Object.keys(conditions).forEach((v) => {
        switch (v) {
          case 'depart,departName':
            params['departId'] = conditions[v];
          case "depart,departName":
            params["departId"] = conditions[v];
            break;
          case 'drole,roleName':
            params['roleId'] = conditions[v];
          case "drole,roleName":
            params["roleId"] = conditions[v];
            break;
          default:
            params[v] = conditions[v];
@@ -222,46 +221,34 @@
      this.userData = JSON.parse(JSON.stringify(obj.text));
      this.editShow = true;
    },
    setColSelectOptions (title, arr) {
      for (let i = this.columns.length; i--;) {
    setColSelectOptions(title, arr) {
      for (let i = this.columns.length; i--; ) {
        let item = this.columns[i];
        if(item.title == title) {
        if (item.title == title) {
          item.search.selectOptions = arr;
          break;
        }
      }
    },
    getAllDepart() {
      getAllDepart().then((res) => {
        res = res.data;
        // console.log(res)
        let data = [];
        if (res.code && res.data) {
          data = res.data2.list.map((v) => {
            return {
              title: v.departName,
              value: v.departId,
            };
          });
        }
        this.setColSelectOptions('部门', data);
      });
    },
    getAllRole() {
      getAllRole().then((res) => {
        res = res.data;
        // console.log(res)
        let data = [];
        if (res.code && res.data) {
          data = res.data2.list.map((v) => {
            return {
              title: v.roleName,
              value: v.roleId,
            };
          });
        }
        this.setColSelectOptions('角色', data);
      });
    init() {
      this.setColSelectOptions(
        "部门",
        this.departmentList.map((v) => {
          return {
            title: v.departName,
            value: v.departId,
          };
        })
      );
      this.setColSelectOptions(
        "角色",
        this.roleList.map((v) => {
          return {
            title: v.roleName,
            value: v.roleId,
          };
        })
      );
    },
    cancel() {
      this.editShow = false;