Commit e793effb authored by 仇晓婷's avatar 仇晓婷

部门,人员

parent afcbf600
......@@ -68,7 +68,8 @@ export default {
citys: citys(),
entity: {
organization_Id: 0,
organization_Type: ""
organization_Type: "",
property: []
},
rules: {
title02: [
......@@ -94,10 +95,17 @@ export default {
handleSubmit() {
this.$refs["form"].validate(value => {
if (value) {
if (this.entity.property[0] == 1 || this.entity.property[1] == 1) {
this.entity.isProduction = 1;
let property = "";
if (this.entity.property) {
if (this.entity.property[0] == 1 || this.entity.property[1] == 1) {
this.entity.isProduction = 1;
} else {
this.entity.isProduction = 0;
}
property = this.entity.property.join;
} else {
this.entity.isProduction = 0;
this.entity.isProduction ='';
property = "";
}
let paramsdata = {
name: this.entity.title02, //部门名称
......@@ -106,8 +114,8 @@ export default {
organization_Id: this.entity.organization_Id, //组织类型 [id]
location: this.entity.location, //省市县
isProduction: this.entity.isProduction, //是否生产班组:1是,0否
property: this.entity.property.join(), //属性
parentTitle:this.entity.name, //上级名称
property: property, //属性
parentTitle: this.entity.name //上级名称
};
Api.create(paramsdata)
.then(r => {
......
......@@ -84,10 +84,17 @@ export default {
handleSubmit() {
this.$refs["form"].validate(value => {
if (value) {
if (this.entity.property[0] == 1 || this.entity.property[1] == 1) {
this.entity.isProduction = 1;
let property = "";
if (this.entity.property) {
if (this.entity.property[0] == 1 || this.entity.property[1] == 1) {
this.entity.isProduction = 1;
} else {
this.entity.isProduction = 0;
}
property = this.entity.property.join;
} else {
this.entity.isProduction = 0;
this.entity.isProduction = "";
property = "";
}
let location;
if (this.entity.location) {
......@@ -102,7 +109,7 @@ export default {
organization_Id: this.entity.organization_Id, //组织类型 [id]
location: location, //省市县
isProduction: this.entity.isProduction, //是否生产班组:1是,0否
property: this.entity.property.join(), //属性
property: property, //属性
parentTitle: ""
};
Api.create(paramsdata)
......
......@@ -133,7 +133,7 @@ export default {
},
watch: {
row(v) {
console.log(v)
this.entity = this.row;
if (v.property == "1,2") {
this.entity.property = ["1", "2"];
......@@ -141,8 +141,8 @@ export default {
this.entity.property = ["1"];
} else if (v.property == "2") {
this.entity.property = ["2"];
}else{
this.entity.property=[]
} else {
this.entity.property = [];
}
this.city_level = this.row.location.split(",");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment