archive_details5.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. <template>
  2. <view class=" uni-container">
  3. <view class="example container" :style="'height: ' + (screenHeight - wheight - 75) + 'px'">
  4. <!-- 自定义表单校验 1-->
  5. <u--form :model="formData" labelPosition="top" labelWidth="300" labelAlign="left">
  6. <view class=" flex flex-direction width100">
  7. <u-form-item label="检查单位场所名称" prop="jcdwscmc" :required="true">
  8. <u-input v-model="formData.jcdwscmc" disabled placeholder="必填。检查单位场所名称" />
  9. </u-form-item>
  10. <!-- <u-form-item label="所属乡镇街道" prop="streetName" :required="true">
  11. <u-input
  12. v-model="formData.streetName"
  13. placeholder="请选择所属乡镇街道"
  14. ></u-input>
  15. </u-form-item> -->
  16. <u-form-item label="检查记录编号(示例:编号:[2022]第00xx号) "><u-input disabled v-model="formData.jcjlbh"
  17. placeholder="检查记录编号" /></u-form-item>
  18. <u-form-item label="检查人员 (示例:王xx、李xx) ">
  19. <u-input disabled v-model="formData.jcry" placeholder="检查人员" />
  20. </u-form-item>
  21. <u-form-item label="检查时间">
  22. <uni-datetime-picker disabled v-model="formData.jcsj" mode="date" closeOnClickOverlay
  23. ></uni-datetime-picker>
  24. </u-form-item>
  25. <u-form-item label="检查形式(示例:安全检查)">
  26. <u-input disabled v-model="formData.jcxs" placeholder="检查形式" />
  27. </u-form-item>
  28. <u-form-item>
  29. <template #label>
  30. <span class="my-label">是/否责令限期整改及整改时限<view class="">
  31. (示例:是 2022年x月x日)
  32. </view></span></template>
  33. <u-input v-model="formData.sfxqzg" disabled placeholder="是/否责令限期整改及整改时限" />
  34. </u-form-item>
  35. <u-form-item label="是/否移交消防机构或公安派出所处理 " prop="xfaqzrr">
  36. <u-input v-model="formData.sfyjxfjg" disabled placeholder="是/否移交消防机构或公安派出所处理" />
  37. </u-form-item>
  38. <u-form-item label="是/否存在严重威胁公共安全的火灾隐患并报告">
  39. <u-input v-model="formData.sfyzwx" disabled placeholder="是/否存在严重威胁公共安全的火灾隐患并报告" />
  40. </u-form-item>
  41. <u-form-item label="备注">
  42. <u-input v-model="formData.remark" disabled placeholder="备注" />
  43. </u-form-item>
  44. </view>
  45. </u--form>
  46. </view>
  47. <uni-row class="heigthButton">
  48. <u-button
  49. @click="gotoEditArchive(formData)"
  50. shape="circle"
  51. size="large"
  52. color="#4cb2b6"
  53. text="修改信息"
  54. style="width: 60%;"
  55. ></u-button>
  56. </uni-row>
  57. </view>
  58. </template>
  59. <script>
  60. var that = null;
  61. export default {
  62. data() {
  63. return {
  64. formData: {
  65. orgName: ''
  66. },
  67. screenHeight: this.$screenHeight,
  68. wheight: '',
  69. };
  70. },
  71. mounted() {
  72. uni.createSelectorQuery().in(this).select('.heigthButton').boundingClientRect(data => {
  73. this.wheight = data.height
  74. }).exec()
  75. },
  76. onLoad: function(option) {
  77. that = this;
  78. var data = option.id;
  79. // 接收来自上个页面传递的参数
  80. const eventChannel = this.getOpenerEventChannel();
  81. eventChannel.on('acceptDataFromOpenerPage', function(val) {
  82. that.formData = val;
  83. });
  84. this.formData.orgName = option.orgName;
  85. },
  86. methods: {
  87. // 传递当前页面数据到 ‘修改信息’
  88. gotoEditArchive(val) {
  89. uni.navigateTo({
  90. url: '/pagesA/fire/archive/edit_archive/edit_archive5',
  91. events: {
  92. // 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据
  93. acceptDataFromOpenedPage: function(val) {
  94. this.formData = val;
  95. }
  96. },
  97. success: function(res) {
  98. // 通过eventChannel向被打开页面传送数据
  99. res.eventChannel.emit('acceptDataFromOpenerPage', val);
  100. }
  101. });
  102. }
  103. }
  104. };
  105. </script>
  106. <style lang="scss" scoped>
  107. page{
  108. background-color: #F5F7F9;
  109. }
  110. .container {
  111. position: relative;
  112. // height: 220vh;
  113. background-color: rgb(245, 247, 249);
  114. overflow: auto;
  115. .buju {
  116. margin: 40rpx 0;
  117. }
  118. }
  119. .cont {
  120. }
  121. .weiwan {
  122. color: #d51a52;
  123. background: rgba(213, 26, 82, 0.2);
  124. padding: 5rpx 20rpx;
  125. border-radius: 2px;
  126. border: 1px solid #d51a52;
  127. }
  128. .yiwan {
  129. color: #4cb2b6;
  130. background: rgba(76, 178, 182, 0.2);
  131. padding: 5rpx 20rpx;
  132. border-radius: 2px;
  133. border: 1px solid #4cb2b6;
  134. }
  135. .miaoshu {
  136. margin-right: 20rpx;
  137. color: #274647;
  138. font-weight: 600;
  139. }
  140. </style>