You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

sealList-76497c17.js 2.0KB

1
  1. import{_ as k,s as w,a as $}from"./sealCodeDialog-32c3a50a.js";import{x as D,r as u,a as p,$ as U,o as B,b as c,c as N,d as R,f as o,h as n,e as i,i as L,t as M,F as T,k as V,s as A}from"./index-dd5fae99.js";const F={class:"flexRight mb-8"},S=["src"],j=["onClick"],q=["onClick"],E=V({name:"sealConfiguration"}),z=Object.assign(E,{setup(G){const b=D(),{proxy:d}=A(),g=u(),f=p([{label:"序号",type:"index",width:"80"},{label:"印章名称",key:"sealName",prop:"sealName"},{label:"印章图片",slot:"img"},{label:"sealCode",key:"sealCode",prop:"sealCode"},{label:"添加时间",key:"createdAt",prop:"createdAt"},{label:"状态",key:"isUse",render:e=>U("span",{class:e.isUse?"text-success":"text-danger"},e.isUse?"启用":"禁用")},{label:"操作",slot:"action",width:"120",fixed:"right"}]),_=u([{id:1,name:"名称",role:"1,2",status:1}]),t=async()=>{const e=await w({unitCode:b.query.id});_.value=e.data},m=(e,a)=>{const l=a===1?"删除":e.isUse?"禁用":"启用";d.$messageBox.confirm(`是否${l}该流程?`,"提示!",{type:"warning"}).then(async()=>{await $({isUse:!e.isUse,sealCode:e.sealCode,type:a}),d.$message.success(`${l}成功!`),t()})},r=p({visible:!1}),C=e=>{r.visible=!0},h=e=>{r.visible=!1,e&&t()};return B(()=>{t()}),(e,a)=>{const l=c("el-button"),x=c("table-list"),y=c("el-card");return N(),R(T,null,[o(y,{class:"elCard",title:"印章列表",shadow:"never"},{default:n(()=>[i("div",F,[o(l,{type:"primary",onClick:C},{default:n(()=>a[0]||(a[0]=[L("添加印章")])),_:1})]),o(x,{ref_key:"tableListRef",ref:g,column:f,data:_.value,pagination:!1,onGetTableData:t},{img:n(({scope:s})=>[i("img",{src:`data:image/png;base64,${s.row.sealBase64}`,style:{width:"100px",height:"100px"}},null,8,S)]),action:n(({scope:s})=>[i("a",{class:"text-primary",onClick:v=>m(s.row,2)},M(s.row.isUse?"禁用":"启用"),9,j),i("a",{class:"text-danger",onClick:v=>m(s.row,1)},"删除",8,q)]),_:1},8,["column","data"])]),_:1}),o(k,{visible:r.visible,onClose:h},null,8,["visible"])],64)}}});export{z as default};