2 lines
8.0 KiB
JavaScript
2 lines
8.0 KiB
JavaScript
|
|
import{_ as R}from"./updateIcon-57303c18.js";import{d as z,r as s,A as le,a as c,c as n,e as ae,f as oe,h as t,i as o,l as d,y as ie,B as se,g as p,n as A,t as P,a4 as h,b0 as ne,b1 as ue,E as y,b2 as re,b3 as de,b4 as ce,b5 as pe,b6 as me,q as be,s as fe,_ as _e}from"./index-ccab2584.js";import{u as q}from"./useHandleData-0eab3d22.js";import{P as ve}from"./index-d5758658.js";import{D as ye}from"./index-332ffb24.js";import"./notData-cf10628e.js";import"./Pagination.vue_vue_type_script_setup_true_name_Pagination_lang-6796c038.js";import"./print-eaefcdaa.js";const T=g=>(be("data-v-299bcc3b"),g=g(),fe(),g),ge={class:"table-box"},Ve=T(()=>p("img",{src:R,alt:"",class:"configureIcon"},null,-1)),ke=T(()=>p("span",null,"\u7F16\u8F91",-1)),we=T(()=>p("img",{src:R,alt:"",class:"configureIcon"},null,-1)),Te=T(()=>p("span",null,"\u7F16\u8F91",-1)),xe={class:"dialog-footer"},Ce=z({name:"jxjDictionary"}),De=z({...Ce,setup(g){const I=s();le();const v=s(!1),x=s(!1),m=s(!1),b=s(""),C=s({dictValue:"",dictType:"",status:1,remark:""}),N=s(""),V=s(),E=s(),k=s([]),f=c({dictType:""}),i=s({dictType:"",dictLabel:0,dictSort:1,status:1,remark:"",dictValue:""}),F=c({dictValue:{required:!0,message:"\u8BF7\u8F93\u5165\u4F01\u4E1A\u8D1F\u8D23\u4EBA",trigger:"blur"}}),j=()=>{N.value="add",v.value=!0,b.value="\u65B0\u589E\u5B57\u5178\u7C7B\u578B",C.value=c({dictValue:"",dictType:"",status:1,remark:""})};function J(a,e){N.value="edit",v.value=!0,b.value="\u7F16\u8F91\u5B57\u5178\u7C7B\u578B",C.value=c({...e})}const O=[{type:"index",label:"\u5E8F\u53F7",width:80},{prop:"dictName",label:"\u5B57\u5178\u540D\u79F0",search:{el:"input"}},{prop:"dictType",label:"\u5B57\u5178\u7C7B\u578B",render:a=>t(n("el-button"),{type:"primary",link:!0,onClick:()=>K(a.row.dictType)},{default:()=>[a.row.dictType]})},{prop:"status",label:"\u72B6\u6001"},{prop:"remark",label:"\u5907\u6CE8"},{prop:"createTime",label:"\u521B\u5EFA\u65F6\u95F4"},{prop:"operation",label:"\u64CD\u4F5C",fixed:"right"}],H={formItemConfig:[{label:"\u5B57\u5178\u540D\u79F0",prop:"dictName",type:"input"},{label:"\u5B57\u5178\u7C7B\u578B",prop:"dictType",type:"input"},{label:"\u72B6\u6001",prop:"status",type:"radio",data:[{label:"\u6B63\u5E38",value:1},{label:"\u505C\u7528",value:0}]},{label:"\u5907\u6CE8",prop:"remark",type:"input"}],rules:{dictName:[{required:!0,message:"\u8BF7\u8F93\u5165\u5B57\u5178\u540D\u79F0",trigger:"blur"}],dictType:[{required:!0,message:"\u8BF7\u8F93\u5165\u5B57\u5178\u6807\u7B7E",trigger:"blur"}]}},M=c({}),G=a=>({list:a.records,total:Number(a.total),pageNo:Number(a.current),pageSize:Number(a.size)}),K=async a=>{x.value=!0,i.value.dictType=a,f.dictType=a;const e=await h(f);k.value=e.result},L=async(a,e)=>{a===2?(m.value=!0,b.value="\u7F16\u8F91\u5B57\u5178\u6570\u636E",i.value=c({...e})):(i.value=c({dictType:f.dictType,dictLabel:1,dictSort:1,status:1,remark:"",dictValue:""}),b.value="\u65B0\u589E\u5B57\u5178\u6570\u636E",m.value=!0)},Q=a=>{let e=JSON.parse(JSON.stringify(a));return ne(e)},W=async a=>{a.dictId?(await ue(a),V.value.getTableList(),y.success("\u7F16\u8F91\u6210\u529F")):(await re(a),y.success("\u65B0\u589E\u6210\u529F"),V.value.getTableList()),v.value=!1},X=async(a,e)=>{!a||await a.validate(async(u,r)=>{if(u){e.dictCode?(await ce(e),y.success("\u7F16\u8F91\u6210\u529F")):(await de(e),y.success("\u65B0\u589E\u6210\u529F")),m.value=!1;const D=await h(f);k.value=D.result}else y({showClose:!0,message:"\u8BF7\u5B8C\u5584\u8868\u5355\u4FE1\u606F\uFF01",type:"error"})})},Y=async a=>{await q(pe,{id:a.dictId},`\u5220\u9664\u3010${a.dictName}\u3011`),V.value.getTableList()},Z=async a=>{await q(me,{id:a.dictCode},`\u5220\u9664\u3010${a.dictValue}\u3011`);const e=await h(f);k.value=e.result};return(a,e)=>{const u=n("el-button"),r=n("el-table-column"),D=n("el-table"),$=n("el-dialog"),S=n("el-input"),_=n("el-form-item"),B=n("el-input-number"),U=n("el-radio"),ee=n("el-radio-group"),te=n("el-form");return ae(),oe("div",ge,[t(ve,{ref_key:"proTable",ref:V,title:"\u7528\u6237\u5217\u8868",columns:O,requestApi:Q,initParam:M,dataCallback:G,"tool-button":!1,pagination:!0,background:"",on
|