|
@@ -59,7 +59,7 @@
|
|
|
<approve-history :data="row"></approve-history>
|
|
<approve-history :data="row"></approve-history>
|
|
|
</template>
|
|
</template>
|
|
|
<template slot-scope="{row, index}" slot="menu">
|
|
<template slot-scope="{row, index}" slot="menu">
|
|
|
- <el-button size="small" class="el-button--text" v-if="approveSwitch == 0 || (approveSwitch == 1 && isManageRole && approveType == 1 && row.processStatus == '已關閉' )"
|
|
|
|
|
|
|
+ <el-button size="small" class="el-button--text" v-if="(approveSwitch == 0 && isManageRole) || (approveSwitch == 1 && isManageRole && approveType == 1 && row.processStatus == '已關閉' )"
|
|
|
@click="$refs.crud.rowDel(row, index)"><i class="el-icon-delete"></i> 刪 除</el-button>
|
|
@click="$refs.crud.rowDel(row, index)"><i class="el-icon-delete"></i> 刪 除</el-button>
|
|
|
<el-button size="small" class="el-button--text" v-if="userInfo.user_id == row.createUser && row.receiverId.indexOf(userInfo.user_id) > -1 && tableEditBtn && ((approveType == 1 && (row.processStatus == '已退回' || (row.processStatus == '待審批' && !row.approveHistory))) || (approveType == 2 && !row.approveHistory))"
|
|
<el-button size="small" class="el-button--text" v-if="userInfo.user_id == row.createUser && row.receiverId.indexOf(userInfo.user_id) > -1 && tableEditBtn && ((approveType == 1 && (row.processStatus == '已退回' || (row.processStatus == '待審批' && !row.approveHistory))) || (approveType == 2 && !row.approveHistory))"
|
|
|
@click="formEdit(row, index)"><i class="el-icon-edit"></i> 編 輯</el-button>
|
|
@click="formEdit(row, index)"><i class="el-icon-edit"></i> 編 輯</el-button>
|
|
@@ -289,7 +289,8 @@
|
|
|
return {
|
|
return {
|
|
|
addBtn: this.vaildData(this.permission.autodata_add, false),
|
|
addBtn: this.vaildData(this.permission.autodata_add, false),
|
|
|
viewBtn: this.vaildData(this.permission.autodata_view, false),
|
|
viewBtn: this.vaildData(this.permission.autodata_view, false),
|
|
|
- delBtn: this.vaildData(this.permission.autodata_delete, false),
|
|
|
|
|
|
|
+ // delBtn: this.vaildData(this.permission.autodata_delete, false),
|
|
|
|
|
+ delBtn: false,
|
|
|
editBtn: this.vaildData(this.permission.autodata_edit, false)
|
|
editBtn: this.vaildData(this.permission.autodata_edit, false)
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
@@ -535,11 +536,10 @@
|
|
|
this.approveNum = tableStruct.num;
|
|
this.approveNum = tableStruct.num;
|
|
|
let option = opStr2opObj(tableStruct.columns);
|
|
let option = opStr2opObj(tableStruct.columns);
|
|
|
option.addBtn = tableStruct.canWrite;
|
|
option.addBtn = tableStruct.canWrite;
|
|
|
- _this.deleteBatch = tableStruct.isManageRole;
|
|
|
|
|
|
|
+ _this.deleteBatch = false;
|
|
|
// option.delBtn = tableStruct.isManageRole;
|
|
// option.delBtn = tableStruct.isManageRole;
|
|
|
// option.excelBtn = tableStruct.isManageRole;
|
|
// option.excelBtn = tableStruct.isManageRole;
|
|
|
this.isManageRole = tableStruct.isManageRole;
|
|
this.isManageRole = tableStruct.isManageRole;
|
|
|
- option.delBtn = false;
|
|
|
|
|
option.editBtn = false;
|
|
option.editBtn = false;
|
|
|
option.viewBtn = true;
|
|
option.viewBtn = true;
|
|
|
this.tableEditBtn = tableStruct.approveSwitch == 1;
|
|
this.tableEditBtn = tableStruct.approveSwitch == 1;
|
|
@@ -578,6 +578,8 @@
|
|
|
if (option.group){
|
|
if (option.group){
|
|
|
this.approveOption.group = this.deepClone(option.group);
|
|
this.approveOption.group = this.deepClone(option.group);
|
|
|
this.approveOption.group[0].column.forEach(item=>{item.disabled = true})
|
|
this.approveOption.group[0].column.forEach(item=>{item.disabled = true})
|
|
|
|
|
+ }else{
|
|
|
|
|
+ this.approveOption.group = []
|
|
|
}
|
|
}
|
|
|
this.approveOption.column.forEach(item => {
|
|
this.approveOption.column.forEach(item => {
|
|
|
item.disabled = true;
|
|
item.disabled = true;
|
|
@@ -827,6 +829,7 @@
|
|
|
const data = res.data.data;
|
|
const data = res.data.data;
|
|
|
this.page.total = data.total;
|
|
this.page.total = data.total;
|
|
|
this.data = this.initData(data.records);
|
|
this.data = this.initData(data.records);
|
|
|
|
|
+ debugger
|
|
|
this.loading = false;
|
|
this.loading = false;
|
|
|
this.selectionClear();
|
|
this.selectionClear();
|
|
|
});
|
|
});
|