dmSureSubmitPicker.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262
  1. <template>
  2. <dm-pop-view ref='popView' :title="title" :isShowClose="false" :isShowConfirm="false" :maskTapHide='maskTapHide'>
  3. <view class="content" :style="`height: ${showType==4? '720rpx': '526rpx'}`">
  4. <view class="typeA-content" v-if="showType == 1">
  5. <view class="btnA" :style="`background-color: ${themeColor}`" @click="sureAction">提交</view>
  6. <view class="btnB" @click="cancelAction">不提交</view>
  7. </view>
  8. <view class="typeB-content" v-if="showType == 2">
  9. <view class="typeB-top">
  10. <view class="typeB-top-btn" v-for="(item, index) in updataList" :key="index" @click="updataAction(index)">
  11. <view class="circle" :style="`border: 20rpx solid ${themeColor};`" v-if="item.isSelect"></view>
  12. <view class="circle" style="background-color: #F1F5F9;" v-else></view>
  13. <view class="name">
  14. {{item.title}}
  15. </view>
  16. </view>
  17. </view>
  18. <view class="btnA" :style="`background-color: ${themeColor}; margin-top: 70rpx`" @click="sureUpdataAction">确定</view>
  19. </view>
  20. <view class="typeC-content" v-if="showType == 3">
  21. <view class="typeC-title">等级说明</view>
  22. <view class="typeC-list">
  23. <view class="typeC-Detail">
  24. <view class="top-left" :style="`color: ${fuzhuColor}`">{{showLevel}}</view>
  25. <view class="top-left-des">意向等级</view>
  26. </view>
  27. <view class="typeC-Detail">
  28. <view class="top-left" style="color: #666666">{{ypkScoreLevel || '-'}}</view>
  29. <view class="top-left-des">意向等级</view>
  30. </view>
  31. </view>
  32. <view class="btnA" :style="`background-color: ${themeColor}; margin-top: 50rpx`" @click="knowAction">知道了</view>
  33. </view>
  34. <view class="typeD-content" v-if="showType == 4">
  35. <view class="top-level" :style="`color: ${fuzhuColor}`">{{showScore}}</view>
  36. <view class="top-des">把控值</view>
  37. <view class="level-des">分值说明</view>
  38. <text class="score-des-text">
  39. {{type4Content}}
  40. </text>
  41. <view class="btnA" :style="`background-color: ${themeColor}; margin-top: 100rpx`" @click="knowAction">知道了</view>
  42. </view>
  43. </view>
  44. </dm-pop-view>
  45. </template>
  46. <script>
  47. import dmPopView from './dmPopView.vue'
  48. let app = getApp();
  49. export default {
  50. props: {
  51. maskTapHide: {
  52. type: Boolean,
  53. default: true
  54. },
  55. title: String,
  56. showType: {
  57. type: Number,
  58. default:() => {
  59. return 1
  60. }
  61. },
  62. type4Content: String,
  63. showLevel: String,
  64. showScore: String,
  65. ypkScoreLevel: String,
  66. },
  67. data() {
  68. return {
  69. themeColor: null,
  70. fuzhuColor: null,
  71. themeColor50: null,
  72. themeColor25: null,
  73. fuzhuColor50: null,
  74. updataList: [
  75. {title: '更新', isSelect: true},
  76. {title: '不更新', isSelect: false}
  77. ],
  78. selectIdx: 0,
  79. }
  80. },
  81. mounted() {
  82. this.themeColor = app.globalData.themeColor
  83. this.themeColor50 = app.globalData.themeColor50
  84. this.themeColor25 = app.globalData.themeColor25
  85. this.fuzhuColor = app.globalData.fuzhuColor
  86. this.fuzhuColor50 = app.globalData.fuzhuColor50
  87. },
  88. methods: {
  89. show() {
  90. this.$refs.popView.show()
  91. },
  92. knowAction(){
  93. this.$refs.popView.hide()
  94. this.$refs.popView.hide()
  95. },
  96. sureAction() {
  97. this.$emit('submitPickerSure')
  98. },
  99. cancelAction() {
  100. this.$emit('submitPickerCancel')
  101. this.$refs.popView.hide()
  102. },
  103. updataAction(idx) {
  104. this.selectIdx = idx
  105. this.updataList.forEach((item, index) => {
  106. item.isSelect = index == idx ? true : false
  107. })
  108. },
  109. sureUpdataAction() {
  110. this.$emit('sureUpdataAction', this.selectIdx)
  111. this.$refs.popView.hide()
  112. },
  113. },
  114. components: {
  115. dmPopView
  116. }
  117. }
  118. </script>
  119. <style scoped lang="scss">
  120. .content {
  121. width: 100%;
  122. height: 526rpx;
  123. font-family: Verdana;
  124. text-align: center;
  125. .typeA-content {
  126. width: 100%;
  127. }
  128. .typeB-content {
  129. width: 100%;
  130. }
  131. .typeC-content {
  132. width: 100%;
  133. .typeC-title {
  134. color: #333333;
  135. font-size: 28rpx;
  136. }
  137. .typeC-list {
  138. margin-top: 100rpx;
  139. display: flex;
  140. flex-direction: row;
  141. justify-content: center;
  142. }
  143. .typeC-Detail {
  144. width: 40%;
  145. .top-left {
  146. font-size: 92rpx;
  147. font-weight: bold;
  148. font-family: DIN Alternate;
  149. height: 106rpx;
  150. line-height: 106rpx;
  151. }
  152. .top-left-des {
  153. color: #606060;
  154. font-size: 20rpx;
  155. }
  156. }
  157. }
  158. .typeD-content {
  159. width: 100%;
  160. .top-level {
  161. font-size: 92rpx;
  162. font-weight: bold;
  163. font-family: DIN Alternate;
  164. }
  165. .top-des {
  166. color: #606060;
  167. font-size: 20rpx;
  168. }
  169. .level-des {
  170. color: #333333;
  171. font-size: 28rpx;
  172. margin-top: 60rpx;
  173. }
  174. .score-des-text {
  175. font-size: 28rpx;
  176. color: #333333;
  177. }
  178. }
  179. .typeB-top {
  180. display: flex;
  181. flex-direction: row;
  182. justify-content: space-evenly;
  183. margin-top: 198rpx;
  184. .typeB-top-btn {
  185. width: 100rpx;
  186. height: 100rpx;
  187. .circle {
  188. margin-left: 14rpx;
  189. width: 72rpx;
  190. height: 72rpx;
  191. border-radius: 36rpx;
  192. box-sizing: border-box;
  193. }
  194. .name {
  195. margin-top: 16rpx;
  196. font-size: 28rpx;
  197. color: #666666;
  198. }
  199. }
  200. }
  201. .btnA {
  202. width: 260rpx;
  203. height: 84rpx;
  204. border-radius: 42rpx;
  205. font-size: 32rpx;
  206. color: #FFFFFF;
  207. line-height: 84rpx;
  208. margin-left: 246rpx;
  209. margin-top: 30%;
  210. }
  211. .btnB {
  212. margin-top: 40rpx;
  213. width: 260rpx;
  214. height: 84rpx;
  215. border-radius: 42rpx;
  216. font-size: 32rpx;
  217. color: #666666;
  218. line-height: 84rpx;
  219. margin-left: 246rpx;
  220. }
  221. }
  222. </style>