YaolongHan 4 lat temu
rodzic
commit
13a524c2dc

+ 1 - 1
src/components/homeView/createGraphDialog.vue

@@ -49,7 +49,7 @@ export default {
       rules: {
         name: [
           { required: true, message: "请输入名称", trigger: "blur" },
-          { max: 10, message: "最长为10个文字", trigger: "blur" },
+          { max: 20, message: "最长为10个文字", trigger: "blur" },
         ],
         type: [
           { required: true, message: "请选择所属类别", trigger: "change" },

+ 5 - 0
src/components/homeView/rename.vue

@@ -35,9 +35,14 @@ export default {
     // 确认修改
     confirm() {
       const newName = this.input.trim()
+      console.log('newName',newName.length)
       if (!newName) {
         return
       }
+      if(newName.length>20){
+         this.$message.error('最长为20个文字');
+         return
+      }
       const pa = {
         content: [{
           id: this.data.id,

+ 26 - 0
src/views/home.vue

@@ -311,6 +311,7 @@ export default {
     },
     // 新建拓扑图成功
     toEdit(data) {
+      // 如果跳入草稿则直接跳入
       // 打开新窗口
       let routeUrl = this.$router.resolve({
         name: "Editer",
@@ -358,6 +359,31 @@ export default {
         });
       }
     },
+    // 查询所有草稿图
+    getAllDraft() {
+      if (!this.curCategory.code) {
+        return;
+      }
+      this.selectCard = [];
+      const pa = {
+        filters: `categoryId="${this.curCategory.code}"`,
+        orders: `${this.selVal} desc`,
+      };
+      if (this.queryText) {
+        pa.filters += `;name contain ""`;
+      }
+      if (this.isPub) {
+        queryPubGraph(pa).then((res) => {
+          this.cardList = res.content.map((t) => {
+            t.checked = false;
+            return t;
+          });
+          this.cardLoading = false;
+        });
+      } else {
+
+      }
+    },
   },
   components: {
     Select,