10ef16b77f6e18f50b678a9100de2b8a5e2e5f46.svn-base 45 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422
  1. <template>
  2. <el-container style="height:100%;" id='contentRow'>
  3. <el-header style="text-align: center;padding: 3vh 0;">
  4. <el-row>
  5. <span style="float:left;padding-left: 39px;"><el-button type="primary" size="mini" icon="el-icon-back" @click="backRouter">返回</el-button></span>
  6. <span class="title" @click="yearClickEvent()" v-if="yearClick">{{this.titleYear}}</span>
  7. <el-select
  8. style="width:5vw;"
  9. @change="titleYearChange()"
  10. v-if="!yearClick"
  11. v-model="titleYear"
  12. :placeholder="titleYear"
  13. >
  14. <el-option
  15. v-for="item in titleYears"
  16. :key="item.value"
  17. :label="item.label"
  18. :value="item.value"
  19. ></el-option>
  20. </el-select>&nbsp;年&nbsp;
  21. <span
  22. class="title"
  23. @click="monthClickEvent()"
  24. v-if="monthClick"
  25. >{{this.titleMonth}}</span>
  26. <el-select
  27. style="width:5vw;"
  28. @change="titleMonthChange()"
  29. v-if="!monthClick"
  30. v-model="titleMonth"
  31. :placeholder="titleMonth"
  32. >
  33. <el-option
  34. v-for="item in titleMonths"
  35. :key="item.value"
  36. :label="item.label"
  37. :value="item.value"
  38. ></el-option>
  39. </el-select>&nbsp;月督查计划
  40. </el-row>
  41. <el-row style="font-size: .7rem;color:rgb(88, 88, 88);width: calc(100% - 200px)">
  42. <span>(点击修改年月)</span>
  43. </el-row>
  44. </el-header>
  45. <el-main id="dcjhMain">
  46. <span style="font-size: .7rem;color:rgb(88, 88, 88);font-style: italic;">提示:点击行数据进行添加或编辑</span>
  47. <!-- <el-button-->
  48. <!-- type="text"-->
  49. <!-- icon="el-icon-circle-check-outline"-->
  50. <!-- @click="CopyDcGrounp()"-->
  51. <!-- style="float:right;">-->
  52. <!-- 复制督查组-->
  53. <!-- </el-button>-->
  54. <el-button
  55. type="primary"
  56. icon="el-icon-circle-plus-outline"
  57. @click="addDcGrounp()"
  58. v-if="!isShwoBtn"
  59. style="float:right;cursor: pointer;">
  60. 添加督查计划
  61. </el-button>
  62. <!-- 主要table -->
  63. <editTable
  64. ref="et"
  65. :tableData="currentDcTableData"
  66. @rowEditDone="refreshAfterEdit"
  67. @rowDelete="deleteRow"
  68. >
  69. <el-table-column
  70. header-align="center"
  71. align="center"
  72. min-width="150"
  73. prop="chkName"
  74. label="检查计划事项"
  75. show-overflow-tooltip
  76. ></el-table-column>
  77. <el-table-column
  78. header-align="center"
  79. align="center"
  80. min-width="100"
  81. prop="chkType"
  82. label="类别"
  83. show-overflow-tooltip
  84. ></el-table-column>
  85. <el-table-column prop="ptype" label="督查类别" min-width="120" align="center">
  86. <template slot-scope="scope">
  87. <!-- 针对单选 -->
  88. <transition name="el-fade-in-linear">
  89. <singleSelect
  90. @valueChange="addNewDclb"
  91. :initalValue="scope.row['ptype']"
  92. :selectData="DCTypeOption"
  93. :valueName="value"
  94. :labelName="label"
  95. :otherSearchParams="scope.row"
  96. v-if="tableCurrentRow == scope.row && !isShwoBtn"
  97. :disableSing="(scope.row.id)&&(scope.row.ptype)"
  98. ></singleSelect>
  99. </transition>
  100. <transition name="el-fade-in-linear">
  101. <p
  102. v-if="tableCurrentRow != scope.row"
  103. >{{testformatterlabel(scope.row['ptype'],DCTypeOption,'value','label')}}</p>
  104. </transition>
  105. </template>
  106. </el-table-column>
  107. <el-table-column prop="nm" label="督查组名称" min-width="120" align="center">
  108. <template slot-scope="scope">
  109. <transition name="el-fade-in-linear">
  110. <el-input
  111. @blur="submit_dczName()"
  112. v-if=" tableCurrentRow == scope.row && !isShwoBtn"
  113. v-model="scope.row.nm"
  114. :disabled="(!scope.row.id)&&(!scope.row.ptype)"
  115. ></el-input>
  116. </transition>
  117. <transition name="el-fade-in-linear">
  118. <p v-if="tableCurrentRow != scope.row">{{scope.row.nm}}</p>
  119. </transition>
  120. </template>
  121. </el-table-column>
  122. <!-- <el-table-column prop="ptype" label="年度检查计划名称" min-width="80">-->
  123. <!-- <template slot-scope="scope">-->
  124. <!-- &lt;!&ndash; 针对单选 &ndash;&gt;-->
  125. <!-- <transition name="el-fade-in-linear">-->
  126. <!-- <singleSelect-->
  127. <!-- @valueChange="planYearChange"-->
  128. <!-- :initalValue="scope.row['inspTask']"-->
  129. <!-- :selectData="planYearList"-->
  130. <!-- :valueName="value"-->
  131. <!-- :labelName="label"-->
  132. <!-- :otherSearchParams="scope.row"-->
  133. <!-- v-if="tableCurrentRow == scope.row"-->
  134. <!-- :disableSing="(!scope.row.id)&&(!scope.row.ptype)"-->
  135. <!-- ></singleSelect>-->
  136. <!-- </transition>-->
  137. <!-- <transition name="el-fade-in-linear">-->
  138. <!-- <p-->
  139. <!-- v-if="tableCurrentRow != scope.row"-->
  140. <!-- >{{testformatterlabel(scope.row['inspTask'],planYearList,'value','label')}}</p>-->
  141. <!-- </transition>-->
  142. <!-- </template>-->
  143. <!-- </el-table-column>-->
  144. <el-table-column prop="persAllAreaDtoList" label="地区" min-width="150" align="center">
  145. <template slot-scope="scope">
  146. <transition name="el-fade-in-linear">
  147. <div style="width:100%;height:100%;display:flex;flex-direction:row;justify-content:flex-start;align-items:center;" v-if=" tableCurrentRow == scope.row && !isShwoBtn">
  148. <mulitpleSelect
  149. style="width:100%;"
  150. @valueChange="multiInputData_dq"
  151. :initalValue="scope.row['persAllAreaDtoList']"
  152. :selectData="getAreaOptionByRow"
  153. valueName="adCode"
  154. labelName="adName"
  155. valueType="Object"
  156. :otherSearchParams="scope.row"
  157. v-if=" tableCurrentRow == scope.row && !isShwoBtn"
  158. :disableMuti="(!scope.row.id)&&(!scope.row.ptype)"
  159. ></mulitpleSelect>
  160. <el-button type="primary" icon="el-icon-plus" plain v-if=" tableCurrentRow == scope.row && !isShwoBtn" @click="popupAddAddvDialog(scope.row.id)" ></el-button>
  161. </div>
  162. </transition>
  163. <transition name="el-fade-in-linear">
  164. <p
  165. v-if="tableCurrentRow != scope.row"
  166. >{{scope.row['persAllAreaDtoList']&&scope.row['persAllAreaDtoList'].length>0?testformatterArray(scope.row['persAllAreaDtoList'],'adName'):''}}</p>
  167. </transition>
  168. </template>
  169. </el-table-column>
  170. <el-table-column prop="persAllObjDtoList" label="督查项目" min-width="150" align="center">
  171. <template slot-scope="scope">
  172. <transition name="el-fade-in-linear">
  173. <div style="width:100%;height:100%;display:flex;flex-direction:row;justify-content:flex-start;align-items:center;" v-if=" tableCurrentRow == scope.row && !isShwoBtn">
  174. <mulitpleSelect
  175. style="width:100%;"
  176. @valueChange="multiInputData_dcxm"
  177. :initalValue="scope.row['persAllObjDtoList']"
  178. :selectData="getObjectOptionByRow"
  179. valueName="code"
  180. labelName="name"
  181. subLabelName="location"
  182. valueType="Object"
  183. :otherSearchParams="scope.row"
  184. v-if=" tableCurrentRow == scope.row && !isShwoBtn"
  185. :disableMuti="(!scope.row.id)&&(!scope.row.ptype)"
  186. ></mulitpleSelect>
  187. <el-button type="primary" icon="el-icon-plus" plain v-if=" tableCurrentRow == scope.row && !isShwoBtn" @click="popupAddObjectDialog" ></el-button>
  188. </div>
  189. </transition>
  190. <transition name="el-fade-in-linear">
  191. <p
  192. v-if="tableCurrentRow != scope.row"
  193. >{{scope.row['persAllObjDtoList']&&scope.row['persAllObjDtoList'].length>0?testformatterArray(scope.row['persAllObjDtoList'],'name'):''}}</p>
  194. </transition>
  195. </template>
  196. </el-table-column>
  197. <el-table-column prop="leader" label="组长" min-width="150" align="center">
  198. <template slot-scope="scope">
  199. <transition name="el-fade-in-linear">
  200. <div style="width:100%;height:100%;display:flex;flex-direction:row;justify-content:flex-start;align-items:center;" v-if=" tableCurrentRow == scope.row && !isShwoBtn">
  201. <mulitpleSelect
  202. style="width:100%;"
  203. @valueChange="multiInputData_teamLeader"
  204. :initalValue="scope.row['leader']"
  205. :selectData="getPeopleOptionByRow"
  206. valueName="guid"
  207. labelName="persName"
  208. valueType="Object"
  209. :otherSearchParams="scope.row"
  210. v-if=" tableCurrentRow == scope.row && !isShwoBtn"
  211. :disableMuti="(!scope.row.id)&&(!scope.row.ptype)"
  212. ></mulitpleSelect>
  213. <el-button type="primary" icon="el-icon-plus" plain v-if=" tableCurrentRow == scope.row && !isShwoBtn" @click="popupAddMemberDialog('1')" ></el-button>
  214. </div>
  215. </transition>
  216. <transition name="el-fade-in-linear">
  217. <p
  218. v-if="tableCurrentRow != scope.row"
  219. >{{scope.row['leader']&&scope.row['leader'].length?testformatterArray(scope.row['leader'],'persName'):''}}</p>
  220. </transition>
  221. </template>
  222. </el-table-column>
  223. <el-table-column prop="teamMember" label="组员" min-width="150" align="center">
  224. <template slot-scope="scope">
  225. <transition name="el-fade-in-linear">
  226. <div style="width:100%;height:100%;display:flex;flex-direction:row;justify-content:flex-start;align-items:center;" v-if=" tableCurrentRow == scope.row && !isShwoBtn">
  227. <mulitpleSelect
  228. style="width:100%;"
  229. @valueChange="multiInputData_zy"
  230. :initalValue="scope.row['teamMember']"
  231. :selectData="getPeopleOptionByRow"
  232. valueName="guid"
  233. labelName="persName"
  234. valueType="Object"
  235. :otherSearchParams="scope.row"
  236. v-if=" tableCurrentRow == scope.row && !isShwoBtn"
  237. :disableMuti="(!scope.row.id)&&(!scope.row.ptype)"
  238. ></mulitpleSelect>
  239. <el-button type="primary" icon="el-icon-plus" plain v-if=" tableCurrentRow == scope.row && !isShwoBtn" @click="popupAddMemberDialog('2')" ></el-button>
  240. </div>
  241. </transition>
  242. <transition name="el-fade-in-linear">
  243. <p
  244. v-if="tableCurrentRow != scope.row"
  245. >{{scope.row['teamMember']&&scope.row['teamMember'].length?testformatterArray(scope.row['teamMember'],'persName'):''}}</p>
  246. </transition>
  247. </template>
  248. </el-table-column>
  249. <el-table-column prop="persAllDtoList" label="联络员" min-width="150" align="center">
  250. <template slot-scope="scope">
  251. <transition name="el-fade-in-linear">
  252. <div style="width:100%;height:100%;display:flex;flex-direction:row;justify-content:flex-start;align-items:center;" v-if=" tableCurrentRow == scope.row && !isShwoBtn">
  253. <mulitpleSelect
  254. style="width:100%;"
  255. @valueChange="multiInputData_concat"
  256. :initalValue="scope.row['concat']"
  257. :selectData="getPeopleOptionByRow"
  258. valueName="guid"
  259. labelName="persName"
  260. valueType="Object"
  261. :otherSearchParams="scope.row"
  262. v-if=" tableCurrentRow == scope.row && !isShwoBtn"
  263. :disableMuti="(!scope.row.id)&&(!scope.row.ptype)"
  264. ></mulitpleSelect>
  265. <el-button type="primary" icon="el-icon-plus" plain v-if=" tableCurrentRow == scope.row && !isShwoBtn" @click="popupAddMemberDialog('3')" ></el-button>
  266. </div>
  267. </transition>
  268. <transition name="el-fade-in-linear">
  269. <p
  270. v-if="tableCurrentRow != scope.row"
  271. >{{scope.row['concat']&&scope.row['concat'].length?testformatterArray(scope.row['concat'],'persName'):''}}</p>
  272. </transition>
  273. </template>
  274. </el-table-column>
  275. <el-table-column prop="exp" label="专家" min-width="150" align="center">
  276. <template slot-scope="scope">
  277. <transition name="el-fade-in-linear">
  278. <div style="width:100%;height:100%;display:flex;flex-direction:row;justify-content:flex-start;align-items:center;" v-if=" tableCurrentRow == scope.row && !isShwoBtn">
  279. <mulitpleSelect
  280. style="width:100%;"
  281. @valueChange="multiInputData_exp"
  282. :initalValue="scope.row['exp']"
  283. :selectData="getPeopleOptionByRow"
  284. valueName="guid"
  285. labelName="persName"
  286. valueType="Object"
  287. :otherSearchParams="scope.row"
  288. v-if=" tableCurrentRow == scope.row && !isShwoBtn"
  289. :disableMuti="(!scope.row.id)&&(!scope.row.ptype)"
  290. ></mulitpleSelect>
  291. <el-button type="primary" icon="el-icon-plus" plain v-if=" tableCurrentRow == scope.row && !isShwoBtn" @click="popupAddMemberDialog('4')" ></el-button>
  292. </div>
  293. </transition>
  294. <transition name="el-fade-in-linear">
  295. <p
  296. v-if="tableCurrentRow != scope.row"
  297. >{{scope.row['exp']&&scope.row['exp'].length?testformatterArray(scope.row['exp'],'persName'):''}}</p>
  298. </transition>
  299. </template>
  300. </el-table-column>
  301. <el-table-column prop="sttm" label="开始时间" min-width="140" align="center">
  302. <template slot-scope="scope">
  303. <transition name="el-fade-in-linear">
  304. <el-date-picker
  305. @blur="submit_sttm()"
  306. v-if=" tableCurrentRow == scope.row && !isShwoBtn"
  307. :disabled="(!scope.row.id)&&(!scope.row.ptype)"
  308. style="width:100%;height:100%;"
  309. size="mini"
  310. v-model="scope.row.sttm"
  311. value-format="yyyy-MM-dd"
  312. type="date"
  313. placeholder="选择日期"
  314. ></el-date-picker>
  315. </transition>
  316. <transition name="el-fade-in-linear">
  317. <p v-if="tableCurrentRow != scope.row">{{scope.row.sttm}}</p>
  318. </transition>
  319. </template>
  320. </el-table-column>
  321. <el-table-column prop="entm" label="结束时间" min-width="140" align="center">
  322. <template slot-scope="scope">
  323. <transition name="el-fade-in-linear">
  324. <el-date-picker
  325. @blur="submit_entm()"
  326. v-if=" tableCurrentRow == scope.row && !isShwoBtn"
  327. :disabled="(!scope.row.id)&&(!scope.row.ptype)"
  328. style="width:100%;height:100%;"
  329. size="mini"
  330. v-model="scope.row.entm"
  331. value-format="yyyy-MM-dd"
  332. type="date"
  333. placeholder="选择日期"
  334. ></el-date-picker>
  335. </transition>
  336. <transition name="el-fade-in-linear">
  337. <p v-if="tableCurrentRow != scope.row">{{scope.row.entm}}</p>
  338. </transition>
  339. </template>
  340. </el-table-column>
  341. <el-table-column
  342. fixed="right"
  343. label="操作"
  344. align="center"
  345. width="130">
  346. <template slot-scope="scope">
  347. <el-button style="cursor:pointer" v-show="tableCurrentRow == scope.row && !isShwoBtn" @click.stop="singleRowSubmit(scope.row)" type="text" size="small">完成</el-button>
  348. <el-button style="cursor:pointer" @click.stop="singleRowDelete(scope.row)" type="text" size="small" v-if="!isShwoBtn">删除</el-button>
  349. </template>
  350. </el-table-column>
  351. </editTable>
  352. </el-main>
  353. <!-- add -->
  354. <editDczInfo ref="editDczInfoRef" :dczId="tableCurrentRowId" :jiGouId="orgId" :addPerType="addPerType" @addSuccess="singleRowSubmit" @deleteGroup="deleteGroup"></editDczInfo>
  355. <editDcdxInfo ref="editDcdxInfoRef" :objType="tableCurrentRowType" :plnaId ="tableCurrentRowId" :dczId="tableCurrentRowId" @addSuccess="singleRowSubmit"></editDcdxInfo>
  356. <editDcdxInfosz ref="editDcdxInfoSzRef" :objType="tableCurrentRowType" :plnaId ="tableCurrentRowId" :dczId="tableCurrentRowId" @addSuccess="singleRowSubmit"></editDcdxInfosz>
  357. <editDcdxInfojianshe ref="editDcdxInfoJianSheRef" :objType="tableCurrentRowType" :plnaId ="tableCurrentRowId" :dczId="tableCurrentRowId" @addSuccess="singleRowSubmit"></editDcdxInfojianshe>
  358. <editDcdxInfoyunxing ref="editDcdxInfoYunXingRef" :objType="tableCurrentRowType" :plnaId ="tableCurrentRowId" :dczId="tableCurrentRowId" @addSuccess="singleRowSubmit"></editDcdxInfoyunxing>
  359. <editDcdxInfoRyZj ref="editDcdxInfoRyZjRef" :objType="tableCurrentRowType" :plnaId ="tableCurrentRowId" :dczId="tableCurrentRowId" @addSuccess="singleRowSubmit"></editDcdxInfoRyZj>
  360. <editDcdxInfoDiFang ref="editDcdxInfoDiFangRef" :objType="tableCurrentRowType" :plnaId ="tableCurrentRowId" :dczId="tableCurrentRowId" @addSuccess="singleRowSubmit"></editDcdxInfoDiFang>
  361. <editDcdxInfoChaoBiaoHongYuAn ref="editDcdxInfoChaoBiaoHongYuAnRef" :objType="tableCurrentRowType" :plnaId ="tableCurrentRowId" :dczId="tableCurrentRowId" @addSuccess="singleRowSubmit"></editDcdxInfoChaoBiaoHongYuAn>
  362. <editDcdxInfoCommon ref="editDcdxInfoCommonRef" :objType="tableCurrentRowType" :plnaId ="tableCurrentRowId" :dczId="tableCurrentRowId" @addSuccess="singleRowSubmit"></editDcdxInfoCommon>
  363. <editDcdxXsdyhgl ref="editDcdxXsdyhglRef" :objType="tableCurrentRowType" :plnaId ="tableCurrentRowId" :dczId="tableCurrentRowId" @addSuccess="singleRowSubmit"></editDcdxXsdyhgl>
  364. <editDcdxInfoFjncysaq ref="editDcdxInfoFjncysaqRef" :objType="tableCurrentRowType" :plnaId ="tableCurrentRowId" :dczId="tableCurrentRowId" @addSuccess="singleRowSubmit"></editDcdxInfoFjncysaq>
  365. <editDcqyInfo ref="editDcqyInfoRef" :objType="tableCurrentRowType" :plnaId ="tableCurrentRowId" :dczId="tableCurrentRowId" @addSuccess="singleRowSubmit"></editDcqyInfo>
  366. <infomationReuse v-if="infomationReuseDialog" @closeDialog="closeDialog"></infomationReuse>
  367. </el-container>
  368. </template>
  369. <script>
  370. import request from "../../utils/gw_ajax_request.js";
  371. import {
  372. formatterValueToLabel,
  373. formatterArrayToLabel
  374. } from "../../utils/gw_formatter.js";
  375. // import {getArenGrpMen, addDczOthersMens,getPlanNodeByPersid,getTermByPersid,getPersPlanType} from "@api/duChaPlan.js";
  376. import {
  377. getArenGrpMen,
  378. addDczOthersMens,
  379. getPlanNodeByPersid,
  380. getTermByPersid,
  381. deleteMember,
  382. setHeadMan,
  383. deleteDcdxByObjid,
  384. getSupObjListNotInspGroupId,
  385. getOptionalArea,
  386. deleteDcqy,
  387. setPersRole,
  388. getPersPlanType,
  389. deleteDcdq,
  390. editDcz
  391. } from "@api/duChaPlan.js";
  392. import editTable from "@widget/editableTable.1.vue";
  393. import singleSelect from "@baseWidget/singleSelect.vue";
  394. import mulitpleSelect from "@baseWidget/multipleSelect.vue";
  395. import datePicker from "@baseWidget/datePicker.vue";
  396. // add
  397. import editDczInfo from './editDczInfo.vue';
  398. import infomationReuse from './InformationReuse'
  399. export default {
  400. props: [],
  401. components: {
  402. infomationReuse: infomationReuse,
  403. editTable: editTable,
  404. singleSelect: singleSelect,
  405. mulitpleSelect: mulitpleSelect,
  406. editDczInfo:editDczInfo,
  407. editDcqyInfo:resolve => {require(['./editDcqyInfoNew.vue'],resolve)},
  408. editDcdxInfo:resolve => {require(['./editDcdxInfo.vue'],resolve)},
  409. // editDcdxInfo_172:resolve => {require(['./editDcdxInfo.vue'],resolve)},
  410. editDcdxInfosz:resolve => {require(['./editDcdxInfo_sz.vue'],resolve)},
  411. editDcdxInfojianshe:resolve => {require(['./editDcdxInfo_jianshe.vue'],resolve)},
  412. editDcdxInfoyunxing:resolve => {require(['./editDcdxInfo_yunxing.vue'],resolve)},
  413. editDcdxInfoRyZj: resolve => {
  414. require(['./editDcdxInfo_ryZj.vue'], resolve)
  415. }, //浙江人饮
  416. editDcdxInfoDiFang: resolve => {
  417. require(['./editDcdxInfo_difang.vue'], resolve)
  418. }, //堤防
  419. editDcdxInfoChaoBiaoHongYuAn: resolve => {
  420. require(['./editDcdxInfo_chaobiaohongyuan.vue'], resolve)
  421. }, //超标
  422. editDcdxInfoCommon:resolve => {
  423. require(['./editDcdxInfo_common.vue'], resolve)
  424. },
  425. editDcdxXskSd:resolve => {
  426. require(['./editDcdxInfo.vue'], resolve)
  427. },
  428. editDcdxXsdyhgl:resolve => {
  429. require(['./editDcdxInfo_xsdyhgl.vue'], resolve)
  430. },
  431. editDcdxInfoFjncysaq: (resolve) => {
  432. require(['./editDcdxInfo_fjncysaq.vue'], resolve)
  433. },//福建农村饮水安全
  434. datePicker
  435. },
  436. data() {
  437. return {
  438. infomationReuseDialog: false,
  439. sttm: "",
  440. entm: "",
  441. addPerType:'',
  442. // orgId: localStorage.getItem("orgId") ? localStorage.getItem("orgId") : "",
  443. dczName: "",
  444. dczNameNormal: true,
  445. yearClick: true,
  446. monthClick: true,
  447. titleYear: "",
  448. titleMonth: "",
  449. titleYears: [
  450. { label: "2017", value: "2017" },
  451. { label: "2018", value: "2018" },
  452. { label: "2019", value: "2019" }
  453. ],
  454. titleMonthNum: 12,
  455. titleMonths: [],
  456. currentDCType: "1",
  457. DCTypeOption: [
  458. // { value: "1", label: "小水库督查" },
  459. // { value: "2", label: "人饮督查" },
  460. // { value: "3", label: "水毁督查" }
  461. ],
  462. pageObject: {
  463. pageSize: 10,
  464. pageIndex: 1,
  465. total: 0
  466. },
  467. jihuaId: "",
  468. dcjhMainHeight: 0,
  469. currentDcTermId: "",
  470. currentDcTermObject: "",
  471. DCTermOption: [],
  472. currentDcTableData: [],
  473. addPICIDialogVisible: false,
  474. has_pType: false,
  475. piciForm: {
  476. name: "",
  477. startDate: "",
  478. endDate: ""
  479. },
  480. againType:false,
  481. tableCurrentRowId:'',
  482. tableCurrentRowType:'',
  483. planYearList:[]
  484. };
  485. },
  486. //生命周期 - 创建完成(可以访问当前this实例)
  487. created() {
  488. let date = new Date();
  489. let year = date.getFullYear();
  490. let month = date.getMonth() + 1;
  491. month = month < 10 ? "0" + month : month;
  492. this.titleYear = year;
  493. this.titleMonth = month;
  494. },
  495. computed: {
  496. isShwoBtn(){
  497. return this.$route.query.state=='1'?true:false;
  498. },
  499. userId: function() {
  500. return localStorage.getItem("userid")
  501. ? localStorage.getItem("userid")
  502. : "1098101939614724096";
  503. },
  504. userInAllNode: function() {
  505. //当前登录用户所在的所有组信息
  506. return JSON.parse(localStorage.getItem("allNode"))
  507. ? JSON.parse(localStorage.getItem("allNode"))
  508. : [];
  509. },
  510. orgName() {
  511. return localStorage.getItem("orgName")
  512. ? localStorage.getItem("orgName")
  513. : "";
  514. },
  515. orgId() {
  516. return localStorage.getItem("currentOrgId") ? localStorage.getItem("currentOrgId") : "";
  517. },
  518. userType() {
  519. return localStorage.getItem("userType")
  520. ? localStorage.getItem("userType")
  521. : "1";
  522. },
  523. currentShowLists: function() {
  524. return this.currentShowList.filter(
  525. item => item.persName.indexOf(this.member_search) > -1
  526. );
  527. },
  528. isAdmin: function() {
  529. return localStorage.getItem("isAdmin")
  530. ? localStorage.getItem("isAdmin")
  531. : "";
  532. },
  533. tableCurrentRow: function() {
  534. if (this.$refs["et"]) {
  535. return this.$refs["et"].currentRow;
  536. } else {
  537. return null;
  538. }
  539. },
  540. },
  541. watch: {
  542. currentDCType: function() {
  543. console.log("点选了新的督查类型");
  544. }
  545. },
  546. mounted() {
  547. console.log(this.orgId, this.isAdmin);
  548. this.monthSelect();
  549. this.getUserPlanType();
  550. this.getUsrPlanInformationByYearAndMounth();
  551. this.getAllYearPlan();
  552. this.dcjhMainHeight = 700;
  553. },
  554. activated() {
  555. // this.test_getDuChaPlanInformation();
  556. this.getUsrPlanInformationByYearAndMounth();
  557. },
  558. methods: {
  559. backRouter(){
  560. this.$router.push({path:"/planCheckSd"});
  561. },
  562. getAllYearPlan(){
  563. var _self = this;
  564. this.planYearList = [];
  565. request.post('/bis/insp/plan/year/findList',{}).then(res=>{
  566. if(res.success){
  567. if(res.data && res.data.length > 0){
  568. res.data.forEach((item)=>{
  569. _self.planYearList.push({
  570. value:item.id,
  571. label:item.chkName+"("+item.chkType+")"
  572. })
  573. })
  574. }
  575. }else{
  576. _self.$message.warning(res.message);
  577. }
  578. })
  579. },
  580. singleRowSubmit:function(){
  581. this.dczName = "";
  582. this.sttm = "";
  583. this.entm = "";
  584. // this.has_pType = false;
  585. this.getUsrPlanInformationByYearAndMounth();
  586. // this.tableCurrentRow = {
  587. // nm: "",
  588. // persAllAreaDtoList: "",
  589. // persAllObjDtoList: "",
  590. // leader: "",
  591. // persAllDtoList: "",
  592. // sttm: "",
  593. // entm: ""
  594. // };
  595. this.tableCurrentRow.nm = "";
  596. this.tableCurrentRow.persAllAreaDtoList = "";
  597. this.tableCurrentRow.persAllObjDtoList = "";
  598. this.tableCurrentRow.leader = "";
  599. this.tableCurrentRow.persAllDtoList = "";
  600. this.tableCurrentRow.sttm = "";
  601. this.tableCurrentRow.entm = "";
  602. delete this.tableCurrentRow.ptype;
  603. delete this.tableCurrentRow.id;
  604. // delete this.againType.key;
  605. this.againType = false;
  606. console.log(this.tableCurrentRow);
  607. },
  608. deleteGroup(){
  609. var params = {}
  610. params.id = this.tableCurrentRowId;
  611. this.singleRowDelete(params);
  612. },
  613. singleRowDelete:function(params){
  614. console.log(params);
  615. this.$confirm('此操作将全部删除 “'+ params.nm +'” 组的所有业务信息,是否继续?', '提示', {
  616. confirmButtonText: '确定',
  617. cancelButtonText: '取消',
  618. type: 'warning'
  619. }).then(() => {
  620. request.get(`/supervision/plan/cleanGroupInfo?groupId=${params.id}`).then((res)=>{
  621. if(res.code!=50001&&res.code!='50001'){
  622. this.$message({
  623. type: 'success',
  624. message: '删除成功!'
  625. });
  626. }else{
  627. this.$message({
  628. type: 'error',
  629. message: '请先清空相关填报内容!'
  630. });
  631. }
  632. this.refreshAfterEdit();
  633. })
  634. }).catch(() => {
  635. this.$message({
  636. type: 'info',
  637. message: '已取消删除'
  638. });
  639. });
  640. },
  641. submit_dczName(){
  642. var _this = this;
  643. request
  644. .post("/supervision/plan/insertSupervisionObj", {
  645. persid :this.userId,
  646. inspTask: this.$route.query.id,
  647. nm: this.tableCurrentRow.nm,
  648. id: this.tableCurrentRow.id,
  649. persAllAreaDtoList: [],
  650. persAllDtoList: [],
  651. persAllObjDtoList: []
  652. })
  653. .then(response => {
  654. _this.$message.success("设置督查组名称成功");
  655. });
  656. },
  657. planYearChange(val){
  658. var _this = this;
  659. if(val.changeType === "change") {
  660. request.post("/supervision/plan/insertSupervisionObj", {
  661. persid: this.userId,
  662. inspTask: val.newValue,
  663. id: this.tableCurrentRow.id,
  664. persAllAreaDtoList: [],
  665. persAllDtoList: [],
  666. persAllObjDtoList: []
  667. })
  668. .then(response => {
  669. _this.$message.success("设置年度计划成功");
  670. });
  671. }
  672. },
  673. submit_sttm(){
  674. var _this = this;
  675. var obj = {
  676. persid :this.userId,
  677. sttm: this.tableCurrentRow.sttm,
  678. id: this.tableCurrentRow.id,
  679. persAllAreaDtoList: [],
  680. persAllDtoList: [],
  681. persAllObjDtoList: []
  682. }
  683. request.post("/supervision/plan/insertSupervisionObj",obj).then(res => {
  684. if(res.data.msg){
  685. this.$confirm(res.data.msg+'是否继续编辑?', '提示', {
  686. confirmButtonText: '确定',
  687. cancelButtonText: '取消',
  688. type: 'warning'
  689. }).then(() => {
  690. obj.isInsert = "1";
  691. request.post(`/supervision/plan/insertSupervisionObj`,obj).then(res1=>{
  692. if(res1.success){
  693. _this.$message.success("设置督查开始时间成功");
  694. }
  695. }).catch(error=>{
  696. _this.$message.error(error)
  697. })
  698. }).catch(() => {
  699. _this.$message({
  700. type: 'warning',
  701. message: '已取消设置!'
  702. });
  703. _this.refreshAfterEdit();
  704. });
  705. }else{
  706. _this.$message.success("设置督查开始时间成功");
  707. }
  708. });
  709. },
  710. submit_entm(){
  711. var _this = this;
  712. var obj = {
  713. persid :this.userId,
  714. entm: this.tableCurrentRow.entm,
  715. id: this.tableCurrentRow.id,
  716. persAllAreaDtoList: [],
  717. persAllDtoList: [],
  718. persAllObjDtoList: []
  719. }
  720. request.post("/supervision/plan/insertSupervisionObj",obj).then(res => {
  721. if(res.data.msg){
  722. this.$confirm(res.data.msg+'是否继续编辑?', '提示', {
  723. confirmButtonText: '确定',
  724. cancelButtonText: '取消',
  725. type: 'warning'
  726. }).then(() => {
  727. obj.isInsert = "1";
  728. request.post(`/supervision/plan/insertSupervisionObj`,obj).then(res1=>{
  729. if(res1.success){
  730. _this.$message.success("设置督查结束时间成功");
  731. }
  732. }).catch(error=>{
  733. _this.$message.error(error)
  734. })
  735. }).catch(() => {
  736. _this.$message({
  737. type: 'warning',
  738. message: '已取消设置!'
  739. });
  740. _this.refreshAfterEdit();
  741. });
  742. }else{
  743. _this.$message.success("设置督查结束时间成功");
  744. }
  745. });
  746. },
  747. addNewDclb(val) {
  748. console.log(val);
  749. var _this = this;
  750. if(val.changeType === "change"){
  751. _this.has_pType = true;
  752. let params = {};
  753. params["orgId"] = localStorage.getItem("currentOrgId")
  754. ? localStorage.getItem("currentOrgId")
  755. : "";
  756. params["ptype"] = val.newValue;
  757. params["inspMnth"] = _this.titleMonth;
  758. params["inspYear"] = _this.titleYear;
  759. // if (val.changeElement != "add") {
  760. // if(!_this.againType.hasOwnProperty('key') || _this.againType === null){
  761. if(!_this.tableCurrentRow.id){
  762. request.post("/supervision/plan/insertGroupInfo", params).then(res => {
  763. // _this.againType = res.data;
  764. _this.againType = res.success;
  765. if(res.data != null){
  766. _this.tableCurrentRow["id"] = res.data.key;
  767. _this.tableCurrentRow["ptype"] = params["ptype"];
  768. }
  769. });
  770. }
  771. // }
  772. }
  773. },
  774. isArray(value){
  775. if(typeof Array.isArray === 'function'){
  776. return Array.isArray(value);
  777. }else{
  778. return Object.prototype.toString.call(value) === '[object Array]';
  779. }
  780. },
  781. singleSeletData_zz(val){
  782. console.log(val);
  783. let _self = this;
  784. let guidUse;
  785. //以下判断是偷懒处理,没有解决问题症结 0509
  786. //(Object.prototype.toString.call(val.changeElement) != '[object Array]')
  787. if((!this.isArray(val.changeElement)) && val.changeElement != null){
  788. if(typeof val.newValue === 'object'){
  789. guidUse = val.newValue.guid;
  790. setPersRole(guidUse,'','1',this.tableCurrentRow.id).then((res)=>{
  791. _self.$message.success("设置组长成功");
  792. })
  793. }else{
  794. guidUse = val.newValue;
  795. setPersRole(guidUse,'','1',this.tableCurrentRow.id).then((res)=>{
  796. _self.$message.success("设置组长成功");
  797. })
  798. }
  799. }
  800. },
  801. multiInputData_dq(val) {
  802. console.log(val);
  803. let _self = this;
  804. if (val.changeType === "add") {
  805. // 添加督查区域
  806. request
  807. .post("/supervision/plan/insertSupervisionObj", {
  808. id: this.tableCurrentRow.id,
  809. persAllAreaDtoList: [
  810. {
  811. adCode: val.changeElement.adCode,
  812. adName: val.changeElement.adName
  813. }
  814. ],
  815. persAllDtoList: [],
  816. persAllObjDtoList: []
  817. })
  818. .then(response => {
  819. _self.tableCurrentRow["persAllAreaDtoList"] = val["newValue"];
  820. _self.$message.success("添加地区成功");
  821. });
  822. } else if (val.changeType == "delete") {
  823. // 删除督查区域
  824. // request.get('/dc/insp/selarea/deleteByGroupId/' + this.tableCurrentRow.id + '/' + val.changeElement.adCode)
  825. // .then(response => {
  826. // _self.$message.success("删除分工成功");
  827. // });
  828. deleteDcdq(this.tableCurrentRow.id,val.changeElement.adCode).then((res)=>{
  829. _self.$message.success("删除地区成功!");
  830. })
  831. }
  832. },
  833. multiInputData_zy(val) {
  834. console.log(val);
  835. let _self = this;
  836. if (val.changeType === "add") {
  837. addDczOthersMens(val.changeElement.guid,this.tableCurrentRow.id).then(response => {
  838. if (response.success == true) {
  839. _self.$message.success("添加组员成功");
  840. }
  841. });
  842. // request
  843. // .post("/supervision/plan/insertSupervisionObj", {
  844. // id: this.tableCurrentRow.id,
  845. // persAllAreaDtoList: [],
  846. // persAllDtoList: [
  847. // {
  848. // guid: val.changeElement.guid,
  849. // persName: val.changeElement.persName,
  850. // persType: val.changeElement.persType
  851. // }
  852. // ],
  853. // persAllObjDtoList: []
  854. // })
  855. // .then(response => {
  856. // _self.tableCurrentRow["persAllDtoList"] = val["newValue"];
  857. // _self.$message.success("添加成员成功");
  858. // });
  859. } else if (val.changeType == "delete") {
  860. deleteMember(this.tableCurrentRow.id,val.changeElement.guid).then((res)=>{
  861. if(res.success){
  862. _self.$message.success("删除组员成功");
  863. }else{
  864. _self.$message.error("请先删除登记表");
  865. }
  866. });
  867. }
  868. },
  869. multiInputData_exp(val) {
  870. console.log(val);
  871. let _self = this;
  872. if (val.changeType === "add") {
  873. request.post('/supervision/plan/insertSupervisionObj',{
  874. "id": _self.tableCurrentRow.id,
  875. "persAllAreaDtoList":[],
  876. "persAllDtoList":[
  877. {
  878. guid:val.changeElement.guid,
  879. persName: val.changeElement.persName,
  880. persType: '4'
  881. }
  882. ],
  883. "persAllObjDtoList": [],
  884. "pid": _self.tableCurrentRow.pid
  885. })
  886. .then(response => {
  887. _self.$message.success("添加专家成功");
  888. });
  889. } else if (val.changeType == "delete") {
  890. deleteMember(this.tableCurrentRow.id,val.changeElement.guid).then((res)=>{
  891. if(res.success){
  892. _self.$message.success("删除组员成功");
  893. }else{
  894. _self.$message.error("请先删除登记表");
  895. }
  896. });
  897. }
  898. },
  899. multiInputData_teamLeader(val) {
  900. console.log(val);
  901. let _self = this;
  902. if (val.changeType === "add") {
  903. request.post('/supervision/plan/insertSupervisionObj',{
  904. "id": _self.tableCurrentRow.id,
  905. "persAllAreaDtoList":[],
  906. "persAllDtoList":[
  907. {
  908. guid:val.changeElement.guid,
  909. persName: val.changeElement.persName,
  910. persType: '1'
  911. }
  912. ],
  913. "persAllObjDtoList": [],
  914. "pid": _self.tableCurrentRow.pid
  915. })
  916. .then(response => {
  917. _self.$message.success("添加专家成功");
  918. });
  919. } else if (val.changeType == "delete") {
  920. deleteMember(this.tableCurrentRow.id,val.changeElement.guid).then((res)=>{
  921. if(res.success){
  922. _self.$message.success("删除组员成功");
  923. }else{
  924. _self.$message.error("请先删除登记表");
  925. }
  926. });
  927. }
  928. },
  929. multiInputData_concat(val) {
  930. console.log(val);
  931. let _self = this;
  932. if (val.changeType === "add") {
  933. request.post('/supervision/plan/insertSupervisionObj',{
  934. "id": _self.tableCurrentRow.id,
  935. "persAllAreaDtoList":[],
  936. "persAllDtoList":[
  937. {
  938. guid:val.changeElement.guid,
  939. persName: val.changeElement.persName,
  940. persType: '3'
  941. }
  942. ],
  943. "persAllObjDtoList": [],
  944. "pid": _self.tableCurrentRow.pid
  945. })
  946. .then(response => {
  947. _self.$message.success("添加专家成功");
  948. });
  949. } else if (val.changeType == "delete") {
  950. deleteMember(this.tableCurrentRow.id,val.changeElement.guid).then((res)=>{
  951. if(res.success){
  952. _self.$message.success("删除组员成功");
  953. }else{
  954. _self.$message.error("请先删除登记表");
  955. }
  956. });
  957. }
  958. },
  959. delete_dxxm(val){
  960. console.log(val);
  961. var _self = this;
  962. this.$confirm('此操作将删除 “' + val.changeElement.name + '” 有关的所有业务数据,是否继续?', '提示', {
  963. confirmButtonText: '确定',
  964. cancelButtonText: '取消',
  965. type: 'warning'
  966. }).then(() => {
  967. deleteDcdxByObjid(val.changeElement.objId,val.changeElement.ptype).then(
  968. res => {
  969. if(res.success){
  970. this.$message({
  971. type: 'success',
  972. message: '删除成功!'
  973. });
  974. }
  975. }
  976. );
  977. }).catch(() => {
  978. this.$message({
  979. type: 'info',
  980. message: '已取消删除'
  981. });
  982. });
  983. },
  984. multiInputData_dcxm(val) {
  985. console.log(val);
  986. let _self = this;
  987. if (val.changeType === "add") {
  988. request
  989. .post("/supervision/plan/insertSupervisionObj", {
  990. id: this.tableCurrentRow.id,
  991. persid :this.userId,
  992. persAllAreaDtoList: [],
  993. persAllDtoList: [],
  994. persAllObjDtoList: [
  995. {
  996. code: val.changeElement.code,
  997. name: val.changeElement.name,
  998. ptype: this.tableCurrentRow.ptype
  999. }
  1000. ]
  1001. })
  1002. .then(response => {
  1003. _self.tableCurrentRow["persAllObjDtoList"] = val["newValue"];
  1004. _self.$message.success("添加项目成功");
  1005. });
  1006. } else if (val.changeType == "delete") {
  1007. _self.delete_dxxm(val);
  1008. }
  1009. },
  1010. editData(rowData) {
  1011. var _this = this;
  1012. editDcz(this.userId, this.titleYear, this.titleMonth, this.orgId).then(
  1013. res => {
  1014. this.currentDcTableData = res.data;
  1015. }
  1016. );
  1017. },
  1018. addDcGrounp: function() {
  1019. // this.currentDcTableData.push();
  1020. this.againType = false;
  1021. //to-do 改这里
  1022. this.$refs["et"].addOneRow({
  1023. chkName:this.$route.query.chkName,
  1024. chkType:this.$route.query.chkType,
  1025. nm: "",
  1026. persAllAreaDtoList: "",
  1027. ptype: "",
  1028. persAllObjDtoList: "",
  1029. leader: "",
  1030. persAllDtoList: "",
  1031. sttm: "",
  1032. entm: ""
  1033. });
  1034. },
  1035. CopyDcGrounp: function() {
  1036. this.infomationReuseDialog = true;
  1037. },
  1038. closeDialog(){
  1039. this.infomationReuseDialog = false;
  1040. this.getUsrPlanInformationByYearAndMounth();
  1041. },
  1042. monthSelect: function() {
  1043. var _this = this;
  1044. for (var i = 0; i < this.titleMonthNum; i++) {
  1045. if (i < 9) {
  1046. _this.titleMonths.push({
  1047. label: "0" + (i + 1) + "月",
  1048. value: "0" + (i + 1)
  1049. });
  1050. } else {
  1051. _this.titleMonths.push({
  1052. label: i + 1 + "月",
  1053. value: i + 1
  1054. });
  1055. }
  1056. }
  1057. },
  1058. yearClickEvent: function() {
  1059. this.yearClick = !this.yearClick;
  1060. },
  1061. monthClickEvent: function() {
  1062. this.monthClick = !this.monthClick;
  1063. },
  1064. titleYearChange: function() {
  1065. this.yearClick = !this.yearClick;
  1066. this.getUsrPlanInformationByYearAndMounth();
  1067. },
  1068. titleMonthChange: function() {
  1069. this.monthClick = !this.monthClick;
  1070. this.getUsrPlanInformationByYearAndMounth();
  1071. },
  1072. testformatterArray: function(
  1073. arr,
  1074. labelPropName,
  1075. splitMark = ",",
  1076. nonLabel = "",
  1077. isAddNonLabel = true
  1078. ) {
  1079. let r = formatterArrayToLabel(
  1080. arr,
  1081. labelPropName,
  1082. (splitMark = ","),
  1083. (nonLabel = ""),
  1084. (isAddNonLabel = true)
  1085. );
  1086. return r;
  1087. },
  1088. testformatterlabel: function(
  1089. value,
  1090. labelDatas,
  1091. valuePropName,
  1092. labelPropName,
  1093. nonLabel = ""
  1094. ) {
  1095. let r = formatterValueToLabel(
  1096. value,
  1097. labelDatas,
  1098. valuePropName,
  1099. labelPropName,
  1100. (nonLabel = "")
  1101. );
  1102. return r;
  1103. },
  1104. getUsrPlanInformationByYearAndMounth: function() {
  1105. getTermByPersid(
  1106. this.userId,
  1107. this.titleYear,
  1108. this.titleMonth,
  1109. this.orgId,
  1110. this.$route.query.id
  1111. ).then(res => {
  1112. this.currentDcTableData = res.data;
  1113. this.$nextTick(()=>{
  1114. this.$refs.et.doLayout();
  1115. })
  1116. // 为列表分开组员,组长
  1117. this.currentDcTableData.forEach(element => {
  1118. element["leader"] = [];
  1119. element["exp"] = [];
  1120. element["teamMember"] = [];
  1121. element["concat"] = [];
  1122. element["persAllDtoList"].forEach(per => {
  1123. if (per.persType == "1") {
  1124. element["leader"].push(per);
  1125. } else if (per.persType == "4") {
  1126. element["exp"].push(per);
  1127. } else if (per.persType == "3") {
  1128. element["concat"].push(per);
  1129. } else if (per.persType == "2") {
  1130. element["teamMember"].push(per);
  1131. }
  1132. });
  1133. });
  1134. });
  1135. },
  1136. getUserPlanType: function() {
  1137. let _self = this;
  1138. var list = [];
  1139. getPersPlanType(this.userId).then(res => {
  1140. res.data.forEach(option => {
  1141. if(option.id==_self.$route.query.objType){
  1142. list.push({
  1143. label: option["name"],
  1144. value:Number(option["id"]) + ""
  1145. });
  1146. }
  1147. });
  1148. this.DCTypeOption = list;
  1149. });
  1150. },
  1151. getAreaOptionByRow: function(query, rowObject) {
  1152. //根据行数据获取可选区域
  1153. return new Promise((resolve, reject) => {
  1154. getOptionalArea(rowObject.id, "000000000000", query).then(
  1155. response => {
  1156. var arr = response.data;
  1157. var result = [];
  1158. arr.forEach((arrItem, index) => {
  1159. arrItem["adName"] = arrItem["AD_NAME"];
  1160. arrItem["adCode"] = arrItem["AD_CODE"];
  1161. if (arrItem["AD_GRAD"] == "2") {
  1162. result.push(arrItem);
  1163. }
  1164. });
  1165. resolve({ result: result });
  1166. },
  1167. re => {
  1168. reject(null);
  1169. }
  1170. );
  1171. });
  1172. },
  1173. getObjectOptionByRow: function(query, rowObject) {
  1174. //根据行数据获取督查对象选项,主要考虑因为行督查对象类型 选用不同的方法
  1175. if (rowObject.ptype == "1") {
  1176. // 小水库
  1177. console.log("远端查询水库");
  1178. if(rowObject.persAllAreaDtoList === ""){
  1179. this.$message({
  1180. message: '请先添加督查区域!',
  1181. type: 'warning'
  1182. });
  1183. }else{
  1184. let adcds = [];
  1185. rowObject.persAllAreaDtoList.forEach(element => {
  1186. adcds.push(element.value);
  1187. });
  1188. return new Promise((resolve, reject) => {
  1189. request
  1190. .post("/supervision/plan/getSupResByGroup", {
  1191. rsName: query,
  1192. adcd: adcds.join(","),
  1193. pageNum: 0,
  1194. pageSize: 20,
  1195. groupId: rowObject.id
  1196. })
  1197. .then(
  1198. response => {
  1199. var arr = response.data.list;
  1200. resolve({ result: arr });
  1201. },
  1202. re => {
  1203. reject(null);
  1204. }
  1205. );
  1206. });
  1207. }
  1208. } else {
  1209. // 非小水库
  1210. console.log("远端查询" + query + rowObject);
  1211. console.log(rowObject);
  1212. if(rowObject.persAllAreaDtoList === ""){
  1213. this.$message({
  1214. message: '请先添加督查区域!',
  1215. type: 'warning'
  1216. });
  1217. }else{
  1218. let adcds = [];
  1219. let adCode = "";
  1220. rowObject.persAllAreaDtoList.forEach(element => {
  1221. adcds.push(element.value);
  1222. });
  1223. adCode = adcds.join(",");
  1224. return new Promise((resolve, reject) => {
  1225. getSupObjListNotInspGroupId(
  1226. adCode,
  1227. rowObject.id,
  1228. null,
  1229. 20,
  1230. 1,
  1231. rowObject.ptype,
  1232. // query,
  1233. query,
  1234. )
  1235. .then(
  1236. response => {
  1237. var arr = response.data.list;
  1238. resolve({ result: arr });
  1239. },
  1240. re => {
  1241. reject(null);
  1242. }
  1243. );
  1244. });
  1245. }
  1246. }
  1247. },
  1248. getPeopleOptionByRow: function(query, rowObject) {
  1249. let _self = this;
  1250. //根据行数据获取督查人员选项,主要考虑因为行督查对象类型 选用不同的方法
  1251. return new Promise((resolve, reject) => {
  1252. getArenGrpMen(_self.orgId, rowObject.id, 20, 1, query).then(
  1253. response => {
  1254. var arr = response.data.list;
  1255. resolve({ result: arr });
  1256. },
  1257. re => {
  1258. reject(null);
  1259. }
  1260. );
  1261. });
  1262. },
  1263. deleteRow: function(params) {
  1264. this.$confirm("是否删除督查组:" + params.row.nm + "?", "提示", {
  1265. confirmButtonText: "确定",
  1266. cancelButtonText: "取消",
  1267. type: "warning"
  1268. })
  1269. .then(() => {
  1270. request
  1271. .post(`/dc/insp/group/delete?id=${params.row.id}`)
  1272. .then(res => {
  1273. if (res.code != 50001 && res.code != "50001") {
  1274. this.$message({
  1275. type: "success",
  1276. message: "删除成功!"
  1277. });
  1278. } else {
  1279. this.$message({
  1280. type: "error",
  1281. message: "请先清空相关填报内容!"
  1282. });
  1283. }
  1284. this.refreshAfterEdit();
  1285. });
  1286. })
  1287. .catch(() => {
  1288. this.$message({
  1289. type: "info",
  1290. message: "已取消删除"
  1291. });
  1292. });
  1293. },
  1294. refreshAfterEdit: function() {
  1295. this.getUsrPlanInformationByYearAndMounth();
  1296. },
  1297. popupAddAddvDialog:function(id){
  1298. // alert('popupAddAddvDialog');
  1299. this.tableCurrentRowId = this.tableCurrentRow?this.tableCurrentRow['id']:null;
  1300. this.tableCurrentRowType = this.tableCurrentRow?this.tableCurrentRow['ptype']:null;
  1301. var _self = this;
  1302. setTimeout(function(){
  1303. _self.$refs['editDcqyInfoRef'].showDialog(id);
  1304. },500)
  1305. },
  1306. popupAddObjectDialog:function(){
  1307. // alert('popupAddObjectDialog');
  1308. this.tableCurrentRowId = this.tableCurrentRow?this.tableCurrentRow['id']:null;
  1309. this.tableCurrentRowType = this.tableCurrentRow?this.tableCurrentRow['ptype']:null;
  1310. if(this.tableCurrentRowType=='6'){
  1311. this.$refs['editDcdxInfoSzRef'].showDialog(this.tableCurrentRowType);
  1312. }
  1313. if(this.tableCurrentRowType=='1' || this.tableCurrentRowType=='3' || this.tableCurrentRowType=='26' || this.tableCurrentRowType=='34' || this.tableCurrentRowType=='115'){
  1314. this.$refs['editDcdxInfoRef'].showDialog(this.tableCurrentRowType,this.tableCurrentRow['persAllAreaDtoList']);
  1315. }
  1316. if(this.tableCurrentRowType=='27'){
  1317. this.$refs['editDcdxInfoRyZjRef'].showDialog(this.tableCurrentRowType);
  1318. }
  1319. if(this.tableCurrentRowType=='29'){
  1320. this.$refs['editDcdxInfoDiFangRef'].showDialog(this.tableCurrentRowType);
  1321. }
  1322. if(this.tableCurrentRowType=='30'){
  1323. this.$refs['editDcdxInfoChaoBiaoHongYuAnRef'].showDialog(this.tableCurrentRowType);
  1324. }
  1325. if(this.tableCurrentRowType=='97'){
  1326. this.$refs['editDcdxInfoFjncysaqRef'].showDialog(this.tableCurrentRowType);
  1327. }
  1328. if(this.tableCurrentRowType=='111'){
  1329. this.$refs['editDcdxInfoCommonRef'].showDialog(this.tableCurrentRowType);
  1330. }
  1331. if(this.tableCurrentRowType=='116'){
  1332. this.$refs['editDcdxXsdyhglRef'].showDialog(this.tableCurrentRowType);
  1333. }
  1334. },
  1335. popupAddMemberDialog:function(addPersType){
  1336. // alert('popupAddMemberDialog');
  1337. this.addPerType = addPersType;
  1338. this.tableCurrentRowId = this.tableCurrentRow?this.tableCurrentRow['id']:null;
  1339. this.tableCurrentRowType = this.tableCurrentRow?this.tableCurrentRow['ptype']:null;
  1340. var _self = this;
  1341. setTimeout(function(){
  1342. _self.$refs['editDczInfoRef'].showDialog();
  1343. },500)
  1344. },
  1345. }
  1346. };
  1347. </script>
  1348. <style lang="scss" scoped>
  1349. .title {
  1350. font-weight: 700;
  1351. color: #022349;
  1352. cursor: pointer;
  1353. &:hover {
  1354. color: rgba(34, 157, 251, 1);
  1355. }
  1356. }
  1357. #dcjhMain{
  1358. padding:0vw 2vw;
  1359. }
  1360. </style>