批量推脱
parent
8e64a50140
commit
5eb411831a
|
@ -116,7 +116,6 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async init(e) {
|
async init(e) {
|
||||||
console.log(e)
|
|
||||||
this.loading = true
|
this.loading = true
|
||||||
this.visible = true
|
this.visible = true
|
||||||
this.heirloom = JSON.stringify(e)
|
this.heirloom = JSON.stringify(e)
|
||||||
|
|
|
@ -30,11 +30,14 @@
|
||||||
ref="multipleTable"
|
ref="multipleTable"
|
||||||
:data="varList"
|
:data="varList"
|
||||||
:header-cell-style="{'font-weight': 'bold','color': '#000'}"
|
:header-cell-style="{'font-weight': 'bold','color': '#000'}"
|
||||||
|
:row-key="getRowKey"
|
||||||
|
:reserve-selection="true"
|
||||||
tooltip-effect="dark"
|
tooltip-effect="dark"
|
||||||
border
|
border
|
||||||
fit
|
fit
|
||||||
highlight-current-row>
|
highlight-current-row
|
||||||
<el-table-column :selectable="handleSelectWithDifferentStatus" type="selection" width="55" align="center"/>
|
@select="handleRowSelect">
|
||||||
|
<el-table-column :selectable="handleSelectWithDifferentStatus" type="selection" width="55" align="center" reserve-selection/>
|
||||||
<el-table-column type="index" label="序号" width="50" align="center"/>
|
<el-table-column type="index" label="序号" width="50" align="center"/>
|
||||||
<el-table-column prop="USERNAME" label="用户名" align="center"/>
|
<el-table-column prop="USERNAME" label="用户名" align="center"/>
|
||||||
<el-table-column prop="NAME" label="姓名" align="center"/>
|
<el-table-column prop="NAME" label="姓名" align="center"/>
|
||||||
|
@ -59,13 +62,14 @@
|
||||||
<div class="page-btn-group">
|
<div class="page-btn-group">
|
||||||
<div>
|
<div>
|
||||||
<el-button v-if="false" type="primary" icon="el-icon-plus" @click="handleAdd">批量同意</el-button>
|
<el-button v-if="false" type="primary" icon="el-icon-plus" @click="handleAdd">批量同意</el-button>
|
||||||
|
<el-button type="primary" icon="el-icon-s-claim" size="mini" @click="entrustByBatch()">批量委托</el-button>
|
||||||
</div>
|
</div>
|
||||||
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList"/>
|
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList"/>
|
||||||
</div>
|
</div>
|
||||||
<user ref="userInfo" append-to-body/>
|
<user ref="userInfo" append-to-body/>
|
||||||
<user-info ref="userInfos" append-to-body/>
|
<user-info ref="userInfos" append-to-body/>
|
||||||
<send-util ref="sendUtil" append-to-body @refresh="getList"/>
|
<send-util ref="sendUtil" append-to-body @refresh="getList"/>
|
||||||
<entrust ref="entrust" append-to-body @refresh="getList"/>
|
<entrust ref="entrust" append-to-body @refresh="updateList"/>
|
||||||
<flow-info-list ref="flowInfo"/>
|
<flow-info-list ref="flowInfo"/>
|
||||||
<flow-step ref="flowStep" />
|
<flow-step ref="flowStep" />
|
||||||
</div>
|
</div>
|
||||||
|
@ -122,7 +126,8 @@ export default {
|
||||||
STATUS: '',
|
STATUS: '',
|
||||||
add: false, // 新增按钮
|
add: false, // 新增按钮
|
||||||
del: false, // 删除按钮
|
del: false, // 删除按钮
|
||||||
edit: false // 修改按钮
|
edit: false, // 修改按钮
|
||||||
|
selectedRowKeys: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
@ -131,14 +136,16 @@ export default {
|
||||||
this.hasButton()
|
this.hasButton()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getRowKey(row) {
|
||||||
|
return row.XGF_USER_ID
|
||||||
|
},
|
||||||
|
handleRowSelect(rows, row) {
|
||||||
|
console.log(rows)
|
||||||
|
this.selectedRowKeys = rows.map(row => row.XGF_USER_ID)
|
||||||
|
console.log(this.selectedRowKeys)
|
||||||
|
},
|
||||||
handleSelectWithDifferentStatus(row, rowIndex) {
|
handleSelectWithDifferentStatus(row, rowIndex) {
|
||||||
if (row.STATUS === 0) {
|
return row.power_flag === '1' && ((row.FLOWS_TYPE === '1' && row.FLOWS_STEP === 1) || (row.FLOWS_TYPE === '2' && row.FLOWS_STEP === 0))
|
||||||
// 不禁用
|
|
||||||
return true
|
|
||||||
} else {
|
|
||||||
// 禁用
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
getQuery() {
|
getQuery() {
|
||||||
if (this.$refs.multipleTable) {
|
if (this.$refs.multipleTable) {
|
||||||
|
@ -169,10 +176,13 @@ export default {
|
||||||
this.listLoading = false
|
this.listLoading = false
|
||||||
this.varList = data.list
|
this.varList = data.list
|
||||||
this.total = data.page.totalResult
|
this.total = data.page.totalResult
|
||||||
|
}).catch((e) => {
|
||||||
|
this.listLoading = false
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
},
|
||||||
this.listLoading = false
|
updateList() {
|
||||||
})
|
this.$refs.multipleTable.clearSelection()
|
||||||
|
this.getList()
|
||||||
},
|
},
|
||||||
handleShow(row) {
|
handleShow(row) {
|
||||||
this.$refs.userInfos.init(row)
|
this.$refs.userInfos.init(row)
|
||||||
|
@ -189,6 +199,9 @@ export default {
|
||||||
entrust(row) {
|
entrust(row) {
|
||||||
this.$refs.entrust.init(row)
|
this.$refs.entrust.init(row)
|
||||||
},
|
},
|
||||||
|
entrustByBatch() {
|
||||||
|
this.$refs.entrust.init(this.$refs.multipleTable.selection)
|
||||||
|
},
|
||||||
getUserInfo(row) {
|
getUserInfo(row) {
|
||||||
this.$refs.userInfo.init(row)
|
this.$refs.userInfo.init(row)
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue