| 1 |
- System.register(["./index-legacy-4d01450a.js","./index-legacy-755e9f4a.js","./CusNavigation-legacy-6c20afcf.js","./ReloadOutlined-legacy-525c1ef3.js"],(function(e,t){"use strict";var n,a,l,o,i,r,u,c,d,f,s,p,v,g,m,h,b,x,y,w,k,_,C,z,F,S,j,T,U;return{setters:[function(e){n=e.d,a=e.i,l=e.v,o=e.n,i=e.x,r=e.r,u=e.o,c=e.b,d=e.w,f=e.J,s=e.c,p=e.D,v=e.a,g=e.y,m=e.e,h=e.f,b=e.F,x=e.h,y=e.Q,w=e.S,k=e.C,_=e.R,C=e.t,z=e.p,F=e.j,S=e._},function(e){j=e.p},function(e){T=e.C},function(e){U=e.R}],execute:function(){var t=document.createElement("style");t.textContent="[data-v-2c80d8cf] .ant-table-wrapper{height:0px;flex-grow:1}[data-v-2c80d8cf] .ant-spin-nested-loading{height:100%}[data-v-2c80d8cf] .ant-spin-container{height:100%;display:flex;flex-direction:column}[data-v-2c80d8cf] .ant-table{flex-grow:1;height:0px}[data-v-2c80d8cf] .ant-table-container{height:100%}[data-v-2c80d8cf] .ant-table-body{overflow-y:auto!important;height:100%;border-bottom:1px solid #eee;border-right:1px solid #eee}[data-v-2c80d8cf] .ant-table-body::-webkit-scrollbar{width:1px;height:8px;background:#0058FF}[data-v-2c80d8cf] .ant-table-body::-webkit-scrollbar-track{width:1px;background:#eee}[data-v-2c80d8cf] .ant-table-body::-webkit-scrollbar-thumb{width:1px;background:#0058FF}[data-v-2c80d8cf] .ant-table-body::-webkit-scrollbar-thumb:hover{background:#0058FF}[data-v-2c80d8cf] .ant-table-body::-webkit-scrollbar-corner{width:1px;background:#eee}.cus-forbidden[data-v-2c80d8cf]:hover{cursor:not-allowed}\n",document.head.appendChild(t);var O=n({__name:"Add",emits:["onSuccess"],setup:function(e,t){var n=t.expose,v=t.emit,g=a(null),m=a(!1),h=a(!0),b=l({id:void 0,name:"",description:""}),x=function(e){var t;console.log("handleOK",e),null===(t=g.value)||void 0===t||t.validate().then((function(){var e;console.log("11"),e="",e=h.value?"/product/add":"/product/update",j({url:e,data:b},(function(e){console.log(e),p.info(e.msg),w(),v("onSuccess",e)}))}),(function(){console.log("22")}))},y=function(){m.value=!0},w=function(){m.value=!1};return o((function(){console.log("onMounted")})),i((function(){console.log("onUnmounted")})),n({add:function(){var e;h.value=!0,f(b),null===(e=g.value)||void 0===e||e.clearValidate(),y()},update:function(e){var t;h.value=!1,Object.assign(b,e),null===(t=g.value)||void 0===t||t.clearValidate(),y()}}),function(e,t){var n=r("a-input"),a=r("a-form-item"),l=r("a-textarea"),o=r("a-form"),i=r("a-modal");return u(),c(i,{title:"添加产品",visible:m.value,"onUpdate:visible":t[3]||(t[3]=function(e){return m.value=e}),maskClosable:!1,width:480,cancelText:"取消",okText:"确定",onOk:x},{default:d((function(){return[s(o,{ref_key:"formRef",ref:g,model:b,name:"basic","label-align":"left","label-col":{span:4},"wrapper-col":{span:20},autocomplete:"off",layout:"vertical"},{default:d((function(){return[s(a,{"wrapper-col":{offset:0,span:24},label:"ID",name:"id",rules:[{required:!0,message:"请输入产品编号!"}]},{default:d((function(){return[s(n,{size:"large",value:b.id,"onUpdate:value":t[0]||(t[0]=function(e){return b.id=e})},null,8,["value"])]})),_:1}),s(a,{"wrapper-col":{offset:0,span:24},label:"产品名称",name:"name",rules:[{required:!0,message:"请输入产品名称!"}]},{default:d((function(){return[s(n,{size:"large",value:b.name,"onUpdate:value":t[1]||(t[1]=function(e){return b.name=e})},null,8,["value"])]})),_:1}),s(a,{"wrapper-col":{offset:0,span:24},label:"描述",name:"description",rules:[{required:!1,message:"请输入产品描述!"}]},{default:d((function(){return[s(l,{value:b.description,"onUpdate:value":t[2]||(t[2]=function(e){return b.description=e}),placeholder:"请输入描述","allow-clear":""},null,8,["value"])]})),_:1})]})),_:1},8,["model"])]})),_:1},8,["visible"])}}}),R=function(e){return z("data-v-2c80d8cf"),e=e(),F(),e},q={class:"cus-animation",style:{height:"100%",width:"100%",padding:"16px 20px",display:"flex","flex-direction":"column"}},I={style:{display:"flex","justify-content":"space-between","align-items":"flex-end"}},W={style:{display:"flex"}},D=R((function(){return m("span",null,"添加",-1)})),J=["onClick"],Q=["onClick"],V=R((function(){return m("a",{style:{"margin-left":"26px"}},"删除",-1)}));e("default",S(n({__name:"Index",setup:function(e){var t=a(null),n=l({x:1300}),i=l({pageSize:20,current:1,size:"default",showSizeChanger:!0,showQuickJumper:!0,showTotal:function(e){return"共 ".concat(e," 条数据")},onChange:function(e,t){console.log("111",e,t),this.current=e,this.pageSize=t,F()}}),c=a([]),f=a(!1),z=l({size:20,page:1,sort:"createtime",order:"desc",keyWord:""}),F=function(){f.value=!0,z.size=i.pageSize,z.page=i.current,j({url:"/product/search",data:z},(function(e){console.log(e),i.total=e.total,c.value=e.data,f.value=!1}),(function(e){p.error(e),f.value=!1}))},S=function(){H.push("/"+x+"/product/common")},R=function(){i.current=1,F()},A=a(null),E=function(e){var t;console.log(e),null===(t=A.value)||void 0===t||t.add()},H=v(),K=function(e){console.log(e),F()};return o((function(){var e;n.y=(null===(e=t.value)||void 0===e?void 0:e.clientHeight)-113,F()})),function(e,a){var l=r("a-button"),o=r("a-tooltip"),v=r("a-input"),L=r("a-form-item"),M=r("a-form"),N=r("a-table-column"),B=r("a-popconfirm"),G=r("a-table");return u(),g(b,null,[m("div",q,[s(h(T),{title:"产品"}),m("div",I,[m("div",W,[s(l,{type:"primary",style:{"margin-right":"10px",background:"#0058FF"},onClick:E},{icon:d((function(){return[s(h(y))]})),default:d((function(){return[D]})),_:1}),s(M,{layout:"inline",model:z},{default:d((function(){return[s(L,null,{default:d((function(){return[s(v,{allowClear:"",value:z.keyWord,"onUpdate:value":a[0]||(a[0]=function(e){return z.keyWord=e}),placeholder:"请输入要查询的内容",style:{width:"280px"}},{suffix:d((function(){return[s(o,{title:"点击搜索",onClick:R},{default:d((function(){return[s(h(w),{style:{color:"rgba(0, 0, 0, 0.45)"}})]})),_:1})]})),_:1},8,["value"])]})),_:1})]})),_:1},8,["model"])]),m("div",null,[s(o,{onClick:S},{title:d((function(){return[k("通用功能")]})),default:d((function(){return[s(h(_),{style:{"font-size":"16px","margin-right":"20px"}})]})),_:1}),s(o,{onClick:F,placement:"topLeft"},{title:d((function(){return[k("刷新列表")]})),default:d((function(){return[s(h(U),{style:{"font-size":"16px"}})]})),_:1})])]),m("div",{ref_key:"table_container",ref:t,style:{"margin-top":"9px","border-top":"1px solid #eee",display:"flex","flex-direction":"column",overflow:"hidden",height:"0px","flex-grow":"1"}},[s(G,{"data-source":c.value,pagination:i,scroll:n,bordered:!0,loading:f.value,size:"middle"},{default:d((function(){return[s(N,{title:"序号",width:60,fixed:"left",align:"center"},{default:d((function(e){var t=e.index;return[m("div",null,C(t+1),1)]})),_:1}),s(N,{title:"产品编号","data-index":"id",width:200,fixed:"left",align:"center"}),s(N,{title:"产品名称","data-index":"name",width:200,fixed:"left"}),s(N,{title:"描述","data-index":"description","min-width":200}),s(N,{title:"创建时间","data-index":"createTime",width:200}),s(N,{title:"操作",width:200,fixed:"right"},{default:d((function(e){var t=e.record;return[m("div",null,[m("a",{onClick:function(e){return function(e){console.log(e),H.push("/"+x+"/product/detail/"+e.id)}(t)}},"查看",8,J),m("a",{style:{"margin-left":"26px"},onClick:function(e){return function(e){var t;console.log(e),null===(t=A.value)||void 0===t||t.update(e)}(t)}},"编辑",8,Q),s(B,{title:"确定删除?",okText:"确定",cancelText:"取消",onConfirm:function(e){return function(e){console.log(e);var t={id:e.id};j({url:"/product/delete",data:t},(function(e){console.log(e),p.info(e.msg),F()}))}(t)}},{default:d((function(){return[V]})),_:2},1032,["onConfirm"])])]})),_:1})]})),_:1},8,["data-source","pagination","scroll","loading"])],512)]),s(O,{ref_key:"addRef",ref:A,onOnSuccess:K},null,512)],64)}}}),[["__scopeId","data-v-2c80d8cf"]]))}}}));
|