|
|
|
@ -4,7 +4,7 @@
|
|
|
|
|
ref="multipleTable"
|
|
|
|
|
:data="tableData"
|
|
|
|
|
border
|
|
|
|
|
style="width: 90%">
|
|
|
|
|
style="width: 100%">
|
|
|
|
|
<el-table-column
|
|
|
|
|
type="selection"
|
|
|
|
|
width="55">
|
|
|
|
@ -40,8 +40,17 @@
|
|
|
|
|
label="状态"
|
|
|
|
|
width="120">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
width="200">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-button type="success" @click="agree(scope.row.id)">同意</el-button>
|
|
|
|
|
<el-button type="danger" @click="disagree(scope.row.id)">拒绝</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
<div style="margin-top: 20px">
|
|
|
|
|
<el-button type="success" @click="allAgree()">全部同意</el-button>
|
|
|
|
|
<el-button type="danger" @click="allDisagree()">全部拒绝</el-button>
|
|
|
|
|
<el-button @click="toggleSelection()">取消选择</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
@ -80,6 +89,32 @@ export default {
|
|
|
|
|
handleSelectionChange(val) {
|
|
|
|
|
this.multipleSelection = val;
|
|
|
|
|
},
|
|
|
|
|
agree(id) {
|
|
|
|
|
const _this = this
|
|
|
|
|
axios.get('http://localhost:8181/leaveDetail/agreeUpdate/' + id).then(function (resp) {
|
|
|
|
|
location.reload();
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
disagree(row) {
|
|
|
|
|
const _this = this
|
|
|
|
|
axios.get('http://localhost:8181/leaveDetail/disagreeUpdate/' + id).then(function (resp) {
|
|
|
|
|
location.reload();
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
allAgree() {
|
|
|
|
|
let arrLength = this.$refs.multipleTable.selection.length;
|
|
|
|
|
for (let i = 0; i < arrLength; i++) {
|
|
|
|
|
axios.get('http://localhost:8181/leaveDetail/agreeUpdate/' + this.$refs.multipleTable.selection[i].id)
|
|
|
|
|
}
|
|
|
|
|
location.reload();
|
|
|
|
|
},
|
|
|
|
|
allDisagree() {
|
|
|
|
|
let arrLength = this.$refs.multipleTable.selection.length;
|
|
|
|
|
for (let i = 0; i < arrLength; i++) {
|
|
|
|
|
axios.get('http://localhost:8181/leaveDetail/disagreeUpdate/' + this.$refs.multipleTable.selection[i].id)
|
|
|
|
|
}
|
|
|
|
|
location.reload();
|
|
|
|
|
},
|
|
|
|
|
//this.$refs.multipleTable.selection
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
@ -110,7 +145,6 @@ export default {
|
|
|
|
|
_this.type = resp.data.type
|
|
|
|
|
console.log(resp)
|
|
|
|
|
*/
|
|
|
|
|
console.log(resp.data)
|
|
|
|
|
_this.tableData = resp.data
|
|
|
|
|
_this.pageSize = 6
|
|
|
|
|
_this.total = resp.data.length
|
|
|
|
|