| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215 |
- <template>
- <!-- 修改弹框 -->
- <el-dialog
- width="60%"
- class="custom_dialog"
- title="修改督查问题"
- @close="closeModal"
- :visible.sync="changeSupervisionVisible">
- <div class="scroll_wrapper">
- <div
- style="width:49%;overflow-y:auto;max-height:58vh;float:left;border:1px solid #d5d5ff;margin-right:5px;">
- <p style="font-weight:bolder;background-color:#d5d5ff;padding:3px;">基本信息</p>
- <el-form ref="changeSupFrom" :rules="rules1" :model="problemForm" label-width="130px">
- <el-form-item label="工程名称" prop="nm">
- <el-input v-model="problemForm.nm" clearable></el-input>
- </el-form-item>
- <el-form-item label="问题类别">
- <el-select v-model="problemForm.problemType" @change="problemTypeChange" clearable>
- <el-option :label="item.pblmType" :value="item.pblmType" v-for="(item,index) in problemType" :key="index"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="问题描述" required>
- <el-input
- :autosize="{ minRows: 4, maxRows: 6}"
- type="textarea"
- v-model="problemForm.inspPblmDesc"
- clearable
- ></el-input>
- </el-form-item>
- <el-form-item :label="weigui.pblmPoint" v-show="weigui.pblmRelDics.length">
- <el-select v-model="problemForm.weigui" @change="selectWeiguiChange" clearable>
- <el-option :label="attach.pblmAttachName" :value="attach.pblmAttach" v-for="(attach,index) in weigui.pblmRelDics" :key="index"></el-option>
- </el-select>
- <!-- <div style="width: 380px;float:right">
- <span>问题序号</span>
- <el-input type="text" style="width: 100px;" @focus="showPblmList(weigui,problemForm.weigui,'违规')" v-model="weigui.pblmSn"></el-input><br>
- <my-cascader :pblmDescList="pblmDescList" v-if="chooseWeiguiProblem" @sendPblmsTypeIdWeigui="sendPblmsTypeIdWeigui"></my-cascader>
- </div> -->
- </el-form-item>
- <el-form-item label="问题序号" v-show="weigui.pblmRelDics.length">
- <el-input type="text" style="width: 100px;" @focus="showPblmList(weigui,problemForm.weigui,'违规')" clearable v-model="weigui1"></el-input><br>
- <my-cascader :pblmDescList="pblmDescList" v-if="chooseWeiguiProblem" @sendPblmsTypeIdWeigui="sendPblmsTypeIdWeigui"></my-cascader>
- </el-form-item>
- <!-- -->
- <el-form-item :label="hetong.pblmPoint" v-show="hetong.pblmRelDics.length">
- <el-select v-model="problemForm.hetong" @change="selectHetongChange" clearable>
- <el-option :label="attach.pblmAttachName" :value="attach.pblmAttach" v-for="(attach,index) in hetong.pblmRelDics" :key="index"></el-option>
- </el-select>
- <!-- <div style="width: 380px;float:right">
- <span>问题序号</span>
- <el-input type="text" style="width: 100px;" @focus="showPblmList(hetong,problemForm.hetong,'合同')" readonly v-model="hetong.pblmSn"></el-input><br>
- <my-cascader-hetong :pblmDescList="pblmDescListHetong" v-if="chooseHeTongProblem" @sendPblmsTypeIdHetong="sendPblmsTypeIdHetong"></my-cascader-hetong>
- </div> -->
- </el-form-item>
- <el-form-item label="问题序号" v-show="hetong.pblmRelDics.length">
- <el-input type="text" style="width: 100px;" @focus="showPblmList(hetong,problemForm.hetong,'合同')" clearable v-model="hetong1"></el-input><br>
- <my-cascader-hetong :pblmDescList="pblmDescListHetong" v-if="chooseHeTongProblem" @sendPblmsTypeIdHetong="sendPblmsTypeIdHetong"></my-cascader-hetong>
- </el-form-item>
- <!-- -->
- <!-- -->
- <el-form-item :label="gongdi.pblmPoint" v-show="gongdi.pblmRelDics.length">
- <el-select v-model="problemForm.gongdi" @change="selectGongdiChange" clearable>
- <el-option :label="attach.pblmAttachName" :value="attach.pblmAttach" v-for="(attach,index) in gongdi.pblmRelDics" :key="index"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="问题序号" v-show="gongdi.pblmRelDics.length">
- <el-input type="text" style="width: 100px;" @focus="showPblmList(gongdi,problemForm.gongdi,'工地')" clearable v-model="gongdi1"></el-input><br>
- <my-cascader-gongdi :pblmDescList="pblmDescListGongdi" v-if="chooseGongdiProblem" @sendPblmsTypeIdGongdi="sendPblmsTypeIdGongdi"></my-cascader-gongdi>
- </el-form-item>
- <!-- -->
- <el-form-item :label="quanlity.pblmPoint" v-show="quanlity.pblmRelDics.length">
- <el-select v-model="problemForm.quanlity" @change="selectQuanlityChange" clearable>
- <el-option :label="attach.pblmAttachName" :value="attach.pblmAttach" v-for="(attach,index) in quanlity.pblmRelDics" :key="index"></el-option>
- </el-select>
- <!-- <div style="width: 380px;float:right">
- <span>问题序号</span>
- <el-input type="text" style="width: 100px;" @focus="showPblmList(quanlity,problemForm.quanlity,'质量')" readonly v-model="quanlity.pblmSn"></el-input><br>
- <my-cascader :pblmDescList="pblmDescList" v-if="chooseQuanlityProblem" @sendPblmsTypeIdQuanlity="sendPblmsTypeIdQuanlity"></my-cascader>
- </div> -->
- </el-form-item>
- <el-form-item label="问题序号" v-show="quanlity.pblmRelDics.length">
- <el-input type="text" style="width: 100px;" @focus="showPblmList(quanlity,problemForm.quanlity,'质量')" clearable v-model="quanlity1"></el-input><br>
- <my-cascader :pblmDescList="pblmDescList" v-if="chooseQuanlityProblem" @sendPblmsTypeIdQuanlity="sendPblmsTypeIdQuanlity"></my-cascader>
- </el-form-item>
- <!-- -->
- <el-form-item :label="gongcheng.pblmPoint" v-show="gongcheng.pblmRelDics.length">
- <el-select v-model="problemForm.gongcheng" @change="selectGongchengChange" clearable>
- <el-option :label="attach.pblmAttachName" :value="attach.pblmAttach" v-for="(attach,index) in gongcheng.pblmRelDics" :key="index"></el-option>
- </el-select>
- <!-- <div style="width: 380px;float:right">
- <span>问题序号</span>
- <el-input type="text" style="width: 100px;" @focus="showPblmList(gongcheng,problemForm.gongcheng,'工程')" readonly v-model="gongcheng.pblmSn"></el-input><br>
- <my-cascader :pblmDescList="pblmDescList" v-if="chooseGongchengProblem" @sendPblmsTypeIdGongcheng="sendPblmsTypeIdGongcheng"></my-cascader>
- </div> -->
- </el-form-item>
- <el-form-item label="问题序号" v-show="gongcheng.pblmRelDics.length">
- <el-input type="text" style="width: 100px;" @focus="showPblmList(gongcheng,problemForm.gongcheng,'工程')" clearable v-model="gongcheng1"></el-input><br>
- <my-cascader :pblmDescList="pblmDescList" v-if="chooseGongchengProblem" @sendPblmsTypeIdGongcheng="sendPblmsTypeIdGongcheng"></my-cascader>
- </el-form-item>
- <el-form-item :label="isSd?'问题定性':'严重程度:'">
- <el-select
- v-model="cater"
- disabled
- clearable
- placeholder="请选择">
- <el-option
- v-for="item in supervisionState"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item :label="isSd?'是否列为典型问题':'是否为典型问题:'">
- <el-select v-model="problemForm.ifCasePblm" clearable placeholder="请选择">
- <el-option
- v-for="item in supervision"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- ></el-option>
- </el-select>
- </el-form-item>
- </el-form>
- </div>
- <div
- style="width: 49%;float: left;border: 1px solid rgb(213, 213, 255);margin-right: 5px;overflow-y: auto;max-height: 58vh;">
- <p style="font-weight:bolder;background-color:#d5d5ff;padding:3px;">多媒体信息</p>
- <el-tabs style="margin:0px 5px">
- <el-tab-pane :label="picturetabName">
- <el-row style="text-align:right;">
- <el-button
- :v-if="!addPicPanel?addPicPanel:addPicPanel"
- size="mini"
- type="text"
- :icon="!addPicPanel?'el-icon-circle-plus-outline':'el-icon-circle-close-outline'"
- @click="addPic"
- >{{!addPicPanel?"添加":"取消"}}</el-button>
- </el-row>
- <el-row v-show="addPicPanel">
- <upload
- ref="uploadFile"
- :url="`/pdcApi/file/insert?bizId=`"
- @uploadOver="removeNewSupervision"
- ></upload>
- </el-row>
- <el-row>
- <div style="overflow-y:auto;overflow-x:hidden;max-height:30vh;padding:10px;">
- <div class="upload-container" id="imgView1">
- <div
- v-for="(item, index) in pictureArray"
- :key="index"
- class="image-preview image-app-preview"
- >
- <div class="image-preview-wrapper">
- <img :src="`${hostUrl}/${item.filePath}`">
- <div class="image-preview-action">
- <i @click="removeFile(item.id)" class="el-icon-delete"></i>
- </div>
- </div>
- </div>
- </div>
- </div>
- </el-row>
- </el-tab-pane>
- <el-tab-pane :label="audiotabName">
- <el-table border :data="audioArray" style="width: 100%;margin: 0 auto;">
- <el-table-column header-align="center" align="center" label="音频">
- <template slot-scope="scope">
- <elaudio
- style="margin-left:15%;width:100px;height:30px;"
- :theUrl="`${hostUrl}/${scope.row.filePath}`"
- ></elaudio>
- </template>
- </el-table-column>
- <el-table-column header-align="center" align="center" label="操作">
- <template slot-scope="scope">
- <el-button
- size="mini"
- @click="removeFile(scope.row.id,scope.$index)"
- type="danger"
- >删除</el-button>
- </template>
- </el-table-column>
- </el-table>
- </el-tab-pane>
- <el-tab-pane :label="videotabName">
- <el-table border :data="videoArray" style="width: 100%;margin: 0 auto;">
- <el-table-column header-align="center" align="center" label="视频">
- <template slot-scope="scope">
- <video-player
- class="vjs-custom-skin"
- ref="videoPlayer"
- :options="scope.row"
- :playsinline="true"
- ></video-player>
- </template>
- </el-table-column>
- <el-table-column header-align="center" align="center" label="操作">
- <template slot-scope="scope">
- <el-button
- size="mini"
- @click="removeFile(scope.row.id,scope.$index)"
- type="danger"
- >删除</el-button>
- </template>
- </el-table-column>
- </el-table>
- </el-tab-pane>
- <el-tab-pane :label="filetabName">
- <el-table border :data="fileArray" style="width: 100%;margin: 0 auto;">
- <el-table-column header-align="center" align="center" label="文档">
- <template slot-scope="scope">
- <p>
- <a :href="`${hostUrl}/${scope.row.filePath}`" target="_blank" rel="noopener noreferrer">
- {{scope.row.fileName}}
- </a>
- </p>
- </template>
- </el-table-column>
- <el-table-column header-align="center" align="center" label="操作">
- <template slot-scope="scope">
- <el-button
- size="mini"
- @click="removeFile(scope.row.id,scope.$index)"
- type="danger"
- >删除</el-button>
- </template>
- </el-table-column>
- </el-table>
- </el-tab-pane>
- <el-tab-pane label="问题确认单">
- <pblmConfirmShett :openType="true" :currentObjectId="problemForm.objId" :key="problemForm.objId"></pblmConfirmShett>
- </el-tab-pane>
- </el-tabs>
- </div>
- </div>
- <span slot="footer">
- <el-button type="primary" @click="onSubmit">保存</el-button>
- <el-button @click="closeModal">取消</el-button>
- </span>
- </el-dialog>
- </template>
- <script>
- import {showDetailsXq,updatelist,deleteFileById} from "../../../api/duChaAPI.js";
- import {formatDateTime2} from '../../../utils/gw_date.js'
- import request from '../../../utils/gw_ajax_request.js'
- import myCascader from './problemList.vue'
- import myCascaderHetong from './problemList.vue'
- import myCascaderGongdi from './problemList.vue'
- import {hostUrl} from "@util/global_variable.js";
- import Viewer from 'viewerjs';
- import 'viewerjs/dist/viewer.css';
- export default {
- props: ['projectType','problemId','villType','unitProblemInfo','unitLevel'],
- data(){
- return{
- maxNumber: {
- strictA: '',
- strictB: '',
- strictC: '',
- strictD: '',
- strictE: ''
- },
- cater: '',
- gongcheng1: '',
- hetong1: '',
- gogndi1: '',
- weigui1: '',
- quanlity1: '',
- changeSupervisionVisible: true,
- changeSupervisionLoading: false,
- problemForm: {},
- rules1: {
- inspPblmName: [
- {
- required: true,
- message: "请输入问题名称",
- trigger: "blur"
- },
- {
- min: 1,
- max: 999,
- message: "不超过100字符",
- trigger: "blur"
- }
- ],
- inspPblmDesc: [
- {
- required: true,
- message: "请输入问题描述",
- trigger: "blur"
- }
- ],
- recPers: [
- {
- required: true,
- message: "请输入记录人",
- trigger: "blur"
- },
- {
- min: 1,
- max: 999,
- message: "不超过100字符",
- trigger: "blur"
- }
- ],
- objType: [
- {
- required: true,
- message: "请选择督查对象类型",
- trigger: "change"
- }
- ],
- objId: [
- {
- required: true,
- message: "请选择督查对象类型",
- trigger: "change"
- }
- ],
- inspPblmType: [
- {
- required: true,
- message: "请选择督查问题类型",
- trigger: "change"
- }
- ],
- dataStat: [
- {
- required: true,
- message: "请选择数据状态",
- trigger: "change"
- }
- ],
- collTime: [
- {
- required: true,
- message: "请选择采集时间",
- trigger: "change"
- }
- ],
- ifCasePblm: [
- {
- required: true,
- message: "请选择是否典型",
- trigger: "change"
- }
- ],
- pblmStat: [
- {
- required: true,
- message: "请选择问题类型",
- trigger: "change"
- }
- ],
- inspPblmCate: [
- {
- required: true,
- message: "请选择问题程度",
- trigger: "change"
- },
- {
- trigger: "change"
- }
- ]
- },
- supervisionState: [
- {
- value: "0",
- label: "一般"
- },
- {
- value: "1",
- label: "较重"
- },
- {
- value: "2",
- label: "严重"
- },
- {
- value: "3",
- label: "特别严重"
- }
- ],
- supervision: [
- {
- value: "1",
- label: "是"
- },
- {
- value: "0",
- label: "否"
- }
- ],
- addPicPanel: false,
- gwComFiles: [],
- picturetabName: "",
- audiotabName: "",
- videotabName: "",
- filetabName: "",
- pictureArray: [],
- audioArray: [],
- videoArray: [],
- fileArray: [],
- updateIdXiuGai: "",
- pblmId: "",
- weigui: {
- pblmRelDics: [],
- pblmSn: ''
- },
- gongdi: {
- pblmRelDics: [],
- pblmSn: ''
- },
- hetong: {
- pblmRelDics: [],
- pblmSn: ''
- },
- quanlity: {
- pblmRelDics: [],
- pblmSn: ''
- },
- gongcheng: {
- pblmRelDics: [],
- pblmSn: ''
- },
- problemType: [
- {name: '违规行为',value:'1'},
- {name: '质量缺陷',value:'2'},
- {name: '合同问题',value:'3'}
- ],
- problemStatus: [
- {name: '已复查',value:'2'},
- {name: '未复查',value:'1'},
- {name: '新问题',value:'0'}
- ],
- rectifyStatus: [
- {name: '未整改',value:'0'},
- {name: '整改中',value:'1'},
- {name: '已整改',value:'2'}
- ],
- severity:[
- {name: '一般',value:'0'},
- {name: '较重',value:'1'},
- {name: '严重',value:'2'},
- {name: '非常严重',value:'3'}
- ],
- problemForm:{
- objId: '',
- objType: '',
- problemType: '',
- inspPblmDesc: '',
- pblmsTypeId: '',
- qualityTypeId: '',
- pblmsId: '',
- defectTypeId: '',
- ifCasePblm: '',
- inspPblmCate: '',
- weigui: '',
- gongdi: '',
- hetong: '',
- quanlity: '',
- gongcheng: '',
- gwComFiles: []
- },
- rectifyForm: {
- rectConc: '',
- rectMeas: '',
- collTime: '',
- gwComFiles: [{
- id: "",
- filePath: "",
- bizId: ""
- }]
- },
- weigui: {
- pblmRelDics: [],
- pblmSn: ''
- },
- gongdi: {
- pblmRelDics: [],
- pblmSn: ''
- },
- hetong: {
- pblmRelDics: [],
- pblmSn: ''
- },
- quanlity: {
- pblmRelDics: [],
- pblmSn: ''
- },
- gongcheng: {
- pblmRelDics: [],
- pblmSn: ''
- },
- pblmPointNum: '',
- pblmDescList: '',
- pblmDescListHetong: '',
- pblmDescListGongdi: '',
- pblmAttach: [],
- pblmsTypeId: '',
- dialogType: '修改',
- dialogVisible: true,
- recheck_dialogVisible: false,
- chooseWeiguiProblem: false,
- chooseGongdiProblem: false,
- chooseHeTongProblem: false,
- chooseQuanlityProblem: false,
- chooseGongchengProblem: false,
- checked: false,
- supervisionDetailsVisible:false,
- reviConc: '',
- findTime: [],
- rectifyRow: {},
- isRectify: false,
- rectifyId: '',
- }
- },
- components:{
- upload: resolve => {
- require(["../../../widgets/uploadFile.vue"], resolve);
- },
- pblmConfirmShett: resolve => {
- require(["../../duChaDuiXiang/pblmConfirmShett"], resolve);
- },
- myCascader: myCascader,
- myCascaderGongdi: myCascaderGongdi,
- myCascaderHetong: myCascaderHetong,
- },
- computed:{
- hostUrl(){
- return hostUrl
- },
- persId() {
- return localStorage.getItem("userid") ? localStorage.getItem("userid") : "1098101939614724096";
- },
- formatDateTime(){
- return formatDateTime2
- },
- isSd(){
- if(localStorage.getItem('currentRlcode').substring(0,2)=='37'){
- return true;
- }else{
- return false;
- }
- },
- },
- mounted(){
- this.getSingleProData()
- this.listPblmType()
- },
- methods:{
- removeNewSupervision(arg) {
- if (arg) {
- var args = this.gwComFiles.concat(arg);
- }
- this.gwComFiles = [];
- this.$emit('closeEditDialog')
- },
- changeSupervisionVisiblefalse() {
- this.$emit('closeEditDialog')
- this.$refs.uploadFile.init();
- this.addPicPanel = false;
- },
- addPic() {
- this.addPicPanel = !this.addPicPanel;
- },
- // 删除图片文件
- removeFile(id, index) {
- // this.updateIdXiuGai = this.updateIdXiuGai;
- var _self = this;
- this.$confirm("此操作将永久删除该文件, 是否继续?", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "返回",
- type: "warning"
- }).then(
- res => {
- if (res === "confirm") {
- deleteFileById(id, this.persId).then(res => {
- if (res.success) {
- this.problemForm.gwComFiles.forEach(item => {
- if (
- item.fileExt == "mp3" ||
- item.fileExt == "MP3" ||
- item.fileExt == "m4a"
- ) {
- this.audioArray.splice(index, 1);
- } else if (
- item.fileExt == "jpg" ||
- item.fileExt == "JPG" ||
- item.fileExt == "png" ||
- item.fileExt == "PNG" ||
- item.fileExt == "JPEG" ||
- item.fileExt == "jpeg"
- ) {
- this.pictureArray.splice(index, 1);
- } else if (item.fileExt == "mp4" || item.fileExt == "MP4") {
- this.videoArray.splice(index, 1);
- }
- });
- _self.getSingleProData();
- } else {
- this.failInfo();
- }
- });
- }
- },
- res => {
- console.log("返回");
- }
- )
- },
- // 操作成功反馈
- successInfo() {
- this.$message({
- type: "success",
- message: "操作成功!"
- });
- },
- // 操作失败反馈
- failInfo(val) {
- this.$message.error(val);
- },
- // 文件上传
- submitUpload() {
- this.$refs.upload.submit();
- },
- closeModal(){
- this.maxNumber = {
- strictA: '',
- strictB: '',
- strictC: '',
- strictD: '',
- strictE: ''
- };
- this.cater = "";
- this.$emit('closeEditDialog')
- },
- listPblmType(){
- let paramObj = {}
- if(this.unitProblemInfo.nature){
- paramObj = {
- orgType: this.unitProblemInfo.nature,
- proType: '1'
- }
- }else{
- paramObj = {
- reviOrg: this.unitLevel,
- proType: '2'
- }
- }
- request.post(`/obj/key/pblm/listPblmType`, paramObj).then(res => {
- if (res.success) {
- this.problemType = res.data;
- // this.problemForm.problemType = this.problemType[0].pblmType
- }
- });
- },
- // 标准 附件 序号
- convertGroup(){
- let paramObj = {}
- if(this.unitProblemInfo.nature){
- paramObj = {
- orgType: this.unitProblemInfo.nature,
- proType: '1',
- pblmType: this.problemForm.problemType == '0' ? '违规行为' : this.problemForm.problemType == '1' ? '质量缺陷' : this.problemForm.problemType == '2' ? '合同问题' : this.problemForm.problemType == '3' ? '缺陷问题' : this.problemForm.problemType
- }
- }else{
- paramObj = {
- reviOrg: this.unitLevel,
- proType: '2',
- pblmType: this.problemForm.problemType
- }
- }
- this.hetong.pblmRelDics = []
- this.weigui.pblmRelDics = []
- this.gongdi.pblmRelDics = []
- this.quanlity.pblmRelDics = []
- this.gongcheng.pblmRelDics = []
- request.post(`/obj/key/pblm/convertGroup`, paramObj).then(res => {
- if (res.success) {
- this.pblmPointNum = res.data;
- this.pblmPointNum.forEach(ele=>{
- ele.pblmAttach = ele.pblmAttach.split(',')
- // ele.pblmSn = ele.pblmSn.split(',')
- if(ele.pblmPoint.indexOf('合同') > -1){
- this.hetong = ele
- }
- if(ele.pblmPoint.indexOf('违规') > -1){
- this.weigui = ele
- }
- if(ele.pblmPoint.indexOf('工地') > -1){
- this.gongdi = ele
- }
- if(ele.pblmPoint.indexOf('质量') > -1){
- this.quanlity = ele
- }
- if(ele.pblmPoint.indexOf('工程') > -1){
- this.gongcheng = ele
- }
- })
- if(this.weigui.pblmRelDics.length){
- this.weigui.pblmRelDics.forEach(ele=>{
- if(ele.pblmAttach == this.problemForm.weigui){
- this.weigui.pblmSn = ele.pblmSn
- }
- })
- }
- if(this.gongdi.pblmRelDics.length){
- this.gongdi.pblmRelDics.forEach(ele=>{
- if(ele.pblmAttach == this.problemForm.gongdi){
- this.gongdi.pblmSn = ele.pblmSn
- }
- })
- }
- if(this.hetong.pblmRelDics.length){
- this.hetong.pblmRelDics.forEach(ele=>{
- if(ele.pblmAttach == this.problemForm.hetong){
- this.hetong.pblmSn = ele.pblmSn
- }
- })
- }
- if(this.quanlity.pblmRelDics.length){
- this.quanlity.pblmRelDics.forEach(ele=>{
- if(ele.pblmAttach == this.problemForm.quanlity){
- this.quanlity.pblmSn = ele.pblmSn
- }
- })
- }
- if(this.gongcheng.pblmRelDics.length){
- this.gongcheng.pblmRelDics.forEach(ele=>{
- if(ele.pblmAttach == this.problemForm.gongcheng){
- this.gongcheng.pblmSn = ele.pblmSn
- }
- })
- }
- }
- });
- },
- //具体问题描述列表
- showPblmList(obj,attach,type){
- type == '违规' ? this.chooseWeiguiProblem = true : type == '工地' ? this.chooseGongdiProblem = true : type == '合同' ? this.chooseHeTongProblem = true : type == '工程' ? this.chooseGongchengProblem = true : this.chooseQuanlityProblem = true
- let paramObj = {}
- if(this.unitProblemInfo.nature){
- paramObj = {
- pblmType: obj.pblmPoint,
- // sheetName: obj.reviOrg,
- sheetName: obj.pblmPoint,
- attachType: obj.proType,
- attach: attach,
- sn: obj.pblmSn
- }
- }else{
- paramObj = {
- pblmType: obj.pblmPoint,
- sheetName: obj.pblmPoint,
- attachType: obj.proType,
- attach: attach,
- sn: obj.pblmSn
- }
- }
- request.post(`/obj/key/pblm/pblmsList`, paramObj).then(res => {
- if (res.success) {
- if(type == '合同'){
- this.pblmDescListHetong = res.data;
- }else if(type == '工地'){
- this.pblmDescListGongdi = res.data;
- }else{
- this.pblmDescList = res.data;
- }
- }
- });
- },
- sendPblmsTypeIdWeigui(val){
- this.problemForm.pblmsTypeId = val.id
- this.problemForm.inspPblmCate = val.inspPblmCate
- this.maxNumber['strictA'] = val.inspPblmCate
- },
- sendPblmsTypeIdGongdi(val){
- console.log(val,'111')
- this.problemForm.gongdiBzId = val.id
- this.problemForm.inspPblmCate = val.inspPblmCate
- this.maxNumber['strictB'] = val.inspPblmCate
- },
- sendPblmsTypeIdHetong(val){
- this.problemForm.pblmsId = val.id
- this.problemForm.inspPblmCate = val.inspPblmCate
- this.maxNumber['strictC'] = val.inspPblmCate
- },
- sendPblmsTypeIdQuanlity(val){
- this.problemForm.qualityTypeId = val.id
- this.problemForm.inspPblmCate = val.inspPblmCate
- this.maxNumber['strictD'] = val.inspPblmCate
- },
- sendPblmsTypeIdGongcheng(val){
- this.problemForm.defectTypeId = val.id
- this.problemForm.inspPblmCate = val.inspPblmCate
- this.maxNumber['strictE'] = val.inspPblmCate
- },
- //获取单条数据
- getSingleProData(){
- this.dialogType = '修改'
- this.pictureArray = [];
- this.audioArray = [];
- this.videoArray = [];
- this.fileArray = [];
- var _this = this;
- request.get(`/obj/key/pblm/getPblm/${this.problemId}/${this.projectType}`).then(res => {
- if(res.success){
- this.problemForm = res.data
- this.problemForm.problemType = res.data.inspPblmName
- this.checked = res.data.ifCasePblm == '1' ? true : false
- this.problemForm.hetong = res.data.attachHetong
- this.problemForm.weigui = res.data.attachWg
- if(res.data.attachGongdiSn){
- this.problemForm.gongdi = '1-1'
- }else{
- this.problemForm.gongdi =''
- }
- this.problemForm.quanlity = res.data.attachQua
- this.problemForm.gongcheng = res.data.attachDef
- this.cater = this.problemForm['inspPblmCate']
- this.gongdi1 = res.data.attachGongdiSn
- this.weigui1 = res.data.attachWgSn
- this.hetong1 = res.data.attachHetongSn
- this.quanlity1 = res.data.attachQuaSn
- this.gongcheng1 = res.data.attachDefSn
- this.problemForm = res.data;
- res.data.gwComFiles.forEach(item => {
- if (
- item.fileExt == "mp3" ||
- item.fileExt == "MP3" ||
- item.fileExt == "m4a"
- ) {
- this.audioArray.push(item);
- } else if (
- item.fileExt == "jpg" ||
- item.fileExt == "JPG" ||
- item.fileExt == "png" ||
- item.fileExt == "PNG" ||
- item.fileExt == "JPEG" ||
- item.fileExt == "jpeg"
- ) {
- this.pictureArray.push(item);
- } else if (item.fileExt == "mp4" || item.fileExt == "MP4") {
- this.videoArray.push({
- id:item.id,
- width: "130",
- height: "130",
- autoplay: false,
- muted: true,
- language: "en",
- playbackRates: [0.7, 1.0, 1.5, 2.0],
- sources: [
- {
- type: "video/mp4",
- src: this.hostUrl + item.filePath
- }
- ]
- });
- } else {
- this.fileArray.push(item);
- }
- });
- _this.$nextTick(function(){
- var ViewerDom = document.getElementById('imgView1');
- var viewer = new Viewer(ViewerDom, {})
- });
- this.picturetabName = "图片资料(" + this.pictureArray.length + ")";
- this.audiotabName = "音频资料(" + this.audioArray.length + ")";
- this.videotabName = "视频资料(" + this.videoArray.length + ")";
- this.filetabName = "其它资料(" + this.fileArray.length + ")";
- }
- })
- this.chooseQuanlityProblem = false
- this.chooseHeTongProblem = false
- this.chooseWeiguiProblem = false
- this.chooseGongdiProblem = false
- this.chooseGongchengProblem = false
- },
- onSubmit(){
- if(!this.problemForm.inspPblmDesc){
- this.$message.warning("请输入问题描述")
- return;
- }
- this.isRectify = false
- this.problemForm.ifCasePblm = this.checked ? '1' : '0'
- this.problemForm.inspPblmName = this.problemForm.problemType
- this.problemForm.recPers = this.persId
- this.problemForm.inspPblmCate = this.cater;
- if((this.gongdi.pblmRelDics.length && !this.problemForm.gongdiBzId) && (this.weigui.pblmRelDics.length && !this.problemForm.pblmsTypeId)){
- this.$message.warning('违规附件对应问题及工地标准化附件对应问题必须选一个')
- return
- }else if(!this.gongdi.pblmRelDics.length){
- this.problemForm.gongdiBzId = ''
- }else if(!this.weigui.pblmRelDics.length){
- this.problemForm.pblmsTypeId = ''
- }
- if((this.weigui.pblmRelDics.length && !this.problemForm.pblmsTypeId) && !this.gongdi.pblmRelDics.length){
- this.$message.warning('请选择违规附件对应问题')
- return
- }else if(!this.weigui.pblmRelDics.length){
- this.problemForm.pblmsTypeId = ''
- }
- if(this.hetong.pblmRelDics.length && !this.problemForm.pblmsId && !this.weigui.pblmRelDics.length){
- this.$message.warning('请选择合同管理附件对应问题')
- return
- }else if(!this.hetong.pblmRelDics.length){
- this.problemForm.pblmsId = ''
- }
- if(this.quanlity.pblmRelDics.length && !this.problemForm.qualityTypeId){
- this.$message.warning('请选择质量缺陷附件对应问题')
- return
- }else if(!this.quanlity.pblmRelDics.length){
- this.problemForm.qualityTypeId = ''
- }
- if(this.gongcheng.pblmRelDics.length && !this.problemForm.defectTypeId){
- this.$message.warning('请选择工程缺陷附件对应问题')
- return
- }else if(!this.gongcheng.pblmRelDics.length){
- this.problemForm.defectTypeId = ''
- }
- this.problemForm.problemType = this.problemForm.problemType == '违规行为' ? '0' : this.problemForm.problemType == '质量缺陷' ? '1' : this.problemForm.problemType == '合同问题' ? '2' : '3'
- request.post('/dc/insp/pblm/update',this.problemForm).then(res=>{
- if (res.success) {
- this.gwComFiles = [];
- this.pblmStat = res.data.pblmStat;
- if (this.$refs.uploadFile.submitUpload(res.data.pblmId)) {
- this.removeNewSupervision();
- }
- this.$message.success('修改成功')
- }
- })
- },
- // 复查
- toRecheckProblem(row){
- this.dialogType = row.reviConc == '1' ? '添加' : row.reviConc == '2' ? '修改' : '添加'
- this.rectifyForm.rectConc = row.rectConc
- this.rectifyForm.rectMeas = row.rectMeas
- Object.assign(this.rectifyRow,row)
- if(this.dialogType == '添加'){
- this.rectifyForm.collTime = ''
- }else{
- this.rectifyForm.collTime = this.formatDateTime(row.collTime)
- }
- this.recheck_dialogVisible = true
- },
- rectifySubmit(){
- this.isRectify = true
- this.rectifyForm['recPers'] = this.persId
- if(this.dialogType == '添加'){
- this.rectifyForm['pblmId'] = this.rectifyRow.pblmId
- this.rectifyForm['orgGuid'] = this.rectifyRow.regid
- request.post('/dc/insp/rectFdbk',this.rectifyForm).then(res=>{
- if (res.success) {
- // this.pblmId = res.data.pblmId;
- this.pblmId = this.rectifyRow.pblmId
- this.gwComFiles = [];
- this.pblmStat = res.data.pblmStat;
- this.recheck_dialogVisible = false
- this.searchList()
- if (this.$refs.uploadFile.submitUpload(res.data.guid)) {
- this.removeNewSupervision();
- }
- }
- })
- }else{
- // this.rectifyForm['guid'] = this.rectifyRow.guid
- this.rectifyForm['pblmId'] = this.rectifyRow.pblmId
- this.rectifyForm['orgGuid'] = this.rectifyRow.regid
- this.rectifyForm['id'] = this.rectifyRow.guid
- delete this.rectifyForm.collTime
- request.post('/dc/insp/rectFdbk',this.rectifyForm).then(res=>{
- if (res.success) {
- this.pblmId = res.data.guid;
- // this.pblmId = this.rectifyRow.pblmId
- this.gwComFiles = [];
- this.pblmStat = res.data.pblmStat;
- this.recheck_dialogVisible = false
- this.searchList()
- if (this.$refs.uploadFile.submitUpload(res.data.guid)) {
- this.removeNewSupervision();
- }
- }
- })
- }
- },
- selectHetongChange(val){
- this.$forceUpdate()
- let _this = this
- this.chooseHeTongProblem = false
- this.hetong.pblmRelDics.forEach(ele=>{
- if(ele.pblmAttach == val){
- _this.hetong.pblmSn = ele.pblmSn
- _this.hetong1 = ele.pblmSn
- }
- })
- },
- selectWeiguiChange(val){
- this.$forceUpdate()
- let _this = this
- this.chooseWeiguiProblem = false
- this.weigui.pblmRelDics.forEach(ele=>{
- if(ele.pblmAttach == val){
- _this.weigui.pblmSn = ele.pblmSn
- _this.weigui1 = ele.pblmSn
- }
- })
- },
- selectGongdiChange(val){
- this.$forceUpdate()
- let _this = this
- this.chooseGongdiProblem = false
- this.gongdi.pblmRelDics.forEach(ele=>{
- if(ele.pblmAttach == val){
- _this.gongdi.pblmSn = ele.pblmSn
- _this.gongdi1 = ele.pblmSn
- }
- })
- },
- selectQuanlityChange(val){
- this.$forceUpdate()
- let _this = this
- this.chooseQuanlityProblem = false
- this.quanlity.pblmRelDics.forEach(ele=>{
- if(ele.pblmAttach == val){
- _this.quanlity.pblmSn = ele.pblmSn
- _this.quanlity1 = ele.pblmSn
- }
- })
- },
- selectGongchengChange(val){
- this.$forceUpdate()
- let _this = this
- this.chooseGongchengProblem = false
- this.gongcheng.pblmRelDics.forEach(ele=>{
- if(ele.pblmAttach == val){
- _this.gongcheng.pblmSn = ele.pblmSn
- _this.gongcheng1 = ele.pblmSn
- }
- })
- },
- handleDetailClick(tab, event) {
- console.log(tab, event);
- },
- problemTypeChange(val){
- // alert(val)
- this.weigui.pblmSn = ''
- this.gongdi.pblmSn = ''
- this.hetong.pblmSn = ''
- this.quanlity.pblmSn = ''
- this.gongcheng.pblmSn = ''
- this.problemForm.weigui = ''
- this.problemForm.gongdi = ''
- this.problemForm.hetong = ''
- this.problemForm.quanlity = ''
- this.problemForm.gongcheng = ''
- this.chooseHeTongProblem = false
- this.chooseWeiguiProblem = false
- this.chooseGongdiProblem = false
- this.chooseQuanlityProblem = false
- this.chooseGongchengProblem = false
- },
- },
- watch:{
- // 'cater':{
- // deep: true,
- // handler(newVal,oldVal){
- // if(oldVal == '0'){
- // this.cater = '一般';
- // }else if(oldVal == '1'){
- // this.cater = '较重'
- // }else if(oldVal == '2'){
- // this.cater = '严重'
- // }else if(oldVal == '3'){
- // this.cater = '非常严重'
- // }else{
- // this.cater = this.cater
- // }
- // }
- // },
- 'maxNumber':{
- deep: true,
- handler(newVal,oldVal){
- let arr = [];
- if(this.maxNumber['strictA']){
- arr.push(parseInt(this.maxNumber['strictA']))
- }
- if(this.maxNumber['strictB']){
- arr.push(parseInt(this.maxNumber['strictB']))
- }
- if(this.maxNumber['strictC']){
- arr.push(parseInt(this.maxNumber['strictC']))
- }
- if(this.maxNumber['strictD']){
- arr.push(parseInt(this.maxNumber['strictD']))
- }
- if(this.maxNumber['strictE']){
- arr.push(parseInt(this.maxNumber['strictE']))
- }
- let value = Math.max(...arr);
- this.cater = value==null?"":value.toString();
- // if(value == '0'){
- // this.cater = '一般';
- // }else if(value == '1'){
- // this.cater = '较重'
- // }else if(value == '2'){
- // this.cater = '严重'
- // }else if(value == '3'){
- // this.cater = '非常严重'
- // }else{
- // this.cater = ''
- // }
- console.log(this.maxNumber,'12313211')
- }
- },
- 'problemForm.problemType':{
- deep: true,
- handler(newVal,oldVal){
- this.convertGroup()
- }
- },
- }
- }
- </script>
- <style scoped lang="scss">
- .scroll_wrapper{
- overflow: hidden;
- }
- .scroll_wrapper .el-form{
- padding-top: 5px;
- padding-right: 5px;
- }
- .upload-container {
- width: 100%;
- position: relative;
- .image-uploader {
- width: 35%;
- float: left;
- }
- .image-preview {
- width: 200px;
- height: 200px;
- position: relative;
- border: 1px dashed #d9d9d9;
- float: left;
- // margin-left: 50px;
- .image-preview-wrapper {
- position: relative;
- width: 100%;
- height: 100%;
- img {
- width: 100%;
- height: 100%;
- }
- }
- .image-preview-action {
- position: absolute;
- width: 100%;
- height: 30px;
- left: 0;
- bottom: 0;
- color: #fff;
- opacity: 0;
- font-size: 20px;
- background-color: rgba(0, 0, 0, 0.5);
- transition: opacity 0.3s;
- cursor: pointer;
- text-align: center;
- line-height: 30px;
- .el-icon-delete {
- font-size: 25px;
- }
- }
- &:hover {
- .image-preview-action {
- opacity: 1;
- }
- }
- }
- .image-app-preview {
- margin-bottom: 10px;
- width: 40vh;
- height: 180px;
- position: relative;
- border: 1px dashed #d9d9d9;
- float: left;
- // margin-left: 50px;
- .app-fake-conver {
- height: 44px;
- position: absolute;
- width: 100%; // background: rgba(0, 0, 0, .1);
- text-align: center;
- line-height: 64px;
- color: #fff;
- }
- }
- }
- </style>
|