|
|
|
@ -151,7 +151,7 @@ |
|
|
|
<div style="display: flex;margin:20px;"> |
|
|
|
<div> |
|
|
|
<span>体检单位:</span> |
|
|
|
<el-cascader v-model="query.customerOrgIds" :options="customerOrgTree" |
|
|
|
<el-cascader v-model="customerOrgIds" :options="customerOrgTree" |
|
|
|
style="width:200px;" @change="changeCustomerOrg" filterable :filter-method="filterMethod" |
|
|
|
:props="{ checkStrictly: true, expandTrigger: 'hover', ...customerOrg.treeprops, }" |
|
|
|
:show-all-levels="false" size="small"> |
|
|
|
@ -1054,6 +1054,7 @@ export default { |
|
|
|
e.choosed = false; |
|
|
|
e.index = index; |
|
|
|
e.id = 'excelData' + index; |
|
|
|
|
|
|
|
}); |
|
|
|
//console.log('this.excelCols',this.excelCols) |
|
|
|
// console.log('sheet_to_json excelData',this.excelData) |
|
|
|
@ -1144,6 +1145,7 @@ export default { |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
//右击显示的菜单 |
|
|
|
this.$contextmenu({ |
|
|
|
items, |
|
|
|
event, |
|
|
|
@ -1160,6 +1162,7 @@ export default { |
|
|
|
|
|
|
|
//设置真实数据字段列 |
|
|
|
setColumn(oldColNum,newColObj){ |
|
|
|
// console.log('oldColNum,newColObj',oldColNum,newColObj) |
|
|
|
//如果数据字段已设置过,则将之前设置的先清空 |
|
|
|
if(newColObj.dispLabel != "不设置"){ |
|
|
|
let lfind = arrayExistObj(this.excelCols,'dataLabel',newColObj.dispLabel) |
|
|
|
@ -1168,8 +1171,18 @@ export default { |
|
|
|
this.excelCols[lfind].val = '' |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
this.excelCols[oldColNum].dataLabel = newColObj.dispLabel |
|
|
|
this.excelCols[oldColNum].val = newColObj.val |
|
|
|
// console.log('newColObj.val',newColObj.val) |
|
|
|
let tempDate = '' |
|
|
|
if(newColObj.val == 'birthDate'){ |
|
|
|
this.excelData.forEach(e =>{ |
|
|
|
tempDate = e[this.excelCols[oldColNum].dispLabel] |
|
|
|
// console.log('birthDate',tempDate) |
|
|
|
e[this.excelCols[oldColNum].dispLabel] = tempDate ? moment(new Date(tempDate)).format('yyyy-MM-DD'):'' |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
// 导入后,批量分析Excel列 与 数据字段 的匹配关系 |
|
|
|
@ -1277,9 +1290,9 @@ export default { |
|
|
|
case 'age': |
|
|
|
if(ExcelData[e.dispLabel]) body[e.val] = parseInt(ExcelData[e.dispLabel]) |
|
|
|
break; |
|
|
|
case 'birthDate': |
|
|
|
if(ExcelData[e.dispLabel]) body[e.val] = moment(new Date(ExcelData[e.dispLabel])).format('yyyy-MM-DD') |
|
|
|
break; |
|
|
|
// case 'birthDate': |
|
|
|
// if(ExcelData[e.dispLabel]) body[e.val] = moment(new Date(ExcelData[e.dispLabel])).format('yyyy-MM-DD') |
|
|
|
// break; |
|
|
|
default: |
|
|
|
body[e.val] = ExcelData[e.dispLabel] |
|
|
|
break; |
|
|
|
|