| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111 |
- <template>
- <div>
- <div>
- <el-form
- :inline="true"
- size="mini"
- class="demo-form-inline"
- >
- <el-row style="margin-bottom: 10px;">
- <el-col :span="24" style="text-align: right;">
- <el-button type="primary" size="medium" @click="qrJcDd">确定稽察原则</el-button>
- </el-col>
- </el-row>
- </el-form>
- <el-table
- v-loading="loading"
- border
- ref="et"
- :height="tableHeight1"
- :data="jiChaJiHuaResult"
- tooltip-effect="dark"
- style="width: 100%"
- @selection-change="handleSelectionChange"
- >
- <el-table-column
- type="selection"
- width="55">
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="100"
- prop="year"
- label="年度"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="100"
- prop="batch"
- label="稽察批次"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="100"
- prop="groupNm"
- label="组别"
- sortable
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="200"
- label="开始时间"
- >
- <template slot-scope="scope">
- <el-date-picker
- style="width: 150px;padding: 0 0 0 30px;"
- v-model="scope.row.stTm"
- type="date"
- value-format="yyyy-MM-dd"
- placeholder="开始时间"
- disabled>
- </el-date-picker>
- </template>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="200"
- label="结束时间"
- >
- <template slot-scope="scope">
- <el-date-picker
- style="width: 150px;padding: 0 0 0 30px;"
- v-model="scope.row.enTm"
- type="date"
- value-format="yyyy-MM-dd"
- placeholder="结束时间"
- disabled>
- </el-date-picker>
- </template>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="250"
- label="稽察地点"
- prop="areas"
- show-overflow-tooltip
- >
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="200"
- label="稽察项目"
- show-overflow-tooltip
- >
- <template slot-scope="scope">
- <transition name="el-fade-in-linear">
- <div style="width:100%;height:100%;display:flex;flex-direction:row;justify-content:flex-end;align-items:center;" v-if="!scope.row.objList.length">
- <i class="el-icon-plus" style="cursor: pointer;" @click="objTypeClick(scope.$index, scope.row, 20)"></i>
- </div>
- </transition>
- <transition name="el-fade-in-linear">
- <div v-if="scope.row.objList.length" style="width:100%;height:100%;display:flex;flex-direction:row;justify-content:flex-end;align-items:center;">
- <span>{{scope.row['workersList']&&scope.row['objList'].length?testformatterArray(scope.row['objList'],'ojbNm'):''}}</span>
- <i style="margin-left: 5px; cursor: pointer;" class="el-icon-view" title="查看详情"@click="objTypeViewClick(scope.$index, scope.row, 20)"></i>
- </div>
- </transition>
- </template>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="100"
- label="项目类型"
- show-overflow-tooltip
- >
- <template slot-scope="scope">
- <transition name="el-fade-in-linear">
- <div v-if="scope.row.objList.length" style="width:100%;height:100%;display:flex;flex-direction:row;justify-content:flex-end;align-items:center;">
- <span>{{scope.row['workersList']&&scope.row['objList'].length?testformatterArray(scope.row['objList'],'type'):''}}</span>
- </div>
- </transition>
- </template>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="200"
- v-if="isJx"
- label="特派员"
- >
- <template slot-scope="scope">
- <transition name="el-fade-in-linear">
- <div style="width:100%;height:100%;display:flex;flex-direction:row;justify-content:flex-end;align-items:center;" v-if="!scope.row.commissioner.length">
- <i class="el-icon-plus" style="margin-left: 5px; cursor: pointer;" @click="roleTypeClick(scope.$index, scope.row, 21)"></i>
- </div>
- </transition>
- <transition name="el-fade-in-linear">
- <div v-if="scope.row.commissioner.length" style="width:100%;height:100%;display:flex;flex-direction:row;justify-content:flex-end;align-items:center;">
- <span>{{scope.row['commissioner']&&scope.row['commissioner'].length?expertformatterArray(scope.row['commissioner'],'name','isJoin'):''}}</span>
- <i style="margin-left: 5px; cursor: pointer;" class="el-icon-edit" @click="roleTypeClick(scope.$index, scope.row, 20)"></i>
- </div>
- </transition>
- </template>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="200"
- label="专家组长"
- >
- <template slot-scope="scope">
- <transition name="el-fade-in-linear">
- <div style="width:100%;height:100%;display:flex;flex-direction:row;justify-content:flex-end;align-items:center;" v-if="!scope.row.special.length">
- <i class="el-icon-plus" style="margin-left: 5px; cursor: pointer;" @click="roleTypeClick(scope.$index, scope.row, 20)"></i>
- </div>
- </transition>
- <transition name="el-fade-in-linear">
- <div v-if="scope.row.special.length" style="width:100%;height:100%;display:flex;flex-direction:row;justify-content:flex-end;align-items:center;">
- <span>{{scope.row['special']&&scope.row['special'].length?expertformatterArray(scope.row['special'],'name','isJoin'):''}}</span>
- <i style="margin-left: 5px; cursor: pointer;" class="el-icon-edit" @click="roleTypeClick(scope.$index, scope.row, 20)"></i>
- </div>
- </transition>
- </template>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="200"
- label="助理"
- show-overflow-tooltip
- >
- <template slot-scope="scope">
- <transition name="el-fade-in-linear">
- <div style="width:100%;height:100%;display:flex;flex-direction:row;justify-content:flex-end;align-items:center;" v-if="!scope.row.aid.length">
- <i class="el-icon-plus" style="margin-left: 5px; cursor: pointer;" @click="roleTypeClick(scope.$index, scope.row, 19)"></i>
- </div>
- </transition>
- <transition name="el-fade-in-linear">
- <div v-if="scope.row.aid.length" style="width:100%;height:100%;display:flex;flex-direction:row;justify-content:flex-end;align-items:center;">
- <span>{{scope.row['aid']&&scope.row['aid'].length?expertformatterArray(scope.row['aid'],'name','isJoin'):''}}</span>
- <i class="el-icon-edit" style="margin-left: 5px; cursor: pointer;" @click="roleTypeClick(scope.$index, scope.row, 19)"></i>
- </div>
- </transition>
- </template>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="200"
- label="前期专家"
- show-overflow-tooltip
- >
- <template slot-scope="scope">
- <transition name="el-fade-in-linear">
- <div style="width:100%;height:100%;display:flex;flex-direction:row;justify-content:flex-end;align-items:center;" v-if="!scope.row.qqzj.length">
- <i class="el-icon-plus" style="margin-left: 5px; cursor: pointer;" @click="roleTypeClick(scope.$index, scope.row, 11)"></i>
- </div>
- </transition>
- <transition name="el-fade-in-linear">
- <div v-if="scope.row.qqzj.length" style="width:100%;height:100%;display:flex;flex-direction:row;justify-content:flex-end;align-items:center;">
- <span>{{scope.row['qqzj']&&scope.row['qqzj'].length?expertformatterArray(scope.row['qqzj'],'name','isJoin'):''}}</span>
- <i class="el-icon-edit" style="margin-left: 5px; cursor: pointer;" @click="roleTypeClick(scope.$index, scope.row, 11)"></i>
- </div>
- </transition>
- </template>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="150"
- label="建管专家"
- show-overflow-tooltip
- >
- <template slot-scope="scope">
- <transition name="el-fade-in-linear">
- <div style="width:100%;height:100%;display:flex;flex-direction:row;justify-content:flex-end;align-items:center;" v-if="!scope.row.jgzj.length">
- <i class="el-icon-plus" style="margin-left: 5px; cursor: pointer;" @click="roleTypeClick(scope.$index, scope.row, 12)"></i>
- </div>
- </transition>
- <transition name="el-fade-in-linear">
- <div v-if="scope.row.jgzj.length" style="width:100%;height:100%;display:flex;flex-direction:row;justify-content:flex-end;align-items:center;">
- <span>{{scope.row['jgzj']&&scope.row['jgzj'].length?expertformatterArray(scope.row['jgzj'],'name','isJoin'):''}}</span>
- <i class="el-icon-edit" style="margin-left: 5px; cursor: pointer;" @click="roleTypeClick(scope.$index, scope.row, 12)"></i>
- </div>
- </transition>
- </template>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="150"
- label="计划专家"
- show-overflow-tooltip
- >
- <template slot-scope="scope">
- <transition name="el-fade-in-linear">
- <div style="width:100%;height:100%;display:flex;flex-direction:row;justify-content:flex-end;align-items:center;" v-if="!scope.row.jhzj.length">
- <i class="el-icon-plus" style="margin-left: 5px; cursor: pointer;" @click="roleTypeClick(scope.$index, scope.row, 13)"></i>
- </div>
- </transition>
- <transition name="el-fade-in-linear">
- <div v-if="scope.row.jhzj.length" style="width:100%;height:100%;display:flex;flex-direction:row;justify-content:flex-end;align-items:center;">
- <span>{{scope.row['jhzj']&&scope.row['jhzj'].length?expertformatterArray(scope.row['jhzj'],'name','isJoin'):''}}</span>
- <i class="el-icon-edit" style="margin-left: 5px; cursor: pointer;" @click="roleTypeClick(scope.$index, scope.row, 13)"></i>
- </div>
- </transition>
- </template>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="150"
- label="财务专家"
- show-overflow-tooltip
- >
- <template slot-scope="scope">
- <transition name="el-fade-in-linear">
- <div style="width:100%;height:100%;display:flex;flex-direction:row;justify-content:flex-end;align-items:center;" v-if="!scope.row.cwzj.length">
- <i class="el-icon-plus" style="margin-left: 5px; cursor: pointer;" @click="roleTypeClick(scope.$index, scope.row, 14)"></i>
- </div>
- </transition>
- <transition name="el-fade-in-linear">
- <div v-if="scope.row.cwzj.length" style="width:100%;height:100%;display:flex;flex-direction:row;justify-content:flex-end;align-items:center;">
- <span>{{scope.row['cwzj']&&scope.row['cwzj'].length?expertformatterArray(scope.row['cwzj'],'name','isJoin'):''}}</span>
- <i class="el-icon-edit" style="margin-left: 5px; cursor: pointer;" @click="roleTypeClick(scope.$index, scope.row, 14)"></i>
- </div>
- </transition>
- </template>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="150"
- label="质量专家"
- show-overflow-tooltip
- >
- <template slot-scope="scope">
- <transition name="el-fade-in-linear">
- <div style="width:100%;height:100%;display:flex;flex-direction:row;justify-content:flex-end;align-items:center;" v-if="!scope.row.zlzj.length">
- <i class="el-icon-plus" style="margin-left: 5px; cursor: pointer;" @click="roleTypeClick(scope.$index, scope.row, 15)"></i>
- </div>
- </transition>
- <transition name="el-fade-in-linear">
- <div v-if="scope.row.zlzj.length" style="width:100%;height:100%;display:flex;flex-direction:row;justify-content:flex-end;align-items:center;">
- <span>{{scope.row['zlzj']&&scope.row['zlzj'].length?expertformatterArray(scope.row['zlzj'],'name','isJoin'):''}}</span>
- <i class="el-icon-edit" style="margin-left: 5px; cursor: pointer;" @click="roleTypeClick(scope.$index, scope.row, 15)"></i>
- </div>
- </transition>
- </template>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="150"
- label="安全专家"
- show-overflow-tooltip
- >
- <template slot-scope="scope">
- <transition name="el-fade-in-linear">
- <div style="width:100%;height:100%;display:flex;flex-direction:row;justify-content:flex-end;align-items:center;" v-if="!scope.row.aqzj.length">
- <i class="el-icon-plus" style="margin-left: 5px; cursor: pointer;" @click="roleTypeClick(scope.$index, scope.row, 16)"></i>
- </div>
- </transition>
- <transition name="el-fade-in-linear">
- <div v-if="scope.row.aqzj.length" style="width:100%;height:100%;display:flex;flex-direction:row;justify-content:flex-end;align-items:center;">
- <span style="justify-content:flex-start;">{{scope.row['aqzj']&&scope.row['aqzj'].length?expertformatterArray(scope.row['aqzj'],'name','isJoin'):''}}</span>
- <i class="el-icon-edit" style="margin-left: 5px; cursor: pointer;" @click="roleTypeClick(scope.$index, scope.row, 16)"></i>
- </div>
- </transition>
- </template>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="220"
- label="备注"
- >
- <template slot-scope="scope">
- <el-input
- style="width: 150px;padding: 0 0 0 30px;"
- v-model="scope.row.remark"
- size="small"
- @change="handleBzEdit(scope.$index, scope.row)">
- </el-input>
- </template>
- </el-table-column>
- <el-table-column
- align="center"
- min-width="250"
- label="操作"
- fixed="right"
- >
- <template slot-scope="scope">
- <el-button type="warning" size="medium" @click.stop="sendGroupMessage(scope.$index, scope.row)">短信通知</el-button>
- <el-button type="primary" size="medium" @click.stop="confirmerGroupInfo(scope.$index, scope.row)">确认人员</el-button>
- </template>
- </el-table-column>
- <!--<el-table-column-->
- <!--header-align="center"-->
- <!--align="center"-->
- <!--min-width="120"-->
- <!--label="稽察组长联系"-->
- <!--></el-table-column>-->
- <!-- <el-table-column
- header-align="center"
- align="center"
- min-width="220"
- label="检测单位"
- >
- <template slot-scope="scope">
- <el-input
- style="width: 150px;padding: 0 0 0 30px;"
- v-model="scope.row.audUnits"
- size="small"
- @change="handleBzEdit(scope.$index, scope.row)">
- </el-input>
- </template>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="220"
- label="稽察处别"
- >
- <template slot-scope="scope">
- <el-input
- style="width: 150px;padding: 0 0 0 30px;"
- v-model="scope.row.audCategory"
- size="small"
- @change="handleBzEdit(scope.$index, scope.row)">
- </el-input>
- </template>
- </el-table-column>-->
- </el-table>
- <el-row style="margin-top: 15px;">
- <el-col :span="24">
- <!--<el-button type="primary" size="medium" @click="addNewGroup">添加新组</el-button>-->
- <!--<el-button type="primary" size="medium" @click="delXzGroup">删除选中组</el-button>-->
- <!--<el-button type="primary" size="medium" @click="XzGroupLoction">选中组修改地点</el-button>-->
- <!--<el-button type="primary" size="medium" @click="XzGroupDelLoction">选中组中删除地点</el-button>-->
- <el-button type="primary" size="medium" @click="reallocate">重新分配(刷新)</el-button>
- <el-button type="primary" size="medium" @click="SingleRoleRefresh">单角色刷新</el-button>
- </el-col>
- </el-row>
- <el-row style="margin-top: 15px;">
- <el-col :span="12">
- <span>蓝色:历史稽察地规避失败,红色:地域规避失败,黄色:手动添加更改,粉色:被删除的人员</span>
- </el-col>
- <el-col :span="12" style="text-align: right;">
- <!--<el-button type="success" size="medium">导出Excel</el-button>-->
- </el-col>
- </el-row>
- </div>
- <el-dialog :close-on-click-modal="false" title="请选择要进行的操作" :visible.sync="XzRyJsVisible" width="40%" :modal-append-to-body="true" :append-to-body="true">
- <div style="text-align: center;">
- <span>请选择角色</span>
- <el-select v-model="XzJsType" clearable placeholder="请选择">
- <el-option :label="item.label" :value="item.value" v-for="(item,index) in XzJsTypeData" :key="index"></el-option>
- </el-select>
- </div>
- <div slot="footer" class="dialog-footer">
- <el-button type="danger" @click="XzRyJsVisible = false" size="medium">取 消</el-button>
- <el-button type="primary" @click="XzRyJsInfo" size="medium">确 定</el-button>
- </div>
- </el-dialog>
- <NewPersXzInfo v-if="addPersDialog" :roleTypes="roleType" :yearBatchId="yearBatchId" editAdd="editAdd" :rowData="rowData" :changeEdit="changeEdit" :changeDataList="changeDataList" @closeXzPers="closeXzPers"></NewPersXzInfo>
- <el-dialog :close-on-click-modal="false" title="请选择人员" :visible.sync="XzPersDialog" width="40%" :modal-append-to-body="true" :append-to-body="true">
- <div style="text-align: center;">
- <span>请选择人员</span>
- <el-select v-model="XzPers" clearable placeholder="请选择" multiple @change="changeDataClick" value-key="name">
- <el-option v-for="(item,index) in persListData" :label="item.name" :key="item.id" :value="item"></el-option>
- </el-select>
- </div>
- <div slot="footer" class="dialog-footer">
- <el-button type="danger" @click="XzPersDialog = false" size="medium">取 消</el-button>
- <el-button type="primary" @click="XzPersQd" size="medium">确 定</el-button>
- </div>
- </el-dialog>
- <!--确定稽察地点及原则-->
- <jiChaDiDian v-if="qdDdYzDialog" :persAreaId="persAreaId" @closeJcDdDialog="closeJcDdDialog" @closeJcDdSxDialog="closeJcDdSxDialog" :changeUrl="changeUrl"></jiChaDiDian>
- <!--选中组修改地点-->
- <xuanZhongZuDiDian v-if="xZGroupDialog" :persAreaId="persAreaId" @closeXzGroupDdDialog="closeXzGroupDdDialog" :changeUrl="changeUrl" :multipleRowId="multipleRowId"></xuanZhongZuDiDian>
- <el-dialog :close-on-click-modal="false" title="请选择角色" :visible.sync="dialogRoleTypeVisible" width="40%" :modal-append-to-body="true" :append-to-body="true">
- <div style="text-align: center;">
- <span>请选择角色</span>
- <el-select v-model="roleTypeModel" clearable placeholder="请选择">
- <el-option :label="item.label" :value="item.value" v-for="(item,index) in roleTypeData" :key="index"></el-option>
- </el-select>
- </div>
- <div slot="footer" class="dialog-footer">
- <el-button type="danger" @click="dialogRoleTypeVisible = false" size="medium">取 消</el-button>
- <el-button type="primary" @click="roleTypeDetermine" size="medium">确 定</el-button>
- </div>
- </el-dialog>
- <!--稽察项目查看-->
- <viewDcdxInfo v-if="viewJcDialog" :groupId="groupId" @closeDialog="closeViewDialog"></viewDcdxInfo>
- <!--稽察项目-->
- <editDcdxInfo :nodeAreaList="nodeAreaList" :nodeRow="nodeRow" @closeDialog="closeDialog" v-if="editJcDialog"></editDcdxInfo>
- <el-dialog :close-on-click-modal="false" title="请选择要删除的项目" :visible.sync="dialogObjTypeVisible" width="40%" :modal-append-to-body="true" :append-to-body="true">
- <div style="text-align: center;">
- <span>项目</span>
- <el-select v-model="objTypeModel" clearable placeholder="请选择">
- <el-option :label="item.ojbNm" :value="item.id" v-for="(item,index) in objTypeData" :key="index"></el-option>
- </el-select>
- </div>
- <div slot="footer" class="dialog-footer">
- <el-button type="danger" @click="dialogObjTypeVisible = false" size="medium">取 消</el-button>
- <el-button type="primary" @click="objTypeDetermine" size="medium">确 定</el-button>
- </div>
- </el-dialog>
- </div>
- </template>
- <script>
- import { dateFormat } from '../../utils/gw_date';
- import {
- formatterValueToLabel,
- formatterArrayToLabel
- } from "../../utils/gw_formatter.js";
- import request from '../../utils/gw_ajax_request'
- import NewPersXzInfo from './NewPersXzInfo'
- import jiChaDiDian from './ryxpjiChaDiDian'
- import xuanZhongZuDiDian from './xuanZhongZuDiDian'
- export default {
- name: "fenPeiDidian",
- props: ["distributionLocationResult","persAreaId","yearBatchId","jiChaJiHuaResults"],
- components:{
- NewPersXzInfo,
- jiChaDiDian,
- xuanZhongZuDiDian,
- editDcdxInfo:resolve => {require(['./editDcdxInfo_jc.vue'],resolve)},
- viewDcdxInfo:resolve => {require(['./viewDcdxInfo_jc.vue'],resolve)}
- },
- data(){
- // const cityOptions = ['上海', '北京', '广州', '深圳'];
- return {
- loading:false,
- multipleSelection:[],
- jiChaJiHuaResult:[],
- tableHeight1: window.innerHeight * .5,
- XzRyJsVisible: false,
- XzJsType: "",
- XzJsTypeData:[
- // {
- // label:"查看人员信息",
- // value: "1"
- // },
- {
- label:"添加人员",
- value: "2"
- },
- {
- label:"更换人员",
- value: "3"
- },
- {
- label:"删除人员",
- value: "4"
- }
- ],
- addPersDialog: false,
- roleType: "",
- rowData: "",
- persListData:[],
- XzPersDialog: false,
- XzPers: [],
- changeEdit:"",
- changeDataList:[],
- qdDdYzDialog: false,
- changeUrl:"",
- xZGroupDialog: false,
- dialogRoleTypeVisible:false,
- roleTypeData:[
- {
- label:"前期专家",
- value: "11"
- },
- {
- label:"建管专家",
- value: "12"
- },
- {
- label:"计划专家",
- value: "13"
- },
- {
- label:"财务专家",
- value: "14"
- },
- {
- label:"质量专家",
- value: "15"
- },
- {
- label:"安全专家",
- value: "16"
- },
- {
- label:"助理",
- value: "19"
- },
- {
- label:"稽察组长",
- value: "20"
- }
- ],
- roleTypeModel: "",
- dialogObjTypeVisible: false,
- objTypeData:[],
- objTypeModel: "",
- multipleRowId:"",
- nodeAreaList:[],
- nodeRow:"",
- editJcDialog: false,
- groupId: "",
- viewJcDialog: false,
- confirmerGroupObj:{}
- }
- },
- mounted(){
- this.getTableListData();
- },
- computed:{
- userId:function(){
- return localStorage.getItem("userid")? localStorage.getItem("userid"): '1098101939614724096'
- },
- isJx() {
- return localStorage.getItem('currentRlcode').substring(0,2)=="36";
- }
- },
- methods:{
- getTableListData(){
- this.$nextTick(() =>{
- this.jiChaJiHuaResult = this.distributionLocationResult;
- console.log(this.jiChaJiHuaResult);
- this.getPerFl(this.jiChaJiHuaResult);
- this.jiChaJiHuaResult.forEach(item =>{
- item.stTm = dateFormat(item.stTm, "yyyy-MM-dd");
- item.enTm = dateFormat(item.enTm, "yyyy-MM-dd");
- })
- })
- },
- getPerFl(arr){
- // //debugger
- // 为列表分开稽察组长,助理,前期专家
- arr.forEach(element => {
- element["qqzj"] = [];//前期专家
- element["jgzj"] = [];//建管专家
- element["jhzj"] = [];//计划专家
- element["cwzj"] = [];//财务专家
- element["zlzj"] = [];//质量专家
- element["aqzj"] = [];//安全专家
- element["aid"] = [];//助理
- element["special"] = [];//专家组长
- element["commissioner"] = [];//特派员
- element["workersList"].forEach(per => {
- if (per.roleType == "11") {
- element["qqzj"].push(per);
- } else if (per.roleType == "12") {
- element["jgzj"].push(per);
- } else if (per.roleType == "13") {
- element["jhzj"].push(per);
- } else if (per.roleType == "14") {
- element["cwzj"].push(per);
- }else if (per.roleType == "15") {
- element["zlzj"].push(per);
- } else if (per.roleType == "16") {
- element["aqzj"].push(per);
- } else if (per.roleType == "19") {
- element["aid"].push(per);
- } else if (per.roleType == "20") {
- element["special"].push(per);
- } else if (per.roleType == "21") {
- element["commissioner"].push(per);
- }
- });
- });
- },
- //确定稽察地点及原则
- qrJcDd(){
- this.changeUrl = 'edit';
- this.qdDdYzDialog = true;
- },
- handleSelectionChange(val) {
- console.log(val);
- this.multipleSelection = val;
- },
- handleDdEdit(index, row) {
- console.log(index, row);
- },
- //备注
- handleBzEdit(index, row) {
- console.log(index, row);
- },
- //稽察组长编辑
- roleTypeClick(index, row, value){
- console.log(index, row, value);
- this.XzJsType = "";
- this.XzRyJsVisible = true;
- this.roleType = value;
- this.rowData = row;
- },
- //稽察项目查看
- objTypeViewClick(index, row, value){
- this.groupId = row.id;
- console.log(index, row, value);
- this.viewJcDialog = true;
- },
- //稽察项目编辑
- objTypeClick(index, row, value){
- console.log(index, row, value);
- if(row.areaList){
- this.nodeAreaList = row.areaList;
- }
- this.nodeRow = row;
- this.editJcDialog = true;
- },
- //稽察项目删除
- objTypeDelete(index, row, value){
- this.$confirm('此操作将删除该项目所有数据, 是否继续?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- console.log(index, row, value);
- this.$nextTick(()=>{
- this.objTypeData = row.objList;
- this.objTypeModel = "";
- this.dialogObjTypeVisible = true;
- })
- })
- },
- // 选择人员角色确定
- XzRyJsInfo(){
- if(this.XzJsType){
- this.XzPers = "";
- if(this.XzJsType == '2'){
- this.changeEdit = "add";
- this.addPersDialog = true;
- }else if(this.XzJsType == '3'){
- this.XzPersDialog = true;
- this.getPersList();
- }else if(this.XzJsType == '4'){
- this.XzPersDialog = true;
- this.getPersList();
- }
- this.XzRyJsVisible = false;
- }else{
- this.$message.warning("请选择角色");
- return;
- }
- },
- getPersList(){
- request.post(`/tac/worker/b/getWorkerbsListById`,{
- "roleType": this.roleType,
- "groupId": this.rowData.id
- }).then(res =>{
- if(res.success){
- this.persListData = res.data;
- }
- })
- },
- XzPersQd(){
- if(this.XzPers.length == "0"){
- this.$message.warning("请选择人员");
- return ;
- }
- if(this.XzJsType == '3'){
- this.changeEdit = "change";
- this.addPersDialog = true;
- }else if(this.XzJsType == '4'){
- if(this.changeDataList.length == "0"){
- this.$message.warning("请选择人员");
- }else{
- const list = [];
- this.changeDataList.forEach((item)=>{
- list.push(item);
- })
- list.forEach((item)=>{
- item.roleType = this.roleType;
- item.roleTypeList = [{
- value:this.roleType
- }]
- })
- let obj = {
- "updateBs": list,
- "batchId": this.yearBatchId,
- "groupNm": this.rowData.groupNm,
- "groupId": this.rowData.id
- };
- request.post(`/tac/insp/year/batch/group/pers/updateGroupPers
- `,obj).then(res =>{
- if(res.success){
- this.$message.success("删除成功");
- this.XzPersDialog = false;
- this.refreshDistributionLocation();
- }else{
- this.$message.warning(res.message);
- }
- })
- }
- }
- },
- // closeXzRyDialog(){
- //
- // },
- //关闭稽察地点
- closeJcDdDialog(){
- this.qdDdYzDialog = false;
- // this.refreshDistributionLocation();
- },
- //关闭稽察地点
- closeJcDdSxDialog(){
- this.qdDdYzDialog = false;
- this.refreshDistributionLocation();
- },
- //关闭选中组
- closeXzGroupDdDialog(){
- this.xZGroupDialog = false;
- this.refreshDistributionLocation();
- },
- closeXzPers(){
- this.addPersDialog = false;
- this.XzPersDialog = false;
- this.refreshDistributionLocation();
- },
- changeDataClick(item){
- console.log(item);
- this.changeDataList = item;
- },
- testformatterArray: function(
- arr,
- labelPropName,
- splitMark = ",",
- nonLabel = "",
- isAddNonLabel = true
- ) {
- let r = formatterArrayToLabel(
- arr,
- labelPropName,
- (splitMark = ","),
- (nonLabel = ""),
- (isAddNonLabel = true)
- );
- return r;
- },
- expertformatterArray: function(
- arr,
- labelPropName,
- label2PropName,
- splitMark = ",",
- nonLabel = "",
- isAddNonLabel = true
- ) {
- ;
- let labelsArr = [];
- if(arr && arr instanceof Array){
- arr.forEach((item,index) =>{
- if(item.hasOwnProperty(labelPropName)){
- if(item.hasOwnProperty(label2PropName)){
- if(item[label2PropName]=="0"){
- labelsArr.push(item[labelPropName]);
- }else if(item[label2PropName]=="1"){
- labelsArr.push(item[labelPropName]+"(回复参加)");
- }else if(item[label2PropName]=="2"){
- labelsArr.push(item[labelPropName]+"(回复不参加)");
- }else if(item[label2PropName]=="3"){
- labelsArr.push(item[labelPropName]+"(回复超时)");
- }else{
- labelsArr.push(item[labelPropName]);
- }
- }else{
- labelsArr.push(item[labelPropName]);
- }
- }else{
- console.log('formatterArrayToLabel:warning:数组中有元素缺失指定属性');
- if(isAddNonLabel){
- labelsArr.push(nonLabel);
- }
- }
- });
- return labelsArr.join(splitMark);
- }
- },
- // 添加新组
- addNewGroup(){
- this.changeUrl = 'add';
- this.qdDdYzDialog = true;
- },
- // 删除选中组
- delXzGroup(){
- if(this.multipleSelection.length == 0){
- this.$message.warning("请选择组");
- return;
- }
- this.$confirm('确定要删除该组, 是否继续?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- let obj = {
- "groupList": this.multipleSelection
- }
- request.post(`/tac/insp/year/batch/group/deleteGroupList`,obj).then(res =>{
- if(res.success){
- this.$message.success("删除成功");
- this.refreshDistributionLocation();
- }else{
- this.$message.warning(res.message);
- }
- })
- }).catch(() => {
- this.$message({
- type: 'info',
- message: '已取消删除',
- duration: 1000
- });
- });
- },
- //选中组中添加地点
- XzGroupLoction(){
- if(this.multipleSelection.length == 0){
- this.$message.warning("请选择组");
- return;
- }else if(this.multipleSelection.length > 1){
- this.$message.warning("选中组修改地点不可多选");
- return;
- }
- this.multipleRowId = this.multipleSelection[0].id;
- this.xZGroupDialog = true;
- },
- //重新分配(刷新)
- reallocate(){
- if(this.jiChaJiHuaResult.length && this.jiChaJiHuaResults.length){
- this.$confirm('确定要重新分配, 是否继续?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- request.post(`/tac/worker/b/distributePers`,{
- "currPersId": this.userId,
- "prisId": this.persAreaId
- }).then(res =>{
- if(res.success){
- this.$message.success("重新分配成功");
- this.refreshDistributionLocation();
- }
- })
- }).catch(() => {
- this.$message({
- type: 'info',
- message: '已取消重新分配',
- duration: 1000
- });
- });
- }else{
- this.$message.warning("确定人选和分配地点不能为空");
- }
- },
- //单角色刷新
- SingleRoleRefresh(){
- if(this.jiChaJiHuaResult.length && this.jiChaJiHuaResults.length) {
- this.dialogRoleTypeVisible = true;
- }else{
- this.$message.warning("确定人选和分配地点不能为空");
- }
- },
- roleTypeDetermine(){
- // if(this.jiChaJiHuaResult.length && this.jiChaJiHuaResults.length){
- request.post(`/tac/worker/b/distributePers`,{
- "currPersId": this.userId,
- "prisId": this.persAreaId,
- "roleType": this.roleTypeModel
- }).then(res =>{
- if(res.success){
- this.$message.success("单角色刷新成功");
- this.dialogRoleTypeVisible = false;
- this.refreshDistributionLocation();
- }
- })
- // }
- },
- objTypeDetermine(){
- if(this.objTypeModel){
- request.post(`/tac/insp/year/batch/obj/cleanObjById`,{
- "id": this.objTypeModel,
- "ojbId": this.objTypeModel
- }).then(res =>{
- if(res.success){
- this.$message.success("删除成功");
- this.dialogObjTypeVisible = false;
- this.refreshDistributionLocation();
- }
- })
- }else{
- this.$message.warning("项目不能为空");
- }
- },
- // 刷新分配地点
- refreshDistributionLocation(){
- request.post(`/tac/insp/year/batch/group/getGroupList`,{
- "yearBatchId": this.yearBatchId
- }).then(res =>{
- if(res.success){
- this.$nextTick(() =>{
- this.jiChaJiHuaResult = res.data;
- this.getPerFl(this.jiChaJiHuaResult);
- this.jiChaJiHuaResult.forEach(item =>{
- item.inTm = dateFormat(item.inTm, "yyyy-MM-dd");
- })
- })
- }
- })
- },
- closeDialog(){
- this.editJcDialog = false;
- this.refreshDistributionLocation();
- },
- closeViewDialog(){
- this.viewJcDialog = false;
- this.refreshDistributionLocation();
- },
- //固定分组人员
- confirmerGroupInfo(index,row){
- console.log(row);
- this.confirmerGroupObj = {
- "id": row.id
- };
- this.$confirm("固定分组人员后不能对该组人员进行人员分配,人员刷新,人员单角色刷新操作,是否固定分组人员?", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- })
- .then(() => {
- request.post(`/tac/insp/year/batch/group/confirmerGroup`,this.confirmerGroupObj).then(res =>{
- if(res.success){
- this.confirmerGroupVisible = false;
- this.$message({
- type:'success',
- message:'人员成功',
- duration:2000
- });
- }else{
- this.$message.warning("确认人员失败");
- }
- })
- });
- },
- //分组发送短信
- sendGroupMessage(index,row){
- ;
- console.log(row);
- var sendGroupMessageObj = {
- "id": row.id,
- "yearBatchId":row.yearBatchId
- };
- request.post(`/tac/insp/year/batch/group/sendGroupMessage`,sendGroupMessageObj).then(res =>{
- if(res.success){
- this.confirmerGroupVisible = false;
- this.$message({
- type:'success',
- message:'短信通知发送成功,请注意查收',
- duration:2000
- });
- }else{
- this.$message.warning(res.message);
- }
- })
- },
- },
- watch:{
- distributionLocationResult(n){
- this.jiChaJiHuaResult = n;
- this.getTableListData();
- }
- }
- }
- </script>
- <style>
- .selection-container {
- height:350px;
- margin:10px;
- position: relative;
- left: 50%;
- transform: translateX(-35%);
- }
- .select-box {
- width:250px;
- height:100%;
- float:left;
- border:1px solid #ebeef5;
- border-radius:4px;
- }
- .arrows-box {
- width:110px;
- height:100%;
- float:left;
- position:relative;
- }
- .select-content {
- width:100%;
- height:320px;
- overflow-y:auto;
- overflow-x:hidden;
- }
- .select-box-title {
- height:40px;
- line-height:40px;
- font-size:16px;
- font-family:"微软雅黑";
- padding:0 6%;
- display:flex;
- align-items:center;
- position:relative;
- width:100%;
- background:#f5f7fa;
- border-bottom:1px solid #ebeef5;
- box-sizing:border-box;
- color:#000;
- }
- .arrow-btns {
- width:100%;
- position:absolute;
- top:50%;
- margin-top:-45px;
- text-align: center;
- }
- .arrows-box .el-button+.el-button {
- margin-left: 0 !important;
- }
- p.title{
- display:block;
- width:120px;
- height:30px;
- position:relative;
- top:-25px;
- text-align: center;
- background: white;
- font-size: 18px;
- color: #000;
- font-weight: bold;
- }
- .fpdd input.el-input__inner {
- padding: 0 0 0 15px;
- }
- </style>
|