company.vue 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325
  1. <template>
  2. <view class="huodong-details">
  3. <view class="p-30 ">
  4. <view class="detail-title">
  5. 联系信息
  6. </view>
  7. <view class="content-box bg-white m-t-30">
  8. <view class="detail-cell row-between u-border-bottom">
  9. <view class="width75">
  10. 企业名称
  11. </view>
  12. <view class="text-right flex-1">
  13. <text class="muted">{{userInfo.nickname}}</text>
  14. </view>
  15. </view>
  16. <view class="detail-cell row-between u-border-bottom">
  17. <view class="width75">
  18. 联系人
  19. </view>
  20. <view class="text-right flex-1">
  21. <text class="muted">{{userInfo.profile.contact}}</text>
  22. </view>
  23. </view>
  24. <view class="detail-cell row-between u-border-bottom">
  25. <view class="width75">
  26. 联系电话
  27. </view>
  28. <view class="text-right flex-1">
  29. <text class="muted">{{userInfo.tel}}</text>
  30. </view>
  31. </view>
  32. </view>
  33. <view class="detail-title m-t-30">
  34. 反馈信息
  35. </view>
  36. <view class="content-box m-t-30 bj-w ">
  37. <view class="detail-cell row-between u-border-bottom" @tap="showChainPopup=true">
  38. <view class="width75">
  39. 产业链
  40. </view>
  41. <view class="text-right flex-1">
  42. <text class="muted">{{info.chain}}</text>
  43. <u-icon name="arrow-right" size="28" color="#B8B8B8" :label="info.chain ? '' :'请选择'" label-pos="left"></u-icon>
  44. </view>
  45. </view>
  46. <view class="detail-cell row-between u-border-bottom" @tap="showModule=true">
  47. <view class="width75">
  48. 数据类型
  49. </view>
  50. <view class="text-right flex-1">
  51. <text class="muted">{{moduleTitle}}</text>
  52. <u-icon name="arrow-right" size="28" color="#B8B8B8" :label="info.module ? '' :'请选择'" label-pos="left"></u-icon>
  53. </view>
  54. </view>
  55. <view class="detail-cell row-between u-border-bottom">
  56. <view class="width75">
  57. 企业名称
  58. </view>
  59. <view class="text-right flex-1">
  60. <input type="text" v-model="info.title" placeholder="请输入">
  61. </view>
  62. </view>
  63. <view class="detail-cell row-between u-border-bottom">
  64. <view class="width75">
  65. 联系人
  66. </view>
  67. <view class="text-right flex-1">
  68. <input type="text" v-model="info.principal" placeholder="请输入">
  69. </view>
  70. </view>
  71. <view class="detail-cell row-between u-border-bottom">
  72. <view class="width75">
  73. 联系电话
  74. </view>
  75. <view class="text-right flex-1">
  76. <input type="text" v-model="info.tel" placeholder="请输入">
  77. </view>
  78. </view>
  79. <view class="detail-cell row-between " @click="goMap">
  80. <view class="width75 ">
  81. 企业地址
  82. </view>
  83. <view class=" text-right flex-1">
  84. <text class="muted" v-if="info.address">{{info.address}}</text>
  85. <u-icon name="map-fill" size="28" color="#B8B8B8" label="请选择" label-pos="left" v-else></u-icon>
  86. </view>
  87. </view>
  88. <view class="detail-biaoti bold">
  89. 企业简介
  90. </view>
  91. <view class="p-b-20">
  92. <textarea v-model="info.intro" id="" maxlength="999" placeholder="请输入"></textarea>
  93. <view class="muted text-right">
  94. {{ info.intro.length }}/999
  95. </view>
  96. </view>
  97. </view>
  98. </view>
  99. <view class="footer">
  100. <button class="white btn lg" @click="handleConsult">提交</button>
  101. </view>
  102. <!-- 组件 产业链 -->
  103. <chain v-model="showChainPopup" @change="handleChain"></chain>
  104. <!-- 数据类型 -->
  105. <u-select v-model="showModule" mode="single-column" :list="moduleList" :default-value="moduleSelect" confirm-color="#D90D0C" @confirm="moduleConfirm"></u-select>
  106. </view>
  107. </template>
  108. <script>
  109. import {
  110. getTalentsModule,
  111. postTalents
  112. } from "@/api/app";
  113. import {
  114. mapGetters
  115. } from 'vuex';
  116. import Chain from "./components/chain.vue"
  117. export default {
  118. components: {
  119. Chain
  120. },
  121. data() {
  122. return {
  123. info: {
  124. category_id: 0,
  125. title: '',
  126. tel: '',
  127. address: '',
  128. chain: '',
  129. module: '',
  130. intro: '',
  131. principal: '',
  132. },
  133. showChainPopup: false,
  134. showModule: false,
  135. moduleList:[],
  136. moduleTitle: '',
  137. moduleSelect:[0]
  138. }
  139. },
  140. async onLoad() {
  141. this.getModuleListFun();
  142. },
  143. methods: {
  144. // 获取
  145. async getModuleListFun() {
  146. const {
  147. code,
  148. data
  149. } = await getTalentsModule({})
  150. if (code == 1) {
  151. this.moduleList = data.map((item, index) => {
  152. return {
  153. value: item.name,
  154. label: item.title,
  155. extra: index
  156. };
  157. })
  158. this.info.module = this.moduleList[0].value;
  159. this.moduleTitle = this.moduleList[0].label
  160. }
  161. },
  162. moduleConfirm(e){
  163. const {value, label, extra} = e[0];
  164. this.info.module = value;
  165. this.moduleTitle = label
  166. this.moduleSelect = [extra || 0]
  167. },
  168. handleChain(cate) {
  169. this.info.chain = cate.title;
  170. this.info.category_id = cate.id;
  171. },
  172. goMap() {
  173. const that = this
  174. uni.chooseLocation({
  175. success: function(res) {
  176. that.info.address = res.address
  177. }
  178. })
  179. },
  180. handleConsult() {
  181. postTalents(this.info).then(res => {
  182. this.$toast({
  183. title: res.msg
  184. }, res.code == 1 ? {
  185. tab: 3,
  186. url: 1
  187. } : {});
  188. })
  189. },
  190. },
  191. computed: {
  192. ...mapGetters(['userInfo', 'appConfig']),
  193. }
  194. }
  195. </script>
  196. <style lang="less" scoped>
  197. .huodong-details {
  198. padding-bottom: calc(200rpx + env(safe-area-inset-bottom));
  199. }
  200. .details-images {
  201. height: 408rpx;
  202. border-radius: 20rpx;
  203. overflow: hidden;
  204. width: 100%;
  205. image {
  206. width: 100%;
  207. height: 100%;
  208. }
  209. }
  210. .detail-title {
  211. // font-size: 36rpx;
  212. font-weight: bold;
  213. // padding: 30rpx 0;
  214. }
  215. .detail-cell {
  216. display: flex;
  217. // align-items: center;
  218. padding: 30rpx 0;
  219. .cell-img {
  220. padding: 5rpx 0;
  221. image {
  222. width: 48rpx;
  223. height: 48rpx;
  224. display: block
  225. }
  226. }
  227. }
  228. // .muted {
  229. // color: #989898;
  230. // padding-left: 10rpx;
  231. // }
  232. .detail-biaoti {
  233. // font-size: 36rpx;
  234. height: 88rpx;
  235. line-height: 88rpx;
  236. }
  237. .bj-w {
  238. background-color: #fff;
  239. }
  240. .padding-30 {
  241. padding: 0 30rpx !important;
  242. }
  243. .content-box {
  244. padding: 0 24rpx;
  245. box-shadow: 0rpx 8rpx 16rpx 2rpx rgba(0, 0, 0, 0.03);
  246. border-radius: 12rpx 12rpx 12rpx 12rpx;
  247. input {
  248. font-size: 28rpx;
  249. }
  250. textarea {
  251. width: 100%;
  252. height: 100rpx;
  253. font-size: 28rpx;
  254. }
  255. }
  256. .btn-r-border {
  257. position: relative;
  258. &::after {
  259. content: ' ';
  260. width: 1rpx;
  261. height: 36rpx;
  262. background-color: #CCCCCC;
  263. right: 0;
  264. top: 50%;
  265. margin-top: -18rpx;
  266. position: absolute;
  267. }
  268. }
  269. .width75 {
  270. width: 150rpx;
  271. font-weight: bold;
  272. }
  273. </style>
  274. <style lang="scss">
  275. .footer {
  276. left: 0%;
  277. bottom: 50rpx;
  278. width: 100%;
  279. padding: 0 24rpx;
  280. position: fixed;
  281. z-index: 99;
  282. .btn {
  283. height: 84rpx;
  284. line-height: 84rpx;
  285. background-color: $-color-primary;
  286. box-shadow: 0rpx 6rpx 12rpx 2rpx rgba(243, 113, 113, 0.39);
  287. border-radius: 18rpx 18rpx 18rpx 18rpx;
  288. }
  289. }
  290. </style>