details.vue 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <template>
  2. <view class="content">
  3. <u-form :model="formData" ref="uForm" label-align="right">
  4. <u-form-item label="报警单位" label-width="80px">
  5. <u-input readonly v-model="formData.alarmUnit" type="text" />
  6. </u-form-item>
  7. <u-form-item label="报警类型" label-width="80px">
  8. <u-input readonly v-model="formData.alarmType" type="text" />
  9. </u-form-item>
  10. <u-form-item label="报警时间" label-width="80px">
  11. <u-input readonly v-model="formData.alarmTime" type="text" />
  12. </u-form-item>
  13. <u-form-item label="报警位置" label-width="80px">
  14. <u-input readonly v-model="formData.alarmLocation" type="text" />
  15. </u-form-item>
  16. <u-form-item label="报警等级" label-width="80px">
  17. <u-input readonly v-model="formData.alarmLevel" type="text" />
  18. </u-form-item>
  19. <u-form-item label="报警人" label-width="80px">
  20. <u-input readonly v-model="formData.createUser" type="text" />
  21. </u-form-item>
  22. </u-form>
  23. </view>
  24. </template>
  25. <script>
  26. import * as api from "@/api/fireFighting.js"
  27. export default {
  28. data() {
  29. return {
  30. formData: {}
  31. }
  32. },
  33. onLoad(option) {
  34. this.getDrtails(option.id)
  35. },
  36. methods: {
  37. getDrtails(id) {
  38. api.getDetail({
  39. id
  40. }).then(res => {
  41. this.formData = res.data
  42. })
  43. }
  44. }
  45. }
  46. </script>
  47. <style scoped lang="scss">
  48. .content {
  49. margin: 10px 20px;
  50. .u-form {
  51. overflow: hidden;
  52. .u-form-item {
  53. float: left;
  54. margin-right: 10px;
  55. width: calc(100% / 2 - 10px);
  56. }
  57. }
  58. }
  59. </style>