12 |
- "use strict";(self["webpackChunkbaozhidao_putoutstorage"]=self["webpackChunkbaozhidao_putoutstorage"]||[]).push([[264],{4257:function(e,a,t){t.d(a,{Z:function(){return h}});var l=t(6252),o=t(3577);const n={class:"mark-green1"},r=(0,l._)("div",{class:"mark-green2"},[(0,l._)("div",{class:"mark-green3"})],-1),i=[r];function s(e,a){return(0,l.wg)(),(0,l.iD)("div",n,i)}var u=t(3744);const p={},d=(0,u.Z)(p,[["render",s]]);var m=d;const c={class:"bg"},g={class:"bg-tit"},w={style:{display:"flex","align-items":"center",flex:"1","flex-shrink":"0","min-width":"200px"}};var y=(0,l.aZ)({__name:"bg",props:{istitle:{type:String,default:()=>""}},setup(e){const a=e;return(e,t)=>{const n=(0,l.up)("el-text");return(0,l.wg)(),(0,l.iD)("div",c,[(0,l._)("div",g,[(0,l._)("div",w,[(0,l.Wm)(m),(0,l.Wm)(n,{style:{"margin-left":"20px"},tag:"b"},{default:(0,l.w5)((()=>[(0,l.WI)(e.$slots,"tit",{},(()=>[(0,l.Uk)((0,o.zw)(a.istitle),1)]))])),_:3})]),(0,l.WI)(e.$slots,"btn")]),(0,l.WI)(e.$slots,"bg")])}}});const f=y;var h=f},1271:function(e,a,t){t.d(a,{Z:function(){return d}});var l=t(6252),o=t(3577),n=t(2262);const r={class:"searchAdd"},i={class:"searchAdd-left"},s={class:"searchAdd-right"};var u=(0,l.aZ)({__name:"searchAdd",props:{isButtom:{type:String,default:()=>""},labelWidth:{type:String,default:()=>"100"},inline:{type:Boolean,default:()=>!0}},emits:["event"],setup(e,{emit:a}){const t=e,u=(0,n.qj)({input:""}),p=a,d=()=>{p("event",u.input)};return(e,a)=>{const n=(0,l.up)("el-button"),u=(0,l.up)("el-form-item"),p=(0,l.up)("el-form");return(0,l.wg)(),(0,l.iD)("div",r,[(0,l._)("div",i,[(0,l.Wm)(p,{inline:t.inline},{default:(0,l.w5)((()=>[(0,l.WI)(e.$slots,"searchConter"),(0,l.Wm)(u,null,{default:(0,l.w5)((()=>[(0,l.Wm)(n,{type:"primary",onClick:d},{default:(0,l.w5)((()=>[(0,l.Uk)((0,o.zw)(t.isButtom),1)])),_:1})])),_:1})])),_:3},8,["inline"])]),(0,l._)("div",s,[(0,l.WI)(e.$slots,"searchBtn")])])}}});const p=u;var d=p},6115:function(e,a,t){t.d(a,{Z:function(){return m}});var l=t(6252),o=t(2262),n=t(3577);const r=(e,a={},t=!0,l)=>{const n=(0,o.qj)({tableData:[],loading:!0,pageable:{pageNum:1,pageSize:8,total:0,RemainingTime:0,small:!0,disabled:!1},searchParam:{},searchInitParam:{},totalParam:{}}),r=async()=>{const t={page:n.pageable.pageNum,pageSize:n.pageable.pageSize,...a};e(t).then((e=>{n.tableData=e.data?.list||[],n.pageable.total=parseInt(e.data?.count),e.Data?.RemainingTime&&(n.pageable.RemainingTime=e.Data.RemainingTime),n.loading=!1}))},i=e=>{n.pageable.pageSize=e,r()},s=e=>{n.pageable.pageNum=e,r()},u=()=>{n.pageable.pageNum=1,r()};return{...(0,o.BK)(n),getTableList:r,searchTable:u,handleSizeChange:i,handleCurrentChange:s}},i={class:"y-tabs"},s={key:0,style:{color:"red"}},u={style:{"margin-top":"20px"}};var p=(0,l.aZ)({__name:"table",props:{columns:{default:()=>[]},requestApi:{},dataCallback:{},title:{},pagination:{type:Boolean,default:!0},layout:{default:"total, sizes, prev, pager, next, jumper"},initParam:{default:{}},border:{type:Boolean,default:!0},toolButton:{type:Boolean,default:!0},selectId:{default:"id"},displayHeader:{type:Boolean},rowClick:{},selectionChange:{},getRowKey:{},tableRowClassName:{},size:{},width:{},height:{},maxHeight:{},fit:{type:Boolean},stripe:{type:Boolean},rowKey:{},context:{},showHeader:{type:Boolean},showSummary:{type:Boolean},sumText:{},summaryMethod:{},rowClassName:{},rowStyle:{},cellClassName:{},cellStyle:{},headerRowClassName:{},headerRowStyle:{},headerCellClassName:{},headerCellStyle:{},highlightCurrentRow:{type:Boolean},currentRowKey:{},emptyText:{},expandRowKeys:{},defaultExpandAll:{type:Boolean},defaultSort:{},tooltipEffect:{},tooltipOptions:{},spanMethod:{},selectOnIndeterminate:{type:Boolean},indent:{},treeProps:{},lazy:{type:Boolean},load:{},className:{},style:{},tableLayout:{},scrollbarAlwaysOn:{type:Boolean},flexible:{type:Boolean},showOverflowTooltip:{type:[Boolean,Object]}},setup(e,{expose:a}){const t=e,{tableData:p,getTableList:d,pageable:m,loading:c,handleSizeChange:g,handleCurrentChange:w}=r(t.requestApi,t.initParam,t.pagination,t.dataCallback);d();const y=(0,o.iH)(t.columns);return a({getTableList:d,tableColumns:y,props:t}),(e,a)=>{const r=(0,l.up)("el-table-column"),d=(0,l.up)("el-tooltip"),f=(0,l.up)("el-empty"),h=(0,l.up)("el-table"),b=(0,l.up)("el-pagination"),v=(0,l.Q2)("loading");return(0,l.wg)(),(0,l.iD)("div",i,[(0,l.wy)(((0,l.wg)(),(0,l.j4)(h,{data:(0,o.SU)(p),onRowClick:t.rowClick,onSelectionChange:t.selectionChange,"row-key":t.getRowKey,border:t.border,"max-height":"450","row-style":e.tableRowClassName,"table-layout":"auto"},{append:(0,l.w5)((()=>[(0,l.WI)(e.$slots,"append")])),empty:(0,l.w5)((()=>[(0,l.Wm)(f)])),default:(0,l.w5)((()=>[(0,l.WI)(e.$slots,"default"),((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(y.value,(a=>((0,l.wg)(),(0,l.iD)(l.HY,{key:a},["selection"==a.type||"index"==a.type?((0,l.wg)(),(0,l.j4)(r,(0,l.dG)({key:0},a,{align:a.align??"center","reserve-selection":"selection"==a.type,"show-overflow-tooltip":!0}),null,16,["align","reserve-selection"])):(0,l.kq)("",!0),"expand"===a.type?((0,l.wg)(),(0,l.j4)(r,(0,l.dG)({key:1},a,{align:a.align??"center","show-overflow-tooltip":!0}),{default:(0,l.w5)((t=>[a.render?((0,l.wg)(),(0,l.j4)((0,l.LL)(a.render),{key:0,row:t.row},null,8,["row"])):(0,l.WI)(e.$slots,a.type,{key:1,row:t.row})])),_:2},1040,["align"])):(0,l.kq)("",!0),!a.type&&a.prop&&a.name!==a.prop?((0,l.wg)(),(0,l.j4)(r,(0,l.dG)({key:2},a,{align:a.align??"center","show-overflow-tooltip":!0}),{default:(0,l.w5)((t=>["T_wait_audit"==a.prop?((0,l.wg)(),(0,l.iD)("div",s,(0,n.zw)(1==t.row[a.prop]?"待审核":""),1)):(0,l.kq)("",!0),a.ellipsis?((0,l.wg)(),(0,l.j4)(d,{key:1,effect:"dark",content:t.row[a.prop],placement:"bottom"},{default:(0,l.w5)((()=>[(0,l.Uk)((0,n.zw)(t.row[a.prop]),1)])),_:2},1032,["content"])):(0,l.kq)("",!0),a.fixed?(0,l.WI)(e.$slots,a.fixed,{key:2,row:t.row}):(0,l.kq)("",!0)])),_:2},1040,["align"])):(0,l.kq)("",!0),!a.type&&a.prop&&a.name===a.prop?((0,l.wg)(),(0,l.j4)(r,(0,l.dG)({key:3},a,{align:a.align??"center","show-overflow-tooltip":!0}),{default:(0,l.w5)((t=>[(0,l.WI)(e.$slots,a.prop,{row:t.row})])),_:2},1040,["align"])):(0,l.kq)("",!0)],64)))),128))])),_:3},8,["data","onRowClick","onSelectionChange","row-key","border","row-style"])),[[v,(0,o.SU)(c)]]),(0,l._)("div",u,[e.pagination?((0,l.wg)(),(0,l.j4)(b,{key:0,"current-page":(0,o.SU)(m).pageNum,"onUpdate:currentPage":a[0]||(a[0]=e=>(0,o.SU)(m).pageNum=e),"page-size":(0,o.SU)(m).pageSize,"onUpdate:pageSize":a[1]||(a[1]=e=>(0,o.SU)(m).pageSize=e),layout:t.layout,total:(0,o.SU)(m).total,"page-sizes":[8,10,20,50],onSizeChange:(0,o.SU)(g),onCurrentChange:(0,o.SU)(w)},null,8,["current-page","page-size","layout","total","onSizeChange","onCurrentChange"])):(0,l.kq)("",!0)])])}}});const d=p;var m=d},7264:function(e,a,t){t.r(a),t.d(a,{default:function(){return k}});var l=t(6252),o=t(2262),n=t(1271),r=t(844),i=t(1348),s=t(2531);function u(e){r.T.prompt(e.title,"提示",{confirmButtonText:"立即提交",cancelButtonText:"Cancel",inputPattern:e.regular,draggable:!0,inputErrorMessage:e.errorMessage,inputType:"password"}).then((({value:a})=>{p({id:e.data.id,password:a})})).catch((()=>{i.z8.info("已取消重置密码")}))}const p=async e=>{(0,s._Y)({...e}).then((e=>{e.code&&"更新成功"==e.msg&&i.z8.success(e.msg)}))};var d=t(6115),m=t(4257);const c={class:"dialog-footer"};var g=(0,l.aZ)({__name:"adduser",emits:["event"],setup(e,{expose:a,emit:t}){const n=(0,o.iH)(!1),r=(0,o.iH)(),i=t,u=(0,o.qj)({str:""}),p=(0,o.qj)({nickName:"",username:"",password:""}),d=(0,o.qj)({nickName:[{required:!0,message:"请填写姓名",trigger:"change",pattern:/\S/}],username:[{required:!0,message:"请填写用户名(不能填写中文)",trigger:"change",pattern:/^[a-zA-Z0-9_]{0,}$/}],password:[{required:!0,message:"请填写密码(6-18位)",trigger:"change",pattern:/\S.{5,18}$/}]}),m=async e=>{e&&await e.validate(((e,a)=>{e&&("new"==u.str?w():y())}))},g=e=>{console.log("重置",e),e&&e.resetFields()},w=async()=>{const e=await(0,s.We)(p);200==e.code&&(n.value=!1,i("event","true"))},y=async()=>{const e=await(0,s.FH)(p);200==e.code&&(n.value=!1,i("event","true"))};return a({dialogFormVisible:n,ruleForm:p,data:u,resetForm:g,ruleFormRef:r}),(e,a)=>{const t=(0,l.up)("el-input"),o=(0,l.up)("el-form-item"),i=(0,l.up)("el-form"),s=(0,l.up)("el-button"),g=(0,l.up)("el-dialog");return(0,l.wg)(),(0,l.j4)(g,{modelValue:n.value,"onUpdate:modelValue":a[5]||(a[5]=e=>n.value=e),title:"new"==u.str?"新增用户":"编辑用户","append-to-body":!0,draggable:"",width:"20%",style:{"min-width":"400px"}},{footer:(0,l.w5)((()=>[(0,l._)("span",c,[(0,l.Wm)(s,{onClick:a[3]||(a[3]=e=>n.value=!1)},{default:(0,l.w5)((()=>[(0,l.Uk)("Cancel")])),_:1}),(0,l.Wm)(s,{type:"primary",onClick:a[4]||(a[4]=e=>m(r.value))},{default:(0,l.w5)((()=>[(0,l.Uk)(" 确定 ")])),_:1})])])),default:(0,l.w5)((()=>[(0,l.Wm)(i,{ref_key:"ruleFormRef",ref:r,model:p,rules:d,"label-position":"top"},{default:(0,l.w5)((()=>[(0,l.Wm)(o,{label:"系统姓名","label-width":130,prop:"nickName"},{default:(0,l.w5)((()=>[(0,l.Wm)(t,{modelValue:p.nickName,"onUpdate:modelValue":a[0]||(a[0]=e=>p.nickName=e),autocomplete:"off"},null,8,["modelValue"])])),_:1}),"red"!=u.str?((0,l.wg)(),(0,l.j4)(o,{key:0,label:"登录用户名","label-width":130,prop:"username"},{default:(0,l.w5)((()=>[(0,l.Wm)(t,{modelValue:p.username,"onUpdate:modelValue":a[1]||(a[1]=e=>p.username=e),autocomplete:"off"},null,8,["modelValue"])])),_:1})):(0,l.kq)("",!0),"red"!=u.str?((0,l.wg)(),(0,l.j4)(o,{key:1,label:"登录密码","label-width":130,prop:"password"},{default:(0,l.w5)((()=>[(0,l.Wm)(t,{modelValue:p.password,"onUpdate:modelValue":a[2]||(a[2]=e=>p.password=e),type:"password","show-password":"",autocomplete:"off"},null,8,["modelValue"])])),_:1})):(0,l.kq)("",!0)])),_:1},8,["model","rules"])])),_:1},8,["modelValue","title"])}}});const w=g;var y=w;const f={class:"user"},h={class:"user-conter-table"};var b=(0,l.aZ)({__name:"index",setup(e){const a=(0,o.iH)(),t=(0,o.iH)(),p=async()=>{t.value.dialogFormVisible=!0,t.value.resetForm(t.value.ruleFormRef),t.value.data.str="new";const e=Object.keys(t.value.ruleForm).includes("id");e&&delete t.value.ruleForm.id,Object.keys(t.value.ruleForm).forEach((e=>{t.value.ruleForm[e]=""}))},c=async e=>{t.value.resetForm(t.value.ruleFormRef),t.value.data.str="red",t.value.dialogFormVisible=!0,t.value.ruleForm.nickName=e.nickName,t.value.ruleForm.username=e.username,t.value.ruleForm.id=e.id,t.value.ruleForm.password=""},g=async e=>{u({title:"重置密码操作,请输入新密码",regular:/\S/,errorMessage:"重置密码不能为空",data:e})},w=async e=>{console.log("删除",e),r.T.confirm("删除用户操作,时候继续删除?","提示",{confirmButtonText:"立即删除",cancelButtonText:"Cancel",type:"warning",center:!0}).then((async()=>{b(e.id)})).catch((()=>{i.z8.info("已取消删除操作!")}))},b=async e=>{const t=await(0,s.uK)({id:e,id2:e});200==t.code&&(0,l.Y3)((()=>{a.value?.getTableList()}))},v=async e=>{(0,l.Y3)((()=>{a.value?.getTableList()}))},k=[{type:"index",label:"编号",width:80},{prop:"nickName",label:"名称",width:200},{prop:"username",label:"用户名称",width:200},{prop:"operation",label:"操作",fixed:"right",align:"left","min-width":200}],_=(0,o.qj)({initParam:{username:""},str:""});return(e,r)=>{const i=(0,l.up)("el-input"),u=(0,l.up)("el-form-item"),b=(0,l.up)("el-button");return(0,l.wg)(),(0,l.iD)("div",f,[(0,l.Wm)(n.Z,{isButtom:"查询",onEvent:v},{searchConter:(0,l.w5)((()=>[(0,l.Wm)(u,{label:"用户名称"},{default:(0,l.w5)((()=>[(0,l.Wm)(i,{modelValue:_.initParam.username,"onUpdate:modelValue":r[0]||(r[0]=e=>_.initParam.username=e),placeholder:"请输入用户名",style:{width:"200px"}},null,8,["modelValue"])])),_:1})])),_:1}),(0,l._)("div",h,[(0,l.Wm)(m.Z,{istitle:"用户列表"},{btn:(0,l.w5)((()=>[(0,l.Wm)(b,{type:"primary",onClick:p},{default:(0,l.w5)((()=>[(0,l.Uk)("添加")])),_:1})])),bg:(0,l.w5)((()=>[(0,l.Wm)(d.Z,{ref_key:"TableRef",ref:a,requestApi:(0,o.SU)(s.Lh),columns:k,initParam:_.initParam},{right:(0,l.w5)((({row:e})=>[(0,l.Wm)(b,{type:"primary",onClick:a=>c(e)},{default:(0,l.w5)((()=>[(0,l.Uk)("编辑")])),_:2},1032,["onClick"]),(0,l.Wm)(b,{type:"warning",onClick:a=>g(e)},{default:(0,l.w5)((()=>[(0,l.Uk)("重置密码")])),_:2},1032,["onClick"]),(0,l.Wm)(b,{type:"danger",onClick:a=>w(e)},{default:(0,l.w5)((()=>[(0,l.Uk)("删除")])),_:2},1032,["onClick"])])),_:1},8,["requestApi","initParam"])])),_:1})]),(0,l.Wm)(y,{ref_key:"adduserRef",ref:t,onEvent:v,str:_.str},null,8,["str"])])}}});const v=b;var k=v}}]);
- //# sourceMappingURL=264.4b05b936.js.map
|