|
@@ -86,7 +86,7 @@ import { GenerateForm } from "@/components/VueFormMaking";
|
|
|
import "form-making/dist/FormMaking.css";
|
|
|
Vue.component(GenerateForm.name, GenerateForm);
|
|
|
|
|
|
-import { processStructure, createWorkOrder, checkCourseReturnFee, queryAllOrgan } from "@/api/process/work-order";
|
|
|
+import { processStructure, createWorkOrder, checkCourseReturnFee, queryAllOrgan, queryUserInfo } from "@/api/process/work-order";
|
|
|
import { listUser } from "@/api/system/sysuser";
|
|
|
export default {
|
|
|
name: "Create",
|
|
@@ -98,6 +98,8 @@ export default {
|
|
|
organList: [],
|
|
|
processStructureValue: {},
|
|
|
socialId: null, // 是否是社保分部
|
|
|
+ userId: null,
|
|
|
+ tenantId: 1,
|
|
|
ruleForm: {
|
|
|
priority: 1,
|
|
|
deptId: null, // 社保部分
|
|
@@ -136,13 +138,25 @@ export default {
|
|
|
}
|
|
|
};
|
|
|
},
|
|
|
- created() {
|
|
|
+ async created() {
|
|
|
+ await this.getUserInfo()
|
|
|
this.getAllOrgan()
|
|
|
this.getProcessNodeList()
|
|
|
},
|
|
|
methods: {
|
|
|
+ async getUserInfo() {
|
|
|
+ await queryUserInfo().then(res => {
|
|
|
+ console.log(res)
|
|
|
+ if(res.code == 200) {
|
|
|
+ this.userId = res.data.id
|
|
|
+ this.tenantId = res.data.tenantId
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.data)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
getAllOrgan() { // 获取分部
|
|
|
- queryAllOrgan().then(res => {
|
|
|
+ queryAllOrgan({ tenantId: this.tenantId }).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
const result = res.data;
|
|
|
const filterOrganId = [36, 39, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 52, 54, 55, 56]
|
|
@@ -159,7 +173,8 @@ export default {
|
|
|
},
|
|
|
getProcessNodeList() {
|
|
|
processStructure({
|
|
|
- processId: this.$route.query.processId
|
|
|
+ processId: this.$route.query.processId,
|
|
|
+ userId: this.userId
|
|
|
}).then(response => {
|
|
|
this.processStructureValue = response.data
|
|
|
this.currentNode = this.processStructureValue.nodes[0]
|