index.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654
  1. <template>
  2. <view class="mine-container">
  3. <!-- 面包屑 -->
  4. <custom-breadcrumb separator=">">
  5. <custom-breadcrumb-item v-for="(route,index) in routes" :key="index" :to="route.to" :switch="true">
  6. {{route.name}}
  7. </custom-breadcrumb-item>
  8. </custom-breadcrumb>
  9. <!-- 面包屑 -->
  10. <view class="content u-page">
  11. <view class="caseList">
  12. <view class="caseList_top">
  13. <view class="caseList_top_title">{{selectUser.length == 0 ? '所有课件' : '筛选课件'}}</view>
  14. <!-- 筛选 志愿者、医生 -->
  15. <!-- 无选择 -->
  16. <view class="caseList_top_search" v-if="selectUser.length == 0">
  17. <view class="caseList_top_search_con" @click="openSelectPopup">
  18. <view class="caseList_top_search_con_text">筛选</view>
  19. <image mode="heightFix" src="@/static/images/down.png"></image>
  20. </view>
  21. </view>
  22. <!-- 无选择 -->
  23. <!-- 有选择 -->
  24. <view class="caseList_top_selected bg-custom" v-else>
  25. <view class="caseList_top_selected_item" v-for="(item,index) in selectUser" :key="index">
  26. <view class="caseList_top_selected_item_name">{{item[isDoctor ? 'volunteerUserName' : 'doctorUserName']}}</view>
  27. <uni-icons type="closeempty" color="#fff" @click="delPerson(index)"></uni-icons>
  28. </view>
  29. </view>
  30. <!-- 有选择 -->
  31. <!-- 筛选志愿者、医生 -->
  32. </view>
  33. <!-- 数据信息 -->
  34. <view class="caseList_middle">
  35. <view class="caseList_middle_item">
  36. <view class="caseList_middle_item_text">{{info.total}}</view>
  37. <view class="caseList_middle_item_title">已上传课件</view>
  38. </view>
  39. <view class="caseList_middle_item">
  40. <view class="caseList_middle_item_text">{{info.passTotal}}</view>
  41. <view class="caseList_middle_item_title">符合标准课件</view>
  42. </view>
  43. <view class="caseList_middle_item">
  44. <view class="caseList_middle_item_text">{{info.noPassTotal}}</view>
  45. <view class="caseList_middle_item_title">不符合标准课件</view>
  46. </view>
  47. </view>
  48. <!-- 数据信息 -->
  49. <view class="caseList_bottom">
  50. <view class="bottom_item" v-for="(item,index) in info.caseList" :key="item.id" @click="toDetail(index)">
  51. <view class="bottom_item_top">
  52. <!-- 内容头部信息 -->
  53. <view class="bottom_item_top_con">
  54. <view class="bottom_item_top_con_name">{{item.caseName}}</view>
  55. <view class="bottom_item_top_con_status">
  56. <image mode="heightFix" v-if="item.caseAnalysisStatus !== null" :src="getCaseAnalysisData(item.caseAnalysisStatus).img"></image>
  57. <image mode="heightFix" v-else-if="item.beautifyStatus == '1'" src="@/static/images/status/check-circle.png"></image>
  58. <image mode="heightFix" v-else-if="item.checkStatus == '2'" src="@/static/images/status/exclamation-circle.png"></image>
  59. <image mode="heightFix" v-else-if="item.checkStatus == '0'" src="@/static/images/status/clock-circle.png"></image>
  60. <image mode="heightFix" v-else-if="item.checkStatus == '1'" src="@/static/images/status/pass.png"></image>
  61. <view v-if="item.caseAnalysisStatus !== null" class="bottom_item_top_con_status_text" :class="getCaseAnalysisData(item.caseAnalysisStatus).type">{{getCaseAnalysisData(item.caseAnalysisStatus).text}}</view>
  62. <view v-else class="bottom_item_top_con_status_text" :class="[item.beautifyStatus == '1' ? 'blue' : item.checkStatus ? getDictValue(statusArr,item.checkStatus).type : '']">
  63. {{ item.beautifyStatus == '1' ? '已美化' : item.checkStatus ? getDictValue(statusArr,item.checkStatus).text : ''}}
  64. </view>
  65. </view>
  66. </view>
  67. <!-- 内容头部信息 -->
  68. <!-- 医生 -->
  69. <view class="bottom_item_top_con2" v-if="isDoctor">
  70. <view class="bottom_item_top_con2_item" v-if="item.sex">
  71. 性别:
  72. <view class="bottom_item_top_con2_item_text">
  73. {{item.sex}}
  74. </view>
  75. </view>
  76. <view class="bottom_item_top_con2_item" v-if="item.age">
  77. 年龄:
  78. <view class="bottom_item_top_con2_item_text">
  79. {{item.age}}
  80. </view>
  81. </view>
  82. <view class="bottom_item_top_con2_item" v-if="item.result">
  83. 诊断:
  84. <view class="bottom_item_top_con2_item_text">
  85. {{item.result}}
  86. </view>
  87. </view>
  88. <view class="bottom_item_top_con2_tags" v-if="item.tags&&item.tags.length > 0">
  89. <view class="bottom_item_top_con2_tags_item" v-for="(item2,index2) in item.tags.slice(0,3)" :key="index2">{{item2}}</view>
  90. </view>
  91. </view>
  92. <!-- 医生 -->
  93. <!-- 志愿者 -->
  94. <view class="bottom_item_top_con2" v-if="!isDoctor">
  95. <view class="bottom_item_top_con2_item">所属医生:
  96. <view class="bottom_item_top_con2_item_text">
  97. {{item.userName}}
  98. </view>
  99. </view>
  100. </view>
  101. <view class="bottom_item_top_con2">
  102. <view class="bottom_item_top_con2_item">所属项目:
  103. <view class="bottom_item_top_con2_item_text">
  104. {{item.projectName}}
  105. </view>
  106. </view>
  107. </view>
  108. <!-- 志愿者 -->
  109. </view>
  110. <view class="bottom_item_file" v-if="item.caseFileList&&item.caseFileList.length > 0">
  111. <!-- 医生 -->
  112. <template v-if="isDoctor">
  113. <view class="bottom_item_file_item" v-for="(item2,index2) in item.caseFileList.slice(0,1)" :key="index2">
  114. <view class="bottom_item_file_item_left">
  115. <image mode="scaleToFill" v-if="item2.type == 'ppt'" src="@/static/images/file/pptIcon.png"></image>
  116. <image mode="scaleToFill" v-if="item2.type == 'png'" src="@/static/images/file/imgIcon.png"></image>
  117. <image mode="scaleToFill" v-if="item2.type == 'doc'" src="@/static/images/file/docIcon.png"></image>
  118. <image mode="scaleToFill" v-if="item2.type == 'mp3'" src="@/static/images/file/mp3Icon.png"></image>
  119. <image mode="scaleToFill" v-if="item2.type == 'pdf'" src="@/static/images/file/pdfIcon.png"></image>
  120. <image mode="scaleToFill" v-if="item2.type == 'txt'" src="@/static/images/file/txtIcon.png"></image>
  121. <image mode="scaleToFill" v-if="item2.type == 'video'" src="@/static/images/file/videoIcon.png"></image>
  122. <view class="bottom_item_file_item_left_name">{{item2.name}}</view>
  123. </view>
  124. <view class="bottom_item_file_item_right">
  125. <image mode="heightFix" src="@/static/images/right.png"></image>
  126. </view>
  127. </view>
  128. </template>
  129. <!-- 医生 -->
  130. <!-- 志愿者 -->
  131. <template v-else>
  132. <view class="bottom_item_file_item" v-for="(item2,index2) in item.caseFileList.slice(0,2)" :key="index2">
  133. <view class="bottom_item_file_item_left">
  134. <image mode="scaleToFill" v-if="item2.type == 'ppt'" src="@/static/images/file/pptIcon.png"></image>
  135. <image mode="scaleToFill" v-if="item2.type == 'png'" src="@/static/images/file/imgIcon.png"></image>
  136. <image mode="scaleToFill" v-if="item2.type == 'doc'" src="@/static/images/file/docIcon.png"></image>
  137. <image mode="scaleToFill" v-if="item2.type == 'mp3'" src="@/static/images/file/mp3Icon.png"></image>
  138. <image mode="scaleToFill" v-if="item2.type == 'pdf'" src="@/static/images/file/pdfIcon.png"></image>
  139. <image mode="scaleToFill" v-if="item2.type == 'txt'" src="@/static/images/file/txtIcon.png"></image>
  140. <image mode="scaleToFill" v-if="item2.type == 'video'" src="@/static/images/file/videoIcon.png"></image>
  141. <view class="bottom_item_file_item_left_name">{{item2.name}}</view>
  142. </view>
  143. <view class="bottom_item_file_item_right">
  144. <image mode="heightFix" src="@/static/images/right.png"></image>
  145. </view>
  146. </view>
  147. </template>
  148. <!-- 志愿者 -->
  149. </view>
  150. </view>
  151. </view>
  152. </view>
  153. <!-- 新增课件 -->
  154. <uni-popup ref="popupCase" :mask-click="false" type="bottom" background-color="#fff">
  155. <add-case :person="selectPersonList" @close="closePopupCase" @showLoad="showPopupCase = true" @closeLoad="showPopupCase = false"></add-case>
  156. </uni-popup>
  157. <!-- 新增课件 -->
  158. <!-- 筛选志愿者、医生弹窗 -->
  159. <uni-popup ref="popupSelectPerson" :mask-click="true" type="top" background-color="#fff">
  160. <select-doctor :person="selectPersonList" @selectPerson="selectPerson" :isDoctor='isDoctor'></select-doctor>
  161. </uni-popup>
  162. <!-- 筛选志愿者、医生弹窗 -->
  163. </view>
  164. <u-loading-page :loading="showPopupCase" loading-mode="spinner" style="z-index: 999999;" :bg-color="'rgba(0, 0, 0, 0.3)'" :loading-color="'#fff'" :color="'#fff'"></u-loading-page>
  165. </view>
  166. </template>
  167. <script>
  168. import storage from '@/utils/storage'
  169. import addCase from '@/components/phone/case/addCase.vue'
  170. import selectDoctor from '@/components/selectDoctor/selectDoctor.vue'
  171. import { getUserCaseList, volunteerSelectList, doctorSelectList } from "@/api/case/case"
  172. import { getTypeName } from '@/utils/common'
  173. var elementIcon = document.getElementsByClassName('uni-tabbar__icon')
  174. var elementMid = document.getElementsByClassName('uni-tabbar__mid')
  175. export default {
  176. components: {addCase,selectDoctor},
  177. data() {
  178. return {
  179. showPopupCase: false,
  180. routes: [{
  181. to: "/pages/phone/index",
  182. name: "课件管理",
  183. }, ],
  184. messageList: ["", ""],
  185. selectPersonList: [], // 人员列表
  186. searchValue: undefined,
  187. // showShadow: false,
  188. statusArr: [{key: '2',text: '未通过',type: 'fail'},{key: '0',text: '审核中',type: 'in'},{key: '1',text: '审核通过',type: 'pass'}], // 状态类型
  189. selectUser: [], // 选择的人员
  190. info: {
  191. total: 0,
  192. passTotal: 0,
  193. noPassTotal:0,
  194. caseList: [],
  195. }, // 课件列表+头部课件数据信息
  196. isDoctor:true, //是否医生
  197. }
  198. },
  199. onLoad() {
  200. this.isDoctor = this.$store.state.user.loginIdentity == 0
  201. // tabbar中间按钮点击事件
  202. uni.onTabBarMidButtonTap(e =>{
  203. uni.switchTab({
  204. url:'/pages/phone/index',
  205. })
  206. this.$nextTick(() =>{
  207. this.$refs.popupCase.open()
  208. })
  209. })
  210. //点击全部跳转课件列表
  211. uni.$on('clickAll', data => {
  212. this.selectUser = []
  213. this.selectUser.push(data)
  214. uni.switchTab({
  215. url:'/pages/phone/index'
  216. })
  217. })
  218. //点击跳转课件详情
  219. uni.$on('clickItem', data => {
  220. uni.navigateTo({
  221. url: '/pages/phone/detail/index?id='+data.id+'&name='+data.caseName
  222. })
  223. })
  224. },
  225. onShow() {
  226. elementIcon[0].className = 'uni-tabbar__icon icons-tabbar-custom'
  227. elementIcon[2].className = 'uni-tabbar__icon'
  228. elementMid[0].className = 'uni-tabbar__mid icons-tabbar-custom icons-tabbar-mid'
  229. this.getList()
  230. this.getSelectPerson()
  231. },
  232. onUnload() {
  233. uni.$off('clickAll')
  234. uni.$off('clickItem')
  235. },
  236. methods: {
  237. // 列表解读状态数据
  238. getCaseAnalysisData(status){
  239. let stateObj = {
  240. img:"/static/images/status/clock-circle.png",
  241. text:"审核中",
  242. type:"in"
  243. }
  244. if(status == 1){
  245. stateObj = {
  246. img:"/static/images/status/exclamation-circle.png",
  247. text:"无法解读",
  248. type:"fail"
  249. }
  250. }else if(status == 2){
  251. stateObj = {
  252. img:"/static/images/status/pass.png",
  253. text:"审核通过",
  254. type:"pass"
  255. }
  256. }else if(status == 3){
  257. stateObj = {
  258. img:"/static/images/status/pass.png",
  259. text:"解读完成",
  260. type:"pass"
  261. }
  262. }
  263. return stateObj
  264. },
  265. // 获取用户课件信息
  266. getList(){
  267. let that = this
  268. let userId = that.$store.state.user.userId
  269. let param = {
  270. doctorUserId:'',
  271. volunteerUserId:''
  272. }
  273. if(that.isDoctor){
  274. param.doctorUserId = userId
  275. param.volunteerUserId = this.selectUser && this.selectUser.length > 0 ? this.selectUser[0].volunteerUserId : ''
  276. }else{
  277. param.volunteerUserId = userId
  278. param.doctorUserId = this.selectUser && this.selectUser.length > 0 ? this.selectUser[0].doctorUserId : ''
  279. }
  280. getUserCaseList(param).then(res => {
  281. let data = res.data
  282. data.caseList.forEach(item => {
  283. item.caseFileList.forEach(item2 => {
  284. item2.type = getTypeName(item2.name)
  285. })
  286. })
  287. this.info = data
  288. })
  289. },
  290. //获取已绑定的志愿者、医生列表数据
  291. getSelectPerson(){
  292. if(this.isDoctor){
  293. volunteerSelectList().then(res => {
  294. if(res.code == 200){
  295. this.selectPersonList = res.data
  296. }
  297. })
  298. }else{
  299. doctorSelectList().then(res => {
  300. if(res.code == 200){
  301. this.selectPersonList = res.data
  302. }
  303. })
  304. }
  305. },
  306. // 前往详情
  307. toDetail(idx){
  308. let info = this.info.caseList[idx]
  309. uni.navigateTo({
  310. url: '/pages/phone/detail/index?id='+info.id+'&name='+info.caseName
  311. })
  312. },
  313. // 删除选择的人员
  314. delPerson(idx){
  315. this.selectUser.splice(idx,1)
  316. this.getList()
  317. },
  318. getDictValue(data,value){
  319. let str = data.filter(item => item.key == value)[0]
  320. return str
  321. },
  322. // 志愿者筛选医生
  323. selectPerson(info){
  324. this.selectUser = []
  325. this.selectUser.push(info)
  326. this.$refs.popupSelectPerson.close()
  327. this.getList()
  328. },
  329. // 关闭新增弹窗
  330. closePopupCase(){
  331. this.$refs.popupCase.close()
  332. this.getList()
  333. },
  334. // 打开筛选志愿者、医生的弹窗
  335. openSelectPopup(){
  336. this.$refs.popupSelectPerson.open()
  337. },
  338. }
  339. }
  340. </script>
  341. <style lang="scss" scoped>
  342. page {
  343. background-color: #F7F8FA;
  344. }
  345. .mine-container {
  346. width: 100%;
  347. height: 100%;
  348. .content {
  349. width: 100%;
  350. height: calc(100% - 88rpx);
  351. box-sizing: border-box;
  352. padding: 40rpx 32rpx 0px;
  353. overflow: hidden;
  354. .caseList{
  355. width: 100%;
  356. height: 100%;
  357. overflow: auto;
  358. &_top{
  359. display: flex;
  360. align-items: center;
  361. justify-content: space-between;
  362. &_title{
  363. color: #1D2129;
  364. font-size: 40rpx;
  365. font-weight: 500;
  366. line-height: 56rpx;
  367. }
  368. &_search{
  369. position: relative;
  370. &_con{
  371. background-color: #fff;
  372. height: 50rpx;
  373. // width: 30.21rpx;
  374. line-height: 50rpx;
  375. padding: 0 16rpx;
  376. display: flex;
  377. align-items: center;
  378. border-radius: 4rpx;
  379. overflow: hidden;
  380. cursor: pointer;
  381. &_text{
  382. color: #1D2129;
  383. font-size: 26rpx;
  384. font-weight: 400;
  385. line-height: 50rpx;
  386. margin-right: 4rpx;
  387. }
  388. uni-image{
  389. width: 28rpx;
  390. height: 28rpx;
  391. }
  392. }
  393. .downCon{
  394. }
  395. }
  396. &_selected{
  397. &_item{
  398. display: flex;
  399. align-content: center;
  400. border-radius: 4rpx;
  401. padding: 0 16rpx;
  402. height: 50rpx;
  403. line-height: 50rpx;
  404. cursor: pointer;
  405. &_name{
  406. height: 50rpx;
  407. line-height: 50rpx;
  408. color: #FFF;
  409. font-size: 26rpx;
  410. font-weight: 400;
  411. margin-right: 4rpx;
  412. }
  413. uni-image{
  414. width: 28rpx;
  415. height: 28rpx;
  416. cursor: pointer;
  417. }
  418. }
  419. }
  420. }
  421. &_middle{
  422. display: flex;
  423. align-items: center;
  424. justify-content: space-between;
  425. margin-top: 32rpx;
  426. margin-bottom: 32rpx;
  427. &_item{
  428. display: flex;
  429. align-items: center;
  430. flex-direction: column;
  431. justify-content: center;
  432. width: 33.33%;
  433. &_title{
  434. color: #86909C;
  435. font-size: 24rpx;
  436. font-weight: 400;
  437. line-height: 40rpx;
  438. }
  439. &_text{
  440. color: #1D2129;
  441. font-size: 32rpx;
  442. font-weight: 500;
  443. line-height: 48rpx;
  444. }
  445. }
  446. }
  447. &_bottom{
  448. display: flex;
  449. // align-items: center;
  450. flex-wrap: wrap;
  451. overflow: auto;
  452. // height: calc(100% - 39.84rpx);
  453. width: 100%;
  454. .bottom_item{
  455. padding: 24rpx;
  456. width: 100%;
  457. margin-bottom: 24rpx;
  458. background-color: #fff;
  459. border-radius: 16rpx;
  460. overflow: hidden;
  461. // height: 272rpx;
  462. cursor: pointer;
  463. &_top{
  464. &_con{
  465. width: 100%;
  466. display: flex;
  467. align-items: center;
  468. justify-content: space-between;
  469. &_name{
  470. color: #1D2129;
  471. font-size: 32rpx;
  472. font-weight: 500;
  473. line-height: 48rpx;
  474. width: calc(100% - 160rpx);
  475. overflow: hidden;
  476. text-overflow: ellipsis;
  477. white-space: nowrap;
  478. }
  479. &_status{
  480. display: flex;
  481. align-items: center;
  482. justify-content: flex-end;
  483. uni-image{
  484. width: 32rpx;
  485. height: 32rpx;
  486. }
  487. &_text{
  488. font-size: 24rpx;
  489. font-weight: 400;
  490. line-height: 40rpx;
  491. color: #86909C;
  492. margin-left: 4rpx;
  493. }
  494. }
  495. }
  496. &_con2{
  497. width: 100%;
  498. display: flex;
  499. flex-direction: column;
  500. &_item{
  501. width: 100%;
  502. color: #86909C;
  503. font-size: 28rpx;
  504. font-weight: 400;
  505. line-height: 44rpx;
  506. display: flex;
  507. align-items: center;
  508. margin-top: 4rpx;
  509. &_text{
  510. margin-left: 8rpx;
  511. }
  512. }
  513. &_tags{
  514. width: 100%;
  515. display: flex;
  516. align-items: center;
  517. height: 44rpx;
  518. overflow: hidden;
  519. flex-wrap: wrap;
  520. &_item{
  521. width: auto;
  522. margin-right: 8rpx;
  523. padding: 0 16rpx;
  524. border-radius: 40rpx;
  525. background: rgba(22, 93, 255, 0.08);
  526. color: rgba(22, 93, 255, 0.80);
  527. text-align: center;
  528. font-size: 26rpx;
  529. font-weight: 400;
  530. line-height: 44rpx; /* 169.231% */
  531. }
  532. }
  533. }
  534. }
  535. &_file{
  536. margin-top: 24rpx;
  537. padding: 20rpx;
  538. border-radius: 12rpx;
  539. overflow: hidden;
  540. background: #F7F8FA;
  541. &_item{
  542. width: 100%;
  543. cursor: pointer;
  544. display: flex;
  545. align-items: center;
  546. justify-content: space-between;
  547. &_left{
  548. display: flex;
  549. align-items: center;
  550. width: calc(100% - 30rpx);
  551. &_name{
  552. color: #4E5969;
  553. font-size: 26rpx;
  554. font-weight: 400;
  555. line-height: 44rpx;
  556. white-space: nowrap;
  557. width: 100%;
  558. overflow: hidden;
  559. text-overflow: ellipsis;
  560. margin-left: 8rpx;
  561. }
  562. uni-image{
  563. width: 48rpx;
  564. height: 48rpx;
  565. }
  566. }
  567. &_right{
  568. width: 28rpx;
  569. height: 28rpx;
  570. display: flex;
  571. align-items: center;
  572. justify-content: center;
  573. cursor: pointer;
  574. uni-image{
  575. width: 28rpx;
  576. height: 28rpx;
  577. }
  578. }
  579. }
  580. &_item:nth-child(2){
  581. margin-top: 16rpx;
  582. }
  583. }
  584. }
  585. }
  586. }
  587. }
  588. .mask{
  589. position: fixed;
  590. width: 100%;
  591. left: 0;
  592. top: 0;
  593. height: 100%;
  594. z-index: 999;
  595. // background-color: rgba(0, 0, 0, 0.4);
  596. background: rgba(2, 7, 20, 0.60);
  597. transition: opacity 300ms ease 0ms, -webkit-transform 300ms ease 0ms, transform 300ms ease 0ms;
  598. transform-origin: 50% 50%;
  599. }
  600. .popBox{
  601. position: fixed;
  602. bottom: 0;
  603. left: 0;
  604. height: 860rpx;
  605. width: 100%;
  606. z-index: 1000;
  607. }
  608. .blue{
  609. color: #165DFF!important;
  610. }
  611. .in{
  612. color: #FF7D00!important;
  613. }
  614. .fail{
  615. color: #F53F3F!important;
  616. }
  617. .pass{
  618. color: #00B42A!important;
  619. }
  620. /deep/ .uni-popup{
  621. z-index: 1000;
  622. }
  623. }
  624. </style>