workbench.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332
  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. <My_search placeholder="搜索全站关键字" :value="content.where.condition" @onSearch="onSearch">
  6. <view class="cancel" v-if="content.where.condition" hover-class="navigator-hover">
  7. 取消
  8. </view>
  9. <view v-else style="width: 5px;" />
  10. </My_search>
  11. </view>
  12. <!-- 用户信息 -->
  13. <UserInfo :userInfoValue="userInfoValue"></UserInfo>
  14. <view class="work-panel_signin">
  15. <text class="title">你已累计打卡{{userInfoValue.signdays}}天</text>
  16. <navigator class="but" url="/packageA/dailyYttendance/index" hover-class="navigator-hover">
  17. 每日一签
  18. </navigator>
  19. </view>
  20. <view class="work-panel_applist">
  21. <template v-for="(item,index) in list" >
  22. <navigator class="app" url="#" :key="index" v-if="item.path">
  23. <view class="bg" :style="item.color">
  24. <image class="image" :src="`/static/workbench/${item.label}.svg`" mode="widthFix"></image>
  25. </view>
  26. <text class="name">{{item.label}}</text>
  27. </navigator>
  28. </template>
  29. </view>
  30. <view class="work-panel_options">
  31. <navigator class="option" v-for="(item,index) in list2" :key="index" url="#" hover-class="navigator-hover" open-type="navigate">
  32. <view class="box">
  33. <text class="left">{{ item.label }}</text>
  34. <view class="right">
  35. <!-- <view class="tag">10</view> -->
  36. <u-icon name="arrow-right" color="#999999"></u-icon>
  37. </view>
  38. </view>
  39. </navigator>
  40. </view>
  41. </view>
  42. </template>
  43. <script>
  44. import UserInfo from './userInfo.vue'
  45. export default {
  46. components: { UserInfo },
  47. data() {
  48. return {
  49. updatePage: true,
  50. list: [{
  51. label: "报名信息",
  52. itemId: "cloud",
  53. name:'1'
  54. }, {
  55. label: "企业公告",
  56. itemId: "index",
  57. page: "活动",
  58. name:'1'
  59. }, {
  60. label: "设计实景",
  61. itemId: "index",
  62. page: "案例",
  63. params: {
  64. active: '图库'
  65. },
  66. name:'1'
  67. }, {
  68. label: "商城订单",
  69. itemId: "index",
  70. page: "案例",
  71. params: {
  72. active: '实景案例'
  73. },
  74. name:'1'
  75. }, {
  76. label: "订单提报",
  77. itemId: "cloud",
  78. name:'1'
  79. }, {
  80. label: "团队管理",
  81. itemId: "cloud",
  82. }, {
  83. label: "商品调整",
  84. name:'1'
  85. }, {
  86. label: "直播管理",
  87. name:'1'
  88. }, {
  89. label: "品质服务管理",
  90. name:'1'
  91. }, {
  92. label: "装修预算改价",
  93. name:"budget",
  94. }],
  95. list2: [{
  96. label: "我的访问店铺",
  97. introduce: "电器 / 吊顶 / 墙面 / 木制品 \n渠道 / 工程",
  98. itemId: "cloud"
  99. }, {
  100. label: "我的预约",
  101. introduce: "总部直通车 千万大返利",
  102. itemId: "index",
  103. page: "活动",
  104. }, {
  105. label: "收货地址",
  106. introduce: "电器 / 厨卫 / 阳台 / 背景墙 /顶墙",
  107. itemId: "index",
  108. page: "案例",
  109. params: {
  110. active: '图库'
  111. }
  112. }, {
  113. label: "我的收藏",
  114. introduce: "总部精选 / 实景图 / 设计图",
  115. itemId: "index",
  116. page: "案例",
  117. params: {
  118. active: '实景案例'
  119. }
  120. }, {
  121. label: "通讯录",
  122. introduce: "单品 / 通知 / 介绍 / 画册 / 物料\n视频 / 说明书等",
  123. itemId: "cloud",
  124. }, {
  125. label: "考试成绩",
  126. introduce: "产品 / 销售 / 管理 / 设计 / 考试等",
  127. itemId: "cloud",
  128. }, {
  129. label: "问卷调查",
  130. introduce: "装修报价 / 老房改造 / 精装房焕新\n品质服务",
  131. path: "/packageA/advertising/unshareable?id=505"
  132. }, {
  133. label: "意见反馈",
  134. introduce: "装修报价 / 老房改造 / 精装房焕新\n品质服务",
  135. path: "/packageA/advertising/unshareable?id=505"
  136. }],
  137. colors: ['background: linear-gradient( 225deg, #81AEF3 0%, #6787E7 100%)',
  138. "background: linear-gradient( 225deg, #F1AA68 0%, #EA895B 100%)",
  139. "background: linear-gradient( 225deg, #EEA6A4 0%, #E0605A 100%)",
  140. "background: linear-gradient( 225deg, #80D3EF 0%, #5DAAE6 100%)",
  141. "background: linear-gradient( 225deg, #EEA6A4 0%, #E0605A 100%)",
  142. "background: linear-gradient( 225deg, #80D3EF 0%, #5DAAE6 100%)",
  143. "background: linear-gradient( 225deg, #81AEF3 0%, #6787E7 100%)",
  144. "background: linear-gradient( 225deg, #F1AA68 0%, #EA895B 100%)",
  145. "background: linear-gradient( 225deg, #81AEF3 0%, #6787E7 100%)",
  146. "background: linear-gradient( 225deg, #F1AA68 0%, #EA895B 100%)"
  147. ],
  148. content: {
  149. "pageNumber": 1,
  150. "pageSize": 20,
  151. "where": {
  152. "condition": "",
  153. "isnew": '',
  154. "class": ""
  155. }
  156. },
  157. userInfoValue:{},
  158. roles:[]
  159. }
  160. },
  161. methods: {
  162. init(callBack) {
  163. callBack()
  164. this.updatePage = false;
  165. },
  166. async getUserInfo () {
  167. let res = await this.$Http.basic({
  168. "id": "20240510104102",
  169. "content": {}
  170. })
  171. this.userInfoValue = res.data
  172. console.log(this.userInfoValue,'用户信息')
  173. },
  174. //处理权限
  175. handleAppRole () {
  176. let that = this
  177. uni.getStorage({
  178. key: 'authList',
  179. success: function (res) {
  180. let keys = Object.keys(res.data.工作台)
  181. for (let index = 0; index < that.list.length; index++) {
  182. for (let index2 = 0; index2 < keys.length; index2++) {
  183. if (res.data.工作台[keys[index2]] && res.data.工作台[keys[index2]].name == that.list[index].name) {
  184. that.list[index] = Object.assign({},that.list[index],res.data.工作台[keys[index2]])
  185. break;
  186. }
  187. }
  188. }
  189. that.roles = res.data
  190. console.log(res.data,that.list,'权限');
  191. }
  192. })
  193. },
  194. },
  195. created () {
  196. this.list = this.dye(this.list, this.colors, 1)
  197. this.getUserInfo()
  198. this.handleAppRole()
  199. console.log(this.list,'应用');
  200. }
  201. }
  202. </script>
  203. <style lang="scss">
  204. .work-panel {
  205. padding: 10px 10px 80px 10px;
  206. .work-panel_header {
  207. display: flex;
  208. align-items: center;
  209. .image{
  210. width: 40px;
  211. height: 20px;
  212. margin-right: 10px;
  213. }
  214. }
  215. .work-panel_signin {
  216. display: flex;
  217. align-items: center;
  218. justify-content: space-between;
  219. padding: 9px 15px;
  220. font-family: Source Han Sans SC, Source Han Sans SC;
  221. background: #FFFFFF;
  222. border-radius: 8px 8px 8px 8px;
  223. .title{
  224. font-weight: 400;
  225. font-size: 14px;
  226. color: #333333;
  227. }
  228. .but {
  229. font-weight: 500;
  230. font-size: 14px;
  231. color: #FFFFFF;
  232. background: linear-gradient( 90deg, #C30D23 0%, #E3041F 100%);
  233. border-radius: 50px 50px 50px 50px;
  234. padding: 6px 15px;
  235. }
  236. }
  237. .work-panel_applist {
  238. display: flex;
  239. flex-wrap: wrap;
  240. margin: 10px 0;
  241. background: #ffffff;
  242. border-radius: 8px 8px 8px 8px;
  243. padding: 16px 16px 0 16px;
  244. .app {
  245. margin-right: 33px;
  246. display: flex;
  247. flex-direction: column;
  248. align-items: center;
  249. margin-bottom: 30px;
  250. &:nth-child(4),&:nth-child(8) {
  251. margin-right: 0;
  252. }
  253. .bg {
  254. width: 44px;
  255. height: 44px;
  256. border-radius: 12px 12px 12px 12px;
  257. display: flex;
  258. align-items: center;
  259. justify-content: space-evenly;
  260. align-content: center;
  261. background: linear-gradient( 225deg, #81AEF3 0%, #6787E7 100%);
  262. .image{
  263. align-self: center;
  264. width: 24px;
  265. height: 24px;
  266. }
  267. }
  268. .name{
  269. font-family: Source Han Sans SC, Source Han Sans SC;
  270. font-weight: 400;
  271. font-size: 14px;
  272. color: #333333;
  273. margin-top: 10px;
  274. text-align: center;
  275. width: 56px;
  276. }
  277. }
  278. }
  279. .work-panel_options {
  280. background: #ffffff;
  281. border-radius: 8px;
  282. font-family: Source Han Sans SC, Source Han Sans SC;
  283. .option {
  284. padding: 15px 0 0 10px;
  285. &:last-child {
  286. .box {
  287. border: none;
  288. }
  289. }
  290. .box {
  291. padding-bottom:15px;
  292. padding-right:15px;
  293. border-bottom: 1px solid #DDDDDD;
  294. display: flex;
  295. justify-content: space-between;
  296. align-items: center;
  297. align-content: center;
  298. .left {
  299. font-weight: 400;
  300. font-size: 14px;
  301. color: #333333;
  302. }
  303. .right{
  304. display: flex;
  305. align-items: center;
  306. align-content: center;
  307. .tag {
  308. background: #BBBBBB;
  309. border-radius: 50px 50px 50px 50px;
  310. padding: 3px 12px;
  311. margin-right: 10px;
  312. font-family: PingFang SC, PingFang SC;
  313. font-weight: 400;
  314. font-size: 10px;
  315. color: #FFFFFF;
  316. }
  317. }
  318. }
  319. }
  320. }
  321. }
  322. </style>