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.

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