修改样式

master
贾肃 4 months ago
parent fbfe426c2f
commit e87fc1f99a
  1. 14
      src/assets/styles/index.scss
  2. 11
      src/assets/styles/ruoyi.scss
  3. 8
      src/components/Hamburger/index.vue
  4. 7
      src/components/Pagination/index.vue
  5. 18
      src/components/baseSelection/index.vue
  6. 48
      src/router/index.js
  7. 6
      src/views/basicData/breedingBase/breedingBaseForm.vue
  8. 98
      src/views/basicData/breedingBase/index.vue
  9. 6
      src/views/system/base/baseRightControl.vue
  10. 0
      src/views/system/base/massifTable.vue

@ -182,3 +182,17 @@ aside {
margin-bottom: 10px; margin-bottom: 10px;
} }
} }
.el-link+.el-link{
margin-left: 12px;
}
.operate-detail{
color: #02B091;
}
.operate-edit{
color: #08ACF2;
}
.operate-delete{
color: #FF4B4B;
}

@ -123,8 +123,9 @@
} }
.pagination-container .el-pagination { .pagination-container .el-pagination {
right: 0; justify-content: center;
position: absolute; //right: 0;
//position: absolute;
} }
@media ( max-width : 768px) { @media ( max-width : 768px) {
@ -279,3 +280,9 @@
.top-right-btn { .top-right-btn {
margin-left: auto; margin-left: auto;
} }
.el-input-number{
.el-input-number__decrease,.el-input-number__increase{
background: none;
}
}

@ -80,7 +80,7 @@ const menuList = ref([
{ {
label: '环境数据',icon:'pure-natural', children: [ label: '环境数据',icon:'pure-natural', children: [
{label: '基地地图',href:'/system/base/mapMarkers'}, {label: '基地地图',href:'/system/base/mapMarkers'},
{label: '地块管理',href:'/system/base/baseTable'}, {label: '地块管理',href:'/system/base/massifTable'},
{label: '土壤数据',href: '/envData/soilData'}, {label: '土壤数据',href: '/envData/soilData'},
{label: '气象数据',href: '/envData/climaticData'}, {label: '气象数据',href: '/envData/climaticData'},
{label: '监控数据',href: '/envData/monitorData'}, {label: '监控数据',href: '/envData/monitorData'},
@ -88,9 +88,9 @@ const menuList = ref([
}, },
{ {
label: '表型数据',icon:'chart-pie', children: [ label: '表型数据',icon:'chart-pie', children: [
{label: '原始数据管理'}, {label: '原始数据管理',href:'/tableTypeData/rawData'},
{label: '表型数据管理'}, {label: '表型数据管理',href:'/tableTypeData/tabularData'},
{label: '植株表型数据'}, {label: '植株表型数据',href:'/tableTypeData/plantTableData'},
] ]
}, },
{ {

@ -8,6 +8,7 @@
:page-sizes="pageSizes" :page-sizes="pageSizes"
:pager-count="pagerCount" :pager-count="pagerCount"
:total="total" :total="total"
hide-on-single-page
@size-change="handleSizeChange" @size-change="handleSizeChange"
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
/> />
@ -43,11 +44,12 @@ const props = defineProps({
}, },
layout: { layout: {
type: String, type: String,
default: 'total, sizes, prev, pager, next, jumper' // default: 'total, sizes, prev, pager, next, jumper'
default: 'prev, pager, next'
}, },
background: { background: {
type: Boolean, type: Boolean,
default: true default: false
}, },
autoScroll: { autoScroll: {
type: Boolean, type: Boolean,
@ -102,4 +104,5 @@ function handleCurrentChange(val) {
.pagination-container.hidden { .pagination-container.hidden {
display: none; display: none;
} }
</style> </style>

@ -4,15 +4,7 @@ import {selAllBreedingBase} from "@/api/basicData/breedingBaseApi.js";
const loading = ref(false) const loading = ref(false)
const baseList = ref([]) const baseList = ref([])
const route = useRoute(); const route = useRoute();
onMounted(()=>{ const router = useRouter();
if (route.query.id){
baseList.value.forEach(item => {
if (item.id === Number(route.query.id)){
clickBase(item)
}
})
}
})
const currentBase = defineModel({type:Object,default:()=>({})}) const currentBase = defineModel({type:Object,default:()=>({})})
const maxHeight = ref(window.innerHeight - 130); const maxHeight = ref(window.innerHeight - 130);
const settingsStore = useSettingsStore() const settingsStore = useSettingsStore()
@ -27,6 +19,14 @@ const selBaseList = () => {
loading.value = true loading.value = true
selAllBreedingBase({}).then(res =>{ selAllBreedingBase({}).then(res =>{
baseList.value = res.data 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(()=>{ }).finally(()=>{
loading.value = false loading.value = false
}) })

@ -119,9 +119,9 @@ export const constantRoutes = [
redirect: 'noredirect', redirect: 'noredirect',
children: [ children: [
{ {
path: 'baseTable', path: 'massifTable',
component: () => import('@/views/system/base/baseTable.vue'), component: () => import('@/views/system/base/massifTable.vue'),
name: 'baseTable', name: 'massifTable',
meta: { title: '地块管理' } 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: '植株表型数据' }
}
]
},
] ]
// 动态路由,基于用户权限动态去加载 // 动态路由,基于用户权限动态去加载

@ -149,20 +149,20 @@ const changeArea = (value) =>{
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="占地面积(亩)" prop="area"> <el-form-item label="占地面积(亩)" prop="area">
<el-input-number precision="2" :controls="false" placeholder="请输入占地面积(亩)" v-if="formStatus!==3" v-model="formData.area"></el-input-number> <el-input-number precision="2" :controls="false" placeholder="请输入占地面积(亩)" v-if="formStatus!==3" v-model="formData.area" controls-position="right"></el-input-number>
<div v-else>{{formData.area}}</div> <div v-else>{{formData.area}}</div>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="基地坐标(经度)" prop="longitude"> <el-form-item label="基地坐标(经度)" prop="longitude">
<el-input-number placeholder="请输入基地坐标(经度)" v-if="formStatus!==3" v-model="formData.longitude"></el-input-number> <el-input-number placeholder="请输入基地坐标(经度)" v-if="formStatus!==3" v-model="formData.longitude" controls-position="right"></el-input-number>
<div v-else>{{formData.longitude}}</div> <div v-else>{{formData.longitude}}</div>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="基地坐标(纬度)" prop="latitude"> <el-form-item label="基地坐标(纬度)" prop="latitude">
<el-input-number placeholder="请输入基地坐标(纬度)" v-if="formStatus!==3" v-model="formData.latitude"></el-input-number> <el-input-number placeholder="请输入基地坐标(纬度)" v-if="formStatus!==3" v-model="formData.latitude" controls-position="right"></el-input-number>
<div v-else>{{formData.latitude}}</div> <div v-else>{{formData.latitude}}</div>
</el-form-item> </el-form-item>
</el-col> </el-col>

@ -39,22 +39,29 @@
</el-row> </el-row>
</el-form> </el-form>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-button type="primary" icon="Plus" @click="toAdd">/</el-button> <el-button type="primary" @click="exportExcel">Excel</el-button>
<el-button type="primary" icon="Download" @click="exportExcel">Excel</el-button> <el-button type="primary" @click="toAdd" plain>新增基地/资源圃</el-button>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList" :columns="columns"></right-toolbar> <right-toolbar v-model:showSearch="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
</el-row> </el-row>
<el-table v-loading="loading" :data="tableList" @selection-change="handleSelectionChange" border> <el-table v-loading="loading" :data="tableList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="50" align="center" /> <el-table-column label="基地/资源圃名称" align="center" key="baseName" prop="baseName"
<el-table-column label="基地/资源圃名称" align="center" key="baseName" prop="baseName" v-if="columns[0].visible" /> v-if="columns[0].visible"/>
<el-table-column label="基地类型" align="center" key="baseType" prop="baseTypeName" v-if="columns[1].visible" :show-overflow-tooltip="true" > <el-table-column label="基地类型" align="center" key="baseType" prop="baseTypeName" v-if="columns[1].visible"
:show-overflow-tooltip="true">
</el-table-column> </el-table-column>
<el-table-column label="所属省份" align="center" key="administrativeDivisionName" prop="administrativeDivisionName" v-if="columns[2].visible" :show-overflow-tooltip="true" /> <el-table-column label="所属省份" align="center" key="administrativeDivisionName"
<el-table-column label="地理位置" align="center" key="position" prop="dept.position" v-if="columns[3].visible" :show-overflow-tooltip="true" /> prop="administrativeDivisionName" v-if="columns[2].visible" :show-overflow-tooltip="true"/>
<el-table-column label="战地面积(亩)" align="center" key="area" prop="area" v-if="columns[4].visible" width="120" /> <el-table-column label="地理位置" align="center" key="position" prop="dept.position" v-if="columns[3].visible"
<el-table-column label="基地坐标(经度)" align="center" key="longitude" prop="longitude" v-if="columns[5].visible" width="120" /> :show-overflow-tooltip="true"/>
<el-table-column label="基地坐标(纬度)" align="center" key="latitude" prop="latitude" v-if="columns[6].visible"></el-table-column> <el-table-column label="战地面积(亩)" align="center" key="area" prop="area" v-if="columns[4].visible"
<el-table-column label="创建人" align="center" prop="createUserName" v-if="columns[7].visible" width="160"></el-table-column> width="120"/>
<el-table-column label="基地坐标(经度)" align="center" key="longitude" prop="longitude"
v-if="columns[5].visible" width="120"/>
<el-table-column label="基地坐标(纬度)" align="center" key="latitude" prop="latitude"
v-if="columns[6].visible"></el-table-column>
<el-table-column label="创建人" align="center" prop="createUserName" v-if="columns[7].visible"
width="160"></el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime" v-if="columns[8].visible" width="160"> <el-table-column label="创建时间" align="center" prop="createTime" v-if="columns[8].visible" width="160">
<template #default="scope"> <template #default="scope">
<span>{{ parseTime(scope.row.createTime) }}</span> <span>{{ parseTime(scope.row.createTime) }}</span>
@ -62,15 +69,9 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" width="150" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" width="150" class-name="small-padding fixed-width">
<template #default="scope"> <template #default="scope">
<el-tooltip content="详情" placement="top"> <el-link type="info" @click="handleView(scope.row)"></el-link>
<el-button link type="primary" @click="handleView(scope.row)"></el-button> <el-link type="primary" @click="handleUpdate(scope.row)" class="operate-edit">修改</el-link>
</el-tooltip> <el-link type="danger" @click="delBreedingBase(scope.row)"></el-link>
<el-tooltip content="修改" placement="top">
<el-button link type="primary" @click="handleUpdate(scope.row)"></el-button>
</el-tooltip>
<el-tooltip content="删除" placement="top">
<el-button link type="primary" @click="delBreedingBase(scope.row)"></el-button>
</el-tooltip>
</template> </template>
</el-table-column> </el-table-column>
<template #empty> <template #empty>
@ -105,7 +106,7 @@ import dayjs from "dayjs";
// //
const breedingBaseFormRef = ref(null) const breedingBaseFormRef = ref(null)
const router = useRouter(); const router = useRouter();
const { proxy } = getCurrentInstance(); const {proxy} = getCurrentInstance();
const tableList = ref([]); const tableList = ref([]);
const loading = ref(false); const loading = ref(false);
const showSearch = ref(true); const showSearch = ref(true);
@ -115,20 +116,20 @@ const multiple = ref(true);
const total = ref(0); const total = ref(0);
// //
const columns = ref([ const columns = ref([
{ key: 0, label: `基地/资源圃名称`, visible: true }, {key: 0, label: `基地/资源圃名称`, visible: true},
{ key: 1, label: `基地类型`, visible: true }, {key: 1, label: `基地类型`, visible: true},
{ key: 2, label: `所属省份`, visible: true }, {key: 2, label: `所属省份`, visible: true},
{ key: 3, label: `地里位置`, visible: true }, {key: 3, label: `地里位置`, visible: true},
{ key: 4, label: `占地面积`, visible: true }, {key: 4, label: `占地面积`, visible: true},
{ key: 5, label: `基地坐标(经度)`, visible: true }, {key: 5, label: `基地坐标(经度)`, visible: true},
{ key: 6, label: `基地坐标(纬度)`, visible: true }, {key: 6, label: `基地坐标(纬度)`, visible: true},
{ key: 7, label: `创建人`, visible: true }, {key: 7, label: `创建人`, visible: true},
{ key: 8, label: `创建时间`, visible: true }, {key: 8, label: `创建时间`, visible: true},
]); ]);
const exportExcel = () => { const exportExcel = () => {
proxy.download("/baseNurseryInfo/export", { proxy.download("/baseNurseryInfo/export", {
...queryParams.value, ...queryParams.value,
},`智能育种基地/种质资源圃列表-${dayjs().format('YYYY年MM月DD日')}.xlsx`); }, `智能育种基地/种质资源圃列表-${dayjs().format('YYYY年MM月DD日')}.xlsx`);
} }
const data = reactive({ const data = reactive({
form: {}, form: {},
@ -139,15 +140,15 @@ const data = reactive({
baseType: undefined, baseType: undefined,
administrativeDivisionId: undefined administrativeDivisionId: undefined
}, },
provincesOptions:provinceAndCityData.map((item) => { provincesOptions: provinceAndCityData.map((item) => {
return { return {
value:Number(item.value), value: Number(item.value),
label: item.label label: item.label
} }
}), }),
baseTypeOptions:[ baseTypeOptions: [
{ label: '智能育种基地', value: 1}, {label: '智能育种基地', value: 1},
{ label: '种质资源圃', value: 2} {label: '种质资源圃', value: 2}
] ]
}); });
// //
@ -168,10 +169,10 @@ const delBreedingBase = (item) => {
}) })
} }
// //
const submitSuccess = (value) =>{ const submitSuccess = (value) => {
getList() getList()
} }
const { queryParams, form,} = toRefs(data); const {queryParams, form,} = toRefs(data);
/** 查询列表 */ /** 查询列表 */
function getList() { function getList() {
@ -179,32 +180,37 @@ function getList() {
selBreedingBasePage(queryParams.value).then(res => { selBreedingBasePage(queryParams.value).then(res => {
tableList.value = res.rows; tableList.value = res.rows;
total.value = res.total; total.value = res.total;
}).finally(()=>{ }).finally(() => {
loading.value = false; loading.value = false;
}); });
}; };
/** 搜索按钮操作 */ /** 搜索按钮操作 */
function handleQuery() { function handleQuery() {
queryParams.value.pageNum = 1; queryParams.value.pageNum = 1;
getList(); getList();
}; };
/** 重置按钮操作 */ /** 重置按钮操作 */
function resetQuery() { function resetQuery() {
proxy.resetForm("queryRef"); proxy.resetForm("queryRef");
handleQuery(); handleQuery();
}; };
/** 导出按钮操作 */ /** 导出按钮操作 */
function handleExport() { function handleExport() {
proxy.download("system/user/export", { proxy.download("system/user/export", {
...queryParams.value, ...queryParams.value,
},`user_${new Date().getTime()}.xlsx`); }, `user_${new Date().getTime()}.xlsx`);
}; };
/** 选择条数 */ /** 选择条数 */
function handleSelectionChange(selection) { function handleSelectionChange(selection) {
ids.value = selection.map(item => item.id); ids.value = selection.map(item => item.id);
single.value = selection.length != 1; single.value = selection.length != 1;
multiple.value = !selection.length; multiple.value = !selection.length;
}; };
/** 修改按钮操作 */ /** 修改按钮操作 */
function handleUpdate(row) { function handleUpdate(row) {
breedingBaseFormRef.value.toUpdate(row) breedingBaseFormRef.value.toUpdate(row)
@ -215,19 +221,21 @@ const handleView = (row) => {
const toAdd = () => { const toAdd = () => {
breedingBaseFormRef.value.toAdd() breedingBaseFormRef.value.toAdd()
} }
onMounted(()=>{ onMounted(() => {
getList() getList()
}) })
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.base-title{ .base-title {
margin: 10px 0; margin: 10px 0;
.handoff-model{
.handoff-model {
padding-right: 20px; padding-right: 20px;
text-align: right; text-align: right;
} }
} }
.el-form-item{
.el-form-item {
width: 100%; width: 100%;
} }
</style> </style>

@ -8,8 +8,8 @@ const plantingSeasonList = [
] ]
const router = useRouter() const router = useRouter()
const route = useRoute(); const route = useRoute();
const toBaseTable = () => { const toMassifTable = () => {
router.push({path:'/system/base/baseTable',query:route.params}) router.push({path:'/system/base/massifTable',query:route.params})
} }
const props = defineProps({ const props = defineProps({
isBaseMap:Boolean isBaseMap:Boolean
@ -58,7 +58,7 @@ const control = defineModel({
地图模式 地图模式
<el-icon style="margin-left: 5px"><Select /></el-icon> <el-icon style="margin-left: 5px"><Select /></el-icon>
</el-dropdown-item> </el-dropdown-item>
<el-dropdown-item @click="toBaseTable"> <el-dropdown-item @click="toMassifTable">
<i-list-checkbox theme="outline" size="20" fill="#333" style="margin-right: 5px"/> <i-list-checkbox theme="outline" size="20" fill="#333" style="margin-right: 5px"/>
列表模式 列表模式
</el-dropdown-item> </el-dropdown-item>

Loading…
Cancel
Save