2 lines
4.2 KiB
Python
2 lines
4.2 KiB
Python
import{g as e,d as t}from"./issue-bdbecac5.js";import{u as s,_ as a}from"./Table.vue_vue_type_script_lang-5256bd69.js";import{e as l,K as o,r as i,M as r,x as p,a3 as n,N as m,o as d,l as u,m as c,k as _,ao as f}from"./index-9da7d198.js";import{E as j}from"./el-button-8f21380c.js";import{E as g}from"./el-switch-7720805d.js";import{a as h,E as b}from"./el-col-d9273186.js";import{_ as v}from"./Search.vue_vue_type_script_setup_true_lang-a57e37eb.js";import{_ as w}from"./ContentWrap.vue_vue_type_script_setup_true_lang-9c7e578a.js";import{u as y}from"./dict-b6f9162a.js";import"./el-message-box-24354127.js";import"./el-input-26eda071.js";import"./event-5568c9d8.js";import"./use-form-item-8b7f5d34.js";import"./use-form-common-props-9d083c67.js";import"./index-cde97138.js";import"./isNil-1f22f7b0.js";import"./el-overlay-037540a2.js";import"./el-checkbox-group-b617b779.js";import"./vnode-ae242abb.js";import"./useForm-ecbcdb43.js";import"./el-tooltip-4ed993c7.js";import"./el-popper-2fae9050.js";import"./el-tag-aef2ce12.js";import"./index-13d6a136.js";import"./el-date-picker-f32b0b71.js";import"./debounce-778af7ed.js";import"./el-divider-fc00d058.js";import"./el-progress-69812d34.js";import"./style.css_vue_type_style_index_0_src_true_lang-0e7f3b44.js";import"./index-14d9f390.js";import"./strings-e2e316bd.js";import"./index-4dbb39b8.js";import"./el-table-column-102f47a6.js";import"./el-image-viewer-83790b35.js";import"./el-dropdown-item-c082162c.js";import"./refs-4f0941bf.js";/* empty css */import"./_Uint8Array-bbcc3a61.js";import"./useIcon-6417bbff.js";import"./el-card-5fa288fa.js";import"./dict-b26f862b.js";const x=l({name:"HelpIssue",__name:"Issue",setup(l){const{push:x}=o(),{tableRegister:k,tableState:S,tableMethods:z}=s({fetchDataApi:async()=>{const{pageSize:t,currentPage:s}=S,a=await e({page:_(s),limit:_(t),..._(K)});return{list:a.data||[],total:a.count||0}},fetchDelApi:async e=>200===(await t(e)).code}),{dataList:P,loading:R,total:A,pageSize:C,currentPage:I}=S,{getList:L,delList:U}=z,D=i([]);(async()=>{const e=y(),t=await e.getDictObj(["sys_vadmin_platform"]);D.value=t.sys_vadmin_platform})();const E=r([{field:"id",label:"编号",show:!0,disabled:!0,width:"120px"},{field:"category.name",label:"类别名称",width:"200px",show:!0,disabled:!0},{field:"title",label:"标题",show:!0},{field:"view_number",label:"查看次数",show:!0,width:"100px"},{field:"is_active",label:"是否可见",show:!0,width:"100px",slots:{default:e=>{const t=e.row;return p(n,null,[p(g,{value:t.is_active,disabled:!0},null)])}}},{field:"create_datetime",label:"创建时间",show:!0,width:"200px",sortable:!0},{field:"create_user.name",label:"创建人",show:!0,width:"100px"},{field:"action",width:"120px",label:"操作",show:!0,slots:{default:e=>{const t=e.row;return p(n,null,[p(j,{type:"primary",link:!0,size:"small",onClick:()=>$(t)},{default:()=>[m("编辑")]}),p(j,{type:"danger",loading:N.value,link:!0,size:"small",onClick:()=>O(t)},{default:()=>[m("删除")]})])}}}]),H=r([{field:"name",label:"类别名称",component:"Input",componentProps:{clearable:!0,style:{width:"214px"}}},{field:"platform",label:"登录平台",component:"Select",componentProps:{style:{width:"214px"},options:D.value}},{field:"is_active",label:"是否可见",component:"Select",componentProps:{style:{width:"214px"},options:[{label:"可见",value:!0},{label:"不可见",value:!1}]}}]),K=i({}),M=e=>{I.value=1,K.value=e,L()},N=i(!1),O=async e=>{N.value=!0,await U(!0,[e.id]).finally((()=>{N.value=!1}))},$=async e=>{x(`/help/issue/form?id=${e.id}`)},q=()=>{x("/help/issue/form")};return(e,t)=>(d(),u(_(w),null,{default:c((()=>[p(_(v),{schema:H,onReset:M,onSearch:M},null,8,["schema"]),p(_(a),{"current-page":_(I),"onUpdate:currentPage":t[0]||(t[0]=e=>f(I)?I.value=e:null),"page-size":_(C),"onUpdate:pageSize":t[1]||(t[1]=e=>f(C)?C.value=e:null),showAction:"",columns:E,"default-expand-all":"","node-key":"id",data:_(P),loading:_(R),pagination:{total:_(A)},onRegister:_(k),onRefresh:_(L)},{toolbar:c((()=>[p(_(h),{gutter:10},{default:c((()=>[p(_(b),{span:1.5},{default:c((()=>[p(_(j),{type:"primary",onClick:q},{default:c((()=>[m("新增常见问题")])),_:1})])),_:1})])),_:1})])),_:1},8,["current-page","page-size","columns","data","loading","pagination","onRegister","onRefresh"])])),_:1}))}});export{x as default};
|