解决路由bug
This commit is contained in:
@ -14,7 +14,7 @@ VITE_APP_MONITOR_ADMIN = '/admin/applications'
|
||||
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
|
||||
VITE_BUILD_COMPRESS = gzip
|
||||
|
@ -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({
|
||||
url: '/system/dict/data/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
url: '/system/dict/data/type/' + query,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -21,7 +21,9 @@
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="content" label="操作" width="240">
|
||||
<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="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>
|
||||
@ -153,9 +155,9 @@ const props = defineProps({
|
||||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
thumbnail:{
|
||||
thumbnail: {
|
||||
type: String,
|
||||
default:''
|
||||
default: ''
|
||||
}
|
||||
});
|
||||
const tableDetail = ref<any>({});
|
||||
@ -195,8 +197,8 @@ const handleUpdate = (row) => {
|
||||
proxy.$router.push({
|
||||
path: `/cory/template/indexEdit`,
|
||||
query: {
|
||||
thumbnailUrl:props.thumbnail,
|
||||
row:JSON.stringify(row),
|
||||
thumbnailUrl: props.thumbnail,
|
||||
row: JSON.stringify(row),
|
||||
id: row.id,
|
||||
type: 'update'
|
||||
}
|
||||
@ -208,8 +210,8 @@ const handleViewInfo = (row) => {
|
||||
proxy.$router.push({
|
||||
path: `/cory/template/indexEdit`,
|
||||
query: {
|
||||
thumbnailUrl:props.thumbnail,
|
||||
row:JSON.stringify(row),
|
||||
thumbnailUrl: props.thumbnail,
|
||||
row: JSON.stringify(row),
|
||||
id: row.id,
|
||||
type: 'view'
|
||||
}
|
||||
|
@ -39,11 +39,7 @@
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
</template>
|
||||
<Contactform
|
||||
@selection-change="handleSelectionChange"
|
||||
:data="tableData"
|
||||
@delete="handleDelete"
|
||||
></Contactform>
|
||||
<Contactform @selection-change="handleSelectionChange" :data="tableData" @delete="handleDelete"></Contactform>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
@ -127,7 +123,7 @@ const currentProject = computed(() => userStore.selectedProject);
|
||||
const thumbnailUrl = ref('');
|
||||
const tableData = ref([]);
|
||||
const total = ref(0);
|
||||
const activeName = ref('1')
|
||||
const activeName = ref('1');
|
||||
const formRef = ref<FormInstance>();
|
||||
const dialogVisible = ref<boolean>(false);
|
||||
const showSearch = ref(true);
|
||||
@ -274,23 +270,23 @@ const selectType = (value: string) => {
|
||||
getList();
|
||||
};
|
||||
|
||||
const handleClick=(val)=>{
|
||||
const handleClick = (val) => {
|
||||
console.log(val);
|
||||
queryParams.value.projectType=val.props.name;
|
||||
queryParams.value.projectType = val.props.name;
|
||||
getList();
|
||||
}
|
||||
const handleAddApp=(row)=>{
|
||||
};
|
||||
const handleAddApp = (row) => {
|
||||
// 添加审批
|
||||
proxy.$tab.closePage(proxy.$route);
|
||||
proxy.$router.push({
|
||||
path: `/cory/template/indexEdit`,
|
||||
path: `/relation-management/template/indexEdit`,
|
||||
query: {
|
||||
thumbnailUrl: projectTypeOptions.value[1].thumbnail,
|
||||
row,
|
||||
type: 'add'
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
|
@ -16,15 +16,16 @@
|
||||
<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 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-button type="primary" icon="Search" @click="handleQuery">搜索</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-tooltip>
|
||||
<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 content="修改" placement="top">
|
||||
<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 = () => {
|
||||
proxy.$tab.closePage(proxy.$route);
|
||||
proxy.$router.push({
|
||||
path: `/test/designChange/indexEdit`,
|
||||
path: `/design-management/designChange/indexEdit`,
|
||||
query: {
|
||||
type: 'add'
|
||||
}
|
||||
@ -184,7 +185,7 @@ const handleAdd = () => {
|
||||
const handleUpdate = async (row?: DesignChangeVO) => {
|
||||
proxy.$tab.closePage(proxy.$route);
|
||||
proxy.$router.push({
|
||||
path: `/test/designChange/indexEdit`,
|
||||
path: `/design-management/designChange/indexEdit`,
|
||||
query: {
|
||||
id: row.id,
|
||||
type: 'update'
|
||||
@ -195,7 +196,7 @@ const handleUpdate = async (row?: DesignChangeVO) => {
|
||||
const handleViewInfo = (row) => {
|
||||
proxy.$tab.closePage(proxy.$route);
|
||||
proxy.$router.push({
|
||||
path: `/test/designChange/indexEdit`,
|
||||
path: `/design-management/designChange/indexEdit`,
|
||||
query: {
|
||||
id: row.id,
|
||||
type: 'view'
|
||||
|
@ -161,7 +161,7 @@ const handleSelectionChange = (selection: DrawingVO[]) => {
|
||||
const handleAdd = () => {
|
||||
proxy.$tab.closePage(proxy.$route);
|
||||
proxy.$router.push({
|
||||
path: `/test/drawing/indexEdit`,
|
||||
path: `/design-management/drawing/indexEdit`,
|
||||
query: {
|
||||
type: 'add'
|
||||
}
|
||||
@ -172,7 +172,7 @@ const handleAdd = () => {
|
||||
const handleUpdate = async (row?: DrawingVO) => {
|
||||
proxy.$tab.closePage(proxy.$route);
|
||||
proxy.$router.push({
|
||||
path: `/test/drawing/indexEdit`,
|
||||
path: `/design-management/drawing/indexEdit`,
|
||||
query: {
|
||||
id: row.id,
|
||||
type: 'update'
|
||||
@ -198,7 +198,7 @@ const handleView = (row) => {
|
||||
const handleViewInfo = (row?: LeaveVO) => {
|
||||
proxy.$tab.closePage(proxy.$route);
|
||||
proxy.$router.push({
|
||||
path: `/test/drawing/indexEdit`,
|
||||
path: `/design-management/drawing/indexEdit`,
|
||||
query: {
|
||||
id: row.id,
|
||||
type: 'view'
|
||||
|
@ -152,7 +152,7 @@ const handleSelectionChange = (selection: SpecialSchemeVO[]) => {
|
||||
const handleAdd = () => {
|
||||
proxy.$tab.closePage(proxy.$route);
|
||||
proxy.$router.push({
|
||||
path: `/test/specialScheme/indexEdit`,
|
||||
path: `/design-management/specialScheme/indexEdit`,
|
||||
query: {
|
||||
type: 'add'
|
||||
}
|
||||
@ -163,7 +163,7 @@ const handleAdd = () => {
|
||||
const handleUpdate = async (row?: SpecialSchemeVO) => {
|
||||
proxy.$tab.closePage(proxy.$route);
|
||||
proxy.$router.push({
|
||||
path: `/test/specialScheme/indexEdit`,
|
||||
path: `/design-management/specialScheme/indexEdit`,
|
||||
query: {
|
||||
id: row.id,
|
||||
type: 'update'
|
||||
@ -186,7 +186,7 @@ const handleView = (row) => {
|
||||
const handleViewInfo = (row) => {
|
||||
proxy.$tab.closePage(proxy.$route);
|
||||
proxy.$router.push({
|
||||
path: `/test/specialScheme/indexEdit`,
|
||||
path: `/design-management/specialScheme/indexEdit`,
|
||||
query: {
|
||||
id: row.id,
|
||||
type: 'view'
|
||||
|
@ -475,7 +475,7 @@ onUnmounted(() => {
|
||||
const handleApproval = (row) => {
|
||||
proxy.$tab.closePage(proxy.$route);
|
||||
proxy.$router.push({
|
||||
path: `/technicalStandard/indexEdit`,
|
||||
path: `/design-management/technicalStandard/indexEdit`,
|
||||
query: {
|
||||
id: row.id,
|
||||
type: 'update'
|
||||
@ -485,7 +485,7 @@ const handleApproval = (row) => {
|
||||
const handleViewApproval = (row) => {
|
||||
proxy.$tab.closePage(proxy.$route);
|
||||
proxy.$router.push({
|
||||
path: `/technicalStandard/indexEdit`,
|
||||
path: `/design-management/technicalStandard/indexEdit`,
|
||||
query: {
|
||||
id: row.id,
|
||||
type: 'view'
|
||||
@ -585,7 +585,7 @@ const handleViewApproval = (row) => {
|
||||
}
|
||||
}
|
||||
.list_right {
|
||||
width:79.5%;
|
||||
width: 79.5%;
|
||||
background: white;
|
||||
border: 1px solid #ededed;
|
||||
padding: 10px;
|
||||
|
@ -288,12 +288,16 @@ const getList = async () => {
|
||||
}
|
||||
}
|
||||
loading.value = true;
|
||||
console.log(queryParams.value);
|
||||
loading.value = true;
|
||||
|
||||
try {
|
||||
const res = await listProgressCategory(queryParams.value);
|
||||
const data = proxy?.handleTree<ProgressCategoryVO>(res.data, 'id', 'pid');
|
||||
if (data) {
|
||||
progressCategoryList.value = data;
|
||||
}
|
||||
} finally {
|
||||
// 不管成功或失败,最后都设置为 false
|
||||
loading.value = false;
|
||||
}
|
||||
};
|
||||
|
@ -179,25 +179,19 @@ const data = reactive<PageData<ContractorForm, ContractorQuery>>({
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
/** 查询字典数据列表 */
|
||||
const getDictList = async () => {
|
||||
const res = await listData({
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
dictName: '',
|
||||
dictType: 'contractor_type',
|
||||
dictLabel: ''
|
||||
});
|
||||
dictList.value = res.rows;
|
||||
const res = await listData('contractor_type');
|
||||
dictList.value = res.data;
|
||||
};
|
||||
// 分包类型
|
||||
const filterType=(val)=>{
|
||||
let label='';
|
||||
dictList.value.forEach(item=>{
|
||||
if(item.dictValue==val){
|
||||
label=item.dictLabel
|
||||
const filterType = (val) => {
|
||||
let label = '';
|
||||
dictList.value.forEach((item) => {
|
||||
if (item.dictValue == val) {
|
||||
label = item.dictLabel;
|
||||
}
|
||||
})
|
||||
});
|
||||
return label;
|
||||
}
|
||||
};
|
||||
/** 查询分包单位列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true;
|
||||
|
Reference in New Issue
Block a user