|
@@ -5,11 +5,11 @@
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<!-- 发布单位信息 -->
|
|
<!-- 发布单位信息 -->
|
|
|
- <PublishUnitInformation :information="formData" class="mb20" />
|
|
|
|
|
|
|
+ <PublishUnitInformation :formData="formData" class="mb20" />
|
|
|
<!-- 涉事主体基本信息 -->
|
|
<!-- 涉事主体基本信息 -->
|
|
|
- <QuestionInformation ref="shipFormRef" :information="formData" />
|
|
|
|
|
|
|
+ <QuestionInformation ref="shipFormRef" :formData="formData" />
|
|
|
<!-- 水上交通安全通报信息 -->
|
|
<!-- 水上交通安全通报信息 -->
|
|
|
- <WaterSafetyInformation ref="waterSafetyRef" :information="formData" />
|
|
|
|
|
|
|
+ <WaterSafetyInformation ref="waterSafetyRef" :formData="formData" />
|
|
|
<!-- 操作记录 -->
|
|
<!-- 操作记录 -->
|
|
|
<OperationLog v-if="route.query.type !== 'add'" />
|
|
<OperationLog v-if="route.query.type !== 'add'" />
|
|
|
<!-- 底部按钮区 -->
|
|
<!-- 底部按钮区 -->
|
|
@@ -30,7 +30,7 @@ import PublishUnitInformation from '@/components/notificationDetailsParts/publis
|
|
|
import QuestionInformation from '@/components/notificationDetailsParts/questionInformation.vue';
|
|
import QuestionInformation from '@/components/notificationDetailsParts/questionInformation.vue';
|
|
|
import WaterSafetyInformation from '@/components/notificationDetailsParts/waterSafetyInformation.vue';
|
|
import WaterSafetyInformation from '@/components/notificationDetailsParts/waterSafetyInformation.vue';
|
|
|
import OperationLog from '@/components/notificationDetailsParts/operationLog.vue';
|
|
import OperationLog from '@/components/notificationDetailsParts/operationLog.vue';
|
|
|
-import { addMyPublishApi } from '@/api/notificationInfoManage/myPublish';
|
|
|
|
|
|
|
+import { addMyPublishApi, fetchReleaseDetail } from '@/api/notificationInfoManage/myPublish';
|
|
|
// --- 路由与Store ---
|
|
// --- 路由与Store ---
|
|
|
const route = useRoute();
|
|
const route = useRoute();
|
|
|
const router = useRouter();
|
|
const router = useRouter();
|
|
@@ -43,9 +43,9 @@ const shipFormRef = ref<any>();
|
|
|
const formData = ref()
|
|
const formData = ref()
|
|
|
|
|
|
|
|
onMounted(async () => {
|
|
onMounted(async () => {
|
|
|
- const { type, info } = route.query;
|
|
|
|
|
- if (typeof info === 'string') {
|
|
|
|
|
- formData.value = JSON.parse(info)
|
|
|
|
|
|
|
+ const { type, releasedId } = route.query;
|
|
|
|
|
+ if (releasedId) {
|
|
|
|
|
+ await onFetchDetail(releasedId)
|
|
|
}
|
|
}
|
|
|
try {
|
|
try {
|
|
|
switch (type as string) {
|
|
switch (type as string) {
|
|
@@ -82,6 +82,11 @@ const onClickSave = () => {
|
|
|
// TODO 保存的接口
|
|
// TODO 保存的接口
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+const onFetchDetail = async (params) => {
|
|
|
|
|
+ const response = await fetchReleaseDetail(params)
|
|
|
|
|
+ formData.value = response.data
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
const handleSubmit = async (type) => {
|
|
const handleSubmit = async (type) => {
|
|
|
const shipFormData = shipFormRef.value.getFormData();
|
|
const shipFormData = shipFormRef.value.getFormData();
|
|
|
const middleList = waterSafetyRef.value.getFormData();
|
|
const middleList = waterSafetyRef.value.getFormData();
|