From e87fc1f99a4538e74772d518775705adbe168145 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B4=BE=E8=82=83?= <15833576927@163.com> Date: Thu, 23 May 2024 10:43:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/styles/index.scss | 14 +++ src/assets/styles/ruoyi.scss | 11 ++- src/components/Hamburger/index.vue | 8 +- src/components/Pagination/index.vue | 7 +- src/components/baseSelection/index.vue | 18 ++-- src/router/index.js | 48 ++++++++- .../breedingBase/breedingBaseForm.vue | 6 +- src/views/basicData/breedingBase/index.vue | 98 ++++++++++--------- src/views/system/base/baseRightControl.vue | 6 +- .../base/{baseTable.vue => massifTable.vue} | 0 10 files changed, 145 insertions(+), 71 deletions(-) rename src/views/system/base/{baseTable.vue => massifTable.vue} (100%) diff --git a/src/assets/styles/index.scss b/src/assets/styles/index.scss index 1903adf..fa5c6f2 100644 --- a/src/assets/styles/index.scss +++ b/src/assets/styles/index.scss @@ -182,3 +182,17 @@ aside { margin-bottom: 10px; } } +.el-link+.el-link{ + margin-left: 12px; +} +.operate-detail{ + color: #02B091; +} + +.operate-edit{ + color: #08ACF2; +} + +.operate-delete{ + color: #FF4B4B; +} diff --git a/src/assets/styles/ruoyi.scss b/src/assets/styles/ruoyi.scss index 663eb31..51e0c71 100644 --- a/src/assets/styles/ruoyi.scss +++ b/src/assets/styles/ruoyi.scss @@ -123,8 +123,9 @@ } .pagination-container .el-pagination { - right: 0; - position: absolute; + justify-content: center; + //right: 0; + //position: absolute; } @media ( max-width : 768px) { @@ -279,3 +280,9 @@ .top-right-btn { margin-left: auto; } +.el-input-number{ + .el-input-number__decrease,.el-input-number__increase{ + background: none; + } + +} \ No newline at end of file diff --git a/src/components/Hamburger/index.vue b/src/components/Hamburger/index.vue index c577983..84fac64 100644 --- a/src/components/Hamburger/index.vue +++ b/src/components/Hamburger/index.vue @@ -80,7 +80,7 @@ const menuList = ref([ { label: '环境数据',icon:'pure-natural', children: [ {label: '基地地图',href:'/system/base/mapMarkers'}, - {label: '地块管理',href:'/system/base/baseTable'}, + {label: '地块管理',href:'/system/base/massifTable'}, {label: '土壤数据',href: '/envData/soilData'}, {label: '气象数据',href: '/envData/climaticData'}, {label: '监控数据',href: '/envData/monitorData'}, @@ -88,9 +88,9 @@ const menuList = ref([ }, { label: '表型数据',icon:'chart-pie', children: [ - {label: '原始数据管理'}, - {label: '表型数据管理'}, - {label: '植株表型数据'}, + {label: '原始数据管理',href:'/tableTypeData/rawData'}, + {label: '表型数据管理',href:'/tableTypeData/tabularData'}, + {label: '植株表型数据',href:'/tableTypeData/plantTableData'}, ] }, { diff --git a/src/components/Pagination/index.vue b/src/components/Pagination/index.vue index 3b29fe4..4a097ad 100644 --- a/src/components/Pagination/index.vue +++ b/src/components/Pagination/index.vue @@ -8,6 +8,7 @@ :page-sizes="pageSizes" :pager-count="pagerCount" :total="total" + hide-on-single-page @size-change="handleSizeChange" @current-change="handleCurrentChange" /> @@ -43,11 +44,12 @@ const props = defineProps({ }, layout: { type: String, - default: 'total, sizes, prev, pager, next, jumper' + // default: 'total, sizes, prev, pager, next, jumper' + default: 'prev, pager, next' }, background: { type: Boolean, - default: true + default: false }, autoScroll: { type: Boolean, @@ -102,4 +104,5 @@ function handleCurrentChange(val) { .pagination-container.hidden { display: none; } + diff --git a/src/components/baseSelection/index.vue b/src/components/baseSelection/index.vue index 823348b..85773e3 100644 --- a/src/components/baseSelection/index.vue +++ b/src/components/baseSelection/index.vue @@ -4,15 +4,7 @@ import {selAllBreedingBase} from "@/api/basicData/breedingBaseApi.js"; const loading = ref(false) const baseList = ref([]) const route = useRoute(); -onMounted(()=>{ - if (route.query.id){ - baseList.value.forEach(item => { - if (item.id === Number(route.query.id)){ - clickBase(item) - } - }) - } -}) +const router = useRouter(); const currentBase = defineModel({type:Object,default:()=>({})}) const maxHeight = ref(window.innerHeight - 130); const settingsStore = useSettingsStore() @@ -27,6 +19,14 @@ const selBaseList = () => { loading.value = true selAllBreedingBase({}).then(res =>{ baseList.value = res.data + if (route.query.baseId){ + baseList.value.forEach(item => { + if (item.id === parseInt(route.query.baseId)){ + clickBase(item) + router.replace({ query: {} }); + } + }) + } }).finally(()=>{ loading.value = false }) diff --git a/src/router/index.js b/src/router/index.js index 7749e5b..c423da6 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -119,9 +119,9 @@ export const constantRoutes = [ redirect: 'noredirect', children: [ { - path: 'baseTable', - component: () => import('@/views/system/base/baseTable.vue'), - name: 'baseTable', + path: 'massifTable', + component: () => import('@/views/system/base/massifTable.vue'), + name: 'massifTable', meta: { title: '地块管理' } } ] @@ -224,6 +224,48 @@ export const constantRoutes = [ } ] }, + { + path: '/tableTypeData', + component: Layout, + hidden: true, + redirect: 'noredirect', + children: [ + { + path: 'tabularData', + component: () => import('@/views/tableTypeData/tabularData'), + name: 'tabularData', + meta: { title: '表型数据管理' } + } + ] + }, + { + path: '/tableTypeData', + component: Layout, + hidden: true, + redirect: 'noredirect', + children: [ + { + path: 'rawData', + component: () => import('@/views/tableTypeData/rawData'), + name: 'rawData', + meta: { title: '原始数据管理' } + } + ] + }, + { + path: '/tableTypeData', + component: Layout, + hidden: true, + redirect: 'noredirect', + children: [ + { + path: 'plantTableData', + component: () => import('@/views/tableTypeData/plantTableData'), + name: 'plantTableData', + meta: { title: '植株表型数据' } + } + ] + }, ] // 动态路由,基于用户权限动态去加载 diff --git a/src/views/basicData/breedingBase/breedingBaseForm.vue b/src/views/basicData/breedingBase/breedingBaseForm.vue index c60da63..1c20a26 100644 --- a/src/views/basicData/breedingBase/breedingBaseForm.vue +++ b/src/views/basicData/breedingBase/breedingBaseForm.vue @@ -149,20 +149,20 @@ const changeArea = (value) =>{ - +
{{formData.area}}
- +
{{formData.longitude}}
- +
{{formData.latitude}}
diff --git a/src/views/basicData/breedingBase/index.vue b/src/views/basicData/breedingBase/index.vue index 6f84750..9c417f5 100644 --- a/src/views/basicData/breedingBase/index.vue +++ b/src/views/basicData/breedingBase/index.vue @@ -39,22 +39,29 @@ - 新增基地/资源圃 - 导出Excel + 导出Excel + 新增基地/资源圃 - - - - + + + - - - - - - + + + + + +