This commit is contained in:
parent
3fa4e6e86c
commit
9f0800c1e4
|
|
@ -48,6 +48,34 @@ export default {
|
|||
return USER_MODEL == "AdminUser";
|
||||
},
|
||||
|
||||
initRoutes() {
|
||||
|
||||
let routesConfig = { };
|
||||
|
||||
if(process.env.VUE_APP_BEID == 1){
|
||||
routesConfig = {
|
||||
router: "touch",
|
||||
children:[
|
||||
{router:'TouchMesReporting'}
|
||||
]
|
||||
};
|
||||
|
||||
}
|
||||
else if(process.env.VUE_APP_BEID == 5){
|
||||
routesConfig= {
|
||||
router: "touch",
|
||||
children:[
|
||||
{router:'TouchMoldHome'},
|
||||
{router:'TouchMoldReporting'},
|
||||
{router:'TouchMoldSend'},
|
||||
]
|
||||
};
|
||||
}
|
||||
|
||||
this.setRoutesConfig(routesConfig)
|
||||
loadRoutes([routesConfig])
|
||||
},
|
||||
|
||||
afterLoginSuccess({ closeOthers, token, access_expire, uid, msg = '登录成功', pushTo = '/dashboard/workplace' }) {
|
||||
|
||||
setAuthorization({ token: token, expireAt: new Date(access_expire * 1000) }) // 设置token
|
||||
|
|
|
|||
|
|
@ -25,16 +25,19 @@
|
|||
<h4>工艺布产工序</h4>
|
||||
|
||||
|
||||
<div v-for="item in detailsData" :key="item">
|
||||
<div v-for="item in detailsData" :key="item.id">
|
||||
<div class="gx-item">
|
||||
<div class="gx-item-col">
|
||||
|
||||
<div>{{ item.moldname }}</div>
|
||||
<div>{{ item.name }}</div>
|
||||
<div>部件:{{ item.component_detail ? item.component_detail.name : '' }}</div>
|
||||
<div>工序:{{ item.process_detail ? item.process_detail.name : '' }}</div>
|
||||
|
||||
<div>状态:{{ item.is_complete ? "已完成" : (item.is_send ? "已发料" :"未发料") }}</div>
|
||||
</div>
|
||||
<div class="gx-item-col">
|
||||
<a-button type="primary" @click="pageSend(item)" v-if="item.is_send !== 1">发料</a-button>
|
||||
<a-button type="primary" @click="pageReport(item)" v-if="item.is_send === 1">报工</a-button>
|
||||
|
||||
<a-button type="primary" @click="pageReport(item)" v-if="item.is_send && item.is_complete !== 1">报工</a-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -100,7 +103,7 @@ export default {
|
|||
// 是否编辑模式
|
||||
isEdit: false,
|
||||
|
||||
detailsData: [{moldname:'模具1' ,name: '工序1' }, { moldname:'模具2' ,name: '工序2' }],
|
||||
detailsData: [],
|
||||
|
||||
formOptions2: {
|
||||
data: {
|
||||
|
|
@ -221,7 +224,8 @@ export default {
|
|||
],
|
||||
tableDataStaff: [],
|
||||
tableDataProcesses: [],
|
||||
tableDataOrders: []
|
||||
tableDataOrders: [],
|
||||
allDetailsData: []
|
||||
|
||||
};
|
||||
|
||||
|
|
@ -299,8 +303,9 @@ export default {
|
|||
useBigInt: true,
|
||||
}).then(a => {
|
||||
this.loading = false
|
||||
this.tableDataOrders = a.data.mold_production_order || [];
|
||||
this.tableDataOrders =JSON.parse(JSON.stringify( a.data.mold_production_order || []));
|
||||
|
||||
this.allDetailsData = JSON.parse(JSON.stringify(a.data.mold_production_order_component_processes || []));
|
||||
}).catch((a) => {
|
||||
this.loading = false
|
||||
this.$mk.error(a.data.msg);
|
||||
|
|
@ -434,7 +439,14 @@ export default {
|
|||
this.formOptions2.data = data2
|
||||
this.formOptions3.data = data3
|
||||
|
||||
this.detailsData = row.mold_production_order_component_processes;
|
||||
let ds = [];
|
||||
this.allDetailsData.forEach(item => {
|
||||
if ((item.production_id + '') == (row.id + '')) {
|
||||
ds.push(item);
|
||||
}
|
||||
})
|
||||
console.log(ds)
|
||||
this.detailsData = ds;
|
||||
},
|
||||
cellClickEventStaff({ row }) {
|
||||
this.selectStaff({ data: row })
|
||||
|
|
@ -453,7 +465,7 @@ export default {
|
|||
"store_id": 0,
|
||||
"beid": parseInt(process.env.VUE_APP_BEID),
|
||||
"company_token": process.env.VUE_APP_COMPANYTOKEN,
|
||||
"id": item.id,
|
||||
"id": this.$mk.toBigInt(item.id),
|
||||
"company_id": parseInt(process.env.VUE_APP_COMPANY_ID)
|
||||
},
|
||||
useBigInt: true,
|
||||
|
|
@ -461,7 +473,7 @@ export default {
|
|||
console.log(a)
|
||||
if (a.code == 200) {
|
||||
this.$mk.success("报工成功");
|
||||
item.is_send = 1;
|
||||
item.is_complete = 1;
|
||||
|
||||
} else {
|
||||
|
||||
|
|
@ -472,7 +484,7 @@ export default {
|
|||
},
|
||||
pageSend(item) {
|
||||
|
||||
|
||||
console.log(item)
|
||||
this.$mk.post({
|
||||
url: `${BASE_URL.BASE_URL}/MoldProductionOrder/Get/TouchScreen/v1/mold/production/order/touchScreen/sendMaterial`,
|
||||
loading: "发料中...",
|
||||
|
|
@ -482,7 +494,7 @@ export default {
|
|||
"store_id": 0,
|
||||
"beid": parseInt(process.env.VUE_APP_BEID),
|
||||
"company_token": process.env.VUE_APP_COMPANYTOKEN,
|
||||
"id": item.id,
|
||||
"id": this.$mk.toBigInt(item.id),
|
||||
"company_id": parseInt(process.env.VUE_APP_COMPANY_ID)
|
||||
},
|
||||
useBigInt: true,
|
||||
|
|
|
|||
|
|
@ -147,7 +147,10 @@ export default {
|
|||
this.form.setFieldsValue({
|
||||
name: this.user.mobile,
|
||||
password: this.user.password
|
||||
})
|
||||
});
|
||||
|
||||
this.$refs.loginActions.initRoutes({ });
|
||||
|
||||
}, 1000)
|
||||
}) // loadsh的pick方法
|
||||
|
||||
|
|
|
|||
|
|
@ -141,8 +141,8 @@ const view = {
|
|||
TouchMoldHome : {
|
||||
name: '触摸屏首页',
|
||||
path: '/touch/moldhome',
|
||||
component: () => import('@/pages/Middle/Mold/Touch/index')
|
||||
},
|
||||
component: () => import('@/pages/Middle/Mold/Touch/Reporting')
|
||||
},
|
||||
TouchMoldReporting : {
|
||||
name: '报工',
|
||||
path: '/touch/moldreporting',
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import {parseRoutes} from '@/utils/routerUtil'
|
|||
// 异步路由配置
|
||||
const routesConfig = [
|
||||
'login',
|
||||
'root',
|
||||
'root',
|
||||
{
|
||||
router: 'exp404',
|
||||
path: '*',
|
||||
|
|
|
|||
|
|
@ -26,10 +26,9 @@ if (Authorization != null) {
|
|||
const Permission = result.data.data.permission
|
||||
store.commit('account/setPermissions', Permission) // 将权限信息存入vuex
|
||||
}
|
||||
})
|
||||
|
||||
})
|
||||
getRoutesConfig().then(result => { // 获取路由配置
|
||||
// console.log("=================result:"+result)
|
||||
console.log("=================result:"+result)
|
||||
if (result.data.data != null) {
|
||||
const routesConfig = result.data.data;
|
||||
console.log(routesConfig)
|
||||
|
|
@ -98,7 +97,7 @@ Vue.use(Router)
|
|||
// 不需要登录拦截的路由配置
|
||||
const loginIgnore = { // 登录白名单
|
||||
names: ['404', '403'], //根据路由名称匹配
|
||||
paths: ['/login','/touch','/touch/index','/touch/mesreporting'], //根据路由fullPath匹配
|
||||
paths: ['/login','/touch','/touch/index','/touch/mesreporting','/touch/moldhome'], //根据路由fullPath匹配
|
||||
/**
|
||||
* 判断路由是否包含在该配置中
|
||||
* @param route vue-router 的 route 对象
|
||||
|
|
|
|||
|
|
@ -166,6 +166,8 @@ console.log(mergeMenus)
|
|||
* @param routesConfig {RouteConfig[]} 路由配置
|
||||
*/
|
||||
function loadRoutes(routesConfig) { // 加载路由
|
||||
|
||||
|
||||
// 应用配置
|
||||
const { router, store, i18n } = appOptions
|
||||
|
||||
|
|
@ -223,6 +225,8 @@ function loadRoutes(routesConfig) { // 加载路由
|
|||
formatRoutes(finalRoutes)
|
||||
router.options = { ...router.options, routes: finalRoutes } // 路由配置
|
||||
router.matcher = new Router({ ...router.options, routes: [] }).matcher // 重置路由
|
||||
|
||||
|
||||
router.addRoutes(finalRoutes) // 添加路由
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue