Compare commits
2 Commits
8794a8cfc6
...
f29e30aadb
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f29e30aadb | ||
|
|
0fcc849bce |
@ -116,25 +116,18 @@ const routes: RouteRecordRaw[] = [
|
||||
component: () => import('@/views/org/post/index.vue'),
|
||||
meta: { title: '岗位管理', icon: 'IdCardOutline' }
|
||||
},
|
||||
// 项目管理
|
||||
{
|
||||
path: 'biz/orderProject',
|
||||
name: 'OrderProject',
|
||||
component: () => import('@/views/biz/orderProject/index.vue'),
|
||||
meta: { title: '项目管理', icon: 'PersonOutline' }
|
||||
},
|
||||
{
|
||||
path: 'biz/orderProject/gantt',
|
||||
name: 'OrderProjectGantt',
|
||||
component: () => import('@/views/biz/orderProject/components/GanttSchedule.vue'),
|
||||
meta: { title: '甘特图排产', icon: 'CalendarOutline', activeMenu: '/biz/orderProject' }
|
||||
},
|
||||
//运营管理
|
||||
{
|
||||
path: 'biz/product',
|
||||
name: 'product',
|
||||
component: () => import('@/views/biz/product/index.vue'),
|
||||
meta: { title: '商品管理', icon: 'ListOutline' }
|
||||
path: 'biz/orderItem',
|
||||
name: 'orderItem',
|
||||
component: () => import('@/views/biz/orderItem/index.vue'),
|
||||
meta: { title: '生产订单', icon: 'ListOutline' }
|
||||
},
|
||||
{
|
||||
path: 'biz/orderProcessPlan',
|
||||
name: 'orderProcessPlan',
|
||||
component: () => import('@/views/biz/orderProcessPlan/index.vue'),
|
||||
meta: { title: '工序计划', icon: 'ListOutline' }
|
||||
},
|
||||
{
|
||||
path: 'biz/user',
|
||||
@ -216,8 +209,14 @@ const routes: RouteRecordRaw[] = [
|
||||
component: () => import('@/views/test/test/index.vue'),
|
||||
meta: { title: '测试菜单', icon: 'StarOutline' }
|
||||
},
|
||||
// 开发工具
|
||||
{
|
||||
path: 'biz/submitLog',
|
||||
name: 'submitLog',
|
||||
component: () => import('@/views/biz/submitLog/index.vue'),
|
||||
meta: { title: '派工工单汇报记录', icon: 'ListOutline' }
|
||||
},
|
||||
{
|
||||
// 开发工具
|
||||
path: 'tool/gen',
|
||||
name: 'ToolGen',
|
||||
component: () => import('@/views/tool/gen/index.vue'),
|
||||
@ -241,7 +240,7 @@ const routes: RouteRecordRaw[] = [
|
||||
{
|
||||
path: '/:pathMatch(.*)',
|
||||
component: () => import('@/views/error/404.vue'),
|
||||
meta: { title: '404', requiresAuth: false }
|
||||
// meta: { title: '404', requiresAuth: false }
|
||||
}
|
||||
]
|
||||
|
||||
@ -348,30 +347,35 @@ export function resetRouter() {
|
||||
|
||||
// 路由守卫
|
||||
router.beforeEach(async (to, _from, next) => {
|
||||
console.log('路由测试');
|
||||
const userStore = useUserStore()
|
||||
|
||||
//document.title = `${to.meta.title || ''} - CSY Admin`
|
||||
|
||||
|
||||
if (!userStore.token) {
|
||||
//next({ name: 'Login', query: { redirect: to.fullPath } })
|
||||
if (to.meta.requiresAuth === false) {
|
||||
next()
|
||||
return
|
||||
}
|
||||
|
||||
if (!userStore.token) {
|
||||
next({ name: 'Login', query: { redirect: to.fullPath } })
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
if (userStore.init) {
|
||||
try {
|
||||
try {
|
||||
|
||||
await userStore.getInfo()
|
||||
// 添加动态路由(只添加新的,不影响已有的)
|
||||
addDynamicRoutes(userStore.menus)
|
||||
//userStore.setinit(false)
|
||||
userStore.init = false
|
||||
userStore.setinit(false)
|
||||
// userStore.init = false
|
||||
next({ ...to, replace: true })
|
||||
//return
|
||||
} catch (error) {
|
||||
userStore.logout()
|
||||
userStore.init = false
|
||||
//userStore.setinit(true)
|
||||
//userStore.init = false
|
||||
userStore.setinit(true)
|
||||
next({ name: 'Login' })
|
||||
//return
|
||||
}
|
||||
|
||||
@ -119,7 +119,7 @@
|
||||
<n-gi>
|
||||
<n-form-item label="项目名称" path="projectName">
|
||||
<n-input v-if="formData.id" v-model:value="formData.projectName" disabled placeholder="请选择项目名称" />
|
||||
<n-input v-else v-model:value="formData.projectName" placeholder="请选择产品名称" />
|
||||
<n-input v-else v-model:value="formData.projectName" @input="gongxu" placeholder="请选择产品名称" />
|
||||
</n-form-item>
|
||||
</n-gi>
|
||||
<n-gi>
|
||||
@ -664,7 +664,10 @@ let planList = ref<any>([])
|
||||
function gongxu(){
|
||||
if(formData.productionCode){
|
||||
planList.value.splice(0)
|
||||
orderItemApi.preCreation({productionCode:formData.productionCode}).then((rps:any) => {
|
||||
orderItemApi.preCreation({
|
||||
//productionCode:formData.productionCode
|
||||
projectCode:formData.projectCode
|
||||
}).then((rps:any) => {
|
||||
planList.value = rps.planList?rps.planList:[]
|
||||
})
|
||||
}else{
|
||||
|
||||
@ -38,12 +38,12 @@
|
||||
<template #icon><n-icon><AddOutline /></n-icon></template>
|
||||
新增
|
||||
</n-button>
|
||||
<n-button type="error" :disabled="selectedIds.length === 0" @click="handleBatchDelete" size="small">
|
||||
<!-- <n-button type="error" :disabled="selectedIds.length === 0" @click="handleBatchDelete" size="small">
|
||||
<template #icon><n-icon><TrashOutline /></n-icon></template>
|
||||
删除
|
||||
</n-button>
|
||||
</n-button> -->
|
||||
</n-space>
|
||||
<n-button-group size="large">
|
||||
<!-- <n-button-group size="large">
|
||||
<n-button type="success" @click="importModalVisible = true" size="small">
|
||||
<template #icon><n-icon><CloudUploadOutline /></n-icon></template>
|
||||
导入
|
||||
@ -52,7 +52,7 @@
|
||||
<template #icon><n-icon><DownloadOutline /></n-icon></template>
|
||||
导出{{ selectedIds.length > 0 ? `(${selectedIds.length})` : '' }}
|
||||
</n-button>
|
||||
</n-button-group>
|
||||
</n-button-group> -->
|
||||
</div>
|
||||
|
||||
<!-- 表格 -->
|
||||
|
||||
@ -16,13 +16,12 @@ export default defineConfig({
|
||||
emptyOutDir: true
|
||||
},
|
||||
server: {
|
||||
// host: "192.168.5.231",
|
||||
host: true,
|
||||
host: "192.168.5.231",
|
||||
port: 3000,
|
||||
proxy: {
|
||||
'/api': {
|
||||
target:'http://localhost:8888', //'http://192.168.5.230:8888',
|
||||
//target:'http://192.168.5.230:8888',
|
||||
//target:'http://192.168.6.107:8080', //'http://192.168.5.230:8888',
|
||||
target:'http://192.168.5.230:8888',
|
||||
changeOrigin: true
|
||||
},
|
||||
'/druid': {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user