Files
weiyu/deploy/server/admin/p__Dashboard__Quality__smart-config__behavior-rules.53f9250a.async.js
jack ning 4c7623244a update
2025-07-30 11:08:35 +08:00

1 line
14 KiB
JavaScript

"use strict";(self.webpackChunkadmin=self.webpackChunkadmin||[]).push([[9380],{91768:function(e,n,i){i.d(n,{Z:function(){return d}});var t=i(77260),a=i(44194),l={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"},r=i(5901),c=function(e,n){return a.createElement(r.Z,(0,t.Z)({},e,{ref:n,icon:l}))};var d=a.forwardRef(c)},57351:function(e,n,i){i.r(n);var t=i(45332),a=i.n(t),l=i(44194),r=i(34251),c=i(25950),d=i(34651),o=i(43443),s=i(43413),u=i(77407),h=i(63065),g=i(68525),m=i(35129),p=i(5858),x=i(9248),k=i(61978),$=i(38862),f=i(41881),v=i(91768),b=i(6992),S=i(31549),I=r.Z.Option,j=c.Z.TextArea;n.default=function(){var e=l.useState(!1),n=a()(e,2),i=n[0],t=n[1],y=l.useState(null),Z=a()(y,2),w=Z[0],C=Z[1],M=d.Z.useForm(),E=a()(M,1)[0],q=[{title:"规则名称",dataIndex:"ruleName",key:"ruleName"},{title:"规则类型",dataIndex:"ruleType",key:"ruleType",render:function(e){var n="响应时间"===e?"blue":"服务态度"===e?"green":"orange";return(0,S.jsx)(o.Z,{color:n,children:e})}},{title:"触发条件",dataIndex:"triggerCondition",key:"triggerCondition"},{title:"扣分",dataIndex:"deductScore",key:"deductScore",render:function(e){return(0,S.jsxs)(o.Z,{color:"red",children:["-",e,"分"]})}},{title:"优先级",dataIndex:"priority",key:"priority",render:function(e){var n=1===e?"red":2===e?"orange":"green";return(0,S.jsxs)(o.Z,{color:n,children:["P",e]})}},{title:"状态",dataIndex:"status",key:"status",render:function(e){return(0,S.jsx)(o.Z,{color:e?"green":"red",children:e?"启用":"禁用"})}},{title:"创建时间",dataIndex:"createTime",key:"createTime"},{title:"操作",key:"action",render:function(e,n){return(0,S.jsxs)(s.Z,{size:"middle",children:[(0,S.jsx)(u.ZP,{type:"link",size:"small",icon:(0,S.jsx)(f.Z,{}),onClick:function(){return z(n)},children:"编辑"}),(0,S.jsx)(u.ZP,{type:"link",size:"small",danger:!0,icon:(0,S.jsx)(v.Z,{}),children:"删除"})]})}}],z=function(e){C(e),t(!0),E.setFieldsValue(e)};return(0,S.jsx)("div",{style:{padding:"20px"},children:(0,S.jsxs)(h.Z,{title:"智能质检行为规则",extra:(0,S.jsx)(u.ZP,{type:"primary",icon:(0,S.jsx)(b.Z,{}),onClick:function(){C(null),t(!0),E.resetFields()},children:"新建规则"}),children:[(0,S.jsx)("div",{style:{marginBottom:16},children:(0,S.jsxs)(s.Z,{wrap:!0,children:[(0,S.jsx)(c.Z,{placeholder:"搜索规则名称",style:{width:200}}),(0,S.jsxs)(r.Z,{placeholder:"规则类型",style:{width:120},children:[(0,S.jsx)(I,{value:"all",children:"全部"}),(0,S.jsx)(I,{value:"response",children:"响应时间"}),(0,S.jsx)(I,{value:"attitude",children:"服务态度"}),(0,S.jsx)(I,{value:"professional",children:"专业能力"})]}),(0,S.jsxs)(r.Z,{placeholder:"状态",style:{width:120},children:[(0,S.jsx)(I,{value:"all",children:"全部"}),(0,S.jsx)(I,{value:"enabled",children:"启用"}),(0,S.jsx)(I,{value:"disabled",children:"禁用"})]}),(0,S.jsx)(u.ZP,{type:"primary",children:"搜索"})]})}),(0,S.jsx)(g.Z,{columns:q,dataSource:[{key:"1",ruleName:"响应超时规则",ruleType:"响应时间",triggerCondition:"响应时间 > 5分钟",deductScore:10,priority:1,status:!0,createTime:"2025-01-16 10:30:00"},{key:"2",ruleName:"态度恶劣规则",ruleType:"服务态度",triggerCondition:"检测到负面情绪词汇",deductScore:15,priority:1,status:!0,createTime:"2025-01-16 11:15:00"},{key:"3",ruleName:"专业能力不足规则",ruleType:"专业能力",triggerCondition:"回答不准确或模糊",deductScore:8,priority:2,status:!0,createTime:"2025-01-16 12:00:00"}]}),(0,S.jsx)(m.Z,{title:w?"编辑行为规则":"新建行为规则",open:i,onOk:function(){E.validateFields().then((function(e){console.log("Form values:",e),t(!1),E.resetFields()}))},onCancel:function(){t(!1),E.resetFields()},width:800,children:(0,S.jsxs)(d.Z,{form:E,layout:"vertical",children:[(0,S.jsxs)(p.Z,{gutter:16,children:[(0,S.jsx)(x.Z,{span:12,children:(0,S.jsx)(d.Z.Item,{name:"ruleName",label:"规则名称",rules:[{required:!0,message:"请输入规则名称"}],children:(0,S.jsx)(c.Z,{placeholder:"请输入规则名称"})})}),(0,S.jsx)(x.Z,{span:12,children:(0,S.jsx)(d.Z.Item,{name:"ruleType",label:"规则类型",rules:[{required:!0,message:"请选择规则类型"}],children:(0,S.jsxs)(r.Z,{placeholder:"请选择规则类型",children:[(0,S.jsx)(I,{value:"响应时间",children:"响应时间"}),(0,S.jsx)(I,{value:"服务态度",children:"服务态度"}),(0,S.jsx)(I,{value:"专业能力",children:"专业能力"}),(0,S.jsx)(I,{value:"问题解决",children:"问题解决"}),(0,S.jsx)(I,{value:"沟通技巧",children:"沟通技巧"})]})})})]}),(0,S.jsx)(d.Z.Item,{name:"triggerCondition",label:"触发条件",rules:[{required:!0,message:"请输入触发条件"}],children:(0,S.jsx)(j,{rows:3,placeholder:"请输入触发条件描述"})}),(0,S.jsxs)(p.Z,{gutter:16,children:[(0,S.jsx)(x.Z,{span:12,children:(0,S.jsx)(d.Z.Item,{name:"deductScore",label:"扣分",rules:[{required:!0,message:"请输入扣分"}],children:(0,S.jsx)(k.Z,{min:1,max:20,style:{width:"100%"}})})}),(0,S.jsx)(x.Z,{span:12,children:(0,S.jsx)(d.Z.Item,{name:"priority",label:"优先级",rules:[{required:!0,message:"请选择优先级"}],children:(0,S.jsxs)(r.Z,{placeholder:"请选择优先级",children:[(0,S.jsx)(I,{value:1,children:"P1 - 高优先级"}),(0,S.jsx)(I,{value:2,children:"P2 - 中优先级"}),(0,S.jsx)(I,{value:3,children:"P3 - 低优先级"})]})})})]}),(0,S.jsx)(d.Z.Item,{name:"description",label:"规则描述",children:(0,S.jsx)(j,{rows:3,placeholder:"请输入规则描述"})}),(0,S.jsx)(d.Z.Item,{name:"status",label:"状态",valuePropName:"checked",children:(0,S.jsx)($.Z,{checkedChildren:"启用",unCheckedChildren:"禁用"})})]})})]})})}},9248:function(e,n,i){var t=i(70065);n.Z=t.Z},5858:function(e,n,i){var t=i(70231);n.Z=t.Z},38862:function(e,n,i){i.d(n,{Z:function(){return T}});var t=i(44194),a=i(31568),l=i(51865),r=i.n(l),c=i(77260),d=i(54549),o=i(76285),s=i(17323),u=i(92032),h=i(68195),g=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],m=t.forwardRef((function(e,n){var i,a=e.prefixCls,l=void 0===a?"rc-switch":a,m=e.className,p=e.checked,x=e.defaultChecked,k=e.disabled,$=e.loadingIcon,f=e.checkedChildren,v=e.unCheckedChildren,b=e.onClick,S=e.onChange,I=e.onKeyDown,j=(0,s.Z)(e,g),y=(0,u.Z)(!1,{value:p,defaultValue:x}),Z=(0,o.Z)(y,2),w=Z[0],C=Z[1];function M(e,n){var i=w;return k||(C(i=e),null==S||S(i,n)),i}var E=r()(l,m,(i={},(0,d.Z)(i,"".concat(l,"-checked"),w),(0,d.Z)(i,"".concat(l,"-disabled"),k),i));return t.createElement("button",(0,c.Z)({},j,{type:"button",role:"switch","aria-checked":w,disabled:k,className:E,ref:n,onKeyDown:function(e){e.which===h.Z.LEFT?M(!1,e):e.which===h.Z.RIGHT&&M(!0,e),null==I||I(e)},onClick:function(e){var n=M(!w,e);null==b||b(n,e)}}),$,t.createElement("span",{className:"".concat(l,"-inner")},t.createElement("span",{className:"".concat(l,"-inner-checked")},f),t.createElement("span",{className:"".concat(l,"-inner-unchecked")},v)))}));m.displayName="Switch";var p=m,x=i(68756),k=i(81424),$=i(68304),f=i(38879),v=i(23490),b=i(87471),S=i(15273),I=i(81254),j=i(10750);const y=e=>{const{componentCls:n,trackHeightSM:i,trackPadding:t,trackMinWidthSM:a,innerMinMarginSM:l,innerMaxMarginSM:r,handleSizeSM:c,calc:d}=e,o=`${n}-inner`,s=(0,v.bf)(d(c).add(d(t).mul(2)).equal()),u=(0,v.bf)(d(r).mul(2).equal());return{[n]:{[`&${n}-small`]:{minWidth:a,height:i,lineHeight:(0,v.bf)(i),[`${n}-inner`]:{paddingInlineStart:r,paddingInlineEnd:l,[`${o}-checked, ${o}-unchecked`]:{minHeight:i},[`${o}-checked`]:{marginInlineStart:`calc(-100% + ${s} - ${u})`,marginInlineEnd:`calc(100% - ${s} + ${u})`},[`${o}-unchecked`]:{marginTop:d(i).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`${n}-handle`]:{width:c,height:c},[`${n}-loading-icon`]:{top:d(d(c).sub(e.switchLoadingIconSize)).div(2).equal(),fontSize:e.switchLoadingIconSize},[`&${n}-checked`]:{[`${n}-inner`]:{paddingInlineStart:l,paddingInlineEnd:r,[`${o}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${o}-unchecked`]:{marginInlineStart:`calc(100% - ${s} + ${u})`,marginInlineEnd:`calc(-100% + ${s} - ${u})`}},[`${n}-handle`]:{insetInlineStart:`calc(100% - ${(0,v.bf)(d(c).add(t).equal())})`}},[`&:not(${n}-disabled):active`]:{[`&:not(${n}-checked) ${o}`]:{[`${o}-unchecked`]:{marginInlineStart:d(e.marginXXS).div(2).equal(),marginInlineEnd:d(e.marginXXS).mul(-1).div(2).equal()}},[`&${n}-checked ${o}`]:{[`${o}-checked`]:{marginInlineStart:d(e.marginXXS).mul(-1).div(2).equal(),marginInlineEnd:d(e.marginXXS).div(2).equal()}}}}}}},Z=e=>{const{componentCls:n,handleSize:i,calc:t}=e;return{[n]:{[`${n}-loading-icon${e.iconCls}`]:{position:"relative",top:t(t(i).sub(e.fontSize)).div(2).equal(),color:e.switchLoadingIconColor,verticalAlign:"top"},[`&${n}-checked ${n}-loading-icon`]:{color:e.switchColor}}}},w=e=>{const{componentCls:n,trackPadding:i,handleBg:t,handleShadow:a,handleSize:l,calc:r}=e,c=`${n}-handle`;return{[n]:{[c]:{position:"absolute",top:i,insetInlineStart:i,width:l,height:l,transition:`all ${e.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:t,borderRadius:r(l).div(2).equal(),boxShadow:a,transition:`all ${e.switchDuration} ease-in-out`,content:'""'}},[`&${n}-checked ${c}`]:{insetInlineStart:`calc(100% - ${(0,v.bf)(r(l).add(i).equal())})`},[`&:not(${n}-disabled):active`]:{[`${c}::before`]:{insetInlineEnd:e.switchHandleActiveInset,insetInlineStart:0},[`&${n}-checked ${c}::before`]:{insetInlineEnd:0,insetInlineStart:e.switchHandleActiveInset}}}}},C=e=>{const{componentCls:n,trackHeight:i,trackPadding:t,innerMinMargin:a,innerMaxMargin:l,handleSize:r,calc:c}=e,d=`${n}-inner`,o=(0,v.bf)(c(r).add(c(t).mul(2)).equal()),s=(0,v.bf)(c(l).mul(2).equal());return{[n]:{[d]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:l,paddingInlineEnd:a,transition:`padding-inline-start ${e.switchDuration} ease-in-out, padding-inline-end ${e.switchDuration} ease-in-out`,[`${d}-checked, ${d}-unchecked`]:{display:"block",color:e.colorTextLightSolid,fontSize:e.fontSizeSM,transition:`margin-inline-start ${e.switchDuration} ease-in-out, margin-inline-end ${e.switchDuration} ease-in-out`,pointerEvents:"none",minHeight:i},[`${d}-checked`]:{marginInlineStart:`calc(-100% + ${o} - ${s})`,marginInlineEnd:`calc(100% - ${o} + ${s})`},[`${d}-unchecked`]:{marginTop:c(i).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`&${n}-checked ${d}`]:{paddingInlineStart:a,paddingInlineEnd:l,[`${d}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${d}-unchecked`]:{marginInlineStart:`calc(100% - ${o} + ${s})`,marginInlineEnd:`calc(-100% + ${o} - ${s})`}},[`&:not(${n}-disabled):active`]:{[`&:not(${n}-checked) ${d}`]:{[`${d}-unchecked`]:{marginInlineStart:c(t).mul(2).equal(),marginInlineEnd:c(t).mul(-1).mul(2).equal()}},[`&${n}-checked ${d}`]:{[`${d}-checked`]:{marginInlineStart:c(t).mul(-1).mul(2).equal(),marginInlineEnd:c(t).mul(2).equal()}}}}}},M=e=>{const{componentCls:n,trackHeight:i,trackMinWidth:t}=e;return{[n]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,S.Wf)(e)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:t,height:i,lineHeight:(0,v.bf)(i),verticalAlign:"middle",background:e.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${e.motionDurationMid}`,userSelect:"none",[`&:hover:not(${n}-disabled)`]:{background:e.colorTextTertiary}}),(0,S.Qy)(e)),{[`&${n}-checked`]:{background:e.switchColor,[`&:hover:not(${n}-disabled)`]:{background:e.colorPrimaryHover}},[`&${n}-loading, &${n}-disabled`]:{cursor:"not-allowed",opacity:e.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${n}-rtl`]:{direction:"rtl"}})}};var E=(0,I.I$)("Switch",(e=>{const n=(0,j.IX)(e,{switchDuration:e.motionDurationMid,switchColor:e.colorPrimary,switchDisabledOpacity:e.opacityLoading,switchLoadingIconSize:e.calc(e.fontSizeIcon).mul(.75).equal(),switchLoadingIconColor:`rgba(0, 0, 0, ${e.opacityLoading})`,switchHandleActiveInset:"-30%"});return[M(n),C(n),w(n),Z(n),y(n)]}),(e=>{const{fontSize:n,lineHeight:i,controlHeight:t,colorWhite:a}=e,l=n*i,r=t/2,c=l-4,d=r-4;return{trackHeight:l,trackHeightSM:r,trackMinWidth:2*c+8,trackMinWidthSM:2*d+4,trackPadding:2,handleBg:a,handleSize:c,handleSizeSM:d,handleShadow:`0 2px 4px 0 ${new b.t("#00230b").setA(.2).toRgbString()}`,innerMinMargin:c/2,innerMaxMargin:c+2+4,innerMinMarginSM:d/2,innerMaxMarginSM:d+2+4}})),q=function(e,n){var i={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.indexOf(t)<0&&(i[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(t=Object.getOwnPropertySymbols(e);a<t.length;a++)n.indexOf(t[a])<0&&Object.prototype.propertyIsEnumerable.call(e,t[a])&&(i[t[a]]=e[t[a]])}return i};const z=t.forwardRef(((e,n)=>{const{prefixCls:i,size:l,disabled:c,loading:d,className:o,rootClassName:s,style:h,checked:g,value:m,defaultChecked:v,defaultValue:b,onChange:S}=e,I=q(e,["prefixCls","size","disabled","loading","className","rootClassName","style","checked","value","defaultChecked","defaultValue","onChange"]),[j,y]=(0,u.Z)(!1,{value:null!=g?g:m,defaultValue:null!=v?v:b}),{getPrefixCls:Z,direction:w,switch:C}=t.useContext(k.E_),M=t.useContext($.Z),z=(null!=c?c:M)||d,N=Z("switch",i),T=t.createElement("div",{className:`${N}-handle`},d&&t.createElement(a.Z,{className:`${N}-loading-icon`})),[H,O,P]=E(N),D=(0,f.Z)(l),L=r()(null==C?void 0:C.className,{[`${N}-small`]:"small"===D,[`${N}-loading`]:d,[`${N}-rtl`]:"rtl"===w},o,s,O,P),W=Object.assign(Object.assign({},null==C?void 0:C.style),h);return H(t.createElement(x.Z,{component:"Switch"},t.createElement(p,Object.assign({},I,{checked:j,onChange:(...e)=>{y(e[0]),null==S||S.apply(void 0,e)},prefixCls:N,className:L,style:W,disabled:z,ref:n,loadingIcon:T}))))})),N=z;N.__ANT_SWITCH=!0;var T=N}}]);