研发图纸文件管理系统-前端项目
longyvfengyun
2022-09-29 6123a93239510b158ad97df5069d3fe3bcb15715
内容调整
2个文件已修改
94 ■■■■ 已修改文件
src/pages/resourceManage/product/details/details.vue 90 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/resourceManage/product/list.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/resourceManage/product/details/details.vue
@@ -10,17 +10,12 @@
    </a-layout-sider>
    <a-layout>
      <a-layout-header>
        <a-card>
          <a-descriptions title="产品信息">
            <a-descriptions-item label="母料编号">{{
              parentCode
            }}</a-descriptions-item>
            <a-descriptions-item label="母料型号">{{
              parentModel
            }}</a-descriptions-item>
            <a-descriptions-item label="定制单号" :span="2">{{
              customCode
            }}</a-descriptions-item>
        <a-card size="small">
          <a-descriptions :column="4"  title="">
            <a-descriptions-item label="产品编号">{{ parentCode }}</a-descriptions-item>
            <a-descriptions-item label="产品型号">{{ parentModel }}</a-descriptions-item>
            <a-descriptions-item label="产品名称">{{ parentName }}</a-descriptions-item>
            <a-descriptions-item label="定制单号" :span="2">{{ customCode }}</a-descriptions-item>
          </a-descriptions>
        </a-card>
      </a-layout-header>
@@ -110,6 +105,7 @@
              </div>
              <a-button type="primary">其他附件</a-button>
            </a-popover> -->
            <a-button type="primary" @click="viewLog">日志</a-button>
            <a-button
              v-if="otherDoc.length && currentVersion.enabled"
              type="primary"
@@ -252,6 +248,33 @@
        ></a-table>
      </template>
    </a-modal>
    <!-- 日志 -->
    <a-modal
      :visible="logVisible"
      :footer="null"
      :width="800"
      title="操作日志"
      :destroyOnClose="true"
      @cancel="logCancel">
      <div class="log-content">
        <a-timeline v-if="logList.length">
          <a-timeline-item
              v-for="(item, idx) in logList"
              :key="'log_' + idx"
              :color="item.lockFlag == 1 ? 'red' : 'green'"
          >
            <div>
              <span class="user">{{ item.owner }}</span> 在
              <span class="time">{{ item.createTime }}</span>
              {{ item.lockFlag ? "锁定" : "激活" }}了版本
              <span class="version">{{ item.versionTime }}</span>
            </div>
            <div>操作原因: {{ item.reason ? item.reason : "无" }}</div>
          </a-timeline-item>
        </a-timeline>
        <a-empty v-else />
      </div>
    </a-modal>
  </a-layout>
</template>
@@ -270,7 +293,7 @@
  getBomHistoryAndMaterial,
  compare,
} from "./apis";
import { setpHistoryEnable, getLockedList } from "../apis";
import {setpHistoryEnable, getLockedList, getLogList} from "../apis";
import { dwgReview } from "@/pages/workplace/apis";
import { downloadLog } from "@/pages/system/logs/apis";
import { mapGetters } from "vuex";
@@ -281,6 +304,8 @@
  mixins: [WSMixin],
  data() {
    return {
      logVisible: false,
      logList: [],
      lockListVisible: false,
      bomLockList: [],
      otherLockList: [],
@@ -294,6 +319,7 @@
      parentCode: this.$route.query.parentCode,
      customCode: this.$route.query.customCode,
      parentModel: this.$route.query.parentModel,
      parentName: this.$route.query.parentName,
      versionList: [],
      info: {},
      webUrl: getWebUrl(),
@@ -760,6 +786,20 @@
    otherDocCancel() {
      this.otherDocVisible = false;
    },
    viewLog() {
      getLogList({ parentCode: this.parentCode, customCode:this.customCode }).then((res) => {
        const { code, data } = res.data;
        if (code) {
          this.logList = data;
          this.logVisible = true;
        } else {
          this.$message.error("日志查询失败");
        }
      });
    },
    logCancel() {
      this.logVisible = false;
    },
  },
  mounted() {
    this.sendMessage();
@@ -863,8 +903,34 @@
    background: #ffbcc9;
  }
}
/deep/.ant-descriptions-row > th,
/deep/.ant-descriptions-row > td {
  padding-bottom: 0;
}
.table-title {
  font-weight: 700;
  color: #13c2c2;
}
.log-content {
  max-height: 400px;
  overflow-y: auto;
  .user {
    color: #23aaf2;
    font-weight: 700;
  }
  .time {
    color: #f9be13;
    font-weight: 700;
  }
  .version {
    color: #0aedb2;
    font-weight: 700;
  }
  .ant-timeline-item:first-of-type {
    padding-top: 6px;
  }
}
/deep/.ant-descriptions-row .ant-descriptions-item:first-child {
  width: 180px;
}
</style>
src/pages/resourceManage/product/list.vue
@@ -551,10 +551,10 @@
    },
    goDetails(record) {
      // console.log(record);
      const { parentCode, customCode, parentModel } = record;
      const { parentCode, customCode, parentModel, parentName } = record;
      this.$router.push({
        path: "/resource/product-details",
        query: { parentCode, customCode, parentModel },
        query: { parentCode, customCode, parentModel, parentName },
      });
    },
    searchData(res) {