evaluatePlan.vue 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <template>
  2. <uni-check-list :listData="list" types="radio" @ok="chooseOk" @rightClick="viewDetail">
  3. <view slot="right">
  4. 详情 <u-icon name="icon-xian-11" custom-prefix="xd-icon" size="28" color="#888888"></u-icon>
  5. </view>
  6. </uni-check-list>
  7. </template>
  8. <script>
  9. export default {
  10. data() {
  11. return {
  12. list: [
  13. {
  14. id: '1232',
  15. name: '爱的街坊邻居爱上了对方加拉附件爱的街坊邻居爱上了对方加拉附件',
  16. },
  17. {
  18. id: '2223',
  19. name: 'banner',
  20. },
  21. {
  22. id: '3333',
  23. name: 'orange',
  24. }
  25. ],
  26. value: '',
  27. }
  28. },
  29. methods: {
  30. // 选中方案,item 返回的是数组
  31. chooseOk(item) {
  32. console.log(item)
  33. if(item.length==0){
  34. uni.showToast({
  35. icon:'none',
  36. title:'请选择考评方案'
  37. })
  38. }else{
  39. //关闭当前页面,这里处理数据逻辑
  40. }
  41. },
  42. // 查看详情
  43. viewDetail(item){
  44. uni.navigateTo({
  45. url:"/pages/evaluatePlan/planDetail?id="+item.id
  46. })
  47. }
  48. }
  49. }
  50. </script>
  51. <style lang="scss">
  52. page{
  53. height: 100%;
  54. }
  55. </style>