包含后厨 团餐 门店分支
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 line
43 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[8865],{64317:function(Da,Le,r){"use strict";var ue=r(28991),Se=r(81253),He=r(85893),N=r(22270),u=r(67294),p=r(66758),qe=r(31649),Fe=["fieldProps","children","params","proFieldProps","mode","valueEnum","request","showSearch","options"],c=["fieldProps","children","params","proFieldProps","mode","valueEnum","request","options"],Ta=u.forwardRef(function(w,fe){var je=w.fieldProps,o=w.children,Te=w.params,me=w.proFieldProps,Ke=w.mode,ie=w.valueEnum,Me=w.request,ye=w.showSearch,We=w.options,we=(0,Se.Z)(w,Fe),Ne=(0,u.useContext)(p.Z);return(0,He.jsx)(qe.Z,(0,ue.Z)((0,ue.Z)({valueEnum:(0,N.h)(ie),request:Me,params:Te,valueType:"select",filedConfig:{customLightMode:!0},fieldProps:(0,ue.Z)({options:We,mode:Ke,showSearch:ye,getPopupContainer:Ne.getPopupContainer},je),ref:fe,proFieldProps:me},we),{},{children:o}))}),Qe=u.forwardRef(function(w,fe){var je=w.fieldProps,o=w.children,Te=w.params,me=w.proFieldProps,Ke=w.mode,ie=w.valueEnum,Me=w.request,ye=w.options,We=(0,Se.Z)(w,c),we=(0,ue.Z)({options:ye,mode:Ke||"multiple",labelInValue:!0,showSearch:!0,showArrow:!1,autoClearSearchValue:!0,optionLabelProp:"label"},je),Ne=(0,u.useContext)(p.Z);return(0,He.jsx)(qe.Z,(0,ue.Z)((0,ue.Z)({valueEnum:(0,N.h)(ie),request:Me,params:Te,valueType:"select",filedConfig:{customLightMode:!0},fieldProps:(0,ue.Z)({getPopupContainer:Ne.getPopupContainer},we),ref:fe,proFieldProps:me},We),{},{children:o}))}),wa=Ta,x=Qe,Oe=wa;Oe.SearchSelect=x,Oe.displayName="ProFormComponent",Le.Z=Oe},97958:function(Da,Le,r){"use strict";r.r(Le),r.d(Le,{default:function(){return rt}});var ue=r(58024),Se=r(91894),He=r(57663),N=r(71577),u=r(39428),p=r(3182),qe=r(62350),Fe=r(24565),c=r(2824),Ta=r(43185),Qe=r(93349),wa=r(34792),x=r(48086),Oe=r(402),w=r(56256),fe=r(49101),je=r(6700),o=r(67294),Te=r(28790),me=r(16894),Ke=r(71194),ie=r(50146),Me=r(77883),ye=r(21888),We=r(49111),we=r(19650),Ne=r(88983),ge=r(47933),ot=r(47673),A=r(4107),st=r(9715),y=r(55843),dt=r(43358),z=r(34041),Ra=r(54549),Aa=[{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=r(85893),La=function(e){var S,l=z.Z.Option,Ze=z.Z.OptGroup,V=(0,o.useState)("block"),ee=(0,c.Z)(V,2),P=ee[0],O=ee[1],K=(0,o.useState)(0),M=(0,c.Z)(K,2),q=M[0],Q=M[1],U=(0,o.useState)(!1),X=(0,c.Z)(U,2),J=X[0],le=X[1],$=(0,o.useState)("block"),W=(0,c.Z)($,2),E=W[0],k=W[1],D=(0,o.useState)("none"),B=(0,c.Z)(D,2),re=B[0],Y=B[1],oe=(0,o.useState)("none"),ne=(0,c.Z)(oe,2),F=ne[0],C=ne[1],m=(0,o.useState)("none"),g=(0,c.Z)(m,2),h=g[0],b=g[1],H=(0,o.useState)(0),se=(0,c.Z)(H,2),ae=se[0],be=se[1],de=(0,o.useState)(1),ce=(0,c.Z)(de,2),da=ce[0],pe=ce[1],Ge=(0,o.useState)(0),ze=(0,c.Z)(Ge,2),Ue=ze[0],ca=ze[1],Je=y.Z.useForm(),va=(0,c.Z)(Je,1),G=va[0],ha=(0,o.useState)(""),Ve=(0,c.Z)(ha,2),Ee=Ve[0],Ie=Ve[1],fa=(0,o.useState)(""),Be=(0,c.Z)(fa,2),Pe=Be[0],ke=Be[1],ma=A.Z.TextArea,Ye=[{value:"digit",label:"int32(\u6574\u578B)"},{value:"text",label:"text(\u5B57\u7B26\u4E32)"},{value:"select",label:"enum(\u679A\u4E3E)"},{value:"textarea",label:"text(\u6587\u672C\u57DF)"},{value:"switch",label:"bool(\u5E03\u5C14\u578B)"}];(0,o.useEffect)(function(){var j;if(e!=null&&(j=e.values)!==null&&j!==void 0&&j.id){var v,R,I,te,Ce,ve,he,Re,Ae,f,i,n,Z,t,s,T,_,pa,xa,Ca,Sa;console.log(JSON.parse(e==null||(v=e.values)===null||v===void 0?void 0:v.enumValue)),le(!0),Q(e==null||(R=e.values)===null||R===void 0?void 0:R.type),(e==null||(I=e.values)===null||I===void 0?void 0:I.type)==1?(O("none"),k("none")):(e==null||(te=e.values)===null||te===void 0?void 0:te.type)==0&&O("block"),xe(e==null||(Ce=e.values)===null||Ce===void 0?void 0:Ce.dataType);var Ba=[];if(Ba=JSON.parse(e==null||(ve=e.values)===null||ve===void 0?void 0:ve.enumValue),G.setFieldsValue({id:e==null||(he=e.values)===null||he===void 0?void 0:he.id,type:e==null||(Re=e.values)===null||Re===void 0?void 0:Re.type,deviceVersionKey:e==null||(Ae=e.values)===null||Ae===void 0?void 0:Ae.deviceVersionKey,name:e==null||(f=e.values)===null||f===void 0?void 0:f.name,dataType:e==null||(i=e.values)===null||i===void 0?void 0:i.dataType,dataRange:e==null||(n=e.values)===null||n===void 0?void 0:n.dataRange,stepSize:e==null||(Z=e.values)===null||Z===void 0?void 0:Z.stepSize,unit:e==null||(t=e.values)===null||t===void 0?void 0:t.unit,foreignKeyRe:e==null||(s=e.values)===null||s===void 0?void 0:s.foreignKeyRe,enumvaluelist:Ba,description:e==null||(T=e.values)===null||T===void 0?void 0:T.description,readWrite:e==null||(_=e.values)===null||_===void 0?void 0:_.readWrite,dataLength:e==null||(pa=e.values)===null||pa===void 0?void 0:pa.dataLength,boolLabel:e==null||(xa=e.values)===null||xa===void 0?void 0:xa.BoolLabel}),e!=null&&(Ca=e.values)!==null&&Ca!==void 0&&Ca.boolLabel){var Fa,Pa=e==null||(Fa=e.values)===null||Fa===void 0?void 0:Fa.boolLabel.split(":");Ie(Pa[0]),ke(Pa[1])}else Ie(""),ke("");if(e!=null&&(Sa=e.values)!==null&&Sa!==void 0&&Sa.dataRange){var ja,ka=e==null||(ja=e.values)===null||ja===void 0?void 0:ja.dataRange.split("-");be(ka[0]),pe(ka[1])}else be(0),pe(1)}else console.log("xinjian"),le(!1),O("block"),be(0),pe(1),G.resetFields(),Q(0),xe("digit"),G.setFieldsValue({type:0})},[e==null?void 0:e.values]);var Ia=function(v){console.log(v),Q(v.target.value),G.setFieldsValue({type:v.target.value}),v.target.value==1?(O("none"),b("none"),C("none"),Y("none"),k("none")):v.target.value==0&&(O("block"),G.setFieldsValue({dataType:"digit"}),k("block"))},ya=function(v){be(v)},ba=function(v){ae>v?x.default.error("\u6700\u5927\u503C\u4E0D\u80FD\u5C0F\u4E8E\u6700\u5C0F\u503C"):(pe(v),G.setFieldsValue({dataRange:ae+"-"+v}))},xe=function(v){console.log(v),v=="digit"?(k("block"),Y("none"),C("none"),b("none")):v=="select"?(Y("block"),k("none"),C("none"),b("none")):v=="switch"?(C("block"),Y("none"),k("none"),b("none")):v=="text"?(C("none"),Y("none"),k("none"),b("block")):(b("none"),C("none"),Y("none"),k("none"))},De=function(v){ca(v.target.value)},ga=function(v){Ie(v.target.value)},Za=function(v){ke(v.target.value)};return(0,a.jsx)(ie.Z,{title:e!=null&&(S=e.values)!==null&&S!==void 0&&S.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)(y.Z,{layout:"vertical",preserve:!1,form:G,onFinish:function(){Ee.length>0&&Pe.length>0&&G.setFieldsValue({boolLabel:Ee+":"+Pe}),console.log(G.getFieldsValue()),e==null||e.onFinish(G.getFieldsValue())},children:[(0,a.jsx)(y.Z.Item,{name:"id",hidden:!0,children:(0,a.jsx)(A.Z,{})}),(0,a.jsx)(y.Z.Item,{name:"type",label:"\u529F\u80FD\u7C7B\u578B",children:(0,a.jsxs)(ge.ZP.Group,{name:"type",defaultValue:0,value:q,onChange:Ia,disabled:J,children:[(0,a.jsx)(ge.ZP.Button,{value:0,children:"\u5C5E\u6027"}),(0,a.jsx)(ge.ZP.Button,{value:1,children:"\u670D\u52A1"})]})}),(0,a.jsx)(y.Z.Item,{label:"\u4EA7\u54C1\u7248\u672C",name:"deviceVersionKey",rules:[{required:!0}],children:(0,a.jsx)(z.Z,{children:e.DeviceVesionData.map(function(j,v){return(0,a.jsx)(z.Z.Option,{index:v,value:j.id,children:j.vesion},j.id)})})}),(0,a.jsx)(y.Z.Item,{name:"name",label:"\u529F\u80FD\u540D\u79F0",rules:[{required:!0,max:64,whitespace:!0}],children:(0,a.jsx)(A.Z,{placeholder:"\u8BF7\u8F93\u5165\u529F\u80FD\u540D\u79F0"})}),(0,a.jsx)(y.Z.Item,{style:{display:P},label:"\u6570\u636E\u7C7B\u578B",name:"dataType",rules:[{required:!1}],children:(0,a.jsx)(z.Z,{onChange:xe,defaultValue:"digit",children:Ye.map(function(j,v){return(0,a.jsx)(z.Z.Option,{index:v,value:j.value,children:j.label},j.value)})})}),(0,a.jsx)(y.Z.Item,{style:{display:re},label:"\u679A\u4E3E\u9879",name:"enumValue",rules:[{required:!1}],children:(0,a.jsx)(y.Z.List,{name:"enumvaluelist",children:function(v,R){return(0,a.jsxs)("div",{style:{display:"flex",flexDirection:"column",rowGap:16},children:[v.map(function(I){return(0,a.jsxs)(we.Z,{children:[(0,a.jsx)(y.Z.Item,{name:[I.name,"enumvalue"],children:(0,a.jsx)(A.Z,{placeholder:"\u53C2\u6570\u503C"})}),(0,a.jsx)(y.Z.Item,{name:[I.name,"enumlabel"],children:(0,a.jsx)(A.Z,{placeholder:"\u53C2\u6570\u63CF\u8FF0"})}),(0,a.jsx)(Ra.Z,{onClick:function(){R.remove(I.name)}})]},I.key)}),(0,a.jsx)(N.Z,{type:"dashed",onClick:function(){console.log(JSON.stringify(G.getFieldsValue(),null,2)),console.log(v),console.log(R),R.add()},block:!0,children:"+ \u6DFB\u52A0\u679A\u4E3E"})]})}})}),(0,a.jsxs)(y.Z.Item,{style:{display:E},label:"\u53D6\u503C\u8303\u56F4",name:"dataRange",rules:[{required:!1}],children:[(0,a.jsx)(ye.Z,{placeholder:"\u6700\u5C0F\u503C",style:{width:"49%"},value:ae,onChange:ya}),"~",(0,a.jsx)(ye.Z,{value:da,placeholder:"\u6700\u5927\u503C",onChange:ba,style:{width:"49%"}})]}),(0,a.jsx)(y.Z.Item,{style:{display:E},label:"\u6B65\u957F",name:"stepSize",rules:[{required:!1}],children:(0,a.jsx)(ye.Z,{placeholder:"\u8BF7\u8F93\u5165\u6B65\u957F",style:{width:"100%"}})}),(0,a.jsx)(y.Z.Item,{style:{display:E},label:"\u5355\u4F4D",name:"unit",rules:[{required:!1}],children:(0,a.jsx)(z.Z,{allowClear:!0,showSearch:!0,optionFilterProp:"Name",filterOption:function(v,R){var I;return((I=R==null?void 0:R.label)!==null&&I!==void 0?I:"").includes(v)},filterSort:function(v,R){var I,te;return((I=v==null?void 0:v.label)!==null&&I!==void 0?I:"").localeCompare((te=R==null?void 0:R.label)!==null&&te!==void 0?te:"")},options:Aa})}),(0,a.jsxs)(y.Z.Item,{style:{display:F},name:"boolLabel",label:"\u5E03\u5C14\u503C",rules:[{required:!1}],children:["0 -",(0,a.jsx)(A.Z,{placeholder:"\u5982\uFF1A\u5173",defaultValue:Ee,onChange:ga,style:{width:"46%"}}),"1 -",(0,a.jsx)(A.Z,{placeholder:"\u5982\uFF1A\u5F00",defaultValue:Pe,onChange:Za,style:{width:"46%"}})]}),(0,a.jsx)(y.Z.Item,{style:{display:h},name:"dataLength",label:"\u6570\u636E\u957F\u5EA6",rules:[{required:!1}],children:(0,a.jsx)(A.Z,{placeholder:"10240",defaultValue:"10240",addonAfter:"\u5B57\u8282"})}),(0,a.jsx)(y.Z.Item,{style:{display:P},name:"readWrite",label:"\u8BFB\u5199\u7C7B\u578B",rules:[{required:!1}],children:(0,a.jsxs)(ge.ZP.Group,{onChange:De,name:"radiogroup",defaultValue:0,value:Ue,children:[(0,a.jsx)(ge.ZP,{value:0,children:"\u8BFB\u5199"}),(0,a.jsx)(ge.ZP,{value:1,children:"\u53EA\u8BFB"})]})}),(0,a.jsx)(y.Z.Item,{name:"description",label:"\u63CF\u8FF0",rules:[{required:!1}],children:(0,a.jsx)(ma,{showCount:!0,maxLength:100,style:{height:120,resize:"none"},placeholder:"\u8BF7\u8F93\u5165\u63CF\u8FF0"})}),(0,a.jsxs)(y.Z.Item,{children:[(0,a.jsx)(N.Z,{htmlType:"button",style:{float:"right",left:10},onClick:e.onCancel,children:"\u53D6\u6D88"}),(0,a.jsx)(N.Z,{type:"primary",htmlType:"submit",style:{float:"right"},children:"\u4FDD\u5B58"})]})]})})},Oa=La,Ka=r(64317),Ma=r(77933),Wa=function(e){var S=y.Z.useForm(),l=(0,c.Z)(S,1),Ze=l[0],V=o.useRef(null),ee=(0,o.useState)("text"),P=(0,c.Z)(ee,2),O=P[0],K=P[1],M=(0,o.useState)("Form"),q=(0,c.Z)(M,2),Q=q[0],U=q[1],X=(0,o.useState)([]),J=(0,c.Z)(X,2),le=J[0],$=J[1],W=(0,o.useState)(!1),E=(0,c.Z)(W,2),k=E[0],D=E[1],B=(0,o.useState)(!1),re=(0,c.Z)(B,2),Y=re[0],oe=re[1];(0,o.useEffect)(function(){var m;if((m=V.current)===null||m===void 0||m.setFieldsValue(e.values),e.createModalVisible)if(e.values.actionType==null){var g;(g=V.current)===null||g===void 0||g.setFieldsValue({actionType:"text"}),e.values.actionType="text",K("text"),U("Form"),$([])}else{var h;if((h=V.current)===null||h===void 0||h.setFieldsValue({actionType:e.values.actionType}),K(e.values.actionType),e.values.actionType=="select"){U("ModalForm");for(var b=[],H=JSON.parse(e.values.actionValue),se=0;se<H.length;se++)b.push({actionValueName:H[se].actionValueName});$(b)}else K(e.values.actionType),U("Form"),$([])}},[e.createModalVisible]);var ne=function(g){if(console.log(JSON.stringify(g)),g){var h;(h=V.current)===null||h===void 0||h.setFieldsValue({actionValue:JSON.stringify(g)})}D(!1),x.default.success("\u4FDD\u5B58\u6210\u529F")},F=[{value:"text",label:"text(\u5B57\u7B26\u4E32)"},{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)"}],C=[{dataIndex:"actionValue",valueType:"dependency",name:["valueType"],columns:function(g){var h=g.actionType;switch(console.log(O),O){case"select":return[{dataIndex:"list",valueType:"formList",initialValue:le,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(H,se,ae){return[(0,a.jsx)("div",{style:{float:"right"},children:(0,a.jsx)(N.Z,{type:"primary",style:{"margin-left":"5px"},onClick:function(){var de,ce;return ne(ae==null||(de=ae.formRef)===null||de===void 0||(ce=de.current)===null||ce===void 0?void 0:ce.getFieldValue("list")),!0},children:"\u4FDD\u5B58"})})]}}];case"text":return[{dataIndex:"actionValue",valueType:"text",renderFormItem:function(){return(0,a.jsx)(A.Z,{placeholder:"\u8F93\u5165\u7C7B\u578B\u503C",disabled:!0})}}];default:return[{dataIndex:"actionValue",valueType:O,fieldProps:{disabled:!0}}]}}}];return(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(ie.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)(y.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)(y.Z.Item,{name:"id",hidden:!0,children:(0,a.jsx)(A.Z,{})}),(0,a.jsxs)(y.Z.Item,{children:[(0,a.jsx)(y.Z.Item,{name:"actionName",label:"\u53C2\u6570\u540D\u79F0",rules:[{required:!0,max:64,whitespace:!0}],children:(0,a.jsx)(A.Z,{placeholder:"\u8BF7\u8F93\u5165\u53C2\u6570\u540D\u79F0"})}),(0,a.jsx)(y.Z.Item,{name:"actionType",label:"\u6570\u636E\u7C7B\u578B",rules:[{required:!0,max:64,whitespace:!0}],children:(0,a.jsx)(Ka.Z,{options:F,fieldProps:{value:O,onChange:function(g){g=="select"?U("ModalForm"):U("Form"),K(g)}}})}),(0,a.jsx)(y.Z.Item,{name:"actionValue",label:"\u8F93\u5165\u7C7B\u578B\u63A7\u4EF6",children:(0,a.jsx)(Ma.Z,{trigger:(0,a.jsx)("a",{onClick:function(){return D(!0)},children:"\u6DFB\u52A0\u679A\u4E3E"}),columns:C,layoutType:Q,visible:k,modalProps:{forceRender:!0,onCancel:function(){return D(!1)}},onVisibleChange:function(g){oe(g)},width:420,shouldUpdate:Y,submitter:!1,style:{padding:"40px 10px 1px 10px;"}})}),(0,a.jsx)(y.Z.Item,{name:"sort",label:"\u6392\u5E8F",children:(0,a.jsx)(A.Z,{placeholder:"\u8BF7\u8F93\u5165\u6392\u5E8F"})}),(0,a.jsx)(N.Z,{htmlType:"button",style:{float:"right",left:10},onClick:e.onCancel,children:"\u53D6\u6D88"}),(0,a.jsx)(N.Z,{type:"primary",htmlType:"submit",style:{float:"right"},children:"\u4FDD\u5B58"})]})]})})})},Na=Wa,L=r(48971);function Va(d){return Xe.apply(this,arguments)}function Xe(){return Xe=(0,p.Z)((0,u.Z)().mark(function d(e){return(0,u.Z)().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.abrupt("return",(0,L.WY)("/saasbase/api/productfunction/page",{method:"Post",data:e}));case 1:case"end":return l.stop()}},d)})),Xe.apply(this,arguments)}function Ga(d){return $e.apply(this,arguments)}function $e(){return $e=(0,p.Z)((0,u.Z)().mark(function d(e){return(0,u.Z)().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.abrupt("return",(0,L.WY)("/saasbase/api/productfunction/add",{method:"Post",data:e}));case 1:case"end":return l.stop()}},d)})),$e.apply(this,arguments)}function za(d){return _e.apply(this,arguments)}function _e(){return _e=(0,p.Z)((0,u.Z)().mark(function d(e){return(0,u.Z)().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.abrupt("return",(0,L.WY)("/saasbase/api/productfunction/update",{method:"Post",data:e}));case 1:case"end":return l.stop()}},d)})),_e.apply(this,arguments)}function Ua(d){return ea.apply(this,arguments)}function ea(){return ea=(0,p.Z)((0,u.Z)().mark(function d(e){return(0,u.Z)().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.abrupt("return",(0,L.WY)("/saasbase/api/productfunction/delete",{method:"Post",data:e}));case 1:case"end":return l.stop()}},d)})),ea.apply(this,arguments)}function Ja(d){return aa.apply(this,arguments)}function aa(){return aa=(0,p.Z)((0,u.Z)().mark(function d(e){return(0,u.Z)().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.abrupt("return",(0,L.WY)("/saasbase/api/producttopics/page",{method:"Post",data:e}));case 1:case"end":return l.stop()}},d)})),aa.apply(this,arguments)}function Ya(d){return ta.apply(this,arguments)}function ta(){return ta=(0,p.Z)((0,u.Z)().mark(function d(e){return(0,u.Z)().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.abrupt("return",(0,L.WY)("/saasbase/api/producttopics/add",{method:"Post",data:e}));case 1:case"end":return l.stop()}},d)})),ta.apply(this,arguments)}function Ha(d){return la.apply(this,arguments)}function la(){return la=(0,p.Z)((0,u.Z)().mark(function d(e){return(0,u.Z)().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.abrupt("return",(0,L.WY)("/saasbase/api/producttopics/update",{method:"Post",data:e}));case 1:case"end":return l.stop()}},d)})),la.apply(this,arguments)}function qa(d){return na.apply(this,arguments)}function na(){return na=(0,p.Z)((0,u.Z)().mark(function d(e){return(0,u.Z)().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.abrupt("return",(0,L.WY)("/saasbase/api/producttopics/delete",{method:"Post",data:e}));case 1:case"end":return l.stop()}},d)})),na.apply(this,arguments)}function Qa(d){return ua.apply(this,arguments)}function ua(){return ua=(0,p.Z)((0,u.Z)().mark(function d(e){return(0,u.Z)().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.abrupt("return",(0,L.WY)("/saasbase/api/productfunction/getproductfunctionaction?productFunctionId="+e,{method:"Get"}));case 1:case"end":return l.stop()}},d)})),ua.apply(this,arguments)}function Xa(d){return ia.apply(this,arguments)}function ia(){return ia=(0,p.Z)((0,u.Z)().mark(function d(e){return(0,u.Z)().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.abrupt("return",(0,L.WY)("/saasbase/api/productfunction/addproductfunctionaction",{method:"Post",data:e}));case 1:case"end":return l.stop()}},d)})),ia.apply(this,arguments)}function $a(d){return ra.apply(this,arguments)}function ra(){return ra=(0,p.Z)((0,u.Z)().mark(function d(e){return(0,u.Z)().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.abrupt("return",(0,L.WY)("/saasbase/api/productfunction/updateproductfunctionaction",{method:"Post",data:e}));case 1:case"end":return l.stop()}},d)})),ra.apply(this,arguments)}function _a(d){return oa.apply(this,arguments)}function oa(){return oa=(0,p.Z)((0,u.Z)().mark(function d(e){return(0,u.Z)().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.abrupt("return",(0,L.WY)("/saasbase/api/productfunction/delproductfunctionaction",{method:"Post",data:e}));case 1:case"end":return l.stop()}},d)})),oa.apply(this,arguments)}function et(d){return sa.apply(this,arguments)}function sa(){return sa=(0,p.Z)((0,u.Z)().mark(function d(e){return(0,u.Z)().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.abrupt("return",(0,L.WY)("/saasbase/api/devicevesion/getdevicevesion?productId=".concat(e),{method:"Get"}));case 1:case"end":return l.stop()}},d)})),sa.apply(this,arguments)}var ct=z.Z.Option,vt=z.Z.OptGroup,at=function(e){var S=(0,o.useState)([]),l=(0,c.Z)(S,2),Ze=l[0],V=l[1],ee=(0,o.useState)([]),P=(0,c.Z)(ee,2),O=P[0],K=P[1],M=(0,o.useRef)(),q=y.Z.useForm(),Q=(0,c.Z)(q,1),U=Q[0],X=(0,o.useState)(),J=(0,c.Z)(X,2),le=J[0],$=J[1],W=(0,o.useState)(!1),E=(0,c.Z)(W,2),k=E[0],D=E[1],B={text:{value:"text",text:"text(\u5B57\u7B26\u4E32)"},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)"}},re=[{title:"\u53C2\u6570\u540D\u79F0",dataIndex:"actionName",width:"15%"},{title:"\u6570\u636E\u7C7B\u578B",key:"actionType",dataIndex:"actionType",valueType:"select",width:"15%",valueEnum:B},{title:"\u6392\u5E8F",dataIndex:"sort",valueType:"digit",width:"8%"},{title:"\u64CD\u4F5C",valueType:"option",width:200,render:function(C,m,g,h){return[(0,a.jsx)("a",{onClick:function(){D(!0),V(m)},children:"\u7F16\u8F91"},"editable"),(0,a.jsx)(Fe.Z,{type:"primary",title:"\u786E\u8BA4\u5220\u9664\u5417\uFF1F",okText:"\u662F",cancelText:"\u5426",onConfirm:function(){var H;ne([m.id]),(H=M.current)===null||H===void 0||H.reloadAndRest()},onCancel:function(){},children:(0,a.jsx)("a",{href:"#",children:"\u5220\u9664"})},"primary"),,]}}],Y=function(){var F=(0,p.Z)((0,u.Z)().mark(function C(m){return(0,u.Z)().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:return console.log(m),h.next=3,Xa(JSON.stringify(m)).then(function(b){b.data?x.default.success("\u6DFB\u52A0\u6210\u529F"):x.default.error(b.errors)});case 3:return h.abrupt("return",!0);case 4:case"end":return h.stop()}},C)}));return function(m){return F.apply(this,arguments)}}(),oe=function(){var F=(0,p.Z)((0,u.Z)().mark(function C(m){return(0,u.Z)().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:return h.next=2,$a(JSON.stringify(m)).then(function(b){b.data?x.default.success("\u4FEE\u6539\u6210\u529F"):x.default.error(b.errors)});case 2:return h.abrupt("return",!0);case 3:case"end":return h.stop()}},C)}));return function(m){return F.apply(this,arguments)}}(),ne=function(){var F=(0,p.Z)((0,u.Z)().mark(function C(m){return(0,u.Z)().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:return h.prev=0,_a(m).then(function(b){b.data?(x.default.success("\u5220\u9664\u6210\u529F"),M.current.reload()):x.default.error(b.errors)}),h.abrupt("return",!0);case 5:h.prev=5,h.t0=h.catch(0),x.default.error("\u5220\u9664\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5");case 8:case"end":return h.stop()}},C,null,[[0,5]])}));return function(m){return F.apply(this,arguments)}}();return(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)(ie.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)(me.ZP,{rowKey:"id",headerTitle:"\u53C2\u6570\u914D\u7F6E\u5217\u8868",actionRef:M,pagination:!1,search:!1,toolBarRender:function(){return[(0,a.jsxs)(N.Z,{type:"primary",onClick:function(){D(!0),V({})},children:[(0,a.jsx)(fe.Z,{})," \u65B0\u5EFA"]},"primary")]},columns:re,request:(0,p.Z)((0,u.Z)().mark(function F(){var C;return(0,u.Z)().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return C=[],console.log(e.values.id),g.next=4,Qa(e.values.id).then(function(h){C=h.data});case 4:return g.abrupt("return",{data:C,success:!0});case 5:case"end":return g.stop()}},F)}))}),(0,a.jsx)(Na,{onFinish:function(){var F=(0,p.Z)((0,u.Z)().mark(function C(m){var g;return(0,u.Z)().wrap(function(b){for(;;)switch(b.prev=b.next){case 0:if(g=!1,console.log(m),console.log(m.actionValue),m.productFunctionId=e.values.id,!m.id){b.next=10;break}return b.next=7,oe(m);case 7:g=b.sent,b.next=13;break;case 10:return b.next=12,Y(m);case 12:g=b.sent;case 13:g&&(D(!1),M.current&&M.current.reload());case 14:case"end":return b.stop()}},C)}));return function(C){return F.apply(this,arguments)}}(),onCancel:function(){V(void 0),D(!1)},createModalVisible:k,actionValueName:le,values:Ze||{}})]})})},tt=at,ht=r(17462),lt=r(76772),nt=function(e){var S,l=z.Z.Option,Ze=z.Z.OptGroup,V=y.Z.useForm(),ee=(0,c.Z)(V,1),P=ee[0],O=A.Z.TextArea,K=(0,o.useState)(""),M=(0,c.Z)(K,2),q=M[0],Q=M[1],U=(0,o.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"),X=(0,c.Z)(U,2),J=X[0],le=X[1];(0,o.useEffect)(function(){var W;if(e!=null&&(W=e.values)!==null&&W!==void 0&&W.id){var E,k,D,B;P.setFieldsValue({id:e==null||(E=e.values)===null||E===void 0?void 0:E.id,topics:e==null||(k=e.values)===null||k===void 0?void 0:k.topics,topicsType:e==null||(D=e.values)===null||D===void 0?void 0:D.topicsType,description:e==null||(B=e.values)===null||B===void 0?void 0:B.description})}},[e==null?void 0:e.values]);var $=function(E){console.log(E),Q(E.target.value)};return(0,a.jsxs)(ie.Z,{title:e!=null&&(S=e.values)!==null&&S!==void 0&&S.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)(lt.Z,{message:"\u8BF4\u660E",description:J,type:"info"}),(0,a.jsxs)(y.Z,{layout:"vertical",preserve:!1,form:P,onFinish:function(){P.setFieldsValue({topics:"/"+e.productCode+"/${deviceKey}/use/"+q}),console.log(P.getFieldsValue()),e==null||e.onFinish(P.getFieldsValue())},children:[(0,a.jsx)(y.Z.Item,{name:"id",hidden:!0,children:(0,a.jsx)(A.Z,{})}),(0,a.jsx)(y.Z.Item,{name:"topics",label:"Topics\u7C7B",rules:[{required:!0,max:64,whitespace:!0}],children:(0,a.jsx)(A.Z,{addonBefore:e.productCode+"/${deviceKey}/use/",onChange:$,placeholder:"\u8BF7\u8F93\u5165Topics\u7C7B"})}),(0,a.jsx)(y.Z.Item,{label:"\u7C7B\u578B",name:"topicsType",rules:[{required:!0}],children:(0,a.jsx)(z.Z,{options:[{value:"0",label:"\u53D1\u5E03"},{value:"1",label:"\u8BA2\u9605"},{value:"2",label:"\u53D1\u5E03\u548C\u8BA2\u9605"}]})}),(0,a.jsx)(y.Z.Item,{name:"description",label:"\u63CF\u8FF0",rules:[{required:!1}],children:(0,a.jsx)(O,{showCount:!0,maxLength:100,style:{height:120,resize:"none"},placeholder:"\u8BF7\u8F93\u5165\u63CF\u8FF0"})}),(0,a.jsxs)(y.Z.Item,{children:[(0,a.jsx)(N.Z,{htmlType:"button",style:{float:"right",left:10},onClick:e.onCancel,children:"\u53D6\u6D88"}),(0,a.jsx)(N.Z,{type:"primary",htmlType:"submit",style:{float:"right"},children:"\u4FDD\u5B58"})]})]})]})},ut=nt,Ea=w.Z.Paragraph,ft=w.Z.Text,mt={beforeUpload:function(e){return e.type!=="application/vnd.ms-excel"&&e.type!=="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"&&x.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:Qe.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"?x.default.success("".concat(e.file.name," file uploaded successfully")):e.file.status==="error"&&x.default.error("".concat(e.file.name," file upload failed."))}},it=function(e){var S=(0,o.useState)(!1),l=(0,c.Z)(S,2),Ze=l[0],V=l[1],ee=(0,o.useState)(!1),P=(0,c.Z)(ee,2),O=P[0],K=P[1],M=(0,o.useState)("basis"),q=(0,c.Z)(M,2),Q=q[0],U=q[1],X=(0,o.useState)(!1),J=(0,c.Z)(X,2),le=J[0],$=J[1],W=(0,o.useState)(!1),E=(0,c.Z)(W,2),k=E[0],D=E[1],B=(0,o.useRef)(),re=(0,o.useRef)(),Y=(0,o.useState)(),oe=(0,c.Z)(Y,2),ne=oe[0],F=oe[1],C=(0,o.useState)(),m=(0,c.Z)(C,2),g=m[0],h=m[1],b=(0,o.useState)([]),H=(0,c.Z)(b,2),se=H[0],ae=H[1],be=(0,o.useState)([]),de=(0,c.Z)(be,2),ce=de[0],da=de[1],pe=(0,o.useState)([]),Ge=(0,c.Z)(pe,2),ze=Ge[0],Ue=Ge[1],ca=(0,o.useState)([]),Je=(0,c.Z)(ca,2),va=Je[0],G=Je[1],ha=(0,o.useState)({}),Ve=(0,c.Z)(ha,2),Ee=Ve[0],Ie=Ve[1],fa=(0,o.useState)(0),Be=(0,c.Z)(fa,2),Pe=Be[0],ke=Be[1],ma=(0,o.useState)(0),Ye=(0,c.Z)(ma,2),Ia=Ye[0],ya=Ye[1],ba=(0,o.useState)({operationKey:e.location.query.tabStatus?e.location.query.tabStatus:"basis",tabActiveKey:e.location.query.tabStatus?e.location.query.tabStatus:"basis"}),xe=(0,c.Z)(ba,2),De=xe[0],ga=xe[1];(0,o.useEffect)(function(){console.log("props.location",e.location),U(De.tabActiveKey),e.location.query.values.id?et(e.location.query.values.id).then(function(f){var i={};f.data.forEach(function(Z){i[Z.id]={text:Z.vesion}}),G(f.data),Ie(i);var n={productId:e.location.query.values.id,deviceTypeKey:e.location.query.values.id,current:1,pageSize:10};he(n),ve(n)}):L.m8.push({pathname:"/device/product"})},[De]);var Za=function(i){var n=[];return i.type==1&&n.push((0,a.jsx)("a",{onClick:function(){var t,s;$(!0),F(i),(t=B.current)===null||t===void 0||(s=t.reloadAndRest)===null||s===void 0||s.call(t)},children:"\u53C2\u6570\u914D\u7F6E"},"config")),n.push((0,a.jsx)("a",{onClick:function(){var t,s;V(!0),F(i),(t=B.current)===null||t===void 0||(s=t.reloadAndRest)===null||s===void 0||s.call(t)},children:"\u66F4\u65B0"},"config")),n.push((0,a.jsx)(Fe.Z,{type:"primary",title:"\u786E\u8BA4\u5220\u9664\u5417\uFF1F",okText:"\u662F",cancelText:"\u5426",onConfirm:function(){var t;te([i.id]),(t=B.current)===null||t===void 0||t.reloadAndRest()},onCancel:function(){},children:(0,a.jsx)("a",{href:"#",children:"\u5220\u9664"})},"primary")),n.push((0,a.jsx)("a",{onClick:(0,p.Z)((0,u.Z)().mark(function Z(){var t;return(0,u.Z)().wrap(function(T){for(;;)switch(T.prev=T.next){case 0:return t=0,i.status==0&&(t=1),F(i.status=t),T.next=5,Ce(i).then(function(_){_?B.current.reload():x.default.error("\u914D\u7F6E\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01")});case 5:case"end":return T.stop()}},Z)})),children:i.status==0?"\u7981\u7528":"\u542F\u7528"},"state")),n},j=[{title:"\u4E3B\u952E",dataIndex:"id",tip:"\u89C4\u5219\u540D\u79F0\u662F\u552F\u4E00\u7684 key",hideInSearch:!0,hideInTable:!0,render:function(i,n){return(0,a.jsx)("a",{onClick:function(){F(n),D(!0)},children:i})}},{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"}}},{title:"\u7248\u672C",dataIndex:"vesion",valueType:"select",ellipsis:!0,search:!0,valueEnum:Ee},{title:"\u72B6\u6001",dataIndex:"status",hideInForm:!0,search:!0,valueEnum:{0:{text:"\u542F\u7528",status:"Processing"},1:{text:"\u7981\u7528",status:"Success"}}},{title:"\u521B\u5EFA\u65F6\u95F4",dataIndex:"createAt",valueType:"date",hideInSearch:!0},{title:"\u64CD\u4F5C",dataIndex:"option",valueType:"option",fixed:"right",width:400,render:function(i,n){return Za(n)}}],v=[{title:"\u4E3B\u952E",dataIndex:"id",tip:"\u89C4\u5219\u540D\u79F0\u662F\u552F\u4E00\u7684 key",hideInSearch:!0,hideInTable:!0,render:function(i,n){return(0,a.jsx)("a",{onClick:function(){F(n),D(!0)},children:i})}},{title:"Topics\u7C7B",dataIndex:"topics",valueType:"textarea",render:function(i){return(0,a.jsx)(Ea,{style:{display:"inline"},copyable:!0,children:i})}},{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:450,render:function(i,n){return[(0,a.jsx)("a",{onClick:function(){K(!0),h(n)},children:" \u66F4\u65B0"},"config"),(0,a.jsx)(Fe.Z,{type:"primary",title:"\u786E\u8BA4\u5220\u9664\u5417\uFF1F",okText:"\u662F",cancelText:"\u5426",onConfirm:(0,p.Z)((0,u.Z)().mark(function Z(){return(0,u.Z)().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.next=2,qa([n.id]).then(function(T){x.default.success("\u5220\u9664\u6210\u529F\uFF0C\u5373\u5C06\u5237\u65B0");var _={productId:e.location.query.values.id,current:1,pageSize:10};ve(_)});case 2:case"end":return s.stop()}},Z)})),onCancel:function(){},children:(0,a.jsx)("a",{href:"#",children:"\u5220\u9664"})},"primary")]}}],R=[{key:"basis",tab:"\u529F\u80FD"},{key:"topis",tab:"topis\u7C7B\u5217\u8868"}],I=function(){var f=(0,p.Z)((0,u.Z)().mark(function i(n){return(0,u.Z)().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,console.log(n),n.dataType=="select"&&(n.enumvaluelist.length==0?x.default.error("\u8BF7\u6DFB\u52A0\u679A\u4E3E\u503C"):n.enumValue=JSON.stringify(n.enumvaluelist)),n.type==1&&(n.dataType=""),t.next=6,Ga(JSON.stringify(n)).then(function(s){if(s.data){x.default.success("\u6DFB\u52A0\u6210\u529F");var T={productId:e.location.query.values.id,deviceTypeKey:e.location.query.values.id,current:1,pageSize:10};he(T)}else x.default.error(s.errors)});case 6:return t.abrupt("return",!0);case 9:return t.prev=9,t.t0=t.catch(0),x.default.error("\u6DFB\u52A0\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01"),t.abrupt("return",!1);case 13:case"end":return t.stop()}},i,null,[[0,9]])}));return function(n){return f.apply(this,arguments)}}(),te=function(){var f=(0,p.Z)((0,u.Z)().mark(function i(n){return(0,u.Z)().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,Ua(n).then(function(s){if(s.data){x.default.success("\u5220\u9664\u6210\u529F");var T={productId:e.location.query.values.id,deviceTypeKey:e.location.query.values.id,current:1,pageSize:10};he(T)}else x.default.error(s.errors)}),t.abrupt("return",!0);case 5:t.prev=5,t.t0=t.catch(0),x.default.error("\u5220\u9664\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5");case 8:case"end":return t.stop()}},i,null,[[0,5]])}));return function(n){return f.apply(this,arguments)}}(),Ce=function(){var f=(0,p.Z)((0,u.Z)().mark(function i(n){return(0,u.Z)().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,n.dataType=="select"&&(n.enumvaluelist.length==0?x.default.error("\u8BF7\u6DFB\u52A0\u679A\u4E3E\u503C"):n.enumValue=JSON.stringify(n.enumvaluelist)),za(n).then(function(s){if(s.data){x.default.success("\u4FEE\u6539\u6210\u529F");var T={productId:e.location.query.values.id,deviceTypeKey:e.location.query.values.id,current:1,pageSize:10};he(T)}else x.default.error(s.errors)}),t.abrupt("return",!0);case 6:return t.prev=6,t.t0=t.catch(0),x.default.error("\u4FEE\u6539\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01"),t.abrupt("return",!1);case 10:case"end":return t.stop()}},i,null,[[0,6]])}));return function(n){return f.apply(this,arguments)}}(),ve=function(){var f=(0,p.Z)((0,u.Z)().mark(function i(n){return(0,u.Z)().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Ja(n).then(function(s){da(s.data.data),ke(s.data.total)});case 2:case"end":return t.stop()}},i)}));return function(n){return f.apply(this,arguments)}}(),he=function(){var f=(0,p.Z)((0,u.Z)().mark(function i(n){return(0,u.Z)().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Va(n).then(function(s){Ue(s.data.data),ya(s.data.total)});case 2:case"end":return t.stop()}},i)}));return function(n){return f.apply(this,arguments)}}(),Re=function(i){console.log(i),ga({operationKey:i,tabActiveKey:i})},Ae={basis:(0,a.jsxs)(Se.Z,{style:{marginBottom:24},bordered:!1,children:[(0,a.jsx)(me.ZP,{actionRef:B,rowKey:"id",pagination:{defaultPageSize:10},search:{labelWidth:120},columns:j,toolBarRender:function(){return[(0,a.jsxs)(N.Z,{type:"primary",onClick:function(){V(!0),F({})},children:[(0,a.jsx)(fe.Z,{})," \u65B0\u5EFA"]},"primary")]},dataSource:ze,request:function(){var f=(0,p.Z)((0,u.Z)().mark(function i(n){var Z,t;return(0,u.Z)().wrap(function(T){for(;;)switch(T.prev=T.next){case 0:return Z=[],t=0,n.deviceTypeKey=e.location.query.values.id,T.next=5,Va(n).then(function(_){Z=_.data.data,Ue(_.data.data),t=_.data.total});case 5:return T.abrupt("return",{data:Z,success:!0,total:t});case 6:case"end":return T.stop()}},i)}));return function(i){return f.apply(this,arguments)}}(),rowSelection:{onChange:function(i,n){ae(n)}}}),(0,a.jsx)(Oa,{onFinish:function(){var f=(0,p.Z)((0,u.Z)().mark(function i(n){var Z;return(0,u.Z)().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:if(console.log("jnlaile "),console.log(n),n.productId=e.location.query.values.id,Z=!1,!n.id){s.next=10;break}return s.next=7,Ce(n);case 7:Z=s.sent,s.next=13;break;case 10:return s.next=12,I(n);case 12:Z=s.sent;case 13:Z&&(V(!1),B.current&&B.current.reload());case 14:case"end":return s.stop()}},i)}));return function(i){return f.apply(this,arguments)}}(),onCancel:function(){F(void 0),V(!1)},createModalVisible:Ze,values:ne||{},DeviceVesionData:va}),(0,a.jsx)(tt,{actionFormModalVisible:le,values:ne||{},onCancel:function(){F(void 0),$(!1)}})]}),topis:(0,a.jsxs)(Se.Z,{style:{marginBottom:24},bordered:!1,children:[(0,a.jsx)(me.ZP,{id:"table1",actionRef:re,rowKey:"id",pagination:{defaultPageSize:10,total:Pe},search:{labelWidth:120},columns:v,toolBarRender:function(){return[(0,a.jsxs)(N.Z,{type:"primary",onClick:function(){K(!0),h({})},children:[(0,a.jsx)(fe.Z,{})," \u65B0\u5EFA"]},"primary")]},dataSource:ce,rowSelection:{onChange:function(i,n){ae(n)}}}),(0,a.jsx)(ut,{createModalVisible:O,productCode:e.location.query.values.key,values:g||{},onFinish:function(){var f=(0,p.Z)((0,u.Z)().mark(function i(n){return(0,u.Z)().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n.productId=e.location.query.values.id,!n.id){t.next=6;break}return t.next=4,Ha(n).then(function(s){if(s.data){x.default.success("\u4FEE\u6539\u6210\u529F"),K(!1);var T={productId:e.location.query.values.id,current:1,pageSize:10};ve(T)}else x.default.error(s.errors)});case 4:t.next=8;break;case 6:return t.next=8,Ya(n).then(function(s){if(s.data){x.default.success("\u6DFB\u52A0\u6210\u529F");var T={productId:e.location.query.values.id,current:1,pageSize:10};ve(T),K(!1)}else x.default.error(s.errors)});case 8:case"end":return t.stop()}},i)}));return function(i){return f.apply(this,arguments)}}(),onCancel:function(){h(void 0),K(!1)}})]})};return(0,a.jsx)(Te.ZP,{host:!0,header:{title:[(0,a.jsxs)("a",{onClick:function(){L.m8.push({pathname:"/device/product"})},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\u540D\u79F0:",(0,a.jsx)("span",{style:{marginLeft:10},children:e.location.query.values.name})]}),(0,a.jsxs)("span",{style:{marginRight:120,marginLeft:10,marginTop:10,float:"right"},children:["\u4EA7\u54C1key: ",(0,a.jsx)(Ea,{style:{display:"inline"},copyable:!0,children:e.location.query.values.key})]})]})})],breadcrumb:{}},title:e.location.query.isAdd?"\u5546\u54C1\u65B0\u589E":"\u8BE6\u60C5",tabActiveKey:Q,onTabChange:Re,tabList:R,children:Ae[De.operationKey]})},rt=it}}]);