41a0f53ca30cdb588b7cb92cc0fc94234f413c99.svn-base 38 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948
  1. <template>
  2. <div class="fpdd">
  3. <div>
  4. <el-table
  5. v-loading="loading"
  6. border
  7. ref="et"
  8. :height="tableHeight1"
  9. :data="jiChaJiHuaResult"
  10. tooltip-effect="dark"
  11. style="width: 100%"
  12. @selection-change="handleSelectionChange"
  13. >
  14. <el-table-column
  15. type="selection"
  16. width="55">
  17. </el-table-column>
  18. <el-table-column
  19. header-align="center"
  20. align="center"
  21. min-width="100"
  22. prop="year"
  23. label="年度"
  24. show-overflow-tooltip
  25. ></el-table-column>
  26. <el-table-column
  27. header-align="center"
  28. align="center"
  29. min-width="100"
  30. prop="batch"
  31. label="稽察批次"
  32. show-overflow-tooltip
  33. ></el-table-column>
  34. <el-table-column
  35. header-align="center"
  36. align="center"
  37. min-width="100"
  38. prop="groupNm"
  39. label="组别"
  40. sortable
  41. show-overflow-tooltip
  42. ></el-table-column>
  43. <el-table-column
  44. header-align="center"
  45. align="center"
  46. min-width="200"
  47. label="开始时间"
  48. >
  49. <template slot-scope="scope">
  50. <el-date-picker
  51. style="width: 150px;padding: 0 0 0 30px;"
  52. v-model="scope.row.stTm"
  53. type="date"
  54. value-format="yyyy-MM-dd"
  55. placeholder="开始时间">
  56. </el-date-picker>
  57. </template>
  58. </el-table-column>
  59. <el-table-column
  60. header-align="center"
  61. align="center"
  62. min-width="200"
  63. label="结束时间"
  64. >
  65. <template slot-scope="scope">
  66. <el-date-picker
  67. style="width: 150px;padding: 0 0 0 30px;"
  68. v-model="scope.row.enTm"
  69. type="date"
  70. value-format="yyyy-MM-dd"
  71. placeholder="结束时间">
  72. </el-date-picker>
  73. </template>
  74. </el-table-column>
  75. <el-table-column
  76. header-align="center"
  77. align="center"
  78. min-width="250"
  79. label="稽察地点"
  80. prop="areas"
  81. show-overflow-tooltip
  82. >
  83. </el-table-column>
  84. <el-table-column
  85. header-align="center"
  86. align="center"
  87. min-width="200"
  88. label="稽察项目"
  89. show-overflow-tooltip
  90. >
  91. <template slot-scope="scope">
  92. <transition name="el-fade-in-linear">
  93. <div style="width:100%;height:100%;display:flex;flex-direction:row;justify-content:flex-end;align-items:center;" v-if="!scope.row.objList.length">
  94. <i class="el-icon-plus" style="cursor: pointer;" @click="objTypeClick(scope.$index, scope.row, 20)"></i>
  95. </div>
  96. </transition>
  97. <transition name="el-fade-in-linear">
  98. <div v-if="scope.row.objList.length" style="width:100%;height:100%;display:flex;flex-direction:row;justify-content:flex-end;align-items:center;">
  99. <span>{{scope.row['workersList']&&scope.row['objList'].length?testformatterArray(scope.row['objList'],'ojbNm'):''}}</span>
  100. <i style="margin-left: 5px; cursor: pointer;" class="el-icon-view" title="查看详情"@click="objTypeViewClick(scope.$index, scope.row, 20)"></i>
  101. <i style="margin-left: 5px; cursor: pointer;" class="el-icon-edit" @click="objTypeClick(scope.$index, scope.row, 20)"></i>
  102. <i style="margin-left: 5px; cursor: pointer;" class="el-icon-delete" @click="objTypeDelete(scope.$index, scope.row, 20)"></i>
  103. </div>
  104. </transition>
  105. </template>
  106. </el-table-column>
  107. <!--<el-table-column-->
  108. <!--header-align="center"-->
  109. <!--align="center"-->
  110. <!--min-width="100"-->
  111. <!--prop="workDpNm"-->
  112. <!--label="项目类型"-->
  113. <!--show-overflow-tooltip-->
  114. <!--&gt;</el-table-column>-->
  115. <el-table-column
  116. header-align="center"
  117. align="center"
  118. min-width="200"
  119. v-if="isJx"
  120. label="特派员"
  121. >
  122. <template slot-scope="scope">
  123. <!--<transition name="el-fade-in-linear">-->
  124. <!--<div style="width:100%;height:100%;display:flex;flex-direction:row;justify-content:flex-end;align-items:center;" v-if="!scope.row.special.length">-->
  125. <!--<i class="el-icon-plus" style="margin-left: 5px; cursor: pointer;" @click="roleTypeClick(scope.$index, scope.row, 20)"></i>-->
  126. <!--</div>-->
  127. <!--</transition>-->
  128. <transition name="el-fade-in-linear">
  129. <div v-if="scope.row.commissioner.length" style="width:100%;height:100%;display:flex;flex-direction:row;justify-content:flex-end;align-items:center;">
  130. <span>{{scope.row['commissioner']&&scope.row['commissioner'].length?testformatterArray(scope.row['commissioner'],'name'):''}}</span>
  131. <!--<i style="margin-left: 5px; cursor: pointer;" class="el-icon-edit" @click="roleTypeClick(scope.$index, scope.row, 20)"></i>-->
  132. </div>
  133. </transition>
  134. </template>
  135. </el-table-column>
  136. <el-table-column
  137. header-align="center"
  138. align="center"
  139. min-width="200"
  140. label="专家组长"
  141. >
  142. <template slot-scope="scope">
  143. <!--<transition name="el-fade-in-linear">-->
  144. <!--<div style="width:100%;height:100%;display:flex;flex-direction:row;justify-content:flex-end;align-items:center;" v-if="!scope.row.special.length">-->
  145. <!--<i class="el-icon-plus" style="margin-left: 5px; cursor: pointer;" @click="roleTypeClick(scope.$index, scope.row, 20)"></i>-->
  146. <!--</div>-->
  147. <!--</transition>-->
  148. <transition name="el-fade-in-linear">
  149. <div v-if="scope.row.special.length" style="width:100%;height:100%;display:flex;flex-direction:row;justify-content:flex-end;align-items:center;">
  150. <span>{{scope.row['special']&&scope.row['special'].length?testformatterArray(scope.row['special'],'name'):''}}</span>
  151. <!--<i style="margin-left: 5px; cursor: pointer;" class="el-icon-edit" @click="roleTypeClick(scope.$index, scope.row, 20)"></i>-->
  152. </div>
  153. </transition>
  154. </template>
  155. </el-table-column>
  156. <el-table-column
  157. header-align="center"
  158. align="center"
  159. min-width="200"
  160. label="助理"
  161. show-overflow-tooltip
  162. >
  163. <template slot-scope="scope">
  164. <!--<transition name="el-fade-in-linear">-->
  165. <!--<div style="width:100%;height:100%;display:flex;flex-direction:row;justify-content:flex-end;align-items:center;" v-if="!scope.row.aid.length">-->
  166. <!--<i class="el-icon-plus" style="margin-left: 5px; cursor: pointer;" @click="roleTypeClick(scope.$index, scope.row, 19)"></i>-->
  167. <!--</div>-->
  168. <!--</transition>-->
  169. <transition name="el-fade-in-linear">
  170. <div v-if="scope.row.aid.length" style="width:100%;height:100%;display:flex;flex-direction:row;justify-content:flex-end;align-items:center;">
  171. <span>{{scope.row['aid']&&scope.row['aid'].length?testformatterArray(scope.row['aid'],'name'):''}}</span>
  172. <!--<i class="el-icon-edit" style="margin-left: 5px; cursor: pointer;" @click="roleTypeClick(scope.$index, scope.row, 19)"></i>-->
  173. </div>
  174. </transition>
  175. </template>
  176. </el-table-column>
  177. <el-table-column
  178. header-align="center"
  179. align="center"
  180. min-width="200"
  181. label="前期专家"
  182. show-overflow-tooltip
  183. >
  184. <template slot-scope="scope">
  185. <!--<transition name="el-fade-in-linear">-->
  186. <!--<div style="width:100%;height:100%;display:flex;flex-direction:row;justify-content:flex-end;align-items:center;" v-if="!scope.row.qqzj.length">-->
  187. <!--<i class="el-icon-plus" style="margin-left: 5px; cursor: pointer;" @click="roleTypeClick(scope.$index, scope.row, 11)"></i>-->
  188. <!--</div>-->
  189. <!--</transition>-->
  190. <transition name="el-fade-in-linear">
  191. <div v-if="scope.row.qqzj.length" style="width:100%;height:100%;display:flex;flex-direction:row;justify-content:flex-end;align-items:center;">
  192. <span>{{scope.row['qqzj']&&scope.row['qqzj'].length?testformatterArray(scope.row['qqzj'],'name'):''}}</span>
  193. <!--<i class="el-icon-edit" style="margin-left: 5px; cursor: pointer;" @click="roleTypeClick(scope.$index, scope.row, 11)"></i>-->
  194. </div>
  195. </transition>
  196. </template>
  197. </el-table-column>
  198. <el-table-column
  199. header-align="center"
  200. align="center"
  201. min-width="150"
  202. label="建管专家"
  203. show-overflow-tooltip
  204. >
  205. <template slot-scope="scope">
  206. <!--<transition name="el-fade-in-linear">-->
  207. <!--<div style="width:100%;height:100%;display:flex;flex-direction:row;justify-content:flex-end;align-items:center;" v-if="!scope.row.jgzj.length">-->
  208. <!--<i class="el-icon-plus" style="margin-left: 5px; cursor: pointer;" @click="roleTypeClick(scope.$index, scope.row, 12)"></i>-->
  209. <!--</div>-->
  210. <!--</transition>-->
  211. <transition name="el-fade-in-linear">
  212. <div v-if="scope.row.jgzj.length" style="width:100%;height:100%;display:flex;flex-direction:row;justify-content:flex-end;align-items:center;">
  213. <span>{{scope.row['jgzj']&&scope.row['jgzj'].length?testformatterArray(scope.row['jgzj'],'name'):''}}</span>
  214. <!--<i class="el-icon-edit" style="margin-left: 5px; cursor: pointer;" @click="roleTypeClick(scope.$index, scope.row, 12)"></i>-->
  215. </div>
  216. </transition>
  217. </template>
  218. </el-table-column>
  219. <el-table-column
  220. header-align="center"
  221. align="center"
  222. min-width="150"
  223. label="计划专家"
  224. show-overflow-tooltip
  225. >
  226. <template slot-scope="scope">
  227. <!--<transition name="el-fade-in-linear">-->
  228. <!--<div style="width:100%;height:100%;display:flex;flex-direction:row;justify-content:flex-end;align-items:center;" v-if="!scope.row.jhzj.length">-->
  229. <!--<i class="el-icon-plus" style="margin-left: 5px; cursor: pointer;" @click="roleTypeClick(scope.$index, scope.row, 13)"></i>-->
  230. <!--</div>-->
  231. <!--</transition>-->
  232. <transition name="el-fade-in-linear">
  233. <div v-if="scope.row.jhzj.length" style="width:100%;height:100%;display:flex;flex-direction:row;justify-content:flex-end;align-items:center;">
  234. <span>{{scope.row['jhzj']&&scope.row['jhzj'].length?testformatterArray(scope.row['jhzj'],'name'):''}}</span>
  235. <!--<i class="el-icon-edit" style="margin-left: 5px; cursor: pointer;" @click="roleTypeClick(scope.$index, scope.row, 13)"></i>-->
  236. </div>
  237. </transition>
  238. </template>
  239. </el-table-column>
  240. <el-table-column
  241. header-align="center"
  242. align="center"
  243. min-width="150"
  244. label="财务专家"
  245. show-overflow-tooltip
  246. >
  247. <template slot-scope="scope">
  248. <!--<transition name="el-fade-in-linear">-->
  249. <!--<div style="width:100%;height:100%;display:flex;flex-direction:row;justify-content:flex-end;align-items:center;" v-if="!scope.row.cwzj.length">-->
  250. <!--<i class="el-icon-plus" style="margin-left: 5px; cursor: pointer;" @click="roleTypeClick(scope.$index, scope.row, 14)"></i>-->
  251. <!--</div>-->
  252. <!--</transition>-->
  253. <transition name="el-fade-in-linear">
  254. <div v-if="scope.row.cwzj.length" style="width:100%;height:100%;display:flex;flex-direction:row;justify-content:flex-end;align-items:center;">
  255. <span>{{scope.row['cwzj']&&scope.row['cwzj'].length?testformatterArray(scope.row['cwzj'],'name'):''}}</span>
  256. <!--<i class="el-icon-edit" style="margin-left: 5px; cursor: pointer;" @click="roleTypeClick(scope.$index, scope.row, 14)"></i>-->
  257. </div>
  258. </transition>
  259. </template>
  260. </el-table-column>
  261. <el-table-column
  262. header-align="center"
  263. align="center"
  264. min-width="150"
  265. label="质量专家"
  266. show-overflow-tooltip
  267. >
  268. <template slot-scope="scope">
  269. <!--<transition name="el-fade-in-linear">-->
  270. <!--<div style="width:100%;height:100%;display:flex;flex-direction:row;justify-content:flex-end;align-items:center;" v-if="!scope.row.zlzj.length">-->
  271. <!--<i class="el-icon-plus" style="margin-left: 5px; cursor: pointer;" @click="roleTypeClick(scope.$index, scope.row, 15)"></i>-->
  272. <!--</div>-->
  273. <!--</transition>-->
  274. <transition name="el-fade-in-linear">
  275. <div v-if="scope.row.zlzj.length" style="width:100%;height:100%;display:flex;flex-direction:row;justify-content:flex-end;align-items:center;">
  276. <span>{{scope.row['zlzj']&&scope.row['zlzj'].length?testformatterArray(scope.row['zlzj'],'name'):''}}</span>
  277. <!--<i class="el-icon-edit" style="margin-left: 5px; cursor: pointer;" @click="roleTypeClick(scope.$index, scope.row, 15)"></i>-->
  278. </div>
  279. </transition>
  280. </template>
  281. </el-table-column>
  282. <el-table-column
  283. header-align="center"
  284. align="center"
  285. min-width="150"
  286. label="安全专家"
  287. show-overflow-tooltip
  288. >
  289. <template slot-scope="scope">
  290. <!--<transition name="el-fade-in-linear">-->
  291. <!--<div style="width:100%;height:100%;display:flex;flex-direction:row;justify-content:flex-end;align-items:center;" v-if="!scope.row.aqzj.length">-->
  292. <!--<i class="el-icon-plus" style="margin-left: 5px; cursor: pointer;" @click="roleTypeClick(scope.$index, scope.row, 16)"></i>-->
  293. <!--</div>-->
  294. <!--</transition>-->
  295. <transition name="el-fade-in-linear">
  296. <div v-if="scope.row.aqzj.length" style="width:100%;height:100%;display:flex;flex-direction:row;justify-content:flex-end;align-items:center;">
  297. <span style="justify-content:flex-start;">{{scope.row['aqzj']&&scope.row['aqzj'].length?testformatterArray(scope.row['aqzj'],'name'):''}}</span>
  298. <!--<i class="el-icon-edit" style="margin-left: 5px; cursor: pointer;" @click="roleTypeClick(scope.$index, scope.row, 16)"></i>-->
  299. </div>
  300. </transition>
  301. </template>
  302. </el-table-column>
  303. <el-table-column
  304. header-align="center"
  305. align="center"
  306. min-width="220"
  307. prop="remark"
  308. label="备注"
  309. >
  310. <!--<template slot-scope="scope">-->
  311. <!--<el-input-->
  312. <!--style="width: 150px;padding: 0 0 0 30px;"-->
  313. <!--v-model="scope.row.remark"-->
  314. <!--size="small"-->
  315. <!--@change="handleBzEdit(scope.$index, scope.row)"-->
  316. <!--readonly>-->
  317. <!--</el-input>-->
  318. <!--</template>-->
  319. </el-table-column>
  320. <!--<el-table-column-->
  321. <!--header-align="center"-->
  322. <!--align="center"-->
  323. <!--min-width="120"-->
  324. <!--label="稽察组长联系"-->
  325. <!--&gt;</el-table-column>-->
  326. <el-table-column
  327. header-align="center"
  328. align="center"
  329. min-width="220"
  330. label="检测单位"
  331. prop="audUnits"
  332. >
  333. <!--<template slot-scope="scope">-->
  334. <!--<el-input-->
  335. <!--style="width: 150px;padding: 0 0 0 30px;"-->
  336. <!--v-model="scope.row.audUnits"-->
  337. <!--size="small"-->
  338. <!--@change="handleBzEdit(scope.$index, scope.row)"-->
  339. <!--readonly>-->
  340. <!--</el-input>-->
  341. <!--</template>-->
  342. </el-table-column>
  343. <el-table-column
  344. header-align="center"
  345. align="center"
  346. min-width="220"
  347. label="稽察处别"
  348. prop="audCategory"
  349. >
  350. <!--<template slot-scope="scope">-->
  351. <!--<el-input-->
  352. <!--style="width: 150px;padding: 0 0 0 30px;"-->
  353. <!--v-model="scope.row.audCategory"-->
  354. <!--size="small"-->
  355. <!--@change="handleBzEdit(scope.$index, scope.row)"-->
  356. <!--readonly>-->
  357. <!--</el-input>-->
  358. <!--</template>-->
  359. </el-table-column>
  360. </el-table>
  361. <el-row style="margin-top: 15px;">
  362. <el-col :span="24">
  363. <el-button type="primary" size="medium" @click="addNewGroup">添加新组</el-button>
  364. <el-button type="primary" size="medium" @click="delXzGroup">删除选中组</el-button>
  365. <el-button type="primary" size="medium" @click="XzGroupLoction">选中组修改地点</el-button>
  366. </el-col>
  367. </el-row>
  368. <el-row style="margin-top: 15px;">
  369. <el-col :span="12">
  370. <span>蓝色:历史稽察地规避失败,红色:地域规避失败,黄色:手动添加更改,粉色:被删除的人员</span>
  371. </el-col>
  372. <el-col :span="12" style="text-align: right;">
  373. <!--<el-button type="success" size="medium">导出Excel</el-button>-->
  374. </el-col>
  375. </el-row>
  376. </div>
  377. <el-dialog :close-on-click-modal="false" title="请选择要进行的操作" :visible.sync="XzRyJsVisible" width="40%" :modal-append-to-body="true" :append-to-body="true">
  378. <div style="text-align: center;">
  379. <span>请选择角色</span>
  380. <el-select v-model="XzJsType" clearable placeholder="请选择">
  381. <el-option :label="item.label" :value="item.value" v-for="(item,index) in XzJsTypeData" :key="index"></el-option>
  382. </el-select>
  383. </div>
  384. <div slot="footer" class="dialog-footer">
  385. <el-button type="danger" @click="XzRyJsVisible = false" size="medium">取 消</el-button>
  386. <el-button type="primary" @click="XzRyJsInfo" size="medium">确 定</el-button>
  387. </div>
  388. </el-dialog>
  389. <NewPersXzInfo v-if="addPersDialog" :roleTypes="roleType" :yearBatchId="yearBatchId" editAdd="editAdd" :rowData="rowData" :changeEdit="changeEdit" :changeDataList="changeDataList" @closeXzPers="closeXzPers"></NewPersXzInfo>
  390. <el-dialog :close-on-click-modal="false" title="请选择人员" :visible.sync="XzPersDialog" width="40%" :modal-append-to-body="true" :append-to-body="true">
  391. <div style="text-align: center;">
  392. <span>请选择人员</span>
  393. <el-select v-model="XzPers" clearable placeholder="请选择" multiple @change="changeDataClick" value-key="name">
  394. <el-option v-for="(item,index) in persListData" :label="item.name" :key="item.id" :value="item"></el-option>
  395. </el-select>
  396. </div>
  397. <div slot="footer" class="dialog-footer">
  398. <el-button type="danger" @click="XzPersDialog = false" size="medium">取 消</el-button>
  399. <el-button type="primary" @click="XzPersQd" size="medium">确 定</el-button>
  400. </div>
  401. </el-dialog>
  402. <!--确定稽察地点及原则-->
  403. <jiChaDiDian v-if="qdDdYzDialog" :yearBatchId="yearBatchId" @closeJcDdDialog="closeJcDdDialog" :changeUrl="changeUrl"></jiChaDiDian>
  404. <!--选中组修改地点-->
  405. <xuanZhongZuDiDian v-if="xZGroupDialog" :persAreaId="persAreaId" @closeXzGroupDdDialog="closeXzGroupDdDialog" :changeUrl="changeUrl" :multipleRowId="multipleRowId"></xuanZhongZuDiDian>
  406. <el-dialog :close-on-click-modal="false" title="请选择角色" :visible.sync="dialogRoleTypeVisible" width="40%" :modal-append-to-body="true" :append-to-body="true">
  407. <div style="text-align: center;">
  408. <span>请选择角色</span>
  409. <el-select v-model="roleTypeModel" clearable placeholder="请选择">
  410. <el-option :label="item.label" :value="item.value" v-for="(item,index) in roleTypeData" :key="index"></el-option>
  411. </el-select>
  412. </div>
  413. <div slot="footer" class="dialog-footer">
  414. <el-button type="danger" @click="dialogRoleTypeVisible = false" size="medium">取 消</el-button>
  415. <el-button type="primary" @click="roleTypeDetermine" size="medium">确 定</el-button>
  416. </div>
  417. </el-dialog>
  418. <!--稽察项目编辑-->
  419. <editDcdxInfo :nodeAreaList="nodeAreaList" :nodeRow="nodeRow" @closeDialog="closeDialog" v-if="editJcDialog"></editDcdxInfo>
  420. <!--稽察项目查看-->
  421. <viewDcdxInfo v-if="viewJcDialog" :groupId="groupId" @closeDialog="closeViewDialog"></viewDcdxInfo>
  422. <el-dialog :close-on-click-modal="false" title="请选择要删除的项目" :visible.sync="dialogObjTypeVisible" width="40%" :modal-append-to-body="true" :append-to-body="true">
  423. <div style="text-align: center;">
  424. <span>项目</span>
  425. <el-select v-model="objTypeModel" clearable placeholder="请选择">
  426. <el-option :label="item.ojbNm" :value="item.id" v-for="(item,index) in objTypeData" :key="index"></el-option>
  427. </el-select>
  428. </div>
  429. <div slot="footer" class="dialog-footer">
  430. <el-button type="danger" @click="dialogObjTypeVisible = false" size="medium">取 消</el-button>
  431. <el-button type="primary" @click="objTypeDetermine" size="medium">确 定</el-button>
  432. </div>
  433. </el-dialog>
  434. </div>
  435. </template>
  436. <script>
  437. import { dateFormat } from '../../utils/gw_date';
  438. import {
  439. formatterValueToLabel,
  440. formatterArrayToLabel
  441. } from "../../utils/gw_formatter.js";
  442. import request from '../../utils/gw_ajax_request'
  443. import NewPersXzInfo from './NewPersXzInfo'
  444. import jiChaDiDian from './jiChaDiDian'
  445. import xuanZhongZuDiDian from './xuanZhongZuDiDian'
  446. export default {
  447. name: "fenPeiDidian",
  448. props: ["distributionLocationResult","persAreaId","yearBatchId","jiChaJiHuaResults"],
  449. components:{
  450. NewPersXzInfo,
  451. jiChaDiDian,
  452. xuanZhongZuDiDian,
  453. editDcdxInfo:resolve => {require(['./editDcdxInfo_jc.vue'],resolve)},
  454. viewDcdxInfo:resolve => {require(['./viewDcdxInfo_jc.vue'],resolve)},
  455. },
  456. data(){
  457. return {
  458. loading:false,
  459. multipleSelection:[],
  460. jiChaJiHuaResult:[],
  461. tableHeight1: window.innerHeight * .5 - 50,
  462. XzRyJsVisible: false,
  463. XzJsType: "",
  464. XzJsTypeData:[
  465. {
  466. label:"添加人员",
  467. value: "2"
  468. },
  469. {
  470. label:"更换人员",
  471. value: "3"
  472. },
  473. {
  474. label:"删除人员",
  475. value: "4"
  476. }
  477. ],
  478. addPersDialog: false,
  479. roleType: "",
  480. rowData: "",
  481. persListData:[],
  482. XzPersDialog: false,
  483. XzPers: [],
  484. changeEdit:"",
  485. changeDataList:[],
  486. qdDdYzDialog: false,
  487. changeUrl:"",
  488. xZGroupDialog: false,
  489. dialogRoleTypeVisible:false,
  490. roleTypeModel: "",
  491. dialogObjTypeVisible: false,
  492. objTypeData:[],
  493. objTypeModel: "",
  494. multipleRowId:"",
  495. nodeAreaList:[],
  496. nodeRow:"",
  497. editJcDialog: false,
  498. viewJcDialog: false,
  499. groundId: "",
  500. }
  501. },
  502. mounted(){
  503. this.getTableListData();
  504. },
  505. computed:{
  506. userId:function(){
  507. return localStorage.getItem("userid")? localStorage.getItem("userid"): '1098101939614724096'
  508. },
  509. roleTypeData(){
  510. return this.$store.state.jcState.roleTypeData;
  511. },
  512. isJx() {
  513. return localStorage.getItem('currentRlcode').substring(0,2)=="36";
  514. }
  515. },
  516. methods:{
  517. getTableListData(){
  518. this.$nextTick(() =>{
  519. // //debugger
  520. this.jiChaJiHuaResult = this.distributionLocationResult;
  521. this.jiChaJiHuaResult.forEach(item =>{
  522. item.stTm = item.stTm ? dateFormat(item.stTm, "yyyy-MM-dd") : '';
  523. item.enTm = item.enTm ? dateFormat(item.enTm, "yyyy-MM-dd") : '';
  524. })
  525. this.getPerFl(this.jiChaJiHuaResult);
  526. })
  527. },
  528. getPerFl(arr){
  529. // 为列表分开稽察组长,助理,前期专家
  530. arr.forEach(element => {
  531. element["qqzj"] = [];//前期专家
  532. element["jgzj"] = [];//建管专家
  533. element["jhzj"] = [];//计划专家
  534. element["cwzj"] = [];//财务专家
  535. element["zlzj"] = [];//质量专家
  536. element["aqzj"] = [];//安全专家
  537. element["aid"] = [];//助理
  538. element["special"] = [];//专家组长
  539. element["commissioner"] = [];//特派员
  540. element["workersList"].forEach(per => {
  541. if (per.roleType == "11") {
  542. element["qqzj"].push(per);
  543. } else if (per.roleType == "12") {
  544. element["jgzj"].push(per);
  545. } else if (per.roleType == "13") {
  546. element["jhzj"].push(per);
  547. } else if (per.roleType == "14") {
  548. element["cwzj"].push(per);
  549. }else if (per.roleType == "15") {
  550. element["zlzj"].push(per);
  551. } else if (per.roleType == "16") {
  552. element["aqzj"].push(per);
  553. } else if (per.roleType == "19") {
  554. element["aid"].push(per);
  555. } else if (per.roleType == "20") {
  556. element["special"].push(per);
  557. } else if (per.roleType == "21") {
  558. element["commissioner"].push(per);
  559. }
  560. });
  561. });
  562. },
  563. //确定稽察地点及原则
  564. qrJcDd(){
  565. this.changeUrl = 'edit';
  566. this.qdDdYzDialog = true;
  567. },
  568. handleSelectionChange(val) {
  569. console.log(val);
  570. this.multipleSelection = val;
  571. },
  572. handleDdEdit(index, row) {
  573. console.log(index, row);
  574. },
  575. //备注
  576. handleBzEdit(index, row) {
  577. console.log(index, row);
  578. },
  579. //稽察组长编辑
  580. roleTypeClick(index, row, value){
  581. console.log(index, row, value);
  582. this.XzJsType = "";
  583. this.XzRyJsVisible = true;
  584. this.roleType = value;
  585. this.rowData = row;
  586. },
  587. //稽察项目编辑
  588. objTypeClick(index, row, value){
  589. console.log(index, row, value);
  590. if(row.areaList){
  591. this.nodeAreaList = row.areaList;
  592. }
  593. this.nodeRow = row;
  594. this.editJcDialog = true;
  595. },
  596. //稽察项目查看
  597. objTypeViewClick(index, row, value){
  598. this.groupId = row.id;
  599. console.log(index, row, value);
  600. this.viewJcDialog = true;
  601. },
  602. //稽察项目删除
  603. objTypeDelete(index, row, value){
  604. this.$confirm('此操作将删除该项目所有数据, 是否继续?', '提示', {
  605. confirmButtonText: '确定',
  606. cancelButtonText: '取消',
  607. type: 'warning'
  608. }).then(() => {
  609. console.log(index, row, value);
  610. this.$nextTick(()=>{
  611. this.objTypeData = row.objList;
  612. this.objTypeModel = "";
  613. this.dialogObjTypeVisible = true;
  614. })
  615. })
  616. },
  617. // 选择人员角色确定
  618. XzRyJsInfo(){
  619. if(this.XzJsType){
  620. this.XzPers = "";
  621. if(this.XzJsType == '2'){
  622. this.changeEdit = "add";
  623. this.addPersDialog = true;
  624. }else if(this.XzJsType == '3'){
  625. this.XzPersDialog = true;
  626. this.getPersList();
  627. }else if(this.XzJsType == '4'){
  628. this.XzPersDialog = true;
  629. this.getPersList();
  630. }
  631. this.XzRyJsVisible = false;
  632. }else{
  633. this.$message.warning("请选择角色");
  634. return;
  635. }
  636. },
  637. getPersList(){
  638. request.post(`/tac/worker/b/getWorkerbsListById`,{
  639. "roleType": this.roleType,
  640. "groupId": this.rowData.id
  641. }).then(res =>{
  642. if(res.success){
  643. this.persListData = res.data;
  644. }
  645. })
  646. },
  647. XzPersQd(){
  648. if(this.XzPers.length == "0"){
  649. this.$message.warning("请选择人员");
  650. return ;
  651. }
  652. if(this.XzJsType == '3'){
  653. this.changeEdit = "change";
  654. this.addPersDialog = true;
  655. }else if(this.XzJsType == '4'){
  656. if(this.changeDataList.length == "0"){
  657. this.$message.warning("请选择人员");
  658. }else{
  659. let obj = {
  660. "updateBs": this.changeDataList,
  661. "batchId": this.yearBatchId,
  662. "groupNm": this.rowData.groupNm,
  663. "groupId": this.rowData.id
  664. };
  665. request.post(`/tac/insp/year/batch/group/pers/updateGroupPers
  666. `,obj).then(res =>{
  667. if(res.success){
  668. this.$message.success("删除成功");
  669. this.XzPersDialog = false;
  670. this.refreshDistributionLocation();
  671. }else{
  672. this.$message.warning(res.message);
  673. }
  674. })
  675. }
  676. }
  677. },
  678. // closeXzRyDialog(){
  679. //
  680. // },
  681. //关闭稽察地点
  682. closeJcDdDialog(){
  683. this.qdDdYzDialog = false;
  684. this.refreshDistributionLocation();
  685. },
  686. //关闭选中组
  687. closeXzGroupDdDialog(){
  688. this.xZGroupDialog = false;
  689. this.refreshDistributionLocation();
  690. },
  691. closeXzPers(){
  692. this.addPersDialog = false;
  693. this.XzPersDialog = false;
  694. this.refreshDistributionLocation();
  695. },
  696. changeDataClick(item){
  697. console.log(item);
  698. this.changeDataList = item;
  699. },
  700. testformatterArray: function(
  701. arr,
  702. labelPropName,
  703. splitMark = ",",
  704. nonLabel = "",
  705. isAddNonLabel = true
  706. ) {
  707. let r = formatterArrayToLabel(
  708. arr,
  709. labelPropName,
  710. (splitMark = ","),
  711. (nonLabel = ""),
  712. (isAddNonLabel = true)
  713. );
  714. return r;
  715. },
  716. // 添加新组
  717. addNewGroup(){
  718. this.changeUrl = 'add';
  719. this.qdDdYzDialog = true;
  720. },
  721. // 删除选中组
  722. delXzGroup(){
  723. if(this.multipleSelection.length == 0){
  724. this.$message.warning("请选择组");
  725. return;
  726. }
  727. this.$confirm('确定要删除该组, 是否继续?', '提示', {
  728. confirmButtonText: '确定',
  729. cancelButtonText: '取消',
  730. type: 'warning'
  731. }).then(() => {
  732. let obj = {
  733. "groupList": this.multipleSelection
  734. }
  735. request.post(`/tac/insp/year/batch/group/deleteGroupList`,obj).then(res =>{
  736. if(res.success){
  737. this.$message.success("删除成功");
  738. this.refreshDistributionLocation();
  739. }else{
  740. this.$message.warning(res.message);
  741. }
  742. })
  743. }).catch(() => {
  744. this.$message({
  745. type: 'info',
  746. message: '已取消删除',
  747. duration: 1000
  748. });
  749. });
  750. },
  751. //选中组中添加地点
  752. XzGroupLoction(){
  753. if(this.multipleSelection.length == 0){
  754. this.$message.warning("请选择组");
  755. return;
  756. }else if(this.multipleSelection.length > 1){
  757. this.$message.warning("选中组修改地点不可多选");
  758. return;
  759. }
  760. this.multipleRowId = this.multipleSelection[0].id;
  761. this.xZGroupDialog = true;
  762. },
  763. //重新分配(刷新)
  764. reallocate(){
  765. if(this.jiChaJiHuaResult.length && this.jiChaJiHuaResults.length){
  766. this.$confirm('确定要重新分配, 是否继续?', '提示', {
  767. confirmButtonText: '确定',
  768. cancelButtonText: '取消',
  769. type: 'warning'
  770. }).then(() => {
  771. request.post(`/tac/worker/b/distributePers`,{
  772. "currPersId": this.userId,
  773. "prisId": this.persAreaId
  774. }).then(res =>{
  775. if(res.success){
  776. this.$message.success("重新分配成功");
  777. this.refreshDistributionLocation();
  778. }else{
  779. this.$message.error(res.message);
  780. }
  781. })
  782. }).catch(() => {
  783. this.$message({
  784. type: 'info',
  785. message: '已取消重新分配',
  786. duration: 1000
  787. });
  788. });
  789. }else{
  790. this.$message.warning("确定人选和分配地点不能为空");
  791. }
  792. },
  793. //单角色刷新
  794. SingleRoleRefresh(){
  795. if(this.jiChaJiHuaResult.length && this.jiChaJiHuaResults.length) {
  796. this.dialogRoleTypeVisible = true;
  797. }else{
  798. this.$message.warning("确定人选和分配地点不能为空");
  799. }
  800. },
  801. roleTypeDetermine(){
  802. // if(this.jiChaJiHuaResult.length && this.jiChaJiHuaResults.length){
  803. request.post(`/tac/worker/b/distributePers`,{
  804. "currPersId": this.userId,
  805. "prisId": this.persAreaId,
  806. "roleType": this.roleTypeModel
  807. }).then(res =>{
  808. if(res.success){
  809. this.$message.success("单角色刷新成功");
  810. this.dialogRoleTypeVisible = false;
  811. this.refreshDistributionLocation();
  812. }
  813. })
  814. // }
  815. },
  816. objTypeDetermine(){
  817. if(this.objTypeModel){
  818. request.post(`/tac/insp/year/batch/obj/cleanObjById`,{
  819. "id": this.objTypeModel,
  820. "ojbId": this.objTypeModel
  821. }).then(res =>{
  822. if(res.success){
  823. this.$message.success("删除成功");
  824. this.dialogObjTypeVisible = false;
  825. this.refreshDistributionLocation();
  826. }
  827. })
  828. }else{
  829. this.$message.warning("项目不能为空");
  830. }
  831. },
  832. // 刷新分配地点
  833. refreshDistributionLocation(){
  834. request.post(`/tac/insp/year/batch/group/getGroupList`,{
  835. "yearBatchId": this.yearBatchId
  836. }).then(res =>{
  837. if(res.success){
  838. this.$nextTick(() =>{
  839. this.jiChaJiHuaResult = res.data;
  840. this.getPerFl(this.jiChaJiHuaResult);
  841. this.jiChaJiHuaResult.forEach(item =>{
  842. item.stTm = item.stTm ? dateFormat(item.stTm, "yyyy-MM-dd") : '';
  843. item.enTm = item.enTm ? dateFormat(item.enTm, "yyyy-MM-dd") : '';
  844. item.inTm = item.inTm ? dateFormat(item.inTm, "yyyy-MM-dd") : '';
  845. })
  846. })
  847. }
  848. })
  849. },
  850. closeDialog(){
  851. this.editJcDialog = false;
  852. this.refreshDistributionLocation();
  853. },
  854. closeViewDialog(){
  855. this.viewJcDialog = false;
  856. this.refreshDistributionLocation();
  857. }
  858. },
  859. watch:{
  860. distributionLocationResult(n){
  861. this.jiChaJiHuaResult = n;
  862. this.getTableListData();
  863. }
  864. }
  865. }
  866. </script>
  867. <style lang="scss">
  868. .selection-container {
  869. height:350px;
  870. margin:10px;
  871. position: relative;
  872. left: 50%;
  873. transform: translateX(-38%);
  874. }
  875. .select-box {
  876. width:14vw;
  877. height:100%;
  878. float:left;
  879. border:1px solid #ebeef5;
  880. border-radius:4px;
  881. }
  882. .arrows-box {
  883. width:110px;
  884. height:100%;
  885. float:left;
  886. position:relative;
  887. }
  888. .select-content {
  889. width:100%;
  890. height:310px;
  891. overflow-y:auto;
  892. overflow-x:hidden;
  893. }
  894. .select-box-title {
  895. height:40px;
  896. line-height:40px;
  897. font-size:16px;
  898. font-family:"微软雅黑";
  899. padding:0 6%;
  900. display:flex;
  901. align-items:center;
  902. position:relative;
  903. width:100%;
  904. background:#f5f7fa;
  905. border-bottom:1px solid #ebeef5;
  906. box-sizing:border-box;
  907. color:#000;
  908. }
  909. .arrow-btns {
  910. width:100%;
  911. position:absolute;
  912. top:50%;
  913. margin-top:-45px;
  914. text-align: center;
  915. }
  916. .arrows-box .el-button+.el-button {
  917. margin-left: 0 !important;
  918. }
  919. p.title{
  920. display:block;
  921. width:120px;
  922. height:30px;
  923. position:relative;
  924. top:-25px;
  925. text-align: center;
  926. background: white;
  927. font-size: 18px;
  928. color: #000;
  929. font-weight: bold;
  930. }
  931. </style>