perfect.vue 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263
  1. <template>
  2. <view class="center">
  3. <u-form>
  4. <view class="modular">
  5. <u-form-item label="公司名称" label-width="30%" class="title Medium" :border-bottom="topBorder">
  6. <u-input v-model="deptList.name" input-align="right" class="write Regular" placeholder="请输入公司名称" />
  7. </u-form-item>
  8. </view>
  9. <view class="modular">
  10. <view class="title Medium">企业概况</view>
  11. <!-- <u-input v-model="value" :type="type" :height="height" :auto-height="autoHeight" placeholder="请输入企业概况,如经营项目、产品类型、企业规模等,不超过300个字" /> -->
  12. <textarea value="" placeholder="请输入企业概况,如经营项目、产品类型、企业规模等,不超过300个字" class="areaText Regular"
  13. v-model="deptList.a" placeholder-style="color:#AFB3BF"/>
  14. <view class="title Regular">添加标签(标签应突出企业特色,最多6个)</view>
  15. <view class="flex" style="width: 100%;">
  16. <view class="forLists" v-for="(item,index) in label" :Key="index">
  17. <u-tag :text="item" mode="dark" class="forList Medium" shape="circle" :show="show"
  18. :closeable="closeable" color="#22C572" @close="closeForList(index)" />
  19. </view>
  20. <u-tag text="+" mode="plain" shape="circle" :show="show1" color="#2E2E2D" bg-color="#FFFFFF"
  21. border-color="#F9F9FA" class="add" @click="add"></u-tag>
  22. </view>
  23. <view class="addinput flex" v-if="inputShow">
  24. <u-input v-model="value" type="type" border focus v-if="inputShow"
  25. style="border-radius: 50rpx;line-height: 70rpx;font-size: 10px;" placeholder="请输入标签内容,不超过6个字" />
  26. <u-button :type="types" class="inputOk" shape="circle" @click="addinput">确定</u-button>
  27. </view>
  28. </view>
  29. <view class="modular">
  30. <view class="title Regular">场地照片(图片清晰,最多9张)</view>
  31. <u-upload :action="action" :file-list="fileList" @on-success="uploadSuccess" @on-remove="imgRemove"
  32. :max-count="9"></u-upload>
  33. </view>
  34. <view class="modular">
  35. <view class="title Medium">联系方式</view>
  36. <view v-for="(item,index) in Persons">
  37. <view class="information flex">
  38. <view class="xinxi">
  39. <u-form-item label="姓名" label-width="30%" class="Regular" label-position="top"
  40. style="font-size: 28rpx; color: #71747C;" :border-bottom="topBorder">
  41. <u-input v-model="item.name" class="Regular" placeholder="请输入姓名" />
  42. </u-form-item>
  43. </view>
  44. <view class="xinxi">
  45. <u-form-item label="电话" label-width="30%" class="Regular" label-position="top"
  46. style="font-size: 28rpx; color: #71747C;" :border-bottom="topBorder">
  47. <u-input v-model="item.phone" class="Regular" placeholder="请输入电话" />
  48. </u-form-item>
  49. </view>
  50. <div class="del" @click="delPerson(index)">
  51. <span style="font-size: 46rpx; color: #22C572;">×</span>
  52. </div>
  53. </view>
  54. </view>
  55. <view class="addPerson" @click="addPerson">
  56. <image src="../../static/img/liangmai/jia@3x.png" mode=""
  57. style="width: 26rpx;height: 26rpx;top: 2rpx;"></image>
  58. 添加联系人
  59. </view>
  60. </view>
  61. <view class="modular">
  62. <u-form-item label="邮箱" label-width="30%" class="title Regular">
  63. <u-input v-model="deptList.name" input-align="right" class="write Regular" placeholder="请输入电子邮箱" />
  64. </u-form-item>
  65. <u-form-item label="传真" label-width="30%" class="title Regular" :border-bottom="topBorder">
  66. <u-input v-model="deptList.name" input-align="right" class="write Regular" placeholder="请输入传真号" />
  67. </u-form-item>
  68. </view>
  69. </u-form>
  70. <u-button type="success" shape="circle" style="margin-top: 20rpx;" @click="submit">提交</u-button>
  71. </view>
  72. </template>
  73. <script>
  74. export default {
  75. data() {
  76. return {
  77. deptList: {},
  78. label: ["世界一流", "世界500强"],
  79. closeable: true,
  80. show: true,
  81. show1: true,
  82. types: "",
  83. inputShow: false,
  84. value: "", //临时标签内容字段 后期更换
  85. action: 'https://www.zthymaoyi.com/upload/admin',
  86. fileList: [],
  87. imgList: [],
  88. Persons: [{
  89. name: "张良",
  90. phone: "1365411111"
  91. }],
  92. topBorder: false,
  93. }
  94. },
  95. methods: {
  96. add() {
  97. if (this.label.length >= 6) {
  98. this.inputShow = false
  99. } else {
  100. this.inputShow = true
  101. }
  102. },
  103. addinput() {
  104. if (!this.value) {
  105. this.$api.msg('标签内容不能为空')
  106. return
  107. }
  108. if (this.value.length < 2 || this.value.length > 6) {
  109. this.$api.msg('标签内容输入有误')
  110. return
  111. }
  112. this.label.push(this.value)
  113. this.value = ""
  114. this.inputShow = false
  115. },
  116. addPerson() {
  117. this.Persons.push({
  118. name: "",
  119. phone: "",
  120. })
  121. },
  122. delPerson(index) {
  123. this.Persons.splice(index, 1)
  124. },
  125. closeForList(index) {
  126. this.label.splice(index, 1)
  127. },
  128. imgRemove(e) {
  129. this.imgList.splice(e, 1)
  130. },
  131. uploadSuccess(e) {
  132. this.imgList.push(e.url)
  133. },
  134. submit() {
  135. uni.showModal({
  136. content: "详细的企业信息有助于客户了解您的企业,是否确定提交?",
  137. showCancel: true,
  138. confirmText: '提交',
  139. success: function(res) {
  140. if (res.confirm) {
  141. }
  142. }
  143. })
  144. }
  145. }
  146. }
  147. </script>
  148. <style lang="scss" scoped>
  149. .center {
  150. padding: 10rpx 20rpx;
  151. }
  152. .title {
  153. margin-left: 20rpx;
  154. color: #333333;
  155. line-height: 70rpx;
  156. }
  157. .write {
  158. margin-right: 20px;
  159. color: #71747C;
  160. }
  161. .modular {
  162. background-color: #FFFFFF;
  163. border-radius: 12px;
  164. margin-top: 20px;
  165. }
  166. .areaText {
  167. width: 90%;
  168. padding: 30rpx;
  169. border: 2rpx solid #F9F9FA;
  170. background-color: #F9F9FA;
  171. margin: 10rpx auto 20rpx;
  172. border-radius: 20rpx;
  173. color: #AFB3BF;
  174. font-size: 28rpx;
  175. }
  176. .add {
  177. padding: 15rpx 30rpx;
  178. width: 120rpx;
  179. height: 65rpx;
  180. text-align: center;
  181. margin-left: 24rpx;
  182. font-size: 30rpx;
  183. font-weight: 600;
  184. margin-bottom: 10rpx;
  185. }
  186. .forLists {
  187. margin-bottom: 10rpx;
  188. }
  189. .forList {
  190. height: 64rpx;
  191. background-color: #F4FAF8;
  192. padding: 20rpx 30rpx;
  193. color: #22C572;
  194. margin-left: 24rpx;
  195. text-align: center;
  196. }
  197. .addinput {
  198. width: 70%;
  199. margin: 20rpx auto;
  200. border-radius: 50rpx;
  201. }
  202. .inputOk {
  203. width: 100rpx;
  204. border-radius: 40rpx;
  205. background-color: #E9EAE9;
  206. color: #FFFFFF;
  207. border: none;
  208. }
  209. .picture {
  210. width: 144rpx;
  211. height: 144rpx;
  212. border: 4rpx dashed #AFB3BF;
  213. }
  214. .upload {
  215. height: 140rpx;
  216. text-align: center;
  217. margin: 20px 0;
  218. margin-bottom: 20px;
  219. }
  220. .addPerson {
  221. width: 230rpx;
  222. height: 80rpx;
  223. line-height: 80rpx;
  224. text-align: center;
  225. border: 2rpx solid #979797;
  226. border-radius: 40rpx;
  227. margin: 20rpx auto 20rpx;
  228. }
  229. .information {
  230. background-color: #F4FAF8;
  231. width: 96%;
  232. height: 180rpx;
  233. margin: 0 auto;
  234. border: 1rpx dashed #22C572;
  235. border-radius: 10rpx;
  236. margin-top: 30rpx;
  237. }
  238. .xinxi {
  239. margin-left: 70rpx;
  240. }
  241. .del {
  242. justify-content: flex-end;
  243. margin: 10rpx 20rpx 0 0;
  244. }
  245. </style>