role.vue 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <template>
  2. <view class="box">
  3. <view class="htit">请选择您的身份</view>
  4. <view class="rolesbox flexc" v-for="(ite,idx) in roles" :key="idx" @click="getCheck(ite.val)">
  5. <!-- <image :src="rolebga"></image> -->
  6. <view class="limgs">
  7. <image :src="rolea" class="imga" v-if="ite.val==0"></image>
  8. <image :src="roleb" class="imgb" v-else-if="ite.val==1"></image>
  9. <image :src="rolec" class="imga" v-else-if="ite.val==2"></image>
  10. <image :src="roled" class="imga" v-else></image>
  11. </view>
  12. <view class="titbox">
  13. <view class="tit">{{ite.tit}}</view>
  14. <view class="txt">{{ite.txt}}</view>
  15. </view>
  16. <view class="checkbox" >
  17. <image :src="chose" v-if="cheval==ite.val"></image>
  18. <image :src="nchose" v-else></image>
  19. </view>
  20. </view>
  21. <view class="abtns">确认</view>
  22. <loading></loading>
  23. </view>
  24. </template>
  25. <script>
  26. import {checkPermi,checkRole} from "@/utils/permission"; // 权限判断函数
  27. import {getDictionaryFn} from "@/api/mine/register.js"
  28. export default {
  29. components:{},
  30. data(){
  31. return{
  32. rolea:require("@/work/images/rz/rolea.png"),
  33. roleb:require("@/work/images/rz/roleb.png"),
  34. rolec:require("@/work/images/rz/rolec.png"),
  35. roled:require("@/work/images/rz/roled.png"),
  36. chose:require("@/work/images/rz/chose.png"),
  37. nchose:require("@/work/images/rz/nchose.png"),
  38. roles:[{tit:'家长',txt:'parents',val:0,},{tit:'社区',txt:'community',val:1,},{tit:'物业',txt:'property management',val:2,},{tit:'水利局',txt:'water conservancy bureau',val:3,},],
  39. cheval:0
  40. }
  41. },
  42. onShow() {
  43. },
  44. onLoad: function() {
  45. // this.init();
  46. },
  47. methods:{
  48. checkPermi,checkRole,
  49. init(){
  50. //工单类型
  51. getDictionaryFn('work_order_type').then(res => {
  52. if (res.code == 200) {
  53. this.gdList = res.data.map(v => {
  54. return {
  55. dictLabel: v.dictLabel,
  56. dictValue: v.dictValue
  57. }
  58. })
  59. }
  60. })
  61. },
  62. getCheck(val){
  63. this.cheval=val;
  64. },
  65. getDataFn(){
  66. getworkInfoList(params).then(res=>{
  67. })
  68. },
  69. }
  70. }
  71. </script>
  72. <style lang="scss" scoped>
  73. .box{padding: 36rpx 48rpx 54rpx;
  74. .htit{font-weight: bold;font-size: 30rpx;color: #000000;margin-bottom: 52rpx;}
  75. }
  76. .rolesbox{width: 100%;height: 200rpx;position: relative;border-radius: 0 100rpx 0 100rpx;background: #F8F8F8;padding-left:206rpx;margin-bottom: 70rpx;
  77. .titbox{
  78. .tit{font-weight: bold;font-size: 30rpx;color: #000000;margin-bottom: 16rpx;}
  79. .txt{font-weight: bold;font-size: 24rpx;color: #AAAAAA;}
  80. }
  81. .limgs{position: absolute;left: 46rpx;bottom: 0;width: 106rpx;height: 178rpx;display: flex;align-items: center;justify-content: center;
  82. .imga{width: 100%;height: 100%;}
  83. .imgb{width: 92rpx;height: 174rpx;}
  84. }
  85. .checkbox{width: 30rpx;height: 30rpx;position: absolute;right: 46rpx;bottom: 34rpx;
  86. image{width: 100%;height: 100%;}
  87. }
  88. }
  89. </style>