|
@@ -1,6 +1,6 @@
|
|
<template>
|
|
<template>
|
|
<div>
|
|
<div>
|
|
- <BasicTable @register="registerTable">
|
|
|
|
|
|
+ <BasicTable @register="registerTable" :key="resetTable">
|
|
<template #action="{ record }">
|
|
<template #action="{ record }">
|
|
<!-- <TableAction :actions="getActions(record)" :dropDownActions="getDropDownAction(record)" /> -->
|
|
<!-- <TableAction :actions="getActions(record)" :dropDownActions="getDropDownAction(record)" /> -->
|
|
<a class="table-action-link" @click="handleTo(record)">提交</a>
|
|
<a class="table-action-link" @click="handleTo(record)">提交</a>
|
|
@@ -10,6 +10,7 @@
|
|
</a-popconfirm>
|
|
</a-popconfirm>
|
|
<a class="table-action-link" @click="handleDownLoad(record)">下载</a>
|
|
<a class="table-action-link" @click="handleDownLoad(record)">下载</a>
|
|
<a class="table-action-link" @click="handleSpDetail(record)">审批详情</a>
|
|
<a class="table-action-link" @click="handleSpDetail(record)">审批详情</a>
|
|
|
|
+ <a class="table-action-link" @click="handleSpRevoke(record)">撤回</a>
|
|
</template>
|
|
</template>
|
|
<template #bodyCell="{ column, record }">
|
|
<template #bodyCell="{ column, record }">
|
|
<slot name="filterCell" v-bind="{ column, record }"></slot>
|
|
<slot name="filterCell" v-bind="{ column, record }"></slot>
|
|
@@ -30,7 +31,13 @@
|
|
</a-modal>
|
|
</a-modal>
|
|
<!-- 审批详情弹窗 -->
|
|
<!-- 审批详情弹窗 -->
|
|
<a-modal v-model:visible="visibleSp" width="1000px" :footer="null" :title="titleSp" centered destroyOnClose>
|
|
<a-modal v-model:visible="visibleSp" width="1000px" :footer="null" :title="titleSp" centered destroyOnClose>
|
|
- <HistorySp :historySpList="historySpList" :imgSrc="imgSrc"></HistorySp>
|
|
|
|
|
|
+ <HistorySp :historySpList="historySpList" :imgSrc="imgSrc" :isShow="isShow" :spInfo="spInfo" @spClose="spClose">
|
|
|
|
+ </HistorySp>
|
|
|
|
+ </a-modal>
|
|
|
|
+ <!-- 审批-撤销申请弹窗 -->
|
|
|
|
+ <a-modal v-model:visible="visibleCx" centered :width="600" title="撤销申请" @ok="handleCxOk" @cancel="handleCxCancel">
|
|
|
|
+ <a-textarea v-model:value="revokeDes" placeholder="请输入撤回原因..." :rows="4"
|
|
|
|
+ style="width:96%;margin:10px;background-color: transparent;color: #fff;" />
|
|
</a-modal>
|
|
</a-modal>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
@@ -46,7 +53,7 @@ import { useModal } from '/@/components/Modal';
|
|
import { getTableHeaderColumns } from '/@/hooks/web/useWebColumns';
|
|
import { getTableHeaderColumns } from '/@/hooks/web/useWebColumns';
|
|
import { useListPage } from '/@/hooks/system/useListPage';
|
|
import { useListPage } from '/@/hooks/system/useListPage';
|
|
import { commit } from '../fileDetail/fileDetail.api'
|
|
import { commit } from '../fileDetail/fileDetail.api'
|
|
-import {historicFlowNew,getHighlightImgNew} from './comment.api'
|
|
|
|
|
|
+import { historicFlowNew, getHighlightImgNew, getTodoTask, getCancelNew } from './comment.api'
|
|
import { message } from 'ant-design-vue';
|
|
import { message } from 'ant-design-vue';
|
|
|
|
|
|
|
|
|
|
@@ -113,6 +120,7 @@ const props = defineProps({
|
|
},
|
|
},
|
|
});
|
|
});
|
|
|
|
|
|
|
|
+let resetTable=ref(0)
|
|
let fileType = ref(''); //文件类型
|
|
let fileType = ref(''); //文件类型
|
|
let editID = ref(0); //文件ID
|
|
let editID = ref(0); //文件ID
|
|
const isUpdate = ref(false);
|
|
const isUpdate = ref(false);
|
|
@@ -134,7 +142,17 @@ let visibleSp = ref(false)
|
|
let titleSp = ref('审批详情')
|
|
let titleSp = ref('审批详情')
|
|
//审批详情历史数据
|
|
//审批详情历史数据
|
|
let historySpList = reactive<any[]>([])
|
|
let historySpList = reactive<any[]>([])
|
|
-let imgSrc=ref('')
|
|
|
|
|
|
+let imgSrc = ref('')
|
|
|
|
+//审批-是否显示撤回/驳回按钮
|
|
|
|
+let isShow = ref(true)
|
|
|
|
+//审批通过/驳回参数信息
|
|
|
|
+let spInfo = reactive({})
|
|
|
|
+
|
|
|
|
+//审批-撤销
|
|
|
|
+let visibleCx = ref(false)
|
|
|
|
+let revokeDes = ref('')
|
|
|
|
+let cxInfo = reactive({})
|
|
|
|
+
|
|
|
|
|
|
// 列表页面公共参数、方法
|
|
// 列表页面公共参数、方法
|
|
const { tableContext, doRequest } = useListPage({
|
|
const { tableContext, doRequest } = useListPage({
|
|
@@ -194,6 +212,9 @@ async function handleTjOk() {
|
|
if (res == '提交成功') {
|
|
if (res == '提交成功') {
|
|
message.success(res);
|
|
message.success(res);
|
|
visibleTj.value = false
|
|
visibleTj.value = false
|
|
|
|
+ resetTable.value=new Date().getTime()
|
|
|
|
+ } else {
|
|
|
|
+ message.warning(res.message);
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
message.warning('请先选择要提交的文件!');
|
|
message.warning('请先选择要提交的文件!');
|
|
@@ -207,25 +228,63 @@ function handleTjCancel() {
|
|
//审批详情点击
|
|
//审批详情点击
|
|
function handleSpDetail(data) {
|
|
function handleSpDetail(data) {
|
|
visibleSp.value = true
|
|
visibleSp.value = true
|
|
- getHistoricFlowNewList({tableId:data.id,tableName:data.tableName})
|
|
|
|
- getHighlightImgNewList({tableId:data.id,tableName:data.tableName})
|
|
|
|
|
|
+ getTodoTaskShow({ tableId: data.id, tableName: data.tableName })
|
|
|
|
+ getHistoricFlowNewList({ tableId: data.id, tableName: data.tableName })
|
|
|
|
+ getHighlightImgNewList({ tableId: data.id, tableName: data.tableName })
|
|
}
|
|
}
|
|
//审批详情-审批历史列表
|
|
//审批详情-审批历史列表
|
|
async function getHistoricFlowNewList(params) {
|
|
async function getHistoricFlowNewList(params) {
|
|
- let res = await historicFlowNew({...params})
|
|
|
|
- if (res.length != 0) {
|
|
|
|
- historySpList.length = 0
|
|
|
|
- res.forEach(el => {
|
|
|
|
- historySpList.push({ name: el.name, username: el.assignees[0].username, deleteReason: el.deleteReason, comment: el.comment, startTime: el.startTime, endTime: el.endTime,status:el.status||'待处理' })
|
|
|
|
- })
|
|
|
|
|
|
+ let res = await historicFlowNew({ ...params })
|
|
|
|
+ if (res.length != 0) {
|
|
|
|
+ historySpList.length = 0
|
|
|
|
+ res.forEach(el => {
|
|
|
|
+ historySpList.push({ name: el.name, username: el.assignees[0].username, deleteReason: el.deleteReason, comment: el.comment, startTime: el.startTime, endTime: el.endTime, status: el.status || '待处理' })
|
|
|
|
+ })
|
|
|
|
|
|
- }
|
|
|
|
|
|
+ }
|
|
}
|
|
}
|
|
//审批详情-流程轨迹
|
|
//审批详情-流程轨迹
|
|
-async function getHighlightImgNewList(params){
|
|
|
|
- let res=await getHighlightImgNew({...params})
|
|
|
|
- let imageUrl = window.URL.createObjectURL(res);
|
|
|
|
- imgSrc.value=imageUrl
|
|
|
|
|
|
+async function getHighlightImgNewList(params) {
|
|
|
|
+ let res = await getHighlightImgNew({ ...params })
|
|
|
|
+ let imageUrl = window.URL.createObjectURL(res);
|
|
|
|
+ imgSrc.value = imageUrl
|
|
|
|
+}
|
|
|
|
+//判断是否显示撤回/驳回按钮
|
|
|
|
+async function getTodoTaskShow(params) {
|
|
|
|
+ let res = await getTodoTask({ ...params })
|
|
|
|
+ spInfo = res.result
|
|
|
|
+ if (spInfo) {
|
|
|
|
+ isShow.value = true
|
|
|
|
+ } else {
|
|
|
|
+ isShow.value = false
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+//审批通过/驳回弹窗关闭
|
|
|
|
+function spClose() {
|
|
|
|
+ visibleSp.value = false
|
|
|
|
+ resetTable.value=new Date().getTime()
|
|
|
|
+}
|
|
|
|
+//审批-撤回提交
|
|
|
|
+function handleSpRevoke(data) {
|
|
|
|
+ visibleCx.value = true
|
|
|
|
+ cxInfo = Object.assign({}, data)
|
|
|
|
+}
|
|
|
|
+//审批-撤销-确定
|
|
|
|
+async function handleCxOk() {
|
|
|
|
+ let res = await getCancelNew({ reason: revokeDes.value, tableId: cxInfo.id, tableName: cxInfo.tableName })
|
|
|
|
+ if (res == '操作成功') {
|
|
|
|
+ message.success(res);
|
|
|
|
+ } else {
|
|
|
|
+ message.warning(res.message);
|
|
|
|
+ }
|
|
|
|
+ visibleCx.value = false
|
|
|
|
+ revokeDes.value = ''
|
|
|
|
+ resetTable.value=new Date().getTime()
|
|
|
|
+}
|
|
|
|
+//审批-撤销-取消
|
|
|
|
+function handleCxCancel() {
|
|
|
|
+ revokeDes.value = ''
|
|
|
|
+ visibleCx.value = false
|
|
}
|
|
}
|
|
/**
|
|
/**
|
|
* 编辑事件
|
|
* 编辑事件
|
|
@@ -236,7 +295,7 @@ function handleEdit(data) {
|
|
let index = record.fileSuffix.indexOf('.');
|
|
let index = record.fileSuffix.indexOf('.');
|
|
fileType.value = record.fileSuffix.substring(index + 1);
|
|
fileType.value = record.fileSuffix.substring(index + 1);
|
|
editID.value = record.id;
|
|
editID.value = record.id;
|
|
-
|
|
|
|
|
|
+
|
|
|
|
|
|
// 根据文件后缀名打开不同的模态框
|
|
// 根据文件后缀名打开不同的模态框
|
|
if (['.dwg', '.mxcad'].includes(data.fileSuffix)) {
|
|
if (['.dwg', '.mxcad'].includes(data.fileSuffix)) {
|
|
@@ -259,7 +318,6 @@ async function handleDelete(record) {
|
|
|
|
|
|
//下载文件
|
|
//下载文件
|
|
function handleDownLoad(record) {
|
|
function handleDownLoad(record) {
|
|
- console.log(record, '下载');
|
|
|
|
props.downLoad({ id: record.id }).then((res) => {
|
|
props.downLoad({ id: record.id }).then((res) => {
|
|
let filename = `${record.fileName}`;
|
|
let filename = `${record.fileName}`;
|
|
downFilePublic(res, filename);
|
|
downFilePublic(res, filename);
|