mirror of
https://gitee.com/orangeform/orange-admin.git
synced 2026-01-17 18:46:36 +08:00
commit:支持后台扩展类
This commit is contained in:
@@ -12,7 +12,10 @@
|
||||
:change="onValueChange"
|
||||
@widgetClick="onWidgetClick"
|
||||
>
|
||||
<template v-if="form().mode === 'pc' && widget.widgetType !== SysCustomWidgetType.Cascader" v-slot="scope">
|
||||
<template
|
||||
v-if="form().mode === 'pc' && widget.widgetType !== SysCustomWidgetType.Cascader"
|
||||
v-slot="scope"
|
||||
>
|
||||
<template v-if="widget.widgetType === SysCustomWidgetType.Radio">
|
||||
<el-radio v-for="item in getAllDropdownData" :key="item.id" :value="item.id">
|
||||
{{ item.name }}
|
||||
|
||||
@@ -88,15 +88,6 @@
|
||||
<vxe-column title="工单状态" field="flowStatusShowName" :min-width="100" />
|
||||
<vxe-column title="操作" :width="160" fixed="right" :show-overflow="false">
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
link
|
||||
:size="layoutStore.defaultFormItemSize"
|
||||
v-if="getPrintOperation != null"
|
||||
:class="getPrintOperation.btnClass"
|
||||
@click.stop="onPrint(getPrintOperation, row)"
|
||||
>
|
||||
{{ getPrintOperation.name || '打印' }}
|
||||
</el-button>
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
@@ -250,7 +241,7 @@ const remoteSort = computed(() => {
|
||||
});
|
||||
const getPrintOperation = computed(() => {
|
||||
let operation = findItemFromList(
|
||||
form().operationList,
|
||||
props.widget.operationList,
|
||||
SysCustomWidgetOperationType.PRINT,
|
||||
'type',
|
||||
);
|
||||
@@ -398,36 +389,6 @@ const getPrintParamItem = (row: ANY_OBJECT, printParamList: ANY_OBJECT[]) => {
|
||||
|
||||
return param;
|
||||
};
|
||||
const onPrint = (operation: ANY_OBJECT, row: ANY_OBJECT) => {
|
||||
if (operation == null || row == null || row.processDefinitionKey == null) return;
|
||||
let printParam;
|
||||
let temp = getPrintParamItem(row, operation.printParamList);
|
||||
printParam = temp ? [temp] : [];
|
||||
|
||||
let params = {
|
||||
printId: operation.printTemplateId,
|
||||
printParams: printParam,
|
||||
};
|
||||
post<string>(
|
||||
API_CONTEXT + '/flow/flowOnlineOperation/printWorkOrder/' + row.processDefinitionKey,
|
||||
params,
|
||||
)
|
||||
.then(res => {
|
||||
let downloadUrl = res.data;
|
||||
downloadBlob(downloadUrl, {})
|
||||
.then((blobData: Blob) => {
|
||||
let pdfUrl = window.URL.createObjectURL(blobData);
|
||||
window.open('./lib/pdfjs/web/viewer.html?file=' + pdfUrl);
|
||||
})
|
||||
.catch(e => {
|
||||
console.log(e);
|
||||
ElMessage.error(e);
|
||||
});
|
||||
})
|
||||
.catch(e => {
|
||||
console.warn(e);
|
||||
});
|
||||
};
|
||||
const formatListData = (data: ANY_OBJECT) => {
|
||||
Object.keys(data).forEach(key => {
|
||||
let subData = data[key];
|
||||
|
||||
Reference in New Issue
Block a user