2 lines
4.5 KiB
JavaScript
2 lines
4.5 KiB
JavaScript
import{G,H,M as K,N as Q,L as Z,O as z,B as J,C as W,w as X,D as Y}from"./element-plus.2acb577d.js";import{_ as ee}from"./index.vue_vue_type_script_setup_true_lang.a280d02d.js";import{u as te}from"./usePaging.23706826.js";import{u as ae}from"./useDictOptions.4fbfb4d7.js";import{d as le,Z as ue,r as ne,o as t,c as _,M as oe,u as a,K as o,L as u,U as r,T as b,a9 as y,R as C,a as j,Q as A,S as se,i as ce}from"./@vue.821a47ec.js";import{b as re}from"./oa_flow_type.b60fa00e.js";import{a as ie}from"./oa_examine_temp_item.f1738798.js";import{c as me}from"./oaSelfExamine.ed02ba3a.js";const _e={class:"mt-4"},de={class:"flex justify-end mt-4"},pe={key:0,class:"flex justify-end mt-4"},he=le({__name:"index",props:{config:{type:Object,required:!0},query:Object,multipleChoice:Boolean},emits:["customEvent"],setup(d,{emit:D}){const s=d,L=()=>{const l=s.config.serchList.map(m=>m.value).reduce((m,B)=>(m[B]="",m),{});return Object.assign({},l,s.query)},O=c=>{if(!!s.query)return Object.keys(s.query).includes(c)},i=ue({...L()}),{dictData:V}=ae(s.config.dictData),g=D,w=c=>{s.multipleChoice||g("customEvent",c)},h=ne([]),S=c=>{h.value=c},q=()=>{g("customEvent",h.value)},{pager:p,getLists:k,resetParams:T,resetPage:U}=te({fetchFun:s.config.fetchFn,params:i});return k(),(c,l)=>{const v=G,m=H,B=J,F=W,E=X,N=Y,x=K,P=Q,I=ee,M=Z,R=z;return t(),_("div",null,[oe((t(),o(M,{class:"!border-none",shadow:"never"},{default:u(()=>[r(N,{class:"mb-[-16px]",model:a(i),inline:""},{default:u(()=>[(t(!0),_(b,null,y(d.config.serchList,(e,f)=>(t(),o(F,{label:e.label,key:f,class:"w-[280px]"},{default:u(()=>[e.select?(t(),o(m,{key:0,modelValue:a(i)[e.value],"onUpdate:modelValue":n=>a(i)[e.value]=n,disabled:O(e.value)},{default:u(()=>[Array.isArray(e.select)?(t(!0),_(b,{key:0},y(e.select,n=>(t(),o(v,{label:n.name,value:n.value},null,8,["label","value"]))),256)):(t(!0),_(b,{key:1},y(a(V)[e.select],(n,$)=>(t(),o(v,{key:$,label:n.name,value:parseInt(n.value)},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","disabled"])):(t(),o(B,{key:1,class:"w-[280px]",modelValue:a(i)[e.value],"onUpdate:modelValue":n=>a(i)[e.value]=n,clearable:"",placeholder:`\u8BF7\u8F93\u5165${e.label}`},null,8,["modelValue","onUpdate:modelValue","placeholder"]))]),_:2},1032,["label"]))),128)),r(F,null,{default:u(()=>[r(E,{type:"primary",onClick:a(U)},{default:u(()=>l[1]||(l[1]=[C("\u67E5\u8BE2")])),_:1},8,["onClick"]),r(E,{onClick:a(T)},{default:u(()=>l[2]||(l[2]=[C("\u91CD\u7F6E")])),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"]),j("div",_e,[r(P,{data:a(p).lists,onCellClick:w,"row-key":"id",onSelectionChange:S},{default:u(()=>[d.multipleChoice?(t(),o(x,{key:0,type:"selection",width:"55"})):A("",!0),(t(!0),_(b,null,y(d.config.tableList,e=>(t(),o(x,{label:e[Object.keys(e)[0]],"show-overflow-tooltip":""},{default:u(({row:f})=>[C(se(Object.keys(e)[0].includes(".")?f[Object.keys(e)[0].split(".")[0]][Object.keys(e)[0].split(".")[1]]:f[Object.keys(e)[0]]),1)]),_:2},1032,["label"]))),256))]),_:1},8,["data"])]),j("div",de,[r(I,{modelValue:a(p),"onUpdate:modelValue":l[0]||(l[0]=e=>ce(p)?p.value=e:null),onChange:a(k)},null,8,["modelValue","onChange"])]),d.multipleChoice?(t(),_("div",pe,[r(E,{type:"primary",onClick:q},{default:u(()=>l[3]||(l[3]=[C("\u786E\u5B9A")])),_:1})])):A("",!0)]),_:1})),[[R,a(p).loading]])])}}}),ke={fetchFn:re,dictData:"oa_approve_cate",serchList:[{label:"\u6240\u5C5E\u5206\u7C7B",value:"type",select:"oa_approve_cate"},{label:"\u5BA1\u6279\u540D\u79F0",value:"title"},{label:"\u5BA1\u6279\u6807\u8BC6",value:"name"}],tableList:[{type_text:"\u6240\u5C5E\u5206\u7C7B"},{title:"\u5BA1\u6279\u540D\u79F0"},{name:"\u5BA1\u6279\u6807\u8BC6"},{icon:"\u56FE\u6807"},{department_names:"\u5E94\u7528\u90E8\u95E8"}]},Fe={fetchFn:ie,dictData:"jxgl_check_type",serchList:[{label:"\u6A21\u677F\u540D\u79F0",value:"temp_name"},{label:"\u8003\u6838\u7C7B\u522B",value:"examine_type",select:"jxgl_check_type"}],tableList:[{examine_type_text:"\u8003\u6838\u7C7B\u522B"},{temp_name:"\u6A21\u7248\u540D\u79F0"},{total_score:"\u8003\u6838\u603B\u5206"},{create_user:"\u521B\u5EFA\u4EBA"},{create_time:"\u521B\u5EFA\u65F6\u95F4"}]},xe={fetchFn:me,dictData:"jxgl_check_type",serchList:[{label:"\u8003\u6838\u7C7B\u522B",value:"examine_type",select:"jxgl_check_type"}],tableList:[{user_name:"\u81EA\u8BC4\u4EBA"},{examine_type_text:"\u8003\u6838\u7C7B\u522B"},{temp_name:"\u8003\u6838\u6A21\u7248"},{examine_month:"\u8003\u6838\u6708\u4EFD"},{total_score:"\u8003\u6838\u603B\u5206"},{total_self_score:"\u81EA\u8BC4\u5F97\u5206"},{create_time:"\u81EA\u8BC4\u65F6\u95F4"}]};export{he as _,ke as a,Fe as b,xe as o};
|