basicConfig.vue 8.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  1. <template>
  2. <div class="main-contain">
  3. <div class="position">
  4. <bread-crumb :crumbs="crumbs"></bread-crumb>
  5. </div>
  6. <div class="app-container">
  7. <!--<div class="configBox">-->
  8. <!--<p>收费发药</p>-->
  9. <!--<p style="font-size:14px;margin-top:5px;">开启收费发药分离后,处方发药的工作需要到收费发药页面完成</p>-->
  10. <!--<p style="margin-top:20px;">收费,发药分离:-->
  11. <!--<el-switch v-model="value"></el-switch>-->
  12. <!--</p>-->
  13. <!--</div>-->
  14. <div class="configBox">
  15. <p style="font-size:18px;font-weight:bold">门诊打印</p>
  16. <p style="font-size:14px;margin-top:5px;color:#333;">开启直接打印后,门诊病历、处方、治疗单、处置单、收费清单等打印时跳过打印预览,直接连接打印机打印。</p>
  17. <p style="margin-top:20px;">直接打印:
  18. <el-switch v-model="value"></el-switch>
  19. </p>
  20. </div>
  21. <div class="configBox">
  22. <p style="font-size:18px;font-weight:bold">医嘱同步</p>
  23. <p style="font-size:14px;margin-top:5px;color:#333;">开启门诊处方同步到透析医嘱后,同一个患者,门诊医生站开的药品类处方自动同步到透析管理临时医嘱中,同时在透析管理中,给患者开长期医嘱和临时医嘱的功能失效,医生只能在门诊医生站开处方,只有同时使用门诊管理和透析管理的机构方可开启。</p>
  24. <p style="margin-top:20px;">门诊处方同步到透析医嘱:
  25. <el-switch v-model="is_open_xt_his" @change="changeFuncOne"></el-switch>
  26. </p>
  27. </div>
  28. <!-- <div class="configBox">
  29. <p style="font-size:18px;font-weight:bold">血压数据自动获取</p>
  30. <p style="font-size:14px;margin-top:5px;color:#333;">在联机的状态下,开启透析监测-血压数据自动获取功能后,则不需要手动输入,数据会自动上传到监测中</p>
  31. <p style="margin-top:20px;">透析监测-血压数据自动获取:
  32. <el-switch v-model="is_open_monitor" @change="changeFuncTwo"></el-switch>
  33. </p>
  34. </div>
  35. <div class="configBox">
  36. <p style="font-size:18px;font-weight:bold">透析机数据自动获取</p>
  37. <p style="font-size:14px;margin-top:5px;color:#333;">在联机的状态下,开启透析监测-透析机数据自动获取功能后,则不需要手动输入,数据会自动上传到监测中</p>
  38. <p style="margin-top:20px;">透析监测-血压数据自动获取:
  39. <el-switch v-model="is_open_order" @change="changeFuncThree"></el-switch>
  40. </p>
  41. </div> -->
  42. <!--<div class="configBox">-->
  43. <!--<p>药品,耗材出库</p>-->
  44. <!--<p style="font-size:14px;margin-top:5px;">开启药品,耗材出库自动扣减则医生开完医嘱或处方可直接出库,不开启则由发药动作或出库按钮手动出库</p>-->
  45. <!--<div style="display:flex;margin-top:20px;">-->
  46. <!--<p style="margin-right:20px;">药品出库:-->
  47. <!--<el-switch v-model="value" @change="changeFuncTwo"></el-switch>-->
  48. <!--</p>-->
  49. <!--<p>耗材出库:-->
  50. <!--<el-switch v-model="value"></el-switch>-->
  51. <!--</p>-->
  52. <!--</div>-->
  53. <!--</div>-->
  54. <!--<div class="configBox">-->
  55. <!--<p style="margin-bottom:20px;">药品有效期预警设置(药品即将失效的预警提示)</p>-->
  56. <!--<el-select v-model="value" placeholder="请选择">-->
  57. <!--<el-option-->
  58. <!--v-for="item in options"-->
  59. <!--:key="item.value"-->
  60. <!--:label="item.label"-->
  61. <!--:value="item.value">-->
  62. <!--</el-option>-->
  63. <!--</el-select>-->
  64. <!--</div>-->
  65. <!--<div class="configBox">-->
  66. <!--<p>处方单价锁定</p>-->
  67. <!--<p style="font-size:14px;margin-top:5px;">开启处方单价锁定后,开处方是无法修改药品或者诊疗项目以及附加费用单价</p>-->
  68. <!--<p style="margin-top:20px;">收费单价锁定:-->
  69. <!--<el-switch v-model="value"></el-switch>-->
  70. <!--</p>-->
  71. <!--</div>-->
  72. </div>
  73. </div>
  74. </template>
  75. <script>
  76. import BreadCrumb from "@/xt_pages/components/bread-crumb";
  77. import { getAllIsOpenInit,postXtHisIsOpen,postMonitorIsOpen} from '@/api/config'
  78. export default {
  79. name: "printTemplate",
  80. components: { BreadCrumb},
  81. data() {
  82. return {
  83. showViewer:false,
  84. crumbs: [
  85. { path: false, name: "管理中心" },
  86. { path: false, name: "基础配置" }
  87. ],
  88. value:false,
  89. is_open_xt_his:false,
  90. is_open_monitor:false,
  91. is_open_order:false,
  92. };
  93. },
  94. methods: {
  95. getInitIsOpenConfig(){
  96. getAllIsOpenInit().then(
  97. response => {
  98. if (response.data.state === 1) {
  99. if(response.data.data.is_open_xt_his == 1) {
  100. this.is_open_xt_his = true
  101. }else{
  102. this.is_open_xt_his = false
  103. }
  104. } else {
  105. this.$message.error(response.data.msg)
  106. }
  107. }
  108. )
  109. },
  110. changeFuncOne(val){
  111. if(this.is_open_xt_his){
  112. let params={
  113. is_open:this.is_open_xt_his
  114. }
  115. postXtHisIsOpen(params).then(
  116. response => {
  117. if (response.data.state === 1) {
  118. this.is_open_xt_his = response.data.data.is_open
  119. } else {
  120. this.$message.error(response.data.msg)
  121. }
  122. }
  123. )
  124. }else{
  125. let params={
  126. is_open:this.is_open_xt_his
  127. }
  128. postXtHisIsOpen(params).then(
  129. response => {
  130. if (response.data.state === 1) {
  131. this.is_open_xt_his = response.data.data.is_open
  132. } else {
  133. this.$message.error(response.data.msg)
  134. }
  135. }
  136. )
  137. }
  138. },
  139. changeFuncTwo(){
  140. console.log("3333333",this.is_open_monitor)
  141. var is_open = 0
  142. if(this.is_open_monitor == true){
  143. is_open = 1
  144. }
  145. if(this.is_open_monitor == false){
  146. is_open = 2
  147. }
  148. let params = {
  149. is_open:is_open,
  150. }
  151. console.log("params",params)
  152. postMonitorIsOpen(params).then(response=>{
  153. if(response.data.state == 1){
  154. var config = response.data.data.config
  155. this.$message.success("成功")
  156. this.getMonitorConfig()
  157. }
  158. })
  159. },
  160. getMonitorConfig(){
  161. getMonitorConfig().then(response=>{
  162. if(response.data.state == 1){
  163. var config = response.data.data.config
  164. console.log("config",config)
  165. if (config.is_open == 1) {
  166. this.is_open_monitor = true
  167. }
  168. if (config.is_open == 2) {
  169. this.is_open_monitor = false
  170. }
  171. }
  172. })
  173. },
  174. changeFuncThree(){
  175. var is_open = 0
  176. if(this.is_open_order == true){
  177. is_open = 1
  178. }
  179. if(this.is_open_order == false){
  180. is_open = 2
  181. }
  182. let params = {
  183. is_open:is_open,
  184. }
  185. addOrderConfig(params).then(response=>{
  186. if(response.data.state == 1){
  187. var config = response.data.data.config
  188. this.$message.success("成功")
  189. this.getOrderConfig()
  190. }
  191. })
  192. },
  193. getOrderConfig(){
  194. getOrderConfig().then(response=>{
  195. if(response.data.state == 1){
  196. var config = response.data.data.config
  197. if (config.is_open == 1) {
  198. this.is_open_order = true
  199. }
  200. if (config.is_open == 2) {
  201. this.is_open_order = false
  202. }
  203. }
  204. })
  205. }
  206. },
  207. created() {
  208. this.getInitIsOpenConfig()
  209. this.getMonitorConfig()
  210. this.getOrderConfig()
  211. }
  212. };
  213. </script>
  214. <style lang="scss" scoped>
  215. .configBox{
  216. padding-bottom:20px;
  217. margin-top:10px;
  218. border-bottom: 1px solid #000;
  219. }
  220. </style>