add.vue 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. <template>
  2. <view >
  3. <uni-forms ref="form" :model="datainfo">
  4. <view class="address">
  5. <view class="adrbox flex1 flexdc">
  6. <view class="flex1">
  7. <view class="chtop flexc">
  8. <view class="line"></view>
  9. <view>基本信息</view>
  10. </view>
  11. <view class="plr15">
  12. </uni-forms-item>
  13. <uni-forms-item label="标题" required="true" name="phonenumber">
  14. <view class="flexc">
  15. <uni-easyinput v-model="datainfo.phonenumber" :inputBorder='false' placeholder="请输入标题信息" />
  16. <view class="rimg"></view>
  17. </view>
  18. </uni-forms-item>
  19. <uni-easyinput type="textarea" autoHeight v-model="datainfo.companyIntroduction" :inputBorder='false' placeholder="请详细描述您的投诉建议内容(最多可输入200字哦)" />
  20. <view class="voice mb28">
  21. <view class="flexc">
  22. <image :src="voice"></image>
  23. 语音输入
  24. </view>
  25. </view>
  26. </view>
  27. <!-- 图片 -->
  28. <view class="imgs">
  29. <view class="img" @click="getPreview">
  30. <image :src="photo" class="pico"></image>
  31. <image :src="del" class="del" @click="getDelFn"></image>
  32. </view>
  33. <view class="img" @click="getPreview">
  34. <image :src="photo" class="pico"></image>
  35. <image :src="del" class="del" @click="getDelFn"></image>
  36. </view>
  37. <view class="img" @click="getPreview">
  38. <image :src="photo" class="pico"></image>
  39. <image :src="del" class="del" @click="getDelFn"></image>
  40. </view>
  41. <view class="img" @click="getPreview">
  42. <image :src="photo" class="pico"></image>
  43. <image :src="del" class="del" @click="getDelFn"></image>
  44. </view>
  45. <view class="addbox" @click="getaddImage">
  46. <image :src="photo" class="pico"></image>
  47. <view>添加图片</view>
  48. </view>
  49. </view>
  50. </view>
  51. <view class="plr15 flex0 mt30">
  52. <view class="rhbtn " @click="getAddFn">提交信息</view>
  53. </view>
  54. </view>
  55. </view>
  56. </uni-forms>
  57. <loading></loading>
  58. </view>
  59. </template>
  60. <script>
  61. import config from '@/config'
  62. const baseUrl = config.baseUrl
  63. import { addressPermi, addressRole } from "@/utils/permission"; // 权限判断函数
  64. export default{
  65. components:{},
  66. data(){
  67. return{
  68. rimg:require('@/static/images/rimg.png'),
  69. check: require('@/mine/static/check.png'),
  70. ncheck: require('@/mine/static/ncheck.png'),
  71. voice: require('@/work/static/voice.png'),
  72. photo:require("@/work/static/service/photo.png"),
  73. del:require('@/work/static/service/rdel.png'),
  74. list:[{tit:'123',isdefault:true},{tit:'212123',isdefault:false,isuser:true},],
  75. text:"",
  76. datainfo:{},
  77. mjlist:[{tit:'80m²以内',val:'0'},{tit:'80-90m²',val:'1'},{tit:'90-119m²',val:'2'},{tit:'120-139m²',val:'3'},{tit:'140-159m²',val:'4'},{tit:'160m²以上',val:'5'},],
  78. checkflag:true,
  79. tabval:'0',
  80. sexs: [{
  81. text: '男',
  82. value: 0
  83. }, {
  84. text: '女',
  85. value: 1
  86. }],
  87. }
  88. },
  89. onLoad: function() {
  90. },
  91. methods:{
  92. addressPermi, addressRole,
  93. getAddFn(){
  94. // this.$tab.navigateTo("/mine/pages/house/addaddress")
  95. },
  96. getTabFn(val){
  97. this.tabval=val
  98. },
  99. getDataFn(){
  100. return
  101. var params={
  102. pageSize:this.pageSize,
  103. pageNum: this.pageNum,
  104. }
  105. params.noticeType=this.tabidx
  106. getNoticeList(params).then(res=>{
  107. if(res.code==200){
  108. }else{
  109. this.$toast(res.msg)
  110. }
  111. })
  112. },
  113. }
  114. }
  115. </script>
  116. <style>
  117. page{background: #F3F3F0;}
  118. </style>
  119. <style lang="scss" scoped>
  120. .address /deep/ .uni-forms-item{min-height: 106rpx;box-sizing: border-box;display: flex;align-items: center;margin-bottom: 0;border-bottom: 2rpx solid #E6E6E6;padding:10rpx 0;}
  121. .address /deep/ .uni-forms-item:last-child{border-bottom: none;}
  122. .address /deep/ .uni-forms-item__label{font-weight: bold;font-size: 26rpx;color: #222327;flex: 0 0 auto;width: auto !important;padding-left: 12rpx;}
  123. .address /deep/ .uni-easyinput{flex: 1;text-align: right;font-size: 26rpx;color: #222327;}
  124. .address /deep/ .uni-easyinput__content-textarea{min-height: 140rpx;font-size: 26rpx;
  125. border-radius: 10rpx;padding: 20rpx 14rpx;text-align: left;}
  126. .address /deep/ .uni-easyinput__placeholder-class{font-size: 26rpx;color: #AAAAAA;}
  127. .address /deep/ .uni-input-input{font-size: 26rpx;}
  128. .address /deep/ .uni-textarea-textarea{font-size: 26rpx;}
  129. .address /deep/ .is-required{font-size: 26rpx;color: #F40027;margin-right: 4rpx;}
  130. .address /deep/ .is-disabled{color: #222327;background-color: #ffffff !important;}
  131. .address{min-height: 100vh;padding: 20rpx 18rpx 30rpx;display: flex;flex-direction: column;}
  132. .adrbox{background: #FFFFFF;border-radius: 20rpx;padding-bottom: 100rpx;
  133. .rimg{width: 16rpx;height: 28rpx;flex: 0 0 auto;margin-left: 20rpx;
  134. image{width: 100%;height: 100%;}
  135. }
  136. &.mjbox{
  137. padding: 36rpx 24rpx 18rpx;
  138. .tit{font-weight: bold;font-size: 26rpx;color: #272727;padding-left: 18rpx;}
  139. .adrlist{
  140. view{font-weight: bold;font-size: 26rpx;color: #666666;min-width: 198rpx;padding: 0 10rpx;box-sizing: border-box;margin: 0 12rpx 24rpx;height: 64rpx;display: flex;align-items: center;justify-content: center;border-radius: 10rpx;border: 2rpx solid #C1C1C1;
  141. &.act{background: #DFEAFF;border: 2rpx solid #0256FD;color: #0256FD;}
  142. }
  143. }
  144. }
  145. .chtop{margin-bottom: 8rpx;padding-top: 32rpx;
  146. view{font-weight: bold;font-size: 28rpx;color: #272727;}
  147. .line{width: 14rpx;height: 48rpx;background: #0256FD;border-radius:0 12rpx 12rpx 0;margin-right: 18rpx;}
  148. }
  149. .voice{font-weight: 500;display: flex;justify-content:flex-end;align-items: center;margin-top: 40rpx;font-size: 24rpx;color: #45CB99;
  150. image{width: 24rpx;height: 24rpx;margin-right: 8rpx;}
  151. }
  152. .imgs{display: flex;align-items: center;flex-wrap: wrap;padding: 0 24rpx;
  153. .img{width: 142rpx;height:142rpx;border-radius: 20rpx;margin: 0 12rpx 20rpx 12rpx;position: relative;
  154. // &:nth-of-type(2n){margin-right: 0;}
  155. }
  156. .pico{width: 100%;height: 100%;border-radius: 20rpx;}
  157. .del{width: 24rpx;height: 24rpx;position: absolute;right: 0;top: 0;}
  158. .addbox{background: #F0F0F0;border-radius: 20rpx;display: flex;align-items: center;flex-direction: column;width: 142rpx;height:142rpx;justify-content: center;margin:0 12rpx 20rpx 12rpx;
  159. image{width: 48rpx;height: 42rpx;margin-bottom: 12rpx;}
  160. view{font-weight: 500;font-size: 24rpx;color: #666666;}
  161. }
  162. }
  163. .checkimg{width: 80rpx;height: 40rpx;margin-right: 8rpx;}
  164. }
  165. </style>