总进度计划导入导出

This commit is contained in:
Teo
2025-09-16 09:41:15 +08:00
parent 371c599bdf
commit 275ba22157
3 changed files with 33 additions and 17 deletions

View File

@ -66,6 +66,7 @@ export interface ConstructionSchedulePlanForm extends BaseEntity {
*/
id?: string | number;
parentId?: string | number;
projectStructureName?: string;
/**
* 项目ID
*/

View File

@ -27,6 +27,21 @@
<el-col :span="1.5">
<el-button type="primary" plain icon="Plus" @click="handleAdd()" v-hasPermi="['progress:constructionSchedulePlan:add']">新增</el-button>
</el-col>
<el-col :span="1.5">
<file-upload
upload-url="/progress/constructionSchedulePlan/readTemplate"
v-model="file"
:limit="1"
:data="{ projectId: queryParams.projectId }"
:file-type="['xls', 'xlsx']"
:on-upload-success="handleSuccess"
>
<el-button type="primary" plain icon="upload">导入</el-button>
</file-upload>
</el-col>
<el-col :span="1.5">
<el-button type="primary" plain icon="Filter" @click="handleExport">导出</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="info" plain icon="Sort" @click="handleToggleExpandAll">展开/折叠</el-button>
</el-col>
@ -126,22 +141,10 @@
<el-date-picker clearable v-model="form.planEndDate" type="date" value-format="YYYY-MM-DD" placeholder="选择预计结束时间" />
</el-form-item>
<el-form-item label="实际开始时间" prop="practicalStartDate">
<el-date-picker
clearable
v-model="form.practicalStartDate"
type="date"
value-format="YYYY-MM-DD"
placeholder="选择实际开始时间"
/>
<el-date-picker clearable v-model="form.practicalStartDate" type="date" value-format="YYYY-MM-DD" placeholder="选择实际开始时间" />
</el-form-item>
<el-form-item label="实际结束时间" prop="practicalEndDate">
<el-date-picker
clearable
v-model="form.practicalEndDate"
type="date"
value-format="YYYY-MM-DD"
placeholder="选择实际结束时间"
/>
<el-date-picker clearable v-model="form.practicalEndDate" type="date" value-format="YYYY-MM-DD" placeholder="选择实际结束时间" />
</el-form-item>
<el-form-item label="状态" prop="status">
<el-select v-model="form.status" placeholder="请选择状态">
@ -221,6 +224,7 @@ const initFormData = {
remark: undefined,
projectStructureName: undefined
};
const file = ref();
const data = reactive<PageData<ConstructionSchedulePlanForm, ConstructionSchedulePlanQuery>>({
form: { ...initFormData },
@ -279,6 +283,17 @@ const cancel = () => {
dialog.visible = false;
};
const handleExport = async () => {
const ids = queryParams.value.projectId;
proxy?.download('/progress/constructionSchedulePlan/exportTemplate/' + ids, {}, `施工里程碑计划模版.xlsx`, true);
};
const handleSuccess = () => {
console.log(111);
proxy.$modal.msgSuccess('操作成功');
getList();
};
// 表单重置
const reset = () => {
form.value = { ...initFormData };