04e26898fd9e7a4754b018bd1eee5c72af509f08.svn-base 41 KB

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