包含后厨 团餐 门店分支
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

2 lines
47 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[8865],{64317:function($a,Re,o){"use strict";var oe=o(28991),Le=o(81253),Xe=o(85893),Ce=o(22270),Fe=o(67294),K=o(66758),r=o(31649),b=["fieldProps","children","params","proFieldProps","mode","valueEnum","request","showSearch","options"],za=["fieldProps","children","params","proFieldProps","mode","valueEnum","request","options"],Se=Fe.forwardRef(function(c,Me){var ge=c.fieldProps,fe=c.children,je=c.params,s=c.proFieldProps,Te=c.mode,se=c.valueEnum,We=c.request,de=c.showSearch,Ke=c.options,we=(0,Le.Z)(c,b),Ne=(0,Fe.useContext)(K.Z);return(0,Xe.jsx)(r.Z,(0,oe.Z)((0,oe.Z)({valueEnum:(0,Ce.h)(se),request:We,params:je,valueType:"select",filedConfig:{customLightMode:!0},fieldProps:(0,oe.Z)({options:Ke,mode:Te,showSearch:de,getPopupContainer:Ne.getPopupContainer},ge),ref:Me,proFieldProps:s},we),{},{children:fe}))}),h=Fe.forwardRef(function(c,Me){var ge=c.fieldProps,fe=c.children,je=c.params,s=c.proFieldProps,Te=c.mode,se=c.valueEnum,We=c.request,de=c.options,Ke=(0,Le.Z)(c,za),we=(0,oe.Z)({options:de,mode:Te||"multiple",labelInValue:!0,showSearch:!0,showArrow:!1,autoClearSearchValue:!0,optionLabelProp:"label"},ge),Ne=(0,Fe.useContext)(K.Z);return(0,Xe.jsx)(r.Z,(0,oe.Z)((0,oe.Z)({valueEnum:(0,Ce.h)(se),request:We,params:je,valueType:"select",filedConfig:{customLightMode:!0},fieldProps:(0,oe.Z)({getPopupContainer:Ne.getPopupContainer},we),ref:Me,proFieldProps:s},Ke),{},{children:fe}))}),Ja=Se,$e=h,Oe=Ja;Oe.SearchSelect=$e,Oe.displayName="ProFormComponent",Re.Z=Oe},97958:function($a,Re,o){"use strict";o.r(Re),o.d(Re,{default:function(){return Tt}});var oe=o(18106),Le=o(95562),Xe=o(58024),Ce=o(91894),Fe=o(57663),K=o(71577),r=o(39428),b=o(3182),za=o(62350),Se=o(24565),h=o(2824),Ja=o(43185),$e=o(93009),Oe=o(34792),c=o(48086),Me=o(402),ge=o(56256),fe=o(49101),je=o(6700),s=o(67294),Te=o(28790),se=o(16894),We=o(71194),de=o(50146),Ke=o(22385),we=o(45777),Ne=o(77883),_e=o(85986),wt=o(49111),_a=o(19650),Et=o(88983),$=o(47933),Bt=o(47673),k=o(4107),It=o(9715),m=o(55843),Vt=o(43358),_=o(34041),et=o(54549),at=o(1870),tt=[{value:"L/min",label:"\u5347/\u6BCF\u5206\u949F"},{value:"mg/kg",label:"\u6BEB\u514B/\u6BCF\u5343\u514B"},{value:"NTU",label:"\u6D4A\u5EA6"},{value:"pH",label:"PH\u503C"},{value:"dS/m",label:"\u571F\u58E4EC\u503C"},{value:"W/\u33A1",label:"\u592A\u9633\u603B\u8F90\u5C04"},{value:"mm/hour",label:"\u964D\u96E8\u91CF"},{value:"var",label:"\u4E4F"},{value:"cP",label:"\u5398\u6CCA"},{value:"aw",label:"\u9971\u548C\u5EA6"},{value:"pcs",label:"\u4E2A"},{value:"cst",label:"\u5398\u65AF"},{value:"bar",label:"\u5DF4"},{value:"ppt",label:"\u7EB3\u514B/\u6BCF\u5347"},{value:"ppb",label:"\u5FAE\u514B/\u6BCF\u5347"},{value:"uS/cm",label:"\u5FAE\u897F/\u6BCF\u5398\u7C73"},{value:"N/C",label:"\u725B\u987F/\u6BCF\u5E93\u4ED1"},{value:"V/m",label:"\u4F0F\u7279/\u6BCF\u7C73"},{value:"ml/min",label:"\u6EF4\u901F"},{value:"mmHg",label:"\u6BEB\u7C73\u6C5E\u67F1"},{value:"mmol/L",label:"\u8840\u7CD6"},{value:"mm/s",label:"\u6BEB\u7C73/\u6BCF\u79D2"},{value:"turn/m",label:"\u8F6C\u6BCF/\u5206\u949F"},{value:"count",label:"\u6B21"},{value:"gear",label:"\u6863"},{value:"stepCount",label:"\u6B65"},{value:"Nm3/h",label:"\u6807\u51C6\u7ACB\u65B9\u7C73/\u6BCF\u5C0F\u65F6"},{value:"kV",label:"\u5343\u4F0F"},{value:"kVA",label:"\u5343\u4F0F\u5B89"},{value:"kVar",label:"\u5343\u4E4F"},{value:"uw/cm2",label:"\u5FAE\u74E6/\u6BCF\u5E73\u65B9\u5398\u7C73"},{value:"\u53EA",label:"\u53EA"},{value:"%RH",label:"\u76F8\u5BF9\u6E7F\u5EA6"},{value:"m\xB3/s",label:"\u7ACB\u65B9\u7C73\u6BCF\u79D2"},{value:"kg/s",label:"\u516C\u65A4/\u6BCF\u79D2"},{value:"r/min",label:"\u8F6C/\u6BCF\u5206\u949F"},{value:"t/h",label:"\u5428/\u6BCF\u5C0F\u65F6"},{value:"KCL/h",label:"\u5343\u5361/\u6BCF\u5C0F\u65F6"},{value:"L/s",label:"\u5347\u6BCF\u79D2"},{value:"Mpa",label:"\u5146\u5E15"},{value:"m\xB3/h",label:"\u7ACB\u65B9\u7C73/\u6BCF\u5C0F\u65F6"},{value:"kvarh",label:"\u5343\u4E4F\u65F6"},{value:"\u03BCg/L",label:"\u5FAE\u514B/\u6BCF\u5347"},{value:"kcal",label:"\u5343\u5361\u8DEF\u91CC"},{value:"GB",label:"\u5409\u5B57\u8282"},{value:"MB",label:"\u5146\u5B57\u8282"},{value:"KB",label:"\u5343\u5B57\u8282"},{value:"B",label:"\u5B57\u8282"},{value:"\u03BCg/(d\u33A1\xB7d)",label:"\u5FAE\u514B/\u6BCF\u5E73\u65B9\u5206\u7C73/\u6BCF\u5929"},{value:"",label:"\u65E0"},{value:"ppm",label:"\u767E\u4E07\u5206\u7387"},{value:"pixel",label:"\u50CF\u7D20"},{value:"Lux",label:"\u7167\u5EA6"},{value:"grav",label:"\u91CD\u529B\u52A0\u901F\u5EA6"},{value:"dB",label:"\u5206\u8D1D"},{value:"%",label:"\u767E\u5206\u6BD4"},{value:"lm",label:"\u6D41\u660E"},{value:"bit",label:"\u6BD4\u7279"},{value:"g/mL",label:"\u514B/\u6BCF\u6BEB\u5347"},{value:"g/L",label:"\u514B/\u6BCF\u5347"},{value:"mg/L",label:"\u6BEB\u514B/\u6BCF\u5347"},{value:"\u03BCg/m\xB3",label:"\u5FAE\u514B/\u6BCF\u7ACB\u65B9\u7C73"},{value:"mg/m\xB3",label:"\u6BEB\u514B/\u6BCF\u7ACB\u65B9\u7C73"},{value:"g/m\xB3",label:"\u514B/\u6BCF\u7ACB\u65B9\u7C73"},{value:"kg/m\xB3",label:"\u5343\u514B/\u6BCF\u7ACB\u65B9\u7C73"},{value:"nF",label:"\u7EB3\u6CD5"},{value:"pF",label:"\u76AE\u6CD5"},{value:"\u03BCF",label:"\u5FAE\u6CD5"},{value:"F",label:"\u6CD5\u62C9"},{value:"\u03A9",label:"\u6B27\u59C6"},{value:"\u03BCA",label:"\u5FAE\u5B89"},{value:"mA",label:"\u6BEB\u5B89"},{value:"kA",label:"\u5343\u5B89"},{value:"A",label:"\u5B89\u57F9"},{value:"mV",label:"\u6BEB\u4F0F"},{value:"V",label:"\u4F0F\u7279"},{value:"ms",label:"\u6BEB\u79D2"},{value:"s",label:"\u79D2"},{value:"min",label:"\u5206\u949F"},{value:"h",label:"\u5C0F\u65F6"},{value:"day",label:"\u65E5"},{value:"week",label:"\u5468"},{value:"month",label:"\u6708"},{value:"year",label:"\u5E74"},{value:"kn",label:"\u8282"},{value:"km/h",label:"\u5343\u7C73/\u6BCF\u5C0F\u65F6"},{value:"m/s",label:"\u7C73/\u6BCF\u79D2"},{value:"\u2033",label:"\u79D2"},{value:"\u2032",label:"\u5206"},{value:"\xB0",label:"\u5EA6"},{value:"rad",label:"\u5F27\u5EA6"},{value:"Hz",label:"\u8D6B\u5179"},{value:"\u03BCW",label:"\u5FAE\u74E6"},{value:"mW",label:"\u6BEB\u74E6"},{value:"kW",label:"\u5343\u74E6\u7279"},{value:"W",label:"\u74E6\u7279"},{value:"cal",label:"\u5361\u8DEF\u91CC"},{value:"kW\xB7h",label:"\u5343\u74E6\u65F6"},{value:"Wh",label:"\u74E6\u65F6"},{value:"eV",label:"\u7535\u5B50\u4F0F"},{value:"kJ",label:"\u5343\u7126"},{value:"J",label:"\u7126\u8033"},{value:"\u2109",label:"\u534E\u6C0F\u5EA6"},{value:"K",label:"\u5F00\u5C14\u6587"},{value:"t",label:"\u5428"},{value:"\xB0C",label:"\u6444\u6C0F\u5EA6"},{value:"mPa",label:"\u6BEB\u5E15"},{value:"hPa",label:"\u767E\u5E15"},{value:"kPa",label:"\u5343\u5E15"},{value:"Pa",label:"\u5E15\u65AF\u5361"},{value:"mg",label:"\u6BEB\u514B"},{value:"g",label:"\u514B"},{value:"kg",label:"\u5343\u514B"},{value:"N",label:"\u725B"},{value:"mL",label:"\u6BEB\u5347"},{value:"L",label:"\u5347"},{value:"mm\xB3",label:"\u7ACB\u65B9\u6BEB\u7C73"},{value:"cm\xB3",label:"\u7ACB\u65B9\u5398\u7C73"},{value:"km\xB3",label:"\u7ACB\u65B9\u5343\u7C73"},{value:"m\xB3",label:"\u7ACB\u65B9\u7C73"},{value:"h\u33A1",label:"\u516C\u9877"},{value:"c\u33A1",label:"\u5E73\u65B9\u5398\u7C73"},{value:"m\u33A1",label:"\u5E73\u65B9\u6BEB\u7C73"},{value:"k\u33A1",label:"\u5E73\u65B9\u5343\u7C73"},{value:"\u33A1",label:"\u5E73\u65B9\u7C73"},{value:"nm",label:"\u7EB3\u7C73"},{value:"\u03BCm",label:"\u5FAE\u7C73"},{value:"mm",label:"\u6BEB\u7C73"},{value:"cm",label:"\u5398\u7C73"},{value:"dm",label:"\u5206\u7C73"},{value:"km",label:"\u5343\u7C73"},{value:"m",label:"\u7C73"}],a=o(85893),lt=function(e){var Z,n=_.Z.Option,pe=_.Z.OptGroup,V=(0,s.useState)("block"),ee=(0,h.Z)(V,2),S=ee[0],A=ee[1],J=(0,s.useState)(0),L=(0,h.Z)(J,2),N=L[0],Y=L[1],z=(0,s.useState)(!1),q=(0,h.Z)(z,2),H=q[0],le=q[1],Q=(0,s.useState)("block"),O=(0,h.Z)(Q,2),w=O[0],j=O[1],M=(0,s.useState)("none"),X=(0,h.Z)(M,2),ne=X[0],E=X[1],U=(0,s.useState)("none"),ce=(0,h.Z)(U,2),T=ce[0],g=ce[1],C=(0,s.useState)("none"),F=(0,h.Z)(C,2),p=F[0],y=F[1],ue=(0,s.useState)("none"),P=(0,h.Z)(ue,2),B=P[0],I=P[1],ve=(0,s.useState)("false"),re=(0,h.Z)(ve,2),he=re[0],ae=re[1],ya=(0,s.useState)("none"),te=(0,h.Z)(ya,2),me=te[0],Ze=te[1],ba=(0,s.useState)(0),Ee=(0,h.Z)(ba,2),Be=Ee[0],ye=Ee[1],ie=(0,s.useState)(1),Ge=(0,h.Z)(ie,2),ga=Ge[0],be=Ge[1],Ya=(0,s.useState)(0),ze=(0,h.Z)(Ya,2),pa=ze[0],Je=ze[1],qa=m.Z.useForm(),Za=(0,h.Z)(qa,1),W=Za[0],Ue=(0,s.useState)(""),xe=(0,h.Z)(Ue,2),Ie=xe[0],Ve=xe[1],xa=(0,s.useState)(""),Ye=(0,h.Z)(xa,2),Pe=Ye[0],De=Ye[1],qe=k.Z.TextArea,Ca=[{value:"digit",label:"int32(\u6574\u578B)"},{value:"text",label:"text(\u5B57\u7B26\u4E32)"},{value:"textareaary",label:"textarea(\u5B57\u7B26\u4E32\u6570\u7EC4)"},{value:"select",label:"enum(\u679A\u4E3E)"},{value:"textarea",label:"text(\u6587\u672C\u57DF)"},{value:"switch",label:"bool(\u5E03\u5C14\u578B)"}];(0,s.useEffect)(function(){var i;if(e!=null&&(i=e.values)!==null&&i!==void 0&&i.id){var l,t,d,u,f,x,D,wa,Ea,Ba,Ia,Va,Pa,Da,Aa,ka,Ra,La,Oa,Ma,Wa,Ka;console.log(JSON.parse(e==null||(l=e.values)===null||l===void 0?void 0:l.enumValue)),le(!0),Y(e==null||(t=e.values)===null||t===void 0?void 0:t.type),(e==null||(d=e.values)===null||d===void 0?void 0:d.type)==1?(A("none"),j("none"),I("none")):(e==null||(u=e.values)===null||u===void 0?void 0:u.type)==0&&A("block"),ke(e==null||(f=e.values)===null||f===void 0?void 0:f.dataType);var Ha=[];if(Ha=JSON.parse(e==null||(x=e.values)===null||x===void 0?void 0:x.enumValue),W.setFieldsValue({id:e==null||(D=e.values)===null||D===void 0?void 0:D.id,type:e==null||(wa=e.values)===null||wa===void 0?void 0:wa.type,name:e==null||(Ea=e.values)===null||Ea===void 0?void 0:Ea.name,dataType:e==null||(Ba=e.values)===null||Ba===void 0?void 0:Ba.dataType,dataRange:e==null||(Ia=e.values)===null||Ia===void 0?void 0:Ia.dataRange,stepSize:e==null||(Va=e.values)===null||Va===void 0?void 0:Va.stepSize,unit:e==null||(Pa=e.values)===null||Pa===void 0?void 0:Pa.unit,foreignKeyRe:e==null||(Da=e.values)===null||Da===void 0?void 0:Da.foreignKeyRe,enumvaluelist:Ha,description:e==null||(Aa=e.values)===null||Aa===void 0?void 0:Aa.description,readWrite:e==null||(ka=e.values)===null||ka===void 0?void 0:ka.readWrite,dataLength:e==null||(Ra=e.values)===null||Ra===void 0?void 0:Ra.dataLength,boolLabel:e==null||(La=e.values)===null||La===void 0?void 0:La.boolLabel,dataJson:e==null||(Oa=e.values)===null||Oa===void 0?void 0:Oa.dataJson}),e!=null&&(Ma=e.values)!==null&&Ma!==void 0&&Ma.boolLabel){var Na,Qa=e==null||(Na=e.values)===null||Na===void 0?void 0:Na.boolLabel.split(":");Ve(Qa[0]),De(Qa[1])}else Ve(""),De("");if(e!=null&&(Wa=e.values)!==null&&Wa!==void 0&&Wa.dataRange){var Ga,Xa=e==null||(Ga=e.values)===null||Ga===void 0?void 0:Ga.dataRange.split("-");ye(Xa[0]),be(Xa[1])}else ye(0),be(1);e!=null&&(Ka=e.values)!==null&&Ka!==void 0&&Ka.isDefault?ae(!0):ae(!1)}else ae(!1),console.log("xinjian"),le(!1),A("block"),ye(0),be(1),W.resetFields(),Y(0),ke("digit"),W.setFieldsValue({type:0,dataType:"digit"})},[e==null?void 0:e.values]);var Fa=function(l){Y(l.target.value),W.setFieldsValue({type:l.target.value}),l.target.value==1?(A("none"),y("none"),g("none"),E("none"),j("none"),Ze("none")):l.target.value==0?(A("block"),Ze("none"),W.setFieldsValue({dataType:"digit"}),j("block")):l.target.value==2&&(Ze("block"),A("none"),j("none"),y("none"),g("none"),W.setFieldsValue({eventType:0}))},Ae=function(l){ye(l)},He=function(l){Be>l?c.default.error("\u6700\u5927\u503C\u4E0D\u80FD\u5C0F\u4E8E\u6700\u5C0F\u503C"):(be(l),W.setFieldsValue({dataRange:Be+"-"+l}))},ke=function(l){console.log(l),l=="digit"?(j("block"),E("none"),g("none"),y("none")):l=="select"?(E("block"),j("none"),g("none"),y("none"),I("none")):l=="switch"?(g("block"),E("none"),j("none"),y("none"),I("none")):l=="text"?(g("none"),E("none"),j("none"),y("block"),I("none")):l=="textareaary"?(g("none"),E("none"),j("none"),y("none"),I("block")):(y("none"),g("none"),E("none"),j("none"),I("none"))},Sa=function(l){Je(l.target.value)},Qe=function(l){Ve(l.target.value)},ja=function(l){De(l.target.value)},Ta=function(l){W.setFieldsValue({eventType:l.target.value})};return(0,a.jsx)(de.Z,{title:e!=null&&(Z=e.values)!==null&&Z!==void 0&&Z.id?"\u7F16\u8F91":"\u65B0\u5EFA",width:640,visible:e==null?void 0:e.createModalVisible,bodyStyle:{padding:"32px 40px 8px"},footer:null,onCancel:function(){e==null||e.onCancel()},destroyOnClose:!0,maskClosable:!1,children:(0,a.jsxs)(m.Z,{layout:"vertical",preserve:!1,form:W,onFinish:function(){Ie.length>0&&Pe.length>0&&W.setFieldsValue({boolLabel:Ie+":"+Pe}),console.log("form.getFieldsValue()",W.getFieldsValue()),e==null||e.onFinish(W.getFieldsValue())},children:[(0,a.jsx)(m.Z.Item,{name:"id",hidden:!0,children:(0,a.jsx)(k.Z,{})}),(0,a.jsx)(m.Z.Item,{name:"type",label:"\u529F\u80FD\u7C7B\u578B",children:(0,a.jsxs)($.ZP.Group,{name:"type",defaultValue:0,value:N,onChange:Fa,disabled:H,children:[(0,a.jsx)($.ZP.Button,{value:0,children:"\u5C5E\u6027"}),(0,a.jsx)($.ZP.Button,{value:1,children:"\u670D\u52A1"}),(0,a.jsx)($.ZP.Button,{value:2,children:"\u4E8B\u4EF6"})]})}),(0,a.jsx)(m.Z.Item,{name:"name",label:"\u529F\u80FD\u540D\u79F0",rules:[{required:!0,max:64,whitespace:!0}],children:(0,a.jsx)(k.Z,{placeholder:"\u8BF7\u8F93\u5165\u529F\u80FD\u540D\u79F0",disabled:he})}),(0,a.jsx)(m.Z.Item,{style:{display:S},label:"\u6570\u636E\u7C7B\u578B",name:"dataType",rules:[{required:!1}],children:(0,a.jsx)(_.Z,{onChange:ke,defaultValue:"digit",children:Ca.map(function(i,l){return(0,a.jsx)(_.Z.Option,{index:l,value:i.value,children:i.label},i.value)})})}),(0,a.jsx)(m.Z.Item,{style:{display:ne},label:"\u679A\u4E3E\u9879",name:"enumValue",rules:[{required:!1}],children:(0,a.jsx)(m.Z.List,{name:"enumvaluelist",children:function(l,t){return(0,a.jsxs)("div",{style:{display:"flex",flexDirection:"column",rowGap:16},children:[l.map(function(d){return(0,a.jsxs)(_a.Z,{children:[(0,a.jsx)(m.Z.Item,{name:[d.name,"enumvalue"],children:(0,a.jsx)(k.Z,{placeholder:"\u53C2\u6570\u503C"})}),(0,a.jsx)(m.Z.Item,{name:[d.name,"enumlabel"],children:(0,a.jsx)(k.Z,{placeholder:"\u53C2\u6570\u63CF\u8FF0"})}),(0,a.jsx)(et.Z,{onClick:function(){t.remove(d.name)}})]},d.key)}),(0,a.jsx)(K.Z,{type:"dashed",onClick:function(){console.log(JSON.stringify(W.getFieldsValue(),null,2)),console.log(l),console.log(t),t.add()},block:!0,children:"+ \u6DFB\u52A0\u679A\u4E3E"})]})}})}),(0,a.jsxs)(m.Z.Item,{style:{display:w},label:"\u53D6\u503C\u8303\u56F4",name:"dataRange",rules:[{required:!1}],children:[(0,a.jsx)(_e.Z,{placeholder:"\u6700\u5C0F\u503C",style:{width:"49%"},value:Be,onChange:Ae}),"~",(0,a.jsx)(_e.Z,{value:ga,placeholder:"\u6700\u5927\u503C",onChange:He,style:{width:"49%"}})]}),(0,a.jsx)(m.Z.Item,{style:{display:w},label:"\u6B65\u957F",name:"stepSize",rules:[{required:!1}],children:(0,a.jsx)(_e.Z,{placeholder:"\u8BF7\u8F93\u5165\u6B65\u957F",style:{width:"100%"}})}),(0,a.jsx)(m.Z.Item,{style:{display:w},label:"\u5355\u4F4D",name:"unit",rules:[{required:!1}],children:(0,a.jsx)(_.Z,{allowClear:!0,showSearch:!0,optionFilterProp:"Name",filterOption:function(l,t){var d;return((d=t==null?void 0:t.label)!==null&&d!==void 0?d:"").includes(l)},filterSort:function(l,t){var d,u;return((d=l==null?void 0:l.label)!==null&&d!==void 0?d:"").localeCompare((u=t==null?void 0:t.label)!==null&&u!==void 0?u:"")},options:tt})}),(0,a.jsxs)(m.Z.Item,{style:{display:T},name:"boolLabel",label:"\u5E03\u5C14\u503C",rules:[{required:!1}],children:["0 -",(0,a.jsx)(k.Z,{placeholder:"\u5982\uFF1A\u5173",defaultValue:Ie,onChange:Qe,style:{width:"46%"}}),"1 -",(0,a.jsx)(k.Z,{placeholder:"\u5982\uFF1A\u5F00",defaultValue:Pe,onChange:ja,style:{width:"46%"}})]}),(0,a.jsx)(m.Z.Item,{style:{display:p},name:"dataLength",label:"\u6570\u636E\u957F\u5EA6",rules:[{required:!1}],children:(0,a.jsx)(k.Z,{placeholder:"10240",defaultValue:"10240",addonAfter:"\u5B57\u8282"})}),(0,a.jsx)(m.Z.Item,{style:{display:me},name:"eventType",label:(0,a.jsxs)("span",{children:["\u4E8B\u4EF6\u7C7B\u578B",(0,a.jsx)(we.Z,{placement:"top",title:"\u201C\u4FE1\u606F\u201D\u662F\u8BBE\u5907\u4E0A\u62A5\u7684\u4E00\u822C\u6027\u901A\u77E5\uFF0C\u5982\u5B8C\u6210\u67D0\u9879\u4EFB\u52A1\u7B49\u3002\u201C\u544A\u8B66\u201D\u548C\u201C\u6545\u969C\u201D\u662F\u8BBE\u5907\u8FD0\u884C\u8FC7\u7A0B\u4E2D\u4E3B\u52A8\u4E0A\u62A5\u7684\u7A81\u53D1\u6216\u5F02\u5E38\u60C5\u51B5\uFF0C\u4F18\u5148\u7EA7\u9AD8\u3002\u4E0D\u540C\u7684\u4E8B\u4EF6\u7C7B\u578B\u5C06\u7528\u4E8E\u7EDF\u8BA1\u5206\u6790\u3002",children:(0,a.jsx)(at.Z,{})})]}),rules:[{required:!1}],children:(0,a.jsxs)($.ZP.Group,{defaultValue:0,onChange:Ta,value:0,children:[(0,a.jsx)($.ZP,{value:0,children:"\u4FE1\u606F"}),(0,a.jsx)($.ZP,{value:1,children:"\u544A\u8B66"}),(0,a.jsx)($.ZP,{value:2,children:"\u6545\u969C"})]})}),(0,a.jsx)(m.Z.Item,{style:{display:B},name:"dataJson",label:"\u6570\u7EC4\u5B57\u7B26\u4E32",rules:[{required:!1}],children:(0,a.jsx)(qe,{placeholder:"\u6570\u636E\u683C\u5F0F\uFF1A[data1:{value1:'1'},{value2:'2'},data2:{value1:'1'},{value2:'2'}]",autoSize:{minRows:10,maxRows:100}})}),(0,a.jsx)(m.Z.Item,{style:{display:S},name:"readWrite",label:"\u8BFB\u5199\u7C7B\u578B",rules:[{required:!1}],children:(0,a.jsx)($.ZP.Group,{onChange:Sa,name:"radiogroup",defaultValue:0,value:pa,children:(0,a.jsx)($.ZP,{value:0,children:"\u8BFB\u5199"})})}),(0,a.jsx)(m.Z.Item,{name:"description",label:"\u63CF\u8FF0",rules:[{required:!1}],children:(0,a.jsx)(qe,{showCount:!0,maxLength:100,style:{height:120,resize:"none"},placeholder:"\u8BF7\u8F93\u5165\u63CF\u8FF0"})}),(0,a.jsxs)(m.Z.Item,{children:[(0,a.jsx)(K.Z,{htmlType:"button",style:{float:"right",left:10},onClick:e.onCancel,children:"\u53D6\u6D88"}),(0,a.jsx)(K.Z,{type:"primary",htmlType:"submit",style:{float:"right"},children:"\u4FDD\u5B58"})]})]})})},nt=lt,ut=o(64317),rt=o(76615),it=function(e){var Z=m.Z.useForm(),n=(0,h.Z)(Z,1),pe=n[0],V=s.useRef(null),ee=(0,s.useState)("text"),S=(0,h.Z)(ee,2),A=S[0],J=S[1],L=(0,s.useState)("Form"),N=(0,h.Z)(L,2),Y=N[0],z=N[1],q=(0,s.useState)([]),H=(0,h.Z)(q,2),le=H[0],Q=H[1],O=(0,s.useState)(""),w=(0,h.Z)(O,2),j=w[0],M=w[1],X=(0,s.useState)(!1),ne=(0,h.Z)(X,2),E=ne[0],U=ne[1],ce=(0,s.useState)(!1),T=(0,h.Z)(ce,2),g=T[0],C=T[1],F=k.Z.TextArea;(0,s.useEffect)(function(){var P;if((P=V.current)===null||P===void 0||P.setFieldsValue(e.values),e.createModalVisible)if(e.values.actionType==null){var B;(B=V.current)===null||B===void 0||B.setFieldsValue({actionType:"text"}),e.values.actionType="text",J("text"),z("Form"),Q([])}else{var I;if((I=V.current)===null||I===void 0||I.setFieldsValue({actionType:e.values.actionType}),J(e.values.actionType),e.values.actionType=="select"){z("ModalForm");for(var ve=[],re=JSON.parse(e.values.actionValue),he=0;he<re.length;he++)ve.push({actionValueName:re[he].actionValueName});Q(ve)}e.values.actionType=="textareaary"?M(e.values.actionValue):(J(e.values.actionType),z("Form"),Q([]))}},[e.createModalVisible]);var p=function(B){if(console.log(JSON.stringify(B)),B){var I;(I=V.current)===null||I===void 0||I.setFieldsValue({actionValue:JSON.stringify(B)})}U(!1),c.default.success("\u4FDD\u5B58\u6210\u529F")},y=[{value:"text",label:"text(\u5B57\u7B26\u4E32)"},{value:"textareaary",label:"textarea(\u5B57\u7B26\u4E32\u6570\u7EC4)"},{value:"select",label:"enum(\u679A\u4E3E)"},{value:"textarea",label:"text(\u6587\u672C\u57DF)"},{value:"digit",label:"int32(\u6574\u578B)"},{value:"switch",label:"bool(\u5E03\u5C14\u578B)"}],ue=[{dataIndex:"actionValue",valueType:"dependency",name:["valueType"],columns:function(B){var I=B.actionType;switch(console.log(A),A){case"select":return[{dataIndex:"list",valueType:"formList",initialValue:le,style:{paddingTop:"20px"},columns:[{valueType:"group",columns:[{title:"\u679A\u4E3E\u540D\u79F0",dataIndex:"actionValueName",width:"md",formItemProps:{rules:[{required:!0,message:"\u6B64\u9879\u4E3A\u5FC5\u586B\u9879"}]}}]}]},{renderFormItem:function(re,he,ae){return[(0,a.jsx)("div",{style:{float:"right"},children:(0,a.jsx)(K.Z,{type:"primary",style:{"margin-left":"5px"},onClick:function(){var te,me;return p(ae==null||(te=ae.formRef)===null||te===void 0||(me=te.current)===null||me===void 0?void 0:me.getFieldValue("list")),!0},children:"\u4FDD\u5B58"})})]}}];case"text":return[{dataIndex:"actionValue",valueType:"text",renderFormItem:function(){return(0,a.jsx)(k.Z,{placeholder:"\u8F93\u5165\u7C7B\u578B\u503C",disabled:!0})}}];case"textareaary":return[{dataIndex:"actionValue",valueType:"text",initialValue:j,renderFormItem:function(){return(0,a.jsx)(F,{placeholder:"\u6570\u636E\u683C\u5F0F\uFF1A[data1:{value1:'1'},{value2:'2'},data2:{value1:'1'},{value2:'2'}]",autoSize:{minRows:10,maxRows:100}})}}];default:return[{dataIndex:"actionValue",valueType:A,fieldProps:{disabled:!0}}]}}}];return(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(de.Z,{title:"\u65B0\u589E\u53C2\u6570",width:640,ref:V,visible:e==null?void 0:e.createModalVisible,bodyStyle:{padding:"32px 40px 1px 48px"},footer:null,onCancel:function(){e==null||e.onCancel()},destroyOnClose:!0,maskClosable:!1,children:(0,a.jsxs)(m.Z,{layout:"vertical",preserve:!1,initialValues:e==null?void 0:e.values,onFinish:e==null?void 0:e.onFinish,ref:V,children:[(0,a.jsx)(m.Z.Item,{name:"id",hidden:!0,children:(0,a.jsx)(k.Z,{})}),(0,a.jsxs)(m.Z.Item,{children:[(0,a.jsx)(m.Z.Item,{name:"actionName",label:"\u53C2\u6570\u540D\u79F0",rules:[{required:!0,max:64,whitespace:!0}],children:(0,a.jsx)(k.Z,{placeholder:"\u8BF7\u8F93\u5165\u53C2\u6570\u540D\u79F0"})}),(0,a.jsx)(m.Z.Item,{name:"actionType",label:"\u6570\u636E\u7C7B\u578B",rules:[{required:!0,max:64,whitespace:!0}],children:(0,a.jsx)(ut.Z,{options:y,fieldProps:{value:A,onChange:function(B){B=="select"?z("ModalForm"):z("Form"),J(B)}}})}),(0,a.jsx)(m.Z.Item,{name:"actionValue",label:"\u8F93\u5165\u7C7B\u578B\u63A7\u4EF6",children:(0,a.jsx)(rt.Z,{trigger:(0,a.jsx)("a",{onClick:function(){return U(!0)},children:"\u6DFB\u52A0\u679A\u4E3E"}),columns:ue,layoutType:Y,visible:E,modalProps:{forceRender:!0,onCancel:function(){return U(!1)}},onVisibleChange:function(B){C(B)},width:420,shouldUpdate:g,submitter:!1,style:{padding:"40px 10px 1px 10px;"}})}),(0,a.jsx)(K.Z,{htmlType:"button",style:{float:"right",left:10},onClick:e.onCancel,children:"\u53D6\u6D88"}),(0,a.jsx)(K.Z,{type:"primary",htmlType:"submit",style:{float:"right"},children:"\u4FDD\u5B58"})]})]})})})},ot=it,R=o(48971),G=o(96690);function Ua(v){return ea.apply(this,arguments)}function ea(){return ea=(0,b.Z)((0,r.Z)().mark(function v(e){return(0,r.Z)().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",(0,R.WY)((0,G.w)()+"/api/productfunction/page",{method:"Post",data:e}));case 1:case"end":return n.stop()}},v)})),ea.apply(this,arguments)}function st(v){return aa.apply(this,arguments)}function aa(){return aa=(0,b.Z)((0,r.Z)().mark(function v(e){return(0,r.Z)().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",(0,R.WY)((0,G.w)()+"/api/productfunction/add",{method:"Post",data:e}));case 1:case"end":return n.stop()}},v)})),aa.apply(this,arguments)}function dt(v){return ta.apply(this,arguments)}function ta(){return ta=(0,b.Z)((0,r.Z)().mark(function v(e){return(0,r.Z)().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",(0,R.WY)((0,G.w)()+"/api/productfunction/update",{method:"Post",data:e}));case 1:case"end":return n.stop()}},v)})),ta.apply(this,arguments)}function ct(v){return la.apply(this,arguments)}function la(){return la=(0,b.Z)((0,r.Z)().mark(function v(e){return(0,r.Z)().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",(0,R.WY)((0,G.w)()+"/api/productfunction/delete",{method:"Post",data:e}));case 1:case"end":return n.stop()}},v)})),la.apply(this,arguments)}function na(v){return ua.apply(this,arguments)}function ua(){return ua=(0,b.Z)((0,r.Z)().mark(function v(e){return(0,r.Z)().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",(0,R.WY)((0,G.w)()+"/api/producttopics/page",{method:"Post",data:e}));case 1:case"end":return n.stop()}},v)})),ua.apply(this,arguments)}function vt(v){return ra.apply(this,arguments)}function ra(){return ra=(0,b.Z)((0,r.Z)().mark(function v(e){return(0,r.Z)().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",(0,R.WY)((0,G.w)()+"/api/producttopics/add",{method:"Post",data:e}));case 1:case"end":return n.stop()}},v)})),ra.apply(this,arguments)}function ht(v){return ia.apply(this,arguments)}function ia(){return ia=(0,b.Z)((0,r.Z)().mark(function v(e){return(0,r.Z)().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",(0,R.WY)((0,G.w)()+"/api/producttopics/update",{method:"Post",data:e}));case 1:case"end":return n.stop()}},v)})),ia.apply(this,arguments)}function ft(v){return oa.apply(this,arguments)}function oa(){return oa=(0,b.Z)((0,r.Z)().mark(function v(e){return(0,r.Z)().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",(0,R.WY)((0,G.w)()+"/api/producttopics/delete",{method:"Post",data:e}));case 1:case"end":return n.stop()}},v)})),oa.apply(this,arguments)}function mt(v){return sa.apply(this,arguments)}function sa(){return sa=(0,b.Z)((0,r.Z)().mark(function v(e){return(0,r.Z)().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",(0,R.WY)((0,G.w)()+"/api/productfunction/getproductfunctionaction?productFunctionId="+e,{method:"Get"}));case 1:case"end":return n.stop()}},v)})),sa.apply(this,arguments)}function yt(v){return da.apply(this,arguments)}function da(){return da=(0,b.Z)((0,r.Z)().mark(function v(e){return(0,r.Z)().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",(0,R.WY)((0,G.w)()+"/api/productfunction/addproductfunctionaction",{method:"Post",data:e}));case 1:case"end":return n.stop()}},v)})),da.apply(this,arguments)}function bt(v){return ca.apply(this,arguments)}function ca(){return ca=(0,b.Z)((0,r.Z)().mark(function v(e){return(0,r.Z)().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",(0,R.WY)((0,G.w)()+"/api/productfunction/updateproductfunctionaction",{method:"Post",data:e}));case 1:case"end":return n.stop()}},v)})),ca.apply(this,arguments)}function gt(v){return va.apply(this,arguments)}function va(){return va=(0,b.Z)((0,r.Z)().mark(function v(e){return(0,r.Z)().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",(0,R.WY)((0,G.w)()+"/api/productfunction/delproductfunctionaction",{method:"Post",data:e}));case 1:case"end":return n.stop()}},v)})),va.apply(this,arguments)}function Pt(v){return ha.apply(this,arguments)}function ha(){return ha=_asyncToGenerator(_regeneratorRuntime().mark(function v(e){return _regeneratorRuntime().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",request(getDataBaseUrl()+"/api/devicevesion/getdevicevesion?productId=".concat(e),{method:"Get"}));case 1:case"end":return n.stop()}},v)})),ha.apply(this,arguments)}function pt(v){return fa.apply(this,arguments)}function fa(){return fa=(0,b.Z)((0,r.Z)().mark(function v(e){return(0,r.Z)().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",(0,R.WY)((0,G.w)()+"/api/product/getproduct?productId=".concat(e),{method:"Get"}));case 1:case"end":return n.stop()}},v)})),fa.apply(this,arguments)}var Dt=_.Z.Option,At=_.Z.OptGroup,Zt=function(e){var Z=(0,s.useState)([]),n=(0,h.Z)(Z,2),pe=n[0],V=n[1],ee=(0,s.useState)([]),S=(0,h.Z)(ee,2),A=S[0],J=S[1],L=(0,s.useRef)(),N=m.Z.useForm(),Y=(0,h.Z)(N,1),z=Y[0],q=(0,s.useState)(),H=(0,h.Z)(q,2),le=H[0],Q=H[1],O=(0,s.useState)(!1),w=(0,h.Z)(O,2),j=w[0],M=w[1],X={text:{value:"text",text:"text(\u5B57\u7B26\u4E32)"},textareaary:{value:"textareaary",text:"textarea(\u5B57\u7B26\u4E32\u6570\u7EC4)"},select:{value:"select",text:"enum(\u679A\u4E3E)"},textarea:{value:"textarea",text:"text(\u6587\u672C\u57DF)"},digit:{value:"digit",text:"int32(\u6574\u578B)"},switch:{value:"switch",text:"bool(\u5E03\u5C14\u578B)"}},ne=[{title:"\u53C2\u6570\u540D\u79F0",dataIndex:"actionName",width:"15%"},{title:"\u6570\u636E\u7C7B\u578B",key:"actionType",dataIndex:"actionType",valueType:"select",width:"15%",valueEnum:X},{title:"\u64CD\u4F5C",valueType:"option",width:200,render:function(g,C,F,p){return[(0,a.jsx)("a",{onClick:function(){M(!0),V(C)},children:"\u7F16\u8F91"},"editable"),(0,a.jsx)(Se.Z,{type:"primary",title:"\u786E\u8BA4\u5220\u9664\u5417\uFF1F",okText:"\u662F",cancelText:"\u5426",onConfirm:function(){var ue;ce([C.id]),(ue=L.current)===null||ue===void 0||ue.reloadAndRest()},onCancel:function(){},children:(0,a.jsx)("a",{href:"#",children:"\u5220\u9664"})},"primary"),,]}}],E=function(){var T=(0,b.Z)((0,r.Z)().mark(function g(C){return(0,r.Z)().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return console.log(C),p.next=3,yt(JSON.stringify(C)).then(function(y){y.data?c.default.success("\u6DFB\u52A0\u6210\u529F"):c.default.error(y.errors)});case 3:return p.abrupt("return",!0);case 4:case"end":return p.stop()}},g)}));return function(C){return T.apply(this,arguments)}}(),U=function(){var T=(0,b.Z)((0,r.Z)().mark(function g(C){return(0,r.Z)().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return p.next=2,bt(JSON.stringify(C)).then(function(y){y.data?c.default.success("\u4FEE\u6539\u6210\u529F"):c.default.error(y.errors)});case 2:return p.abrupt("return",!0);case 3:case"end":return p.stop()}},g)}));return function(C){return T.apply(this,arguments)}}(),ce=function(){var T=(0,b.Z)((0,r.Z)().mark(function g(C){return(0,r.Z)().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return p.prev=0,gt(C).then(function(y){y.data?(c.default.success("\u5220\u9664\u6210\u529F"),L.current.reload()):c.default.error(y.errors)}),p.abrupt("return",!0);case 5:p.prev=5,p.t0=p.catch(0),c.default.error("\u5220\u9664\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5");case 8:case"end":return p.stop()}},g,null,[[0,5]])}));return function(C){return T.apply(this,arguments)}}();return(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)(de.Z,{title:"\u53C2\u6570\u914D\u7F6E",width:1140,visible:e==null?void 0:e.actionFormModalVisible,bodyStyle:{padding:"32px 40px 1px 48px"},footer:null,onCancel:function(){e==null||e.onCancel()},destroyOnClose:!0,maskClosable:!1,children:[(0,a.jsx)(se.ZP,{rowKey:"id",headerTitle:"\u53C2\u6570\u914D\u7F6E\u5217\u8868",actionRef:L,pagination:!1,search:!1,toolBarRender:function(){return[(0,a.jsxs)(K.Z,{type:"primary",onClick:function(){M(!0),V({})},children:[(0,a.jsx)(fe.Z,{})," \u65B0\u5EFA"]},"primary")]},columns:ne,request:(0,b.Z)((0,r.Z)().mark(function T(){var g;return(0,r.Z)().wrap(function(F){for(;;)switch(F.prev=F.next){case 0:return g=[],console.log(e.values.id),F.next=4,mt(e.values.id).then(function(p){g=p.data});case 4:return F.abrupt("return",{data:g,success:!0});case 5:case"end":return F.stop()}},T)}))}),(0,a.jsx)(ot,{onFinish:function(){var T=(0,b.Z)((0,r.Z)().mark(function g(C){var F;return(0,r.Z)().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:if(F=!1,console.log(C),console.log(C.actionValue),C.productFunctionId=e.values.id,!C.id){y.next=10;break}return y.next=7,U(C);case 7:F=y.sent,y.next=13;break;case 10:return y.next=12,E(C);case 12:F=y.sent;case 13:F&&(M(!1),L.current&&L.current.reload());case 14:case"end":return y.stop()}},g)}));return function(g){return T.apply(this,arguments)}}(),onCancel:function(){V(void 0),M(!1)},createModalVisible:j,actionValueName:le,values:pe||{}})]})})},xt=Zt,kt=o(17462),Ct=o(76772),Ft=function(e){var Z,n=_.Z.Option,pe=_.Z.OptGroup,V=m.Z.useForm(),ee=(0,h.Z)(V,1),S=ee[0],A=k.Z.TextArea,J=(0,s.useState)(""),L=(0,h.Z)(J,2),N=L[0],Y=L[1],z=(0,s.useState)("Topic \u683C\u5F0F\u5FC5\u987B\u4EE5\u201C/\u201D\u8FDB\u884C\u5206\u5C42\uFF0C\u533A\u5206\u6BCF\u4E2A\u7C7B\u76EE\u3002\u5176\u4E2D\u524D\u4E09\u4E2A\u7C7B\u76EE\u5DF2\u7ECF\u89C4\u5B9A\u597D\uFF0C\u7B2C\u4E00\u4E2A\u4EE3\u8868\u4EA7\u54C1\u6807\u8BC6 ProductKey\uFF0C\u7B2C\u4E8C\u4E2A ${deviceKey} \u901A\u914D deviceKey\uFF0C\u7B2C\u4E09\u4E2A user \u7528\u6765\u6807\u8BC6\u4EA7\u54C1\u7684\u81EA\u5B9A\u4E49 Topic \u7C7B\u3002\u7B80\u5355\u6765\u8BF4\uFF0CTopic \u7C7B\uFF1A/a15T****dhK/${deviceKey}/user/update \u662F\u5177\u4F53 Topic\uFF1A/a15T****dhK/mydevice1/user/update \u548C /a15T****dhK/mydevice2/user/update \u7B49\u7684\u96C6\u5408\u3002"),q=(0,h.Z)(z,2),H=q[0],le=q[1];(0,s.useEffect)(function(){var O;if(e!=null&&(O=e.values)!==null&&O!==void 0&&O.id){var w,j,M,X;S.setFieldsValue({id:e==null||(w=e.values)===null||w===void 0?void 0:w.id,topics:e==null||(j=e.values)===null||j===void 0?void 0:j.topics,topicsType:e==null||(M=e.values)===null||M===void 0?void 0:M.topicsType,description:e==null||(X=e.values)===null||X===void 0?void 0:X.description})}},[e==null?void 0:e.values]);var Q=function(w){console.log(w),Y(w.target.value)};return(0,a.jsxs)(de.Z,{title:e!=null&&(Z=e.values)!==null&&Z!==void 0&&Z.id?"\u7F16\u8F91":"\u65B0\u5EFA",width:640,visible:e==null?void 0:e.createModalVisible,bodyStyle:{padding:"32px 40px 8px"},footer:null,onCancel:function(){e==null||e.onCancel()},destroyOnClose:!0,maskClosable:!1,children:[(0,a.jsx)(Ct.Z,{message:"\u8BF4\u660E",description:H,type:"info"}),(0,a.jsxs)(m.Z,{layout:"vertical",preserve:!1,form:S,onFinish:function(){S.setFieldsValue({topics:"/"+e.productCode+"/"+e.productVesion+"/${deviceKey}/use/"+N}),console.log(S.getFieldsValue()),e==null||e.onFinish(S.getFieldsValue())},children:[(0,a.jsx)(m.Z.Item,{name:"id",hidden:!0,children:(0,a.jsx)(k.Z,{})}),(0,a.jsx)(m.Z.Item,{name:"topics",label:"Topics\u7C7B",rules:[{required:!0,max:64,whitespace:!0}],children:(0,a.jsx)(k.Z,{addonBefore:e.productCode+"/"+e.productVesion+"/${deviceKey}/use/",onChange:Q,placeholder:"\u8BF7\u8F93\u5165Topics\u7C7B"})}),(0,a.jsx)(m.Z.Item,{label:"\u7C7B\u578B",name:"topicsType",rules:[{required:!0}],children:(0,a.jsx)(_.Z,{options:[{value:0,label:"\u53D1\u5E03"},{value:1,label:"\u8BA2\u9605"},{value:2,label:"\u53D1\u5E03\u548C\u8BA2\u9605"}]})}),(0,a.jsx)(m.Z.Item,{name:"description",label:"\u63CF\u8FF0",rules:[{required:!1}],children:(0,a.jsx)(A,{showCount:!0,maxLength:100,style:{height:120,resize:"none"},placeholder:"\u8BF7\u8F93\u5165\u63CF\u8FF0"})}),(0,a.jsxs)(m.Z.Item,{children:[(0,a.jsx)(K.Z,{htmlType:"button",style:{float:"right",left:10},onClick:e.onCancel,children:"\u53D6\u6D88"}),(0,a.jsx)(K.Z,{type:"primary",htmlType:"submit",style:{float:"right"},children:"\u4FDD\u5B58"})]})]})]})},St=Ft,ma=ge.Z.Paragraph,Rt=ge.Z.Text,Lt={beforeUpload:function(e){return e.type!=="application/vnd.ms-excel"&&e.type!=="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"&&c.default.error("".concat(e.name," \u4E0D\u662F exelce \u6587\u4EF6")),e.type=="application/vnd.ms-excel"||e.type=="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"?!0:$e.Z.LIST_IGNORE},name:"file",action:"/saasbase/api/goodes/DeviceVersionTemplateImport",headers:{Authorization:"Bearer "+localStorage.getItem("token")},onChange:function(e){e.file.status!=="uploading"&&console.log(e.file,e.fileList),e.file.status==="done"?c.default.success("".concat(e.file.name," file uploaded successfully")):e.file.status==="error"&&c.default.error("".concat(e.file.name," file upload failed."))}},jt=function(e){var Z,n,pe=(0,s.useState)(!1),V=(0,h.Z)(pe,2),ee=V[0],S=V[1],A=(0,s.useState)(!1),J=(0,h.Z)(A,2),L=J[0],N=J[1],Y=(0,s.useState)("basis"),z=(0,h.Z)(Y,2),q=z[0],H=z[1],le=(0,s.useState)(!1),Q=(0,h.Z)(le,2),O=Q[0],w=Q[1],j=(0,s.useState)(!1),M=(0,h.Z)(j,2),X=M[0],ne=M[1],E=(0,s.useRef)(),U=(0,s.useRef)(),ce=(0,s.useRef)(),T=(0,s.useState)(),g=(0,h.Z)(T,2),C=g[0],F=g[1],p=(0,s.useState)(),y=(0,h.Z)(p,2),ue=y[0],P=y[1],B=(0,s.useState)([]),I=(0,h.Z)(B,2),ve=I[0],re=I[1],he=(0,s.useState)([]),ae=(0,h.Z)(he,2),ya=ae[0],te=ae[1],me=(0,s.useState)([]),Ze=(0,h.Z)(me,2),ba=Ze[0],Ee=Ze[1],Be=(0,s.useState)({}),ye=(0,h.Z)(Be,2),ie=ye[0],Ge=ye[1],ga=(0,s.useState)(0),be=(0,h.Z)(ga,2),Ya=be[0],ze=be[1],pa=(0,s.useState)(0),Je=(0,h.Z)(pa,2),qa=Je[0],Za=Je[1],W=(0,s.useState)({operationKey:e.location.query.tabStatus?e.location.query.tabStatus:"basis",tabActiveKey:e.location.query.tabStatus?e.location.query.tabStatus:"basis"}),Ue=(0,h.Z)(W,2),xe=Ue[0],Ie=Ue[1];(0,s.useEffect)(function(){H(xe.tabActiveKey),e.location.query.values.id?pt(e.location.query.values.productId).then(function(i){Ge(i.data);var l={productId:e.location.query.values.productId,productVesionId:e.location.query.values.id,isDefault:!0,current:1,pageSize:10};He(l),Ae(l)}):R.m8.push({pathname:"/device/deviceVesion"})},[xe]);var Ve=function(l){var t=[];return(l.type==1||l.type==2)&&t.push((0,a.jsx)("a",{onClick:function(){var u,f;w(!0),F(l),(u=E.current)===null||u===void 0||(f=u.reloadAndRest)===null||f===void 0||f.call(u)},children:"\u53C2\u6570\u914D\u7F6E"},"config")),t.push((0,a.jsx)("a",{onClick:function(){S(!0),F(l)},children:"\u66F4\u65B0"},"config")),l.isDefault||t.push((0,a.jsx)(Se.Z,{type:"primary",title:"\u786E\u8BA4\u5220\u9664\u5417\uFF1F",okText:"\u662F",cancelText:"\u5426",onConfirm:function(){Ca([l.id])},onCancel:function(){},children:(0,a.jsx)("a",{href:"#",children:"\u5220\u9664"})},"primary")),t},xa=[{title:"\u4E3B\u952E",dataIndex:"id",tip:"\u89C4\u5219\u540D\u79F0\u662F\u552F\u4E00\u7684 key",hideInSearch:!0,hideInTable:!0,render:function(l,t){return(0,a.jsx)("a",{onClick:function(){F(t),ne(!0)},children:l})}},{title:"\u529F\u80FD\u540D\u79F0",dataIndex:"name",valueType:"textarea",ellipsis:!0,search:!0},{title:"\u529F\u80FD\u7C7B\u578B",dataIndex:"type",valueType:"select",ellipsis:!0,search:!0,valueEnum:{0:{text:"\u5C5E\u6027"},1:{text:"\u670D\u52A1"},2:{text:"\u4E8B\u4EF6"}}},{title:"\u63CF\u8FF0",dataIndex:"description",valueType:"textarea",hideInSearch:!0},{title:"\u521B\u5EFA\u65F6\u95F4",dataIndex:"createAt",valueType:"date",hideInSearch:!0},{title:"\u64CD\u4F5C",dataIndex:"option",valueType:"option",fixed:"right",width:400,render:function(l,t){return Ve(t)}}],Ye=[{title:"\u4E3B\u952E",dataIndex:"id",tip:"\u89C4\u5219\u540D\u79F0\u662F\u552F\u4E00\u7684 key",hideInSearch:!0,hideInTable:!0,render:function(l,t){return(0,a.jsx)("a",{onClick:function(){F(t),ne(!0)},children:l})}},{title:"Topics\u7C7B",dataIndex:"topics",valueType:"textarea",with:500,render:function(l){return(0,a.jsx)(ma,{style:{display:"inline"},copyable:!0,children:l})}},{title:"\u7C7B\u578B",dataIndex:"topicsType",valueType:"select",ellipsis:!0,search:!0,valueEnum:{0:{text:"\u53D1\u5E03"},1:{text:"\u8BA2\u9605"},2:{text:"\u53D1\u5E03\u548C\u8BA2\u9605"}}},{title:"\u63CF\u8FF0",dataIndex:"description",valueType:"textarea",ellipsis:!0,search:!1,with:350},{title:"\u64CD\u4F5C",dataIndex:"option",valueType:"option",fixed:"right",width:250,render:function(l,t){return[(0,a.jsx)("a",{onClick:function(){N(!0),P(t)},children:" \u66F4\u65B0"},"config"),(0,a.jsx)(Se.Z,{type:"primary",title:"\u786E\u8BA4\u5220\u9664\u5417\uFF1F",okText:"\u662F",cancelText:"\u5426",onConfirm:(0,b.Z)((0,r.Z)().mark(function d(){return(0,r.Z)().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,ft([t.id]).then(function(x){c.default.success("\u5220\u9664\u6210\u529F"),U.current.reload()});case 2:case"end":return f.stop()}},d)})),onCancel:function(){},children:(0,a.jsx)("a",{href:"#",children:"\u5220\u9664"})},"primary")]}}],Pe=[{title:"\u529F\u80FD",dataIndex:"name",with:"10%",onCell:function(l,t){return{rowSpan:t%2==0?2:0}}},{title:"Topics\u7C7B",dataIndex:"topics",valueType:"textarea",with:"40%",render:function(l){return(0,a.jsx)(ma,{style:{display:"inline"},copyable:!0,children:l})}},{title:"\u7C7B\u578B",dataIndex:"topicsType",valueType:"select",ellipsis:!0,search:!0,with:"10%",valueEnum:{0:{text:"\u53D1\u5E03"},1:{text:"\u8BA2\u9605"},2:{text:"\u53D1\u5E03\u548C\u8BA2\u9605"}}},{title:"\u63CF\u8FF0",dataIndex:"description",valueType:"textarea",ellipsis:!0,search:!1,with:"40%"}],De=[{key:"basis",tab:"\u529F\u80FD"},{key:"topis",tab:"topics\u7C7B\u5217\u8868"}],qe=function(){var i=(0,b.Z)((0,r.Z)().mark(function l(t){var d;return(0,r.Z)().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:if(f.prev=0,d=!0,console.log(t),t.dataType=="select"&&(t.enumvaluelist?t.enumValue=JSON.stringify(t.enumvaluelist):(c.default.error("\u8BF7\u6DFB\u52A0\u679A\u4E3E\u503C"),d=!1)),t.type==1&&(t.dataType=""),!d){f.next=9;break}return t.dataJson!=null&&(t.dataJson=JSON.parse(t.dataJson)),f.next=9,st(JSON.stringify(t)).then(function(x){if(x.data){c.default.success("\u6DFB\u52A0\u6210\u529F");var D={productId:e.location.query.values.productId,productVesionId:e.location.query.values.productId,current:1,pageSize:10};He(D),S(!1),E.current&&E.current.reload()}else c.default.error(x.errors)});case 9:f.next=14;break;case 11:f.prev=11,f.t0=f.catch(0),c.default.error("\u6DFB\u52A0\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01");case 14:case"end":return f.stop()}},l,null,[[0,11]])}));return function(t){return i.apply(this,arguments)}}(),Ca=function(){var i=(0,b.Z)((0,r.Z)().mark(function l(t){return(0,r.Z)().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.prev=0,ct(t).then(function(f){f.data?(c.default.success("\u5220\u9664\u6210\u529F"),E.current.reload()):c.default.error(f.errors)}),u.abrupt("return",!0);case 5:u.prev=5,u.t0=u.catch(0),c.default.error("\u5220\u9664\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5");case 8:case"end":return u.stop()}},l,null,[[0,5]])}));return function(t){return i.apply(this,arguments)}}(),Fa=function(){var i=(0,b.Z)((0,r.Z)().mark(function l(t){var d;return(0,r.Z)().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:try{d=!0,t.dataType=="select"&&(t.enumvaluelist.length==0?(c.default.error("\u8BF7\u6DFB\u52A0\u679A\u4E3E\u503C"),d=!1):t.enumValue=JSON.stringify(t.enumvaluelist)),d&&(console.log("actionRef.current",E.current.current),dt(t).then(function(x){x.data?(c.default.success("\u4FEE\u6539\u6210\u529F"),S(!1),E.current.reload()):c.default.error(x.errors)}))}catch(x){c.default.error("\u4FEE\u6539\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01")}case 1:case"end":return f.stop()}},l)}));return function(t){return i.apply(this,arguments)}}(),Ae=function(){var i=(0,b.Z)((0,r.Z)().mark(function l(t){return(0,r.Z)().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.next=2,na(t).then(function(f){te(f.data.data),ze(f.data.total)});case 2:case"end":return u.stop()}},l)}));return function(t){return i.apply(this,arguments)}}(),He=function(){var i=(0,b.Z)((0,r.Z)().mark(function l(t){return(0,r.Z)().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.next=2,Ua(t).then(function(f){Ee(f.data.data),Za(f.data.total)});case 2:case"end":return u.stop()}},l)}));return function(t){return i.apply(this,arguments)}}(),ke=function(l){console.log(l),Ie({operationKey:l,tabActiveKey:l})},Sa=function(l){console.log(l);var t={};l=="1"?(t.productId=e.location.query.values.productId,t.productVesionId=e.location.query.values.id,t.isDefault=!0,t.current=1,t.pageSize=10,Ae(t)):(t.productId=e.location.query.values.productId,t.productVesionId=e.location.query.values.id,t.isDefault=!1,t.current=1,t.pageSize=10,Ae(t))},Qe={zdy:(0,a.jsx)(se.ZP,{id:"table1",actionRef:U,rowKey:"id",pagination:{defaultPageSize:10},search:{labelWidth:120},columns:Ye,toolBarRender:function(){return[(0,a.jsxs)(K.Z,{type:"primary",onClick:function(){N(!0),P({})},children:[(0,a.jsx)(fe.Z,{})," \u65B0\u5EFA"]},"primary")]},request:function(){var i=(0,b.Z)((0,r.Z)().mark(function l(t){var d,u;return(0,r.Z)().wrap(function(x){for(;;)switch(x.prev=x.next){case 0:return d=[],u=0,t.productId=e.location.query.values.productId,t.productVesionId=e.location.query.values.id,t.isDefault=!1,x.next=7,na(t).then(function(D){te(D.data.data),d=D.data.data,u=D.data.total});case 7:return x.abrupt("return",{data:d,success:!0,total:u});case 8:case"end":return x.stop()}},l)}));return function(l){return i.apply(this,arguments)}}(),rowSelection:{onChange:function(l,t){re(t)}}}),mr:(0,a.jsx)(se.ZP,{id:"table3",actionRef:ce,rowKey:"id",search:!1,pagination:{defaultPageSize:10},columns:Pe,toolBarRender:!1,scroll:{x:"100%"},request:function(){var i=(0,b.Z)((0,r.Z)().mark(function l(t){var d,u;return(0,r.Z)().wrap(function(x){for(;;)switch(x.prev=x.next){case 0:return d=[],u=0,t.productId=e.location.query.values.productId,t.productVesionId=e.location.query.values.id,t.isDefault=!0,x.next=7,na(t).then(function(D){te(D.data.data),d=D.data.data,u=D.data.total});case 7:return x.abrupt("return",{data:d,success:!0,total:u});case 8:case"end":return x.stop()}},l)}));return function(l){return i.apply(this,arguments)}}()})},ja=[{key:"1",label:"\u9ED8\u8BA4topics",children:Qe.mr},{key:"2",label:"\u81EA\u5B9A\u4E49topics",children:Qe.zdy}],Ta={basis:(0,a.jsxs)(Ce.Z,{style:{marginBottom:24},bordered:!1,children:[(0,a.jsx)(se.ZP,{id:"table2",actionRef:E,rowKey:"id",pagination:{defaultPageSize:10},search:{labelWidth:120},columns:xa,toolBarRender:function(){return[(0,a.jsxs)(K.Z,{type:"primary",onClick:function(){S(!0),F({})},children:[(0,a.jsx)(fe.Z,{})," \u65B0\u5EFA"]},"primary")]},dataSource:ba,request:function(){var i=(0,b.Z)((0,r.Z)().mark(function l(t){var d,u;return(0,r.Z)().wrap(function(x){for(;;)switch(x.prev=x.next){case 0:return d=[],u=0,t.productId=e.location.query.values.productId,t.productVesionId=e.location.query.values.id,x.next=6,Ua(t).then(function(D){d=D.data.data,Ee(D.data.data),u=D.data.total});case 6:return x.abrupt("return",{data:d,success:!0,total:u});case 7:case"end":return x.stop()}},l)}));return function(l){return i.apply(this,arguments)}}(),rowSelection:{onChange:function(l,t){re(t)}}}),(0,a.jsx)(nt,{onFinish:function(){var i=(0,b.Z)((0,r.Z)().mark(function l(t){return(0,r.Z)().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:if(console.log("jnlaile "),console.log(t),t.productId=e.location.query.values.productId,t.deviceVersionKey=e.location.query.values.id,!t.id){u.next=9;break}return u.next=7,Fa(t);case 7:u.next=11;break;case 9:return u.next=11,qe(t);case 11:case"end":return u.stop()}},l)}));return function(l){return i.apply(this,arguments)}}(),onCancel:function(){F(void 0),S(!1)},createModalVisible:ee,values:C||{}}),(0,a.jsx)(xt,{actionFormModalVisible:O,values:C||{},onCancel:function(){F(void 0),w(!1)}})]}),topis:(0,a.jsxs)(Ce.Z,{style:{marginBottom:24},bordered:!1,children:[(0,a.jsx)(Le.Z,{tabPosition:"left",items:ja,onChange:Sa}),(0,a.jsx)(St,{createModalVisible:L,productCode:ie.key,productVesion:(Z=e.location.query.values)===null||Z===void 0?void 0:Z.vesion,values:ue||{},onFinish:function(){var i=(0,b.Z)((0,r.Z)().mark(function l(t){return(0,r.Z)().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:if(t.productId=e.location.query.values.productId,t.productVesionId=e.location.query.values.id,!t.id){u.next=7;break}return u.next=5,ht(t).then(function(f){f.data?(c.default.success("\u4FEE\u6539\u6210\u529F"),U.current.reload(),N(!1)):c.default.error(f.errors)});case 5:u.next=9;break;case 7:return u.next=9,vt(t).then(function(f){f.data?(c.default.success("\u6DFB\u52A0\u6210\u529F"),U.current.reload(),N(!1)):c.default.error(f.errors)});case 9:case"end":return u.stop()}},l)}));return function(l){return i.apply(this,arguments)}}(),onCancel:function(){P(void 0),N(!1)}})]})};return(0,a.jsx)(Te.ZP,{host:!0,header:{title:[(0,a.jsxs)("a",{onClick:function(){R.m8.push({pathname:"/device/deviceVesion"})},children:[(0,a.jsx)(je.Z,{}),"\u8FD4\u56DE"]},"back"),(0,a.jsx)("div",{style:{backgroundColor:"#f3eaea",width:"1640px",height:"54px"},children:(0,a.jsxs)("div",{style:{fontSize:"14px",color:"cornflowerblue"},children:[(0,a.jsxs)("span",{style:{marginRight:20,marginLeft:10,marginTop:10,float:"left"},children:["\u4EA7\u54C1\u7248\u672C:",(0,a.jsx)("span",{style:{marginLeft:10},children:(n=e.location.query.values)===null||n===void 0?void 0:n.vesion})]}),(0,a.jsxs)("span",{style:{marginRight:20,marginLeft:10,marginTop:10,float:"left"},children:["\u4EA7\u54C1\u540D\u79F0:",(0,a.jsx)("span",{style:{marginLeft:10},children:ie==null?void 0:ie.name})]}),(0,a.jsxs)("span",{style:{marginRight:120,marginLeft:10,marginTop:10,float:"right"},children:["\u4EA7\u54C1key: ",(0,a.jsx)(ma,{style:{display:"inline"},copyable:!0,children:ie==null?void 0:ie.key})]})]})})],breadcrumb:{}},title:e.location.query.isAdd?"\u5546\u54C1\u65B0\u589E":"\u8BE6\u60C5",tabActiveKey:q,onTabChange:ke,tabList:De,children:Ta[xe.operationKey]})},Tt=jt}}]);