提交 574734b0 authored 作者: kxjia's avatar kxjia

审批时预览

上级 4c556ef6
......@@ -20,6 +20,7 @@
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import ArchiveDrawer from './ArchiveDrawer.vue';
import { columns, searchFormSchema } from '/@/views/baosong/task/BaosongTask.data';
import { archiveList } from '/@/views/baosong/task/BaosongTask.api';
......
......@@ -32,7 +32,6 @@ export const columns: BasicColumn[] = [
if(!text||text===9) {
return render.renderTag("归档", "gray");
}
const color = text == 'L' ? 'blue' : text == 'M' ? 'yellow' : 'red';
return render.renderTag(render.renderDict(text, 'priority'), color);
},
......
......@@ -12,15 +12,18 @@
</template>
<script lang="ts" name="baosong-baosongTaskReview" setup>
import { ref, computed,onMounted, unref } from 'vue';
import { ref,nextTick } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useModal } from '/@/components/Modal';
import { message } from 'ant-design-vue';
import { useListPage } from '/@/hooks/system/useListPage';
import { getFileAccessHttpUrl } from '/@/utils/common/compUtils';
import { columns, searchFormSchema } from './BaosongTaskReview.data';
import { list, deleteOne, batchDelete, downLoadTaskXml, saveOrUpdate } from './BaosongTaskReview.api';
import BaosongApproveModal from './components/BaosongApproveModal.vue';
import { useRoute,useRouter } from 'vue-router';
const route = useRoute();
const router = useRouter();
const [registerModal, { openModal }] = useModal();
const [registerAppModal, { openModal: openAppModal }] = useModal();
......@@ -89,16 +92,21 @@
(selectedRowKeys.value = []) && reload();
}
async function handlePreview(record) {
alert(JSON.stringify(record));
await gotoPage(record);
}
function getTableAction(record) {
return [
{
label: '审核',
onClick: handleApproval.bind(null, record),
},
// {
// label: '下载',
// onClick: downLoadXml.bind(null, record),
// },
{
label: '预览',
onClick: handlePreview.bind(null, record),
},
{
label: '归档',
disabled:!(record.appSta==1),
......@@ -141,12 +149,68 @@
}
const handleDownloadFile = (filePath) => {
const globOnlineViewUrl: string = import.meta.env.VITE_GLOB_ONLINE_VIEW_URL;
const url = globOnlineViewUrl + filePath;
if (url) {
window.open(url);
}
};
const globOnlineViewUrl: string = import.meta.env.VITE_GLOB_ONLINE_VIEW_URL;
const url = globOnlineViewUrl + filePath;
if (url) {
window.open(url);
}
};
const gotoPage = async (item) => {
let targetPath = ''
const tplid = item.tplid
const taskid = item.taskid
if(tplid === 7) {
targetPath = '/baosong/report/components/Tb1'
} else if(tplid === 8) {
targetPath = '/baosong/report/components/Tb2'
} else if(tplid === 9) {
targetPath = '/baosong/report/components/Tb3'
} else if(tplid === 10) {
targetPath = '/baosong/report/components/Tb4'
} else if(tplid === 11) {
targetPath = '/baosong/report/components/Tb5'
} else if(tplid === 12) {
targetPath = '/baosong/report/components/Tb6'
} else if(tplid === 13) {
targetPath = '/baosong/report/components/Tb7'
} else if(tplid === 14) {
targetPath = '/baosong/report/components/Tb8'
} else if(tplid === 15) {
targetPath = '/baosong/report/components/Tb9'
} else if(tplid === 16) {
targetPath = '/baosong/report/components/Tb10'
} else if(tplid === 23) {
targetPath = '/baosong/report/components/Tb11'
} else if(tplid === 25) {
targetPath = '/baosong/report/components/Rr1'
} else if(tplid === 1) {
targetPath = '/baosong/report/components/Tm1'
} else if(tplid === 20) {
targetPath = '/baosong/report/components/Tm2'
} else if(tplid === 2) {
targetPath = '/baosong/report/components/Tq1'
} else if(tplid === 3) {
targetPath = '/baosong/report/components/Tq2'
} else if(tplid === 4) {
targetPath = '/baosong/report/components/Tq3'
} else if(tplid === 5) {
targetPath = '/baosong/report/components/Tq4'
}
if (targetPath) {
await nextTick();
router.push({
path: targetPath,
query: {
taskId: taskid,
tplId: tplid,
comfrom: 'archive'
}
});
}
}
</script>
<style scoped></style>
<template>
<BasicModal v-bind="$attrs" @register="registerModal"
destroyOnClose :title="title" width="100%" @ok="handleSubmit" okText="确定">
<div class="split-container">
<div class="left-panel">
<Tb ref="tbRef" />
</div>
<div class="right-panel">
<BasicForm @register="registerForm" />
</div>
</div>
<BasicModal v-bind="$attrs" @register="registerModal" destroyOnClose :title="title" :width="800" @ok="handleSubmit" okText="确定">
<BasicForm @register="registerForm" />
</BasicModal>
</template>
......@@ -20,10 +11,7 @@
import { BasicForm, useForm } from '/@/components/Form/index';
import { formSchemaApprove } from '../BaosongTaskReview.data';
import { saveOrUpdate } from '../BaosongTaskReview.api';
import Tb1 from '/@/views/baosong/report/components/Tb1.vue';
const { createConfirm } = useMessage();
const showTab1 = ref(false);
// Emits声明
const emit = defineEmits(['register', 'success']);
const isUpdate = ref(true);
......@@ -84,24 +72,6 @@
</script>
<style lang="less" scoped>
.split-container {
display: flex;
width: 100%;
height: 100%;
min-height: 500px;
}
.left-panel {
width: 70%;
padding-right: 10px;
border-right: 1px solid #e8e8e8;
}
.right-panel {
width: 30%;
padding-left: 10px;
}
/** 时间和数字输入框样式 */
:deep(.ant-input-number) {
width: 100%;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论