|
|
@ -13,6 +13,7 @@ |
|
|
|
value: 'projectName', |
|
|
|
options: 'options', |
|
|
|
}" |
|
|
|
disabled |
|
|
|
/> |
|
|
|
</a-form-item> |
|
|
|
</a-col> |
|
|
@ -28,6 +29,7 @@ |
|
|
|
value: 'organizationName', |
|
|
|
options: 'options', |
|
|
|
}" |
|
|
|
disabled |
|
|
|
/> |
|
|
|
</a-form-item> |
|
|
|
</a-col> |
|
|
@ -53,9 +55,9 @@ |
|
|
|
</a-form-item> |
|
|
|
</a-col> |
|
|
|
</a-row> |
|
|
|
<a-row :gutter="[16, 16]"> |
|
|
|
<a-row :gutter="[16, 16]" v-show="false"> |
|
|
|
<a-col :span="24"> |
|
|
|
<div id="container" style="width: 100%; height: 500px" v-show="form.address"></div> |
|
|
|
<div id="container" style="width: 100%; height: 500px" v-show="form.address" ></div> |
|
|
|
</a-col> |
|
|
|
</a-row> |
|
|
|
<a-row :gutter="[16, 16]"> |
|
|
@ -70,7 +72,7 @@ |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import { reactive, ref } from 'vue'; |
|
|
|
import { reactive, ref ,toRefs} from 'vue'; |
|
|
|
import { message } from 'ant-design-vue'; |
|
|
|
import AMapLoader from '@amap/amap-jsapi-loader'; |
|
|
|
import { getInfo, add, update, getProjectInfo, getOrganizationType } from './api'; |
|
|
@ -90,7 +92,6 @@ |
|
|
|
id: null, |
|
|
|
}); |
|
|
|
//下拉框 |
|
|
|
//下拉框 |
|
|
|
const projectNameOptions = ref([]); |
|
|
|
const getProjectNameOptions = async () => { |
|
|
|
const res = await getProjectInfo(); |
|
|
@ -101,11 +102,15 @@ |
|
|
|
const res = await getOrganizationType(); |
|
|
|
organizationNameOptions.value = res.rows; |
|
|
|
}; |
|
|
|
const showModal = async (type, id, projectId) => { |
|
|
|
console.log(projectId); |
|
|
|
const showModal = async (type, id, projectId,dataSource) => { |
|
|
|
console.log(dataSource); |
|
|
|
visible.value = true; |
|
|
|
|
|
|
|
|
|
|
|
if (type == 1) { |
|
|
|
title.value = '新增'; |
|
|
|
form.projectName = dataSource[0].projectName |
|
|
|
form.organizationName = dataSource[0].organizationName |
|
|
|
initMap(); |
|
|
|
} else if (type == 2) { |
|
|
|
title.value = '编辑'; |
|
|
|