Bladeren bron

可编辑行

daiqisheng 2 jaren geleden
bovenliggende
commit
5b89342a67
1 gewijzigde bestanden met toevoegingen van 19 en 12 verwijderingen
  1. 19 12
      src/pages/main/performance/department.vue

+ 19 - 12
src/pages/main/performance/department.vue

@@ -191,7 +191,7 @@
                 :value="value"
               ></el-option>
             </el-select>
-            <!-- <div v-if="permission_type === 2">
+            <div v-if="permission_type === 2">
               <span class="form-content">可编辑行:</span>
               <el-select
                 class="margin-bottom-20 margin-right-10"
@@ -207,8 +207,8 @@
                   :value="item"
                 ></el-option>
               </el-select>
-            </div> -->
-            <div v-if="permission_type === 2">
+            </div>
+            <!-- <div v-if="permission_type === 2">
               <span class="form-content">可编辑列:</span>
               <el-select
                 class="margin-bottom-20 margin-right-10"
@@ -224,7 +224,7 @@
                   :value="item"
                 ></el-option>
               </el-select>
-            </div>
+            </div> -->
           </div>
         </el-form-item>
         <div>
@@ -785,7 +785,7 @@ export default {
         case "add":
           if (
             this.transfer_form.charge[this.transfer_form.charge.length - 1]
-              .allowEditingColumns.length
+              .rowNum.length
           ) {
             this.transfer_form.charge.push({
               person: "",
@@ -842,7 +842,7 @@ export default {
         } else if (this.transfer_form.charge.length > 1) {
           if (
             this.transfer_form.charge[this.transfer_form.charge.length - 1]
-              .allowEditingColumns.length
+              .rowNum.length
           ) {
             flag = flag * 1;
           } else {
@@ -871,14 +871,14 @@ export default {
             } else if (this.permission_type === 2) {
               params.transferAuthority = charge.map((el) =>
                 JSON.stringify({
-                  allowEditingColumns: el.allowEditingColumns.length
-                    ? el.allowEditingColumns
+                  allowEditingColumns: this.transfer_cols_orgin.join(","),
+                  rowNum: el.rowNum.length
+                    ? el.rowNum
                         .sort(function (a, b) {
                           return a - b;
                         })
                         .join(",")
-                    : this.transfer_cols_orgin.join(","),
-                  rowNum: this.transfer_rows_orgin.join(","),
+                    : this.transfer_rows_orgin.join(","),
                   principalId: el.person.split(",")[0],
                   principalName: el.person.split(",")[1],
                 })
@@ -903,6 +903,13 @@ export default {
                   page: this.page,
                   pageSize: this.rows,
                 });
+                this.transfer_form.charge = [
+                  {
+                    person: "",
+                    allowEditingColumns: [],
+                    rowNum: [],
+                  },
+                ];
                 this.handleCancel("visible");
               }
             });
@@ -910,9 +917,9 @@ export default {
           } else {
             if (
               !this.transfer_form.charge[this.transfer_form.charge.length - 1]
-                .allowEditingColumns.length
+                .rowNum.length
             ) {
-              this.$message.error("请填写完整可编辑");
+              this.$message.error("请填写完整可编辑");
             } else {
               this.$message.error("请填写必要的信息");
             }