zengyicheng 1 year ago
parent
commit
1ae58bd647
2 changed files with 83 additions and 40 deletions
  1. BIN
      src/assets/icon/new/addInput.png
  2. 83 40
      src/components/pages/evaluation.vue

BIN
src/assets/icon/new/addInput.png


+ 83 - 40
src/components/pages/evaluation.vue

@@ -187,19 +187,18 @@
                   <!-- @click="updateF(item.id, item.name, 1)" -->
                 </div>
                 <div v-else>
-                  <el-input
-                    v-model="evaObject.fName1"
-                    @change="noInput(item.id, evaObject.fName1, 1)"
-                  />
+                  <textarea rows="2" v-autoHeight="30" v-model="evaObject.fName1" class="binfo_textarea"
+                    @change="noInput(item.id, evaObject.fName1, 1)"></textarea>
                 </div>
                 <img
+                  style="width: 24px;"
                   src="../../assets/delete.png"
                   @click="deleteF(item.id)"
                   alt
                 />
               </div>
               <div class="e_add_input">
-                <el-input v-model="evaObject.fName" @focus="setDetail(1)"/>
+                <textarea rows="2" v-autoHeight="30" v-model="evaObject.fName" class="binfo_textarea" placeholder="请添加内容.." @focus="setDetail(1)"></textarea>
                 <img
                   src="../../assets/icon/new/addInput.png"
                    @click="addInputName(1)"
@@ -271,19 +270,18 @@
                   />
                 </div>
                 <div v-else>
-                  <el-input
-                    v-model="evaObject.sName1"
-                    @change="noInput(item.id, evaObject.sName1, 2)"
-                  />
+                  <textarea rows="2" v-autoHeight="30" v-model="evaObject.sName1" class="binfo_textarea"
+                    @change="noInput(item.id, evaObject.sName1, 2)"></textarea>
                 </div>
                 <img
+                  style="width: 24px;"
                   src="../../assets/delete.png"
                   @click="deleteS(item.id)"
                   alt
                 />
               </div>
               <div class="e_add_input" v-if="fid != ''">
-                <el-input v-model="evaObject.sName" @focus="setDetail(2)"/>
+                <textarea rows="2" v-autoHeight="30" v-model="evaObject.sName" class="binfo_textarea" placeholder="请添加内容.." @focus="setDetail(2)"></textarea>
                 <img
                   src="../../assets/icon/new/addInput.png"
                    @click="addInputName(2)"
@@ -357,19 +355,18 @@
                   />
                 </div>
                 <div v-else>
-                  <el-input
-                    v-model="evaObject.tName1"
-                    @change="noInput(item.id, evaObject.tName1, 3)"
-                  />
+                  <textarea rows="2" v-autoHeight="30" v-model="evaObject.tName1" class="binfo_textarea"
+                    @change="noInput(item.id, evaObject.tName1, 3)"></textarea>
                 </div>
                 <img
+                  style="width: 24px;"
                   src="../../assets/delete.png"
                   @click="deleteT(item.id)"
                   alt
                 />
               </div>
               <div class="e_add_input" v-if="sid != ''">
-                <el-input v-model="evaObject.tName" @focus="setDetail(3)"/>
+                <textarea rows="2" v-autoHeight="30" v-model="evaObject.tName" class="binfo_textarea" placeholder="请添加内容.." @focus="setDetail(3)"></textarea>
                 <img
                   src="../../assets/icon/new/addInput.png"
                    @click="addInputName(3)"
@@ -620,15 +617,15 @@ export default {
       this.type = type;
       this.dialogVisible3 = true;
     },
-    // setDetail(t){
-    //   if(t == 1){
-    //     this.isFold = true;
-    //   }else if(t == 2){
-    //     this.isSold = true;
-    //   }else if(t == 3){
-    //     this.isTold = true;
-    //   }
-    // },
+    setDetail(t){
+      if(t == 1){
+        this.isFold = true;
+      }else if(t == 2){
+        this.isSold = true;
+      }else if(t == 3){
+        this.isTold = true;
+      }
+    },
     clearAll(){
       this.dialogVisible = false;
       this.isFold = false;
@@ -768,6 +765,7 @@ export default {
       }
       this.sid = "";
       this.tid = "";
+      this.isFold = false;
     },
     checkS(id) {
       if (this.sid == id) {
@@ -776,6 +774,7 @@ export default {
         this.sid = id;
       }
       this.tid = "";
+      this.isSold = false;
     },
     checkT(id) {
       if (this.tid == id) {
@@ -783,6 +782,7 @@ export default {
       } else {
         this.tid = id;
       }
+      this.isTold = false;
     },
 
     updateF(id, n, t) {
@@ -792,13 +792,13 @@ export default {
       this.dialogVisible4 = true;
     },
     deleteF(id) {
-      if (JSON.stringify(this.eJson[id].child) != "{}") {
-        this.$message.error(
-          "删除该目标将会同步删除该目标下所有内容,请先删除该目标底下子集!"
-        );
-        return;
-      }
-      this.$confirm("是否删除该子级?", "提示", {
+      // if (JSON.stringify(this.eJson[id].child) != "{}") {
+      //   this.$message.error(
+      //     "删除该目标将会同步删除该目标下所有内容,请先删除该目标底下子集!"
+      //   );
+      //   return;
+      // }
+      this.$confirm("删除该目标将会同步删除该目标下所有内容,是否继续操作?", "提示", {
         confirmButtonText: "删除",
         cancelButtonText: "取消",
         type: "warning",
@@ -815,13 +815,13 @@ export default {
         .catch(() => {});
     },
     deleteS(id) {
-      if (JSON.stringify(this.eJson[this.fid].child[id].child) != "{}") {
-        this.$message.error(
-          "删除该目标将会同步删除该目标下所有内容,请先删除该目标底下子集!"
-        );
-        return;
-      }
-      this.$confirm("是否删除该子级?", "提示", {
+      // if (JSON.stringify(this.eJson[this.fid].child[id].child) != "{}") {
+      //   this.$message.error(
+      //     "删除该目标将会同步删除该目标下所有内容,请先删除该目标底下子集!"
+      //   );
+      //   return;
+      // }
+      this.$confirm("删除该目标将会同步删除该目标下所有内容,是否继续操作?", "提示", {
         confirmButtonText: "删除",
         cancelButtonText: "取消",
         type: "warning",
@@ -994,6 +994,7 @@ export default {
       this.init();
       this.setMindData();
       this.typeMode = 1;
+      this.clearAll();
       this.dialogVisible = true;
     },
     checkE(res) {
@@ -1248,8 +1249,8 @@ export default {
   margin-left: 10px;
 }
 .e_add_input>img{
-  width: 25px;
-  height: 25px;
+  width: 35px;
+  height: 35px;
   margin: 0 5px;
   cursor: pointer;
 }
@@ -1394,4 +1395,46 @@ export default {
   height: 100% !important;
   margin: 0 auto !important;
 }
+.binfo_textarea{
+  width: 100%;
+  margin: 0;
+  padding: 12px 14px;
+  display: block;
+  min-width: 0;
+  outline: none;
+  box-sizing: border-box;
+  background: none;
+  border: none;
+  border-radius: 4px;
+  background: #fff;
+  font-size: 16px;
+  resize: none;
+  font-family: 'Microsoft YaHei';
+  min-height: 48px;
+  border: 1.5px solid #CAD1DC;
+}
+
+.binfo_textarea:focus-visible {
+  border: 1.5px solid #3681FC !important;
+}
+
+.binfo_textarea::-webkit-scrollbar {
+  /*滚动条整体样式*/
+  width: 6px;
+  /*高宽分别对应横竖滚动条的尺寸*/
+  height: 6px;
+}
+
+/*定义滚动条轨道 内阴影+圆角*/
+.binfo_textarea::-webkit-scrollbar {
+  border-radius: 10px;
+  background-color: #eee;
+}
+
+/*定义滑块 内阴影+圆角*/
+.binfo_textarea::-webkit-scrollbar-thumb {
+  border-radius: 10px;
+  -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
+  background-color: rgba(0, 0, 0, 0.1);
+}
 </style>