pengjun 2 years ago
parent
commit
9e4288ffcb
  1. 28
      src/components/occDisease/OccDisease.vue
  2. 34
      src/components/occDisease/OccDiseaseConclusion.vue
  3. 67
      src/components/occDisease/OccDiseaseHistory.vue
  4. 219
      src/components/occDisease/OccDiseasePoison.vue
  5. 171
      src/components/occDisease/OccDiseaseSymptom.vue
  6. 4
      src/store/index.js

28
src/components/occDisease/OccDisease.vue

@ -7,8 +7,8 @@
<el-tab-pane label="既往病史" name="1">
<OccDiseasePrevious />
</el-tab-pane>
<el-tab-pane label="接害因素检查结论" name="2">
<OccDiseasePoison />
<el-tab-pane label="接害因素" name="2">
<OccDiseasePoison :height="465"/>
</el-tab-pane>
<el-tab-pane label="职业史" name="3">
@ -30,6 +30,7 @@
<div style="display: flex;justify-content: space-between;">
<div></div>
<div>
<el-button @click="btnTest">测试</el-button>
<el-button class="deleteButton" @click="btnDel">删除</el-button>
<el-button class="commonbutton" @click="btnOk">确定</el-button>
<el-button class="commonbutton" @click="btnClose">关闭</el-button>
@ -40,7 +41,7 @@
<script>
import { mapState } from "vuex";
import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { deepCopy } from "../../utlis/proFunc";
import { dddw, deepCopy } from "../../utlis/proFunc";
import OccDiseaseBase from "./OccDiseaseBase.vue";
import OccDiseasePrevious from "./OccDiseasePrevious.vue";
@ -98,11 +99,11 @@ export default {
//
let res = await postapi("/api/app/Poison/GetPoisonWithTypeList")
if (res.code > -1) {
this.dict.postion = res.data;
this.dict.postionList = []
this.dict.postion.forEach(e => {
this.dict.poison = res.data;
this.dict.poisonList = []
this.dict.poison.forEach(e => {
e.poisonDtos.forEach(e2 => {
this.dict.postionList.push({
this.dict.poisonList.push({
poisonTypeName: e.poisonTypeName,
id: e2.id,
displayName: e2.displayName,
@ -130,13 +131,22 @@ export default {
this.dataTransOpts.tableM.patient_past_medical_history = deepCopy(res.data['patientPastMedicalHistoryDtos'])
this.dataTransOpts.tableM.patient_occupational_medical_history = deepCopy(res.data['patientOccupationalMedicalHistoryDtos'])
this.dataTransOpts.tableM.patient_poison = deepCopy(res.data['patientPoisonDtos'])
this.dataTransOpts.tableM.patient_poison.forEach(e => {
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 {
this.dataTransOpts.tableM.patient_symptom = []
this.dict.symptom.forEach(e => {
this.dataTransOpts.tableM.patient_symptom.push({ symptomId: e.id, degree: '-' })
// /
if(!(this.dataTransOpts.tableS.patient_register.sexId != 'F' && (e.displayName.indexOf('月经') > -1 || e.displayName.indexOf('经期') > -1))){
this.dataTransOpts.tableM.patient_symptom.push({ symptomId: e.id, symptomName:e.displayName, degree: '-' })
}
});
}
}
@ -205,7 +215,7 @@ export default {
})
},
//
//
btnClose() {
this.dialogWin.OccDisease = false
},

34
src/components/occDisease/OccDiseaseConclusion.vue

@ -1,36 +1,45 @@
<template>
<div>
<div style="height: 468px;overflow-y: auto;">
<div>
<OccDiseasePoison :height="200" />
</div>
<table width="100%">
<tr>
<td width="50%">职业性异常</td>
<td width="50%">建议</td>
</tr>
<tr>
<td><el-input type="textarea" v-model="dataTransOpts.tableS.patient_occupational_disease.occupationalAbnormal" 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: 8, maxRows: 8 }"></el-input></td>
<td><el-input type="textarea" v-model="dataTransOpts.tableS.patient_occupational_disease.occupationalAbnormal"
size="small" :autosize="{ minRows: 4, maxRows: 4 }"></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>
</tr>
<tr>
<td width="50%">非职业性异常</td>
<td width="50%">建议</td>
</tr>
<tr>
<td><el-input type="textarea" v-model="dataTransOpts.tableS.patient_occupational_disease.noOccupationalAbnormal" size="small" :autosize="{ minRows: 8, maxRows: 8 }"></el-input></td>
<td><el-input type="textarea" v-model="dataTransOpts.tableS.patient_occupational_disease.noOccupAbSuggestion" size="small" :autosize="{ minRows: 8, maxRows: 8 }"></el-input></td>
<td><el-input type="textarea" v-model="dataTransOpts.tableS.patient_occupational_disease.noOccupationalAbnormal"
size="small" :autosize="{ minRows: 3, maxRows: 3 }"></el-input></td>
<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>
</table>
<div>处理意见</div>
<div>
<el-input type="textarea" v-model="dataTransOpts.tableS.patient_occupational_disease.handleSuggestion" size="small" :autosize="{ minRows: 2, maxRows: 2 }"></el-input>
<el-input type="textarea" v-model="dataTransOpts.tableS.patient_occupational_disease.handleSuggestion" size="small"
:autosize="{ minRows: 1, maxRows: 2 }"></el-input>
</div>
</div>
</template>
<script>
import moment from "moment";
import { mapState } from "vuex";
import OccDiseasePoison from "./OccDiseasePoison.vue";
import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { getPagePriv, checkPagePriv, objCopy, deepCopy, arrayExistObj } from "../../utlis/proFunc";
export default {
components: {},
components: { OccDiseasePoison },
props: ["refFunc"],
data() {
return {
@ -45,12 +54,12 @@ export default {
created() {
//
let userPriv = window.sessionStorage.getItem('userPriv')
if (userPriv) this.pagePriv.privs = deepCopy(getPagePriv(this.pagePriv.routeUrlorPageName))
if (userPriv) this.pagePriv.privs = deepCopy(getPagePriv(this.pagePriv.routeUrlorPageName))
},
//
mounted() {
},
computed: {
@ -59,7 +68,7 @@ export default {
methods: {
moment, checkPagePriv,
},
@ -84,5 +93,4 @@ export default {
.btnClass {
width: 110px;
}
</style>
}</style>

67
src/components/occDisease/OccDiseaseHistory.vue

@ -29,21 +29,17 @@
<el-input v-model="scope.row.workType" size="small" />
</template>
</el-table-column>
<el-table-column prop="poison" label="接害因素" min-width="130">
<el-table-column prop="poisonArr" label="接害因素" min-width="130">
<template slot-scope="scope">
<el-select v-model="scope.row.poison" size="small" style="width:130px" clearable filterable
:filter-method="filterMethod">
<el-option-group v-for="group in postion" :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 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-select v-model="scope.row.protectiveMeasures" size="small">
<el-option v-for="item in protectiveMeasures" :key="item.id" :label="item.displayName" :value="item.displayName" />
</el-select>
<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" />
@ -117,53 +113,32 @@ export default {
methods: {
moment, checkPagePriv,
dictInit() {
//
postapi("/api/app/Poison/GetPoisonWithTypeList").then(res => {
if (res.code > -1) {
this.dict.postion = res.data;
this.postion = res.data;
this.dict.postionList = []
this.dict.postion.forEach(e => {
e.poisonDtos.forEach(e2 => {
this.dict.postionList.push({
poisonTypeName: e.poisonTypeName,
id: e2.id,
displayName: e2.displayName,
simpleCode: e2.simpleCode
})
});
});
}
})
dictInit() {
//
//
postapi("/api/app/ProtectiveMeasures/GetList").then((res) => {
if (res.code > -1) {
this.protectiveMeasures = res.data;
this.protectiveMeasures = []
res.data.forEach(e => {
this.protectiveMeasures.push({value:e.displayName})
});
}
});
},
querySearch(queryString, cb) {
let results = queryString
? this.protectiveMeasures.filter(e => { return e.value.indexOf(queryString) > -1 })
: this.protectiveMeasures;
// callback
cb(results);
},
filterMethod(v) {
if (v) {
let lv = v.toUpperCase()
let postion = []
let postionList = this.dict.postionList.filter(e => {
return e.poisonTypeName.indexOf(lv) > -1 || e.displayName.indexOf(lv) > -1 || e.simpleCode.indexOf(lv) > -1
})
postionList.forEach(e => {
let lfind = arrayExistObj(postion, "poisonTypeName", e.poisonTypeName)
if (lfind == -1) {
postion.push({ poisonTypeName: e.poisonTypeName, poisonDtos: [{ id: e.id, displayName: e.displayName, simpleCode: e.simpleCode }] })
} else {
postion[lfind]['poisonDtos'].push({ id: e.id, displayName: e.displayName, simpleCode: e.simpleCode })
}
});
this.postion = postion
} else {
this.postion = deepCopy(this.dict.postion)
}
console.log('filterMethod', v)

219
src/components/occDisease/OccDiseasePoison.vue

@ -1,45 +1,63 @@
<template>
<div>
<el-table :data="dataTransOpts.tableM.patient_poison" border height="465" row-key="id" size="small"
highlight-current-row ref="patientPoison">
<el-table-column prop="poisonId" label="接害因素" min-width="150">
<template slot-scope="scope">
<el-select v-model="scope.row.poisonId" size="small" style="width:220px" clearable filterable
:filter-method="filterMethod">
<el-option-group v-for="group in postion" :key="group.poisonTypeName" :label="group.poisonTypeName">
<el-option v-for="item in group.poisonDtos" :key="item.id" :label="item.displayName" :value="item.id" />
<!--组件主体-->
<div>
<el-table :data="dataTransOpts.tableM.patient_poison" border :height="height" row-key="id" size="small"
highlight-current-row ref="patientPoison">
<el-table-column prop="poisonName" label="接害因素" min-width="150">
<template slot-scope="scope">
<el-input placeholder="请选接害因素" v-model="scope.row.poisonName" 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="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">
<el-option v-for="item in occupationalAbnormal" :key="item.id" :label="item.displayName" :value="item.id" />
</el-select>
</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>
</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">
<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" />
</el-option-group>
</el-select>
</template>
</el-table-column>
<el-table-column 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">
<el-option v-for="item in occupationalAbnormal" :key="item.id" :label="item.displayName" :value="item.id" />
</el-select>
</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>
</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>
<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>
@ -49,26 +67,19 @@ import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { getPagePriv, checkPagePriv, objCopy, deepCopy, arrayExistObj } from "../../utlis/proFunc";
export default {
components: {},
props: ["refFunc"],
props: ["refFunc","height"],
data() {
return {
pagePriv: {
routeUrlorPageName: 'customerOrg', //
privs: [] //
},
postion: [
{
poisonTypeName: "职业史",
poisonDtos: [
{
id: "3a12ad8e-3b84-75a2-415e-c03ed69bda66",
displayName: "噪声,粉尘",
simpleCode: "ZS,FC"
}
]
}
], //
poisonList: [],
poison: [], //
occupationalAbnormal: [], //
currRow: 0,
choosedPoison: {},
dialogPoison: false,
};
},
@ -81,7 +92,7 @@ export default {
//
mounted() {
this.dictInit()
this.dictInit()
},
computed: {
@ -95,23 +106,23 @@ export default {
dictInit() {
//
postapi("/api/app/Poison/GetPoisonWithTypeList").then(res => {
if (res.code > -1) {
this.dict.postion = res.data;
this.postion = res.data;
this.dict.postionList = []
this.dict.postion.forEach(e => {
e.poisonDtos.forEach(e2 => {
this.dict.postionList.push({
poisonTypeName: e.poisonTypeName,
id: e2.id,
displayName: e2.displayName,
simpleCode: e2.simpleCode
})
});
});
}
})
// postapi("/api/app/Poison/GetPoisonWithTypeList").then(res => {
// if (res.code > -1) {
// this.dict.poison = res.data;
// this.poison = res.data;
// this.dict.poisonList = []
// this.dict.poison.forEach(e => {
// e.poisonDtos.forEach(e2 => {
// this.dict.poisonList.push({
// poisonTypeName: e.poisonTypeName,
// id: e2.id,
// displayName: e2.displayName,
// simpleCode: e2.simpleCode
// })
// });
// });
// }
// })
//
postapi("/api/app/OccupationalAbnormal/GetList").then((res) => {
@ -122,29 +133,49 @@ export default {
},
//
btnDispPoison(index) {
this.currRow = index
this.poisonList = deepCopy(this.dict.poisonList)
this.dataTransOpts.tableM.patient_poison.forEach((e, i) => {
if (i != index) {
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
},
filterMethod(v) {
// console.log('this.poisonList',v,this.poisonList)
if (v) {
let lv = v.toUpperCase()
let postion = []
let postionList = this.dict.postionList.filter(e => {
let poisonList = this.poisonList.filter(e => {
return e.poisonTypeName.indexOf(lv) > -1 || e.displayName.indexOf(lv) > -1 || e.simpleCode.indexOf(lv) > -1
})
postionList.forEach(e => {
let lfind = arrayExistObj(postion, "poisonTypeName", e.poisonTypeName)
if (lfind == -1) {
postion.push({ poisonTypeName: e.poisonTypeName, poisonDtos: [{ id: e.id, displayName: e.displayName, simpleCode: e.simpleCode }] })
} else {
postion[lfind]['poisonDtos'].push({ id: e.id, displayName: e.displayName, simpleCode: e.simpleCode })
}
});
this.postion = postion
this.poison = this.madeSelectGroup(poisonList)
} else {
this.postion = deepCopy(this.dict.postion)
this.poison = this.madeSelectGroup(this.poisonList)
}
console.log('filterMethod', v)
// console.log('filterMethod', this.poison)
},
// 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
},
@ -166,13 +197,24 @@ export default {
//
btnAdd() {
this.postion = deepCopy(this.dict.postion)
this.poison = deepCopy(this.dict.poison)
this.dataTransOpts.tableM.patient_poison.push({
patientRegisterId: this.patientRegisterId,
poisonId: ''
poisonId: '',
poisonName:'',
occupationalAbnormalId:null
});
},
//
btnOkPoison() {
// console.log('this.choosedPoison',this.choosedPoison)
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)
}
},
watch: {
@ -207,7 +249,10 @@ export default {
font-weight: 700;
}
::v-deep .el-icon-search:before {
color: #00F;
}
.btnClass {
width: 110px;
}
</style>
}</style>

171
src/components/occDisease/OccDiseaseSymptom.vue

@ -1,47 +1,65 @@
<template>
<div>
<el-table :data="dataTransOpts.tableM.patient_symptom" border height="465" row-key="id" size="small"
highlight-current-row ref="patientSymptom">
<el-table-column type="index" label="序号" width="40" align="center"/>
<el-table-column prop="symptomId" label="项目" min-width="150">
<template slot-scope="scope">
<el-select v-model="scope.row.symptomId" size="small" clearable filterable :filter-method="filterMethod">
<el-option v-for="item in symptom" :key="item.id" :label="item.displayName" :value="item.id" />
</el-select>
</template>
</el-table-column>
<el-table-column prop="degree" label="程度" min-width="70">
<template slot-scope="scope">
<el-select v-model="scope.row.degree" size="small">
<el-option v-for="item in dict.degree" :key="item.id" :label="item.displayName" :value="item.id" />
</el-select>
</template>
</el-table-column>
<el-table-column prop="timeLength" label="时长" min-width="70">
<template slot-scope="scope">
<el-autocomplete v-model="scope.row.timeLength" :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_symptom" border height="465" row-key="id" size="small"
highlight-current-row ref="patientSymptom">
<el-table-column type="index" label="序号" width="40" align="center" />
<el-table-column prop="symptomName" label="项目" min-width="150">
<template slot-scope="scope">
<el-input placeholder="请选项目" v-model="scope.row.symptomName" size="small" disabled>
<el-button slot="append" icon="el-icon-search" @click="btnDispSymptom(scope.$index)"
style="font-size: 20px;"></el-button>
</el-input>
</template>
</el-table-column>
<el-table-column prop="degree" label="程度" min-width="70">
<template slot-scope="scope">
<el-select v-model="scope.row.degree" size="small">
<el-option v-for="item in dict.degree" :key="item.id" :label="item.displayName" :value="item.id" />
</el-select>
</template>
</el-table-column>
<el-table-column prop="timeLength" label="时长" min-width="70">
<template slot-scope="scope">
<el-autocomplete v-model="scope.row.timeLength" :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="dialogSymptom" width="400px" :close-on-click-modal="false" :append-to-body="true">
<div style="height: 320px;">
<el-select v-model="choosedSymptom" placeholder="请选择" style="width: 100%;" filterable
:filter-method="filterMethod" popper-class="diagnosisSelect" :popper-append-to-body="false" value-key="id">
<el-option v-for="item in symptomQick" :key="item.id" :value="item" :label="item.displayName" />
</el-select>
</div>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="btnOkSymptom">确定</el-button>
<el-button @click="dialogSymptom = false">关闭</el-button>
</span>
</el-dialog>
</div>
</div>
</template>
<script>
@ -58,7 +76,11 @@ export default {
routeUrlorPageName: 'customerOrg', //
privs: [] //
},
symptom: []
symptom: [],
symptomQick:[],
currRow:0,
choosedSymptom:{},
dialogSymptom:false,
};
},
@ -71,7 +93,7 @@ export default {
//
mounted() {
this.dictInit()
// this.dictInit()
},
computed: {
@ -81,20 +103,20 @@ export default {
methods: {
moment, checkPagePriv,
//
dictInit() {
// --
postapi("/api/app/Symptom/GetList").then(res => {
if (res.code > -1) {
this.dict.symptom = res.data;
this.symptom = res.data;
}
})
},
// dictInit() {
// // --
// postapi("/api/app/Symptom/GetList").then(res => {
// if (res.code > -1) {
// this.dict.symptom = res.data;
// this.symptom = res.data;
// }
// })
// },
querySearch(queryString, cb) {
var restaurants = [{ value: '年月' }]; // deepCopy(this.restaurants) [{ value: '' },{ value: '' }]
var results = queryString
? restaurants.filter(e => { return e.value.indexOf(queryString) > -1})
? restaurants.filter(e => { return e.value.indexOf(queryString) > -1 })
: restaurants;
// callback
cb(results);
@ -126,9 +148,6 @@ export default {
}
});
},
//
btnAdd() {
console.log('this.dataTransOpts.tableM.patient_symptom', this.dataTransOpts.tableM.patient_symptom)
@ -140,6 +159,38 @@ export default {
});
},
//
btnDispSymptom(index){
this.currRow = index
this.symptom = deepCopy(this.dict.symptom)
this.dataTransOpts.tableM.patient_symptom.forEach((e,i) => {
if(i != index){
let lfind = arrayExistObj(this.symptom,'id',e.symptomId)
if(lfind > -1) this.symptom.splice(lfind,1)
}
});
this.symptomQick = deepCopy(this.symptom)
this.dialogSymptom = true
},
//
filterMethod(v){
if(v){
this.symptomQick = this.symptom.filter(e => {
return e.displayName.indexOf(v.toUpperCase()) > -1 || e.simpleCode.indexOf(v.toUpperCase()) > -1
})
}else{
this.symptomQick = deepCopy(this.symptom)
}
},
//
btnOkSymptom(){
this.dataTransOpts.tableM.patient_symptom[this.currRow]['symptomId'] = this.choosedSymptom.id
this.dataTransOpts.tableM.patient_symptom[this.currRow]['symptomName'] = this.choosedSymptom.displayName
this.dialogSymptom = false
}
},
watch: {
@ -160,7 +211,13 @@ export default {
@import '../../assets/css/global_form.css';
@import '../../assets/css/global_dialog.css';
::v-deep .diagnosisSelect .el-select-dropdown__wrap {
background-color: #FFF;
max-height: 288px;
}
::v-deep .el-icon-search:before {
color: #00F;
}
.btnClass {
width: 110px;
}

4
src/store/index.js

@ -286,8 +286,8 @@ export default new Vuex.Store({
{ id: "++++", displayName: "++++" },
{ id: "+++++", displayName: "+++++" },
],
postion:[], //毒害因素
postionList:[], //毒害因素 不分组
poison:[], //毒害因素
poisonList:[], //毒害因素 不分组
symptom:[], //症状
medicalPackage: [], //所有套餐
customerOrgGroupAll: [], //所有分组,不限单位,不限次数

Loading…
Cancel
Save