| | |
| | | </template> |
| | | |
| | | <script> |
| | | import cardType from "../../mockData/cardType.ts"; |
| | | import bus from "@/main"; |
| | | |
| | | export default { |
| | | mounted() { |
| | | bus.$on('refreshCompareImg', () => { |
| | | // this.tempShowType = false |
| | | }) |
| | | window.addEventListener("resize", this.watchWindow); |
| | | }, |
| | | props: { |
| | |
| | | return { |
| | | tempShowType: true, |
| | | initialIndex: 0, |
| | | cardType, |
| | | carouselIndex: 0, |
| | | dialogVisible: false, |
| | | overflowState: true |
| | |
| | | }, |
| | | getUrl(bwtype) { |
| | | if (bwtype == 1) { |
| | | return `url(${require("@/assets/bg/red.png")})` |
| | | return `url(${require("@/assets/img/red.png")})` |
| | | } else { |
| | | return `url(${require("@/assets/bg/green.png")})` |
| | | return `url(${require("@/assets/img/green.png")})` |
| | | } |
| | | }, |
| | | changeInitialIndex(index) { |
| | |
| | | this.$emit("addToBase", item); |
| | | }, |
| | | tosearch(item) { |
| | | var curWwwPath = window.document.location.href; |
| | | var pathname = window.document.location.pathname; |
| | | var pos = curWwwPath.indexOf(pathname); |
| | | var localhostPath = curWwwPath.substring(0, pos); //ip+port |
| | | var href = localhostPath + "/Layout/Searching" |
| | | let captureId = item.id == "" ? item.baseInfo[0].targetId : item.id |
| | | var url = item.targetInfo ? item.targetInfo[0].picSmUrl : item.baseInfo[0].targetPicUrl |
| | | console.log("跳转地址", href, "url", url) |
| | | var compType = 1 // 数据来自于es |
| | | let imgUrl = item.targetInfo ? item.targetInfo[0].picSmUrl : item.baseInfo[0].targetPicUrl |
| | | let compType = 1 // 数据来自于es |
| | | if (!item.id || item.id == "") { |
| | | compType = 0 // 数据来自于底库 |
| | | } |
| | | window.open(href + '?showType=findByPic&targetId=' + captureId + '&picSmUrl=' + url + '&compType=' + compType) |
| | | // window.open(href + '?showType=findByPic&targetId=' + captureId + '&picSmUrl=' + url + '&compType=' + compType) |
| | | |
| | | let message = 'toSearch?showType=findByPic&targetId=' + captureId + '&picSmUrl=' + imgUrl + '&compType=' + compType; |
| | | window.parent.postMessage({ |
| | | msg: message |
| | | }, "*") |
| | | } |
| | | } |
| | | }; |