cnhis-design-vue 3.1.55-release.2 → 3.1.56-beta.8
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/README.md +87 -87
- package/es/components/annotation-edit/index.d.ts +18 -0
- package/es/components/annotation-edit/src/AnnotationEdit.d.ts +18 -0
- package/es/components/annotation-edit/src/AnnotationEdit.js +1 -1
- package/es/components/annotation-edit/src/type.d.ts +4 -0
- package/es/components/audio-sdk/src/audioSDK.d.ts +20 -6
- package/es/components/audio-sdk/src/audioSDK.js +1 -1
- package/es/components/audio-sdk/src/components/recordingDialog.vue.d.ts +14 -0
- package/es/components/audio-sdk/src/components/recordingDialog.vue2.js +1 -1
- package/es/components/audio-sdk/src/utils/recordingDialog.d.ts +5 -2
- package/es/components/audio-sdk/src/utils/recordingDialog.js +1 -1
- package/es/components/audio-sdk/style/index.css +1 -1
- package/es/components/base-search/index.d.ts +14 -0
- package/es/components/base-search/src/index.vue.d.ts +14 -0
- package/es/components/base-search/src/index.vue2.js +1 -1
- package/es/components/base-search/style/index.css +1 -1
- package/es/components/button-print/src/utils/print.d.ts +3 -0
- package/es/components/button-print/src/utils/print.js +1 -1
- package/es/components/callback/src/components/render/popupMaps.d.ts +26 -4
- package/es/components/classification/index.d.ts +39 -23
- package/es/components/classification/src/components/search-filter/index.vue.d.ts +14 -0
- package/es/components/classification/src/components/search-filter/index.vue2.js +1 -1
- package/es/components/classification/src/components/set-classification/index.vue.d.ts +20 -22
- package/es/components/classification/src/components/set-classification/index.vue2.js +1 -1
- package/es/components/classification/src/components/table-modal/index.vue.d.ts +6 -20
- package/es/components/classification/src/components/table-modal/index.vue2.js +1 -1
- package/es/components/classification/src/index.vue.d.ts +62 -45
- package/es/components/classification/src/index.vue2.js +1 -1
- package/es/components/classification/style/index.css +1 -1
- package/es/components/expand-field/src/components/form.vue2.js +1 -1
- package/es/components/fabric-chart/index.d.ts +4 -2
- package/es/components/fabric-chart/src/FabricChart.vue.d.ts +4 -2
- package/es/components/fabric-chart/src/FabricChart.vue2.js +1 -1
- package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.js +1 -1
- package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcessChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogram.js +1 -1
- package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogramChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/electrocardiogram/useMeasureInstrument.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useOther.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useTop.js +1 -1
- package/es/components/form-config/index.d.ts +82 -14
- package/es/components/form-config/src/FormConfig.vue.d.ts +82 -14
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +26 -4
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +41 -7
- package/es/components/form-render/index.d.ts +26 -4
- package/es/components/form-render/src/FormRender.vue.d.ts +27 -4
- package/es/components/form-render/src/FormRender.vue2.js +1 -1
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +26 -4
- package/es/components/form-render/src/components/renderer/formItem.js +1 -1
- package/es/components/form-render/src/constants/index.d.ts +1 -0
- package/es/components/form-render/src/constants/index.js +1 -1
- package/es/components/form-render/src/hooks/useComplexOptions.d.ts +1 -1
- package/es/components/form-render/src/hooks/useComplexOptions.js +1 -1
- package/es/components/form-render/src/hooks/useFieldNormalize.d.ts +10 -2
- package/es/components/form-render/src/hooks/useFormContext.js +1 -1
- package/es/components/form-render/src/types/index.d.ts +3 -1
- package/es/components/iho-table/src/plugins/defaultValuePlugin.js +1 -1
- package/es/components/iho-table/src/plugins/headerPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +1 -1
- package/es/components/index.css +1 -1
- package/es/components/info-header/index.d.ts +77 -13
- package/es/components/info-header/src/InfoHeader.vue.d.ts +77 -13
- package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +5 -1
- package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +5 -1
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +31 -5
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +26 -4
- package/es/components/recommend-search/index.d.ts +8 -8
- package/es/components/recommend-search/src/RecommendSearch.vue.d.ts +8 -8
- package/es/components/recommend-search/src/components/BaseSearch.d.ts +1 -1
- package/es/components/recommend-search/src/components/RecommendInput.vue.d.ts +3 -3
- package/es/components/recommend-search/src/components/RecommendSelect.vue.d.ts +3 -3
- package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
- package/es/components/select-label/src/LabelFormContent.vue2.js +1 -1
- package/es/components/select-person/src/SearchMultiple.vue.d.ts +6 -0
- package/es/components/shortcut-setter/index.d.ts +26 -4
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +26 -4
- package/es/components/table-export-field/src/components/ExportModal.vue.d.ts +0 -3
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +14 -0
- package/es/components/table-filter/src/components/classify-filter/components/SelectDynamic.vue.d.ts +14 -0
- package/es/components/table-filter/src/components/classify-filter/components/index.d.ts +14 -0
- package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +14 -0
- package/es/components/table-filter/src/components/render-widget/components/SelectDynamic.vue.d.ts +15 -0
- package/es/components/table-filter/src/components/render-widget/components/SelectDynamic.vue2.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/SelectDynamicOption/index.vue.d.ts +14 -0
- package/es/components/table-filter/src/components/render-widget/components/SelectDynamicOption/index.vue2.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/index.d.ts +15 -0
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +15 -0
- package/es/components/table-filter/src/types/index.d.ts +3 -1
- package/es/env.d.ts +25 -25
- package/es/shared/assets/img/failure.png.js +1 -1
- package/es/shared/assets/img/no-permission.png.js +1 -1
- package/es/shared/assets/img/nodata.png.js +1 -1
- package/es/shared/assets/img/notfound.png.js +1 -1
- package/es/shared/assets/img/qr.png.js +1 -1
- package/es/shared/assets/img/success.png.js +1 -1
- package/es/shared/assets/img/video.png.js +1 -1
- package/es/shared/assets/img/video_default_cover.png.js +1 -1
- package/es/shared/assets/img/xb_big.png.js +1 -1
- package/es/shared/assets/img/xb_small.png.js +1 -1
- package/es/shared/hooks/selectHooks/useSelectRenders.d.ts +1 -1
- package/es/shared/hooks/selectHooks/useSelectRenders.js +1 -1
- package/es/shared/package.json.js +1 -1
- package/es/shared/utils/business.js +1 -1
- package/package.json +2 -2
- package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
- package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +0 -1
- package/es/components/bpmn-workflow/types/ModelingModule.d.ts +0 -1
- package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +0 -1
- package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +0 -86
- package/es/shared/utils/fabricjs/index.d.ts +0 -6823
- package/es/shared/utils/tapable/index.d.ts +0 -139
|
@@ -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};
|
|
@@ -103,7 +103,13 @@ export declare const CallbackMaps: Map<string, {
|
|
|
103
103
|
default: () => {};
|
|
104
104
|
};
|
|
105
105
|
annotation: {
|
|
106
|
-
type: import("vue").PropType<import("
|
|
106
|
+
type: import("vue").PropType<Record<string, import("../../../../annotation-edit/src/type").AnnotationItem>>;
|
|
107
|
+
};
|
|
108
|
+
annotationShortcuts: {
|
|
109
|
+
type: import("vue").PropType<(string | {
|
|
110
|
+
label: string;
|
|
111
|
+
value: string;
|
|
112
|
+
})[] | undefined>;
|
|
107
113
|
};
|
|
108
114
|
consumer: {
|
|
109
115
|
type: BooleanConstructor;
|
|
@@ -259,7 +265,13 @@ export declare const CallbackMaps: Map<string, {
|
|
|
259
265
|
default: () => {};
|
|
260
266
|
};
|
|
261
267
|
annotation: {
|
|
262
|
-
type: import("vue").PropType<import("
|
|
268
|
+
type: import("vue").PropType<Record<string, import("../../../../annotation-edit/src/type").AnnotationItem>>;
|
|
269
|
+
};
|
|
270
|
+
annotationShortcuts: {
|
|
271
|
+
type: import("vue").PropType<(string | {
|
|
272
|
+
label: string;
|
|
273
|
+
value: string;
|
|
274
|
+
})[] | undefined>;
|
|
263
275
|
};
|
|
264
276
|
consumer: {
|
|
265
277
|
type: BooleanConstructor;
|
|
@@ -453,7 +465,11 @@ export declare const CallbackMaps: Map<string, {
|
|
|
453
465
|
}>;
|
|
454
466
|
components: Record<string, import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | import("vue").FunctionalComponent<{}, {}>>;
|
|
455
467
|
scope: import("../../../..").AnyObject;
|
|
456
|
-
annotation: import("
|
|
468
|
+
annotation: Record<string, import("../../../../annotation-edit/src/type").AnnotationItem>;
|
|
469
|
+
annotationShortcuts: (string | {
|
|
470
|
+
label: string;
|
|
471
|
+
value: string;
|
|
472
|
+
})[] | undefined;
|
|
457
473
|
consumer: boolean;
|
|
458
474
|
uuid: string;
|
|
459
475
|
lifeCycle: Partial<{
|
|
@@ -751,7 +767,13 @@ export declare const CallbackMaps: Map<string, {
|
|
|
751
767
|
default: () => {};
|
|
752
768
|
};
|
|
753
769
|
annotation: {
|
|
754
|
-
type: import("vue").PropType<import("
|
|
770
|
+
type: import("vue").PropType<Record<string, import("../../../../annotation-edit/src/type").AnnotationItem>>;
|
|
771
|
+
};
|
|
772
|
+
annotationShortcuts: {
|
|
773
|
+
type: import("vue").PropType<(string | {
|
|
774
|
+
label: string;
|
|
775
|
+
value: string;
|
|
776
|
+
})[] | undefined>;
|
|
755
777
|
};
|
|
756
778
|
consumer: {
|
|
757
779
|
type: BooleanConstructor;
|
|
@@ -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
|
|
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<{}>>, {}>;
|
|
@@ -258,7 +271,6 @@ declare const CClassification: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
258
271
|
$message: import("naive-ui").MessageApi;
|
|
259
272
|
handleGetConfigApi: (params: any, key: string, config: {} | undefined, filterApiConfigVal: any) => Promise<any>;
|
|
260
273
|
conditionList: import("vue").Ref<unknown[]>;
|
|
261
|
-
checkedItem: import("vue").Ref<any>;
|
|
262
274
|
addVisible: import("vue").Ref<boolean>;
|
|
263
275
|
actionList_prop: import("vue").Ref<{}>;
|
|
264
276
|
newSearchFieldList: any;
|
|
@@ -275,7 +287,6 @@ declare const CClassification: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
275
287
|
copy: (item: import("..").IClassifyListType) => void;
|
|
276
288
|
saveAdd: (params: any) => Promise<void>;
|
|
277
289
|
cancelSaveAdd: () => void;
|
|
278
|
-
changeData: (data: any, checkedItemVal: any) => void;
|
|
279
290
|
delItem: (checkedItemVal: any) => Promise<void>;
|
|
280
291
|
setOneVisible: (flag: boolean) => void;
|
|
281
292
|
resetPopconfirm: () => Promise<void>;
|
|
@@ -309,6 +320,7 @@ declare const CClassification: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
309
320
|
};
|
|
310
321
|
type: {
|
|
311
322
|
type: StringConstructor;
|
|
323
|
+
default: string;
|
|
312
324
|
};
|
|
313
325
|
transitionName: {
|
|
314
326
|
type: StringConstructor;
|
|
@@ -318,12 +330,6 @@ declare const CClassification: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
318
330
|
default: () => HTMLElement;
|
|
319
331
|
};
|
|
320
332
|
}, {
|
|
321
|
-
instance: import("axios").AxiosInstance;
|
|
322
|
-
attrs: {
|
|
323
|
-
[x: string]: unknown;
|
|
324
|
-
};
|
|
325
|
-
$message: import("naive-ui").MessageApi;
|
|
326
|
-
$dialog: import("naive-ui").DialogApi;
|
|
327
333
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
328
334
|
visibleIn: {
|
|
329
335
|
type: BooleanConstructor;
|
|
@@ -352,6 +358,7 @@ declare const CClassification: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
352
358
|
};
|
|
353
359
|
type: {
|
|
354
360
|
type: StringConstructor;
|
|
361
|
+
default: string;
|
|
355
362
|
};
|
|
356
363
|
transitionName: {
|
|
357
364
|
type: StringConstructor;
|
|
@@ -363,12 +370,10 @@ declare const CClassification: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
363
370
|
}>> & {
|
|
364
371
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
365
372
|
onHandleOk?: ((...args: any[]) => any) | undefined;
|
|
366
|
-
onChangeData?: ((...args: any[]) => any) | undefined;
|
|
367
373
|
onResetPopconfirm?: ((...args: any[]) => any) | undefined;
|
|
368
374
|
onFinishSubmit?: ((...args: any[]) => any) | undefined;
|
|
369
375
|
}>>;
|
|
370
|
-
emits: (event: "close" | "handleOk" | "
|
|
371
|
-
isAdmin: import("vue").ComputedRef<unknown>;
|
|
376
|
+
emits: (event: "close" | "handleOk" | "resetPopconfirm" | "finishSubmit", ...args: any[]) => void;
|
|
372
377
|
homeList: any;
|
|
373
378
|
visible: import("vue").Ref<boolean>;
|
|
374
379
|
isChangeWindow: import("vue").Ref<boolean>;
|
|
@@ -376,24 +381,15 @@ declare const CClassification: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
376
381
|
modalHeight: import("vue").Ref<string>;
|
|
377
382
|
isShowResetButton: boolean;
|
|
378
383
|
handleOk: () => void;
|
|
379
|
-
rinkTo: () => void;
|
|
380
384
|
close: () => void;
|
|
381
385
|
resetChangeWindow: () => void;
|
|
382
|
-
dragEnd: () => void;
|
|
383
386
|
clickli: (item: import("..").IClassifyListType) => void;
|
|
384
387
|
clickChecked: (item: import("..").IClassifyListType) => void;
|
|
385
388
|
changeSwitch: (item: import("..").IClassifyListType) => void;
|
|
386
|
-
changecommonSwitch: (item: import("..").IClassifyListType) => void;
|
|
387
389
|
formatParams: (type: string) => {
|
|
388
390
|
id: string;
|
|
389
391
|
tableId: string;
|
|
390
392
|
setting: string;
|
|
391
|
-
type?: undefined;
|
|
392
|
-
} | {
|
|
393
|
-
type: string;
|
|
394
|
-
tableId: string;
|
|
395
|
-
setting: string;
|
|
396
|
-
id?: undefined;
|
|
397
393
|
} | undefined;
|
|
398
394
|
changeModalWindow: () => void;
|
|
399
395
|
popconfirm: (e: any) => void;
|
|
@@ -481,7 +477,7 @@ declare const CClassification: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
481
477
|
modelValue: unknown[];
|
|
482
478
|
componentData: Record<string, any>;
|
|
483
479
|
}>;
|
|
484
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "handleOk" | "
|
|
480
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "handleOk" | "resetPopconfirm" | "finishSubmit")[], "close" | "handleOk" | "resetPopconfirm" | "finishSubmit", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
485
481
|
visibleIn: {
|
|
486
482
|
type: BooleanConstructor;
|
|
487
483
|
};
|
|
@@ -509,6 +505,7 @@ declare const CClassification: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
509
505
|
};
|
|
510
506
|
type: {
|
|
511
507
|
type: StringConstructor;
|
|
508
|
+
default: string;
|
|
512
509
|
};
|
|
513
510
|
transitionName: {
|
|
514
511
|
type: StringConstructor;
|
|
@@ -520,11 +517,11 @@ declare const CClassification: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
520
517
|
}>> & {
|
|
521
518
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
522
519
|
onHandleOk?: ((...args: any[]) => any) | undefined;
|
|
523
|
-
onChangeData?: ((...args: any[]) => any) | undefined;
|
|
524
520
|
onResetPopconfirm?: ((...args: any[]) => any) | undefined;
|
|
525
521
|
onFinishSubmit?: ((...args: any[]) => any) | undefined;
|
|
526
522
|
}, {
|
|
527
523
|
loading: boolean;
|
|
524
|
+
type: string;
|
|
528
525
|
dataSource: unknown[];
|
|
529
526
|
visibleIn: boolean;
|
|
530
527
|
getContainer: Function;
|
|
@@ -1174,6 +1171,10 @@ declare const CClassification: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
1174
1171
|
type: BooleanConstructor;
|
|
1175
1172
|
default: boolean;
|
|
1176
1173
|
};
|
|
1174
|
+
loading: {
|
|
1175
|
+
type: BooleanConstructor;
|
|
1176
|
+
default: boolean;
|
|
1177
|
+
};
|
|
1177
1178
|
}, {
|
|
1178
1179
|
selectMinWidth: number;
|
|
1179
1180
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -1205,6 +1206,10 @@ declare const CClassification: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
1205
1206
|
type: BooleanConstructor;
|
|
1206
1207
|
default: boolean;
|
|
1207
1208
|
};
|
|
1209
|
+
loading: {
|
|
1210
|
+
type: BooleanConstructor;
|
|
1211
|
+
default: boolean;
|
|
1212
|
+
};
|
|
1208
1213
|
}>> & {
|
|
1209
1214
|
onUpdateSelect?: ((...args: any[]) => any) | undefined;
|
|
1210
1215
|
onUpdatePage?: ((...args: any[]) => any) | undefined;
|
|
@@ -1213,6 +1218,7 @@ declare const CClassification: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
1213
1218
|
dragEndWidth: import("vue").Ref<number>;
|
|
1214
1219
|
showKeys: import("vue").ComputedRef<any>;
|
|
1215
1220
|
titleList: import("vue").ComputedRef<string[]>;
|
|
1221
|
+
isOptionsNull: import("vue").ComputedRef<boolean>;
|
|
1216
1222
|
handleSelect: (option: any) => void;
|
|
1217
1223
|
searchByPage: (onePage: number) => void;
|
|
1218
1224
|
changeWidth: ({ distance }: any) => void;
|
|
@@ -1288,10 +1294,15 @@ declare const CClassification: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
1288
1294
|
type: BooleanConstructor;
|
|
1289
1295
|
default: boolean;
|
|
1290
1296
|
};
|
|
1297
|
+
loading: {
|
|
1298
|
+
type: BooleanConstructor;
|
|
1299
|
+
default: boolean;
|
|
1300
|
+
};
|
|
1291
1301
|
}>> & {
|
|
1292
1302
|
onUpdateSelect?: ((...args: any[]) => any) | undefined;
|
|
1293
1303
|
onUpdatePage?: ((...args: any[]) => any) | undefined;
|
|
1294
1304
|
}, {
|
|
1305
|
+
loading: boolean;
|
|
1295
1306
|
dynamicOptionInfo: import("../../shared/types").AnyObject;
|
|
1296
1307
|
fieldTitleList: import("../../shared/types").AnyObject[];
|
|
1297
1308
|
optionList: import("../../shared/types").AnyObject[];
|
|
@@ -2263,6 +2274,10 @@ declare const CClassification: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
2263
2274
|
type: ObjectConstructor;
|
|
2264
2275
|
default: () => {};
|
|
2265
2276
|
};
|
|
2277
|
+
condiTionDigital: {
|
|
2278
|
+
type: ObjectConstructor;
|
|
2279
|
+
default: () => {};
|
|
2280
|
+
};
|
|
2266
2281
|
filterType: {
|
|
2267
2282
|
type: StringConstructor;
|
|
2268
2283
|
default: string;
|
|
@@ -2282,6 +2297,7 @@ declare const CClassification: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
2282
2297
|
hideConditionChangeSetting: number;
|
|
2283
2298
|
hideClearConditionChange: number;
|
|
2284
2299
|
isShowResetButton: boolean;
|
|
2300
|
+
condiTionDigital: Record<string, any>;
|
|
2285
2301
|
filterType: string;
|
|
2286
2302
|
}>>;
|
|
2287
2303
|
export default CClassification;
|
|
@@ -643,6 +643,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
643
643
|
type: BooleanConstructor;
|
|
644
644
|
default: boolean;
|
|
645
645
|
};
|
|
646
|
+
loading: {
|
|
647
|
+
type: BooleanConstructor;
|
|
648
|
+
default: boolean;
|
|
649
|
+
};
|
|
646
650
|
}, {
|
|
647
651
|
selectMinWidth: number;
|
|
648
652
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -674,6 +678,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
674
678
|
type: BooleanConstructor;
|
|
675
679
|
default: boolean;
|
|
676
680
|
};
|
|
681
|
+
loading: {
|
|
682
|
+
type: BooleanConstructor;
|
|
683
|
+
default: boolean;
|
|
684
|
+
};
|
|
677
685
|
}>> & {
|
|
678
686
|
onUpdateSelect?: ((...args: any[]) => any) | undefined;
|
|
679
687
|
onUpdatePage?: ((...args: any[]) => any) | undefined;
|
|
@@ -682,6 +690,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
682
690
|
dragEndWidth: import("vue").Ref<number>;
|
|
683
691
|
showKeys: import("vue").ComputedRef<any>;
|
|
684
692
|
titleList: import("vue").ComputedRef<string[]>;
|
|
693
|
+
isOptionsNull: import("vue").ComputedRef<boolean>;
|
|
685
694
|
handleSelect: (option: any) => void;
|
|
686
695
|
searchByPage: (onePage: number) => void;
|
|
687
696
|
changeWidth: ({ distance }: any) => void;
|
|
@@ -757,10 +766,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
757
766
|
type: BooleanConstructor;
|
|
758
767
|
default: boolean;
|
|
759
768
|
};
|
|
769
|
+
loading: {
|
|
770
|
+
type: BooleanConstructor;
|
|
771
|
+
default: boolean;
|
|
772
|
+
};
|
|
760
773
|
}>> & {
|
|
761
774
|
onUpdateSelect?: ((...args: any[]) => any) | undefined;
|
|
762
775
|
onUpdatePage?: ((...args: any[]) => any) | undefined;
|
|
763
776
|
}, {
|
|
777
|
+
loading: boolean;
|
|
764
778
|
dynamicOptionInfo: import("../../../..").AnyObject;
|
|
765
779
|
fieldTitleList: import("../../../..").AnyObject[];
|
|
766
780
|
optionList: import("../../../..").AnyObject[];
|
|
@@ -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,
|
|
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};
|
|
@@ -37,7 +37,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
37
37
|
$message: import("naive-ui").MessageApi;
|
|
38
38
|
handleGetConfigApi: (params: any, key: string, config: {} | undefined, filterApiConfigVal: any) => Promise<any>;
|
|
39
39
|
conditionList: import("vue").Ref<unknown[]>;
|
|
40
|
-
checkedItem: import("vue").Ref<any>;
|
|
41
40
|
addVisible: import("vue").Ref<boolean>;
|
|
42
41
|
actionList_prop: import("vue").Ref<{}>;
|
|
43
42
|
newSearchFieldList: any;
|
|
@@ -54,7 +53,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
54
53
|
copy: (item: IClassifyListType) => void;
|
|
55
54
|
saveAdd: (params: any) => Promise<void>;
|
|
56
55
|
cancelSaveAdd: () => void;
|
|
57
|
-
changeData: (data: any, checkedItemVal: any) => void;
|
|
58
56
|
delItem: (checkedItemVal: any) => Promise<void>;
|
|
59
57
|
setOneVisible: (flag: boolean) => void;
|
|
60
58
|
resetPopconfirm: () => Promise<void>;
|
|
@@ -88,6 +86,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
88
86
|
};
|
|
89
87
|
type: {
|
|
90
88
|
type: StringConstructor;
|
|
89
|
+
default: string;
|
|
91
90
|
};
|
|
92
91
|
transitionName: {
|
|
93
92
|
type: StringConstructor;
|
|
@@ -97,12 +96,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
97
96
|
default: () => HTMLElement;
|
|
98
97
|
};
|
|
99
98
|
}, {
|
|
100
|
-
instance: import("axios").AxiosInstance;
|
|
101
|
-
attrs: {
|
|
102
|
-
[x: string]: unknown;
|
|
103
|
-
};
|
|
104
|
-
$message: import("naive-ui").MessageApi;
|
|
105
|
-
$dialog: import("naive-ui").DialogApi;
|
|
106
99
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
107
100
|
visibleIn: {
|
|
108
101
|
type: BooleanConstructor;
|
|
@@ -131,6 +124,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
131
124
|
};
|
|
132
125
|
type: {
|
|
133
126
|
type: StringConstructor;
|
|
127
|
+
default: string;
|
|
134
128
|
};
|
|
135
129
|
transitionName: {
|
|
136
130
|
type: StringConstructor;
|
|
@@ -142,12 +136,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
142
136
|
}>> & {
|
|
143
137
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
144
138
|
onHandleOk?: ((...args: any[]) => any) | undefined;
|
|
145
|
-
onChangeData?: ((...args: any[]) => any) | undefined;
|
|
146
139
|
onResetPopconfirm?: ((...args: any[]) => any) | undefined;
|
|
147
140
|
onFinishSubmit?: ((...args: any[]) => any) | undefined;
|
|
148
141
|
}>>;
|
|
149
|
-
emits: (event: "close" | "handleOk" | "
|
|
150
|
-
isAdmin: import("vue").ComputedRef<unknown>;
|
|
142
|
+
emits: (event: "close" | "handleOk" | "resetPopconfirm" | "finishSubmit", ...args: any[]) => void;
|
|
151
143
|
homeList: any;
|
|
152
144
|
visible: import("vue").Ref<boolean>;
|
|
153
145
|
isChangeWindow: import("vue").Ref<boolean>;
|
|
@@ -155,24 +147,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
155
147
|
modalHeight: import("vue").Ref<string>;
|
|
156
148
|
isShowResetButton: boolean;
|
|
157
149
|
handleOk: () => void;
|
|
158
|
-
rinkTo: () => void;
|
|
159
150
|
close: () => void;
|
|
160
151
|
resetChangeWindow: () => void;
|
|
161
|
-
dragEnd: () => void;
|
|
162
152
|
clickli: (item: IClassifyListType) => void;
|
|
163
153
|
clickChecked: (item: IClassifyListType) => void;
|
|
164
154
|
changeSwitch: (item: IClassifyListType) => void;
|
|
165
|
-
changecommonSwitch: (item: IClassifyListType) => void;
|
|
166
155
|
formatParams: (type: string) => {
|
|
167
156
|
id: string;
|
|
168
157
|
tableId: string;
|
|
169
158
|
setting: string;
|
|
170
|
-
type?: undefined;
|
|
171
|
-
} | {
|
|
172
|
-
type: string;
|
|
173
|
-
tableId: string;
|
|
174
|
-
setting: string;
|
|
175
|
-
id?: undefined;
|
|
176
159
|
} | undefined;
|
|
177
160
|
changeModalWindow: () => void;
|
|
178
161
|
popconfirm: (e: any) => void;
|
|
@@ -260,7 +243,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
260
243
|
modelValue: unknown[];
|
|
261
244
|
componentData: Record<string, any>;
|
|
262
245
|
}>;
|
|
263
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "handleOk" | "
|
|
246
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "handleOk" | "resetPopconfirm" | "finishSubmit")[], "close" | "handleOk" | "resetPopconfirm" | "finishSubmit", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
264
247
|
visibleIn: {
|
|
265
248
|
type: BooleanConstructor;
|
|
266
249
|
};
|
|
@@ -288,6 +271,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
288
271
|
};
|
|
289
272
|
type: {
|
|
290
273
|
type: StringConstructor;
|
|
274
|
+
default: string;
|
|
291
275
|
};
|
|
292
276
|
transitionName: {
|
|
293
277
|
type: StringConstructor;
|
|
@@ -299,11 +283,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
299
283
|
}>> & {
|
|
300
284
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
301
285
|
onHandleOk?: ((...args: any[]) => any) | undefined;
|
|
302
|
-
onChangeData?: ((...args: any[]) => any) | undefined;
|
|
303
286
|
onResetPopconfirm?: ((...args: any[]) => any) | undefined;
|
|
304
287
|
onFinishSubmit?: ((...args: any[]) => any) | undefined;
|
|
305
288
|
}, {
|
|
306
289
|
loading: boolean;
|
|
290
|
+
type: string;
|
|
307
291
|
dataSource: unknown[];
|
|
308
292
|
visibleIn: boolean;
|
|
309
293
|
getContainer: Function;
|
|
@@ -953,6 +937,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
953
937
|
type: BooleanConstructor;
|
|
954
938
|
default: boolean;
|
|
955
939
|
};
|
|
940
|
+
loading: {
|
|
941
|
+
type: BooleanConstructor;
|
|
942
|
+
default: boolean;
|
|
943
|
+
};
|
|
956
944
|
}, {
|
|
957
945
|
selectMinWidth: number;
|
|
958
946
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -984,6 +972,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
984
972
|
type: BooleanConstructor;
|
|
985
973
|
default: boolean;
|
|
986
974
|
};
|
|
975
|
+
loading: {
|
|
976
|
+
type: BooleanConstructor;
|
|
977
|
+
default: boolean;
|
|
978
|
+
};
|
|
987
979
|
}>> & {
|
|
988
980
|
onUpdateSelect?: ((...args: any[]) => any) | undefined;
|
|
989
981
|
onUpdatePage?: ((...args: any[]) => any) | undefined;
|
|
@@ -992,6 +984,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
992
984
|
dragEndWidth: import("vue").Ref<number>;
|
|
993
985
|
showKeys: import("vue").ComputedRef<any>;
|
|
994
986
|
titleList: import("vue").ComputedRef<string[]>;
|
|
987
|
+
isOptionsNull: import("vue").ComputedRef<boolean>;
|
|
995
988
|
handleSelect: (option: any) => void;
|
|
996
989
|
searchByPage: (onePage: number) => void;
|
|
997
990
|
changeWidth: ({ distance }: any) => void;
|
|
@@ -1067,10 +1060,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1067
1060
|
type: BooleanConstructor;
|
|
1068
1061
|
default: boolean;
|
|
1069
1062
|
};
|
|
1063
|
+
loading: {
|
|
1064
|
+
type: BooleanConstructor;
|
|
1065
|
+
default: boolean;
|
|
1066
|
+
};
|
|
1070
1067
|
}>> & {
|
|
1071
1068
|
onUpdateSelect?: ((...args: any[]) => any) | undefined;
|
|
1072
1069
|
onUpdatePage?: ((...args: any[]) => any) | undefined;
|
|
1073
1070
|
}, {
|
|
1071
|
+
loading: boolean;
|
|
1074
1072
|
dynamicOptionInfo: import("../../../..").AnyObject;
|
|
1075
1073
|
fieldTitleList: import("../../../..").AnyObject[];
|
|
1076
1074
|
optionList: import("../../../..").AnyObject[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as
|
|
1
|
+
import{defineComponent as e,ref as i,inject as t,useAttrs as a,computed as n,watch as o,openBlock as s,createElementBlock as l,unref as c,createBlock as d,mergeProps as r,withCtx as u,createVNode as f,createTextVNode as v,createCommentVNode as y}from"vue";import{useMessage as m,NButton as p}from"naive-ui";import b from"../table-modal/index.vue.js";import h from"../search-filter/index.vue.js";import C from"../../../../table-filter/src/hooks/useMixins.js";import{InjectionFilterApiConfig as g}from"../../../../table-filter/src/constants/index.js";const L={class:"search"};var I=e({__name:"index",props:{searchFieldList:{type:Array,default:()=>[]},conditionList:{type:Array,default:()=>[]},settingId:String,classifyModal:{type:Boolean,default:!1}},emits:["CondiTionListInit","saveGetTableCondiTionList","setClassifyModal"],setup(e,{emit:I}){const T=e,S=m(),{handleGetConfigApi:j}=C();let A=i(T.conditionList),_=i(!1),k=i({}),O=i([]),x=i(!1);const F=i(null),w=t(g),G=a();async function M(e){try{let i=Object.assign(e,{id:T.settingId,tableId:G.tableId});await j(i,"requestSaveTableCondiTionSetting",{},w)&&(I("CondiTionListInit"),$(!1))}catch(e){console.log(e)}}function q(){$(!1),A.value.forEach((e=>{e.checked=!1}))}function R(){_.value=!0}function E(e){_.value=!0,k.value=Object.assign(e,{from:"edit"})}function H(e){_.value=!0,k.value=Object.assign(e,{from:"copy"})}async function K(e){try{if(Object.assign(e,{tableId:G.tableId,conditionList:JSON.stringify(A.value)}),x.value=!0,!await j(e,"requestSaveTableCondiTion",{},w))return;F.value&&F.value.cancelSaveAdd(),I("saveGetTableCondiTionList"),_.value=!1}catch(e){console.log(e)}finally{x.value=!1}}function D(){_.value=!1,k.value={}}async function N(e){if(e)try{let i={id:e.sid};if(!await j(i,"requestDeleteTableCondiTion",{},w))return;S.success("删除成功"),I("saveGetTableCondiTionList",{type:"delete",item:e})}catch(e){console.log(e)}else S.info("请选择行")}function $(e){I("setClassifyModal",e)}async function B(){try{let e={id:T.settingId,tableId:G.tableId,type:"SEARCH_CATEGORY"};await j(e,"requestResetDefaultSetting",{},w)&&(I("CondiTionListInit"),$(!1))}catch(e){console.log(e)}}let J=n((()=>T.classifyModal));return o((()=>G.searchKey),(()=>{G.selectKeys=[G.searchKey||"all"]})),o((()=>T.searchFieldList),(e=>{e&&e.length>0&&(O.value=e.filter((e=>"operatorColumn"!==e.columnName)))}),{immediate:!0,deep:!0}),o((()=>T.conditionList),(e=>{A.value=e}),{immediate:!0,deep:!0}),o((()=>_),(e=>{e||(k.value={})})),(e,i)=>(s(),l("div",L,[c(J)?(s(),d(b,r({key:0,dataSource:c(A),visibleIn:c(J)},e.$attrs,{onHandleOk:M,onClose:q,onResetPopconfirm:B,edit:E,copy:H,delItem:N,type:"search"}),{add:u((()=>[f(c(p),{type:"info",onClick:R},{default:u((()=>[v("新增")])),_:1})])),_:1},16,["dataSource","visibleIn"])):y("v-if",!0),c(_)?(s(),d(h,r({key:1,ref_key:"searchFilter",ref:F},e.$attrs,{visible:c(_),loading:c(x),conditionList:c(A),actionList_prop:c(k),searchFieldList:c(O),isInSearch:!0,isCnHis:!0,showCompareField:!0,onSaveAdd:K,onCancelSaveAdd:D}),null,16,["visible","loading","conditionList","actionList_prop","searchFieldList"])):y("v-if",!0)]))}});export{I as default};
|