|
@@ -125,11 +125,18 @@
|
|
|
<el-form-item label="部门名称" prop="name">
|
|
|
<el-input v-model="depForm.name" placeholder="请输入部门名称" clearable></el-input>
|
|
|
</el-form-item>
|
|
|
+
|
|
|
<el-form-item label="负责人" prop="managerId">
|
|
|
<el-select v-model="depForm.managerId" filterable clearable placeholder="请选择部门负责人" >
|
|
|
<el-option v-for="item in users" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
+ <!-- 部门审核人 -->
|
|
|
+ <el-form-item label="部门审核" prop="reportAuditUserid">
|
|
|
+ <el-select v-model="depForm.reportAuditUserid" filterable clearable placeholder="请选择部门审核人" >
|
|
|
+ <el-option v-for="item in users" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
</el-form>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
<el-button @click="departmentVisible = false">取消</el-button>
|
|
@@ -979,6 +986,7 @@
|
|
|
label: '未分配',
|
|
|
})
|
|
|
this.data = list;
|
|
|
+ console.log(list, "部门数据")
|
|
|
this.option = this.changeArr(list1);
|
|
|
} else {
|
|
|
this.$message({
|
|
@@ -1045,12 +1053,22 @@
|
|
|
}
|
|
|
this.depTitle = "新增部门";
|
|
|
} else {
|
|
|
+ if(this.depData.managerId == "null") {
|
|
|
+ this.depData.managerId = ''
|
|
|
+ }
|
|
|
+ if(this.depData.reportAuditUserid == "null") {
|
|
|
+ this.depData.reportAuditUserid = ''
|
|
|
+ }
|
|
|
this.depForm = {
|
|
|
id: this.depData.id,
|
|
|
name: this.depData.label,
|
|
|
parentId: this.depData.parentId,
|
|
|
managerId: this.depData.managerId,
|
|
|
+ reportAuditUserid: this.depData.reportAuditUserid
|
|
|
}
|
|
|
+ // if(this.depData.reportAuditUserid != null && this.depData.reportAuditUserid != "null" && this.depData.reportAuditUserid.length > 0) {
|
|
|
+ // this.depForm.reportAuditUserid = this.depData.reportAuditUserid
|
|
|
+ // }
|
|
|
this.depTitle = "编辑部门";
|
|
|
}
|
|
|
this.departmentVisible = true;
|
|
@@ -1070,6 +1088,14 @@
|
|
|
}
|
|
|
if (this.depForm.managerId != null) {
|
|
|
form.managerId = this.depForm.managerId
|
|
|
+ } else {
|
|
|
+ form.managerId = "null"
|
|
|
+ }
|
|
|
+ console.log(this.depForm)
|
|
|
+ if (this.depForm.reportAuditUserid != null && this.depForm.reportAuditUserid != "") {
|
|
|
+ form.reportAuditUserid = this.depForm.reportAuditUserid
|
|
|
+ } else {
|
|
|
+ form.reportAuditUserid = "null"
|
|
|
}
|
|
|
this.http.post( this.depForm.id==null?this.port.manage.add:this.port.manage.edit, form,
|
|
|
res => {
|