| 1 |
- import{_ as J,a as M}from"./Detail.vue_vue_type_script_setup_true_lang-d052f276.js";import{C as U}from"./CusNavigation-b2e56c9f.js";import{p as F}from"./index-d139c558.js";import{d as q,v as w,i as p,n as G,r as _,o as s,y as i,e as o,c as t,f as v,w as a,F as T,Q as K,S as X,t as C,B as Y,D as Z,p as ee,j as te,_ as oe}from"./index-bed2942a.js";import{R as ne}from"./ReloadOutlined-a8f7fbcd.js";const h=g=>(ee("data-v-4395d15d"),g=g(),te(),g),ae={class:"cus-animation",style:{height:"100%",width:"100%",padding:"16px 20px",display:"flex","flex-direction":"column"}},le={style:{display:"flex","justify-content":"space-between","align-items":"flex-end"}},se={style:{display:"flex"}},ie=h(()=>o("span",null,"添加",-1)),de={key:0,style:{color:"green"}},ce={key:1,style:{color:"red"}},_e={key:0},re={key:0},ue=h(()=>o("span",null,"最小值:",-1)),pe=[ue],fe={key:1},me=h(()=>o("span",null,"最大值:",-1)),he=[me],ge={key:2},xe=h(()=>o("span",null,"最大长度:",-1)),ve=[xe],ye={key:3},ke={key:1},we=["onClick"],Ce=["onClick"],be=h(()=>o("a",{style:{"margin-left":"26px"}},"删除",-1)),Se=q({__name:"Index",setup(g){const f=w({pageSize:10,current:1,size:"default",showSizeChanger:!0,showQuickJumper:!0,showTotal:function(e){return`共 ${e} 条数据`},onChange:function(e,n){console.log("111",e,n),this.current=e,this.pageSize=n,u()}}),b=p([]),y=p(!1),r=w({size:20,page:1,sort:"code",order:"asc",keyWord:"",productId:"0"}),u=()=>{y.value=!0,r.size=f.pageSize,r.page=f.current,r.productId=$.value,F({url:"/product-model/search",data:r},e=>{console.log(e),f.total=e.total,b.value=e.data,y.value=!1})},D=function(){f.current=1,u()},k=p(null),N=e=>{var n;console.log(e),(n=k.value)==null||n.add($.value)},S=p(null),W=e=>{var n;console.log(e),(n=S.value)==null||n.show()},j=e=>{console.log(e);const n={id:e.id};F({url:"/product-model/delete",data:n},x=>{console.log(x),Z.info(x.msg),u()})},A=e=>{var n;console.log(e),(n=k.value)==null||n.update(e)},I=e=>{console.log(e),u()},z=p(null),R=w({x:1400}),$=p("0");return G(()=>{var e;R.y=((e=z.value)==null?void 0:e.clientHeight)-113,u()}),(e,n)=>{const x=_("a-button"),O=_("a-tooltip"),E=_("a-input"),L=_("a-form-item"),P=_("a-form"),d=_("a-table-column"),Q=_("a-popconfirm"),V=_("a-table");return s(),i(T,null,[o("div",ae,[t(v(U),{gobackabled:"",title:"通用产品功能"}),o("div",le,[o("div",se,[t(x,{type:"primary",style:{"margin-right":"10px",background:"#0058FF"},onClick:N},{icon:a(()=>[t(v(K))]),default:a(()=>[ie]),_:1}),t(P,{layout:"inline",model:r},{default:a(()=>[t(L,null,{default:a(()=>[t(E,{allowClear:"",value:r.keyWord,"onUpdate:value":n[0]||(n[0]=l=>r.keyWord=l),placeholder:"请输入要查询的内容",style:{width:"280px"}},{suffix:a(()=>[t(O,{title:"点击搜索",onClick:D},{default:a(()=>[t(v(X),{style:{color:"rgba(0, 0, 0, 0.45)"}})]),_:1})]),_:1},8,["value"])]),_:1})]),_:1},8,["model"])]),o("div",null,[t(O,{onClick:u},{default:a(()=>[t(v(ne),{style:{"font-size":"16px"}})]),_:1})])]),o("div",{ref_key:"table_container",ref:z,style:{"margin-top":"9px","border-top":"1px solid #eee",display:"flex","flex-direction":"column",overflow:"hidden",height:"0px","flex-grow":"1"}},[t(V,{"data-source":b.value,pagination:f,scroll:R,bordered:!0,loading:y.value,size:"middle"},{default:a(()=>[t(d,{title:"序号",width:60,fixed:"left",align:"center"},{default:a(({index:l})=>[o("div",null,C(l+1),1)]),_:1}),t(d,{title:"编号","data-index":"code",width:80,fixed:"left",align:"center"}),t(d,{title:"名称","data-index":"name",width:180,fixed:"left",align:"left"}),t(d,{title:"标识符","data-index":"tag",width:120,fixed:"left"}),t(d,{title:"数据类型","data-index":"type",width:120}),t(d,{title:"是否为数组",width:100},{default:a(({record:l})=>{var c;return[o("div",null,[(c=l.define)!=null&&c.isArray?(s(),i("span",de,"是")):(s(),i("span",ce,"否"))])]}),_:1}),t(d,{title:"数据定义","data-index":"define",width:200},{default:a(({record:l})=>{var c,B;return[(c=l.define)!=null&&c.range?(s(),i("div",_e,[(s(!0),i(T,null,Y((B=l.define)==null?void 0:B.range,(H,m)=>(s(),i("div",{key:m},[m=="min"?(s(),i("span",re,pe)):m=="max"?(s(),i("span",fe,he)):m=="len"?(s(),i("span",ge,ve)):(s(),i("span",ye,[o("span",null,C(m)+":",1)])),o("span",null,C(H),1)]))),128))])):(s(),i("div",ke,"未定义"))]}),_:1}),t(d,{title:"描述","data-index":"description","min-width":400}),t(d,{title:"创建时间","data-index":"createTime",width:200}),t(d,{title:"操作",width:200,fixed:"right"},{default:a(({record:l})=>[o("div",null,[o("a",{onClick:c=>W(l)},"查看",8,we),o("a",{style:{"margin-left":"26px"},onClick:c=>A(l)},"编辑",8,Ce),t(Q,{title:"确定删除?",okText:"确定",cancelText:"取消",onConfirm:c=>j(l)},{default:a(()=>[be]),_:2},1032,["onConfirm"])])]),_:1})]),_:1},8,["data-source","pagination","scroll","loading"])],512)]),t(J,{ref_key:"addRef",ref:k,onOnSuccess:I},null,512),t(M,{ref_key:"detailRef",ref:S,onOnSuccess:I},null,512)],64)}}});const Be=oe(Se,[["__scopeId","data-v-4395d15d"]]);export{Be as default};
|