|
@@ -29,30 +29,30 @@ const props = defineProps<{
|
|
|
};
|
|
|
}>();
|
|
|
// 表单数据
|
|
|
-const UpdateForm: any = ref({
|
|
|
+const UpdateFormUpVersion: any = ref({
|
|
|
moduleVersion: "", //模板更新版本
|
|
|
|
|
|
});
|
|
|
|
|
|
// 表单实例
|
|
|
-const ruleFormRef = ref()
|
|
|
+const ruleFormRefUpVersion = ref()
|
|
|
|
|
|
// 选项卡参数(默认值为列表某项的id)
|
|
|
const activeId = ref('1')
|
|
|
// 提交函数
|
|
|
-const submit = async (formEl) => {
|
|
|
+const submitUpVersion = async (formEl) => {
|
|
|
// 表单校验拦截
|
|
|
if (!formEl) return
|
|
|
await formEl.validate(async (valid, fields) => {
|
|
|
if (valid) {
|
|
|
//表单校验成功回调
|
|
|
- console.log('submit!')
|
|
|
+ console.log(UpdateFormUpVersion.value)
|
|
|
|
|
|
// 需动态生成接口
|
|
|
const { status, msg }: any = await http.Request({
|
|
|
method: UrlList.kxsConfigServer.pageUpdateInfoupVersion.method,
|
|
|
url: UrlList.kxsConfigServer.pageUpdateInfoupVersion.url,
|
|
|
- params: UpdateForm.value
|
|
|
+ params: UpdateFormUpVersion.value
|
|
|
});
|
|
|
if (status === 1) {
|
|
|
//业务成功回调
|
|
@@ -60,7 +60,7 @@ const submit = async (formEl) => {
|
|
|
message: "修改成功",
|
|
|
type: "success"
|
|
|
});
|
|
|
- UpdateForm.value = {
|
|
|
+ UpdateFormUpVersion.value = {
|
|
|
moduleVersion: "", //模板更新版本
|
|
|
|
|
|
};
|
|
@@ -87,7 +87,7 @@ const submit = async (formEl) => {
|
|
|
|
|
|
|
|
|
// 表单校验规则
|
|
|
-const rules = reactive({
|
|
|
+const rulesUpVersion = reactive({
|
|
|
moduleVersion: [
|
|
|
{ required: true, message: '请输入模板更新版本', trigger: 'blur' },
|
|
|
{ validator: (rule: any, value: any, callback: any) => { verification.verificationInteger(value, callback) }, trigger: 'blur' },
|
|
@@ -95,18 +95,18 @@ const rules = reactive({
|
|
|
|
|
|
})
|
|
|
// 关闭弹窗回调函数
|
|
|
-const closeFn: any = inject('editUpVersionVisible');
|
|
|
+const closeFn: any = inject('closeEditUpVersionVisible');
|
|
|
const openVisible = async () => {
|
|
|
//通过ID获取表格数据
|
|
|
const { status, data }: any = await http.Request({ method: UrlList.kxsConfigServer.pageUpdateInfoquery.method, url: UrlList.kxsConfigServer.pageUpdateInfoquery.url, params: { id: props.formData.id } });
|
|
|
if (status === 1) {
|
|
|
- UpdateForm.value = data;
|
|
|
+ UpdateFormUpVersion.value = data;
|
|
|
|
|
|
}
|
|
|
};
|
|
|
// 关闭弹窗回调函数
|
|
|
const closeUpVersionVisible = () => {
|
|
|
- UpdateForm.value = {
|
|
|
+ UpdateFormUpVersion.value = {
|
|
|
moduleVersion: "", //模板更新版本
|
|
|
|
|
|
};
|
|
@@ -119,10 +119,10 @@ const isFullscreen = ref(false)
|
|
|
|
|
|
<template lang="pug">
|
|
|
.main
|
|
|
- el-dialog(v-model='props.editVisible' draggable width="50%" :fullscreen="isFullscreen" title="修改" @close="editUpVersionVisible" @open="openVisible")
|
|
|
- el-form(:model='UpdateForm' label-position="right" ref="ruleFormRef" :rules="rules" label-width="100px")
|
|
|
+ el-dialog(v-model='props.editVisible' draggable width="50%" :fullscreen="isFullscreen" title="修改" @close="closeUpVersionVisible" @open="openVisible")
|
|
|
+ el-form(:model='UpdateFormUpVersion' label-position="right" ref="ruleFormRefUpVersion" :rulesUpVersion="rulesUpVersion" label-width="100px")
|
|
|
el-form-item(label='模板更新版本' prop="moduleVersion")
|
|
|
- el-input-number(v-model='UpdateForm.moduleVersion' :min="1" :max="1000"
|
|
|
+ el-input-number(v-model='UpdateFormUpVersion.moduleVersion' :min="1" :max="1000"
|
|
|
placeholder="请输入模板更新版本")
|
|
|
|
|
|
.flex.justify-end
|
|
@@ -134,7 +134,7 @@ const isFullscreen = ref(false)
|
|
|
el-button(
|
|
|
type="primary",
|
|
|
:icon="useRenderIcon(Upload)",
|
|
|
- @click="submit(ruleFormRef)"
|
|
|
+ @click="submitUpVersion(ruleFormRefUpVersion)"
|
|
|
) 确认提交
|
|
|
</template>
|
|
|
|