From 87d89bec68cec7d62b8d8506e7975e3cce48df36 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 24 十二月 2021 18:35:58 +0800 Subject: [PATCH] 2021-12-24 --- src/views/menudesign/index.jsx | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 45 insertions(+), 0 deletions(-) diff --git a/src/views/menudesign/index.jsx b/src/views/menudesign/index.jsx index bd830f0..6fd7783 100644 --- a/src/views/menudesign/index.jsx +++ b/src/views/menudesign/index.jsx @@ -112,6 +112,7 @@ setTimeout(() => { this.updateCustomComponent() this.getAppPictures() + this.getPrintTemp() setGLOBFuncs() }, 1000) } @@ -138,6 +139,50 @@ this.submitConfig() } + getPrintTemp = () => { + if (!sessionStorage.getItem('printTemps')) { + let _sql = `select ID,Images,PrintTempNO+PrintTempName as PN from sPrintTemplate + where appkey= @appkey@ and Deleted=0 and typechartwo='web_print' + union select ID,Images,a.PrintTempNO+PrintTempName as PN + from (select * from sPrintTemplate where appkey= '' and Deleted=0 and typechartwo='web_print') a + left join (select PrintTempNO from sPrintTemplate where appkey= @appkey@ and Deleted=0 ) b + on a.PrintTempNO=b.PrintTempNO + left join (select Srcid from sPrintTemplate_Log where appkey='' and apicode= @appkey@ and Deleted=0 ) c + on a.ID=c.Srcid where b.PrintTempNO is null and c.Srcid is null` + + let param = { + func: 'sPC_Get_SelectedList', + LText: Utils.formatOptions(_sql), + obj_name: 'data', + arr_field: 'PN,ID,Images' + } + + param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + param.secretkey = Utils.encrypt(param.LText, param.timestamp) + + param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) // 浜戠鏁版嵁楠岃瘉 + + Api.getSystemConfig(param).then(res => { + if (res.status) { + let temps = res.data.map(temp => { + return { + value: temp.ID, + text: temp.PN + } + }) + + sessionStorage.setItem('printTemps', JSON.stringify(temps)) + } else { + notification.warning({ + top: 92, + message: res.message, + duration: 5 + }) + } + }) + } + } + getAppPictures = () => { if (sessionStorage.getItem('app_videos') || sessionStorage.getItem('app_pictures')) return -- Gitblit v1.8.0