import{m}from"./framework.e8f655c8.js";import{g as c}from"./chart.860d5b23.js";import{Q as p,G as i}from"./index.8c202964.js";import{u,a as d,b as y}from"./knowledgeDetail.14be4b1a.js";const v={data(){return{}},methods:{...m("cacheRouter",["deleteCacheComponent"]),knowledgePersonUrl({identifier:e,sourceId:r,type:t="person"}){if(!(e&&r))return;const a={type:t,identifier:e,sourceId:r};p.push({path:"/home/knowledgeDetail",query:a})},provUrl({sourceId:e,tableName:r,personalName:t,chiOrganizationName:a,chiEventName:o,geographicalName:s,productName:l}){if(!e)return;const n={zsk_personal_temp:t,zsk_org_temp:a,zsk_event_temp:o,zsk_geographical_temp:s,zsk_product_temp:l}[r]||"",h=p.resolve({path:"/read_book",query:{sourceId:e,searchNavValue:n}});window.open(h.href,"_blank")},chart_proUrl({sourceId:e,identifier:r}){c({sourceId:e,identifier:r}).then(t=>{if(t.code===0){let a=p.resolve({path:"/read_book",query:{sourceId:e,identifier:r,pageNum:t.data.page_number}});window.open(a.href,"_blank")}})},imgUrl(e,r,t,a,o,s){(o||s==="detail")&&p.push({path:"/home/visual-search-result",query:{sourceId:r,refSourceId:e,tableName:t,searchVal:a}})},keywordUrl(e){let t={type:"search",list:i([{relation:"must",field:"-",keyword:e,match:"fuzzy"}]),checkType:"2,3,4,5,6",t:new Date().getTime()};this.deleteCacheComponent("DashboardSearchResult").then(()=>{p.push({path:"/home/searchResult",query:t})})},isCollect({usercId:e,sourceId:r}){return new Promise(t=>{u({basicType:"\u56FE\u4E66",readHistoryType:"\u6536\u85CF",usercId:e,sourceId:r}).then(o=>{t(o)})})},collectOn({usercId:e,sourceId:r,title:t}){return new Promise(a=>{d({usercId:e,sourceId:r,title:t}).then(s=>{a(s)})})},collectOff({usercId:e,sourceId:r}){return new Promise(t=>{y({usercId:e,sourceId:r}).then(o=>{t(o)})})}}};export{v as p};
