设计完成

This commit is contained in:
2025-08-14 16:40:52 +08:00
parent 6a69798ec6
commit a305c5bc19
25 changed files with 459 additions and 1773 deletions

View File

@ -39,15 +39,16 @@
<template #default="scope">
<el-row :gutter="10" class="mb8">
<el-col :span="1.5" v-if="scope.row.status === 'draft' || scope.row.status === 'cancel' || scope.row.status === 'back'">
<el-button size="small" type="primary" icon="Edit" @click="handleUpdate(scope.row)">审核</el-button>
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)">审核</el-button>
</el-col>
<el-col :span="1.5" v-if="scope.row.status === 'finish'">
<el-button size="small" type="primary" icon="Download" @click="handleDownload(scope.row)">导出</el-button>
<el-button link type="primary" icon="Download" @click="handleDownload(scope.row)">导出</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" size="small" icon="View" v-if="scope.row.status != 'draft'" @click="handleViewInfo(scope.row)"
>查看流程</el-button
>
<el-button link type="warning" icon="View" v-if="scope.row.status != 'draft'" @click="handleViewInfo(scope.row)">查看流程</el-button>
</el-col>
<el-col :span="1.5">
<el-button link type="warning" icon="View" v-if="scope.row.status != 'draft'" @click="handleFile(scope.row)">查看文件</el-button>
</el-col>
</el-row>
</template>
@ -55,6 +56,43 @@
</el-table>
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
</el-card>
<el-dialog title="提取文件列表" v-model="viewVisible" width="500px">
<el-table :loading="loadingFlie" :data="fileList" style="width: 100%" border>
<el-table-column prop="fileName" label="文件名称" align="center">
<template #default="scope">
<el-link
:key="scope.row.fileId"
:href="scope.row.fileUrl"
target="_blank"
:type="scope.row.status == '1' ? 'primary' : 'info'"
:underline="false"
>
{{ scope.row.fileName }}
</el-link>
</template>
</el-table-column>
<el-table-column label="是否变更" align="center" width="120">
<template #default="scope">
<el-tag :type="scope.row.type == 1 ? 'success' : 'info'">{{ scope.row.type == 1 ? '否' : '是' }}</el-tag>
</template>
</el-table-column>
<el-table-column label="状态" width="120" align="center">
<template #default="scope">
<el-tag :type="scope.row.status == 1 ? 'success' : 'info'">{{ scope.row.status == 1 ? '使用中' : '已作废' }}</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" width="170" align="center">
<template #default="scope">
<el-button type="success" link icon="View" @click="handleViewFile(scope.row)"> 查看 </el-button>
</template>
</el-table-column>
</el-table>
<template #footer>
<span>
<el-button type="primary" @click="viewVisible = false">关闭</el-button>
</span>
</template>
</el-dialog>
</div>
</template>
@ -63,7 +101,7 @@ import { ref, reactive, computed, onMounted } from 'vue';
import { useUserStoreHook } from '@/store/modules/user';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { wf_business_status } = toRefs<any>(proxy?.useDict('wf_business_status'));
import { extractList } from '@/api/design/Professional';
import { extractList, getFileList } from '@/api/design/Professional';
// 获取用户 store
const userStore = useUserStoreHook();
@ -73,6 +111,9 @@ const currentProject = computed(() => userStore.selectedProject);
const professionalList = ref([]);
const showSearch = ref(true);
const loading = ref(false);
const loadingFlie = ref(false);
const viewVisible = ref(false); //文件列表展示
const fileList = ref([]);
const data = reactive({
queryParams: {
pageNum: 1,
@ -145,7 +186,19 @@ const handleDownload = (row) => {
`互提资料.zip`
);
};
const handleViewFile = (row) => {
window.open(row.docUrl, '_blank');
};
const handleFile = async (row) => {
// 查看文件
viewVisible.value = true;
loadingFlie.value = true;
let res = await getFileList(row.id);
if (res.code == 200) {
fileList.value = res.data;
}
loadingFlie.value = false;
};
// 页面挂载时初始化数据
onMounted(() => {
getList();