|
@ -26,7 +26,7 @@ |
|
|
import { ref, reactive, defineProps, watchEffect } from 'vue' |
|
|
import { ref, reactive, defineProps, watchEffect } from 'vue' |
|
|
import { useForm, BasicForm } from '@/components/Form'; |
|
|
import { useForm, BasicForm } from '@/components/Form'; |
|
|
import { mechanismformSchemas } from './mechanism.data'; |
|
|
import { mechanismformSchemas } from './mechanism.data'; |
|
|
import { modifyPeriodicallab, addPeriodicallab, getperiodicallabById } from './mechanism.api'; |
|
|
import { modifyInformationMaterial, addInformationMaterial, getInformationMaterialById } from './mechanism.api'; |
|
|
import { ElMessage } from 'element-plus' |
|
|
import { ElMessage } from 'element-plus' |
|
|
import { useModalInner, BasicModal } from '@/components/Modal'; |
|
|
import { useModalInner, BasicModal } from '@/components/Modal'; |
|
|
const [registerModal, { closeModal }] = useModalInner(init); |
|
|
const [registerModal, { closeModal }] = useModalInner(init); |
|
@ -43,7 +43,7 @@ async function init(data) { |
|
|
let param: any = { |
|
|
let param: any = { |
|
|
id: data.id |
|
|
id: data.id |
|
|
} |
|
|
} |
|
|
let res = await getperiodicallabById(param) |
|
|
let res = await getInformationMaterialById(param) |
|
|
console.log("结果是", res) |
|
|
console.log("结果是", res) |
|
|
setFieldsValue(res) |
|
|
setFieldsValue(res) |
|
|
} |
|
|
} |
|
@ -112,9 +112,9 @@ async function submitImportForm() { |
|
|
} |
|
|
} |
|
|
params.append("id", id.value) |
|
|
params.append("id", id.value) |
|
|
params.append("name", data.name) |
|
|
params.append("name", data.name) |
|
|
params.append("periods", data.periods) |
|
|
params.append("type", data.type) |
|
|
params.append("publishTime", data.publishTime) |
|
|
params.append("publishTime", data.publishTime) |
|
|
await modifyPeriodicallab(params) |
|
|
await modifyInformationMaterial(params) |
|
|
} else { |
|
|
} else { |
|
|
if (fileList.length == 0) { |
|
|
if (fileList.length == 0) { |
|
|
ElMessage.warning("请上传文件") |
|
|
ElMessage.warning("请上传文件") |
|
@ -122,9 +122,9 @@ async function submitImportForm() { |
|
|
} |
|
|
} |
|
|
params.append('file', fileList[0].file) |
|
|
params.append('file', fileList[0].file) |
|
|
params.append("name", data.name) |
|
|
params.append("name", data.name) |
|
|
params.append("periods", data.periods) |
|
|
params.append("type", data.type) |
|
|
params.append("publishTime", data.publishTime) |
|
|
params.append("publishTime", data.publishTime) |
|
|
await addPeriodicallab(params) |
|
|
await addInformationMaterial(params) |
|
|
} |
|
|
} |
|
|
dialogVisible() |
|
|
dialogVisible() |
|
|
} |
|
|
} |
|
|