import{d as o,g as s,y as l,j as i,C as r,a0 as n}from"./ResizeObserver.es.62ab429c.js";import{C as p}from"./index.d7a13e47.js";import{L as h}from"./index.00698f4b.js";import{S as d}from"./index.b0c6821a.js";import{S as f}from"./index.002d8e53.js";import{a as c}from"./hooks.3b599d36.js";import{C as m}from"./index.786e83cc.js";import"./use-tab-status.a98984d2.js";import"./index.82be4917.js";import"./use-id.1bbe472d.js";function g(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!n(t)}var j=o({name:"help-center",data(){const t=this.$route.query,e=t.catalogType=="2"?"\u516C\u544A\u5217\u8868":"\u5E2E\u52A9\u4E2D\u5FC3";return document.title=e,t.mode==="accompany"&&(t.platformType="ANALYSIS"),{list:[],dataShow:!0,dataLoading:!1,loading:!1,finished:!1,pageTitle:e,params:{catalogIds:t.catalogType||1,title:"",status:1,catalogType:t.platformType==="ANALYSIS"?"ANALYSIS":t.platformType||s.projectType==="tenant"&&s.platformType==="STUDENT"?"TENANT_STUDENT":s.platformType,page:1,rows:20},hideTitle:(t==null?void 0:t.hideTitle)=="1"}},mounted(){c("\u5E2E\u52A9\u4E2D\u5FC3")},methods:{async getList(){try{if(this.dataLoading)return;this.dataLoading=!0;const t=this.params,e=await l.post("/api-cms/helpCenterContent/list",{data:{...t}});this.dataLoading=!1,this.loading=!1;const a=e.data||{};if(this.list.length>0&&a.pageNo===1)return;this.list=this.list.concat(a.rows||[]),this.finished=a.pageNo>=a.totalPage,this.params.page=a.pageNo+1,this.dataShow=this.list.length>0}catch{this.dataShow=!1,this.finished=!0}},onSearch(t){this.params.title=t,this.params.page=1,this.list=[],this.dataShow=!0,this.loading=!1,this.finished=!1,this.getList()},onDetail(t){var e,a;((a=(e=this.$route)==null?void 0:e.query)==null?void 0:a.hideTitle)=="1"&&(s.helpItemTitle=t.title||""),this.$router.push({path:"helpCenterDetail",query:{id:t.id,catalogType:this.params.catalogType}})}},render(){let t;return i("div",null,[i(d,{offsetTop:0,position:"top",class:"mb12"},{default:()=>[!this.hideTitle&&i(m,{isFixed:!1,title:this.pageTitle,border:!1},null),i(f,{type:s.projectType==="tenant"?"tenant":"person",onSearch:this.onSearch},null)]}),this.dataShow?i(h,{loading:this.loading,"onUpdate:loading":e=>this.loading=e,finished:this.finished,finishedText:" ",onLoad:this.getList},g(t=this.list.map(e=>i(p,{title:e.title,titleClass:"van-ellipsis",isLink:!0,onClick:()=>{this.onDetail(e)}},null)))?t:{default:()=>[t]}):i(r,{btnStatus:!1,classImgSize:"CERT",tips:"\u6682\u65E0\u5185\u5BB9"},null)])}});export{j as default};
