import{d as o,g as s,y as l,j as i,C as r,$ as n}from"./ResizeObserver.es.39b48a47.js";import{C as p}from"./index.db115763.js";import{L as h}from"./index.6c529ad4.js";import{S as d}from"./index.608320e9.js";import{S as f}from"./index.e10a1ae2.js";import{u as c}from"./hooks.6df65925.js";import{C as m}from"./index.970ad07b.js";import"./use-tab-status.bcc0c503.js";import"./index.428ab1a8.js";import"./use-id.b004ff17.js";function u(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},u(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};