|
@@ -32,6 +32,7 @@
|
|
|
<el-table-column label="牧场" min-width="150px" align="center" prop="pastureName" />
|
|
|
<el-table-column label="牧场全称" min-width="150px" align="center" prop="companyName" />
|
|
|
<el-table-column label="牧场编号" min-width="150px" align="center" prop="pastureNumber" />
|
|
|
+ <el-table-column label="中心" min-width="150px" align="center" prop="center" />
|
|
|
<el-table-column label="地图经度" min-width="150px" align="center" prop="longitude" />
|
|
|
<el-table-column label="地图纬度" min-width="150px" align="center" prop="latitude" />
|
|
|
<el-table-column label="备注" min-width="150px" align="center" prop="note" />
|
|
@@ -56,29 +57,39 @@
|
|
|
<el-option v-for="item in regionList" :key="item.id" :label="item.name" :value="item.id" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="所属区域:" v-else>
|
|
|
- <el-input ref="areaName" v-model="create.temp.areaName" placeholder="所属区域" disabled style="width: 100%;" />
|
|
|
+ <el-form-item label="所属区域:" v-else>
|
|
|
+ <!-- <el-input ref="areaName" v-model="create.temp.areaName" placeholder="所属区域" style="width: 100%;" /> -->
|
|
|
+ <el-select v-model="create.temp.areaid" placeholder="所属区域" style="width: 100%;" :disabled="create.dialogStatus =='see'" >
|
|
|
+ <el-option v-for="item in regionList" :key="item.id" :label="item.name" :value="parseInt(item.id)" />
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-col :span="24">
|
|
|
<el-form-item label="牧场:" prop="pastureName">
|
|
|
- <el-input ref="pastureName" v-model="create.temp.pastureName" placeholder="牧场" :disabled="create.dialogStatus !=='create'" style="width: 100%;" />
|
|
|
+ <el-input ref="pastureName" v-model="create.temp.pastureName" placeholder="牧场" style="width: 100%;" :disabled="create.dialogStatus =='see'" /><!-- :disabled="create.dialogStatus =='see'" -->
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-col :span="24">
|
|
|
<el-form-item label="牧场全称:" prop="companyName">
|
|
|
- <el-input ref="companyName" v-model="create.temp.companyName" placeholder="牧场全称" :disabled="create.dialogStatus !=='create'" style="width: 100%;" />
|
|
|
+ <el-input ref="companyName" v-model="create.temp.companyName" placeholder="牧场全称" style="width: 100%;" :disabled="create.dialogStatus =='see'" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-col :span="24">
|
|
|
<el-form-item label="牧场编号:" prop="pastureNumber">
|
|
|
- <el-input ref="pastureNumber" v-model="create.temp.pastureNumber" placeholder="牧场编号" :disabled="create.dialogStatus !=='create'" style="width: 100%;" />
|
|
|
+ <el-input ref="pastureNumber" v-model="create.temp.pastureNumber" placeholder="牧场编号" style="width: 100%;" :disabled="create.dialogStatus =='see'" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="中心: " prop="center">
|
|
|
+ <el-input ref="center" v-model="create.temp.center" placeholder="中心" style="width: 100%;" :disabled="create.dialogStatus =='see'" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -136,6 +147,7 @@ export default {
|
|
|
],
|
|
|
findAllPasture: [],
|
|
|
regionList: [], // 所属区域
|
|
|
+ areaIds:[],
|
|
|
table: {
|
|
|
tableKey: 0,
|
|
|
list: null,
|
|
@@ -160,7 +172,7 @@ export default {
|
|
|
pastureNumber: [{ required: true, message: '必填', trigger: 'blur' }]
|
|
|
},
|
|
|
temp: {
|
|
|
- areaId: '', pastureName: '', pastureNumber: '', longitude: '', latitude: '', note: '', sort: ''
|
|
|
+ areaId: '', pastureName: '', pastureNumber: '', longitude: '', latitude: '', note: '', sort: '',center:''
|
|
|
}
|
|
|
},
|
|
|
postDataParam: {},
|
|
@@ -179,6 +191,9 @@ export default {
|
|
|
GetDataByNames(this.requestParams).then(response => {
|
|
|
this.findAllPasture = response.data.findAllPasture.list
|
|
|
this.regionList = response.data.getareaList.list
|
|
|
+ this.regionList.forEach(row => {
|
|
|
+ this.areaIds[row.id]= row.name
|
|
|
+ });
|
|
|
})
|
|
|
},
|
|
|
getList() {
|
|
@@ -207,6 +222,7 @@ export default {
|
|
|
this.create.temp.latitude = ''
|
|
|
this.create.temp.note = ''
|
|
|
this.create.temp.sort = ''
|
|
|
+ this.create.temp.center = ''
|
|
|
},
|
|
|
handleCreate() {
|
|
|
this.resetCreateTemp()
|
|
@@ -231,6 +247,7 @@ export default {
|
|
|
longitude: this.create.temp.longitude,
|
|
|
latitude: this.create.temp.latitude,
|
|
|
note: this.create.temp.note,
|
|
|
+ center:this.create.temp.center,
|
|
|
companyName: this.create.temp.companyName
|
|
|
}}
|
|
|
this.postDataParam.data[1] = { 'name': 'insertPastureDept', 'type': 'e', 'parammaps': {
|
|
@@ -267,12 +284,22 @@ export default {
|
|
|
this.postDataParam.common = { 'returnmap': '0' }
|
|
|
this.postDataParam.data = []
|
|
|
this.postDataParam.data[0] = { 'name': 'updatePastureDept', 'type': 'e', 'parammaps': {
|
|
|
+ name:this.create.temp.pastureName,
|
|
|
+ companyName:this.create.temp.companyName,
|
|
|
+ pastureNumber:this.create.temp.pastureNumber,
|
|
|
+ center:this.create.temp.center,
|
|
|
+ region:this.areaIds[this.create.temp.areaid],
|
|
|
longitude: this.create.temp.longitude,
|
|
|
latitude: this.create.temp.latitude,
|
|
|
note: this.create.temp.note,
|
|
|
id: this.create.temp.id,
|
|
|
sort: this.create.temp.sort
|
|
|
}}
|
|
|
+ this.postDataParam.data[1] = { 'name': 'updateDepartment', 'type': 'e', 'parammaps': {
|
|
|
+ dname: this.create.temp.pastureName,
|
|
|
+ pastureId: this.create.temp.areaid,
|
|
|
+ id: this.create.temp.id
|
|
|
+ }}
|
|
|
ExecDataByConfig(this.postDataParam).then(response => {
|
|
|
console.log('编辑保存发送参数', this.postDataParam)
|
|
|
if (response.msg === 'fail') {
|