From 5b9f20c1511ed2e454cebb28056b89bb2ebec46d Mon Sep 17 00:00:00 2001 From: songguoqiang <765017469@qq.com> Date: Sun, 7 Apr 2024 17:10:31 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E6=A3=80=E9=AA=8C=E6=A8=A1=E7=89=88?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../inspectionTemplate/addForm.vue | 116 ++++++++++-------- 1 file changed, 62 insertions(+), 54 deletions(-) diff --git a/src/views/qms/basicDataManage/inspectionTemplate/addForm.vue b/src/views/qms/basicDataManage/inspectionTemplate/addForm.vue index 2d701589d..b97f28bdd 100644 --- a/src/views/qms/basicDataManage/inspectionTemplate/addForm.vue +++ b/src/views/qms/basicDataManage/inspectionTemplate/addForm.vue @@ -25,6 +25,45 @@ + + +
+ + +
+
+
+
检验特性
@@ -146,11 +186,11 @@
@@ -160,7 +200,7 @@ style="width: 40px" @click=" opensearchTable( - 'inspectionMethod', + 'samplingProcessCode', null, '采样过程编码', SamplingProcess.allSchemas, @@ -182,45 +222,7 @@
- - -
- - -
-
-
+
@@ -376,7 +378,7 @@ } ], false, - null, + 'features', item ) " @@ -474,6 +476,7 @@ const data = ref({ code: '', description: '', version: '', + dynamicUpdateCode:'', process: [] }) @@ -499,12 +502,12 @@ const rules = ref({ 'inspectionCharacteristicsBaseVO.inspectionMethodCode': [ { required: true, message: '请选择检验方法编码', trigger: 'blur' } ], - 'inspectionCharacteristicsBaseVO.dynamicUpdateCode': [ - { required: true, message: '请选择采样过程编码', trigger: ['blur', 'change'] } - ], - 'inspectionCharacteristicsBaseVO.inspectionMethod': [ + dynamicUpdateCode: [ { required: true, message: '请选择动态修改规则编码', trigger: ['blur', 'change'] } ], + 'inspectionCharacteristicsBaseVO.samplingProcessCode': [ + { required: true, message: '请选择采样过程', trigger: ['blur', 'change'] } + ], 'inspectionCharacteristicsBaseVO.resultEntryMethod': [ { required: true, message: '请选择结果录入方式', trigger: ['blur', 'change'] } ], @@ -617,13 +620,13 @@ const buttonBaseClick1 = (val) => { description: nameForm.value.name, name: newTabName, inspectionCode: '', + dynamicUpdateCode:'', sequenceCode: '', inspectionCharCode: '', inspectionCharacteristicsBaseVO: { describe: '', inspectionMethodCode: '', - dynamicUpdateCode: '', - inspectionMethod: '', + samplingProcessCode: '', isCanUpdate: '', isDestructionInspection: '', resultEntryMethod: '', @@ -821,10 +824,15 @@ const searchTableSuccess = (formField, searchField, val, type, row) => { row.inspectionCharacteristicsBaseVO[formField] = val[0].code if(formField == 'inspectionMethodCode'){ row.inspectionCharacteristicsBaseVO.inspectionMethodName = val[0].description - }else if(formField == 'dynamicUpdateCode'){ - row.inspectionCharacteristicsBaseVO.dynamicUpdateName = val[0].description - }else if(formField == 'inspectionMethod'){ - row.inspectionCharacteristicsBaseVO.inspectionName = val[0].description + }else if(formField == 'samplingProcessCode'){ + row.inspectionCharacteristicsBaseVO.samplingProcessName = val[0].description + }else if(formField == 'quantifyQuantifyCode'){ + row.inspectionCharacteristicsBaseVO.quantifyQuantifyName = val[0].description + } + }else{ + if(formField == 'dynamicUpdateCode'){ + data.value[formField] = val[0].code + data.value.dynamicUpdateName = val[0].description } } From aa6fe7af174c5655cf04e4643213193d2b2fe41f Mon Sep 17 00:00:00 2001 From: chenfang Date: Mon, 8 Apr 2024 13:27:31 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E5=8D=95=E4=BD=8D?= =?UTF-8?q?=E5=8F=AA=E8=AF=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../demandforecastingMain/demandforecastingMain.data.ts | 3 ++- .../supplierdeliver/purchaseMain/purchaseMain.data.ts | 5 +---- .../purchasePlanMain/purchasePlanMain.data.ts | 3 ++- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/demandforecastingMain.data.ts b/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/demandforecastingMain.data.ts index b508ee69f..93c458118 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/demandforecastingMain.data.ts +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/demandforecastingMain.data.ts @@ -430,7 +430,8 @@ export const DemandforecastingDetail = useCrudSchemas(reactive([ width: 150 }, tableForm: { - type: 'Select' + type: 'Select', + disabled: true } }, { diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts b/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts index 8ee02b3a1..719ebdd67 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts @@ -450,13 +450,10 @@ export const PurchaseDetail = useCrudSchemas(reactive([ dictClass: 'string', isSearch: true, isTable: true, + isTableForm:false, table: { width: 150 }, - tableForm: { - disabled:true, - type: 'Select' - } }, { label: '订单数量', diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts b/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts index 30af09ab2..596f7a406 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts @@ -520,7 +520,8 @@ export const PurchasePlanDetail = useCrudSchemas(reactive([ width: 150 }, tableForm: { - type: 'Select' + type: 'Select', + disabled:false, } }, { From 10c64420859032e3aba8faac20d5123a2eaf9231 Mon Sep 17 00:00:00 2001 From: yufei0306 <13417315+yufei0306@user.noreply.gitee.com> Date: Mon, 8 Apr 2024 13:31:21 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=86=85=E5=AD=98?= =?UTF-8?q?=E6=B3=84=E6=BC=8F=E5=AF=BC=E8=87=B4=E9=A1=B5=E9=9D=A2=E5=8D=A1?= =?UTF-8?q?=E9=A1=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Verifition/src/Verify/VerifyPoints.vue | 28 +++++++++++++-- .../Verifition/src/Verify/VerifySlide.vue | 35 ++++++++++++++++--- .../package/penal/base/ElementBaseInfo.vue | 33 +++++++++++++++-- .../src/utils/directive/clickOutSide.js | 8 +++-- src/components/iFrame/src/IFrame.vue | 25 +++++++++++-- src/layout/components/Logo/src/Logo.vue | 13 ++++++- src/layout/components/TabMenu/src/TabMenu.vue | 13 ++++++- src/views/bpm/model/editor/index.vue | 14 +++++++- src/views/login/components/MobileForm.vue | 13 ++++++- 9 files changed, 163 insertions(+), 19 deletions(-) diff --git a/src/components/Verifition/src/Verify/VerifyPoints.vue b/src/components/Verifition/src/Verify/VerifyPoints.vue index 9d04f291e..0c2745048 100644 --- a/src/components/Verifition/src/Verify/VerifyPoints.vue +++ b/src/components/Verifition/src/Verify/VerifyPoints.vue @@ -148,6 +148,8 @@ onMounted(() => { } }) const canvas = ref(null) +const timer1 = ref(0) +const timer2 = ref(0) const canvasClick = (e) => { checkPosArr.push(getMousePos(canvas, e)) if (num.value == checkNum.value) { @@ -157,7 +159,7 @@ const canvasClick = (e) => { checkPosArr.length = 0 checkPosArr.push(...arr) //等创建坐标执行完 - setTimeout(() => { + timer1.value = setTimeout(() => { // var flag = this.comparePos(this.fontPos, this.checkPosArr); //发送后端请求 var captchaVerification = secretKey.value @@ -177,9 +179,13 @@ const canvasClick = (e) => { text.value = t('captcha.success') bindingClick.value = false if (mode.value == 'pop') { - setTimeout(() => { + timer2.value = setTimeout(() => { proxy.$parent.clickShow = false refresh() + if(timer2.value){ + clearTimeout(timer2.value) + timer2.value = 0 + } }, 1500) } proxy.$parent.$emit('success', { captchaVerification }) @@ -188,17 +194,33 @@ const canvasClick = (e) => { barAreaColor.value = '#d9534f' barAreaBorderColor.value = '#d9534f' text.value = t('captcha.fail') - setTimeout(() => { + timer2.value = setTimeout(() => { refresh() + if(timer2.value){ + clearTimeout(timer2.value) + timer2.value = 0 + } }, 700) } }) + if(timer1.value){ + clearTimeout(timer1.value) + timer1.value = 0 + } }, 400) } if (num.value < checkNum.value) { num.value = createPoint(getMousePos(canvas, e)) } } +onBeforeUnmount(() => { + if(timer1.value){ + clearTimeout(timer1.value) + } + if(timer2.value){ + clearTimeout(timer2.value) + } +}) //获取坐标 const getMousePos = function (obj, e) { var x = e.offsetX diff --git a/src/components/Verifition/src/Verify/VerifySlide.vue b/src/components/Verifition/src/Verify/VerifySlide.vue index 8b448b0de..aa11ad132 100644 --- a/src/components/Verifition/src/Verify/VerifySlide.vue +++ b/src/components/Verifition/src/Verify/VerifySlide.vue @@ -295,9 +295,14 @@ const end = () => { showRefresh.value = false isEnd.value = true if (mode.value == 'pop') { - setTimeout(() => { + let timer + timer = setTimeout(() => { proxy.$parent.clickShow = false refresh() + if(timer){ + clearTimeout(timer) + timer = null + } }, 1500) } passFlag.value = true @@ -309,10 +314,15 @@ const end = () => { secretKey.value ) : backToken.value + '---' + JSON.stringify({ x: moveLeftDistance, y: 5.0 }) - setTimeout(() => { + let timer + timer = setTimeout(() => { tipWords.value = '' proxy.$parent.closeBox() proxy.$parent.$emit('success', { captchaVerification }) + if(timer){ + clearTimeout(timer) + timer = null + } }, 1000) } else { moveBlockBackgroundColor.value = '#d9534f' @@ -320,13 +330,23 @@ const end = () => { iconColor.value = '#fff' iconClass.value = 'icon-close' passFlag.value = false - setTimeout(function () { + let timer + timer = setTimeout(()=>{ refresh() + if(timer){ + clearTimeout(timer) + timer = null + } }, 1000) proxy.$parent.$emit('error', proxy) tipWords.value = t('captcha.fail') - setTimeout(() => { + let timer1 + timer1 = setTimeout(() => { tipWords.value = '' + if(timer1){ + clearTimeout(timer1) + timer1 = null + } }, 1000) } }) @@ -351,10 +371,15 @@ const refresh = async () => { isEnd.value = false await getPictrue() - setTimeout(() => { + let timer + timer = setTimeout(() => { transitionWidth.value = '' transitionLeft.value = '' text.value = explain.value + if(timer){ + clearTimeout(timer) + timer = null + } }, 300) } diff --git a/src/components/bpmnProcessDesigner/package/penal/base/ElementBaseInfo.vue b/src/components/bpmnProcessDesigner/package/penal/base/ElementBaseInfo.vue index 639c1cb2d..6d64b3b7c 100644 --- a/src/components/bpmnProcessDesigner/package/penal/base/ElementBaseInfo.vue +++ b/src/components/bpmnProcessDesigner/package/penal/base/ElementBaseInfo.vue @@ -76,6 +76,9 @@ const resetBaseInfo = () => { // elementBaseInfo.value = JSON.parse(JSON.stringify(bpmnElement.value.businessObject)) console.log(elementBaseInfo.value, 'elementBaseInfo22222222222') } +const timer1 = ref() +const timer2 = ref() +const timer3 = ref() const handleKeyUpdate = (value) => { // 校验 value 的值,只有 XML NCName 通过的情况下,才进行赋值。否则,会导致流程图报错,无法绘制的问题 if (!value) { @@ -90,8 +93,12 @@ const handleKeyUpdate = (value) => { // 在 BPMN 的 XML 中,流程标识 key,其实对应的是 id 节点 elementBaseInfo.value['id'] = value - setTimeout(() => { + timer1.value = setTimeout(() => { updateBaseInfo('id') + if(timer1.value){ + clearTimeout(timer1.value) + timer1.value = 0 + } }, 100) } const handleNameUpdate = (value) => { @@ -101,8 +108,12 @@ const handleNameUpdate = (value) => { } elementBaseInfo.value['name'] = value - setTimeout(() => { + timer2.value = setTimeout(() => { updateBaseInfo('name') + if(timer2.value){ + clearTimeout(timer2.value) + timer2.value = 0 + } }, 100) } // const handleDescriptionUpdate=(value)=> { @@ -140,10 +151,14 @@ const updateBaseInfo = (key) => { } onMounted(() => { // 针对上传的 bpmn 流程图时,需要延迟 1 秒的时间,保证 key 和 name 的更新 - setTimeout(() => { + timer3.value = setTimeout(() => { console.log(props.model, 'props.model') handleKeyUpdate(props.model.key) handleNameUpdate(props.model.name) + if(timer3.value){ + clearTimeout(timer3.value) + timer3.value = 0 + } console.log(props, 'propsssssssssssssssssssss') }, 1000) }) @@ -180,5 +195,17 @@ watch( // } onBeforeUnmount(() => { bpmnElement.value = null + if(timer1.value){ + clearTimeout(timer1.value) + timer1.value = 0 + } + if(timer2.value){ + clearTimeout(timer2.value) + timer2.value = 0 + } + if(timer3.value){ + clearTimeout(timer3.value) + timer3.value = 0 + } }) diff --git a/src/components/bpmnProcessDesigner/src/utils/directive/clickOutSide.js b/src/components/bpmnProcessDesigner/src/utils/directive/clickOutSide.js index bb71d4420..e0da73e77 100644 --- a/src/components/bpmnProcessDesigner/src/utils/directive/clickOutSide.js +++ b/src/components/bpmnProcessDesigner/src/utils/directive/clickOutSide.js @@ -22,9 +22,13 @@ export default { methodName: binding.expression, bindingFn: binding.value } - - setTimeout(() => { + let timer + timer = setTimeout(() => { document.addEventListener('touchstart', documentHandler) // 为document绑定事件 + if(timer){ + clearTimeout(timer) + timer = null + } }) }, update(el, binding) { diff --git a/src/components/iFrame/src/IFrame.vue b/src/components/iFrame/src/IFrame.vue index 85b3e3c34..5d2626d6d 100644 --- a/src/components/iFrame/src/IFrame.vue +++ b/src/components/iFrame/src/IFrame.vue @@ -14,6 +14,8 @@ const init = () => { height.value = document.documentElement.clientHeight - 94.5 + 'px' loading.value = false } +const timer1 = ref() +const timer2 = ref() console.log(props.src); function populateIframe(iframe, headers) { @@ -37,14 +39,33 @@ function populateIframe(iframe, headers) { onMounted(() => { - setTimeout(() => { + timer1.value = setTimeout(() => { var iframe = document.querySelector("#iframe"); populateIframe(iframe, [["Authorization", 'Bearer ' + getAccessToken()], ["tenant-id", getTenantId()]]); + if(timer1.value){ + clearTimeout(timer1.value) + timer1.value = 0 + } }, 300); - setTimeout(() => { + timer2.value = setTimeout(() => { init() + if(timer2.value){ + clearTimeout(timer2.value) + timer2.value = 0 + } }, 300) }) + +onBeforeUnmount(() => { + if(timer1.value){ + clearTimeout(timer1.value) + timer1.value = 0 + } + if(timer2.value){ + clearTimeout(timer2.value) + timer2.value = 0 + } +})