Browse Source

1.获取数据类型改为从前端取2.bug fix

lideyin 6 years ago
parent
commit
7ab97a6f02
2 changed files with 20 additions and 8 deletions
  1. 9 0
      src/constants/constants.js
  2. 11 8
      src/modules/basic/view/sys_prop_list.vue

+ 9 - 0
src/constants/constants.js

@@ -46,3 +46,12 @@ export const PAPER_TYPE = [
   "Y",
   "Z"
 ];
+
+//数据类型
+export const BASIC_DATA_TYPE = [
+  { code: "STRING", name: "STRING" },
+  { code: "INTEGER", name: "INTEGER" },
+  { code: "BOOLEAN", name: "BOOLEAN" },
+  { code: "LONG", name: "LONG" },
+  { code: "DATE", name: "DATE" }
+];

+ 11 - 8
src/modules/basic/view/sys_prop_list.vue

@@ -222,6 +222,7 @@
 <script>
 import { CORE_API } from "@/constants/constants.js";
 import { mapState } from "vuex";
+import { BASIC_DATA_TYPE } from "@/constants/constants.js";
 
 export default {
   name: "sys_prop_list",
@@ -255,7 +256,7 @@ export default {
           { required: true, message: "请输入参数名称", trigger: "blur" }
         ],
         propValueType: [
-          { required: true, message: "请选择参数类型", trigger: "blur" }
+          { required: true, message: "请选择参数类型", trigger: "change" }
         ],
         propValue: [
           { required: true, message: "请输入参数值", trigger: "blur" }
@@ -291,14 +292,16 @@ export default {
       };
       this.$refs.primaryForm.resetFields();
     },
-    getBasicDataTypes(query) {
+    getBasicDataTypes() {
       this.basicDataTypeLoading = true;
-      this.$httpWithMsg
-        .get(CORE_API + "/systemProperty/getBasicDataTypes?name=" + query)
-        .then(response => {
-          this.basicDataTypeList4Search = response.data;
-          this.basicDataTypeLoading = false;
-        });
+      this.basicDataTypeList4Search = BASIC_DATA_TYPE;
+      this.basicDataTypeLoading = false;
+      // this.$httpWithMsg
+      //   .get(CORE_API + "/systemProperty/getBasicDataTypes?name=" + query)
+      //   .then(response => {
+      //     this.basicDataTypeList4Search = response.data;
+      //     this.basicDataTypeLoading = false;
+      //   });
     },
     handleSearchBtn() {
       this.currentPage = 1;