option.vue 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <template>
  2. <fieldset>
  3. <legend>
  4. <el-tag type="info">按需操作</el-tag>
  5. </legend>
  6. <div class="op-header">
  7. <div class="left-panel">
  8. <el-button type="primary" icon="el-icon-plus" @click="table_add(2)">新增员工账号</el-button>
  9. <!-- <el-button type="primary" icon="el-icon-download" @click="table_export()">导出</el-button> -->
  10. </div>
  11. </div>
  12. </fieldset>
  13. </template>
  14. <script>
  15. export default {
  16. props: {
  17. type: { type: String, default: "1" },
  18. dataSelect: { type: Array, default: () => [] },
  19. dataSelectFull: { type: Array, default: () => [] }
  20. },
  21. data(){
  22. return {
  23. }
  24. },
  25. methods: {
  26. async table_batch_status(status){
  27. if (this.dataSelect.length == 0) {
  28. return this.$message.error("请选择修改数据")
  29. }
  30. let submitData = {"id":this.dataSelect,"value":status,"field":"status","type":"batch"};
  31. var resp = await this.$API.mStaff.batch.post(submitData);
  32. if (resp.code == 0) {
  33. return this.$message.error(resp.msg);
  34. }
  35. this.$message.success(resp.msg);
  36. this.$emit("success");
  37. },
  38. handleSuccess(){
  39. this.$emit("success");
  40. },
  41. table_add(type){
  42. this.$nextTick(() => {
  43. this.$refs.formMain.open("add")
  44. })
  45. },
  46. }
  47. }
  48. </script>