stu_require_detail.vue 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392
  1. <template>
  2. <view class="contain">
  3. <uni-row>
  4. <view style="height: 20rpx;"></view>
  5. </uni-row>
  6. <uni-row>
  7. <uni-col :push="1">
  8. <view class="contain-item"><text class="contain-text">需求号:</text>{{item.requireId}}</view>
  9. </uni-col>
  10. </uni-row>
  11. <uni-row>
  12. <uni-col :push="1">
  13. <view class="contain-item"><text class="contain-text">学员ID:</text>{{item.uid}}</view>
  14. </uni-col>
  15. </uni-row>
  16. <uni-row>
  17. <uni-col :span="12" :push="1">
  18. <view class="contain-item"><text class="contain-text">学员:</text>{{item.name}}</view>
  19. </uni-col>
  20. <uni-col :span="12">
  21. <view><text class="contain-text">学员性别:</text>{{item.sex}}</view>
  22. </uni-col>
  23. </uni-row>
  24. <uni-row>
  25. <uni-col :push="1">
  26. <view class="contain-item"><text class="contain-text">需求科目:</text>{{item.subjectBig}}/{{item.subjectSmall}}</view>
  27. </uni-col>
  28. </uni-row>
  29. <uni-row>
  30. <view class="contain-item">
  31. <map :longitude="location[1]" :latitude="location[0]" :markers="marker" class="map"></map>
  32. </view>
  33. </uni-row>
  34. <uni-row>
  35. <uni-col :push="1">
  36. <view class="contain-item"><text class="contain-text">学员地址:</text>{{item.locationStr}}</view>
  37. </uni-col>
  38. </uni-row>
  39. <uni-row>
  40. <uni-col :push="1">
  41. <text class="contain-text">课程时间:</text>
  42. </uni-col>
  43. </uni-row>
  44. <view class="tr-container">
  45. <view class="tr_1">
  46. <text class="th_0" decode="true">&ensp;&ensp;&ensp;&ensp;</text>
  47. <text class="th_1">周一</text>
  48. <text class="th_1">周二</text>
  49. <text class="th_1">周三</text>
  50. <text class="th_1">周四</text>
  51. <text class="th_1">周五</text>
  52. <text class="th_1">周六</text>
  53. <text class="th_1">周日</text>
  54. </view>
  55. <view class="tr_2">
  56. <checkbox-group>
  57. <view class="th2_0">上午</view>
  58. <label v-for="item in timeAM" :key="item.value">
  59. <checkbox class="th2_1" :value="item.value" :checked="item.checked" disabled></checkbox>
  60. </label>
  61. </checkbox-group>
  62. </view>
  63. <view class="tr_2">
  64. <checkbox-group>
  65. <view class="th2_0">下午</view>
  66. <label v-for="item in timePM" :key="item.value">
  67. <checkbox class="th2_1" :value="item.value" :checked="item.checked" disabled></checkbox>
  68. </label>
  69. </checkbox-group>
  70. </view>
  71. <view class="tr_2">
  72. <checkbox-group>
  73. <view class="th2_0">晚上</view>
  74. <label v-for="item in timeEvening" :key="item.value">
  75. <checkbox class="th2_1" :value="item.value" :checked="item.checked" disabled></checkbox>
  76. </label>
  77. </checkbox-group>
  78. </view>
  79. </view>
  80. <uni-row>
  81. <uni-col :span="12" :push="1">
  82. <view class="contain-item"><text class="contain-text">教员类型:</text>{{item.teacherType}}</view>
  83. </uni-col>
  84. <uni-col :span="12">
  85. <view><text class="contain-text">学员学历:</text>{{item.teacherEdu}}</view>
  86. </uni-col>
  87. </uni-row>
  88. <uni-row>
  89. <uni-col :span="12" :push="1">
  90. <view class="contain-item"><text class="contain-text">教员性别:</text>{{item.teacherGender}}</view>
  91. </uni-col>
  92. <uni-col :span="12">
  93. <view><text class="contain-text">上课方式:</text>{{item.mode}}</view>
  94. </uni-col>
  95. </uni-row>
  96. <uni-row>
  97. <uni-col :span="12" :push="1">
  98. <view class="contain-item"><text class="contain-text">教员头像:</text>{{item.teacherProfilePhoto}}</view>
  99. </uni-col>
  100. <uni-col :span="12">
  101. <view><text class="contain-text">需求金额:</text>{{item.salary}}元</view>
  102. </uni-col>
  103. </uni-row>
  104. <uni-row>
  105. <uni-col :push="1">
  106. <view class="contain-item"><text class="contain-text">期望目标:</text>{{item.goal}}</view>
  107. </uni-col>
  108. </uni-row>
  109. <uni-row>
  110. <uni-col :push="1">
  111. <view class="contain-item"><text class="contain-text">额外要求:</text>{{item.teacherDemanded}}</view>
  112. </uni-col>
  113. </uni-row>
  114. <uni-row>
  115. <uni-col :push="1">
  116. <view class="contain-item"><text class="contain-text">审核不通过原因:</text>{{item.verifyRefuseReason || '暂无'}}</view>
  117. </uni-col>
  118. </uni-row>
  119. <uni-row>
  120. <uni-col :push="1">
  121. <view class="contain-item"><text class="contain-text">本需求发布日期:</text>{{item.datetime}}</view>
  122. </uni-col>
  123. </uni-row>
  124. <uni-row>
  125. <uni-col :push="1">
  126. <view class="contain-item"><text class="contain-text">手机号:</text>{{item.phone}}</view>
  127. </uni-col>
  128. </uni-row>
  129. <uni-row>
  130. <uni-col :push="1">
  131. <view class="contain-item"><text class="contain-text">微信号:</text>{{item.wxid}}</view>
  132. </uni-col>
  133. </uni-row>
  134. <button class="publish-button" @click="publishButton">以此为模板新发布</button>
  135. </view>
  136. </template>
  137. <script>
  138. import { mapState } from 'vuex';
  139. export default {
  140. data() {
  141. return {
  142. item: {},
  143. courseWeekday: [],
  144. location: [],
  145. marker: [{
  146. id: 1,
  147. joinCluster:true,
  148. latitude: 0,
  149. longitude: 0,
  150. width: 40,
  151. height: 40,
  152. iconPath: '/static/location.png',
  153. }],
  154. // 上课时间
  155. // 上午
  156. timeAM: [{
  157. value: 'A1',
  158. name: '1',
  159. checked: false
  160. },
  161. {
  162. name: '2',
  163. value: 'A2',
  164. checked: false
  165. },
  166. {
  167. name: '3',
  168. value: 'A3',
  169. checked: false
  170. },
  171. {
  172. name: '4',
  173. value: 'A4',
  174. checked: false
  175. },
  176. {
  177. name: '5',
  178. value: 'A5',
  179. checked: false
  180. },
  181. {
  182. name: '6',
  183. value: 'A6',
  184. checked: false
  185. },
  186. {
  187. name: '7',
  188. value: 'A7',
  189. checked: false
  190. }
  191. ],
  192. // 下午
  193. timePM: [{
  194. value: 'P1',
  195. name: '1',
  196. checked: false
  197. },
  198. {
  199. name: '2',
  200. value: 'P2',
  201. checked: false
  202. },
  203. {
  204. name: '3',
  205. value: 'P3',
  206. checked: false
  207. },
  208. {
  209. name: '4',
  210. value: 'P4',
  211. checked: false
  212. },
  213. {
  214. name: '5',
  215. value: 'P5',
  216. checked: false
  217. },
  218. {
  219. name: '6',
  220. value: 'P6',
  221. checked: false
  222. },
  223. {
  224. name: '7',
  225. value: 'P7',
  226. checked: false
  227. }
  228. ],
  229. // 晚上
  230. timeEvening: [{
  231. name: '1',
  232. value: 'E1',
  233. checked: false
  234. },
  235. {
  236. name: '2',
  237. value: 'E2',
  238. checked: false
  239. },
  240. {
  241. name: '3',
  242. value: 'E3',
  243. checked: false
  244. },
  245. {
  246. name: '4',
  247. value: 'E4',
  248. checked: false
  249. },
  250. {
  251. name: '5',
  252. value: 'E5',
  253. checked: false
  254. },
  255. {
  256. name: '6',
  257. value: 'E6',
  258. checked: false
  259. },
  260. {
  261. name: '7',
  262. value: 'E7',
  263. checked: false
  264. }
  265. ],
  266. };
  267. },
  268. computed: {
  269. ...mapState('m_user', ['requireDetail'])
  270. },
  271. created() {
  272. this.item = JSON.parse(this.requireDetail)
  273. this.location = this.item.locationAl.split(",")
  274. this.marker[0].latitude = Number(this.location[0])
  275. this.marker[0].longitude = Number(this.location[1])
  276. this.courseWeekday = this.item.courseWeekday.split(",")
  277. // console.log("选中的日期:" + this.courseWeekday)
  278. for (let i = 0; i < this.courseWeekday.length; i++) {
  279. for (let x = 0; x < this.timeAM.length; x++) {
  280. if (this.courseWeekday[i] == this.timeAM[x].value) {
  281. this.timeAM[x].checked = true
  282. }
  283. }
  284. for (let y = 0; y < this.timePM.length; y++) {
  285. if (this.courseWeekday[i] == this.timePM[y].value) {
  286. // console.log(this.timePM[y].value)
  287. this.timePM[y].checked = true
  288. }
  289. }
  290. for (let z = 0; z < this.timeEvening.length; z++) {
  291. if (this.courseWeekday[i] == this.timeEvening[z].value) {
  292. this.timeEvening[z].checked = true
  293. }
  294. }
  295. }
  296. },
  297. methods: {
  298. publishButton() {
  299. uni.navigateTo({
  300. url:'/subpkg/add_stu_require/add_stu_require?item='+encodeURIComponent(this.requireDetail)
  301. })
  302. }
  303. }
  304. }
  305. </script>
  306. <style lang="scss" scoped>
  307. .contain {
  308. background-color: #FFF2CC;
  309. border-radius: 10%;
  310. .contain-item {
  311. margin-bottom: 20rpx;
  312. }
  313. .contain-text {
  314. font-weight: 700;
  315. color: #bbb;
  316. }
  317. .map {
  318. width: 100%;
  319. }
  320. }
  321. .tr-container{
  322. display: flex;
  323. position: relative;
  324. width: 96%;
  325. flex-direction: column;
  326. font-size: 26rpx;
  327. /* border: 1rpx solid gray; */
  328. margin: -10px 20rpx;
  329. margin-bottom: 20px;
  330. }
  331. .tr_1 {
  332. display: flex;
  333. position: relative;
  334. height: 80rpx;
  335. line-height: 80rpx;
  336. }
  337. .tr_2{
  338. display: block;
  339. height: 80rpx;
  340. line-height: 80rpx;
  341. }
  342. .th_0,
  343. .th_1,
  344. .th_2,
  345. .th2_0,
  346. .th2_1,
  347. .th2_2{
  348. width: 12%;
  349. height: 80rpx;
  350. line-height: 80rpx;
  351. border-right: 1rpx solid gray;
  352. border-bottom: 1rpx solid gray;
  353. text-align: center;
  354. }
  355. .th_0,
  356. .th_1,
  357. .th_2{
  358. border-top: 1rpx solid gray;
  359. }
  360. .th_0,
  361. .th2_0{
  362. border-left: 1rpx solid gray;
  363. }
  364. .th2_0{
  365. float: left;
  366. width: 12%;
  367. height: 80rpx;
  368. line-height: 80rpx;
  369. text-align: center;
  370. /* background-color: greenyellow; */
  371. }
  372. .publish-button {
  373. background-color: #E2F0D9;
  374. width: 60%;
  375. border-radius: 50%;
  376. }
  377. </style>