cnhis-design-vue 3.1.56-release.2 → 3.1.57-beta.0

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.
Files changed (45) hide show
  1. package/es/components/audio-sdk/src/audioSDK.js +1 -1
  2. package/es/components/button-print/src/utils/print.d.ts +3 -0
  3. package/es/components/button-print/src/utils/print.js +1 -1
  4. package/es/components/classification/index.d.ts +19 -16
  5. package/es/components/classification/src/components/search-filter/index.vue2.js +1 -1
  6. package/es/components/classification/src/components/set-classification/index.vue.d.ts +0 -15
  7. package/es/components/classification/src/components/table-modal/index.vue.d.ts +3 -15
  8. package/es/components/classification/src/components/table-modal/index.vue2.js +1 -1
  9. package/es/components/classification/src/index.vue.d.ts +45 -38
  10. package/es/components/classification/src/index.vue2.js +1 -1
  11. package/es/components/classification/style/index.css +1 -1
  12. package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogram.js +1 -1
  13. package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogramChart.js +1 -1
  14. package/es/components/fabric-chart/src/hooks/electrocardiogram/useMeasureInstrument.js +1 -1
  15. package/es/components/form-config/index.d.ts +9 -7
  16. package/es/components/form-config/src/FormConfig.vue.d.ts +9 -7
  17. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +3 -3
  18. package/es/components/form-config/src/components/FormConfigEventSetting.vue.d.ts +1 -0
  19. package/es/components/form-render/src/components/renderer/switch.d.ts +16 -2
  20. package/es/components/form-render/src/components/renderer/switch.js +1 -1
  21. package/es/components/form-render/src/hooks/useComplexOptions.d.ts +1 -1
  22. package/es/components/form-render/src/hooks/useComplexOptions.js +1 -1
  23. package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
  24. package/es/components/form-render/src/hooks/useLowCodeReactions.js +1 -1
  25. package/es/components/form-render/src/types/fieldItem.d.ts +3 -8
  26. package/es/components/iho-table/src/constants/index.d.ts +1 -0
  27. package/es/components/iho-table/src/constants/index.js +1 -1
  28. package/es/components/iho-table/src/plugins/index.js +1 -1
  29. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +48 -10
  30. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue2.js +1 -1
  31. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/radioRendererPlugin.js +1 -1
  32. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/switchRendererPlugin.d.ts +1 -0
  33. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/switchRendererPlugin.js +1 -0
  34. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue2.js +1 -1
  35. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/checkRendererPlugin.js +1 -1
  36. package/es/components/iho-table/src/types/index.d.ts +3 -0
  37. package/es/components/index.css +1 -1
  38. package/es/components/shortcut-setter/index.d.ts +1 -1
  39. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +1 -1
  40. package/es/components/table-filter/src/types/index.d.ts +3 -1
  41. package/es/shared/hooks/selectHooks/useSelectRenders.d.ts +1 -1
  42. package/es/shared/hooks/selectHooks/useSelectRenders.js +1 -1
  43. package/es/shared/package.json.js +1 -1
  44. package/es/shared/types/business.d.ts +6 -0
  45. package/package.json +2 -2
@@ -1 +1 @@
1
- import{ref as e}from"vue";import t from"axios";import r from"recorder-core";import"recorder-core/src/engine/mp3";import"recorder-core/src/engine/mp3-engine";import{uuidGenerator as i}from"../../../shared/utils/index.js";import{RecordingDialog as s}from"./utils/recordingDialog.js";const n=class{constructor(){if(this.recorder=null,this.recordingDialog=new s,this.contentRef=e(""),this.realTimeRecognition=!1,this.allowPunctuationMark=!0,this.timed=0,this.timer=null,this.realTimeSendStartTime=0,this.realTimeSendBytesChunks=[],this.realTimeSendClearPrevBufferIdx=0,n.instance)return n.instance;this.initRecorder(),n.instance=this}static create(e){return(null==e?void 0:e.serverUrl)&&(this.serverUrl=e.serverUrl),new n}initRecorder(){this.recorder=r({type:"mp3",sampleRate:16e3,bitRate:16,...this.realTimeRecognition?{onProcess:this.onProcess.bind(this),takeoffEncodeChunk:this.takeoffEncodeChunk.bind(this)}:{}})}async takeoffEncodeChunk(e){e&&this.realTimeSendBytesChunks.push(e);const t=Date.now();if(t-this.realTimeSendStartTime<n.sendInterval)return;this.realTimeSendStartTime=t;let r=0;for(let e=0;e<this.realTimeSendBytesChunks.length;e++)r+=this.realTimeSendBytesChunks[e].length;const i=new Uint8Array(r);for(let e=0,t=0;e<this.realTimeSendBytesChunks.length;e++){const r=this.realTimeSendBytesChunks[e];i.set(r,t),t+=r.length}if(this.realTimeSendBytesChunks=[],i.length>0){const e=new Blob([i],{type:"audio/mp3"}),{text:t}=await this.toAudioRecognition(e);this.contentRef.value+=t}}async onProcess(e,t,r,i,s){0===this.realTimeSendStartTime&&(this.realTimeSendStartTime=Date.now(),this.realTimeSendBytesChunks=[],this.realTimeSendClearPrevBufferIdx=0);for(let t=this.realTimeSendClearPrevBufferIdx;t<s;t++)e[t]=null;this.realTimeSendClearPrevBufferIdx=s}async recorderOpen(){return this.recorder||this.initRecorder(),new Promise(((e,t)=>{this.recorder.open((()=>{e({})}),((e,r)=>{t({result:"fail",msg:e,isUserNotAllow:r})}))}))}async recorderStart(e,{onStop:t,allowPunctuationMark:r=!0,realTimeRecognition:i=!1,timed:s=0}){this.realTimeRecognition=i,this.allowPunctuationMark=r,this.timed=1e3*s,this.timed&&(this.timer=setTimeout((()=>{t()}),this.timed));try{return await this.recorderOpen(),this.recorder.start(),this.recordingDialog.show(e,{contentRef:this.contentRef,after:()=>t()}),Promise.resolve({result:"success"})}catch(e){return Promise.reject(e)}}recorderStop(){return this.recorder?(this.recordingDialog.hide(),new Promise(((e,t)=>{if(this.realTimeRecognition){const t={file_id:"",text:this.contentRef.value};return e({result:"success",data:t}),void this.destroy()}this.recorder.stop((async(t,r)=>{const i=await this.toAudioRecognition(t);e({result:"success",duration:r,data:i}),this.destroy()}),(e=>{t({result:"fail",msg:e}),this.destroy()}))}))):Promise.reject({result:"fail",msg:"请先打开麦克风录音"})}async toAudioRecognition(e){var t;const r=new File([e],`${i()}.mp3`,{type:e.type}),s=new FormData;s.append("audio",r);const o={file_id:"",text:""};try{const{data:e}=await n.audioRecognition(s);!this.allowPunctuationMark&&"success"===e.msg&&(null==(t=e.data)?void 0:t.text)&&(e.data.text=e.data.text.replace(/[??,。,.\s]/g,""),Object.assign(o,e.data))}catch(e){console.log(e)}return o}reset(){this.realTimeSendStartTime=0,this.contentRef.value="",this.timer&&(clearTimeout(this.timer),this.timer=null),this.timed=0}destroy(){var e;null==(e=this.recorder)||e.close(),this.recorder=null,this.reset()}static async audioRecognition(e){return await t.post(`${this.serverUrl}/audio/recognition`,e,{headers:{"Content-Type":"multipart/form-data"}})}static async audioRevise(e){return await t.post(`${this.serverUrl}/audio/revise`,e)}};let o=n;o.serverUrl="",o.sendInterval=1500;export{o as default};
1
+ import{ref as e}from"vue";import t from"axios";import r from"recorder-core";import"recorder-core/src/engine/mp3";import"recorder-core/src/engine/mp3-engine";import{uuidGenerator as i}from"../../../shared/utils/index.js";import{RecordingDialog as s}from"./utils/recordingDialog.js";const n=class{constructor(){if(this.recorder=null,this.recordingDialog=new s,this.contentRef=e(""),this.realTimeRecognition=!1,this.allowPunctuationMark=!0,this.timed=0,this.timer=null,this.realTimeSendStartTime=0,this.realTimeSendBytesChunks=[],this.realTimeSendClearPrevBufferIdx=0,n.instance)return n.instance;n.instance=this}static create(e){return(null==e?void 0:e.serverUrl)&&(this.serverUrl=e.serverUrl),new n}initRecorder(){this.recorder=r({type:"mp3",sampleRate:16e3,bitRate:16,...this.realTimeRecognition?{onProcess:this.onProcess.bind(this),takeoffEncodeChunk:this.takeoffEncodeChunk.bind(this)}:{}})}async takeoffEncodeChunk(e){e&&this.realTimeSendBytesChunks.push(e);const t=Date.now();if(t-this.realTimeSendStartTime<n.sendInterval)return;this.realTimeSendStartTime=t;let r=0;for(let e=0;e<this.realTimeSendBytesChunks.length;e++)r+=this.realTimeSendBytesChunks[e].length;const i=new Uint8Array(r);for(let e=0,t=0;e<this.realTimeSendBytesChunks.length;e++){const r=this.realTimeSendBytesChunks[e];i.set(r,t),t+=r.length}if(this.realTimeSendBytesChunks=[],i.length>0){const e=new Blob([i],{type:"audio/mp3"}),{text:t}=await this.toAudioRecognition(e);this.contentRef.value+=t}}async onProcess(e,t,r,i,s){0===this.realTimeSendStartTime&&(this.realTimeSendStartTime=Date.now(),this.realTimeSendBytesChunks=[],this.realTimeSendClearPrevBufferIdx=0);for(let t=this.realTimeSendClearPrevBufferIdx;t<s;t++)e[t]=null;this.realTimeSendClearPrevBufferIdx=s}async recorderOpen(){return this.recorder||this.initRecorder(),new Promise(((e,t)=>{this.recorder.open((()=>{e({})}),((e,r)=>{t({result:"fail",msg:e,isUserNotAllow:r})}))}))}async recorderStart(e,{onStop:t,allowPunctuationMark:r=!0,realTimeRecognition:i=!1,timed:s=0}){this.realTimeRecognition=i,this.allowPunctuationMark=r,this.timed=1e3*s,this.timed&&(this.timer=setTimeout((()=>{t()}),this.timed));try{return await this.recorderOpen(),this.recorder.start(),this.recordingDialog.show(e,{contentRef:this.contentRef,after:()=>t()}),Promise.resolve({result:"success"})}catch(e){return Promise.reject(e)}}recorderStop(){return this.recorder?(this.recordingDialog.hide(),new Promise(((e,t)=>{if(this.realTimeRecognition){const t={file_id:"",text:this.contentRef.value};return e({result:"success",data:t}),void this.destroy()}this.recorder.stop((async(t,r)=>{const i=await this.toAudioRecognition(t);e({result:"success",duration:r,data:i}),this.destroy()}),(e=>{t({result:"fail",msg:e}),this.destroy()}))}))):Promise.reject({result:"fail",msg:"请先打开麦克风录音"})}async toAudioRecognition(e){var t;const r=new File([e],`${i()}.mp3`,{type:e.type}),s=new FormData;s.append("audio",r);const o={file_id:"",text:""};try{const{data:e}=await n.audioRecognition(s);!this.allowPunctuationMark&&"success"===e.msg&&(null==(t=e.data)?void 0:t.text)&&(e.data.text=e.data.text.replace(/[??,。,.\s]/g,""),Object.assign(o,e.data))}catch(e){console.log(e)}return o}reset(){this.realTimeSendStartTime=0,this.contentRef.value="",this.timer&&(clearTimeout(this.timer),this.timer=null),this.timed=0}destroy(){var e;null==(e=this.recorder)||e.close(),this.recorder=null,this.reset()}static async audioRecognition(e){return await t.post(`${this.serverUrl}/audio/recognition`,e,{headers:{"Content-Type":"multipart/form-data"}})}static async audioRevise(e){return await t.post(`${this.serverUrl}/audio/revise`,e)}};let o=n;o.serverUrl="",o.sendInterval=1500;export{o as default};
@@ -10,9 +10,12 @@ export declare class Print {
10
10
  private printOrigin;
11
11
  private isRemote;
12
12
  private CMonitor;
13
+ private queryServicesParams;
13
14
  constructor();
14
15
  private readonly messageHandlerQueue;
15
16
  private messageHandler;
17
+ getPicAndUpload(obj: any): Promise<void>;
18
+ _uploadImageServices(uploadParams: AnyObject): Promise<any>;
16
19
  private postMessage;
17
20
  messageCollect(id: string, data: AnyObject): Promise<unknown>;
18
21
  messageCollectAndNotifyFail(id: string, data: AnyObject, messageTimeout: number): Promise<unknown>;
@@ -1 +1 @@
1
- import t from"axios";import{isArray as e}from"lodash-es";import{IdentityVerificationDialog as i,PreviewDialog as s}from"./dialog.js";import{getFileUrl as n,useBrowserPrint as r,isIReport as a}from"./browserPrint.js";import{getCurrentInstance as o}from"vue";import{uuidGenerator as l}from"../../../../shared/utils/index.js";import{format as d}from"date-fns";const h=t.create({timeout:1e3,withCredentials:!1}),c=`${window.location.protocol}//${window.location.host}`,u=`${c}/fdp-api/print/assembly/printIReport`,m=`${c}/bi-api/reprot/print/open/client/getRemote`,p=`${c}/printService/file`;let w=null;class f{constructor(){var t,e,n;if(this.webview=null,this.dialog=new i,this.dialogPreview=new s,this.instance=null,this.downloadPath="",this.printOrigin="http://127.0.0.1:11111",this.isRemote=!1,this.CMonitor=null,this.messageHandlerQueue=[],w)return w;w=this;const r=window;this.CMonitor=r.$CMonitor;try{this.webview=r.top?null==(t=r.top.chrome)?void 0:t.webview:null==(e=r.chrome)?void 0:e.webview}catch(t){console.log(t),this.webview=null==(n=r.chrome)?void 0:n.webview}if(this.webview){this.currentMessageHandler=this.messageHandler.bind(this),this.webview.addEventListener("message",this.currentMessageHandler);try{this.webview.postMessage({exec:"config",data:""})}catch(t){const e="当前浏览器版本不支持获取配置接口";this._handleMonitorNotify(e),console.log("非封装浏览器或者"+e)}}}messageHandler(t){var e;if(console.log("打印事件message",t),!t)return this._handleMonitorNotify("接收到空的浏览器事件,"+t),console.log("当前回执",t,"接收到空的浏览器事件");let i;try{i=JSON.parse(t.data||"{}")}catch(e){console.log("解析e.data失败,"+e),this._handleMonitorNotify("解析e.data失败,"+t)}if(["print","pdf"].includes(null==i?void 0:i.cmd)){console.log("打印命令执行了",i);const e=this.messageHandlerQueue.shift();if(!e)return console.log("当前回执",t,"没有可用的handler");const{resolve:s,reject:n}=e;try{s(i.res||"")}catch(t){n(t)}}else"config"===(null==i?void 0:i.exec)&&(this.downloadPath=(null==(e=i.res)?void 0:e.downloadpath)||"")}async postMessage(t,e=0){if(!this.webview)return Promise.reject();const i=l();return e&&e>0?this.messageCollectAndNotifyFail(i,t,e):this.messageCollect(i,t)}messageCollect(t,e){return new Promise(((i,s)=>{this.messageHandlerQueue.push({resolve:i,reject:s,id:t}),this.webview.postMessage(e)}))}messageCollectAndNotifyFail(t,e,i){return Promise.race([new Promise(((i,s)=>{this.messageHandlerQueue.push({resolve:i,reject:s,id:t}),this.webview.postMessage(e)})),new Promise(((e,s)=>{setTimeout((()=>{const e=this.messageHandlerQueue.findIndex((e=>e.id===t));e>-1&&this.messageHandlerQueue.splice(e,1),s({type:"timeout"})}),i)}))])}destroy(){}show(...t){return this.dialog.show(...t)}showPreview(...t){return this.dialogPreview.show(...t)}_testConnection(){return this.webview?Promise.resolve(!0):new Promise((t=>{h({url:`${this.printOrigin}/test`,method:"get",withCredentials:!1,params:{inputdata:{result:"success"}}}).then((({data:e})=>{"success"===e.result?t(!0):t(!1)})).catch((e=>{t(!1)}))}))}_queryServicesPrint(e){return this.webview?this.postMessage({exec:"print",data:{inputData:e}},null==e?void 0:e.messageTimeout):t({url:this.printOrigin+"/services/print",method:"get",params:{inputData:JSON.stringify(e)}}).then((({data:t})=>t))}_callPrintWithFile(t){const e={cmdid:"7",flag:"1"},i={inputData:JSON.stringify(Object.assign({},e,t))};return this.webview?this.postMessage({exec:"print",data:s(i)}):h({url:this.printOrigin+"/PrintLocal",method:"post",data:i,transformRequest:[s]}).then((({data:t})=>t));function s(t){let e="";for(const i in t)e+=encodeURIComponent(i)+"="+encodeURIComponent(t[i])+"&";return e=e.slice(0,-1),e}}_handleMonitorNotify(t){var e,i;null==(i=null==(e=this.CMonitor)?void 0:e.notify)||i.call(e,{name:"custom_info",message:t,businessName:"打印sdk"})}_handleResult(t,e){if(!t){const t="打印命令返回空数据";return this._handleMonitorNotify(""),null==e||e({type:"printError",message:t,result:!1,errinfo:t}),!1}if("success"!==t.result){const i=t.message||t.Message;this._handleMonitorNotify(i);const s={type:"printError",message:i,result:t.result,errinfo:t.errinfo};return null==e||e(s),!1}return t}_handleResultTest(t,e){return!!t||(console.log("notInstalledApp"),null==e||e({type:"notInstalledApp",message:"请打开打印服务器插件"}),!1)}async _handleEventQueryPrintData(t,e,i,s,n){const r={templateId:t,formatId:e,params:i,cmdid:"7",messageTimeout:s},a=await this._queryServicesPrint(r);return this._handleQueryPrintDataResult(a,e,n)}_handleQueryPrintDataResult(t,e,i){if(!(null==t?void 0:t.file)){try{const e=t.message||t.Message;console.log(e),null==i||i({type:"queryPrintDataFailure",message:e})}catch(t){console.log(t)}return!1}return{file:t.file,printerName:t.defprinter,pageCount:t.pagecount,formatId:e}}async _handleEventDirect({templateId:t,formatId:e,params:i,cmdid:s,print:n,signature:r,printdlgshow:a="0",nobillnode:o="1",btnprint:l="1",messageTimeout:h=0}){const c={templateId:t,formatId:e,params:i,cmdid:s,nobillnode:o,printdlgshow:a,btnprint:l,messageTimeout:h,...r?{signature:r}:{}};if(n){try{n=JSON.parse(n)}catch(t){}c.print=n}else if(this.isRemote){const t=d(new Date,"yyyyMMddHHmmss");c.print={print:"1",type:"1",zip:"0",filename:`F:\\WorkSpace\\crmweb\\web\\${t}\\${t}`}}return await this._queryServicesPrint(c)}async _handleEventEditFormat({templateId:t,formatId:e="",params:i="",token:s,messageTimeout:n=0}){const r={};let a={};try{a=Object.assign({},r,JSON.parse(i))}catch(t){a=r}const o={templateId:t,formatId:e,cmdid:"9",token:s,params:JSON.stringify(a),messageTimeout:n};return await this._queryServicesPrint(o)}async _queryProxyOrigin(){if(this.isRemote)return;const{data:t}=await h({method:"get",url:m})||{},{map:e={}}=t;e.isRemote&&(this.printOrigin=c+"/printService",this.isRemote=!0)}async _queryPrintFile(t,e=""){const{data:i}=await h({method:"post",url:u,responseType:"blob",params:{formatId:t.split("_")[1],params:e}})||{};return i}async _browserPrint(t,e){if(this.isRemote){const{filedir:i}=t,s=JSON.parse(i)[0].replace(/\\/g,"/").split("/"),a=s[s.length-2],o=s[s.length-1],l=await n(`${p}/${a}/${o}`),d=r(null,e,l);if("preview"===e)return d}}async preview({templateId:t,formatId:e,params:i="",signature:s,btnprint:n,messageTimeout:l=0},d,h){if(a(e)){const t=await this._queryPrintFile(e,i);if(!t)return null==h?void 0:h("获取文件失败!");const s=r(t,"preview");return this.instance||(this.instance=o()),this.showPreview(this.instance,s),void(null==d||d({file:t}))}await this._queryProxyOrigin();const c=await this._testConnection();if(!this._handleResultTest(c,h))return!1;try{const r=await this._handleEventDirect({templateId:t,formatId:e,params:i,cmdid:this.isRemote?"7":"8",signature:s,btnprint:n,messageTimeout:l}),a=this._handleResult(r,h);if(!a)return!1;if(this.isRemote){const t=await this._browserPrint(a,"preview");this.instance||(this.instance=o()),this.showPreview(this.instance,t)}null==d||d(a)}catch(t){const e="预览失败",i="timeout"===(null==t?void 0:t.type)?{...t,message:e}:{message:e};null==h||h(i),this._handleMonitorNotify(i)}}async printSync(t,e,i){const s=t.map((t=>{const e={params:"",printdlgshow:"0",nobillnode:"1",btnprint:"1",...t,cmdid:"7",...t.signature?{signature:t.signature}:{}};if(e.print)try{e.print=JSON.parse(e.print)}catch(t){}return{inputData:e}}));try{const t=l(),n=await this.messageCollect(t,{exec:"printA",data:s});if(n&&Array.isArray(n)){n.some((t=>"success"===t.res.result))?null==e||e(n):(null==i||i(n),this._handleMonitorNotify(n))}else{const t="打印命令返回无效数据";this._handleMonitorNotify(n||""),null==i||i({type:"printError",message:t,result:!1,errinfo:t})}}catch(t){const e={error:t,message:"打印失败"};null==i||i(e),this._handleMonitorNotify(e)}}async printDirect({templateId:t,formatId:e,params:i="",print:s,signature:n,printdlgshow:o,nobillnode:l,isDownloadFile:d=!0,messageTimeout:h=0},c,u,m="printDirect"){if(a(e)){const t=await this._queryPrintFile(e,i);return t?(r(t,m),void(null==c||c({file:t}))):null==u?void 0:u("获取文件失败!")}await this._queryProxyOrigin();const p=await this._testConnection();if(!this._handleResultTest(p,u))return!1;try{const r=await this._handleEventDirect({templateId:t,formatId:e,params:i,cmdid:"7",print:s,signature:n,printdlgshow:o,nobillnode:l,messageTimeout:h}),a=this._handleResult(r,u);if(!a)return!1;d&&["downloadPDF"].includes(m)&&await this._browserPrint(a,m),null==c||c(a)}catch(t){const e="printDirect"===m?"打印失败":"下载失败",i="timeout"===(null==t?void 0:t.type)?{...t,message:e}:{message:e};null==u||u(i),this._handleMonitorNotify(i)}}_downloadPDF(t){return this.webview?this.postMessage({exec:"pdf",data:{file:t}}):h.get(this.printOrigin+"/download",{params:{inputData:t}}).then((({data:t})=>t))}downloadPDF(t,i,s){if(this.webview&&this.downloadPath&&(Reflect.has(t,"print")||Reflect.set(t,"print",{print:"1",type:"1"}),!t.print.filename)){const e=d(new Date,"yyyy-MM-dd"),i=l(),s=d(new Date,"yyyyMMddHHmmss")+i;t.print.filename=`${this.downloadPath}/${e}/${s}/${s}`.replace(/\\/g,"/")}this.printDirect(t,(async n=>{if(n||s(null),a(t.formatId))return i(n);const r=this,o=await async function(t){const i=[],s=JSON.parse(t);if(!e(s))return await r._downloadPDF("");if(1===s.length)return await r._downloadPDF(s[0]||"");for(let t=0,e=s.length;t<e;t++)i.push(await r._downloadPDF(s[t]||""));return i}(n.filedir);i(o,n)}),(t=>s(t)),"downloadPDF")}async print({templateId:t,formatId:e,params:i="",messageTimeout:s=0},n,r){const a=await this._testConnection();if(!this._handleResultTest(a,r))return!1;const o=await this.queryPrintData({templateId:t,formatId:e,params:i,messageTimeout:s},void 0,r);if(!o)return!1;const l=this.printFileData({formatId:e,file:o.file,printerName:o.printerName},void 0,r);if(!l)return!1;n&&n(l)}async queryPrintData({templateId:t,formatId:e,params:i="",messageTimeout:s=0},n,r){const a=await this._testConnection();if(!this._handleResultTest(a,r))return!1;const o=await this._handleEventQueryPrintData(t,e,i,s,r);return!!o&&(n&&n(o),o)}async printFileData({formatId:t,file:e,printerName:i="Default"},s,n){const r=await this._testConnection();if(!this._handleResultTest(r,n))return!1;const a=await this._callPrintWithFile({formatId:t,printname:i,file:e}),o=this._handleResult(a,n);return!!o&&(s&&s(o),o)}async editPrintFormat({templateId:t,formatId:e,params:i,token:s,messageTimeout:n=0},r,a){const o=await this._testConnection();if(!this._handleResultTest(o,a))return!1;const l=await this._handleEventEditFormat({templateId:t,formatId:e,params:i,token:s,messageTimeout:n}),d=this._handleResult(l,a);if(!d)return!1;r&&r(d)}async addPrintFormat({templateId:t,params:e,token:i},s,n){const r=await this._testConnection();if(!this._handleResultTest(r,n))return!1;const a=await this._handleEventEditFormat({templateId:t,params:e,token:i}),o=this._handleResult(a,n);if(!o)return!1;s&&s(o)}}export{f as Print};
1
+ import t from"axios";import{isArray as e}from"lodash-es";import{IdentityVerificationDialog as i,PreviewDialog as s}from"./dialog.js";import{getFileUrl as a,useBrowserPrint as r,isIReport as n}from"./browserPrint.js";import{getCurrentInstance as o}from"vue";import{uuidGenerator as l}from"../../../../shared/utils/index.js";import{format as d}from"date-fns";const c=t.create({timeout:1e3,withCredentials:!1}),u=`${window.location.protocol}//${window.location.host}`,m=`${u}/fdp-api/print/assembly/printIReport`,h=`${u}/bi-api/reprot/print/open/client/getRemote`,p=`${u}/bi-api/reprot/print/open/client/uploadTemplate`,f=`${u}/printService/file`;let w=null;class g{constructor(){var t,e,a;if(this.webview=null,this.dialog=new i,this.dialogPreview=new s,this.instance=null,this.downloadPath="",this.printOrigin="http://127.0.0.1:11111",this.isRemote=!1,this.CMonitor=null,this.queryServicesParams=null,this.messageHandlerQueue=[],w)return w;w=this;const r=window;this.CMonitor=r.$CMonitor;try{this.webview=r.top?null==(t=r.top.chrome)?void 0:t.webview:null==(e=r.chrome)?void 0:e.webview}catch(t){console.log(t),this.webview=null==(a=r.chrome)?void 0:a.webview}if(this.webview){this.currentMessageHandler=this.messageHandler.bind(this),this.webview.addEventListener("message",this.currentMessageHandler);try{this.webview.postMessage({exec:"config",data:""})}catch(t){const e="当前浏览器版本不支持获取配置接口";this._handleMonitorNotify(e),console.log("非封装浏览器或者"+e)}}}messageHandler(t){var e;if(console.log("打印事件message",t),!t)return this._handleMonitorNotify("接收到空的浏览器事件,"+t),console.log("当前回执",t,"接收到空的浏览器事件");let i;try{i=JSON.parse(t.data||"{}")}catch(e){console.log("解析e.data失败,"+e),this._handleMonitorNotify("解析e.data失败,"+t)}if(["print","pdf"].includes(null==i?void 0:i.cmd)){console.log("打印命令执行了",i);const e=this.messageHandlerQueue.shift();if(!e)return console.log("当前回执",t,"没有可用的handler");const{resolve:s,reject:a}=e;try{s(i.res||"")}catch(t){a(t)}}else"config"===(null==i?void 0:i.exec)&&(this.downloadPath=(null==(e=i.res)?void 0:e.downloadpath)||"")}async getPicAndUpload(t){try{const e=t=>"[object Object]"===Object.prototype.toString.call(t);if("success"===(null==t?void 0:t.result)&&"Y"==(null==t?void 0:t.uploadTemplateFlag)&&!(null==t?void 0:t.filebase64)&&this.queryServicesParams){const t=e(this.queryServicesParams.params)?this.queryServicesParams.params:JSON.parse(this.queryServicesParams.params);t.uploadTemplateFlag="Y",this.queryServicesParams.params=JSON.stringify(t),this.queryServicesParams.cmdid="7",this.queryServicesParams.print={print:1,type:2,callback:1};const i=await this._queryServicesPrint(this.queryServicesParams);if(i&&i.filebase64&&i.key){const t={templateId:this.queryServicesParams.templateId,formatId:this.queryServicesParams.formatId,fileBase64:i.filebase64,authorizationKey:i.key,params:this.queryServicesParams.params},e=await this._uploadImageServices(t);"success"===(null==e?void 0:e.result)&&console.log("图片上传成功")}}}catch(t){console.log(t)}finally{this.queryServicesParams=null}}async _uploadImageServices(t){const e=new FormData;Object.keys(t).forEach((i=>{e.append(i,t[i])}));const{data:i}=await c({method:"post",headers:{"Content-Type":"application/x-www-form-urlencoded"},url:p,data:e})||{};return i}async postMessage(t,e=0){if(!this.webview)return Promise.reject();const i=l();return e&&e>0?this.messageCollectAndNotifyFail(i,t,e):this.messageCollect(i,t)}messageCollect(t,e){return new Promise(((i,s)=>{this.messageHandlerQueue.push({resolve:i,reject:s,id:t}),this.webview.postMessage(e)}))}messageCollectAndNotifyFail(t,e,i){return Promise.race([new Promise(((i,s)=>{this.messageHandlerQueue.push({resolve:i,reject:s,id:t}),this.webview.postMessage(e)})),new Promise(((e,s)=>{setTimeout((()=>{const e=this.messageHandlerQueue.findIndex((e=>e.id===t));e>-1&&this.messageHandlerQueue.splice(e,1),s({type:"timeout"})}),i)}))])}destroy(){}show(...t){return this.dialog.show(...t)}showPreview(...t){return this.dialogPreview.show(...t)}_testConnection(){return this.webview?Promise.resolve(!0):new Promise((t=>{c({url:`${this.printOrigin}/test`,method:"get",withCredentials:!1,params:{inputdata:{result:"success"}}}).then((({data:e})=>{"success"===e.result?t(!0):t(!1)})).catch((e=>{t(!1)}))}))}_queryServicesPrint(e){return this.webview?this.postMessage({exec:"print",data:{inputData:e}},null==e?void 0:e.messageTimeout):t({url:this.printOrigin+"/services/print",method:"get",params:{inputData:JSON.stringify(e)}}).then((({data:t})=>t))}_callPrintWithFile(t){const e={cmdid:"7",flag:"1"},i={inputData:JSON.stringify(Object.assign({},e,t))};return this.webview?this.postMessage({exec:"print",data:s(i)}):c({url:this.printOrigin+"/PrintLocal",method:"post",data:i,transformRequest:[s]}).then((({data:t})=>t));function s(t){let e="";for(const i in t)e+=encodeURIComponent(i)+"="+encodeURIComponent(t[i])+"&";return e=e.slice(0,-1),e}}_handleMonitorNotify(t){var e,i;null==(i=null==(e=this.CMonitor)?void 0:e.notify)||i.call(e,{name:"custom_info",message:t,businessName:"打印sdk"})}_handleResult(t,e){if(!t){const t="打印命令返回空数据";return this._handleMonitorNotify(""),null==e||e({type:"printError",message:t,result:!1,errinfo:t}),!1}if("success"!==t.result){const i=t.message||t.Message;this._handleMonitorNotify(i);const s={type:"printError",message:i,result:t.result,errinfo:t.errinfo};return null==e||e(s),!1}return t}_handleResultTest(t,e){return!!t||(console.log("notInstalledApp"),null==e||e({type:"notInstalledApp",message:"请打开打印服务器插件"}),!1)}async _handleEventQueryPrintData(t,e,i,s,a){const r={templateId:t,formatId:e,params:i,cmdid:"7",messageTimeout:s},n=await this._queryServicesPrint(r);return this._handleQueryPrintDataResult(n,e,a)}_handleQueryPrintDataResult(t,e,i){if(!(null==t?void 0:t.file)){try{const e=t.message||t.Message;console.log(e),null==i||i({type:"queryPrintDataFailure",message:e})}catch(t){console.log(t)}return!1}return{file:t.file,printerName:t.defprinter,pageCount:t.pagecount,formatId:e}}async _handleEventDirect({templateId:t,formatId:e,params:i,cmdid:s,print:a,signature:r,printdlgshow:n="0",nobillnode:o="1",btnprint:l="1",messageTimeout:c=0}){const u={templateId:t,formatId:e,params:i,cmdid:s,nobillnode:o,printdlgshow:n,btnprint:l,messageTimeout:c,...r?{signature:r}:{}};if(a){try{a=JSON.parse(a)}catch(t){}u.print=a}else if(this.isRemote){const t=d(new Date,"yyyyMMddHHmmss");u.print={print:"1",type:"1",zip:"0",filename:`F:\\WorkSpace\\crmweb\\web\\${t}\\${t}`}}return this.queryServicesParams=u,await this._queryServicesPrint(u)}async _handleEventEditFormat({templateId:t,formatId:e="",params:i="",token:s,messageTimeout:a=0}){const r={};let n={};try{n=Object.assign({},r,JSON.parse(i))}catch(t){n=r}const o={templateId:t,formatId:e,cmdid:"9",token:s,params:JSON.stringify(n),messageTimeout:a};return await this._queryServicesPrint(o)}async _queryProxyOrigin(){if(this.isRemote)return;const{data:t}=await c({method:"get",url:h})||{},{map:e={}}=t;e.isRemote&&(this.printOrigin=u+"/printService",this.isRemote=!0)}async _queryPrintFile(t,e=""){const{data:i}=await c({method:"post",url:m,responseType:"blob",params:{formatId:t.split("_")[1],params:e}})||{};return i}async _browserPrint(t,e){if(this.isRemote){const{filedir:i}=t,s=JSON.parse(i)[0].replace(/\\/g,"/").split("/"),n=s[s.length-2],o=s[s.length-1],l=await a(`${f}/${n}/${o}`),d=r(null,e,l);if("preview"===e)return d}}async preview({templateId:t,formatId:e,params:i="",signature:s,btnprint:a,messageTimeout:l=0},d,c){if(n(e)){const t=await this._queryPrintFile(e,i);if(!t)return null==c?void 0:c("获取文件失败!");const s=r(t,"preview");return this.instance||(this.instance=o()),this.showPreview(this.instance,s),void(null==d||d({file:t}))}await this._queryProxyOrigin();const u=await this._testConnection();if(!this._handleResultTest(u,c))return!1;try{const r=await this._handleEventDirect({templateId:t,formatId:e,params:i,cmdid:this.isRemote?"7":"8",signature:s,btnprint:a,messageTimeout:l}),n=this._handleResult(r,c);if(!n)return!1;if(this.isRemote){const t=await this._browserPrint(n,"preview");this.instance||(this.instance=o()),this.showPreview(this.instance,t)}await this.getPicAndUpload(n),null==d||d(n)}catch(t){const e="预览失败",i="timeout"===(null==t?void 0:t.type)?{...t,message:e}:{message:e};null==c||c(i),this._handleMonitorNotify(i)}}async printSync(t,e,i){const s=t.map((t=>{const e={params:"",printdlgshow:"0",nobillnode:"1",btnprint:"1",...t,cmdid:"7",...t.signature?{signature:t.signature}:{}};if(e.print)try{e.print=JSON.parse(e.print)}catch(t){}return{inputData:e}}));try{const t=l(),a=await this.messageCollect(t,{exec:"printA",data:s});if(a&&Array.isArray(a)){a.some((t=>"success"===t.res.result))?null==e||e(a):(null==i||i(a),this._handleMonitorNotify(a))}else{const t="打印命令返回无效数据";this._handleMonitorNotify(a||""),null==i||i({type:"printError",message:t,result:!1,errinfo:t})}}catch(t){const e={error:t,message:"打印失败"};null==i||i(e),this._handleMonitorNotify(e)}}async printDirect({templateId:t,formatId:e,params:i="",print:s,signature:a,printdlgshow:o,nobillnode:l,isDownloadFile:d=!0,messageTimeout:c=0},u,m,h="printDirect"){if(n(e)){const t=await this._queryPrintFile(e,i);return t?(r(t,h),void(null==u||u({file:t}))):null==m?void 0:m("获取文件失败!")}await this._queryProxyOrigin();const p=await this._testConnection();if(!this._handleResultTest(p,m))return!1;try{const r=await this._handleEventDirect({templateId:t,formatId:e,params:i,cmdid:"7",print:s,signature:a,printdlgshow:o,nobillnode:l,messageTimeout:c}),n=this._handleResult(r,m);if(!n)return!1;d&&["downloadPDF"].includes(h)&&await this._browserPrint(n,h),null==u||u(n)}catch(t){const e="printDirect"===h?"打印失败":"下载失败",i="timeout"===(null==t?void 0:t.type)?{...t,message:e}:{message:e};null==m||m(i),this._handleMonitorNotify(i)}}_downloadPDF(t){return this.webview?this.postMessage({exec:"pdf",data:{file:t}}):c.get(this.printOrigin+"/download",{params:{inputData:t}}).then((({data:t})=>t))}downloadPDF(t,i,s){if(this.webview&&this.downloadPath&&(Reflect.has(t,"print")||Reflect.set(t,"print",{print:"1",type:"1"}),!t.print.filename)){const e=d(new Date,"yyyy-MM-dd"),i=l(),s=d(new Date,"yyyyMMddHHmmss")+i;t.print.filename=`${this.downloadPath}/${e}/${s}/${s}`.replace(/\\/g,"/")}this.printDirect(t,(async a=>{if(a||s(null),n(t.formatId))return i(a);const r=this,o=await async function(t){const i=[],s=JSON.parse(t);if(!e(s))return await r._downloadPDF("");if(1===s.length)return await r._downloadPDF(s[0]||"");for(let t=0,e=s.length;t<e;t++)i.push(await r._downloadPDF(s[t]||""));return i}(a.filedir);i(o,a)}),(t=>s(t)),"downloadPDF")}async print({templateId:t,formatId:e,params:i="",messageTimeout:s=0},a,r){const n=await this._testConnection();if(!this._handleResultTest(n,r))return!1;const o=await this.queryPrintData({templateId:t,formatId:e,params:i,messageTimeout:s},void 0,r);if(!o)return!1;const l=this.printFileData({formatId:e,file:o.file,printerName:o.printerName},void 0,r);if(!l)return!1;a&&a(l)}async queryPrintData({templateId:t,formatId:e,params:i="",messageTimeout:s=0},a,r){const n=await this._testConnection();if(!this._handleResultTest(n,r))return!1;const o=await this._handleEventQueryPrintData(t,e,i,s,r);return!!o&&(a&&a(o),o)}async printFileData({formatId:t,file:e,printerName:i="Default"},s,a){const r=await this._testConnection();if(!this._handleResultTest(r,a))return!1;const n=await this._callPrintWithFile({formatId:t,printname:i,file:e}),o=this._handleResult(n,a);return!!o&&(s&&s(o),o)}async editPrintFormat({templateId:t,formatId:e,params:i,token:s,messageTimeout:a=0},r,n){const o=await this._testConnection();if(!this._handleResultTest(o,n))return!1;const l=await this._handleEventEditFormat({templateId:t,formatId:e,params:i,token:s,messageTimeout:a}),d=this._handleResult(l,n);if(!d)return!1;r&&r(d)}async addPrintFormat({templateId:t,params:e,token:i},s,a){const r=await this._testConnection();if(!this._handleResultTest(r,a))return!1;const n=await this._handleEventEditFormat({templateId:t,params:e,token:i}),o=this._handleResult(n,a);if(!o)return!1;s&&s(o)}}export{g as Print};
@@ -43,6 +43,10 @@ declare const CClassification: SFCWithInstall<import("vue").DefineComponent<{
43
43
  type: ObjectConstructor;
44
44
  default: () => {};
45
45
  };
46
+ condiTionDigital: {
47
+ type: ObjectConstructor;
48
+ default: () => {};
49
+ };
46
50
  filterType: {
47
51
  type: StringConstructor;
48
52
  default: string;
@@ -96,6 +100,10 @@ declare const CClassification: SFCWithInstall<import("vue").DefineComponent<{
96
100
  type: ObjectConstructor;
97
101
  default: () => {};
98
102
  };
103
+ condiTionDigital: {
104
+ type: ObjectConstructor;
105
+ default: () => {};
106
+ };
99
107
  filterType: {
100
108
  type: StringConstructor;
101
109
  default: string;
@@ -110,9 +118,11 @@ declare const CClassification: SFCWithInstall<import("vue").DefineComponent<{
110
118
  classificationWidth: import("vue").Ref<number>;
111
119
  selectShow: import("vue").Ref<boolean>;
112
120
  treeData: import("vue").Ref<{
121
+ [x: string]: any;
113
122
  name: string;
114
- sid?: string | undefined;
123
+ sid: string;
115
124
  children: {
125
+ [x: string]: any;
116
126
  displayCategory: string;
117
127
  isDefault: boolean;
118
128
  isEdit: boolean;
@@ -136,6 +146,7 @@ declare const CClassification: SFCWithInstall<import("vue").DefineComponent<{
136
146
  selected?: boolean | undefined;
137
147
  }[]>;
138
148
  conditionLists: import("vue").Ref<{
149
+ [x: string]: any;
139
150
  displayCategory: string;
140
151
  isDefault: boolean;
141
152
  isEdit: boolean;
@@ -155,6 +166,7 @@ declare const CClassification: SFCWithInstall<import("vue").DefineComponent<{
155
166
  from?: string | undefined;
156
167
  }[]>;
157
168
  originConditionList: import("vue").Ref<{
169
+ [x: string]: any;
158
170
  displayCategory: string;
159
171
  isDefault: boolean;
160
172
  isEdit: boolean;
@@ -211,6 +223,7 @@ declare const CClassification: SFCWithInstall<import("vue").DefineComponent<{
211
223
  handleGetTableCondiTionList: (first?: boolean | undefined, conditionMapVal?: {}) => Promise<unknown>;
212
224
  getTableCondiTionListNew: (tableIdVal: any) => Promise<any>;
213
225
  fmtChildName: (name: string, isPublic?: string | undefined) => string;
226
+ mergeDigitalMapToTreeData: (list: any[], digitalObj: import("../../shared/types").AnyObject) => void;
214
227
  NIcon: any;
215
228
  NTooltip: any;
216
229
  SettingsOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
@@ -317,12 +330,6 @@ declare const CClassification: SFCWithInstall<import("vue").DefineComponent<{
317
330
  default: () => HTMLElement;
318
331
  };
319
332
  }, {
320
- instance: import("axios").AxiosInstance;
321
- attrs: {
322
- [x: string]: unknown;
323
- };
324
- $message: import("naive-ui").MessageApi;
325
- $dialog: import("naive-ui").DialogApi;
326
333
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
327
334
  visibleIn: {
328
335
  type: BooleanConstructor;
@@ -367,7 +374,6 @@ declare const CClassification: SFCWithInstall<import("vue").DefineComponent<{
367
374
  onFinishSubmit?: ((...args: any[]) => any) | undefined;
368
375
  }>>;
369
376
  emits: (event: "close" | "handleOk" | "resetPopconfirm" | "finishSubmit", ...args: any[]) => void;
370
- isAdmin: import("vue").ComputedRef<unknown>;
371
377
  homeList: any;
372
378
  visible: import("vue").Ref<boolean>;
373
379
  isChangeWindow: import("vue").Ref<boolean>;
@@ -375,23 +381,15 @@ declare const CClassification: SFCWithInstall<import("vue").DefineComponent<{
375
381
  modalHeight: import("vue").Ref<string>;
376
382
  isShowResetButton: boolean;
377
383
  handleOk: () => void;
378
- rinkTo: () => void;
379
384
  close: () => void;
380
385
  resetChangeWindow: () => void;
381
386
  clickli: (item: import("..").IClassifyListType) => void;
382
387
  clickChecked: (item: import("..").IClassifyListType) => void;
383
388
  changeSwitch: (item: import("..").IClassifyListType) => void;
384
- changecommonSwitch: (item: import("..").IClassifyListType) => void;
385
389
  formatParams: (type: string) => {
386
390
  id: string;
387
391
  tableId: string;
388
392
  setting: string;
389
- type?: undefined;
390
- } | {
391
- type: string;
392
- tableId: string;
393
- setting: string;
394
- id?: undefined;
395
393
  } | undefined;
396
394
  changeModalWindow: () => void;
397
395
  popconfirm: (e: any) => void;
@@ -2276,6 +2274,10 @@ declare const CClassification: SFCWithInstall<import("vue").DefineComponent<{
2276
2274
  type: ObjectConstructor;
2277
2275
  default: () => {};
2278
2276
  };
2277
+ condiTionDigital: {
2278
+ type: ObjectConstructor;
2279
+ default: () => {};
2280
+ };
2279
2281
  filterType: {
2280
2282
  type: StringConstructor;
2281
2283
  default: string;
@@ -2295,6 +2297,7 @@ declare const CClassification: SFCWithInstall<import("vue").DefineComponent<{
2295
2297
  hideConditionChangeSetting: number;
2296
2298
  hideClearConditionChange: number;
2297
2299
  isShowResetButton: boolean;
2300
+ condiTionDigital: Record<string, any>;
2298
2301
  filterType: string;
2299
2302
  }>>;
2300
2303
  export default CClassification;
@@ -1 +1 @@
1
- import{defineComponent as e,ref as i,inject as t,onBeforeUnmount as l,watch as a,openBlock as n,createBlock as o,unref as s,normalizeClass as d,withCtx as c,createVNode as r,normalizeStyle as u,createElementVNode as f,createTextVNode as h,mergeProps as v,createCommentVNode as m}from"vue";import{NModal as p,NCard as x,NButton as b}from"naive-ui";import{InjectionClassifyfilterType as g}from"../../../../table-filter/src/constants/index.js";import y from"../../../../table-filter/src/components/classify-filter/index.vue.js";import L from"../../../../table-filter/src/components/bi-filter/index.vue.js";const k={class:"svg-wrap"},z={class:"flex_right"};var A=e({__name:"index",props:{visible:{type:Boolean,default:!1},modalTitle:{type:String,default:"设置分类"},conditionList:{type:Array,default:()=>[]},searchFieldList:{type:Array,default:()=>[]}},emits:["cancelSaveAdd"],setup(e,{expose:A,emit:_}){const w=e,C=i(w.visible),F=i(!1),S=i("860px");let H=i({maxHeight:"496px",height:"496px"}),T=i(null),$=null;const j=t(g);function R(){B(),$=setTimeout((()=>{T&&T.value.handleInitConditions()}),30)}function B(){$&&clearTimeout($)}function I(){T&&T.value.saveAdd()}function N(){C.value=!1,_("cancelSaveAdd"),S.value="860px",H.value={height:"496px",maxHeight:"496px"},F.value=!1,T&&T.value.cancelSaveAdd()}function P(){F.value=!F.value;let e=document.body.clientHeight;"860px"===S.value?(S.value="100%",H.value.maxHeight=`${e}px`,H.value.height=`${e}px`):(S.value="860px",H.value.maxHeight="496px",H.value.height="")}return l((()=>{B()})),a((()=>w.visible),(e=>{C.value=e,e&&R()})),A({cancelSaveAdd:N}),(e,i)=>(n(),o(s(p),{class:d(["classification-modal-block standard-modal standard-modal-white search-filter-modal",{"modal-screen":F.value}]),show:C.value,"onUpdate:show":i[0]||(i[0]=e=>C.value=e),maskClosable:!1,width:S.value,bodyStyle:s(H),closable:!1,centered:"",onPositiveClick:I,onNegativeClick:N},{default:c((()=>[r(s(x),{style:u({width:S.value,...s(H)}),title:w.modalTitle,bordered:!1,size:"huge",role:"dialog","aria-modal":"true"},{"header-extra":c((()=>[f("div",k,[f("i",{onClick:P,class:d(["iconfont-table-filter",F.value?"icon-table-filter-menzhenyishengzhanxitongtubiaozuixiaohua2":"icon-table-filter-menzhenyishengzhanxitongtubiaozuidahua"])},null,2),f("i",{onClick:N,class:"iconfont-table-filter icon-table-filter-menzhenyishengzhanxitongtubiaoguanbi"})])])),footer:c((()=>[f("div",z,[r(s(b),{onClick:N},{default:c((()=>[h("取消")])),_:1}),r(s(b),{type:"info",onClick:I},{default:c((()=>[h("保存")])),_:1})])])),default:c((()=>["1"===s(j)?(n(),o(y,v({key:0},e.$attrs,{ref_key:"conditionApiRef",ref:T,searchFieldList:w.searchFieldList,conditionList:w.conditionList}),null,16,["searchFieldList","conditionList"])):"2"===s(j)?(n(),o(L,v({key:1},e.$attrs,{ref_key:"conditionApiRef",ref:T,searchFieldList:w.searchFieldList,conditionList:w.conditionList}),null,16,["searchFieldList","conditionList"])):m("v-if",!0)])),_:1},8,["style","title"])])),_:1},8,["class","show","width","bodyStyle"]))}});export{A as default};
1
+ import{defineComponent as e,ref as i,inject as t,onBeforeUnmount as l,watch as a,openBlock as n,createBlock as o,unref as s,normalizeClass as d,withCtx as c,createVNode as r,normalizeStyle as u,createElementVNode as f,createTextVNode as h,createElementBlock as v,Fragment as m,createCommentVNode as p,mergeProps as x}from"vue";import{NModal as b,NCard as g,NButton as y}from"naive-ui";import{InjectionClassifyfilterType as L}from"../../../../table-filter/src/constants/index.js";import k from"../../../../table-filter/src/components/classify-filter/index.vue.js";import z from"../../../../table-filter/src/components/bi-filter/index.vue.js";const A={class:"svg-wrap"},_={class:"flex_right"};var w=e({__name:"index",props:{visible:{type:Boolean,default:!1},modalTitle:{type:String,default:"设置分类"},conditionList:{type:Array,default:()=>[]},searchFieldList:{type:Array,default:()=>[]}},emits:["cancelSaveAdd"],setup(e,{expose:w,emit:C}){const F=e,S=i(F.visible),H=i(!1),T=i("860px");let $=i({maxHeight:"496px",height:"496px"}),j=i(null),R=null;const B=t(L);function I(){N(),R=setTimeout((()=>{j&&j.value.handleInitConditions()}),30)}function N(){R&&clearTimeout(R)}function P(){j&&j.value.saveAdd()}function U(){S.value=!1,C("cancelSaveAdd"),T.value="860px",$.value={height:"496px",maxHeight:"496px"},H.value=!1,j&&j.value.cancelSaveAdd()}function q(){H.value=!H.value;let e=document.body.clientHeight;"860px"===T.value?(T.value="100%",$.value.maxHeight=`${e}px`,$.value.height=`${e}px`):(T.value="860px",$.value.maxHeight="496px",$.value.height="")}return l((()=>{N()})),a((()=>F.visible),(e=>{S.value=e,e&&I()})),w({cancelSaveAdd:U}),(e,i)=>(n(),o(s(b),{class:d(["classification-modal-block standard-modal standard-modal-white search-filter-modal",{"modal-screen":H.value}]),show:S.value,"onUpdate:show":i[0]||(i[0]=e=>S.value=e),maskClosable:!1,width:T.value,bodyStyle:s($),closable:!1,centered:"",onPositiveClick:P,onNegativeClick:U},{default:c((()=>[r(s(g),{style:u({width:T.value,...s($)}),title:F.modalTitle,bordered:!1,size:"huge",role:"dialog","aria-modal":"true"},{"header-extra":c((()=>[f("div",A,[f("i",{onClick:q,class:d(["iconfont-table-filter",H.value?"icon-table-filter-menzhenyishengzhanxitongtubiaozuixiaohua2":"icon-table-filter-menzhenyishengzhanxitongtubiaozuidahua"])},null,2),f("i",{onClick:U,class:"iconfont-table-filter icon-table-filter-menzhenyishengzhanxitongtubiaoguanbi"})])])),footer:c((()=>[f("div",_,[r(s(y),{onClick:U},{default:c((()=>[h("取消")])),_:1}),r(s(y),{type:"info",onClick:P},{default:c((()=>[h("保存")])),_:1})])])),default:c((()=>["1"===s(B)?(n(),v(m,{key:0},[p(" 默认配置弹窗 "),r(k,x(e.$attrs,{ref_key:"conditionApiRef",ref:j,searchFieldList:F.searchFieldList,conditionList:F.conditionList}),null,16,["searchFieldList","conditionList"])],64)):"2"===s(B)?(n(),v(m,{key:1},[p(" bi配置弹窗 "),r(z,x(e.$attrs,{ref_key:"conditionApiRef",ref:j,searchFieldList:F.searchFieldList,conditionList:F.conditionList}),null,16,["searchFieldList","conditionList"])],64)):p("v-if",!0)])),_:1},8,["style","title"])])),_:1},8,["class","show","width","bodyStyle"]))}});export{w as default};
@@ -96,12 +96,6 @@ declare const _default: import("vue").DefineComponent<{
96
96
  default: () => HTMLElement;
97
97
  };
98
98
  }, {
99
- instance: import("axios").AxiosInstance;
100
- attrs: {
101
- [x: string]: unknown;
102
- };
103
- $message: import("naive-ui").MessageApi;
104
- $dialog: import("naive-ui").DialogApi;
105
99
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
106
100
  visibleIn: {
107
101
  type: BooleanConstructor;
@@ -146,7 +140,6 @@ declare const _default: import("vue").DefineComponent<{
146
140
  onFinishSubmit?: ((...args: any[]) => any) | undefined;
147
141
  }>>;
148
142
  emits: (event: "close" | "handleOk" | "resetPopconfirm" | "finishSubmit", ...args: any[]) => void;
149
- isAdmin: import("vue").ComputedRef<unknown>;
150
143
  homeList: any;
151
144
  visible: import("vue").Ref<boolean>;
152
145
  isChangeWindow: import("vue").Ref<boolean>;
@@ -154,23 +147,15 @@ declare const _default: import("vue").DefineComponent<{
154
147
  modalHeight: import("vue").Ref<string>;
155
148
  isShowResetButton: boolean;
156
149
  handleOk: () => void;
157
- rinkTo: () => void;
158
150
  close: () => void;
159
151
  resetChangeWindow: () => void;
160
152
  clickli: (item: IClassifyListType) => void;
161
153
  clickChecked: (item: IClassifyListType) => void;
162
154
  changeSwitch: (item: IClassifyListType) => void;
163
- changecommonSwitch: (item: IClassifyListType) => void;
164
155
  formatParams: (type: string) => {
165
156
  id: string;
166
157
  tableId: string;
167
158
  setting: string;
168
- type?: undefined;
169
- } | {
170
- type: string;
171
- tableId: string;
172
- setting: string;
173
- id?: undefined;
174
159
  } | undefined;
175
160
  changeModalWindow: () => void;
176
161
  popconfirm: (e: any) => void;
@@ -37,12 +37,6 @@ declare const _default: import("vue").DefineComponent<{
37
37
  default: () => HTMLElement;
38
38
  };
39
39
  }, {
40
- instance: import("axios").AxiosInstance;
41
- attrs: {
42
- [x: string]: unknown;
43
- };
44
- $message: import("naive-ui").MessageApi;
45
- $dialog: import("naive-ui").DialogApi;
46
40
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
47
41
  visibleIn: {
48
42
  type: BooleanConstructor;
@@ -87,7 +81,6 @@ declare const _default: import("vue").DefineComponent<{
87
81
  onFinishSubmit?: ((...args: any[]) => any) | undefined;
88
82
  }>>;
89
83
  emits: (event: "close" | "handleOk" | "resetPopconfirm" | "finishSubmit", ...args: any[]) => void;
90
- isAdmin: import("vue").ComputedRef<unknown>;
91
84
  homeList: any;
92
85
  visible: import("vue").Ref<boolean>;
93
86
  isChangeWindow: import("vue").Ref<boolean>;
@@ -95,23 +88,15 @@ declare const _default: import("vue").DefineComponent<{
95
88
  modalHeight: import("vue").Ref<string>;
96
89
  isShowResetButton: boolean;
97
90
  handleOk: () => void;
98
- rinkTo: () => void;
99
91
  close: () => void;
100
92
  resetChangeWindow: () => void;
101
93
  clickli: (item: IClassifyListType) => void;
102
94
  clickChecked: (item: IClassifyListType) => void;
103
95
  changeSwitch: (item: IClassifyListType) => void;
104
- changecommonSwitch: (item: IClassifyListType) => void;
105
96
  formatParams: (type: string) => {
106
97
  id: string;
107
98
  tableId: string;
108
99
  setting: string;
109
- type?: undefined;
110
- } | {
111
- type: string;
112
- tableId: string;
113
- setting: string;
114
- id?: undefined;
115
100
  } | undefined;
116
101
  changeModalWindow: () => void;
117
102
  popconfirm: (e: any) => void;
@@ -190,6 +175,9 @@ declare const _default: import("vue").DefineComponent<{
190
175
  modelValue: unknown[];
191
176
  componentData: Record<string, any>;
192
177
  } & {
178
+ /**
179
+ * 改变弹窗大小
180
+ */
193
181
  itemKey?: string | Function | undefined;
194
182
  }>, {
195
183
  move: Function;
@@ -1 +1 @@
1
- import{defineComponent as e,useAttrs as t,computed as i,ref as l,inject as n,watch as a,openBlock as o,createBlock as s,unref as r,normalizeClass as c,withCtx as u,createVNode as d,normalizeStyle as p,createSlots as m,createElementVNode as v,createElementBlock as h,createCommentVNode as f,withDirectives as g,vShow as y,createTextVNode as C,toDisplayString as w,withModifiers as k,renderSlot as x}from"vue";import{useMessage as b,useDialog as z,NModal as S,NCard as _,NTooltip as M,NIcon as P,NSwitch as D,NPopconfirm as E,NButton as I}from"naive-ui";import{ReorderTwo as U,Brush as N,DocumentOutline as V}from"@vicons/ionicons5";import O from"../../../../../shared/components/VueDraggable/src/vuedraggable.js";import{root_isShowResetButton as F}from"../../const/index.js";import B from"axios";import{cloneDeep as A}from"lodash-es";const H={class:"svg-wrap"},R={class:"flex_between"},$={key:0},j={class:"table-modal-list"},J={class:"list-title"},T=v("span",{class:"list-title-item",style:{width:"6%"}},null,-1),Y=v("span",{class:"list-title-item"}," 名称 ",-1),q=v("span",{class:"list-title-item"}," 父类名称 ",-1),G=v("span",{class:"list-title-item"}," 是否显示 ",-1),K=v("span",{class:"list-title-item"}," 设置为默认 ",-1),L={class:"list-title-item"},Q=v("span",{class:"list-title-item"}," 操作 ",-1),W=["onClick"],X={class:"list-content-item",style:{width:"6%","text-align":"center",overflow:"initial"}},Z=["title"],ee=["title"],te={class:"list-content-item list-content-switch"},ie={class:"list-content-item list-content-radio"},le={class:"list-content-item"},ne={class:"list-content-item"},ae={key:0},oe=v("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},[v("path",{d:"M12 12h2v12h-2z",fill:"currentColor"}),v("path",{d:"M18 12h2v12h-2z",fill:"currentColor"}),v("path",{d:"M4 6v2h2v20a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8h2V6zm4 22V8h16v20z",fill:"currentColor"}),v("path",{d:"M12 2h8v2h-8z",fill:"currentColor"})],-1),se={key:1},re=v("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},[v("path",{d:"M12 12h2v12h-2z",fill:"currentColor"}),v("path",{d:"M18 12h2v12h-2z",fill:"currentColor"}),v("path",{d:"M4 6v2h2v20a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8h2V6zm4 22V8h16v20z",fill:"currentColor"}),v("path",{d:"M12 2h8v2h-8z",fill:"currentColor"})],-1);var ce=e({__name:"index",props:{visibleIn:{type:Boolean},loading:{type:Boolean},confirm:{type:Function},edit:{type:Function,defdault:()=>({})},copy:{type:Function,defdault:()=>({})},delItem:{type:Function,defdault:()=>({})},dataSource:{type:Array,default:()=>[]},type:{type:String,default:"search"},transitionName:{type:String},getContainer:{type:Function,default:()=>document.body}},emits:["handleOk","close","resetPopconfirm","finishSubmit"],setup(e,{emit:ce}){const ue=e,de=B.create({}),pe=t(),me=b(),ve=z(),he=i((()=>(null==pe?void 0:pe.isOrgAdmin)||!1)),fe=l([]),ge=l(ue.visibleIn),ye=l(!1),Ce=l("other"==ue.type?"100%":"860px"),we=l("654px"),ke=n(F);function xe(){ue.type&&(Se(),ce("handleOk",function(e){if("search"==e||"other"==e)return{id:"",tableId:"",setting:JSON.stringify(fe.value.map((e=>({isDefault:e.isDefault,isShow:e.isShow,name:e.name,type:e.type,classifyId:e.sid}))))};if("mananger"==e){let e={};return fe.value.forEach(((t,i)=>{const l=(null==t?void 0:t.id)||"";e[l]={id:l,index:i,default:t.isDefault?1:0,isHide:t.isShow?0:1}})),{type:"HOMEPAGE",tableId:"10001",setting:JSON.stringify({pageConfig:e})}}return}(ue.type)))}function be(){ze()}function ze(){ge.value=!1,Se(),ce("close")}function Se(){Ce.value="860px",we.value="654px",ye.value=!1}function _e(){ye.value=!ye.value;let e=document.body.clientHeight;Ce.value="860px"===Ce.value?"100%":"860px",we.value="654px"===we.value?`${e}px`:"654px"}function Me(e){ce("resetPopconfirm",e)}function Pe(e,t,i){const l=ue[e];l&&l(t,i)}return a((()=>ue.visibleIn),(e=>{ge.value=e})),a((()=>ue.dataSource),(e=>{fe.value=A(e)}),{immediate:!0,deep:!0}),(t,i)=>(o(),s(r(S),{show:ge.value,bodyStyle:{height:we.value,overflowY:"auto"},width:Ce.value,maskClosable:!1,class:c(["classification-modal-block standard-modal standard-modal-white",{"modal-screen":ye.value}]),closable:!1,centered:"",transitionName:e.transitionName,getContainer:e.getContainer,"positive-text":"保存","negative-text":"取消",onPositiveClick:xe,onNegativeClick:ze},{default:u((()=>[d(r(_),{style:p({width:Ce.value,height:we.value,overflowY:"auto"}),title:"设置分类",bordered:!1,size:"huge",role:"dialog","aria-modal":"true"},m({"header-extra":u((()=>[v("div",H,[v("i",{onClick:_e,class:c(["iconfont-table-filter",ye.value?"icon-table-filter-menzhenyishengzhanxitongtubiaozuixiaohua2":"icon-table-filter-menzhenyishengzhanxitongtubiaozuidahua"])},null,2),v("i",{onClick:ze,class:"iconfont-table-filter icon-table-filter-menzhenyishengzhanxitongtubiaoguanbi"})])])),default:u((()=>[r(he)&&"mananger"==e.type?(o(),h("p",$,[v("span",{onClick:be}," 添加首页 ")])):f("v-if",!0),v("div",j,[v("div",J,[T,Y,q,G,K,g(v("span",L," 设置公共首页 ",512),[[y,r(he)&&"mananger"==e.type]]),Q]),d(r(O),{class:"list-content",tag:"ul",list:fe.value,"item-key":"sid",animation:"300"},{item:u((({element:t})=>[g(v("li",{class:c({checked:t.checked}),onClick:e=>{return i=t,void fe.value.forEach((e=>{e.sid==i.sid?e.checked=!0:e.checked=!1}));var i}},[v("span",X,[d(r(M),{mouseEnterDelay:1},{trigger:u((()=>[d(r(P),{component:r(U),size:"24"},null,8,["component"])])),default:u((()=>[C(" 拖拽调整顺序 ")])),_:1})]),v("span",{title:t.displayCategory,class:"list-content-item"},w(t.name),9,Z),v("span",{title:t.name,class:"list-content-item"},w(t.displayCategory),9,ee),v("span",te,[d(r(D),{"onUpdate:value":e=>{return i=t,void fe.value.forEach((e=>{e.sid==i.sid&&(e.isShow=!e.isShow,e.isShow||(i.isDefault=!1))}));var i},size:"small",value:t.isShow},null,8,["onUpdate:value","value"])]),v("span",ie,[d(r(D),{"onUpdate:value":e=>{var i;(i=t).isShow&&fe.value.forEach((e=>{e.sid==i.sid?e.isDefault=!e.isDefault:e.isDefault=!1}))},size:"small",value:t.isDefault},null,8,["onUpdate:value","value"])]),g(v("span",le,[d(r(D),{"onUpdate:value":e=>function(e){function t(e){let t="";for(const i in e)t+=encodeURIComponent(i)+"="+encodeURIComponent(e[i])+"&";return t=t.slice(0,-1),t}ve.warning({title:`是否确定${e.isCommon?"取消":"设置"}公共首页?`,positiveText:"确定",negativeText:"取消",maskClosable:!1,onPositiveClick:()=>{let i={id:e.id,setCommon:!e.isCommon};de({url:"homePage/updateCommon",method:"post",data:i,transformRequest:[t]}).then((t=>{"SUCCESS"===t.data.result?(me.success(t.data.resultMsg),e.isCommon=!e.isCommon,ce("finishSubmit")):me.error(t.data.resultMsg)})).catch((e=>{console.log(e)}))},onNegativeClick:()=>({})})}(t),size:"small",value:t.isCommon},null,8,["onUpdate:value","value"])],512),[[y,r(he)&&"mananger"==e.type]]),v("span",ne,["mananger"==e.type&&r(he)?(o(),h("span",ae,[d(r(E),{onPositiveClick:e=>Pe("confirm",t)},{trigger:u((()=>[d(r(P),null,{default:u((()=>[oe])),_:1})])),default:u((()=>[C(" 是否确认删除? ")])),_:2},1032,["onPositiveClick"])])):f("v-if",!0),f(" 编辑 "),g(v("span",null,[d(r(M),null,{trigger:u((()=>[d(r(P),{component:r(N),onClick:k((e=>Pe("edit",t,"编辑")),["prevent","stop"])},null,8,["component","onClick"])])),default:u((()=>[C(" 编辑 ")])),_:2},1024)],512),[[y,"other"==e.type||"search"==e.type&&t.isEdit||"mananger"==e.type&&r(he)]]),f(" 复制 "),g(v("span",null,[d(r(M),null,{trigger:u((()=>[d(r(P),{component:r(V),onClick:k((e=>Pe("copy",t,"复制")),["prevent","stop"])},null,8,["component","onClick"])])),default:u((()=>[C(" 复制 ")])),_:2},1024)],512),[[y,"search"==e.type||"other"==e.type]]),f(" 删除 "),t.isEdit?(o(),h("span",se,[d(r(E),{onPositiveClick:e=>Pe("delItem",t,"删除")},{trigger:u((()=>[d(r(P),null,{default:u((()=>[re])),_:1})])),default:u((()=>[C(" 是否确认删除? ")])),_:2},1032,["onPositiveClick"])])):f("v-if",!0)])],10,W),[[y,"line"!=t.type]])])),_:1},8,["list"])])])),_:2},["search"==e.type?{name:"footer",fn:u((()=>[v("div",R,[v("div",null,[r(ke)?(o(),s(r(E),{key:0,placement:"top-start","positive-text":"确认","negative-text":"取消",onPositiveClick:Me},{trigger:u((()=>[d(r(I),null,{default:u((()=>[C("恢复默认设置")])),_:1})])),default:u((()=>[C(" 确认要恢复系统默认设置吗? ")])),_:1})):f("v-if",!0)]),v("div",null,[d(r(I),{onClick:ze},{default:u((()=>[C("取消")])),_:1}),x(t.$slots,"add"),d(r(I),{type:"info",onClick:xe},{default:u((()=>[C("保存")])),_:1})])])])),key:"0"}:void 0]),1032,["style"])])),_:3},8,["show","bodyStyle","width","class","transitionName","getContainer"]))}});export{ce as default};
1
+ import{defineComponent as e,ref as t,inject as i,watch as l,openBlock as a,createBlock as n,unref as o,normalizeClass as s,withCtx as c,createVNode as r,normalizeStyle as u,createSlots as d,createElementVNode as p,withDirectives as v,createTextVNode as m,toDisplayString as h,createCommentVNode as f,withModifiers as y,vShow as g,createElementBlock as w,renderSlot as k}from"vue";import{NModal as x,NCard as b,NTooltip as C,NIcon as z,NSwitch as S,NPopconfirm as _,NButton as D}from"naive-ui";import{ReorderTwo as I,Brush as E,DocumentOutline as N}from"@vicons/ionicons5";import P from"../../../../../shared/components/VueDraggable/src/vuedraggable.js";import{root_isShowResetButton as F}from"../../const/index.js";import{cloneDeep as M}from"lodash-es";const U={class:"svg-wrap"},V={class:"flex_between"},B={class:"table-modal-list"},O=p("div",{class:"list-title"},[p("span",{class:"list-title-item",style:{width:"6%"}}),p("span",{class:"list-title-item"}," 名称 "),p("span",{class:"list-title-item"}," 父类名称 "),p("span",{class:"list-title-item"}," 是否显示 "),p("span",{class:"list-title-item"}," 设置为默认 "),p("span",{class:"list-title-item"}," 操作 ")],-1),j=["onClick"],Y={class:"list-content-item",style:{width:"6%","text-align":"center",overflow:"initial"}},$=["title"],A=["title"],H={class:"list-content-item list-content-switch"},J={class:"list-content-item list-content-radio"},q={class:"list-content-item"},G={key:0},K=p("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},[p("path",{d:"M12 12h2v12h-2z",fill:"currentColor"}),p("path",{d:"M18 12h2v12h-2z",fill:"currentColor"}),p("path",{d:"M4 6v2h2v20a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8h2V6zm4 22V8h16v20z",fill:"currentColor"}),p("path",{d:"M12 2h8v2h-8z",fill:"currentColor"})],-1);var L=e({__name:"index",props:{visibleIn:{type:Boolean},loading:{type:Boolean},confirm:{type:Function},edit:{type:Function,defdault:()=>({})},copy:{type:Function,defdault:()=>({})},delItem:{type:Function,defdault:()=>({})},dataSource:{type:Array,default:()=>[]},type:{type:String,default:"search"},transitionName:{type:String},getContainer:{type:Function,default:()=>document.body}},emits:["handleOk","close","resetPopconfirm","finishSubmit"],setup(e,{emit:L}){const Q=e,R=t([]),T=t(Q.visibleIn),W=t(!1),X=t("other"==Q.type?"100%":"860px"),Z=t("654px"),ee=i(F);function te(){var e;Q.type&&(le(),L("handleOk","search"==(e=Q.type)||"other"==e?{id:"",tableId:"",setting:JSON.stringify(R.value.map((e=>({isDefault:e.isDefault,isShow:e.isShow,name:e.name,type:e.type,classifyId:e.sid}))))}:void 0))}function ie(){T.value=!1,le(),L("close")}function le(){X.value="860px",Z.value="654px",W.value=!1}function ae(){W.value=!W.value;let e=document.body.clientHeight;X.value="860px"===X.value?"100%":"860px",Z.value="654px"===Z.value?`${e}px`:"654px"}function ne(e){L("resetPopconfirm",e)}function oe(e,t,i){const l=Q[e];l&&l(t,i)}return l((()=>Q.visibleIn),(e=>{T.value=e})),l((()=>Q.dataSource),(e=>{R.value=M(e)}),{immediate:!0,deep:!0}),(t,i)=>(a(),n(o(x),{show:T.value,bodyStyle:{height:Z.value,overflowY:"auto"},width:X.value,maskClosable:!1,class:s(["classification-modal-block standard-modal standard-modal-white",{"modal-screen":W.value}]),closable:!1,centered:"",transitionName:e.transitionName,getContainer:e.getContainer,"positive-text":"保存","negative-text":"取消",onPositiveClick:te,onNegativeClick:ie},{default:c((()=>[r(o(b),{style:u({width:X.value,height:Z.value,overflowY:"auto"}),title:"设置分类",bordered:!1,size:"huge",role:"dialog","aria-modal":"true"},d({"header-extra":c((()=>[p("div",U,[p("i",{onClick:ae,class:s(["iconfont-table-filter",W.value?"icon-table-filter-menzhenyishengzhanxitongtubiaozuixiaohua2":"icon-table-filter-menzhenyishengzhanxitongtubiaozuidahua"])},null,2),p("i",{onClick:ie,class:"iconfont-table-filter icon-table-filter-menzhenyishengzhanxitongtubiaoguanbi"})])])),default:c((()=>[p("div",B,[O,r(o(P),{class:"list-content",tag:"ul",list:R.value,"item-key":"sid",animation:"300"},{item:c((({element:t})=>[v(p("li",{class:s({checked:t.checked}),onClick:e=>{return i=t,void R.value.forEach((e=>{e.sid==i.sid?e.checked=!0:e.checked=!1}));var i}},[p("span",Y,[r(o(C),{mouseEnterDelay:1},{trigger:c((()=>[r(o(z),{component:o(I),size:"24"},null,8,["component"])])),default:c((()=>[m(" 拖拽调整顺序 ")])),_:1})]),p("span",{title:t.displayCategory,class:"list-content-item"},h(t.name),9,$),p("span",{title:t.name,class:"list-content-item"},h(t.displayCategory),9,A),p("span",H,[r(o(S),{"onUpdate:value":e=>{return i=t,void R.value.forEach((e=>{e.sid==i.sid&&(e.isShow=!e.isShow,e.isShow||(i.isDefault=!1))}));var i},size:"small",value:t.isShow},null,8,["onUpdate:value","value"])]),p("span",J,[r(o(S),{"onUpdate:value":e=>{var i;(i=t).isShow&&R.value.forEach((e=>{e.sid==i.sid?e.isDefault=!e.isDefault:e.isDefault=!1}))},size:"small",value:t.isDefault},null,8,["onUpdate:value","value"])]),p("span",q,[f(" 编辑 "),v(p("span",null,[r(o(C),null,{trigger:c((()=>[r(o(z),{component:o(E),onClick:y((e=>oe("edit",t,"编辑")),["prevent","stop"])},null,8,["component","onClick"])])),default:c((()=>[m(" 编辑 ")])),_:2},1024)],512),[[g,"other"==e.type||"search"==e.type&&t.isEdit]]),f(" 复制 "),v(p("span",null,[r(o(C),null,{trigger:c((()=>[r(o(z),{component:o(N),onClick:y((e=>oe("copy",t,"复制")),["prevent","stop"])},null,8,["component","onClick"])])),default:c((()=>[m(" 复制 ")])),_:2},1024)],512),[[g,"search"==e.type||"other"==e.type]]),f(" 删除 "),t.isEdit?(a(),w("span",G,[r(o(_),{onPositiveClick:e=>oe("delItem",t,"删除")},{trigger:c((()=>[r(o(z),null,{default:c((()=>[K])),_:1})])),default:c((()=>[m(" 是否确认删除? ")])),_:2},1032,["onPositiveClick"])])):f("v-if",!0)])],10,j),[[g,"line"!=t.type]])])),_:1},8,["list"])])])),_:2},["search"==e.type?{name:"footer",fn:c((()=>[p("div",V,[p("div",null,[o(ee)?(a(),n(o(_),{key:0,placement:"top-start","positive-text":"确认","negative-text":"取消",onPositiveClick:ne},{trigger:c((()=>[r(o(D),null,{default:c((()=>[m("恢复默认设置")])),_:1})])),default:c((()=>[m(" 确认要恢复系统默认设置吗? ")])),_:1})):f("v-if",!0)]),p("div",null,[r(o(D),{onClick:ie},{default:c((()=>[m("取消")])),_:1}),k(t.$slots,"add"),r(o(D),{type:"info",onClick:te},{default:c((()=>[m("保存")])),_:1})])])])),key:"0"}:void 0]),1032,["style"])])),_:3},8,["show","bodyStyle","width","class","transitionName","getContainer"]))}});export{L as default};