companiesInformation.vue 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. <!-- @format -->
  2. <template>
  3. <view class="container">
  4. <view style="color: #3c9cff" class="informationTitle">企业信息</view>
  5. <view class="informationContent">
  6. <view class="contentItems">
  7. <u-form>
  8. <view class="content">
  9. <view class="title">单位类别 </view>
  10. <view class="message">{{ formdData.companiesOrcResult.type }}</view>
  11. </view>
  12. <view class="content">
  13. <view class="title">统一社会信用代码 </view>
  14. <view class="message">{{
  15. formdData.companiesOrcResult.regNum
  16. }}</view>
  17. </view>
  18. <view class="content">
  19. <view class="title">单位名称</view>
  20. <view class="message">{{ formdData.companiesOrcResult.name }}</view>
  21. </view>
  22. <!-- <view class="content">
  23. <view class="title">登录用户名</view>
  24. <view class="message">{{ formdData.companiesOrcResult.regNum }}</view>
  25. </view> -->
  26. <view
  27. class="content"
  28. style="
  29. width: 100%;
  30. display: flex;
  31. align-items: center;
  32. justify-content: space-between;
  33. "
  34. >
  35. <view class="title">单位所属区域 </view>
  36. <view>
  37. <vvSelectArea
  38. :list="areas"
  39. v-model="formdData.companiesOrcResult.region"
  40. placeholder="请选择所在区域"
  41. ></vvSelectArea>
  42. </view>
  43. </view>
  44. <view class="content">
  45. <view class="title">单位注册地址</view>
  46. <view class="message">{{
  47. formdData.companiesOrcResult.address
  48. }}</view>
  49. </view>
  50. <view class="content">
  51. <view class="title">法人代表/负责人</view>
  52. <view class="message">{{
  53. formdData.companiesOrcResult.person
  54. }}</view>
  55. </view>
  56. <view
  57. class="content"
  58. style="
  59. display: flex;
  60. align-items: center;
  61. justify-content: space-between;
  62. "
  63. >
  64. <view class="title">单位地理位置</view>
  65. <u-icon
  66. v-if="!formdData.companiesOrcResult.location"
  67. @click="handleGetMap"
  68. name="map-fill"
  69. color="#2979ff"
  70. size="28"
  71. ></u-icon>
  72. <view v-else @click="handleGetMap" class="message">
  73. {{ formdData.companiesOrcResult.location }}
  74. </view>
  75. </view>
  76. <view class="content">
  77. <view class="title">单位通讯地址</view>
  78. <view class="message">{{
  79. formdData.companiesOrcResult.postalAddress
  80. }}</view>
  81. </view>
  82. </u-form>
  83. </view>
  84. </view>
  85. </view>
  86. </template>
  87. <script>
  88. import vvSelectArea from "@/components/vv-select-area/vv-select-area";
  89. import { getRegiong } from "@/api/personRegistered";
  90. export default {
  91. components: {
  92. vvSelectArea,
  93. },
  94. async created() {
  95. try {
  96. let { data } = await getRegiong();
  97. this.areas = data;
  98. } catch (error) {}
  99. },
  100. data() {
  101. return {
  102. show: true,
  103. areas: [], // 地址list
  104. };
  105. },
  106. props: {
  107. formdData: {
  108. type: Object,
  109. default: () => ({}),
  110. },
  111. },
  112. methods: {
  113. //获取位置
  114. handleGetMap() {
  115. uni.authorize({
  116. scope: "scope.userLocation",
  117. success: (res) => {
  118. uni.chooseLocation({
  119. success: (res) => {
  120. this.$emit(
  121. "update:formdData",
  122. Object.assign({
  123. ...this.formdData,
  124. companiesOrcResult: {
  125. ...this.formdData.companiesOrcResult,
  126. location: `${res.latitude},${res.longitude}`,
  127. postalAddress: res.address,
  128. },
  129. })
  130. );
  131. // console.log("位置名称:" + res.name);
  132. // console.log("详细地址:" + res.address);
  133. // console.log("纬度:" + res.latitude);
  134. // console.log("经度:" + res.longitude);
  135. },
  136. });
  137. },
  138. fail(err) {},
  139. });
  140. },
  141. },
  142. };
  143. </script>
  144. <style lang="scss">
  145. .informationTitle {
  146. margin-bottom: 30rpx;
  147. font-size: 30;
  148. }
  149. .contentItems {
  150. width: 100%;
  151. border-radius: 6px;
  152. background: #fff;
  153. margin: 0rpx auto 30rpx;
  154. padding: 20rpx 30rpx 20rpx;
  155. .content {
  156. border-bottom: 1px solid rgb(242, 242, 242);
  157. padding: 30rpx 0;
  158. display: flex;
  159. justify-content: space-between;
  160. }
  161. .content:last-child {
  162. border-bottom: none;
  163. }
  164. .title {
  165. font-size: 30rpx;
  166. color: black;
  167. letter-spacing: 3rpx;
  168. }
  169. .message {
  170. text-align: right;
  171. width: 380rpx;
  172. font-size: 30rpx;
  173. color: rgb(146, 146, 146);
  174. white-space: nowrap;
  175. /* 禁止文本换行 */
  176. overflow: hidden;
  177. /* 隐藏超出容器的文本 */
  178. text-overflow: ellipsis;
  179. /* 使用省略号表示被截断的文本 */
  180. }
  181. }
  182. </style>