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