index.vue 47 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610
  1. <template>
  2. <div class="app-container">
  3. <el-form
  4. :model="queryParams"
  5. ref="queryForm"
  6. :inline="true"
  7. v-show="showSearch"
  8. label-width="68px"
  9. >
  10. <!-- <el-form-item label="受检单位_id" prop="inspectedUnitId">
  11. <el-input
  12. v-model="queryParams.inspectedUnitId"
  13. placeholder="请输入受检单位_id"
  14. clearable
  15. size="small"
  16. @keyup.enter.native="handleQuery"
  17. />
  18. </el-form-item>
  19. <el-form-item label="受检单位" prop="inspectedUnit">
  20. <el-input
  21. v-model="queryParams.inspectedUnit"
  22. placeholder="请输入受检单位"
  23. clearable
  24. size="small"
  25. @keyup.enter.native="handleQuery"
  26. />
  27. </el-form-item>
  28. <el-form-item label="类型" prop="inspectionType">
  29. <el-select v-model="queryParams.inspectionType" placeholder="请选择类型" clearable size="small">
  30. <el-option label="请选择字典生成" value="" />
  31. </el-select>
  32. </el-form-item>
  33. <el-form-item label="单位检查_id" prop="unitCheckId">
  34. <el-input
  35. v-model="queryParams.unitCheckId"
  36. placeholder="请输入单位检查_id"
  37. clearable
  38. size="small"
  39. @keyup.enter.native="handleQuery"
  40. />
  41. </el-form-item>
  42. <el-form-item label="检查单位" prop="unitCheck">
  43. <el-input
  44. v-model="queryParams.unitCheck"
  45. placeholder="请输入检查单位"
  46. clearable
  47. size="small"
  48. @keyup.enter.native="handleQuery"
  49. />
  50. </el-form-item>
  51. <el-form-item label="检查时间" prop="inspectionTime">
  52. <el-input
  53. v-model="queryParams.inspectionTime"
  54. placeholder="请输入检查时间"
  55. clearable
  56. size="small"
  57. @keyup.enter.native="handleQuery"
  58. />
  59. </el-form-item>
  60. <el-form-item label="检查地点" prop="inspectionSite">
  61. <el-input
  62. v-model="queryParams.inspectionSite"
  63. placeholder="请输入检查地点"
  64. clearable
  65. size="small"
  66. @keyup.enter.native="handleQuery"
  67. />
  68. </el-form-item>
  69. <el-form-item label="分值" prop="score">
  70. <el-input
  71. v-model="queryParams.score"
  72. placeholder="请输入分值"
  73. clearable
  74. size="small"
  75. @keyup.enter.native="handleQuery"
  76. />
  77. </el-form-item>
  78. <el-form-item label="整改时间" prop="rectificationTime">
  79. <el-input
  80. v-model="queryParams.rectificationTime"
  81. placeholder="请输入整改时间"
  82. clearable
  83. size="small"
  84. @keyup.enter.native="handleQuery"
  85. />
  86. </el-form-item>
  87. <el-form-item label="当前状态" prop="currentState">
  88. <el-input
  89. v-model="queryParams.currentState"
  90. placeholder="请输入当前状态"
  91. clearable
  92. size="small"
  93. @keyup.enter.native="handleQuery"
  94. />
  95. </el-form-item>
  96. <el-form-item label="是由" prop="question">
  97. <el-input
  98. v-model="queryParams.question"
  99. placeholder="请输入是由"
  100. clearable
  101. size="small"
  102. @keyup.enter.native="handleQuery"
  103. />
  104. </el-form-item>
  105. <el-form-item label="创建人ID" prop="createUserId">
  106. <el-input
  107. v-model="queryParams.createUserId"
  108. placeholder="请输入创建人ID"
  109. clearable
  110. size="small"
  111. @keyup.enter.native="handleQuery"
  112. />
  113. </el-form-item>
  114. <el-form-item label="创建人" prop="createUser">
  115. <el-input
  116. v-model="queryParams.createUser"
  117. placeholder="请输入创建人"
  118. clearable
  119. size="small"
  120. @keyup.enter.native="handleQuery"
  121. />
  122. </el-form-item>
  123. <el-form-item label="负责人ID" prop="chargePeopleId">
  124. <el-input
  125. v-model="queryParams.chargePeopleId"
  126. placeholder="请输入负责人ID"
  127. clearable
  128. size="small"
  129. @keyup.enter.native="handleQuery"
  130. />
  131. </el-form-item>
  132. <el-form-item label="负责人" prop="chargePeople">
  133. <el-input
  134. v-model="queryParams.chargePeople"
  135. placeholder="请输入负责人"
  136. clearable
  137. size="small"
  138. @keyup.enter.native="handleQuery"
  139. />
  140. </el-form-item>
  141. <el-form-item label="图片举证" prop="pictureProof">
  142. <el-input
  143. v-model="queryParams.pictureProof"
  144. placeholder="请输入图片举证"
  145. clearable
  146. size="small"
  147. @keyup.enter.native="handleQuery"
  148. />
  149. </el-form-item>
  150. <el-form-item label="文件举证" prop="documentProof">
  151. <el-input
  152. v-model="queryParams.documentProof"
  153. placeholder="请输入文件举证"
  154. clearable
  155. size="small"
  156. @keyup.enter.native="handleQuery"
  157. />
  158. </el-form-item>-->
  159. <!-- <el-form-item>
  160. <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
  161. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
  162. </el-form-item>-->
  163. </el-form>
  164. <el-row :gutter="10" class="mb8">
  165. <el-col :span="1.5" class="isSubmit">
  166. <el-radio-group
  167. v-model="queryParams.caoZuoType"
  168. @change="caoZuoTypefun"
  169. >
  170. <el-radio-button label="1">加分</el-radio-button>
  171. <el-radio-button label="0">减分</el-radio-button>
  172. </el-radio-group>
  173. </el-col>
  174. </el-row>
  175. <hr />
  176. <el-row :gutter="10" class="mb8">
  177. <el-col :span="1.5">
  178. <el-button
  179. type="success"
  180. v-if="queryParams.caoZuoType == 0"
  181. style="background: #1d96ff"
  182. @click="handleAdd"
  183. v-hasPermi="['bdglregular:regularinfo:jian']"
  184. >减分录入</el-button
  185. >
  186. </el-col>
  187. <el-col :span="1.5">
  188. <el-button
  189. type="success"
  190. v-if="queryParams.caoZuoType == 1"
  191. style="background: #1d96ff"
  192. v-hasPermi="['bdglregular:regularinfo:jia']"
  193. @click="handleAdd"
  194. >加分录入</el-button
  195. >
  196. </el-col>
  197. <el-col :span="1.5">
  198. <el-button
  199. type="danger"
  200. plain
  201. icon="el-icon-delete"
  202. size="mini"
  203. :disabled="multiple"
  204. @click="handleDelete"
  205. v-hasPermi="['bdglregular:regularinfo:remove']"
  206. >删除</el-button
  207. >
  208. </el-col>
  209. <!-- <el-col :span="1.5">
  210. <el-button
  211. type="success"
  212. plain
  213. icon="el-icon-edit"
  214. size="mini"
  215. :disabled="single"
  216. @click="handleUpdate"
  217. v-hasPermi="['bdglregular:regularinfo:edit']"
  218. >修改</el-button>
  219. </el-col>
  220. <el-col :span="1.5">
  221. <el-button
  222. type="danger"
  223. plain
  224. icon="el-icon-delete"
  225. size="mini"
  226. :disabled="multiple"
  227. @click="handleDelete"
  228. v-hasPermi="['bdglregular:regularinfo:remove']"
  229. >删除</el-button>
  230. </el-col>
  231. <el-col :span="1.5">
  232. <el-button
  233. type="warning"
  234. plain
  235. icon="el-icon-download"
  236. size="mini"
  237. :loading="exportLoading"
  238. @click="handleExport"
  239. v-hasPermi="['bdglregular:regularinfo:export']"
  240. >导出</el-button>
  241. </el-col>-->
  242. <!-- <right-toolbar
  243. :showSearch.sync="showSearch"
  244. @queryTable="getList"
  245. ></right-toolbar> -->
  246. </el-row>
  247. <el-table
  248. v-loading="loading"
  249. :data="regularinfoList"
  250. :header-cell-style="{ background: '#003C69', color: 'white' }"
  251. @selection-change="handleSelectionChange"
  252. >
  253. <el-table-column type="selection" width="55" align="center" />
  254. <el-table-column label="序号" align="center" type="index" />
  255. <el-table-column
  256. :label="queryParams.caoZuoType == 0?'受检单位':'单位'"
  257. align="center"
  258. key="inspectedUnit"
  259. prop="inspectedUnit"
  260. />
  261. <el-table-column
  262. label="类型"
  263. align="center"
  264. key="inspectionType"
  265. prop="inspectionType"
  266. >
  267. <template slot-scope="scope">
  268. <dict-tag
  269. :options="dict.type.inspectionType"
  270. :value="scope.row.inspectionType"
  271. />
  272. </template>
  273. </el-table-column>
  274. <el-table-column
  275. label="检查单位"
  276. align="center"
  277. prop="unitCheck"
  278. width="150"
  279. key="unitCheck"
  280. v-if="queryParams.caoZuoType == 0"
  281. />
  282. <el-table-column
  283. label="检查时间"
  284. align="center"
  285. prop="inspectionTime"
  286. width="150px"
  287. key="inspectionTime"
  288. />
  289. <el-table-column
  290. width="250"
  291. show-overflow-tooltip
  292. label="检查地点"
  293. align="center"
  294. prop="inspectionSite"
  295. key="inspectionSite"
  296. />
  297. <el-table-column label="分值" align="center" key="score" prop="score">
  298. <template slot-scope="scope">
  299. <div style="color: rgb(255 106 0)" v-if="queryParams.caoZuoType == 0">
  300. {{ scope.row.score }}
  301. </div>
  302. <div style="color: rgb(2 255 2)" v-if="queryParams.caoZuoType == 1">
  303. {{ scope.row.score }}
  304. </div>
  305. </template>
  306. </el-table-column>
  307. <el-table-column
  308. label="当前状态"
  309. align="center"
  310. prop="currentState"
  311. v-if="queryParams.caoZuoType == 0"
  312. key="currentState"
  313. >
  314. <template slot-scope="scope">
  315. <div
  316. style="color: rgb(255 106 0)"
  317. v-if="scope.row.currentState == '未通过'"
  318. >
  319. {{ scope.row.currentState }}
  320. </div>
  321. <div style="color: #ffa500" v-if="scope.row.currentState == '待处理'">
  322. {{ scope.row.currentState }}
  323. </div>
  324. <div style="color: #3498db" v-if="scope.row.currentState == '待验收'">
  325. {{ scope.row.currentState }}
  326. </div>
  327. <div
  328. style="color: rgb(2 255 2)"
  329. v-if="scope.row.currentState == '已通过'"
  330. >
  331. {{ scope.row.currentState }}
  332. </div>
  333. <div style="color: #909399" v-if="scope.row.currentState == '已逾期'">
  334. {{ scope.row.currentState }}
  335. </div>
  336. </template>
  337. </el-table-column>
  338. <el-table-column
  339. label="事由"
  340. show-overflow-tooltip
  341. align="center"
  342. prop="question"
  343. key="question"
  344. />
  345. <el-table-column
  346. label="整改时间"
  347. align="center"
  348. prop="rectificationTime"
  349. v-if="queryParams.caoZuoType == 0"
  350. width="150px"
  351. key="rectificationTime"
  352. />
  353. <el-table-column
  354. label="操作"
  355. align="center"
  356. class-name="small-padding fixed-width"
  357. width="250"
  358. fixed="right"
  359. >
  360. <template slot-scope="scope">
  361. <el-button
  362. size="btk"
  363. type="text"
  364. v-if="
  365. scope.row.caoZuoType == '0' &&
  366. scope.row.isCaoZuoDept == 0 &&
  367. (scope.row.currentState == '未通过' ||
  368. scope.row.currentState == '待处理')
  369. "
  370. @click="handleUpdate(scope.row)"
  371. >整改</el-button
  372. >
  373. <el-button
  374. size="btu"
  375. type="text"
  376. @click="shenpifun(scope.row)"
  377. v-if="
  378. queryParams.caoZuoType == 0 &&
  379. scope.row.isShenPi == 0 &&
  380. scope.row.currentState == '待验收'
  381. "
  382. >审批</el-button
  383. >
  384. <!-- v-if="scope.row.unitCheckId==this.danWies" -->
  385. <!-- bdglregular:regularinfo:query -->
  386. <el-button
  387. v-if="scope.row.currentState == '待处理' && scope.row.isShenPi == 0"
  388. size="btu"
  389. type="text"
  390. @click="handleAdds(scope.row)"
  391. >修改</el-button
  392. >
  393. <el-button
  394. size="btd"
  395. type="text"
  396. @click="handleDelete(scope.row)"
  397. v-if="scope.row.isShenPi == 0"
  398. >删除</el-button
  399. >
  400. </template>
  401. </el-table-column>
  402. </el-table>
  403. <pagination
  404. v-show="total > 0"
  405. :total="total"
  406. :page.sync="queryParams.pageNum"
  407. :limit.sync="queryParams.pageSize"
  408. @pagination="getList"
  409. />
  410. <!-- 添加或修改经常性检查对话框 -->
  411. <el-dialog
  412. :title="title"
  413. :visible.sync="open"
  414. width="500px"
  415. append-to-body
  416. :close-on-click-modal="false"
  417. >
  418. <el-form
  419. ref="form"
  420. :model="form"
  421. :rules="rules"
  422. :inline="true"
  423. label-width="120px"
  424. >
  425. <div class="jiben">基本信息</div>
  426. <el-form-item label="检查单位" prop="unitCheck" v-if="queryParams.caoZuoType == 0">
  427. <el-select
  428. v-model="form.unitCheck"
  429. @change="unitCheckIdfun"
  430. clearable
  431. placeholder="请选择检查单位"
  432. :disabled="disabled && btnnum != 0 && btnnum != 1 && zg == 3"
  433. >
  434. <el-option
  435. v-for="dict in unitId"
  436. :key="dict.deptId"
  437. :label="dict.deptName"
  438. :value="dict"
  439. ></el-option>
  440. </el-select>
  441. </el-form-item>
  442. <el-form-item :label="queryParams.caoZuoType == 0?'受检单位':'单位'" prop="inspectedUnit">
  443. <el-select
  444. v-model="form.inspectedUnit"
  445. @change="inspectedUnitfun"
  446. clearable
  447. :placeholder="queryParams.caoZuoType == 0?'请选择受检单位':'请选择单位'"
  448. :disabled="disabled && btnnum != 0 && btnnum != 1 && zg == 3"
  449. >
  450. <el-option
  451. v-for="dict in unitId"
  452. :key="dict.deptId"
  453. :label="dict.deptName"
  454. :value="dict"
  455. ></el-option>
  456. </el-select>
  457. </el-form-item>
  458. <el-form-item label="类型" prop="inspectionType">
  459. <el-select
  460. v-model="form.inspectionType"
  461. :disabled="disabled && btnnum != 0 && btnnum != 1 && zg == 3"
  462. clearable
  463. placeholder="请选择类型"
  464. >
  465. <el-option
  466. v-for="dict in inspectionType"
  467. :key="dict.dictValue"
  468. :label="dict.dictLabel"
  469. :value="dict.dictValue"
  470. ></el-option>
  471. </el-select>
  472. </el-form-item>
  473. <el-form-item label="检查时间" prop="inspectionTime" >
  474. <el-date-picker
  475. clearable
  476. size="small"
  477. v-model="form.inspectionTime"
  478. type="datetime"
  479. default-time="00:00:00"
  480. value-format="yyyy-MM-dd HH:mm:ss"
  481. placeholder="选择检查时间"
  482. :disabled="disabled && btnnum != 0 && btnnum != 1 && zg == 3"
  483. ></el-date-picker>
  484. </el-form-item>
  485. <el-form-item label="检查地点" prop="inspectionSite">
  486. <el-input
  487. v-model="form.inspectionSite"
  488. :disabled="disabled && btnnum != 0 && btnnum != 1 && zg == 3"
  489. placeholder="请输入检查地点"
  490. />
  491. </el-form-item>
  492. <el-form-item label="分值" prop="score" v-if="jiannum == 0">
  493. <!-- <el-input v-model="form.score" type="number" @blur="scoreblur" :disabled="disabled" placeholder="请输入分值" /> -->
  494. <el-input-number
  495. v-model="form.score"
  496. controls-position="right"
  497. :min="0"
  498. ></el-input-number>
  499. </el-form-item>
  500. <el-form-item
  501. label="整改时间"
  502. prop="rectificationTime"
  503. v-if="queryParams.caoZuoType == 0"
  504. >
  505. <el-date-picker
  506. clearable
  507. size="small"
  508. v-model="form.rectificationTime"
  509. type="datetime"
  510. default-time="00:00:00"
  511. value-format="yyyy-MM-dd HH:mm:ss"
  512. placeholder="选择整改时间"
  513. :disabled="disabled && btnnum != 0 && btnnum != 1 && zg == 3"
  514. ></el-date-picker>
  515. </el-form-item>
  516. <el-form-item
  517. label="受检负责人"
  518. prop="chargePeople"
  519. v-if="jiannum != 0"
  520. >
  521. <el-select
  522. v-model="form.chargePeople"
  523. clearable
  524. @change="chargePeoplefun"
  525. placeholder="请选择受检负责人"
  526. :disabled="disabled && btnnum != 0 && btnnum != 1 && zg != 3"
  527. >
  528. <el-option
  529. v-for="dict in peopleIds"
  530. :key="dict.id"
  531. :label="dict.name"
  532. :value="dict"
  533. ></el-option>
  534. </el-select>
  535. </el-form-item>
  536. <div class="jiben" v-if="queryParams.caoZuoType == 0">存在问题</div>
  537. <div class="jiben" v-if="queryParams.caoZuoType == 1">加分事由</div>
  538. <el-form-item label prop="question">
  539. <el-input
  540. v-model="form.question"
  541. :disabled="disabled && btnnum != 0 && btnnum != 1 && zg == 3"
  542. type="textarea"
  543. placeholder="请输入内容"
  544. />
  545. </el-form-item>
  546. <div class="jiben" v-if="jiannum != 0">整改措施</div>
  547. <el-form-item label prop="correctiveAction" v-if="jiannum != 0">
  548. <el-input
  549. v-model="form.correctiveAction"
  550. :disabled="disabled && btnnum != 0 && btnnum != 1 && zg != 3"
  551. type="textarea"
  552. placeholder="请输入内容"
  553. />
  554. </el-form-item>
  555. <div class="jiben" v-if="jiannum != 0">图片举证</div>
  556. <el-form-item label prop="pictureProof" v-if="jiannum != 0">
  557. <imageUpload v-model="form.pictureProof" :limit="1" />
  558. </el-form-item>
  559. <div class="jiben" v-if="jiannum != 0">文件举证</div>
  560. <el-form-item label prop="documentProof" v-if="jiannum != 0">
  561. <fileUpload
  562. v-model="form.documentProof"
  563. :limit="1"
  564. :class="{ active: isActive }"
  565. />
  566. </el-form-item>
  567. <div class="jiben" v-if="currentState == 1">未通过原因</div>
  568. <el-form-item label prop="score" v-if="currentState == 1">
  569. <el-input
  570. v-model="form.reasonReturn"
  571. :disabled="disabled || curr"
  572. type="textarea"
  573. placeholder="请输入未通过原因"
  574. />
  575. </el-form-item>
  576. </el-form>
  577. <div slot="footer" class="dialog-footer">
  578. <el-button
  579. type="primary"
  580. @click="submitForm"
  581. v-if="btnnum != 0 && btnnum != 1 && zg != 3"
  582. >确 定</el-button
  583. >
  584. <el-button
  585. type="primary"
  586. @click="submitForm2"
  587. v-if="btnnum != 0 && btnnum != 1 && zg == 3"
  588. >确 定</el-button
  589. >
  590. <el-button type="primary" @click="tongguofun" v-if="btnnum == 0"
  591. >通 过</el-button
  592. >
  593. <el-button type="primary" @click="zhenggaifun" v-if="btnnum == 0"
  594. >重新整改</el-button
  595. >
  596. <el-button type="primary" @click="weitongguofun" v-if="btnnum == 1"
  597. >确 定</el-button
  598. >
  599. <el-button @click="cancel" size="btn">取 消</el-button>
  600. </div>
  601. </el-dialog>
  602. <el-dialog
  603. :title="title"
  604. :visible.sync="open1"
  605. width="500px"
  606. append-to-body
  607. :close-on-click-modal="false"
  608. >
  609. <el-form
  610. ref="form"
  611. :model="form"
  612. :rules="rules"
  613. :inline="true"
  614. label-width="120px"
  615. >
  616. <div class="jiben">基本信息</div>
  617. <el-form-item label="检查单位" prop="unitCheck" v-if="queryParams.caoZuoType == 0">
  618. <el-select
  619. v-model="form.unitCheck"
  620. @change="unitCheckIdfun"
  621. clearable
  622. placeholder="请选择检查单位"
  623. :disabled="disabled"
  624. >
  625. <el-option
  626. v-for="dict in unitId"
  627. :key="dict.deptId"
  628. :label="dict.deptName"
  629. :value="dict"
  630. ></el-option>
  631. </el-select>
  632. </el-form-item>
  633. <el-form-item :label="queryParams.caoZuoType == 0?'受检单位':'单位'" prop="inspectedUnit">
  634. <el-select
  635. v-model="form.inspectedUnit"
  636. @change="inspectedUnitfun"
  637. clearable
  638. :placeholder="queryParams.caoZuoType == 0?'请选择受检单位':'请选择单位'"
  639. :disabled="disabled"
  640. >
  641. <el-option
  642. v-for="dict in unitId"
  643. :key="dict.deptId"
  644. :label="dict.deptName"
  645. :value="dict"
  646. ></el-option>
  647. </el-select>
  648. </el-form-item>
  649. <el-form-item label="类型" prop="inspectionType">
  650. <el-select
  651. v-model="form.inspectionType"
  652. :disabled="disabled"
  653. clearable
  654. placeholder="请选择类型"
  655. >
  656. <el-option
  657. v-for="dict in inspectionType"
  658. :key="dict.dictValue"
  659. :label="dict.dictLabel"
  660. :value="dict.dictValue"
  661. ></el-option>
  662. </el-select>
  663. </el-form-item>
  664. <el-form-item label="检查时间" prop="inspectionTime" >
  665. <el-date-picker
  666. clearable
  667. size="small"
  668. v-model="form.inspectionTime"
  669. type="datetime"
  670. default-time="00:00:00"
  671. value-format="yyyy-MM-dd HH:mm:ss"
  672. placeholder="选择检查时间"
  673. ></el-date-picker>
  674. </el-form-item>
  675. <el-form-item label="检查地点" prop="inspectionSite">
  676. <el-input
  677. v-model="form.inspectionSite"
  678. :disabled="disabled"
  679. placeholder="请输入检查地点"
  680. />
  681. </el-form-item>
  682. <el-form-item label="分值" prop="score">
  683. <!-- <el-input v-model="form.score" type="number" @blur="scoreblur" :disabled="disabled" placeholder="请输入分值" /> -->
  684. <el-input-number
  685. v-model="form.score"
  686. controls-position="right"
  687. :min="0"
  688. ></el-input-number>
  689. </el-form-item>
  690. <el-form-item
  691. label="整改时间"
  692. prop="rectificationTime"
  693. v-if="queryParams.caoZuoType == 0"
  694. >
  695. <el-date-picker
  696. clearable
  697. size="small"
  698. v-model="form.rectificationTime"
  699. type="datetime"
  700. default-time="00:00:00"
  701. value-format="yyyy-MM-dd HH:mm:ss"
  702. placeholder="选择整改时间"
  703. :disabled="disabled"
  704. ></el-date-picker>
  705. </el-form-item>
  706. <div class="jiben" v-if="queryParams.caoZuoType == 0">存在问题</div>
  707. <div class="jiben" v-if="queryParams.caoZuoType == 1">加分事由</div>
  708. <el-form-item label prop="question">
  709. <el-input
  710. v-model="form.question"
  711. :disabled="disabled"
  712. type="textarea"
  713. placeholder="请输入内容"
  714. />
  715. </el-form-item>
  716. </el-form>
  717. <div slot="footer" class="dialog-footer">
  718. <el-button type="primary" @click="submitForm">确 定</el-button>
  719. <el-button @click="open1 = false" size="btn">取 消</el-button>
  720. </div>
  721. </el-dialog>
  722. <el-dialog
  723. :title="title"
  724. :visible.sync="open3"
  725. width="500px"
  726. append-to-body
  727. :close-on-click-modal="false"
  728. >
  729. <el-form
  730. ref="form"
  731. :model="form"
  732. :rules="rules"
  733. :inline="true"
  734. label-width="120px"
  735. >
  736. <div class="jiben">基本信息</div>
  737. <el-form-item label="检查单位" prop="unitCheck" v-if="queryParams.caoZuoType == 0">
  738. <el-select
  739. v-model="form.unitCheck"
  740. @change="unitCheckIdfun"
  741. clearable
  742. placeholder="请选择检查单位"
  743. :disabled="disabled"
  744. >
  745. <el-option
  746. v-for="dict in unitId"
  747. :key="dict.deptId"
  748. :label="dict.deptName"
  749. :value="dict"
  750. ></el-option>
  751. </el-select>
  752. </el-form-item>
  753. <el-form-item :label="queryParams.caoZuoType == 0?'受检单位':'单位'" prop="inspectedUnit">
  754. <el-select
  755. v-model="form.inspectedUnit"
  756. @change="inspectedUnitfun"
  757. clearable
  758. :placeholder="queryParams.caoZuoType == 0?'请选择受检单位':'请选择单位'"
  759. :disabled="disabled"
  760. >
  761. <el-option
  762. v-for="dict in unitId"
  763. :key="dict.deptId"
  764. :label="dict.deptName"
  765. :value="dict"
  766. ></el-option>
  767. </el-select>
  768. </el-form-item>
  769. <el-form-item label="类型" prop="inspectionType">
  770. <el-select
  771. v-model="form.inspectionType"
  772. :disabled="disabled"
  773. clearable
  774. placeholder="请选择类型"
  775. >
  776. <el-option
  777. v-for="dict in inspectionType"
  778. :key="dict.dictValue"
  779. :label="dict.dictLabel"
  780. :value="dict.dictValue"
  781. ></el-option>
  782. </el-select>
  783. </el-form-item>
  784. <el-form-item label="检查时间" prop="inspectionTime" >
  785. <el-date-picker
  786. clearable
  787. size="small"
  788. v-model="form.inspectionTime"
  789. type="datetime"
  790. default-time="00:00:00"
  791. value-format="yyyy-MM-dd HH:mm:ss"
  792. placeholder="选择检查时间"
  793. :disabled="disabled"
  794. ></el-date-picker>
  795. </el-form-item>
  796. <el-form-item label="检查地点" prop="inspectionSite">
  797. <el-input
  798. v-model="form.inspectionSite"
  799. :disabled="disabled"
  800. placeholder="请输入检查地点"
  801. />
  802. </el-form-item>
  803. <el-form-item label="分值" prop="score" v-if="jiannum == 0">
  804. <!-- <el-input v-model="form.score" type="number" @blur="scoreblur" :disabled="disabled" placeholder="请输入分值" /> -->
  805. <el-input-number
  806. v-model="form.score"
  807. controls-position="right"
  808. :min="0"
  809. ></el-input-number>
  810. </el-form-item>
  811. <el-form-item
  812. label="整改时间"
  813. prop="rectificationTime"
  814. v-if="queryParams.caoZuoType == 0"
  815. >
  816. <el-date-picker
  817. clearable
  818. size="small"
  819. v-model="form.rectificationTime"
  820. type="datetime"
  821. default-time="00:00:00"
  822. value-format="yyyy-MM-dd HH:mm:ss"
  823. placeholder="选择整改时间"
  824. :disabled="disabled"
  825. ></el-date-picker>
  826. </el-form-item>
  827. <el-form-item
  828. label="受检负责人"
  829. prop="chargePeople"
  830. v-if="jiannum != 0"
  831. >
  832. <el-select
  833. v-model="form.chargePeople"
  834. clearable
  835. @change="chargePeoplefun"
  836. placeholder="请选择受检负责人"
  837. :disabled="disabled"
  838. >
  839. <el-option
  840. v-for="dict in peopleIds"
  841. :key="dict.id"
  842. :label="dict.name"
  843. :value="dict"
  844. ></el-option>
  845. </el-select>
  846. </el-form-item>
  847. <div class="jiben" v-if="queryParams.caoZuoType == 0">存在问题</div>
  848. <div class="jiben" v-if="queryParams.caoZuoType == 1">加分事由</div>
  849. <el-form-item label prop="question">
  850. <el-input
  851. v-model="form.question"
  852. :disabled="disabled"
  853. type="textarea"
  854. placeholder="请输入内容"
  855. />
  856. </el-form-item>
  857. <div class="jiben" v-if="jiannum != 0">整改措施</div>
  858. <el-form-item label prop="correctiveAction" v-if="jiannum != 0">
  859. <el-input
  860. v-model="form.correctiveAction"
  861. :disabled="disabled"
  862. type="textarea"
  863. placeholder="请输入内容"
  864. />
  865. </el-form-item>
  866. <div class="jiben" v-if="jiannum != 0">图片举证</div>
  867. <el-form-item label prop="pictureProof" v-if="jiannum != 0">
  868. <imageUpload v-model="form.pictureProof" :limit="1" />
  869. </el-form-item>
  870. <div class="jiben" v-if="jiannum != 0">文件举证</div>
  871. <el-form-item label prop="documentProof" v-if="jiannum != 0">
  872. <!-- <fileUpload
  873. v-model="form.documentProof"
  874. :limit="1"
  875. :class="{ active: isActive }"
  876. /> -->
  877. <input
  878. label="附件名称"
  879. v-model="form.wenjianname"
  880. style="width: 600px"
  881. class="wenjian"
  882. />
  883. <a
  884. :href="url + form.documentProof"
  885. :download="form.wenjianname"
  886. title="下载"
  887. style="color: white; margin-left: 10px"
  888. class="downloadfile"
  889. >下载附件</a
  890. >
  891. </el-form-item>
  892. <div class="jiben" v-if="currentState == 1">未通过原因</div>
  893. <el-form-item label prop="score" v-if="currentState == 1">
  894. <el-input
  895. v-model="form.reasonReturn"
  896. :disabled="disabled || curr"
  897. type="textarea"
  898. placeholder="请输入未通过原因"
  899. />
  900. </el-form-item>
  901. </el-form>
  902. <div slot="footer" class="dialog-footer">
  903. <el-button
  904. type="primary"
  905. @click="submitForm"
  906. v-if="btnnum != 0 && btnnum != 1 && zg != 3"
  907. >确 定</el-button
  908. >
  909. <el-button
  910. type="primary"
  911. @click="submitForm2"
  912. v-if="btnnum != 0 && btnnum != 1 && zg == 3"
  913. >确 定</el-button
  914. >
  915. <el-button type="primary" @click="tongguofun" v-if="btnnum == 0"
  916. >通 过</el-button
  917. >
  918. <el-button type="primary" @click="zhenggaifun" v-if="btnnum == 0"
  919. >重新整改</el-button
  920. >
  921. <el-button type="primary" @click="weitongguofun" v-if="btnnum == 1"
  922. >确 定</el-button
  923. >
  924. <el-button @click="cancel" size="btn">取 消</el-button>
  925. </div>
  926. </el-dialog>
  927. </div>
  928. </template>
  929. <script>
  930. import {
  931. listRegularinfo,
  932. getRegularinfo,
  933. delRegularinfo,
  934. addRegularinfo,
  935. updateRegularinfo,
  936. exportRegularinfo,
  937. getDept,
  938. listPeople,
  939. editquestion,
  940. editissuccess,
  941. editisfalse,
  942. bumenlist,
  943. listRegularinfos,
  944. } from "@/api/bdglregular/regularinfo";
  945. import { getUserProfile } from "@/api/system/user";
  946. export default {
  947. name: "Regularinfo",
  948. dicts: ["inspectionType"],
  949. data() {
  950. return {
  951. // 遮罩层
  952. loading: true,
  953. // 导出遮罩层
  954. exportLoading: false,
  955. // 选中数组
  956. ids: [],
  957. // 非单个禁用
  958. single: true,
  959. // 非多个禁用
  960. multiple: true,
  961. // 显示搜索条件
  962. showSearch: true,
  963. // 总条数
  964. total: 0,
  965. // 经常性检查表格数据
  966. regularinfoList: [],
  967. // 弹出层标题
  968. title: "",
  969. // 是否显示弹出层
  970. open: false,
  971. // 查询参数
  972. queryParams: {
  973. pageNum: 1,
  974. pageSize: 10,
  975. inspectedUnitId: null,
  976. inspectedUnit: null,
  977. inspectionType: null,
  978. unitCheckId: null,
  979. unitCheck: null,
  980. inspectionTime: null,
  981. inspectionSite: null,
  982. score: null,
  983. rectificationTime: null,
  984. currentState: null,
  985. question: null,
  986. createUserId: null,
  987. createUser: null,
  988. chargePeopleId: null,
  989. chargePeople: null,
  990. correctiveAction: null,
  991. pictureProof: null,
  992. documentProof: null,
  993. caoZuoType: 0,
  994. },
  995. // 用户
  996. user: {},
  997. // danWies:0,
  998. yongHu: "",
  999. // 表单参数
  1000. form: {},
  1001. // 表单校验
  1002. rules: {
  1003. unitCheck: [
  1004. { required: true, message: "检查单位不能为空", trigger: "change" },
  1005. ],
  1006. inspectedUnit: [
  1007. { required: true, message: "受检单位不能为空", trigger: "change" },
  1008. ],
  1009. inspectionType: [
  1010. { required: true, message: "类型不能为空", trigger: "change" },
  1011. ],
  1012. inspectionTime: [
  1013. { required: true, message: "检查时间不能为空", trigger: "change" },
  1014. ],
  1015. inspectionSite: [
  1016. { required: true, message: "检查地点不能为空", trigger: "blur" },
  1017. ],
  1018. score: [{ required: true, message: "分值不能为空", trigger: "blur" }],
  1019. rectificationTime: [
  1020. { required: true, message: "整改时间不能为空", trigger: "change" },
  1021. ],
  1022. chargePeople: [
  1023. { required: true, message: "负责人不能为空", trigger: "change" },
  1024. ],
  1025. },
  1026. //单位
  1027. unitId: [],
  1028. //检查类型
  1029. inspectionType: [],
  1030. //调动人员对象
  1031. peopleIds: [],
  1032. //区分减分、增改
  1033. jiannum: null,
  1034. btnnum: null,
  1035. disabled: false,
  1036. currentState: null,
  1037. curr: null,
  1038. isdisabled: false,
  1039. open1: false,
  1040. zg: null,
  1041. isActive: null,
  1042. sp: null,
  1043. open3: false,
  1044. url: process.env.VUE_APP_BASE_API,
  1045. };
  1046. },
  1047. created() {
  1048. // this.danWiess()
  1049. this.queryParams = {
  1050. pageNum: 1,
  1051. pageSize: 10,
  1052. inspectedUnitId: null,
  1053. inspectedUnit: null,
  1054. inspectionType: null,
  1055. unitCheckId: null,
  1056. unitCheck: null,
  1057. inspectionTime: null,
  1058. inspectionSite: null,
  1059. score: null,
  1060. rectificationTime: null,
  1061. currentState: null,
  1062. question: null,
  1063. createUserId: null,
  1064. createUser: null,
  1065. chargePeopleId: null,
  1066. chargePeople: null,
  1067. correctiveAction: null,
  1068. pictureProof: null,
  1069. documentProof: null,
  1070. caoZuoType: 0,
  1071. };
  1072. // this.danWiess()
  1073. //部门数据
  1074. getDept().then((res) => {
  1075. if (res.code == 200) {
  1076. this.unitId = res.data;
  1077. }
  1078. });
  1079. //调动人员对象
  1080. listPeople().then((res) => {
  1081. if (res.code == 200) {
  1082. this.peopleIds = res.rows;
  1083. }
  1084. });
  1085. //检查类型
  1086. this.getDicts("inspectionType").then((response) => {
  1087. this.inspectionType = response.data;
  1088. });
  1089. if (this.$route.query.id) {
  1090. bumenlist(this.$route.query.id).then((res) => {
  1091. this.regularinfoList = res.rows;
  1092. this.total = res.total;
  1093. this.loading = false;
  1094. });
  1095. } else {
  1096. this.getList();
  1097. }
  1098. },
  1099. watch: {
  1100. $route(to, from) {
  1101. this.queryParams = {
  1102. pageNum: 1,
  1103. pageSize: 10,
  1104. inspectedUnitId: null,
  1105. inspectedUnit: null,
  1106. inspectionType: null,
  1107. unitCheckId: null,
  1108. unitCheck: null,
  1109. inspectionTime: null,
  1110. inspectionSite: null,
  1111. score: null,
  1112. rectificationTime: null,
  1113. currentState: null,
  1114. question: null,
  1115. createUserId: null,
  1116. createUser: null,
  1117. chargePeopleId: null,
  1118. chargePeople: null,
  1119. correctiveAction: null,
  1120. pictureProof: null,
  1121. documentProof: null,
  1122. caoZuoType: 0,
  1123. };
  1124. if (to.query.id) {
  1125. bumenlist(to.query.id).then((res) => {
  1126. this.regularinfoList = res.rows;
  1127. this.total = res.total;
  1128. this.loading = false;
  1129. });
  1130. } else if (to.query.obj) {
  1131. this.queryParams.inspectedUnitId = to.query.obj.id + "";
  1132. this.queryParams.currentState = to.query.obj.name + "";
  1133. listRegularinfos(this.queryParams).then((res) => {
  1134. this.regularinfoList = res.rows;
  1135. this.total = res.total;
  1136. this.loading = false;
  1137. });
  1138. } else {
  1139. this.getList();
  1140. }
  1141. // listRegularinfos
  1142. },
  1143. },
  1144. mounted() {
  1145. // this.danWiess()
  1146. },
  1147. methods: {
  1148. danWiess() {
  1149. // 获取当前用户接口
  1150. getUserProfile().then((response) => {
  1151. this.user = response.data;
  1152. // if(response)
  1153. this.danWies = response.data.dept.deptId;
  1154. });
  1155. },
  1156. /** 查询经常性检查列表 */
  1157. getList() {
  1158. this.loading = true;
  1159. listRegularinfo(this.queryParams).then((response) => {
  1160. this.regularinfoList = response.rows;
  1161. this.total = response.total;
  1162. this.loading = false;
  1163. });
  1164. },
  1165. // 取消按钮
  1166. cancel() {
  1167. this.open = false;
  1168. this.open3 = false;
  1169. this.reset();
  1170. this.jiannum = null;
  1171. },
  1172. // 表单重置
  1173. reset() {
  1174. this.form = {
  1175. id: null,
  1176. inspectedUnitId: null,
  1177. inspectedUnit: null,
  1178. inspectionType: null,
  1179. unitCheckId: null,
  1180. unitCheck: null,
  1181. inspectionTime: null,
  1182. inspectionSite: null,
  1183. score: null,
  1184. rectificationTime: null,
  1185. currentState: null,
  1186. question: null,
  1187. createTime: null,
  1188. createUserId: null,
  1189. createUser: null,
  1190. updateTime: null,
  1191. chargePeopleId: null,
  1192. chargePeople: null,
  1193. correctiveAction: null,
  1194. pictureProof: null,
  1195. documentProof: null,
  1196. reasonReturn: null,
  1197. };
  1198. this.resetForm("form");
  1199. },
  1200. /** 搜索按钮操作 */
  1201. handleQuery() {
  1202. this.queryParams.pageNum = 1;
  1203. this.getList();
  1204. },
  1205. /** 重置按钮操作 */
  1206. resetQuery() {
  1207. this.resetForm("queryForm");
  1208. this.handleQuery();
  1209. },
  1210. // 多选框选中数据
  1211. handleSelectionChange(selection) {
  1212. this.ids = selection.map((item) => item.id);
  1213. this.single = selection.length !== 1;
  1214. this.multiple = !selection.length;
  1215. },
  1216. /** 新增按钮操作 */
  1217. handleAdd() {
  1218. console.log(this.queryParams.caoZuoType)
  1219. this.reset();
  1220. this.open = true;
  1221. this.title = "经常性检查";
  1222. this.jiannum = 0;
  1223. this.btnnum = null;
  1224. this.isdisabled = false;
  1225. var today = new Date();
  1226. var y = today.getFullYear();
  1227. var M = today.getMonth() + 1;
  1228. var d = today.getDate();
  1229. var h = today.getHours();
  1230. var m = today.getMinutes();
  1231. var s = today.getSeconds();
  1232. var w = today.getDay();
  1233. if (M < 10) {
  1234. M = "0" + M;
  1235. }
  1236. if (d < 10) {
  1237. d = "0" + d;
  1238. }
  1239. if (h < 10) {
  1240. h = "0" + h;
  1241. }
  1242. if (m < 10) {
  1243. m = "0" + m;
  1244. }
  1245. if (s < 10) {
  1246. s = "0" + s;
  1247. }
  1248. this.form.inspectionTime =
  1249. y + "-" + M + "-" + d + " " + h + ":" + m + ":" + s;
  1250. },
  1251. // // 修改按钮操作
  1252. // handleAdds(row){
  1253. // this.open = true;
  1254. // this.title = "经常性检查";
  1255. // const id = row.id || this.ids;
  1256. // getRegularinfo(id).then((response)=>{
  1257. // this.form = response.data;
  1258. // this.open = true;
  1259. // })
  1260. // },
  1261. /** 整改按钮操作 */
  1262. handleUpdate(row) {
  1263. this.reset();
  1264. const id = row.id || this.ids;
  1265. getRegularinfo(id).then((response) => {
  1266. this.form = response.data;
  1267. this.disabled = true;
  1268. this.open = true;
  1269. this.title = "修改经常性检查";
  1270. this.jiannum = 1;
  1271. this.btnnum = null;
  1272. this.zg = 3;
  1273. this.isActive = null;
  1274. if (this.form.currentState == "未通过") {
  1275. this.currentState = 1;
  1276. this.curr = true;
  1277. }
  1278. });
  1279. },
  1280. // 修改按钮
  1281. handleAdds(row) {
  1282. this.isdisabled = true;
  1283. this.reset();
  1284. const id = row.id || this.ids;
  1285. getRegularinfo(id).then((response) => {
  1286. this.form = response.data;
  1287. this.open1 = true;
  1288. this.title = "修改经常性检查";
  1289. // this.jiannum = 1;
  1290. // this.btnnum = null;
  1291. // if (this.form.currentState == "未通过") {
  1292. // this.currentState = 1;
  1293. // this.curr = true;
  1294. // }
  1295. });
  1296. },
  1297. /** 审批按钮操作 */
  1298. shenpifun(row) {
  1299. this.reset();
  1300. const id = row.id || this.ids;
  1301. getRegularinfo(id).then((response) => {
  1302. this.disabled = true;
  1303. this.form = response.data;
  1304. this.open3 = true;
  1305. this.title = "修改经常性检查";
  1306. this.jiannum = 1;
  1307. this.btnnum = 0;
  1308. this.isActive = 1;
  1309. this.sp = 0;
  1310. });
  1311. },
  1312. //通过
  1313. tongguofun() {
  1314. editissuccess(this.form).then((res) => {
  1315. if (res.code == 200) {
  1316. this.$modal.msgSuccess("审批成功");
  1317. this.open = false;
  1318. this.open3 = false;
  1319. this.getList();
  1320. }
  1321. });
  1322. },
  1323. //重新整改
  1324. zhenggaifun() {
  1325. this.jiannum = 0;
  1326. this.btnnum = 1;
  1327. this.disabled = false;
  1328. this.currentState = 1;
  1329. this.curr = false;
  1330. this.open3 = false;
  1331. this.open = true;
  1332. // this.reset();
  1333. // editissuccess().then(res => {
  1334. // if (res.code == 200) {
  1335. // this.$modal.msgSuccess("审批成功");
  1336. // }
  1337. // });
  1338. },
  1339. //未通过提交
  1340. weitongguofun() {
  1341. editisfalse(this.form).then((res) => {
  1342. this.$modal.msgSuccess("操作成功");
  1343. this.open = false;
  1344. this.getList();
  1345. });
  1346. },
  1347. submitForm2() {
  1348. if (this.form.documentProof) {
  1349. if (typeof this.form.documentProof != "string") {
  1350. let documentProofs = this.form.documentProof;
  1351. this.form.documentProof = documentProofs[0].url;
  1352. this.form.wenjianname = documentProofs[0].name;
  1353. }
  1354. }
  1355. this.form.caoZuoType = this.queryParams.caoZuoType;
  1356. editquestion(this.form).then((response) => {
  1357. this.$modal.msgSuccess("整改成功");
  1358. this.open = false;
  1359. this.open1 = false;
  1360. // this.open3=false;
  1361. this.getList();
  1362. });
  1363. },
  1364. /** 提交按钮 */
  1365. submitForm() {
  1366. this.$refs["form"].validate((valid) => {
  1367. if (valid) {
  1368. if (this.form.documentProof) {
  1369. if (typeof this.form.documentProof != "string") {
  1370. let documentProofs = this.form.documentProof;
  1371. this.form.documentProof = documentProofs[0].url;
  1372. this.form.wenjianname = documentProofs[0].name;
  1373. }
  1374. }
  1375. if (this.form.id != null) {
  1376. this.form.caoZuoType = this.queryParams.caoZuoType;
  1377. updateRegularinfo(this.form).then((response) => {
  1378. this.$modal.msgSuccess("修改成功");
  1379. this.open = false;
  1380. this.open1 = false;
  1381. // this.open3=false;
  1382. this.getList();
  1383. });
  1384. } else {
  1385. this.form.caoZuoType = this.queryParams.caoZuoType;
  1386. addRegularinfo(this.form).then((response) => {
  1387. this.$modal.msgSuccess("新增成功");
  1388. this.open = false;
  1389. this.open1 = false;
  1390. // this.open3=false;
  1391. this.getList();
  1392. });
  1393. }
  1394. }
  1395. });
  1396. },
  1397. /** 删除按钮操作 */
  1398. handleDelete(row) {
  1399. const ids = row.id || this.ids;
  1400. this.$modal
  1401. .confirm("是否确认删除经常性检查的数据项?")
  1402. .then(function () {
  1403. return delRegularinfo(ids);
  1404. })
  1405. .then(() => {
  1406. this.getList();
  1407. this.$modal.msgSuccess("删除成功");
  1408. })
  1409. .catch(() => {});
  1410. },
  1411. /** 导出按钮操作 */
  1412. handleExport() {
  1413. const queryParams = this.queryParams;
  1414. this.$modal
  1415. .confirm("是否确认导出所有经常性检查数据项?")
  1416. .then(() => {
  1417. this.exportLoading = true;
  1418. return exportRegularinfo(queryParams);
  1419. })
  1420. .then((response) => {
  1421. this.$download.name(response.msg);
  1422. this.exportLoading = false;
  1423. })
  1424. .catch(() => {});
  1425. },
  1426. //检查单位
  1427. unitCheckIdfun(val) {
  1428. this.form.unitCheckId = val.deptId;
  1429. this.form.unitCheck = val.deptName;
  1430. },
  1431. //受检单位
  1432. inspectedUnitfun(val) {
  1433. this.form.inspectedUnitId = val.deptId;
  1434. this.form.inspectedUnit = val.deptName;
  1435. },
  1436. //负责人
  1437. chargePeoplefun(val) {
  1438. this.form.chargePeopleId = val.id;
  1439. this.form.chargePeople = val.name;
  1440. },
  1441. caoZuoTypefun() {
  1442. this.getList();
  1443. },
  1444. scoreblur() {
  1445. if (this.form.score < 0) {
  1446. this.form.score = null;
  1447. }
  1448. },
  1449. },
  1450. };
  1451. </script>
  1452. <style scoped>
  1453. ::v-deep .el-dialog {
  1454. width: 1030px !important;
  1455. background-color: #004d86;
  1456. }
  1457. ::v-deep .el-dialog__header {
  1458. border-bottom: 1px solid #718a9d;
  1459. }
  1460. ::v-deep .el-dialog__title {
  1461. color: #fff;
  1462. font: 18px;
  1463. }
  1464. ::v-deep .el-dialog__headerbtn .el-dialog__close {
  1465. color: #fff;
  1466. }
  1467. .el-form-item ::v-deep .el-input__inner {
  1468. width: 200px;
  1469. height: 36px;
  1470. background: #004d86;
  1471. color: #fff;
  1472. border: 1px solid #fff !important;
  1473. }
  1474. ::v-deep .el-date-editor.el-input {
  1475. width: 200px;
  1476. height: 36px;
  1477. }
  1478. ::v-deep .el-upload--picture-card {
  1479. height: 210px;
  1480. width: 170px;
  1481. line-height: 210px;
  1482. }
  1483. .el-upload--picture-card /deep/ .el-upload--picture-card i {
  1484. font-size: 48px;
  1485. }
  1486. ::v-deep .el-upload__tip {
  1487. display: none;
  1488. }
  1489. ::v-deep .el-textarea__inner {
  1490. width: 980px;
  1491. height: 104px;
  1492. }
  1493. .div-box-title span {
  1494. width: 25px;
  1495. height: 25px;
  1496. display: inline-block;
  1497. background-color: #1c86e1;
  1498. line-height: 25px;
  1499. text-align: center;
  1500. font-size: 16px;
  1501. cursor: pointer;
  1502. margin-left: 865px;
  1503. }
  1504. .el-select-dropdown__item:hover {
  1505. color: #1c86e1;
  1506. }
  1507. .el-select-dropdown__item {
  1508. color: #000;
  1509. }
  1510. .el-tree {
  1511. background-color: #00365f;
  1512. color: #fff;
  1513. }
  1514. ::v-deep .el-tree-node__content:hover {
  1515. color: #1c86e1;
  1516. }
  1517. ::v-deep .el-upload-list--picture-card .el-upload-list__item {
  1518. height: 210px;
  1519. width: 170px;
  1520. }
  1521. ::v-deep .radiogroup {
  1522. height: 36px;
  1523. }
  1524. ::v-deep .radiogroup .el-radio-button {
  1525. height: 36px;
  1526. }
  1527. ::v-deep .el-input-number__increase {
  1528. background-color: transparent !important;
  1529. border: none;
  1530. color: #cccccc;
  1531. border-bottom: none !important;
  1532. }
  1533. ::v-deep .el-input-number__decrease {
  1534. background-color: transparent !important;
  1535. border: none !important;
  1536. color: #cccccc;
  1537. }
  1538. ::v-deep .el-dialog__body {
  1539. padding: 30px 0px 30px 25px;
  1540. }
  1541. ::v-deep .el-dialog__footer {
  1542. margin-right: 5px;
  1543. }
  1544. .isSubmit {
  1545. margin-left: 42% !important;
  1546. }
  1547. .el-radio-button {
  1548. width: 122px !important;
  1549. height: 30px !important;
  1550. line-height: 30px !important;
  1551. border: none !important;
  1552. }
  1553. ::v-deep .el-radio-button__inner {
  1554. width: 120px !important;
  1555. height: 30px !important;
  1556. line-height: 8px !important;
  1557. background: #196299;
  1558. border: none;
  1559. color: #fff;
  1560. }
  1561. ::v-deep .el-radio-button:first-child .el-radio-button__inner {
  1562. border-left: none !important;
  1563. }
  1564. ::v-deep .el-radio-button__orig-radio:checked + .el-radio-button__inner {
  1565. color: #ffffff;
  1566. background-color: #006cff !important;
  1567. border-color: #006cff !important;
  1568. -webkit-box-shadow: -1px 0 0 0 #006cff !important;
  1569. box-shadow: -1px 0 0 0 #006cff !important;
  1570. }
  1571. /* 将水平线设为红色: */
  1572. hr {
  1573. border: none;
  1574. height: 1px;
  1575. background-color: rgba(204, 204, 204, 0.5);
  1576. }
  1577. ::v-deep img {
  1578. object-fit: cover;
  1579. }
  1580. ::v-deep .active .upload-file-uploader .el-upload .el-button {
  1581. display: none;
  1582. }
  1583. /* 下载按钮 */
  1584. .downloadfile {
  1585. border: 1px solid white;
  1586. display: inline-block;
  1587. width: 100px;
  1588. height: 33px;
  1589. border-radius: 5px;
  1590. line-height: 33px;
  1591. text-align: center;
  1592. }
  1593. .wenjian {
  1594. width: 600px !important;
  1595. height: 33px;
  1596. }
  1597. </style>