dfe64fb1406103d7249075444e2c22b2bf468d15.svn-base 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. <template>
  2. <el-dialog
  3. title="填写核实信息"
  4. :visible.sync="dialogVisible"
  5. width="40%"
  6. append-to-body
  7. :before-close="handleClose">
  8. <el-form ref="form" :model="formObj" label-width="100px">
  9. <el-form-item label="核实情况">
  10. <el-radio-group v-model="formObj.resource">
  11. <el-radio label="已整改到位"></el-radio>
  12. <el-radio label="未整改到位"></el-radio>
  13. </el-radio-group>
  14. </el-form-item>
  15. <el-form-item label="备注">
  16. <el-input type="textarea" v-model="formObj.desc"></el-input>
  17. </el-form-item>
  18. <el-form-item label="相关文件">
  19. <upload ref="uploadFile" :url="`/pdcApi/file/insert?bizId=`" @uploadOver="removeNewSupervision"></upload>
  20. </el-form-item>
  21. <el-form-item>
  22. <el-button type="primary" @click="onSubmit">保存</el-button>
  23. </el-form-item>
  24. </el-form>
  25. </el-dialog>
  26. </template>
  27. <script>
  28. import request from '@util/gw_ajax_request.js'
  29. import { submitUpload } from "@api/duChaAPI.js";
  30. export default {
  31. props: ['currentObjectId','currentObjectName','currentObjectRgstrId'],
  32. data(){
  33. return{
  34. dialogVisible: true,
  35. currentProblemId: '',
  36. formObj: {
  37. resource: '',
  38. desc: ''
  39. },
  40. pblmId: '',
  41. gwComFiles: [],
  42. pblmStat: '',
  43. }
  44. },
  45. components:{
  46. upload: resolve => {
  47. require(["@widget/uploadFile.vue"], resolve);
  48. },
  49. },
  50. computed:{
  51. persId() {
  52. return localStorage.getItem("userid") ? localStorage.getItem("userid") : "1098101939614724096";
  53. }
  54. },
  55. created(){
  56. },
  57. mounted(){
  58. },
  59. methods:{
  60. onSubmit(){
  61. request.post('/dc/insp/pblm',this.formObj).then(res=>{
  62. if (res.success) {
  63. this.pblmId = res.data.pblmId;
  64. this.gwComFiles = [];
  65. this.pblmStat = res.data.pblmStat;
  66. if (this.$refs.uploadFile.submitUpload(res.data.pblmId)) {
  67. this.removeNewSupervision();
  68. }
  69. }
  70. })
  71. },
  72. updatefilelist(arg) {
  73. request.post('/dc/insp/pblm/update',{
  74. pblmId: this.pblmId,
  75. gwComFiles: arg,
  76. pblmStat: this.pblmStat
  77. }).then(res => {
  78. this.removeNewSupervision()
  79. });
  80. },
  81. removeNewSupervision(arg){
  82. if (arg) {
  83. console.log(arg);
  84. var args = this.gwComFiles.concat(arg);
  85. this.updatefilelist(args);
  86. }
  87. this.$message.success('保存成功')
  88. this.$emit('closeDialog')
  89. this.gwComFiles = [];
  90. this.$refs.uploadFile.init();
  91. },
  92. handleClose(){
  93. this.$emit('closeDialog')
  94. }
  95. },
  96. watch:{
  97. }
  98. }
  99. </script>
  100. <style lang="scss">
  101. </style>