|
|
@@ -22,47 +22,49 @@
|
|
|
</template>
|
|
|
<!-- 表格操作栏 -->
|
|
|
<template #action="{ record }">
|
|
|
- <TableAction :actions="[
|
|
|
- {
|
|
|
- label: '浏览',
|
|
|
- //auth: 'api:yt:role:saveOrUpdateRoleInfoWithMenu:update',
|
|
|
- //icon: 'clarity:note-edit-line', //图标
|
|
|
- onClick: handleUpload.bind(null, record),
|
|
|
- },
|
|
|
- {
|
|
|
- label: '查看',
|
|
|
- //auth: 'api:yt:role:saveOrUpdateRoleInfoWithMenu:update',
|
|
|
- //icon: 'clarity:note-edit-line',
|
|
|
- onClick: handleView.bind(null, record),
|
|
|
- },
|
|
|
- {
|
|
|
- label: '编辑',
|
|
|
- //auth: 'api:yt:role:saveOrUpdateRoleInfoWithMenu:update',
|
|
|
- //icon: 'clarity:note-edit-line',
|
|
|
- //color: 'warning',
|
|
|
- ifShow: props.isChild,
|
|
|
- disabled: record.status == 3 ? false : true,
|
|
|
- onClick: handleEdit.bind(null, record),
|
|
|
- },
|
|
|
- {
|
|
|
- label: '提交审核',
|
|
|
- //auth: 'api:yt:role:saveOrUpdateRoleInfoWithMenu:update',
|
|
|
- //icon: 'clarity:note-edit-line',
|
|
|
- //color: 'warning',
|
|
|
- ifShow: props.isChild,
|
|
|
- disabled: record.status == 3 ? false : true,
|
|
|
- onClick: sendApprove.bind(null, record),
|
|
|
- },
|
|
|
- {
|
|
|
- label: '删除',
|
|
|
- //auth: 'api:yt:role:delete',
|
|
|
- //icon: 'ant-design:delete-outlined',
|
|
|
- //color: 'error',
|
|
|
- ifShow: props.isChild,
|
|
|
- disabled: record.status == 3 ? false : true,
|
|
|
- onClick: handleDelete.bind(null, record),
|
|
|
- },
|
|
|
- ]" />
|
|
|
+ <TableAction
|
|
|
+ :actions="[
|
|
|
+ {
|
|
|
+ label: '浏览',
|
|
|
+ //auth: 'api:yt:role:saveOrUpdateRoleInfoWithMenu:update',
|
|
|
+ //icon: 'clarity:note-edit-line', //图标
|
|
|
+ onClick: handleUpload.bind(null, record),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '查看',
|
|
|
+ //auth: 'api:yt:role:saveOrUpdateRoleInfoWithMenu:update',
|
|
|
+ //icon: 'clarity:note-edit-line',
|
|
|
+ onClick: handleView.bind(null, record),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '编辑',
|
|
|
+ //auth: 'api:yt:role:saveOrUpdateRoleInfoWithMenu:update',
|
|
|
+ //icon: 'clarity:note-edit-line',
|
|
|
+ //color: 'warning',
|
|
|
+ ifShow: props.isChild,
|
|
|
+ disabled: record.status == 3 ? false : true,
|
|
|
+ onClick: handleEdit.bind(null, record),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '提交审核',
|
|
|
+ //auth: 'api:yt:role:saveOrUpdateRoleInfoWithMenu:update',
|
|
|
+ //icon: 'clarity:note-edit-line',
|
|
|
+ //color: 'warning',
|
|
|
+ ifShow: props.isChild,
|
|
|
+ disabled: record.status == 3 ? false : true,
|
|
|
+ onClick: sendApprove.bind(null, record),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '删除',
|
|
|
+ //auth: 'api:yt:role:delete',
|
|
|
+ //icon: 'ant-design:delete-outlined',
|
|
|
+ //color: 'error',
|
|
|
+ ifShow: props.isChild,
|
|
|
+ disabled: record.status == 3 ? false : true,
|
|
|
+ onClick: handleDelete.bind(null, record),
|
|
|
+ },
|
|
|
+ ]"
|
|
|
+ />
|
|
|
</template>
|
|
|
<template #nodename="{ record }">
|
|
|
<!-- <Tag>
|
|
|
@@ -152,7 +154,7 @@ export default defineComponent({
|
|
|
isChild: {
|
|
|
type: Boolean,
|
|
|
default: true,
|
|
|
- }
|
|
|
+ },
|
|
|
},
|
|
|
setup(props) {
|
|
|
//按钮的权限控制标识
|
|
|
@@ -238,7 +240,7 @@ export default defineComponent({
|
|
|
res.dataVersionConf.active == 'Y' ? '1' : '0';
|
|
|
}
|
|
|
let result = Object.assign(res.metadata, res.servicebase, res.dataVersionConf || {});
|
|
|
- result['flowid'] = record?.flowid
|
|
|
+ result['flowid'] = record?.flowid;
|
|
|
if (record.bussid) result.bussid = record.bussid;
|
|
|
openModal(true, {
|
|
|
record: result,
|
|
|
@@ -262,18 +264,22 @@ export default defineComponent({
|
|
|
if (res) {
|
|
|
const fileName = res.fileName;
|
|
|
const url = res.url;
|
|
|
- // fetch(url)
|
|
|
- // .then((res) => res.blob())
|
|
|
- // .then((blob) => {
|
|
|
- // // 将链接地址字符内容转变成blob地址
|
|
|
- // const a = document.createElement('a');
|
|
|
- // a.href = URL.createObjectURL(blob);
|
|
|
- // //测试链接console.log(a.href)
|
|
|
- // a.download = fileName; // 下载文件的名字
|
|
|
- // document.body.appendChild(a);
|
|
|
- // a.click();
|
|
|
- // });
|
|
|
- window.open(url);
|
|
|
+ if (
|
|
|
+ url &&
|
|
|
+ (url.indexOf('.png') > -1 || url.indexOf('.png') > -1 || url.indexOf('.pdf') > -1)
|
|
|
+ ) {
|
|
|
+ window.open(url);
|
|
|
+ } else {
|
|
|
+ fetch(url)
|
|
|
+ .then((res) => res.blob())
|
|
|
+ .then((blob) => {
|
|
|
+ const a = document.createElement('a');
|
|
|
+ a.href = URL.createObjectURL(blob);
|
|
|
+ a.download = fileName;
|
|
|
+ document.body.appendChild(a);
|
|
|
+ a.click();
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -290,7 +296,7 @@ export default defineComponent({
|
|
|
}
|
|
|
let result = Object.assign(res.metadata, res.servicebase, res.dataVersionConf || {});
|
|
|
if (record.bussid) result.bussid = record.bussid;
|
|
|
- result['flowid'] = record?.flowid
|
|
|
+ result['flowid'] = record?.flowid;
|
|
|
openModal(true, {
|
|
|
record: result,
|
|
|
isUpdate: true,
|