重构进度填报

This commit is contained in:
Teo
2025-07-08 16:39:42 +08:00
parent 6c7b99ec50
commit 8ef37c5a96
53 changed files with 8882 additions and 350 deletions

View File

@ -70,7 +70,7 @@
<!-- <el-table-column label="变更费用估算" align="center" prop="costEstimation" /> -->
<el-table-column label="变更文件" align="center" prop="fileId">
<template #default="scope">
<span style="color: rgb(41 145 255);cursor: pointer" @click="onOpen(scope.row.file.url)"> {{ scope.row.file.originalName }}</span>
<span style="color: rgb(41 145 255); cursor: pointer" @click="onOpen(scope.row.file.url)"> {{ scope.row.file.originalName }}</span>
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="remark" />
@ -120,7 +120,7 @@
</el-col>
<el-col :span="12">
<el-form-item label="提出日期" prop="submitDate">
<el-date-picker clearable v-model="form.submitDate" type="date" value-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择提出日期">
<el-date-picker clearable v-model="form.submitDate" type="date" value-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择提出日期">
</el-date-picker> </el-form-item
></el-col>
<el-col :span="12">
@ -332,13 +332,26 @@ const handleDelete = async (row?: DesignChangeVO) => {
};
const handleView = (row) => {
// 查看详情
wordDetialRef.value?.openDialog(row,design_change_reason_type.value);
wordDetialRef.value?.openDialog(row, design_change_reason_type.value);
};
// 预览
const onOpen = (path: string) => {
window.open(path, '_blank');
window.open(path, '_blank');
};
onMounted(() => {
getList();
});
//监听项目id刷新数据
const listeningProject = watch(
() => currentProject.value.id,
(nid, oid) => {
queryParams.value.projectId = nid;
form.value.projectId = nid;
getList();
}
);
onUnmounted(() => {
listeningProject();
});
</script>

View File

@ -216,7 +216,7 @@ const handleSelectionChange = (selection: DrawingVO[]) => {
const handleAdd = () => {
proxy.$tab.closePage(proxy.$route);
proxy.$router.push({
path: `/workflow/drawing/indexEdit`,
path: `/workflows/drawing/indexEdit`,
query: {
type: 'add'
}
@ -227,7 +227,7 @@ const handleAdd = () => {
const handleUpdate = async (row?: DrawingVO) => {
proxy.$tab.closePage(proxy.$route);
proxy.$router.push({
path: `/workflow/drawing/indexEdit`,
path: `/workflows/drawing/indexEdit`,
query: {
id: row.id,
type: 'update'
@ -283,4 +283,17 @@ const handleClick = (val) => {
onMounted(() => {
getList();
});
</script>
//监听项目id刷新数据
const listeningProject = watch(
() => currentProject.value.id,
(nid, oid) => {
queryParams.value.projectId = nid;
form.value.projectId = nid;
getList();
}
);
onUnmounted(() => {
listeningProject();
});
</script>

View File

@ -14,8 +14,8 @@
<el-input v-model="queryParams.originalName" placeholder="请输入原文件名" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item label="审核状态" prop="status">
<el-select v-model="queryParams.status" placeholder="请选择审核状态" clearable >
<el-option v-for="dict in wf_business_status" :key="dict.value" :label="dict.label" :value="dict.value"/>
<el-select v-model="queryParams.status" placeholder="请选择审核状态" clearable>
<el-option v-for="dict in wf_business_status" :key="dict.value" :label="dict.label" :value="dict.value" />
</el-select>
</el-form-item>
<el-form-item>
@ -46,12 +46,11 @@
<el-table-column label="原文件名" align="center" prop="originalName" />
<el-table-column label="流程状态" align="center" prop="status">
<template #default="scope">
<dict-tag :options="wf_business_status" :value="scope.row.status"/>
<dict-tag :options="wf_business_status" :value="scope.row.status" />
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="上传时间" align="center" prop="createTime" width="180">
</el-table-column>
<el-table-column label="上传时间" align="center" prop="createTime" width="180"> </el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding">
<template #default="scope">
<el-row :gutter="10" class="mb8">
@ -68,7 +67,9 @@
</el-row>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" size="small" icon="View" v-if="scope.row.status != 'draft'" @click="handleViewInfo(scope.row)">查看</el-button>
<el-button type="primary" size="small" icon="View" v-if="scope.row.status != 'draft'" @click="handleViewInfo(scope.row)"
>查看</el-button
>
</el-col>
<el-col :span="1.5" v-if="scope.row.status === 'waiting'">
<el-button size="small" type="primary" icon="Notification" @click="handleCancelProcessApply(scope.row.id)">撤销</el-button>
@ -119,10 +120,10 @@ const initFormData: SpecialSchemeForm = {
fileName: undefined,
fileUrl: undefined,
fileSuffix: undefined,
remark: undefined,
}
remark: undefined
};
const data = reactive<PageData<SpecialSchemeForm, SpecialSchemeQuery>>({
form: {...initFormData},
form: { ...initFormData },
queryParams: {
pageNum: 1,
pageSize: 10,
@ -131,16 +132,11 @@ const data = reactive<PageData<SpecialSchemeForm, SpecialSchemeQuery>>({
fileName: undefined,
originalName: undefined,
status: undefined,
params: {
}
params: {}
},
rules: {
versionNumber: [
{ required: true, message: "版本号不能为空", trigger: "blur" }
],
fileName: [
{ required: true, message: "文件名称不能为空", trigger: "blur" }
],
versionNumber: [{ required: true, message: '版本号不能为空', trigger: 'blur' }],
fileName: [{ required: true, message: '文件名称不能为空', trigger: 'blur' }]
}
});
@ -153,61 +149,61 @@ const getList = async () => {
specialSchemeList.value = res.rows;
total.value = res.total;
loading.value = false;
}
};
/** 取消按钮 */
const cancel = () => {
reset();
dialog.visible = false;
}
};
/** 表单重置 */
const reset = () => {
form.value = {...initFormData};
form.value = { ...initFormData };
specialSchemeFormRef.value?.resetFields();
}
};
/** 搜索按钮操作 */
const handleQuery = () => {
queryParams.value.pageNum = 1;
getList();
}
};
/** 重置按钮操作 */
const resetQuery = () => {
queryFormRef.value?.resetFields();
handleQuery();
}
};
/** 多选框选中数据 */
const handleSelectionChange = (selection: SpecialSchemeVO[]) => {
ids.value = selection.map(item => item.id);
ids.value = selection.map((item) => item.id);
single.value = selection.length != 1;
multiple.value = !selection.length;
}
};
/** 新增按钮操作 */
const handleAdd = () => {
proxy.$tab.closePage(proxy.$route);
proxy.$router.push({
path: `/workflow/specialScheme/indexEdit`,
path: `/workflows/specialScheme/indexEdit`,
query: {
type: 'add'
}
});
}
};
/** 修改按钮操作 */
const handleUpdate = async (row?: SpecialSchemeVO) => {
proxy.$tab.closePage(proxy.$route);
proxy.$router.push({
path: `/workflow/specialScheme/indexEdit`,
path: `/workflows/specialScheme/indexEdit`,
query: {
id: row.id,
id: row.id,
type: 'update'
}
});
}
};
/** 提交按钮 */
const submitForm = () => {
@ -215,34 +211,34 @@ const submitForm = () => {
if (valid) {
buttonLoading.value = true;
if (form.value.id) {
await updateSpecialScheme(form.value).finally(() => buttonLoading.value = false);
await updateSpecialScheme(form.value).finally(() => (buttonLoading.value = false));
} else {
await addSpecialScheme(form.value).finally(() => buttonLoading.value = false);
await addSpecialScheme(form.value).finally(() => (buttonLoading.value = false));
}
proxy?.$modal.msgSuccess("操作成功");
proxy?.$modal.msgSuccess('操作成功');
dialog.visible = false;
await getList();
}
});
}
};
/** 删除按钮操作 */
const handleDelete = async (row?: SpecialSchemeVO) => {
const _ids = row?.id || ids.value;
await proxy?.$modal.confirm('是否确认删除专项方案管理编号为"' + _ids + '"的数据项?').finally(() => loading.value = false);
await proxy?.$modal.confirm('是否确认删除专项方案管理编号为"' + _ids + '"的数据项?').finally(() => (loading.value = false));
await delSpecialScheme(_ids);
proxy?.$modal.msgSuccess("删除成功");
proxy?.$modal.msgSuccess('删除成功');
await getList();
}
};
const handleView = (row) => {
var url= row.file.url
var url = row.file.url;
window.open(url, '_blank');
};
/** 查看按钮操作 */
const handleViewInfo = (row) => {
proxy.$tab.closePage(proxy.$route);
proxy.$router.push({
path: `/workflow/specialScheme/indexEdit`,
path: `/workflows/specialScheme/indexEdit`,
query: {
id: row.id,
type: 'view'
@ -264,4 +260,17 @@ const handleCancelProcessApply = async (id: string) => {
onMounted(() => {
getList();
});
//监听项目id刷新数据
const listeningProject = watch(
() => currentProject.value.id,
(nid, oid) => {
queryParams.value.projectId = nid;
form.value.projectId = nid;
getList();
}
);
onUnmounted(() => {
listeningProject();
});
</script>

View File

@ -443,6 +443,24 @@ const onBook = () => {
onMounted(() => {
gettreeStructureData();
});
//监听项目id刷新数据
const listeningProject = watch(
() => currentProject.value.id,
(nid, oid) => {
state.projectId = nid;
state.paramsQuery.projectId = nid;
if (activeName.value === 'first') {
gettreeStructureData();
} else {
// 回收站
recylingRef.value.getDocumentDataList();
}
}
);
onUnmounted(() => {
listeningProject();
});
</script>
<style lang="scss" scoped>