pengjun 1 year ago
parent
commit
f1d7fae416
  1. 5
      src/components/occDisease/OccDisease.vue
  2. 8
      src/components/occDisease/OccDiseaseConclusion.vue
  3. 97
      src/components/occDisease/OccDiseaseHistory.vue
  4. 13
      src/components/occDisease/OccDiseasePoison.vue
  5. 8
      src/components/occDisease/OccDiseasePrevious.vue

5
src/components/occDisease/OccDisease.vue

@ -135,9 +135,6 @@ export default {
e.poisonName = dddw(this.dict.poisonList,'id',e.poisonId,'displayName') e.poisonName = dddw(this.dict.poisonList,'id',e.poisonId,'displayName')
}); });
this.dataTransOpts.tableM.patient_occupational_history = deepCopy(res.data['patientOccupationalHistoryDtos']) this.dataTransOpts.tableM.patient_occupational_history = deepCopy(res.data['patientOccupationalHistoryDtos'])
this.dataTransOpts.tableM.patient_occupational_history.forEach(e => {
e.poisonArr = e.poison.split(',')
});
if (Array.isArray(res.data['patientSymptomDtos']) && res.data['patientSymptomDtos'].length > 0) { if (Array.isArray(res.data['patientSymptomDtos']) && res.data['patientSymptomDtos'].length > 0) {
this.dataTransOpts.tableM.patient_symptom = deepCopy(res.data['patientSymptomDtos']) this.dataTransOpts.tableM.patient_symptom = deepCopy(res.data['patientSymptomDtos'])
} else { } else {
@ -182,7 +179,7 @@ export default {
btnOk() { btnOk() {
let message = '' let message = ''
this.dataTransOpts.tableM.patient_poison.forEach((e, i) => { this.dataTransOpts.tableM.patient_poison.forEach((e, i) => {
if (!e.occupationalAbnormalId) message = `接害因素检查结论,第 ${i + 1} 行未下结论`
if (!e.occupationalAbnormalId) e.occupationalAbnormalId = null
}); });
if (message) { if (message) {
this.$message.warning({ showClose: true, message }) this.$message.warning({ showClose: true, message })

8
src/components/occDisease/OccDiseaseConclusion.vue

@ -10,10 +10,11 @@
</tr> </tr>
<tr> <tr>
<td><el-input type="textarea" v-model="dataTransOpts.tableS.patient_occupational_disease.occupationalAbnormal" <td><el-input type="textarea" v-model="dataTransOpts.tableS.patient_occupational_disease.occupationalAbnormal"
size="small" :autosize="{ minRows: 4, maxRows: 4 }"></el-input></td>
size="small" :autosize="{ minRows: 8, maxRows: 8 }"></el-input></td>
<td><el-input type="textarea" v-model="dataTransOpts.tableS.patient_occupational_disease.occupationalAbSuggestion" <td><el-input type="textarea" v-model="dataTransOpts.tableS.patient_occupational_disease.occupationalAbSuggestion"
size="small" :autosize="{ minRows: 4, maxRows: 4 }"></el-input></td>
size="small" :autosize="{ minRows: 8, maxRows: 8 }"></el-input></td>
</tr> </tr>
<!--
<tr> <tr>
<td width="50%">非职业性异常</td> <td width="50%">非职业性异常</td>
<td width="50%">建议</td> <td width="50%">建议</td>
@ -24,11 +25,12 @@
<td><el-input type="textarea" v-model="dataTransOpts.tableS.patient_occupational_disease.noOccupAbSuggestion" <td><el-input type="textarea" v-model="dataTransOpts.tableS.patient_occupational_disease.noOccupAbSuggestion"
size="small" :autosize="{ minRows: 3, maxRows: 3 }"></el-input></td> size="small" :autosize="{ minRows: 3, maxRows: 3 }"></el-input></td>
</tr> </tr>
-->
</table> </table>
<div>处理意见</div> <div>处理意见</div>
<div> <div>
<el-input type="textarea" v-model="dataTransOpts.tableS.patient_occupational_disease.handleSuggestion" size="small" <el-input type="textarea" v-model="dataTransOpts.tableS.patient_occupational_disease.handleSuggestion" size="small"
:autosize="{ minRows: 1, maxRows: 2 }"></el-input>
:autosize="{ minRows: 2, maxRows: 2 }"></el-input>
</div> </div>
</div> </div>
</template> </template>

97
src/components/occDisease/OccDiseaseHistory.vue

@ -1,4 +1,5 @@
<template> <template>
<div>
<div> <div>
<el-table :data="dataTransOpts.tableM.patient_occupational_history" border height="465" row-key="id" size="small" <el-table :data="dataTransOpts.tableM.patient_occupational_history" border height="465" row-key="id" size="small"
highlight-current-row ref="contactMethod"> highlight-current-row ref="contactMethod">
@ -14,7 +15,7 @@
placeholder="结束日期" size="small" style="width: 100%" /> placeholder="结束日期" size="small" style="width: 100%" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="org" label="工作单位" min-width="130">
<el-table-column prop="org" label="工作单位" min-width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.org" size="small" /> <el-input v-model="scope.row.org" size="small" />
</template> </template>
@ -24,22 +25,23 @@
<el-input v-model="scope.row.workShop" size="small" /> <el-input v-model="scope.row.workShop" size="small" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="workType" label="工种" min-width="60">
<el-table-column prop="workType" label="工种" min-width="80">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.workType" size="small" /> <el-input v-model="scope.row.workType" size="small" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="poisonArr" label="接害因素" min-width="130">
<el-table-column prop="poison" label="接害因素" min-width="180">
<template slot-scope="scope"> <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>
<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> </template>
</el-table-column> </el-table-column>
<el-table-column prop="protectiveMeasures" label="防护措施" min-width="180"> <el-table-column prop="protectiveMeasures" label="防护措施" min-width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<el-autocomplete v-model="scope.row.protectiveMeasures" :fetch-suggestions="querySearch" size="small" clearable />
<el-autocomplete v-model="scope.row.protectiveMeasures" :fetch-suggestions="querySearch" size="small"
clearable />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="lastModifierName" label="修改人员" min-width="80" align="center" /> <el-table-column prop="lastModifierName" label="修改人员" min-width="80" align="center" />
@ -61,7 +63,26 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </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> </div>
</template> </template>
<script> <script>
@ -78,8 +99,8 @@ export default {
routeUrlorPageName: 'customerOrg', // routeUrlorPageName: 'customerOrg', //
privs: [] // privs: [] //
}, },
protectiveMeasures:[],
postion: [
protectiveMeasures: [],
poison: [
{ {
poisonTypeName: "职业史", poisonTypeName: "职业史",
poisonDtos: [ poisonDtos: [
@ -91,6 +112,10 @@ export default {
] ]
} }
], // ], //
poisonList: [],
dialogPoison: false,
currRow: 0,
choosedPoison: [],
}; };
}, },
@ -120,7 +145,7 @@ export default {
if (res.code > -1) { if (res.code > -1) {
this.protectiveMeasures = [] this.protectiveMeasures = []
res.data.forEach(e => { res.data.forEach(e => {
this.protectiveMeasures.push({value:e.displayName})
this.protectiveMeasures.push({ value: e.displayName })
}); });
} }
}); });
@ -135,13 +160,19 @@ export default {
}, },
filterMethod(v) { filterMethod(v) {
// console.log('this.poisonList',v,this.poisonList)
if (v) { if (v) {
let lv = v.toUpperCase()
} else {
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: { watch: {
@ -197,6 +260,10 @@ export default {
font-weight: 700; font-weight: 700;
} }
::v-deep .el-icon-search:before {
color: #00F;
}
.btnClass { .btnClass {
width: 110px; width: 110px;
} }

13
src/components/occDisease/OccDiseasePoison.vue

@ -12,7 +12,7 @@
</el-input> </el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="occupationalAbnormalId" label="接害因素检查结论" min-width="130" align="center">
<el-table-column v-if="height < 300" prop="occupationalAbnormalId" label="接害因素检查结论" min-width="130" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-select v-model="scope.row.occupationalAbnormalId" size="small" clearable filterable <el-select v-model="scope.row.occupationalAbnormalId" size="small" clearable filterable
:filter-method="filterMethod"> :filter-method="filterMethod">
@ -67,7 +67,7 @@ import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { getPagePriv, checkPagePriv, objCopy, deepCopy, arrayExistObj } from "../../utlis/proFunc"; import { getPagePriv, checkPagePriv, objCopy, deepCopy, arrayExistObj } from "../../utlis/proFunc";
export default { export default {
components: {}, components: {},
props: ["refFunc","height"],
props: ["refFunc", "height"],
data() { data() {
return { return {
pagePriv: { pagePriv: {
@ -201,8 +201,8 @@ export default {
this.dataTransOpts.tableM.patient_poison.push({ this.dataTransOpts.tableM.patient_poison.push({
patientRegisterId: this.patientRegisterId, patientRegisterId: this.patientRegisterId,
poisonId: '', poisonId: '',
poisonName:'',
occupationalAbnormalId:null
poisonName: '',
occupationalAbnormalId: null
}); });
}, },
@ -212,7 +212,7 @@ export default {
this.dataTransOpts.tableM.patient_poison[this.currRow]['poisonId'] = this.choosedPoison.id this.dataTransOpts.tableM.patient_poison[this.currRow]['poisonId'] = this.choosedPoison.id
this.dataTransOpts.tableM.patient_poison[this.currRow]['poisonName'] = this.choosedPoison.displayName this.dataTransOpts.tableM.patient_poison[this.currRow]['poisonName'] = this.choosedPoison.displayName
this.dialogPoison = false this.dialogPoison = false
console.log('this.dataTransOpts.tableM.patient_poison',this.dataTransOpts.tableM.patient_poison)
// console.log('this.dataTransOpts.tableM.patient_poison', this.dataTransOpts.tableM.patient_poison)
} }
}, },
@ -255,4 +255,5 @@ export default {
.btnClass { .btnClass {
width: 110px; width: 110px;
}</style>
}
</style>

8
src/components/occDisease/OccDiseasePrevious.vue

@ -1,9 +1,9 @@
<template> <template>
<div> <div>
<div style="margin-left: 10px;font-weight: 700;">既往病史</div>
<div style="margin-left: 10px;font-weight: 700;">既往病史</div>
<el-table :data="dataTransOpts.tableM.patient_past_medical_history" border height="200" row-key="id" size="small" <el-table :data="dataTransOpts.tableM.patient_past_medical_history" border height="200" row-key="id" size="small"
highlight-current-row ref="Previous"> highlight-current-row ref="Previous">
<el-table-column prop="occupationalDisease" label="既往疾病名称" min-width="150">
<el-table-column prop="occupationalDisease" label="疾病名称" min-width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.occupationalDisease" size="small" /> <el-input v-model="scope.row.occupationalDisease" size="small" />
</template> </template>
@ -48,10 +48,10 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div style="margin: 10px 0 0 10px;font-weight: 700;">职业病史</div>
<div style="margin: 10px 0 0 10px;font-weight: 700;">职业病史</div>
<el-table :data="dataTransOpts.tableM.patient_occupational_medical_history" border height="200" row-key="id" <el-table :data="dataTransOpts.tableM.patient_occupational_medical_history" border height="200" row-key="id"
size="small" highlight-current-row ref="occ"> size="small" highlight-current-row ref="occ">
<el-table-column prop="occupationalDisease" label="职业疾病名称" min-width="150">
<el-table-column prop="occupationalDisease" label="疾病名称" min-width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.occupationalDisease" size="small" /> <el-input v-model="scope.row.occupationalDisease" size="small" />
</template> </template>

Loading…
Cancel
Save