线路数据设置归属项目管理项目数据通过接口查询
This commit is contained in:
parent
f2039927db
commit
a373d21deb
@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { setMapProject } from '@/api/jmap/map';
|
import { setMapProject } from '@/api/jmap/map';
|
||||||
import { ProjectList } from '@/scripts/ProjectConfig';
|
import { getBackProjectConfigList } from '@/api/projectConfig';
|
||||||
export default {
|
export default {
|
||||||
name: 'SetMapProject',
|
name: 'SetMapProject',
|
||||||
data() {
|
data() {
|
||||||
@ -54,6 +54,15 @@ export default {
|
|||||||
options: []
|
options: []
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
mounted() {
|
||||||
|
getBackProjectConfigList().then(resp => {
|
||||||
|
if (resp.data && resp.data.length > 0) {
|
||||||
|
this.options = resp.data;
|
||||||
|
}
|
||||||
|
}).catch(error => {
|
||||||
|
console.log(error);
|
||||||
|
});
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doShow(row) {
|
doShow(row) {
|
||||||
this.dialogVisible = true;
|
this.dialogVisible = true;
|
||||||
@ -62,10 +71,6 @@ export default {
|
|||||||
this.formModel.cityCode = row.cityCode;
|
this.formModel.cityCode = row.cityCode;
|
||||||
this.formModel.project = row.project;
|
this.formModel.project = row.project;
|
||||||
this.formModel.projectCode = row.project ? row.projectCode : '';
|
this.formModel.projectCode = row.project ? row.projectCode : '';
|
||||||
this.options = [];
|
|
||||||
ProjectList.forEach(item => {
|
|
||||||
this.options.push({label: item.label, value: item.value.toUpperCase()});
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
doSave() {
|
doSave() {
|
||||||
this.$refs['form'].validate((valid) => {
|
this.$refs['form'].validate((valid) => {
|
||||||
|
@ -90,11 +90,7 @@ export default {
|
|||||||
getBackProjectConfigList().then(resp => {
|
getBackProjectConfigList().then(resp => {
|
||||||
if (resp.data && resp.data.length > 0) {
|
if (resp.data && resp.data.length > 0) {
|
||||||
resp.data.forEach(each=>{
|
resp.data.forEach(each=>{
|
||||||
if (each.label == '') {
|
|
||||||
this.projectMap[each.value] = {label:'默认', value:'DEFAULT'};
|
|
||||||
} else {
|
|
||||||
this.projectMap[each.value] = each;
|
this.projectMap[each.value] = each;
|
||||||
}
|
|
||||||
});
|
});
|
||||||
this.queryForm.queryObject.project.config.data = Object.values(this.projectMap);
|
this.queryForm.queryObject.project.config.data = Object.values(this.projectMap);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user