| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103 |
- <template>
- <el-dialog
- title="填写核实信息"
- :visible.sync="dialogVisible"
- width="40%"
- append-to-body
- :before-close="handleClose">
- <el-form ref="form" :model="formObj" label-width="100px">
- <el-form-item label="核实情况">
- <el-radio-group v-model="formObj.resource">
- <el-radio label="已整改到位"></el-radio>
- <el-radio label="未整改到位"></el-radio>
- </el-radio-group>
- </el-form-item>
- <el-form-item label="备注">
- <el-input type="textarea" v-model="formObj.desc"></el-input>
- </el-form-item>
- <el-form-item label="相关文件">
- <upload ref="uploadFile" :url="`/pdcApi/file/insert?bizId=`" @uploadOver="removeNewSupervision"></upload>
- </el-form-item>
- <el-form-item>
- <el-button type="primary" @click="onSubmit">保存</el-button>
- </el-form-item>
- </el-form>
- </el-dialog>
- </template>
- <script>
- import request from '@util/gw_ajax_request.js'
- import { submitUpload } from "@api/duChaAPI.js";
- export default {
- props: ['currentObjectId','currentObjectName','currentObjectRgstrId'],
- data(){
- return{
- dialogVisible: true,
- currentProblemId: '',
- formObj: {
- resource: '',
- desc: ''
- },
- pblmId: '',
- gwComFiles: [],
- pblmStat: '',
- }
- },
- components:{
- upload: resolve => {
- require(["@widget/uploadFile.vue"], resolve);
- },
- },
- computed:{
- persId() {
- return localStorage.getItem("userid") ? localStorage.getItem("userid") : "1098101939614724096";
- }
- },
- created(){
- },
- mounted(){
- },
- methods:{
- onSubmit(){
- request.post('/dc/insp/pblm',this.formObj).then(res=>{
- if (res.success) {
- this.pblmId = res.data.pblmId;
- this.gwComFiles = [];
- this.pblmStat = res.data.pblmStat;
- if (this.$refs.uploadFile.submitUpload(res.data.pblmId)) {
- this.removeNewSupervision();
- }
- }
- })
- },
- updatefilelist(arg) {
- request.post('/dc/insp/pblm/update',{
- pblmId: this.pblmId,
- gwComFiles: arg,
- pblmStat: this.pblmStat
- }).then(res => {
- this.removeNewSupervision()
- });
- },
- removeNewSupervision(arg){
- if (arg) {
- console.log(arg);
- var args = this.gwComFiles.concat(arg);
- this.updatefilelist(args);
- }
- this.$message.success('保存成功')
- this.$emit('closeDialog')
- this.gwComFiles = [];
- this.$refs.uploadFile.init();
- },
- handleClose(){
- this.$emit('closeDialog')
- }
- },
- watch:{
- }
- }
- </script>
- <style lang="scss">
- </style>
|