index.uvue 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349
  1. <template>
  2. <view class="page-container">
  3. <!-- 头部背景图 -->
  4. <image class="header-bg" src="/static/images/workbench/1.png" mode="widthFix"></image>
  5. <view class="header">
  6. <view class="header-content">
  7. <text class="header-title">工作台</text>
  8. </view>
  9. </view>
  10. <scroll-view class="page-content">
  11. <!-- 快捷功能卡片 -->
  12. <view class="quick-cards">
  13. <view v-for="(item, index) in quickFunctions" :key="index" class="quick-card" @click="handleQuickClick(item)">
  14. <image class="quick-card-bg" :src="item.bgImage" mode="aspectFill"></image>
  15. <view class="quick-card-content">
  16. <text class="quick-card-title">{{ item.title }}</text>
  17. </view>
  18. </view>
  19. </view>
  20. <!-- 库区管理 -->
  21. <view class="section">
  22. <view class="section-header">
  23. <view class="section-indicator"></view>
  24. <text class="section-title">库区管理</text>
  25. </view>
  26. <view class="management-grid">
  27. <view v-for="(item, index) in managementList" :key="index" class="management-item" @click="handleManagementClick(item)" :style="{ backgroundColor: item.bgColor }">
  28. <view class="management-icon-box">
  29. <image class="management-icon" :src="item.icon" mode="aspectFit"></image>
  30. </view>
  31. <text class="management-title">{{ item.title }}</text>
  32. <view v-if="item.badge" class="management-badge">
  33. <text class="badge-text">{{ item.badge }}</text>
  34. </view>
  35. </view>
  36. </view>
  37. </view>
  38. </scroll-view>
  39. <!-- 底部 TabBar -->
  40. <custom-tabbar :current="1" />
  41. </view>
  42. </template>
  43. <script setup lang="uts">
  44. import { ref } from 'vue'
  45. // 快捷功能类型
  46. type QuickFunction = {
  47. id: number
  48. title: string
  49. bgImage: string
  50. icon: string
  51. path: string
  52. }
  53. // 库区管理功能类型
  54. type ManagementItem = {
  55. id: number
  56. title: string
  57. icon: string
  58. bgColor: string
  59. path: string
  60. badge: string
  61. }
  62. // 快捷功能列表
  63. const quickFunctions = ref<QuickFunction[]>([
  64. {
  65. id: 1,
  66. title: '在线会议',
  67. bgImage: '/static/images/workbench/2.png',
  68. icon: '',
  69. path: ''
  70. },
  71. {
  72. id: 2,
  73. title: '视频广场',
  74. bgImage: '/static/images/workbench/3.png',
  75. icon: '',
  76. path: ''
  77. },
  78. {
  79. id: 3,
  80. title: '四乱信息',
  81. bgImage: '/static/images/workbench/4.png',
  82. icon: '',
  83. path: ''
  84. },
  85. {
  86. id: 4,
  87. title: '六项机制',
  88. bgImage: '/static/images/workbench/5.png',
  89. icon: '',
  90. path: ''
  91. },
  92. {
  93. id: 5,
  94. title: '水库矩阵',
  95. bgImage: '/static/images/workbench/6.png',
  96. icon: '',
  97. path: ''
  98. },
  99. {
  100. id: 6,
  101. title: 'AI助手',
  102. bgImage: '/static/images/workbench/7.png',
  103. icon: '',
  104. path: ''
  105. }
  106. ])
  107. // 库区管理功能列表
  108. const managementList = ref<ManagementItem[]>([
  109. {
  110. id: 1,
  111. title: '列表',
  112. icon: '/static/images/workbench/8.png',
  113. bgColor: '#E3F2FD',
  114. path: '/pages/workbench/order/index',
  115. badge: '1'
  116. },
  117. {
  118. id: 2,
  119. title: '表单',
  120. icon: '/static/images/workbench/9.png',
  121. bgColor: '#FFF3E0',
  122. path: '/pages/workbench/form/index',
  123. badge: ''
  124. },
  125. {
  126. id: 3,
  127. title: '地图',
  128. icon: '/static/images/workbench/10.png',
  129. bgColor: '#FCE4EC',
  130. path: '/pages/workbench/map/index',
  131. badge: ''
  132. },
  133. ])
  134. // 快捷功能点击
  135. const handleQuickClick = (item: QuickFunction): void => {
  136. if (item.path.length > 0) {
  137. uni.navigateTo({
  138. url: item.path,
  139. fail: (err: any) => {
  140. console.log('导航失败', err)
  141. }
  142. })
  143. } else {
  144. uni.showToast({
  145. title: item.title,
  146. icon: 'none'
  147. })
  148. }
  149. }
  150. // 库区管理功能点击
  151. const handleManagementClick = (item: ManagementItem): void => {
  152. if (item.path.length > 0) {
  153. uni.navigateTo({
  154. url: item.path,
  155. fail: (err: any) => {
  156. console.log('导航失败', err)
  157. }
  158. })
  159. } else {
  160. uni.showToast({
  161. title: item.title,
  162. icon: 'none'
  163. })
  164. }
  165. }
  166. </script>
  167. <style lang="scss">
  168. .page-container {
  169. flex: 1;
  170. background-color: #f5f8fe;
  171. padding-top: env(safe-area-inset-top);
  172. }
  173. .page-content {
  174. flex: 1;
  175. padding: 32rpx;
  176. padding-bottom: 150rpx;
  177. box-sizing: border-box;
  178. border-radius: 24rpx;
  179. border: 1rpx solid rgba(255, 255, 255, 0.3);
  180. background: #f5f8fe;
  181. // background: linear-gradient(180deg, rgba(255, 255, 255, 0.3) 0%, #f5f8fe 100%);
  182. // backdrop-filter: blur(20rpx);
  183. }
  184. .header-bg {
  185. position: absolute;
  186. top: 0;
  187. left: 0;
  188. width: 100%;
  189. height: auto;
  190. z-index: 0;
  191. }
  192. .header {
  193. position: relative;
  194. overflow: hidden;
  195. &-content {
  196. position: relative;
  197. z-index: 1;
  198. padding: 80rpx 30rpx 40rpx;
  199. display: flex;
  200. justify-content: center;
  201. align-items: center;
  202. }
  203. &-title {
  204. font-size: 48rpx;
  205. color: #ffffff;
  206. font-weight: bold;
  207. }
  208. }
  209. .quick-cards {
  210. flex-direction: row;
  211. flex-wrap: wrap;
  212. justify-content: space-between;
  213. .quick-card {
  214. position: relative;
  215. width: 212rpx;
  216. height: 120rpx;
  217. margin-bottom: 20rpx;
  218. overflow: hidden;
  219. border-radius: 16rpx;
  220. &-bg {
  221. position: absolute;
  222. top: 0;
  223. left: 0;
  224. width: 226rpx;
  225. height: 140rpx;
  226. z-index: 0;
  227. }
  228. &-content {
  229. position: relative;
  230. z-index: 1;
  231. padding: 20rpx;
  232. height: 140rpx;
  233. justify-content: flex-start;
  234. }
  235. &-title {
  236. font-size: 28rpx;
  237. color: #333333;
  238. font-weight: bold;
  239. }
  240. }
  241. }
  242. .section {
  243. padding: 0 20rpx 30rpx;
  244. background: #ffffff;
  245. border-radius: 16rpx;
  246. &-header {
  247. flex-direction: row;
  248. align-items: center;
  249. padding: 30rpx 10rpx 20rpx;
  250. }
  251. &-indicator {
  252. width: 6rpx;
  253. height: 32rpx;
  254. background-color: #007aff;
  255. border-radius: 3rpx;
  256. margin-right: 12rpx;
  257. }
  258. &-title {
  259. font-size: 36rpx;
  260. color: #333333;
  261. font-weight: bold;
  262. }
  263. }
  264. .management-grid {
  265. flex-direction: row;
  266. flex-wrap: wrap;
  267. justify-content: space-between;
  268. .management-item {
  269. position: relative;
  270. width: 192rpx;
  271. height: 156rpx;
  272. margin-bottom: 24rpx;
  273. background-color: #edf5ff;
  274. border-radius: 8rpx;
  275. align-items: flex-start;
  276. justify-content: center;
  277. padding: 24rpx;
  278. box-sizing: border-box;
  279. .management-icon-box {
  280. width: 64rpx;
  281. height: 64rpx;
  282. justify-content: center;
  283. align-items: center;
  284. margin-bottom: 16rpx;
  285. }
  286. .management-icon {
  287. width: 100%;
  288. height: 100%;
  289. }
  290. .management-title {
  291. font-weight: bold;
  292. font-size: 24rpx;
  293. color: #333333;
  294. text-align: center;
  295. }
  296. .management-badge {
  297. position: absolute;
  298. top: 20rpx;
  299. right: 20rpx;
  300. width: 32rpx;
  301. height: 32rpx;
  302. background-color: #ff3b30;
  303. border-radius: 16rpx;
  304. justify-content: center;
  305. align-items: center;
  306. .badge-text {
  307. font-size: 20rpx;
  308. color: #ffffff;
  309. line-height: 20rpx;
  310. }
  311. }
  312. }
  313. }
  314. </style>