2025-08-12 19:01:04 +08:00
|
|
|
<template>
|
|
|
|
<div class="p-6 bg-gray-50 condition">
|
|
|
|
<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'">
|
|
|
|
<el-button size="small" type="primary" icon="Edit" @click="handleUpdate(scope.row)">审核</el-button>
|
|
|
|
</el-col>
|
2025-08-13 19:11:51 +08:00
|
|
|
<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-col>
|
2025-08-12 19:01:04 +08:00
|
|
|
<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-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>
|
|
|
|
</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'));
|
|
|
|
import { extractList } from '@/api/design/Professional';
|
|
|
|
|
|
|
|
// 获取用户 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);
|
|
|
|
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
|
|
|
};
|
|
|
|
|
|
|
|
// 页面挂载时初始化数据
|
|
|
|
onMounted(() => {
|
|
|
|
getList();
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
.condition {
|
|
|
|
.el-tabs__header {
|
|
|
|
height: 84vh !important;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|