Browse Source

修改目标管理问题

zengyicheng 2 years ago
parent
commit
a89a5e8b51
1 changed files with 28 additions and 9 deletions
  1. 28 9
      src/components/pages/evaluation.vue

+ 28 - 9
src/components/pages/evaluation.vue

@@ -78,7 +78,7 @@
       :visible.sync="dialogVisible"
       :append-to-body="true"
       width="100%"
-      :before-close="handleClose"
+      :before-close="handleClose1"
       class="dialog_diy mubiao_diy"
     >
       <div>
@@ -91,10 +91,10 @@
               @change="setMindData"
             ></el-input>
           </div>
-          <el-button @click="addEJson" type="text" v-if="!update"
-          >保存</el-button
-        >
-        <el-button @click="updateEJson" type="text" v-else>保存</el-button>
+          <el-button @click="addEJson" type="primary" v-if="!update"
+            >保存</el-button
+          >
+          <el-button @click="updateEJson" type="primary" v-else>保存</el-button>
         </div>
         <div class="e_add_content">
           <div class="e_add_list">
@@ -298,13 +298,13 @@
           </div>
         </div>
       </div>
-      <span slot="footer" class="dialog-footer">
+      <!-- <span slot="footer" class="dialog-footer">
         <el-button @click="dialogVisible = false">关 闭</el-button>
         <el-button @click="addEJson" type="primary" v-if="!update"
           >确 定</el-button
         >
         <el-button @click="updateEJson" type="primary" v-else>修 改</el-button>
-      </span>
+      </span> -->
     </el-dialog>
     <el-dialog
       title="添加子级"
@@ -433,6 +433,24 @@ export default {
     handleClose(done) {
       done();
     },
+    handleClose1(done) {
+      this.$confirm("是否保存该目标?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          if (!update) {
+            this.addEJson();
+          } else {
+            this.updateEJson();
+          }
+          done();
+        })
+        .catch(() => {
+          done();
+        });
+    },
     addE(type) {
       this.type = type;
       this.dialogVisible3 = true;
@@ -749,8 +767,8 @@ export default {
 .dialog_diy >>> .el-dialog__headerbtn .el-dialog__close:hover {
   color: #fff;
 }
-.dialog_diy >>> .el-dialog__body{
-  padding:15px 20px 0;
+.dialog_diy >>> .el-dialog__body {
+  padding: 15px 20px 0;
 }
 .dialog_diy >>> .el-dialog__body,
 .dialog_diy >>> .el-dialog__footer {
@@ -815,6 +833,7 @@ export default {
   display: flex;
   flex-wrap: wrap;
   align-items: flex-start;
+  min-height: 502px;
 }
 .e_card {
   background: #fff;