shaogen1995 пре 3 година
родитељ
комит
d4553557e2

+ 7 - 6
src/views/Layout.vue

@@ -110,18 +110,19 @@ export default {
       userInfo: "",
       tabData: [
         {
+          id: 1,
+          name: "项目管理",
+          path: "/Layout/tab1",
+        },
+
+        {
           id: 2,
-          name: "数据",
+          name: "项目数据",
           path: "/Layout/tab4",
         },
       ],
       tabData2: [
         {
-          id: 1,
-          name: "项目",
-          path: "/Layout/tab1",
-        },
-        {
           id: 3,
           name: "白名单",
           path: "/Layout/tab7",

+ 1 - 1
src/views/Login.vue

@@ -69,7 +69,7 @@ export default {
       if (res.code === 0) {
         localStorage.setItem("Yun_token", res.data.token);
         localStorage.setItem("Yun_User", JSON.stringify(res.data.user));
-        this.$router.push("/Layout/tab4");
+        this.$router.push("/Layout/tab1");
         this.$message.success("登录成功");
       } else this.$message.warning(res.msg);
     },

+ 1 - 1
src/views/Tab1/index.vue

@@ -39,7 +39,7 @@
             <el-button
               type="text"
               @click="$router.push(`/Layout/tab2/${row.id}/${row.name}`)"
-              >表相关</el-button
+              >编辑表</el-button
             >
             <el-button type="text" @click="editProject(row.id)">编辑</el-button>
             <el-button

+ 1 - 1
src/views/Tab2/index.vue

@@ -55,7 +55,7 @@
             <el-button
               type="text"
               @click="$router.push(`/Layout/tab3/${row.id}/${$route.params.p}/${row.name}`)"
-              >字段相关</el-button
+              >编辑字段</el-button
             >
           </template>
         </el-table-column>

+ 6 - 4
src/views/Tab3/Dialog.vue

@@ -40,7 +40,7 @@
       <el-form-item label="搜索字段">
         <el-switch
           active-color="#13ce66"
-          inactive-color="#ff4949"
+          inactive-color="#ccc"
           :disabled="ruleForm.type !== 'varchar'"
           v-model="ruleForm.isQuery"
           :active-value="1"
@@ -74,7 +74,7 @@ export default {
         tableId: null,
         name: "",
         remark: "",
-        length: 512,
+        length: 16,
         type: "varchar",
         isQuery: 0,
       },
@@ -100,8 +100,8 @@ export default {
   methods: {
     valueChange(value) {
       let temp = 0;
-      if (value === "varchar") temp = 512;
-      else if (value === "int") temp = 8;
+      if (value === "varchar") temp = 16;
+      else if (value === "int") temp = 1;
       this.ruleForm.length = temp;
       if (value !== "varchar") this.ruleForm.isQuery = 0;
     },
@@ -111,9 +111,11 @@ export default {
         : "";
       if (this.ruleForm.type === "int") {
         if (Number(value) > 8) this.ruleForm.length = 8;
+        if(Number(value) <= 0) this.ruleForm.length = 1;
       }
       if (this.ruleForm.type === "varchar") {
         if (Number(value) > 512) this.ruleForm.length = 512;
+        if(Number(value) <= 0) this.ruleForm.length = 1;
       }
     },
     // 点击取消

+ 1 - 1
src/views/Tab4/index.vue

@@ -29,7 +29,7 @@
             <el-button
               type="text"
               @click="$router.push(`/Layout/tab5/${row.id}/${row.name}`)"
-              >数据</el-button
+              >查看数据</el-button
             >
           </template>
         </el-table-column>

+ 1 - 1
src/views/Tab5/index.vue

@@ -42,7 +42,7 @@
             <el-button
               type="text"
               @click="$router.push(`/Layout/tab6/${row.id}/${$route.params.p}/${row.name}`)"
-              >字段数据</el-button
+              >数据管理</el-button
             >
           </template>
         </el-table-column>