|
@@ -13,7 +13,6 @@ import Close from "@iconify-icons/ri/close-fill"
|
|
|
import { http } from "@/utils/http";
|
|
|
// 获取URLLIST
|
|
|
import { getGroupUrl } from "@/utils/getUrl/getUrl";
|
|
|
-const UrlList = await getGroupUrl(['KxsConfigServer']);
|
|
|
|
|
|
const props = defineProps<{
|
|
|
editVisible: {
|
|
@@ -31,10 +30,10 @@ const props = defineProps<{
|
|
|
}>();
|
|
|
// 表单数据
|
|
|
let UpdateForm: any = ref({
|
|
|
- GroupName: "", //名称
|
|
|
- GroupRemark: "", //说明
|
|
|
- GroupVersion: "", //版本号
|
|
|
- Id: "", //ID
|
|
|
+ groupName: "", //名称
|
|
|
+ groupRemark: "", //说明
|
|
|
+ groupVersion: "", //版本号
|
|
|
+ id: "", //ID
|
|
|
|
|
|
});
|
|
|
|
|
@@ -42,33 +41,51 @@ let UpdateForm: any = ref({
|
|
|
const activeId = ref('1')
|
|
|
// 提交函数
|
|
|
const submit = async () => {
|
|
|
- const { status, info }: any = http.Request({ method: UrlList.KxsConfigServer.ApiGroupUpdate.method, url: UrlList.KxsConfigServer.ApiGroupUpdate.url, params: UpdateForm.value});
|
|
|
- if (status === "1") {
|
|
|
+ const UrlList = await getGroupUrl(['KxsConfigServer']);
|
|
|
+ const { status, msg }: any = await http.Request({ method: UrlList.KxsConfigServer.ApiGroupupdate.method, url: UrlList.KxsConfigServer.ApiGroupupdate.url, params: UpdateForm.value });
|
|
|
+ if (status === 1) {
|
|
|
ElMessage({
|
|
|
message: "修改成功",
|
|
|
type: "success"
|
|
|
});
|
|
|
UpdateForm.value = {
|
|
|
- GroupName: "", //名称
|
|
|
- GroupRemark: "", //说明
|
|
|
- GroupVersion: "", //版本号
|
|
|
- Id: "", //ID
|
|
|
+ groupName: "", //名称
|
|
|
+ groupRemark: "", //说明
|
|
|
+ groupVersion: "", //版本号
|
|
|
+ id: "", //ID
|
|
|
|
|
|
};
|
|
|
+ closeVisible();
|
|
|
} else {
|
|
|
- ElMessageBox.alert(info, "提示", {
|
|
|
+ ElMessageBox.alert(msg, "提示", {
|
|
|
confirmButtonText: "关闭",
|
|
|
type: "warning"
|
|
|
});
|
|
|
};
|
|
|
};
|
|
|
// 关闭弹窗回调函数
|
|
|
-const closeVisible = inject('closeEditVisible');
|
|
|
+const closeFn: any = inject('closeEditVisible');
|
|
|
const openVisible = async () => {
|
|
|
//通过ID获取表格数据
|
|
|
- const KxsConfigServer = await getGroupUrl(['KxsConfigServer']);
|
|
|
- const { data }: any = http.Request({method: UrlList.KxsConfigServer.ApiGroupQuery.method, url: UrlList.KxsConfigServer.ApiGroupQuery.url, params: UpdateForm.value});
|
|
|
- UpdateForm.value = data;
|
|
|
+ const UrlList = await getGroupUrl(['KxsConfigServer']);
|
|
|
+ const { status, data }: any = await http.Request({ method: UrlList.KxsConfigServer.ApiGroupquery.method, url: UrlList.KxsConfigServer.ApiGroupquery.url, params: props.formData });
|
|
|
+ ElMessageBox.alert(JSON.stringify(data), "提示", {
|
|
|
+ confirmButtonText: "关闭",
|
|
|
+ type: "warning"
|
|
|
+ });
|
|
|
+ if (status === 1) {
|
|
|
+ UpdateForm.value = data;
|
|
|
+ }
|
|
|
+};
|
|
|
+// 关闭弹窗回调函数
|
|
|
+const closeVisible = () => {
|
|
|
+ UpdateForm.value = {
|
|
|
+ groupName: "", //名称
|
|
|
+ groupRemark: "", //说明
|
|
|
+ groupVersion: "", //版本号
|
|
|
+
|
|
|
+ };
|
|
|
+ closeFn();
|
|
|
};
|
|
|
</script>
|
|
|
|
|
@@ -76,17 +93,17 @@ const openVisible = async () => {
|
|
|
.main
|
|
|
el-dialog(v-model='props.editVisible' width="50%" title="修改" @close="closeVisible()" @open="openVisible")
|
|
|
el-form(:model='UpdateForm' label-position="right" label-width="100px")
|
|
|
- el-form-item(label='名称' prop="GroupName")
|
|
|
- el-input(v-model='UpdateForm.GroupName' autocomplete='off' class="!w-[230px]"
|
|
|
+ el-form-item(label='名称' prop="groupName")
|
|
|
+ el-input(v-model='UpdateForm.groupName' autocomplete='off' class="!w-[230px]"
|
|
|
placeholder="请输入名称")
|
|
|
- el-form-item(label='说明' prop="GroupRemark")
|
|
|
- el-input(v-model='UpdateForm.GroupRemark' autocomplete='off' class="!w-[230px]"
|
|
|
+ el-form-item(label='说明' prop="groupRemark")
|
|
|
+ el-input(v-model='UpdateForm.groupRemark' autocomplete='off' class="!w-[230px]"
|
|
|
placeholder="请输入说明")
|
|
|
- el-form-item(label='版本号' prop="GroupVersion")
|
|
|
- el-input(v-model='UpdateForm.GroupVersion' autocomplete='off' class="!w-[230px]"
|
|
|
+ el-form-item(label='版本号' prop="groupVersion")
|
|
|
+ el-input(v-model='UpdateForm.groupVersion' autocomplete='off' class="!w-[230px]"
|
|
|
placeholder="请输入版本号")
|
|
|
- el-form-item(label='ID' prop="Id")
|
|
|
- el-input-number(v-model='UpdateForm.Id' :min="1" :max="1000"
|
|
|
+ el-form-item(label='ID' prop="id")
|
|
|
+ el-input-number(v-model='UpdateForm.id' :min="1" :max="1000"
|
|
|
placeholder="请输入ID")
|
|
|
|
|
|
el-button(
|