mirror of
https://gitee.com/270580156/weiyu.git
synced 2026-05-15 19:58:00 +00:00
1 line
5.6 KiB
JavaScript
1 line
5.6 KiB
JavaScript
"use strict";(self.webpackChunkadmin=self.webpackChunkadmin||[]).push([[6364],{54881:function(e,l,r){r.d(l,{Z:function(){return a}});var n=r(77260),t=r(44194),s={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"},i=r(54183),d=function(e,l){return t.createElement(i.Z,(0,n.Z)({},e,{ref:l,icon:s}))};var a=t.forwardRef(d)},96931:function(e,l,r){r.r(l);var n=r(45332),t=r.n(n),s=r(44194),i=r(27904),d=r(27259),a=r(20903),c=r(49616),u=r(88344),h=r(5780),o=r(79401),x=r(61155),j=r(68349),m=r(78875),v=r(20228),y=r(67206),p=r(8340),Z=r(59304),k=r(54881),w=r(10162),f=r(31549),g=i.Z.Option,b=d.Z.TextArea;l.default=function(){var e=s.useState(!1),l=t()(e,2),r=l[0],n=l[1],I=s.useState(null),C=t()(I,2),F=C[0],z=C[1],G=a.Z.useForm(),T=t()(G,1)[0],P=[{title:"关键词组",dataIndex:"keywordGroup",key:"keywordGroup"},{title:"关键词",dataIndex:"keywords",key:"keywords",render:function(e){return(0,f.jsx)(c.Z,{children:e.map((function(e,l){return(0,f.jsx)(u.Z,{color:"blue",children:e},l)}))})}},{title:"类型",dataIndex:"type",key:"type",render:function(e){var l="正面"===e?"green":"负面"===e?"red":"orange";return(0,f.jsx)(u.Z,{color:l,children:e})}},{title:"权重",dataIndex:"weight",key:"weight"},{title:"状态",dataIndex:"status",key:"status",render:function(e){return(0,f.jsx)(u.Z,{color:e?"green":"red",children:e?"启用":"禁用"})}},{title:"创建时间",dataIndex:"createTime",key:"createTime"},{title:"操作",key:"action",render:function(e,l){return(0,f.jsxs)(c.Z,{size:"middle",children:[(0,f.jsx)(h.ZP,{type:"link",size:"small",icon:(0,f.jsx)(Z.Z,{}),onClick:function(){return q(l)},children:"编辑"}),(0,f.jsx)(h.ZP,{type:"link",size:"small",danger:!0,icon:(0,f.jsx)(k.Z,{}),children:"删除"})]})}}],q=function(e){z(e),n(!0),T.setFieldsValue(e)};return(0,f.jsx)("div",{style:{padding:"20px"},children:(0,f.jsxs)(o.Z,{title:"智能质检关键词",extra:(0,f.jsx)(h.ZP,{type:"primary",icon:(0,f.jsx)(w.Z,{}),onClick:function(){z(null),n(!0),T.resetFields()},children:"新建关键词组"}),children:[(0,f.jsx)("div",{style:{marginBottom:16},children:(0,f.jsxs)(c.Z,{wrap:!0,children:[(0,f.jsx)(d.Z,{placeholder:"搜索关键词组",style:{width:200}}),(0,f.jsxs)(i.Z,{placeholder:"类型",style:{width:120},children:[(0,f.jsx)(g,{value:"all",children:"全部"}),(0,f.jsx)(g,{value:"positive",children:"正面"}),(0,f.jsx)(g,{value:"negative",children:"负面"}),(0,f.jsx)(g,{value:"neutral",children:"中性"})]}),(0,f.jsxs)(i.Z,{placeholder:"状态",style:{width:120},children:[(0,f.jsx)(g,{value:"all",children:"全部"}),(0,f.jsx)(g,{value:"enabled",children:"启用"}),(0,f.jsx)(g,{value:"disabled",children:"禁用"})]}),(0,f.jsx)(h.ZP,{type:"primary",children:"搜索"})]})}),(0,f.jsx)(x.Z,{columns:P,dataSource:[{key:"1",keywordGroup:"服务态度正面",keywords:["谢谢","感谢","满意","很好","不错"],type:"正面",weight:10,status:!0,createTime:"2025-01-16 10:30:00"},{key:"2",keywordGroup:"服务态度负面",keywords:["不满意","差","糟糕","生气","投诉"],type:"负面",weight:-10,status:!0,createTime:"2025-01-16 11:15:00"},{key:"3",keywordGroup:"专业能力",keywords:["专业","懂行","内行","专家","权威"],type:"正面",weight:8,status:!0,createTime:"2025-01-16 12:00:00"}]}),(0,f.jsx)(j.Z,{title:F?"编辑关键词组":"新建关键词组",open:r,onOk:function(){T.validateFields().then((function(e){console.log("Form values:",e),n(!1),T.resetFields()}))},onCancel:function(){n(!1),T.resetFields()},width:600,children:(0,f.jsxs)(a.Z,{form:T,layout:"vertical",children:[(0,f.jsx)(a.Z.Item,{name:"keywordGroup",label:"关键词组名称",rules:[{required:!0,message:"请输入关键词组名称"}],children:(0,f.jsx)(d.Z,{placeholder:"请输入关键词组名称"})}),(0,f.jsx)(a.Z.Item,{name:"keywords",label:"关键词",rules:[{required:!0,message:"请输入关键词"}],children:(0,f.jsxs)(i.Z,{mode:"tags",placeholder:"请输入关键词,按回车添加",children:[(0,f.jsx)(g,{value:"谢谢",children:"谢谢"}),(0,f.jsx)(g,{value:"感谢",children:"感谢"}),(0,f.jsx)(g,{value:"满意",children:"满意"}),(0,f.jsx)(g,{value:"很好",children:"很好"}),(0,f.jsx)(g,{value:"不错",children:"不错"}),(0,f.jsx)(g,{value:"不满意",children:"不满意"}),(0,f.jsx)(g,{value:"差",children:"差"}),(0,f.jsx)(g,{value:"糟糕",children:"糟糕"}),(0,f.jsx)(g,{value:"生气",children:"生气"}),(0,f.jsx)(g,{value:"投诉",children:"投诉"})]})}),(0,f.jsxs)(m.Z,{gutter:16,children:[(0,f.jsx)(v.Z,{span:12,children:(0,f.jsx)(a.Z.Item,{name:"type",label:"类型",rules:[{required:!0,message:"请选择类型"}],children:(0,f.jsxs)(i.Z,{placeholder:"请选择类型",children:[(0,f.jsx)(g,{value:"正面",children:"正面"}),(0,f.jsx)(g,{value:"负面",children:"负面"}),(0,f.jsx)(g,{value:"中性",children:"中性"})]})})}),(0,f.jsx)(v.Z,{span:12,children:(0,f.jsx)(a.Z.Item,{name:"weight",label:"权重",rules:[{required:!0,message:"请输入权重"}],children:(0,f.jsx)(y.Z,{min:-20,max:20,style:{width:"100%"}})})})]}),(0,f.jsx)(a.Z.Item,{name:"description",label:"描述",children:(0,f.jsx)(b,{rows:3,placeholder:"请输入描述"})}),(0,f.jsx)(a.Z.Item,{name:"status",label:"状态",valuePropName:"checked",children:(0,f.jsx)(p.Z,{checkedChildren:"启用",unCheckedChildren:"禁用"})})]})})]})})}}}]); |