@gientech/modual 2.3.31 → 2.3.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/DrawerVideo-Da3LzJAm.js +272 -0
- package/assets/PlusOutlined-039_HuLB.js +2 -0
- package/assets/ReviewSetting-CoOznCss.js +289 -0
- package/assets/index-BFlpxPJ5.js +72 -0
- package/assets/{PlusOutlined-Di4ORSd7.js → index-DPzKige0.js} +37 -38
- package/assets/{index-CqVjnw4y.js → index-cNdkGmTA.js} +6 -6
- package/assets/{style-F1I-YO43.js → style-CMFc6LK5.js} +8 -8
- package/assets/style10.css +1 -1
- package/assets/style11.css +1 -0
- package/assets/style4.css +1 -1
- package/assets/style5.css +1 -1
- package/assets/style6.css +1 -1
- package/assets/style7.css +1 -1
- package/assets/style8.css +1 -1
- package/assets/style9.css +1 -1
- package/chat.js +1 -1
- package/chatCompare.js +1 -1
- package/graphBase.js +1 -1
- package/index.d.ts +1 -0
- package/index.js +1 -1
- package/package.json +2 -2
- package/reviewManage.js +9 -9
- package/reviewSetting.d.ts +1 -0
- package/reviewSetting.js +1 -1
- package/assets/ReviewSetting-B1woOKkD.js +0 -454
- package/assets/index-C3pXe_7q.js +0 -343
|
@@ -1,454 +0,0 @@
|
|
|
1
|
-
import{jsx as e,jsxs as m,Fragment as ot}from"react/jsx-runtime";import xe,{useState as b,useMemo as ne,useEffect as V,useCallback as se,useRef as qe}from"react";import y from"styled-components";import{Xviwer as lt}from"@mxmweb/xviewer";import{Modal as Ye,Input as ct,List as ke,Typography as T,Avatar as be,Button as oe,Checkbox as ze,Tooltip as je,Form as te,Switch as dt,Select as gt,Radio as De,Space as Ge,message as Q,Tag as pt}from"antd";import{useTheme as ht,deepMergeTheme as We,defaultTheme as ft,DashboardContainer as wt}from"@mxmweb/zui";import mt from"axios";import{X as Ze}from"./x-CdZQbi--.js";import{C as bt}from"./chevron-right-CrkLSPrQ.js";import{P as Ke}from"./plus-B679mjyt.js";/* empty css *//* empty css */import{R as xt}from"./ExclamationCircleFilled-iFno81Rg.js";import{S as yt}from"./search-CEuIa9-_.js";const ye={dashboard:{title:"\u5BA1\u6838\u914D\u7F6E",description:""},pages:{createTitle:"\u65B0\u589E\u5BA1\u6838\u914D\u7F6E",editTitle:"\u7F16\u8F91\u5BA1\u6838\u914D\u7F6E",back:"\u8FD4\u56DE",cancel:"\u53D6\u6D88",confirm:"\u786E\u8BA4"},toolbar:{createConfig:"\u65B0\u589E\u5BA1\u6838\u914D\u7F6E",searchEnterprisePlaceholder:"\u641C\u7D22\u4F01\u4E1A\u5E93\u540D",searchFirstReviewersPlaceholder:"\u641C\u7D22\u521D\u5BA1\u5BA1\u6838",searchSecondReviewersPlaceholder:"\u641C\u7D22\u590D\u5BA1\u5BA1\u6838"},tips:{title:"\u77E5\u8BC6\u5BA1\u6838\u89C4\u5219",description:"\u5BA1\u6838\u89C4\u5219\u5BF9\u6240\u6709\u77E5\u8BC6\u5E93\u4E0A\u4F20\u7684\u6587\u6863\u9ED8\u8BA4\u4F1A\u505A\u6821\u9A8C\uFF0C\u5982\u65B0\u589E\u5BA1\u6838\u914D\u7F6E\uFF0C\u5219\u65B0\u589E\u7684\u5BA1\u6838\u914D\u7F6E\u4F18\u5148\u7EA7\u9AD8\u4E8E\u5168\u5C40\u5F00\u5173\u7684\u4F18\u5148\u7EA7\u3002",uploadReviewToggle:"\u77E5\u8BC6\u4E0A\u4F20\u5BA1\u6838",deleteReviewToggle:"\u77E5\u8BC6\u5220\u9664\u5BA1\u6838"},table:{enterpriseName:"\u4F01\u4E1A\u5E93\u540D",knowledgeType:"\u77E5\u8BC6\u7C7B\u578B",reviewScope:"\u5BA1\u6838\u8303\u56F4",firstReviewers:"\u521D\u5BA1\u5BA1\u6838",secondReviewers:"\u590D\u5BA1\u5BA1\u6838",createdAt:"\u914D\u7F6E\u65F6\u95F4",creator:"\u914D\u7F6E\u4EBA",enabled:"\u5F00\u542F\u72B6\u6001",actions:"\u64CD\u4F5C",actionEdit:"\u7F16\u8F91",actionDelete:"\u5220\u9664",enabledOn:"\u5F00\u542F",enabledOff:"\u5173\u95ED"}},vt={dashboard:{title:"Review settings",description:""},pages:{createTitle:"Create rule",editTitle:"Edit rule",back:"Back",cancel:"Cancel",confirm:"Confirm"},toolbar:{createConfig:"Create rule",searchEnterprisePlaceholder:"Search enterprise library",searchFirstReviewersPlaceholder:"Search first reviewers",searchSecondReviewersPlaceholder:"Search second reviewers"},tips:{title:"Review rules",description:"Rules apply to all knowledge uploads by default. If a specific rule is added, it takes precedence over the global switches.",uploadReviewToggle:"Upload review",deleteReviewToggle:"Delete review"},table:{enterpriseName:"Enterprise library",knowledgeType:"Knowledge type",reviewScope:"Scope",firstReviewers:"First reviewers",secondReviewers:"Second reviewers",createdAt:"Configured at",creator:"Creator",enabled:"Enabled",actions:"Actions",actionEdit:"Edit",actionDelete:"Delete",enabledOn:"On",enabledOff:"Off"}},At={dashboard:{title:"\u5BE9\u67FB\u8A2D\u5B9A",description:""},pages:{createTitle:"\u65B0\u898F\u5BE9\u67FB\u8A2D\u5B9A",editTitle:"\u5BE9\u67FB\u8A2D\u5B9A\u3092\u7DE8\u96C6",back:"\u623B\u308B",cancel:"\u30AD\u30E3\u30F3\u30BB\u30EB",confirm:"\u78BA\u8A8D"},toolbar:{createConfig:"\u65B0\u898F\u4F5C\u6210",searchEnterprisePlaceholder:"\u4F01\u696D\u30E9\u30A4\u30D6\u30E9\u30EA\u3092\u691C\u7D22",searchFirstReviewersPlaceholder:"\u4E00\u6B21\u5BE9\u67FB\u3092\u691C\u7D22",searchSecondReviewersPlaceholder:"\u4E8C\u6B21\u5BE9\u67FB\u3092\u691C\u7D22"},tips:{title:"\u5BE9\u67FB\u30EB\u30FC\u30EB",description:"\u30EB\u30FC\u30EB\u306F\u30C7\u30D5\u30A9\u30EB\u30C8\u3067\u3059\u3079\u3066\u306E\u30CA\u30EC\u30C3\u30B8\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u306B\u9069\u7528\u3055\u308C\u307E\u3059\u3002\u500B\u5225\u306E\u8A2D\u5B9A\u304C\u8FFD\u52A0\u3055\u308C\u308B\u3068\u3001\u30B0\u30ED\u30FC\u30D0\u30EB\u30B9\u30A4\u30C3\u30C1\u3088\u308A\u512A\u5148\u3055\u308C\u307E\u3059\u3002",uploadReviewToggle:"\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u5BE9\u67FB",deleteReviewToggle:"\u524A\u9664\u5BE9\u67FB"},table:{enterpriseName:"\u4F01\u696D\u30E9\u30A4\u30D6\u30E9\u30EA",knowledgeType:"\u77E5\u8B58\u30BF\u30A4\u30D7",reviewScope:"\u7BC4\u56F2",firstReviewers:"\u4E00\u6B21\u5BE9\u67FB",secondReviewers:"\u4E8C\u6B21\u5BE9\u67FB",createdAt:"\u8A2D\u5B9A\u6642\u523B",creator:"\u4F5C\u6210\u8005",enabled:"\u6709\u52B9",actions:"\u64CD\u4F5C",actionEdit:"\u7DE8\u96C6",actionDelete:"\u524A\u9664",enabledOn:"\u30AA\u30F3",enabledOff:"\u30AA\u30D5"}},Ft={zh:ye,en:vt,ja:At};function Et(t,a){const u=Ft[t]??ye;return a?{...u,...a}:u}function He(t,a){const u=a.split(".");let f=t;for(const F of u)f=f==null?void 0:f[F];return typeof f=="string"?f:a}const Ve=xe.createContext({locale:"zh",messages:ye,getMessage:t=>He(ye,t)});function Bt(){return xe.useContext(Ve)}function Ct({locale:t,messages:a,children:u}){const f=xe.useMemo(()=>{const F=Et(t,a);return{locale:t,messages:F,getMessage:D=>He(F,D)}},[t,a]);return xe.createElement(Ve.Provider,{value:f},u)}const Qe=({url:t,token:a,role:u,eventsEmit:f,getMessage:F})=>{const D=(i,n)=>F?F(i):n,k=mt.create({baseURL:t,timeout:1e6});return k.interceptors.request.use(i=>{let n=a;return!n&&!["user/login","user/kaptcha","user/regist"].some(g=>i.url.includes(g))?(f&&f("request:error_auth",{errorMsg:D("server.notLoggedIn","\u672A\u767B\u5F55\u6216token\u5DF2\u8FC7\u671F"),redirect:"/login"}),Promise.reject(new Error(D("server.notLoggedIn","\u672A\u767B\u5F55\u6216token\u5DF2\u8FC7\u671F")))):(i.headers.Authorization=n||"",i.headers.userName=u==="\u672A\u767B\u5F55\u7528\u6237"?"":u,i)}),k.interceptors.response.use(i=>{const n=["user/kaptcha"],c=i.data;if(n.some(S=>i.config.url&&i.config.url.includes(S))||c.size&&c.type)return c;const{success:g,errorMsg:C,errorCode:_}=c;return g?c:f?(f("request:error_business",{errorCode:_,errorMsg:C||D("server.requestError","\u8BF7\u6C42\u51FA\u9519\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5"),response:c}),c):!1},i=>{var n,c,g,C,_,S,M,J,G;if(i.message==="canceled")return Promise.reject(i);if(f){let Z="request:error_network",w={errorMsg:D("server.requestError","\u7F51\u7EDC\u8BF7\u6C42\u5931\u8D25"),error:i};((n=i==null?void 0:i.response)==null?void 0:n.status)===401?(Z="request:error_auth",w={errorMsg:D("server.noPermission","\u6CA1\u6709\u8DB3\u591F\u6743\u9650"),error:i,redirect:"/login"}):(((g=(c=i==null?void 0:i.response)==null?void 0:c.data)==null?void 0:g.errorCode)==="30013"||((_=(C=i==null?void 0:i.response)==null?void 0:C.data)==null?void 0:_.errorCode)==="30023")&&(Z="request:error_business",w={errorCode:(M=(S=i==null?void 0:i.response)==null?void 0:S.data)==null?void 0:M.errorCode,errorMsg:((G=(J=i==null?void 0:i.response)==null?void 0:J.data)==null?void 0:G.message)||D("server.requestError","\u8BF7\u6C42\u51FA\u9519\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5"),error:i}),f(Z,w)}return Promise.reject(i)}),{getReviewSettingData:async i=>{try{const n=await k.get(`/index/auditConfig/page?${new URLSearchParams(i).toString()}`),{success:c,data:g}=n;if(c)return g}catch(n){return console.log("getReviewSetting error:",n),!1}},getGlobalConfig:async()=>{try{const i=await k.get("/index/bizGlobalAuditConfig/current"),{success:n,data:c}=i;if(n)return c}catch(i){return console.log("getConfig error:",i),!1}},updateGlobalConfig:async({uploadAudit:i,deleteAudit:n})=>{try{const c=await k.put("/index/bizGlobalAuditConfig/updateSwitch",{uploadAudit:i,deleteAudit:n}),{success:g,data:C}=c;if(g)return C}catch(c){return console.log("getConfig error:",c),!1}},deleteConfigById:async i=>{try{const n=await k.delete(`/index/auditConfig/delete?idList=${i}`),{success:c,data:g}=n;if(c)return g}catch(n){return console.log("deleteConfig error:",n),!1}},getKnowledgeBaseList:async i=>{try{const n=new URLSearchParams;i!=null&&i.fuzzy&&n.append("fuzzy",i.fuzzy);const c=await k.get(`index/knowledgeBase/manageableList${n.toString()?`?${n.toString()}`:""}`),{success:g,data:C}=c;if(g)return C}catch(n){console.log("getKnowledgeBaseList error:",n)}},addConfig:async i=>{try{const n=await k.post("index/auditConfig/save",{...i}),{success:c,data:g}=n;if(c)return g}catch(n){console.log("addConfig error:",n)}},editConfig:async i=>{try{const n=await k.put("index/auditConfig/update",{...i}),{success:c,data:g}=n;if(c)return g}catch(n){console.log("editConfig error:",n)}},getConfigById:async i=>{try{const n=await k.get(`index/auditConfig/detail/${i}`),{success:c,data:g}=n;if(c)return g}catch(n){console.log("getConfigById error:",n)}},getUserList:async()=>{try{const i=await k.get("auth/user/searchUserList"),{success:n,data:c}=i;if(n)return c}catch(i){console.log("getConfigById error:",i)}},getTreeFrame:async(i={})=>{try{const n=await k.get("/auth/departmentInfo/treeFrame",{params:i}),{success:c,data:g}=n;if(c)return g}catch(n){console.log("getTreeFrame error:",n)}}}},kt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAA4CAYAAACohjseAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAOKADAAQAAAABAAAAOAAAAAANV2hTAAAOjUlEQVRoBbWaT6xdVRXG93ktYpWER1SCOujFgQomUvyLRsMjzEwMODA6o1MToUUwApH21YESFW0RjTHRgHMDiRNG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6EtUfRfUyqmXzGL62obpE11vSmB++hzkAG9LEMATDwzzYYdIyiErhMzBGWQylBqdutD7bL1P08QQkPCSLFfS8tLhgzun5mJGZJtAWoPjmyL3wORx4EBbnM5JEBtIXvpKu17ghxwQIeEIq0SQ0bJDFLqJzJIsAGoadtiUvQz9zUX2cRlMSAlYf4Vx5A0vnx85x+B0Ie3T94x7lchBkZ0psf7A5+ZTyVI1krYMuTL2Q1rl4Mmv/+Y0samHdt3EPE/7ijFX3Du/ed/gbwnnmzM5XXDT32TPZLRXxwElEZ9WkpBkvHB1SwKV4IKwtBQHGGSLaBKiULZh1eTrhP7w7qHLXmmHX+1OGdG2PmcqWyvPJYWovmqtK5EbldyMxHDoj24asHJ9JSVPAkvEiAFZdF5Z7Jjr65v+nPmI/tL38Pn+bSi+zmzk87q0z9437tU2vEWJrWkrXa5xfQ5dIgnhJMAwSKu3PF5hHtfPz0f0o+zGxRArUq8bwXJI//mvjmvaWntE8kZtL37hYXVnXkHps5+L1Anhjmuhn6Z/+P5hA/vXs/0PVVl54z/XKbAAAAAASUVORK5CYII=",Dt=1;function ve(t){return t.elementType===Dt}function St(t){return!ve(t)}function Rt(t){return t==null||Array.isArray(t)&&t.length===0?{id:"__empty_root__",name:"\u7EC4\u7EC7\u67B6\u6784",elementType:1,children:[]}:Array.isArray(t)?t.length===1?t[0]:{id:"__virtual_root__",name:"\u7EC4\u7EC7\u67B6\u6784",elementType:1,children:t}:t}function Xe(t,a){const u=[],f=t.children||[];for(const F of f)if(ve(F)){const D={id:F.id,name:F.name||F.deptName||""};u.push(...Xe(F,D))}else St(F)&&u.push({node:F,deptId:a.id,deptName:F.deptName||a.name||""});return u}function It(t){const a={id:t.id,name:t.name||t.deptName||""};return Xe(t,a)}function me(t,a){const u=t.toLowerCase(),f=a.trim().toLowerCase();return f?u.includes(f):!0}function ae(t){return String(t.userRealname||t.userName||t.name||t.id)}function Se(t){const a=t.trim();return a.length<=1?a||"?":a.slice(0,1)}const Nt=y.div.attrs({className:"audit-org-user-picker-body"})`
|
|
2
|
-
display: flex;
|
|
3
|
-
gap: 0;
|
|
4
|
-
min-height: 420px;
|
|
5
|
-
max-height: 520px;
|
|
6
|
-
border: 1px solid rgba(226, 232, 240, 0.95);
|
|
7
|
-
border-radius: 8px;
|
|
8
|
-
overflow: hidden;
|
|
9
|
-
`,zt=y.div.attrs({className:"audit-org-user-picker-left"})`
|
|
10
|
-
flex: 1 1 55%;
|
|
11
|
-
min-width: 0;
|
|
12
|
-
display: flex;
|
|
13
|
-
flex-direction: column;
|
|
14
|
-
border-right: 1px solid rgba(226, 232, 240, 0.95);
|
|
15
|
-
background: #fff;
|
|
16
|
-
`,Tt=y.div.attrs({className:"audit-org-user-picker-search-bar"})`
|
|
17
|
-
flex: 0 0 auto;
|
|
18
|
-
padding: 12px;
|
|
19
|
-
border-bottom: 1px solid rgba(226, 232, 240, 0.85);
|
|
20
|
-
`,Pt=y.div.attrs({className:"audit-org-user-picker-right"})`
|
|
21
|
-
flex: 1 1 45%;
|
|
22
|
-
min-width: 0;
|
|
23
|
-
display: flex;
|
|
24
|
-
flex-direction: column;
|
|
25
|
-
`,Ut=y.div.attrs({className:"audit-org-user-picker-section-title"})`
|
|
26
|
-
padding: 10px 12px;
|
|
27
|
-
font-size: 13px;
|
|
28
|
-
font-weight: 600;
|
|
29
|
-
color: rgba(15, 23, 42, 0.88);
|
|
30
|
-
`,Re=y.div.attrs({className:"audit-org-user-picker-scroll"})`
|
|
31
|
-
flex: 1 1 0;
|
|
32
|
-
min-width: 0;
|
|
33
|
-
min-height: 0;
|
|
34
|
-
overflow-y: auto;
|
|
35
|
-
`,Ie=y.button.attrs({type:"button",className:"audit-org-user-picker-row"})`
|
|
36
|
-
width: 100%;
|
|
37
|
-
display: flex;
|
|
38
|
-
align-items: center;
|
|
39
|
-
gap: 10px;
|
|
40
|
-
padding: 10px 12px;
|
|
41
|
-
border: none;
|
|
42
|
-
background: ${({$interactive:t})=>t?"#fff":"transparent"};
|
|
43
|
-
cursor: ${({$interactive:t})=>t?"pointer":"default"};
|
|
44
|
-
text-align: left;
|
|
45
|
-
&:hover {
|
|
46
|
-
background: ${({$interactive:t})=>t?"rgba(248, 250, 252, 1)":"transparent"};
|
|
47
|
-
}
|
|
48
|
-
`,_t=y.div.attrs({className:"audit-org-user-picker-breadcrumb"})`
|
|
49
|
-
padding: 8px 12px;
|
|
50
|
-
font-size: 12px;
|
|
51
|
-
color: rgba(71, 85, 105, 1);
|
|
52
|
-
display: flex;
|
|
53
|
-
flex-wrap: wrap;
|
|
54
|
-
gap: 4px;
|
|
55
|
-
align-items: center;
|
|
56
|
-
`,Mt=y.button.attrs({type:"button",className:"audit-org-user-picker-crumb"})`
|
|
57
|
-
border: none;
|
|
58
|
-
background: transparent;
|
|
59
|
-
padding: 0;
|
|
60
|
-
cursor: pointer;
|
|
61
|
-
color: #2A2A2A;
|
|
62
|
-
font-size: 14px;
|
|
63
|
-
font-weight: 700;
|
|
64
|
-
&:hover {
|
|
65
|
-
text-decoration: underline;
|
|
66
|
-
}
|
|
67
|
-
`;function Lt(t){const{open:a,title:u="\u6DFB\u52A0\u4EBA\u5458",auditStep:f,value:F,maxCount:D=100,treeRoot:k,excludedUserIds:v=[],onCancel:O,onConfirm:B}=t,[Y,X]=b(""),$=ne(()=>Rt(k),[k]),[K,ie]=b([$]),[j,N]=b(new Map),i=ne(()=>new Set(v.filter(Boolean)),[v]),n=ne(()=>It($),[$]);V(()=>{if(!a)return;X(""),ie([$]);const w=new Map;F.forEach(o=>{i.has(o.userId)||w.set(o.userId,{...o,auditStep:f})}),N(w)},[a,$,f,F,i]);const c=K[K.length-1],g=c.children||[],C=ne(()=>{const w=Y.trim();return w?n.filter(({node:o,deptName:A})=>{if(i.has(o.id))return!1;const L=ae(o);return me(L,w)||me(o.userName||"",w)||me(A,w)||me(o.deptName||"",w)}):[]},[n,Y,i]),_=ne(()=>Array.from(j.values()),[j]),S=se((w,o,A,L)=>{const z=w.id;i.has(z)||N(R=>{const d=new Map(R);if(L){if(d.size>=D)return R;d.set(z,{userId:z,userRealname:ae(w),auditStep:f,deptId:o,deptName:A||""})}else d.delete(z);return d})},[f,D,i]),M=w=>{ve(w)&&ie(o=>[...o,w])},J=f===1?"\u5DF2\u4E3A\u590D\u5BA1\u4EBA\u5458\uFF0C\u4E0D\u53EF\u9009\u62E9":"\u5DF2\u4E3A\u521D\u5BA1\u4EBA\u5458\uFF0C\u4E0D\u53EF\u9009\u62E9",G=()=>{const w=_.filter(o=>!i.has(o.userId)).map(o=>({...o,auditStep:f}));B(w)},Z=()=>Y.trim()?e(Re,{children:C.length===0?e(T.Text,{type:"secondary",style:{display:"block",padding:16},children:"\u65E0\u5339\u914D\u4EBA\u5458"}):C.map(({node:o,deptId:A,deptName:L})=>{const z=j.has(o.id);return m(Ie,{$interactive:!0,onClick:R=>{R.preventDefault(),S(o,A,L,!z)},children:[e(ze,{checked:z,onClick:R=>R.stopPropagation(),onChange:R=>S(o,A,L,R.target.checked)}),e(be,{style:{background:"linear-gradient(-50deg, #8F91FF 10%, #2B69FF 90%)"},children:Se(ae(o))}),m("div",{style:{flex:1,minWidth:0},children:[e(T.Text,{style:{display:"block",fontWeight:200},children:ae(o)}),e(T.Text,{type:"secondary",style:{fontSize:12},children:L||"\u6B64\u5904\u662F\u90E8\u95E8\u540D\u79F0"})]})]},o.id)})}):m(ot,{children:[e(_t,{children:K.map((o,A)=>m("span",{style:{display:"inline-flex",alignItems:"center",gap:4},children:[A>0?e("span",{style:{color:"#cbd5e1"},children:"/"}):null,e(Mt,{type:"button",onClick:()=>ie(K.slice(0,A+1)),children:o.name||o.userRealname||"\u2026"})]},`${o.id}-${A}`))}),e(Re,{children:g.length===0?e(T.Text,{type:"secondary",style:{display:"block",padding:16},children:"\u6682\u65E0\u5B50\u9879"}):g.map(o=>{var d;if(ve(o)){const l=(((d=o.children)==null?void 0:d.length)||0)>0;return m(Ie,{$interactive:l,onClick:()=>{l&&M(o)},children:[e("span",{style:{width:20,display:"inline-block"}}),e("img",{src:kt,width:30,height:28}),e("div",{style:{flex:1,minWidth:0},children:e(T.Text,{children:o.name||"\u90E8\u95E8"})}),l?e(bt,{color:"#055aff",size:14}):null]},o.id)}const A={id:c.id,name:c.name||c.deptName||""},L=j.has(o.id),z=i.has(o.id),R=m(Ie,{$interactive:!z,style:z?{opacity:.55,cursor:"not-allowed"}:void 0,onClick:()=>{z||S(o,A.id,o.deptName||A.name,!L)},children:[e(ze,{checked:L,disabled:z,onClick:l=>l.stopPropagation(),onChange:l=>S(o,A.id,o.deptName||A.name,l.target.checked)}),e(be,{style:{background:"linear-gradient(-50deg, #8F91FF 10%, #2B69FF 90%)"},children:Se(ae(o))}),m("div",{style:{flex:1,minWidth:0},children:[e(T.Text,{style:{display:"block"},children:ae(o)}),e(T.Text,{type:"secondary",style:{fontSize:12},children:o.deptName||A.name||"\u6B64\u5904\u662F\u90E8\u95E8\u540D\u79F0"})]})]});return z?e(je,{title:J,children:e("div",{children:R})},o.id):e("div",{children:R},o.id)})})]});return e(Ye,{title:u,open:a,width:800,onCancel:O,footer:m("div",{style:{display:"flex",justifyContent:"flex-end",gap:8},children:[e(oe,{onClick:O,children:"\u53D6\u6D88"}),e(oe,{type:"primary",onClick:G,children:"\u786E\u5B9A"})]}),destroyOnClose:!0,children:m(Nt,{children:[m(zt,{children:[e(Tt,{children:e(ct.Search,{allowClear:!0,placeholder:"\u641C\u7D22\u7528\u6237\u3001\u7FA4\u7EC4\u3001\u90E8\u95E8\u6216\u7528\u6237\u7EC4",value:Y,onChange:w=>X(w.target.value),onSearch:w=>X(w)})}),Z()]}),m(Pt,{children:[m(Ut,{children:["\u5DF2\u9009\uFF1A",_.length," \u4E2A"]}),e(Re,{children:e(ke,{size:"small",dataSource:_,locale:{emptyText:e(T.Text,{type:"secondary",children:"\u6682\u672A\u9009\u62E9\u4EBA\u5458"})},split:!1,renderItem:w=>e(ke.Item,{style:{padding:"10px 12px"},actions:[e(Ze,{size:20,onClick:()=>N(o=>{const A=new Map(o);return A.delete(w.userId),A})})],children:e(ke.Item.Meta,{avatar:e(be,{style:{background:"linear-gradient(-50deg, #7FC0FB 10%, #4088F4 90%)"},children:Se(w.userRealname)}),title:e(T.Text,{children:w.userRealname}),description:e(T.Text,{type:"secondary",style:{fontSize:12},children:w.deptName||"\u6B64\u5904\u662F\u90E8\u95E8\u540D\u79F0"})})})})})]})]})})}const qt=t=>t===3?[1,2]:t===2?[2]:[1],Gt=t=>{const a=t.includes(1),u=t.includes(2);return a&&u?3:u?2:1};function Wt(t){const a=t.trim();return a.length<=1?a||"?":a.slice(0,1)}const Kt=y.div.attrs({className:"editsetting-person-card"})`
|
|
68
|
-
display: flex;
|
|
69
|
-
align-items: center;
|
|
70
|
-
gap: 10px;
|
|
71
|
-
width: 100%;
|
|
72
|
-
max-width: 280px;
|
|
73
|
-
min-height: 56px;
|
|
74
|
-
padding: 10px 12px;
|
|
75
|
-
border: 1px solid rgba(226, 232, 240, 0.95);
|
|
76
|
-
border-radius: 10px;
|
|
77
|
-
background: #fff;
|
|
78
|
-
box-sizing: border-box;
|
|
79
|
-
position: relative;
|
|
80
|
-
`,Jt=y.button.attrs({type:"button",className:"editsetting-person-remove"})`
|
|
81
|
-
position: absolute;
|
|
82
|
-
top: 6px;
|
|
83
|
-
right: 6px;
|
|
84
|
-
display: inline-flex;
|
|
85
|
-
align-items: center;
|
|
86
|
-
justify-content: center;
|
|
87
|
-
width: 22px;
|
|
88
|
-
height: 22px;
|
|
89
|
-
padding: 0;
|
|
90
|
-
border: none;
|
|
91
|
-
border-radius: 6px;
|
|
92
|
-
background: transparent;
|
|
93
|
-
color: #94a3b8;
|
|
94
|
-
cursor: pointer;
|
|
95
|
-
&:hover {
|
|
96
|
-
color: #64748b;
|
|
97
|
-
background: rgba(241, 245, 249, 0.9);
|
|
98
|
-
}
|
|
99
|
-
`;function Je({user:t,onRemove:a}){return m(Kt,{children:[e(be,{size:36,style:{background:"#83ACFF",flexShrink:0},children:Wt(t.userRealname)}),m("div",{style:{minWidth:0,flex:1,paddingRight:20},children:[e(T.Text,{strong:!0,style:{display:"block",fontSize:14,color:"#111827"},children:t.userRealname}),e(T.Text,{type:"secondary",style:{fontSize:12,marginTop:2,display:"block"},children:t.deptName||"\u6B64\u5904\u662F\u90E8\u95E8\u540D\u79F0"})]}),e(Jt,{"aria-label":"\u79FB\u9664",onClick:a,children:e(Ze,{size:14,strokeWidth:2})})]})}function Ot(t){const{id:a,mode:u="edit",url:f,token:F,role:D,eventsEmit:k,onCancel:v,onSuccess:O}=t,[B]=te.useForm(),[Y,X]=b(!1),[$,K]=b(!1),[ie,j]=b([]),[N,i]=b(""),[n,c]=b([]),[g,C]=b([]),[_,S]=b(!1),[M,J]=b("first"),{getKnowledgeBaseList:G,getConfigById:Z,addConfig:w,editConfig:o,getTreeFrame:A}=ne(()=>Qe({url:f,token:F,role:D,eventsEmit:k}),[f,F,D,k]),[L,z]=b([]);V(()=>{(async()=>{const l=await A();l&&z(l)})()},[A]);const R=te.useWatch("flowType",B)==="multi";V(()=>{(async()=>{var x,E;X(!0);try{const[I,ue]=await Promise.all([G({fuzzy:""}),u==="edit"&&a!==void 0&&a!==null?Z(a):Promise.resolve(null)]);if(j(Array.isArray(I)?I:[]),u==="edit"&&ue){const H=ue,Ae=((x=H.firstAuditUsers)==null?void 0:x.map(P=>({userId:P.userId,userRealname:P.userRealname,auditStep:1,deptId:P.deptId,deptName:P.deptName})))??[],q=((E=H.secondAuditUsers)==null?void 0:E.map(P=>({userId:P.userId,userRealname:P.userRealname,auditStep:2,deptId:P.deptId,deptName:P.deptName})))??[],ee=H.secondAuditSwitch===1;c(Ae),C(ee?q:[]),B.setFieldsValue({knowledgeAuditSwitch:H.knowledgeAuditSwitch===1,knowledgeIds:(H.targets||[]).map(P=>String(P.targetId)),reviewScope:qt(H.auditScope),flowType:ee?"multi":"single"})}else u==="create"&&(c([]),C([]),B.setFieldsValue({knowledgeAuditSwitch:!0,reviewScope:[1],flowType:"single",firstAuditUsers:[],secondAuditUsers:[],knowledgeIds:[]}))}catch{Q.error(u==="edit"?"\u52A0\u8F7D\u914D\u7F6E\u5931\u8D25":"\u52A0\u8F7D\u77E5\u8BC6\u5E93\u5931\u8D25")}finally{X(!1)}})()},[a,u,B,Z,G]),V(()=>{const l=window.setTimeout(async()=>{try{const x=await G({fuzzy:N.trim()});j(Array.isArray(x)?x:[])}catch(x){console.error("[EditSetting] search knowledge base failed:",x)}},250);return()=>window.clearTimeout(l)},[N,G]),V(()=>{R||(B.setFieldValue("secondAuditUsers",[]),C([]))},[R,B]),V(()=>{const l=new Set(n.map(x=>x.userId));C(x=>{const E=x.filter(I=>!l.has(I.userId));return E.length===x.length?x:(B.setFieldValue("secondAuditUsers",E),E)})},[n,B]),V(()=>{const l=new Set(g.map(x=>x.userId));c(x=>{const E=x.filter(I=>!l.has(I.userId));return E.length===x.length?x:(B.setFieldValue("firstAuditUsers",E),E)})},[g,B]);const d=async()=>{try{const l=await B.validateFields(),x=new Set(n.map(q=>q.userId));if(g.some(q=>x.has(q.userId))){Q.error("\u521D\u5BA1\u4E0E\u590D\u5BA1\u4EBA\u5458\u4E0D\u53EF\u91CD\u590D\uFF0C\u8BF7\u8C03\u6574\u540E\u518D\u63D0\u4EA4");return}const I=(l.knowledgeIds||[]).map(q=>Number(q)).map(q=>{const ee=ie.find(P=>Number(P.id)===q);return{targetType:1,targetId:q,targetName:(ee==null?void 0:ee.kbName)||""}}),ue={auditScope:Gt(l.reviewScope||[]),knowledgeAuditSwitch:l.knowledgeAuditSwitch?1:0,firstAuditSwitch:1,secondAuditSwitch:l.flowType==="multi"?1:0,firstAuditUsers:n,secondAuditUsers:l.flowType==="multi"?g:[],targets:I};K(!0);const H=u==="edit"?{...ue,id:Number(a)}:ue;if(u==="edit"?await o(H):await w(H)){Q.success(u==="edit"?"\u4FDD\u5B58\u6210\u529F":"\u521B\u5EFA\u6210\u529F"),O==null||O();return}Q.error(u==="edit"?"\u4FDD\u5B58\u5931\u8D25":"\u521B\u5EFA\u5931\u8D25")}catch(l){l!=null&&l.errorFields?Q.warning("\u8BF7\u5B8C\u6574\u586B\u5199\u5FC5\u586B\u9879"):Q.error(u==="edit"?"\u4FDD\u5B58\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5":"\u521B\u5EFA\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5")}finally{K(!1)}};return m("div",{className:"box-border w-full min-h-full overflow-x-hidden px-4 pb-20 pt-4",children:[e("div",{className:"mx-auto w-[800px] max-w-full",children:m(te,{form:B,layout:"vertical",requiredMark:!0,disabled:Y,initialValues:{knowledgeAuditSwitch:!0,reviewScope:[1],flowType:"single",firstAuditUsers:[],secondAuditUsers:[]},children:[m("div",{className:"mb-3 rounded-md bg-[#F3F3F3] px-4 py-3",style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[e("span",{style:{fontWeight:600,fontSize:14,color:"#111827"},children:"\u542F\u7528\u77E5\u8BC6\u5E93\u6587\u4EF6\u72EC\u7ACB\u5BA1\u6838"}),e(te.Item,{name:"knowledgeAuditSwitch",valuePropName:"checked",className:"mb-0",style:{marginBottom:0},children:e(dt,{})})]}),m("div",{className:"rounded-md bg-white px-4 py-1",children:[e(te.Item,{label:"\u77E5\u8BC6\u5E93",name:"knowledgeIds",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u77E5\u8BC6\u5E93"}],children:e(gt,{mode:"multiple",allowClear:!0,showSearch:!0,filterOption:!1,placeholder:"\u8BF7\u9009\u62E9\u77E5\u8BC6\u5E93",onSearch:l=>i(l),options:ie.map(l=>({label:l.kbName,value:String(l.id)}))})}),e(te.Item,{label:"\u5BA1\u6838\u8303\u56F4",name:"reviewScope",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u5BA1\u6838\u8303\u56F4"}],children:e(ze.Group,{options:[{label:"\u4E0A\u4F20",value:1},{label:"\u5220\u9664",value:2}]})}),e(te.Item,{label:m("span",{children:["\u5BA1\u6838\u6D41\u7A0B\u8303\u56F4",e(T.Text,{type:"secondary",style:{fontWeight:400},children:"\uFF08\u4FEE\u6539\u540E\u4EC5\u5BF9\u65B0\u4E0A\u4F20\u6587\u4EF6\u751F\u6548\uFF0C\u5DF2\u5165\u6D41\u7A0B\u6587\u4EF6\u6309\u539F\u6D41\u7A0B\u6267\u884C\u3002\uFF09"})]}),name:"flowType",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u5BA1\u6838\u6D41\u7A0B\u8303\u56F4"}],children:m(De.Group,{children:[e(De,{value:"single",children:"\u5355\u6B21\u5BA1\u6838"}),m(De,{value:"multi",children:["\u7ECF\u529E\u590D\u6838 ",e(T.Text,{type:"secondary",style:{fontWeight:400},children:"\uFF08\u9009\u62E9\u201C\u7ECF\u529E\u590D\u6838\u201D\u540E\uFF0C\u9700\u914D\u7F6E\u521D\u5BA1\u548C\u590D\u5BA1\u4EBA\u5458\u3002\uFF09"})]})]})}),e(te.Item,{label:m("span",{children:["\u521D\u5BA1\u4EBA\u5458"," ",e(T.Text,{type:"secondary",style:{fontWeight:400},children:"\uFF08\u81F3\u5C11 1 \u540D\uFF0C\u6700\u591A 100 \u540D\uFF09"})]}),name:"firstAuditUsers",required:!0,rules:[{validator:async()=>{if(!(n.length>0))throw n.length>100?new Error(`\u6700\u591A\u53EF\u9009\u62E9100\u540D,\u5DF2\u9009\u62E9${n.length}`):new Error("\u8BF7\u9009\u62E9\u521D\u5BA1\u4EBA\u5458")}}],children:m(Ge,{direction:"vertical",size:1,style:{width:"100%"},children:[e("div",{className:"editsetting-person-card-list",style:{display:"flex",flexWrap:"wrap",gap:12},children:n.map(l=>e(Je,{user:l,onRemove:()=>{const x=n.filter(E=>E.userId!==l.userId);c(x),B.setFieldValue("firstAuditUsers",x)}},l.userId))}),e(oe,{onClick:()=>{J("first"),S(!0)},icon:e(Ke,{size:14}),style:{paddingLeft:10,color:"#4e6ef2",marginTop:(n==null?void 0:n.length)>0?10:0},children:"\u65B0\u589E\u4EBA\u5458"})]})}),R?e(te.Item,{label:m("span",{children:["\u590D\u5BA1\u4EBA\u5458"," ",e(T.Text,{type:"secondary",style:{fontWeight:400},children:"\uFF08\u81F3\u5C11 1 \u540D\uFF0C\u6700\u591A 100 \u540D\uFF09"})]}),name:"secondAuditUsers",required:!0,rules:[{validator:async()=>{if(!(g.length>0))throw g.length>100?new Error(`\u6700\u591A\u53EF\u9009\u62E9100\u540D,\u5DF2\u9009\u62E9${g.length}`):new Error("\u8BF7\u9009\u62E9\u590D\u5BA1\u4EBA\u5458")}}],children:m(Ge,{direction:"vertical",size:1,style:{width:"100%"},children:[e("div",{className:"editsetting-person-card-list",style:{display:"flex",flexWrap:"wrap",gap:12},children:g.map(l=>e(Je,{user:l,onRemove:()=>{const x=g.filter(E=>E.userId!==l.userId);C(x),B.setFieldValue("secondAuditUsers",x)}},l.userId))}),e(oe,{onClick:()=>{J("second"),S(!0)},icon:e(Ke,{size:14}),style:{paddingLeft:10,color:"#4e6ef2",marginTop:(g==null?void 0:g.length)>0?10:0},children:"\u65B0\u589E\u4EBA\u5458"})]})}):null]})]})}),e("div",{className:"fixed bottom-0 left-0 right-0 z-10 box-border border-t border-[#e5e6eb] bg-white px-4 py-3",children:m("div",{className:"mx-auto flex w-full max-w-full justify-end gap-3",children:[e(oe,{onClick:v,children:"\u53D6\u6D88"}),e(oe,{type:"primary",loading:$,onClick:d,children:u==="edit"?"\u786E\u8BA4":"\u521B\u5EFA"})]})}),e(Lt,{open:_,title:"\u6DFB\u52A0\u4EBA\u5458",auditStep:M==="first"?1:2,value:M==="first"?n:g,treeRoot:L,excludedUserIds:M==="first"?g.map(l=>l.userId):n.map(l=>l.userId),onCancel:()=>S(!1),onConfirm:l=>{if(M==="first"){const x=new Set(g.map(I=>I.userId)),E=l.filter(I=>!x.has(I.userId));c(E),B.setFieldValue("firstAuditUsers",E)}else{const x=new Set(n.map(I=>I.userId)),E=l.filter(I=>!x.has(I.userId));C(E),B.setFieldValue("secondAuditUsers",E)}S(!1)}})]})}y.div.attrs({className:"reviewsetting-reviewer-card"})`
|
|
100
|
-
display: flex;
|
|
101
|
-
align-items: center;
|
|
102
|
-
gap: 10px;
|
|
103
|
-
width: 100%;
|
|
104
|
-
max-width: 280px;
|
|
105
|
-
min-height: 56px;
|
|
106
|
-
padding: 10px 36px 10px 12px;
|
|
107
|
-
border: 1px solid rgba(226, 232, 240, 0.95);
|
|
108
|
-
border-radius: 10px;
|
|
109
|
-
background: #fff;
|
|
110
|
-
position: relative;
|
|
111
|
-
box-sizing: border-box;
|
|
112
|
-
`;y.div.attrs({className:"reviewsetting-reviewer-card-avatar"})`
|
|
113
|
-
width: 36px;
|
|
114
|
-
height: 36px;
|
|
115
|
-
border-radius: 999px;
|
|
116
|
-
background: linear-gradient(135deg, #4e6ef2, #2563eb);
|
|
117
|
-
display: flex;
|
|
118
|
-
align-items: center;
|
|
119
|
-
justify-content: center;
|
|
120
|
-
color: #fff;
|
|
121
|
-
flex-shrink: 0;
|
|
122
|
-
`;y.button.attrs({className:"reviewsetting-reviewer-card-remove"})`
|
|
123
|
-
position: absolute;
|
|
124
|
-
top: 6px;
|
|
125
|
-
right: 6px;
|
|
126
|
-
display: inline-flex;
|
|
127
|
-
align-items: center;
|
|
128
|
-
justify-content: center;
|
|
129
|
-
width: 22px;
|
|
130
|
-
height: 22px;
|
|
131
|
-
padding: 0;
|
|
132
|
-
border: none;
|
|
133
|
-
border-radius: 6px;
|
|
134
|
-
background: transparent;
|
|
135
|
-
color: #94a3b8;
|
|
136
|
-
cursor: pointer;
|
|
137
|
-
`;const fe=10;function Yt(t){const{styles:a,pageEventsEmit:u,CustomComponents:f,url:F,token:D,role:k}=t,{getMessage:v}=Bt(),[O,B]=b([]),[Y,X]=b(0),[$,K]=b(!1),[ie,j]=b({pageNo:1,pageSize:fe}),[N,i]=b(fe),[n,c]=b(1),[g,C]=b(0),_=qe(""),[S,M]=b("list"),[J,G]=b("create"),[Z,w]=b(null),[o,A]=b(null),[L,z]=b(!1),R=qe(null),d=async(r,s,h)=>{switch(console.log("[adopter] mergedEventsEmit",r,s,h),r){case"reviewsetting_tips_upload_review_toggle_changed":{await E({uploadAudit:s.checked?1:0})&&Q.success("\u66F4\u65B0\u6210\u529F");break}case"reviewsetting_tips_delete_review_toggle_changed":{await E({deleteAudit:s.checked?1:0})&&Q.success("\u66F4\u65B0\u6210\u529F");break}default:typeof u=="function"&&u(r,s);break}},{getReviewSettingData:l,getGlobalConfig:x,updateGlobalConfig:E,deleteConfigById:I,getKnowledgeBaseList:ue,addConfig:H,editConfig:Ae,getConfigById:q}=Qe({url:F,token:D,role:k,eventsEmit:d,getMessage:v}),[ee,P]=b("light"),[le,$e]=b(""),[ce,et]=b(""),[de,tt]=b(""),[it,Te]=b(!0),[rt,Pe]=b(!1),[ii,ri]=b(!1),[ni,si]=b(null),[ui,ai]=b([]),[oi,Fe]=b(!1),Ue=ht(),Ee=ne(()=>{var U;const r=We(We({theme:ft,mode:"light"},Ue||{}),a||{}),s=((U=r.theme)==null?void 0:U.space)||{},h=s.dashboardHeaderHeight,p=h==="auto"||h===void 0?{...s,dashboardHeaderHeight:"38px"}:s;return{...r,mode:ee,theme:{...r.theme,space:p}}},[Ue,a,ee]),ge=se(()=>{M("list"),w(null),A(null),Fe(!1),R.current=null,d==null||d("reviewsetting_nav_back_list",{},null)},[d]);se(()=>{ge()},[ge]);const _e=se(()=>{G("create"),w(null),A(null),Fe(!1),M("form"),R.current=null,d==null||d("reviewsetting_nav_enter_create",{},null)},[d]),Me=se(async r=>{G("edit"),w(r),M("form"),R.current=null,z(!0);try{const s=await q(r);if(s){A(s);const h=s.secondAuditSwitch===1;Fe(h)}else Q.error("\u83B7\u53D6\u914D\u7F6E\u8BE6\u60C5\u5931\u8D25")}catch(s){console.error("[ReviewSetting] getConfigById error:",s),Q.error("\u83B7\u53D6\u914D\u7F6E\u8BE6\u60C5\u5931\u8D25")}finally{z(!1)}d==null||d("reviewsetting_nav_enter_edit",{id:r},null)},[d,q]),Le=se(()=>{P(r=>r==="light"?"dark":"light")},[]);function nt(r,s,h){return r.map((p,U)=>({id:p.id,__absIndex:(s-1)*h+U,data:[{columnId:"enterpriseName",value:p==null?void 0:p.targets,type:"customized"},{columnId:"knowledgeType",value:p.targetType,type:"customized"},{columnId:"reviewScope",value:p.auditScope,type:"customized"},{columnId:"firstReviewers",value:((p==null?void 0:p.firstAuditUsers)||[]).map(W=>W==null?void 0:W.userRealname).join("\u3001"),type:"text"},{columnId:"secondReviewers",value:((p==null?void 0:p.secondAuditUsers)||[]).map(W=>W==null?void 0:W.userRealname).join("\u3001"),type:"text"},{columnId:"createdAt",value:new Date(p.gmtModified).toLocaleString(),type:"text"},{columnId:"creator",value:p.updateBy,type:"text"},{columnId:"enabled",value:p.knowledgeAuditSwitch,type:"customized"},{columnId:"actions",value:"edit",label:v("table.actionEdit"),type:"action"},{columnId:"actions",value:"delete",label:v("table.actionDelete"),type:"action"}]}))}const Be=se(async r=>{const s=Number((r==null?void 0:r.pageNo)||1),h=Number((r==null?void 0:r.pageSize)||fe),p=[String((r==null?void 0:r.targetNameFuzzy)||""),String((r==null?void 0:r.firstAuditUserRealnameFuzzy)||""),String((r==null?void 0:r.secondAuditUserRealnameFuzzy)||""),String(h)].join("::"),U=await l(r),W=U.records||[],re=nt(W,s,h),pe=_.current===p;_.current=p,B(pe?at=>{const Ce=new Map;return at.forEach(he=>Ce.set(he.id,he)),re.forEach(he=>Ce.set(he.id,he)),Array.from(Ce.values())}:re),X(Number((U==null?void 0:U.total)||0)),j({pageNo:s,pageSize:h})},[]);V(()=>{let r=!0;return(async()=>{K(!0);try{await Be({pageNo:1,pageSize:fe})}catch(h){console.error("[BackendPaginationDemo] init request error:",h)}finally{r&&K(!1)}})(),()=>{r=!1}},[Be]),V(()=>{st()},[]);const st=async()=>{const r=await x();r&&(Te(r.uploadAudit!=0),Pe(r.deleteAudit!=0))},we=async({pageNo:r,pageSize:s})=>{let h={pageNo:Number(r||1),pageSize:Number(s||fe),...le?{targetNameFuzzy:le}:{},...ce?{firstAuditUserRealnameFuzzy:ce}:{},...de?{secondAuditUserRealnameFuzzy:de}:{}};try{await Be({...h})}catch(p){console.error("[BackendPaginationDemo] pagination request error:",p)}};V(()=>{we({pageNo:n,pageSize:N})},[n,N,g]);const ut=ne(()=>({label:"",model:null,defaultActiveId:"review-setting-table",views:[{id:"review-setting-table",label:"",type:"table",viewBehavior:"pagination",total:Y,requestPagesize:N,viewPageSize:N,toolbar:[{type:"button",key:"create_review",label:v("toolbar.createConfig"),btnType:"primary"},{type:"customized",key:"search_enterprise",position:"right",component:Ne,componentProps:{placeholder:v("toolbar.searchEnterprisePlaceholder"),value:le}},{type:"customized",key:"search_first_reviewers",position:"right",component:Ne,componentProps:{placeholder:v("toolbar.searchFirstReviewersPlaceholder"),value:ce}},{type:"customized",key:"search_second_reviewers",position:"right",component:Ne,componentProps:{placeholder:v("toolbar.searchSecondReviewersPlaceholder"),value:de}}],columns:[{title:v("table.enterpriseName"),id:"enterpriseName",type:"customized",component:r=>{const{value:s}=r,h=(s||[]).map(p=>p==null?void 0:p.targetName).join("\u3001");return e(je,{title:h,children:h})}},{title:v("table.knowledgeType"),id:"knowledgeType",type:"customized",component:r=>{const{value:s}=r;let h=s==1?"\u77E5\u8BC6\u5E93":"\u6570\u636E\u5E93";return e(pt,{color:s==1?"#C5D8FF":"#BEB8FF",style:{color:"#1D2129"},children:h})}},{title:v("table.reviewScope"),id:"reviewScope",type:"customized",component:r=>{const{value:s}=r;let h="-";return s==1&&(h="\u4E0A\u4F20"),s==2&&(h="\u5220\u9664"),s==3&&(h="\u4E0A\u4F20\u3001\u5220\u9664"),h}},{title:v("table.firstReviewers"),id:"firstReviewers",type:"text"},{title:v("table.secondReviewers"),id:"secondReviewers",type:"text"},{title:v("table.createdAt"),id:"createdAt",type:"text"},{title:v("table.creator"),id:"creator",type:"text"},{title:v("table.enabled"),id:"enabled",type:"customized",component:r=>{const{value:s}=r;let h=s==1?"\u5F00\u542F":"\u5173\u95ED";return e("div",{style:{color:s==1?"#52C41A":"#86909C"},children:h})}},{title:v("table.actions"),id:"actions",type:"action",align:"left"}]}],dataSource:O,eventsEmit:(r,s,h)=>{if(r==="toolbar_create_review"){_e(),d==null||d(`reviewsetting_${r}`,s,h);return}if(r==="toolbar_theme_toggle"&&Le(),r==="toolbar_search_enterprise_change"&&(console.log("+++++++",s.value),$e(String((s==null?void 0:s.value)??""))),r==="toolbar_search_enterprise_submit"&&we({pageNo:1,pageSize:N}),r==="toolbar_search_first_reviewers_change"&&et(String((s==null?void 0:s.value)??"")),r==="toolbar_search_first_reviewers_submit"&&we({pageNo:1,pageSize:N}),r==="toolbar_search_second_reviewers_change"&&tt(String((s==null?void 0:s.value)??"")),r==="toolbar_search_second_reviewerschange"&&we({pageNo:1,pageSize:N}),r==="pagination:request_merge_data"){const p=(s==null?void 0:s.request)||{},U=Number(p.pageSize??N)||N,W=Math.max(1,Number(p.pageNo??n)||n);i(U),c(W),C(re=>re+1)}if(r==="table_action_delete"){const p=String((s==null?void 0:s.id)??"");Ye.confirm({title:"\u5220\u9664\u786E\u8BA4",content:"\u662F\u5426\u5220\u9664\u5F53\u524D\u914D\u7F6E\uFF1F",cancelText:"\u53D6\u6D88",okText:"\u786E\u8BA4",onOk:async()=>{var U;p&&await I(p)&&(B(re=>re.filter(pe=>String(pe==null?void 0:pe.id)!==p)),C(re=>re+1),(U=h==null?void 0:h.removeItem)==null||U.call(h,p))},onCancel:()=>{p&&(d==null||d("reviewsetting_delete_cancelled",{id:p},h))}}),d==null||d(`reviewsetting_${r}`,s,h);return}if(r==="table_action_edit"){const p=String((s==null?void 0:s.id)??"");p&&Me(p),d==null||d(`reviewsetting_${r}`,s,h);return}d==null||d(`reviewsetting_${r}`,s,h)},styles:Ee,CustomComponents:f}),[f,d,O,v,_e,Me,Le,Ee,le,ce,de,N,n,Y]);return console.log("++++++params",le,ce,de),e(wt,{title:v(S==="list"?"dashboard.title":J==="create"?"pages.createTitle":"pages.editTitle"),description:S==="list"?v("dashboard.description"):"",goBack:S==="list"?void 0:ge,styles:Ee,CustomComponents:f,children:S==="list"?m(jt,{className:"reviewsetting-wrapper",children:[e("div",{className:"reviewsetting-tips-container px-[18px]",children:m(Zt,{className:"reviewsetting-tips",children:[m(Ht,{className:"reviewsetting-tips-left",children:[e(Vt,{className:"reviewsetting-tips-title",children:v("tips.title")}),m(Qt,{className:"reviewsetting-tips-desc",children:[e(xt,{style:{color:"#86909C",marginTop:-2},size:16}),e("span",{className:"reviewsetting-tips-desc-text",children:v("tips.description")})]})]}),m(Xt,{className:"reviewsetting-tips-right",children:[m(Oe,{className:"reviewsetting-switch-item",children:[e("span",{className:"reviewsetting-switch-label",children:v("tips.uploadReviewToggle")}),m("label",{className:"reviewsetting-switch",children:[e("input",{type:"checkbox",checked:it,onChange:r=>{const s=r.target.checked;Te(s),d==null||d("reviewsetting_tips_upload_review_toggle_changed",{checked:s},null)}}),e("span",{className:"reviewsetting-switch-slider"})]})]}),m(Oe,{className:"reviewsetting-switch-item",children:[e("span",{className:"reviewsetting-switch-label",children:v("tips.deleteReviewToggle")}),m("label",{className:"reviewsetting-switch",children:[e("input",{type:"checkbox",checked:rt,onChange:r=>{const s=r.target.checked;Pe(s),d==null||d("reviewsetting_tips_delete_review_toggle_changed",{checked:s},null)}}),e("span",{className:"reviewsetting-switch-slider"})]})]})]})]})}),e($t,{className:"reviewsetting-table-wrap",children:e(lt,{...ut},"review-setting-table")})]}):e(ei,{className:"reviewsetting-form-wrap",children:e(Ot,{mode:J,id:J==="edit"&&Z||void 0,url:F,token:D,role:k,eventsEmit:u,onCancel:ge,onSuccess:()=>{C(r=>r+1),ge()}})})})}function Fi({locale:t="zh",messages:a,...u}){return e(Ct,{locale:t,messages:a,children:e(Yt,{...u})})}const jt=y.div.attrs({className:"reviewsetting-wrapper"})`
|
|
138
|
-
width: 100%;
|
|
139
|
-
flex: 1 1 0;
|
|
140
|
-
min-height: 0;
|
|
141
|
-
display: flex;
|
|
142
|
-
flex-direction: column;
|
|
143
|
-
gap: 12px;
|
|
144
|
-
|
|
145
|
-
border-radius: ${({theme:t})=>{var a,u;return((a=t.space)==null?void 0:a.dashboardContentRadius)??((u=t.space)==null?void 0:u.radius)??"8px"}};
|
|
146
|
-
background: ${({theme:t})=>{var a,u;return((a=t.colors)==null?void 0:a.dashboardMainBackground)??((u=t.colors)==null?void 0:u.background)??"#fff"}};
|
|
147
|
-
overflow: hidden;
|
|
148
|
-
`,Zt=y.div.attrs({className:"reviewsetting-tips"})`
|
|
149
|
-
width: 100%;
|
|
150
|
-
box-sizing: border-box;
|
|
151
|
-
padding: 10px 12px;
|
|
152
|
-
margin: 12px 0;
|
|
153
|
-
border-radius: 10px;
|
|
154
|
-
border: 1px solid rgba(226, 232, 240, 0.95);
|
|
155
|
-
background: rgba(248, 250, 252, 1);
|
|
156
|
-
color: rgba(15, 23, 42, 0.78);
|
|
157
|
-
display: flex;
|
|
158
|
-
align-items: center;
|
|
159
|
-
justify-content: space-between;
|
|
160
|
-
gap: 16px;
|
|
161
|
-
flex-wrap: wrap;
|
|
162
|
-
`,Ht=y.div.attrs({className:"reviewsetting-tips-left"})`
|
|
163
|
-
flex: 1 1 420px;
|
|
164
|
-
min-width: 320px;
|
|
165
|
-
display: flex;
|
|
166
|
-
align-items: center;
|
|
167
|
-
gap: 12px;
|
|
168
|
-
min-height: 32px;
|
|
169
|
-
`,Vt=y.div.attrs({className:"reviewsetting-tips-title"})`
|
|
170
|
-
flex: 0 0 auto;
|
|
171
|
-
font-size: 14px;
|
|
172
|
-
font-weight: 600;
|
|
173
|
-
color: rgba(15, 23, 42, 0.92);
|
|
174
|
-
white-space: nowrap;
|
|
175
|
-
`,Qt=y.div.attrs({className:"reviewsetting-tips-desc"})`
|
|
176
|
-
flex: 1 1 auto;
|
|
177
|
-
min-width: 0;
|
|
178
|
-
display: flex;
|
|
179
|
-
align-items: center;
|
|
180
|
-
gap: 8px;
|
|
181
|
-
font-size: 12px;
|
|
182
|
-
line-height: 18px;
|
|
183
|
-
color: rgba(71, 85, 105, 1);
|
|
184
|
-
|
|
185
|
-
& .reviewsetting-tips-desc-text {
|
|
186
|
-
display: block;
|
|
187
|
-
min-width: 0;
|
|
188
|
-
overflow: hidden;
|
|
189
|
-
text-overflow: ellipsis;
|
|
190
|
-
white-space: nowrap;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
& .reviewsetting-tips-info-icon {
|
|
194
|
-
flex: 0 0 auto;
|
|
195
|
-
width: 16px;
|
|
196
|
-
height: 16px;
|
|
197
|
-
border-radius: 50%;
|
|
198
|
-
display: inline-flex;
|
|
199
|
-
align-items: center;
|
|
200
|
-
justify-content: center;
|
|
201
|
-
font-size: 12px;
|
|
202
|
-
font-weight: 700;
|
|
203
|
-
color: rgba(71, 85, 105, 1);
|
|
204
|
-
background: rgba(226, 232, 240, 1);
|
|
205
|
-
}
|
|
206
|
-
`,Xt=y.div.attrs({className:"reviewsetting-tips-right"})`
|
|
207
|
-
flex: 0 0 auto;
|
|
208
|
-
display: flex;
|
|
209
|
-
align-items: center;
|
|
210
|
-
gap: 18px;
|
|
211
|
-
white-space: nowrap;
|
|
212
|
-
`,Oe=y.div.attrs({className:"reviewsetting-switch-item"})`
|
|
213
|
-
display: inline-flex;
|
|
214
|
-
align-items: center;
|
|
215
|
-
gap: 10px;
|
|
216
|
-
|
|
217
|
-
& .reviewsetting-switch-label {
|
|
218
|
-
font-size: 12px;
|
|
219
|
-
color: rgba(51, 65, 85, 1);
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
/* 轻量自定义 switch,视觉更贴近截图 */
|
|
223
|
-
& .reviewsetting-switch {
|
|
224
|
-
position: relative;
|
|
225
|
-
width: 44px;
|
|
226
|
-
height: 22px;
|
|
227
|
-
display: inline-flex;
|
|
228
|
-
align-items: center;
|
|
229
|
-
}
|
|
230
|
-
& .reviewsetting-switch input {
|
|
231
|
-
opacity: 0;
|
|
232
|
-
width: 0;
|
|
233
|
-
height: 0;
|
|
234
|
-
}
|
|
235
|
-
& .reviewsetting-switch-slider {
|
|
236
|
-
position: absolute;
|
|
237
|
-
inset: 0;
|
|
238
|
-
border-radius: 999px;
|
|
239
|
-
background: rgba(203, 213, 225, 1);
|
|
240
|
-
transition: background 0.18s ease;
|
|
241
|
-
box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.35);
|
|
242
|
-
}
|
|
243
|
-
& .reviewsetting-switch-slider::before {
|
|
244
|
-
content: '';
|
|
245
|
-
position: absolute;
|
|
246
|
-
width: 18px;
|
|
247
|
-
height: 18px;
|
|
248
|
-
left: 2px;
|
|
249
|
-
top: 2px;
|
|
250
|
-
border-radius: 999px;
|
|
251
|
-
background: #fff;
|
|
252
|
-
transition: transform 0.18s ease;
|
|
253
|
-
box-shadow: 0 1px 2px rgba(15, 23, 42, 0.18);
|
|
254
|
-
}
|
|
255
|
-
& .reviewsetting-switch input:checked + .reviewsetting-switch-slider {
|
|
256
|
-
background: rgba(29, 112, 245, 1);
|
|
257
|
-
box-shadow: inset 0 0 0 1px rgba(29, 112, 245, 0.35);
|
|
258
|
-
}
|
|
259
|
-
& .reviewsetting-switch input:checked + .reviewsetting-switch-slider::before {
|
|
260
|
-
transform: translateX(22px);
|
|
261
|
-
}
|
|
262
|
-
`,$t=y.div.attrs({className:"reviewsetting-table-wrap"})`
|
|
263
|
-
width: 100%;
|
|
264
|
-
flex: 1 1 0;
|
|
265
|
-
min-height: 0;
|
|
266
|
-
display: flex;
|
|
267
|
-
flex-direction: column;
|
|
268
|
-
overflow: hidden;
|
|
269
|
-
|
|
270
|
-
& > .xviewer-container {
|
|
271
|
-
min-height: 0;
|
|
272
|
-
flex: 1 1 0;
|
|
273
|
-
}
|
|
274
|
-
& .xviewer-content-area,
|
|
275
|
-
& .xviewer-table-loading-wrap {
|
|
276
|
-
min-height: 0;
|
|
277
|
-
}
|
|
278
|
-
`,ei=y.div.attrs({className:"reviewsetting-form-wrap"})`
|
|
279
|
-
width: 100%;
|
|
280
|
-
flex: 1 1 0;
|
|
281
|
-
min-height: 0;
|
|
282
|
-
display: flex;
|
|
283
|
-
flex-direction: column;
|
|
284
|
-
align-items: center;
|
|
285
|
-
box-sizing: border-box;
|
|
286
|
-
background: white;
|
|
287
|
-
overflow: hidden;
|
|
288
|
-
`;y.div.attrs({className:"reviewsetting-form-centered"})`
|
|
289
|
-
width: 100%;
|
|
290
|
-
max-width: 800px;
|
|
291
|
-
margin: 0 auto;
|
|
292
|
-
flex: 1 1 0;
|
|
293
|
-
min-height: 0;
|
|
294
|
-
display: flex;
|
|
295
|
-
flex-direction: column;
|
|
296
|
-
|
|
297
|
-
& > .xviewer-container {
|
|
298
|
-
width: 100%;
|
|
299
|
-
max-width: 800px;
|
|
300
|
-
min-height: 0;
|
|
301
|
-
flex: 1 1 0;
|
|
302
|
-
display: flex;
|
|
303
|
-
flex-direction: column;
|
|
304
|
-
overflow: hidden;
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
/* DynamicForm(antd Form):首项为开关行,其余项落在同一浅灰底块内 */
|
|
308
|
-
& .zui-dynamic-form-wrapper form.ant-form {
|
|
309
|
-
display: flex;
|
|
310
|
-
flex-direction: column;
|
|
311
|
-
gap: 0;
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
& .zui-dynamic-form-wrapper form.ant-form > .ant-form-item:first-child {
|
|
315
|
-
background: transparent;
|
|
316
|
-
margin-bottom: 0 !important;
|
|
317
|
-
padding: 12px;
|
|
318
|
-
border-radius: 8px;
|
|
319
|
-
background: rgba(248, 250, 252, 1);
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
& .zui-dynamic-form-wrapper form.ant-form > .ant-form-item:nth-child(n + 2) {
|
|
323
|
-
|
|
324
|
-
margin-bottom: 0 !important;
|
|
325
|
-
padding: 12px 16px;
|
|
326
|
-
border-radius: 0;
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
/* 灰底区首行:仅当后面还有表单项时保留上圆角 */
|
|
330
|
-
& .zui-dynamic-form-wrapper form.ant-form > .ant-form-item:nth-child(2):not(:last-child) {
|
|
331
|
-
border-radius: 8px 8px 0 0;
|
|
332
|
-
padding-top: 16px;
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
/* 仅「开关 + 一项」时:整段灰底为一块圆角 */
|
|
336
|
-
& .zui-dynamic-form-wrapper form.ant-form > .ant-form-item:nth-child(2):last-child {
|
|
337
|
-
border-radius: 8px;
|
|
338
|
-
padding-top: 16px;
|
|
339
|
-
padding-bottom: 16px;
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
/* 灰底区末行(三项及以上时) */
|
|
343
|
-
& .zui-dynamic-form-wrapper form.ant-form > .ant-form-item:last-child:not(:first-child):not(:nth-child(2)) {
|
|
344
|
-
border-radius: 0 0 8px 8px;
|
|
345
|
-
padding-bottom: 16px;
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
& .zui-dynamic-form-wrapper form.ant-form > .ant-form-item:nth-child(n + 2):not(:last-child) {
|
|
349
|
-
border-bottom: 1px solid rgba(226, 232, 240, 0.7);
|
|
350
|
-
}
|
|
351
|
-
`;y.div.attrs({className:"reviewsetting-form-footer-bar"})`
|
|
352
|
-
width: 100%;
|
|
353
|
-
flex: 0 0 auto;
|
|
354
|
-
background: #fff;
|
|
355
|
-
border-top: 1px solid rgba(226, 232, 240, 0.95);
|
|
356
|
-
padding: 12px 20px;
|
|
357
|
-
box-sizing: border-box;
|
|
358
|
-
`;y.div.attrs({className:"reviewsetting-form-footer-inner"})`
|
|
359
|
-
width: 100%;
|
|
360
|
-
display: flex;
|
|
361
|
-
justify-content: flex-end;
|
|
362
|
-
align-items: center;
|
|
363
|
-
gap: 12px;
|
|
364
|
-
`;y.div.attrs({className:"reviewsetting-form-card"})`
|
|
365
|
-
width: 100%;
|
|
366
|
-
flex: 1 1 0;
|
|
367
|
-
min-height: 360px;
|
|
368
|
-
border-radius: 10px;
|
|
369
|
-
background: #fff;
|
|
370
|
-
border: 1px solid rgba(226, 232, 240, 0.95);
|
|
371
|
-
box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
|
|
372
|
-
padding: 18px 18px 14px 18px;
|
|
373
|
-
display: flex;
|
|
374
|
-
flex-direction: column;
|
|
375
|
-
overflow: hidden;
|
|
376
|
-
`;y.div.attrs({className:"reviewsetting-form-inner"})`
|
|
377
|
-
width: 100%;
|
|
378
|
-
flex: 1 1 0;
|
|
379
|
-
min-height: 0;
|
|
380
|
-
display: flex;
|
|
381
|
-
flex-direction: column;
|
|
382
|
-
`;y.div.attrs({className:"reviewsetting-xviewer-form-root"})`
|
|
383
|
-
width: 100%;
|
|
384
|
-
flex: 1 1 0;
|
|
385
|
-
min-height: 0;
|
|
386
|
-
overflow-y: auto;
|
|
387
|
-
display: flex;
|
|
388
|
-
flex-direction: column;
|
|
389
|
-
|
|
390
|
-
& > .xviewer-container {
|
|
391
|
-
min-height: 0;
|
|
392
|
-
flex: 1 1 0;
|
|
393
|
-
}
|
|
394
|
-
& .xviewer-content-area {
|
|
395
|
-
min-height: 280px;
|
|
396
|
-
}
|
|
397
|
-
& .zui-dynamic-form-wrapper {
|
|
398
|
-
height: auto !important;
|
|
399
|
-
min-height: 240px;
|
|
400
|
-
}
|
|
401
|
-
`;y.div.attrs({className:"reviewsetting-form-body"})`
|
|
402
|
-
flex: 1 1 0;
|
|
403
|
-
min-height: 0;
|
|
404
|
-
overflow-y: auto;
|
|
405
|
-
padding-bottom: 12px;
|
|
406
|
-
`;y.div.attrs({className:"reviewsetting-form-footer"})`
|
|
407
|
-
flex: 0 0 auto;
|
|
408
|
-
padding-top: 12px;
|
|
409
|
-
margin-top: 8px;
|
|
410
|
-
border-top: 1px solid rgba(226, 232, 240, 0.95);
|
|
411
|
-
display: flex;
|
|
412
|
-
justify-content: flex-end;
|
|
413
|
-
gap: 24px;
|
|
414
|
-
background: #fff;
|
|
415
|
-
`;const ti=y.div.attrs({className:"reviewmanage-toolbar-search-wrap"})`
|
|
416
|
-
height: 32px;
|
|
417
|
-
min-width: 220px;
|
|
418
|
-
padding: 0 10px 0 12px;
|
|
419
|
-
border-radius: 8px;
|
|
420
|
-
border: 1px solid #d0d5dd;
|
|
421
|
-
background: #fff;
|
|
422
|
-
display: inline-flex;
|
|
423
|
-
align-items: center;
|
|
424
|
-
gap: 8px;
|
|
425
|
-
|
|
426
|
-
.reviewmanage-toolbar-search-input {
|
|
427
|
-
flex: 1;
|
|
428
|
-
min-width: 0;
|
|
429
|
-
border: none;
|
|
430
|
-
outline: none;
|
|
431
|
-
font-size: 12px;
|
|
432
|
-
color: #344054;
|
|
433
|
-
background: transparent;
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
.reviewmanage-toolbar-search-btn {
|
|
437
|
-
display: inline-flex;
|
|
438
|
-
align-items: center;
|
|
439
|
-
justify-content: center;
|
|
440
|
-
width: 22px;
|
|
441
|
-
height: 22px;
|
|
442
|
-
border: none;
|
|
443
|
-
background: transparent;
|
|
444
|
-
padding: 0;
|
|
445
|
-
cursor: pointer;
|
|
446
|
-
border-radius: 6px;
|
|
447
|
-
}
|
|
448
|
-
.reviewmanage-toolbar-search-btn:hover {
|
|
449
|
-
background: rgba(16, 24, 40, 0.04);
|
|
450
|
-
}
|
|
451
|
-
.reviewmanage-toolbar-search-btn:active {
|
|
452
|
-
background: rgba(16, 24, 40, 0.06);
|
|
453
|
-
}
|
|
454
|
-
`,Ne=({placeholder:t,value:a,onAction:u})=>m(ti,{className:"reviewmanage-toolbar-search-wrap",children:[e("input",{className:"reviewmanage-toolbar-search-input",placeholder:t,value:a??"",onChange:f=>u==null?void 0:u("change",{value:f.target.value}),onKeyDown:f=>{f.key==="Enter"&&(u==null||u("submit"))}}),e("button",{type:"button",className:"reviewmanage-toolbar-search-btn","aria-label":"search",onClick:()=>u==null?void 0:u("submit"),children:e(yt,{size:14,color:"#98A2B3"})})]});export{Fi as R,Ct as a,Bt as u};
|