index.vue 52 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340
  1. <template>
  2. <div class="app-container startInspection" v-loading.fullscreen.lock="loading">
  3. <div class="title-max-box">
  4. <p class="title-p">开展检查</p>
  5. </div>
  6. <div class="content-max-box scrollbar-box">
  7. <el-form ref="addForm" :model="addForm" :rules="rules" label-width="82px">
  8. <div class="top-form-box">
  9. <div class="top-form-left-box">
  10. <el-form-item label="实验室" prop="subId">
  11. <el-select placeholder="搜索实验室或房间号" filterable remote reserve-keyword style="width: 500px"
  12. v-model="addForm.subId" @change="subChange" :remote-method="getSubList">
  13. <el-option
  14. v-for="item in subSelectList"
  15. :key="item.id"
  16. :label="item.name"
  17. :value="item.id">
  18. </el-option>
  19. </el-select>
  20. </el-form-item>
  21. <el-form-item label="楼栋" prop="buildId">
  22. <el-select disabled v-model="addForm.buildId" placeholder="请选择学院"
  23. @change="buildingsChange" style="width: 500px">
  24. <el-option
  25. v-for="item in buildingsSelectList"
  26. :key="item.id"
  27. :label="item.name"
  28. :value="item.id">
  29. </el-option>
  30. </el-select>
  31. </el-form-item>
  32. <div style="display: flex" v-if="planType == 1">
  33. <el-form-item label="计划标题" prop="title">
  34. <el-input v-model="addForm.title" placeholder="请输入计划标题" maxLength="30" style="width: 500px"/>
  35. </el-form-item>
  36. <p class="inquire-button-one" @click="planButton(2)"
  37. style="font-size:14px;margin-left:20px;width:100px;" v-if="planList[0]">选择计划</p>
  38. </div>
  39. <el-form-item label="检查类型" prop="checkCategory">
  40. <el-select v-model="addForm.checkCategory" placeholder="请选择检查类型"
  41. style="width: 500px">
  42. <el-option
  43. v-for="item in inspectCategoryList"
  44. :key="item.id"
  45. :label="item.name"
  46. :value="item.id">
  47. </el-option>
  48. </el-select>
  49. </el-form-item>
  50. <div style="display: flex" v-if="planType == 2">
  51. <el-form-item label="计划" prop="id">
  52. <el-select v-model="addForm.id" placeholder="请选择计划"
  53. @change="planChange" style="width: 500px">
  54. <el-option
  55. v-for="item in planList"
  56. :key="item.id"
  57. :label="item.title"
  58. :value="item.id">
  59. </el-option>
  60. </el-select>
  61. </el-form-item>
  62. <p class="inquire-button-one" @click="planButton(1)"
  63. style="font-size:14px;margin-left:20px;width:100px;">自定义输入</p>
  64. </div>
  65. <el-form-item label="整改期限" prop="rectifyDeadline" v-if="addForm.checkResult === 0 || addForm.checkCategory==2">
  66. <el-date-picker
  67. style="width: 500px"
  68. v-model="addForm.rectifyDeadline"
  69. type="date"
  70. value-format="yyyy-MM-dd"
  71. :picker-options="pickerOptions"
  72. :clearable="false"
  73. placeholder="请选择整改期限">
  74. </el-date-picker>
  75. </el-form-item>
  76. </div>
  77. <div class="top-form-right-box">
  78. <el-form-item label="学院" prop="deptId">
  79. <el-select disabled v-model="addForm.deptId" placeholder="请选择学院"
  80. @change="deptChange" style="width: 500px">
  81. <el-option
  82. v-for="item in deptSelectList"
  83. :key="item.deptId"
  84. :label="item.deptName"
  85. :value="item.deptId">
  86. </el-option>
  87. </el-select>
  88. </el-form-item>
  89. <el-form-item label="检查组织" prop="checkType">
  90. <el-select v-model="addForm.checkType" placeholder="请选择检查组织"
  91. disabled style="width: 500px">
  92. <el-option
  93. v-for="item in checkTypeList"
  94. :key="item.key"
  95. :label="item.label"
  96. :value="item.key">
  97. </el-option>
  98. </el-select>
  99. </el-form-item>
  100. <el-form-item label="计划周期" prop="dateRange">
  101. <el-date-picker
  102. :disabled="planType == 2"
  103. :clearable="false"
  104. v-model="addForm.dateRange"
  105. size="small"
  106. style="width: 500px"
  107. value-format="yyyy-MM-dd"
  108. type="daterange"
  109. :picker-options="pickerOptions"
  110. range-separator="至"
  111. start-placeholder="开始日期"
  112. end-placeholder="结束日期"
  113. ></el-date-picker>
  114. </el-form-item>
  115. <el-form-item label="检查结果" prop="checkResult" v-if="addForm.checkCategory==1">
  116. <el-select v-model="addForm.checkResult" @change="checkResultChange" placeholder="请选择检查结果" style="width: 500px">
  117. <el-option :key="0" label="不符合" :value="0"></el-option>
  118. <el-option :key="1" label="符合" :value="1"></el-option>
  119. </el-select>
  120. </el-form-item>
  121. <el-form-item label="整改通知" prop="rectifyNotice" v-if="addForm.checkResult === 0 || addForm.checkCategory==2">
  122. <el-radio-group v-model="addForm.rectifyNotice" style="margin-top:5px;">
  123. <el-radio :label="1">整改告知书</el-radio>
  124. <el-radio :label="2">整改通知书</el-radio>
  125. </el-radio-group>
  126. </el-form-item>
  127. </div>
  128. </div>
  129. <!--综合检查-->
  130. <div class="bottom-form-box" v-if="addForm.checkResult === 0 && addForm.checkCategory==1">
  131. <div class="bottom-form-title-box">
  132. <p>不符合项</p>
  133. <p>隐患数:{{addForm.checkHazardDtoList.length}}</p>
  134. </div>
  135. <div class="for-max-big-box" v-for="(item,index) in addForm.checkHazardDtoList" :key="index">
  136. <div class="for-title-box">
  137. <p class="for-title-p">第{{index+1}}隐患项</p>
  138. <div class="for-del-box">
  139. <p class="el-icon-delete"></p>
  140. <p @click="delCheckHazardDtoList(index)">删除此项</p>
  141. </div>
  142. <div class="for-button-box" @click="dataLookButton(item)">
  143. <p :class="item.lookType?'el-icon-arrow-up':'el-icon-arrow-down'"></p>
  144. <p>{{item.lookType?'收起':'展开'}}</p>
  145. </div>
  146. </div>
  147. <div class="for-big-box" v-if="item.lookType">
  148. <el-form-item label="隐患等级" :prop="'checkHazardDtoList.'+index+'.hazardLevel'" :rules="rules.hazardLevel" label-width="123px">
  149. <el-select v-model="item.hazardLevel" clearable placeholder="请选择隐患等级" style="width: 408px">
  150. <el-option :key="2" label="一般隐患" :value="2"></el-option>
  151. <el-option :key="1" label="重大隐患" :value="1"></el-option>
  152. <el-option :key="3" label="管理问题" :value="3"></el-option>
  153. </el-select>
  154. </el-form-item>
  155. <el-form-item label="检查项目" :prop="'checkHazardDtoList.'+index+'.hazardCheckPro'" :rules="rules.hazardCheckPro" label-width="123px">
  156. <el-cascader
  157. @change="(val)=>cascaderChange(val,'',index)"
  158. v-model="item.hazardCheckPro"
  159. style="width: 898px"
  160. placeholder="请选择检查项"
  161. :options="options"
  162. :props="{ checkStrictly: false, value: 'id', label: 'labelName',emitPath:false }"
  163. filterable>
  164. <template slot-scope="{data}">
  165. <el-tooltip :content="data.labelName" v-if="data.labelName.length>22">
  166. <p style="max-width:300px;overflow: hidden;text-overflow:ellipsis;white-space:nowrap;">{{data.labelName}}</p>
  167. </el-tooltip>
  168. <p v-else style="max-width:300px;overflow: hidden;text-overflow:ellipsis;white-space:nowrap;">{{data.labelName}}</p>
  169. </template>
  170. </el-cascader>
  171. <p class="hazard-check-count-p" v-if="hazardCheckCount>0">此检查项在当前实验室累计出现 <span>{{hazardCheckCount}}</span> 次隐患</p>
  172. </el-form-item>
  173. <el-form-item label="检查要点" label-width="123px">
  174. <el-input
  175. style="width: 898px"
  176. type="textarea"
  177. :autosize="{ minRows: 6, maxRows: 6}"
  178. placeholder="未查到此项检查要点,可在此输入添加"
  179. resize="none"
  180. maxlength="300"
  181. show-word-limit
  182. v-model="item.hazardCheckPoint">
  183. </el-input>
  184. </el-form-item>
  185. <el-form-item label="隐患描述" :prop="'checkHazardDtoList.'+index+'.hazardDescribe'" :rules="rules.hazardDescribe" label-width="123px">
  186. <el-input
  187. style="width: 898px"
  188. type="textarea"
  189. :autosize="{ minRows: 4, maxRows: 4}"
  190. placeholder="请输入隐患描述"
  191. resize="none"
  192. maxlength="100"
  193. show-word-limit
  194. v-model="item.hazardDescribe">
  195. </el-input>
  196. </el-form-item>
  197. <el-form-item label="隐患照片" :prop="'checkHazardDtoList.'+index+'.uploadDtoList'" :rules="rules.uploadDtoList" label-width="123px">
  198. <div class="for-img-box" v-for="(img,imgIndex) in item.uploadDtoList" :key="imgIndex">
  199. <img class="for-img" :src="img.fileUrl" @click="lookImg(item.uploadDtoList,imgIndex)">
  200. <p class="for-del-button el-icon-circle-close" @click="delImg(index,imgIndex)"></p>
  201. </div>
  202. <el-upload
  203. v-if="item.uploadDtoList.length<5"
  204. style="display: inline-block;overflow: hidden"
  205. class="avatar-uploader"
  206. :action="uploadImgUrl"
  207. :show-file-list="false"
  208. :on-success="(res)=>handleAvatarSuccess(res,item)"
  209. :headers="headers"
  210. :before-upload="(res)=>beforeAvatarUpload(res,item)">
  211. <p class="el-icon-plus up-img-p" style="display: inline-block"></p>
  212. </el-upload>
  213. </el-form-item>
  214. <el-form-item label="" label-width="123px" style="margin-bottom:40px;color:#999;">
  215. <p>支持jpg/png/bmp/gif格式,且不超过2M,最多上传5张</p>
  216. </el-form-item>
  217. </div>
  218. </div>
  219. <p class="add-bottom-button" @click="addObject">+新增隐患检查项</p>
  220. </div>
  221. <!--专项检查-->
  222. <div class="bottom-form-box" v-if="addForm.checkCategory==2 && pageType==1">
  223. <div class="bottom-form-title-box">
  224. <p>检查项</p>
  225. <p>检查项:{{addForm.checkHazardInfoVoList.length}}</p>
  226. </div>
  227. <div class="dept-table-max-box">
  228. <div class="device-tip">请选择以下实验室内设备开始检查</div>
  229. <el-table border :data="deviceTableList" @selection-change="deviceChange" height="350">
  230. <el-table-column type="selection" width="50" :reserve-selection="true" align="center"/>
  231. <el-table-column label="名称" align="center" prop="chName" show-overflow-tooltip/>
  232. <el-table-column label="数量" align="center" prop="num" show-overflow-tooltip/>
  233. <el-table-column label="型号" align="center" prop="code" show-overflow-tooltip />
  234. <el-table-column label="类型" align="center" prop="hazardTypeMode" show-overflow-tooltip/>
  235. </el-table>
  236. </div>
  237. <div class="start_btn" @click="handleClick('startBtn')">开始检查</div>
  238. </div>
  239. <!--专项检查项-->
  240. <div class="bottom-form-box" v-if="addForm.checkCategory==2 && pageType==2">
  241. <div class="bottom-form-title-box">
  242. <p>检查项</p>
  243. <p>检查项:{{addForm.checkHazardInfoVoList.length}}</p>
  244. </div>
  245. <div class="for-max-big-box for-max-big-box-special" v-for="(item,index) in addForm.checkHazardInfoVoList" :key="index">
  246. <div class="for-title-box">
  247. <p class="for-title-p">{{index+1}}、【{{item.hazardName}}】专项检查</p>
  248. <div class="for-del-box">
  249. <p class="el-icon-delete"></p>
  250. <p @click="delCheckHazardDtoList(index)">删除此项</p>
  251. </div>
  252. <div class="for-button-box" @click="dataLookButton(item)">
  253. <p :class="item.lookType?'el-icon-arrow-up':'el-icon-arrow-down'"></p>
  254. <p>{{item.lookType?'收起':'展开'}}</p>
  255. </div>
  256. </div>
  257. <div class="for-big-box-special" v-for="(item2,index2) in item.checkHazardDtoList">
  258. <div class="for-big-box-special-l">{{index+1}}.{{index2+1}}</div>
  259. <div class="for-big-box-special-r">
  260. <el-form-item label="检查项目" :prop="'checkHazardInfoVoList.'+index+'.checkHazardDtoList.'+index2+'.hazardCheckPro'" :rules="rules.hazardCheckPro" label-width="123px">
  261. <el-radio-group v-model="item2.checkFlag" style="margin-right: 20px;">
  262. <el-radio :label="1">符合</el-radio>
  263. <el-radio :label="0">不符合</el-radio>
  264. </el-radio-group>
  265. <el-cascader
  266. @change="(val)=>cascaderChange(val,item2,index2)"
  267. v-model="item2.hazardCheckPro"
  268. style="width: 730px"
  269. placeholder="请选择检查项"
  270. :options="options"
  271. :props="{ checkStrictly: false, value: 'id', label: 'labelName',emitPath:false }"
  272. filterable>
  273. <template slot-scope="{data}">
  274. <el-tooltip :content="data.labelName" v-if="data.labelName.length>22">
  275. <p style="max-width:300px;overflow: hidden;text-overflow:ellipsis;white-space:nowrap;">{{data.labelName}}</p>
  276. </el-tooltip>
  277. <p v-else style="max-width:300px;overflow: hidden;text-overflow:ellipsis;white-space:nowrap;">{{data.labelName}}</p>
  278. </template>
  279. </el-cascader>
  280. <p class="hazard-check-count-p" v-if="hazardCheckCount>0">此检查项在当前实验室累计出现 <span>{{hazardCheckCount}}</span> 次隐患</p>
  281. </el-form-item>
  282. <el-form-item v-if="item2.checkFlag==0" label="隐患等级" :prop="'checkHazardInfoVoList.'+index+'.checkHazardDtoList.'+index2+'.hazardLevel'" :rules="rules.hazardLevel" label-width="123px">
  283. <el-select v-model="item2.hazardLevel" clearable placeholder="请选择隐患等级" style="width: 408px">
  284. <el-option :key="2" label="一般隐患" :value="2"></el-option>
  285. <el-option :key="1" label="重大隐患" :value="1"></el-option>
  286. <el-option :key="3" label="管理问题" :value="3"></el-option>
  287. </el-select>
  288. </el-form-item>
  289. <el-form-item v-if="item2.checkFlag==0" label="隐患描述" :prop="'checkHazardInfoVoList.'+index+'.checkHazardDtoList.'+index2+'.hazardDescribe'" :rules="rules.hazardDescribe" label-width="123px">
  290. <el-input
  291. style="width: 898px"
  292. type="textarea"
  293. :autosize="{ minRows: 4, maxRows: 4}"
  294. placeholder="请输入隐患描述"
  295. resize="none"
  296. maxlength="100"
  297. show-word-limit
  298. v-model="item2.hazardDescribe">
  299. </el-input>
  300. </el-form-item>
  301. <el-form-item v-if="item2.checkFlag==0" label="隐患照片" :prop="'checkHazardInfoVoList.'+index+'.checkHazardDtoList.'+index2+'.uploadDtoList'" :rules="rules.uploadDtoList" label-width="123px">
  302. <div class="for-img-box" v-for="(img,imgIndex) in item2.uploadDtoList" :key="imgIndex">
  303. <img class="for-img" :src="img.fileUrl" @click="lookImg(item2.uploadDtoList,imgIndex)">
  304. <p class="for-del-button el-icon-circle-close" @click="delImg(index,imgIndex)"></p>
  305. </div>
  306. <el-upload
  307. v-if="item2.uploadDtoList.length<5"
  308. style="display: inline-block;overflow: hidden"
  309. class="avatar-uploader"
  310. :action="uploadImgUrl"
  311. :show-file-list="false"
  312. :on-success="(res)=>handleAvatarSuccess(res,item2)"
  313. :headers="headers"
  314. :before-upload="(res)=>beforeAvatarUpload(res,item2)">
  315. <p class="el-icon-plus up-img-p" style="display: inline-block"></p>
  316. </el-upload>
  317. </el-form-item>
  318. <el-form-item v-if="item2.checkFlag==0" label="" label-width="123px" style="margin-bottom:40px;color:#999;">
  319. <p>支持jpg/png/bmp/gif格式,且不超过2M,最多上传5张</p>
  320. </el-form-item>
  321. </div>
  322. </div>
  323. <p class="add-bottom-button" @click="addObjectTow(item)">+新增隐患检查项</p>
  324. </div>
  325. <p class="add-bottom-button" @click="addObjectDevice()">+新增检查项</p>
  326. </div>
  327. </el-form>
  328. </div>
  329. <div class="bottom-button-max-box" v-hasPermi="['safety:checkManage_4:edit']">
  330. <p class="null-p"></p>
  331. <p class="add-button-two-90" @click="upDataButton(1)">保存</p>
  332. <p class="inquire-button-one" @click="upDataButton(2)">提交</p>
  333. <p class="null-p"></p>
  334. </div>
  335. <lookImgDialog ref="lookImgDialog"></lookImgDialog>
  336. <!--设备弹窗-->
  337. <el-dialog title="检查项" v-if="dialogVisible" :visible.sync="dialogVisible" width="730px" :append-to-body="false" :modal-append-to-body="false" :close-on-click-modal="false">
  338. <div style="margin-bottom:20px ">请选择以下实验室内设备开始检查</div>
  339. <el-table ref="deviceTable" border :data="deviceTableList" @selection-change="deviceChange" :row-key="getRowKeys" height="350">
  340. <el-table-column type="selection" width="50" :reserve-selection="true" align="center"/>
  341. <el-table-column label="名称" align="center" prop="chName" show-overflow-tooltip/>
  342. <el-table-column label="数量" align="center" prop="num" show-overflow-tooltip/>
  343. <el-table-column label="型号" align="center" prop="code" show-overflow-tooltip />
  344. <el-table-column label="类型" align="center" prop="hazardTypeMode" show-overflow-tooltip/>
  345. </el-table>
  346. <div slot="footer" class="dialog-footer">
  347. <el-button @click="cancel">取 消</el-button>
  348. <el-button type="primary" @click="handleClick('startBtn')">确 定</el-button>
  349. </div>
  350. </el-dialog>
  351. </div>
  352. </template>
  353. <script>
  354. import { getToken } from "@/utils/auth";
  355. import lookImgDialog from '@/components/lookImgDialog/lookImgDialog.vue'
  356. import { listDepartments } from "@/api/system/dept";
  357. import { buildFloorGetlist } from "@/api/laboratory/building";
  358. import {
  359. buildBySubList, getCheckPlanBySubId, findCheckManage, checkOptionList,
  360. checkManageUpdate, checkManageAdd, countHazardNum, getGentle, getHazardListBySub, getHazardInfo
  361. } from '@/api/safetyCheck/index'
  362. export default {
  363. name: 'index',
  364. components: {
  365. lookImgDialog,
  366. },
  367. data(){
  368. return{
  369. loading:false,
  370. uploadImgUrl: this.uploadUrl(), // 上传的图片服务器地址
  371. headers: {
  372. Authorization: "Bearer " + getToken(),
  373. },
  374. //期限时间
  375. pickerOptions: {
  376. disabledDate(time) {
  377. return time.getTime() < Date.now() - 8.64e7;//如果没有后面的-8.64e7就是不可以选择今天的
  378. }
  379. },
  380. //检查组织
  381. checkTypeList:[{ key:1, label:"校院巡查", },{ key:2, label:"实验室自查", }],
  382. //学院列表
  383. deptSelectList:[],
  384. //楼栋列表
  385. buildingsSelectList:[],
  386. //实验室列表
  387. subSelectList:[],
  388. //楼栋列表
  389. options:[],
  390. addForm:{
  391. checkRange:3,
  392. id:"",
  393. subId:"",
  394. buildId:"",
  395. deptId:"",
  396. title:"",
  397. checkResult:"",
  398. rectifyNotice:"",
  399. checkCategory:'1',
  400. checkType:2,
  401. dateRange:[],
  402. rectifyDeadline:"",
  403. //综合检查
  404. checkHazardDtoList:[],
  405. //专项检查
  406. checkHazardInfoVoList:[],
  407. },
  408. //检查项出现次数
  409. hazardCheckCount:0,
  410. //上传用名称保存
  411. upDataName:"",
  412. deviceTableList:[],
  413. //检查类型
  414. inspectCategoryList:[{id:'1',name:'综合检查'},{id:'2',name:'专项检查'}],
  415. // 表单校验
  416. rules: {
  417. subId: [
  418. { required: true, message: "请选择实验室", trigger: "blur" },
  419. ],
  420. buildId: [
  421. { required: true, message: "请选择楼栋", trigger: "blur" },
  422. ],
  423. deptId: [
  424. { required: true, message: "请选择学院", trigger: "blur" },
  425. ],
  426. checkType: [
  427. { required: true, message: "请选择检查组织", trigger: "blur" },
  428. ],
  429. checkCategory: [
  430. { required: true, message: "请选择检查类型", trigger: "blur" },
  431. ],
  432. dateRange: [
  433. { required: true, message: "请选择计划周期", trigger: "blur" },
  434. ],
  435. title: [
  436. { required: true, message: "请输入计划标题", trigger: "blur" },
  437. { required: true, message: "请输入计划标题", validator: this.spaceJudgment, trigger: "blur" },
  438. ],
  439. id: [
  440. { required: true, message: "请选择计划", trigger: "blur" },
  441. ],
  442. checkResult: [
  443. { required: true, message: "请选择检查结果", trigger: "blur" },
  444. ],
  445. rectifyNotice: [
  446. { required: true, message: "请选择整改通知", trigger: "blur" },
  447. ],
  448. rectifyDeadline: [
  449. { required: true, message: "请选择整改期限", trigger: "blur" },
  450. ],
  451. hazardLevel: [
  452. { required: true, message: "请选择隐患等级", trigger: "blur" },
  453. ],
  454. hazardCheckPro: [
  455. { required: true, message: "请选择检查项目", trigger: "blur" },
  456. ],
  457. hazardDescribe: [
  458. { required: true, message: "请输入隐患描述", trigger: "blur" },
  459. { required: true, message: "请输入隐患描述", validator: this.spaceJudgment, trigger: "blur" },
  460. ],
  461. uploadDtoList: [
  462. { required: true, message: "请上传隐患照片", trigger: "blur" },
  463. ],
  464. },
  465. //自主输入与列表选择相关数据
  466. planList:[],
  467. planType:1,//1手动 2选择
  468. //权限范围
  469. adminGentle:false,
  470. applyGentle:false,
  471. myApplyGentle:false,
  472. /* ==专项检查== */
  473. dialogVisible:true,
  474. pageType:1,
  475. multipleSelection:[],
  476. multipleSelectionArr:[],
  477. }
  478. },
  479. created(){
  480. },
  481. mounted(){
  482. this.checkOptionList();
  483. this.listDepartments();
  484. this.getGentle();
  485. this.buildFloorGetlist();
  486. },
  487. methods:{
  488. getRowKeys(row) {
  489. return row.id
  490. },
  491. //选中设备
  492. deviceChange(val){
  493. this.multipleSelection = val;
  494. this.multipleSelectionArr=JSON.parse(JSON.stringify(val))
  495. },
  496. handleClick(doType){
  497. let self=this;
  498. if(doType=='startBtn'){//开始检查
  499. let hazardIds='';
  500. let list=[];
  501. if(this.multipleSelection[0]){
  502. for(let i=0;i<this.multipleSelection.length;i++){
  503. list.push(this.multipleSelection[i].id)
  504. }
  505. this.pageType=2;
  506. this.checkOptionList();
  507. this.dialogVisible=false;
  508. hazardIds=list.join(',')
  509. this.getHazardInfo(this.addForm.subId,hazardIds)
  510. }else{
  511. this.msgError('请先选择实验室内设备!')
  512. }
  513. // if(this.addForm.checkHazardInfoVoList.length<10){
  514. // let obj = {
  515. // name:'烘箱-001',
  516. // type:'专项检查',
  517. // checkHazardDtoList:[]
  518. // };
  519. // this.addForm.checkHazardInfoVoList.push(obj);
  520. // }
  521. }else if(doType=='addDevice'){//新增检查项
  522. console.log(this.multipleSelectionArr)
  523. }
  524. },
  525. // 取消按钮
  526. cancel() {
  527. this.dialogVisible = false;
  528. },
  529. //获取权限范围
  530. getGentle(){
  531. getGentle().then(response => {
  532. this.$set(this,'adminGentle',response.data.adminGentle);
  533. this.$set(this,'applyGentle',response.data.applyGentle);
  534. this.$set(this,'myApplyGentle',response.data.myApplyGentle);
  535. });
  536. },
  537. //提交按钮
  538. upDataButton(type){
  539. this.$refs["addForm"].validate(valid => {
  540. if (valid) {
  541. let startTime = Date.parse(new Date(this.addForm.dateRange[0]));
  542. let currentTime = Date.parse(new Date);
  543. if(currentTime<startTime){
  544. this.msgError('当前时间不在计划周期内')
  545. return
  546. }
  547. if(this.planType == 1){
  548. //新计划
  549. let obj = JSON.parse(JSON.stringify(this.addForm));
  550. if(obj.checkResult === 0){
  551. if(!obj.checkHazardDtoList[0]){
  552. this.msgError('请添加隐患检查项')
  553. return
  554. }
  555. for(let i=0;i<obj.checkHazardDtoList.length;i++){
  556. delete obj.checkHazardDtoList[i].lookType
  557. }
  558. obj.dangerNum = obj.checkHazardDtoList.length
  559. }else{
  560. obj.checkHazardDtoList = [];
  561. }
  562. obj.manageStatus = type
  563. obj.cycleStartTime = obj.dateRange[0]
  564. obj.cycleEndTime = obj.dateRange[1]
  565. obj.subIds = obj.subId;
  566. delete obj.subId;
  567. delete obj.dateRange
  568. checkManageAdd(obj).then(response => {
  569. this.msgSuccess(response.msg);
  570. this.initializationAddData();
  571. });
  572. }if(this.planType == 2){
  573. //已有计划修改
  574. let obj = JSON.parse(JSON.stringify(this.addForm));
  575. obj.manageStatus = type
  576. obj.cycleStartTime = obj.dateRange[0]
  577. obj.cycleEndTime = obj.dateRange[1]
  578. delete obj.dateRange
  579. if(this.addForm.checkCategory==1){//综合检查
  580. if(obj.checkResult === 0){
  581. if(!obj.checkHazardDtoList[0]){
  582. this.msgError('请添加隐患检查项')
  583. return
  584. }
  585. for(let i=0;i<obj.checkHazardDtoList.length;i++){
  586. delete obj.checkHazardDtoList[i].lookType
  587. }
  588. obj.dangerNum = obj.checkHazardDtoList.length
  589. }else{
  590. obj.checkHazardDtoList = [];
  591. }
  592. }else if(this.addForm.checkCategory==2){//专项检查
  593. let list=[]
  594. let checkFlagList=[];
  595. for(let i=0;i<this.addForm.checkHazardInfoVoList.length;i++){
  596. for(let b=0;b<this.addForm.checkHazardInfoVoList[i].checkHazardDtoList.length;b++){
  597. checkFlagList.push(this.addForm.checkHazardInfoVoList[i].checkHazardDtoList[b].checkFlag)
  598. let obj={
  599. checkFlag:this.addForm.checkHazardInfoVoList[i].checkHazardDtoList[b].checkFlag,
  600. checkCategory:this.addForm.checkHazardInfoVoList[i].checkHazardDtoList[b].checkCategory,
  601. hazardCheckCode:this.addForm.checkHazardInfoVoList[i].checkHazardDtoList[b].hazardCheckCode,
  602. hazardCheckName:this.addForm.checkHazardInfoVoList[i].checkHazardDtoList[b].hazardCheckName,
  603. hazardCheckPro:this.addForm.checkHazardInfoVoList[i].checkHazardDtoList[b].hazardCheckPro,
  604. hazardDescribe:this.addForm.checkHazardInfoVoList[i].checkHazardDtoList[b].hazardDescribe,
  605. hazardLevel:this.addForm.checkHazardInfoVoList[i].checkHazardDtoList[b].hazardLevel,
  606. uploadDtoList:this.addForm.checkHazardInfoVoList[i].checkHazardDtoList[b].uploadDtoList,
  607. code:this.addForm.checkHazardInfoVoList[i].code,
  608. hazardId:this.addForm.checkHazardInfoVoList[i].hazardId,
  609. hazardName:this.addForm.checkHazardInfoVoList[i].hazardName,
  610. hazardTypeMode:this.addForm.checkHazardInfoVoList[i].hazardTypeMode,
  611. hazardTypeModeName:this.addForm.checkHazardInfoVoList[i].hazardTypeModeName,
  612. joinHazardId:this.addForm.checkHazardInfoVoList[i].joinHazardId,
  613. }
  614. list.push(obj)
  615. }
  616. }
  617. if(checkFlagList.every(item=>{return item==1})){//符合
  618. obj.checkResult=1;
  619. }else{//不符合
  620. obj.checkResult=0;
  621. }
  622. obj.checkHazardDtoList=list;
  623. }
  624. checkManageUpdate(obj).then(response => {
  625. this.msgSuccess(response.msg);
  626. this.initializationAddData();
  627. });
  628. }
  629. }
  630. })
  631. },
  632. // 删除图片
  633. delImg(index,imgIndex){
  634. this.addForm.checkHazardDtoList[index].uploadDtoList.splice(imgIndex,1);
  635. },
  636. //收起/展开
  637. dataLookButton(item){
  638. item.lookType = !item.lookType
  639. },
  640. //检查结果选中
  641. checkResultChange(val){
  642. if(val == 0){
  643. //不符合时如果没有检查项则写入一条
  644. if(!this.addForm.checkHazardDtoList[0]){
  645. this.addObject();
  646. }
  647. }
  648. },
  649. //新增检查
  650. addObject(){
  651. if(this.addForm.checkHazardDtoList.length<10){
  652. let obj = {
  653. hazardCheckCode:'',
  654. hazardCheckName:'',
  655. hazardCheckPoint:'',
  656. hazardCheckPro:'',
  657. hazardDescribe:'',
  658. hazardLevel:'',
  659. lookType:true,
  660. uploadDtoList:[],
  661. };
  662. this.addForm.checkHazardDtoList.push(obj);
  663. }
  664. },
  665. //新增隐患项
  666. addObjectTow(item){
  667. if(item.checkHazardDtoList.length<10){
  668. let obj = {
  669. checkFlag:0,
  670. hazardCheckCode:'',
  671. hazardCheckName:'',
  672. hazardCheckPoint:'',
  673. hazardCheckPro:'',
  674. hazardDescribe:'',
  675. hazardLevel:'',
  676. lookType:true,
  677. uploadDtoList:[],
  678. };
  679. item.checkHazardDtoList.push(obj);
  680. }
  681. },
  682. //新增检查项
  683. addObjectDevice(item){
  684. let self=this;
  685. this.dialogVisible=true;
  686. //this.$refs.deviceTable.clearSelection()
  687. console.log(self.multipleSelectionArr)
  688. let row={
  689. chName:'一氧化碳',
  690. code:'001',
  691. hazardNum:1,
  692. hazardTypeMode:1,
  693. hazardTypeModeName:'危险品',
  694. id:37
  695. }
  696. setTimeout(function() {
  697. self.$refs.deviceTable.toggleRowSelection(row,true);
  698. },1000)
  699. // self.$nextTick(()=>{
  700. // self.multipleSelectionArr.forEach(row => {
  701. // console.log(row)
  702. // //self.$refs.deviceTable.toggleRowSelection(row,true);
  703. // });
  704. // })
  705. // this.$refs.deviceTable=this.multipleSelectionArr;
  706. //this.dialogVisible=true;
  707. },
  708. //查看图片
  709. lookImg(list,index){
  710. for(let i=0;i<list.length;i++){
  711. list[i].name = list[i].fileName;
  712. list[i].url = list[i].fileUrl;
  713. }
  714. this.$refs.lookImgDialog.lookImgDialogOpen(1,list,index);
  715. },
  716. /*==========上传相关==========*/
  717. handleAvatarSuccess(res,item) {
  718. this.$set(this,'loading',false);
  719. if(item.uploadDtoList.length>4){
  720. this.msgError('最多只可上传5张')
  721. return
  722. }
  723. let suffixName= this.upDataName.split('.')[this.upDataName.split('.').length - 2]
  724. //判断文件名中是否有逗号和分号
  725. if(suffixName.indexOf(',')==-1 && suffixName.indexOf(';')==-1){
  726. }else{
  727. this.msgError('文件名里包含逗号或分号,请修改后重新上传!')
  728. return
  729. }
  730. let obj ={
  731. fileName:this.upDataName,
  732. fileUrl:res.data.url,
  733. fileType:2,
  734. source:2,
  735. };
  736. item.uploadDtoList.push(obj);
  737. this.$forceUpdate()
  738. },
  739. beforeAvatarUpload(file,item) {
  740. if(item.uploadDtoList.length>4){
  741. this.msgError('最多只可上传5张')
  742. return false
  743. }
  744. let type = false;
  745. if (file.type == 'image/png' || file.type == 'image/jpeg' || file.type == 'image/gif' || file.type == 'image/bmp') {
  746. if(file.size> 2100000){
  747. this.msgError('上传图片大小不能超过2M')
  748. return false
  749. }
  750. this.$set(this,'loading',true);
  751. this.upDataName = file.name;
  752. type = true;
  753. }else{
  754. this.msgError('仅支持jpg/png/bmp/gif格式')
  755. type = false;
  756. }
  757. return type;
  758. },
  759. //获取检查项
  760. checkOptionList(){
  761. checkOptionList().then( response => {
  762. this.$set(this,'options',response.data);
  763. this.getCascaderData(this.options);
  764. })
  765. },
  766. //联级选择器数据处理
  767. getCascaderData(list){
  768. let self = this;
  769. if(this.addForm.checkCategory==1){//综合检查
  770. for(let i=0;i<list.length;i++){
  771. list[i].labelName = list[i].code? list[i].code +' '+ list[i].name:list[i].name
  772. if(list[i].level == 0 || list[i].level == 1 || list[i].level == 2){
  773. if(list[i].children){
  774. if(list[i].children[0]){
  775. self.getCascaderData(list[i].children)
  776. if(list[i].children){
  777. if(!list[i].children[0]){
  778. list.splice(i,1)
  779. i--
  780. }
  781. }else{
  782. list.splice(i,1)
  783. i--
  784. }
  785. }else{
  786. list.splice(i,1)
  787. i--
  788. }
  789. }else{
  790. list.splice(i,1)
  791. i--
  792. }
  793. }else{
  794. delete list[i].children
  795. }
  796. }
  797. }else if(this.addForm.checkCategory==2){//专项检查
  798. for(let i=0;i<list.length;i++){
  799. list[i].labelName = list[i].code? list[i].code +' '+ list[i].name:list[i].name
  800. if(list[i].level == 0 || list[i].level == 1 || list[i].level == 2 || list[i].level == 3){
  801. if(list[i].children){
  802. if(list[i].children[0]){
  803. self.getCascaderData(list[i].children)
  804. if(list[i].children){
  805. if(!list[i].children[0]){
  806. list.splice(i,1)
  807. i--
  808. }
  809. }else{
  810. list.splice(i,1)
  811. i--
  812. }
  813. }else{
  814. list.splice(i,1)
  815. i--
  816. }
  817. }else{
  818. list.splice(i,1)
  819. i--
  820. }
  821. }else{
  822. delete list[i].children
  823. }
  824. }
  825. }
  826. },
  827. //获取学院列表
  828. listDepartments(){
  829. listDepartments().then(response => {
  830. this.deptSelectList = response.data;
  831. });
  832. },
  833. //根据学院id查询楼栋列表
  834. buildFloorGetlist(){
  835. buildFloorGetlist({type:2}).then(response => {
  836. this.buildingsSelectList = response.rows;
  837. });
  838. },
  839. //根据楼栋id查询实验室列表
  840. buildBySubList(data,type){
  841. let obj = type == 1?{buildId:data}:{searchValue:data}
  842. buildBySubList(obj).then(response => {
  843. this.subSelectList = response.data;
  844. });
  845. },
  846. //选择学院触发
  847. deptChange(val){
  848. this.$set(this.addForm,'buildId','');
  849. this.$set(this.addForm,'subId','');
  850. this.$set(this,'subSelectList',[]);
  851. this.initializationAddFormData();
  852. this.$set(this,'planType',1);
  853. this.$set(this,'planList',[]);
  854. },
  855. //选择楼栋触发
  856. buildingsChange(val){
  857. this.$set(this,'subId','');
  858. this.$set(this.addForm,'subId','');
  859. this.initializationAddFormData();
  860. this.$set(this,'planType',1);
  861. this.$set(this,'planList',[]);
  862. this.buildBySubList(val,1);
  863. },
  864. //选择实验室触发
  865. subChange(val){
  866. let self = this;
  867. for(let i=0;i<self.subSelectList.length;i++){
  868. if(self.subSelectList[i].id == val){
  869. this.$set(this.addForm,'deptId',self.subSelectList[i].deptId);
  870. this.$set(this.addForm,'buildId',self.subSelectList[i].buildId);
  871. this.getCheckPlanBySubId(val);
  872. this.getHazardListBySub(val);
  873. return
  874. }
  875. }
  876. },
  877. //实验室搜索
  878. getSubList(val){
  879. this.$set(this.addForm,'deptId','');
  880. this.$set(this.addForm,'buildId','');
  881. this.$set(this.addForm,'subId','');
  882. this.$set(this,'subSelectList',[]);
  883. this.initializationAddFormData();
  884. this.$set(this,'planType',1);
  885. this.$set(this,'planList',[]);
  886. this.buildBySubList(val,2);
  887. },
  888. //根据实验室ID查询计划任务
  889. getCheckPlanBySubId(id){
  890. getCheckPlanBySubId({subId:id}).then(response => {
  891. this.initializationAddFormData();
  892. let list = [];
  893. for(let i=0;i<response.data.length;i++){
  894. if(response.data[i].isSelfData == 1){
  895. list.push(response.data[i]);
  896. }
  897. }
  898. this.$set(this,'planType',list[0]?2:1);
  899. this.$set(this,'planList',list);
  900. });
  901. },
  902. //根据实验室ID查询实验室设备
  903. getHazardListBySub(id){
  904. getHazardListBySub({subId:id}).then(response => {
  905. this.deviceTableList=response.data;
  906. });
  907. },
  908. //根据实验室ID查询实验室设备
  909. getHazardInfo(id,hazardIds){
  910. getHazardInfo({subId:id,hazardIds:hazardIds}).then(response => {
  911. this.addForm.checkHazardInfoVoList=response.data
  912. });
  913. },
  914. //计划列表选中
  915. planChange(val){
  916. let self = this;
  917. for(let i=0;i<self.planList.length;i++){
  918. if(self.planList[i].id == val){
  919. self.findCheckManage(self.planList[i].id);
  920. return
  921. }
  922. }
  923. },
  924. //状态切换按钮
  925. planButton(type){
  926. this.initializationAddFormData();
  927. this.$set(this,'planType',type);
  928. if(type == 1){
  929. this.$set(this.addForm,'checkType',2);
  930. this.$set(this,'checkTypeList',[{
  931. key:2,
  932. label:"实验室自查",
  933. }]);
  934. this.pageType=1;
  935. }else if(type == 2){
  936. this.$set(this.addForm,'checkType',null);
  937. this.$set(this,'checkTypeList',[{ key:1, label:"校院巡查", },{ key:2, label:"实验室自查", }]);
  938. }
  939. },
  940. //查询详情
  941. findCheckManage(id){
  942. findCheckManage({id:id}).then(response => {
  943. if(response.data.checkCategory==1){//综合检查
  944. response.data.checkResult = response.data.checkResult === 0 || response.data.checkResult === 1?response.data.checkResult:"";
  945. response.data.rectifyNotice = response.data.rectifyNotice?response.data.rectifyNotice:"";
  946. response.data.rectifyDeadline = response.data.rectifyDeadline?response.data.rectifyDeadline:"";
  947. response.data.dateRange = [response.data.cycleStartTime,response.data.cycleEndTime];
  948. for(let i=0;i<response.data.checkHazardDtoList.length;i++){
  949. response.data.checkHazardDtoList[i].lookType = true;
  950. }
  951. }else if(response.data.checkCategory==2){//专项检查
  952. response.data.rectifyNotice = response.data.rectifyNotice?response.data.rectifyNotice:"";
  953. response.data.rectifyDeadline = response.data.rectifyDeadline?response.data.rectifyDeadline:"";
  954. response.data.dateRange = [response.data.cycleStartTime,response.data.cycleEndTime];
  955. this.pageType=2
  956. }
  957. this.buildBySubList(response.data.buildId,1);
  958. this.$set(this,'addForm',{
  959. id:response.data.id,
  960. checkPlanId:response.data.checkPlanId,
  961. title:response.data.title,
  962. subId:response.data.subId,
  963. buildId:response.data.buildId,
  964. checkResult:response.data.checkResult,
  965. rectifyNotice:response.data.rectifyNotice,
  966. deptId:response.data.deptId,
  967. checkType:response.data.checkType,
  968. checkCategory:response.data.checkCategory+'',
  969. dateRange:response.data.dateRange,
  970. rectifyDeadline:response.data.rectifyDeadline,
  971. checkHazardDtoList:response.data.checkHazardDtoList,
  972. checkHazardInfoVoList:response.data.checkHazardInfoVoList,
  973. });
  974. this.checkOptionList();//获取检查项
  975. });
  976. },
  977. //初始化数据
  978. initializationAddFormData(){
  979. this.$set(this.addForm,'id','');
  980. this.$set(this.addForm,'checkPlanId','');
  981. this.$set(this.addForm,'title','');
  982. this.$set(this.addForm,'checkRange',3);
  983. this.$set(this.addForm,'checkType',2);
  984. this.$set(this.addForm,'dateRange',[]);
  985. this.$set(this.addForm,'checkResult','');
  986. this.$set(this.addForm,'rectifyNotice','');
  987. this.$set(this.addForm,'rectifyDeadline','');
  988. this.$set(this.addForm,'checkHazardDtoList',[]);
  989. },
  990. initializationAddData(){
  991. this.$set(this,'addForm',{
  992. checkRange:3,
  993. id:"",
  994. checkPlanId:"",
  995. subId:"",
  996. buildId:"",
  997. deptId:"",
  998. title:"",
  999. checkResult:"",
  1000. rectifyNotice:"",
  1001. checkType:2,
  1002. dateRange:[],
  1003. rectifyDeadline:"",
  1004. checkHazardDtoList:[],
  1005. });
  1006. this.$set(this,'planType',1);
  1007. this.$set(this,'planList',[]);
  1008. },
  1009. //删除检查项
  1010. delCheckHazardDtoList(index){
  1011. let self = this;
  1012. this.$confirm('是否确认删除?', "警告", {
  1013. confirmButtonText: "确定",
  1014. cancelButtonText: "取消",
  1015. type: "warning"
  1016. }).then(function() {
  1017. if(self.addForm.checkCategory==1){//综合检查
  1018. self.addForm.checkHazardDtoList.splice(index,1);
  1019. }else if(self.addForm.checkCategory==2){//专项检查
  1020. self.addForm.specialCheckHazardDtoList.splice(index,1);
  1021. }
  1022. }).then(() => {
  1023. }).catch(() => {});
  1024. },
  1025. //检查项选中
  1026. cascaderChange(val,item,index){
  1027. let obj = this.getCascaderDataQuery(val,this.options);
  1028. if(this.addForm.checkCategory==1){//综合检查
  1029. if(!obj){
  1030. this.$set(this.addForm.checkHazardDtoList[index],'hazardCheckPro','');
  1031. this.msgError('未找到相关项目')
  1032. return
  1033. }
  1034. this.$set(this.addForm.checkHazardDtoList[index],'hazardCheckCode',obj.code);
  1035. this.$set(this.addForm.checkHazardDtoList[index],'hazardCheckName',obj.name);
  1036. this.$set(this.addForm.checkHazardDtoList[index],'hazardCheckPoint',obj.mainPoint);
  1037. countHazardNum({subId:this.addForm.subId, hazardCheckPro:val}).then( response => {
  1038. this.$set(this,'hazardCheckCount',response.data);
  1039. })
  1040. }else if(this.addForm.checkCategory==2){//专项检查
  1041. if(!obj){
  1042. this.$set(this.addForm.checkHazardInfoVoList[index],'hazardCheckPro','');
  1043. this.msgError('未找到相关项目')
  1044. return
  1045. }
  1046. item.hazardCheckCode=obj.code;
  1047. item.hazardCheckName=obj.name;
  1048. countHazardNum({subId:this.addForm.subId, hazardCheckPro:val}).then( response => {
  1049. this.$set(this,'hazardCheckCount',response.data);
  1050. })
  1051. }
  1052. },
  1053. /*==========专项检查==========*/
  1054. //联级选择器数据查询
  1055. getCascaderDataQuery(text,list){
  1056. let self = this;
  1057. for(let i=0;i<list.length;i++){
  1058. if(list[i].id == text){
  1059. return list[i]
  1060. }else{
  1061. if(list[i].children){
  1062. let obj = self.getCascaderDataQuery(text,list[i].children)
  1063. if(obj){
  1064. return obj
  1065. }
  1066. }
  1067. }
  1068. }
  1069. },
  1070. }
  1071. }
  1072. </script>
  1073. <style scoped lang="scss">
  1074. .startInspection{
  1075. flex: 1;
  1076. display: flex !important;
  1077. flex-direction: column;
  1078. overflow: hidden;
  1079. *{
  1080. font-weight:500;
  1081. }
  1082. img{
  1083. user-drag: none;
  1084. }
  1085. ::v-deep .el-range-editor--small .el-range-separator{
  1086. line-height:32px;
  1087. }
  1088. .dept-table-max-box{
  1089. padding: 0 20px;
  1090. box-sizing: border-box;
  1091. .device-tip{
  1092. font-size: 16px;
  1093. font-family: Microsoft YaHei-Regular, Microsoft YaHei;
  1094. font-weight: 400;
  1095. color: #333333;
  1096. line-height: 16px;
  1097. margin-bottom: 20px;
  1098. }
  1099. }
  1100. .start_btn{
  1101. font-size: 16px;
  1102. font-family: Microsoft YaHei-Regular, Microsoft YaHei;
  1103. font-weight: 400;
  1104. color: #0183FA;
  1105. line-height: 40px;
  1106. text-align: center;
  1107. width: 500px;
  1108. height: 40px;
  1109. border-radius: 4px 4px 4px 4px;
  1110. opacity: 1;
  1111. border: 1px dotted #0183FA;
  1112. margin:40px auto;
  1113. }
  1114. .title-max-box{
  1115. position: relative;
  1116. height:90px;
  1117. display: flex;
  1118. border-bottom:1px solid #dedede;
  1119. .title-p{
  1120. flex:1;
  1121. color:#0045AF;
  1122. margin-left:64px;
  1123. line-height:90px;
  1124. font-size:16px;
  1125. }
  1126. .title-button{
  1127. width:70px;
  1128. margin:24px 31px;
  1129. }
  1130. .position-img{
  1131. width:80px;
  1132. height:80px;
  1133. position: absolute;
  1134. top:0;
  1135. left:0;
  1136. }
  1137. }
  1138. .content-max-box{
  1139. flex:1;
  1140. display: flex;
  1141. flex-direction: column;
  1142. .top-form-box{
  1143. padding:40px 85px 20px;
  1144. display: flex;
  1145. .top-form-left-box{
  1146. flex:1;
  1147. height:310px;
  1148. }
  1149. .top-form-right-box{
  1150. height:310px;
  1151. }
  1152. }
  1153. .bottom-form-box{
  1154. .bottom-form-title-box{
  1155. background: #F5F5F5;
  1156. display: flex;
  1157. margin-bottom:31px;
  1158. p{
  1159. font-size:16px;
  1160. line-height:50px;
  1161. }
  1162. p:nth-child(1){
  1163. color:#333;
  1164. margin-left:30px;
  1165. flex:1;
  1166. }
  1167. p:nth-child(2){
  1168. color:#0183FA;
  1169. margin-right:37px;
  1170. }
  1171. }
  1172. .add-bottom-button{
  1173. cursor: pointer;
  1174. color:#0183FA;
  1175. border-radius:4px;
  1176. border:1px dashed #0183FA;
  1177. width:800px;
  1178. line-height:40px;
  1179. text-align: center;
  1180. font-size:14px;
  1181. margin: 20px auto;
  1182. }
  1183. }
  1184. }
  1185. .for-max-big-box{
  1186. border:1px solid #dedede;
  1187. overflow: hidden;
  1188. margin:0 81px;
  1189. .for-title-box{
  1190. display: flex;
  1191. background: #F5F5F5;
  1192. border-bottom:1px solid #dedede;
  1193. line-height:50px;
  1194. .for-title-p{
  1195. color:#333333;
  1196. font-size:16px;
  1197. margin-left: 30px;
  1198. flex:1;
  1199. }
  1200. .for-del-box{
  1201. color:#0183FA;
  1202. margin-left:46px;
  1203. cursor: pointer;
  1204. display: flex;
  1205. p{
  1206. font-size:14px;
  1207. line-height:50px;
  1208. margin-right:8px;
  1209. }
  1210. }
  1211. .for-button-box{
  1212. color:#0183FA;
  1213. margin-left:46px;
  1214. margin-right:43px;
  1215. cursor: pointer;
  1216. display: flex;
  1217. p{
  1218. font-size:14px;
  1219. line-height:50px;
  1220. margin-right:8px;
  1221. }
  1222. }
  1223. }
  1224. .for-big-box{
  1225. padding-top:27px;
  1226. .up-img-p{
  1227. height:80px;
  1228. width:80px;
  1229. line-height:80px;
  1230. text-align: center;
  1231. font-size:16px;
  1232. border-radius:4px;
  1233. border:1px dashed #E0E0E0;
  1234. }
  1235. .for-img-box{
  1236. width:80px;
  1237. height:80px;
  1238. border-radius:4px;
  1239. display: inline-block;
  1240. overflow: hidden;
  1241. margin-right:20px;
  1242. position: relative;
  1243. .for-img{
  1244. width:80px;
  1245. height:80px;
  1246. display: inline-block;
  1247. overflow: hidden;
  1248. }
  1249. .for-del-button{
  1250. background: rgba(0,0,0,0.7);
  1251. width:20px;
  1252. height:20px;
  1253. line-height: 20px;
  1254. text-align: center;
  1255. color:#fff;
  1256. border-bottom-left-radius:4px;
  1257. cursor: pointer;
  1258. position: absolute;
  1259. top:0;
  1260. right:0;
  1261. }
  1262. }
  1263. .hazard-check-count-p{
  1264. display: inline-block;
  1265. margin-left: 20px;
  1266. font-size: 14px;
  1267. line-height: 40px;
  1268. span{
  1269. color:#FF0000;
  1270. }
  1271. }
  1272. }
  1273. }
  1274. /*专项检查*/
  1275. .for-max-big-box-special{
  1276. margin-bottom: 20px;
  1277. .for-big-box-special{
  1278. border-bottom: 1px dotted #D8D8D8;
  1279. margin:30px;
  1280. display: flex;
  1281. justify-content: flex-start;
  1282. .for-big-box-special-l{
  1283. width: 30px;
  1284. height: 30px;
  1285. background: #0183FA;
  1286. border-radius: 6px 6px 6px 6px;
  1287. font-size: 16px;
  1288. font-family: Microsoft YaHei-Regular, Microsoft YaHei;
  1289. font-weight: 400;
  1290. color: #FFFFFF;
  1291. line-height: 30px;
  1292. text-align: center;
  1293. }
  1294. .for-big-box-special-r{}
  1295. }
  1296. .for-big-box-special:last-of-type{
  1297. border-bottom: none;
  1298. }
  1299. }
  1300. .bottom-button-max-box{
  1301. height:80px;
  1302. display: flex;
  1303. border-top:1px solid #dedede;
  1304. p{
  1305. margin-top:20px;
  1306. }
  1307. .null-p{
  1308. flex:1;
  1309. }
  1310. p:nth-child(2){
  1311. width:90px;
  1312. margin-right:20px;
  1313. }
  1314. p:nth-child(3){
  1315. width:90px;
  1316. margin-right:20px;
  1317. }
  1318. p:nth-child(4){
  1319. width:90px;
  1320. margin-right:20px;
  1321. }
  1322. }
  1323. }
  1324. </style>