Parameter.vue 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325
  1. <template>
  2. <div class="code">
  3. <!-- <div class="code-item flex-vertical-center-l">
  4. <span>处方签和病历打印:</span>
  5. <div class="input">
  6. <el-radio-group v-model="sign.value">
  7. <el-radio label="0">是</el-radio>
  8. <el-radio label="1">否</el-radio>
  9. </el-radio-group>
  10. </div>
  11. </div>-->
  12. <div class="code-item flex-vertical-center-l">
  13. <span>医共体启用:</span>
  14. <div class="input">
  15. <el-radio-group v-model="doctorbody.value">
  16. <el-radio label="0">是</el-radio>
  17. <el-radio label="1">否</el-radio>
  18. </el-radio-group>
  19. </div>
  20. </div>
  21. <div class="code-item flex-vertical-center-l">
  22. <span>药贴计算方式:</span>
  23. <div class="input">
  24. <el-select v-model="way.value" placeholder="请选择">
  25. <el-option label="方式一" value="0"></el-option>
  26. <el-option label="方式二" value="1"></el-option>
  27. <el-option label="方式三" value="2"></el-option>
  28. </el-select>
  29. </div>
  30. </div>
  31. <div class="code-item flex-vertical-center-l">
  32. <span>审核流程:</span>
  33. <div class="input">
  34. <el-radio-group v-model="audit.value">
  35. <el-radio label="0">开启</el-radio>
  36. <el-radio label="1">关闭</el-radio>
  37. </el-radio-group>
  38. </div>
  39. </div>
  40. <div class="code-item flex-vertical-center-l">
  41. <span>支付流程:</span>
  42. <div class="input">
  43. <el-radio-group v-model="pay.value">
  44. <el-radio label="0">开启</el-radio>
  45. <el-radio label="1">关闭</el-radio>
  46. </el-radio-group>
  47. </div>
  48. </div>
  49. <div class="code-item flex-vertical-center-l">
  50. <span>诊疗首页配置:</span>
  51. <div class="input">
  52. <el-select v-model="diagnosisF.value" placeholder="请选择">
  53. <el-option label="电子病例页" value="0"></el-option>
  54. <el-option label="智能辩证页" value="1"></el-option>
  55. <el-option label="智能开方页" value="2"></el-option>
  56. <el-option label="知识库(名医医案)" value="3"></el-option>
  57. </el-select>
  58. </div>
  59. </div>
  60. <div class="code-item flex-vertical-center-l">
  61. <span>登录跳转配置:</span>
  62. <div class="input">
  63. <el-select v-model="defaultHomePage.value" placeholder="请选择">
  64. <el-option label="患者就诊" value="/index/todaypatients"></el-option>
  65. <el-option label="知识库(名医医案)" value="/index/doctorcaseBefore"></el-option>
  66. </el-select>
  67. </div>
  68. </div>
  69. <div class="code-item flex-vertical-center-l">
  70. <span>知识库转方按钮:</span>
  71. <div class="input">
  72. <el-radio-group v-model="transitionPr.value">
  73. <el-radio label="0">显示</el-radio>
  74. <el-radio label="1">不显示</el-radio>
  75. </el-radio-group>
  76. </div>
  77. </div>
  78. <div class="code-item flex-vertical-center-l">
  79. <span>知识库打印按钮:</span>
  80. <div class="input">
  81. <el-radio-group v-model="showPrintHTML.value">
  82. <el-radio label="0">显示</el-radio>
  83. <el-radio label="1">不显示</el-radio>
  84. </el-radio-group>
  85. </div>
  86. </div>
  87. <!-- <div class="code-item flex-vertical-center-l">
  88. <span>诊断页配置:</span>
  89. <div class="input">
  90. <el-radio-group v-model="diagnosis.value">
  91. <el-radio label="0">显示</el-radio>
  92. <el-radio label="1">不显示</el-radio>
  93. </el-radio-group>
  94. </div>
  95. </div>-->
  96. <div class="save flex-center" v-if="$route.query.pid" @click="saveDBParams">保存</div>
  97. </div>
  98. </template>
  99. <script>
  100. import { getDoctorBodyPar, saveDBParams } from "@/api/system.js";
  101. export default {
  102. data() {
  103. return {
  104. sign: {
  105. key: "print"
  106. }, // 处方签
  107. doctorbody: {
  108. key: "organizationEnable"
  109. }, // 医共体
  110. way: {
  111. key: "countMenthod"
  112. }, // 计算方式
  113. audit: {
  114. key: "automaticReview"
  115. }, // 自动审核
  116. pay: {
  117. key: "isPay"
  118. },
  119. diagnosisF: {
  120. key: "diagnosisHomePage"
  121. }, // 诊疗首页
  122. diagnosis: {
  123. key: "diagnosisPage"
  124. }, // 诊断
  125. transitionPr: {
  126. key: "transitionPr"
  127. }, // 转方
  128. showPrintHTML: {
  129. key: "showPrintHTML"
  130. }, // 打印
  131. defaultHomePage: {
  132. key: "defaultHomePage"
  133. }, // 登录默认首页
  134. type: "add"
  135. };
  136. },
  137. created() {
  138. this.getDoctorBodyPar();
  139. },
  140. methods: {
  141. // 保存 医共体详细信息
  142. async saveDBParams() {
  143. let paramList = [
  144. this.defaultHomePage,
  145. this.transitionPr,
  146. this.showPrintHTML,
  147. this.sign,
  148. this.doctorbody,
  149. this.way,
  150. this.audit,
  151. this.pay,
  152. this.diagnosisF,
  153. this.diagnosis
  154. ];
  155. let params = {
  156. organizationid: this.$route.query.pid,
  157. paramList
  158. };
  159. const loading = this.$loading({
  160. lock: true,
  161. text: "正在提交",
  162. spinner: "el-icon-loading",
  163. background: "rgba(0, 0, 0, 0.7)"
  164. });
  165. let res = await saveDBParams(params).catch(err => {
  166. loading.close();
  167. });
  168. if (res.ResultCode == 0) {
  169. loading.close();
  170. this.$message({
  171. showClose: true,
  172. message: "提交成功",
  173. type: "success"
  174. });
  175. setTimeout(() => {
  176. this.$router.back();
  177. }, 2000);
  178. }
  179. },
  180. // 获取详细信息
  181. async getDoctorBodyPar() {
  182. let params = {
  183. organizationid: this.$route.query.pid
  184. };
  185. let res = await getDoctorBodyPar(params);
  186. if (res.ResultCode == 0) {
  187. if (res.Data.length > 0) {
  188. this.type = "edit";
  189. // 处方签
  190. let print = res.Data.filter(item => {
  191. return item.key == "print";
  192. });
  193. this.sign = {
  194. key: print[0].key,
  195. value: print[0].value,
  196. pid: this.$route.query.pid
  197. };
  198. //医共体启用
  199. let organizationEnable = res.Data.filter(item => {
  200. return item.key == "organizationEnable";
  201. });
  202. this.doctorbody = {
  203. key: organizationEnable[0].key,
  204. value: organizationEnable[0].value,
  205. pid: this.$route.query.pid
  206. };
  207. // 计算方式
  208. let countMenthod = res.Data.filter(item => {
  209. return item.key == "countMenthod";
  210. });
  211. this.way = {
  212. key: countMenthod[0].key,
  213. value: countMenthod[0].value,
  214. pid: this.$route.query.pid
  215. };
  216. // 自动审核
  217. let automaticReview = res.Data.filter(item => {
  218. return item.key == "automaticReview";
  219. });
  220. this.audit = {
  221. key: automaticReview[0].key,
  222. value: automaticReview[0].value,
  223. pid: this.$route.query.pid
  224. };
  225. //支付
  226. let isPay = res.Data.filter(item => {
  227. return item.key == "isPay";
  228. });
  229. this.pay = {
  230. key: isPay[0].key,
  231. value: isPay[0].value,
  232. pid: this.$route.query.pid
  233. };
  234. //诊疗首页
  235. let diagnosisHomePage = res.Data.filter(item => {
  236. return item.key == "diagnosisHomePage";
  237. });
  238. this.diagnosisF = {
  239. key: diagnosisHomePage[0].key,
  240. value: diagnosisHomePage[0].value,
  241. pid: this.$route.query.pid
  242. };
  243. //诊断页显示
  244. let diagnosisPage = res.Data.filter(item => {
  245. return item.key == "diagnosisPage";
  246. });
  247. this.diagnosis = {
  248. key: diagnosisPage[0].key,
  249. value: diagnosisPage[0].value,
  250. pid: this.$route.query.pid
  251. };
  252. // 转方
  253. let transitionPr = res.Data.filter(item => {
  254. return item.key === "transitionPr";
  255. });
  256. this.transitionPr = {
  257. key: transitionPr[0] ? transitionPr[0].key : 'transitionPr',
  258. value: transitionPr[0] ? (transitionPr[0].value || '0') : '0',
  259. pid: this.$route.query.pid
  260. };
  261. // 打印
  262. let showPrintHTML = res.Data.filter(item => {
  263. return item.key === "showPrintHTML";
  264. });
  265. this.showPrintHTML = {
  266. key: showPrintHTML[0] ? showPrintHTML[0].key : 'showPrintHTML',
  267. value: showPrintHTML[0] ? (showPrintHTML[0].value || '1') : '1',
  268. pid: this.$route.query.pid
  269. };
  270. // 登录首页配置
  271. let defaultHomePage = res.Data.filter(item => {
  272. return item.key === "defaultHomePage";
  273. });
  274. this.defaultHomePage = {
  275. key: defaultHomePage[0].key,
  276. value: defaultHomePage[0].value || '/index/todaypatients',
  277. pid: this.$route.query.pid
  278. };
  279. }
  280. }
  281. }
  282. }
  283. };
  284. </script>
  285. <style lang="scss" scoped>
  286. @import "../../style/common.scss";
  287. .code {
  288. padding: 33px 46px;
  289. background: #fff;
  290. border-radius: 5px;
  291. .code-item {
  292. margin-bottom: 30px;
  293. span {
  294. display: inline-block;
  295. width: 150px;
  296. text-align: right;
  297. }
  298. }
  299. .save {
  300. width: 76px;
  301. height: 36px;
  302. background: #5386f6;
  303. border-radius: 4px;
  304. font-size: 14px;
  305. font-family: PingFang SC;
  306. font-weight: 400;
  307. color: #ffffff;
  308. cursor: pointer;
  309. }
  310. }
  311. </style>