update:审批流程优化
This commit is contained in:
@@ -35,12 +35,12 @@ service.interceptors.response.use(
|
||||
}
|
||||
// 普通接口返回原来的 res.data
|
||||
if (res.data.code !== 200) {
|
||||
ElMessage.error(res.data.message);
|
||||
ElMessage.warning(res.data.message);
|
||||
}
|
||||
return res.data;
|
||||
},
|
||||
(error) => {
|
||||
ElMessage.error('系统繁忙,请稍后再试');
|
||||
ElMessage.warning('系统繁忙,请稍后再试');
|
||||
return Promise.reject(error);
|
||||
}
|
||||
);
|
||||
@@ -79,7 +79,7 @@ const download = (url: string, params = {}, filename = 'download') => {
|
||||
const text = await res.data.text();
|
||||
const result = JSON.parse(text);
|
||||
if (result.code !== 200) {
|
||||
ElMessage.error(result.message);
|
||||
ElMessage.warning(result.message);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -151,7 +151,7 @@ const download = (url: string, params = {}, filename = 'download') => {
|
||||
window.URL.revokeObjectURL(link.href);
|
||||
})
|
||||
.catch(() => {
|
||||
ElMessage.error('下载失败');
|
||||
ElMessage.warning('下载失败');
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -22,15 +22,15 @@
|
||||
</div>
|
||||
<div class="right">
|
||||
<div class="item">
|
||||
<el-tag v-if="item.nodeStatus === 2" type="success">{{
|
||||
NODE_STATUS[item.nodeStatus]
|
||||
}}</el-tag>
|
||||
<el-tag v-if="item.nodeStatus === 1" type="warning">{{
|
||||
NODE_STATUS[item.nodeStatus]
|
||||
}}</el-tag>
|
||||
<el-tag v-if="item.nodeStatus === 0" type="info">{{
|
||||
NODE_STATUS[item.nodeStatus]
|
||||
}}</el-tag>
|
||||
<el-tag v-if="item.nodeStatus === 2" type="primary">
|
||||
{{ NODE_STATUS[item.nodeType][item.nodeStatus] }}
|
||||
</el-tag>
|
||||
<el-tag v-if="item.nodeStatus === 1" type="warning">
|
||||
{{ NODE_STATUS[item.nodeType][item.nodeStatus] }}
|
||||
</el-tag>
|
||||
<el-tag v-if="item.nodeStatus === 0" type="info">
|
||||
{{ NODE_STATUS[item.nodeType][item.nodeStatus] }}
|
||||
</el-tag>
|
||||
</div>
|
||||
<div class="item">{{ item.nodeName }}:{{ item.nodeUserName }}</div>
|
||||
<div v-if="item.showTime" class="item">操作时间:{{ item.showTime }}</div>
|
||||
@@ -55,9 +55,30 @@ import { systemQueryApproveFlowStatusApi } from '@/api/system/systemApprove';
|
||||
|
||||
// TODO 接入字典
|
||||
const NODE_STATUS: any = {
|
||||
'0': '未审批',
|
||||
'1': '审批中',
|
||||
'2': '已完成',
|
||||
// 根节点
|
||||
'0': {
|
||||
'0': '未提交',
|
||||
'1': '提交中',
|
||||
'2': '已提交',
|
||||
},
|
||||
// 审批节点
|
||||
'1': {
|
||||
'0': '未查阅',
|
||||
'1': '审批中',
|
||||
'2': '已审批',
|
||||
},
|
||||
// 抄送节点
|
||||
'2': {
|
||||
'0': '未查阅',
|
||||
'1': '审批中',
|
||||
'2': '已审批',
|
||||
},
|
||||
// 结束节点
|
||||
'-1': {
|
||||
'0': '未查阅',
|
||||
'1': '审批中',
|
||||
'2': '已审批',
|
||||
},
|
||||
};
|
||||
|
||||
interface Props {
|
||||
@@ -131,11 +152,11 @@ const closeFun = () => {
|
||||
&.active {
|
||||
.left {
|
||||
&::after {
|
||||
background-color: var(--el-color-success);
|
||||
background-color: var(--el-color-primary);
|
||||
}
|
||||
.pic {
|
||||
.icon {
|
||||
color: var(--el-color-success);
|
||||
color: var(--el-color-primary);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,9 +31,13 @@ const choseData = ref<any>('');
|
||||
|
||||
const emit = defineEmits(['update:modelValue', 'change']);
|
||||
|
||||
watch(() => props.modelValue, (val: any) => {
|
||||
choseData.value = val;
|
||||
}, { deep: true, immediate: true });
|
||||
watch(
|
||||
() => props.modelValue,
|
||||
(val: any) => {
|
||||
choseData.value = val;
|
||||
},
|
||||
{ deep: true, immediate: true }
|
||||
);
|
||||
|
||||
onMounted(() => {
|
||||
getlistDataFun();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="comp-content">
|
||||
<div v-if="data">
|
||||
<div class="comp-content comp-tree-edit-item">
|
||||
<div v-if="data" class="text-data" :title="data">
|
||||
<slot name="default">
|
||||
{{ data }}
|
||||
</slot>
|
||||
@@ -29,7 +29,12 @@ withDefaults(defineProps<Props>(), {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.comp-content {
|
||||
.comp-tree-edit-item {
|
||||
.text-data {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.tip {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
@@ -475,17 +475,17 @@ defineExpose({
|
||||
.comp-tree-case-table {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
.node-name {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.blue {
|
||||
color: var(--el-color-primary);
|
||||
}
|
||||
|
||||
.name {
|
||||
padding-left: 4px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
</el-button>
|
||||
</template>
|
||||
<template #fileType="{ row }">
|
||||
{{ PROJECT_FILE_TYPE.O[row.fileType] }}
|
||||
{{ ALL_FILE_TYPE.O[row.fileType] || '--' }}
|
||||
</template>
|
||||
<template #fileSize="{ row }">
|
||||
{{ formatFileSize(row.fileSize) }}
|
||||
@@ -59,7 +59,7 @@ import { downloadFileById } from '@/utils/file';
|
||||
const env = import.meta.env;
|
||||
const PREFIX = env.VITE_API_PREFIX_PROJECT;
|
||||
|
||||
const { PROJECT_FILE_TYPE } = useDict('PROJECT_FILE_TYPE');
|
||||
const { ALL_FILE_TYPE } = useDict('ALL_FILE_TYPE');
|
||||
|
||||
const props = defineProps({
|
||||
projectId: {
|
||||
|
||||
Reference in New Issue
Block a user