|
|
|
@ -1,67 +1,88 @@ |
|
|
|
<template> |
|
|
|
<div> |
|
|
|
<el-table :data="dataTransOpts.tableM.patient_occupational_history" border height="465" row-key="id" size="small" |
|
|
|
highlight-current-row ref="contactMethod"> |
|
|
|
<el-table-column prop="beginDate" label="开始日期" min-width="90"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-date-picker v-model="scope.row.beginDate" type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd" |
|
|
|
placeholder="开始日期" size="small" style="width: 100%" /> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="endDate" label="结束日期" min-width="90"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-date-picker v-model="scope.row.endDate" type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd" |
|
|
|
placeholder="结束日期" size="small" style="width: 100%" /> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="org" label="工作单位" min-width="130"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-input v-model="scope.row.org" size="small" /> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="workShop" label="车间" min-width="60"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-input v-model="scope.row.workShop" size="small" /> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="workType" label="工种" min-width="60"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-input v-model="scope.row.workType" size="small" /> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="poisonArr" label="接害因素" min-width="130"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-select v-model="scope.row.poisonArr" size="small" style="width:130px" clearable filterable |
|
|
|
:filter-method="filterMethod" multiple > |
|
|
|
<el-option v-for="item in dict.poisonList" :key="item.id" :label="item.displayName" :value="item.displayName" /> |
|
|
|
</el-select> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="protectiveMeasures" label="防护措施" min-width="180"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-autocomplete v-model="scope.row.protectiveMeasures" :fetch-suggestions="querySearch" size="small" clearable /> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="lastModifierName" label="修改人员" min-width="80" align="center" /> |
|
|
|
<el-table-column prop="lastModificationTime" label="修改时间" min-width="150" align="center" /> |
|
|
|
<el-table-column prop="creatorName" label="创建人员" min-width="80" align="center" /> |
|
|
|
<el-table-column prop="creationTime" label="创建时间" min-width="150" align="center" /> |
|
|
|
<el-table-column fixed="right" width="30" align="center"> |
|
|
|
<template slot="header"> |
|
|
|
<div style="display: flex;justify-content:space-between;"> |
|
|
|
<div></div> |
|
|
|
<div> |
|
|
|
<i class="el-icon-plus" @click="btnAdd" style="font-size: 24px;color: blue;cursor:pointer;"></i> |
|
|
|
<div> |
|
|
|
<el-table :data="dataTransOpts.tableM.patient_occupational_history" border height="465" row-key="id" size="small" |
|
|
|
highlight-current-row ref="contactMethod"> |
|
|
|
<el-table-column prop="beginDate" label="开始日期" min-width="90"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-date-picker v-model="scope.row.beginDate" type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd" |
|
|
|
placeholder="开始日期" size="small" style="width: 100%" /> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="endDate" label="结束日期" min-width="90"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-date-picker v-model="scope.row.endDate" type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd" |
|
|
|
placeholder="结束日期" size="small" style="width: 100%" /> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="org" label="工作单位" min-width="120"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-input v-model="scope.row.org" size="small" /> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="workShop" label="车间" min-width="60"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-input v-model="scope.row.workShop" size="small" /> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="workType" label="工种" min-width="80"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-input v-model="scope.row.workType" size="small" /> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="poison" label="接害因素" min-width="180"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-input placeholder="请选接害因素" v-model="scope.row.poison" size="small" disabled> |
|
|
|
<el-button slot="append" icon="el-icon-search" @click="btnDispPoison(scope.$index)" |
|
|
|
style="font-size: 20px;"></el-button> |
|
|
|
</el-input> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="protectiveMeasures" label="防护措施" min-width="180"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-autocomplete v-model="scope.row.protectiveMeasures" :fetch-suggestions="querySearch" size="small" |
|
|
|
clearable /> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="lastModifierName" label="修改人员" min-width="80" align="center" /> |
|
|
|
<el-table-column prop="lastModificationTime" label="修改时间" min-width="150" align="center" /> |
|
|
|
<el-table-column prop="creatorName" label="创建人员" min-width="80" align="center" /> |
|
|
|
<el-table-column prop="creationTime" label="创建时间" min-width="150" align="center" /> |
|
|
|
<el-table-column fixed="right" width="30" align="center"> |
|
|
|
<template slot="header"> |
|
|
|
<div style="display: flex;justify-content:space-between;"> |
|
|
|
<div></div> |
|
|
|
<div> |
|
|
|
<i class="el-icon-plus" @click="btnAdd" style="font-size: 24px;color: blue;cursor:pointer;"></i> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<i class="el-icon-delete" @click="deleteRow(scope.$index)" |
|
|
|
style="font-size: 24px;color: red;cursor:pointer;"></i> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
|
|
|
|
</template> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<i class="el-icon-delete" @click="deleteRow(scope.$index)" |
|
|
|
style="font-size: 24px;color: red;cursor:pointer;"></i> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
<!--弹窗--> |
|
|
|
<div> |
|
|
|
<el-dialog title="选择接害因素" :visible.sync="dialogPoison" width="400px" :close-on-click-modal="false" |
|
|
|
:append-to-body="true"> |
|
|
|
<div style="height: 320px;"> |
|
|
|
<el-select v-model="choosedPoison" size="small" style="width:380px;" clearable filterable |
|
|
|
:filter-method="filterMethod" value-key="id" multiple> |
|
|
|
<el-option-group v-for="group in poison" :key="group.poisonTypeName" :label="group.poisonTypeName"> |
|
|
|
<el-option v-for="item in group.poisonDtos" :key="item.id" :label="item.displayName" |
|
|
|
:value="item.displayName" /> |
|
|
|
</el-option-group> |
|
|
|
</el-select> |
|
|
|
</div> |
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
<el-button type="primary" @click="btnOkPoison">确定</el-button> |
|
|
|
<el-button @click="dialogPoison = false">关闭</el-button> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<script> |
|
|
|
@ -78,8 +99,8 @@ export default { |
|
|
|
routeUrlorPageName: 'customerOrg', //当前页面归属路由或归属页面权限名称 |
|
|
|
privs: [] // 页面权限 |
|
|
|
}, |
|
|
|
protectiveMeasures:[], |
|
|
|
postion: [ |
|
|
|
protectiveMeasures: [], |
|
|
|
poison: [ |
|
|
|
{ |
|
|
|
poisonTypeName: "职业史", |
|
|
|
poisonDtos: [ |
|
|
|
@ -91,6 +112,10 @@ export default { |
|
|
|
] |
|
|
|
} |
|
|
|
], // 毒害因素 |
|
|
|
poisonList: [], |
|
|
|
dialogPoison: false, |
|
|
|
currRow: 0, |
|
|
|
choosedPoison: [], |
|
|
|
}; |
|
|
|
}, |
|
|
|
|
|
|
|
@ -98,7 +123,7 @@ export default { |
|
|
|
//获取用户当前页面的权限 |
|
|
|
let userPriv = window.sessionStorage.getItem('userPriv') |
|
|
|
if (userPriv) this.pagePriv.privs = deepCopy(getPagePriv(this.pagePriv.routeUrlorPageName)) |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//挂载完成 |
|
|
|
@ -113,20 +138,20 @@ export default { |
|
|
|
methods: { |
|
|
|
moment, checkPagePriv, |
|
|
|
|
|
|
|
dictInit() { |
|
|
|
|
|
|
|
dictInit() { |
|
|
|
|
|
|
|
// 防护措施 |
|
|
|
postapi("/api/app/ProtectiveMeasures/GetList").then((res) => { |
|
|
|
if (res.code > -1) { |
|
|
|
this.protectiveMeasures = [] |
|
|
|
res.data.forEach(e => { |
|
|
|
this.protectiveMeasures.push({value:e.displayName}) |
|
|
|
}); |
|
|
|
this.protectiveMeasures.push({ value: e.displayName }) |
|
|
|
}); |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
querySearch(queryString, cb) { |
|
|
|
|
|
|
|
querySearch(queryString, cb) { |
|
|
|
let results = queryString |
|
|
|
? this.protectiveMeasures.filter(e => { return e.value.indexOf(queryString) > -1 }) |
|
|
|
: this.protectiveMeasures; |
|
|
|
@ -135,13 +160,19 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
filterMethod(v) { |
|
|
|
// console.log('this.poisonList',v,this.poisonList) |
|
|
|
if (v) { |
|
|
|
|
|
|
|
let lv = v.toUpperCase() |
|
|
|
|
|
|
|
let poisonList = this.poisonList.filter(e => { |
|
|
|
return e.poisonTypeName.indexOf(lv) > -1 || e.displayName.indexOf(lv) > -1 || e.simpleCode.indexOf(lv) > -1 |
|
|
|
}) |
|
|
|
|
|
|
|
this.poison = this.madeSelectGroup(poisonList) |
|
|
|
} else { |
|
|
|
|
|
|
|
this.poison = this.madeSelectGroup(this.poisonList) |
|
|
|
} |
|
|
|
console.log('filterMethod', v) |
|
|
|
|
|
|
|
console.log('filterMethod', this.poison) |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
@ -169,6 +200,38 @@ export default { |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
// 显示选择症状项目 |
|
|
|
btnDispPoison(index) { |
|
|
|
this.currRow = index |
|
|
|
this.poisonList = deepCopy(this.dict.poisonList) |
|
|
|
|
|
|
|
this.poison = this.madeSelectGroup(this.poisonList) |
|
|
|
this.choosedPoison = this.dataTransOpts.tableM.patient_occupational_history[index]['poison'].split(",") |
|
|
|
this.dialogPoison = true |
|
|
|
}, |
|
|
|
|
|
|
|
// 列表数据生成 分组 select |
|
|
|
madeSelectGroup(poisonList) { |
|
|
|
let poison = [] |
|
|
|
poisonList.forEach(e => { |
|
|
|
let lfind = arrayExistObj(poison, "poisonTypeName", e.poisonTypeName) |
|
|
|
if (lfind == -1) { |
|
|
|
poison.push({ poisonTypeName: e.poisonTypeName, poisonDtos: [{ id: e.id, displayName: e.displayName, simpleCode: e.simpleCode }] }) |
|
|
|
} else { |
|
|
|
poison[lfind]['poisonDtos'].push({ id: e.id, displayName: e.displayName, simpleCode: e.simpleCode }) |
|
|
|
} |
|
|
|
}); |
|
|
|
return poison |
|
|
|
}, |
|
|
|
|
|
|
|
// 确定选择症状 |
|
|
|
btnOkPoison() { |
|
|
|
// console.log('this.choosedPoison',this.choosedPoison) |
|
|
|
this.dataTransOpts.tableM.patient_occupational_history[this.currRow]['poison'] = `${this.choosedPoison}` |
|
|
|
this.dialogPoison = false |
|
|
|
// console.log('this.dataTransOpts.tableM.patient_poison', this.dataTransOpts.tableM.patient_poison) |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
watch: { |
|
|
|
@ -197,6 +260,10 @@ export default { |
|
|
|
font-weight: 700; |
|
|
|
} |
|
|
|
|
|
|
|
::v-deep .el-icon-search:before { |
|
|
|
color: #00F; |
|
|
|
} |
|
|
|
|
|
|
|
.btnClass { |
|
|
|
width: 110px; |
|
|
|
} |
|
|
|
|