Merge branch 'master' of https://git.evo-techina.com/sgc/mes-vue
This commit is contained in:
commit
d60f4fc187
@ -116,25 +116,18 @@ const routes: RouteRecordRaw[] = [
|
|||||||
component: () => import('@/views/org/post/index.vue'),
|
component: () => import('@/views/org/post/index.vue'),
|
||||||
meta: { title: '岗位管理', icon: 'IdCardOutline' }
|
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',
|
path: 'biz/orderItem',
|
||||||
name: 'product',
|
name: 'orderItem',
|
||||||
component: () => import('@/views/biz/product/index.vue'),
|
component: () => import('@/views/biz/orderItem/index.vue'),
|
||||||
meta: { title: '商品管理', icon: 'ListOutline' }
|
meta: { title: '生产订单', icon: 'ListOutline' }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'biz/orderProcessPlan',
|
||||||
|
name: 'orderProcessPlan',
|
||||||
|
component: () => import('@/views/biz/orderProcessPlan/index.vue'),
|
||||||
|
meta: { title: '工序计划', icon: 'ListOutline' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'biz/user',
|
path: 'biz/user',
|
||||||
@ -216,8 +209,14 @@ const routes: RouteRecordRaw[] = [
|
|||||||
component: () => import('@/views/test/test/index.vue'),
|
component: () => import('@/views/test/test/index.vue'),
|
||||||
meta: { title: '测试菜单', icon: 'StarOutline' }
|
meta: { title: '测试菜单', icon: 'StarOutline' }
|
||||||
},
|
},
|
||||||
// 开发工具
|
|
||||||
{
|
{
|
||||||
|
path: 'biz/submitLog',
|
||||||
|
name: 'submitLog',
|
||||||
|
component: () => import('@/views/biz/submitLog/index.vue'),
|
||||||
|
meta: { title: '派工工单汇报记录', icon: 'ListOutline' }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
// 开发工具
|
||||||
path: 'tool/gen',
|
path: 'tool/gen',
|
||||||
name: 'ToolGen',
|
name: 'ToolGen',
|
||||||
component: () => import('@/views/tool/gen/index.vue'),
|
component: () => import('@/views/tool/gen/index.vue'),
|
||||||
@ -241,7 +240,7 @@ const routes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: '/:pathMatch(.*)',
|
path: '/:pathMatch(.*)',
|
||||||
component: () => import('@/views/error/404.vue'),
|
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) => {
|
router.beforeEach(async (to, _from, next) => {
|
||||||
|
console.log('路由测试');
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
|
|
||||||
//document.title = `${to.meta.title || ''} - CSY Admin`
|
//document.title = `${to.meta.title || ''} - CSY Admin`
|
||||||
|
if (to.meta.requiresAuth === false) {
|
||||||
|
|
||||||
if (!userStore.token) {
|
|
||||||
//next({ name: 'Login', query: { redirect: to.fullPath } })
|
|
||||||
next()
|
next()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!userStore.token) {
|
||||||
|
next({ name: 'Login', query: { redirect: to.fullPath } })
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (userStore.init) {
|
if (userStore.init) {
|
||||||
try {
|
try {
|
||||||
|
|
||||||
await userStore.getInfo()
|
await userStore.getInfo()
|
||||||
// 添加动态路由(只添加新的,不影响已有的)
|
// 添加动态路由(只添加新的,不影响已有的)
|
||||||
addDynamicRoutes(userStore.menus)
|
addDynamicRoutes(userStore.menus)
|
||||||
//userStore.setinit(false)
|
userStore.setinit(false)
|
||||||
userStore.init = false
|
// userStore.init = false
|
||||||
next({ ...to, replace: true })
|
next({ ...to, replace: true })
|
||||||
//return
|
//return
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
userStore.logout()
|
userStore.logout()
|
||||||
userStore.init = false
|
//userStore.init = false
|
||||||
//userStore.setinit(true)
|
userStore.setinit(true)
|
||||||
next({ name: 'Login' })
|
next({ name: 'Login' })
|
||||||
//return
|
//return
|
||||||
}
|
}
|
||||||
|
|||||||
@ -119,7 +119,7 @@
|
|||||||
<n-gi>
|
<n-gi>
|
||||||
<n-form-item label="项目名称" path="projectName">
|
<n-form-item label="项目名称" path="projectName">
|
||||||
<n-input v-if="formData.id" v-model:value="formData.projectName" disabled placeholder="请选择项目名称" />
|
<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-form-item>
|
||||||
</n-gi>
|
</n-gi>
|
||||||
<n-gi>
|
<n-gi>
|
||||||
@ -664,7 +664,10 @@ let planList = ref<any>([])
|
|||||||
function gongxu(){
|
function gongxu(){
|
||||||
if(formData.productionCode){
|
if(formData.productionCode){
|
||||||
planList.value.splice(0)
|
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:[]
|
planList.value = rps.planList?rps.planList:[]
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
@ -38,12 +38,12 @@
|
|||||||
<template #icon><n-icon><AddOutline /></n-icon></template>
|
<template #icon><n-icon><AddOutline /></n-icon></template>
|
||||||
新增
|
新增
|
||||||
</n-button>
|
</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>
|
<template #icon><n-icon><TrashOutline /></n-icon></template>
|
||||||
删除
|
删除
|
||||||
</n-button>
|
</n-button> -->
|
||||||
</n-space>
|
</n-space>
|
||||||
<n-button-group size="large">
|
<!-- <n-button-group size="large">
|
||||||
<n-button type="success" @click="importModalVisible = true" size="small">
|
<n-button type="success" @click="importModalVisible = true" size="small">
|
||||||
<template #icon><n-icon><CloudUploadOutline /></n-icon></template>
|
<template #icon><n-icon><CloudUploadOutline /></n-icon></template>
|
||||||
导入
|
导入
|
||||||
@ -52,7 +52,7 @@
|
|||||||
<template #icon><n-icon><DownloadOutline /></n-icon></template>
|
<template #icon><n-icon><DownloadOutline /></n-icon></template>
|
||||||
导出{{ selectedIds.length > 0 ? `(${selectedIds.length})` : '' }}
|
导出{{ selectedIds.length > 0 ? `(${selectedIds.length})` : '' }}
|
||||||
</n-button>
|
</n-button>
|
||||||
</n-button-group>
|
</n-button-group> -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 表格 -->
|
<!-- 表格 -->
|
||||||
|
|||||||
@ -16,13 +16,12 @@ export default defineConfig({
|
|||||||
emptyOutDir: true
|
emptyOutDir: true
|
||||||
},
|
},
|
||||||
server: {
|
server: {
|
||||||
// host: "192.168.5.231",
|
host: "192.168.5.231",
|
||||||
host: true,
|
|
||||||
port: 3000,
|
port: 3000,
|
||||||
proxy: {
|
proxy: {
|
||||||
'/api': {
|
'/api': {
|
||||||
target:'http://localhost:8888', //'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',
|
target:'http://192.168.5.230:8888',
|
||||||
changeOrigin: true
|
changeOrigin: true
|
||||||
},
|
},
|
||||||
'/druid': {
|
'/druid': {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user