| 1 |
- !function(){function e(e){return function(e){if(Array.isArray(e))return t(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,n){if(e){if("string"==typeof e)return t(e,n);var a={}.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?t(e,n):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=Array(t);n<t;n++)a[n]=e[n];return a}System.register(["./index-legacy-7f6656e1.js","./index-legacy-c2eb0980.js","./CusNavigation.vue_vue_type_style_index_0_scoped_5a71d35e_lang-legacy-2e6df359.js","./CusNavigation-legacy-ce721f1c.js","./ReloadOutlined-legacy-23a37b93.js"],function(t,n){"use strict";var a,o,l,r,i,u,c,d,f,s,p,v,g,b,m,h,y,x,w,_,k,C,S,z,j,F,A;return{setters:[function(e){a=e.d,o=e.i,l=e.v,r=e.k,i=e.n,u=e.o,c=e.b,d=e.w,f=e.H,s=e.r,p=e.c,v=e.y,g=e.a,b=e.p,m=e.e,h=e.f,y=e.F,x=e.h,w=e.J,_=e.S,k=e.s,C=e.N,S=e.t,z=e._},function(e){j=e.p},null,function(e){F=e.C},function(e){A=e.R}],execute:function(){var n=document.createElement("style");n.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(n);var O=a({__name:"Add",emits:["onSuccess"],setup:function(e,t){var n=t.expose,a=t.emit,g=o(null),b=o(!1),m=o(!0),h=a,y=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=m.value?"/product/add":"/product/edit",j({url:e,data:y},function(e){console.log(e),v.info(e.msg),_(),h("onSuccess",e)})},function(){console.log("22")})},w=function(){b.value=!0},_=function(){b.value=!1};return r(function(){console.log("onMounted")}),i(function(){console.log("onUnmounted")}),n({add:function(){var e;m.value=!0,f(y),null===(e=g.value)||void 0===e||e.clearValidate(),w()},update:function(e){var t;m.value=!1,Object.assign(y,e),null===(t=g.value)||void 0===t||t.clearValidate(),w()}}),function(e,t){var n=s("a-input"),a=s("a-form-item"),o=s("a-textarea"),l=s("a-form"),r=s("a-modal");return u(),c(r,{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[p(l,{ref_key:"formRef",ref:g,model:y,name:"basic","label-align":"left","label-col":{span:4},"wrapper-col":{span:20},autocomplete:"off",layout:"vertical"},{default:d(function(){return[p(a,{"wrapper-col":{offset:0,span:24},label:"产品名称",name:"name",rules:[{required:!0,message:"请输入产品名称!"}]},{default:d(function(){return[p(n,{size:"large",value:y.name,"onUpdate:value":t[0]||(t[0]=function(e){return y.name=e})},null,8,["value"])]}),_:1}),p(a,{"wrapper-col":{offset:0,span:24},label:"描述",name:"description",rules:[{required:!1,message:"请输入产品描述!"}]},{default:d(function(){return[p(o,{value:y.description,"onUpdate:value":t[1]||(t[1]=function(e){return y.description=e}),placeholder:"请输入描述","allow-clear":""},null,8,["value"])]}),_:1})]}),_:1},8,["model"])]}),_:1},8,["visible"])}}}),T={class:"cus-animation",style:{height:"100%",width:"100%",padding:"16px 20px",display:"flex","flex-direction":"column"}},U={style:{display:"flex","justify-content":"space-between","align-items":"flex-end"}},I={style:{display:"flex"}},R=["onClick"],q=["onClick"];t("default",z(a({__name:"Index",setup:function(t){var n=o(null),a=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,N()}}),c=o([]),f=o(!1),z=l({size:20,page:1,sort:"createtime",order:"desc",keyWord:""}),N=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){v.error(e),f.value=!1})},W=function(){M.push("/"+x+"/product/common")},E=function(){i.current=1,N()},H=o(null),J=function(e){var t;console.log(e),null===(t=H.value)||void 0===t||t.add()},M=g(),V=function(e){console.log(e),N()};return r(function(){var e;a.y=(null===(e=n.value)||void 0===e?void 0:e.clientHeight)-113,N()}),function(t,o){var l=s("a-button"),r=s("a-tooltip"),g=s("a-input"),K=s("a-form-item"),L=s("a-form"),Q=s("a-table-column"),$=s("a-popconfirm"),B=s("a-table");return u(),b(y,null,[m("div",T,[p(h(F),{title:"产品"}),m("div",U,[m("div",I,[p(l,{type:"primary",style:{"margin-right":"10px",background:"#0058FF"},onClick:J},{icon:d(function(){return[p(h(w))]}),default:d(function(){return[o[1]||(o[1]=m("span",null,"添加",-1))]}),_:1}),p(L,{layout:"inline",model:z},{default:d(function(){return[p(K,null,{default:d(function(){return[p(g,{allowClear:"",value:z.keyWord,"onUpdate:value":o[0]||(o[0]=function(e){return z.keyWord=e}),placeholder:"请输入要查询的内容",style:{width:"280px"}},{suffix:d(function(){return[p(r,{title:"点击搜索",onClick:E},{default:d(function(){return[p(h(_),{style:{color:"rgba(0, 0, 0, 0.45)"}})]}),_:1})]}),_:1},8,["value"])]}),_:1})]}),_:1},8,["model"])]),m("div",null,[p(r,{onClick:W},{title:d(function(){return e(o[2]||(o[2]=[k("通用功能",-1)]))}),default:d(function(){return[p(h(C),{style:{"font-size":"16px","margin-right":"20px"}})]}),_:1}),p(r,{onClick:N,placement:"topLeft"},{title:d(function(){return e(o[3]||(o[3]=[k("刷新列表",-1)]))}),default:d(function(){return[p(h(A),{style:{"font-size":"16px"}})]}),_:1})])]),m("div",{ref_key:"table_container",ref:n,style:{"margin-top":"9px","border-top":"1px solid #eee",display:"flex","flex-direction":"column",overflow:"hidden",height:"0px","flex-grow":"1"}},[p(B,{"data-source":c.value,pagination:i,scroll:a,bordered:!0,loading:f.value,size:"middle"},{default:d(function(){return[p(Q,{title:"序号",width:60,fixed:"left",align:"center"},{default:d(function(e){var t=e.index;return[m("div",null,S(t+1),1)]}),_:1}),p(Q,{title:"名称","data-index":"name",width:300,fixed:"left",align:"center"}),p(Q,{title:"描述","data-index":"description","min-width":200}),p(Q,{title:"创建时间","data-index":"createtime",width:200}),p(Q,{title:"操作",width:200,fixed:"right"},{default:d(function(t){var n=t.record;return[m("div",null,[m("a",{onClick:function(e){return function(e){console.log(e),M.push("/"+x+"/product/detail/"+e.code)}(n)}},"查看",8,R),m("a",{style:{"margin-left":"26px"},onClick:function(e){return function(e){var t;console.log(e),null===(t=H.value)||void 0===t||t.update(e)}(n)}},"编辑",8,q),p($,{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),v.info(e.msg),N()})}(n)}},{default:d(function(){return e(o[4]||(o[4]=[m("a",{style:{"margin-left":"26px"}},"删除",-1)]))}),_:1},8,["onConfirm"])])]}),_:1})]}),_:1},8,["data-source","pagination","scroll","loading"])],512)]),p(O,{ref_key:"addRef",ref:H,onOnSuccess:V},null,512)],64)}}}),[["__scopeId","data-v-f9b2cff5"]]))}}})}();
|