|
@@ -83,9 +83,6 @@
|
|
|
status="10"
|
|
|
@save="handleSave"
|
|
|
/>
|
|
|
- <!-- <analysis
|
|
|
- :edit="edit_form.department_status === '待处理' && edit_visible"
|
|
|
- /> -->
|
|
|
</template>
|
|
|
<template v-slot:footer><div></div></template>
|
|
|
</simple-dialog>
|
|
@@ -211,7 +208,7 @@
|
|
|
></el-option>
|
|
|
</el-select>
|
|
|
</div>
|
|
|
- <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"
|
|
@@ -227,7 +224,7 @@
|
|
|
:value="item"
|
|
|
></el-option>
|
|
|
</el-select>
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
<div>
|
|
@@ -735,7 +732,6 @@ export default {
|
|
|
},
|
|
|
// 查看按钮
|
|
|
handleCheck(row) {
|
|
|
- console.log(row, "row");
|
|
|
this.edit_form = row;
|
|
|
this.edit_visible = false;
|
|
|
this.id = row.id;
|
|
@@ -812,11 +808,19 @@ export default {
|
|
|
handleCharge(type) {
|
|
|
switch (type) {
|
|
|
case "add":
|
|
|
- this.transfer_form.charge.push({
|
|
|
- person: "",
|
|
|
- allowEditingColumns: [],
|
|
|
- rowNum: [],
|
|
|
- });
|
|
|
+ if (
|
|
|
+ this.transfer_form.charge[this.transfer_form.charge.length - 1]
|
|
|
+ .rowNum.length
|
|
|
+ ) {
|
|
|
+ this.transfer_form.charge.push({
|
|
|
+ person: "",
|
|
|
+ allowEditingColumns: [],
|
|
|
+ rowNum: [],
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.$message.error("请先选择需要转派的列");
|
|
|
+ }
|
|
|
+
|
|
|
break;
|
|
|
case "delete":
|
|
|
this.transfer_form.charge.pop();
|
|
@@ -852,13 +856,24 @@ export default {
|
|
|
} else if (permission_type === 2) {
|
|
|
// 特殊权限
|
|
|
console.log(permission_type, "permission_type");
|
|
|
- charge.forEach((el) => {
|
|
|
- if (el.person && el.allowEditingColumns.length && el.rowNum.length) {
|
|
|
+ if (this.transfer_form.charge.length === 1) {
|
|
|
+ charge.forEach((el) => {
|
|
|
+ if (el.person) {
|
|
|
+ flag = flag * 1;
|
|
|
+ } else {
|
|
|
+ flag = flag * 0;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } else if (this.transfer_form.charge.length > 1) {
|
|
|
+ if (
|
|
|
+ this.transfer_form.charge[this.transfer_form.charge.length - 1]
|
|
|
+ .rowNum.length
|
|
|
+ ) {
|
|
|
flag = flag * 1;
|
|
|
} else {
|
|
|
flag = flag * 0;
|
|
|
}
|
|
|
- });
|
|
|
+ }
|
|
|
}
|
|
|
return flag;
|
|
|
},
|
|
@@ -881,8 +896,14 @@ export default {
|
|
|
} else if (this.permission_type === 2) {
|
|
|
params.transferAuthority = charge.map((el) =>
|
|
|
JSON.stringify({
|
|
|
- allowEditingColumns: el.allowEditingColumns.join(","),
|
|
|
- rowNum: el.rowNum.join(","),
|
|
|
+ allowEditingColumns: this.transfer_cols_orgin.join(","),
|
|
|
+ rowNum: el.rowNum.length
|
|
|
+ ? el.rowNum
|
|
|
+ .sort(function (a, b) {
|
|
|
+ return a - b;
|
|
|
+ })
|
|
|
+ .join(",")
|
|
|
+ : this.transfer_rows_orgin.join(","),
|
|
|
principalId: el.person.split(",")[0],
|
|
|
principalName: el.person.split(",")[1],
|
|
|
})
|
|
@@ -907,12 +928,26 @@ export default {
|
|
|
page: this.page,
|
|
|
pageSize: this.rows,
|
|
|
});
|
|
|
+ this.transfer_form.charge = [
|
|
|
+ {
|
|
|
+ person: "",
|
|
|
+ allowEditingColumns: [],
|
|
|
+ rowNum: [],
|
|
|
+ },
|
|
|
+ ];
|
|
|
this.handleCancel("visible");
|
|
|
}
|
|
|
});
|
|
|
console.log(params, "this.transfer_form");
|
|
|
} else {
|
|
|
- this.$message.error("请填写必要的信息");
|
|
|
+ if (
|
|
|
+ !this.transfer_form.charge[this.transfer_form.charge.length - 1]
|
|
|
+ .rowNum.length
|
|
|
+ ) {
|
|
|
+ this.$message.error("请填写完整可编辑行");
|
|
|
+ } else {
|
|
|
+ this.$message.error("请填写必要的信息");
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
});
|