| 1 |
- System.register(["./index-legacy-f44ab23b.js","./index-legacy-db54d967.js","./CusNavigation.vue_vue_type_style_index_0_scoped_5e63f475_lang-legacy-aeac0d75.js","./CusNavigation-legacy-868eec01.js","./ReloadOutlined-legacy-dace4f0f.js"],(function(e,t){"use strict";var n,a,o,l,i,r,u,c,d,f,s,p,v,g,b,m,h,x,y,w,_,k,C,z,F,S,j,O,T;return{setters:[function(e){n=e.d,a=e.i,o=e.y,l=e.l,i=e.q,r=e.r,u=e.o,c=e.b,d=e.w,f=e.C,s=e.c,p=e.B,v=e.a,g=e.s,b=e.e,m=e.f,h=e.F,x=e.h,y=e.D,w=e.S,_=e.x,k=e.I,C=e.t,z=e.p,F=e.j,S=e._},function(e){j=e.p},null,function(e){O=e.C},function(e){T=e.R}],execute:function(){var t=document.createElement("style");t.textContent="[data-v-f9b2cff5] .ant-table-wrapper{height:0px;flex-grow:1}[data-v-f9b2cff5] .ant-spin-nested-loading{height:100%}[data-v-f9b2cff5] .ant-spin-container{height:100%;display:flex;flex-direction:column}[data-v-f9b2cff5] .ant-table{flex-grow:1;height:0px}[data-v-f9b2cff5] .ant-table-container{height:100%}[data-v-f9b2cff5] .ant-table-body{overflow-y:auto!important;height:100%;border-bottom:1px solid #eee;border-right:1px solid #eee}[data-v-f9b2cff5] .ant-table-body::-webkit-scrollbar{width:1px;height:8px;background:#0058FF}[data-v-f9b2cff5] .ant-table-body::-webkit-scrollbar-track{width:1px;background:#eee}[data-v-f9b2cff5] .ant-table-body::-webkit-scrollbar-thumb{width:1px;background:#0058FF}[data-v-f9b2cff5] .ant-table-body::-webkit-scrollbar-thumb:hover{background:#0058FF}[data-v-f9b2cff5] .ant-table-body::-webkit-scrollbar-corner{width:1px;background:#eee}.cus-forbidden[data-v-f9b2cff5]:hover{cursor:not-allowed}\n",document.head.appendChild(t);var U=n({__name:"Add",emits:["onSuccess"],setup:function(e,t){var n=t.expose,v=t.emit,g=a(null),b=a(!1),m=a(!0),h=o({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=m.value?"/product/add":"/product/edit",j({url:e,data:h},(function(e){console.log(e),p.info(e.msg),w(),v("onSuccess",e)}))}),(function(){console.log("22")}))},y=function(){b.value=!0},w=function(){b.value=!1};return l((function(){console.log("onMounted")})),i((function(){console.log("onUnmounted")})),n({add:function(){var e;m.value=!0,f(h),null===(e=g.value)||void 0===e||e.clearValidate(),y()},update:function(e){var t;m.value=!1,Object.assign(h,e),null===(t=g.value)||void 0===t||t.clearValidate(),y()}}),function(e,t){var n=r("a-input"),a=r("a-form-item"),o=r("a-textarea"),l=r("a-form"),i=r("a-modal");return u(),c(i,{title:"添加产品",visible:b.value,"onUpdate:visible":t[2]||(t[2]=function(e){return b.value=e}),maskClosable:!1,width:480,cancelText:"取消",okText:"确定",onOk:x},{default:d((function(){return[s(l,{ref_key:"formRef",ref:g,model:h,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:"产品名称",name:"name",rules:[{required:!0,message:"请输入产品名称!"}]},{default:d((function(){return[s(n,{size:"large",value:h.name,"onUpdate:value":t[0]||(t[0]=function(e){return h.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(o,{value:h.description,"onUpdate:value":t[1]||(t[1]=function(e){return h.description=e}),placeholder:"请输入描述","allow-clear":""},null,8,["value"])]})),_:1})]})),_:1},8,["model"])]})),_:1},8,["visible"])}}}),q=function(e){return z("data-v-f9b2cff5"),e=e(),F(),e},R={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"}},N=q((function(){return b("span",null,"添加",-1)})),V=["onClick"],A=["onClick"],B=q((function(){return b("a",{style:{"margin-left":"26px"}},"删除",-1)}));e("default",S(n({__name:"Index",setup:function(e){var t=a(null),n=o({x:1300}),i=o({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=o({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")},q=function(){i.current=1,F()},D=a(null),E=function(e){var t;console.log(e),null===(t=D.value)||void 0===t||t.add()},H=v(),J=function(e){console.log(e),F()};return l((function(){var e;n.y=(null===(e=t.value)||void 0===e?void 0:e.clientHeight)-113,F()})),function(e,a){var o=r("a-button"),l=r("a-tooltip"),v=r("a-input"),K=r("a-form-item"),L=r("a-form"),M=r("a-table-column"),Q=r("a-popconfirm"),G=r("a-table");return u(),g(h,null,[b("div",R,[s(m(O),{title:"产品"}),b("div",I,[b("div",W,[s(o,{type:"primary",style:{"margin-right":"10px",background:"#0058FF"},onClick:E},{icon:d((function(){return[s(m(y))]})),default:d((function(){return[N]})),_:1}),s(L,{layout:"inline",model:z},{default:d((function(){return[s(K,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(l,{title:"点击搜索",onClick:q},{default:d((function(){return[s(m(w),{style:{color:"rgba(0, 0, 0, 0.45)"}})]})),_:1})]})),_:1},8,["value"])]})),_:1})]})),_:1},8,["model"])]),b("div",null,[s(l,{onClick:S},{title:d((function(){return[_("通用功能")]})),default:d((function(){return[s(m(k),{style:{"font-size":"16px","margin-right":"20px"}})]})),_:1}),s(l,{onClick:F,placement:"topLeft"},{title:d((function(){return[_("刷新列表")]})),default:d((function(){return[s(m(T),{style:{"font-size":"16px"}})]})),_:1})])]),b("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(M,{title:"序号",width:60,fixed:"left",align:"center"},{default:d((function(e){var t=e.index;return[b("div",null,C(t+1),1)]})),_:1}),s(M,{title:"名称","data-index":"name",width:300,fixed:"left",align:"center"}),s(M,{title:"描述","data-index":"description","min-width":200}),s(M,{title:"创建时间","data-index":"createtime",width:200}),s(M,{title:"操作",width:200,fixed:"right"},{default:d((function(e){var t=e.record;return[b("div",null,[b("a",{onClick:function(e){return function(e){console.log(e),H.push("/"+x+"/product/detail/"+e.code)}(t)}},"查看",8,V),b("a",{style:{"margin-left":"26px"},onClick:function(e){return function(e){var t;console.log(e),null===(t=D.value)||void 0===t||t.update(e)}(t)}},"编辑",8,A),s(Q,{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[B]})),_:2},1032,["onConfirm"])])]})),_:1})]})),_:1},8,["data-source","pagination","scroll","loading"])],512)]),s(U,{ref_key:"addRef",ref:D,onOnSuccess:J},null,512)],64)}}}),[["__scopeId","data-v-f9b2cff5"]]))}}}));
|