| | |
| | | }) |
| | | } |
| | | |
| | | export const examineList = (ids,names) => { |
| | | return request({ |
| | | url: '/api/zc/examineList', |
| | | method: 'post', |
| | | params: { |
| | | ids, |
| | | names |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const add = (row) => { |
| | | return request({ |
| | | url: '/api/zc/submit', |
| | |
| | | v-if="permission.zc_delete" |
| | | @click="handleDelete">删 除 |
| | | </el-button> |
| | | <el-button |
| | | size="small" |
| | | icon="el-icon-s-fold" |
| | | plain |
| | | @click="examine">批量审核 |
| | | </el-button> |
| | | </template> |
| | | <template slot-scope="{row}" slot="type"> |
| | | <el-tag>{{row.type==='0'?'未审核':row.type==='1'?'审核通过':'审核未通过'}}</el-tag> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import {getList, getDetail, add, update, remove} from "@/api/zc/zc"; |
| | | import {getList, getDetail, add, update, remove,examineList} from "@/api/zc/zc"; |
| | | import {getRoleTree} from "@/api/system/role"; |
| | | import {mapGetters} from "vuex"; |
| | | |
| | |
| | | ids.push(ele.id); |
| | | }); |
| | | return ids.join(","); |
| | | }, |
| | | names() { |
| | | let names = []; |
| | | this.selectionList.forEach(ele => { |
| | | names.push(ele.username); |
| | | }); |
| | | return names.join(","); |
| | | } |
| | | }, |
| | | methods: { |
| | |
| | | }); |
| | | }); |
| | | }, |
| | | examine() { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据"); |
| | | return; |
| | | } |
| | | this.$confirm("确定将选择用户审核通过?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return examineList(this.ids,this.names); |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }); |
| | | this.$refs.crud.toggleSelection(); |
| | | }); |
| | | }, |
| | | handleDelete() { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据"); |