Files
weiyu/deploy/server/admin/p__Dashboard__Quality__smart-config__behavior-rules.9668b618.async.js
2025-11-11 16:36:56 +08:00

1 line
5.3 KiB
JavaScript

"use strict";(self.webpackChunkadmin=self.webpackChunkadmin||[]).push([[9380],{69383:function(e,r,l){l.r(r);var n=l(45332),i=l.n(n),t=l(44194),s=l(13847),d=l(32525),a=l(41196),c=l(81739),u=l(39487),o=l(82770),h=l(40110),x=l(54943),j=l(86895),m=l(34201),p=l(79489),Z=l(45067),y=l(66431),g=l(59304),v=l(54881),k=l(10162),f=l(31549),C=s.Z.Option,I=d.Z.TextArea;r.default=function(){var e=t.useState(!1),r=i()(e,2),l=r[0],n=r[1],b=t.useState(null),T=i()(b,2),w=T[0],P=T[1],S=a.Z.useForm(),F=i()(S,1)[0],N=[{title:"规则名称",dataIndex:"ruleName",key:"ruleName"},{title:"规则类型",dataIndex:"ruleType",key:"ruleType",render:function(e){var r="响应时间"===e?"blue":"服务态度"===e?"green":"orange";return(0,f.jsx)(c.Z,{color:r,children:e})}},{title:"触发条件",dataIndex:"triggerCondition",key:"triggerCondition"},{title:"扣分",dataIndex:"deductScore",key:"deductScore",render:function(e){return(0,f.jsxs)(c.Z,{color:"red",children:["-",e,"分"]})}},{title:"优先级",dataIndex:"priority",key:"priority",render:function(e){var r=1===e?"red":2===e?"orange":"green";return(0,f.jsxs)(c.Z,{color:r,children:["P",e]})}},{title:"状态",dataIndex:"status",key:"status",render:function(e){return(0,f.jsx)(c.Z,{color:e?"green":"red",children:e?"启用":"禁用"})}},{title:"创建时间",dataIndex:"createTime",key:"createTime"},{title:"操作",key:"action",render:function(e,r){return(0,f.jsxs)(u.Z,{size:"middle",children:[(0,f.jsx)(o.ZP,{type:"link",size:"small",icon:(0,f.jsx)(g.Z,{}),onClick:function(){return q(r)},children:"编辑"}),(0,f.jsx)(o.ZP,{type:"link",size:"small",danger:!0,icon:(0,f.jsx)(v.Z,{}),children:"删除"})]})}}],q=function(e){P(e),n(!0),F.setFieldsValue(e)};return(0,f.jsx)("div",{style:{padding:"20px"},children:(0,f.jsxs)(h.Z,{title:"智能质检行为规则",extra:(0,f.jsx)(o.ZP,{type:"primary",icon:(0,f.jsx)(k.Z,{}),onClick:function(){P(null),n(!0),F.resetFields()},children:"新建规则"}),children:[(0,f.jsx)("div",{style:{marginBottom:16},children:(0,f.jsxs)(u.Z,{wrap:!0,children:[(0,f.jsx)(d.Z,{placeholder:"搜索规则名称",style:{width:200}}),(0,f.jsxs)(s.Z,{placeholder:"规则类型",style:{width:120},children:[(0,f.jsx)(C,{value:"all",children:"全部"}),(0,f.jsx)(C,{value:"response",children:"响应时间"}),(0,f.jsx)(C,{value:"attitude",children:"服务态度"}),(0,f.jsx)(C,{value:"professional",children:"专业能力"})]}),(0,f.jsxs)(s.Z,{placeholder:"状态",style:{width:120},children:[(0,f.jsx)(C,{value:"all",children:"全部"}),(0,f.jsx)(C,{value:"enabled",children:"启用"}),(0,f.jsx)(C,{value:"disabled",children:"禁用"})]}),(0,f.jsx)(o.ZP,{type:"primary",children:"搜索"})]})}),(0,f.jsx)(x.Z,{columns:N,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,f.jsx)(j.Z,{title:w?"编辑行为规则":"新建行为规则",open:l,onOk:function(){F.validateFields().then((function(e){console.log("Form values:",e),n(!1),F.resetFields()}))},onCancel:function(){n(!1),F.resetFields()},width:800,children:(0,f.jsxs)(a.Z,{form:F,layout:"vertical",children:[(0,f.jsxs)(m.Z,{gutter:16,children:[(0,f.jsx)(p.Z,{span:12,children:(0,f.jsx)(a.Z.Item,{name:"ruleName",label:"规则名称",rules:[{required:!0,message:"请输入规则名称"}],children:(0,f.jsx)(d.Z,{placeholder:"请输入规则名称"})})}),(0,f.jsx)(p.Z,{span:12,children:(0,f.jsx)(a.Z.Item,{name:"ruleType",label:"规则类型",rules:[{required:!0,message:"请选择规则类型"}],children:(0,f.jsxs)(s.Z,{placeholder:"请选择规则类型",children:[(0,f.jsx)(C,{value:"响应时间",children:"响应时间"}),(0,f.jsx)(C,{value:"服务态度",children:"服务态度"}),(0,f.jsx)(C,{value:"专业能力",children:"专业能力"}),(0,f.jsx)(C,{value:"问题解决",children:"问题解决"}),(0,f.jsx)(C,{value:"沟通技巧",children:"沟通技巧"})]})})})]}),(0,f.jsx)(a.Z.Item,{name:"triggerCondition",label:"触发条件",rules:[{required:!0,message:"请输入触发条件"}],children:(0,f.jsx)(I,{rows:3,placeholder:"请输入触发条件描述"})}),(0,f.jsxs)(m.Z,{gutter:16,children:[(0,f.jsx)(p.Z,{span:12,children:(0,f.jsx)(a.Z.Item,{name:"deductScore",label:"扣分",rules:[{required:!0,message:"请输入扣分"}],children:(0,f.jsx)(Z.Z,{min:1,max:20,style:{width:"100%"}})})}),(0,f.jsx)(p.Z,{span:12,children:(0,f.jsx)(a.Z.Item,{name:"priority",label:"优先级",rules:[{required:!0,message:"请选择优先级"}],children:(0,f.jsxs)(s.Z,{placeholder:"请选择优先级",children:[(0,f.jsx)(C,{value:1,children:"P1 - 高优先级"}),(0,f.jsx)(C,{value:2,children:"P2 - 中优先级"}),(0,f.jsx)(C,{value:3,children:"P3 - 低优先级"})]})})})]}),(0,f.jsx)(a.Z.Item,{name:"description",label:"规则描述",children:(0,f.jsx)(I,{rows:3,placeholder:"请输入规则描述"})}),(0,f.jsx)(a.Z.Item,{name:"status",label:"状态",valuePropName:"checked",children:(0,f.jsx)(y.Z,{checkedChildren:"启用",unCheckedChildren:"禁用"})})]})})]})})}}}]);