Commit 77bd72b8 authored by renjintao's avatar renjintao

department

parent a1ef6047
...@@ -472,6 +472,30 @@ export default { ...@@ -472,6 +472,30 @@ export default {
//对列表里的数据字典项进行处理 //对列表里的数据字典项进行处理
useData.forEach(eles => { useData.forEach(eles => {
//如果导入文件没有departmentid,但存在departmentTitle的话,通过title获取id
if (
eles.departmentTitle &&
eles.departmentTitle != "" &&
(!eles.departmentId || eles.departmentId == "")
) {
this.departArr.forEach((e) => {
if (eles.departmentTitle && eles.departmentTitle == e.name) {
eles.departmentId = e.id;
}
});
} else if (
//如果导入文件没有departmentTitle,但存在departmentid的话,通过id获取departmentTitle
eles.departmentId &&
eles.departmentId + "" != "" &&
(!eles.departmentTitle || eles.departmentTitle == "")
) {
this.departArr.forEach((e) => {
if (eles.departmentId && eles.departmentId == e.id) {
eles.departmentTitle = e.name;
}
});
}
arrTitleUse.forEach((elem) => { arrTitleUse.forEach((elem) => {
if (eles[elem.key] && eles[elem.key] != "" && eles[elem.key] != null) { if (eles[elem.key] && eles[elem.key] != "" && eles[elem.key] != null) {
//如果数据字典项对应的DirName字段存在,通过name查询到对应的code,然后赋值 //如果数据字典项对应的DirName字段存在,通过name查询到对应的code,然后赋值
...@@ -486,7 +510,6 @@ export default { ...@@ -486,7 +510,6 @@ export default {
}, },
//下载原excel文件 //下载原excel文件
downFile() { downFile() {
//alert(path)
let truePath = this.entity.path; let truePath = this.entity.path;
if (truePath.length > 2) { if (truePath.length > 2) {
if ( if (
......
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