溯源
This commit is contained in:
parent
53cdca5961
commit
4a49e3fa2e
@ -9,11 +9,11 @@
|
|||||||
</layout-link>
|
</layout-link>
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="level === 2 && !isCollapse">
|
<template v-else-if="level === 2 && !isCollapse">
|
||||||
<el-dropdown trigger="hover" placement="right-start" :show-timeout="100" @visible-change="(val) => (isDropdownOpen = val)">
|
<el-dropdown trigger="hover" placement="right-start" style="width: 100%" :show-timeout="100" @visible-change="(val) => (isDropdownOpen = val)">
|
||||||
<span class="el-dropdown-link el-menu-item" @mouseenter.prevent>
|
<span class="el-dropdown-link el-menu-item" @mouseenter.prevent>
|
||||||
<layout-icon :size="20" :icon="item.meta?.icon" />
|
<layout-icon :size="20" :icon="item.meta?.icon" />
|
||||||
<span>{{ item.meta?.title }}</span>
|
<span>{{ item.meta?.title }}</span>
|
||||||
<el-icon class="arrow-icon" v-if="item.children?.length">
|
<el-icon v-if="item.children?.length" :size="12" class="arrow-icon">
|
||||||
<component :is="isDropdownOpen ? 'arrow-left' : 'arrow-right'" />
|
<component :is="isDropdownOpen ? 'arrow-left' : 'arrow-right'" />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
</span>
|
</span>
|
||||||
@ -114,11 +114,10 @@ const hasOneShowingChild = (children = [], parent) => {
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
padding-right: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.arrow-icon {
|
.arrow-icon {
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
font-size: 14px;
|
|
||||||
color: #999;
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -34,6 +34,8 @@ import { ref } from 'vue';
|
|||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
import { useApp } from '@/hooks';
|
import { useApp } from '@/hooks';
|
||||||
import { isEmpty, getAssetsFile } from '@/utils';
|
import { isEmpty, getAssetsFile } from '@/utils';
|
||||||
|
import { GetTraceDetail } from '@/apis/trace/coding';
|
||||||
|
import { ElMessageBox } from 'element-plus';
|
||||||
|
|
||||||
const { VITE_APP_NAME } = import.meta.env;
|
const { VITE_APP_NAME } = import.meta.env;
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
@ -45,7 +47,32 @@ const onSearch = () => {
|
|||||||
app.$message.error('请输入溯源码进行查询!');
|
app.$message.error('请输入溯源码进行查询!');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
router.push({ path: `/${VITE_APP_NAME}/trace-info`, query: { code: code.value } });
|
|
||||||
|
GetTraceDetail({ id: code.value })
|
||||||
|
.then((res) => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
if (!isEmpty(res.data.basicInfo)) {
|
||||||
|
router.push({
|
||||||
|
path: `/${import.meta.env.VITE_APP_NAME}/trace-info`,
|
||||||
|
query: { code: code.value },
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
ElMessageBox.alert('溯源码[' + code.value + ']不存在!', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
type: 'error',
|
||||||
|
callback: () => {
|
||||||
|
// 用户点击确定后的回调(可选)
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
app.$message.error(res.msg || '请求失败');
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
app.$message.error(error.message || '网络错误');
|
||||||
|
});
|
||||||
|
// router.push({ path: `/${VITE_APP_NAME}/trace-info`, query: { code: code.value } });
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
1
sub-operation-service/components.d.ts
vendored
1
sub-operation-service/components.d.ts
vendored
@ -9,6 +9,7 @@ declare module 'vue' {
|
|||||||
export interface GlobalComponents {
|
export interface GlobalComponents {
|
||||||
CenterMap: typeof import('./src/components/centerMap.vue')['default']
|
CenterMap: typeof import('./src/components/centerMap.vue')['default']
|
||||||
CodeDialog: typeof import('./src/components/code-dialog/index.vue')['default']
|
CodeDialog: typeof import('./src/components/code-dialog/index.vue')['default']
|
||||||
|
copy: typeof import('./src/components/custom-scroll-title copy/index.vue')['default']
|
||||||
CostomImg: typeof import('./src/components/costomImg.vue')['default']
|
CostomImg: typeof import('./src/components/costomImg.vue')['default']
|
||||||
CustomBack: typeof import('./src/components/customBack.vue')['default']
|
CustomBack: typeof import('./src/components/customBack.vue')['default']
|
||||||
CustomCarouselPicture: typeof import('./src/components/custom-carousel-picture/index.vue')['default']
|
CustomCarouselPicture: typeof import('./src/components/custom-carousel-picture/index.vue')['default']
|
||||||
|
Loading…
x
Reference in New Issue
Block a user