<!-- 人员监督 -->
|
<template>
|
<div>
|
<div style="text-align: left; margin-bottom: 15px;">
|
<label>关键字</label>
|
<el-input placeholder="请输入关键字" style="width: 20vh;" size="small"></el-input>
|
<el-button type="primary" size="small">查询</el-button>
|
<div style="float: right;">
|
<el-button type="primary" size="small">查询</el-button>
|
<el-button type="primary" size="small">导出excel</el-button>
|
</div>
|
</div>
|
<div class="table">
|
<el-table :data="tableData" style="width: 100%" height="70vh">
|
<el-table-column prop="date" label="序号" min-width="120">
|
</el-table-column>
|
<el-table-column prop="name" label="流程编号" min-width="180">
|
</el-table-column>
|
<el-table-column prop="address" label="所属年度" min-width="180">
|
</el-table-column>
|
<el-table-column prop="address" label="编制日期" min-width="180">
|
</el-table-column>
|
<el-table-column prop="address" label="提交人" min-width="180">
|
</el-table-column>
|
<el-table-column prop="address" label="当前状态" min-width="120">
|
</el-table-column>
|
<el-table-column prop="address" label="当前责任人" min-width="180">
|
</el-table-column>
|
<el-table-column fixed="right" label="操作" width="100">
|
<template v-slot="scope">
|
<el-button type="text" size="small">查看</el-button>
|
<el-button type="text" size="small">编辑</el-button>
|
</template>
|
</el-table-column>
|
</el-table>
|
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="1"
|
:page-sizes="[10, 20, 30, 50, 100]" :page-size="search.size" layout="->,total, sizes, prev, pager, next, jumper"
|
:total="search.total">
|
</el-pagination>
|
</div>
|
</div>
|
</template>
|
|
<script>
|
export default {
|
props: {
|
clickNodeVal: {
|
type: Object,
|
default: () => {
|
return {};
|
}
|
}
|
},
|
data() {
|
return {
|
tableData: [],
|
search: {
|
size: 20,
|
current: 1,
|
total: 0
|
}
|
};
|
},
|
created() {
|
this.init();
|
},
|
methods: {
|
handleSizeChange(val) {
|
this.search.size = val
|
this.getPersonnelTraining(this.clickNodeVal.userId);
|
},
|
handleCurrentChange(val) {
|
this.search.current = val
|
this.getPersonnelTraining(this.clickNodeVal.userId);
|
},
|
// 初始化调用
|
init() {
|
if (this.clickNodeVal.userId) {
|
this.getPersonnelTraining(this.clickNodeVal.userId ? this.clickNodeVal.userId : null, null);
|
} else {
|
this.getPersonnelTraining(null, this.clickNodeVal.id ? this.clickNodeVal.id : null);
|
}
|
},
|
getPersonnelTraining(userId) {
|
this.search.userId = userId
|
this.$axios.get(this.$api.personnel.personTrainingSelect+"?userId=" + userId + "&size=" + this.search.size + "¤t=" + this.search.current).then(res => {
|
console.log(`output->res`,res)
|
})
|
}
|
},
|
watch: {
|
// 监听点击el-tree的数据,进行数据刷新
|
clickNodeVal(newVal) {
|
if (newVal.userId) {
|
this.getPersonnelTraining(newVal.userId);
|
}
|
}
|
}
|
};
|
</script>
|