2025-07-03 20:51:47 +08:00
|
|
|
<template>
|
|
|
|
<div class="p-2">
|
|
|
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
|
|
|
<div v-show="showSearch" class="mb-[10px]">
|
|
|
|
<el-card shadow="hover">
|
|
|
|
<el-form ref="queryFormRef" :model="queryParams" :inline="true" label-width="110px">
|
|
|
|
<el-form-item label="申请单编号" prop="formNo">
|
|
|
|
<el-input v-model="queryParams.formNo" placeholder="请输入申请单编号" clearable @keyup.enter="handleQuery" />
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="工程名称" prop="projectName">
|
|
|
|
<el-input v-model="queryParams.projectName" placeholder="请输入工程名称" clearable @keyup.enter="handleQuery" />
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="提出单位" prop="submitUnit">
|
|
|
|
<el-input v-model="queryParams.submitUnit" placeholder="请输入提出单位" clearable @keyup.enter="handleQuery" />
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="专业" prop="specialty">
|
|
|
|
<el-input v-model="queryParams.specialty" placeholder="请输入专业" clearable @keyup.enter="handleQuery" />
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="提出日期" prop="submitDate">
|
|
|
|
<el-date-picker clearable v-model="queryParams.submitDate" type="date" value-format="YYYY-MM-DD" placeholder="请选择提出日期" />
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="卷册名称" prop="volumeName">
|
|
|
|
<el-input v-model="queryParams.volumeName" placeholder="请输入卷册名称" clearable @keyup.enter="handleQuery" />
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="卷册号" prop="volumeNo">
|
|
|
|
<el-input v-model="queryParams.volumeNo" 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">
|
2025-07-10 15:16:44 +08:00
|
|
|
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['design:designChange:add']">上传设计变更</el-button>
|
2025-07-03 20:51:47 +08:00
|
|
|
</el-col>
|
|
|
|
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
|
</el-row>
|
|
|
|
</template>
|
|
|
|
<el-table v-loading="loading" :data="designChangeList" @selection-change="handleSelectionChange">
|
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
|
<el-table-column label="申请单编号" align="center" prop="formNo" />
|
|
|
|
<el-table-column label="工程名称" align="center" prop="projectName" />
|
|
|
|
<el-table-column label="提出单位" align="center" prop="submitUnit" />
|
|
|
|
<el-table-column label="专业" align="center" prop="specialty" />
|
|
|
|
<el-table-column label="提出日期" align="center" prop="submitDate" width="180">
|
|
|
|
<template #default="scope">
|
|
|
|
<span>{{ parseTime(scope.row.submitDate, '{y}-{m}-{d}') }}</span>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column label="卷册名称" align="center" prop="volumeName" />
|
|
|
|
<el-table-column label="卷册号" align="center" prop="volumeNo" />
|
|
|
|
<el-table-column label="变更原因" align="center" prop="changeReason">
|
|
|
|
<template #default="scope">
|
|
|
|
<dict-tag :options="design_change_reason_type" :value="scope.row.changeReason ? scope.row.changeReason.split(',') : []" />
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column label="变更内容" align="center" prop="changeContent" />
|
|
|
|
<!-- <el-table-column label="变更费用估算" align="center" prop="costEstimation" /> -->
|
2025-07-11 11:18:01 +08:00
|
|
|
<el-table-column label="变更文件" align="center">
|
2025-07-10 15:16:44 +08:00
|
|
|
<template #default="scope">
|
2025-07-11 11:18:01 +08:00
|
|
|
<span v-if="scope.row.file" style="color: rgb(41 145 255); cursor: pointer" @click="onOpen(scope.row.file.url)">
|
|
|
|
{{ scope.row.file.originalName }}</span
|
|
|
|
>
|
2025-07-10 15:16:44 +08:00
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column label="流程状态" align="center" prop="status">
|
2025-07-03 20:51:47 +08:00
|
|
|
<template #default="scope">
|
2025-07-10 15:16:44 +08:00
|
|
|
<dict-tag :options="wf_business_status" :value="scope.row.status" />
|
2025-07-03 20:51:47 +08:00
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column label="备注" align="center" prop="remark" />
|
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
|
<template #default="scope">
|
2025-07-10 15:16:44 +08:00
|
|
|
<el-tooltip content="查看流程" placement="top">
|
|
|
|
<el-button link type="primary" icon="View" @click="handleViewInfo(scope.row)"></el-button>
|
|
|
|
</el-tooltip>
|
|
|
|
<el-tooltip content="查看文档" placement="top">
|
|
|
|
<el-button link type="primary" icon="Word" @click="handleView(scope.row)"></el-button>
|
2025-07-03 20:51:47 +08:00
|
|
|
</el-tooltip>
|
|
|
|
<el-tooltip content="修改" placement="top">
|
|
|
|
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['design:designChange:edit']"></el-button>
|
|
|
|
</el-tooltip>
|
|
|
|
<el-tooltip content="删除" placement="top">
|
|
|
|
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['design:designChange:remove']"></el-button>
|
|
|
|
</el-tooltip>
|
|
|
|
</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>
|
|
|
|
<wordDetial ref="wordDetialRef"></wordDetial>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup name="DesignChange" lang="ts">
|
2025-07-11 11:18:01 +08:00
|
|
|
import { listDesignChange, delDesignChange } from '@/api/design/designChange';
|
|
|
|
import { DesignChangeVO } from '@/api/design/designChange/types';
|
2025-07-03 20:51:47 +08:00
|
|
|
import { useUserStoreHook } from '@/store/modules/user';
|
|
|
|
import wordDetial from '@/components/wordDetial/index';
|
|
|
|
|
|
|
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
|
|
const { design_change_reason_type } = toRefs<any>(proxy?.useDict('design_change_reason_type'));
|
|
|
|
// 获取用户 store
|
|
|
|
const userStore = useUserStoreHook();
|
|
|
|
// 从 store 中获取项目列表和当前选中的项目
|
|
|
|
const currentProject = computed(() => userStore.selectedProject);
|
|
|
|
const designChangeList = ref<DesignChangeVO[]>([]);
|
|
|
|
const wordDetialRef = ref<InstanceType<typeof wordDetial>>();
|
|
|
|
const loading = ref(true);
|
|
|
|
const showSearch = ref(true);
|
|
|
|
const ids = ref<Array<string | number>>([]);
|
|
|
|
const single = ref(true);
|
|
|
|
const multiple = ref(true);
|
|
|
|
const total = ref(0);
|
2025-07-10 15:16:44 +08:00
|
|
|
const { wf_business_status } = toRefs<any>(proxy?.useDict('wf_business_status'));
|
2025-07-03 20:51:47 +08:00
|
|
|
const queryFormRef = ref<ElFormInstance>();
|
2025-07-10 15:16:44 +08:00
|
|
|
const data = reactive({
|
2025-07-03 20:51:47 +08:00
|
|
|
queryParams: {
|
|
|
|
pageNum: 1,
|
|
|
|
pageSize: 10,
|
|
|
|
projectId: currentProject.value?.id,
|
|
|
|
formNo: undefined,
|
|
|
|
projectName: undefined,
|
|
|
|
submitUnit: undefined,
|
|
|
|
specialty: undefined,
|
|
|
|
submitDate: undefined,
|
|
|
|
volumeName: undefined,
|
|
|
|
volumeNo: undefined,
|
|
|
|
changeReason: undefined,
|
|
|
|
status: undefined,
|
|
|
|
params: {}
|
2025-07-11 11:18:01 +08:00
|
|
|
}
|
2025-07-03 20:51:47 +08:00
|
|
|
});
|
|
|
|
|
2025-07-11 11:18:01 +08:00
|
|
|
const { queryParams } = toRefs(data);
|
2025-07-03 20:51:47 +08:00
|
|
|
|
|
|
|
/** 查询设计变更管理列表 */
|
|
|
|
const getList = async () => {
|
|
|
|
loading.value = true;
|
|
|
|
const res = await listDesignChange(queryParams.value);
|
|
|
|
designChangeList.value = res.rows;
|
|
|
|
total.value = res.total;
|
|
|
|
loading.value = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
/** 搜索按钮操作 */
|
|
|
|
const handleQuery = () => {
|
|
|
|
queryParams.value.pageNum = 1;
|
|
|
|
getList();
|
|
|
|
};
|
|
|
|
|
|
|
|
/** 重置按钮操作 */
|
|
|
|
const resetQuery = () => {
|
|
|
|
queryFormRef.value?.resetFields();
|
|
|
|
handleQuery();
|
|
|
|
};
|
|
|
|
|
|
|
|
/** 多选框选中数据 */
|
|
|
|
const handleSelectionChange = (selection: DesignChangeVO[]) => {
|
|
|
|
ids.value = selection.map((item) => item.id);
|
|
|
|
single.value = selection.length != 1;
|
|
|
|
multiple.value = !selection.length;
|
|
|
|
};
|
|
|
|
|
|
|
|
/** 新增按钮操作 */
|
|
|
|
const handleAdd = () => {
|
2025-07-10 15:16:44 +08:00
|
|
|
proxy.$tab.closePage(proxy.$route);
|
|
|
|
proxy.$router.push({
|
2025-07-11 11:18:01 +08:00
|
|
|
path: `/test/designChange/indexEdit`,
|
2025-07-10 15:16:44 +08:00
|
|
|
query: {
|
|
|
|
type: 'add'
|
|
|
|
}
|
|
|
|
});
|
2025-07-03 20:51:47 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
/** 修改按钮操作 */
|
|
|
|
const handleUpdate = async (row?: DesignChangeVO) => {
|
2025-07-10 15:16:44 +08:00
|
|
|
proxy.$tab.closePage(proxy.$route);
|
|
|
|
proxy.$router.push({
|
2025-07-11 11:18:01 +08:00
|
|
|
path: `/test/designChange/indexEdit`,
|
2025-07-10 15:16:44 +08:00
|
|
|
query: {
|
|
|
|
id: row.id,
|
|
|
|
type: 'update'
|
|
|
|
}
|
|
|
|
});
|
2025-07-03 20:51:47 +08:00
|
|
|
};
|
2025-07-10 15:16:44 +08:00
|
|
|
/** 查看按钮操作 */
|
|
|
|
const handleViewInfo = (row) => {
|
|
|
|
proxy.$tab.closePage(proxy.$route);
|
|
|
|
proxy.$router.push({
|
2025-07-11 11:18:01 +08:00
|
|
|
path: `/test/designChange/indexEdit`,
|
2025-07-10 15:16:44 +08:00
|
|
|
query: {
|
|
|
|
id: row.id,
|
|
|
|
type: 'view'
|
2025-07-03 20:51:47 +08:00
|
|
|
}
|
|
|
|
});
|
|
|
|
};
|
|
|
|
/** 删除按钮操作 */
|
|
|
|
const handleDelete = async (row?: DesignChangeVO) => {
|
|
|
|
const _ids = row?.id || ids.value;
|
|
|
|
await proxy?.$modal.confirm('是否确认删除设计变更管理编号为"' + _ids + '"的数据项?').finally(() => (loading.value = false));
|
|
|
|
await delDesignChange(_ids);
|
|
|
|
proxy?.$modal.msgSuccess('删除成功');
|
|
|
|
await getList();
|
|
|
|
};
|
|
|
|
const handleView = (row) => {
|
|
|
|
// 查看详情
|
2025-07-08 16:39:42 +08:00
|
|
|
wordDetialRef.value?.openDialog(row, design_change_reason_type.value);
|
2025-07-03 20:51:47 +08:00
|
|
|
};
|
|
|
|
// 预览
|
|
|
|
const onOpen = (path: string) => {
|
2025-07-08 16:39:42 +08:00
|
|
|
window.open(path, '_blank');
|
2025-07-03 20:51:47 +08:00
|
|
|
};
|
|
|
|
onMounted(() => {
|
|
|
|
getList();
|
|
|
|
});
|
2025-07-08 16:39:42 +08:00
|
|
|
//监听项目id刷新数据
|
|
|
|
const listeningProject = watch(
|
|
|
|
() => currentProject.value.id,
|
|
|
|
(nid, oid) => {
|
|
|
|
queryParams.value.projectId = nid;
|
|
|
|
getList();
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
|
|
|
onUnmounted(() => {
|
|
|
|
listeningProject();
|
|
|
|
});
|
2025-07-03 20:51:47 +08:00
|
|
|
</script>
|