|
@ -39,7 +39,7 @@ |
|
|
<a-row :gutter="[16, 16]"> |
|
|
<a-row :gutter="[16, 16]"> |
|
|
<a-col :span="24"> |
|
|
<a-col :span="24"> |
|
|
<a-form-item label="运维单位" name="ioCompany"> |
|
|
<a-form-item label="运维单位" name="ioCompany"> |
|
|
<a-input v-model:value="form.ioCompany" disabled/> |
|
|
<a-input v-model:value="form.ioCompany" disabled /> |
|
|
</a-form-item> |
|
|
</a-form-item> |
|
|
</a-col> |
|
|
</a-col> |
|
|
</a-row> |
|
|
</a-row> |
|
@ -108,6 +108,8 @@ |
|
|
v-model:value="form.faultLocation" |
|
|
v-model:value="form.faultLocation" |
|
|
:options="faultLocationOptions" |
|
|
:options="faultLocationOptions" |
|
|
@change="faultLocationChange" |
|
|
@change="faultLocationChange" |
|
|
|
|
|
:filter-option="filterOption" |
|
|
|
|
|
show-search |
|
|
:fieldNames="{ |
|
|
:fieldNames="{ |
|
|
label: 'pointName', |
|
|
label: 'pointName', |
|
|
value: 'pointName', |
|
|
value: 'pointName', |
|
@ -136,7 +138,7 @@ |
|
|
v-model:file-list="fileLists" |
|
|
v-model:file-list="fileLists" |
|
|
:action="`${apiUrl}/resource/oss/upload`" |
|
|
:action="`${apiUrl}/resource/oss/upload`" |
|
|
:headers="headers" |
|
|
:headers="headers" |
|
|
accept='.jpg,.jpeg,.png,.gif,.webp' |
|
|
accept=".jpg,.jpeg,.png,.gif,.webp" |
|
|
@change="handleChange" |
|
|
@change="handleChange" |
|
|
> |
|
|
> |
|
|
<a-button type="primary"> 上传图片 </a-button> |
|
|
<a-button type="primary"> 上传图片 </a-button> |
|
@ -182,15 +184,15 @@ |
|
|
getProjectInfo, |
|
|
getProjectInfo, |
|
|
getOrganizationType, |
|
|
getOrganizationType, |
|
|
getContractNamesByProjectName, |
|
|
getContractNamesByProjectName, |
|
|
getIoCompanyByName |
|
|
getIoCompanyByName, |
|
|
} from './api'; |
|
|
} from './api'; |
|
|
import { message } from 'ant-design-vue'; |
|
|
import { message } from 'ant-design-vue'; |
|
|
import AMapLoader from '@amap/amap-jsapi-loader'; |
|
|
import AMapLoader from '@amap/amap-jsapi-loader'; |
|
|
import { getToken } from '@/utils/auth'; |
|
|
import { getToken } from '@/utils/auth'; |
|
|
import { useGlobSetting } from '@/hooks/setting'; |
|
|
import { useGlobSetting } from '@/hooks/setting'; |
|
|
import {queryPointNames} from '@/api/common/index' |
|
|
import { queryPointNames } from '@/api/common/index'; |
|
|
export default { |
|
|
export default { |
|
|
setup(props,{emit}) { |
|
|
setup(props, { emit }) { |
|
|
const visible = ref(false); |
|
|
const visible = ref(false); |
|
|
const form = reactive({ |
|
|
const form = reactive({ |
|
|
projectName: '', |
|
|
projectName: '', |
|
@ -209,12 +211,12 @@ |
|
|
dispatchOpinion: '', |
|
|
dispatchOpinion: '', |
|
|
longitude: '', |
|
|
longitude: '', |
|
|
latitude: '', |
|
|
latitude: '', |
|
|
ioCompany:'' |
|
|
ioCompany: '', |
|
|
}); |
|
|
}); |
|
|
const contractNameChange = async(val) =>{ |
|
|
const contractNameChange = async (val) => { |
|
|
const res = await getIoCompanyByName(val) |
|
|
const res = await getIoCompanyByName(val); |
|
|
form.ioCompany = res |
|
|
form.ioCompany = res; |
|
|
} |
|
|
}; |
|
|
//下拉框 |
|
|
//下拉框 |
|
|
const projectNameOptions = ref([]); |
|
|
const projectNameOptions = ref([]); |
|
|
const getProjectNameOptions = async () => { |
|
|
const getProjectNameOptions = async () => { |
|
@ -259,14 +261,14 @@ |
|
|
value: '其他', |
|
|
value: '其他', |
|
|
}, |
|
|
}, |
|
|
]; |
|
|
]; |
|
|
const faultLocationOptions = ref([]) |
|
|
const faultLocationOptions = ref([]); |
|
|
const getFaultLocationOptions = async() =>{ |
|
|
const getFaultLocationOptions = async () => { |
|
|
const res = await queryPointNames() |
|
|
const res = await queryPointNames(); |
|
|
faultLocationOptions.value = res |
|
|
faultLocationOptions.value = res; |
|
|
} |
|
|
}; |
|
|
const faultLocationChange = (val) => { |
|
|
const faultLocationChange = (val) => { |
|
|
const obj = faultLocationOptions.value.find((i) => { |
|
|
const obj = faultLocationOptions.value.find((i) => { |
|
|
return (i.pointName == val); |
|
|
return i.pointName == val; |
|
|
}); |
|
|
}); |
|
|
form.longitude = obj.longitude; |
|
|
form.longitude = obj.longitude; |
|
|
form.latitude = obj.latitude; |
|
|
form.latitude = obj.latitude; |
|
@ -277,12 +279,15 @@ |
|
|
const res = await getSubcategoryType(); |
|
|
const res = await getSubcategoryType(); |
|
|
faultSubcategoryOptions.value = res.rows; |
|
|
faultSubcategoryOptions.value = res.rows; |
|
|
}; |
|
|
}; |
|
|
|
|
|
const filterOption = (input, option) => { |
|
|
|
|
|
return option.pointName.toLowerCase().indexOf(input.toLowerCase()) >= 0; |
|
|
|
|
|
}; |
|
|
const showModal = () => { |
|
|
const showModal = () => { |
|
|
visible.value = true; |
|
|
visible.value = true; |
|
|
getFaultSubcategoryOptions(); |
|
|
getFaultSubcategoryOptions(); |
|
|
getProjectNameOptions(); |
|
|
getProjectNameOptions(); |
|
|
getOrganizationNameOptions(); |
|
|
getOrganizationNameOptions(); |
|
|
getFaultLocationOptions() |
|
|
getFaultLocationOptions(); |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
const handleOk = () => { |
|
|
const handleOk = () => { |
|
@ -294,7 +299,7 @@ |
|
|
} |
|
|
} |
|
|
workOrderAdd(params).then((_) => { |
|
|
workOrderAdd(params).then((_) => { |
|
|
message.success('操作成功'); |
|
|
message.success('操作成功'); |
|
|
emit('success') |
|
|
emit('success'); |
|
|
closeModal(); |
|
|
closeModal(); |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
@ -360,7 +365,7 @@ |
|
|
form.attachments.push({ |
|
|
form.attachments.push({ |
|
|
url: i.response?.data.url || i.url, |
|
|
url: i.response?.data.url || i.url, |
|
|
name: i.response?.data.fileName || i.name, |
|
|
name: i.response?.data.fileName || i.name, |
|
|
ossId:i.response?.data.ossId || i.ossId |
|
|
ossId: i.response?.data.ossId || i.ossId, |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
@ -393,7 +398,8 @@ |
|
|
}, |
|
|
}, |
|
|
handleChange, |
|
|
handleChange, |
|
|
fileLists, |
|
|
fileLists, |
|
|
contractNameChange |
|
|
contractNameChange, |
|
|
|
|
|
filterOption |
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
}; |
|
|
}; |
|
|