|
@@ -45,7 +45,7 @@
|
|
|
<a-form-item label="所属县区" name="RegionCode" :label-col="{span:7}">
|
|
|
<label v-if="isDetail">{{dataModel.regionCode}}</label>
|
|
|
<a-select v-if ="!isDetail" ref="select" v-model:value="dataModel.regionCode" :options="regionList"
|
|
|
- :field-names="{ label: 'name', value: 'code' }" :allow-clear="true" @change="changeRegion" > </a-select>
|
|
|
+ :field-names="{ label: 'name', value: 'code' }" :allow-clear="true" @change="getStreetList('')" > </a-select>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="7">
|
|
@@ -102,21 +102,40 @@ export default defineComponent({
|
|
|
selectedRowKeys: [],
|
|
|
loading: false
|
|
|
});
|
|
|
- const logTypeList = ref<SelectProps["options"]>();
|
|
|
- const siteUserList = ref<SelectProps["options"]>();
|
|
|
-
|
|
|
const regionList = ref<SelectProps['options']>();
|
|
|
const streetList = ref<SelectProps['options']>();
|
|
|
+ const logTypeList = ref<SelectProps["options"]>();
|
|
|
+ const siteUserList = ref<SelectProps["options"]>();
|
|
|
|
|
|
const fileList = ref();
|
|
|
const setFileList = (files) => {
|
|
|
fileList.value = files;
|
|
|
};
|
|
|
+ const getRegionList = async function(){
|
|
|
+ const regionResult: any = await getRegionCodeList();
|
|
|
+ regionList.value = regionResult;
|
|
|
+ }
|
|
|
+ const getStreetList = async function(regionCode: string){
|
|
|
+ const streetResult: any = await getStreetCodeList(regionCode);
|
|
|
+ streetList.value = streetResult;
|
|
|
+ }
|
|
|
+ const getSiteUserList = async function(){
|
|
|
+ const siteUserResult :any = await getDataList();
|
|
|
+ console.log('siteUserResult',siteUserResult);
|
|
|
+ siteUserList.value = siteUserResult;
|
|
|
+ }
|
|
|
+ const getLogTypeList = async function(){
|
|
|
+ const logTypeResult :any = await getSysDictionaryList("LogType");
|
|
|
+ logTypeList.value = logTypeResult;
|
|
|
+ }
|
|
|
|
|
|
const loadData = (doWorkID: string) => {
|
|
|
get(doWorkID).then((result: any) => {
|
|
|
formData.dataModel = result;
|
|
|
console.log(formData.dataModel);
|
|
|
+ if (formData.dataModel.regionCode != null){
|
|
|
+ getStreetList(formData.dataModel.regionCode);
|
|
|
+ }
|
|
|
});
|
|
|
}
|
|
|
|
|
@@ -133,32 +152,6 @@ export default defineComponent({
|
|
|
const onSelectChange = (selectedRowKeys: any) => {
|
|
|
formState.selectedRowKeys = selectedRowKeys;
|
|
|
};
|
|
|
- const getRegionList = async function(){
|
|
|
- const regionResult: any = await getRegionCodeList();
|
|
|
- console.log('regionResult',regionResult);
|
|
|
- regionList.value = regionResult;
|
|
|
- }
|
|
|
- const getStreetList = async function(){
|
|
|
- const streetResult: any = await getStreetCodeList(formData.dataModel.regionCode);
|
|
|
- console.log('streetResult',streetResult);
|
|
|
- streetList.value = streetResult;
|
|
|
- }
|
|
|
- const changeRegion = async function(){
|
|
|
- formData.dataModel.streetCode = '';
|
|
|
- getStreetList();
|
|
|
- }
|
|
|
-
|
|
|
- const getSiteUserList = async function(){
|
|
|
- const siteUserResult :any = await getDataList();
|
|
|
- console.log('siteUserResult',siteUserResult);
|
|
|
- siteUserList.value = siteUserResult;
|
|
|
- }
|
|
|
-
|
|
|
- const getLogTypeList = async function(){
|
|
|
- const logTypeResult :any = await getSysDictionaryList("LogType");
|
|
|
- logTypeList.value = logTypeResult;
|
|
|
- }
|
|
|
-
|
|
|
|
|
|
const validate = () =>{
|
|
|
console.log(formData.dataModel);
|
|
@@ -202,7 +195,6 @@ export default defineComponent({
|
|
|
getStreetList,
|
|
|
setFileList,
|
|
|
onSelectChange,
|
|
|
- changeRegion,
|
|
|
handleOk,
|
|
|
handleCancel,
|
|
|
validate
|