feat(clinical-web): 新增签署任务弹窗与文档库管理页面
This commit is contained in:
@@ -2,6 +2,9 @@
|
||||
import { computed, onMounted, reactive, ref } from 'vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
|
||||
import NewSigningTaskDialog from '@/components/signing/NewSigningTaskDialog.vue'
|
||||
import type { SigningTemplate } from '@/api/workbench/types'
|
||||
|
||||
import DocumentFilterTabs from './components/DocumentFilterTabs.vue'
|
||||
import DocumentLibraryHeader from './components/DocumentLibraryHeader.vue'
|
||||
import DocumentPreviewDialog from './components/DocumentPreviewDialog.vue'
|
||||
@@ -18,6 +21,8 @@ import type {
|
||||
const loading = ref(true)
|
||||
const library = ref<DocumentDepartment[]>([])
|
||||
const selectedTemplate = ref<DocumentTemplate | null>(null)
|
||||
const signingTemplate = ref<SigningTemplate | null>(null)
|
||||
const signingDialogVisible = ref(false)
|
||||
|
||||
const filters = reactive<DocumentFilterForm>({
|
||||
keyword: '',
|
||||
@@ -96,8 +101,27 @@ function showEditMessage(template: DocumentTemplate) {
|
||||
ElMessage.info('原型演示:编辑模板《' + template.name + '》')
|
||||
}
|
||||
|
||||
function showInitiateMessage(template: DocumentTemplate) {
|
||||
ElMessage.info('已选择《' + template.name + '》,签署工作台暂未实现')
|
||||
function toSigningTemplate(template: DocumentTemplate): SigningTemplate {
|
||||
return {
|
||||
id: template.id,
|
||||
name: template.name,
|
||||
code: template.code,
|
||||
department: template.department,
|
||||
category: template.category,
|
||||
description: template.description,
|
||||
supportedMethods: ['pad', 'sms'],
|
||||
}
|
||||
}
|
||||
|
||||
function openSigningDialog(template: DocumentTemplate) {
|
||||
closePreview()
|
||||
signingTemplate.value = toSigningTemplate(template)
|
||||
signingDialogVisible.value = true
|
||||
}
|
||||
|
||||
function closeSigningDialog() {
|
||||
signingDialogVisible.value = false
|
||||
signingTemplate.value = null
|
||||
}
|
||||
|
||||
function clearFilters() {
|
||||
@@ -106,8 +130,7 @@ function clearFilters() {
|
||||
}
|
||||
|
||||
function useTemplate(template: DocumentTemplate) {
|
||||
closePreview()
|
||||
ElMessage.info('原型演示:从模板《' + template.name + '》发起签署')
|
||||
openSigningDialog(template)
|
||||
}
|
||||
|
||||
onMounted(loadLibrary)
|
||||
@@ -146,7 +169,7 @@ onMounted(loadLibrary)
|
||||
:template="template"
|
||||
@preview="handlePreview"
|
||||
@edit="showEditMessage"
|
||||
@initiate="showInitiateMessage"
|
||||
@initiate="openSigningDialog"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -169,6 +192,11 @@ onMounted(loadLibrary)
|
||||
@close="closePreview"
|
||||
@use="useTemplate"
|
||||
/>
|
||||
<NewSigningTaskDialog
|
||||
:visible="signingDialogVisible"
|
||||
:initial-template="signingTemplate"
|
||||
@close="closeSigningDialog"
|
||||
/>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -22,9 +22,9 @@ import type {
|
||||
VisitType,
|
||||
WorkbenchCampus,
|
||||
} from '@/api/workbench/types'
|
||||
import NewSigningTaskDialog from '@/components/signing/NewSigningTaskDialog.vue'
|
||||
import { useAppStore } from '@/stores/app'
|
||||
|
||||
import NewSigningTaskDialog from './components/NewSigningTaskDialog.vue'
|
||||
import OnlineSigningDialog from './components/OnlineSigningDialog.vue'
|
||||
import SignaturePadDialog from './components/SignaturePadDialog.vue'
|
||||
import SigningFilterBar from './components/SigningFilterBar.vue'
|
||||
|
||||
Reference in New Issue
Block a user