diff --git a/src/views/system/param/systemParamConfig.vue b/src/views/system/param/systemParamConfig.vue
index 2b0706b..6a7e49e 100644
--- a/src/views/system/param/systemParamConfig.vue
+++ b/src/views/system/param/systemParamConfig.vue
@@ -136,6 +136,7 @@ export default {
paramStatus: 1,
page: 1,
limit: 20,
+ paramType: 0,
},
list: [],
total: 0,
@@ -169,6 +170,7 @@ export default {
paramStatus: 1,
page: 1,
limit: 20,
+ paramType: 0,
};
this.getList();
},
diff --git a/src/views/userManage/param/basicProductConfig.vue b/src/views/userManage/param/basicProductConfig.vue
index edb9499..b7d5b1c 100644
--- a/src/views/userManage/param/basicProductConfig.vue
+++ b/src/views/userManage/param/basicProductConfig.vue
@@ -44,7 +44,6 @@
-
+
+
+
+
+
+
+
+
+
+ {{ scope.row.paramExplain }}
+
+
+
+
+ 设置
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -62,6 +149,18 @@ import {
filterList,
modifySetup
} from "@/api/param/basicProductConfig";
+import { systemParamConfigList, systemParamConfigSave } from '@/api/system/param/systemParamConfig'
+
+const formJson = {
+ id: "",
+ parentId: "",
+ paramName: "",
+ paramKey: "",
+ paramValue: "",
+ paramStatus: 1,
+ paramType: 1,
+ paramExplain: "",
+};
export default {
data() {
@@ -70,13 +169,37 @@ export default {
page: 1,
limit: 20
},
+ systemQuery: {
+ page: 1,
+ limit: 20,
+ paramType:2,
+ paramStatus: 1,
+ },
+ formRules: {
+ paramValue: [{required: true, message: "请输入参数值", trigger: "blur"}],
+ // ,
+ // paramStatus: [
+ // {required: true, message: "请选择参数状态", trigger: "change"}
+ // ]
+ },
list: [],
+ formLoading: false,
+ systemList:[],
total: 0,
+ formData: formJson,
+ formName: null,
+ systemTotal: 0,
loading: true,
+ systemLoading:true,
+ formVisible: false,
enableMap: {
true: "是",
false: "否",
},
+ formMap: {
+ add: "新增运行参数",
+ update: "运行参数设置",
+ },
};
},
methods: {
@@ -111,6 +234,76 @@ export default {
this.total = 0;
});
},
+ // 显示表单
+ handleForm(index, row) {
+ this.formVisible = true;
+ this.formData = JSON.parse(JSON.stringify(formJson));
+ if (row !== null) {
+ this.formData = Object.assign({}, row);
+ }
+ this.formName = "add";
+ if (index !== null) {
+ this.index = index;
+ this.formName = "update";
+ }
+ },
+ hideForm() {
+ // 更改值
+ this.formVisible = !this.formVisible;
+ return true;
+ },
+ getSystemList() {
+ this.systemLoading = true;
+ systemParamConfigList(this.systemQuery)
+ .then((response) => {
+ this.systemLoading = false;
+ this.systemList = response.data.list || [];
+ this.systemTotal = response.data.total || 0;
+ })
+ .catch(() => {
+ this.systemLoading = false;
+ this.systemList = [];
+ this.systemTotal = 0;
+ });
+ },
+ formSubmit() {
+ // if (!Number.isInteger(parseInt(this.formData.paramValue))) {
+ // this.$message.warning("参数值必须为数字");
+ // return;
+ // }
+ this.$refs["dataForm"].validate((valid) => {
+ if (valid) {
+ this.formLoading = true;
+ let data = Object.assign({}, this.formData);
+ data.paramValue = data.paramValue.trim();
+ systemParamConfigSave(data, this.formName)
+ .then((response) => {
+ this.formLoading = false;
+ if (response.code != 20000) {
+ this.$message.error(response.message);
+ return false;
+ }
+ this.$message.success("操作成功");
+ this.formVisible = false;
+ if (this.formName === "add") {
+ // 向头部添加数据
+ if (response.data && response.data.id) {
+ data.id = response.data.id;
+ this.list.unshift(data);
+ }
+ } else {
+ this.list.splice(this.index, 1, data);
+ }
+ // 刷新表单
+ this.resetForm();
+ this.getSystemList();
+ })
+ .catch(() => {
+ this.formLoading = false;
+ });
+ }
+ });
+ },
handleSave(index, row) {
this.currentCheckIndex = -1;
modifySetup(row).then((res) => {
@@ -129,6 +322,7 @@ export default {
created() {
// 加载表格数据
this.getList();
+ this.getSystemList();
}
};