hbgxx.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. <template>
  2. <view>
  3. <view class="boxt" v-for="(ite,idx) in bhxxlist" :key="idx">
  4. <view class="txt">
  5. <view class="flex1 flexc">{{ite.label}}
  6. <template v-if="checkPermi(['system:fj:add'])&&pfrom=='bhxx'">
  7. <view class="editf" @click="getfjEdit(ite.val)">
  8. <image :src="editf"></image>
  9. <view>上传</view>
  10. </view>
  11. </template>
  12. </view>
  13. </view>
  14. <view class="mt18" v-if="fileFj&&fileFj[ite.val]&&fileFj[ite.val].length">
  15. <view class="fjlists" v-for="(fite,fidx) in fileFj[ite.val]" :key='fidx'>
  16. <view class="flext flex1" @click="getDown(fite.url)">
  17. <view class="imgl"><image :src="filico" ></image></view>
  18. <view class="tit">{{fite.name}}</view>
  19. </view>
  20. <template v-if="pfrom=='bhxx'">
  21. <template >
  22. <view class="delimg flex0" v-if="checkPermi(['system:fj:remove'])" @click.stop="getDelwjFj(fite.fjId)">
  23. <image :src="fdelimg"></image>
  24. </view>
  25. </template>
  26. </template>
  27. <text class="txta" @click="getDown(fite.url)">预览</text>
  28. </view>
  29. </view>
  30. </view>
  31. </view>
  32. </template>
  33. <script>
  34. import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
  35. import { selectValue } from '@/utils/common.js';
  36. import noData from "@/components/nodata/nodata.vue"
  37. export default {
  38. props:{
  39. datainfo: {
  40. type: Object,
  41. default () {
  42. return {}
  43. }
  44. },
  45. fileFj:{
  46. type: Object,
  47. default () {
  48. return {}
  49. }
  50. },
  51. bhxxlist:{
  52. type: Array,
  53. default () {
  54. return []
  55. }
  56. },
  57. pfrom:{
  58. type: String,
  59. default () {
  60. return ''
  61. }
  62. }
  63. },
  64. components:{
  65. noData
  66. },
  67. data(){
  68. return{
  69. upimg: require('@/work/static/images/up.png'),
  70. fupimg:require('@/work/static/images/fup.png'),
  71. filico:require('@/work/static/images/filico.png'),
  72. edit:require('@/work/static/images/edit.png'),
  73. editf:require('@/work/static/images/editfile.png'),
  74. fdelimg:require('@/work/static/images/del.png'),
  75. gdfilelist:[],
  76. zheList:[],
  77. userId:this.$store.state.user.userId,
  78. fileList:[]
  79. }
  80. },
  81. onLoad: function() {
  82. },
  83. methods:{
  84. checkPermi, checkRole,
  85. kaType(ite){
  86. return selectValue(this.tajdlist, ite);
  87. },
  88. getZheFn(idx){
  89. this.zheList[idx].zheflag=!this.zheList[idx].zheflag
  90. },
  91. getfjEdit(val){
  92. this.$emit('getBhqtfjEdit',val)
  93. },
  94. getDown(url){
  95. this.$emit('getDown',url)
  96. },
  97. getPreview(url){
  98. this.$emit('getPreview',url)
  99. },
  100. getDelwjFj(id){
  101. this.$emit('getDelwjFj',id)
  102. },
  103. getQmFn(url){
  104. this.$emit('getQmFn',url)
  105. },
  106. },
  107. }
  108. </script>
  109. <style lang="scss" scoped>
  110. .boxt{padding:44rpx 36rpx 40rpx;border-top: 2rpx solid #E6E6E6;}
  111. .txt{display: flex;align-items: flex-start;
  112. view{font-weight: bold;font-size: 30rpx;color: #222327;}
  113. text{color: #28C529;font-weight: 500;line-height: 40rpx;flex: 0 0 auto;margin-left: 46rpx;padding: 0 6rpx;}
  114. .upimg{width:40rpx;height: 40rpx;margin-left: 18rpx;display: flex;align-items: center;justify-content: center;
  115. image{width: 30rpx;height: 28rpx;}
  116. }
  117. }
  118. .fjlists {display: flex;align-items: flex-start;justify-content: space-between;margin-bottom: 20rpx;
  119. &:last-child{margin-bottom: 0;}
  120. .imgl{width: 40rpx;height: 40rpx;display: flex;align-items: center;flex: 0 0 auto;
  121. image{width: 26rpx;height: 24rpx;}
  122. }
  123. .tit{font-size: 26rpx;color: #222327;font-weight: 500;margin-top: 4rpx;word-break: break-all;}
  124. .delimg{width: 40rpx;height:40rpx;margin-left: 16rpx;display: flex;align-items: center;justify-content: center;flex: 0 0 auto;
  125. image{width: 24rpx;height: 24rpx;}
  126. }
  127. .txta{color: #28C529;font-weight: 500;line-height: 40rpx;flex: 0 0 auto;margin-left: 18rpx;padding: 0 6rpx;}
  128. }
  129. .upbox{display: flex;flex-direction: column;align-items: center;padding: 56rpx 0 40rpx;border-top: 2rpx solid #E6E6E6;
  130. image{width: 30rpx;height: 26rpx;margin-bottom: 18rpx;transform: rotate(180deg);}
  131. view{font-weight: 500;font-size: 26rpx;color: #666666;}
  132. }
  133. .editf{flex:0 0 auto;display: flex;align-items: center;margin-left: 24rpx;
  134. view{font-weight: 500;font-size: 26rpx;color: #00A9F0;}
  135. image{width: 22rpx;height: 24rpx;margin-right:8rpx;}
  136. }
  137. .edit{flex:0 0 auto;display: flex;align-items: center;
  138. view{font-weight: 500;font-size: 26rpx;color: #00A9F0;}
  139. image{width: 20rpx;height: 24rpx;margin-right: 2rpx;}
  140. }
  141. </style>