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.

469 lines
19 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
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
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
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 v-show="checkPagePriv(pagePriv.privs, '人员列表')" class="listBtn">
  4. <el-button type="primary" class="commonbutton" @click="prList">人员列表</el-button>
  5. </div>
  6. <div v-show="checkPagePriv(pagePriv.privs, '医生诊台')" class="listBtn">
  7. <el-button type="primary" class="commonbutton" @click="toDoctorCheck">医生诊台</el-button>
  8. </div>
  9. <div v-show="checkPagePriv(pagePriv.privs, '保存')" class="listBtn">
  10. <el-button type="primary" class="commonbutton" @click="btnSave"
  11. :disabled="sumBtnDisabled('save')">保存</el-button>
  12. </div>
  13. <div v-show="checkPagePriv(pagePriv.privs, '修改')" class="listBtn">
  14. <el-button type="primary" class="commonbutton" @click="btnEdit"
  15. :disabled="sumBtnDisabled('edit')">修改</el-button>
  16. </div>
  17. <div v-show="checkPagePriv(pagePriv.privs, '取消总检')" class="listBtn">
  18. <el-button type="primary" class="commonbutton" @click="btnDel"
  19. :disabled="sumBtnDisabled('del')">取消总检</el-button>
  20. </div>
  21. <div v-show="checkPagePriv(pagePriv.privs, '审核')" class="listBtn">
  22. <el-button type="primary" class="commonbutton" @click="audit" :disabled="sumBtnDisabled('audit')">审核</el-button>
  23. </div>
  24. <div v-show="checkPagePriv(pagePriv.privs, '取消审核')" class="listBtn">
  25. <el-button type="primary" class="commonbutton" @click="unAudit"
  26. :disabled="sumBtnDisabled('unAudit')">取消审核</el-button>
  27. </div>
  28. <!-- 直接放在 建议旁边
  29. <div class="listBtn">
  30. <el-button type="primary" class="btnClass" @click="addDiagnosis">疾病诊断</el-button>
  31. </div>
  32. -->
  33. <div v-show="checkPagePriv(pagePriv.privs, '体检报告')" class="listBtn">
  34. <el-button type="primary" class="commonbutton" @click="btnReport"
  35. :disabled="sumBtnDisabled('report')">体检报告</el-button>
  36. </div>
  37. <div v-show="checkPagePriv(pagePriv.privs, '复查')" class="listBtn">
  38. <el-button type="primary" class="commonbutton" @click="reCheck"
  39. :disabled="sumBtnDisabled('reCheck')">复查</el-button>
  40. </div>
  41. <div v-show="checkPagePriv(pagePriv.privs, '干预措施')" class="listBtn">
  42. <el-button type="primary" class="commonbutton" @click="intervene"
  43. :disabled="sumBtnDisabled('intervene')">干预措施</el-button>
  44. </div>
  45. <div v-show="sumDoctorCheck.sumDoctorCheckDialogVisible"
  46. :style="`z-index:3;border-radius: 10px;border: 1px solid #ddd;background-color:#FFF; position: absolute;top:50px;right:0px;width:300px;height: ${window.pageHeight - 42 - 10}px;opacity:1;`">
  47. <PatientRegisterList win="sumDoctorCheck" :winAbsolute="true" />
  48. </div>
  49. <!-- 抽屉方式遮罩层不能操作
  50. <el-drawer title="体检人员列表" :visible.sync="sumDoctorCheck.sumDoctorCheckDialogVisible" direction="rtl"
  51. :wrapperClosable="false" :modal="false" :size="300">
  52. <PatientRegisterList :win="sumDoctorCheck" :winAbsolute="false"/>
  53. </el-drawer>
  54. -->
  55. <!-- 直接放在 建议旁边
  56. <el-drawer title="诊断列表" :visible.sync="sumDoctorCheck.sumDiagnosisVisible" direction="ltr" :size="300"
  57. :wrapperClosable="false">
  58. <SumDiagnosis :patientRegisterId="dataTransOpts.tableS.patient_register.id" />
  59. </el-drawer>
  60. -->
  61. </div>
  62. </template>
  63. <script>
  64. import { mapState } from "vuex";
  65. import { getapi, postapi, putapi, deletapi } from "@/api/api";
  66. import { getPagePriv, checkPagePriv, deepCopy } from "../../utlis/proFunc";
  67. import PatientRegisterList from "../doctorCheck/PatientRegisterList.vue";
  68. import SumDiagnosis from "./SumDiagnosis.vue";
  69. export default {
  70. components: {
  71. PatientRegisterList,
  72. SumDiagnosis,
  73. },
  74. data() {
  75. return {
  76. pagePriv: {
  77. routeUrlorPageName: 'sumDoctorCheck', //当前页面归属路由或归属页面权限名称
  78. privs: [] // 页面权限
  79. },
  80. dialogVisible: false,
  81. tableData: [
  82. {
  83. col: 'col',
  84. details: [{ id: 1, name: '000' }, { id: 2, name: '001' }]
  85. }
  86. ],
  87. };
  88. },
  89. created() {
  90. //获取用户当前页面的权限
  91. let userPriv = window.sessionStorage.getItem('userPriv')
  92. if (userPriv) this.pagePriv.privs = deepCopy(getPagePriv(this.pagePriv.routeUrlorPageName))
  93. },
  94. //挂载完成
  95. mounted() {
  96. },
  97. computed: {
  98. ...mapState(["window", "dict", "dataTransOpts", "patientRegister", "doctorCheck", "sumDoctorCheck"]),
  99. },
  100. methods: {
  101. checkPagePriv,
  102. prList() {
  103. this.sumDoctorCheck.sumDoctorCheckDialogVisible = true
  104. },
  105. //诊断列表
  106. addDiagnosis() {
  107. this.sumDoctorCheck.sumDiagnosisVisible = true
  108. },
  109. //to医生诊台
  110. toDoctorCheck() {
  111. // this.doctorCheck.prBase = Object.assign({},this.dataTransOpts.tableS.patient_register)
  112. // this.patientRegister.photo = this.doctorCheck.prBase.photo
  113. this.$router.push({ path: "/doctorCheck", query: { patient_register: this.dataTransOpts.tableS.patient_register} });
  114. },
  115. // 按钮可用
  116. sumBtnDisabled(btnFlagName) {
  117. let patientRegister = this.dataTransOpts.tableS.patient_register
  118. let ret = true
  119. //' 请选择体检人员'
  120. if (!patientRegister.id) return ret
  121. // '人员已锁定,不可执行此操作'
  122. if (patientRegister.isLock && patientRegister.isLock == 'Y') return ret
  123. switch (btnFlagName) {
  124. case 'addSuggtion':
  125. case 'save':
  126. if (patientRegister.completeFlag && patientRegister.completeFlag != '3') ret = false
  127. break;
  128. case 'edit':
  129. case 'del':
  130. case 'audit':
  131. if (patientRegister.completeFlag && patientRegister.completeFlag == '3' && patientRegister.isAudit != 'Y') ret = false
  132. break;
  133. case 'unAudit':
  134. case 'reCheck':
  135. case 'report':
  136. if (patientRegister.completeFlag && patientRegister.completeFlag == '3' && patientRegister.isAudit && patientRegister.isAudit == 'Y') ret = false
  137. break;
  138. case 'intervene':
  139. if (patientRegister.completeFlag && patientRegister.completeFlag == '3') ret = false
  140. break;
  141. default:
  142. break;
  143. }
  144. console.log('sumBtnDisabled btnFlagName, patientRegister,ret', btnFlagName, patientRegister, ret)
  145. return ret
  146. },
  147. //保存数据
  148. btnSave() {
  149. // //更新总检
  150. // this.updateSumDoctorCheck();
  151. // //更新综述
  152. // this.saveSummary();
  153. // //更新建议与诊断
  154. // this.saveSuggestion();
  155. let body = {
  156. patientRegisterId: this.dataTransOpts.tableS.patient_register.id,
  157. summaryDoctorId: this.dataTransOpts.tableS.patient_register.summaryDoctorId || null,
  158. summaryDate: this.dataTransOpts.tableS.patient_register.summaryDate,
  159. medicalConclusionId: this.dataTransOpts.tableS.patient_register.medicalConclusionId || null,
  160. sumSummarys: this.sumDoctorCheck.summaryList,
  161. sumSuggestions: this.sumDoctorCheck.suggestionList
  162. }
  163. postapi(`/api/app/patientregister/UpdatePatientRegisterSummarySuggestion`, body)
  164. .then((res) => {
  165. if (res.code > -1) {
  166. // this.dataTransOpts.tableS.patient_register.completeFlag = '3';
  167. this.dataTransOpts.refresh.patient_register.S++
  168. }
  169. })
  170. },
  171. //修改结果
  172. btnEdit() {
  173. this.dataTransOpts.tableS.patient_register.completeFlag = '2'
  174. },
  175. //取消总检
  176. btnDel() {
  177. // let body = {
  178. // patientRegisterId: this.dataTransOpts.tableS.patient_register.id,
  179. // //summaryDoctor: this.dataTransOpts.tableS.patient_register.summaryDoctor,
  180. // //summaryDate: this.dataTransOpts.tableS.patient_register.summaryDate,
  181. // completeFlag: '2'
  182. // }
  183. // console.log(`/api/app/patientregister/updatepatientregistersummarydoctor`, body)
  184. // postapi(`/api/app/patientregister/updatepatientregistersummarydoctor`, body)
  185. // .then((res) => {
  186. // console.log("del", res.data);
  187. // if (res.code != -1) {
  188. // this.dataTransOpts.tableS.patient_register.completeFlag = '2';
  189. // console.log(`/api/app/sumsummaryheader/deletesumsummarymany?PatientRegisterId=${this.dataTransOpts.tableS.patient_register.id}`)
  190. // return postapi(`/api/app/sumsummaryheader/deletesumsummarymany?PatientRegisterId=${this.dataTransOpts.tableS.patient_register.id}`)
  191. // }
  192. // })
  193. // .then((res) => {
  194. // console.log("deletesumsuggestionmany", res.data);
  195. // if (res.code != -1) {
  196. // console.log(`/api/app/sumsuggestionheader/deletesumsuggestionmany?PatientRegisterId=${this.dataTransOpts.tableS.patient_register.id}`)
  197. // return postapi(`/api/app/sumsuggestionheader/deletesumsuggestionmany?PatientRegisterId=${this.dataTransOpts.tableS.patient_register.id}`)
  198. // }
  199. // })
  200. // .then((res) => {
  201. // console.log("deletesumsuggestionmany", res.data);
  202. // if (res.code != -1) {
  203. // this.$message({ type: "success", message: `取消总检成功!` });
  204. // }
  205. // })
  206. // .catch((err) => {
  207. // this.$message({ type: "error", message: `取消总检失败,原因:${err}` });
  208. // });
  209. let body = {
  210. patientRegisterId: this.dataTransOpts.tableS.patient_register.id
  211. }
  212. postapi(`/api/app/patientregister/CancelSumCheck`, body)
  213. .then((res) => {
  214. if (res.code > -1) {
  215. this.dataTransOpts.tableS.patient_register.completeFlag = '2';
  216. // this.dataTransOpts.refresh.patient_register.S++
  217. }
  218. })
  219. },
  220. //审核
  221. audit() {
  222. let body = {
  223. patientRegisterId: this.dataTransOpts.tableS.patient_register.id,
  224. //auditDoctor: "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  225. //auditDate: "string" 不传时,取当前时间
  226. isAudit: 'Y'
  227. }
  228. console.log(`/api/app/patientregister/updatepatientregisterauditordoctor`, body)
  229. postapi(`/api/app/patientregister/updatepatientregisterauditordoctor`, body)
  230. .then((res) => {
  231. console.log("audit", res.data);
  232. if (res.code > -1) {
  233. this.dataTransOpts.tableS.patient_register.isAudit = 'Y';
  234. // this.dataTransOpts.refresh.patient_register.S++
  235. }
  236. })
  237. .catch((err) => {
  238. this.$message({ type: "error", message: `总检审核失败,原因:${err}` });
  239. });
  240. },
  241. //取消审核
  242. unAudit() {
  243. let body = {
  244. patientRegisterId: this.dataTransOpts.tableS.patient_register.id,
  245. //auditDoctor: "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  246. //auditDate: "string" 不传时,取当前时间
  247. isAudit: 'N'
  248. }
  249. console.log(`/api/app/patientregister/updatepatientregisterauditordoctor`, body)
  250. postapi(`/api/app/patientregister/updatepatientregisterauditordoctor`, body)
  251. .then((res) => {
  252. console.log("unAudit", res.data);
  253. if (res.code != -1) {
  254. this.dataTransOpts.tableS.patient_register.isAudit = 'N';
  255. // this.$message({ type: "success", message: `取消总检审核成功` });
  256. // this.dataTransOpts.refresh.patient_register.S++
  257. }
  258. })
  259. .catch((err) => {
  260. this.$message({ type: "error", message: `取消总检审核失败,原因:${err}` });
  261. });
  262. },
  263. //体检报告
  264. btnReport() {
  265. if (!this.$peisAPI) {
  266. this.$message.info("此功能,需要在壳客户端才可运行!")
  267. return
  268. }
  269. ///3a0c990e-5756-2dc0-19d5-69a617fe4048
  270. let ReportCode = '0005';
  271. let token = window.sessionStorage.getItem('token');
  272. let user = window.sessionStorage.getItem('user');
  273. let toOutShell = {
  274. ReportCode, token,
  275. isBuildImage:'N',
  276. preViewCanPrint: this.dataTransOpts.tableS.patient_register.isAudit,
  277. Parameters: [
  278. { Name: 'printer', Value: user },
  279. { Name: 'LTS', Value: 'Y' }, //Y、N N只看不能打印
  280. { Name: 'hisLog', Value: 'pic/hisLog.jpg' },
  281. { Name: "peisReportFirstPage", Value: "pic/peisReportFirstPage.jpg" },
  282. { Name: "peisReportPageHeader", Value: "pic/peisReportPageHeader.jpg" },
  283. { Name: "peisReportPageFooter", Value: "pic/peisReportPageFooter.jpg" }
  284. ],
  285. };
  286. // postapi(`/api/app/printreport/getpeisreport?PatientRegisterId=${this.dataTransOpts.tableS.patient_register.id}`)
  287. // .then((res) => {
  288. // if (res.code != -1) {
  289. // toOutShell.ReportTable = res.data;
  290. // console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell));
  291. // return this.$peisAPI.printPre(JSON.stringify(toOutShell));
  292. // }
  293. // })
  294. toOutShell.BusinessCode = this.dataTransOpts.tableS.patient_register.id
  295. this.$peisAPI.printPre(JSON.stringify(toOutShell))
  296. .then(res => {
  297. if (res) {
  298. let lres = JSON.parse(res)
  299. if (lres.code < 0) this.$message.error({ showClose: true, message: lres.message })
  300. }
  301. })
  302. .catch(err => {
  303. this.$message.warning(err);
  304. });
  305. },
  306. //复查
  307. reCheck() {
  308. console.log("复查")
  309. },
  310. //干预措施
  311. intervene() {
  312. console.log("干预措施")
  313. },
  314. //更新总检
  315. updateSumDoctorCheck() {
  316. let body = {
  317. patientRegisterId: this.dataTransOpts.tableS.patient_register.id,
  318. //summaryDoctor:this.dataTransOpts.tableS.patient_register.summaryDoctor,
  319. //summaryDate: this.dataTransOpts.tableS.patient_register.summaryDate,
  320. completeFlag: '3'
  321. }
  322. console.log(`/api/app/patientregister/updatepatientregistersummarydoctor`, body)
  323. postapi(`/api/app/patientregister/updatepatientregistersummarydoctor`, body)
  324. .then((res) => {
  325. console.log("updateSumDoctorCheck", res.data);
  326. if (res.code != -1) {
  327. this.dataTransOpts.tableS.patient_register.completeFlag = '3';
  328. this.$message({ type: "success", message: `总检保存成功!` });
  329. }
  330. })
  331. .catch((err) => {
  332. this.$message({ type: "error", message: `总检保存失败,原因:${err}` });
  333. });
  334. },
  335. //更新综述
  336. saveSummary() {
  337. let body = []
  338. this.sumDoctorCheck.summaryList.forEach(item => {
  339. delete item.id;
  340. delete item.summaryFlag;
  341. delete item.displayOrder;
  342. item.details.forEach(e => {
  343. delete e.sumSummaryHeaderId;
  344. delete e.displayOrder;
  345. })
  346. body.push(item)
  347. });
  348. console.log(`/api/app/sumsummaryheader/createsumsummary`, body)
  349. if (body.length < 1) return
  350. postapi(`/api/app/sumsummaryheader/createsumsummary`, body)
  351. .then((res) => {
  352. console.log("saveSummary", res.data);
  353. if (res.code != -1) {
  354. //this.dataTransOpts.tableS.patient_register.completeFlag = '1';
  355. }
  356. })
  357. .catch((err) => {
  358. this.$message({ type: "error", message: `综述保存失败,原因:${err}` });
  359. });
  360. },
  361. //更新建议
  362. saveSuggestion() {
  363. let body = []
  364. this.sumDoctorCheck.suggestionList.forEach(item => {
  365. delete item.id;
  366. delete item.suggestionFlag;
  367. delete item.displayOrder;
  368. item.details.forEach(e => {
  369. delete e.sumSuggestionHeaderId;
  370. delete e.displayOrder;
  371. })
  372. body.push(item)
  373. });
  374. console.log(`/api/app/sumsuggestionheader/createsumsuggestion`, body)
  375. if (body.length < 1) return
  376. postapi(`/api/app/sumsuggestionheader/createsumsuggestion`, body)
  377. .then((res) => {
  378. console.log("saveSuggestion", res.data);
  379. if (res.code != -1) {
  380. //this.dataTransOpts.tableS.patient_register.completeFlag = '1';
  381. }
  382. })
  383. .catch((err) => {
  384. this.$message({ type: "error", message: `建议保存失败,原因:${err}` });
  385. });
  386. },
  387. addSummary() {
  388. if (!this.dataTransOpts.tableS.patient_register.id) {
  389. alert("请选择检查项目")
  390. return
  391. }
  392. this.doctorCheck.checkSummaryList.push({
  393. registerCheckId: this.dataTransOpts.tableS.patient_register.id,
  394. summary: '',
  395. summaryFlag: 'N',
  396. })
  397. this.doctorCheck.checkSuggestionList.push({
  398. registerCheckId: this.dataTransOpts.tableS.patient_register.id,
  399. suggestion: '',
  400. })
  401. },
  402. },
  403. //监听事件()
  404. watch: {
  405. },
  406. };
  407. </script>
  408. <style scoped>
  409. @import '../../assets/css/global_button.css';
  410. .listBtn {
  411. margin-top: 10px;
  412. margin-left: 10px;
  413. text-align: center;
  414. }</style>