addAir.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818
  1. <template>
  2. <view class="container">
  3. <view class="line"></view>
  4. <view class="show-selected">
  5. <view class="title-selected">已选择:</view>
  6. <view class="air-selected-name">{{show_airs}}</view>
  7. </view>
  8. <view class="btn">
  9. <view class="btn-bg" @tap="confirm_selection">确认选择</view>
  10. </view>
  11. <view class="line"></view>
  12. <view class="title-tip">请选择</view>
  13. <view class="line"></view>
  14. <view class="tree-box">
  15. <scroll-view scroll-y="true" class="tree-scroll" :style="{height: screenHeight}">
  16. <!-- 校区 -->
  17. <view class="item-school" v-for="(item0, index0) in treeData" :key="index0">
  18. <view class="school" :id="item0.id" @tap="handle_toggle_items">
  19. <view>{{item0.label}}</view>
  20. <uni-icons type="top" size="22" color="#ffffff" :style="{display: item0.isShow ? '' : 'none'}">
  21. </uni-icons>
  22. <uni-icons type="bottom" size="22" color="#ffffff"
  23. :style="{display: item0.isShow ? 'none' : ''}">
  24. </uni-icons>
  25. </view>
  26. <!-- 楼栋 -->
  27. <view class="item-loudong" v-for="(item1, index1) in item0.children" :key="index1"
  28. :style="{display: item0.isShow ? '' : 'none'}">
  29. <view class="loudong" :id="item1.id" @tap="handle_toggle_items">
  30. <view class="title-loudong">
  31. <uni-icons type="plus-filled" size="22" color="#2979ff"
  32. :style="{display: item1.isShow ? 'none' : ''}"></uni-icons>
  33. <uni-icons type="minus-filled" size="22" color="#2979ff"
  34. :style="{display: item1.isShow ? '' : 'none'}"></uni-icons>
  35. <view class="txt-loudong">{{item1.label}}</view>
  36. </view>
  37. <uni-icons type="top" size="22" color="#2979ff"
  38. :style="{display: item1.isShow ? '' : 'none'}"></uni-icons>
  39. <uni-icons type="bottom" size="22" color="#2979ff"
  40. :style="{display: item1.isShow ? 'none' : ''}">
  41. </uni-icons>
  42. </view>
  43. <!-- 楼层 -->
  44. <view class="item-loucheng" v-for="(item2, index2) in item1.children" :key="index2"
  45. :style="{display: item1.isShow ? '' : 'none'}">
  46. <view class="loucheng" :id="item2.id" @tap="handle_toggle_items">
  47. <view class="title-loucheng">
  48. <uni-icons type="plus-filled" size="22" color="#2979ff"
  49. :style="{display: item2.isShow ? 'none' : ''}"></uni-icons>
  50. <uni-icons type="minus-filled" size="22" color="#2979ff"
  51. :style="{display: item2.isShow ? '' : 'none'}"></uni-icons>
  52. <view class="txt-loucheng">{{item2.label}}</view>
  53. </view>
  54. <uni-icons type="top" size="22" color="#2979ff"
  55. :style="{display: item2.isShow ? '' : 'none'}"></uni-icons>
  56. <uni-icons type="bottom" size="22" color="#2979ff"
  57. :style="{display: item2.isShow ? 'none' : ''}"></uni-icons>
  58. </view>
  59. <!-- 教室、房间 -->
  60. <view class="item-jiaoshi" v-for="(item3, index3) in item2.children" :key="index3"
  61. :style="{display: item2.isShow ? '' : 'none'}">
  62. <view class="jiaoshi" :id="item3.id"
  63. @tap="get_air_in_the_room($event, item0.id + '|' + item1.id + '|' + item2.id + '|' + item3.id, item0.label + '|' + item1.label + '|'+ item2.label + '|' + item3.label, item3.isShow)">
  64. <view class="title-jiaoshi">
  65. <uni-icons type="plus-filled" size="22" color="#2979ff"
  66. :style="{display: item3.isShow ? 'none' : ''}"></uni-icons>
  67. <uni-icons type="minus-filled" size="22" color="#2979ff"
  68. :style="{display: item3.isShow ? '' : 'none'}"></uni-icons>
  69. <view class="txt-jiaoshi">{{item3.label.split('-')[1]}}</view>
  70. </view>
  71. <uni-icons type="top" size="22" color="#2979ff"
  72. :style="{display: item3.isShow ? '' : 'none'}"></uni-icons>
  73. <uni-icons type="bottom" size="22" color="#2979ff"
  74. :style="{display: item3.isShow ? 'none' : ''}"></uni-icons>
  75. </view>
  76. <!-- 空调 -->
  77. <view v-for="(item4, index4) in item3.children" :key="index4"
  78. :style="{display: item3.isShow ? '' : 'none'}">
  79. <view class="item-kongtiao" v-if="item4.isUsering">
  80. <view :style="{color: item4.isUsering ? '#747578' : '#2979ff'}">
  81. {{item4.label}}(使用中)
  82. </view>
  83. <checkbox :id="item4.id" :checked="true" :disabled="true" />
  84. </view>
  85. <view class="item-kongtiao" v-else>
  86. <view :style="{color: item4.isUsering ? '#747578' : '#2979ff'}">
  87. {{item4.label}}
  88. </view>
  89. <checkbox :value="index4" :id="item4.id" :checked="item4.isChecked"
  90. @tap="handle_kongtiao" />
  91. </view>
  92. </view>
  93. </view>
  94. </view>
  95. </view>
  96. </view>
  97. </scroll-view>
  98. </view>
  99. </view>
  100. </template>
  101. <script>
  102. export default {
  103. data() {
  104. return {
  105. ceshi: 'air',
  106. id_card: '', // 身份证号
  107. user_name: '', // 姓名
  108. airs_selected: '', //
  109. return_selected_airs: '', // 用于返回到上一页面的结果变量
  110. show_airs: '', // 用于显示已经选择的空调
  111. treeData: [], // 树形选择器的数据,目录树treeData
  112. airsData: [], // 点击教室的时候,获取该教室的空调数据
  113. screenHeight: '' // 屏幕的高度
  114. };
  115. },
  116. onLoad(options) {
  117. uni.showLoading({
  118. title: '加载中'
  119. })
  120. // 获取表格数据
  121. this.getTableData()
  122. setTimeout(() => {
  123. uni.hideLoading();
  124. }, 500);
  125. // 获取身份证号
  126. this.get_base_info(options)
  127. },
  128. onShow() {
  129. // 从新计算高度
  130. setTimeout(() => {
  131. this.calc_screen_height()
  132. }, 1500)
  133. },
  134. methods: {
  135. /**
  136. * 获取身份证号
  137. */
  138. get_base_info(options) {
  139. try {
  140. if (this.id_card == '' || typeof(this.id_card) == 'undefined') {
  141. const userinfo = uni.getStorageSync('userinfo_storage_key')
  142. if (userinfo) {
  143. this.id_card = userinfo.id_card
  144. this.user_name = userinfo.name
  145. } else {
  146. uni.navigateTo({
  147. url: '../index/index?from=' + options.from
  148. })
  149. uni.showToast({
  150. icon: 'none',
  151. title: '身份证号为空,请进行授权',
  152. duration: 3000
  153. });
  154. return
  155. }
  156. }
  157. } catch (e) {
  158. console.log('获取基本信息:' + e.message);
  159. }
  160. },
  161. /**
  162. * 点击房间,显示空调
  163. * @param {Object} e
  164. * @param {Object} id
  165. * @param {Object} label
  166. * @param {Object} rooms
  167. */
  168. async get_air_in_the_room(e, id, label, isShow) {
  169. let ids = id.split('|')
  170. let labels = label.split('|')
  171. // console.log(ids);
  172. // console.log(labels);
  173. // 展开或收起
  174. this.handle_toggle_items(e)
  175. // 展开时获取接口空调信息
  176. if (false === isShow) {
  177. const res = await this.$myRequest({
  178. host: this.ceshi,
  179. url: '/airManage/buildairqueryAirMes.action',
  180. method: 'POST',
  181. header: {
  182. 'content-type': 'application/x-www-form-urlencoded'
  183. },
  184. data: {
  185. school: labels[0],
  186. build: labels[1],
  187. floors: labels[2],
  188. dom: labels[3]
  189. }
  190. })
  191. // console.log(res.data);
  192. let data = res.data
  193. if (typeof data.code === 'undefined') {
  194. uni.showToast({
  195. title: '未找到code!',
  196. icon: 'success'
  197. });
  198. return
  199. }
  200. if (data.code === 200 && typeof data.data !== 'undefined') {
  201. // 清空
  202. this.airsData = []
  203. for (var i = 0; i < data.data.length; i++) {
  204. this.airsData.push({
  205. isUsering: data.data[i].is_on == 1 ? true : false,
  206. label: data.data[i].air_name + '-' + data.data[i].air_config,
  207. isChecked: false,
  208. id: data.data[i].air_ip
  209. })
  210. }
  211. // 排序
  212. this.airsData.sort((a, b) => a.label.localeCompare(b.label))
  213. if (this.airsData.length > 0) {
  214. // 填充数据
  215. this.insert_into_treeData_rooms(this.treeData, ids[3])
  216. }
  217. } else {
  218. uni.showToast({
  219. title: '该房间未配空调'
  220. });
  221. }
  222. }
  223. },
  224. /**
  225. * 填充空调到教室下面,供选择
  226. * @param {Object} obj
  227. * @param {Object} id
  228. */
  229. insert_into_treeData_rooms(obj, id) {
  230. for (var i = 0; i < obj.length; i++) {
  231. if (obj[i].id == id) {
  232. obj[i].children = this.airsData
  233. return
  234. }
  235. if (typeof obj[i].children != 'undefined' && obj[i].children.length > 0) {
  236. this.insert_into_treeData_rooms(obj[i].children, id)
  237. }
  238. }
  239. },
  240. /**
  241. * 树形选择器的数据
  242. */
  243. async getTableData() {
  244. const res = await this.$myRequest({
  245. host: this.ceshi,
  246. url: '/airManage/buildqueryDom.action',
  247. method: 'POST',
  248. header: {
  249. 'content-type': 'application/x-www-form-urlencoded'
  250. }
  251. })
  252. // console.log(res.data);
  253. if (typeof res.data.code === 'undefined') {
  254. uni.showToast({
  255. title: '未找到code!',
  256. icon: 'success'
  257. });
  258. return
  259. }
  260. if (typeof res.data.data === 'undefined') {
  261. uni.showToast({
  262. title: '未返回数据data!',
  263. icon: 'success'
  264. });
  265. return
  266. }
  267. if (res.data.code === 200) {
  268. let data = res.data.data
  269. // 校区
  270. let school = JSON.parse(data)
  271. // console.log('school', school);
  272. if (typeof school !== 'undefined' && school !== '') {
  273. this.treeData = []
  274. let tmpSchool = []
  275. for (var i = 0; i < school.length; i++) {
  276. let nData = []
  277. let builds = school[i]["builds"]
  278. for (var j = 0; j < builds.length; j++) {
  279. let tmpBuilds = {}
  280. let tmpFloors = []
  281. let floors = builds[j]['floors']
  282. for (var k = 0; k < floors.length; k++) {
  283. let room = []
  284. let tmpRooms = []
  285. let rooms = floors[k].rooms
  286. for (var p = 0; p < rooms.length; p++) {
  287. room.push({
  288. id: school[i].id + '' + builds[j].id + '' + floors[k].id + '' + i +
  289. '' + j + '' + k + '' + p,
  290. isShow: false,
  291. label: rooms[p],
  292. children: []
  293. })
  294. }
  295. // 房间排序
  296. room.sort((a, b) => a.label.localeCompare(b.label));
  297. let floor = {
  298. id: floors[k].id,
  299. label: floors[k].floor,
  300. isShow: false,
  301. children: room
  302. }
  303. tmpFloors.push(floor)
  304. }
  305. // 楼层排序
  306. tmpFloors.sort((a, b) => {
  307. return a - b;
  308. })
  309. tmpBuilds.id = builds[j].id
  310. tmpBuilds.label = builds[j].building
  311. tmpBuilds.isShow = false
  312. tmpBuilds.children = []
  313. tmpBuilds.children = tmpFloors
  314. nData.push(tmpBuilds)
  315. }
  316. // 栋排序
  317. nData.sort((a, b) => a.label.localeCompare(b.label))
  318. tmpSchool.push({
  319. id: school[i].id,
  320. label: school[i].school,
  321. isShow: true,
  322. children: nData
  323. })
  324. }
  325. // 校区排序
  326. tmpSchool.sort((a, b) => b.label.localeCompare(a.label))
  327. this.treeData = tmpSchool
  328. // console.log(JSON.stringify(this.treeData));
  329. } else {
  330. this.treeData = []
  331. uni.showToast({
  332. title: '无符合的数据!'
  333. });
  334. }
  335. } else {
  336. uni.showToast({
  337. title: res.data.message,
  338. icon: 'success'
  339. });
  340. }
  341. },
  342. /**
  343. * 获取空调的全称,勾选返回空调全称,不勾返回-空调全称,递归调用
  344. * @param {Object} obj
  345. * @param {Object} id
  346. * @param {Object} parentName
  347. */
  348. get_airs_full_name(obj, id, parentName) {
  349. for (var i = 0; i < obj.length; i++) {
  350. if (obj[i].id == id) {
  351. if (parentName == '') {
  352. return obj[i].label
  353. }
  354. if (obj[i].isChecked) {
  355. obj[i].isChecked = false
  356. return '+' + parentName + ' ' + obj[i].label
  357. } else {
  358. obj[i].isChecked = true
  359. return parentName + ' ' + obj[i].label
  360. }
  361. }
  362. let selfName = ''
  363. if (typeof obj[i].children !== 'undefined' && obj[i].children.length > 0) {
  364. if (parentName == '') {
  365. selfName = this.get_airs_full_name(obj[i].children, id, obj[i].label)
  366. } else {
  367. selfName = this.get_airs_full_name(obj[i].children, id, parentName + '+' + obj[i].label)
  368. }
  369. if (typeof selfName !== 'undefined') {
  370. return selfName
  371. }
  372. }
  373. }
  374. },
  375. /**
  376. * 获取空调的ids
  377. * @param {Object} obj
  378. * @param {Object} id
  379. */
  380. get_airs_ids() {
  381. let airs_selected_ids = ''
  382. let obj0 = this.treeData
  383. for (var i = 0; i < obj0.length; i++) {
  384. if (typeof obj0[i].children !== 'undefined' && obj0[i].children.length > 0) {
  385. let obj1 = obj0[i].children
  386. for (var j = 0; j < obj1.length; j++) {
  387. if (typeof obj1[j].children !== 'undefined' && obj1[j].children.length > 0) {
  388. let obj2 = obj1[j].children
  389. for (var k = 0; k < obj2.length; k++) {
  390. if (typeof obj2[k].children !== 'undefined' && obj2[k].children.length > 0) {
  391. let obj3 = obj2[k].children
  392. for (var p = 0; p < obj3.length; p++) {
  393. if (typeof obj3[p].children !== 'undefined' && obj3[p].children.length > 0) {
  394. let obj4 = obj3[p].children
  395. for (var u = 0; u < obj4.length; u++) {
  396. if (obj4[u].isChecked) {
  397. airs_selected_ids += obj0[i].label + '-' + obj1[j].label + '-' +
  398. obj2[k]
  399. .label + '-' + obj3[p].label + '|' + obj4[u].label + '|' +
  400. obj4[u]
  401. .id + ','
  402. }
  403. }
  404. }
  405. }
  406. }
  407. }
  408. }
  409. }
  410. }
  411. }
  412. this.return_selected_airs = airs_selected_ids.substring(0, airs_selected_ids.length - 1)
  413. },
  414. /**
  415. * 更新airs_selected中的数据
  416. * @param {Object} param
  417. */
  418. update_airs_selected(param) {
  419. let tmp_airs_selected = ''
  420. if (param.indexOf('+') == 0) { // 删除airs_selected中的数据
  421. // 把前面的'+'去除
  422. let del_val = param.substring(1)
  423. // 需要删除的值进行拆分成:【楼栋+楼层+房间, 空调】
  424. let room = del_val.split(' ')
  425. if (this.airs_selected.trim() !== '') {
  426. let arrAirs = this.airs_selected.trim().split(',')
  427. let airs = ''
  428. for (var i = 0; i < arrAirs.length; i++) {
  429. airs = arrAirs[i].trim() // 删除空格后,赋给临时变量
  430. // 如果找到指定的房间,则删除
  431. if (airs.indexOf(room[0]) == 0) {
  432. // 删除 楼栋-楼层-房间 中的空调
  433. airs = airs.replace(' ' + room[1], '')
  434. // 如果只剩下 楼栋-楼层-房间,没有了空调,则置为空
  435. if (airs == room[0]) {
  436. airs = ''
  437. }
  438. }
  439. if (airs !== '') {
  440. // 保存到临时变量tmp_airs_selected中
  441. tmp_airs_selected += airs + ','
  442. }
  443. }
  444. }
  445. } else { // 添加、合并到airs_selected中
  446. // 如果为空,直接加入
  447. if (this.airs_selected.trim() == '') {
  448. tmp_airs_selected = param + ','
  449. } else {
  450. let arrAirs = this.airs_selected.trim().split(',')
  451. let num = 0
  452. // 需要添加的数据
  453. let room = param.split(' ')
  454. for (var i = 0; i < arrAirs.length; i++) {
  455. let airs = arrAirs[i].trim().split(' ')
  456. // 如果找到指定的房间,则合并
  457. if (airs[0] == room[0]) {
  458. // 临时数组, 为排序做准备
  459. let tmp_arr = []
  460. // 数组转字符串, 即拼接
  461. tmp_arr.push(room[1])
  462. for (var j = 1; j < airs.length; j++) {
  463. tmp_arr.push(airs[j])
  464. }
  465. // 数组排序
  466. tmp_arr.sort()
  467. // 生成字符串
  468. tmp_airs_selected += room[0]
  469. for (var k = 0; k < tmp_arr.length; k++) {
  470. tmp_airs_selected += ' ' + tmp_arr[k]
  471. }
  472. // 加入分隔符
  473. tmp_airs_selected += ','
  474. } else {
  475. num++ // 计数
  476. tmp_airs_selected += arrAirs[i] + ','
  477. }
  478. }
  479. // 如果没有找到同一房间的,则直接拼接要添加的数据
  480. if (num == arrAirs.length) {
  481. tmp_airs_selected += param + ','
  482. }
  483. }
  484. }
  485. // 更新变量airs_selected
  486. this.airs_selected = tmp_airs_selected.substring(0, tmp_airs_selected.length - 1)
  487. // 更新显示框的内容
  488. this.show_selected_airs()
  489. },
  490. /**
  491. * 选择空调
  492. * @param {Object} e
  493. */
  494. handle_kongtiao(e) {
  495. // console.log(e.currentTarget.id);
  496. // 获取id
  497. let id = e.currentTarget.id
  498. // 获取勾选的值
  499. let airsFullName = this.get_airs_full_name(this.treeData, id, '')
  500. // 获取所有选中的id
  501. this.get_airs_ids()
  502. if (typeof airsFullName !== 'undefined') {
  503. // 更新airs_selected中的数据
  504. this.update_airs_selected(airsFullName)
  505. } else {
  506. uni.showToast({
  507. title: '选取无效!',
  508. duration: 1500
  509. })
  510. }
  511. },
  512. /**
  513. * 选项的展开与收起,进行切换,递归调用
  514. * @param {Object} obj
  515. * @param {Object} id
  516. */
  517. toggle_item(obj, id) {
  518. for (var i = 0; i < obj.length; i++) {
  519. if (obj[i].id == id) {
  520. if (obj[i].isShow) {
  521. obj[i].isShow = false
  522. } else {
  523. obj[i].isShow = true
  524. }
  525. return
  526. }
  527. if (typeof obj[i].children != 'undefined' && obj[i].children.length > 0) {
  528. this.toggle_item(obj[i].children, id)
  529. }
  530. }
  531. },
  532. /**
  533. * 选项的展开与收起,进行切换
  534. * @param {Object} e
  535. */
  536. handle_toggle_items(e) {
  537. // console.log(e.currentTarget.id);
  538. // 获取id
  539. let id = e.currentTarget.id
  540. this.toggle_item(this.treeData, id)
  541. },
  542. /**
  543. * 确认选择,将结果返回到前一页面显示
  544. */
  545. confirm_selection() {
  546. // 触发全局的自定义事件,附加参数都会传给监听器回调函数。
  547. if (this.return_selected_airs !== '') {
  548. // 保存到数据库
  549. let arrAirs = this.return_selected_airs.trim().split(',').sort()
  550. for (var i = 0; i < arrAirs.length; i++) {
  551. let tmpAirs = arrAirs[i].split('|');
  552. let _this = this;
  553. // 绑定空调
  554. (function(t, air_ip) {
  555. setTimeout(function() {
  556. _this.bangding_airs(air_ip);
  557. }, 300 * t);
  558. })(i, tmpAirs[2])
  559. }
  560. uni.$emit('selectAirs', {
  561. airs: this.return_selected_airs
  562. })
  563. }
  564. // 返回空调列表页面
  565. uni.navigateBack({
  566. delta: -1
  567. })
  568. },
  569. /**
  570. * 绑定空调
  571. * @param {Object} air_id
  572. */
  573. async bangding_airs(air_id) {
  574. const res = await this.$myRequest({
  575. host: this.ceshi,
  576. url: '/airManage/usersbdair.action',
  577. method: 'POST',
  578. header: {
  579. 'content-type': 'application/json'
  580. },
  581. data: {
  582. user_name: this.user_name,
  583. sfzh: this.id_card,
  584. air_ip: air_id
  585. }
  586. })
  587. // console.log(res.data);
  588. if (res.data.code == 200) {
  589. uni.showToast({
  590. icon: 'none',
  591. title: res.data.message,
  592. duration: 1500
  593. })
  594. } else {
  595. uni.showToast({
  596. icon: 'none',
  597. title: res.data.message,
  598. duration: 1500
  599. })
  600. }
  601. },
  602. /**
  603. * 超出左边显示"..."
  604. */
  605. show_selected_airs() {
  606. // 显示到上方
  607. this.show_airs = this.airs_selected.split('').reverse().join('').replaceAll('(', '>').replaceAll(')', '<')
  608. .replaceAll('>', ')').replaceAll('<', '(')
  609. },
  610. /**
  611. * 计算屏幕的高度
  612. */
  613. calc_screen_height() {
  614. uni.getSystemInfo({
  615. success: res => {
  616. let h = ((res.screenHeight * (750 / res.windowWidth)) - 480) //将px 转换rpx
  617. this.screenHeight = Math.floor(h) + 'rpx'
  618. }
  619. });
  620. }
  621. }
  622. }
  623. </script>
  624. <style lang="scss" scoped>
  625. .container {
  626. display: flex;
  627. flex-direction: column;
  628. font-size: 28rpx;
  629. font-family: "Microsoft YaHei-3970(82674968)";
  630. width: 730rpx;
  631. padding: 10rpx;
  632. .line {
  633. height: 20rpx;
  634. }
  635. .show-selected {
  636. display: flex;
  637. padding: 20rpx;
  638. border-radius: 10rpx;
  639. border: 1px solid #c7c9ce;
  640. font-size: 32rpx;
  641. .title-selected {
  642. color: #686b71;
  643. white-space: nowrap;
  644. }
  645. .air-selected-name {
  646. width: 600rpx;
  647. font-weight: bold;
  648. white-space: nowrap;
  649. text-overflow: ellipsis;
  650. direction: rtl;
  651. unicode-bidi: bidi-override;
  652. overflow: hidden;
  653. }
  654. }
  655. .btn {
  656. display: flex;
  657. justify-content: flex-end;
  658. .btn-bg {
  659. margin-top: 30rpx;
  660. padding: 20rpx 40rpx;
  661. border-radius: 10rpx;
  662. font-size: 32rpx;
  663. color: #ffffff;
  664. background-color: #2979ff;
  665. }
  666. }
  667. .title-tip {
  668. font-size: 36rpx;
  669. }
  670. .tree-box {
  671. border-radius: 10rpx;
  672. border: 1px solid #c7c9ce;
  673. color: #2979ff;
  674. .tree-scroll {
  675. border-radius: 10rpx;
  676. overflow: scroll;
  677. }
  678. .item-school {
  679. display: flex;
  680. flex-direction: column;
  681. padding: 10rpx 0 0 10rpx;
  682. .school {
  683. display: flex;
  684. align-items: center;
  685. justify-content: space-between;
  686. background-color: #2979ff;
  687. color: #ffffff;
  688. padding: 10rpx 10rpx 10rpx 20rpx;
  689. height: 60rpx;
  690. width: 668rpx;
  691. font-size: 30rpx;
  692. }
  693. .item-loudong {
  694. display: flex;
  695. flex-direction: column;
  696. padding: 10rpx 0 0 10rpx;
  697. margin-left: 30rpx;
  698. .loudong {
  699. display: flex;
  700. align-items: center;
  701. justify-content: space-between;
  702. border: 1rpx solid #c7c9ce;
  703. padding: 10rpx;
  704. height: 60rpx;
  705. width: 636rpx;
  706. font-size: 30rpx;
  707. .title-loudong {
  708. display: flex;
  709. }
  710. .txt-loudong {
  711. padding-left: 5rpx;
  712. }
  713. }
  714. .item-loucheng {
  715. display: flex;
  716. flex-direction: column;
  717. margin-left: 60rpx;
  718. .loucheng {
  719. display: flex;
  720. align-items: center;
  721. justify-content: space-between;
  722. border: 1rpx solid #c7c9ce;
  723. padding: 10rpx;
  724. height: 60rpx;
  725. width: 578rpx;
  726. font-size: 30rpx;
  727. .title-loucheng {
  728. display: flex;
  729. }
  730. .txt-loucheng {
  731. padding-left: 5rpx;
  732. }
  733. }
  734. .item-jiaoshi {
  735. display: flex;
  736. flex-direction: column;
  737. margin-left: 60rpx;
  738. .jiaoshi {
  739. display: flex;
  740. align-items: center;
  741. justify-content: space-between;
  742. border: 1rpx solid #c7c9ce;
  743. padding: 10rpx;
  744. height: 60rpx;
  745. width: 520rpx;
  746. font-size: 30rpx;
  747. .title-jiaoshi {
  748. display: flex;
  749. }
  750. .txt-jiaoshi {
  751. padding-left: 5rpx;
  752. }
  753. }
  754. .item-kongtiao {
  755. display: flex;
  756. justify-content: space-between;
  757. align-items: center;
  758. border: 1rpx solid #c7c9ce;
  759. margin-left: 60rpx;
  760. padding: 10rpx 10rpx 10rpx 30rpx;
  761. height: 60rpx;
  762. width: 442rpx;
  763. font-size: 32rpx;
  764. }
  765. }
  766. }
  767. }
  768. }
  769. }
  770. }
  771. </style>