shuangchuang_detail.vue 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436
  1. <template>
  2. <view class="scdetail">
  3. <!-- <view class="tab">
  4. <view v-for="(item,index) in tab_list" :key='index' :class="current_tab==item.id ? 'active-item' : 'item'"
  5. @click="changTab(item.id)">
  6. <view class="week">
  7. {{item.name}}
  8. </view>
  9. <text class="line" v-if="current_tab==item.id">
  10. </text>
  11. </view>
  12. </view> -->
  13. <!-- <view class="info" v-if="current_tab==0">
  14. <view class="title">
  15. 项目名称项目名称项目名称项目名称项目名称项目名称项目名称项目名称项目名称项目名称项目名称项目名称项目名称项目名称项目名称项目名称
  16. </view>
  17. <view class="">
  18. </view>
  19. </view>
  20. <view class="yaoqiu" v-if="current_tab==1">
  21. </view>
  22. <view class="stu" v-if="current_tab==2">
  23. </view> -->
  24. <view class="detail_info">
  25. <view class="title">
  26. {{detail.title}}
  27. </view>
  28. <view class="info_wrap">
  29. <view class="tea item">
  30. <text>导师:</text><text class="content">{{detail.truename}}</text>
  31. </view>
  32. <view class="subject item">
  33. <text>学科:</text><text class="content">{{detail.subject}}</text>
  34. </view>
  35. <view class="" v-if="detail.is_student">
  36. <view class="start_time item">
  37. <text>报名开始时间:</text><text class="content">{{getTime(detail.apply_start_time)}}</text>
  38. </view>
  39. <view class="end_time item">
  40. <text>报名结束时间:</text><text class="content">{{getTime(detail.apply_end_time)}}</text>
  41. </view>
  42. <view class="num item">
  43. <text>报名人数/招收人数:</text><text
  44. class="content">{{detail.sign_up_count}}/{{detail.student_nums}}</text>
  45. </view>
  46. </view>
  47. </view>
  48. </view>
  49. <view class="jieshao">
  50. <view class="info_title">
  51. <view class="line"></view>
  52. <text>项目介绍</text>
  53. </view>
  54. <view class="content">
  55. <view class="empty" v-if="!detail.body">
  56. <u-empty text="暂无内容哦!" mode="list"></u-empty>
  57. </view>
  58. <u-parse :html="detail.body"></u-parse>
  59. </view>
  60. </view>
  61. <view class="jieshao" v-if="detail.is_student">
  62. <view class="info_title">
  63. <view class="line">
  64. </view>
  65. <text>招收要求</text>
  66. </view>
  67. <view class="content">
  68. <view class="empty" v-if="!detail.conditions">
  69. <u-empty text="暂无内容哦!" mode="list" ></u-empty>
  70. </view>
  71. <u-parse :html="detail.conditions"></u-parse>
  72. </view>
  73. </view>
  74. <view class="jieshao zhaosheng" v-if="detail.is_student">
  75. <view class="info_title">
  76. <view class="line">
  77. </view>
  78. <text>报名学生</text>
  79. </view>
  80. <view class="stu_wrap">
  81. <view class="empty" v-if="studentList.length==0">
  82. <u-empty text="暂无学生报名哦!" mode="list" ></u-empty>
  83. </view>
  84. <view class="list_content" v-for="(item,index) in studentList" :key='index'
  85. @click="student_detail(item.student.id)">
  86. <view class="top">
  87. <view class="headimg">
  88. <image :src="item.student.headimg" mode="aspectFill"></image>
  89. <view class="name">
  90. {{item.student.truename}}
  91. </view>
  92. </view>
  93. </view>
  94. </view>
  95. </view>
  96. </view>
  97. </view>
  98. </template>
  99. <script>
  100. export default {
  101. data() {
  102. return {
  103. detail: '',
  104. studentList: [], //报名学生
  105. information_id: '', //项目id
  106. is_part: false, //是否报名 false 未报名,true 已报名
  107. tab_list: [{
  108. name: '项目信息',
  109. id: 0
  110. }, {
  111. name: '招生要求',
  112. id: 1
  113. }, {
  114. name: '报名学生',
  115. id: 2
  116. }],
  117. current_tab: 0,
  118. list: []
  119. }
  120. },
  121. async onLoad(options) {
  122. console.log(this.$store.state.vuex_user, 'this.$store.state.vuex_user')
  123. this.innovation_id = options.id
  124. console.log(options, 'option')
  125. await this.getDetail(options.id)
  126. this.getList(this.innovation_id )
  127. },
  128. methods: {
  129. changTab(id) {
  130. console.log(id, 'idididdiS')
  131. this.current_tab = id
  132. this.page = 1
  133. this.last = false
  134. // this.getList()
  135. },
  136. async getDetail(id) {
  137. this.$u.get('/innovation/info/' + id).then(res => {
  138. this.detail = res.data
  139. console.log(this.detail, 'detail')
  140. // this.studentList = res.data.activity
  141. })
  142. },
  143. //截取时间
  144. getTime(time) {
  145. if (!time) return '--'
  146. else return time.split(' ')[0]
  147. },
  148. async getList(id) {
  149. // 报名列表信息接口
  150. await this.$u
  151. .get('/innovation//sign-up', {
  152. innovation_id: id
  153. })
  154. .then(res => {
  155. uni.hideLoading();
  156. console.log(res.data, '报名列表数据');
  157. this.studentList = res.data.list
  158. });
  159. },
  160. student_detail(id){
  161. uni.navigateTo({
  162. url:'../student/details?id=' +id
  163. })
  164. }
  165. }
  166. }
  167. </script>
  168. <style lang="scss">
  169. page {
  170. position: relative;
  171. background-color: #F7F7F7;
  172. }
  173. .scdetail {
  174. padding-bottom: 20px;
  175. .tab {
  176. display: flex;
  177. align-items: center;
  178. width: 80%;
  179. margin: 0 auto;
  180. .item,
  181. .active-item {
  182. margin-top: 17px;
  183. view {
  184. display: block;
  185. }
  186. font-size: 16px;
  187. font-family: PingFang SC;
  188. font-weight: bold;
  189. line-height: 20px;
  190. color: rgba(113, 113, 113, .43);
  191. opacity: 0.43;
  192. opacity: 1;
  193. flex: 1;
  194. text-align: center;
  195. .week {
  196. padding-bottom: 12px;
  197. }
  198. .line {
  199. width: 30px;
  200. height: 4px;
  201. background: #3B7653;
  202. opacity: 1;
  203. border-radius: 2px;
  204. display: block;
  205. margin: 0 auto;
  206. }
  207. }
  208. .active-item {
  209. font-size: 18px;
  210. font-family: PingFang SC;
  211. font-weight: bold;
  212. line-height: 20px;
  213. color: #3B7653;
  214. .week {
  215. padding-bottom: 8px;
  216. }
  217. }
  218. }
  219. .info {
  220. padding: 15px;
  221. .title {
  222. font-size: 16px;
  223. color: #333;
  224. }
  225. }
  226. .yaoqiu {
  227. padding: 15px;
  228. }
  229. .stu {
  230. padding: 15px;
  231. }
  232. .detail_info {
  233. padding: 15px;
  234. background-color: #fff;
  235. .title {
  236. font-size: 16px;
  237. font-weight: 550;
  238. color: #333;
  239. }
  240. .info_wrap {
  241. margin-top: 10px;
  242. .item {
  243. color: #666;
  244. line-height: 22px;
  245. font-size: 14px;
  246. }
  247. .num {
  248. .content {
  249. // font-size: 16px;
  250. font-weight: 550;
  251. color: #3B7653;
  252. }
  253. }
  254. }
  255. }
  256. .jieshao {
  257. margin-top: 10px;
  258. background-color: #fff;
  259. padding: 15px;
  260. .info_title {
  261. padding-bottom: 10px;
  262. font-size: 16px;
  263. display: flex;
  264. align-items: center;
  265. .line {
  266. display: inline-block;
  267. margin-right: 5px;
  268. height: 11px;
  269. width: 3px;
  270. background-color: #3B7653;
  271. vertical-align: middle;
  272. // margin-top: 1px;
  273. }
  274. text{
  275. display: inline-block;
  276. vertical-align: middle;
  277. }
  278. }
  279. .content {
  280. text-align: justify;
  281. word-break: break-all;
  282. word-wrap: break-word;
  283. }
  284. }
  285. .zhaosheng {
  286. .stu_wrap {
  287. display: flex;
  288. flex-wrap: wrap;
  289. margin: 0 -5px;
  290. .empty{
  291. width: 100%;
  292. }
  293. .list_content {
  294. flex-shrink: 0;
  295. background-color: #FFFFFF;
  296. border-radius: 5px;
  297. padding: 5px;
  298. position: relative;
  299. .top {
  300. .headimg {
  301. width: 60px;
  302. text-align: center;
  303. image {
  304. height: 44px;
  305. width: 44px;
  306. border-radius: 50%;
  307. }
  308. .name{
  309. display: block;
  310. color: #0C0C0C;
  311. font-style: normal;
  312. font-weight: 500;
  313. font-size: 13px;
  314. }
  315. }
  316. }
  317. .bottom {
  318. border-top: 0.5px solid #DDDDDD;
  319. display: flex;
  320. height: 63px;
  321. line-height: 20px;
  322. margin: 6px 15px;
  323. padding: 10px 0;
  324. .left {
  325. width: 40px;
  326. color: #666666;
  327. font-size: 13px;
  328. opacity: 0.8
  329. }
  330. .right {
  331. width: 260px;
  332. overflow: hidden; //超出部分隐藏
  333. text-overflow: ellipsis; //超出部分使用省略号
  334. display: -webkit-box; //布局
  335. -webkit-line-clamp: 2;
  336. line-clamp: 2; //设置两行显示
  337. -webkit-box-orient: vertical;
  338. word-break: break-all;
  339. }
  340. }
  341. }
  342. }
  343. }
  344. .active_btn {
  345. position: fixed;
  346. bottom: 0;
  347. width: 100%;
  348. height: 60px;
  349. margin-top: 60px;
  350. left: 0;
  351. background-color: #FFFFFF;
  352. line-height: 50px;
  353. border-top: solid 1px #DDDDDD;
  354. text-align: center;
  355. .bt {
  356. height: 40px;
  357. margin-top: 10px;
  358. background: #138E57;
  359. border-radius: 25px;
  360. font-size: 16px;
  361. text-align: center;
  362. width: 80%;
  363. line-height: 40px;
  364. display: inline-block;
  365. color: #FFFFFF;
  366. }
  367. .bt1 {
  368. height: 40px;
  369. margin-top: 10px;
  370. background: #F5F5F5;
  371. border-radius: 25px;
  372. font-size: 16px;
  373. text-align: center;
  374. width: 80%;
  375. line-height: 40px;
  376. display: inline-block;
  377. color: #666666;
  378. }
  379. }
  380. }
  381. </style>