user_workfile_check.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <template>
  2. <el-drawer
  3. v-loading="loading"
  4. title="作品审核"
  5. size="600px"
  6. :append-to-body="false"
  7. :destroy-on-close="true"
  8. :visible="true"
  9. :modal-append-to-body="false"
  10. :before-close="handleClose"
  11. :wrapperClosable="false"
  12. ref="drawer_close">
  13. <el-form label-width="100px" v-loading="loading" style="padding-right: 20px;margin-top: 20px" class="qs-form-add">
  14. <el-form-item label="拒绝理由">
  15. <el-input type="textarea" v-model="ruleForm.name"></el-input>
  16. </el-form-item>
  17. <el-form-item>
  18. <el-tag @click="set_name('非源码')">非源码</el-tag>
  19. <el-tag @click="set_name('价格明显不合理')">价格明显不合理</el-tag>
  20. </el-form-item>
  21. <el-form-item>
  22. <el-button type="primary" @click="refuse()">确认拒绝</el-button>
  23. </el-form-item>
  24. </el-form>
  25. </el-drawer>
  26. </template>
  27. <script>
  28. export default {
  29. props: {
  30. pro_id: {
  31. default: 0
  32. },
  33. back:{
  34. type:Object
  35. },
  36. },
  37. data() {
  38. return {
  39. ruleForm: {
  40. name:"",
  41. },
  42. };
  43. },
  44. methods: {
  45. set_name:function (name) {
  46. this.ruleForm.name=name;
  47. },
  48. handleClose:function()
  49. {
  50. this.back.drawer_obj.user_workfile_check=false;
  51. },
  52. async refuse(){
  53. if(!(this.pro_id>0))
  54. {
  55. this.$message({
  56. type: 'error',
  57. message: '项目编号不存在!'
  58. });
  59. return ;
  60. }
  61. if(!this.ruleForm.name)
  62. {
  63. this.$message({
  64. type: 'error',
  65. message: '拒绝的原因必填!'
  66. });
  67. return ;
  68. }
  69. this.loading = true;
  70. let res = await this.$post("/api/admin/UserWorks/changeWorkFile", {id: this.pro_id, type: 2,content:this.ruleForm.name});
  71. if (res && res.status === 1) {
  72. this.$message({
  73. type: 'success',
  74. message: '操作成功!'
  75. });
  76. this.back.drawer_obj.user_workfile_check=false;
  77. this.back.getAuditList();
  78. this.back.getTableData();
  79. this.loading = false;
  80. }
  81. }
  82. }
  83. };
  84. </script>
  85. <style scoped>
  86. .el-tag {
  87. cursor: pointer;
  88. }
  89. </style>