pengjun 1 year ago
parent
commit
f1d7fae416
  1. 5
      src/components/occDisease/OccDisease.vue
  2. 8
      src/components/occDisease/OccDiseaseConclusion.vue
  3. 215
      src/components/occDisease/OccDiseaseHistory.vue
  4. 21
      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')
});
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) {
this.dataTransOpts.tableM.patient_symptom = deepCopy(res.data['patientSymptomDtos'])
} else {
@ -182,7 +179,7 @@ export default {
btnOk() {
let message = ''
this.dataTransOpts.tableM.patient_poison.forEach((e, i) => {
if (!e.occupationalAbnormalId) message = `接害因素检查结论,第 ${i + 1} 行未下结论`
if (!e.occupationalAbnormalId) e.occupationalAbnormalId = null
});
if (message) {
this.$message.warning({ showClose: true, message })

8
src/components/occDisease/OccDiseaseConclusion.vue

@ -10,10 +10,11 @@
</tr>
<tr>
<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"
size="small" :autosize="{ minRows: 4, maxRows: 4 }"></el-input></td>
size="small" :autosize="{ minRows: 8, maxRows: 8 }"></el-input></td>
</tr>
<!--
<tr>
<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"
size="small" :autosize="{ minRows: 3, maxRows: 3 }"></el-input></td>
</tr>
-->
</table>
<div>处理意见</div>
<div>
<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>
</template>

215
src/components/occDisease/OccDiseaseHistory.vue

@ -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;
}

21
src/components/occDisease/OccDiseasePoison.vue

@ -12,7 +12,7 @@
</el-input>
</template>
</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">
<el-select v-model="scope.row.occupationalAbnormalId" size="small" clearable filterable
:filter-method="filterMethod">
@ -44,7 +44,7 @@
<div>
<el-dialog title="选择接害因素" :visible.sync="dialogPoison" width="400px" :close-on-click-modal="false"
:append-to-body="true">
<div style="height: 320px;">
<div style="height: 320px;">
<el-select v-model="choosedPoison" size="small" style="width:380px;" clearable filterable
:filter-method="filterMethod" value-key="id">
<el-option-group v-for="group in poison" :key="group.poisonTypeName" :label="group.poisonTypeName">
@ -67,7 +67,7 @@ import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { getPagePriv, checkPagePriv, objCopy, deepCopy, arrayExistObj } from "../../utlis/proFunc";
export default {
components: {},
props: ["refFunc","height"],
props: ["refFunc", "height"],
data() {
return {
pagePriv: {
@ -142,7 +142,7 @@ export default {
let lfind = arrayExistObj(this.poisonList, 'id', e.poisonId)
if (lfind > -1) this.poisonList.splice(lfind, 1)
}
});
});
this.poison = this.madeSelectGroup(this.poisonList)
this.dialogPoison = true
},
@ -151,11 +151,11 @@ export default {
// 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)
@ -201,8 +201,8 @@ export default {
this.dataTransOpts.tableM.patient_poison.push({
patientRegisterId: this.patientRegisterId,
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]['poisonName'] = this.choosedPoison.displayName
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 {
width: 110px;
}</style>
}
</style>

8
src/components/occDisease/OccDiseasePrevious.vue

@ -1,9 +1,9 @@
<template>
<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"
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">
<el-input v-model="scope.row.occupationalDisease" size="small" />
</template>
@ -48,10 +48,10 @@
</template>
</el-table-column>
</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"
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">
<el-input v-model="scope.row.occupationalDisease" size="small" />
</template>

Loading…
Cancel
Save