|
@@ -53,6 +53,7 @@
|
|
|
</div>
|
|
|
<div class="table-box">
|
|
|
<el-table
|
|
|
+ height="600"
|
|
|
v-loading="tableLoading"
|
|
|
ref="multipleTable"
|
|
|
:data="tableData"
|
|
@@ -127,7 +128,7 @@
|
|
|
<el-dialog
|
|
|
class="dialog-footer-center"
|
|
|
append-to-body
|
|
|
- title="新增电签配置信息"
|
|
|
+ :title="addDialogVisibleTitle"
|
|
|
:visible.sync="addDialogVisible"
|
|
|
width="80%"
|
|
|
:before-close="handleAddClose">
|
|
@@ -393,6 +394,7 @@
|
|
|
total: 0,
|
|
|
|
|
|
addDialogVisible: false,
|
|
|
+ addDialogVisibleTitle: '新增电签配置信息',
|
|
|
saveBatchLoading: false,
|
|
|
checkedList: [],
|
|
|
tableData1: [{}],
|
|
@@ -503,6 +505,8 @@
|
|
|
//获取岗位列表
|
|
|
getRoleData() {
|
|
|
this.roleListLoading = true;
|
|
|
+ this.selectedItem = {};
|
|
|
+
|
|
|
getRoleList({
|
|
|
type: this.tabPosition,
|
|
|
roleName: this.postText
|
|
@@ -517,6 +521,7 @@
|
|
|
this.roleData = [];
|
|
|
}
|
|
|
})
|
|
|
+ this.getTableData();
|
|
|
},
|
|
|
positionClick(event, item){
|
|
|
this.selectedItem = item;
|
|
@@ -531,8 +536,9 @@
|
|
|
getListPage({
|
|
|
size: this.pageSize,
|
|
|
current: this.currentPage,
|
|
|
- keyword: this.postText,
|
|
|
- roleId: this.selectedItem.roleId||''
|
|
|
+ keyword: '',
|
|
|
+ roleId: this.selectedItem.roleId||'',
|
|
|
+ type: this.tabPosition
|
|
|
}).then(res => {
|
|
|
this.tableLoading = false;
|
|
|
if (res.data.code == 200) {
|
|
@@ -554,11 +560,13 @@
|
|
|
},
|
|
|
addEleClick() {
|
|
|
this.addDialogVisible = true;
|
|
|
+ this.addDialogVisibleTitle = '新增电签配置信息';
|
|
|
this.tableData1=[{}]
|
|
|
},
|
|
|
editEleClick(row) {
|
|
|
|
|
|
this.addDialogVisible = true;
|
|
|
+ this.addDialogVisibleTitle = '编辑电签配置信息';
|
|
|
this.tableData1 = [...this.checkedList]
|
|
|
console.log( this.tableData1,' this.tableData1');
|
|
|
this.isPosView=false
|
|
@@ -649,14 +657,35 @@
|
|
|
},
|
|
|
handleDelete(row,index) {
|
|
|
console.log('删除', row);
|
|
|
- if(this.tableData1.length==1){
|
|
|
+ if(this.tableData1.length==1&&this.addDialogVisibleTitle=='新增电签配置信息'){
|
|
|
this.$message({
|
|
|
type: "warning",
|
|
|
message: "请至少保留一条数据",
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
|
- this.tableData1.splice(index, 1);
|
|
|
+ if(this.addDialogVisibleTitle=='新增电签配置信息'){
|
|
|
+ this.tableData1.splice(index, 1);
|
|
|
+ }else{
|
|
|
+ let _that = this;
|
|
|
+ let ids = row.id;
|
|
|
+ this.$confirm("删除后,项目级表单电签信息将同步删除,请确认是否删除", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ _that.remove({ ids });
|
|
|
+ _that.tableData1.splice(index, 1);
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.$message({
|
|
|
+ type: "info",
|
|
|
+ message: "已取消删除",
|
|
|
+ });
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
// 删除操作的逻辑
|
|
|
},
|
|
|
rowDel() {
|
|
@@ -679,6 +708,7 @@
|
|
|
})
|
|
|
.then(() => {
|
|
|
_that.remove({ ids });
|
|
|
+
|
|
|
})
|
|
|
.catch(() => {
|
|
|
this.$message({
|