| | |
| | | @select="selectChanged" |
| | | @diff="diff" |
| | | ></list> |
| | | <div class="handler" :title="sideVisible ? '隐藏' : '展开'" @click="toggleSide"> |
| | | <div |
| | | class="handler" |
| | | :title="sideVisible ? '隐藏' : '展开'" |
| | | @click="toggleSide" |
| | | > |
| | | <a-icon class="icon" type="left" /> |
| | | </div> |
| | | </div> |
| | |
| | | <a-button |
| | | v-if="canDownloadBom && currentVersion.enabled" |
| | | type="primary" |
| | | @click="checkLock" |
| | | @click="checkLock('zipDownload')" |
| | | >bom下载</a-button |
| | | > |
| | | <a-button |
| | | v-if="canDownloadBom && currentVersion.enabled && originalZipUrl" |
| | | type="primary" |
| | | @click="checkLock('OriginalZipDownload')" |
| | | >下载原始包</a-button |
| | | > |
| | | <a-button |
| | | type="primary" |
| | |
| | | zipDownload, |
| | | getBomHistoryAndMaterial, |
| | | compare, |
| | | getOriginalZip, |
| | | } from "./apis"; |
| | | import { setpHistoryEnable, getLockedList, getLogList } from "../apis"; |
| | | import { dwgReview } from "@/pages/workplace/apis"; |
| | |
| | | mixins: [WSMixin], |
| | | data() { |
| | | return { |
| | | originalZipUrl: "", |
| | | // 当前操作 下载bom包 下载原始包 |
| | | currentAction: "", |
| | | sideVisible: true, |
| | | logVisible: false, |
| | | logList: [], |
| | |
| | | // console.log(obj, "--=="); |
| | | // this.record = obj; |
| | | this.currentVersion = obj; |
| | | this.getOriginalZip(); |
| | | this.getInfo(); |
| | | }, |
| | | getOriginalZip() { |
| | | const { |
| | | currentVersion: { parentModel, customCode, version }, |
| | | } = this; |
| | | this.originalZipUrl = ""; |
| | | getOriginalZip(parentModel, customCode, version).then((res) => { |
| | | const { code, data, data2 } = res.data; |
| | | if (code && data) { |
| | | this.originalZipUrl = data2; |
| | | } |
| | | }); |
| | | }, |
| | | getInfo(force) { |
| | | const { |
| | |
| | | document.body.removeChild(link); |
| | | downloadLog(parentCode, subModel); |
| | | }, |
| | | checkLock() { |
| | | // action 检查后要执行的动作 |
| | | checkLock(action) { |
| | | this.currentAction = action; |
| | | getLockedList(this.currentVersion.id).then((res) => { |
| | | const { code, data, data2, data3 } = res.data; |
| | | if (code) { |
| | |
| | | this.lockListVisible = true; |
| | | } else { |
| | | // 没有锁定 |
| | | this.zipDownload(); |
| | | // this.zipDownload(); |
| | | this[action](); |
| | | } |
| | | } else { |
| | | this.$message.error("查询锁定清单出错"); |
| | |
| | | }, |
| | | lockListOk() { |
| | | this.lockListVisible = false; |
| | | this.zipDownload(); |
| | | // this.zipDownload(); |
| | | this[this.currentAction](); |
| | | }, |
| | | OriginalZipDownload() { |
| | | let loading = this.$layer.loading(); |
| | | let link = document.createElement("a"); |
| | | link.style.display = "none"; |
| | | let url = this.webUrl + this.originalZipUrl; |
| | | link.href = url; |
| | | link.download = url; |
| | | document.body.appendChild(link); |
| | | link.click(); |
| | | this.$layer.close(loading); |
| | | document.body.removeChild(link); |
| | | }, |
| | | zipDownload() { |
| | | // const { parentCode, currentVersion } = this; |