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