解决路由bug

This commit is contained in:
Teo
2025-07-14 16:10:03 +08:00
parent 748464b44a
commit d03efb8d6f
10 changed files with 62 additions and 66 deletions

View File

@ -14,7 +14,7 @@ VITE_APP_MONITOR_ADMIN = '/admin/applications'
VITE_APP_SNAILJOB_ADMIN = '/snail-job' VITE_APP_SNAILJOB_ADMIN = '/snail-job'
# 生产环境 # 生产环境
VITE_APP_BASE_API = 'http://192.168.110.2:8899' VITE_APP_BASE_API = 'http://58.17.134.85:8899'
# 是否在打包时开启压缩,支持 gzip 和 brotli # 是否在打包时开启压缩,支持 gzip 和 brotli
VITE_BUILD_COMPRESS = gzip VITE_BUILD_COMPRESS = gzip

View File

@ -10,11 +10,10 @@ export function getDicts(dictType: string): AxiosPromise<DictDataVO[]> {
} }
// 查询字典数据列表 // 查询字典数据列表
export function listData(query: DictDataQuery): AxiosPromise<DictDataVO[]> { export function listData(query: string): AxiosPromise<DictDataVO[]> {
return request({ return request({
url: '/system/dict/data/list', url: '/system/dict/data/type/' + query,
method: 'get', method: 'get'
params: query
}); });
} }

View File

@ -15,13 +15,15 @@
<el-table-column align="center" prop="changeContent" label="变更内容" /> <el-table-column align="center" prop="changeContent" label="变更内容" />
<el-table-column align="center" prop="costEstimate" label="变更费用估算1" /> <el-table-column align="center" prop="costEstimate" label="变更费用估算1" />
<el-table-column label="流程状态" align="center" prop="status"> <el-table-column label="流程状态" align="center" prop="status">
<template #default="scope"> <template #default="scope">
<dict-tag :options="wf_business_status" :value="scope.row.status" /> <dict-tag :options="wf_business_status" :value="scope.row.status" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="content" label="操作" width="240"> <el-table-column align="center" prop="content" label="操作" width="240">
<template #default="scope"> <template #default="scope">
<el-button link type="warning" v-if="scope.row.status === 'draft'" icon="Edit" @click="handleUpdate(scope.row)" class="ml-3">审批 </el-button> <el-button link type="warning" v-if="scope.row.status === 'draft'" icon="Edit" @click="handleUpdate(scope.row)" class="ml-3"
>审批
</el-button>
<el-button link type="primary" icon="View" @click="handleViewInfo(scope.row)" class="ml-3"> 查看流程 </el-button> <el-button link type="primary" icon="View" @click="handleViewInfo(scope.row)" class="ml-3"> 查看流程 </el-button>
<el-button link type="success" icon="View" @click="handleDetail(scope.row)" class="ml-3"> 详情 </el-button> <el-button link type="success" icon="View" @click="handleDetail(scope.row)" class="ml-3"> 详情 </el-button>
<el-button link type="danger" icon="Delete" @click="handleDelete(scope.row)"> 删除 </el-button> <el-button link type="danger" icon="Delete" @click="handleDelete(scope.row)"> 删除 </el-button>
@ -153,9 +155,9 @@ const props = defineProps({
type: Array, type: Array,
default: () => [] default: () => []
}, },
thumbnail:{ thumbnail: {
type: String, type: String,
default:'' default: ''
} }
}); });
const tableDetail = ref<any>({}); const tableDetail = ref<any>({});
@ -195,8 +197,8 @@ const handleUpdate = (row) => {
proxy.$router.push({ proxy.$router.push({
path: `/cory/template/indexEdit`, path: `/cory/template/indexEdit`,
query: { query: {
thumbnailUrl:props.thumbnail, thumbnailUrl: props.thumbnail,
row:JSON.stringify(row), row: JSON.stringify(row),
id: row.id, id: row.id,
type: 'update' type: 'update'
} }
@ -208,8 +210,8 @@ const handleViewInfo = (row) => {
proxy.$router.push({ proxy.$router.push({
path: `/cory/template/indexEdit`, path: `/cory/template/indexEdit`,
query: { query: {
thumbnailUrl:props.thumbnail, thumbnailUrl: props.thumbnail,
row:JSON.stringify(row), row: JSON.stringify(row),
id: row.id, id: row.id,
type: 'view' type: 'view'
} }

View File

@ -39,11 +39,7 @@
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
</template> </template>
<Contactform <Contactform @selection-change="handleSelectionChange" :data="tableData" @delete="handleDelete"></Contactform>
@selection-change="handleSelectionChange"
:data="tableData"
@delete="handleDelete"
></Contactform>
<pagination <pagination
v-show="total > 0" v-show="total > 0"
:total="total" :total="total"
@ -127,7 +123,7 @@ const currentProject = computed(() => userStore.selectedProject);
const thumbnailUrl = ref(''); const thumbnailUrl = ref('');
const tableData = ref([]); const tableData = ref([]);
const total = ref(0); const total = ref(0);
const activeName = ref('1') const activeName = ref('1');
const formRef = ref<FormInstance>(); const formRef = ref<FormInstance>();
const dialogVisible = ref<boolean>(false); const dialogVisible = ref<boolean>(false);
const showSearch = ref(true); const showSearch = ref(true);
@ -274,23 +270,23 @@ const selectType = (value: string) => {
getList(); getList();
}; };
const handleClick=(val)=>{ const handleClick = (val) => {
console.log(val); console.log(val);
queryParams.value.projectType=val.props.name; queryParams.value.projectType = val.props.name;
getList(); getList();
} };
const handleAddApp=(row)=>{ const handleAddApp = (row) => {
// 添加审批 // 添加审批
proxy.$tab.closePage(proxy.$route); proxy.$tab.closePage(proxy.$route);
proxy.$router.push({ proxy.$router.push({
path: `/cory/template/indexEdit`, path: `/relation-management/template/indexEdit`,
query: { query: {
thumbnailUrl: projectTypeOptions.value[1].thumbnail, thumbnailUrl: projectTypeOptions.value[1].thumbnail,
row, row,
type: 'add' type: 'add'
} }
}); });
} };
onMounted(() => { onMounted(() => {
getList(); getList();
}); });

View File

@ -16,15 +16,16 @@
<el-form-item label="专业" prop="specialty"> <el-form-item label="专业" prop="specialty">
<el-input v-model="queryParams.specialty" placeholder="请输入专业" clearable @keyup.enter="handleQuery" /> <el-input v-model="queryParams.specialty" placeholder="请输入专业" clearable @keyup.enter="handleQuery" />
</el-form-item> </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-form-item label="卷册名称" prop="volumeName">
<el-input v-model="queryParams.volumeName" placeholder="请输入卷册名称" clearable @keyup.enter="handleQuery" /> <el-input v-model="queryParams.volumeName" placeholder="请输入卷册名称" clearable @keyup.enter="handleQuery" />
</el-form-item> </el-form-item>
<el-form-item label="卷册号" prop="volumeNo"> <el-form-item label="卷册号" prop="volumeNo">
<el-input v-model="queryParams.volumeNo" placeholder="请输入卷册号" clearable @keyup.enter="handleQuery" /> <el-input v-model="queryParams.volumeNo" placeholder="请输入卷册号" clearable @keyup.enter="handleQuery" />
</el-form-item> </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> <el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button> <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button> <el-button icon="Refresh" @click="resetQuery">重置</el-button>
@ -82,7 +83,7 @@
<el-button link type="primary" icon="View" @click="handleViewInfo(scope.row)"></el-button> <el-button link type="primary" icon="View" @click="handleViewInfo(scope.row)"></el-button>
</el-tooltip> </el-tooltip>
<el-tooltip content="查看文档" placement="top"> <el-tooltip content="查看文档" placement="top">
<el-button link type="primary" icon="Word" @click="handleView(scope.row)"></el-button> <el-button link type="primary" icon="Document" @click="handleView(scope.row)"></el-button>
</el-tooltip> </el-tooltip>
<el-tooltip content="修改" placement="top"> <el-tooltip content="修改" placement="top">
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['design:designChange:edit']"></el-button> <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['design:designChange:edit']"></el-button>
@ -173,7 +174,7 @@ const handleSelectionChange = (selection: DesignChangeVO[]) => {
const handleAdd = () => { const handleAdd = () => {
proxy.$tab.closePage(proxy.$route); proxy.$tab.closePage(proxy.$route);
proxy.$router.push({ proxy.$router.push({
path: `/test/designChange/indexEdit`, path: `/design-management/designChange/indexEdit`,
query: { query: {
type: 'add' type: 'add'
} }
@ -184,7 +185,7 @@ const handleAdd = () => {
const handleUpdate = async (row?: DesignChangeVO) => { const handleUpdate = async (row?: DesignChangeVO) => {
proxy.$tab.closePage(proxy.$route); proxy.$tab.closePage(proxy.$route);
proxy.$router.push({ proxy.$router.push({
path: `/test/designChange/indexEdit`, path: `/design-management/designChange/indexEdit`,
query: { query: {
id: row.id, id: row.id,
type: 'update' type: 'update'
@ -195,7 +196,7 @@ const handleUpdate = async (row?: DesignChangeVO) => {
const handleViewInfo = (row) => { const handleViewInfo = (row) => {
proxy.$tab.closePage(proxy.$route); proxy.$tab.closePage(proxy.$route);
proxy.$router.push({ proxy.$router.push({
path: `/test/designChange/indexEdit`, path: `/design-management/designChange/indexEdit`,
query: { query: {
id: row.id, id: row.id,
type: 'view' type: 'view'

View File

@ -161,7 +161,7 @@ const handleSelectionChange = (selection: DrawingVO[]) => {
const handleAdd = () => { const handleAdd = () => {
proxy.$tab.closePage(proxy.$route); proxy.$tab.closePage(proxy.$route);
proxy.$router.push({ proxy.$router.push({
path: `/test/drawing/indexEdit`, path: `/design-management/drawing/indexEdit`,
query: { query: {
type: 'add' type: 'add'
} }
@ -172,7 +172,7 @@ const handleAdd = () => {
const handleUpdate = async (row?: DrawingVO) => { const handleUpdate = async (row?: DrawingVO) => {
proxy.$tab.closePage(proxy.$route); proxy.$tab.closePage(proxy.$route);
proxy.$router.push({ proxy.$router.push({
path: `/test/drawing/indexEdit`, path: `/design-management/drawing/indexEdit`,
query: { query: {
id: row.id, id: row.id,
type: 'update' type: 'update'
@ -198,7 +198,7 @@ const handleView = (row) => {
const handleViewInfo = (row?: LeaveVO) => { const handleViewInfo = (row?: LeaveVO) => {
proxy.$tab.closePage(proxy.$route); proxy.$tab.closePage(proxy.$route);
proxy.$router.push({ proxy.$router.push({
path: `/test/drawing/indexEdit`, path: `/design-management/drawing/indexEdit`,
query: { query: {
id: row.id, id: row.id,
type: 'view' type: 'view'

View File

@ -152,7 +152,7 @@ const handleSelectionChange = (selection: SpecialSchemeVO[]) => {
const handleAdd = () => { const handleAdd = () => {
proxy.$tab.closePage(proxy.$route); proxy.$tab.closePage(proxy.$route);
proxy.$router.push({ proxy.$router.push({
path: `/test/specialScheme/indexEdit`, path: `/design-management/specialScheme/indexEdit`,
query: { query: {
type: 'add' type: 'add'
} }
@ -163,7 +163,7 @@ const handleAdd = () => {
const handleUpdate = async (row?: SpecialSchemeVO) => { const handleUpdate = async (row?: SpecialSchemeVO) => {
proxy.$tab.closePage(proxy.$route); proxy.$tab.closePage(proxy.$route);
proxy.$router.push({ proxy.$router.push({
path: `/test/specialScheme/indexEdit`, path: `/design-management/specialScheme/indexEdit`,
query: { query: {
id: row.id, id: row.id,
type: 'update' type: 'update'
@ -186,7 +186,7 @@ const handleView = (row) => {
const handleViewInfo = (row) => { const handleViewInfo = (row) => {
proxy.$tab.closePage(proxy.$route); proxy.$tab.closePage(proxy.$route);
proxy.$router.push({ proxy.$router.push({
path: `/test/specialScheme/indexEdit`, path: `/design-management/specialScheme/indexEdit`,
query: { query: {
id: row.id, id: row.id,
type: 'view' type: 'view'

View File

@ -475,7 +475,7 @@ onUnmounted(() => {
const handleApproval = (row) => { const handleApproval = (row) => {
proxy.$tab.closePage(proxy.$route); proxy.$tab.closePage(proxy.$route);
proxy.$router.push({ proxy.$router.push({
path: `/technicalStandard/indexEdit`, path: `/design-management/technicalStandard/indexEdit`,
query: { query: {
id: row.id, id: row.id,
type: 'update' type: 'update'
@ -485,7 +485,7 @@ const handleApproval = (row) => {
const handleViewApproval = (row) => { const handleViewApproval = (row) => {
proxy.$tab.closePage(proxy.$route); proxy.$tab.closePage(proxy.$route);
proxy.$router.push({ proxy.$router.push({
path: `/technicalStandard/indexEdit`, path: `/design-management/technicalStandard/indexEdit`,
query: { query: {
id: row.id, id: row.id,
type: 'view' type: 'view'
@ -585,7 +585,7 @@ const handleViewApproval = (row) => {
} }
} }
.list_right { .list_right {
width:79.5%; width: 79.5%;
background: white; background: white;
border: 1px solid #ededed; border: 1px solid #ededed;
padding: 10px; padding: 10px;

View File

@ -288,12 +288,16 @@ const getList = async () => {
} }
} }
loading.value = true; loading.value = true;
console.log(queryParams.value); loading.value = true;
const res = await listProgressCategory(queryParams.value); try {
const data = proxy?.handleTree<ProgressCategoryVO>(res.data, 'id', 'pid'); const res = await listProgressCategory(queryParams.value);
if (data) { const data = proxy?.handleTree<ProgressCategoryVO>(res.data, 'id', 'pid');
progressCategoryList.value = data; if (data) {
progressCategoryList.value = data;
}
} finally {
// 不管成功或失败,最后都设置为 false
loading.value = false; loading.value = false;
} }
}; };

View File

@ -59,7 +59,7 @@
<el-table-column label="管理人联系电话" align="center" prop="custodianPhone" /> <el-table-column label="管理人联系电话" align="center" prop="custodianPhone" />
<el-table-column label="备注" align="center" prop="remark" /> <el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="创建时间" align="center" prop="createTime" width="180" /> <el-table-column label="创建时间" align="center" prop="createTime" width="180" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template #default="scope"> <template #default="scope">
<el-space wrap> <el-space wrap>
<el-button link type="primary" icon="View" @click="handleContractorFile(scope.row)">文件</el-button> <el-button link type="primary" icon="View" @click="handleContractorFile(scope.row)">文件</el-button>
@ -179,25 +179,19 @@ const data = reactive<PageData<ContractorForm, ContractorQuery>>({
const { queryParams, form, rules } = toRefs(data); const { queryParams, form, rules } = toRefs(data);
/** 查询字典数据列表 */ /** 查询字典数据列表 */
const getDictList = async () => { const getDictList = async () => {
const res = await listData({ const res = await listData('contractor_type');
pageNum: 1, dictList.value = res.data;
pageSize: 10,
dictName: '',
dictType: 'contractor_type',
dictLabel: ''
});
dictList.value = res.rows;
}; };
// 分包类型 // 分包类型
const filterType=(val)=>{ const filterType = (val) => {
let label=''; let label = '';
dictList.value.forEach(item=>{ dictList.value.forEach((item) => {
if(item.dictValue==val){ if (item.dictValue == val) {
label=item.dictLabel label = item.dictLabel;
} }
}) });
return label; return label;
} };
/** 查询分包单位列表 */ /** 查询分包单位列表 */
const getList = async () => { const getList = async () => {
loading.value = true; loading.value = true;