|
|
@ -27,7 +27,6 @@ const state = reactive<any>({ |
|
|
const isDisabled = ref<boolean>(true) |
|
|
const isDisabled = ref<boolean>(true) |
|
|
|
|
|
|
|
|
const [registerCreateModal, {setModalProps, closeModal}] = useModalInner(async (data) => { |
|
|
const [registerCreateModal, {setModalProps, closeModal}] = useModalInner(async (data) => { |
|
|
alert(444) |
|
|
|
|
|
await resetFields() |
|
|
await resetFields() |
|
|
current.value=0; |
|
|
current.value=0; |
|
|
state.selectedData=[]; |
|
|
state.selectedData=[]; |
|
|
@ -61,12 +60,13 @@ const [registerForm, {validate, resetFields,getFieldsValue, setFieldsValue, upda |
|
|
interface instantForms { |
|
|
interface instantForms { |
|
|
modelId?: string |
|
|
modelId?: string |
|
|
mpName?: string |
|
|
mpName?: string |
|
|
|
|
|
algorithmId?: string |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const instantForm = reactive<instantForms>({ |
|
|
const instantForm = reactive<instantForms>({ |
|
|
modelId: '', |
|
|
modelId: '', |
|
|
mpName: '', |
|
|
mpName: '', |
|
|
|
|
|
algorithmId: '' |
|
|
}) |
|
|
}) |
|
|
async function updatempName(selectedRowKeys, selectedRows) { |
|
|
async function updatempName(selectedRowKeys, selectedRows) { |
|
|
resetFields() |
|
|
resetFields() |
|
|
@ -74,12 +74,13 @@ async function updatempName(selectedRowKeys, selectedRows) { |
|
|
state.selectedData = selectedRows; |
|
|
state.selectedData = selectedRows; |
|
|
//读出模型中的点号信息 |
|
|
//读出模型中的点号信息 |
|
|
if (selectedRows.length !== 0) { |
|
|
if (selectedRows.length !== 0) { |
|
|
state.type = selectedRows[0].algorithm === 'ANN' |
|
|
console.log(selectedRows) |
|
|
|
|
|
state.type = selectedRows[0].algorithmId === '2' |
|
|
state.pointInfo = JSON.parse(selectedRows[0].modelInfo).pointInfo |
|
|
state.pointInfo = JSON.parse(selectedRows[0].modelInfo).pointInfo |
|
|
for (const p of state.pointInfo) { |
|
|
for (const p of state.pointInfo) { |
|
|
p.modelName = selectedRows[0].modelName |
|
|
p.modelName = selectedRows[0].modelName |
|
|
p.modelDescription = selectedRows[0].description |
|
|
p.modelDescription = selectedRows[0].description |
|
|
p.algorithm = selectedRows[0].algorithm |
|
|
p.algorithm = selectedRows[0].algorithmId |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -124,6 +125,7 @@ async function updatempName(selectedRowKeys, selectedRows) { |
|
|
}) |
|
|
}) |
|
|
instantForm.modelId = selectedRows.length !== 0 ? `${selectedRows[0].modelId}` : `` |
|
|
instantForm.modelId = selectedRows.length !== 0 ? `${selectedRows[0].modelId}` : `` |
|
|
instantForm.mpName = selectedRows.length !== 0 ? `${selectedRows[0].modelName}-实例` : `` |
|
|
instantForm.mpName = selectedRows.length !== 0 ? `${selectedRows[0].modelName}-实例` : `` |
|
|
|
|
|
instantForm.algorithmId=selectedRows.length !== 0 ? `${selectedRows[0].algorithmId}` : `` |
|
|
|
|
|
|
|
|
setFieldsValue(instantForm) |
|
|
setFieldsValue(instantForm) |
|
|
} |
|
|
} |
|
|
@ -146,6 +148,9 @@ async function handleSubmit() { |
|
|
// 获取子组件的测点列表数据 |
|
|
// 获取子组件的测点列表数据 |
|
|
const pointInfoNew = pointRef.value.getPointTableData() |
|
|
const pointInfoNew = pointRef.value.getPointTableData() |
|
|
values.pointInfo = pointInfoNew |
|
|
values.pointInfo = pointInfoNew |
|
|
|
|
|
console.log(pointInfoNew) |
|
|
|
|
|
|
|
|
|
|
|
alert(444) |
|
|
await createInstant(values) |
|
|
await createInstant(values) |
|
|
emit('success') |
|
|
emit('success') |
|
|
createMessage.success(t('common.saveSuccessText')) |
|
|
createMessage.success(t('common.saveSuccessText')) |
|
|
|