@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
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{jsx as v}from"react/jsx-runtime";import{Icon as x}from"@mxmweb/zui";import{Spin as R}from"antd";import"dayjs";import{I as S,_ as C}from"./AntdIcon-Vuhc5UuC.js";import*as z from"react";async function L(t,e){const n=t.getReader();let r;for(;!(r=await n.read()).done;)e(r.value)}function _(t){let e,n,r,i=!1;return function(s){e===void 0?(e=s,n=0,r=-1):e=A(e,s);const o=e.length;let a=0;for(;n<o;){i&&(e[n]===10&&(a=++n),i=!1);let l=-1;for(;n<o&&l===-1;++n)switch(e[n]){case 58:r===-1&&(r=n-a);break;case 13:i=!0;case 10:l=n;break}if(l===-1)break;t(e.subarray(a,l),r),a=n,r=-1}a===o?e=void 0:a!==0&&(e=e.subarray(a),n-=a)}}function N(t,e,n){let r=E();const i=new TextDecoder;return function(s,o){if(s.length===0)n==null||n(r),r=E();else if(o>0){const a=i.decode(s.subarray(0,o)),l=o+(s[o+1]===32?2:1),d=i.decode(s.subarray(l));switch(a){case"data":r.data=r.data?r.data+`
|
|
2
|
+
`+d:d;break;case"event":r.event=d;break;case"id":t(r.id=d);break;case"retry":const u=parseInt(d,10);isNaN(u)||e(r.retry=u);break}}}}function A(t,e){const n=new Uint8Array(t.length+e.length);return n.set(t),n.set(e,t.length),n}function E(){return{data:"",event:"",id:"",retry:void 0}}var B=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const O="text/event-stream",F=1e3,I="last-event-id";function Q(t,e){var{signal:n,headers:r,onopen:i,onmessage:y,onclose:s,onerror:o,openWhenHidden:a,fetch:l}=e,d=B(e,["signal","headers","onopen","onmessage","onclose","onerror","openWhenHidden","fetch"]);return new Promise((u,q)=>{const f=Object.assign({},r);f.accept||(f.accept=O);let p;function T(){p.abort(),document.hidden||b()}a||document.addEventListener("visibilitychange",T);let j=F,h=0;function m(){document.removeEventListener("visibilitychange",T),window.clearTimeout(h),p.abort()}n==null||n.addEventListener("abort",()=>{m(),u()});const k=l??window.fetch,P=i??H;async function b(){var w;p=new AbortController;try{const g=await k(t,Object.assign(Object.assign({},d),{headers:f,signal:p.signal}));await P(g),await L(g.body,_(N(c=>{c?f[I]=c:delete f[I]},c=>{j=c},y))),s==null||s(),m(),u()}catch(g){if(!p.signal.aborted)try{const c=(w=o==null?void 0:o(g))!==null&&w!==void 0?w:j;window.clearTimeout(h),h=window.setTimeout(b,c)}catch(c){m(),q(c)}}}b()})}function H(t){const e=t.headers.get("content-type");if(!(e!=null&&e.startsWith(O)))throw new Error(`Expected content-type to be ${O}, Actual: ${e}`)}const U=()=>"/proxy",X=t=>{if(!t||typeof t!="string")return"";const e=t.split("/"),n=e.length;return e[n-1]},Y=t=>{if(typeof t=="string"){const e=t.split(".");return e.length?e[e.length-1]:""}else return""},$=t=>{const e=(t||"").toLowerCase();return["png","jpg","jpeg","gif","bmp","webp","svg","ico"].includes(e)?"rag/pic":e==="pdf"?"rag/pdf":e==="ofd"?"rag/ofd":["doc","docx"].includes(e)?"rag/word":["xls","xlsx","xlsm","xlsb","xltx","xltm","xlt","xlam"].includes(e)?"rag/excel":["ppt","pptx"].includes(e)?"rag/ppt":e==="txt"||e==="md"?"rag/txt":e==="csv"?"rag/csv":["zip","rar","7z"].includes(e)?"rag/zip":["odt","ods","odp","odf"].includes(e)?"rag/odf":e==="json"?"rag/json":"rag/file"},Z=t=>{if(t.loading)return v(R,{size:"small",style:{marginRight:"5px",width:"12px",fontSize:"12px"}});if(t.type==="dir")return v(x,{type:"rag/folder",size:16});if(t.type==="file"&&t.fileType){const e=$(t.fileType);return v(x,{type:e,size:16})}return v(x,{type:"rag/folder",size:16})};var W={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"},D=function(e,n){return z.createElement(S,C({},e,{ref:n,icon:W}))},ee=z.forwardRef(D);export{ee as R,U as a,Y as b,Q as f,X as g,Z as r};
|
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
import{jsx as e,jsxs as w,Fragment as tt}from"react/jsx-runtime";import we,{useState as A,useMemo as ue,useEffect as X,useCallback as oe,useRef as Ue}from"react";import C from"styled-components";import{Xviwer as it}from"@mxmweb/xviewer";import{Modal as We,Input as rt,List as Fe,Typography as T,Avatar as fe,Button as le,Checkbox as Se,Tooltip as Ke,Form as ie,Switch as st,Select as ut,Radio as Ee,Space as _e,message as se,Tag as nt}from"antd";import{useTheme as at,deepMergeTheme as Me,defaultTheme as ot,DashboardContainer as lt}from"@mxmweb/zui";import ct from"axios";import{X as Ye}from"./x-CdZQbi--.js";import{C as dt}from"./chevron-right-CrkLSPrQ.js";import{P as Le}from"./plus-B679mjyt.js";/* empty css *//* empty css */import{R as gt}from"./ExclamationCircleFilled-iFno81Rg.js";import{S as pt}from"./search-CEuIa9-_.js";const me={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"}},ht={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"}},ft={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"}},wt={zh:me,en:ht,ja:ft};function mt(i,a){const n=wt[i]??me;return a?{...n,...a}:n}function Je(i,a){const n=a.split(".");let h=i;for(const x of n)h=h==null?void 0:h[x];return typeof h=="string"?h:a}const Oe=we.createContext({locale:"zh",messages:me,getMessage:i=>Je(me,i)});function bt(){return we.useContext(Oe)}function yt({locale:i,messages:a,children:n}){const h=we.useMemo(()=>{const x=mt(i,a);return{locale:i,messages:x,getMessage:D=>Je(x,D)}},[i,a]);return we.createElement(Oe.Provider,{value:h},n)}const He=({url:i,token:a,role:n,eventsEmit:h,getMessage:x})=>{const D=(t,s)=>x?x(t):s,B=ct.create({baseURL:i,timeout:1e6});return B.interceptors.request.use(t=>{let s=a;return!s&&!["user/login","user/kaptcha","user/regist"].some(g=>t.url.includes(g))?(h&&h("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")))):(t.headers.Authorization=s||"",t.headers.userName=n==="\u672A\u767B\u5F55\u7528\u6237"?"":n,t)}),B.interceptors.response.use(t=>{const s=["user/kaptcha"],l=t.data;if(s.some(R=>t.config.url&&t.config.url.includes(R))||l.size&&l.type)return l;const{success:g,errorMsg:k,errorCode:U}=l;return g?l:h?(h("request:error_business",{errorCode:U,errorMsg:k||D("server.requestError","\u8BF7\u6C42\u51FA\u9519\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5"),response:l}),l):!1},t=>{var s,l,g,k,U,R,_,Y,L;if(t.message==="canceled")return Promise.reject(t);if(h){let J="request:error_network",m={errorMsg:D("server.requestError","\u7F51\u7EDC\u8BF7\u6C42\u5931\u8D25"),error:t};((s=t==null?void 0:t.response)==null?void 0:s.status)===401?(J="request:error_auth",m={errorMsg:D("server.noPermission","\u6CA1\u6709\u8DB3\u591F\u6743\u9650"),error:t,redirect:"/login"}):(((g=(l=t==null?void 0:t.response)==null?void 0:l.data)==null?void 0:g.errorCode)==="30013"||((U=(k=t==null?void 0:t.response)==null?void 0:k.data)==null?void 0:U.errorCode)==="30023")&&(J="request:error_business",m={errorCode:(_=(R=t==null?void 0:t.response)==null?void 0:R.data)==null?void 0:_.errorCode,errorMsg:((L=(Y=t==null?void 0:t.response)==null?void 0:Y.data)==null?void 0:L.message)||D("server.requestError","\u8BF7\u6C42\u51FA\u9519\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5"),error:t}),h(J,m)}return Promise.reject(t)}),{getReviewSettingData:async t=>{try{const s=await B.get(`/index/auditConfig/page?${new URLSearchParams(t).toString()}`),{success:l,data:g}=s;if(l)return g}catch(s){return console.log("getReviewSetting error:",s),!1}},getGlobalConfig:async()=>{try{const t=await B.get("/index/bizGlobalAuditConfig/current"),{success:s,data:l}=t;if(s)return l}catch(t){return console.log("getConfig error:",t),!1}},updateGlobalConfig:async({uploadAudit:t,deleteAudit:s})=>{try{const l=await B.put("/index/bizGlobalAuditConfig/updateSwitch",{uploadAudit:t,deleteAudit:s}),{success:g,data:k}=l;if(g)return k}catch(l){return console.log("getConfig error:",l),!1}},deleteConfigById:async t=>{try{const s=await B.delete(`/index/auditConfig/delete?idList=${t}`),{success:l,data:g}=s;if(l)return g}catch(s){return console.log("deleteConfig error:",s),!1}},getKnowledgeBaseList:async t=>{try{const s=new URLSearchParams;t!=null&&t.fuzzy&&s.append("fuzzy",t.fuzzy);const l=await B.get(`index/knowledgeBase/manageableList${s.toString()?`?${s.toString()}`:""}`),{success:g,data:k}=l;if(g)return k}catch(s){console.log("getKnowledgeBaseList error:",s)}},addConfig:async t=>{try{const s=await B.post("index/auditConfig/save",{...t}),{success:l,data:g}=s;if(l)return g}catch(s){console.log("addConfig error:",s)}},editConfig:async t=>{try{const s=await B.put("index/auditConfig/update",{...t}),{success:l,data:g}=s;if(l)return g}catch(s){console.log("editConfig error:",s)}},getConfigById:async t=>{try{const s=await B.get(`index/auditConfig/detail/${t}`),{success:l,data:g}=s;if(l)return g}catch(s){console.log("getConfigById error:",s)}},getUserList:async()=>{try{const t=await B.get("auth/user/searchUserList"),{success:s,data:l}=t;if(s)return l}catch(t){console.log("getConfigById error:",t)}},getTreeFrame:async(t={})=>{try{const s=await B.get("/auth/departmentInfo/treeFrame",{params:t}),{success:l,data:g}=s;if(l)return g}catch(s){console.log("getTreeFrame error:",s)}}}},At="data:image/png;base64,iVBORw0KGgo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UmxoCrolCgpj/sO9nWF9DFaEuCbNVTp9tnFHWugI6JY7LwdRN5lAhvlVDlD9RlqIQ9B6mGoVskxzBgSTSUZ+MMKmIBYvWfWzmt627yo2fZ029JEIVIzi+RodKcM9fKQYIF7A9XBSQmIb1NoAQAAtbF2kB2wglv2SpZEDTN7R+8yDIuuXtOWQST1crt2Fy+qXRcDl6VIPonRHLlEpGMv+skKH5JtqdkIhIUIQcGWS3H6EtUfRfUyqmXzGL62obpE11vSmB++hzkAG9LEMATDwzzYYdIyiErhMzBGWQylBqdutD7bL1P08QQkPCSLFfS8tLhgzun5mJGZJtAWoPjmyL3wORx4EBbnM5JEBtIXvpKu17ghxwQIeEIq0SQ0bJDFLqJzJIsAGoadtiUvQz9zUX2cRlMSAlYf4Vx5A0vnx85x+B0Ie3T94x7lchBkZ0psf7A5+ZTyVI1krYMuTL2Q1rl4Mmv/+Y0samHdt3EPE/7ijFX3Du/ed/gbwnnmzM5XXDT32TPZLRXxwElEZ9WkpBkvHB1SwKV4IKwtBQHGGSLaBKiULZh1eTrhP7w7qHLXmmHX+1OGdG2PmcqWyvPJYWovmqtK5EbldyMxHDoj24asHJ9JSVPAkvEiAFZdF5Z7Jjr65v+nPmI/tL38Pn+bSi+zmzk87q0z9437tU2vEWJrWkrXa5xfQ5dIgnhJMAwSKu3PF5hHtfPz0f0o+zGxRArUq8bwXJI//mvjmvaWntE8kZtL37hYXVnXkHps5+L1Anhjmuhn6Z/+P5hA/vXs/0PVVl54z/XKbAAAAAASUVORK5CYII=",vt=1;function be(i){return i.elementType===vt}function xt(i){return!be(i)}function Ft(i){return i==null||Array.isArray(i)&&i.length===0?{id:"__empty_root__",name:"\u7EC4\u7EC7\u67B6\u6784",elementType:1,children:[]}:Array.isArray(i)?i.length===1?i[0]:{id:"__virtual_root__",name:"\u7EC4\u7EC7\u67B6\u6784",elementType:1,children:i}:i}function Ze(i,a){const n=[],h=i.children||[];for(const x of h)if(be(x)){const D={id:x.id,name:x.name||x.deptName||""};n.push(...Ze(x,D))}else xt(x)&&n.push({node:x,deptId:a.id,deptName:x.deptName||a.name||""});return n}function Et(i){const a={id:i.id,name:i.name||i.deptName||""};return Ze(i,a)}function he(i,a){const n=i.toLowerCase(),h=a.trim().toLowerCase();return h?n.includes(h):!0}function ae(i){return String(i.userRealname||i.userName||i.name||i.id)}function Be(i){const a=i.trim();return a.length<=1?a||"?":a.slice(0,1)}const Bt=C.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
|
+
`,Ct=C.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
|
+
`,kt=C.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
|
+
`,Dt=C.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
|
+
`,St=C.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
|
+
`,Ce=C.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
|
+
`,ke=C.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:i})=>i?"#fff":"transparent"};
|
|
43
|
+
cursor: ${({$interactive:i})=>i?"pointer":"default"};
|
|
44
|
+
text-align: left;
|
|
45
|
+
&:hover {
|
|
46
|
+
background: ${({$interactive:i})=>i?"rgba(248, 250, 252, 1)":"transparent"};
|
|
47
|
+
}
|
|
48
|
+
`,Rt=C.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
|
+
`,It=C.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 Nt(i){const{open:a,title:n="\u6DFB\u52A0\u4EBA\u5458",auditStep:h,value:x,maxCount:D=100,treeRoot:B,excludedUserIds:z=[],onCancel:b,onConfirm:E}=i,[K,Z]=A(""),Q=ue(()=>Ft(B),[B]),[$,j]=A([Q]),[ee,te]=A(new Map),t=ue(()=>new Set(z.filter(Boolean)),[z]),s=ue(()=>Et(Q),[Q]);X(()=>{if(!a)return;Z(""),j([Q]);const m=new Map;x.forEach(o=>{t.has(o.userId)||m.set(o.userId,{...o,auditStep:h})}),te(m)},[a,Q,h,x,t]);const l=$[$.length-1],g=l.children||[],k=ue(()=>{const m=K.trim();return m?s.filter(({node:o,deptName:v})=>{if(t.has(o.id))return!1;const d=ae(o);return he(d,m)||he(o.userName||"",m)||he(v,m)||he(o.deptName||"",m)}):[]},[s,K,t]),U=ue(()=>Array.from(ee.values()),[ee]),R=oe((m,o,v,d)=>{const I=m.id;t.has(I)||te(N=>{const q=new Map(N);if(d){if(q.size>=D)return N;q.set(I,{userId:I,userRealname:ae(m),auditStep:h,deptId:o,deptName:v||""})}else q.delete(I);return q})},[h,D,t]),_=m=>{be(m)&&j(o=>[...o,m])},Y=h===1?"\u5DF2\u4E3A\u590D\u5BA1\u4EBA\u5458\uFF0C\u4E0D\u53EF\u9009\u62E9":"\u5DF2\u4E3A\u521D\u5BA1\u4EBA\u5458\uFF0C\u4E0D\u53EF\u9009\u62E9",L=()=>{const m=U.filter(o=>!t.has(o.userId)).map(o=>({...o,auditStep:h}));E(m)},J=()=>K.trim()?e(Ce,{children:k.length===0?e(T.Text,{type:"secondary",style:{display:"block",padding:16},children:"\u65E0\u5339\u914D\u4EBA\u5458"}):k.map(({node:o,deptId:v,deptName:d})=>{const I=ee.has(o.id);return w(ke,{$interactive:!0,onClick:N=>{N.preventDefault(),R(o,v,d,!I)},children:[e(Se,{checked:I,onClick:N=>N.stopPropagation(),onChange:N=>R(o,v,d,N.target.checked)}),e(fe,{style:{background:"linear-gradient(-50deg, #8F91FF 10%, #2B69FF 90%)"},children:Be(ae(o))}),w("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:d||"\u6B64\u5904\u662F\u90E8\u95E8\u540D\u79F0"})]})]},o.id)})}):w(tt,{children:[e(Rt,{children:$.map((o,v)=>w("span",{style:{display:"inline-flex",alignItems:"center",gap:4},children:[v>0?e("span",{style:{color:"#cbd5e1"},children:"/"}):null,e(It,{type:"button",onClick:()=>j($.slice(0,v+1)),children:o.name||o.userRealname||"\u2026"})]},`${o.id}-${v}`))}),e(Ce,{children:g.length===0?e(T.Text,{type:"secondary",style:{display:"block",padding:16},children:"\u6682\u65E0\u5B50\u9879"}):g.map(o=>{var q;if(be(o)){const c=(((q=o.children)==null?void 0:q.length)||0)>0;return w(ke,{$interactive:c,onClick:()=>{c&&_(o)},children:[e("span",{style:{width:20,display:"inline-block"}}),e("img",{src:At,width:30,height:28}),e("div",{style:{flex:1,minWidth:0},children:e(T.Text,{children:o.name||"\u90E8\u95E8"})}),c?e(dt,{color:"#055aff",size:14}):null]},o.id)}const v={id:l.id,name:l.name||l.deptName||""},d=ee.has(o.id),I=t.has(o.id),N=w(ke,{$interactive:!I,style:I?{opacity:.55,cursor:"not-allowed"}:void 0,onClick:()=>{I||R(o,v.id,o.deptName||v.name,!d)},children:[e(Se,{checked:d,disabled:I,onClick:c=>c.stopPropagation(),onChange:c=>R(o,v.id,o.deptName||v.name,c.target.checked)}),e(fe,{style:{background:"linear-gradient(-50deg, #8F91FF 10%, #2B69FF 90%)"},children:Be(ae(o))}),w("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||v.name||"\u6B64\u5904\u662F\u90E8\u95E8\u540D\u79F0"})]})]});return I?e(Ke,{title:Y,children:e("div",{children:N})},o.id):e("div",{children:N},o.id)})})]});return e(We,{title:n,open:a,width:800,onCancel:b,footer:w("div",{style:{display:"flex",justifyContent:"flex-end",gap:8},children:[e(le,{onClick:b,children:"\u53D6\u6D88"}),e(le,{type:"primary",onClick:L,children:"\u786E\u5B9A"})]}),destroyOnClose:!0,children:w(Bt,{children:[w(Ct,{children:[e(kt,{children:e(rt.Search,{allowClear:!0,placeholder:"\u641C\u7D22\u7528\u6237\u3001\u7FA4\u7EC4\u3001\u90E8\u95E8\u6216\u7528\u6237\u7EC4",value:K,onChange:m=>Z(m.target.value),onSearch:m=>Z(m)})}),J()]}),w(Dt,{children:[w(St,{children:["\u5DF2\u9009\uFF1A",U.length," \u4E2A"]}),e(Ce,{children:e(Fe,{size:"small",dataSource:U,locale:{emptyText:e(T.Text,{type:"secondary",children:"\u6682\u672A\u9009\u62E9\u4EBA\u5458"})},split:!1,renderItem:m=>e(Fe.Item,{style:{padding:"10px 12px"},actions:[e(Ye,{size:20,onClick:()=>te(o=>{const v=new Map(o);return v.delete(m.userId),v})})],children:e(Fe.Item.Meta,{avatar:e(fe,{style:{background:"linear-gradient(-50deg, #7FC0FB 10%, #4088F4 90%)"},children:Be(m.userRealname)}),title:e(T.Text,{children:m.userRealname}),description:e(T.Text,{type:"secondary",style:{fontSize:12},children:m.deptName||"\u6B64\u5904\u662F\u90E8\u95E8\u540D\u79F0"})})})})})]})]})})}const zt=i=>i===3?[1,2]:i===2?[2]:[1],Tt=i=>{const a=i.includes(1),n=i.includes(2);return a&&n?3:n?2:1};function Pt(i){const a=i.trim();return a.length<=1?a||"?":a.slice(0,1)}const Ut=C.div.attrs({className:"editsetting-person-card"})`
|
|
68
|
+
display: flex;
|
|
69
|
+
align-items: center;
|
|
70
|
+
gap: 10px;
|
|
71
|
+
width: 100%;
|
|
72
|
+
max-width: 180px;
|
|
73
|
+
min-height: 56px;
|
|
74
|
+
padding: 4px 10px;
|
|
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
|
+
`,_t=C.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 qe({user:i,onRemove:a}){return w(Ut,{children:[e(fe,{size:36,style:{background:"#83ACFF",flexShrink:0},children:Pt(i.userRealname)}),w("div",{style:{minWidth:0,flex:1,paddingRight:20},children:[e(T.Text,{strong:!0,style:{display:"block",fontSize:14,color:"#111827"},children:i.userRealname}),e(T.Text,{type:"secondary",style:{fontSize:12,marginTop:2,display:"block"},children:i.deptName||"\u6B64\u5904\u662F\u90E8\u95E8\u540D\u79F0"})]}),e(_t,{"aria-label":"\u79FB\u9664",onClick:a,children:e(Ye,{size:14,strokeWidth:2})})]})}function Mt(i){const{id:a,mode:n="edit",url:h,token:x,role:D,eventsEmit:B,onCancel:z,onSuccess:b}=i,[E]=ie.useForm(),[K,Z]=A(!1),[Q,$]=A(!1),[j,ee]=A([]),[te,t]=A(""),[s,l]=A([]),[g,k]=A([]),[U,R]=A(!1),[_,Y]=A("first"),{getKnowledgeBaseList:L,getConfigById:J,addConfig:m,editConfig:o,getTreeFrame:v}=ue(()=>He({url:h,token:x,role:D,eventsEmit:B}),[h,x,D,B]),[d,I]=A([]);X(()=>{(async()=>{const c=await v();c&&I(c)})()},[v]);const N=ie.useWatch("flowType",E)==="multi";X(()=>{(async()=>{var y,F;Z(!0);try{const[S,V]=await Promise.all([L({fuzzy:""}),n==="edit"&&a!==void 0&&a!==null?J(a):Promise.resolve(null)]);if(ee(Array.isArray(S)?S:[]),n==="edit"&&V){const O=V,ne=((y=O.firstAuditUsers)==null?void 0:y.map(P=>({userId:P.userId,userRealname:P.userRealname,auditStep:1,deptId:P.deptId,deptName:P.deptName})))??[],G=((F=O.secondAuditUsers)==null?void 0:F.map(P=>({userId:P.userId,userRealname:P.userRealname,auditStep:2,deptId:P.deptId,deptName:P.deptName})))??[],H=O.secondAuditSwitch===1;l(ne),k(H?G:[]),E.setFieldsValue({knowledgeAuditSwitch:O.knowledgeAuditSwitch===1,knowledgeIds:(O.targets||[]).map(P=>String(P.targetId)),reviewScope:zt(O.auditScope),flowType:H?"multi":"single"})}else n==="create"&&(l([]),k([]),E.setFieldsValue({knowledgeAuditSwitch:!0,reviewScope:[1],flowType:"single",firstAuditUsers:[],secondAuditUsers:[],knowledgeIds:[]}))}catch{se.error(n==="edit"?"\u52A0\u8F7D\u914D\u7F6E\u5931\u8D25":"\u52A0\u8F7D\u77E5\u8BC6\u5E93\u5931\u8D25")}finally{Z(!1)}})()},[a,n,E,J,L]),X(()=>{const c=window.setTimeout(async()=>{try{const y=await L({fuzzy:te.trim()});ee(Array.isArray(y)?y:[])}catch(y){console.error("[EditSetting] search knowledge base failed:",y)}},250);return()=>window.clearTimeout(c)},[te,L]),X(()=>{N||(E.setFieldValue("secondAuditUsers",[]),k([]))},[N,E]),X(()=>{const c=new Set(s.map(y=>y.userId));k(y=>{const F=y.filter(S=>!c.has(S.userId));return F.length===y.length?y:(E.setFieldValue("secondAuditUsers",F),F)})},[s,E]),X(()=>{const c=new Set(g.map(y=>y.userId));l(y=>{const F=y.filter(S=>!c.has(S.userId));return F.length===y.length?y:(E.setFieldValue("firstAuditUsers",F),F)})},[g,E]);const q=async()=>{try{const c=await E.validateFields(),y=new Set(s.map(G=>G.userId));if(g.some(G=>y.has(G.userId))){se.error("\u521D\u5BA1\u4E0E\u590D\u5BA1\u4EBA\u5458\u4E0D\u53EF\u91CD\u590D\uFF0C\u8BF7\u8C03\u6574\u540E\u518D\u63D0\u4EA4");return}const S=(c.knowledgeIds||[]).map(G=>Number(G)).map(G=>{const H=j.find(P=>Number(P.id)===G);return{targetType:1,targetId:G,targetName:(H==null?void 0:H.kbName)||""}}),V={auditScope:Tt(c.reviewScope||[]),knowledgeAuditSwitch:c.knowledgeAuditSwitch?1:0,firstAuditSwitch:1,secondAuditSwitch:c.flowType==="multi"?1:0,firstAuditUsers:s,secondAuditUsers:c.flowType==="multi"?g:[],targets:S};$(!0);const O=n==="edit"?{...V,id:Number(a)}:V;if(n==="edit"?await o(O):await m(O)){se.success(n==="edit"?"\u4FDD\u5B58\u6210\u529F":"\u521B\u5EFA\u6210\u529F"),b==null||b();return}se.error(n==="edit"?"\u4FDD\u5B58\u5931\u8D25":"\u521B\u5EFA\u5931\u8D25")}catch(c){c!=null&&c.errorFields?se.warning("\u8BF7\u5B8C\u6574\u586B\u5199\u5FC5\u586B\u9879"):se.error(n==="edit"?"\u4FDD\u5B58\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5":"\u521B\u5EFA\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5")}finally{$(!1)}};return w("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-[1000px] max-w-full",children:w(ie,{form:E,layout:"vertical",requiredMark:!0,disabled:K,initialValues:{knowledgeAuditSwitch:!0,reviewScope:[1],flowType:"single",firstAuditUsers:[],secondAuditUsers:[]},children:[w("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(ie.Item,{name:"knowledgeAuditSwitch",valuePropName:"checked",className:"mb-0",style:{marginBottom:0},children:e(st,{})})]}),w("div",{className:"rounded-md bg-white px-4 py-1",children:[e(ie.Item,{label:"\u77E5\u8BC6\u5E93",name:"knowledgeIds",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u77E5\u8BC6\u5E93"}],children:e(ut,{mode:"multiple",allowClear:!0,showSearch:!0,filterOption:!1,placeholder:"\u8BF7\u9009\u62E9\u77E5\u8BC6\u5E93",onSearch:c=>t(c),options:j.map(c=>({label:c.kbName,value:String(c.id)}))})}),e(ie.Item,{label:"\u5BA1\u6838\u8303\u56F4",name:"reviewScope",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u5BA1\u6838\u8303\u56F4"}],children:e(Se.Group,{options:[{label:"\u4E0A\u4F20",value:1},{label:"\u5220\u9664",value:2}]})}),e(ie.Item,{label:w("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:w(Ee.Group,{children:[e(Ee,{value:"single",children:"\u5355\u6B21\u5BA1\u6838"}),w(Ee,{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(ie.Item,{label:w("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(!(s.length>0))throw s.length>100?new Error(`\u6700\u591A\u53EF\u9009\u62E9100\u540D,\u5DF2\u9009\u62E9${s.length}`):new Error("\u8BF7\u9009\u62E9\u521D\u5BA1\u4EBA\u5458")}}],children:w(_e,{direction:"vertical",size:1,style:{width:"100%"},children:[e("div",{className:"editsetting-person-card-list",style:{display:"flex",flexWrap:"wrap",gap:12,overflowY:"auto",maxHeight:300},children:s.map(c=>e(qe,{user:c,onRemove:()=>{const y=s.filter(F=>F.userId!==c.userId);l(y),E.setFieldValue("firstAuditUsers",y)}},c.userId))}),e(le,{onClick:()=>{Y("first"),R(!0)},icon:e(Le,{size:14}),style:{paddingLeft:10,color:"#4e6ef2",marginTop:(s==null?void 0:s.length)>0?10:0},children:"\u65B0\u589E\u4EBA\u5458"})]})}),N?e(ie.Item,{label:w("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:w(_e,{direction:"vertical",size:1,style:{width:"100%"},children:[e("div",{className:"editsetting-person-card-list",style:{display:"flex",flexWrap:"wrap",gap:12,overflowY:"auto",maxHeight:300},children:g.map(c=>e(qe,{user:c,onRemove:()=>{const y=g.filter(F=>F.userId!==c.userId);k(y),E.setFieldValue("secondAuditUsers",y)}},c.userId))}),e(le,{onClick:()=>{Y("second"),R(!0)},icon:e(Le,{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:w("div",{className:"mx-auto flex w-full max-w-full justify-end gap-3",children:[e(le,{onClick:z,children:"\u53D6\u6D88"}),e(le,{type:"primary",loading:Q,onClick:q,children:n==="edit"?"\u786E\u8BA4":"\u521B\u5EFA"})]})}),e(Nt,{open:U,title:"\u6DFB\u52A0\u4EBA\u5458",auditStep:_==="first"?1:2,value:_==="first"?s:g,treeRoot:d,excludedUserIds:_==="first"?g.map(c=>c.userId):s.map(c=>c.userId),onCancel:()=>R(!1),onConfirm:c=>{if(_==="first"){const y=new Set(g.map(S=>S.userId)),F=c.filter(S=>!y.has(S.userId));l(F),E.setFieldValue("firstAuditUsers",F)}else{const y=new Set(s.map(S=>S.userId)),F=c.filter(S=>!y.has(S.userId));k(F),E.setFieldValue("secondAuditUsers",F)}R(!1)}})]})}const ge=10;function Lt(i){const{styles:a,pageEventsEmit:n,CustomComponents:h,url:x,token:D,role:B,getBtnDisabled:z}=i,{getMessage:b}=bt(),[E,K]=A([]),[Z,Q]=A(0),[$,j]=A(!1),[ee,te]=A({pageNo:1,pageSize:ge}),[t,s]=A(ge),[l,g]=A(1),[k,U]=A(0),R=Ue(""),[_,Y]=A("list"),[L,J]=A("create"),[m,o]=A(null),v=Ue(null),d=async(r,u,f)=>{switch(console.log("[adopter] mergedEventsEmit",r,u,f),r){case"reviewsetting_tips_upload_review_toggle_changed":{await q({uploadAudit:u.checked?1:0})&&se.success("\u66F4\u65B0\u6210\u529F");break}case"reviewsetting_tips_delete_review_toggle_changed":{await q({deleteAudit:u.checked?1:0})&&se.success("\u66F4\u65B0\u6210\u529F");break}default:typeof n=="function"&&n(r,u);break}},{getReviewSettingData:I,getGlobalConfig:N,updateGlobalConfig:q,deleteConfigById:c,getConfigById:y}=He({url:x,token:D,role:B,eventsEmit:d,getMessage:b}),[F,S]=A("light"),[V,O]=A(""),[ne,G]=A(""),[H,P]=A(""),[Qe,Re]=A(!0),[je,Ie]=A(!1),Ne=at(),ye=ue(()=>{var M;const r=Me(Me({theme:ot,mode:"light"},Ne||{}),a||{}),u=((M=r.theme)==null?void 0:M.space)||{},f=u.dashboardHeaderHeight,p=f==="auto"||f===void 0?{...u,dashboardHeaderHeight:"38px"}:u;return{...r,mode:F,theme:{...r.theme,space:p}}},[Ne,a,F]),Ae=oe(()=>{Y("list"),o(null),v.current=null,d==null||d("reviewsetting_nav_back_list",{},null)},[d]),ze=oe(()=>{J("create"),o(null),Y("form"),v.current=null,d==null||d("reviewsetting_nav_enter_create",{},null)},[d]),Te=oe(async r=>{J("edit"),o(r),Y("form"),v.current=null,d==null||d("reviewsetting_nav_enter_edit",{id:r},null)},[d,y]),Pe=oe(()=>{S(r=>r==="light"?"dark":"light")},[]);function Ve(r,u,f){return r.map((p,M)=>({id:p.id,__absIndex:(u-1)*f+M,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:b("table.actionEdit"),type:"action",disabled:z&&z("edit")},{columnId:"actions",value:"delete",label:b("table.actionDelete"),type:"action",disabled:z&&z("delete")}]}))}const ve=oe(async r=>{const u=Number((r==null?void 0:r.pageNo)||1),f=Number((r==null?void 0:r.pageSize)||ge),p=[String((r==null?void 0:r.targetNameFuzzy)||""),String((r==null?void 0:r.firstAuditUserRealnameFuzzy)||""),String((r==null?void 0:r.secondAuditUserRealnameFuzzy)||""),String(f)].join("::"),M=await I(r),W=M.records||[],re=Ve(W,u,f),ce=R.current===p;R.current=p,K(ce?et=>{const xe=new Map;return et.forEach(de=>xe.set(de.id,de)),re.forEach(de=>xe.set(de.id,de)),Array.from(xe.values())}:re),Q(Number((M==null?void 0:M.total)||0)),te({pageNo:u,pageSize:f})},[]);X(()=>{let r=!0;return(async()=>{j(!0);try{await ve({pageNo:1,pageSize:ge})}catch(f){console.error("[BackendPaginationDemo] init request error:",f)}finally{r&&j(!1)}})(),()=>{r=!1}},[ve]),X(()=>{Xe()},[]);const Xe=async()=>{const r=await N();r&&(Re(r.uploadAudit!=0),Ie(r.deleteAudit!=0))},pe=async({pageNo:r,pageSize:u})=>{let f={pageNo:Number(r||1),pageSize:Number(u||ge),...V?{targetNameFuzzy:V}:{},...ne?{firstAuditUserRealnameFuzzy:ne}:{},...H?{secondAuditUserRealnameFuzzy:H}:{}};try{await ve({...f})}catch(p){console.error("[BackendPaginationDemo] pagination request error:",p)}};X(()=>{pe({pageNo:l,pageSize:t})},[l,t,k]);const $e=ue(()=>({label:"",model:null,defaultActiveId:"review-setting-table",views:[{id:"review-setting-table",label:"",type:"table",viewBehavior:"pagination",total:Z,requestPagesize:t,viewPageSize:t,toolbar:[{type:"button",key:"create_review",label:b("toolbar.createConfig"),btnType:"primary",disabled:z&&z("add")},{type:"customized",key:"search_enterprise",position:"right",component:De,componentProps:{placeholder:b("toolbar.searchEnterprisePlaceholder"),value:V}},{type:"customized",key:"search_first_reviewers",position:"right",component:De,componentProps:{placeholder:b("toolbar.searchFirstReviewersPlaceholder"),value:ne}},{type:"customized",key:"search_second_reviewers",position:"right",component:De,componentProps:{placeholder:b("toolbar.searchSecondReviewersPlaceholder"),value:H}}],columns:[{title:b("table.enterpriseName"),id:"enterpriseName",type:"customized",component:r=>{const{value:u}=r,f=(u||[]).map(p=>p==null?void 0:p.targetName).join("\u3001");return e(Ke,{title:f,children:f})}},{title:b("table.knowledgeType"),id:"knowledgeType",type:"customized",component:r=>{const{value:u}=r;let f=u==1?"\u77E5\u8BC6\u5E93":"\u6570\u636E\u5E93";return e(nt,{color:u==1?"#C5D8FF":"#BEB8FF",style:{color:"#1D2129"},children:f})}},{title:b("table.reviewScope"),id:"reviewScope",type:"customized",component:r=>{const{value:u}=r;let f="-";return u==1&&(f="\u4E0A\u4F20"),u==2&&(f="\u5220\u9664"),u==3&&(f="\u4E0A\u4F20\u3001\u5220\u9664"),f}},{title:b("table.firstReviewers"),id:"firstReviewers",type:"text"},{title:b("table.secondReviewers"),id:"secondReviewers",type:"text"},{title:b("table.createdAt"),id:"createdAt",type:"text"},{title:b("table.creator"),id:"creator",type:"text"},{title:b("table.enabled"),id:"enabled",type:"customized",component:r=>{const{value:u}=r;let f=u==1?"\u5F00\u542F":"\u5173\u95ED";return e("div",{style:{color:u==1?"#52C41A":"#86909C"},children:f})}},{title:b("table.actions"),id:"actions",type:"action",align:"left"}]}],dataSource:E,eventsEmit:(r,u,f)=>{if(r==="toolbar_create_review"){ze(),d==null||d(`reviewsetting_${r}`,u,f);return}if(r==="toolbar_theme_toggle"&&Pe(),r==="toolbar_search_enterprise_change"&&O(String((u==null?void 0:u.value)??"")),r==="toolbar_search_enterprise_submit"&&pe({pageNo:1,pageSize:t}),r==="toolbar_search_first_reviewers_change"&&G(String((u==null?void 0:u.value)??"")),r==="toolbar_search_first_reviewers_submit"&&pe({pageNo:1,pageSize:t}),r==="toolbar_search_second_reviewers_change"&&P(String((u==null?void 0:u.value)??"")),r==="toolbar_search_second_reviewerschange"&&pe({pageNo:1,pageSize:t}),r==="pagination:request_merge_data"){const p=(u==null?void 0:u.request)||{},M=Number(p.pageSize??t)||t,W=Math.max(1,Number(p.pageNo??l)||l);s(M),g(W),U(re=>re+1)}if(r==="table_action_delete"){const p=String((u==null?void 0:u.id)??"");We.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 M;p&&await c(p)&&(K(re=>re.filter(ce=>String(ce==null?void 0:ce.id)!==p)),U(re=>re+1),(M=f==null?void 0:f.removeItem)==null||M.call(f,p))},onCancel:()=>{p&&(d==null||d("reviewsetting_delete_cancelled",{id:p},f))}}),d==null||d(`reviewsetting_${r}`,u,f);return}if(r==="table_action_edit"){const p=String((u==null?void 0:u.id)??"");p&&Te(p),d==null||d(`reviewsetting_${r}`,u,f);return}d==null||d(`reviewsetting_${r}`,u,f)},styles:ye,CustomComponents:h}),[h,d,E,b,ze,Te,Pe,ye,V,ne,H,t,l,Z]);return e(lt,{title:b(_==="list"?"dashboard.title":L==="create"?"pages.createTitle":"pages.editTitle"),description:_==="list"?b("dashboard.description"):"",goBack:_==="list"?void 0:Ae,styles:ye,CustomComponents:h,children:_==="list"?w(qt,{className:"reviewsetting-wrapper",children:[e("div",{className:"reviewsetting-tips-container px-[18px]",children:w(Gt,{className:"reviewsetting-tips",children:[w(Wt,{className:"reviewsetting-tips-left",children:[e(Kt,{className:"reviewsetting-tips-title",children:b("tips.title")}),w(Yt,{className:"reviewsetting-tips-desc",children:[e(gt,{style:{color:"#86909C",marginTop:-2},size:16}),e("span",{className:"reviewsetting-tips-desc-text",children:b("tips.description")})]})]}),w(Jt,{className:"reviewsetting-tips-right",children:[w(Ge,{className:"reviewsetting-switch-item",children:[e("span",{className:"reviewsetting-switch-label",children:b("tips.uploadReviewToggle")}),w("label",{className:"reviewsetting-switch",children:[e("input",{type:"checkbox",checked:Qe,disabled:z&&z("all_upload"),onChange:r=>{const u=r.target.checked;Re(u),d==null||d("reviewsetting_tips_upload_review_toggle_changed",{checked:u},null)}}),e("span",{className:"reviewsetting-switch-slider"})]})]}),w(Ge,{className:"reviewsetting-switch-item",children:[e("span",{className:"reviewsetting-switch-label",children:b("tips.deleteReviewToggle")}),w("label",{className:"reviewsetting-switch",children:[e("input",{type:"checkbox",checked:je,disabled:z&&z("all_delete"),onChange:r=>{const u=r.target.checked;Ie(u),d==null||d("reviewsetting_tips_delete_review_toggle_changed",{checked:u},null)}}),e("span",{className:"reviewsetting-switch-slider"})]})]})]})]})}),e(Ot,{className:"reviewsetting-table-wrap",children:e(it,{...$e},"review-setting-table")})]}):e(Ht,{className:"reviewsetting-form-wrap",children:e(Mt,{mode:L,id:L==="edit"&&m||void 0,url:x,token:D,role:B,eventsEmit:n,onCancel:Ae,onSuccess:()=>{U(r=>r+1),Ae()}})})})}function li({locale:i="zh",messages:a,...n}){return e(yt,{locale:i,messages:a,children:e(Lt,{...n})})}const qt=C.div.attrs({className:"reviewsetting-wrapper"})`
|
|
100
|
+
width: 100%;
|
|
101
|
+
flex: 1 1 0;
|
|
102
|
+
min-height: 0;
|
|
103
|
+
display: flex;
|
|
104
|
+
flex-direction: column;
|
|
105
|
+
gap: 12px;
|
|
106
|
+
|
|
107
|
+
border-radius: ${({theme:i})=>{var a,n;return((a=i.space)==null?void 0:a.dashboardContentRadius)??((n=i.space)==null?void 0:n.radius)??"8px"}};
|
|
108
|
+
background: ${({theme:i})=>{var a,n;return((a=i.colors)==null?void 0:a.dashboardMainBackground)??((n=i.colors)==null?void 0:n.background)??"#fff"}};
|
|
109
|
+
overflow: hidden;
|
|
110
|
+
`,Gt=C.div.attrs({className:"reviewsetting-tips"})`
|
|
111
|
+
width: 100%;
|
|
112
|
+
box-sizing: border-box;
|
|
113
|
+
padding: 10px 12px;
|
|
114
|
+
margin: 12px 0;
|
|
115
|
+
border-radius: 10px;
|
|
116
|
+
border: 1px solid rgba(226, 232, 240, 0.95);
|
|
117
|
+
background: rgba(248, 250, 252, 1);
|
|
118
|
+
color: rgba(15, 23, 42, 0.78);
|
|
119
|
+
display: flex;
|
|
120
|
+
align-items: center;
|
|
121
|
+
justify-content: space-between;
|
|
122
|
+
gap: 16px;
|
|
123
|
+
flex-wrap: wrap;
|
|
124
|
+
`,Wt=C.div.attrs({className:"reviewsetting-tips-left"})`
|
|
125
|
+
flex: 1 1 420px;
|
|
126
|
+
min-width: 320px;
|
|
127
|
+
display: flex;
|
|
128
|
+
align-items: center;
|
|
129
|
+
gap: 12px;
|
|
130
|
+
min-height: 32px;
|
|
131
|
+
`,Kt=C.div.attrs({className:"reviewsetting-tips-title"})`
|
|
132
|
+
flex: 0 0 auto;
|
|
133
|
+
font-size: 14px;
|
|
134
|
+
font-weight: 600;
|
|
135
|
+
color: rgba(15, 23, 42, 0.92);
|
|
136
|
+
white-space: nowrap;
|
|
137
|
+
`,Yt=C.div.attrs({className:"reviewsetting-tips-desc"})`
|
|
138
|
+
flex: 1 1 auto;
|
|
139
|
+
min-width: 0;
|
|
140
|
+
display: flex;
|
|
141
|
+
align-items: center;
|
|
142
|
+
gap: 8px;
|
|
143
|
+
font-size: 12px;
|
|
144
|
+
line-height: 18px;
|
|
145
|
+
color: rgba(71, 85, 105, 1);
|
|
146
|
+
|
|
147
|
+
& .reviewsetting-tips-desc-text {
|
|
148
|
+
display: block;
|
|
149
|
+
min-width: 0;
|
|
150
|
+
overflow: hidden;
|
|
151
|
+
text-overflow: ellipsis;
|
|
152
|
+
white-space: nowrap;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
& .reviewsetting-tips-info-icon {
|
|
156
|
+
flex: 0 0 auto;
|
|
157
|
+
width: 16px;
|
|
158
|
+
height: 16px;
|
|
159
|
+
border-radius: 50%;
|
|
160
|
+
display: inline-flex;
|
|
161
|
+
align-items: center;
|
|
162
|
+
justify-content: center;
|
|
163
|
+
font-size: 12px;
|
|
164
|
+
font-weight: 700;
|
|
165
|
+
color: rgba(71, 85, 105, 1);
|
|
166
|
+
background: rgba(226, 232, 240, 1);
|
|
167
|
+
}
|
|
168
|
+
`,Jt=C.div.attrs({className:"reviewsetting-tips-right"})`
|
|
169
|
+
flex: 0 0 auto;
|
|
170
|
+
display: flex;
|
|
171
|
+
align-items: center;
|
|
172
|
+
gap: 18px;
|
|
173
|
+
white-space: nowrap;
|
|
174
|
+
`,Ge=C.div.attrs({className:"reviewsetting-switch-item"})`
|
|
175
|
+
display: inline-flex;
|
|
176
|
+
align-items: center;
|
|
177
|
+
gap: 10px;
|
|
178
|
+
|
|
179
|
+
& .reviewsetting-switch-label {
|
|
180
|
+
font-size: 12px;
|
|
181
|
+
color: rgba(51, 65, 85, 1);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/* 轻量自定义 switch,视觉更贴近截图 */
|
|
185
|
+
& .reviewsetting-switch {
|
|
186
|
+
position: relative;
|
|
187
|
+
width: 44px;
|
|
188
|
+
height: 22px;
|
|
189
|
+
display: inline-flex;
|
|
190
|
+
align-items: center;
|
|
191
|
+
}
|
|
192
|
+
& .reviewsetting-switch input {
|
|
193
|
+
opacity: 0;
|
|
194
|
+
width: 0;
|
|
195
|
+
height: 0;
|
|
196
|
+
}
|
|
197
|
+
& .reviewsetting-switch-slider {
|
|
198
|
+
position: absolute;
|
|
199
|
+
inset: 0;
|
|
200
|
+
border-radius: 999px;
|
|
201
|
+
background: rgba(203, 213, 225, 1);
|
|
202
|
+
transition: background 0.18s ease;
|
|
203
|
+
box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.35);
|
|
204
|
+
}
|
|
205
|
+
& .reviewsetting-switch-slider::before {
|
|
206
|
+
content: '';
|
|
207
|
+
position: absolute;
|
|
208
|
+
width: 18px;
|
|
209
|
+
height: 18px;
|
|
210
|
+
left: 2px;
|
|
211
|
+
top: 2px;
|
|
212
|
+
border-radius: 999px;
|
|
213
|
+
background: #fff;
|
|
214
|
+
transition: transform 0.18s ease;
|
|
215
|
+
box-shadow: 0 1px 2px rgba(15, 23, 42, 0.18);
|
|
216
|
+
}
|
|
217
|
+
& .reviewsetting-switch input:checked + .reviewsetting-switch-slider {
|
|
218
|
+
background: rgba(29, 112, 245, 1);
|
|
219
|
+
box-shadow: inset 0 0 0 1px rgba(29, 112, 245, 0.35);
|
|
220
|
+
}
|
|
221
|
+
& .reviewsetting-switch input:checked + .reviewsetting-switch-slider::before {
|
|
222
|
+
transform: translateX(22px);
|
|
223
|
+
}
|
|
224
|
+
`,Ot=C.div.attrs({className:"reviewsetting-table-wrap"})`
|
|
225
|
+
width: 100%;
|
|
226
|
+
flex: 1 1 0;
|
|
227
|
+
min-height: 0;
|
|
228
|
+
display: flex;
|
|
229
|
+
flex-direction: column;
|
|
230
|
+
overflow: hidden;
|
|
231
|
+
|
|
232
|
+
& > .xviewer-container {
|
|
233
|
+
min-height: 0;
|
|
234
|
+
flex: 1 1 0;
|
|
235
|
+
}
|
|
236
|
+
& .xviewer-content-area,
|
|
237
|
+
& .xviewer-table-loading-wrap {
|
|
238
|
+
min-height: 0;
|
|
239
|
+
}
|
|
240
|
+
`,Ht=C.div.attrs({className:"reviewsetting-form-wrap"})`
|
|
241
|
+
width: 100%;
|
|
242
|
+
flex: 1 1 0;
|
|
243
|
+
min-height: 0;
|
|
244
|
+
display: flex;
|
|
245
|
+
flex-direction: column;
|
|
246
|
+
align-items: center;
|
|
247
|
+
box-sizing: border-box;
|
|
248
|
+
background: white;
|
|
249
|
+
overflow: hidden;
|
|
250
|
+
`,Zt=C.div.attrs({className:"reviewmanage-toolbar-search-wrap"})`
|
|
251
|
+
height: 32px;
|
|
252
|
+
min-width: 220px;
|
|
253
|
+
padding: 0 10px 0 12px;
|
|
254
|
+
border-radius: 8px;
|
|
255
|
+
border: 1px solid #d0d5dd;
|
|
256
|
+
background: #fff;
|
|
257
|
+
display: inline-flex;
|
|
258
|
+
align-items: center;
|
|
259
|
+
gap: 8px;
|
|
260
|
+
|
|
261
|
+
.reviewmanage-toolbar-search-input {
|
|
262
|
+
flex: 1;
|
|
263
|
+
min-width: 0;
|
|
264
|
+
border: none;
|
|
265
|
+
outline: none;
|
|
266
|
+
font-size: 12px;
|
|
267
|
+
color: #344054;
|
|
268
|
+
background: transparent;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
.reviewmanage-toolbar-search-btn {
|
|
272
|
+
display: inline-flex;
|
|
273
|
+
align-items: center;
|
|
274
|
+
justify-content: center;
|
|
275
|
+
width: 22px;
|
|
276
|
+
height: 22px;
|
|
277
|
+
border: none;
|
|
278
|
+
background: transparent;
|
|
279
|
+
padding: 0;
|
|
280
|
+
cursor: pointer;
|
|
281
|
+
border-radius: 6px;
|
|
282
|
+
}
|
|
283
|
+
.reviewmanage-toolbar-search-btn:hover {
|
|
284
|
+
background: rgba(16, 24, 40, 0.04);
|
|
285
|
+
}
|
|
286
|
+
.reviewmanage-toolbar-search-btn:active {
|
|
287
|
+
background: rgba(16, 24, 40, 0.06);
|
|
288
|
+
}
|
|
289
|
+
`,De=({placeholder:i,value:a,onAction:n})=>w(Zt,{className:"reviewmanage-toolbar-search-wrap",children:[e("input",{className:"reviewmanage-toolbar-search-input",placeholder:i,value:a??"",onChange:h=>n==null?void 0:n("change",{value:h.target.value}),onKeyDown:h=>{h.key==="Enter"&&(n==null||n("submit"))}}),e("button",{type:"button",className:"reviewmanage-toolbar-search-btn","aria-label":"search",onClick:()=>n==null?void 0:n("submit"),children:e(pt,{size:14,color:"#98A2B3"})})]});export{li as R,yt as a,bt as u};
|