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.

486 lines
19 KiB

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