workbench.vue 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  1. <template>
  2. <view class="work-panel">
  3. <view class="work-panel_header">
  4. <image class="image" src="/static/c+unselected.svg" mode="widthFix" />
  5. <view @click="onSearch" style="flex:1">
  6. <My_search placeholder="搜索全站关键字" disabled></My_search>
  7. </view>
  8. </view>
  9. <!-- 用户信息 -->
  10. <UserInfo :userInfoValue="userInfoValue"></UserInfo>
  11. <view class="work-panel_signin">
  12. <text class="title">你已累计打卡{{userInfoValue.signdays}}天</text>
  13. <navigator class="but" url="/packageA/dailyYttendance/index" hover-class="navigator-hover">
  14. 每日一签
  15. </navigator>
  16. </view>
  17. <view class="work-panel_applist">
  18. <template v-for="(item,index) in list">
  19. <navigator @click="switchPage(item)" class="app" url="#" :key="item.name">
  20. <view class="bg" :style="item.color">
  21. <image class="image" :src="`/static/workbench/${item.name}.svg`" mode="widthFix"></image>
  22. </view>
  23. <text class="name">{{item.remark}}</text>
  24. </navigator>
  25. </template>
  26. </view>
  27. <view class="work-panel_options">
  28. <template v-for="(item,index) in list2">
  29. <navigator @click="switchPage(item)" class="option" :key="index" url="#" hover-class="navigator-hover" open-type="navigate">
  30. <view class="box">
  31. <text class="left">{{ item.remark }}</text>
  32. <view class="right">
  33. <u-icon name="arrow-right" color="#999999"></u-icon>
  34. </view>
  35. </view>
  36. </navigator>
  37. </template>
  38. </view>
  39. </view>
  40. </template>
  41. <script>
  42. import UserInfo from './userInfo.vue'
  43. export default {
  44. components: { UserInfo },
  45. data() {
  46. return {
  47. updatePage: true,
  48. list: [],
  49. list2: [],
  50. colors: ['background: linear-gradient( 225deg, #81AEF3 0%, #6787E7 100%)',
  51. "background: linear-gradient( 225deg, #F1AA68 0%, #EA895B 100%)",
  52. "background: linear-gradient( 225deg, #EEA6A4 0%, #E0605A 100%)",
  53. "background: linear-gradient( 225deg, #80D3EF 0%, #5DAAE6 100%)",
  54. "background: linear-gradient( 225deg, #EEA6A4 0%, #E0605A 100%)",
  55. "background: linear-gradient( 225deg, #80D3EF 0%, #5DAAE6 100%)",
  56. "background: linear-gradient( 225deg, #81AEF3 0%, #6787E7 100%)",
  57. "background: linear-gradient( 225deg, #F1AA68 0%, #EA895B 100%)",
  58. "background: linear-gradient( 225deg, #81AEF3 0%, #6787E7 100%)",
  59. "background: linear-gradient( 225deg, #F1AA68 0%, #EA895B 100%)"
  60. ],
  61. content: {
  62. "pageNumber": 1,
  63. "pageSize": 20,
  64. "where": {
  65. "condition": "",
  66. "isnew": '',
  67. "class": ""
  68. }
  69. },
  70. userInfoValue:{},
  71. roles:[]
  72. }
  73. },
  74. methods: {
  75. init(callBack) {
  76. callBack()
  77. this.list = Object.values(uni.getStorageSync('authList').工作台)
  78. this.list2 = Object.values(uni.getStorageSync('authList').工作台导航)
  79. this.list = this.dye(this.list, this.colors, 1)
  80. this.getUserInfo()
  81. this.updatePage = false;
  82. },
  83. async getUserInfo () {
  84. let res = await this.$Http.basic({
  85. "id": "20240510104102",
  86. "content": {}
  87. })
  88. this.userInfoValue = res.data
  89. console.log(this.userInfoValue,'用户信息')
  90. },
  91. onSearch () {
  92. uni.navigateTo({
  93. url: '/cloud/globalSearch/index',
  94. })
  95. }
  96. },
  97. }
  98. </script>
  99. <style lang="scss">
  100. .work-panel {
  101. padding: 10px 10px 80px 10px;
  102. .work-panel_header {
  103. display: flex;
  104. align-items: center;
  105. .image{
  106. width: 40px;
  107. height: 20px;
  108. margin-right: 10px;
  109. }
  110. }
  111. .work-panel_signin {
  112. display: flex;
  113. align-items: center;
  114. justify-content: space-between;
  115. padding: 9px 15px;
  116. font-family: Source Han Sans SC, Source Han Sans SC;
  117. background: #FFFFFF;
  118. border-radius: 8px 8px 8px 8px;
  119. .title{
  120. font-weight: 400;
  121. font-size: 14px;
  122. color: #333333;
  123. }
  124. .but {
  125. font-weight: 500;
  126. font-size: 14px;
  127. color: #FFFFFF;
  128. background: linear-gradient( 90deg, #C30D23 0%, #E3041F 100%);
  129. border-radius: 50px 50px 50px 50px;
  130. padding: 6px 15px;
  131. }
  132. }
  133. .work-panel_applist {
  134. display: flex;
  135. flex-wrap: wrap;
  136. margin: 10px 0;
  137. background: #ffffff;
  138. border-radius: 8px 8px 8px 8px;
  139. box-sizing: border-box;
  140. .app {
  141. display: flex;
  142. flex-direction: column;
  143. align-items: center;
  144. border-radius: 8px;
  145. padding: 15px;
  146. width: 25%;
  147. box-sizing: border-box;
  148. .bg {
  149. width: 44px;
  150. height: 44px;
  151. border-radius: 12px 12px 12px 12px;
  152. display: flex;
  153. align-items: center;
  154. justify-content: space-evenly;
  155. align-content: center;
  156. background: linear-gradient( 225deg, #81AEF3 0%, #6787E7 100%);
  157. .image{
  158. align-self: center;
  159. width: 24px;
  160. height: 24px;
  161. }
  162. }
  163. .name{
  164. font-family: Source Han Sans SC, Source Han Sans SC;
  165. font-weight: 400;
  166. font-size: 14px;
  167. color: #333333;
  168. margin-top: 10px;
  169. text-align: center;
  170. }
  171. }
  172. }
  173. .work-panel_options {
  174. background: #ffffff;
  175. border-radius: 8px;
  176. font-family: Source Han Sans SC, Source Han Sans SC;
  177. .option {
  178. padding: 15px 0 0 10px;
  179. &:first-child {
  180. border-top-left-radius: 8px;
  181. border-top-right-radius: 8px;
  182. }
  183. &:last-child {
  184. border-bottom-left-radius: 8px;
  185. border-bottom-right-radius: 8px;
  186. .box {
  187. border: none;
  188. }
  189. }
  190. .box {
  191. padding-bottom:15px;
  192. padding-right:15px;
  193. border-bottom: 1px solid #DDDDDD;
  194. display: flex;
  195. justify-content: space-between;
  196. align-items: center;
  197. align-content: center;
  198. .left {
  199. font-weight: 400;
  200. font-size: 14px;
  201. color: #333333;
  202. }
  203. .right{
  204. display: flex;
  205. align-items: center;
  206. align-content: center;
  207. .tag {
  208. background: #BBBBBB;
  209. border-radius: 50px 50px 50px 50px;
  210. padding: 3px 12px;
  211. margin-right: 10px;
  212. font-family: PingFang SC, PingFang SC;
  213. font-weight: 400;
  214. font-size: 10px;
  215. color: #FFFFFF;
  216. }
  217. }
  218. }
  219. }
  220. }
  221. }
  222. </style>