|
@@ -39,16 +39,20 @@ const useDocument = useDocumentStore()
|
|
const dialogName = 'selectSignTypeDialog'
|
|
const dialogName = 'selectSignTypeDialog'
|
|
const show = computed(() => useViewer.isElementOpen(dialogName))
|
|
const show = computed(() => useViewer.isElementOpen(dialogName))
|
|
const activeTool = computed(() => useDocument.getActiveTool)
|
|
const activeTool = computed(() => useDocument.getActiveTool)
|
|
|
|
+const disableDigitalSignature = computed(() => useDocument.getDisableDigitalSignature)
|
|
|
|
+const disableElectronicSignature = computed(() => useDocument.getDisableElectronicSignature)
|
|
|
|
|
|
const type = ref('electronic')
|
|
const type = ref('electronic')
|
|
|
|
|
|
const showDialog = (data) => {
|
|
const showDialog = (data) => {
|
|
useViewer.setSelectedSignatureField(data)
|
|
useViewer.setSelectedSignatureField(data)
|
|
- if (activeTool.value === 'addDigitalSign') {
|
|
|
|
|
|
+ if (activeTool.value === 'addDigitalSign' || (!disableDigitalSignature.value && disableElectronicSignature.value)) {
|
|
useViewer.openElement('addDigitalFileDialog')
|
|
useViewer.openElement('addDigitalFileDialog')
|
|
|
|
+ } else if (activeTool.value === 'addElectronicSign' || (disableDigitalSignature.value && !disableElectronicSignature.value)) {
|
|
|
|
+ openSignCreatePanel()
|
|
|
|
+ } else {
|
|
|
|
+ useViewer.openElement('selectSignTypeDialog')
|
|
}
|
|
}
|
|
- else if (activeTool.value === 'addElectronicSign') openSignCreatePanel()
|
|
|
|
- else useViewer.openElement('selectSignTypeDialog')
|
|
|
|
}
|
|
}
|
|
core.addEvent('openSelectSignTypeDialog', showDialog)
|
|
core.addEvent('openSelectSignTypeDialog', showDialog)
|
|
|
|
|