MedicalTerm.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375
  1. <template>
  2. <div>
  3. <crumbs title="医院术语关联" style="min-width: 980px">
  4. <el-form :inline="true" class="demo-form-inline">
  5. <el-form-item label="医院名称:">
  6. <el-input size="mini" v-model="filter.name" placeholder="请输入" clearable></el-input>
  7. </el-form-item>
  8. <el-form-item>
  9. <el-button size="mini" @click="filterDatas">检索</el-button>
  10. <!-- <el-button size="mini" type="warning" @click="addRelation">添加方案</el-button> -->
  11. </el-form-item>
  12. </el-form>
  13. </crumbs>
  14. <div class="contents">
  15. <el-table :data="list" border style="width: 100%">
  16. <el-table-column :resizable="false" type="index" :index="indexMethod" label="编号" width="60"></el-table-column>
  17. <el-table-column :resizable="false" prop="name" label="医院名称" show-overflow-tooltip></el-table-column>
  18. <el-table-column :resizable="false" prop="connect" label="术语关联">
  19. <template slot-scope="scope">
  20. <el-switch
  21. v-model="scope.row.connect"
  22. @change="handleStatusChange(scope.row)"
  23. :active-value="1"
  24. :inactive-value="0"
  25. active-color="#4BC4D7"
  26. inactive-color="#BBBBBB"
  27. ></el-switch>
  28. <span class="titlwSwitchStatus">{{scope.row.connect === 1 ? '开' : '关'}}</span>
  29. </template>
  30. </el-table-column>
  31. <el-table-column :resizable="false" prop="diseaseNum" label="诊断关联">
  32. <template slot-scope="scope">
  33. <span
  34. class="relation"
  35. @click="goRelationPage('Disease',scope.row)"
  36. >{{scope.row.diseaseNum}}</span>
  37. </template>
  38. </el-table-column>
  39. <el-table-column :resizable="false" prop="lisNum" label="检验关联">
  40. <template slot-scope="scope">
  41. <span class="relation" @click="goRelationPage('Lis',scope.row)">{{scope.row.lisNum}}</span>
  42. </template>
  43. </el-table-column>
  44. <el-table-column :resizable="false" prop="pacsNum" label="检查关联">
  45. <template slot-scope="scope">
  46. <span class="relation" @click="goRelationPage('Pacs',scope.row)">{{scope.row.pacsNum}}</span>
  47. </template>
  48. </el-table-column>
  49. <el-table-column :resizable="false" prop="drugNum" label="药品关联">
  50. <template slot-scope="scope">
  51. <span
  52. class="relation"
  53. @click="goRelationPage('DrugManage',scope.row)"
  54. >{{scope.row.drugNum}}</span>
  55. </template>
  56. </el-table-column>
  57. <el-table-column :resizable="false" prop="scaleNum" label="量表关联">
  58. <template slot-scope="scope">
  59. <span
  60. class="relation"
  61. @click="goRelationPage('ScaleManage',scope.row)"
  62. >{{scope.row.scaleNum}}</span>
  63. </template>
  64. </el-table-column>
  65. <el-table-column :resizable="false" prop="operationNum" label="手术/操作关联">
  66. <template slot-scope="scope">
  67. <span
  68. class="relation"
  69. @click="goRelationPage('Operation',scope.row)"
  70. >{{scope.row.operationNum}}</span>
  71. </template>
  72. </el-table-column>
  73. <el-table-column :resizable="false" prop="transfusionNum" label="输血关联">
  74. <template slot-scope="scope">
  75. <span
  76. class="relation"
  77. @click="goRelationPage('Fusion',scope.row)"
  78. >{{scope.row.transfusionNum}}</span>
  79. </template>
  80. </el-table-column>
  81. <el-table-column :resizable="false" prop="deptNum" label="科室关联">
  82. <template slot-scope="scope">
  83. <span
  84. class="relation"
  85. @click="goRelationPage('DeptManage',scope.row)"
  86. >{{scope.row.deptNum}}</span>
  87. </template>
  88. </el-table-column>
  89. <el-table-column :resizable="false" prop="nurseNum" label="护理关联">
  90. <template slot-scope="scope">
  91. <span
  92. class="relation"
  93. @click="goRelationPage('Nursing',scope.row)"
  94. >{{scope.row.nurseNum}}</span>
  95. </template>
  96. </el-table-column>
  97. <el-table-column :resizable="false" prop="tcmdiseaseNum" label="中医疾病关联">
  98. <template slot-scope="scope">
  99. <span
  100. class="relation"
  101. @click="goRelationPage('Tcmdisease',scope.row)"
  102. >{{scope.row.tcmdiseaseNum}}</span>
  103. </template>
  104. </el-table-column>
  105. <el-table-column :resizable="false" prop="Tcmdrome" label="中医证候关联">
  106. <template slot-scope="scope">
  107. <span
  108. class="relation"
  109. @click="goRelationPage('Tcmdrome',scope.row)"
  110. >{{scope.row.tcmsyndromeNum}}</span>
  111. </template>
  112. </el-table-column>
  113. </el-table>
  114. <div class="pagination">
  115. <el-pagination
  116. :current-page.sync="currentPage"
  117. @current-change="currentChange"
  118. background
  119. :page-size="pageSize"
  120. :page-sizes="pageSizeArr"
  121. @size-change="handleSizeChange"
  122. :layout="pageLayout"
  123. :total="total"
  124. ></el-pagination>
  125. </div>
  126. </div>
  127. </div>
  128. </template>
  129. <script>
  130. import api from '@api/cdss.js';
  131. import config from '@api/config.js';
  132. import utils from '@api/utils.js';
  133. export default {
  134. name: 'Plan',
  135. data: function() {
  136. return {
  137. list: [],
  138. searched: false,
  139. filter: {
  140. name: '' //标准诊断名称
  141. },
  142. currentPage: 1,
  143. pageSize: config.pageSize,
  144. pageSizeArr: config.pageSizeArr,
  145. pageLayout: config.pageLayout,
  146. total: 0
  147. };
  148. },
  149. created() {
  150. const that = this;
  151. //返回时避免参数未赋值就获取列表
  152. setTimeout(function() {
  153. that.getDataList();
  154. });
  155. // 非首页 编辑页返回 设置 this.currentPage
  156. if (Object.keys(this.$route.params).length !== 0) {
  157. this.currentPage = this.$route.params.currentPage;
  158. }
  159. },
  160. watch: {
  161. filter: {
  162. handler: function() {
  163. this.searched = false;
  164. },
  165. deep: true
  166. }
  167. },
  168. beforeRouteEnter(to, from, next) {
  169. next(vm => {
  170. //const pm = to.param;
  171. Object.assign(vm, to.params);
  172. vm.inCurrentPage = to.params.currentPage;
  173. });
  174. },
  175. methods: {
  176. handleSizeChange(val) {
  177. this.pageSize = val;
  178. this.currentPage = utils.getCurrentPage(
  179. this.currentPage,
  180. this.total,
  181. this.pageSize
  182. );
  183. this.getDataList();
  184. },
  185. // 获取列表数据
  186. async getDataList(isTurnPage) {
  187. let params = await this.getFilterItems(isTurnPage);
  188. this.searched = true;
  189. const loading = this.$loading({
  190. lock: true,
  191. text: 'Loading',
  192. spinner: 'el-icon-loading',
  193. background: 'rgba(0, 0, 0, 0.7)'
  194. });
  195. api.getMappingListPageCDSS(params).then(res => {
  196. loading.close();
  197. if (res.data.code === '0') {
  198. this.list = res.data.data && res.data.data.records;
  199. }
  200. this.total = res.data.data && res.data.data.total;
  201. if (this.inCurrentPage !== undefined) {
  202. this.currentPage = this.inCurrentPage;
  203. this.inCurrentPage = undefined;
  204. }
  205. });
  206. },
  207. // 处理列表请求数据参数
  208. async getFilterItems(isTurnPage) {
  209. //翻页时筛选条件没点确定则清空
  210. if (isTurnPage && !this.searched) {
  211. this.clearFilter();
  212. }
  213. const param = {
  214. current: this.inCurrentPage || this.currentPage,
  215. size: this.pageSize,
  216. name: this.filter.name.trim()
  217. };
  218. return param;
  219. },
  220. filterDatas() {
  221. this.currentPage = 1;
  222. this.getDataList();
  223. },
  224. // 页面跳转
  225. goRelationPage(from, row) {
  226. const item = Object.assign({}, row);
  227. localStorage.setItem('hospitalId',item.hospitalId)
  228. localStorage.setItem('name',item.name)
  229. // const pam = this.searched
  230. // ? {
  231. // currentPage: this.currentPage,
  232. // pageSize: this.pageSize,
  233. // filter: this.filter
  234. // }
  235. // : { currentPage: this.currentPage, pageSize: this.pageSize };
  236. this.$router.push({
  237. name: from,
  238. // params: Object.assign(pam, { from, data: item })
  239. params: { data: { ...item } }
  240. });
  241. },
  242. currentChange(next) {
  243. this.currentPage = next;
  244. this.getDataList(true);
  245. },
  246. // 清空搜索参数
  247. clearFilter() {
  248. this.filter = {
  249. name: ''
  250. };
  251. },
  252. indexMethod(index) {
  253. return (this.currentPage - 1) * this.pageSize + index + 1;
  254. },
  255. // 医院关联处理
  256. handleStatusChange(row) {
  257. console.log(row, '=状态');
  258. let connectInfo = row.connect == 1 ? '开启' : '关闭';
  259. this.$alert(`确定要${connectInfo}${row.name}的术语关联吗?`, '提示', {
  260. confirmButtonText: '确定',
  261. // cancelButtonText: '取消',
  262. type: 'warning'
  263. })
  264. .then(() => {
  265. api
  266. .modifyConnectStatusCDSS({
  267. connect: row.connect,
  268. id: row.hospitalId
  269. })
  270. .then(res => {
  271. if (res.data.code === '0') {
  272. this.getDataList();
  273. this.$message({
  274. type: 'success',
  275. message: '操作成功!'
  276. });
  277. }
  278. });
  279. })
  280. .catch(() => {
  281. this.getDataList();
  282. this.$message({
  283. type: 'info',
  284. message: '已取消'
  285. });
  286. });
  287. }
  288. }
  289. };
  290. </script>
  291. <style lang="less" scoped>
  292. @import '../../less/admin.less';
  293. .delete {
  294. color: red;
  295. }
  296. .delete:hover {
  297. color: red;
  298. }
  299. .pagination {
  300. min-width: 1010px;
  301. }
  302. .disable {
  303. border-color: transparent;
  304. }
  305. .el-message-box {
  306. /deep/.cancelBtn {
  307. background-color: #d7d7d7;
  308. border-color: transparent;
  309. }
  310. /deep/ .delBtn {
  311. background-color: #ff545b !important;
  312. border-color: transparent !important;
  313. }
  314. /deep/ .confirmBtn2 {
  315. position: relative;
  316. right: 0px !important;
  317. }
  318. }
  319. .exportBoxL {
  320. /deep/ .el-message-box__btns {
  321. margin-top: 20px;
  322. }
  323. /deep/ .el-message-box__message {
  324. text-align: left;
  325. }
  326. /deep/ .el-message-box__btns {
  327. // text-align: center;
  328. margin-bottom: 24px;
  329. }
  330. /deep/ .leftbtn {
  331. margin-right: 46px;
  332. background-color: #d7d7d7;
  333. border-color: transparent;
  334. }
  335. /deep/ .cancelSureL {
  336. // text-align: center;
  337. display: none;
  338. }
  339. /deep/ .sureL {
  340. float: right;
  341. }
  342. }
  343. .contents {
  344. .is-plain {
  345. color: #dad7d7;
  346. }
  347. .is-plain:hover {
  348. color: #dad7d7;
  349. }
  350. }
  351. .el-table__row {
  352. /deep/ .is-disabled {
  353. border-color: transparent !important;
  354. }
  355. }
  356. .relation {
  357. color: #009dd9;
  358. cursor: pointer;
  359. }
  360. .titlwSwitchStatus {
  361. margin-left: 16px;
  362. }
  363. </style>