2025-08-12 19:01:04 +08:00
|
|
|
<template>
|
2025-08-14 18:53:50 +08:00
|
|
|
<div class="p-6 bg-gray-50 Professional">
|
2025-08-12 19:01:04 +08:00
|
|
|
<transition>
|
|
|
|
<div v-show="showSearch" class="mb-[10px]">
|
|
|
|
<el-card shadow="never">
|
|
|
|
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
|
|
|
<el-form-item label="电话" prop="phone">
|
|
|
|
<el-input v-model="queryParams.phone" placeholder="请输入电话" clearable @keyup.enter="handleQuery" />
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item>
|
|
|
|
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
|
|
|
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form>
|
|
|
|
</el-card>
|
|
|
|
</div>
|
|
|
|
</transition>
|
|
|
|
<el-card shadow="never">
|
|
|
|
<template #header>
|
|
|
|
<el-row :gutter="10" class="mb8">
|
|
|
|
<el-col :span="1.5">
|
|
|
|
<el-button type="primary" plain icon="Plus" @click="handleAdd">新增</el-button>
|
|
|
|
</el-col>
|
|
|
|
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
|
</el-row>
|
|
|
|
</template>
|
|
|
|
<el-table v-loading="loading" :data="professionalList">
|
|
|
|
<el-table-column label="序号" align="center" type="index" width="100" />
|
|
|
|
<el-table-column label="提资人" align="center" prop="userName" />
|
2025-08-13 19:11:51 +08:00
|
|
|
<el-table-column label="专业" align="center" prop="userMajorName" />
|
2025-08-12 19:01:04 +08:00
|
|
|
<el-table-column label="电话" align="center" prop="phone" />
|
|
|
|
<el-table-column label="邮箱" align="center" prop="email" />
|
|
|
|
<el-table-column label="流程状态" align="center" prop="status">
|
|
|
|
<template #default="scope">
|
|
|
|
<dict-tag :options="wf_business_status" :value="scope.row.status" />
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column label="操作">
|
|
|
|
<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'">
|
2025-08-14 16:40:52 +08:00
|
|
|
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)">审核</el-button>
|
2025-08-12 19:01:04 +08:00
|
|
|
</el-col>
|
2025-08-13 19:11:51 +08:00
|
|
|
<el-col :span="1.5" v-if="scope.row.status === 'finish'">
|
2025-08-14 16:40:52 +08:00
|
|
|
<el-button link type="primary" icon="Download" @click="handleDownload(scope.row)">导出</el-button>
|
2025-08-13 19:11:51 +08:00
|
|
|
</el-col>
|
2025-08-12 19:01:04 +08:00
|
|
|
<el-col :span="1.5">
|
2025-08-15 19:14:20 +08:00
|
|
|
<el-button
|
|
|
|
link
|
|
|
|
type="warning"
|
|
|
|
icon="View"
|
|
|
|
v-if="scope.row.status != 'draft'"
|
|
|
|
v-hasPermi="['design:extract:query']"
|
|
|
|
@click="handleViewInfo(scope.row)"
|
|
|
|
>查看流程</el-button
|
|
|
|
>
|
2025-08-14 16:40:52 +08:00
|
|
|
</el-col>
|
|
|
|
<el-col :span="1.5">
|
2025-08-15 19:14:20 +08:00
|
|
|
<el-button
|
|
|
|
link
|
|
|
|
type="warning"
|
|
|
|
icon="View"
|
|
|
|
v-if="scope.row.status != 'draft'"
|
|
|
|
v-hasPermi="['design:extract:query']"
|
|
|
|
@click="handleFile(scope.row)"
|
|
|
|
>查看文件</el-button
|
|
|
|
>
|
2025-08-12 19:01:04 +08:00
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table>
|
|
|
|
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
|
|
|
</el-card>
|
2025-08-14 16:40:52 +08:00
|
|
|
<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>
|
2025-08-12 19:01:04 +08:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup name="DataCollectionForm" lang="ts">
|
|
|
|
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'));
|
2025-08-14 16:40:52 +08:00
|
|
|
import { extractList, getFileList } from '@/api/design/Professional';
|
2025-08-12 19:01:04 +08:00
|
|
|
|
|
|
|
// 获取用户 store
|
|
|
|
const userStore = useUserStoreHook();
|
|
|
|
const total = ref(0);
|
|
|
|
// 从 store 中获取当前选中的项目
|
|
|
|
const currentProject = computed(() => userStore.selectedProject);
|
|
|
|
const professionalList = ref([]);
|
|
|
|
const showSearch = ref(true);
|
|
|
|
const loading = ref(false);
|
2025-08-14 16:40:52 +08:00
|
|
|
const loadingFlie = ref(false);
|
|
|
|
const viewVisible = ref(false); //文件列表展示
|
|
|
|
const fileList = ref([]);
|
2025-08-12 19:01:04 +08:00
|
|
|
const data = reactive({
|
|
|
|
queryParams: {
|
|
|
|
pageNum: 1,
|
|
|
|
pageSize: 10,
|
|
|
|
projectId: currentProject.value?.id,
|
|
|
|
phone: undefined,
|
|
|
|
status: undefined,
|
|
|
|
params: {}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
const queryFormRef = ref<ElFormInstance>();
|
|
|
|
const { queryParams } = toRefs(data);
|
|
|
|
// 查询提资清单表
|
|
|
|
const getList = async () => {
|
2025-08-13 19:11:51 +08:00
|
|
|
let res = await extractList({ ...queryParams.value });
|
2025-08-12 19:01:04 +08:00
|
|
|
if (res.code == 200) {
|
|
|
|
professionalList.value = res.rows;
|
|
|
|
total.value = res.total; //默认第一个
|
|
|
|
}
|
|
|
|
};
|
|
|
|
/** 搜索按钮操作 */
|
|
|
|
const handleQuery = () => {
|
|
|
|
queryParams.value.pageNum = 1;
|
|
|
|
getList();
|
|
|
|
};
|
|
|
|
|
|
|
|
/** 重置按钮操作 */
|
|
|
|
const resetQuery = () => {
|
|
|
|
queryFormRef.value?.resetFields();
|
|
|
|
handleQuery();
|
|
|
|
};
|
|
|
|
/** 新增按钮操作 */
|
|
|
|
const handleAdd = (row) => {
|
|
|
|
proxy.$tab.closePage(proxy.$route);
|
|
|
|
proxy.$router.push({
|
|
|
|
path: `/design-management/Professional/indexEdit`,
|
|
|
|
query: {
|
|
|
|
id: row.id,
|
|
|
|
type: 'add'
|
|
|
|
}
|
|
|
|
});
|
|
|
|
};
|
|
|
|
const handleViewInfo = (row) => {
|
|
|
|
proxy.$tab.closePage(proxy.$route);
|
|
|
|
proxy.$router.push({
|
|
|
|
path: `/design-management/Professional/indexEdit`,
|
|
|
|
query: {
|
|
|
|
id: row.id,
|
|
|
|
type: 'view'
|
|
|
|
}
|
|
|
|
});
|
|
|
|
};
|
|
|
|
const handleUpdate = (row) => {
|
|
|
|
proxy.$tab.closePage(proxy.$route);
|
|
|
|
proxy.$router.push({
|
|
|
|
path: `/design-management/Professional/indexEdit`,
|
|
|
|
query: {
|
|
|
|
id: row.id,
|
|
|
|
type: 'update'
|
|
|
|
}
|
|
|
|
});
|
|
|
|
};
|
2025-08-13 19:11:51 +08:00
|
|
|
const handleDownload = (row) => {
|
|
|
|
// 导出接口
|
|
|
|
proxy?.download(
|
|
|
|
'design/extract/exportWord',
|
|
|
|
{
|
|
|
|
id: row.id
|
|
|
|
},
|
|
|
|
`互提资料.zip`
|
|
|
|
);
|
2025-08-12 19:01:04 +08:00
|
|
|
};
|
2025-08-14 16:40:52 +08:00
|
|
|
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;
|
|
|
|
};
|
2025-08-12 19:01:04 +08:00
|
|
|
// 页面挂载时初始化数据
|
|
|
|
onMounted(() => {
|
|
|
|
getList();
|
|
|
|
});
|
2025-08-14 22:09:19 +08:00
|
|
|
//监听项目id刷新数据
|
|
|
|
const listeningProject = watch(
|
|
|
|
() => currentProject.value?.id,
|
|
|
|
(nid, oid) => {
|
|
|
|
queryParams.value.projectId = nid;
|
|
|
|
getList();
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
|
|
|
onUnmounted(() => {
|
|
|
|
listeningProject();
|
|
|
|
});
|
2025-08-12 19:01:04 +08:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss">
|
2025-08-14 18:53:50 +08:00
|
|
|
.Professional {
|
2025-08-12 19:01:04 +08:00
|
|
|
.el-tabs__header {
|
|
|
|
height: 84vh !important;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|