addAir.vue 22 KB

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