index.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387
  1. <template>
  2. <div class="operational-assistant">
  3. <div class="app-bodyer-detail">
  4. <el-row>
  5. <el-col :span="24">
  6. <el-form :inline="true" size="medium">
  7. <el-form-item label="姓名">
  8. <el-input placeholder="请输入姓名"></el-input>
  9. </el-form-item>
  10. <el-form-item label="开始时间">
  11. <el-date-picker placeholder="请选择开始时间"></el-date-picker>
  12. </el-form-item>
  13. <el-form-item label="结束时间">
  14. <el-date-picker placeholder="请选择结束时间"></el-date-picker>
  15. </el-form-item>
  16. <el-form-item>
  17. <el-button type="primary">查询</el-button>
  18. <el-button>重置</el-button>
  19. </el-form-item>
  20. </el-form>
  21. </el-col>
  22. </el-row>
  23. <div class="tableData">
  24. <el-table
  25. :data="tableData"
  26. style="width: 100%"
  27. highlight-current-row
  28. stripe
  29. >
  30. <el-table-column label="今日新增潜在患者">
  31. <el-table-column width="90" label="状态" prop=""></el-table-column>
  32. <el-table-column width="90" label="姓名" prop=""></el-table-column>
  33. <el-table-column width="90" label="年龄" prop=""></el-table-column>
  34. <el-table-column width="90" label="性别" prop=""></el-table-column>
  35. <el-table-column label="手机1" prop=""></el-table-column>
  36. <el-table-column
  37. label="最后就诊时间"
  38. prop=""
  39. width="120"
  40. ></el-table-column>
  41. <el-table-column
  42. label="标签发现时间"
  43. prop=""
  44. width="120"
  45. ></el-table-column>
  46. <el-table-column label="推理依据" prop=""></el-table-column>
  47. <el-table-column label="查看病例" prop=""></el-table-column>
  48. <el-table-column label="其他标签" prop="tag" width="170">
  49. <template slot-scope="scope">
  50. <el-select v-model="scope.row.tag" @change="handleTagSelect(scope.row, scope.$index)">
  51. <el-option
  52. v-for="item in otherTags"
  53. :key="item.value"
  54. :label="item.label"
  55. :value="item.value"></el-option>
  56. </el-select>
  57. </template>
  58. </el-table-column>
  59. <el-table-column label="操作" width="220" fixed="right">
  60. <template slot-scope="scope">
  61. <el-button type="text">加入会诊</el-button>
  62. <el-button type="text" @click="handleAddManagement(scope.row)">加入管理</el-button>
  63. <el-button type="text">排除</el-button>
  64. </template>
  65. </el-table-column>
  66. </el-table-column>
  67. </el-table>
  68. <!-- <el-table :data="FollowTableData" style="width: 100%; margin-top: 40px">
  69. <el-table-column label="今日待随访患者">
  70. <el-table-column width="90" label="状态" prop="a"></el-table-column>
  71. <el-table-column
  72. width="90"
  73. label="随访类型"
  74. prop="b"
  75. ></el-table-column>
  76. <el-table-column width="90" label="姓名" prop="c"></el-table-column>
  77. <el-table-column width="90" label="年龄" prop="d"></el-table-column>
  78. <el-table-column width="90" label="性别" prop=""></el-table-column>
  79. <el-table-column label="手机1" prop="e"></el-table-column>
  80. <el-table-column label="其他标签" prop="g"></el-table-column>
  81. <el-table-column label="目标科室" prop="f"></el-table-column>
  82. <el-table-column label="就诊计划" prop=""></el-table-column>
  83. <el-table-column label="随访概述" prop="i"></el-table-column>
  84. <el-table-column label="下次随访时间" prop="j"></el-table-column>
  85. </el-table-column>
  86. </el-table> -->
  87. <el-table
  88. ref="treeTable"
  89. :data="treeTableData"
  90. row-key="id"
  91. border
  92. :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
  93. style="width: 100%; margin-top: 40px;"
  94. :header-cell-style="{ background: '#f5f7fa' }"
  95. >
  96. <!-- 类型列 -->
  97. <el-table-column
  98. label="随访类型"
  99. prop="label"
  100. width="180"
  101. class="flex-column"
  102. >
  103. <template slot-scope="scope">
  104. <div v-if="scope.row.children" class="type-node" style="display: flex;">
  105. {{ scope.row.label }}
  106. <el-tag size="mini" type="info" style="margin-left: 4px;">{{ scope.row.children.length }}</el-tag>
  107. </div>
  108. </template>
  109. </el-table-column>
  110. <!-- 基础信息列 -->
  111. <el-table-column label="姓名" prop="name" width="100"></el-table-column>
  112. <el-table-column label="年龄" prop="age" width="80"></el-table-column>
  113. <el-table-column label="性别" prop="gender" width="80"></el-table-column>
  114. <el-table-column label="手机1" prop="phone" width="120"></el-table-column>
  115. <el-table-column label="其他标签" prop="tags" width="120"></el-table-column>
  116. <el-table-column label="目标科室" prop="department"></el-table-column>
  117. <el-table-column label="就诊计划" prop="plan"></el-table-column>
  118. <el-table-column label="随访结论" prop="" width="140">
  119. <template slot-scope="scope" v-if="!scope.row.children">
  120. <el-select
  121. v-model="scope.row.conclusion"
  122. @change="handleSelect(scope.row, scope.$index)"
  123. >
  124. <el-option
  125. v-for="item in selectData"
  126. :key="item.value"
  127. :label="item.label"
  128. :value="item.value"
  129. ></el-option>
  130. </el-select>
  131. </template>
  132. </el-table-column>
  133. <el-table-column label="随访概述" prop="" width="200">
  134. <template slot-scope="scope" v-if="!scope.row.children">
  135. <el-input
  136. v-model="scope.row.i"
  137. type="textarea"
  138. :rows="3"
  139. placeholder="请输入随访概述"
  140. ></el-input>
  141. </template>
  142. </el-table-column>
  143. <el-table-column label="下次随访时间" prop="" width="200" fixed="right">
  144. <template slot-scope="scope" v-if="!scope.row.children">
  145. <!-- {{ scope.row }} -->
  146. <el-date-picker v-if="['2', '3'].includes(scope.row.conclusion)" v-model="scope.row.nextTime"></el-date-picker>
  147. </template>
  148. </el-table-column>
  149. <el-table-column label="操作" prop="" width="80" fixed="right">
  150. <template slot-scope="scope" v-if="!scope.row.children">
  151. <!-- {{ scope.row }} -->
  152. <!-- <el-button type="text" :disabled="!['2', '3'].includes(scope.row.conclusion)">发送</el-button> -->
  153. <el-button type="text" :disabled="scope.row.conclusion !== '1'">发送</el-button>
  154. </template>
  155. </el-table-column>
  156. </el-table>
  157. </div>
  158. </div>
  159. </div>
  160. </template>
  161. <script>
  162. export default {
  163. data() {
  164. return {
  165. tableData: [
  166. {
  167. tag: ''
  168. }
  169. ],
  170. FollowTableData: [
  171. {
  172. a: "测试状态",
  173. b: "测试类型",
  174. c: "测试姓名",
  175. d: "3",
  176. e: "18500516707",
  177. f: "测试科室",
  178. g: "测试标签",
  179. h: "考虑中",
  180. i: "测试情况",
  181. j: "2025-04-01",
  182. },
  183. ],
  184. rowData: [
  185. { type: '出院后随访', name: '张三', age: 35 },
  186. { type: '门诊随访', name: '李四', age: 28 }
  187. ],
  188. rawData: [
  189. {
  190. id: 1,
  191. followType: '出院后随访',
  192. name: '张三',
  193. age: 35,
  194. gender: '男',
  195. phone: '13800001111',
  196. status: 1,
  197. conclusion: '1', // 随访结论
  198. department: '心内科',
  199. plan: '术后复查',
  200. nextTime: '',
  201. tags: '市内领导'
  202. },
  203. {
  204. id: 111,
  205. followType: '出院后随访',
  206. name: '张一',
  207. age: 35,
  208. gender: '男',
  209. phone: '13800001111',
  210. status: 1,
  211. conclusion: '2', // 随访结论
  212. department: '心内科',
  213. plan: '术后复查',
  214. nextTime: '',
  215. tags: '离休干部'
  216. },
  217. {
  218. id: 111222,
  219. followType: '出院后随访',
  220. name: '张二',
  221. age: 35,
  222. gender: '男',
  223. phone: '13800001111',
  224. status: 1,
  225. conclusion: '3', // 随访结论
  226. department: '心内科',
  227. plan: '术后复查',
  228. nextTime: '',
  229. tags: '忠诚客户'
  230. },
  231. {
  232. id: 2,
  233. followType: '门诊随访',
  234. name: '李四',
  235. age: 28,
  236. gender: '女',
  237. phone: '13900002222',
  238. status: 2,
  239. conclusion: '4', // 随访结论
  240. department: '呼吸科',
  241. plan: 'CT复查',
  242. nextTime: '',
  243. tags: '本院职工及家属'
  244. },
  245. {
  246. id: 3,
  247. followType: '多标签患者',
  248. name: '李哥',
  249. age: 28,
  250. gender: '女',
  251. phone: '13900002222',
  252. status: 2,
  253. conclusion: '5', // 随访结论
  254. department: '呼吸科',
  255. plan: 'CT复查',
  256. nextTime: '',
  257. tags: '高净值客户'
  258. }
  259. ],
  260. followTypes: [
  261. '出院后随访',
  262. '门诊随访',
  263. '潜在风险随访',
  264. '流失患者随访',
  265. '会诊随访',
  266. '多标签患者'
  267. ],
  268. otherTags: [
  269. {
  270. label: '本院职工及家属',
  271. value: 1
  272. },
  273. {
  274. label: '市内领导',
  275. value: 2
  276. },
  277. {
  278. label: '离休干部',
  279. value: 3
  280. },
  281. {
  282. label: '纠纷患者',
  283. value: 4
  284. },
  285. {
  286. label: '忠诚客户',
  287. value: 5
  288. },
  289. {
  290. label: '高净值客户',
  291. value: 6
  292. }
  293. ],
  294. selectData: [
  295. {
  296. label: "计划就诊(时间)",
  297. value: '1',
  298. },
  299. {
  300. label: "考虑中",
  301. value: '2',
  302. },
  303. {
  304. label: "外院就诊",
  305. value: '3',
  306. },
  307. {
  308. label: "排除",
  309. value: '4',
  310. },
  311. {
  312. label: "失访",
  313. value: '5'
  314. }
  315. ]
  316. }
  317. },
  318. computed: {
  319. treeTableData() {
  320. return this.followTypes.map(type => ({
  321. id: type,
  322. label: type,
  323. children: this.rawData
  324. .filter(item => item.followType === type)
  325. .map(item => ({
  326. ...item,
  327. id: item.id.toString()
  328. }))
  329. }))
  330. }
  331. },
  332. methods: {
  333. handleSelect(row, index) {
  334. console.log(row, index, "index")
  335. },
  336. // 选择标签
  337. handleTagSelect(row, index) {
  338. console.log(row, index, "index")
  339. },
  340. // 加入管理
  341. handleAddManagement(row) {
  342. this.$router.push({ path: 'operational-manage' })
  343. console.log(row, "加入管理")
  344. },
  345. }
  346. }
  347. </script>
  348. <style lang="scss" scoped>
  349. .operational-assistant {
  350. padding: 20px;
  351. margin: 0 14px;
  352. border-radius: 20px;
  353. background-color: #ffffff;
  354. min-height: calc(100vh - 80px);
  355. }
  356. ::v-deep .el-table thead.is-group th.el-table__cell {
  357. background-color: #ffffff;
  358. border-left: none;
  359. border-right: none;
  360. }
  361. ::v-deep td {
  362. border: none !important;
  363. }
  364. .el-table {
  365. border: none;
  366. }
  367. ::v-deep .el-table th.el-table__cell {
  368. border-right: none !important;
  369. }
  370. ::v-deep tr {
  371. border: none !important;
  372. }
  373. ::v-deep .cell {
  374. display: flex !important;
  375. // align-items: center !important;
  376. }
  377. </style>