addAir.vue 22 KB

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