You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

258 lines
9.5 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. <template>
  2. <div>
  3. <div style="margin-left: 10px;font-weight: 700;">既往病史</div>
  4. <el-table :data="dataTransOpts.tableM.patient_past_medical_history" border height="200" row-key="id" size="small"
  5. highlight-current-row ref="Previous">
  6. <el-table-column prop="occupationalDisease" label="疾病名称" min-width="150">
  7. <template slot-scope="scope">
  8. <el-input v-model="scope.row.occupationalDisease" size="small" />
  9. </template>
  10. </el-table-column>
  11. <el-table-column prop="diagnosisDate" label="诊断日期" min-width="100">
  12. <template slot-scope="scope">
  13. <el-date-picker v-model="scope.row.diagnosisDate" type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd"
  14. placeholder="诊断日期" size="small" />
  15. </template>
  16. </el-table-column>
  17. <el-table-column prop="diagnosisHospital" label="诊断单位" min-width="200">
  18. <template slot-scope="scope">
  19. <el-input v-model="scope.row.diagnosisHospital" size="small" />
  20. </template>
  21. </el-table-column>
  22. <el-table-column prop="isRecovery" label="治愈" min-width="40" align="center">
  23. <template slot-scope="scope">
  24. <el-checkbox v-model="scope.row.isRecovery" true-label="Y" false-label="N"></el-checkbox>
  25. </template>
  26. </el-table-column>
  27. <el-table-column prop="treatmentMethods" label="治疗方式" min-width="150">
  28. <template slot-scope="scope">
  29. <el-input v-model="scope.row.treatmentMethods" size="small" />
  30. </template>
  31. </el-table-column>
  32. <el-table-column prop="lastModifierName" label="修改人员" min-width="80" align="center" />
  33. <el-table-column prop="lastModificationTime" label="修改时间" min-width="150" align="center" />
  34. <el-table-column prop="creatorName" label="创建人员" min-width="80" align="center" />
  35. <el-table-column prop="creationTime" label="创建时间" min-width="150" align="center" />
  36. <el-table-column fixed="right" width="30" align="center">
  37. <template slot="header">
  38. <div style="display: flex;justify-content:space-between;">
  39. <div></div>
  40. <div>
  41. <i class="el-icon-plus" @click="btnAdd('past')" style="font-size: 24px;color: blue;cursor:pointer;"></i>
  42. </div>
  43. </div>
  44. </template>
  45. <template slot-scope="scope">
  46. <i class="el-icon-delete" @click="deleteRow(scope.$index, 'past')"
  47. style="font-size: 24px;color: red;cursor:pointer;"></i>
  48. </template>
  49. </el-table-column>
  50. </el-table>
  51. <div style="margin: 10px 0 0 10px;font-weight: 700;">职业病史</div>
  52. <el-table :data="dataTransOpts.tableM.patient_occupational_medical_history" border height="200" row-key="id"
  53. size="small" highlight-current-row ref="occ">
  54. <el-table-column prop="occupationalDisease" label="疾病名称" min-width="150">
  55. <template slot-scope="scope">
  56. <el-input v-model="scope.row.occupationalDisease" size="small" />
  57. </template>
  58. </el-table-column>
  59. <el-table-column prop="diagnosisDate" label="诊断日期" min-width="100">
  60. <template slot-scope="scope">
  61. <el-date-picker v-model="scope.row.diagnosisDate" type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd"
  62. placeholder="诊断日期" size="small" />
  63. </template>
  64. </el-table-column>
  65. <el-table-column prop="diagnosisHospital" label="诊断单位" min-width="200">
  66. <template slot-scope="scope">
  67. <el-input v-model="scope.row.diagnosisHospital" size="small" />
  68. </template>
  69. </el-table-column>
  70. <el-table-column prop="isRecovery" label="治愈" min-width="40" align="center">
  71. <template slot-scope="scope">
  72. <el-checkbox v-model="scope.row.isRecovery" true-label="Y" false-label="N"></el-checkbox>
  73. </template>
  74. </el-table-column>
  75. <el-table-column prop="treatmentMethods" label="治疗方式" min-width="150">
  76. <template slot-scope="scope">
  77. <el-input v-model="scope.row.treatmentMethods" size="small" />
  78. </template>
  79. </el-table-column>
  80. <el-table-column prop="lastModifierName" label="修改人员" min-width="80" align="center" />
  81. <el-table-column prop="lastModificationTime" label="修改时间" min-width="150" align="center" />
  82. <el-table-column prop="creatorName" label="创建人员" min-width="80" align="center" />
  83. <el-table-column prop="creationTime" label="创建时间" min-width="150" align="center" />
  84. <el-table-column fixed="right" width="30" align="center">
  85. <template slot="header">
  86. <div style="display: flex;justify-content:space-between;">
  87. <div></div>
  88. <div>
  89. <i class="el-icon-plus" @click="btnAdd('occ')" style="font-size: 24px;color: blue;cursor:pointer;"></i>
  90. </div>
  91. </div>
  92. </template>
  93. <template slot-scope="scope">
  94. <i class="el-icon-delete" @click="deleteRow(scope.$index, 'occ')"
  95. style="font-size: 24px;color: red;cursor:pointer;"></i>
  96. </template>
  97. </el-table-column>
  98. </el-table>
  99. </div>
  100. </template>
  101. <script>
  102. import moment from "moment";
  103. import { mapState } from "vuex";
  104. import { getapi, postapi, putapi, deletapi } from "@/api/api";
  105. import { getPagePriv, checkPagePriv, objCopy, deepCopy, arrayExistObj } from "../../utlis/proFunc";
  106. export default {
  107. components: {},
  108. props: ["refFunc"],
  109. data() {
  110. return {
  111. pagePriv: {
  112. routeUrlorPageName: 'customerOrg', //当前页面归属路由或归属页面权限名称
  113. privs: [] // 页面权限
  114. },
  115. postion: [
  116. {
  117. poisonTypeName: "职业史",
  118. poisonDtos: [
  119. {
  120. id: "3a12ad8e-3b84-75a2-415e-c03ed69bda66",
  121. displayName: "噪声,粉尘",
  122. simpleCode: "ZS,FC"
  123. }
  124. ]
  125. }
  126. ], // 毒害因素
  127. };
  128. },
  129. created() {
  130. //获取用户当前页面的权限
  131. let userPriv = window.sessionStorage.getItem('userPriv')
  132. if (userPriv) this.pagePriv.privs = deepCopy(getPagePriv(this.pagePriv.routeUrlorPageName))
  133. },
  134. //挂载完成
  135. mounted() {
  136. this.$nextTick(() => {
  137. this.postion = deepCopy(this.dict.postion)
  138. })
  139. },
  140. computed: {
  141. ...mapState(["window", "dict", "dialogWin", "dataTransOpts"]),
  142. },
  143. methods: {
  144. moment, checkPagePriv,
  145. filterMethod(v) {
  146. if (v) {
  147. let lv = v.toUpperCase()
  148. let postion = []
  149. let postionList = this.dict.postionList.filter(e => {
  150. return e.poisonTypeName.indexOf(lv) > -1 || e.displayName.indexOf(lv) > -1 || e.simpleCode.indexOf(lv) > -1
  151. })
  152. postionList.forEach(e => {
  153. let lfind = arrayExistObj(postion, "poisonTypeName", e.poisonTypeName)
  154. if (lfind == -1) {
  155. postion.push({ poisonTypeName: e.poisonTypeName, poisonDtos: [{ id: e.id, displayName: e.displayName, simpleCode: e.simpleCode }] })
  156. } else {
  157. postion[lfind]['poisonDtos'].push({ id: e.id, displayName: e.displayName, simpleCode: e.simpleCode })
  158. }
  159. });
  160. this.postion = postion
  161. } else {
  162. this.postion = deepCopy(this.dict.postion)
  163. }
  164. console.log('filterMethod', v)
  165. },
  166. //删除联系方式行
  167. deleteRow(index, tableType) {
  168. this.$confirm("此操作确定后将永久删除该记录, 是否继续?", "提示", {
  169. confirmButtonText: "是",
  170. cancelButtonText: "否",
  171. type: "warning",
  172. }).then(() => {
  173. if (tableType == 'past') {
  174. this.dataTransOpts.tableM.patient_past_medical_history.splice(index, 1);
  175. } else {
  176. this.dataTransOpts.tableM.patient_occupational_medical_history.splice(index, 1);
  177. }
  178. //this.submit('form');
  179. }).catch((err) => {
  180. if (err != 'cancel') {
  181. this.$message.info({ showClose: true, message: err });
  182. }
  183. });
  184. },
  185. //新增联系方式
  186. btnAdd(tableType) {
  187. this.postion = deepCopy(this.dict.postion)
  188. if (tableType == 'past') {
  189. this.dataTransOpts.tableM.patient_past_medical_history.push({
  190. patientRegisterId: this.patientRegisterId,
  191. occupationalDisease: '',
  192. diagnosisDate: '',
  193. diagnosisHospital: '',
  194. isRecovery: 'N',
  195. treatmentMethods: ''
  196. });
  197. } else {
  198. this.dataTransOpts.tableM.patient_occupational_medical_history.push({
  199. patientRegisterId: this.patientRegisterId,
  200. occupationalDisease: '',
  201. diagnosisDate: '',
  202. diagnosisHospital: '',
  203. isRecovery: 'N',
  204. treatmentMethods: ''
  205. });
  206. }
  207. },
  208. },
  209. watch: {
  210. // 单位id未变时,强制刷新
  211. "dataTransOpts.refresh.contact_person.S": {
  212. // immediate: true,
  213. handler(newVal, oldVal) {
  214. console.log(`watch 联系人 newVal:${newVal} oldVal:${oldVal} customerOrgId: ${this.dataTransOpts.tableS.contact_person.id}`);
  215. this.getFormData(this.dataTransOpts.tableS.contact_person.id)
  216. }
  217. },
  218. // 'customerOrgId' (newVal,oldVal){
  219. // console.log('watch customerOrgId',newVal,oldVal)
  220. // if(newVal != oldVal){
  221. // this.personId = ''
  222. // }
  223. // }
  224. },
  225. };
  226. </script>
  227. <style scoped>
  228. @import '../../assets/css/global_table.css';
  229. @import '../../assets/css/global_input.css';
  230. @import '../../assets/css/global_form.css';
  231. @import '../../assets/css/global_dialog.css';
  232. ::v-deep .el-select-group__title {
  233. font-size: 15px;
  234. background-color: #EEEEEE;
  235. color: black;
  236. font-weight: 700;
  237. }
  238. .btnClass {
  239. width: 110px;
  240. }
  241. </style>