diff --git a/api/base.js b/api/base.js index d05d4e8..6c9cc47 100644 --- a/api/base.js +++ b/api/base.js @@ -3,8 +3,6 @@ import { post } from '@/utils/request.js' -// BaseInfo/getProjectWorkArea?projectId=0792b983-4de2-44d5-adba-361b7fc99a97& - /** * 请求单位工程 */ diff --git a/api/hj.js b/api/hj.js index d2f9bc3..66da851 100644 --- a/api/hj.js +++ b/api/hj.js @@ -6,4 +6,9 @@ import { /** * 获取焊接首页数据 */ -export const reqHJIndexData = (projectId)=>get(`HJGLIndex/GetJGLIndexItem?projectId=${projectId}`) \ No newline at end of file +export const reqHJIndexData = (projectId)=>get(`HJGLIndex/GetJGLIndexItem?projectId=${projectId}`) + +/** + * 获取点口管理列表 + */ +export const reqGetNotEndPointBatch = (unitWorkId,projectId)=>get(`NDETrust/getNotEndPointBatch?unitWorkId=${unitWorkId}&projectId=${projectId}`) \ No newline at end of file diff --git a/assets/css/components.scss b/assets/css/components.scss index 0e7239c..b3845e7 100644 --- a/assets/css/components.scss +++ b/assets/css/components.scss @@ -44,4 +44,128 @@ } } } -} \ No newline at end of file +} + + +.nbd-select { + display: flex; + flex-direction: column; + height: 100%; + background: #ffffff; + border-radius: 24rpx 24rpx 0 0; + overflow: hidden; + + &-header { + padding: 24rpx 30rpx; + border-bottom: 1rpx solid #e8e8e8; + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: center; + background: #fafbfc; + + .u-size-mini{ + padding: 0 30rpx !important; + margin: 0; + } + + .nbd-select-title-wrap { + display: flex; + flex-direction: column; + .nbd-select-title { + font-size: 30rpx; + font-weight: 600; + color: #333; + } + + .nbd-select-tip { + font-size: 24rpx; + color: #999; + } + } + } + + &-filter { + padding: 20rpx 32rpx; + border-bottom: 1rpx solid #e8e8e8; + background: #fafbfc; + + .search-box { + display: flex; + align-items: center; + background: #ffffff; + border-radius: 36rpx; + padding: 0 24rpx; + height: 64rpx; + + .search-input { + flex: 1; + font-size: 28rpx; + color: #333; + height: 100%; + } + + .search-clear { + display: flex; + align-items: center; + padding: 4rpx; + } + } + } + + &-inner { + flex: 1; + overflow-y: auto; + background: #ffffff; + &-wrap { + padding: 12rpx 0 30rpx; + } + } + + &-empty { + padding: 80rpx 0; + } + + &-item { + display: flex; + align-items: center; + justify-content: space-between; + padding: 24rpx 30rpx; + border-bottom: 1rpx solid #f5f6f8; + transition: all 0.2s; + background: #ffffff; + + &:nth-of-type(2n) { + background: #fafbfc; + } + + &:last-child { + border-bottom: none; + } + + &.active { + background: rgba(41, 121, 255, 0.08); + border-left: 4rpx solid $u-type-primary; + padding-left: 26rpx; + + .nbd-select-item-text { + color: $u-type-primary; + font-weight: 500; + } + } + + .nbd-select-item-text { + flex: 1; + font-size: 28rpx; + color: #333; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + + .nbd-select-checkbox { + margin-left: 16rpx; + } + } + +} diff --git a/assets/css/page.scss b/assets/css/page.scss index e2ea56b..5d5631a 100644 --- a/assets/css/page.scss +++ b/assets/css/page.scss @@ -195,6 +195,14 @@ grid-template-columns: repeat(4, 1fr); gap: 24rpx 16rpx; overflow-x: hidden; + + .empty-tip { + grid-column: 1 / -1; + text-align: center; + padding: 40rpx 0; + font-size: 26rpx; + color: #999; + } } .grid-item { @@ -351,4 +359,143 @@ } } } +} + +// 列表页通用样式 +.page-list { + display: flex; + flex-direction: column; + height: 100vh; + background: #f5f6f8; + + // 头部过滤区域 + .filter-header { + background: #ffffff; + padding: 20rpx 24rpx; + border-bottom: 1rpx solid #f0f0f0; + + .filter-row { + display: flex; + align-items: center; + gap: 16rpx; + } + + // 选择按钮 + .project-select-btn { + flex: 1; + display: flex; + align-items: center; + justify-content: space-between; + padding: 12rpx 24rpx; + background: #f5f6f8; + border-radius: 12rpx; + max-height: 70rpx; + + .select-text { + font-size: 28rpx; + color: #333; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + flex: 1; + margin-right: 12rpx; + } + } + + .refresh-btn { + padding: 8rpx; + display: flex; + align-items: center; + justify-content: center; + + .rotating { + animation: rotate 1s linear infinite; + } + } + } + + @keyframes rotate { + from { transform: rotate(0deg); } + to { transform: rotate(360deg); } + } + + // 列表区域 + .list-scroll { + flex: 1; + overflow: hidden; + } + + // 加载中 + .loading-box { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + height: 100%; + padding: 80rpx 0; + + .loading-text { + margin-top: 20rpx; + font-size: 26rpx; + color: #999; + } + } + + .list-wrap { + padding: 24rpx; + } + + // 列表项:序号 + 标题 + 箭头 + .list-item { + display: flex; + align-items: center; + padding: 24rpx 28rpx; + background-color: #ffffff; + margin-bottom: 20rpx; + border-radius: 12rpx; + &:active { + background: #f8f9fa; + } + + .item-index { + width: 44rpx; + height: 44rpx; + display: flex; + align-items: center; + justify-content: center; + background: #f0f3ff; + color: $u-type-primary; + font-size: 24rpx; + font-weight: 600; + border-radius: 50%; + margin-right: 20rpx; + flex-shrink: 0; + } + + .item-title { + flex: 1; + font-size: 30rpx; + font-weight: 500; + color: #333; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + } + + .loading-more { + display: flex; + flex-direction: column; + align-items: center; + padding: 32rpx 0; + color: #999; + font-size: 24rpx; + } + + .no-more { + text-align: center; + padding: 32rpx 0; + color: #ccc; + font-size: 24rpx; + } } \ No newline at end of file diff --git a/components/nbd-select-project.vue b/components/nbd-select-project.vue deleted file mode 100644 index 7308452..0000000 --- a/components/nbd-select-project.vue +++ /dev/null @@ -1,163 +0,0 @@ - - - - - \ No newline at end of file diff --git a/components/nbd-select.vue b/components/nbd-select.vue index f014e7c..001fb83 100644 --- a/components/nbd-select.vue +++ b/components/nbd-select.vue @@ -1,22 +1,24 @@ - - + \ No newline at end of file diff --git a/pages/index/index.vue b/pages/index/index.vue index f6b5d46..533d40e 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -22,37 +22,37 @@ 工厂焊接一次合格率 - {{hjIndexData?.GCFirstPassRate}} + {{ hjIndexData?.GCFirstPassRate|| '--'}} 现场焊接一次合格率 - {{hjIndexData?.XCFirstPassRate}} + {{ hjIndexData?.XCFirstPassRate || '--' }} 工厂预制进度 - {{hjIndexData?.GCProgress}} + {{ hjIndexData?.GCProgress|| '--' }} 现场焊接进度 - {{hjIndexData?.XCProgress}} + {{ hjIndexData?.XCProgress || '--'}} 工厂焊工功效 - {{hjIndexData?.GCWelderEfficacy}} + {{ hjIndexData?.GCWelderEfficacy || '--'}} 现场焊接功效 - {{hjIndexData?.XCWelderEfficacy}} + {{ hjIndexData?.XCWelderEfficacy || '--'}} 项目管道实时预制率 (包含工厂和现场的预制口) - {{hjIndexData?.PipePrefabricationRate}} + {{ hjIndexData?.PipePrefabricationRate || '--'}} @@ -73,13 +73,14 @@ {{ item.name }} + 请选择应用 - + @@ -89,7 +90,7 @@ - + {{ item.name }} @@ -121,9 +122,9 @@ - + @@ -178,7 +179,15 @@ const currentProjectName = computed(() => currentProject.value?.ProjectName || '') - const handleSkip= (item) => { + const handleSkip = (item) => { + if(!currentProject.value.ProjectId){ + handleShowProjectSelect() + uni.showToast({ + title: '请选择一个项目', + icon: 'none' + }) + return + } uni.navigateTo({ url: item.path }) @@ -201,7 +210,7 @@ showEditQuick.value = false uni.showToast({ title: '已更新快捷应用', - icon: 'success' + icon: 'none' }) } diff --git a/pipe/diankou/list.vue b/pipe/diankou/list.vue index d999a42..ff03d89 100644 --- a/pipe/diankou/list.vue +++ b/pipe/diankou/list.vue @@ -1,14 +1,13 @@ - - + \ No newline at end of file diff --git a/store/modules/menu.js b/store/modules/menu.js index 1391eb8..650213c 100644 --- a/store/modules/menu.js +++ b/store/modules/menu.js @@ -96,7 +96,7 @@ export const useMenuStore = defineStore('menu', () => { enabled: true, strategies: [{ key: 'menu', - paths: [], + paths: ['appsList'], }] }, }) diff --git a/store/modules/user.js b/store/modules/user.js index f6cb338..c3eed45 100644 --- a/store/modules/user.js +++ b/store/modules/user.js @@ -42,11 +42,6 @@ export const useUserStore = defineStore('user', () => { const logout = () => { token.value = "" userInfo.value = null - // loginForm.value = { - // account: '', - // password: '', - // Telephone: '', - // } currentProject.value = null } diff --git a/utils/constant.js b/utils/constant.js index f12539d..4e0340b 100644 --- a/utils/constant.js +++ b/utils/constant.js @@ -16,34 +16,34 @@ export const defaultApps = [{ menuId: '3ACE25CE-C5CE-4CEC-AD27-0D5CF1DF2F01', path: "/pipe/diankou/list", prefix: 'nbd-icon', - selected: true + selected: false }, { name: '试压管理', icon: 'shiyabao', menuId: '55976B16-2C33-406E-B514-2FE42D031071', prefix: 'nbd-icon', - selected: true + selected: false }, { name: '包装管理', icon: 'baozhuangguanli', menuId: "25DED954-10C9-47CC-99F2-C44FDE9E0A81", prefix: 'nbd-icon', - selected: true + selected: false }, { name: '发货管理', icon: 'a-facheguanli', menuId: "EEC0D060-C15E-4D25-B015-C2B91F735DAC", prefix: 'nbd-icon', - selected: true + selected: false }, { name: '预制组件管理', icon: 'yuzhijian', menuId: "8255554C-0A92-4C7B-BF19-779AF0220A8C", prefix: 'nbd-icon', - selected: true + selected: false } ] \ No newline at end of file diff --git a/utils/request.js b/utils/request.js index 75ee5eb..0cc4d12 100644 --- a/utils/request.js +++ b/utils/request.js @@ -1,7 +1,7 @@ import { useUserStore } from '@/store' // TODO: 替换为实际的 API 地址 -export const baseUrl = ' https://lygcgs.com.cn:8078/shjapi/api/' +export const baseUrl = 'https://sggl.sedin.com.cn/sgglapi/api/' // ===== 防止重复请求 ===== const pendingRequests = new Map()