60dd7976ae8315ee79a0c0ef6bae7ecb6a7290a3.svn-base 63 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577
  1. <template>
  2. <el-container class="monthReport">
  3. <el-card class="box-card">
  4. <!-- <el-button type="primary" icon="el-icon-back" @click="back" style="float:left;margin-right: 10px;">返回</el-button>-->
  5. <h3 class="title_monthReport" style="font-size: 20px !important;font-weight: bold !important;color: black !important;">
  6. 实施检查计划
  7. </h3>
  8. <el-form :inline="true" size="mini" class="demo-form-inline" label-width="80px">
  9. <!-- <el-form-item label="检查计划事项">-->
  10. <!-- <el-input v-model="searchForm.planningMatters" placeholder="检查计划事项" clearable></el-input>-->
  11. <!-- </el-form-item>-->
  12. <!-- <el-form-item label="检查计划事项">-->
  13. <!-- <el-select-->
  14. <!-- filterable-->
  15. <!-- v-model="searchForm.yearId"-->
  16. <!-- @change="changeYearSearch"-->
  17. <!-- placeholder="请选择检查计划事项">-->
  18. <!-- <el-option-->
  19. <!-- v-for="item in yearPlanDepList"-->
  20. <!-- :key="item.id"-->
  21. <!-- :label="item.chkName"-->
  22. <!-- :value="item.id">-->
  23. <!-- </el-option>-->
  24. <!-- </el-select>-->
  25. <!-- </el-form-item>-->
  26. <!-- <el-form-item label="详细检查计划名称">-->
  27. <!-- <el-select-->
  28. <!-- filterable-->
  29. <!-- v-model="searchForm.dtlId"-->
  30. <!-- @change="changeDlt"-->
  31. <!-- placeholder="请选择详细检查计划">-->
  32. <!-- <el-option-->
  33. <!-- v-for="item in dtlList"-->
  34. <!-- :key="item.id"-->
  35. <!-- :label="item.nm"-->
  36. <!-- :value="item.id">-->
  37. <!-- </el-option>-->
  38. <!-- </el-select>-->
  39. <!-- </el-form-item>-->
  40. <el-form-item label="检查组">
  41. <el-input v-model="searchForm.inspectionTeam" placeholder="检查组" clearable></el-input>
  42. </el-form-item>
  43. <el-form-item label="年月">
  44. <el-date-picker
  45. v-model="searchForm.years"
  46. type="month"
  47. clearable
  48. placeholder="选择年月">
  49. </el-date-picker>
  50. </el-form-item>
  51. <el-form-item label="地区">
  52. <el-input v-model="searchForm.adName" placeholder="地区" clearable></el-input>
  53. </el-form-item>
  54. <!-- <el-form-item label="是否重复">-->
  55. <!-- <el-select v-model="searchForm.isR" clearable placeholder="是否重复">-->
  56. <!-- <el-option v-for="(item,index) in isRList" :label="item.label" :value="item.value"></el-option>-->
  57. <!-- </el-select>-->
  58. <!-- </el-form-item>-->
  59. <el-form-item label="检查单位">
  60. <el-input v-model="searchForm.inspectionUnit" placeholder="检查单位" clearable></el-input>
  61. </el-form-item>
  62. <!-- <el-form-item label="计划分类" v-if="isJdc">-->
  63. <!-- <el-select v-model="searchForm.grad" placeholder="计划分类" clearable>-->
  64. <!-- <el-option v-for="item in gradList" :label="item.label" :value="item.value"></el-option>-->
  65. <!-- </el-select>-->
  66. <!-- </el-form-item>-->
  67. </el-form>
  68. <div>
  69. <div style="text-align: right;float:right;padding: 20px;">
  70. <el-button type="primary" size="mini" @click="searchBtn">查询</el-button>
  71. <el-button type="success" size="mini" @click="addBtn" style="margin-left: 10px;margin-right: 10px;" v-if="(isEdit && isCityCountry) || !isCityCountry">添加分组</el-button>
  72. <span v-if="isJdc || (isEdit && isCityCountry)" style="color:red;font-size: 10px;">{{curTimeTip}}</span>
  73. </div>
  74. <el-table
  75. border
  76. ref="multipleTable"
  77. :height="tableHeight"
  78. :data="tableData"
  79. default-expand-all
  80. @expand-change="expandChange"
  81. tooltip-effect="dark"
  82. style="width: 100%"
  83. v-loading="loading">
  84. <el-table-column type="expand">
  85. <template slot-scope="scope">
  86. <div style="width:calc(100% - 40px);margin-left: 40px;">
  87. <el-table :data="scope.row.groupList">
  88. <el-table-column prop="nm" label="督查类型"></el-table-column>
  89. <el-table-column prop="quantity" label="计划检查项目数量"></el-table-column>
  90. <el-table-column prop="" label="项目名称" >
  91. <template slot-scope="scope1">
  92. {{formatObjNames(scope1.row)}}
  93. </template>
  94. </el-table-column>
  95. <el-table-column
  96. align="center"
  97. width="200"
  98. label="操作"
  99. fixed="right">
  100. <template slot-scope="scope1">
  101. <el-button type="primary" size="mini" @click="editType(scope.row,scope1.row)" :disabled="!(scope.row.state=='1' && ((isEdit && isCityCountry) || !isCityCountry))">编辑</el-button>
  102. <el-button type="danger" size="mini" @click.stop="deleteDataType(scope1.row)" :disabled="!(scope.row.state=='1' && ((isEdit && isCityCountry) || !isCityCountry))">删除</el-button>
  103. </template>
  104. </el-table-column>
  105. </el-table>
  106. </div>
  107. </template>
  108. </el-table-column>
  109. <el-table-column align="center" type="index" label="序号" width="80">
  110. <template slot-scope="scope">{{ scope.$index + 1}}</template>
  111. </el-table-column>
  112. <el-table-column
  113. header-align="center"
  114. align="center"
  115. min-width="180"
  116. prop="chkName"
  117. label="检查计划事项"
  118. show-overflow-tooltip>
  119. </el-table-column>
  120. <el-table-column
  121. header-align="center"
  122. align="center"
  123. min-width="180"
  124. prop="dtlName"
  125. label="详细检查计划名称"
  126. show-overflow-tooltip>
  127. </el-table-column>
  128. <el-table-column
  129. header-align="center"
  130. align="center"
  131. min-width="180"
  132. prop="pnm"
  133. label="检查组名称"
  134. show-overflow-tooltip>
  135. </el-table-column>
  136. <el-table-column
  137. header-align="center"
  138. align="center"
  139. min-width="120"
  140. prop="planDpNm"
  141. label="检查单位"
  142. show-overflow-tooltip>
  143. </el-table-column>
  144. <el-table-column
  145. header-align="center"
  146. align="center"
  147. min-width="120"
  148. prop=""
  149. label="检查区域"
  150. show-overflow-tooltip>
  151. <template slot-scope="scope">
  152. {{formatArea(scope.row)}}
  153. </template>
  154. </el-table-column>
  155. <el-table-column
  156. header-align="center"
  157. align="center"
  158. min-width="120"
  159. prop="quantity"
  160. label="计划检查项目数量"
  161. show-overflow-tooltip
  162. ></el-table-column>
  163. <el-table-column
  164. header-align="center"
  165. align="center"
  166. min-width="80"
  167. prop=""
  168. label="组长"
  169. show-overflow-tooltip
  170. >
  171. <template slot-scope="scope">
  172. {{formatPersType(scope.row,"1")}}
  173. </template>
  174. </el-table-column>
  175. <el-table-column
  176. header-align="center"
  177. align="center"
  178. min-width="100"
  179. prop=""
  180. label="组员"
  181. show-overflow-tooltip>
  182. <template slot-scope="scope">
  183. {{formatPersType(scope.row,"2")}}
  184. </template>
  185. </el-table-column>
  186. <el-table-column
  187. header-align="center"
  188. align="center"
  189. min-width="100"
  190. prop=""
  191. label="联络员"
  192. show-overflow-tooltip>
  193. <template slot-scope="scope">
  194. {{formatPersType(scope.row,"3")}}
  195. </template>
  196. </el-table-column>
  197. <el-table-column
  198. header-align="center"
  199. align="center"
  200. min-width="100"
  201. prop=""
  202. label="专家"
  203. show-overflow-tooltip>
  204. <template slot-scope="scope">
  205. {{formatPersType(scope.row,"4")}}
  206. </template>
  207. </el-table-column>
  208. <el-table-column
  209. header-align="center"
  210. align="center"
  211. min-width="120"
  212. prop="stTm"
  213. :formatter="formatDate"
  214. label="开始"
  215. show-overflow-tooltip
  216. ></el-table-column>
  217. <el-table-column
  218. header-align="center"
  219. align="center"
  220. min-width="120"
  221. prop="enTm"
  222. :formatter="formatDate"
  223. label="结束"
  224. show-overflow-tooltip
  225. ></el-table-column>
  226. <el-table-column
  227. align="center"
  228. min-width="240"
  229. label="操作"
  230. fixed="right">
  231. <template slot-scope="scope">
  232. <el-button type="primary" size="mini" @click.stop="addNewType(scope.row)" :disabled="!(scope.row.itPossibleToAdd && scope.row.state=='1' && ((isEdit && isCityCountry) || !isCityCountry))">新增督查类别</el-button>
  233. <el-button type="danger" size="mini" @click.stop="deleteData(scope.row)" :disabled="!(scope.row.state=='1' && ((isEdit && isCityCountry) || !isCityCountry))">删除</el-button>
  234. </template>
  235. </el-table-column>
  236. </el-table>
  237. </div>
  238. <el-dialog
  239. class="outerDialog custom_dialog"
  240. :title="dialogT"
  241. width="40%"
  242. @close="closeAddDialog"
  243. v-if="addDialogVisible"
  244. :visible.sync="addDialogVisible">
  245. <div style="width: 100%;height:100%;">
  246. <el-form ref="addForm" label-width="170px">
  247. <el-form-item label="年度">
  248. <el-date-picker
  249. :disabled="isDisabled"
  250. v-model="addForm.chkYear"
  251. @change="changeDate"
  252. type="year"
  253. format="yyyy"
  254. value-format="yyyy"
  255. placeholder="选择年度">
  256. </el-date-picker>
  257. </el-form-item>
  258. <el-form-item label="检查计划事项" required>
  259. <el-select
  260. filterable
  261. :disabled="isDisabled"
  262. v-model="addForm.yearId"
  263. @change="changeYearForm"
  264. placeholder="请选择检查计划事项">
  265. <el-option
  266. v-for="item in yearPlanDepList"
  267. :key="item.id"
  268. :label="item.chkName"
  269. :value="item.id">
  270. </el-option>
  271. </el-select>
  272. </el-form-item>
  273. <el-form-item label="详细检查计划名称" required>
  274. <el-select
  275. filterable
  276. :disabled="isDisabled"
  277. v-model="addForm.dtlId"
  278. @change="changeDtlForm"
  279. placeholder="请选择详细检查计划">
  280. <el-option
  281. v-for="item in dtlListForm"
  282. :key="item.id"
  283. :label="item.nm"
  284. :value="item.id">
  285. </el-option>
  286. </el-select>
  287. </el-form-item>
  288. <el-form-item label="详细检查计划时间">
  289. <el-input v-model="dateRStr" readonly placeholder="详细检查计划时间" style="width: 70%"></el-input>
  290. </el-form-item>
  291. <el-form-item label="检查组名称" required>
  292. <el-input v-model="addForm.pnm" :disabled="isDisabled" placeholder="检查组名称" style="width: 70%"></el-input>
  293. </el-form-item>
  294. <el-form-item label="计划检查项目数量">
  295. <el-input-number v-model="addForm.quantity" :min="0" style="width: 70%"></el-input-number>
  296. </el-form-item>
  297. <el-form-item label="开始时间" required>
  298. <el-date-picker
  299. style="width: 70%"
  300. v-model="addForm.stTm"
  301. :disabled="isDisabled || !addForm.dtlId"
  302. type="date"
  303. value-format="yyyy-MM-dd"
  304. :picker-options="selectOption"
  305. placeholder="选择日期">
  306. </el-date-picker>
  307. </el-form-item>
  308. <el-form-item label="结束时间" required>
  309. <el-date-picker
  310. style="width: 70%"
  311. value-format="yyyy-MM-dd"
  312. :disabled="isDisabled || !addForm.dtlId"
  313. v-model="addForm.enTm"
  314. type="date"
  315. :picker-options="selectOption"
  316. placeholder="选择日期">
  317. </el-date-picker>
  318. </el-form-item>
  319. <el-form-item label="督查对象" required>
  320. <el-select v-model="addForm.typeList" filterable placeholder="请选择督查类型" style="width: 70%" multiple collapse-tags>
  321. <el-option
  322. v-for="item in objTypeList"
  323. :key="item.inspType"
  324. :label="item.inspName"
  325. :value="item.inspType">
  326. </el-option>
  327. </el-select>
  328. </el-form-item>
  329. <el-form-item label="检查内容">
  330. <el-input type="textarea" v-model="objParent.chkContent" placeholder="请输入检查内容"></el-input>
  331. </el-form-item>
  332. <el-form-item label="备注" :required="isRequired">
  333. <el-input type="textarea" v-model="addForm.note" placeholder="请输入备注"></el-input>
  334. </el-form-item>
  335. <el-form-item style="text-align: right">
  336. <el-button type="primary" @click="addSubmit" style="margin-bottom: 30px;">确定</el-button>
  337. </el-form-item>
  338. </el-form>
  339. </div>
  340. </el-dialog>
  341. <el-dialog
  342. class="outerDialog custom_dialog"
  343. :title="dialogE"
  344. width="40%"
  345. @close="closeAddDialog"
  346. v-if="editDialogVisible"
  347. :visible.sync="editDialogVisible">
  348. <div style="width: 100%;height:100%;">
  349. <el-form ref="editForm" label-width="170px">
  350. <el-form-item label="组长" required>
  351. <el-select v-model="editForm.pers1" @change="changePers1" multiple collapse-tags style="width: 70%">
  352. <el-option v-for="item in persArr1" :label="item.persName" :value="item.guid"></el-option>
  353. </el-select>
  354. <el-button type="primary" @click="popupAddMemberDialog(1,editForm.id)">选择</el-button>
  355. </el-form-item>
  356. <el-form-item label="组员" required>
  357. <el-select v-model="editForm.pers2" @change="changePers2" multiple collapse-tags style="width: 70%">
  358. <el-option v-for="item in persArr2" :label="item.persName" :value="item.guid"></el-option>
  359. </el-select>
  360. <el-button type="primary" @click="popupAddMemberDialog(2,editForm.id)">选择</el-button>
  361. </el-form-item>
  362. <el-form-item label="联络员">
  363. <el-select v-model="editForm.pers3" @change="changePers3" multiple collapse-tags style="width: 70%">
  364. <el-option v-for="item in persArr3" :label="item.persName" :value="item.guid"></el-option>
  365. </el-select>
  366. <el-button type="primary" @click="popupAddMemberDialog(3,editForm.id)">选择</el-button>
  367. </el-form-item>
  368. <el-form-item label="专家">
  369. <el-select v-model="editForm.pers4" @change="changePers4" multiple collapse-tags style="width: 70%">
  370. <el-option v-for="item in persArr4" :label="item.persName" :value="item.guid"></el-option>
  371. </el-select>
  372. <el-button type="primary" @click="popupAddMemberDialog(4,editForm.id)">选择</el-button>
  373. </el-form-item>
  374. <el-form-item label="项目名称">
  375. <el-select v-model="editForm.obj" @change="changeObj" multiple collapse-tags style="width: 70%">
  376. <el-option v-for="item in objArr" :label="item.name" :value="item.code"></el-option>
  377. </el-select>
  378. <el-button type="primary" @click="popupAddObjectDialog(editForm.id,editForm.pType)">选择</el-button>
  379. </el-form-item>
  380. <el-form-item style="text-align: center">
  381. <el-button type="primary" @click="submitBtnObj" style="margin-bottom: 30px;">确定</el-button>
  382. </el-form-item>
  383. </el-form>
  384. </div>
  385. </el-dialog>
  386. <el-dialog
  387. class="outerDialog custom_dialog"
  388. :title="'重复提示'"
  389. width="50%"
  390. :visible.sync="isMulVisible">
  391. <div style="width: 100%;max-height:500px;overflow: auto;">
  392. <span style="font-size: 14px;color:#333;">当前组所属详细计划表格数据:</span>
  393. <el-table
  394. :data="curList"
  395. border
  396. style="width: 100%">
  397. <el-table-column
  398. prop="nm"
  399. show-overflow-tooltip
  400. label="详细检查计划名称"
  401. min-width="180">
  402. </el-table-column>
  403. <el-table-column
  404. prop="dAdName"
  405. show-overflow-tooltip
  406. label="检查区域"
  407. min-width="180">
  408. </el-table-column>
  409. <el-table-column
  410. prop="stTm"
  411. min-width="100"
  412. :formatter="formatDate"
  413. show-overflow-tooltip
  414. label="检查开始时间">
  415. </el-table-column>
  416. <el-table-column
  417. prop="enTm"
  418. min-width="100"
  419. :formatter="formatDate"
  420. show-overflow-tooltip
  421. label="检查结束时间">
  422. </el-table-column>
  423. <el-table-column
  424. prop="chkContent"
  425. min-width="200"
  426. show-overflow-tooltip
  427. label="检查内容">
  428. </el-table-column>
  429. </el-table>
  430. <span style="font-size: 14px;color:red;">一周内到同一设区市的督查检查组不能超过1个(当前检查日期和检查区域重复):</span>
  431. <el-table
  432. :data="tipList"
  433. border
  434. style="width: 100%">
  435. <el-table-column
  436. prop="nm"
  437. show-overflow-tooltip
  438. label="详细检查计划名称"
  439. min-width="180">
  440. </el-table-column>
  441. <el-table-column
  442. prop="dAdName"
  443. show-overflow-tooltip
  444. label="检查区域"
  445. min-width="180">
  446. </el-table-column>
  447. <el-table-column
  448. prop="stTm"
  449. min-width="100"
  450. :formatter="formatDate"
  451. show-overflow-tooltip
  452. label="检查开始时间">
  453. </el-table-column>
  454. <el-table-column
  455. prop="enTm"
  456. min-width="100"
  457. :formatter="formatDate"
  458. show-overflow-tooltip
  459. label="检查结束时间">
  460. </el-table-column>
  461. <el-table-column
  462. prop="chkContent"
  463. min-width="200"
  464. show-overflow-tooltip
  465. label="检查内容">
  466. </el-table-column>
  467. </el-table>
  468. </div>
  469. <span slot="footer">
  470. <el-button type="primary" @click="addSubmitSecond">确定</el-button>
  471. <el-button @click="cancelMul">取消</el-button>
  472. </span>
  473. </el-dialog>
  474. </el-card>
  475. <editDczInfo ref="editDczInfoRef" :isNew="true" :dczId="dczId" :jiGouId="orgId" :addPerType="addPerType" @addSuccess="addSuccess" :key="new Date().getTime()"></editDczInfo>
  476. <editDcdxInfo ref="editDcdxInfoRef" :isNew="true" :objType="tableCurrentRowType" :dczId="dczId" @addSuccess="singleRowSubmit"></editDcdxInfo>
  477. <editDcdxInfosz ref="editDcdxInfoSzRef" :isNew="true" :objType="tableCurrentRowType" :dczId="dczId" @addSuccess="singleRowSubmit"></editDcdxInfosz>
  478. <editDcdxInfojianshe ref="editDcdxInfoJianSheRef" :isNew="true" :objType="tableCurrentRowType" :dczId="dczId" @addSuccess="singleRowSubmit"></editDcdxInfojianshe>
  479. <editDcdxInfoyunxing ref="editDcdxInfoYunXingRef" :isNew="true" :objType="tableCurrentRowType" :dczId="dczId" @addSuccess="singleRowSubmit"></editDcdxInfoyunxing>
  480. <editDcdxInfoRyZj ref="editDcdxInfoRyZjRef" :isNew="true" :objType="tableCurrentRowType" :dczId="dczId" @addSuccess="singleRowSubmit"></editDcdxInfoRyZj>
  481. <editDcdxInfoDiFang ref="editDcdxInfoDiFangRef" :isNew="true" :objType="tableCurrentRowType" :dczId="dczId" @addSuccess="singleRowSubmit"></editDcdxInfoDiFang>
  482. <editDcdxInfoChaoBiaoHongYuAn ref="editDcdxInfoChaoBiaoHongYuAnRef" :isNew="true" :objType="tableCurrentRowType" :dczId="dczId" @addSuccess="singleRowSubmit"></editDcdxInfoChaoBiaoHongYuAn>
  483. <editDcdxInfoCommon ref="editDcdxInfoCommonRef" :isNew="true" :objType="tableCurrentRowType" :dczId="dczId" @addSuccess="singleRowSubmit"></editDcdxInfoCommon>
  484. <editDcdxXsdyhgl ref="editDcdxXsdyhglRef" :isNew="true" :objType="tableCurrentRowType" :dczId="dczId" @addSuccess="singleRowSubmit"></editDcdxXsdyhgl>
  485. <editDcdxInfoFjncysaq ref="editDcdxInfoFjncysaqRef" :isNew="true" :objType="tableCurrentRowType" :dczId="dczId" @addSuccess="singleRowSubmit"></editDcdxInfoFjncysaq>
  486. <editDcdxInfoSdqa ref="editDcdxInfoSdqaRef" :isNew="true" :objType="tableCurrentRowType" :dczId="dczId" @addSuccess="singleRowSubmit"></editDcdxInfoSdqa>
  487. </el-container>
  488. </template>
  489. <script>
  490. import {exportModel} from "@util/gw_exportModel";
  491. import request from '@util/gw_ajax_request'
  492. import addvSelectMul from "../../../widgets/addvSelectMul.vue"
  493. import editDczInfo from '../editDczInfo.vue';
  494. export default {
  495. name: "",
  496. props: ["rowData"],
  497. data() {
  498. return {
  499. gradList:[{label:"省",value:"2"},{label:"市",value:"3"},{label:"县",value:"4"}],
  500. // isBtn:this.$route.query.id?true:false,
  501. isDisabled:false,
  502. dczId:"",
  503. tableCurrentRowType:"",
  504. addPerType:"",
  505. DepList:[],
  506. joinDepList:[],
  507. objParent:{},
  508. dateRStr:"",
  509. rowObjParent:{},
  510. objYear:{},
  511. monthList:['1',"2","3","4","5","6","7","8","9","10","11","12"],
  512. isRList:[{label:"是",value:"1"},{label:"否",value:"否"}],
  513. chkFormArr:[{
  514. label:"线上(水利监督信息系统)",
  515. value:"1"
  516. },{
  517. label:"线下",
  518. value:"2"
  519. }],
  520. objTypeList:[],
  521. objTypeAllList:[],
  522. year:[new Date().getFullYear()+"-01",new Date().getFullYear()+"-"+((new Date().getMonth()+1)>9?(new Date().getMonth()+1):"0"+(new Date().getMonth()+1))],
  523. month:new Date().getMonth()+1,
  524. isOne:false,
  525. years:[new Date().getFullYear()-1,new Date().getFullYear(),new Date().getFullYear()+1],
  526. months:[1,2,3,4,5,6,7,8,9,10,11,12],
  527. dcTypeList:[],
  528. ptypeArr:[{label:'暗访',value:"0"},{label:'明查',value:"1"}],
  529. dialogT:"",
  530. dialogE:"",
  531. monthDialogVisible:true,
  532. addDialogVisible:false,
  533. editDialogVisible:false,
  534. detailDialogVisible:false,
  535. tableHeight:window.innerHeight-300,
  536. tableData:[],
  537. loading:false,
  538. pageNum:1,
  539. pageSize:10,
  540. total:0,
  541. objTypes:[],
  542. searchForm:{
  543. yearId:"",
  544. dtlId:"",
  545. planningMatters:"",
  546. inspectionTeam:"",
  547. years:"",
  548. adName:"",
  549. inspectionUnit:""
  550. },
  551. YM:"",
  552. detailObj:{},
  553. orgIdDefault:"",
  554. dateRange:[],
  555. addForm:{
  556. chkYear:"",
  557. yearId:"",
  558. dtlId:"",
  559. pnm:"",
  560. stTm:"",
  561. enTm:"",
  562. typeList:[]
  563. },
  564. editForm:{
  565. id:"",
  566. pType:"",
  567. pers1:[],
  568. pers2:[],
  569. pers3:[],
  570. pers4:[],
  571. obj:[]
  572. },
  573. pers1:[],
  574. pers2:[],
  575. pers3:[],
  576. pers4:[],
  577. obj:[],
  578. persArr1:[],
  579. persArr2:[],
  580. persArr3:[],
  581. persArr4:[],
  582. objArr:[],
  583. yearDialogVisible:false,
  584. yearId:"",
  585. currentId:"",
  586. curTimeTip:"",
  587. isJdc:false,
  588. isEdit:false,
  589. isCityCountry:false,
  590. yearPlanDepList:[],
  591. dtlList:[],
  592. dtlListForm:[],
  593. isRequired:false,
  594. isMulVisible:false,
  595. adNames:"",
  596. curList:[],
  597. tipList:[]
  598. }
  599. },
  600. filters:{
  601. chkTypeFor(val,that){
  602. var nm = ""
  603. that.chkFormArr.forEach((item)=>{
  604. if(item.value==val){
  605. nm = item.label;
  606. }
  607. })
  608. return nm;
  609. }
  610. },
  611. components: {
  612. editDczInfo,
  613. addvSelectMul,
  614. editDcdxInfo:resolve => {require(['../editDcdxInfo.vue'],resolve)},
  615. // editDcdxInfo_172:resolve => {require(['./editDcdxInfo.vue'],resolve)},
  616. editDcdxInfosz:resolve => {require(['../editDcdxInfo_sz.vue'],resolve)},
  617. editDcdxInfojianshe:resolve => {require(['../editDcdxInfo_jianshe.vue'],resolve)},
  618. editDcdxInfoyunxing:resolve => {require(['../editDcdxInfo_yunxing.vue'],resolve)},
  619. editDcdxInfoRyZj: resolve => {
  620. require(['../editDcdxInfo_ryZj.vue'], resolve)
  621. }, //浙江人饮
  622. editDcdxInfoDiFang: resolve => {
  623. require(['../editDcdxInfo_difang.vue'], resolve)
  624. }, //堤防
  625. editDcdxInfoChaoBiaoHongYuAn: resolve => {
  626. require(['../editDcdxInfo_chaobiaohongyuan.vue'], resolve)
  627. }, //超标
  628. editDcdxInfoCommon:resolve => {
  629. require(['../editDcdxInfo_common.vue'], resolve)
  630. },
  631. editDcdxXskSd:resolve => {
  632. require(['../editDcdxInfo.vue'], resolve)
  633. },
  634. editDcdxXsdyhgl:resolve => {
  635. require(['../editDcdxInfo_xsdyhgl.vue'], resolve)
  636. },
  637. editDcdxInfoFjncysaq: (resolve) => {
  638. require(['../editDcdxInfo_fjncysaq.vue'], resolve)
  639. },//福建农村饮水安全
  640. editDcdxInfoSdqa:resolve => {
  641. require(['../editDcdxInfo_sdqa.vue'], resolve)
  642. },//山东工程质量监督
  643. },
  644. computed: {
  645. selectOption(){
  646. var _self = this;
  647. return {
  648. disabledDate(time) {
  649. if (_self.objParent.stTm && _self.objParent.enTm) {
  650. return time.getTime() < _self.objParent.stTm || time.getTime() > _self.objParent.enTm
  651. }
  652. }
  653. }
  654. },
  655. persId() {
  656. return localStorage.getItem("userid")
  657. ? localStorage.getItem("userid")
  658. : "1098101939614724096";
  659. },
  660. orgId() {
  661. return localStorage.getItem('currentOrgId') ? localStorage.getItem("currentOrgId") : "";
  662. },
  663. organCode() {
  664. return localStorage.getItem('currentRlcode') ? localStorage.getItem('currentRlcode') : ''
  665. },
  666. currentOrgNm(){
  667. if(localStorage.getItem('currentRlcode').substring(0,2)=='37'){
  668. return "山东省"
  669. }else{
  670. return localStorage.getItem('currentOrgNm') ? localStorage.getItem('currentOrgNm') : ''
  671. }
  672. }
  673. },
  674. watch:{
  675. // 'addForm.chkYear':{
  676. // //设置深度监听,当openDate值发生变化时出发handler方法
  677. // deep:true,
  678. // //注意:这里的function不能写成箭头函数,不然this将不在此组件内 https://cn.vuejs.org/v2/api/#watch
  679. // handler:function (newVal,oldVal) {
  680. // if(newVal){
  681. // this.addForm.chkYear = newVal;
  682. // this.getYearPlanByDep();
  683. // this.addForm.planId = "";
  684. // this.addForm.dtlId = "";
  685. // this.dateRStr = "";
  686. // this.objParent = {};
  687. // this.addForm.stTm = "";
  688. // this.addForm.enTm = "";
  689. // }
  690. // },
  691. // immediate: false
  692. // }
  693. },
  694. created() {
  695. this.getCityCountry();//是不是市县账户
  696. this.getIsTime();//时间是不是有效时间
  697. this.getCurDep();//是不是监督处
  698. this.getCurTime();//获取设置的时间
  699. },
  700. mounted() {
  701. this.initTableData();
  702. },
  703. methods: {
  704. submitBtnObj(){
  705. if(this.editForm.pers1 && this.editForm.pers1.length==0){
  706. this.$message.warning("请选择组长");
  707. return false;
  708. }
  709. if(this.editForm.pers2 && this.editForm.pers2.length==0){
  710. this.$message.warning("请选择组员");
  711. return false;
  712. }
  713. this.editDialogVisible = false;
  714. },
  715. getIsTime(){
  716. this.isEdit = false;
  717. request.get(`/bis/insp/gaTm/exceed`).then(res=>{
  718. if(res.success){
  719. this.isEdit = res.data.key;
  720. }
  721. })
  722. },
  723. getCurDep(){
  724. this.isJdc = false;
  725. request.get(`/bis/insp/gaTm/purview`).then(res=>{
  726. if(res.success){
  727. this.isJdc = res.data.key;
  728. }
  729. })
  730. },
  731. getCityCountry(){
  732. this.isCityCountry = false;
  733. request.get(`/bis/insp/gaTm/whetherTheCityOrCounty`).then(res=>{
  734. if(res.success){
  735. this.isCityCountry = res.data.key;
  736. }
  737. })
  738. },
  739. formatDateTime(dateF){
  740. if(dateF){
  741. var date = new Date(dateF);
  742. return date.getFullYear()+"-"+((date.getMonth()+1)>9?(date.getMonth()+1):'0'+(date.getMonth()+1))+"-"+(date.getDate()>9?date.getDate():"0"+date.getDate());
  743. }
  744. return "";
  745. },
  746. getCurTime(){
  747. this.curTimeTip = "";
  748. request.get(`/bis/insp/gaTm/obj`).then(res=>{
  749. if(res.success){
  750. if(res.data.stm && res.data.etm){
  751. this.curTimeTip = `(市县填报时间范围为${this.formatDateTime(res.data.stm)}~${this.formatDateTime(res.data.etm)}日)`;
  752. }
  753. }
  754. })
  755. },
  756. // changeYearSearch(){
  757. // this.getYearById();
  758. // this.getDetailList();
  759. // },
  760. // changeDlt(){
  761. // this.initTableData();
  762. // },
  763. changeDate(){
  764. this.addForm.yearId = "";
  765. this.addForm.dtlId = "";
  766. this.dateRStr = "";
  767. this.objParent = {};
  768. this.$nextTick(() => {
  769. this.$set(this.addForm, "stTm", "");
  770. this.$set(this.addForm, "enTm", "");
  771. });
  772. this.addForm.typeList = [];
  773. this.objTypeList = [];
  774. this.getYearPlanByDep();
  775. },
  776. changeYearForm(){
  777. this.addForm.dtlId = "";
  778. this.dateRStr = "";
  779. this.objParent = {};
  780. this.$nextTick(() => {
  781. this.$set(this.addForm, "stTm", "");
  782. this.$set(this.addForm, "enTm", "");
  783. });
  784. this.addForm.typeList = [];
  785. this.objTypeList = [];
  786. this.getDetailListForm();
  787. },
  788. changeDtlForm(){
  789. this.dateRStr = "";
  790. this.objParent = {};
  791. this.$nextTick(() => {
  792. this.$set(this.addForm, "stTm", "");
  793. this.$set(this.addForm, "enTm", "");
  794. });
  795. this.addForm.typeList = [];
  796. this.objTypeList = [];
  797. this.getYearListForm();
  798. },
  799. getYearPlanByDep(){
  800. this.yearPlanDepList = [];
  801. request.post(`/bis/insp/plan/year/findList`,{state:"1",chkYear:this.addForm.chkYear}).then(res=>{
  802. if(res.success){
  803. if(res.data && res.data.length>0){
  804. this.yearPlanDepList = res.data;
  805. }
  806. }
  807. })
  808. },
  809. getDetailList(){
  810. this.dtlList = [];
  811. request.post(`/bis/insp/plan/dtl/list`,{planId:this.searchForm.yearId}).then(res=>{
  812. if(res.success){
  813. if(res.data && res.data.length>0){
  814. this.dtlList = res.data;
  815. this.searchForm.dtlId = res.data[0].id;
  816. this.getYearList();
  817. }
  818. }
  819. })
  820. },
  821. getDetailListForm(){
  822. this.dtlListForm = [];
  823. request.post(`/bis/insp/plan/dtl/list`,{planId:this.addForm.yearId,onlineChk:"1"}).then(res=>{
  824. if(res.success){
  825. if(res.data && res.data.length>0){
  826. this.dtlListForm = res.data;
  827. // this.addForm.dtlId = res.data[0].id;
  828. // this.getYearListForm()
  829. }
  830. }
  831. })
  832. },
  833. getDetailListFormEdit(row){
  834. this.dtlListForm = [];
  835. request.post(`/bis/insp/plan/dtl/list`,{planId:this.addForm.yearId,onlineChk:"1"}).then(res=>{
  836. if(res.success){
  837. if(res.data && res.data.length>0){
  838. this.dtlListForm = res.data;
  839. this.getYearListForm(row)
  840. }
  841. }
  842. })
  843. },
  844. changePers1(val){
  845. if(val.length<this.pers1.length){
  846. var id = this.getIdDelete(val,this.pers1);
  847. this.deletePersId(id);
  848. }
  849. },
  850. changePers2(val){
  851. if(val.length<this.pers2.length){
  852. var id = this.getIdDelete(val,this.pers2);
  853. this.deletePersId(id);
  854. }
  855. },
  856. changePers3(val){
  857. if(val.length<this.pers3.length){
  858. var id = this.getIdDelete(val,this.pers3);
  859. this.deletePersId(id);
  860. }
  861. },
  862. changePers4(val){
  863. if(val.length<this.pers4.length){
  864. var id = this.getIdDelete(val,this.pers4);
  865. this.deletePersId(id);
  866. }
  867. },
  868. changeObj(val){
  869. if(val.length<this.obj.length){
  870. var id = this.getIdDelete(val,this.obj);
  871. this.deleteObjId(id);
  872. }
  873. },
  874. getIdDelete(arr1,arr2){
  875. var id = "";
  876. arr2.forEach((item)=>{
  877. if(arr1.indexOf(item)<0){
  878. id = item;
  879. }
  880. })
  881. return id;
  882. },
  883. editType(row,row1){
  884. this.editForm.id = row1.id;
  885. this.editForm.pType = row1.pType;
  886. this.persArr1 = [];
  887. this.persArr2 = [];
  888. this.persArr3 = [];
  889. this.persArr4 = [];
  890. this.editForm.pers1 = [];
  891. this.editForm.pers2 = [];
  892. this.editForm.pers3 = [];
  893. this.editForm.pers4 = [];
  894. this.pers1 = [];
  895. this.pers2 = [];
  896. this.pers3 = [];
  897. this.pers4 = [];
  898. this.objArr = [];
  899. this.editForm.obj = [];
  900. this.obj = [];
  901. row.personnelList.forEach((item)=>{
  902. if(item.persType=="1"){
  903. this.persArr1.push(item);
  904. this.editForm.pers1.push(item.guid);
  905. this.pers1.push(item.guid);
  906. }
  907. if(item.persType=="2"){
  908. this.persArr2.push(item);
  909. this.editForm.pers2.push(item.guid);
  910. this.pers2.push(item.guid);
  911. }
  912. if(item.persType=="3"){
  913. this.persArr3.push(item);
  914. this.editForm.pers3.push(item.guid);
  915. this.pers3.push(item.guid);
  916. }
  917. if(item.persType=="4"){
  918. this.persArr4.push(item);
  919. this.editForm.pers4.push(item.guid);
  920. this.pers4.push(item.guid);
  921. }
  922. })
  923. row1.objectList.forEach((item)=>{
  924. this.objArr.push(item);
  925. this.editForm.obj.push(item.code);
  926. this.obj.push(item.code);
  927. })
  928. this.editDialogVisible = true;
  929. this.dialogE = "编辑";
  930. },
  931. isShow(row) {
  932. return request.get(`/bis/insp/plan/dtl/${row.dtlId}`).then(res => {
  933. if (res.success) {
  934. if (row.groupList && row.groupList.length > 0) {
  935. var list = [];
  936. var list1 = [];
  937. row.groupList.forEach((item) => {
  938. list.push(parseInt(item.pType));
  939. })
  940. res.data.ptypIds.forEach((item) => {
  941. list1.push(parseInt(item));
  942. })
  943. return !this.matchType(list, list1);
  944. } else {
  945. return true;
  946. }
  947. }
  948. })
  949. },
  950. matchType(arr1,arr2){
  951. return arr2.every(val => arr1.includes(val));
  952. },
  953. async addNewType(row) {
  954. this.objTypeList = [];
  955. this.isDisabled = true;
  956. this.addForm = {
  957. chkYear:row.chkYear?JSON.stringify(row.chkYear):"",
  958. yearId:row.planYearId,
  959. dtlId: row.dtlId,
  960. stTm: row.stTm,
  961. enTm: row.enTm,
  962. pnm: row.pnm,
  963. quantity: "",
  964. typeList: []
  965. };
  966. this.getYearPlanByDep();
  967. this.getDetailListFormEdit(row);
  968. this.addDialogVisible = true;
  969. this.dialogT = "添加"
  970. },
  971. setDcType(row){
  972. request.get(`/bis/insp/plan/dtl/${row.dtlId}`).then(res => {
  973. if (res.success) {
  974. if(row.groupList && row.groupList.length>0){
  975. var list = [];
  976. var list1 = [];
  977. var list2 = [];
  978. row.groupList.forEach((item)=>{
  979. list.push(parseInt(item.pType));
  980. })
  981. res.data.ptypIds.forEach((item)=>{
  982. if(list.indexOf(parseInt(item))<0){
  983. list1.push(parseInt(item));
  984. }
  985. })
  986. this.objTypeList.forEach((item)=>{
  987. if(list1.indexOf(parseInt(item.inspType))>-1){
  988. list2.push(item);
  989. }
  990. })
  991. this.objTypeList = list2;
  992. }
  993. }
  994. })
  995. },
  996. expandChange(){
  997. },
  998. addSuccess(obj){
  999. if(obj.persType=="1"){
  1000. this.persArr1 = obj.listArr.concat(this.persArr1);
  1001. this.editForm.pers1 = obj.listIds.concat(this.editForm.pers1)
  1002. this.pers1 = this.editForm.pers1;
  1003. }
  1004. if(obj.persType=="2"){
  1005. this.persArr2 = obj.listArr.concat(this.persArr2);
  1006. this.editForm.pers2 = obj.listIds.concat(this.editForm.pers2)
  1007. this.pers2 = this.editForm.pers2;
  1008. }
  1009. if(obj.persType=="3"){
  1010. this.persArr3 = obj.listArr.concat(this.persArr3);
  1011. this.editForm.pers3 = obj.listIds.concat(this.editForm.pers3)
  1012. this.pers3 = this.editForm.pers3;
  1013. }
  1014. if(obj.persType=="4"){
  1015. this.persArr4 = obj.listArr.concat(this.persArr4);
  1016. this.editForm.pers4 = obj.listIds.concat(this.editForm.pers4)
  1017. this.pers4 = this.editForm.pers4;
  1018. }
  1019. this.initTableData();
  1020. },
  1021. singleRowSubmit(obj){
  1022. // //debugger
  1023. this.objArr = obj.listArr.concat(this.objArr);
  1024. this.editForm.obj = obj.listIds.concat(this.editForm.obj)
  1025. this.obj = this.editForm.obj;
  1026. this.initTableData();
  1027. },
  1028. popupAddMemberDialog:function(addPersType,id){
  1029. var _self = this;
  1030. this.addPerType = addPersType;
  1031. this.dczId = id;
  1032. setTimeout(function(){
  1033. _self.$refs['editDczInfoRef'].showDialog();
  1034. },500)
  1035. },
  1036. popupAddObjectDialog:function(id,ptype){
  1037. this.dczId = id;
  1038. this.tableCurrentRowType = ptype;
  1039. if(this.tableCurrentRowType=='6'){
  1040. this.$refs['editDcdxInfoSzRef'].showDialog(this.tableCurrentRowType);
  1041. }
  1042. if(this.tableCurrentRowType=='4'){
  1043. this.$refs['editDcdxInfoJianSheRef'].showDialog(this.tableCurrentRowType);
  1044. }
  1045. if(this.tableCurrentRowType=='7'){
  1046. this.$refs['editDcdxInfoYunXingRef'].showDialog(this.tableCurrentRowType);
  1047. }
  1048. if(this.tableCurrentRowType=='1' || this.tableCurrentRowType=='3' || this.tableCurrentRowType=='26' || this.tableCurrentRowType=='34' || this.tableCurrentRowType=='115'){
  1049. this.$refs['editDcdxInfoRef'].showDialog(this.tableCurrentRowType);
  1050. }
  1051. if(this.tableCurrentRowType=='27'){
  1052. this.$refs['editDcdxInfoRyZjRef'].showDialog(this.tableCurrentRowType);
  1053. }
  1054. if(this.tableCurrentRowType=='29'){
  1055. this.$refs['editDcdxInfoDiFangRef'].showDialog(this.tableCurrentRowType);
  1056. }
  1057. if(this.tableCurrentRowType=='30'){
  1058. this.$refs['editDcdxInfoChaoBiaoHongYuAnRef'].showDialog(this.tableCurrentRowType);
  1059. }
  1060. if(this.tableCurrentRowType=='97'){
  1061. this.$refs['editDcdxInfoFjncysaqRef'].showDialog(this.tableCurrentRowType);
  1062. }
  1063. if(this.tableCurrentRowType=='111'){
  1064. this.$refs['editDcdxInfoCommonRef'].showDialog(this.tableCurrentRowType);
  1065. }
  1066. if(this.tableCurrentRowType=='116'){
  1067. this.$refs['editDcdxXsdyhglRef'].showDialog(this.tableCurrentRowType);
  1068. }
  1069. if(this.tableCurrentRowType=='127'){
  1070. this.$refs['editDcdxInfoSdqaRef'].showDialog(this.tableCurrentRowType);
  1071. }
  1072. },
  1073. back(){
  1074. this.$router.push({path: '/yearSdPlanD',query: {id: this.$route.query.planId,key:new Date().getTime()}});
  1075. },
  1076. deletePersId(id){
  1077. var _self = this;
  1078. var params = {
  1079. groupId:this.editForm.id,
  1080. delId:id
  1081. }
  1082. request.post(`/bis/insp/plan/ga/delSinglePersonnel`,params).then(res=>{
  1083. if(res.success){
  1084. _self.initTableData();
  1085. }
  1086. })
  1087. },
  1088. deleteObjId(id){
  1089. var _self = this;
  1090. var params = {
  1091. groupId:this.editForm.id,
  1092. delId:id
  1093. }
  1094. request.post(`/bis/insp/plan/ga/delSingleObject`,params).then(res=>{
  1095. if(res.success){
  1096. _self.initTableData();
  1097. }
  1098. })
  1099. },
  1100. getYearById(){
  1101. var _self = this;
  1102. request.get(`/bis/insp/plan/year/${this.searchForm.yearId}`).then(res=>{
  1103. if(res.success){
  1104. _self.objYear = res.data;
  1105. }
  1106. })
  1107. },
  1108. getYearList(){
  1109. var _self = this;
  1110. this.dateRStr = "";
  1111. request.get(`/bis/insp/plan/dtl/${this.searchForm.dtlId}`).then(res=>{
  1112. if(res.success){
  1113. _self.objParent = res.data;
  1114. _self.dateRStr = _self.formatDateTime(res.data.stTm)+'~'+_self.formatDateTime(res.data.enTm);
  1115. _self.getObjTypeList()
  1116. }
  1117. })
  1118. },
  1119. getYearListForm(row){
  1120. var _self = this;
  1121. this.dateRStr = "";
  1122. this.objParent = {};
  1123. request.get(`/bis/insp/plan/dtl/${this.addForm.dtlId}`).then(res=>{
  1124. if(res.success){
  1125. _self.objParent = res.data;
  1126. _self.dateRStr = _self.formatDateTime(res.data.stTm)+'~'+_self.formatDateTime(res.data.enTm);
  1127. _self.getObjTypeList(row)
  1128. }
  1129. })
  1130. },
  1131. getObjTypeList(row){
  1132. var _self = this;
  1133. this.objTypeList = [];
  1134. this.objTypeAllList = [];
  1135. request.get(`/bis/insp/rel/org/insp/type/getInspTypeByOrgId/${this.orgId}`).then(res=>{
  1136. if(res.success){
  1137. if(res.data && res.data.length>0){
  1138. res.data.forEach((item)=>{
  1139. if(_self.objParent.ptypIds.indexOf(item.inspType)>-1){
  1140. _self.objTypeList.push(item);
  1141. _self.objTypeAllList.push(item);
  1142. }
  1143. })
  1144. if(row){
  1145. _self.setDcType(row);
  1146. }
  1147. }
  1148. }
  1149. })
  1150. },
  1151. showYearPlan(id){
  1152. this.getAllYearPlan();
  1153. this.yearDialogVisible = true;
  1154. this.currentId = id;
  1155. },
  1156. changeAddv(obj){
  1157. if(obj.adCodes){
  1158. this.addForm.dAdCodes = obj.adCodes.split(",");
  1159. }else{
  1160. this.addForm.dAdCodes = [];
  1161. }
  1162. },
  1163. async downloadTemplate() {
  1164. let url = "/pdcApi/bis/insp/planMonth/downloadExcel";
  1165. let type = "get";
  1166. let exportName = "督查检查考核计划调度安排表.xls"
  1167. let result = await exportModel(type, url, exportName, null);
  1168. },
  1169. uploadOver(){
  1170. this.initTableData();
  1171. },
  1172. addFormBtn(){
  1173. this.addDialogVisible = true;
  1174. this.addForm = {};
  1175. this.dialogT = "添加";
  1176. },
  1177. chkFormFormat(row, column, cellValue, index){
  1178. var nm = ""
  1179. this.chkFormArr.forEach((item)=>{
  1180. if(item.value==row.chkType){
  1181. nm = item.label;
  1182. }
  1183. })
  1184. return nm;
  1185. },
  1186. getTypes() {
  1187. var _self = this;
  1188. request.get(`/bis/insp/rel/org/insp/type/getInspTypeByOrgId/${this.orgId}`)
  1189. .then(res => {
  1190. if (res.success) {
  1191. _self.dcTypeList = res.data;
  1192. }
  1193. })
  1194. },
  1195. closeDialog(){
  1196. this.$emit('closeDialogMonth')
  1197. },
  1198. closeDetailDialog(){
  1199. this.detailDialogVisible = false;
  1200. },
  1201. formatObjNames(row){
  1202. var objList = [];
  1203. if(row.objectList && row.objectList.length>0){
  1204. row.objectList.forEach((item)=>{
  1205. objList.push(item.name);
  1206. })
  1207. return objList.join(",");
  1208. }else{
  1209. return "";
  1210. }
  1211. },
  1212. formatArea(row){
  1213. var areaList = [];
  1214. if(row.areaList && row.areaList.length>0){
  1215. row.areaList.forEach((item)=>{
  1216. areaList.push(item.adName);
  1217. })
  1218. return areaList.join(",");
  1219. }else{
  1220. return "";
  1221. }
  1222. },
  1223. formatPersType(row,persType){
  1224. var persList = [];
  1225. if(row.personnelList && row.personnelList.length>0){
  1226. row.personnelList.forEach((item)=>{
  1227. if(item.persType==persType){
  1228. persList.push(item.persName);
  1229. }
  1230. })
  1231. return persList.join(",");
  1232. }else{
  1233. return "";
  1234. }
  1235. },
  1236. objFormat(row, column, cellValue, index){
  1237. var name = "";
  1238. this.dcTypeList.forEach((item)=>{
  1239. if(parseInt(item.inspType)==row.OBJTYPE){
  1240. name = item.inspName;
  1241. }
  1242. })
  1243. return name;
  1244. },
  1245. formatDate(row, column, cellValue, index){
  1246. var dateF = row[column.property];
  1247. if(dateF){
  1248. var date = new Date(dateF);
  1249. return date.getFullYear()+"-"+((date.getMonth()+1)>9?(date.getMonth()+1):'0'+(date.getMonth()+1))+"-"+date.getDate();
  1250. }
  1251. return "";
  1252. },
  1253. formatDate1(row, column, cellValue, index){
  1254. var dateF = row[column.property];
  1255. if(dateF){
  1256. var date = new Date(dateF);
  1257. return date.getFullYear()+"-"+((date.getMonth()+1)>9?(date.getMonth()+1):'0'+(date.getMonth()+1))
  1258. }
  1259. return "";
  1260. },
  1261. async exportExcel() {
  1262. let url = "/pdcApi/bis/insp/planMonth/export";
  1263. let type = "POST";
  1264. let exportName = "督查检查考核计划调度安排表.xls"
  1265. let result = await exportModel(type, url, exportName,JSON.stringify(this.searchForm));
  1266. },
  1267. deleteData(row){
  1268. var _self = this;
  1269. this.$confirm('确定删除该条数据吗, 是否继续?', '提示', {
  1270. confirmButtonText: '确定',
  1271. cancelButtonText: '取消',
  1272. type: 'warning'
  1273. }).then(() => {
  1274. request.get(`/bis/insp/plan/ga/delAll/${row.ids}`).then(res=>{
  1275. if(res.success){
  1276. _self.initTableData();
  1277. }else{
  1278. _self.$message.warning(res.message);
  1279. }
  1280. })
  1281. }).catch(() => {
  1282. this.$message({
  1283. type: 'info',
  1284. message: '已取消删除'
  1285. });
  1286. });
  1287. },
  1288. deleteDataType(row){
  1289. var _self = this;
  1290. this.$confirm('确定删除该条数据吗, 是否继续?', '提示', {
  1291. confirmButtonText: '确定',
  1292. cancelButtonText: '取消',
  1293. type: 'warning'
  1294. }).then(() => {
  1295. request.get(`/bis/insp/plan/ga/del/${row.id}`).then(res=>{
  1296. if(res.success){
  1297. _self.initTableData();
  1298. }else{
  1299. _self.$message.warning(res.message);
  1300. }
  1301. })
  1302. }).catch(() => {
  1303. this.$message({
  1304. type: 'info',
  1305. message: '已取消删除'
  1306. });
  1307. });
  1308. },
  1309. edit(row){
  1310. var obj = JSON.stringify(row);
  1311. this.addDialogVisible = true;
  1312. this.addForm = JSON.parse(obj);
  1313. this.dateRange = [this.addForm.stTm,this.addForm.enTm];
  1314. this.dialogT = "编辑";
  1315. this.$nextTick(()=>{
  1316. this.$refs.city.setCheck(row.dAdName?row.dAdCodes:[],row.dAdName?row.dAdName.split(","):[]);
  1317. })
  1318. },
  1319. cancelMul(){
  1320. this.addDialogVisible = false;
  1321. this.isMulVisible = false;
  1322. },
  1323. addSubmitSecond(){
  1324. if(!this.addForm.note){
  1325. this.isMulVisible = false;
  1326. this.$message.warning("因检查区域/时间重复,请在备注处说明事由!");
  1327. this.isRequired = true;
  1328. return false;
  1329. }
  1330. this.addForm.determine = true;
  1331. request.post('/bis/insp/plan/ga/add',this.addForm).then(res=>{
  1332. if(res.success){
  1333. this.$message.success("保存成功");
  1334. this.addDialogVisible = false;
  1335. this.addForm = {};
  1336. this.isMulVisible = false;
  1337. this.initTableData();
  1338. }
  1339. }).catch(error=>{
  1340. this.$message.error(error)
  1341. })
  1342. },
  1343. addSubmit(){
  1344. if(!this.addForm.yearId){
  1345. this.$message.warning("请选择检查计划事项");
  1346. return;
  1347. }
  1348. if(!this.addForm.dtlId){
  1349. this.$message.warning("请选择详细检查计划名称");
  1350. return;
  1351. }
  1352. if(!this.addForm.pnm){
  1353. this.$message.warning("请输入检查组名称");
  1354. return;
  1355. }
  1356. if(!this.addForm.stTm){
  1357. this.$message.warning("请选择开始时间");
  1358. return;
  1359. }
  1360. if(!this.addForm.enTm){
  1361. this.$message.warning("请选择结束时间");
  1362. return;
  1363. }
  1364. if(!this.addForm.typeList || this.addForm.typeList.length==0){
  1365. this.$message.warning("请选择督查对象");
  1366. return;
  1367. }
  1368. var _self = this;
  1369. this.addForm.determine = false;
  1370. this.isRequired = false;
  1371. this.tipList = [];
  1372. this.curList = [];
  1373. if(!this.isDisabled){
  1374. request.post('/bis/insp/plan/ga/add',this.addForm).then(res=>{
  1375. if(!res.success && res.message=="true"){
  1376. _self.isMulVisible = true;
  1377. _self.curList.push({
  1378. nm:_self.objParent.nm,
  1379. dAdName:_self.objParent.dAdName,
  1380. stTm:_self.objParent.stTm,
  1381. enTm:_self.objParent.enTm,
  1382. chkContent:_self.objParent.chkContent
  1383. });
  1384. _self.tipList = res.data;
  1385. }else{
  1386. _self.addForm.determine = true;
  1387. request.post('/bis/insp/plan/ga/add',this.addForm).then(res=>{
  1388. if(res.success){
  1389. _self.$message.success("保存成功");
  1390. _self.addDialogVisible = false;
  1391. _self.addForm = {};
  1392. _self.initTableData();
  1393. }
  1394. }).catch(error=>{
  1395. this.$message.error(error)
  1396. })
  1397. }
  1398. })
  1399. }else{
  1400. var _self = this;
  1401. _self.addForm.determine = true;
  1402. request.post('/bis/insp/plan/ga/add',this.addForm).then(res=>{
  1403. if(res.success){
  1404. _self.$message.success("保存成功");
  1405. _self.addDialogVisible = false;
  1406. _self.addForm = {};
  1407. _self.initTableData();
  1408. }else{
  1409. _self.$message.warning(res.message);
  1410. }
  1411. })
  1412. }
  1413. // this.addForm.dtlId = this.$route.query.id;
  1414. // var _self = this;
  1415. // request.post('/bis/insp/plan/ga/add',this.addForm).then(res=>{
  1416. // if(res.success){
  1417. // _self.$message.success("保存成功");
  1418. // _self.addDialogVisible = false;
  1419. // _self.addForm = {};
  1420. // _self.initTableData();
  1421. // }else{
  1422. // _self.$message.warning(res.message);
  1423. // }
  1424. // })
  1425. },
  1426. updateData(){
  1427. if(!this.yearId){
  1428. this.$message.warning("请选择年度计划");
  1429. return;
  1430. }
  1431. var obj = {
  1432. id:this.currentId,
  1433. yearPlanId:this.yearId
  1434. }
  1435. var _self = this;
  1436. request.post('/bis/insp/planMonth/',obj).then(res=>{
  1437. if(res.success){
  1438. _self.$message.success("关联成功");
  1439. _self.yearDialogVisible = false;
  1440. _self.currentId = "";
  1441. _self.yearId = "";
  1442. _self.initTableData();
  1443. }else{
  1444. _self.$message.warning(res.message);
  1445. }
  1446. })
  1447. },
  1448. closeAddDialog(){
  1449. this.addDialogVisible = false;
  1450. },
  1451. closeYearDialog(){
  1452. this.yearDialogVisible = false;
  1453. },
  1454. initTableData(){
  1455. // this.searchForm.dtlId = this.$route.query.id;
  1456. // this.searchForm.yearId = this.$route.query.planId;
  1457. this.loading = true;
  1458. var _self = this;
  1459. this.tableData = [];
  1460. request.post('/bis/insp/plan/ga/list',this.searchForm).then(res=>{
  1461. if(res.success){
  1462. _self.tableData = res.data;
  1463. // _self.total = res.data.total;
  1464. _self.loading = false;
  1465. _self.$nextTick(()=>{
  1466. _self.$refs.multipleTable.doLayout();
  1467. })
  1468. }else{
  1469. _self.$message.warning(res.message)
  1470. }
  1471. })
  1472. },
  1473. handleCurrentChange(val){
  1474. this.pageNum = val;
  1475. this.initTableData();
  1476. },
  1477. handleSizeChange(val){
  1478. this.pageSize = val;
  1479. this.initTableData();
  1480. },
  1481. searchBtn(){
  1482. this.isOne = false;
  1483. this.initTableData();
  1484. },
  1485. oneDel(){
  1486. this.isOne = true;
  1487. this.initTableData();
  1488. },
  1489. lookOver(obj){
  1490. this.detailObj = obj;
  1491. this.detailObj.chkMonth = this.detailObj.chkMonth?this.formatDate1(this.detailObj,{property:"chkMonth"},null,null):"";
  1492. this.detailObj.planSttm = this.detailObj.planSttm?this.formatDate(this.detailObj,{property:"planSttm"},null,null):"";
  1493. this.detailObj.planEntm = this.detailObj.planEntm?this.formatDate(this.detailObj,{property:"planEntm"},null,null):"";
  1494. this.detailDialogVisible = true;
  1495. },
  1496. async addBtn() {
  1497. this.objTypeList = [];
  1498. this.isDisabled = false;
  1499. this.addForm = {};
  1500. // this.getDetailListForm();
  1501. this.addDialogVisible = true;
  1502. this.dialogT = "添加"
  1503. }
  1504. }
  1505. }
  1506. </script>
  1507. <style lang="scss" scoped>
  1508. table{
  1509. width: 100%;
  1510. height:100%;
  1511. border-collapse: collapse;
  1512. margin-bottom: 30px;
  1513. }
  1514. table tr td{
  1515. border:1px solid #cecece;
  1516. height:35px;
  1517. text-indent: 15px;
  1518. padding-right: 15px;
  1519. }
  1520. table tr td:first-child{
  1521. background: #f2f1f1;
  1522. width: 260px;
  1523. text-align: right;
  1524. }
  1525. .title_monthReport /deep/ .el-input__inner{
  1526. border:0px;
  1527. font-size: 20px !important;
  1528. color:black;
  1529. }
  1530. .monthReport{
  1531. width: 100%;
  1532. height:100%;
  1533. margin: 0;
  1534. padding: 0;
  1535. }
  1536. .box-card{
  1537. width: calc(100% - 60px);
  1538. height:calc(100% - 20px);
  1539. margin: 0 auto;
  1540. margin-top: 10px;
  1541. }
  1542. .title_monthReport{
  1543. text-align: center;
  1544. padding: 10px;
  1545. }
  1546. .note_monthReport{
  1547. width: 100%;
  1548. background-color: rgba(255, 251, 230, 1);
  1549. box-sizing: border-box;
  1550. border-width: 1px;
  1551. border-style: solid;
  1552. border-color: rgba(255, 229, 143, 1);
  1553. color: rgba(0, 0, 0, 0.447058823529412);
  1554. font-size: 14px;
  1555. padding: 10px;
  1556. }
  1557. .note_monthReport p:first-child{
  1558. font-size: 16px !important;
  1559. }
  1560. .monthReport{
  1561. .demo-form-inline{
  1562. .el-form-item{
  1563. margin-bottom: 5px;
  1564. margin-top: 8px;
  1565. }
  1566. }
  1567. }
  1568. </style>