refactor(UserEdit): 修改基建导入部分
This commit is contained in:
@@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
<a-space size="middle">
|
<a-space size="middle">
|
||||||
<a-button
|
<a-button
|
||||||
v-if="scriptType === 'MAA'"
|
v-if="scriptType === 'MAA' && formData.Info.Mode !== '简洁'"
|
||||||
type="primary"
|
type="primary"
|
||||||
ghost
|
ghost
|
||||||
size="large"
|
size="large"
|
||||||
@@ -264,7 +264,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<div style="display: flex; gap: 12px; align-items: center">
|
<div style="display: flex; gap: 12px; align-items: center">
|
||||||
<a-input
|
<a-input
|
||||||
v-model:value="infrastructureConfigPath"
|
v-model:value="formData.Info.InfrastPath"
|
||||||
placeholder="请选择基建配置JSON文件"
|
placeholder="请选择基建配置JSON文件"
|
||||||
readonly
|
readonly
|
||||||
size="large"
|
size="large"
|
||||||
@@ -561,23 +561,23 @@
|
|||||||
<a-col :span="6">
|
<a-col :span="6">
|
||||||
<a-form-item name="ifAutoRoguelike">
|
<a-form-item name="ifAutoRoguelike">
|
||||||
<template #label>
|
<template #label>
|
||||||
<a-tooltip title="暂不支持">
|
<a-tooltip title="暂不支持,正在适配中~">
|
||||||
<span>自动肉鸽 </span>
|
<span>自动肉鸽 </span>
|
||||||
<QuestionCircleOutlined class="help-icon" />
|
<QuestionCircleOutlined class="help-icon" />
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</template>
|
</template>
|
||||||
<a-switch v-model:checked="formData.Task.IfAutoRoguelike" :disabled="loading" />
|
<a-switch v-model:checked="formData.Task.IfAutoRoguelike" :disabled="true" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="6">
|
<a-col :span="6">
|
||||||
<a-form-item name="ifReclamation">
|
<a-form-item name="ifReclamation">
|
||||||
<template #label>
|
<template #label>
|
||||||
<a-tooltip title="暂不支持">
|
<a-tooltip title="暂不支持,正在适配中~">
|
||||||
<span>生息演算 </span>
|
<span>生息演算 </span>
|
||||||
<QuestionCircleOutlined class="help-icon" />
|
<QuestionCircleOutlined class="help-icon" />
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</template>
|
</template>
|
||||||
<a-switch v-model:checked="formData.Task.IfReclamation" :disabled="loading" />
|
<a-switch v-model:checked="formData.Task.IfReclamation" :disabled="true" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
@@ -1261,9 +1261,12 @@ const handleSubmit = async () => {
|
|||||||
try {
|
try {
|
||||||
await formRef.value?.validate()
|
await formRef.value?.validate()
|
||||||
|
|
||||||
|
// 排除 InfrastPath 字段
|
||||||
|
const { InfrastPath, ...infoWithoutInfrastPath } = formData.Info
|
||||||
|
|
||||||
// 构建提交数据
|
// 构建提交数据
|
||||||
const userData = {
|
const userData = {
|
||||||
Info: { ...formData.Info },
|
Info: { ...infoWithoutInfrastPath },
|
||||||
Task: { ...formData.Task },
|
Task: { ...formData.Task },
|
||||||
Notify: { ...formData.Notify },
|
Notify: { ...formData.Notify },
|
||||||
Data: { ...formData.Data },
|
Data: { ...formData.Data },
|
||||||
@@ -1428,6 +1431,7 @@ const selectInfrastructureConfig = async () => {
|
|||||||
|
|
||||||
if (path && path.length > 0) {
|
if (path && path.length > 0) {
|
||||||
infrastructureConfigPath.value = path
|
infrastructureConfigPath.value = path
|
||||||
|
formData.Info.InfrastPath = path[0]
|
||||||
message.success('文件选择成功')
|
message.success('文件选择成功')
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user