| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577 |
- <template>
- <el-container class="monthReport">
- <el-card class="box-card">
- <!-- <el-button type="primary" icon="el-icon-back" @click="back" style="float:left;margin-right: 10px;">返回</el-button>-->
- <h3 class="title_monthReport" style="font-size: 20px !important;font-weight: bold !important;color: black !important;">
- 实施检查计划
- </h3>
- <el-form :inline="true" size="mini" class="demo-form-inline" label-width="80px">
- <!-- <el-form-item label="检查计划事项">-->
- <!-- <el-input v-model="searchForm.planningMatters" placeholder="检查计划事项" clearable></el-input>-->
- <!-- </el-form-item>-->
- <!-- <el-form-item label="检查计划事项">-->
- <!-- <el-select-->
- <!-- filterable-->
- <!-- v-model="searchForm.yearId"-->
- <!-- @change="changeYearSearch"-->
- <!-- placeholder="请选择检查计划事项">-->
- <!-- <el-option-->
- <!-- v-for="item in yearPlanDepList"-->
- <!-- :key="item.id"-->
- <!-- :label="item.chkName"-->
- <!-- :value="item.id">-->
- <!-- </el-option>-->
- <!-- </el-select>-->
- <!-- </el-form-item>-->
- <!-- <el-form-item label="详细检查计划名称">-->
- <!-- <el-select-->
- <!-- filterable-->
- <!-- v-model="searchForm.dtlId"-->
- <!-- @change="changeDlt"-->
- <!-- placeholder="请选择详细检查计划">-->
- <!-- <el-option-->
- <!-- v-for="item in dtlList"-->
- <!-- :key="item.id"-->
- <!-- :label="item.nm"-->
- <!-- :value="item.id">-->
- <!-- </el-option>-->
- <!-- </el-select>-->
- <!-- </el-form-item>-->
- <el-form-item label="检查组">
- <el-input v-model="searchForm.inspectionTeam" placeholder="检查组" clearable></el-input>
- </el-form-item>
- <el-form-item label="年月">
- <el-date-picker
- v-model="searchForm.years"
- type="month"
- clearable
- placeholder="选择年月">
- </el-date-picker>
- </el-form-item>
- <el-form-item label="地区">
- <el-input v-model="searchForm.adName" placeholder="地区" clearable></el-input>
- </el-form-item>
- <!-- <el-form-item label="是否重复">-->
- <!-- <el-select v-model="searchForm.isR" clearable placeholder="是否重复">-->
- <!-- <el-option v-for="(item,index) in isRList" :label="item.label" :value="item.value"></el-option>-->
- <!-- </el-select>-->
- <!-- </el-form-item>-->
- <el-form-item label="检查单位">
- <el-input v-model="searchForm.inspectionUnit" placeholder="检查单位" clearable></el-input>
- </el-form-item>
- <!-- <el-form-item label="计划分类" v-if="isJdc">-->
- <!-- <el-select v-model="searchForm.grad" placeholder="计划分类" clearable>-->
- <!-- <el-option v-for="item in gradList" :label="item.label" :value="item.value"></el-option>-->
- <!-- </el-select>-->
- <!-- </el-form-item>-->
- </el-form>
- <div>
- <div style="text-align: right;float:right;padding: 20px;">
- <el-button type="primary" size="mini" @click="searchBtn">查询</el-button>
- <el-button type="success" size="mini" @click="addBtn" style="margin-left: 10px;margin-right: 10px;" v-if="(isEdit && isCityCountry) || !isCityCountry">添加分组</el-button>
- <span v-if="isJdc || (isEdit && isCityCountry)" style="color:red;font-size: 10px;">{{curTimeTip}}</span>
- </div>
- <el-table
- border
- ref="multipleTable"
- :height="tableHeight"
- :data="tableData"
- default-expand-all
- @expand-change="expandChange"
- tooltip-effect="dark"
- style="width: 100%"
- v-loading="loading">
- <el-table-column type="expand">
- <template slot-scope="scope">
- <div style="width:calc(100% - 40px);margin-left: 40px;">
- <el-table :data="scope.row.groupList">
- <el-table-column prop="nm" label="督查类型"></el-table-column>
- <el-table-column prop="quantity" label="计划检查项目数量"></el-table-column>
- <el-table-column prop="" label="项目名称" >
- <template slot-scope="scope1">
- {{formatObjNames(scope1.row)}}
- </template>
- </el-table-column>
- <el-table-column
- align="center"
- width="200"
- label="操作"
- fixed="right">
- <template slot-scope="scope1">
- <el-button type="primary" size="mini" @click="editType(scope.row,scope1.row)" :disabled="!(scope.row.state=='1' && ((isEdit && isCityCountry) || !isCityCountry))">编辑</el-button>
- <el-button type="danger" size="mini" @click.stop="deleteDataType(scope1.row)" :disabled="!(scope.row.state=='1' && ((isEdit && isCityCountry) || !isCityCountry))">删除</el-button>
- </template>
- </el-table-column>
- </el-table>
- </div>
- </template>
- </el-table-column>
- <el-table-column align="center" type="index" label="序号" width="80">
- <template slot-scope="scope">{{ scope.$index + 1}}</template>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="180"
- prop="chkName"
- label="检查计划事项"
- show-overflow-tooltip>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="180"
- prop="dtlName"
- label="详细检查计划名称"
- show-overflow-tooltip>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="180"
- prop="pnm"
- label="检查组名称"
- show-overflow-tooltip>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="120"
- prop="planDpNm"
- label="检查单位"
- show-overflow-tooltip>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="120"
- prop=""
- label="检查区域"
- show-overflow-tooltip>
- <template slot-scope="scope">
- {{formatArea(scope.row)}}
- </template>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="120"
- prop="quantity"
- label="计划检查项目数量"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="80"
- prop=""
- label="组长"
- show-overflow-tooltip
- >
- <template slot-scope="scope">
- {{formatPersType(scope.row,"1")}}
- </template>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="100"
- prop=""
- label="组员"
- show-overflow-tooltip>
- <template slot-scope="scope">
- {{formatPersType(scope.row,"2")}}
- </template>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="100"
- prop=""
- label="联络员"
- show-overflow-tooltip>
- <template slot-scope="scope">
- {{formatPersType(scope.row,"3")}}
- </template>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="100"
- prop=""
- label="专家"
- show-overflow-tooltip>
- <template slot-scope="scope">
- {{formatPersType(scope.row,"4")}}
- </template>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="120"
- prop="stTm"
- :formatter="formatDate"
- label="开始"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="120"
- prop="enTm"
- :formatter="formatDate"
- label="结束"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- align="center"
- min-width="240"
- label="操作"
- fixed="right">
- <template slot-scope="scope">
- <el-button type="primary" size="mini" @click.stop="addNewType(scope.row)" :disabled="!(scope.row.itPossibleToAdd && scope.row.state=='1' && ((isEdit && isCityCountry) || !isCityCountry))">新增督查类别</el-button>
- <el-button type="danger" size="mini" @click.stop="deleteData(scope.row)" :disabled="!(scope.row.state=='1' && ((isEdit && isCityCountry) || !isCityCountry))">删除</el-button>
- </template>
- </el-table-column>
- </el-table>
- </div>
- <el-dialog
- class="outerDialog custom_dialog"
- :title="dialogT"
- width="40%"
- @close="closeAddDialog"
- v-if="addDialogVisible"
- :visible.sync="addDialogVisible">
- <div style="width: 100%;height:100%;">
- <el-form ref="addForm" label-width="170px">
- <el-form-item label="年度">
- <el-date-picker
- :disabled="isDisabled"
- v-model="addForm.chkYear"
- @change="changeDate"
- type="year"
- format="yyyy"
- value-format="yyyy"
- placeholder="选择年度">
- </el-date-picker>
- </el-form-item>
- <el-form-item label="检查计划事项" required>
- <el-select
- filterable
- :disabled="isDisabled"
- v-model="addForm.yearId"
- @change="changeYearForm"
- placeholder="请选择检查计划事项">
- <el-option
- v-for="item in yearPlanDepList"
- :key="item.id"
- :label="item.chkName"
- :value="item.id">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="详细检查计划名称" required>
- <el-select
- filterable
- :disabled="isDisabled"
- v-model="addForm.dtlId"
- @change="changeDtlForm"
- placeholder="请选择详细检查计划">
- <el-option
- v-for="item in dtlListForm"
- :key="item.id"
- :label="item.nm"
- :value="item.id">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="详细检查计划时间">
- <el-input v-model="dateRStr" readonly placeholder="详细检查计划时间" style="width: 70%"></el-input>
- </el-form-item>
- <el-form-item label="检查组名称" required>
- <el-input v-model="addForm.pnm" :disabled="isDisabled" placeholder="检查组名称" style="width: 70%"></el-input>
- </el-form-item>
- <el-form-item label="计划检查项目数量">
- <el-input-number v-model="addForm.quantity" :min="0" style="width: 70%"></el-input-number>
- </el-form-item>
- <el-form-item label="开始时间" required>
- <el-date-picker
- style="width: 70%"
- v-model="addForm.stTm"
- :disabled="isDisabled || !addForm.dtlId"
- type="date"
- value-format="yyyy-MM-dd"
- :picker-options="selectOption"
- placeholder="选择日期">
- </el-date-picker>
- </el-form-item>
- <el-form-item label="结束时间" required>
- <el-date-picker
- style="width: 70%"
- value-format="yyyy-MM-dd"
- :disabled="isDisabled || !addForm.dtlId"
- v-model="addForm.enTm"
- type="date"
- :picker-options="selectOption"
- placeholder="选择日期">
- </el-date-picker>
- </el-form-item>
- <el-form-item label="督查对象" required>
- <el-select v-model="addForm.typeList" filterable placeholder="请选择督查类型" style="width: 70%" multiple collapse-tags>
- <el-option
- v-for="item in objTypeList"
- :key="item.inspType"
- :label="item.inspName"
- :value="item.inspType">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="检查内容">
- <el-input type="textarea" v-model="objParent.chkContent" placeholder="请输入检查内容"></el-input>
- </el-form-item>
- <el-form-item label="备注" :required="isRequired">
- <el-input type="textarea" v-model="addForm.note" placeholder="请输入备注"></el-input>
- </el-form-item>
- <el-form-item style="text-align: right">
- <el-button type="primary" @click="addSubmit" style="margin-bottom: 30px;">确定</el-button>
- </el-form-item>
- </el-form>
- </div>
- </el-dialog>
- <el-dialog
- class="outerDialog custom_dialog"
- :title="dialogE"
- width="40%"
- @close="closeAddDialog"
- v-if="editDialogVisible"
- :visible.sync="editDialogVisible">
- <div style="width: 100%;height:100%;">
- <el-form ref="editForm" label-width="170px">
- <el-form-item label="组长" required>
- <el-select v-model="editForm.pers1" @change="changePers1" multiple collapse-tags style="width: 70%">
- <el-option v-for="item in persArr1" :label="item.persName" :value="item.guid"></el-option>
- </el-select>
- <el-button type="primary" @click="popupAddMemberDialog(1,editForm.id)">选择</el-button>
- </el-form-item>
- <el-form-item label="组员" required>
- <el-select v-model="editForm.pers2" @change="changePers2" multiple collapse-tags style="width: 70%">
- <el-option v-for="item in persArr2" :label="item.persName" :value="item.guid"></el-option>
- </el-select>
- <el-button type="primary" @click="popupAddMemberDialog(2,editForm.id)">选择</el-button>
- </el-form-item>
- <el-form-item label="联络员">
- <el-select v-model="editForm.pers3" @change="changePers3" multiple collapse-tags style="width: 70%">
- <el-option v-for="item in persArr3" :label="item.persName" :value="item.guid"></el-option>
- </el-select>
- <el-button type="primary" @click="popupAddMemberDialog(3,editForm.id)">选择</el-button>
- </el-form-item>
- <el-form-item label="专家">
- <el-select v-model="editForm.pers4" @change="changePers4" multiple collapse-tags style="width: 70%">
- <el-option v-for="item in persArr4" :label="item.persName" :value="item.guid"></el-option>
- </el-select>
- <el-button type="primary" @click="popupAddMemberDialog(4,editForm.id)">选择</el-button>
- </el-form-item>
- <el-form-item label="项目名称">
- <el-select v-model="editForm.obj" @change="changeObj" multiple collapse-tags style="width: 70%">
- <el-option v-for="item in objArr" :label="item.name" :value="item.code"></el-option>
- </el-select>
- <el-button type="primary" @click="popupAddObjectDialog(editForm.id,editForm.pType)">选择</el-button>
- </el-form-item>
- <el-form-item style="text-align: center">
- <el-button type="primary" @click="submitBtnObj" style="margin-bottom: 30px;">确定</el-button>
- </el-form-item>
- </el-form>
- </div>
- </el-dialog>
- <el-dialog
- class="outerDialog custom_dialog"
- :title="'重复提示'"
- width="50%"
- :visible.sync="isMulVisible">
- <div style="width: 100%;max-height:500px;overflow: auto;">
- <span style="font-size: 14px;color:#333;">当前组所属详细计划表格数据:</span>
- <el-table
- :data="curList"
- border
- style="width: 100%">
- <el-table-column
- prop="nm"
- show-overflow-tooltip
- label="详细检查计划名称"
- min-width="180">
- </el-table-column>
- <el-table-column
- prop="dAdName"
- show-overflow-tooltip
- label="检查区域"
- min-width="180">
- </el-table-column>
- <el-table-column
- prop="stTm"
- min-width="100"
- :formatter="formatDate"
- show-overflow-tooltip
- label="检查开始时间">
- </el-table-column>
- <el-table-column
- prop="enTm"
- min-width="100"
- :formatter="formatDate"
- show-overflow-tooltip
- label="检查结束时间">
- </el-table-column>
- <el-table-column
- prop="chkContent"
- min-width="200"
- show-overflow-tooltip
- label="检查内容">
- </el-table-column>
- </el-table>
- <span style="font-size: 14px;color:red;">一周内到同一设区市的督查检查组不能超过1个(当前检查日期和检查区域重复):</span>
- <el-table
- :data="tipList"
- border
- style="width: 100%">
- <el-table-column
- prop="nm"
- show-overflow-tooltip
- label="详细检查计划名称"
- min-width="180">
- </el-table-column>
- <el-table-column
- prop="dAdName"
- show-overflow-tooltip
- label="检查区域"
- min-width="180">
- </el-table-column>
- <el-table-column
- prop="stTm"
- min-width="100"
- :formatter="formatDate"
- show-overflow-tooltip
- label="检查开始时间">
- </el-table-column>
- <el-table-column
- prop="enTm"
- min-width="100"
- :formatter="formatDate"
- show-overflow-tooltip
- label="检查结束时间">
- </el-table-column>
- <el-table-column
- prop="chkContent"
- min-width="200"
- show-overflow-tooltip
- label="检查内容">
- </el-table-column>
- </el-table>
- </div>
- <span slot="footer">
- <el-button type="primary" @click="addSubmitSecond">确定</el-button>
- <el-button @click="cancelMul">取消</el-button>
- </span>
- </el-dialog>
- </el-card>
- <editDczInfo ref="editDczInfoRef" :isNew="true" :dczId="dczId" :jiGouId="orgId" :addPerType="addPerType" @addSuccess="addSuccess" :key="new Date().getTime()"></editDczInfo>
- <editDcdxInfo ref="editDcdxInfoRef" :isNew="true" :objType="tableCurrentRowType" :dczId="dczId" @addSuccess="singleRowSubmit"></editDcdxInfo>
- <editDcdxInfosz ref="editDcdxInfoSzRef" :isNew="true" :objType="tableCurrentRowType" :dczId="dczId" @addSuccess="singleRowSubmit"></editDcdxInfosz>
- <editDcdxInfojianshe ref="editDcdxInfoJianSheRef" :isNew="true" :objType="tableCurrentRowType" :dczId="dczId" @addSuccess="singleRowSubmit"></editDcdxInfojianshe>
- <editDcdxInfoyunxing ref="editDcdxInfoYunXingRef" :isNew="true" :objType="tableCurrentRowType" :dczId="dczId" @addSuccess="singleRowSubmit"></editDcdxInfoyunxing>
- <editDcdxInfoRyZj ref="editDcdxInfoRyZjRef" :isNew="true" :objType="tableCurrentRowType" :dczId="dczId" @addSuccess="singleRowSubmit"></editDcdxInfoRyZj>
- <editDcdxInfoDiFang ref="editDcdxInfoDiFangRef" :isNew="true" :objType="tableCurrentRowType" :dczId="dczId" @addSuccess="singleRowSubmit"></editDcdxInfoDiFang>
- <editDcdxInfoChaoBiaoHongYuAn ref="editDcdxInfoChaoBiaoHongYuAnRef" :isNew="true" :objType="tableCurrentRowType" :dczId="dczId" @addSuccess="singleRowSubmit"></editDcdxInfoChaoBiaoHongYuAn>
- <editDcdxInfoCommon ref="editDcdxInfoCommonRef" :isNew="true" :objType="tableCurrentRowType" :dczId="dczId" @addSuccess="singleRowSubmit"></editDcdxInfoCommon>
- <editDcdxXsdyhgl ref="editDcdxXsdyhglRef" :isNew="true" :objType="tableCurrentRowType" :dczId="dczId" @addSuccess="singleRowSubmit"></editDcdxXsdyhgl>
- <editDcdxInfoFjncysaq ref="editDcdxInfoFjncysaqRef" :isNew="true" :objType="tableCurrentRowType" :dczId="dczId" @addSuccess="singleRowSubmit"></editDcdxInfoFjncysaq>
- <editDcdxInfoSdqa ref="editDcdxInfoSdqaRef" :isNew="true" :objType="tableCurrentRowType" :dczId="dczId" @addSuccess="singleRowSubmit"></editDcdxInfoSdqa>
- </el-container>
- </template>
- <script>
- import {exportModel} from "@util/gw_exportModel";
- import request from '@util/gw_ajax_request'
- import addvSelectMul from "../../../widgets/addvSelectMul.vue"
- import editDczInfo from '../editDczInfo.vue';
- export default {
- name: "",
- props: ["rowData"],
- data() {
- return {
- gradList:[{label:"省",value:"2"},{label:"市",value:"3"},{label:"县",value:"4"}],
- // isBtn:this.$route.query.id?true:false,
- isDisabled:false,
- dczId:"",
- tableCurrentRowType:"",
- addPerType:"",
- DepList:[],
- joinDepList:[],
- objParent:{},
- dateRStr:"",
- rowObjParent:{},
- objYear:{},
- monthList:['1',"2","3","4","5","6","7","8","9","10","11","12"],
- isRList:[{label:"是",value:"1"},{label:"否",value:"否"}],
- chkFormArr:[{
- label:"线上(水利监督信息系统)",
- value:"1"
- },{
- label:"线下",
- value:"2"
- }],
- objTypeList:[],
- objTypeAllList:[],
- year:[new Date().getFullYear()+"-01",new Date().getFullYear()+"-"+((new Date().getMonth()+1)>9?(new Date().getMonth()+1):"0"+(new Date().getMonth()+1))],
- month:new Date().getMonth()+1,
- isOne:false,
- years:[new Date().getFullYear()-1,new Date().getFullYear(),new Date().getFullYear()+1],
- months:[1,2,3,4,5,6,7,8,9,10,11,12],
- dcTypeList:[],
- ptypeArr:[{label:'暗访',value:"0"},{label:'明查',value:"1"}],
- dialogT:"",
- dialogE:"",
- monthDialogVisible:true,
- addDialogVisible:false,
- editDialogVisible:false,
- detailDialogVisible:false,
- tableHeight:window.innerHeight-300,
- tableData:[],
- loading:false,
- pageNum:1,
- pageSize:10,
- total:0,
- objTypes:[],
- searchForm:{
- yearId:"",
- dtlId:"",
- planningMatters:"",
- inspectionTeam:"",
- years:"",
- adName:"",
- inspectionUnit:""
- },
- YM:"",
- detailObj:{},
- orgIdDefault:"",
- dateRange:[],
- addForm:{
- chkYear:"",
- yearId:"",
- dtlId:"",
- pnm:"",
- stTm:"",
- enTm:"",
- typeList:[]
- },
- editForm:{
- id:"",
- pType:"",
- pers1:[],
- pers2:[],
- pers3:[],
- pers4:[],
- obj:[]
- },
- pers1:[],
- pers2:[],
- pers3:[],
- pers4:[],
- obj:[],
- persArr1:[],
- persArr2:[],
- persArr3:[],
- persArr4:[],
- objArr:[],
- yearDialogVisible:false,
- yearId:"",
- currentId:"",
- curTimeTip:"",
- isJdc:false,
- isEdit:false,
- isCityCountry:false,
- yearPlanDepList:[],
- dtlList:[],
- dtlListForm:[],
- isRequired:false,
- isMulVisible:false,
- adNames:"",
- curList:[],
- tipList:[]
- }
- },
- filters:{
- chkTypeFor(val,that){
- var nm = ""
- that.chkFormArr.forEach((item)=>{
- if(item.value==val){
- nm = item.label;
- }
- })
- return nm;
- }
- },
- components: {
- editDczInfo,
- addvSelectMul,
- editDcdxInfo:resolve => {require(['../editDcdxInfo.vue'],resolve)},
- // editDcdxInfo_172:resolve => {require(['./editDcdxInfo.vue'],resolve)},
- editDcdxInfosz:resolve => {require(['../editDcdxInfo_sz.vue'],resolve)},
- editDcdxInfojianshe:resolve => {require(['../editDcdxInfo_jianshe.vue'],resolve)},
- editDcdxInfoyunxing:resolve => {require(['../editDcdxInfo_yunxing.vue'],resolve)},
- editDcdxInfoRyZj: resolve => {
- require(['../editDcdxInfo_ryZj.vue'], resolve)
- }, //浙江人饮
- editDcdxInfoDiFang: resolve => {
- require(['../editDcdxInfo_difang.vue'], resolve)
- }, //堤防
- editDcdxInfoChaoBiaoHongYuAn: resolve => {
- require(['../editDcdxInfo_chaobiaohongyuan.vue'], resolve)
- }, //超标
- editDcdxInfoCommon:resolve => {
- require(['../editDcdxInfo_common.vue'], resolve)
- },
- editDcdxXskSd:resolve => {
- require(['../editDcdxInfo.vue'], resolve)
- },
- editDcdxXsdyhgl:resolve => {
- require(['../editDcdxInfo_xsdyhgl.vue'], resolve)
- },
- editDcdxInfoFjncysaq: (resolve) => {
- require(['../editDcdxInfo_fjncysaq.vue'], resolve)
- },//福建农村饮水安全
- editDcdxInfoSdqa:resolve => {
- require(['../editDcdxInfo_sdqa.vue'], resolve)
- },//山东工程质量监督
- },
- computed: {
- selectOption(){
- var _self = this;
- return {
- disabledDate(time) {
- if (_self.objParent.stTm && _self.objParent.enTm) {
- return time.getTime() < _self.objParent.stTm || time.getTime() > _self.objParent.enTm
- }
- }
- }
- },
- persId() {
- return localStorage.getItem("userid")
- ? localStorage.getItem("userid")
- : "1098101939614724096";
- },
- orgId() {
- return localStorage.getItem('currentOrgId') ? localStorage.getItem("currentOrgId") : "";
- },
- organCode() {
- return localStorage.getItem('currentRlcode') ? localStorage.getItem('currentRlcode') : ''
- },
- currentOrgNm(){
- if(localStorage.getItem('currentRlcode').substring(0,2)=='37'){
- return "山东省"
- }else{
- return localStorage.getItem('currentOrgNm') ? localStorage.getItem('currentOrgNm') : ''
- }
- }
- },
- watch:{
- // 'addForm.chkYear':{
- // //设置深度监听,当openDate值发生变化时出发handler方法
- // deep:true,
- // //注意:这里的function不能写成箭头函数,不然this将不在此组件内 https://cn.vuejs.org/v2/api/#watch
- // handler:function (newVal,oldVal) {
- // if(newVal){
- // this.addForm.chkYear = newVal;
- // this.getYearPlanByDep();
- // this.addForm.planId = "";
- // this.addForm.dtlId = "";
- // this.dateRStr = "";
- // this.objParent = {};
- // this.addForm.stTm = "";
- // this.addForm.enTm = "";
- // }
- // },
- // immediate: false
- // }
- },
- created() {
- this.getCityCountry();//是不是市县账户
- this.getIsTime();//时间是不是有效时间
- this.getCurDep();//是不是监督处
- this.getCurTime();//获取设置的时间
- },
- mounted() {
- this.initTableData();
- },
- methods: {
- submitBtnObj(){
- if(this.editForm.pers1 && this.editForm.pers1.length==0){
- this.$message.warning("请选择组长");
- return false;
- }
- if(this.editForm.pers2 && this.editForm.pers2.length==0){
- this.$message.warning("请选择组员");
- return false;
- }
- this.editDialogVisible = false;
- },
- getIsTime(){
- this.isEdit = false;
- request.get(`/bis/insp/gaTm/exceed`).then(res=>{
- if(res.success){
- this.isEdit = res.data.key;
- }
- })
- },
- getCurDep(){
- this.isJdc = false;
- request.get(`/bis/insp/gaTm/purview`).then(res=>{
- if(res.success){
- this.isJdc = res.data.key;
- }
- })
- },
- getCityCountry(){
- this.isCityCountry = false;
- request.get(`/bis/insp/gaTm/whetherTheCityOrCounty`).then(res=>{
- if(res.success){
- this.isCityCountry = res.data.key;
- }
- })
- },
- formatDateTime(dateF){
- if(dateF){
- var date = new Date(dateF);
- return date.getFullYear()+"-"+((date.getMonth()+1)>9?(date.getMonth()+1):'0'+(date.getMonth()+1))+"-"+(date.getDate()>9?date.getDate():"0"+date.getDate());
- }
- return "";
- },
- getCurTime(){
- this.curTimeTip = "";
- request.get(`/bis/insp/gaTm/obj`).then(res=>{
- if(res.success){
- if(res.data.stm && res.data.etm){
- this.curTimeTip = `(市县填报时间范围为${this.formatDateTime(res.data.stm)}~${this.formatDateTime(res.data.etm)}日)`;
- }
- }
- })
- },
- // changeYearSearch(){
- // this.getYearById();
- // this.getDetailList();
- // },
- // changeDlt(){
- // this.initTableData();
- // },
- changeDate(){
- this.addForm.yearId = "";
- this.addForm.dtlId = "";
- this.dateRStr = "";
- this.objParent = {};
- this.$nextTick(() => {
- this.$set(this.addForm, "stTm", "");
- this.$set(this.addForm, "enTm", "");
- });
- this.addForm.typeList = [];
- this.objTypeList = [];
- this.getYearPlanByDep();
- },
- changeYearForm(){
- this.addForm.dtlId = "";
- this.dateRStr = "";
- this.objParent = {};
- this.$nextTick(() => {
- this.$set(this.addForm, "stTm", "");
- this.$set(this.addForm, "enTm", "");
- });
- this.addForm.typeList = [];
- this.objTypeList = [];
- this.getDetailListForm();
- },
- changeDtlForm(){
- this.dateRStr = "";
- this.objParent = {};
- this.$nextTick(() => {
- this.$set(this.addForm, "stTm", "");
- this.$set(this.addForm, "enTm", "");
- });
- this.addForm.typeList = [];
- this.objTypeList = [];
- this.getYearListForm();
- },
- getYearPlanByDep(){
- this.yearPlanDepList = [];
- request.post(`/bis/insp/plan/year/findList`,{state:"1",chkYear:this.addForm.chkYear}).then(res=>{
- if(res.success){
- if(res.data && res.data.length>0){
- this.yearPlanDepList = res.data;
- }
- }
- })
- },
- getDetailList(){
- this.dtlList = [];
- request.post(`/bis/insp/plan/dtl/list`,{planId:this.searchForm.yearId}).then(res=>{
- if(res.success){
- if(res.data && res.data.length>0){
- this.dtlList = res.data;
- this.searchForm.dtlId = res.data[0].id;
- this.getYearList();
- }
- }
- })
- },
- getDetailListForm(){
- this.dtlListForm = [];
- request.post(`/bis/insp/plan/dtl/list`,{planId:this.addForm.yearId,onlineChk:"1"}).then(res=>{
- if(res.success){
- if(res.data && res.data.length>0){
- this.dtlListForm = res.data;
- // this.addForm.dtlId = res.data[0].id;
- // this.getYearListForm()
- }
- }
- })
- },
- getDetailListFormEdit(row){
- this.dtlListForm = [];
- request.post(`/bis/insp/plan/dtl/list`,{planId:this.addForm.yearId,onlineChk:"1"}).then(res=>{
- if(res.success){
- if(res.data && res.data.length>0){
- this.dtlListForm = res.data;
- this.getYearListForm(row)
- }
- }
- })
- },
- changePers1(val){
- if(val.length<this.pers1.length){
- var id = this.getIdDelete(val,this.pers1);
- this.deletePersId(id);
- }
- },
- changePers2(val){
- if(val.length<this.pers2.length){
- var id = this.getIdDelete(val,this.pers2);
- this.deletePersId(id);
- }
- },
- changePers3(val){
- if(val.length<this.pers3.length){
- var id = this.getIdDelete(val,this.pers3);
- this.deletePersId(id);
- }
- },
- changePers4(val){
- if(val.length<this.pers4.length){
- var id = this.getIdDelete(val,this.pers4);
- this.deletePersId(id);
- }
- },
- changeObj(val){
- if(val.length<this.obj.length){
- var id = this.getIdDelete(val,this.obj);
- this.deleteObjId(id);
- }
- },
- getIdDelete(arr1,arr2){
- var id = "";
- arr2.forEach((item)=>{
- if(arr1.indexOf(item)<0){
- id = item;
- }
- })
- return id;
- },
- editType(row,row1){
- this.editForm.id = row1.id;
- this.editForm.pType = row1.pType;
- this.persArr1 = [];
- this.persArr2 = [];
- this.persArr3 = [];
- this.persArr4 = [];
- this.editForm.pers1 = [];
- this.editForm.pers2 = [];
- this.editForm.pers3 = [];
- this.editForm.pers4 = [];
- this.pers1 = [];
- this.pers2 = [];
- this.pers3 = [];
- this.pers4 = [];
- this.objArr = [];
- this.editForm.obj = [];
- this.obj = [];
- row.personnelList.forEach((item)=>{
- if(item.persType=="1"){
- this.persArr1.push(item);
- this.editForm.pers1.push(item.guid);
- this.pers1.push(item.guid);
- }
- if(item.persType=="2"){
- this.persArr2.push(item);
- this.editForm.pers2.push(item.guid);
- this.pers2.push(item.guid);
- }
- if(item.persType=="3"){
- this.persArr3.push(item);
- this.editForm.pers3.push(item.guid);
- this.pers3.push(item.guid);
- }
- if(item.persType=="4"){
- this.persArr4.push(item);
- this.editForm.pers4.push(item.guid);
- this.pers4.push(item.guid);
- }
- })
- row1.objectList.forEach((item)=>{
- this.objArr.push(item);
- this.editForm.obj.push(item.code);
- this.obj.push(item.code);
- })
- this.editDialogVisible = true;
- this.dialogE = "编辑";
- },
- isShow(row) {
- return request.get(`/bis/insp/plan/dtl/${row.dtlId}`).then(res => {
- if (res.success) {
- if (row.groupList && row.groupList.length > 0) {
- var list = [];
- var list1 = [];
- row.groupList.forEach((item) => {
- list.push(parseInt(item.pType));
- })
- res.data.ptypIds.forEach((item) => {
- list1.push(parseInt(item));
- })
- return !this.matchType(list, list1);
- } else {
- return true;
- }
- }
- })
- },
- matchType(arr1,arr2){
- return arr2.every(val => arr1.includes(val));
- },
- async addNewType(row) {
- this.objTypeList = [];
- this.isDisabled = true;
- this.addForm = {
- chkYear:row.chkYear?JSON.stringify(row.chkYear):"",
- yearId:row.planYearId,
- dtlId: row.dtlId,
- stTm: row.stTm,
- enTm: row.enTm,
- pnm: row.pnm,
- quantity: "",
- typeList: []
- };
- this.getYearPlanByDep();
- this.getDetailListFormEdit(row);
- this.addDialogVisible = true;
- this.dialogT = "添加"
- },
- setDcType(row){
- request.get(`/bis/insp/plan/dtl/${row.dtlId}`).then(res => {
- if (res.success) {
- if(row.groupList && row.groupList.length>0){
- var list = [];
- var list1 = [];
- var list2 = [];
- row.groupList.forEach((item)=>{
- list.push(parseInt(item.pType));
- })
- res.data.ptypIds.forEach((item)=>{
- if(list.indexOf(parseInt(item))<0){
- list1.push(parseInt(item));
- }
- })
- this.objTypeList.forEach((item)=>{
- if(list1.indexOf(parseInt(item.inspType))>-1){
- list2.push(item);
- }
- })
- this.objTypeList = list2;
- }
- }
- })
- },
- expandChange(){
- },
- addSuccess(obj){
- if(obj.persType=="1"){
- this.persArr1 = obj.listArr.concat(this.persArr1);
- this.editForm.pers1 = obj.listIds.concat(this.editForm.pers1)
- this.pers1 = this.editForm.pers1;
- }
- if(obj.persType=="2"){
- this.persArr2 = obj.listArr.concat(this.persArr2);
- this.editForm.pers2 = obj.listIds.concat(this.editForm.pers2)
- this.pers2 = this.editForm.pers2;
- }
- if(obj.persType=="3"){
- this.persArr3 = obj.listArr.concat(this.persArr3);
- this.editForm.pers3 = obj.listIds.concat(this.editForm.pers3)
- this.pers3 = this.editForm.pers3;
- }
- if(obj.persType=="4"){
- this.persArr4 = obj.listArr.concat(this.persArr4);
- this.editForm.pers4 = obj.listIds.concat(this.editForm.pers4)
- this.pers4 = this.editForm.pers4;
- }
- this.initTableData();
- },
- singleRowSubmit(obj){
- // //debugger
- this.objArr = obj.listArr.concat(this.objArr);
- this.editForm.obj = obj.listIds.concat(this.editForm.obj)
- this.obj = this.editForm.obj;
- this.initTableData();
- },
- popupAddMemberDialog:function(addPersType,id){
- var _self = this;
- this.addPerType = addPersType;
- this.dczId = id;
- setTimeout(function(){
- _self.$refs['editDczInfoRef'].showDialog();
- },500)
- },
- popupAddObjectDialog:function(id,ptype){
- this.dczId = id;
- this.tableCurrentRowType = ptype;
- if(this.tableCurrentRowType=='6'){
- this.$refs['editDcdxInfoSzRef'].showDialog(this.tableCurrentRowType);
- }
- if(this.tableCurrentRowType=='4'){
- this.$refs['editDcdxInfoJianSheRef'].showDialog(this.tableCurrentRowType);
- }
- if(this.tableCurrentRowType=='7'){
- this.$refs['editDcdxInfoYunXingRef'].showDialog(this.tableCurrentRowType);
- }
- if(this.tableCurrentRowType=='1' || this.tableCurrentRowType=='3' || this.tableCurrentRowType=='26' || this.tableCurrentRowType=='34' || this.tableCurrentRowType=='115'){
- this.$refs['editDcdxInfoRef'].showDialog(this.tableCurrentRowType);
- }
- if(this.tableCurrentRowType=='27'){
- this.$refs['editDcdxInfoRyZjRef'].showDialog(this.tableCurrentRowType);
- }
- if(this.tableCurrentRowType=='29'){
- this.$refs['editDcdxInfoDiFangRef'].showDialog(this.tableCurrentRowType);
- }
- if(this.tableCurrentRowType=='30'){
- this.$refs['editDcdxInfoChaoBiaoHongYuAnRef'].showDialog(this.tableCurrentRowType);
- }
- if(this.tableCurrentRowType=='97'){
- this.$refs['editDcdxInfoFjncysaqRef'].showDialog(this.tableCurrentRowType);
- }
- if(this.tableCurrentRowType=='111'){
- this.$refs['editDcdxInfoCommonRef'].showDialog(this.tableCurrentRowType);
- }
- if(this.tableCurrentRowType=='116'){
- this.$refs['editDcdxXsdyhglRef'].showDialog(this.tableCurrentRowType);
- }
- if(this.tableCurrentRowType=='127'){
- this.$refs['editDcdxInfoSdqaRef'].showDialog(this.tableCurrentRowType);
- }
- },
- back(){
- this.$router.push({path: '/yearSdPlanD',query: {id: this.$route.query.planId,key:new Date().getTime()}});
- },
- deletePersId(id){
- var _self = this;
- var params = {
- groupId:this.editForm.id,
- delId:id
- }
- request.post(`/bis/insp/plan/ga/delSinglePersonnel`,params).then(res=>{
- if(res.success){
- _self.initTableData();
- }
- })
- },
- deleteObjId(id){
- var _self = this;
- var params = {
- groupId:this.editForm.id,
- delId:id
- }
- request.post(`/bis/insp/plan/ga/delSingleObject`,params).then(res=>{
- if(res.success){
- _self.initTableData();
- }
- })
- },
- getYearById(){
- var _self = this;
- request.get(`/bis/insp/plan/year/${this.searchForm.yearId}`).then(res=>{
- if(res.success){
- _self.objYear = res.data;
- }
- })
- },
- getYearList(){
- var _self = this;
- this.dateRStr = "";
- request.get(`/bis/insp/plan/dtl/${this.searchForm.dtlId}`).then(res=>{
- if(res.success){
- _self.objParent = res.data;
- _self.dateRStr = _self.formatDateTime(res.data.stTm)+'~'+_self.formatDateTime(res.data.enTm);
- _self.getObjTypeList()
- }
- })
- },
- getYearListForm(row){
- var _self = this;
- this.dateRStr = "";
- this.objParent = {};
- request.get(`/bis/insp/plan/dtl/${this.addForm.dtlId}`).then(res=>{
- if(res.success){
- _self.objParent = res.data;
- _self.dateRStr = _self.formatDateTime(res.data.stTm)+'~'+_self.formatDateTime(res.data.enTm);
- _self.getObjTypeList(row)
- }
- })
- },
- getObjTypeList(row){
- var _self = this;
- this.objTypeList = [];
- this.objTypeAllList = [];
- request.get(`/bis/insp/rel/org/insp/type/getInspTypeByOrgId/${this.orgId}`).then(res=>{
- if(res.success){
- if(res.data && res.data.length>0){
- res.data.forEach((item)=>{
- if(_self.objParent.ptypIds.indexOf(item.inspType)>-1){
- _self.objTypeList.push(item);
- _self.objTypeAllList.push(item);
- }
- })
- if(row){
- _self.setDcType(row);
- }
- }
- }
- })
- },
- showYearPlan(id){
- this.getAllYearPlan();
- this.yearDialogVisible = true;
- this.currentId = id;
- },
- changeAddv(obj){
- if(obj.adCodes){
- this.addForm.dAdCodes = obj.adCodes.split(",");
- }else{
- this.addForm.dAdCodes = [];
- }
- },
- async downloadTemplate() {
- let url = "/pdcApi/bis/insp/planMonth/downloadExcel";
- let type = "get";
- let exportName = "督查检查考核计划调度安排表.xls"
- let result = await exportModel(type, url, exportName, null);
- },
- uploadOver(){
- this.initTableData();
- },
- addFormBtn(){
- this.addDialogVisible = true;
- this.addForm = {};
- this.dialogT = "添加";
- },
- chkFormFormat(row, column, cellValue, index){
- var nm = ""
- this.chkFormArr.forEach((item)=>{
- if(item.value==row.chkType){
- nm = item.label;
- }
- })
- return nm;
- },
- getTypes() {
- var _self = this;
- request.get(`/bis/insp/rel/org/insp/type/getInspTypeByOrgId/${this.orgId}`)
- .then(res => {
- if (res.success) {
- _self.dcTypeList = res.data;
- }
- })
- },
- closeDialog(){
- this.$emit('closeDialogMonth')
- },
- closeDetailDialog(){
- this.detailDialogVisible = false;
- },
- formatObjNames(row){
- var objList = [];
- if(row.objectList && row.objectList.length>0){
- row.objectList.forEach((item)=>{
- objList.push(item.name);
- })
- return objList.join(",");
- }else{
- return "";
- }
- },
- formatArea(row){
- var areaList = [];
- if(row.areaList && row.areaList.length>0){
- row.areaList.forEach((item)=>{
- areaList.push(item.adName);
- })
- return areaList.join(",");
- }else{
- return "";
- }
- },
- formatPersType(row,persType){
- var persList = [];
- if(row.personnelList && row.personnelList.length>0){
- row.personnelList.forEach((item)=>{
- if(item.persType==persType){
- persList.push(item.persName);
- }
- })
- return persList.join(",");
- }else{
- return "";
- }
- },
- objFormat(row, column, cellValue, index){
- var name = "";
- this.dcTypeList.forEach((item)=>{
- if(parseInt(item.inspType)==row.OBJTYPE){
- name = item.inspName;
- }
- })
- return name;
- },
- formatDate(row, column, cellValue, index){
- var dateF = row[column.property];
- if(dateF){
- var date = new Date(dateF);
- return date.getFullYear()+"-"+((date.getMonth()+1)>9?(date.getMonth()+1):'0'+(date.getMonth()+1))+"-"+date.getDate();
- }
- return "";
- },
- formatDate1(row, column, cellValue, index){
- var dateF = row[column.property];
- if(dateF){
- var date = new Date(dateF);
- return date.getFullYear()+"-"+((date.getMonth()+1)>9?(date.getMonth()+1):'0'+(date.getMonth()+1))
- }
- return "";
- },
- async exportExcel() {
- let url = "/pdcApi/bis/insp/planMonth/export";
- let type = "POST";
- let exportName = "督查检查考核计划调度安排表.xls"
- let result = await exportModel(type, url, exportName,JSON.stringify(this.searchForm));
- },
- deleteData(row){
- var _self = this;
- this.$confirm('确定删除该条数据吗, 是否继续?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- request.get(`/bis/insp/plan/ga/delAll/${row.ids}`).then(res=>{
- if(res.success){
- _self.initTableData();
- }else{
- _self.$message.warning(res.message);
- }
- })
- }).catch(() => {
- this.$message({
- type: 'info',
- message: '已取消删除'
- });
- });
- },
- deleteDataType(row){
- var _self = this;
- this.$confirm('确定删除该条数据吗, 是否继续?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- request.get(`/bis/insp/plan/ga/del/${row.id}`).then(res=>{
- if(res.success){
- _self.initTableData();
- }else{
- _self.$message.warning(res.message);
- }
- })
- }).catch(() => {
- this.$message({
- type: 'info',
- message: '已取消删除'
- });
- });
- },
- edit(row){
- var obj = JSON.stringify(row);
- this.addDialogVisible = true;
- this.addForm = JSON.parse(obj);
- this.dateRange = [this.addForm.stTm,this.addForm.enTm];
- this.dialogT = "编辑";
- this.$nextTick(()=>{
- this.$refs.city.setCheck(row.dAdName?row.dAdCodes:[],row.dAdName?row.dAdName.split(","):[]);
- })
- },
- cancelMul(){
- this.addDialogVisible = false;
- this.isMulVisible = false;
- },
- addSubmitSecond(){
- if(!this.addForm.note){
- this.isMulVisible = false;
- this.$message.warning("因检查区域/时间重复,请在备注处说明事由!");
- this.isRequired = true;
- return false;
- }
- this.addForm.determine = true;
- request.post('/bis/insp/plan/ga/add',this.addForm).then(res=>{
- if(res.success){
- this.$message.success("保存成功");
- this.addDialogVisible = false;
- this.addForm = {};
- this.isMulVisible = false;
- this.initTableData();
- }
- }).catch(error=>{
- this.$message.error(error)
- })
- },
- addSubmit(){
- if(!this.addForm.yearId){
- this.$message.warning("请选择检查计划事项");
- return;
- }
- if(!this.addForm.dtlId){
- this.$message.warning("请选择详细检查计划名称");
- return;
- }
- if(!this.addForm.pnm){
- this.$message.warning("请输入检查组名称");
- return;
- }
- if(!this.addForm.stTm){
- this.$message.warning("请选择开始时间");
- return;
- }
- if(!this.addForm.enTm){
- this.$message.warning("请选择结束时间");
- return;
- }
- if(!this.addForm.typeList || this.addForm.typeList.length==0){
- this.$message.warning("请选择督查对象");
- return;
- }
- var _self = this;
- this.addForm.determine = false;
- this.isRequired = false;
- this.tipList = [];
- this.curList = [];
- if(!this.isDisabled){
- request.post('/bis/insp/plan/ga/add',this.addForm).then(res=>{
- if(!res.success && res.message=="true"){
- _self.isMulVisible = true;
- _self.curList.push({
- nm:_self.objParent.nm,
- dAdName:_self.objParent.dAdName,
- stTm:_self.objParent.stTm,
- enTm:_self.objParent.enTm,
- chkContent:_self.objParent.chkContent
- });
- _self.tipList = res.data;
- }else{
- _self.addForm.determine = true;
- request.post('/bis/insp/plan/ga/add',this.addForm).then(res=>{
- if(res.success){
- _self.$message.success("保存成功");
- _self.addDialogVisible = false;
- _self.addForm = {};
- _self.initTableData();
- }
- }).catch(error=>{
- this.$message.error(error)
- })
- }
- })
- }else{
- var _self = this;
- _self.addForm.determine = true;
- request.post('/bis/insp/plan/ga/add',this.addForm).then(res=>{
- if(res.success){
- _self.$message.success("保存成功");
- _self.addDialogVisible = false;
- _self.addForm = {};
- _self.initTableData();
- }else{
- _self.$message.warning(res.message);
- }
- })
- }
- // this.addForm.dtlId = this.$route.query.id;
- // var _self = this;
- // request.post('/bis/insp/plan/ga/add',this.addForm).then(res=>{
- // if(res.success){
- // _self.$message.success("保存成功");
- // _self.addDialogVisible = false;
- // _self.addForm = {};
- // _self.initTableData();
- // }else{
- // _self.$message.warning(res.message);
- // }
- // })
- },
- updateData(){
- if(!this.yearId){
- this.$message.warning("请选择年度计划");
- return;
- }
- var obj = {
- id:this.currentId,
- yearPlanId:this.yearId
- }
- var _self = this;
- request.post('/bis/insp/planMonth/',obj).then(res=>{
- if(res.success){
- _self.$message.success("关联成功");
- _self.yearDialogVisible = false;
- _self.currentId = "";
- _self.yearId = "";
- _self.initTableData();
- }else{
- _self.$message.warning(res.message);
- }
- })
- },
- closeAddDialog(){
- this.addDialogVisible = false;
- },
- closeYearDialog(){
- this.yearDialogVisible = false;
- },
- initTableData(){
- // this.searchForm.dtlId = this.$route.query.id;
- // this.searchForm.yearId = this.$route.query.planId;
- this.loading = true;
- var _self = this;
- this.tableData = [];
- request.post('/bis/insp/plan/ga/list',this.searchForm).then(res=>{
- if(res.success){
- _self.tableData = res.data;
- // _self.total = res.data.total;
- _self.loading = false;
- _self.$nextTick(()=>{
- _self.$refs.multipleTable.doLayout();
- })
- }else{
- _self.$message.warning(res.message)
- }
- })
- },
- handleCurrentChange(val){
- this.pageNum = val;
- this.initTableData();
- },
- handleSizeChange(val){
- this.pageSize = val;
- this.initTableData();
- },
- searchBtn(){
- this.isOne = false;
- this.initTableData();
- },
- oneDel(){
- this.isOne = true;
- this.initTableData();
- },
- lookOver(obj){
- this.detailObj = obj;
- this.detailObj.chkMonth = this.detailObj.chkMonth?this.formatDate1(this.detailObj,{property:"chkMonth"},null,null):"";
- this.detailObj.planSttm = this.detailObj.planSttm?this.formatDate(this.detailObj,{property:"planSttm"},null,null):"";
- this.detailObj.planEntm = this.detailObj.planEntm?this.formatDate(this.detailObj,{property:"planEntm"},null,null):"";
- this.detailDialogVisible = true;
- },
- async addBtn() {
- this.objTypeList = [];
- this.isDisabled = false;
- this.addForm = {};
- // this.getDetailListForm();
- this.addDialogVisible = true;
- this.dialogT = "添加"
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- table{
- width: 100%;
- height:100%;
- border-collapse: collapse;
- margin-bottom: 30px;
- }
- table tr td{
- border:1px solid #cecece;
- height:35px;
- text-indent: 15px;
- padding-right: 15px;
- }
- table tr td:first-child{
- background: #f2f1f1;
- width: 260px;
- text-align: right;
- }
- .title_monthReport /deep/ .el-input__inner{
- border:0px;
- font-size: 20px !important;
- color:black;
- }
- .monthReport{
- width: 100%;
- height:100%;
- margin: 0;
- padding: 0;
- }
- .box-card{
- width: calc(100% - 60px);
- height:calc(100% - 20px);
- margin: 0 auto;
- margin-top: 10px;
- }
- .title_monthReport{
- text-align: center;
- padding: 10px;
- }
- .note_monthReport{
- width: 100%;
- background-color: rgba(255, 251, 230, 1);
- box-sizing: border-box;
- border-width: 1px;
- border-style: solid;
- border-color: rgba(255, 229, 143, 1);
- color: rgba(0, 0, 0, 0.447058823529412);
- font-size: 14px;
- padding: 10px;
- }
- .note_monthReport p:first-child{
- font-size: 16px !important;
- }
- .monthReport{
- .demo-form-inline{
- .el-form-item{
- margin-bottom: 5px;
- margin-top: 8px;
- }
- }
- }
- </style>
|