questionItem.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. <template>
  2. <view class="question-item">
  3. <view class="cont">
  4. <!-- 提问item -->
  5. <!-- <template v-if="type==='question'"> -->
  6. <veiw class="item-title">美元指数很强,之后是怎么看?问题来点字数但我也不知道打点什么就来点废话文学好了,差不多凑到50字就行哩</veiw>
  7. <!-- <textarea
  8. v-model="message"
  9. placeholder="发布一条友善的评论"
  10. auto-height
  11. :show-confirm-bar="false"
  12. :cursor-spacing="20"
  13. :maxlength="50"
  14. class="item-title"
  15. /> -->
  16. <view class="row">提问人:打到我</view>
  17. <view class="row">提问时间:2022.03.23 17:22:22</view>
  18. <view class="item-bottom row flex">
  19. <view class="flex">
  20. 回答者:
  21. <view class="select-wrapper" @click="">
  22. <input type="text" placeholder="请选择研究员" disabled class="ipt">
  23. <van-icon name="play" color="#999" style="transform: rotate(90deg);position: absolute;right: 20rpx;top: 30%;"/>
  24. </view>
  25. </view>
  26. <view class="status blue-color">待分配</view>
  27. </view>
  28. <!-- </template> -->
  29. <!-- 评论item -->
  30. <!-- <template v-else>
  31. <veiw class="item-title">美元指数很强,之后是怎么看?问题来点字数但我也不知道打点什么就来点废话文学好了,差不多凑到50字就行哩</veiw>
  32. <view class="row">评论人:打到我</view>
  33. <view class="row">客户信息:dwqjwijwi</view>
  34. <view class="row">评论时间:2022.03.23 17:22:22</view>
  35. </template> -->
  36. </view>
  37. <view class="action-bot flex">
  38. <text class="red-color" @click="actionHandle('del')">删除</text>
  39. <!-- <text>编辑</text> -->
  40. <text class="blue-color" @click="actionHandle('send')">分配</text>
  41. <text class="blue-color" @click="actionHandle('hot')">精选</text>
  42. </view>
  43. <!-- 选择研究员 -->
  44. <van-popup :show="isResearcherPicker" position="bottom">
  45. <view class="select-rs-header">
  46. <text class="cancel" @click="cancelResearcher">取消</text>
  47. <text class="ensure" @click="confirmResearcher">确认</text>
  48. </view>
  49. <van-tree-select
  50. :items="researcherList"
  51. :main-active-index="rs_picker.firstindex"
  52. :active-id="rs_picker.id"
  53. @click-nav="clickFirstHandle"
  54. @click-item="clickItemHandle"
  55. />
  56. </van-popup>
  57. </view>
  58. </template>
  59. <script>
  60. export default {
  61. props: {
  62. type: String,
  63. status: String,
  64. item: Object
  65. },
  66. data() {
  67. return {
  68. message: '带我去大青蛙多无群多无'
  69. };
  70. },
  71. methods: {
  72. /* 操作*/
  73. actionHandle(key) {
  74. const actionmap = {
  75. 'del': this.delHandle,
  76. 'send': this.sendQuestionHandle,
  77. 'hot': this.setHotHandle
  78. }
  79. actionmap[key]()
  80. },
  81. /* 删除 */
  82. delHandle() {
  83. wx.showModal({
  84. title: "",
  85. content: "确认删除吗?",
  86. confirmColor: "#EE3636",
  87. cancelColor: '#333',
  88. success: function() {
  89. // const { code } = await delComment({ comment_id });
  90. // if( code !== 200 ) return
  91. // wx.showToast({title: '删除成功'});
  92. }
  93. })
  94. },
  95. /* 分配研究员 */
  96. sendQuestionHandle() {
  97. },
  98. /* 设置精选 */
  99. setHotHandle() {
  100. }
  101. }
  102. }
  103. </script>
  104. <style lang="scss" scoped>
  105. .blue-color {
  106. color: #3385FF;
  107. }
  108. .red-color {
  109. color: #D63535;
  110. }
  111. .flex {
  112. display: flex;
  113. align-items: center;
  114. }
  115. .question-item {
  116. background: #fff;
  117. padding: 20rpx 0 0;
  118. border-radius: 8rpx;
  119. font-size: 28rpx;
  120. margin-bottom: 20rpx;
  121. .cont {
  122. padding: 0 20rpx;
  123. }
  124. .item-title {
  125. color: #333;
  126. font-size: 32rpx;
  127. }
  128. .row {
  129. margin: 15rpx 0;
  130. }
  131. .item-bottom {
  132. justify-content: space-between;
  133. .select-wrapper {
  134. width: 250rpx;
  135. border: 1px solid #F1F2F6;
  136. padding: 0 40rpx 0 20rpx;
  137. position: relative;
  138. .ipt {
  139. height: 80rpx;
  140. line-height: 80rpx;
  141. }
  142. }
  143. }
  144. .action-bot {
  145. border-top: 1px solid #EAEAEA;
  146. margin-top: 30rpx;
  147. text {
  148. padding: 24rpx 0;
  149. flex: 1;
  150. text-align: center;
  151. border-right: 1px solid #EAEAEA;
  152. &:last-child { border: none; }
  153. }
  154. }
  155. }
  156. </style>