1 |
- import{d as H,L as J,r as s,f as L,x as Q,Q as E,o as p,c as P,i as a,w as t,a as r,F as S,A as M,j as m,R as O,m as c,B as f,z as W,C as X,D as Y,G as Z,V as $,_ as ee,q as ae,H as le,I as te,J as re,K as oe}from"./index-03f5d926.js";import{_ as pe}from"./index.vue_vue_type_script_setup_true_lang-e704331b.js";import{_ as se}from"./ContentWrap.vue_vue_type_script_setup_true_lang-48ba01fb.js";import{d as ie}from"./formatTime-f911d219.js";import{g as ne,a as de,d as ue}from"./property-1dbc4d69.js";import{_ as me}from"./ValueForm.vue_vue_type_script_setup_true_lang-1dbaaf8d.js";import{u as ce}from"./useMessage-2e335eca.js";import"./index-662200b7.js";import"./el-card-0ac51a7f.js";import"./Dialog-05c67d4e.js";import"./_plugin-vue_export-helper-1b428a4d.js";const fe=H({name:"ProductPropertyValue",__name:"index",setup(ye){const k=ce(),{t:z}=W(),{params:F}=J(),y=s(!0),h=s(0),v=s([]),o=L({pageNo:1,pageSize:10,propertyId:Number(F.propertyId),name:void 0}),x=s(),C=s([]),i=async()=>{y.value=!0;try{const n=await de(o);v.value=n.list,h.value=n.total}finally{y.value=!1}},_=()=>{o.pageNo=1,i()},R=()=>{x.value.resetFields(),_()},I=s(),V=(n,e)=>{I.value.open(n,o.propertyId,e)};return Q(async()=>{await i(),C.value.push(await ne(o.propertyId))}),(n,e)=>{const U=X,q=Y,g=Z,D=$,w=ee,d=ae,K=le,N=se,u=te,T=re,j=pe,b=E("hasPermi"),A=oe;return p(),P(S,null,[a(N,null,{default:t(()=>[a(K,{class:"-mb-15px",model:r(o),ref_key:"queryFormRef",ref:x,inline:!0,"label-width":"68px"},{default:t(()=>[a(g,{label:"\u5C5E\u6027\u9879",prop:"propertyId"},{default:t(()=>[a(q,{modelValue:r(o).propertyId,"onUpdate:modelValue":e[0]||(e[0]=l=>r(o).propertyId=l),class:"!w-240px",disabled:""},{default:t(()=>[(p(!0),P(S,null,M(r(C),l=>(p(),m(U,{key:l.id,label:l.name,value:l.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),a(g,{label:"\u540D\u79F0",prop:"name"},{default:t(()=>[a(D,{modelValue:r(o).name,"onUpdate:modelValue":e[1]||(e[1]=l=>r(o).name=l),placeholder:"\u8BF7\u8F93\u5165\u540D\u79F0",clearable:"",onKeyup:O(_,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),a(g,null,{default:t(()=>[a(d,{onClick:_},{default:t(()=>[a(w,{icon:"ep:search",class:"mr-5px"}),e[5]||(e[5]=c(" \u641C\u7D22"))]),_:1}),a(d,{onClick:R},{default:t(()=>[a(w,{icon:"ep:refresh",class:"mr-5px"}),e[6]||(e[6]=c(" \u91CD\u7F6E"))]),_:1}),f((p(),m(d,{plain:"",type:"primary",onClick:e[2]||(e[2]=l=>V("create"))},{default:t(()=>[a(w,{icon:"ep:plus",class:"mr-5px"}),e[7]||(e[7]=c(" \u65B0\u589E "))]),_:1})),[[b,["product:property:create"]]])]),_:1})]),_:1},8,["model"])]),_:1}),a(N,null,{default:t(()=>[f((p(),m(T,{data:r(v)},{default:t(()=>[a(u,{label:"\u7F16\u53F7",align:"center","min-width":"60",prop:"id"}),a(u,{label:"\u5C5E\u6027\u503C\u540D\u79F0",align:"center","min-width":"150",prop:"name"}),a(u,{label:"\u5907\u6CE8",align:"center",prop:"remark","show-overflow-tooltip":!0}),a(u,{label:"\u521B\u5EFA\u65F6\u95F4",align:"center",prop:"createTime",width:"180",formatter:r(ie)},null,8,["formatter"]),a(u,{label:"\u64CD\u4F5C",align:"center"},{default:t(l=>[f((p(),m(d,{link:"",type:"primary",onClick:B=>V("update",l.row.id)},{default:t(()=>e[8]||(e[8]=[c(" \u7F16\u8F91 ")])),_:2},1032,["onClick"])),[[b,["product:property:update"]]]),f((p(),m(d,{link:"",type:"danger",onClick:B=>(async G=>{try{await k.delConfirm(),await ue(G),k.success(z("common.delSuccess")),await i()}catch{}})(l.row.id)},{default:t(()=>e[9]||(e[9]=[c(" \u5220\u9664 ")])),_:2},1032,["onClick"])),[[b,["product:property:delete"]]])]),_:1})]),_:1},8,["data"])),[[A,r(y)]]),a(j,{total:r(h),page:r(o).pageNo,"onUpdate:page":e[3]||(e[3]=l=>r(o).pageNo=l),limit:r(o).pageSize,"onUpdate:limit":e[4]||(e[4]=l=>r(o).pageSize=l),onPagination:i},null,8,["total","page","limit"])]),_:1}),a(me,{ref_key:"formRef",ref:I,onSuccess:i},null,512)],64)}}});export{fe as default};
|