|
@@ -40,13 +40,14 @@
|
|
|
label="名称">
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
+ prop="frontLocation"
|
|
|
header-align="center"
|
|
|
align="center"
|
|
|
label="地址">
|
|
|
- <template slot-scope="scope">
|
|
|
+ <!-- <template slot-scope="scope">
|
|
|
{{ comLocation(scope.row.location) }}
|
|
|
- <!-- {{scope.row.location}} -->
|
|
|
- </template>
|
|
|
+ {{scope.row.location}}
|
|
|
+ </template> -->
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
prop="manager"
|
|
@@ -155,10 +156,12 @@ export default {
|
|
|
manager: '',
|
|
|
name: '',
|
|
|
buildTime: '',
|
|
|
- selectedOptions: []
|
|
|
+ selectedOptions: [],
|
|
|
+ loc: ''
|
|
|
},
|
|
|
options: regionData,
|
|
|
selectedOptions: [],
|
|
|
+ loc: '',
|
|
|
dataRule: { // 校验规则
|
|
|
name: [
|
|
|
{ required: true, message: '牧场名称不能为空', trigger: 'blur' },
|
|
@@ -232,9 +235,10 @@ export default {
|
|
|
var loc = "";
|
|
|
this.form.location1 = ''
|
|
|
for (let i = 0; i < this.form.selectedOptions.length; i++) {
|
|
|
- loc += CodeToText[this.form.selectedOptions[i]];
|
|
|
+ loc += CodeToText[this.form.selectedOptions[i]]
|
|
|
this.form.location1 += this.form.selectedOptions[i] + ','
|
|
|
}
|
|
|
+ this.loc = loc
|
|
|
console.log(loc);
|
|
|
},
|
|
|
// 当前页
|
|
@@ -336,7 +340,8 @@ export default {
|
|
|
location: this.form.location,
|
|
|
manager: this.form.manager,
|
|
|
name: this.form.name,
|
|
|
- buildTime: this.form.buildTime
|
|
|
+ buildTime: this.form.buildTime,
|
|
|
+ frontLocation: this.form.loc
|
|
|
})
|
|
|
}).then(result => {
|
|
|
if (result.data.code === 0) {
|
|
@@ -373,7 +378,8 @@ export default {
|
|
|
location: this.form.location,
|
|
|
manager: this.form.manager,
|
|
|
name: this.form.name,
|
|
|
- buildTime: this.form.buildTime
|
|
|
+ buildTime: this.form.buildTime,
|
|
|
+ frontLocation: this.form.loc
|
|
|
})
|
|
|
}).then(result => {
|
|
|
if (result.data.code === 0) {
|
|
@@ -409,6 +415,7 @@ export default {
|
|
|
// 校验输入是否完整
|
|
|
validComplete (val) {
|
|
|
this.form.location = this.form.location1 + this.form.location2
|
|
|
+ this.form.loc = this.loc + this.form.location2
|
|
|
val && (delete this.form.id)
|
|
|
for (let i in this.form) {
|
|
|
if (!this.form[i].toString()) {
|