Elizabeth's proactive approach involves introducing urinal toilet attachment , an ingenious concept that optimizes space and functionality.

diagnoseOther.vue 12KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393
  1. <template>
  2. <div class="main-contain">
  3. <div class=" sign-and-weigh-box" style="background: white">
  4. <diagnose-other-dialog
  5. ref="dialog"
  6. :titles="Dialog.titles"
  7. :formValue="Dialog.formValue"
  8. :visibility="Dialog.isVisibility"
  9. :type="Dialog.type"
  10. :isCreated="Dialog.isCreated"
  11. v-on:dialog-comfirm="dialogComfirm"
  12. v-on:dialog-cancle="dialogCancle"
  13. ></diagnose-other-dialog>
  14. <el-row :gutter="15">
  15. <el-col>
  16. <div>
  17. <el-button
  18. size="small"
  19. icon="el-icon-circle-plus-outline"
  20. style="float: right;margin-bottom: 15px"
  21. type="primary"
  22. @click="showDialog"
  23. >新增
  24. </el-button>
  25. </div>
  26. <el-table
  27. :row-style="{ color: '#303133' }"
  28. :header-cell-style="{
  29. backgroundColor: 'rgb(245, 247, 250)',
  30. color: '#606266'
  31. }"
  32. :data="manufacturerData"
  33. style="width: 100%"
  34. border
  35. v-loading="loading"
  36. >
  37. <el-table-column label="国家编码" align="center">
  38. <template slot-scope="scope">
  39. {{ scope.row.country_code }}
  40. </template>
  41. </el-table-column>
  42. <el-table-column label="目录代码" align="center">
  43. <template slot-scope="scope">
  44. {{ scope.row.content_code }}
  45. </template>
  46. </el-table-column>
  47. <el-table-column label="诊断名称" align="center">
  48. <template slot-scope="scope">
  49. {{ scope.row.class_name }}
  50. </template>
  51. </el-table-column>
  52. <el-table-column label="国家目录名称" align="center">
  53. <template slot-scope="scope">
  54. {{ scope.row.country_content_name }}
  55. </template>
  56. </el-table-column>
  57. <el-table-column label="排序" align="center">
  58. <template slot-scope="scope">
  59. {{ scope.row.sort }}
  60. </template>
  61. </el-table-column>
  62. <el-table-column label="备注" align="center">
  63. <template slot-scope="scope">
  64. {{ scope.row.remark }}
  65. </template>
  66. </el-table-column>
  67. <el-table-column label="操作" align="center">
  68. <template slot-scope="scope">
  69. <el-tooltip
  70. class="item"
  71. effect="dark"
  72. content="编辑"
  73. placement="top"
  74. >
  75. <el-button
  76. size="small"
  77. type="primary"
  78. icon="el-icon-edit-outline"
  79. @click="handleEdit(scope.$index, scope.row)"
  80. >
  81. </el-button>
  82. </el-tooltip>
  83. <el-tooltip
  84. class="item"
  85. effect="dark"
  86. content="删除"
  87. placement="top"
  88. >
  89. <el-button
  90. size="small"
  91. type="danger"
  92. icon="el-icon-delete"
  93. @click="handleDelete(scope.$index, scope.row)"
  94. >
  95. </el-button>
  96. </el-tooltip>
  97. </template>
  98. </el-table-column>
  99. </el-table>
  100. <el-pagination
  101. @size-change="handleSizeChange"
  102. @current-change="handleCurrentChange"
  103. :page-sizes="[10, 50, 100]"
  104. :page-size="10"
  105. background
  106. align="right"
  107. style="margin-top:20px;"
  108. layout="total, sizes, prev, pager, next, jumper"
  109. :total="total"
  110. >
  111. </el-pagination>
  112. </el-col>
  113. </el-row>
  114. </div>
  115. </div>
  116. </template>
  117. <script>
  118. import {
  119. createDiagnose,
  120. modifyDiagnose,
  121. getDiagnoseList,
  122. deleteDiagnose,
  123. GetDiagnose
  124. } from '@/api/data'
  125. import DiagnoseOtherDialog from "./diagnoseOtherDialog";
  126. export default {
  127. components: {
  128. DiagnoseOtherDialog,
  129. },
  130. name: 'diagnoseOther',
  131. data() {
  132. return {
  133. signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
  134. manufacturerData: [],
  135. total: 0,
  136. pageTotal: 0,
  137. pageSelect: 0,
  138. page: 1,
  139. limit: 10,
  140. loading: false,
  141. manufacturer_code: '',
  142. editId: '',
  143. editIndex: '',
  144. Dialog: {
  145. titles: '新增',
  146. isVisibility: false,
  147. isCreated: 1, //1.创建 2.编辑 3.查看详情
  148. formValue: {
  149. class_name: '',
  150. content_code: '',
  151. country_code: '',
  152. country_content_name: '',
  153. remark: '',
  154. pinyin: '',
  155. wubi: '',
  156. sort:0,
  157. },
  158. resetForm: {
  159. class_name: '',
  160. content_code: '',
  161. country_code: '',
  162. country_content_name: '',
  163. remark: '',
  164. pinyin: '',
  165. wubi: ''
  166. }
  167. }
  168. }
  169. },
  170. methods: {
  171. handleEdit: function(index, row) {
  172. this.editId = row.id
  173. this.editIndex = index
  174. let params = {
  175. id: row.id
  176. }
  177. GetDiagnose(params).then(response => {
  178. if (response.data.state == 0) {
  179. this.$message.error(response.data.msg)
  180. return false
  181. } else {
  182. this.Dialog.formValue.class_name =
  183. response.data.data.sick.class_name
  184. this.Dialog.formValue.content_code =
  185. response.data.data.sick.content_code
  186. this.Dialog.formValue.country_code =
  187. response.data.data.sick.country_code
  188. this.Dialog.formValue.country_content_name =
  189. response.data.data.sick.country_content_name
  190. this.Dialog.formValue.remark =
  191. response.data.data.sick.remark
  192. this.Dialog.formValue.pinyin =
  193. response.data.data.sick.pinyin
  194. this.Dialog.formValue.wubi =
  195. response.data.data.sick.wubi
  196. this.Dialog.formValue.sort = response.data.data.sick.sort
  197. this.Dialog.isCreated = 2
  198. this.$refs.dialog.show()
  199. }
  200. })
  201. },
  202. handleDelete: function(index, row) {
  203. this.$confirm('确认删除这条记录?', '删除记录', {
  204. confirmButtonText: '确定',
  205. cancelButtonText: '取消',
  206. type: 'warning'
  207. })
  208. .then(() => {
  209. let params = {
  210. id: row.id
  211. }
  212. deleteDiagnose(params).then(response => {
  213. if (response.data.state == 0) {
  214. this.$message.error(response.data.msg)
  215. return false
  216. } else {
  217. this.manufacturerData.splice(index, 1)
  218. this.$message.success('厂家已经删除')
  219. }
  220. })
  221. })
  222. .catch(() => {
  223. })
  224. },
  225. showDetails: function(index, row) {
  226. let params = {
  227. id: row.id
  228. }
  229. GetDiagnose(params).then(response => {
  230. if (response.data.state == 0) {
  231. this.$message.error(response.data.msg)
  232. return false
  233. } else {
  234. this.Dialog.formValue.class_name =
  235. response.data.data.sick.class_name
  236. this.Dialog.formValue.content_code =
  237. response.data.data.sick.content_code
  238. this.Dialog.formValue.country_code =
  239. response.data.data.sick.country_code
  240. this.Dialog.formValue.country_content_name =
  241. response.data.data.sick.country_content_name
  242. this.Dialog.formValue.remark =
  243. response.data.data.sick.remark
  244. this.Dialog.formValue.pinyin =
  245. response.data.data.sick.pinyin
  246. this.Dialog.formValue.wubi =
  247. response.data.data.sick.wubi
  248. this.Dialog.formValue.sort =
  249. response.data.data.sick.sort
  250. this.Dialog.isCreated = 3
  251. this.Dialog.isVisibility = true
  252. }
  253. })
  254. },
  255. dialogComfirm: function(val) {
  256. // this.manufacturerDialog.isVisibility = false
  257. this.$refs.dialog.hide()
  258. if (val.isCreated == 2) {
  259. //修改
  260. let params = {
  261. class_name: val.class_name,
  262. content_code: val.content_code,
  263. country_code: val.country_code,
  264. country_content_name: val.country_content_name,
  265. remark: val.remark,
  266. id: this.editId,
  267. pinyin: val.pinyin,
  268. wubi: val.wubi,
  269. sort:parseInt(val.sort)
  270. }
  271. modifyDiagnose(params).then(response => {
  272. if (response.data.state == 0) {
  273. this.$message.error(response.data.msg)
  274. return false
  275. } else {
  276. this.manufacturerData[this.editIndex].class_name =
  277. response.data.data.sick.class_name
  278. this.manufacturerData[this.editIndex].content_code =
  279. response.data.data.sick.content_code
  280. this.manufacturerData[this.editIndex].country_code =
  281. response.data.data.sick.country_code
  282. this.manufacturerData[this.editIndex].country_code =
  283. response.data.data.sick.country_code
  284. this.manufacturerData[this.editIndex].country_content_name =
  285. response.data.data.sick.country_content_name
  286. this.manufacturerData[this.editIndex].remark =
  287. response.data.data.sick.remark
  288. this.manufacturerData[this.editIndex].pinyin =
  289. response.data.data.sick.pinyin
  290. this.manufacturerData[this.editIndex].wubi =
  291. response.data.data.sick.wubi
  292. this.manufacturerData[this.editIndex].sort =
  293. response.data.data.sick.sort
  294. this.$message.success('修改成功')
  295. }
  296. })
  297. } else if (val.isCreated == 1) {
  298. //新增
  299. createDiagnose(val).then(response => {
  300. if (response.data.state == 0) {
  301. this.$message.error(response.data.msg)
  302. return false
  303. } else {
  304. this.manufacturerData.unshift(response.data.data.sick)
  305. this.$message.success('新增成功')
  306. }
  307. })
  308. }
  309. },
  310. dialogCancle: function() {
  311. this.$refs.dialog.hide()
  312. },
  313. showDialog: function() {
  314. this.Dialog.formValue = Object.assign(
  315. {},
  316. this.Dialog.resetForm
  317. )
  318. this.$refs.dialog.show()
  319. this.Dialog.isCreated = 1
  320. },
  321. handleSizeChange(val) {
  322. this.limit = val
  323. this.getList()
  324. },
  325. handleCurrentChange(val) {
  326. this.page = val
  327. this.getList()
  328. },
  329. getList() {
  330. let params = {
  331. page: this.page,
  332. limit: this.limit
  333. }
  334. this.loading = true
  335. getDiagnoseList(params).then(response => {
  336. if (response.data.state == 0) {
  337. this.loading = false
  338. this.$message.error(response.data.msg)
  339. return false
  340. } else {
  341. this.loading = false
  342. this.total = response.data.data.total
  343. this.manufacturerData = []
  344. for (let i = 0; i < response.data.data.sick.length; i++) {
  345. this.manufacturerData.push(response.data.data.sick[i])
  346. }
  347. }
  348. })
  349. }
  350. },
  351. created() {
  352. this.getList()
  353. }
  354. }
  355. </script>
  356. <style lang="scss">
  357. .el-table td,
  358. .el-table th.is-leaf,
  359. .el-table--border,
  360. .el-table--group {
  361. border-color: #d0d3da;
  362. }
  363. .el-table--border::after,
  364. .el-table--group::after,
  365. .el-table::before {
  366. background-color: #d0d3da;
  367. }
  368. </style>