基地管理对接接口

master
贾肃 4 months ago
parent 05c71a1d1b
commit a7d12a4fac
  1. 2
      src/api/basicData/breedingBaseApi.js
  2. 6
      src/views/basicData/breedingBase/breedingBaseForm.vue
  3. 4
      src/views/basicData/breedingBase/index.vue
  4. 10
      src/views/system/base/baseTable.vue

@ -43,7 +43,7 @@ export function editBreedingBase(data) {
// 通过id删除基地
export function breedingBaseDeleteById(params) {
return request({
url: '/baseNurseryInfo/queryByPage',
url: '/baseNurseryInfo/deleteById',
method: 'get',
params: params
})

@ -44,7 +44,7 @@ const geyById = (row) => {
showDrawer.value = true
selLoading.value = true
breedingQueryById({id:row.id}).then(res =>{
resetForm(res.data)
resetForm(res)
}).finally(()=>{
selLoading.value = false
})
@ -157,13 +157,13 @@ const changeArea = (value) =>{
<el-col :span="24">
<el-form-item label="基地坐标(经度)" prop="longitude">
<el-input-number placeholder="请输入基地坐标(经度)" v-if="formStatus!==3" v-model="formData.longitude"></el-input-number>
<div v-else>{{formData.location}}</div>
<div v-else>{{formData.longitude}}</div>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="基地坐标(纬度)" prop="latitude">
<el-input-number placeholder="请输入基地坐标(纬度)" v-if="formStatus!==3" v-model="formData.latitude"></el-input-number>
<div v-else>{{formData.location}}</div>
<div v-else>{{formData.latitude}}</div>
</el-form-item>
</el-col>
<el-col :span="24">

@ -44,7 +44,7 @@
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="tableList" @selection-change="handleSelectionChange">
<el-table v-loading="loading" :data="tableList" @selection-change="handleSelectionChange" border>
<el-table-column type="selection" width="50" align="center" />
<el-table-column label="基地/资源圃名称" align="center" key="baseName" prop="baseName" v-if="columns[0].visible" />
<el-table-column label="基地类型" align="center" key="baseType" prop="baseType" v-if="columns[1].visible" :show-overflow-tooltip="true" >
@ -162,7 +162,7 @@ const delBreedingBase = (item) => {
customClass: 'message-box'
}
).then(() => {
breedingBaseDeleteById(item.id).then(res => {
breedingBaseDeleteById({id: item.id}).then(res => {
ElMessage.success(`${item.baseName}删除成功`)
getList()
})

@ -90,8 +90,8 @@
</el-form>
<el-row :gutter="10" class="mb8">
<el-button type="primary" icon="Download" @click="exportExcel">Excel</el-button>
<el-button type="primary" icon="Plus" @click="toAddMassif" :disabled="!currentBase.baseId">坐标点新增地块</el-button>
<el-button type="primary" icon="EditPen" @click="toBaseMap(true)" :disabled="!currentBase.baseId">绘制地块</el-button>
<el-button type="primary" icon="Plus" @click="toAddMassif" :disabled="!currentBase.id">坐标点新增地块</el-button>
<el-button type="primary" icon="EditPen" @click="toBaseMap(true)" :disabled="!currentBase.id">绘制地块</el-button>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
</el-row>
@ -190,7 +190,7 @@ const columns = ref([
const toAddMassif = () => {
massifFormRef.value.toAdd({
baseName:currentBase.value.baseName,
baseId:currentBase.value.baseId
id:currentBase.value.id
})
}
const toUpdateMassif = (row) => {
@ -317,8 +317,8 @@ function handleUpdate(row) {
};
//
const toBaseMap = (toAdd) => {
if (currentBase.value.baseId){
router.push({path:'/system/base/massifMap/'+currentBase.value.baseId,query:toAdd?{toAdd:true}:{}})
if (currentBase.value.id){
router.push({path:'/system/base/massifMap/'+currentBase.value.id,query:toAdd?{toAdd:true}:{}})
}else{
router.push('/system/base/mapMarkers')
}

Loading…
Cancel
Save