index.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831
  1. <template>
  2. <view class="folder-select-page">
  3. <!-- 顶部导航栏 -->
  4. <view class="header-bg" :style="{ paddingTop: statusBarHeight + 'px' }">
  5. <view class="header-content">
  6. <view class="back-btn" @click="handleBack">
  7. <text class="back-icon">‹</text>
  8. </view>
  9. <text class="header-title">选择文件夹</text>
  10. <view class="placeholder"></view>
  11. </view>
  12. </view>
  13. <!-- 项目信息 -->
  14. <view class="project-info-bar">
  15. <text class="project-label">当前项目:</text>
  16. <text class="project-name">{{ projectName }}</text>
  17. </view>
  18. <!-- 选择表单 -->
  19. <view class="form-container">
  20. <view v-if="loading" class="loading-tip">
  21. <text class="loading-text">加载中...</text>
  22. </view>
  23. <view v-else class="form-content">
  24. <!-- 国家-中心联动选择 -->
  25. <view class="form-item">
  26. <view class="form-label">国家 - 中心:</view>
  27. <picker
  28. mode="multiSelector"
  29. :range="pickerRange"
  30. :value="[selectedCountryIndex, selectedCenterIndex]"
  31. @change="handleMultiPickerChange"
  32. @columnchange="handleColumnChange"
  33. >
  34. <view class="picker-display">
  35. <text class="picker-text" :class="{ placeholder: selectedCountryIndex === -1 || selectedCenterIndex === -1 }">
  36. {{ getDisplayText() }}
  37. </text>
  38. <text class="picker-arrow">›</text>
  39. </view>
  40. </picker>
  41. </view>
  42. <!-- 名称和生效日期合并 -->
  43. <view class="form-item highlight-item">
  44. <view class="form-label required">名称:</view>
  45. <view class="input-wrapper highlight">
  46. <input
  47. v-model="documentName"
  48. type="text"
  49. placeholder="请输入具体文档名"
  50. class="input-field"
  51. @input="handleDocumentNameInput"
  52. />
  53. </view>
  54. <view class="date-picker-wrapper">
  55. <picker
  56. mode="date"
  57. :value="effectiveDate"
  58. @change="handleDateChange"
  59. >
  60. <view class="picker-display">
  61. <text class="picker-text" :class="{ placeholder: !effectiveDate }">
  62. {{ effectiveDate || '请输入生效日期' }}
  63. </text>
  64. <text class="picker-arrow">›</text>
  65. </view>
  66. </picker>
  67. </view>
  68. <view class="final-name-preview">
  69. <text class="preview-label">完整名称预览:</text>
  70. <text class="preview-text">{{ getFinalName() }}</text>
  71. </view>
  72. </view>
  73. <!-- 提交按钮 -->
  74. <button
  75. class="confirm-btn"
  76. :disabled="selectedCountryIndex < 0 || selectedCenterIndex < 0 || !documentName.trim()"
  77. @click="handleSubmit"
  78. >
  79. 提交
  80. </button>
  81. </view>
  82. </view>
  83. </view>
  84. </template>
  85. <script>
  86. import { getFolderList, uploadScanFile } from '@/apis/scan'
  87. export default {
  88. data() {
  89. return {
  90. statusBarHeight: 0,
  91. projectId: 0,
  92. projectName: '',
  93. projectCode: '',
  94. rawData: null,
  95. loading: false,
  96. showRawData: false,
  97. // 原始数据列表(用于查找独立的中心)
  98. allFolders: [],
  99. // 国家列表
  100. countryList: [],
  101. selectedCountryIndex: 0, // 默认选中第一个(NA)
  102. // 中心列表
  103. centerList: [],
  104. selectedCenterIndex: 0, // 默认选中第一个(NA)
  105. // 文档名称输入
  106. documentName: '',
  107. // 生效日期
  108. effectiveDate: ''
  109. }
  110. },
  111. computed: {
  112. // 构建选择器的 range 数据
  113. pickerRange() {
  114. // 第一列:国家名称数组
  115. const countryNames = this.countryList.map(item => item.name)
  116. // 第二列:中心显示名称数组
  117. const centerNames = this.centerList.map(item => item.displayName || item.name)
  118. return [countryNames, centerNames]
  119. }
  120. },
  121. onLoad(options) {
  122. this.projectId = parseInt(options.projectId) || 0
  123. this.projectName = decodeURIComponent(options.projectName || '')
  124. this.projectCode = decodeURIComponent(options.projectCode || '')
  125. },
  126. onReady() {
  127. // 获取系统信息
  128. const windowInfo = uni.getWindowInfo()
  129. this.statusBarHeight = windowInfo.statusBarHeight || 0
  130. // 加载数据
  131. if (this.projectId) {
  132. this.loadFolderList()
  133. } else {
  134. console.error('projectId 为空,无法加载文件夹列表')
  135. }
  136. },
  137. methods: {
  138. // 返回上一页
  139. handleBack() {
  140. uni.navigateBack()
  141. },
  142. // 加载文件夹列表
  143. async loadFolderList() {
  144. if (this.loading) return
  145. try {
  146. this.loading = true
  147. const response = await getFolderList({
  148. projectId: this.projectId
  149. })
  150. // 保存原始数据
  151. this.rawData = response
  152. // 解析数据
  153. if (response.code === 200 && response.data && Array.isArray(response.data)) {
  154. this.allFolders = response.data
  155. this.parseCountryList(response.data)
  156. }
  157. } catch (error) {
  158. console.error('加载失败:', error)
  159. uni.showToast({
  160. title: '加载失败',
  161. icon: 'none'
  162. })
  163. } finally {
  164. this.loading = false
  165. }
  166. },
  167. // 解析国家列表(type === 1 为国家)
  168. parseCountryList(data) {
  169. const countries = data.filter(item => {
  170. return item.type === 1 // 国家类型
  171. })
  172. // 在列表开头添加 NA 选项
  173. this.countryList = [
  174. { id: 'NA', name: 'NA', type: 1, children: [], displayName: 'NA' },
  175. ...countries
  176. ]
  177. // 初始化时加载第一个国家(NA)的中心列表
  178. if (this.countryList.length > 0) {
  179. this.loadCenterList(0)
  180. }
  181. },
  182. // 加载中心列表
  183. loadCenterList(countryIndex) {
  184. if (countryIndex >= 0 && this.countryList[countryIndex]) {
  185. const country = this.countryList[countryIndex]
  186. // 如果选择的是 NA(第一个选项)
  187. if (country.id === 'NA') {
  188. // 获取所有不属于任何国家的中心
  189. this.centerList = this.getIndependentCenters()
  190. } else {
  191. // 选择了具体国家,显示该国家下的所有中心(包括子中心)
  192. const allCenters = this.getAllCentersRecursive(country.children || [])
  193. // 在列表开头添加 NA 选项
  194. this.centerList = [
  195. { id: 'NA', name: 'NA', type: 2, displayName: 'NA' },
  196. ...allCenters
  197. ]
  198. }
  199. } else {
  200. this.centerList = [{ id: 'NA', name: 'NA', type: 2, displayName: 'NA' }]
  201. }
  202. },
  203. // 递归获取所有中心(包括子中心)
  204. getAllCentersRecursive(nodes, prefix = '') {
  205. let centers = []
  206. nodes.forEach(node => {
  207. // 如果是中心类型(type === 2)
  208. if (node.type === 2) {
  209. // 添加当前中心,名称带层级前缀
  210. const displayName = prefix ? `${prefix} > ${node.name}` : node.name
  211. centers.push({
  212. ...node,
  213. displayName: displayName, // 用于显示的名称
  214. originalName: node.name // 保留原始名称
  215. })
  216. // 如果有子节点,递归获取
  217. if (node.children && node.children.length > 0) {
  218. const subCenters = this.getAllCentersRecursive(node.children, displayName)
  219. centers = centers.concat(subCenters)
  220. }
  221. } else if (node.children && node.children.length > 0) {
  222. // 如果不是中心但有子节点,继续递归
  223. const subCenters = this.getAllCentersRecursive(node.children, prefix)
  224. centers = centers.concat(subCenters)
  225. }
  226. })
  227. return centers
  228. },
  229. // 多列选择器列变化
  230. handleColumnChange(e) {
  231. const column = e.detail.column // 哪一列变化了
  232. const value = e.detail.value // 变化后的值
  233. // 如果是第一列(国家)变化
  234. if (column === 0) {
  235. this.selectedCountryIndex = value
  236. // 重新加载中心列表
  237. this.loadCenterList(value)
  238. // 重置中心选择为第一个
  239. this.selectedCenterIndex = 0
  240. }
  241. },
  242. // 多列选择器确认
  243. handleMultiPickerChange(e) {
  244. const values = e.detail.value
  245. this.selectedCountryIndex = values[0]
  246. this.selectedCenterIndex = values[1]
  247. },
  248. // 获取显示文本
  249. getDisplayText() {
  250. if (this.selectedCountryIndex >= 0 && this.selectedCenterIndex >= 0) {
  251. const country = this.countryList[this.selectedCountryIndex]
  252. const center = this.centerList[this.selectedCenterIndex]
  253. if (country && center) {
  254. const centerName = center.displayName || center.name
  255. return `${country.name} - ${centerName}`
  256. }
  257. }
  258. return '请选择国家和中心'
  259. },
  260. // 日期选择变化
  261. handleDateChange(e) {
  262. this.effectiveDate = e.detail.value
  263. },
  264. // 处理文档名称输入,禁止输入 "-" 字符
  265. handleDocumentNameInput(e) {
  266. const value = e.detail.value
  267. // 检测是否包含 "-" 字符
  268. if (value.includes('-')) {
  269. // 移除所有 "-" 字符
  270. const filteredValue = value.replace(/-/g, '')
  271. this.documentName = filteredValue
  272. // 提示用户
  273. uni.showToast({
  274. title: '文档名称不能包含"-"字符',
  275. icon: 'none',
  276. duration: 1500
  277. })
  278. } else {
  279. this.documentName = value
  280. }
  281. },
  282. // 格式化日期为 YYYYMMDD 格式(用于显示)
  283. formatDate(dateStr) {
  284. if (!dateStr) return ''
  285. // 将 2026-01-21 转换为 20260121
  286. return dateStr.replace(/-/g, '')
  287. },
  288. // 格式化日期为 YYYY-MM-DD HH:mm:ss 格式(用于提交)
  289. formatDateTimeForSubmit(dateStr) {
  290. if (!dateStr) return ''
  291. // 将 2026-01-21 转换为 2026-01-21 00:00:00
  292. return `${dateStr} 00:00:00`
  293. },
  294. // 获取文件夹ID(folder参数的逻辑)
  295. getFolderId() {
  296. const selectedCountry = this.countryList[this.selectedCountryIndex]
  297. const selectedCenter = this.centerList[this.selectedCenterIndex]
  298. // 如果选择了中心(且不是NA),使用中心ID
  299. if (selectedCenter && selectedCenter.id !== 'NA') {
  300. return selectedCenter.id
  301. }
  302. // 如果选择了国家(且不是NA),使用国家ID
  303. if (selectedCountry && selectedCountry.id !== 'NA') {
  304. return selectedCountry.id
  305. }
  306. // 否则使用0
  307. return 0
  308. },
  309. // 获取完整名称(用于提交)
  310. // 格式:{项目编号}-{国家名/NA}-{中心号/NA}-[具体文档名]-[生效日期]
  311. getFullNameForSubmit() {
  312. const projectCode = this.projectCode || 'NA'
  313. const country = this.countryList[this.selectedCountryIndex]
  314. const countryName = country && country.id !== 'NA' ? country.name : 'NA'
  315. const center = this.centerList[this.selectedCenterIndex]
  316. const centerId = center && center.id !== 'NA' ? center.id : 'NA'
  317. const docName = this.documentName.trim() || '[请输入具体文档名]'
  318. const date = this.formatDate(this.effectiveDate) || '[请输入生效日期]'
  319. return `${projectCode}-${countryName}-${centerId}-${docName}-${date}`
  320. },
  321. // 获取显示名称(用于前端显示,NA时隐藏)
  322. // 格式:{项目编号}-[国家名(如果不是NA)]-[中心号(如果不是NA)]-[具体文档名]-[生效日期]
  323. getFinalName() {
  324. const projectCode = this.projectCode || 'NA'
  325. const country = this.countryList[this.selectedCountryIndex]
  326. const countryName = country && country.id !== 'NA' ? country.name : ''
  327. const center = this.centerList[this.selectedCenterIndex]
  328. const centerId = center && center.id !== 'NA' ? center.id : ''
  329. const docName = this.documentName.trim() || '[请输入具体文档名]'
  330. const date = this.formatDate(this.effectiveDate) || '[请输入生效日期]'
  331. // 构建名称数组,过滤掉空值
  332. const nameParts = [projectCode, countryName, centerId, docName, date].filter(part => part !== '')
  333. return nameParts.join('-')
  334. },
  335. // 获取所有不属于任何国家的中心
  336. getIndependentCenters() {
  337. // 收集所有国家下的中心ID
  338. const centerIdsInCountries = new Set()
  339. this.allFolders.forEach(folder => {
  340. if (folder.type === 1 && folder.children) { // 国家类型
  341. this.collectAllCenterIds(folder.children, centerIdsInCountries)
  342. }
  343. })
  344. // 找出所有不在国家下的中心(直接在根目录下的中心)
  345. const independentCenters = this.allFolders.filter(folder => {
  346. return folder.type === 2 && !centerIdsInCountries.has(folder.id)
  347. })
  348. // 递归获取这些独立中心及其子中心
  349. const allIndependentCenters = this.getAllCentersRecursive(independentCenters)
  350. // 在列表开头添加 NA 选项
  351. return [
  352. { id: 'NA', name: 'NA', type: 2, displayName: 'NA' },
  353. ...allIndependentCenters
  354. ]
  355. },
  356. // 收集所有中心ID(递归)
  357. collectAllCenterIds(nodes, centerIds) {
  358. nodes.forEach(node => {
  359. if (node.type === 2) {
  360. centerIds.add(node.id)
  361. }
  362. if (node.children && node.children.length > 0) {
  363. this.collectAllCenterIds(node.children, centerIds)
  364. }
  365. })
  366. },
  367. // 中心选择变化(保留以防需要)
  368. handleCenterChange(e) {
  369. const index = parseInt(e.detail.value)
  370. this.selectedCenterIndex = index
  371. },
  372. // 提交
  373. async handleSubmit() {
  374. if (this.selectedCountryIndex < 0) {
  375. uni.showToast({
  376. title: '请选择国家',
  377. icon: 'none'
  378. })
  379. return
  380. }
  381. if (this.selectedCenterIndex < 0) {
  382. uni.showToast({
  383. title: '请选择中心',
  384. icon: 'none'
  385. })
  386. return
  387. }
  388. if (!this.documentName.trim()) {
  389. uni.showToast({
  390. title: '请输入具体文档名',
  391. icon: 'none'
  392. })
  393. return
  394. }
  395. if (!this.effectiveDate) {
  396. uni.showToast({
  397. title: '请输入生效日期',
  398. icon: 'none'
  399. })
  400. return
  401. }
  402. const selectedCountry = this.countryList[this.selectedCountryIndex]
  403. const selectedCenter = this.centerList[this.selectedCenterIndex]
  404. // 从全局数据中获取扫描的fileBase64List
  405. const fileBase64List = getApp().globalData.scannedFileBase64List
  406. if (!fileBase64List || fileBase64List.length === 0) {
  407. uni.showToast({
  408. title: '未找到扫描文件',
  409. icon: 'none'
  410. })
  411. return
  412. }
  413. try {
  414. uni.showLoading({
  415. title: '提交中...',
  416. mask: true
  417. })
  418. // 构建请求参数
  419. const fullName = this.getFullNameForSubmit() // 完整名称用于提交
  420. const folderId = this.getFolderId()
  421. const params = {
  422. projectId: this.projectId,
  423. folder: folderId,
  424. specificName: this.documentName.trim(),
  425. name: fullName,
  426. effectiveDate: this.formatDateTimeForSubmit(this.effectiveDate),
  427. files: fileBase64List
  428. }
  429. // 调用上传接口
  430. const response = await uploadScanFile(params)
  431. uni.hideLoading()
  432. if (response.code === 200) {
  433. uni.showToast({
  434. title: '提交成功',
  435. icon: 'success',
  436. duration: 2000
  437. })
  438. // 清空全局数据
  439. getApp().globalData.scannedFileBase64List = []
  440. // 延迟返回首页
  441. setTimeout(() => {
  442. uni.reLaunch({
  443. url: '/pages/home/index'
  444. })
  445. }, 2000)
  446. } else {
  447. throw new Error(response.msg || '提交失败')
  448. }
  449. } catch (error) {
  450. uni.hideLoading()
  451. console.error('提交失败:', error)
  452. uni.showToast({
  453. title: error.message || '提交失败',
  454. icon: 'none'
  455. })
  456. }
  457. },
  458. // 确认选择(保留旧方法以防其他地方调用)
  459. handleConfirm() {
  460. this.handleSubmit()
  461. }
  462. }
  463. }
  464. </script>
  465. <style lang="scss" scoped>
  466. .folder-select-page {
  467. width: 100%;
  468. height: 100vh;
  469. display: flex;
  470. flex-direction: column;
  471. background-color: #f5f5f5;
  472. // 顶部导航栏
  473. .header-bg {
  474. background: linear-gradient(180deg, #1ec9c9 0%, #1eb8b8 100%);
  475. position: relative;
  476. z-index: 100;
  477. .header-content {
  478. height: 88rpx;
  479. display: flex;
  480. align-items: center;
  481. justify-content: space-between;
  482. padding: 0 24rpx;
  483. .back-btn {
  484. width: 60rpx;
  485. height: 60rpx;
  486. display: flex;
  487. align-items: center;
  488. justify-content: flex-start;
  489. .back-icon {
  490. font-size: 56rpx;
  491. color: #ffffff;
  492. font-weight: 300;
  493. }
  494. }
  495. .header-title {
  496. flex: 1;
  497. text-align: center;
  498. font-size: 32rpx;
  499. font-weight: 600;
  500. color: #ffffff;
  501. }
  502. .placeholder {
  503. width: 60rpx;
  504. }
  505. }
  506. }
  507. // 项目信息栏
  508. .project-info-bar {
  509. padding: 24rpx;
  510. background: #ffffff;
  511. display: flex;
  512. align-items: center;
  513. border-bottom: 1rpx solid #f5f5f5;
  514. .project-label {
  515. font-size: 28rpx;
  516. color: #666666;
  517. margin-right: 8rpx;
  518. }
  519. .project-name {
  520. font-size: 28rpx;
  521. font-weight: 600;
  522. color: #1ec9c9;
  523. }
  524. }
  525. // 表单容器
  526. .form-container {
  527. flex: 1;
  528. overflow-y: auto;
  529. }
  530. .form-content {
  531. padding: 32rpx;
  532. }
  533. .form-item {
  534. margin-bottom: 32rpx;
  535. &.highlight-item {
  536. .form-label {
  537. font-size: 32rpx;
  538. color: #1ec9c9;
  539. &.required::after {
  540. content: ' *';
  541. color: #ff4444;
  542. }
  543. }
  544. }
  545. .form-label {
  546. font-size: 28rpx;
  547. color: #333333;
  548. font-weight: 600;
  549. margin-bottom: 16rpx;
  550. }
  551. .date-picker-wrapper {
  552. margin-top: 16rpx;
  553. }
  554. .final-name-preview {
  555. margin-top: 16rpx;
  556. padding: 20rpx 24rpx;
  557. background: #f5f5f5;
  558. border-radius: 12rpx;
  559. border: 2rpx dashed #cccccc;
  560. .preview-label {
  561. font-size: 24rpx;
  562. color: #666666;
  563. display: block;
  564. margin-bottom: 8rpx;
  565. }
  566. .preview-text {
  567. font-size: 26rpx;
  568. color: #333333;
  569. font-weight: 500;
  570. word-break: break-all;
  571. }
  572. }
  573. .input-wrapper {
  574. background: #ffffff;
  575. border: 2rpx solid #e0e0e0;
  576. border-radius: 12rpx;
  577. padding: 24rpx;
  578. transition: all 0.3s;
  579. &.highlight {
  580. border: 3rpx solid #1ec9c9;
  581. background: linear-gradient(135deg, #f0fffe 0%, #ffffff 100%);
  582. box-shadow: 0 4rpx 12rpx rgba(30, 201, 201, 0.15);
  583. padding: 28rpx;
  584. }
  585. &:focus-within {
  586. border-color: #1ec9c9;
  587. box-shadow: 0 0 0 4rpx rgba(30, 201, 201, 0.1);
  588. }
  589. .input-field {
  590. width: 100%;
  591. font-size: 28rpx;
  592. color: #333333;
  593. &::placeholder {
  594. color: #999999;
  595. }
  596. }
  597. }
  598. .picker-display {
  599. background: #ffffff;
  600. border: 2rpx solid #e0e0e0;
  601. border-radius: 12rpx;
  602. padding: 24rpx;
  603. display: flex;
  604. align-items: center;
  605. justify-content: space-between;
  606. transition: all 0.3s;
  607. &.disabled {
  608. background: #f5f5f5;
  609. opacity: 0.6;
  610. }
  611. .picker-text {
  612. flex: 1;
  613. font-size: 28rpx;
  614. color: #333333;
  615. &.placeholder {
  616. color: #999999;
  617. }
  618. }
  619. .picker-arrow {
  620. font-size: 40rpx;
  621. color: #999999;
  622. font-weight: 300;
  623. margin-left: 16rpx;
  624. }
  625. }
  626. }
  627. .confirm-btn {
  628. width: 100%;
  629. height: 88rpx;
  630. background: linear-gradient(135deg, #1ec9c9 0%, #1eb8b8 100%);
  631. color: #ffffff;
  632. font-size: 32rpx;
  633. font-weight: 600;
  634. border-radius: 16rpx;
  635. border: none;
  636. margin-top: 32rpx;
  637. transition: all 0.3s;
  638. box-shadow: 0 6rpx 20rpx rgba(30, 201, 201, 0.3);
  639. &:disabled {
  640. background: #cccccc;
  641. box-shadow: none;
  642. opacity: 0.6;
  643. }
  644. &:active:not(:disabled) {
  645. opacity: 0.9;
  646. transform: scale(0.98);
  647. }
  648. &::after {
  649. border: none;
  650. }
  651. }
  652. // 调试信息
  653. .debug-section {
  654. margin-top: 48rpx;
  655. padding: 24rpx;
  656. background: #fff3cd;
  657. border-radius: 12rpx;
  658. border: 1rpx solid #ffc107;
  659. .debug-title {
  660. font-size: 28rpx;
  661. font-weight: 600;
  662. color: #856404;
  663. margin-bottom: 12rpx;
  664. }
  665. .debug-item {
  666. font-size: 24rpx;
  667. color: #856404;
  668. line-height: 1.8;
  669. }
  670. }
  671. // 原始数据
  672. .raw-data-section {
  673. margin-top: 32rpx;
  674. .raw-data-title {
  675. font-size: 28rpx;
  676. font-weight: 600;
  677. color: #666666;
  678. padding: 16rpx;
  679. background: #f5f5f5;
  680. border-radius: 8rpx;
  681. cursor: pointer;
  682. &:active {
  683. background: #e0e0e0;
  684. }
  685. }
  686. .json-display {
  687. margin-top: 16rpx;
  688. background: #f5f5f5;
  689. padding: 24rpx;
  690. border-radius: 8rpx;
  691. font-size: 22rpx;
  692. color: #333333;
  693. font-family: 'Courier New', monospace;
  694. line-height: 1.6;
  695. word-break: break-all;
  696. white-space: pre-wrap;
  697. }
  698. }
  699. .loading-tip {
  700. padding: 200rpx 0;
  701. text-align: center;
  702. .loading-text {
  703. font-size: 28rpx;
  704. color: #999999;
  705. }
  706. }
  707. }
  708. </style>