From 57827b87a96cfdc98b5b7a656c8fc1af0764896e Mon Sep 17 00:00:00 2001 From: long <18782126717@163.com> Date: Mon, 6 Mar 2023 12:28:49 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=A1=B9=E7=9B=AE=E9=83=A8?= =?UTF-8?q?=E5=87=BA=E5=BA=93=E5=85=A5=E5=BA=93=E8=B0=83=E6=8B=A8=E6=8A=A5?= =?UTF-8?q?=E5=BA=9F=E6=A0=B9=E6=8D=AE=E8=87=AA=E5=B7=B1=E7=9A=84=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E9=83=A8=E8=8A=82=E7=82=B9=E5=AE=A1=E6=89=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/modules/user.js | 6 + src/store/mutation-types.js | 1 + src/views/activiti/ProcessUserModelList.vue | 838 ++++++++++++++++++ .../form/ProcessMaterialsAllotForm.vue | 11 +- .../form/ProcessMaterialsDeliveryForm.vue | 10 + .../form/ProcessSmaterialsScrapForm.vue | 12 +- src/views/user/LoginSelectTenant.vue | 6 +- 7 files changed, 880 insertions(+), 4 deletions(-) create mode 100644 src/views/activiti/ProcessUserModelList.vue diff --git a/src/store/modules/user.js b/src/store/modules/user.js index e21813f..ea38392 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -12,6 +12,7 @@ import { PARENT_ID, USER_INFORMATION, PUWWC_Id, + IS_PROJECT, ASIDE_MEAN } from '@/store/mutation-types' import { welcome } from "@/utils/util" @@ -131,11 +132,13 @@ const user = { GetPermissionList({ commit }) { return new Promise((resolve, reject) => { queryPermissionsByUser().then(response => { + console.log(response) const menuData = response.result.menu; const authData = response.result.auth; const allAuthData = response.result.allAuth; const parentId=response.result.parentId; const puwwcId=response.result.puwwcId; + const isProject=response.result.isProject; const userInformation=response.result.userInfo; //Vue.ls.set(USER_AUTH,authData); sessionStorage.setItem(USER_AUTH,JSON.stringify(authData)); @@ -146,6 +149,9 @@ const user = { if (response.result.puwwcId){ sessionStorage.setItem(PUWWC_Id,puwwcId); } + if (isProject){ + sessionStorage.setItem(IS_PROJECT,JSON.stringify(isProject)); + } if (Vue.ls.get(USER_INFO)){ sessionStorage.setItem(USER_INFORMATION,JSON.stringify(Vue.ls.get(USER_INFO))); }else { diff --git a/src/store/mutation-types.js b/src/store/mutation-types.js index 7a05321..e177245 100644 --- a/src/store/mutation-types.js +++ b/src/store/mutation-types.js @@ -14,6 +14,7 @@ export const USER_INFO = 'Login_Userinfo' export const USER_AUTH = 'LOGIN_USER_BUTTON_AUTH' export const PARENT_ID='PARENT_ID' export const PUWWC_Id='PUWWC_Id' +export const IS_PROJECT='IS_PROJECT' export const USER_INFORMATION='USER_INFORMATION' export const SYS_BUTTON_AUTH = 'SYS_BUTTON_AUTH' export const ENCRYPTED_STRING = 'ENCRYPTED_STRING' diff --git a/src/views/activiti/ProcessUserModelList.vue b/src/views/activiti/ProcessUserModelList.vue new file mode 100644 index 0000000..643c3a5 --- /dev/null +++ b/src/views/activiti/ProcessUserModelList.vue @@ -0,0 +1,838 @@ + + + + \ No newline at end of file diff --git a/src/views/activiti/form/ProcessMaterialsAllotForm.vue b/src/views/activiti/form/ProcessMaterialsAllotForm.vue index 230b911..edc8c5c 100644 --- a/src/views/activiti/form/ProcessMaterialsAllotForm.vue +++ b/src/views/activiti/form/ProcessMaterialsAllotForm.vue @@ -802,6 +802,8 @@ }, /*提交申请*/ applySubmit(e) { + let is_project=sessionStorage.getItem('IS_PROJECT'); + let projcet= JSON.parse(is_project) this.getAllTable().then(tables => { return validateFormAndTables(this.form, tables) }).then(allValues => { @@ -834,6 +836,9 @@ } let formData = this.classifyIntoFormData(allValues) formData.fileId = getStringArry(formData.fileId) + if (projcet.departId){ + formData.departCode=projcet.departId + } if (formData.departId==formData.beAllotDepartment){ this.$message.warning("流程发起部门和被调拨部门不能相同!"); return; @@ -930,7 +935,11 @@ } let formData = this.classifyIntoFormData(allValues) - + let is_project=sessionStorage.getItem('IS_PROJECT'); + let projcet= JSON.parse(is_project) + if (projcet.departId){ + formData.departCode=projcet.departId + } if (formData.departId==formData.beAllotDepartment){ this.$message.warning("流程发起部门和被调拨部门不能相同!"); return; diff --git a/src/views/activiti/form/ProcessMaterialsDeliveryForm.vue b/src/views/activiti/form/ProcessMaterialsDeliveryForm.vue index 863173d..85192e1 100644 --- a/src/views/activiti/form/ProcessMaterialsDeliveryForm.vue +++ b/src/views/activiti/form/ProcessMaterialsDeliveryForm.vue @@ -1509,6 +1509,8 @@ }, /*提交申请*/ applySubmit(e) { + let is_project=sessionStorage.getItem('IS_PROJECT'); + let projcet= JSON.parse(is_project) this.getAllTable().then(tables => { return validateFormAndTables(this.form, tables) }).then(allValues => { @@ -1518,6 +1520,9 @@ } let formData = this.classifyIntoFormData(allValues) formData.fileId = getStringArry(formData.fileId) + if (projcet.departId){ + formData.departCode=projcet.departId + } console.log('所有数据', formData) if (new Date(formData.createTime).getTime() / 100 > new Date(formData.deliveryTime).getTime() / 100) { this.$message.error('出库时间不能小于当前流程发起时间') @@ -1610,6 +1615,11 @@ } let formData = this.classifyIntoFormData(allValues) formData.fileId = getStringArry(formData.fileId) + let is_project=sessionStorage.getItem('IS_PROJECT'); + let projcet= JSON.parse(is_project) + if (projcet.departId){ + formData.departCode=projcet.departId + } // console.log('所有数据', formData) if (new Date(formData.createTime).getTime() / 100 > new Date(formData.deliveryTime).getTime() / 100) { this.$message.error('出库时间不能小于当前流程发起时间') diff --git a/src/views/activiti/form/ProcessSmaterialsScrapForm.vue b/src/views/activiti/form/ProcessSmaterialsScrapForm.vue index 5779dfa..12b371e 100644 --- a/src/views/activiti/form/ProcessSmaterialsScrapForm.vue +++ b/src/views/activiti/form/ProcessSmaterialsScrapForm.vue @@ -562,7 +562,11 @@ } formData.describes = this.describes formData.fileId = getStringArry(formData.fileId) - + let is_project=sessionStorage.getItem('IS_PROJECT'); + let projcet= JSON.parse(is_project) + if (projcet.departId){ + formData.departCode=projcet.departId + } this.form.validateFields((err, values) => { if (!err) { formData.procDefId = this.processData.id @@ -626,7 +630,11 @@ } formData.describes = this.describes formData.fileId = getStringArry(formData.fileId) - + let is_project=sessionStorage.getItem('IS_PROJECT'); + let projcet= JSON.parse(is_project) + if (projcet.departId){ + formData.departCode=projcet.departId + } this.form.validateFields((err, values) => { if (!err) { formData.procDefId = this.processData.id diff --git a/src/views/user/LoginSelectTenant.vue b/src/views/user/LoginSelectTenant.vue index aebf12e..1df38c1 100644 --- a/src/views/user/LoginSelectTenant.vue +++ b/src/views/user/LoginSelectTenant.vue @@ -52,7 +52,7 @@ import Vue from 'vue' import { getAction,putAction } from '@/api/manage' - import { USER_INFO,PARENT_ID,PUWWC_Id } from "@/store/mutation-types" + import { USER_INFO,PARENT_ID,PUWWC_Id,IS_PROJECT } from "@/store/mutation-types" import store from './Login' export default { @@ -161,10 +161,14 @@ if(res.success){ console.log(res.result,"切换部门") const userInfo = res.result.userInfo; + const isProject=res.result.isProject; Vue.ls.set(USER_INFO, userInfo, 7 * 24 * 60 * 60 * 1000); this.$store.commit('SET_INFO', userInfo); const parentId=res.result.parentId; sessionStorage.setItem(PARENT_ID,parentId); + if (isProject){ + sessionStorage.setItem(IS_PROJECT,JSON.stringify(isProject)); + } if (res.result.puwwcId){ console.log(res.result.puwwcId) const puwwcId=res.result.puwwcId;