江西小程序管理端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

221 lines
4.8 KiB

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
  1. <template>
  2. <view class="teachingDataBg" >
  3. <topNavbar title=" "></topNavbar>
  4. <view class="topText">
  5. <view class="h3">专属您的</view>
  6. <view class="h4">教学数据</view>
  7. </view>
  8. <view class="pad" id="app">
  9. <view class="card">
  10. <view class="top_row">
  11. <view class="topItem">
  12. <view class="lab">历史服务学员</view>
  13. <view class="val">100</view>
  14. </view>
  15. <view class="topItem">
  16. <view class="lab">结业人数</view>
  17. <view class="val">130</view>
  18. </view>
  19. <view class="topItem">
  20. <view class="lab">服务中人数</view>
  21. <view class="val">13</view>
  22. </view>
  23. </view>
  24. </view>
  25. </view>
  26. <view class="title">
  27. <view class="txt">结业率高达</view>
  28. <view class="num">90%</view>
  29. </view>
  30. <view class="ul">
  31. <view class="li">
  32. <view class="lab">科目一平均通过时间</view>
  33. <view class="val">12</view>
  34. </view>
  35. <view class="li">
  36. <view class="lab">科目二平均通过时间</view>
  37. <view class="val">12</view>
  38. </view>
  39. <view class="li">
  40. <view class="lab">科目三平均通过时间</view>
  41. <view class="val">12</view>
  42. </view>
  43. <view class="li">
  44. <view class="lab">科目四平均通过时间</view>
  45. <view class="val">12</view>
  46. </view>
  47. </view>
  48. <view class="title">
  49. <view class="txt">平均拿证时间</view>
  50. <view class="num">47</view>
  51. </view>
  52. <!-- <view class="btnBorder" @click="shareClick">立即分享</view>
  53. <canvas canvas-id="canvas" style="width: 300px; height: 300px;opacity: 0;" class="canvas">3333</canvas>
  54. <view class="img" style="width: 300px; height: 300px;">
  55. <image :src="shareImageUrl" mode=""></image>
  56. </view> -->
  57. </view>
  58. </template>
  59. <script>
  60. export default {
  61. data() {
  62. return {
  63. shareImageUrl: ''
  64. }
  65. },
  66. mounted() {
  67. this.$nextTick(()=>{
  68. setTimeout(()=>{
  69. this.getCanvas()
  70. },2000)
  71. })
  72. },
  73. methods: {
  74. shareClick() {
  75. },
  76. getCanvas() {
  77. let _this = this
  78. // 获取 Canvas 组件实例
  79. const canvas = uni.createCanvasContext('canvas', this);
  80. // 绘制需要的内容
  81. canvas.setFontSize(20);
  82. canvas.fillText('Hello, Canvas!', 50, 50);
  83. // 绘制完成后执行截屏操作
  84. canvas.draw(true, () => {
  85. uni.canvasToTempFilePath({
  86. canvasId: 'canvas',
  87. fileType: 'png',
  88. success: (res) => {
  89. console.log('截屏成功', res.tempFilePath);
  90. _this.shareImageUrl = res.tempFilePath
  91. // uni.previewImage({
  92. // urls: [res.tempFilePath]
  93. // })
  94. uni.showShareMenu({
  95. withShareTicket: true,
  96. success: () => {
  97. uni.showShareImageMenu({
  98. path: _this.shareImageUrl,
  99. success: (res) => {
  100. console.log('分享成功', res)
  101. },
  102. fail: (error) => {
  103. console.log('分享失败', error)
  104. }
  105. })
  106. }
  107. })
  108. },
  109. fail: (err) => {
  110. console.log('截屏失败', err);
  111. }
  112. }, this);
  113. });
  114. }
  115. }
  116. }
  117. </script>
  118. <style lang="scss" scoped>
  119. .teachingDataBg {
  120. width: 100%;
  121. background: url('http://192.168.1.20:81/zhili/image/20230818/409dca21dfec44eb8477e056ee23e437.png') #f6f6f6 no-repeat;
  122. background-size: 100% 544rpx;
  123. min-height: 100vh;
  124. font-size: 28rpx;
  125. padding-bottom: 40rpx;
  126. .topText {
  127. padding: 56rpx 34rpx 84rpx 34rpx;
  128. color: #fff;
  129. font-weight: 600;
  130. .h3 {
  131. font-size: 42rpx;
  132. }
  133. .h4 {
  134. font-size: 64rpx;
  135. }
  136. }
  137. .card {
  138. .top_row {
  139. display: flex;
  140. height: 214rpx;
  141. margin-bottom: 14rpx;
  142. .topItem {
  143. flex: 1;
  144. text-align: center;
  145. .lab {
  146. font-size: 28rpx;
  147. color: #333;
  148. margin: 48rpx 0 24rpx 0;
  149. }
  150. .val {
  151. color: $themC;
  152. font-size: 40rpx;
  153. font-weight: 500;
  154. }
  155. }
  156. }
  157. }
  158. .title {
  159. display: flex;
  160. align-items: center;
  161. width: 100%;
  162. height: 98rpx;
  163. background: linear-gradient(188deg, #F6F6F6 0%, #80C1F6 100%, #80C1F6 100%);
  164. margin-bottom: 40rpx;
  165. color: #FFFFFF;
  166. .txt {
  167. font-weight: 500;
  168. line-height: 56px;
  169. text-shadow: 0px 4px 6px #1274D6;
  170. font-size: 40rpx;
  171. margin: 0 40rpx 0 28rpx;
  172. font-weight: 500;
  173. }
  174. .num {
  175. font-size: 72rpx;
  176. text-shadow: 0px 4px 8px #084787;
  177. }
  178. }
  179. .ul {
  180. display: flex;
  181. flex-wrap: wrap;
  182. justify-content: space-between;
  183. padding: 0 28rpx;
  184. .li {
  185. width: 49%;
  186. text-align: center;
  187. margin-bottom: 20rpx;
  188. background: #fff;
  189. border-radius: 16rpx;
  190. height: 196rpx;
  191. .lab {
  192. font-size: 28rpx;
  193. margin: 36rpx 0 26rpx 0;
  194. }
  195. .val {
  196. font-size: 40rpx;
  197. color: $themC;
  198. }
  199. }
  200. }
  201. .btnBorder {
  202. width: 396rpx;
  203. margin: 79rpx auto;
  204. }
  205. }
  206. </style>