12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436 |
- <!--
- *@description: 工业工程
- *@author: yh Fu
- *@date: 2024-01-02 15:51:03
- *@version: V1.0.5
- -->
- <template>
- <div class="app-container">
- <el-form :model="searchParams" ref="searchParams" size="small" :inline="true" v-show="showSearch"
- label-width="110px">
- <el-form-item label="工程名称" prop="enginName">
- <el-input v-model="searchParams.enginName" placeholder="请输入工程名称" maxlength="20"></el-input>
- </el-form-item>
- <el-form-item label="工程分类" prop="enginType">
- <el-select v-model="searchParams.enginType" placeholder="请选择工程类型" clearable>
- <el-option
- v-for="dict in EngineepipeType"
- :key="dict.dictValue"
- :label="dict.dictLabel"
- :value="dict.dictValue"
- />
- </el-select>
- </el-form-item>
- <el-form-item label="工程类型" prop="enginClassification">
- <el-select v-model="searchParams.enginClassification" placeholder="请选择工程分类" clearable>
- <el-option
- v-for="dict in enginClassificationList"
- :key="dict.dictValue"
- :label="dict.dictLabel"
- :value="dict.dictValue"
- />
- </el-select>
- </el-form-item>
- <el-form-item>
- <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
- </el-form-item>
- </el-form>
- <el-row :gutter="10" class="mb8">
- <el-col :span="1.5">
- <el-button
- type="primary"
- plain
- icon="el-icon-plus"
- size="mini"
- @click="handleAdd"
- v-hasPermi="['zdsz:engineeringgy:add']"
- >新增
- </el-button>
- </el-col>
- <el-col :span="1.5">
- <el-button
- type="success"
- plain
- icon="el-icon-edit"
- size="mini"
- :disabled="single"
- @click="handleUpdate"
- v-hasPermi="['zdsz:engineeringgy:edit']"
- >修改
- </el-button>
- </el-col>
- <el-col :span="1.5">
- <el-button
- type="danger"
- plain
- icon="el-icon-delete"
- size="mini"
- :disabled="multiple"
- @click="handleDelete"
- v-hasPermi="['zdsz:engineeringgy:remove']"
- >删除
- </el-button>
- </el-col>
- <el-col :span="1.5">
- <el-button
- type="warning"
- plain
- icon="el-icon-download"
- size="mini"
- @click="handleExport"
- v-hasPermi="['demo:demo:export']"
- >导出</el-button>
- </el-col>
- <el-col :span="2.5" style="float: right;">
- <span
- style="height: 20px;margin-right: 5px;width: 20px; border-radius: 50%; display: inline-block; background-color: #807e7a;"></span>无数据
- <span
- style="height: 20px;margin-right: 5px;width: 20px; border-radius: 50%; display: inline-block; background-color: #e0c794;"></span>待审核
- <span
- style="height: 20px;margin-right: 5px;width: 20px; border-radius: 50%; display: inline-block; background-color: #30B08F;"></span>通过
- <span
- style="height: 20px;margin-right: 5px;width: 20px; border-radius: 50%; display: inline-block; background-color: #C03639;"></span>不通过
- </el-col>
- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
- </el-row>
- <el-table v-loading="loading" :data="comprehensiveList" @selection-change="handleSelectionChange">
- <el-table-column type="selection" width="55" align="center"/>
- <el-table-column label="工程名称" align="center" prop="enginName"/>
- <el-table-column label="工程类型" align="center" prop="enginType"/>
- <el-table-column label="工程分类" align="center" prop="enginClassification"/>
- <el-table-column label="现场负责人" align="center" prop="sceneHead"/>
- <el-table-column label="设计负责人" align="center" prop="designHead"/>
- <el-table-column label="监理负责人" align="center" prop="supervisionHead"/>
- <el-table-column label="建项时间" align="center" prop="createTime"/>
- <el-table-column label="进场时间" align="center" prop="startTime"/>
- <el-table-column label="竣工时间" align="center" prop="beCompletedTime"/>
- <el-table-column label="用料比" align="center" prop="enginClassification" width="300px">
- <template slot-scope="scope">
- <div>
- <span>PE{实际:{{scope.row.pesj}},预计:{{scope.row.pePreset}},占比:{{scope.row.pePreset == 0||scope.row.pePreset == null ? 100:(scope.row.pesj / scope.row.pePreset * 100).toFixed(1)}}%}</span><br>
- <span>钢材{实际:{{scope.row.gsj}},预计:{{scope.row.gcPreset}},占比:{{scope.row.gcPreset == 0||scope.row.pePreset == null ? 100:(scope.row.gsj / scope.row.gcPreset * 100).toFixed(1)}}%}</span>
- </div>
- </template>
- </el-table-column>
- <el-table-column label="审核状态" align="center" prop="nodeReViewStateList" width="250">
- <template slot-scope="scope">
- <div style="text-align:center">
- <el-popover
- v-for="item in scope.row.nodeReViewStateList"
- placement="top-start"
- trigger="hover"
- :content="item.Type">
- <span slot="reference" v-if="item.state == '-1' && item.content=='无数据'"
- style="height: 20px;margin-right: 5px;width: 20px; border-radius: 50%; display: inline-block; background-color: #807e7a;"></span>
- <span slot="reference" v-else-if="item.state == '0' && item.content=='暂未审核'"
- style="height: 20px;margin-right: 5px;width: 20px; border-radius: 50%; display: inline-block; background-color: #e0c794;"></span>
- <span slot="reference" v-else-if="item.state == '1' "
- style="height: 20px;margin-right: 5px;width: 20px; border-radius: 50%; display: inline-block; background-color: #30B08F;"></span>
- <span slot="reference" v-else
- style="height: 20px;margin-right: 5px;width: 20px; border-radius: 50%; display: inline-block; background-color: #C03639;"></span>
- </el-popover>
- </div>
- </template>
- </el-table-column>
- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
- <template v-slot="scope">
- <el-button
- size="mini"
- type="text"
- icon="el-icon-edit"
- @click="handleUpdate(scope.row)"
- v-hasPermi="['zdsz:engineeringgy:edit']"
- >修改
- </el-button>
- <el-button
- type="text"
- icon="el-icon-edit"
- size="mini"
- v-hasPermi="['zdsz:engineeringgy:edit']"
- @click="updateviewSource(scope.row)"
- >修改施工信息
- </el-button>
- <el-button type="text"
- icon="el-icon-edit"
- size="mini"
- v-hasPermi="['zdsz:engineeringgy:add']"
- @click="addzEngineeringMaterBo(scope.row)"
- >添加用料
- </el-button>
- <el-button
- size="mini"
- type="text"
- icon="el-icon-edit"
- v-hasPermi="['zdsz:engineeringPipeJacking:add']"
- @click="addNewPipe(scope.row)"
- >新增顶管工程
- </el-button>
- <el-button
- size="mini"
- type="text"
- icon="el-icon-circle-check"
- @click="viewSource(scope.row,'check')"
- v-hasPermi="['zdsz:engineeringgy:review']"
- >审核
- </el-button>
- <el-button
- type="text"
- icon="el-icon-edit"
- size="mini"
- v-hasPermi="['zdsz:engineeringgy:query']"
- @click="viewSource(scope.row)"
- >历史施工
- </el-button>
- <el-button
- type="text"
- icon="el-icon-download"
- size="mini"
- @click="downloadZip(scope.row.enginName)"
- >下载图片
- </el-button>
- <el-button
- size="mini"
- type="text"
- icon="el-icon-delete"
- @click="handleDelete(scope.row)"
- v-hasPermi="['zdsz:engineeringgy:remove']"
- >删除
- </el-button>
- </template>
- </el-table-column>
- </el-table>
- <pagination
- v-show="total>0"
- :total="total"
- :page.sync="searchParams.pageNum"
- :limit.sync="searchParams.pageSize"
- @pagination="getList"
- />
- <!-- 顶管工程新增 -->
- <EngineePipe ref="enginPipe"/>
- <!-- 修改工业工程对话框 -->
- <el-dialog :title="title" :visible.sync="open" append-to-body customClass="appendElDialog">
- <el-form ref="form" :model="form" :rules="rules" label-width="110px">
- <el-form-item label="工程名称" prop="enginName" v-hasPermi="['zdsz:engineeringgy:add']">
- <el-input v-model="form.enginName" placeholder="请填写工程名称" maxlength="60"
- :readonly="title == '添加用料' "></el-input>
- </el-form-item>
- <el-form-item label="建筑单位" prop="constructUnit" v-hasPermi="['zdsz:engineeringgy:add']">
- <el-input v-model="form.constructUnit" placeholder="请填写建筑单位" maxlength="50"
- :readonly="title == '添加用料' "></el-input>
- </el-form-item>
- <el-form-item label="项目负责人" prop="projectHead">
- <el-select
- v-model="form.projectHead"
- placeholder="请选择项目负责人"
- clearable
- @change="getSceneHeadList"
- >
- <el-option
- v-for="dict in dict.type.project_head"
- :key="dict.value"
- :label="dict.label"
- :value="dict.value+','+dict.raw.remark"
- />
- </el-select>
- </el-form-item>
- <el-form-item label="现场负责人" prop="sceneHead">
- <el-select
- v-model="form.sceneHead"
- placeholder="请选择现场负责人"
- clearable
- >
- <el-option
- v-for="dict in sceneHead"
- :label="dict"
- :value="dict"
- />
- </el-select>
- </el-form-item>
- <el-form-item label="设计单位" prop="designUnit">
- <el-select
- v-model="form.designUnit"
- placeholder="请选择设计单位"
- clearable
- @change="getDesignUnitList"
- >
- <el-option
- v-for="dict in dict.type.design_unit"
- :key="dict.value"
- :label="dict.label"
- :value="dict.value+','+dict.raw.remark"
- />
- </el-select>
- </el-form-item>
- <el-form-item label="设计负责人" prop="designHead">
- <el-select
- v-model="form.designHead"
- placeholder="请选择设计负责人"
- clearable
- >
- <el-option
- v-for="dict in designHead"
- :label="dict"
- :value="dict"
- />
- </el-select>
- </el-form-item>
- <el-form-item label="设计联系方式" prop="designPhone">
- <el-input v-model="form.designPhone" placeholder="请填写设计联系方式" maxlength="13"
- :readonly="title == '添加用料' "></el-input>
- </el-form-item>
- <el-form-item label="监理单位" prop="supervisionUnit">
- <el-select
- v-model="form.supervisionUnit"
- placeholder="请选择监理单位"
- clearable
- @change="getSupervisionUnitList"
- >
- <el-option
- v-for="dict in dict.type.supervision_unit"
- :key="dict.value"
- :label="dict.label"
- :value="dict.value+','+dict.raw.remark"
- />
- </el-select>
- </el-form-item>
- <el-form-item label="监理负责人" prop="supervisionHead">
- <el-select
- v-model="form.supervisionHead"
- placeholder="请选择监理负责人"
- clearable
- >
- <el-option
- v-for="dict in supervisionHead"
- :label="dict"
- :value="dict"
- />
- </el-select>
- </el-form-item>
- <el-form-item label="监理联系电话" prop="supervisionPhone">
- <el-input v-model="form.supervisionPhone" placeholder="请填写监理联系电话" maxlength="13"
- :readonly="title == '添加用料' "></el-input>
- </el-form-item>
- <el-form-item label="PE管材预设" prop="pePreset">
- <el-input v-model="form.pePreset" placeholder="请填写PE管材预设" maxlength="20" oninput="value=value.match(/\d+(\.\d{0,1})?/) ? value.match(/\d+(\.\d{0,1})?/)[0] : ''"
- :readonly="title == '添加用料' "></el-input>
- </el-form-item>
- <el-form-item label="钢材预设" prop="gcPreset">
- <el-input v-model="form.gcPreset" placeholder="请填写钢材预设" maxlength="13" oninput="value=value.match(/\d+(\.\d{0,1})?/) ? value.match(/\d+(\.\d{0,1})?/)[0] : ''"
- :readonly="title == '添加用料' "></el-input>
- </el-form-item>
- <el-form-item label="工程分类" prop="enginType" v-hasPermi="['zdsz:engineeringgy:add']">
- <el-select v-model="form.enginType" placeholder="请选择工程分类" style="width: 100%"
- :disabled="title == '添加用料' ">
- <el-option
- v-for="e in EngineepipeType"
- :key="e.dictValue"
- :label="e.dictLabel"
- :value="e.dictValue"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="工程类型" prop="enginClassification" v-hasPermi="['zdsz:engineeringgy:add']">
- <el-select v-model="form.enginClassification" placeholder="请选择工程类型" style="width: 100%" @change="clickByType"
- :disabled="title == '添加用料' ">
- <el-option
- v-for="e in enginClassificationList"
- :key="e.dictValue"
- :label="e.dictLabel"
- :value="e.dictValue"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-row :gutter="20">
- <el-col :span="24">
- <el-form-item label="附件" v-if="form.id" style="width: 100%">
- <ObsFileUpload ref="obsFileUpload" :file-size="100"
- :file-type="['dwg','dwt','doc','docx','xls','xlsx','png', 'jpg', 'jpeg','mp4']"
- :limit="9999"
- :value="form.pics"
- :disabled="title == '添加用料' "
- @input="filesUpload"
- ></ObsFileUpload>
- </el-form-item>
- <el-form-item label="附件" v-else style="width: 100%">
- <ObsFileUpload ref="obsFileUpload" :file-size="100"
- :file-type="['dwg','dwt','doc','docx','xls','xlsx','png', 'jpg', 'jpeg','mp4']"
- :limit="9999"
- :disabled="title == '添加用料' "
- :value="form.files"
- @input="filesUpload"
- ></ObsFileUpload>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row v-if="title=='添加用料'">
- <el-col :span="24">
- <el-form-item label="环节">
- <el-checkbox-group v-model="currentCheckList" style="display: flex">
- <el-checkbox
- :label="item.dictValue"
- v-for="item in nodeList"
- :key="item"
- :disabled=enginNodeStatusExecuted(item)
- ></el-checkbox>
- </el-checkbox-group>
- </el-form-item>
- </el-col>
- </el-row>
- <EnginNodeInfo
- v-if="title=='添加用料'"
- v-for="(e,idx) in currentCheckList"
- :key="idx"
- :name="e"
- :ref="'EnginNodeInfo'+idx"
- :flag="flag"
- :types="currentCheckList"
- :currentContain="currentCheckList"
- :enginType="'工业工程'"
- :enginSort="form.enginType"
- />
- <div style="width: 25%; float: right" v-if="title=='添加用料'">
- <el-button :loading="buttonLoading" type="primary" @click="toNodeDetail">提交</el-button>
- </div>
- <div style="width: 25%; float: right" v-else>
- <el-button :loading="buttonLoading" type="primary" @click="submitForm">提交</el-button>
- <el-button @click="cancel">取 消</el-button>
- </div>
- </el-form>
- </el-dialog>
- <!-- 添加工业工程对话框 -->
- <el-dialog :title="title" :visible.sync="openadd" append-to-body customClass="appendElDialog">
- <el-form ref="form" :model="form" :rules="rules" label-width="110px">
- <el-form-item label="工程名称" prop="enginName">
- <el-input v-model="form.enginName" placeholder="请填写工程名称" maxlength="60"
- :readonly="title == '添加用料' "></el-input>
- </el-form-item>
- <el-form-item label="建筑单位" prop="constructUnit">
- <el-input v-model="form.constructUnit" placeholder="请填写建筑单位" maxlength="50"
- :readonly="title == '添加用料' "></el-input>
- </el-form-item>
- <el-form-item label="项目负责人" prop="projectHead">
- <el-select
- v-model="form.projectHead"
- placeholder="请选择项目负责人"
- clearable
- @change="getSceneHeadList"
- >
- <el-option
- v-for="dict in dict.type.project_head"
- :key="dict.value"
- :label="dict.label"
- :value="dict.value+','+dict.raw.remark"
- />
- </el-select>
- </el-form-item>
- <el-form-item label="现场负责人" prop="sceneHead">
- <el-select
- v-model="form.sceneHead"
- placeholder="请选择现场负责人"
- clearable
- >
- <el-option
- v-for="dict in sceneHead"
- :label="dict"
- :value="dict"
- />
- </el-select>
- </el-form-item>
- <el-form-item label="设计单位" prop="designUnit">
- <el-select
- v-model="form.designUnit"
- placeholder="请选择设计单位"
- clearable
- @change="getDesignUnitList"
- >
- <el-option
- v-for="dict in dict.type.design_unit"
- :key="dict.value"
- :label="dict.label"
- :value="dict.value+','+dict.raw.remark"
- />
- </el-select>
- </el-form-item>
- <el-form-item label="设计负责人" prop="designHead">
- <el-select
- v-model="form.designHead"
- placeholder="请选择设计负责人"
- clearable
- >
- <el-option
- v-for="dict in designHead"
- :label="dict"
- :value="dict"
- />
- </el-select>
- </el-form-item>
- <el-form-item label="设计联系方式" prop="designPhone">
- <el-input v-model="form.designPhone" placeholder="请填写设计联系方式" maxlength="13"
- :readonly="title == '添加用料' "></el-input>
- </el-form-item>
- <el-form-item label="监理单位" prop="supervisionUnit">
- <el-select
- v-model="form.supervisionUnit"
- placeholder="请选择监理单位"
- clearable
- @change="getSupervisionUnitList"
- >
- <el-option
- v-for="dict in dict.type.supervision_unit"
- :key="dict.value"
- :label="dict.label"
- :value="dict.value+','+dict.raw.remark"
- />
- </el-select>
- </el-form-item>
- <el-form-item label="监理负责人" prop="supervisionHead">
- <el-select
- v-model="form.supervisionHead"
- placeholder="请选择监理负责人"
- clearable
- >
- <el-option
- v-for="dict in supervisionHead"
- :label="dict"
- :value="dict"
- />
- </el-select>
- </el-form-item>
- <el-form-item label="监理联系电话" prop="supervisionPhone">
- <el-input v-model="form.supervisionPhone" placeholder="请填写监理联系电话" maxlength="13"
- :readonly="title == '添加用料' "></el-input>
- </el-form-item>
- <el-form-item label="庭院PE管材预设" prop="pePreset">
- <el-input v-model="form.pePresetTy" placeholder="请填写PE管材预设" maxlength="20" oninput="value=value.match(/\d+(\.\d{0,1})?/) ? value.match(/\d+(\.\d{0,1})?/)[0] : ''"
- :readonly="title == '添加用料' "></el-input>
- </el-form-item>
- <el-form-item label="庭院钢材预设" prop="gcPreset">
- <el-input v-model="form.gcPresetTy" placeholder="请填写钢材预设" maxlength="13" oninput="value=value.match(/\d+(\.\d{0,1})?/) ? value.match(/\d+(\.\d{0,1})?/)[0] : ''"
- :readonly="title == '添加用料' "></el-input>
- </el-form-item>
- <el-form-item label="室内PE管材预设" prop="pePreset">
- <el-input v-model="form.pePresetSn" placeholder="请填写PE管材预设" maxlength="20" oninput="value=value.match(/\d+(\.\d{0,1})?/) ? value.match(/\d+(\.\d{0,1})?/)[0] : ''"
- :readonly="title == '添加用料' "></el-input>
- </el-form-item>
- <el-form-item label="室内钢材预设" prop="gcPreset">
- <el-input v-model="form.gcPresetSn" placeholder="请填写钢材预设" maxlength="13" oninput="value=value.match(/\d+(\.\d{0,1})?/) ? value.match(/\d+(\.\d{0,1})?/)[0] : ''"
- :readonly="title == '添加用料' "></el-input>
- </el-form-item>
- <el-form-item label="工程分类" prop="enginType" >
- <el-select v-model="form.enginType" placeholder="请选择工程分类" style="width: 100%"
- :disabled="title == '添加用料' ">
- <el-option
- v-for="e in EngineepipeType"
- :key="e.dictValue"
- :label="e.dictLabel"
- :value="e.dictValue"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="工程类型" prop="enginClassification">
- <el-select v-model="enginClassificationQuery" placeholder="请选择工程类型" style="width: 100%" multiple @change="clickByType"
- :disabled="title == '添加用料' ">
- <el-option
- v-for="e in enginClassificationList"
- :key="e.dictValue"
- :label="e.dictLabel"
- :value="e.dictValue"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-row :gutter="20">
- <el-col :span="24">
- <el-form-item label="附件" v-if="form.id" style="width: 100%">
- <ObsFileUpload ref="obsFileUpload" :file-size="100"
- :file-type="['dwg','dwt','doc','docx','xls','xlsx','png', 'jpg', 'jpeg','mp4']"
- :limit="9999"
- :value="form.pics"
- :disabled="title == '添加用料' "
- @input="filesUpload"
- ></ObsFileUpload>
- </el-form-item>
- <el-form-item label="附件" v-else style="width: 100%">
- <ObsFileUpload ref="obsFileUpload" :file-size="100"
- :file-type="['dwg','dwt','doc','docx','xls','xlsx','png', 'jpg', 'jpeg','mp4']"
- :limit="9999"
- :disabled="title == '添加用料' "
- :value="form.files"
- @input="filesUpload"
- ></ObsFileUpload>
- </el-form-item>
- </el-col>
- </el-row>
- <div style="width: 25%; float: right" >
- <el-button :loading="buttonLoading" type="primary" @click="submitFormAdd">提交</el-button>
- <el-button @click="cancel">取 消</el-button>
- </div>
- </el-form>
- </el-dialog>
- <!-- 施工信息dialog -->
- <el-dialog :visible.sync="nodeDetailVisible" title="施工信息" append-to-body customClass="appendElNodeDialog"
- width="70% !important">
- <el-form ref="nodeForm" :model="zEngineeringNodeBo.zEngineeringInfoBo" :rules="nodeRules" label-width="200px">
- <el-form-item label="施工时间" prop="constructTime">
- <el-date-picker
- v-model="zEngineeringNodeBo.zEngineeringInfoBo.constructTime"
- value-format="yyyy-MM-dd hh:mm:ss"
- type="datetime"
- style="width: 100%"
- placeholder="请选择施工时间">
- </el-date-picker>
- </el-form-item>
- <el-row>
- <el-form-item label="照片" prop="zEngiineeringPhotoBoList" style="width: 100%;">
- <ObsImageUpload ref="obsImageUpload" :limit="9999" :fileType="['png', 'jpg', 'jpeg']"
- :value="zEngineeringNodeBo.zEngineeringInfoBo.zEngiineeringPhotoBoList"
- @input="getUrl"></ObsImageUpload>
- </el-form-item>
- </el-row>
- <el-row v-for="(item, index) in zEngineeringMaterialBo" :key="index">
- <el-col :span="7">
- <el-form-item
- :prop="`${item.id}.materialQuality`"
- style="margin-left: 120px"
- label-width="auto"
- label="材质"
- >
- <el-select v-model="item.materialQuality" placeholder="请选择材质" style="width: 70%"
- @change="getEnginSpecificationsList(item, index)">
- <el-option
- v-for="e in materialQualityList"
- :key="e.id"
- :label="e.name"
- :value="e.id"
- ></el-option>
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="7">
- <el-form-item
- :prop="`${item.id}.specifications`"
- style="margin-left: 80px"
- label-width="auto"
- label="规格"
- >
- <el-select v-model="item.specifications" placeholder="请选择规格" style="width: 70%">
- <el-option
- v-for="e in zEngineeringMaterialBo.specifications"
- :key="e.id"
- :label="e.name"
- :value="e.id"
- ></el-option>
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="7">
- <el-form-item
- :prop="`${item.id}.number`"
- style="margin-left: 40px"
- label-width="auto"
- label="数量"
- >
- <div class="block" style="display: inline-block; margin-right: 20px;">
- <el-input v-model="item.number" placeholder="请输入数量" style="width: 100%" maxlength="8"/>
- </div>
- </el-form-item>
- </el-col>
- <el-col :span="3">
- <el-form-item style="margin-left: -120px;">
- <el-button v-if="zEngineeringMaterialBo.length > 1" @click="removezEngineeringMaterialBo(index)">
- 删除
- </el-button>
- </el-form-item>
- </el-col>
- </el-row>
- <div style="width: 25%; float: right">
- <el-button @click="addzEngineeringMaterialBo">添加用料</el-button>
- <el-button :loading="buttonLoading" type="primary" @click="updateMaterBo">提交</el-button>
- <el-button @click="nodeCancel">取 消</el-button>
- </div>
- </el-form>
- </el-dialog>
- <ConstructionDetails
- ref="ConstructionDetails"
- :status="status"
- :currentCollapses="currentCollapses"
- :zEngineeringNodeBo="zEngineeringNodeBo"
- @updateNodeOption="updateNodeOption"
- @checkWorking="checkWorking"
- :enginType="'工业工程'"
- />
- </div>
- </template>
- <script>
- import {
- addEngineeEngineeIndustry,
- DelEngineeEngineeIndustry,
- EditEngineeEngineeIndustry,
- getEngineeIndustryList,
- putEngineeEngineeIndustry,
- QueryEngineeIndustry, UpdateEngineeIndustry
- } from '@/api/zdsz/engineeringGY'
- import {getDicts} from "@/api/system/dict/data";
- import EngineePipe from '@/components/EngineePipe'
- import ConstructionDetails from '@/components/ConstructionDetails/indexGY.vue'
- import {
- getEnginMaterialQualityList,
- insertReview,
- } from '@/api/zdsz/enginee'
- import {getEnginSpecificationsList} from '@/api/zdsz/enginSpecifications'
- import EnginNodeInfo from "@/components/EnginNodeInfo/indexGY.vue";
- export default {
- name: "工业",
- dicts: ['project_head','design_unit','supervision_unit'],
- components: {
- EnginNodeInfo,
- ConstructionDetails,
- EngineePipe
- },
- data() {
- // 自定义校验
- const validatePicPass = (rule, value, callback) => {
- return new Promise((resolve, reject) => {
- // 至少有一个图片、一个创建时间
- if (this.zEngineeringNodeBo.zEngineeringInfoBo.zEngiineeringPhotoBoList.length !== 0
- && (this.zEngineeringNodeBo.zEngineeringInfoBo.constructTime !== null || undefined)) {
- resolve(true)
- } else {
- reject(new Error('no pass'))
- }
- })
- }
- return {
- sceneHead:[],
- designHead:[],
- supervisionHead:[],
- // 审核时间
- createTime: null,
- // 按钮loading
- buttonLoading: false,
- // 遮罩层
- loading: true,
- // 选中数组
- ids: [],
- enginClassificationList: [],
- enginClassificationQuery: [],
- status: null,
- // 非单个禁用
- single: true,
- // 非多个禁用
- multiple: true,
- // 显示搜索条件
- showSearch: true,
- // 工程分类显示
- engineeType: true,
- // 总条数
- total: 0,
- currentNode: [],
- currentCollapses: [],
- // 工业工程|工业工程表格数据
- comprehensiveList: [],
- // 弹出层标题
- title: "",
- gc: true,
- nodeList: [],
- // 是否显示弹出层
- open: false,
- openadd:false,
- // 查询参数
- queryParams: {
- enginType: null,
- enginName: '', // 工程名称
- enginClassification: '', // 工程分类
- },
- nodeDetailVisible: false, // 施工信息dialog
- MaterVisible: false, // 用料信息dialog
- // 表单参数
- form: {
- files: [], // 附件
- pics: [], // 附件返回
- type: '', // 用来区分工业工程、工业工程
- enginName: '', // 工程名称
- enginType: '', // 工程类型
- enginClassification: '', // 工程分类
- constructUnit: '', // 建筑单位
- projectHead: '', // 项目负责人
- sceneHead: '', // 现场负责人
- designUnit: '', // 设计单位
- designHead: '', // 设计负责人
- designPhone: '', // 设计联系电话
- supervisionUnit: '', // 监理单位
- supervisionHead: '', // 监理负责人
- supervisionPhone: '', // 监理联系电话
- pePreset: 0, // PE管材预设量
- gcPreset: 0, // 钢材预设量
- pePresetTy: 0, // PE管材预设量
- gcPresetTy: 0, // 钢材预设量
- pePresetSn: 0, // PE管材预设量
- gcPresetSn: 0, // 钢材预设量
- zEngineeringNodeBo: { // 工程节点
- type: '', // 节点类型
- zEngineeringInfoBo: { // 施工信息
- constructUser: '', // 施工人
- constructTime: '', // 施工时间
- zEngiineeringPhotoBoList: [], // 图片列表
- zEngineeringMaterialBo: [ // 用料对象
- {
- materialQuality: '', // 用料材质
- specifications: '', // 用料规格
- number: '' // 用料数量
- },
- ],
- },
- },
- },
- zEngineeringMaterialBo: [ // 用料对象
- {
- materialQuality: '', // 用料材质
- specifications: '', // 用料规格
- number: '' // 用料数量
- },
- ],
- zEngineeringNodeBo: { // 工程节点
- type: '', // 节点类型
- zEngineeringInfoBo: { // 施工信息
- constructUser: '', // 施工人
- constructTime: '', // 施工时间
- zEngiineeringPhotoBoList: [], // 图片列表
- }
- },
- EngineepipeType: [], // 工程类型
- materialQualityList: [], // 用料材质List
- specificationsList: [], // 用料规格List
- // 表单校验
- rules: {
- enginName: [
- {required: true, message: "工程名称不能为空", trigger: 'blur'}
- ],
- enginType: [
- {required: true, message: "工程类型不能为空", trigger: 'blur'}
- ],
- enginClassificationQuery: [
- {required: true, message: "工程分类不能为空", trigger: 'blur'}
- ],
- constructUnit: [
- {required: true, message: "建筑单位不能为空", trigger: 'blur'}
- ],
- },
- // 节点规则校验
- nodeRules: {
- constructTime: [
- {required: true, message: "施工时间不能为空", trigger: ['change', 'blur']}
- ],
- zEngiineeringPhotoBoList: [
- {required: true, message: "图片不能为空", trigger: ['change', 'blur'], validator: validatePicPass}
- ],
- },
- searchParams: {
- pageSize: 10,
- pageNum: 1,
- enginName: null, // 工程名称
- },
- currentType: null, // 附件组件类型 put修改 add新增
- dictArr: [],
- currentCheckingEnginList: [],
- currentCheckList: [],
- flag:null,
- };
- },
- created() {
- //工程分类
- this.getType();
- //列表
- this.getList();
- },
- mounted() {
- // 获取材质
- getEnginMaterialQualityList({enginType: '工业工程'}).then(res => {
- this.materialQualityList = res.data
- });
- },
- methods: {
- getSceneHeadList(param){
- this.form.projectHead = param.split(',')[0];
- this.form.sceneHead = "";
- this.sceneHead = param.split(',')[1].split('、');
- },
- getDesignUnitList(param){
- this.form.designUnit = param.split(',')[0];
- this.form.designHead = "";
- this.designHead = param.split(',')[1].split('、');
- },
- getSupervisionUnitList(param){
- this.form.supervisionUnit = param.split(',')[0];
- this.form.supervisionHead = "";
- this.supervisionHead = param.split(',')[1].split('、');
- },
- downloadZip(name) {
- this.$download.zip(`/zdsz/engineeringPipeJacking/downloadZip/${'工业工程'}/${name}`, name);
- },
- // 节点审核
- checkWorking(checkingInfo,flag) {
- let params = checkingInfo
- params.createTime = this.createTime
- if (flag === 1){
- params.infoIdList.forEach(item=>{
- if (item.zEngiineeringPhotoBoListOne.length>0){
- item.zEngiineeringPhotoBoListOne.forEach(o=>{
- item.zEngiineeringPhotoBoList.push(o)
- })
- }
- if (item.zEngiineeringPhotoBoListTwo.length>0){
- item.zEngiineeringPhotoBoListTwo.forEach(o=>{
- item.zEngiineeringPhotoBoList.push(o)
- })
- }
- if (item.zEngiineeringPhotoBoListThree.length>0){
- item.zEngiineeringPhotoBoListThree.forEach(o=>{
- item.zEngiineeringPhotoBoList.push(o)
- })
- }
- })
- }
- console.log('节点审核 checkingInfo===', params)
- insertReview(params).then(res => {
- if (res.code == 200) {
- this.$message({
- message: '审核成功',
- type: 'success'
- });
- this.$refs.ConstructionDetails.dialogVisible = false
- this.getList()
- }
- })
- },
- filesUpload(url) {
- console.log('upload successfully')
- this.form.files = url
- this.$refs.form.validate()
- },
- validateState(rule, value, callback) {
- console.log(rule)
- console.log(value)
- return new Promise((resolve, reject) => {
- if (value !== null && value !== undefined && value !== '' && value !== 0) {
- resolve(true)
- } else {
- return callback(new Error('材质不能为空'))
- }
- })
- },
- validateSize(rule, value, callback) {
- console.log(value)
- return new Promise((resolve, reject) => {
- const value = this.zEngineeringMaterialBo[rule.index].specifications
- console.log(value)
- if (value !== null && value !== undefined && value !== '' && value !== 0) {
- resolve(true)
- } else {
- return callback(new Error('规格不能为空'))
- }
- })
- },
- validateNumber(rule, value, callback) {
- console.log(value)
- return new Promise((resolve, reject) => {
- const value = this.zEngineeringMaterialBo[rule.index].number
- // 至少有一个图片、一个用料信息、一个创建时间
- if (value) {
- resolve(true)
- } else {
- return reject(new Error('数量不能为空'))
- }
- })
- },
- updateNodeOption(value) {
- try {
- this.form.zEngineeringNodeBo.zEngineeringInfoBoList = this.form.zEngineeringNodeBo.zEngineeringInfoBoList.filter(obj => value.map(o => o.id).includes(obj.id))
- } catch (e) {
- }
- this.form.files = this.form.pics
- EditEngineeEngineeIndustry(this.form).then(res => {
- this.$modal.msgSuccess("修改成功");
- this.$refs.ConstructionDetails.dialogVisible = false
- })
- this.getList();
- },
- // 根据所选材质获取对应规格
- getEnginSpecificationsList(item, index) {
- this.zEngineeringMaterialBo[index].specifications = null
- // 根据材质ID获取材质规格
- getEnginSpecificationsList(item.materialQuality).then(res => {
- this.zEngineeringMaterialBo.specifications = res.data
- })
- },
- updateMaterBo() {
- this.form.zEngineeringNodeBo = []
- if (this.zEngineeringMaterialBo.length > 0) {
- let valid = true;
- if (this.zEngineeringMaterialBo[this.zEngineeringMaterialBo.length - 1]['materialQuality'] == '' || this.zEngineeringMaterialBo[this.zEngineeringMaterialBo.length - 1]['materialQuality'] == null) {
- valid = false;
- }
- if (this.zEngineeringMaterialBo[this.zEngineeringMaterialBo.length - 1]['specifications'] == '' || this.zEngineeringMaterialBo[this.zEngineeringMaterialBo.length - 1]['specifications'] == null) {
- valid = false;
- }
- if (this.zEngineeringMaterialBo[this.zEngineeringMaterialBo.length - 1]['number'] == '' || this.zEngineeringMaterialBo[this.zEngineeringMaterialBo.length - 1]['number'] == null) {
- valid = false;
- }
- if (valid) {
- this.zEngineeringNodeBo.zEngineeringInfoBo.zEngineeringMaterialBo = this.zEngineeringMaterialBo
- this.form.zEngineeringNodeBo = this.zEngineeringNodeBo
- this.$refs.nodeForm.validate(valid => {
- if (valid) {
- EditEngineeEngineeIndustry(this.form).then(res => {
- this.nodeDetailVisible = false
- this.$modal.msgSuccess("新增成功");
- })
- }
- });
- } else {
- this.$message.warning('完善信息!')
- }
- }
- },
- //添加用料
- addzEngineeringMaterialBo() {
- if (this.zEngineeringMaterialBo.length > 0) {
- let valid = true;
- if (this.zEngineeringMaterialBo[this.zEngineeringMaterialBo.length - 1]['materialQuality'] == '' || this.zEngineeringMaterialBo[this.zEngineeringMaterialBo.length - 1]['materialQuality'] == null) {
- valid = false;
- }
- if (this.zEngineeringMaterialBo[this.zEngineeringMaterialBo.length - 1]['specifications'] == '' || this.zEngineeringMaterialBo[this.zEngineeringMaterialBo.length - 1]['specifications'] == null) {
- valid = false;
- }
- if (this.zEngineeringMaterialBo[this.zEngineeringMaterialBo.length - 1]['number'] == '' || this.zEngineeringMaterialBo[this.zEngineeringMaterialBo.length - 1]['number'] == null) {
- valid = false;
- }
- if (valid) {
- this.zEngineeringMaterialBo.push({
- materialQuality: '', // 用料材质
- specifications: '', // 用料规格
- number: '' // 用料数量
- })
- } else {
- this.$message.warning('完善信息!')
- }
- }
- },
- // 删除用料信息
- removezEngineeringMaterialBo(index) {
- this.zEngineeringMaterialBo.splice(index, 1)
- },
- // 工程类型与工程分类与节点类型
- getType() {
- getDicts("industry_engin_type").then(res => {
- this.EngineepipeType = res.data
- });
- getDicts("engin_classification").then(res => {
- this.enginClassificationList = res.data
- })
- },
- clickByType(value) {
- this.flag = null;
- if (!value) return;
- let str = '';
- if (value == '室内管线') {
- str = 'gy_inner'
- } else if (value == '室外管线') {
- str = 'gy_out'
- } else if (value == '调压柜') {
- str = 'gy_tyg'
- } else {
- return;
- }
- this.flag = str;
- getDicts(str).then(res => {
- this.nodeList = res.data
- })
- },
- enginNodeStatusExecuted(item) {
- console.log(item)
- try {
- return this.form.nodeReViewStateList.find(o => o.Type == item.dictLabel).state == '1';
- } catch (error) {
- return false
- }
- },
- addNewPipe(data) {
- this.$refs.enginPipe.openDialog({
- id: data.id,
- type: this.form.type
- }, 'add', data)
- },
- //添加用料信息
- addzEngineeringMaterBo(data) {
- this.title = "添加用料";
- this.reset();
- const id = data.id
- putEngineeEngineeIndustry(id).then(res => {
- this.form = res.data;
- this.clickByType(this.form.enginClassification)
- this.currentType = 'addMaterial'
- this.open = true
- })
- },
- async viewSource(e, type = null) {
- console.log('历史',e)
- this.currentId = e.id
- if (!e.enginClassification)return;
- let str = '';
- if (e.enginClassification == '室内管线') {
- str = 'gy_inner'
- } else if (e.enginClassification == '室外管线') {
- str = 'gy_out'
- } else if (e.enginClassification == '调压柜') {
- str = 'gy_tyg'
- }
- const r = await getDicts(str)
- let dict = []
- for (let i = 0; i < r.data.length; i++) {
- dict.push({
- label: r.data[i].dictLabel,
- value: r.data[i].dictValue
- })
- }
- if (type) {
- this.status = 'review'
- } else {
- this.status = 'read-only'
- }
- this.$refs.ConstructionDetails.open(dict, null, null, null, this.status, e.enginClassification)
- },
- async updateviewSource(e) {
- this.currentId = e.id
- if (!e.enginClassification)return;
- let str = '';
- if (e.enginClassification == '室内管线') {
- str = 'gy_inner'
- } else if (e.enginClassification == '室外管线') {
- str = 'gy_out'
- } else if (e.enginClassification == '调压柜') {
- str = 'gy_tyg'
- }
- const r = await getDicts(str)
- let dict = []
- for (let i = 0; i < r.data.length; i++) {
- dict.push({
- label: r.data[i].dictLabel,
- value: r.data[i].dictValue
- })
- }
- this.status = 'put'
- this.$refs.ConstructionDetails.open(dict, null, null, null, this.status, e.enginClassification)
- },
- viewNodeSource(e) {
- if (!e) return
- // todo: 获取数据
- QueryEngineeIndustry({
- id: this.currentId,
- type: e
- }).then(res => {
- this.createTime = res.data.createTime
- this.form = res.data
- try {
- this.currentCollapses = res.data.zEngineeringNodeBo.zEngineeringInfoBoList
- this.$refs.ConstructionDetails.setEngineId(res.data.zEngineeringNodeBo.id || null)
- } catch (error) {
- this.currentCollapses = [];
- }
- })
- },
- nodeCancel() {
- this.nodeDetailVisible = false
- this.reset()
- },
- getUrl(url) {
- this.zEngineeringNodeBo.zEngineeringInfoBo.zEngiineeringPhotoBoList = this.$refs.obsImageUpload.fileList ? this.$refs.obsImageUpload.fileList.map(e => e.url) : [];
- },
- /** 查询工业工程 */
- getList(val) {
- this.loading = true;
- getEngineeIndustryList(this.searchParams).then(res => {
- this.comprehensiveList = res.rows;
- this.total = res.total;
- this.loading = false;
- });
- },
- // 取消按钮
- cancel() {
- this.open = false;
- this.reset();
- },
- // 表单重置
- reset() {
- for (let formKey in this.form) {
- this.form[formKey] = null
- }
- this.form.zEngineeringNodeBo = {}
- this.form.zEngineeringNodeBo.zEngineeringInfoBo = {}
- this.zEngineeringMaterialBo = []
- this.zEngineeringMaterialBo.push({
- materialQuality: '', // 用料材质
- specifications: '', // 用料规格
- number: '' // 用料数量
- })
- this.getType()
- },
- /** 搜索按钮操作 */
- handleQuery() {
- this.searchParams.pageNum = 1;
- this.getList();
- },
- /** 重置按钮操作 */
- resetQuery() {
- this.resetForm("searchParams");
- this.handleQuery();
- },
- // 多选框选中数据
- handleSelectionChange(selection) {
- this.ids = selection.map(item => item.id)
- this.single = selection.length !== 1
- this.multiple = !selection.length
- },
- /** 新增按钮操作 */
- handleAdd() {
- this.reset();
- this.gc = true
- this.title = "新增工业工程";
- this.currentType = 'add'
- // this.open = true;
- this.openadd = true;
- },
- removeFile(val) {
- this.form.files = val
- },
- /** 修改按钮操作 */
- handleUpdate(row) {
- this.gc = false
- this.loading = true;
- this.reset();
- const id = row.id || this.ids
- putEngineeEngineeIndustry(id).then(response => {
- this.loading = false;
- this.form = response.data;
- if (response.data.zEngineeringNodeBoList !== undefined && response.data.zEngineeringNodeBoList.length > 0) {
- this.zEngineeringNodeBo = response.data.zEngineeringNodeBoList[0]
- if (response.data.zEngineeringNodeBoList[0].zEngineeringInfoBoList !== undefined && response.data.zEngineeringNodeBoList[0].zEngineeringInfoBoList.length > 0) {
- this.zEngineeringNodeBo.zEngineeringInfoBo = response.data.zEngineeringNodeBoList[0].zEngineeringInfoBoList[0]
- }
- }
- this.title = "修改工业工程";
- this.currentType = 'put'
- this.open = true;
- });
- },
- toNodeDetail() {
- this.$refs["form"].validate(valid => {
- if (valid) {
- let nodeCollection = []
- // 收集节点信息
- this.currentCheckList.forEach((e, idx) => {
- let nodeItem = this.$refs['EnginNodeInfo' + idx][0].infoCollection()
- nodeCollection.push(nodeItem)
- })
- this.form.zEngineeringNodeBoList = nodeCollection
- console.log(this.form.zEngineeringNodeBoList)
- if (this.title == '添加用料') {
- this.buttonLoading = true
- addEngineeEngineeIndustry(this.form).then(res => {
- if (res.code == 200) {
- this.$message({
- message: '添加成功',
- type: 'success'
- });
- this.buttonLoading = false
- this.open = false
- this.currentCheckList = []
- this.getList()
- }
- })
- }
- }
- })
- },
- /** 提交按钮 */
- submitForm() {
- this.$refs["form"].validate(valid => {
- if (valid) {
- this.form.files = this.$refs.obsFileUpload.fileList;
- if (this.form.files.length === 0) {
- this.$message.warning('必须上传附件!')
- return
- }
- this.form.zEngineeringNodeBo = null
- if (this.zEngineeringNodeBo.type !== '') {
- this.form.zEngineeringNodeBo = this.zEngineeringNodeBo
- this.form.zEngineeringNodeBo.zEngineeringInfoBo.zEngineeringMaterialBo = this.zEngineeringMaterialBo
- }
- // if (this.form.enginClassification && this.form.enginClassification != [] && this.form.enginClassification.length > 0) {
- // this.form.enginClassification = this.form.enginClassification.join(',');
- // } else {
- // this.form.enginClassification = ""
- // }
- if (this.form.id == null) {
- addEngineeEngineeIndustry(this.form).then(res => {
- this.$modal.msgSuccess("新增成功");
- this.open = false;
- this.nodeDetailVisible = false
- this.getList();
- })
- } else {
- UpdateEngineeIndustry(this.form).then(res => {
- this.$modal.msgSuccess("修改成功");
- this.open = false;
- this.nodeDetailVisible = false
- this.getList();
- })
- }
- }
- });
- },
- /** 提交按钮 */
- submitFormAdd() {
- this.$refs["form"].validate(valid => {
- if (valid) {
- this.form.files = this.$refs.obsFileUpload.fileList;
- if (this.form.files.length === 0) {
- this.$message.warning('必须上传附件!')
- return
- }
- this.form.zEngineeringNodeBo = null
- if (this.zEngineeringNodeBo.type !== '') {
- this.form.zEngineeringNodeBo = this.zEngineeringNodeBo
- this.form.zEngineeringNodeBo.zEngineeringInfoBo.zEngineeringMaterialBo = this.zEngineeringMaterialBo
- }
- if (this.enginClassificationQuery && this.enginClassificationQuery != [] && this.enginClassificationQuery.length > 0) {
- for(let i in this.enginClassificationQuery){
- this.form.enginClassification = this.enginClassificationQuery[i];
- if(this.enginClassificationQuery[i] == '室内管线'){
- this.form.pePreset= this.form.pePresetSn;
- this.form.gcPreset= this.form.gcPresetSn;
- }else if (this.enginClassificationQuery[i] == '室外管线'){
- this.form.pePreset= this.form.pePresetTy;
- this.form.gcPreset= this.form.gcPresetTy;
- }else{
- this.form.pePreset= 0;
- this.form.gcPreset= 0;
- }
- addEngineeEngineeIndustry(this.form).then(res => {
- this.$modal.msgSuccess("新增成功");
- this.openadd = false;
- this.nodeDetailVisible = false
- })
- this.getList();
- }
- }
- }
- });
- },
- /** 删除按钮操作 */
- handleDelete(row) {
- const ids = row.id || this.ids;
- this.$modal.confirm('是否确认删除所选择的数据项?').then(() => {
- this.loading = true;
- return DelEngineeEngineeIndustry(ids);
- }).then(() => {
- this.loading = false;
- this.getList();
- this.$modal.msgSuccess("删除成功");
- }).catch(() => {
- }).finally(() => {
- this.loading = false;
- });
- },
- /** 导出按钮操作 */
- handleExport() {
- this.download('zdsz/engineeringGY/export', {
- ...this.queryParams
- }, `工业工程数据_${new Date().getTime()}.xlsx`)
- }
- }
- };
- </script>
- <style lang="scss" scoped>
- ::v-deep .appendElDialog {
- width: 70%;
- height: 80%;
- .el-dialog__body {
- height: 85%;
- overflow-y: scroll;
- }
- .el-form-item {
- margin-bottom: 22px;
- padding-left: 30px;
- width: 44%;
- display: inline-block;
- }
- .el-form-item:nth-child(2n+2) {
- margin-left: 5%;
- }
- .el-form-item:not(:nth-child(1):nth-child(2)) {
- margin-top: 0.5%;
- }
- .remark_input {
- .el-textarea__inner {
- width: 238%;
- height: 190px;
- }
- }
- }
- ::v-deep .appendElNodeDialog {
- // width: 70%;
- height: 80%;
- .el-select {
- width: 70%
- }
- .el-dialog__body {
- height: 85%;
- }
- .el-form-item {
- margin-bottom: 22px;
- width: 100%;
- display: inline-block;
- }
- .el-form-item:not(:nth-child(1):nth-child(2)) {
- margin-top: 0.5%;
- }
- }
- </style>
|