openOrder.vue 27 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096
  1. <template>
  2. <view class="box">
  3. <text class="txt">申请人</text>
  4. <input type="text" v-model="form.applicant_name" placeholder="请输入申请人姓名">
  5. <text class="txt">申请人联系方式</text>
  6. <input type="number" v-model="form.applicant_mobile" placeholder="请输入申请人联系方式">
  7. <text class="txt">所属部门</text>
  8. <view class="input">
  9. <picker @change="bindPickerChange" :value="index" :range="departmentList" :range-key="'name'">
  10. <view class="uni-input">
  11. <text v-if="index==null" style="color:#6d6e71">请选择部门</text>
  12. <text v-else>{{departmentList[index].name}}</text>
  13. <view class="input-icon">
  14. <u-icon name="arrow-down" color="#6d6e71" size="28"></u-icon>
  15. </view>
  16. </view>
  17. </picker>
  18. </view>
  19. <text class="txt">科室</text>
  20. <input type="text" v-model="form.department" placeholder="请输入所属科室">
  21. <text class="txt">使用时间</text>
  22. <!-- <input type="text" placeholder="请选择使用时间"> -->
  23. <view class="buttom" @click="changTime">
  24. 点击选择时间
  25. </view>
  26. <view class="txt" v-if="migrate_data.length>0">
  27. <view class="table-title">
  28. <view class="title-item">
  29. 实验室
  30. </view>
  31. <view class="title-item">
  32. 日期
  33. </view>
  34. <view class="title-item">
  35. 节次
  36. </view>
  37. </view>
  38. <view class="table-title" v-for="(item,index) in migrate_data" :key="index">
  39. <view class="title-item">
  40. {{item.room_name}}
  41. </view>
  42. <view class="title-item">
  43. {{ item.day }}
  44. 第{{ item.week }}周 星期{{ $transformWeek(item.week_index) }}
  45. </view>
  46. <view class="title-item">
  47. {{ getTime(item.time_id) }}
  48. </view>
  49. </view>
  50. </view>
  51. <!-- <text class="txt">使用地点</text>
  52. <input type="text" placeholder="请选择使用地点"> -->
  53. <text class="txt" v-if="!is_teacher || is_admin">申请表类型</text>
  54. <!-- <input type="text" v-model="form.template" placeholder="请选择申请表">
  55. -->
  56. <view class="" v-if="!is_teacher || is_admin">
  57. <u-radio-group v-model="form.template" wrap>
  58. <u-radio :name="1">
  59. 正常上班时间使用
  60. </u-radio>
  61. <u-radio :name="2">
  62. 非正常上班时间使用
  63. </u-radio>
  64. <u-radio :name="3" v-if="is_admin">
  65. 信息技术学院教师
  66. </u-radio>
  67. </u-radio-group>
  68. </view>
  69. <text class="txt">使用人数</text>
  70. <input type="text" v-model="form.use_people_nums" placeholder="请选择使用人数">
  71. <text class="txt">申请原因</text>
  72. <textarea type="text" v-model="form.use_reason" placeholder="请填写申请原因"></textarea>
  73. <text class="txt">使用需求</text>
  74. <textarea type="text" v-model="form.use_need" placeholder="请填写使用需求"></textarea>
  75. <view class="btm">
  76. <view style="background: #F5F5F5;color: #333333;" @click="cancel">
  77. <text>取消</text>
  78. </view>
  79. <view style="background: #3665FF;color: white;" @click="onSubmit">
  80. <text>确定</text>
  81. </view>
  82. </view>
  83. <!-- 保存成功点击下载 -->
  84. <u-popup v-model="successShow" mode="center" border-radius="24" width="85%">
  85. <view class="prop-content">
  86. <image src="../../static/image/index/icon_6.png" mode="" class="prop-image"></image>
  87. <view class="prop-title">
  88. 申请成功,等待上传开放预约申请表...
  89. </view>
  90. <view class="content-item">
  91. <view class="prop-text">
  92. 1、请教师下载实验室开放预约申请表,并签字盖章。
  93. </view>
  94. </view>
  95. <view class="content-item">
  96. <view class="prop-text">
  97. 2、教师需将签字盖章后的申请表上传为附件。
  98. </view>
  99. </view>
  100. <view class="content-item">
  101. <view class="prop-text">
  102. 3、点击立即下载即可下载【实验室开放使用申请表】
  103. </view>
  104. </view>
  105. <view class="pop-btn">
  106. <view @click="myRecord" class="prop-cancel">
  107. 我的申请
  108. </view>
  109. <view @click="downLoad" class="prop-success">
  110. 立即下载
  111. </view>
  112. </view>
  113. </view>
  114. </u-popup>
  115. <!-- 选择时间弹框 -->
  116. <view class="change-time-prop" v-if="simpleShow" @touchmove.stop.prevent="disabledScroll">
  117. <view class="simple-week">
  118. <view class="sit-num">
  119. 座位:{{room_num}}
  120. </view>
  121. <view :class="simple_week==1 ?'disable-buttom':'change-buttom'" @click="simpleLastWeek">
  122. 上一周
  123. </view>
  124. <view class="week-text">
  125. 第{{simple_week}}周
  126. </view>
  127. <view :class="simple_week==maxWeek ?'disable-buttom':'change-buttom'" @click="simpleNextWeek">
  128. 下一周
  129. </view>
  130. </view>
  131. <view class="table_1">
  132. <u-tabs :list="roomList" :current="simple_currentRoom" @change="simpleChangeRoom"></u-tabs>
  133. <view class="table-border">
  134. <view class="jie">
  135. <view class="jie-item" style=" height: 55px;line-height: 20px;">
  136. </view>
  137. <view class="jie-item" v-for="(item,index) in simple_jieList">
  138. {{item.name}}
  139. </view>
  140. </view>
  141. <view class="day">
  142. <view v-for="(item, index) in simple_weekList" :key="index" class="day-item"
  143. :class="[checkOld(item.day) ? 'day-item-1' : '']">
  144. <view class="time" :class="checkToday(item.day) ? 'today' : ''" style="
  145. height: 55px;
  146. line-height: 20px;
  147. ">
  148. <view style="padding-top: 8px">{{ item.week }}</view>
  149. <view>{{ item.day }}</view>
  150. </view>
  151. <view v-for="(course, index1) in simple_calendar[index].lists" :key="index1"
  152. class="jie-item">
  153. <!-- 时间段已过期 -->
  154. <view v-if="checkOld(item.day)"></view>
  155. <view v-else class="course" @click="selectTime( simple_calendar[index], index1)">
  156. <view v-if="!course.is_lesson" class="course kong" :class="
  157. checkIselect(
  158. simple_calendar[index].week_index,
  159. simple_jieList[index1].id
  160. )
  161. ? 'xuan'
  162. : ''
  163. ">
  164. <view>
  165. {{checkIselect(simple_calendar[index].week_index,simple_jieList[index1].id)?'已选' :'可选'}}
  166. </view>
  167. </view>
  168. <view v-if="
  169. current_course.week == simple_week &&
  170. current_course.room_id == simple_room_id &&
  171. simple_calendar[index].week_index ==
  172. current_course.week_index &&
  173. current_course.time_id == simple_jieList[index1].id
  174. " class="course current-course">
  175. 当前课程
  176. </view>
  177. </view>
  178. </view>
  179. </view>
  180. </view>
  181. </view>
  182. <view class="sure-buttom">
  183. <view class="cancel" @click="cancelSelectTime">
  184. 取消
  185. </view>
  186. <view class="sure" @click="sureSelectTime">
  187. 确定
  188. </view>
  189. </view>
  190. </view>
  191. </view>
  192. </view>
  193. </template>
  194. <script>
  195. var app = getApp()
  196. export default {
  197. data() {
  198. return {
  199. navHeight: app.globalData.navHeight,
  200. simpleShow: false,
  201. successShow: false, //申请成功弹出框
  202. // 时间选择简版课表数据开始
  203. simple_weekList: [],
  204. simple_jieList: [],
  205. simple_calendar: [],
  206. simple_room_id: 18,
  207. simple_week: 0,
  208. simple_currentRoom: 0,
  209. roomList: [],
  210. //时间选择简版数据结束
  211. maxWeek: '',
  212. today: '', //今日日期
  213. selected: [], //已选择
  214. migrate_data: [],
  215. form: {
  216. template: 1,
  217. applicant_mobile: '',
  218. applicant_name: '',
  219. department: '', //科室
  220. use_data: [],
  221. use_need: '',
  222. use_people_nums: '',
  223. use_reason: '',
  224. branch_id: '' //部门
  225. },
  226. id: '',
  227. index: null,
  228. departmentList: [],
  229. is_teacher: false, //是否是本系教师
  230. is_admin: false, //是否是实验中心管理员
  231. room_num: 0
  232. }
  233. },
  234. onLoad() {
  235. let roles = this.vuex_user.roles
  236. let roles_list = []
  237. roles.map(item => {
  238. roles_list.push(item.name)
  239. })
  240. //判断当前用户是不是信息技术学院教师或者是不是管理员
  241. let index = roles_list.indexOf('teacher')
  242. let index1 = roles_list.indexOf('admin')
  243. if (index !== -1) {
  244. this.is_teacher = true
  245. }
  246. if (index1 !== -1) {
  247. this.is_admin = true
  248. }
  249. this.maxWeek = Number(this.vuex_term_weeks)
  250. this.getRoomList()
  251. this.getDepartment()
  252. },
  253. methods: {
  254. bindPickerChange(e) {
  255. let index = Number(e.detail.value)
  256. this.index = index
  257. this.form.branch_id = this.departmentList[index].id
  258. console.log(e, '00000000')
  259. },
  260. //获取部门列表
  261. getDepartment() {
  262. this.$u.get('/common/department-tree', {
  263. status: 1
  264. }).then(res => {
  265. console.log(res, 'oooo')
  266. this.departmentList = res.data
  267. })
  268. },
  269. disabledScroll() {
  270. return
  271. },
  272. //匹配节次
  273. getTime(time) {
  274. var time1 = "";
  275. this.simple_jieList.map((item) => {
  276. if (item.id == time) {
  277. time1 = item.name;
  278. }
  279. });
  280. return time1;
  281. },
  282. //判断课程是否过期
  283. checkOld(tableDay) {
  284. var nowDay = Number(this.today.replace(/-/g, ""));
  285. //表格日期
  286. var day2 = Number(tableDay.replace(/-/g, ""));
  287. if (nowDay > day2) {
  288. return true;
  289. } else {
  290. return false;
  291. }
  292. },
  293. //判断是否为当天日期
  294. checkToday(tableDay) {
  295. var nowDay = Number(this.today.replace(/-/g, ""));
  296. //表格日期
  297. var day2 = Number(tableDay.replace(/-/g, ""));
  298. if (nowDay == day2) {
  299. return true;
  300. } else {
  301. return false;
  302. }
  303. },
  304. //选择时间上一周
  305. simpleLastWeek() {
  306. if (this.simple_week > 1) {
  307. this.simple_week--;
  308. this.getChangeTime();
  309. }
  310. },
  311. //选择时间下一周
  312. simpleNextWeek() {
  313. if (this.simple_week < this.maxWeek) {
  314. this.simple_week++;
  315. this.getChangeTime();
  316. }
  317. },
  318. //判断是否已选择
  319. checkIselect(week_index, time_id) {
  320. var status = false;
  321. if (this.selected.length == 0) return false;
  322. this.selected.map((item) => {
  323. if (
  324. this.simple_week == item.week &&
  325. this.simple_room_id == item.room_id &&
  326. week_index == item.week_index &&
  327. time_id == item.time_id
  328. ) {
  329. status = true;
  330. }
  331. });
  332. return status;
  333. },
  334. //选择时间点
  335. //选择时间点
  336. selectTime(row, index1) {
  337. let id =
  338. row.week_index.toString() +
  339. this.simple_jieList[index1].id.toString() +
  340. this.simple_room_id.toString();
  341. let index = false;
  342. this.migrate_data.map((item) => {
  343. if (item.id == id) index = true;
  344. });
  345. console.log(this.simple_currentRoom,
  346. 'simple_currentRoomsimple_currentRoomsimple_currentRoomsimple_currentRoom')
  347. if (!index) {
  348. let arr1 = [{
  349. id: id,
  350. week: row.week,
  351. day: row.day,
  352. week_index: row.week_index,
  353. time_id: this.simple_jieList[index1].id,
  354. time_name: this.simple_jieList[index1].name,
  355. room_id: this.simple_room_id,
  356. room_name: this.roomList[this.simple_currentRoom].name,
  357. }, ];
  358. this.migrate_data = this.migrate_data.concat(arr1);
  359. let arr = [{
  360. id: row.week_index.toString() +
  361. this.simple_jieList[index1].id.toString() +
  362. this.simple_room_id.toString(),
  363. time_id: this.simple_jieList[index1].id,
  364. week_index: row.week_index,
  365. week: row.week,
  366. room_id: this.simple_room_id,
  367. }, ];
  368. this.selected = this.selected.concat(arr) //开放预约可多选
  369. console.log(this.selected, 'klklklklklklk')
  370. // this.selected = arr;
  371. // this.$forceUpdate()
  372. // this.$set(this.selected, this.selected.concat(arr))
  373. } else {
  374. this.selected = this.selected.filter((item) => {
  375. return item.id !== id;
  376. });
  377. this.migrate_data = this.migrate_data.filter((item) => {
  378. return item.id !== id;
  379. });
  380. }
  381. },
  382. //选择时间切换实验室
  383. simpleChangeRoom(item) {
  384. this.simple_currentRoom = item;
  385. this.simple_room_id = this.roomList[item].id;
  386. this.room_num = this.roomList[item].open_use_student_nums
  387. this.getChangeTime();
  388. },
  389. //取消选择时间
  390. cancelSelectTime() {
  391. (this.selected = []), (this.migrate_data = []);
  392. this.simpleShow = false;
  393. },
  394. //确定选择
  395. sureSelectTime() {
  396. this.simpleShow = false;
  397. this.form.use_data = this.migrate_data
  398. },
  399. //获取实验室列表
  400. getRoomList() {
  401. this.$u
  402. .get("/school/room-select-options", {
  403. status: 1,
  404. })
  405. .then((res) => {
  406. this.roomList = res.data;
  407. this.simple_room_id = res.data[this.simple_currentRoom].id;
  408. this.room_num = res.data[this.simple_currentRoom].open_use_student_nums
  409. });
  410. },
  411. //获取时间选择列表
  412. getChangeTime() {
  413. this.$u
  414. .post("/school/schedule/calendar-simple", {
  415. room_id: this.simple_room_id,
  416. // term_id: this.vuex_term_id,
  417. week: this.simple_week,
  418. })
  419. .then((res) => {
  420. this.simple_jieList = res.data.times;
  421. var head = res.data.headers;
  422. var xingqi = [
  423. "周一",
  424. "周二",
  425. "周三",
  426. "周四",
  427. "周五",
  428. "周六",
  429. "周日",
  430. ];
  431. for (var i = 0; i < head.length; i++) {
  432. head[i].week = xingqi[i];
  433. head[i].day = head[i].day.slice(5, 11).replace("-", "/");
  434. }
  435. this.simple_weekList = head;
  436. this.simple_calendar = res.data.calendar;
  437. this.simple_week = res.data.week;
  438. });
  439. },
  440. //点击选择时间
  441. changTime() {
  442. this.simpleShow = true;
  443. // this.simple_room_id = this.room_id;
  444. // this.simple_week = this.week;
  445. // this.simple_currentRoom = this.currentRoom;
  446. this.getChangeTime();
  447. },
  448. onSubmit() {
  449. console.log('opopopop')
  450. var myreg = /^[1][3,4,5,7,8,9][0-9]{9}$/
  451. var number = new RegExp('^[0-9]*[1-9][0-9]*$')
  452. if (!myreg.test(this.form.applicant_mobile)) {
  453. uni.showToast({
  454. title: '您输入的手机号格式错误!',
  455. icon: 'none'
  456. })
  457. return
  458. }
  459. if (this.form.use_data.length <= 0) {
  460. uni.showToast({
  461. title: '请选择申请时间、地点!',
  462. icon: 'none'
  463. })
  464. return
  465. }
  466. if (
  467. this.form.use_people_nums !== 0 &&
  468. !number.test(this.form.use_people_nums)
  469. ) {
  470. uni.showToast({
  471. title: '使用人数必须为大于0整数!',
  472. icon: 'none'
  473. })
  474. this.form.use_people_nums = ''
  475. return
  476. }
  477. if (!this.form.use_reason) {
  478. uni.showToast({
  479. title: '申请原因不能为空!',
  480. icon: 'none'
  481. })
  482. return
  483. }
  484. if (this.is_teacher) {
  485. this.form.template = 3
  486. }
  487. this.form.use_reason = this.form.use_reason.replace(/\n/g, '<br />')
  488. if (this.form.use_need)
  489. this.form.use_need = this.form.use_need.replace(/\n/g, '<br />')
  490. let message, data
  491. this.$u.post('/lab/open-appointment', this.form).then(res => {
  492. message = res.message
  493. data = res.data
  494. this.id = res.data.id
  495. this.successShow = true
  496. })
  497. // uni.showToast({
  498. // title: message,
  499. // icon: 'none'
  500. // })
  501. // setTimeout(() => {
  502. // uni.navigateTo({
  503. // url: '/pages/record/reserve'
  504. // })
  505. // }, 1500)
  506. },
  507. cancel() {
  508. // uni.reLaunch({
  509. // url: '/pages/index/index'
  510. // })
  511. uni.navigateBack()
  512. },
  513. //保存编辑
  514. onSave() {
  515. if (this.fileList.length > 0) {
  516. this.form.enclosure = []
  517. this.fileList.map((item) => {
  518. this.form.enclosure.push(item.response.data.id)
  519. })
  520. }
  521. this.$refs['form'].validate(async (valid) => {
  522. var number = new RegExp('^[0-9]*[1-9][0-9]*$')
  523. if (valid) {
  524. if (
  525. this.form.use_people_nums !== 0 &&
  526. !number.test(this.form.use_people_nums)
  527. ) {
  528. this.$message.warning('使用人数必须为大于0整数!')
  529. this.form.use_people_nums = ''
  530. return
  531. }
  532. if (this.form.enclosure.length == 0) {
  533. this.$message.warning('请上传附件!')
  534. return
  535. }
  536. this.form.use_reason = this.form.use_reason.replace(/\n/g, '<br />')
  537. this.form.use_need = this.form.use_need.replace(/\n/g, '<br />')
  538. const {
  539. message
  540. } = await eidtOrderList(this.form)
  541. this.$baseMessage(
  542. message,
  543. 'success',
  544. false,
  545. 'vab-hey-message-success'
  546. )
  547. this.handleClose()
  548. }
  549. })
  550. },
  551. //查看我的申请
  552. myRecord() {
  553. uni.reLaunch({
  554. url: '/pages/record/reserve'
  555. })
  556. this.successShow = false
  557. },
  558. //删除申请表
  559. deleteApply(name) {
  560. this.$u.get('/lab/open-appointment/delete-down-print?filename=' + name).then(res => {
  561. })
  562. },
  563. //立即下载
  564. downLoad() {
  565. this.$u.get('/lab/open-appointment/down-print?id=' + this.id).then(res => {
  566. console.log(this.$u.http.config, '-----')
  567. uni.downloadFile({
  568. url: this.$u.http.config.downloadUrl + res.data.url,
  569. success: (res) => {
  570. if (res.statusCode === 200) {
  571. console.log('下载成功');
  572. }
  573. console.log(res.tempFilePath);
  574. uni.saveFile({
  575. tempFilePath: res.tempFilePath,
  576. success(e) {
  577. uni.openDocument({
  578. filePath: e.savedFilePath,
  579. showMenu: true, //showMenu是否显示右上角菜单
  580. fail: (e) => {
  581. uni.showToast({
  582. title: `打开失败` + e
  583. })
  584. }
  585. })
  586. this.deleteApply(res.filename)
  587. },
  588. fail: (e) => {
  589. uni.showToast({
  590. title: '文件下载失败',
  591. icon: "none",
  592. })
  593. }
  594. });
  595. this.successShow = false
  596. uni.reLaunch({
  597. url: '/pages/record/reserve'
  598. })
  599. },
  600. fail: (e) => {
  601. uni.showToast({
  602. title: '文件下载失败',
  603. icon: "none",
  604. })
  605. }
  606. });
  607. })
  608. //下载文件
  609. // uni.downloadFile({ //只能是GET请求
  610. // url: this.$u.http.config.baseUrl + '/lab/open-appointment/down-print?id=16', //请求地址
  611. // header: {
  612. // 'content-type': 'application/msword', //自定义请求头信息
  613. // 'Authorization': this.vuex_token
  614. // },
  615. // filePath: wx.env.USER_DATA_PATH + '/file.doc',
  616. // success: (res) => {
  617. // //下载成功
  618. // if (res.statusCode === 200) {
  619. // //保存文件
  620. // console.log(res, 'res.tempFilePath-----')
  621. // uni.openDocument({
  622. // filePath: res.filePath,
  623. // showMenu: true, //showMenu是否显示右上角菜单
  624. // success: function(res) {
  625. // console.log(res, '打开文档成功');
  626. // },
  627. // fail: (e) => {
  628. // uni.showToast({
  629. // title: `打开失败` + e
  630. // })
  631. // }
  632. // });
  633. // // uni.saveFile({
  634. // // tempFilePath: res.filePath, //下载成功之后返回的临时路径
  635. // // success: (e) => {
  636. // // console.log(e, 'res.tempFilePath')
  637. // // //保存成功之后 打开文件
  638. // // uni.openDocument({
  639. // // filePath: e.savedFilePath,
  640. // // fail: (e) => {
  641. // // uni.showToast({
  642. // // title: `打开失败` + e
  643. // // })
  644. // // }
  645. // // })
  646. // // },
  647. // // fail: (e) => {
  648. // // console.log(res, 'res.tempFilePath')
  649. // // console.log(e, 'res.tempFilePath')
  650. // // uni.showToast({
  651. // // title: `保存失败` + e
  652. // // })
  653. // // }
  654. // // })
  655. // }
  656. // },
  657. // fail: (e) => {
  658. // this.isDownloading = false
  659. // console.log(e, 'pppppppppppppppp', this.$u.http.config.baseUrl)
  660. // uni.showToast({
  661. // title: `文件下载失败` + e,
  662. // icon: "none",
  663. // })
  664. // }
  665. // });
  666. },
  667. },
  668. }
  669. </script>
  670. <style lang="scss" scoped>
  671. .box {
  672. width: 100vw;
  673. display: flex;
  674. flex-direction: column;
  675. padding: 0px 16px;
  676. box-sizing: border-box;
  677. padding-bottom: 100px;
  678. position: relative;
  679. .txt {
  680. font-size: 16px;
  681. font-family: PingFang SC-Bold, PingFang SC;
  682. font-weight: bold;
  683. color: #333333;
  684. padding-top: 12px;
  685. padding-bottom: 8px;
  686. .table-title {
  687. display: flex;
  688. border-left: solid 1px#b3b3b3;
  689. .title-item {
  690. flex: 1;
  691. padding: 5px 0;
  692. text-align: center;
  693. border-right: solid 1px #b3b3b3;
  694. border-bottom: solid 1px#b3b3b3;
  695. font-weight: 400;
  696. font-size: 13px;
  697. }
  698. }
  699. .table-title:first-child {
  700. background-color: #e3e3e3;
  701. border-top: solid 1px #b3b3b3;
  702. }
  703. }
  704. .buttom {
  705. height: 40px;
  706. line-height: 40px;
  707. padding: 0 10px;
  708. background-color: #3665FF;
  709. text-align: center;
  710. color: #fff;
  711. }
  712. input {
  713. height: 48px;
  714. background: #F8F8F8;
  715. border-radius: 4px;
  716. opacity: 1;
  717. padding-left: 12px;
  718. box-sizing: border-box;
  719. font-size: 16px;
  720. width: 100%;
  721. }
  722. .input {
  723. .uni-input {
  724. height: 48px;
  725. background: #F8F8F8;
  726. border-radius: 4px;
  727. line-height: 48px;
  728. opacity: 1;
  729. padding: 0 12px;
  730. box-sizing: border-box;
  731. font-size: 16px;
  732. .input-icon {
  733. display: inline-block;
  734. float: right;
  735. }
  736. }
  737. }
  738. textarea {
  739. width: 100%;
  740. height: 148px;
  741. background: #F8F8F8;
  742. border-radius: 4px;
  743. opacity: 1;
  744. padding-left: 12px;
  745. padding-top: 12px;
  746. box-sizing: border-box;
  747. font-size: 16px;
  748. }
  749. .btm {
  750. width: 100%;
  751. height: 68px;
  752. background: #FFFFFF;
  753. display: flex;
  754. align-items: center;
  755. justify-content: space-around;
  756. position: fixed;
  757. bottom: 0px;
  758. z-index: 99;
  759. view {
  760. width: 152px;
  761. height: 44px;
  762. border-radius: 22px;
  763. opacity: 1;
  764. font-size: 16px;
  765. font-weight: 400;
  766. display: flex;
  767. align-items: center;
  768. justify-content: center;
  769. }
  770. }
  771. }
  772. //弹框样式
  773. .prop-image {
  774. // position: absolute;
  775. // top: -50px;
  776. height: 68px;
  777. width: 90px;
  778. margin-top: -54px;
  779. position: fixed;
  780. }
  781. .prop-content {
  782. padding: 15px;
  783. display: flex;
  784. flex-direction: column;
  785. align-items: center;
  786. .prop-title {
  787. text-align: center;
  788. font-size: 18px;
  789. margin-bottom: 5px;
  790. font-weight: bold;
  791. color: #333333;
  792. margin-top: 30px;
  793. }
  794. .content-item {
  795. display: flex;
  796. color: #333333;
  797. margin-top: 8px;
  798. width: 100%;
  799. .prop-label {
  800. flex: 0 0 80px;
  801. font-size: 15px;
  802. font-weight: 550;
  803. }
  804. .prop-content {
  805. font-size: 15px;
  806. }
  807. }
  808. .pop-btn {
  809. margin-top: 40px;
  810. width: 84%;
  811. display: flex;
  812. align-items: center;
  813. justify-content: space-between;
  814. view {
  815. display: flex;
  816. align-items: center;
  817. justify-content: center;
  818. width: 130px;
  819. height: 44px;
  820. font-size: 16px;
  821. font-weight: bold;
  822. border-radius: 22px 22px 22px 22px;
  823. opacity: 1;
  824. }
  825. .prop-cancel {
  826. opacity: 1;
  827. border: 1px solid #3665FF;
  828. background: rgba(54, 101, 255, 0.15);
  829. color: #3665FF;
  830. box-sizing: border-box;
  831. margin-right: 8px;
  832. }
  833. .prop-success {
  834. background: #3665FF;
  835. color: #fff;
  836. }
  837. }
  838. .prop-srue {
  839. width: 279px;
  840. height: 44px;
  841. background: #3665FF;
  842. text-align: center;
  843. margin-top: 30px;
  844. line-height: 44px;
  845. color: #FFFFFF;
  846. border-radius: 22px 22px 22px 22px;
  847. font-size: 16px;
  848. margin-bottom: 5px;
  849. }
  850. }
  851. //时间选择弹框
  852. .change-time-prop {
  853. height: 100vh;
  854. width: 100%;
  855. background-color: #fff;
  856. position: fixed;
  857. // position: absolute;
  858. top: 0;
  859. left: 0;
  860. z-index: 9999999999;
  861. overflow-y: auto;
  862. .simple-week {
  863. text-align: right;
  864. padding: 10px;
  865. background-color: #fff;
  866. border-bottom: solid 1px #dddcdc;
  867. .sit-num {
  868. display: inline-block;
  869. text-align: left;
  870. float: left;
  871. padding: 10px 0;
  872. color: red;
  873. }
  874. .change-buttom,
  875. .disable-buttom {
  876. display: inline-block;
  877. padding: 8px 30px;
  878. background-color: #3665FF;
  879. color: #FFFFFF;
  880. // margin-left: 10px;
  881. border-radius: 18px;
  882. }
  883. .week-text {
  884. display: inline-block;
  885. font-size: 15px;
  886. margin: 0 10px;
  887. font-weight: bold;
  888. }
  889. .disable-buttom {
  890. background-color: #dddcdc;
  891. color: #7c7b7b;
  892. }
  893. }
  894. .table_1 {
  895. // overflow-y: auto;
  896. .sure-buttom {
  897. text-align: center;
  898. margin-top: 20px;
  899. .cancel {
  900. display: inline-block;
  901. width: 150px;
  902. height: 45px;
  903. line-height: 45px;
  904. border: solid 1px #3665FF;
  905. color: #3665FF;
  906. border-radius: 22px;
  907. }
  908. .sure {
  909. display: inline-block;
  910. width: 150px;
  911. height: 45px;
  912. line-height: 45px;
  913. background-color: #3665FF;
  914. color: #FFFFFF;
  915. margin-left: 10px;
  916. border-radius: 22px;
  917. }
  918. }
  919. .table-border {
  920. display: flex;
  921. .week {
  922. display: flex;
  923. padding: 8px;
  924. color: #333333;
  925. font-size: 12px;
  926. border-bottom: solid 1px #F2F2F2;
  927. border-top: solid 1px #F2F2F2;
  928. background-color: #FBFCFF;
  929. .week-item {
  930. flex: 1;
  931. text-align: center;
  932. .week-day {
  933. margin-top: 3px;
  934. }
  935. }
  936. }
  937. .jie {
  938. text-align: center;
  939. background-color: #FBFCFF;
  940. }
  941. .jie-item:first-child {
  942. background-color: #FBFCFF;
  943. display: flex;
  944. align-items: center;
  945. justify-content: center;
  946. }
  947. .jie-item {
  948. flex: 1;
  949. display: flex;
  950. align-items: center;
  951. justify-content: center;
  952. border: 1px dashed #F2F2F2;
  953. border-right: none;
  954. border-top: none;
  955. height: 50px;
  956. border-left: none;
  957. text-align: center;
  958. }
  959. .kong {
  960. text-align: center;
  961. // background-color: #0077ff;
  962. color: #0077ff;
  963. cursor: pointer;
  964. // border-bottom: solid 0.5px #fff;
  965. }
  966. .course {
  967. flex: 1;
  968. display: flex;
  969. align-items: center;
  970. justify-content: center;
  971. height: 50px;
  972. border-left: none;
  973. text-align: center;
  974. width: 100%;
  975. }
  976. .current-course {
  977. text-align: center;
  978. background-color: #0077ff;
  979. color: #fff;
  980. display: flex;
  981. align-items: center;
  982. justify-content: center;
  983. }
  984. .xuan {
  985. text-align: center;
  986. background-color: #00b315;
  987. color: #fff;
  988. display: flex;
  989. align-items: center;
  990. justify-content: center;
  991. }
  992. .jie-item:last-child {
  993. border-bottom: none;
  994. }
  995. .day {
  996. flex: 1;
  997. display: flex;
  998. text-align: center;
  999. .day-item {
  1000. flex: 1;
  1001. .time {
  1002. border-bottom: 1px dashed #F2F2F2;
  1003. background-color: #FBFCFF;
  1004. }
  1005. .today {
  1006. color: #df4d76;
  1007. }
  1008. background-color: #fff;
  1009. border: 1px dashed #F2F2F2;
  1010. }
  1011. .day-item-1 {
  1012. background-color: #cdced0;
  1013. }
  1014. }
  1015. }
  1016. }
  1017. }
  1018. </style>