addDialog.vue 90 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470
  1. <template>
  2. <el-dialog class="inspectionPlan-dialog-box"
  3. :close-on-click-modal="false"
  4. v-loading="loading"
  5. :title="addDialogTitle" :visible.sync="addDialogType" v-if="addDialogType"
  6. @close="addDialogAllOff" width="1303px" append-to-body>
  7. <div class="inspectionPlan-dialog-add-box" v-show="addDialogBoxType==1">
  8. <div class="left-max-box" v-if="!lookInfoType">
  9. <div class="left-max-title-box">
  10. <img src="@/assets/ZDimages/safetyCheck/icon_jhbt.png">
  11. <p>计划标题快选</p>
  12. </div>
  13. <div class="left-max-list-box scrollbar-box">
  14. <div v-for="(item,index) in quickSelectionList" :key="index" @click="checkTitle(item)">
  15. <p class="left-max-list-for-p">{{item.title}}</p>
  16. <p v-if="item.type" class="el-icon-error left-max-list-for-icon" @click="delTitleObj(item)"></p>
  17. </div>
  18. </div>
  19. </div>
  20. <div class="right-max-box scrollbar-box">
  21. <el-form ref="addDialogForm" :model="dialogForm" :rules="rules" label-width="140px">
  22. <el-form-item label="计划标题:" prop="title">
  23. <el-input :disabled="lookInfoType" v-model="dialogForm.title" placeholder="请输入计划标题" maxLength="30" style="width:450px;"/>
  24. </el-form-item>
  25. <el-form-item label="检查组织:">
  26. <p style="width:450px;background:#f5f5f5;border-radius:4px;padding:0 15px;">校院巡查</p>
  27. </el-form-item>
  28. <el-form-item label="计划周期:" prop="dateRange">
  29. <div class="date-range-box">
  30. <div class="date-range-left-box">
  31. <el-date-picker
  32. :disabled="lookInfoType"
  33. :clearable="false"
  34. v-model="dialogForm.dateRange"
  35. style="width:450px;"
  36. value-format="yyyy-MM-dd"
  37. type="daterange"
  38. range-separator="-"
  39. :picker-options="pickerOptions"
  40. start-placeholder="开始日期"
  41. end-placeholder="结束日期"
  42. ></el-date-picker>
  43. </div>
  44. <div class="date-range-right-box" v-if="!lookInfoType">
  45. <p @click="checkTime(1)">本月</p>
  46. <p @click="checkTime(2)">本季度</p>
  47. <p @click="checkTime(3)">全年</p>
  48. </div>
  49. </div>
  50. </el-form-item>
  51. <el-form-item label="检查范围:" prop="checkRange">
  52. <div class="dialog-range-max-box">
  53. <div class="dialog-range-select-box">
  54. <el-select :disabled="lookInfoType" @change="rangeChange"
  55. v-model="dialogForm.checkRange" placeholder="请选择检查范围" style="width:450px;">
  56. <el-option
  57. v-for="item in dialogRangeOptions"
  58. :key="item.value"
  59. :label="item.label"
  60. :value="item.value">
  61. </el-option>
  62. </el-select>
  63. </div>
  64. <div class="dialog-range-text-box">
  65. <p class="inquire-button-one button-p" :style="lookInfoType?'background:#0183FA;border:1px solid #0183FA;':''" v-if="dialogForm.checkRange == 2" @click="dialogClickType(2)">{{lookInfoType?'查看':'选择学院'}}</p>
  66. <p class="inquire-button-one button-p" :style="lookInfoType?'background:#0183FA;border:1px solid #0183FA;':''" v-if="dialogForm.checkRange == 3" @click="dialogClickType(3)">{{lookInfoType?'查看':'选择实验室'}}</p>
  67. <p class="text-p" v-if="dialogForm.checkRange ==1 && dialogForm.schoolSubCheckNum>0">已选择{{dialogForm.schoolSubCheckNum}}间实验室</p>
  68. <p class="text-p" v-if="dialogForm.checkRange == 2 && dialogForm.collegeNum>0">已选择{{dialogForm.collegeNum}}个学院,共{{dialogForm.collegeSubNum}}间实验室</p>
  69. <p class="text-p" v-if="dialogForm.checkRange ==3 && dialogForm.subCheckNum>0">已选择{{dialogForm.subCheckNum}}间实验室</p>
  70. </div>
  71. </div>
  72. </el-form-item>
  73. <el-form-item label="检查类型:" prop="inspectCategory">
  74. <div class="dialog-range-max-box">
  75. <div class="dialog-range-select-box">
  76. <el-select :disabled="lookInfoType" @change="inspectCategoryChange"
  77. v-model="dialogForm.checkCategory" placeholder="请选择检查类型" style="width:450px;">
  78. <el-option
  79. v-for="item in inspectCategoryList"
  80. :key="item.id"
  81. :label="item.name"
  82. :value="item.id">
  83. </el-option>
  84. </el-select>
  85. </div>
  86. <div class="dialog-range-text-box" v-if="dialogForm.checkCategory==2">
  87. <p class="inquire-button-one button-p" @click="dialogClickType(6)">选择检查内容</p>
  88. <p class="text-p">已选择{{dialogForm.hazardNum}}种</p>
  89. </div>
  90. </div>
  91. </el-form-item>
  92. <el-form-item label="检查要求:" prop="checkDemand">
  93. <el-input
  94. :disabled="lookInfoType"
  95. type="textarea"
  96. :autosize="{ minRows: 4, maxRows: 4}"
  97. :placeholder="lookInfoType?'未输入':'请输入检查要求'"
  98. v-model="dialogForm.checkDemand"
  99. maxlength="100"
  100. resize="none"
  101. show-word-limit
  102. :style="!lookInfoType?'width:450px;':'width:1040px;'">
  103. </el-input>
  104. </el-form-item>
  105. <el-form-item label="材料附件:">
  106. <div class="dialog-material-max-box">
  107. <div class="dialog-material-button-box" v-if="!lookInfoType&&dialogForm.uploadDtoList.length<10">
  108. <el-upload
  109. class="avatar-uploader"
  110. :action="uploadImgUrl"
  111. :show-file-list="false"
  112. :on-success="(res)=>handleAvatarSuccess(res)"
  113. :headers="headers"
  114. :before-upload="beforeAvatarUpload">
  115. <p class="add-button-one-120">+ 选择文件</p>
  116. </el-upload>
  117. <p class="dialog-material-text">支持doc/docx/xls/xlsx/pdf格式文件</p>
  118. </div>
  119. <div class="dialog-material-list-box">
  120. <div v-for="(item,index) in dialogForm.uploadDtoList" :key="index">
  121. <img src="@/assets/ZDimages/safetyCheck/icon_dr_wj.png">
  122. <p>{{item.fileName}}</p>
  123. <p @click="dialogClickType(5,item)">查看</p>
  124. <p @click="delUpData(index)" v-if="!lookInfoType">删除</p>
  125. <p v-if="lookInfoType" @click="downloadButton(item)">下载</p>
  126. </div>
  127. <p class="dialog-material-list-null" v-if="!dialogForm.uploadDtoList[0]">未上传</p>
  128. </div>
  129. </div>
  130. </el-form-item>
  131. <el-form-item label="巡查组:">
  132. <div class="dialog-table-max-box" :class="lookInfoType?'dialog-table-max-box-look':''">
  133. <div v-if="!lookInfoType">
  134. <el-select v-model="groupData" placeholder="请选择" @change="groupChange">
  135. <el-option
  136. v-for="item in dialogOptions"
  137. :key="item.id"
  138. :label="item.groupName"
  139. :value="item.id">
  140. </el-option>
  141. </el-select>
  142. </div>
  143. <div class="dialog-table-box">
  144. <div class="dialog-table-title-box">
  145. <img src="@/assets/ZDimages/safetyCheck/icon_xyxc_cy.png">
  146. <p class="dialog-table-title-p">巡查成员</p>
  147. <p v-if="!lookInfoType" class="inquire-button-one dialog-table-title-button" @click="dialogClickType(4)">+ 添加</p>
  148. </div>
  149. <el-table border :data="dialogTableList">
  150. <el-table-column label="序号" align="center" type="index" width="140"/>
  151. <el-table-column label="工号" align="center" prop="jobNum" show-overflow-tooltip/>
  152. <el-table-column label="姓名" align="center" prop="name" show-overflow-tooltip width="150"/>
  153. <el-table-column label="所在部门" align="center" prop="deptName" show-overflow-tooltip width="150"/>
  154. <el-table-column label="操作" align="center" prop="deptName" width="150" v-if="!lookInfoType">
  155. <template slot-scope="scope">
  156. <div class="table-button-box">
  157. <p class="table-button-null"></p>
  158. <p class="table-button-p" @click="delTable(scope.row)">删除</p>
  159. <p class="table-button-null"></p>
  160. </div>
  161. </template>
  162. </el-table-column>
  163. </el-table>
  164. </div>
  165. </div>
  166. </el-form-item>
  167. </el-form>
  168. </div>
  169. </div>
  170. <div class="inspectionPlan-dialog-dept-box" v-show="addDialogBoxType==2">
  171. <div class="left-max-box">
  172. <div class="dept-table-title-box">
  173. <p>已选学院</p>
  174. <p v-if="!lookInfoType">{{deptNumLeft}}/{{deptTotalLeft}}</p>
  175. <p v-if="lookInfoType">{{deptNumLeft}}</p>
  176. </div>
  177. <div class="dept-table-max-box">
  178. <el-form :model="deptQueryParamsLeft" class="form-box" ref="queryForm" :inline="true" label-width="50px">
  179. <el-form-item label="" prop="searchValue" class="form-index">
  180. <el-input
  181. maxLength="30"
  182. v-model="deptQueryParamsLeft.searchValue"
  183. placeholder="搜索学院"
  184. clearable
  185. style="width: 240px">
  186. <p v-if="!lookInfoType" class="el-icon-search" slot="append" @click="deptGetListLeft"></p>
  187. <p v-if="lookInfoType" class="el-icon-search" slot="append" @click="lookDeptLeftSearch"></p>
  188. </el-input>
  189. </el-form-item>
  190. <el-form-item style="margin-right:0;">
  191. <p v-if="!lookInfoType" class="inquire-button-one" @click="deptResetQueryLeft" style="width:60px;margin-right:0;">重置</p>
  192. <p v-if="lookInfoType" class="inquire-button-one" @click="lookDeptLeftReset" style="width:60px;margin-right:0;">重置</p>
  193. </el-form-item>
  194. </el-form>
  195. <el-table ref="leftDeptTable" border :data="deptTableListLeft" @select-all="deptChange" @select="deptChange" :row-key="getDeptRowKeys">
  196. <el-table-column v-if="!lookInfoType" type="selection" width="50" :reserve-selection="true" align="center"/>
  197. <el-table-column label="学院" align="center" prop="deptName" show-overflow-tooltip>
  198. <template slot-scope="scope">
  199. <div style="display: flex;">
  200. <p style="flex:1;">{{scope.row.deptName}}</p>
  201. <p style="width:80px;text-align: center">共{{scope.row.subNum}}间</p>
  202. </div>
  203. </template>
  204. </el-table-column>
  205. </el-table>
  206. </div>
  207. </div>
  208. <div class="right-max-box">
  209. <div class="dept-table-title-box">
  210. <p>已选实验室{{deptCheckData.subNum}}间</p>
  211. <p></p>
  212. </div>
  213. <div class="dept-table-max-box">
  214. <el-form :model="deptQueryParamsRight" class="form-box" ref="queryForm" :inline="true" label-width="50px">
  215. <el-form-item label="" prop="typeId">
  216. <el-select v-model="deptQueryParamsRight.typeId" clearable placeholder="选择分类" style="width: 120px">
  217. <el-option
  218. v-for="item in classTypeList"
  219. :key="item.id"
  220. :label="item.typeName"
  221. :value="item.id">
  222. </el-option>
  223. </el-select>
  224. </el-form-item>
  225. <el-form-item label="" prop="level">
  226. <el-select v-model="deptQueryParamsRight.level" clearable placeholder="选择分级" style="width: 120px">
  227. <el-option
  228. v-for="item in classifiedList"
  229. :key="item.id"
  230. :label="item.classifiedName"
  231. :value="item.id">
  232. </el-option>
  233. </el-select>
  234. </el-form-item>
  235. <el-form-item label="" prop="deptId">
  236. <el-select v-model="deptQueryParamsRight.deptId" clearable placeholder="选择学院" style="width: 120px">
  237. <el-option
  238. v-for="item in changeDeptSelectList"
  239. :key="item.deptId"
  240. :label="item.deptName"
  241. :value="item.deptId">
  242. </el-option>
  243. </el-select>
  244. </el-form-item>
  245. <el-form-item label="" prop="searchValue" class="form-index">
  246. <el-input
  247. maxLength="30"
  248. v-model="deptQueryParamsRight.searchValue"
  249. placeholder="实验室/房间号"
  250. clearable
  251. style="width: 190px">
  252. <p v-if="!lookInfoType" class="el-icon-search" slot="append" @click="deptHandleQueryRight"></p>
  253. <p v-if="lookInfoType" class="el-icon-search" slot="append" @click="lookDeptRightSearch"></p>
  254. </el-input>
  255. </el-form-item>
  256. <el-form-item style="margin-right:0;">
  257. <p v-if="!lookInfoType" class="inquire-button-one" @click="deptResetQueryRight" style="width:60px;margin-right:0;">重置</p>
  258. <p v-if="lookInfoType" class="inquire-button-one" @click="lookDeptRightReset" style="width:60px;margin-right:0;">重置</p>
  259. </el-form-item>
  260. </el-form>
  261. <el-table border :data="deptTableListRight">
  262. <el-table-column label="序号" align="center" type="index" width="60"/>
  263. <el-table-column label="实验室" align="center" prop="subjectName" show-overflow-tooltip>
  264. <template slot-scope="scope">{{scope.row.roomNumber?scope.row.subjectName+'-'+scope.row.roomNumber:scope.row.subjectName}}</template>
  265. </el-table-column>
  266. <el-table-column label="楼栋楼层" align="center" prop="buildName" show-overflow-tooltip width="150"/>
  267. <el-table-column label="分类分级" align="center" prop="deptName" show-overflow-tooltip width="150">
  268. <template slot-scope="scope">
  269. <span v-for="item in classTypeList" v-if="item.id == scope.row.typeId">{{item.typeName}}</span>
  270. <span style="border-right:1px solid #E0E0E0;margin:0 10px;"></span>
  271. <span v-for="item in classifiedList" v-if="item.id == scope.row.level" :style="'color:'+item.classifiedColor+';'">{{item.classifiedName}}</span>
  272. </template>
  273. </el-table-column>
  274. <el-table-column label="学院" align="center" prop="collegeName" show-overflow-tooltip width="140"/>
  275. </el-table>
  276. <pagination layout="total, prev, pager, next, jumper"
  277. v-show="deptTotalRight>0"
  278. :total="deptTotalRight"
  279. :page.sync="deptQueryParamsRight.pageNum"
  280. :limit.sync="deptQueryParamsRight.pageSize"
  281. @pagination="deptGetListRight"
  282. />
  283. </div>
  284. </div>
  285. </div>
  286. <div class="inspectionPlan-dialog-sub-box" v-show="addDialogBoxType==3">
  287. <div v-if="!lookInfoType" class="left-max-box">
  288. <div class="dept-table-title-box">
  289. <p>待选实验室</p>
  290. <p>{{subNumLeft}}/{{subTotalLeft}}</p>
  291. </div>
  292. <div class="dept-table-max-box">
  293. <el-form :model="subQueryParamsLeft" class="form-box" ref="queryForm" :inline="true" label-width="50px">
  294. <el-form-item label="" prop="typeId">
  295. <el-select v-model="subQueryParamsLeft.typeId" clearable placeholder="选择分类" style="width: 110px">
  296. <el-option
  297. v-for="item in classTypeList"
  298. :key="item.id"
  299. :label="item.typeName"
  300. :value="item.id">
  301. </el-option>
  302. </el-select>
  303. </el-form-item>
  304. <el-form-item label="" prop="level">
  305. <el-select v-model="subQueryParamsLeft.level" clearable placeholder="选择分级" style="width: 110px">
  306. <el-option
  307. v-for="item in classifiedList"
  308. :key="item.id"
  309. :label="item.classifiedName"
  310. :value="item.id">
  311. </el-option>
  312. </el-select>
  313. </el-form-item>
  314. <el-form-item label="" prop="deptId">
  315. <el-select v-model="subQueryParamsLeft.deptId" clearable placeholder="学院" style="width: 80px">
  316. <el-option
  317. v-for="item in deptSelectList"
  318. :key="item.deptId"
  319. :label="item.deptName"
  320. :value="item.deptId">
  321. </el-option>
  322. </el-select>
  323. </el-form-item>
  324. <el-form-item label="" prop="searchValue" class="form-index">
  325. <el-input
  326. maxLength="30"
  327. v-model="subQueryParamsLeft.searchValue"
  328. placeholder="实验室/房间号"
  329. clearable
  330. style="width: 140px">
  331. <p class="el-icon-search" slot="append" @click="subHandleQueryLeft"></p>
  332. </el-input>
  333. </el-form-item>
  334. <el-form-item style="margin-right:0;">
  335. <p class="inquire-button-one" @click="subResetQueryLeft" style="width:60px;margin-right:0;">重置</p>
  336. </el-form-item>
  337. </el-form>
  338. <el-table ref="leftSubTable" border :data="subTableListLeft" @selection-change="subChangeLeft" :row-key="getSubRowKeys">
  339. <el-table-column type="selection" width="50" :reserve-selection="true" align="center"/>
  340. <el-table-column label="实验室" align="center" prop="subjectName" show-overflow-tooltip>
  341. <template slot-scope="scope">{{scope.row.roomNumber?scope.row.subjectName+'-'+scope.row.roomNumber:scope.row.subjectName}}</template>
  342. </el-table-column>
  343. <el-table-column label="分类分级" align="center" prop="deptName" show-overflow-tooltip width="140">
  344. <template slot-scope="scope">
  345. <span v-for="item in classTypeList" v-if="item.id == scope.row.typeId">{{item.typeName}}</span>
  346. <span style="border-right:1px solid #E0E0E0;margin:0 10px;"></span>
  347. <span v-for="item in classifiedList" v-if="item.id == scope.row.level" :style="'color:'+item.classifiedColor+';'">{{item.classifiedName}}</span>
  348. </template>
  349. </el-table-column>
  350. <el-table-column label="学院" align="center" prop="collegeName" show-overflow-tooltip width="150"/>
  351. </el-table>
  352. <pagination layout="total, prev, pager, next, jumper"
  353. v-show="subTotalLeft>0"
  354. :total="subTotalLeft"
  355. :page.sync="subQueryParamsLeft.pageNum"
  356. :limit.sync="subQueryParamsLeft.pageSize"
  357. @pagination="subGetListLeft"/>
  358. </div>
  359. </div>
  360. <div v-if="!lookInfoType" class="center-box">
  361. <p class="el-icon-arrow-left" @click="subArrowButton(1)"></p>
  362. <p class="el-icon-arrow-right" @click="subArrowButton(2)"></p>
  363. </div>
  364. <div class="right-max-box">
  365. <div class="dept-table-title-box">
  366. <p>已选实验室</p>
  367. <p v-if="!lookInfoType">{{subNumRight}}/{{subTotalRight}}</p>
  368. <p v-if="lookInfoType">{{subTotalRight}}</p>
  369. </div>
  370. <div class="dept-table-max-box">
  371. <el-form :model="subQueryParamsRight" class="form-box" ref="queryForm" :inline="true" label-width="50px">
  372. <el-form-item label="" prop="typeId">
  373. <el-select v-model="subQueryParamsRight.typeId" clearable placeholder="选择分类" :style="!lookInfoType?'width:110px':'width:140px'">
  374. <el-option
  375. v-for="item in classTypeList"
  376. :key="item.id"
  377. :label="item.typeName"
  378. :value="item.id">
  379. </el-option>
  380. </el-select>
  381. </el-form-item>
  382. <el-form-item label="" prop="level">
  383. <el-select v-model="subQueryParamsRight.level" clearable placeholder="选择分级" :style="!lookInfoType?'width:110px':'width:140px'">
  384. <el-option
  385. v-for="item in classifiedList"
  386. :key="item.id"
  387. :label="item.classifiedName"
  388. :value="item.id">
  389. </el-option>
  390. </el-select>
  391. </el-form-item>
  392. <el-form-item label="" prop="deptId">
  393. <el-select v-model="subQueryParamsRight.deptId" clearable placeholder="学院" :style="!lookInfoType?'width:80px':'width:180px'">
  394. <el-option
  395. v-for="item in deptSelectList"
  396. :key="item.deptId"
  397. :label="item.deptName"
  398. :value="item.deptId">
  399. </el-option>
  400. </el-select>
  401. </el-form-item>
  402. <el-form-item label="" prop="searchValue" class="form-index">
  403. <el-input
  404. maxLength="30"
  405. v-model="subQueryParamsRight.searchValue"
  406. placeholder="实验室/房间号"
  407. clearable
  408. :style="!lookInfoType?'width:140px':'width:180px'">
  409. <p class="el-icon-search" slot="append" @click="subHandleQueryRight"></p>
  410. </el-input>
  411. </el-form-item>
  412. <el-form-item style="margin-right:0;">
  413. <p class="inquire-button-one" @click="subResetQueryRight" style="width:60px;margin-right:0;">重置</p>
  414. </el-form-item>
  415. </el-form>
  416. <el-table ref="rightSubTable" border :data="subTableListRight" @selection-change="subChangeRight" :row-key="getSubRowKeys">
  417. <el-table-column v-if="!lookInfoType" type="selection" width="50" :reserve-selection="true" align="center"/>
  418. <el-table-column label="实验室" align="center" prop="subjectName" show-overflow-tooltip>
  419. <template slot-scope="scope">{{scope.row.roomNumber?scope.row.subjectName+'-'+scope.row.roomNumber:scope.row.subjectName}}</template>
  420. </el-table-column>
  421. <el-table-column label="分类分级" align="center" prop="deptName" show-overflow-tooltip width="140">
  422. <template slot-scope="scope">
  423. <span v-for="item in classTypeList" v-if="item.id == scope.row.typeId">{{item.typeName}}</span>
  424. <span style="border-right:1px solid #E0E0E0;margin:0 10px;"></span>
  425. <span v-for="item in classifiedList" v-if="item.id == scope.row.level" :style="'color:'+item.classifiedColor+';'">{{item.classifiedName}}</span>
  426. </template>
  427. </el-table-column>
  428. <el-table-column label="学院" align="center" prop="collegeName" show-overflow-tooltip width="150"/>
  429. </el-table>
  430. <pagination layout="total, prev, pager, next, jumper"
  431. v-show="subTotalRight>0"
  432. :total="subTotalRight"
  433. :page.sync="subQueryParamsRight.pageNum"
  434. :limit.sync="subQueryParamsRight.pageSize"
  435. @pagination="subGetListRight"/>
  436. </div>
  437. </div>
  438. </div>
  439. <div class="inspectionPlan-dialog-user-box" v-show="addDialogBoxType==4">
  440. <div class="left-max-box">
  441. <div class="dept-table-title-box">
  442. <p>待选人员</p>
  443. <p>{{userNumLeft}}/{{userTotalLeft}}</p>
  444. </div>
  445. <div class="dept-table-max-box">
  446. <el-form :model="userQueryParamsLeft" class="form-box" ref="queryForm" :inline="true" label-width="50px">
  447. <el-form-item label="" prop="deptId">
  448. <el-select v-model="userQueryParamsLeft.deptId" clearable placeholder="选择部门" style="width: 110px">
  449. <el-option
  450. v-for="item in deptSelectList"
  451. :key="item.deptId"
  452. :label="item.deptName"
  453. :value="item.deptId">
  454. </el-option>
  455. </el-select>
  456. </el-form-item>
  457. <el-form-item label="" prop="searchValue" class="form-index">
  458. <el-input
  459. maxLength="20"
  460. v-model="userQueryParamsLeft.searchValue"
  461. placeholder="搜索姓名/工号"
  462. clearable
  463. style="width: 240px">
  464. <p class="el-icon-search" slot="append" @click="userHandleQueryLeft"></p>
  465. </el-input>
  466. </el-form-item>
  467. <el-form-item style="margin-right:0;">
  468. <p class="reset-button-one" @click="userResetQueryLeft" style="width:60px;">重置</p>
  469. </el-form-item>
  470. </el-form>
  471. <el-table ref="leftUserTable" border :data="userTableListLeft" @selection-change="userChangeLeft" :row-key="getRowKeys">
  472. <el-table-column type="selection" width="50" :reserve-selection="true" align="center"/>
  473. <el-table-column label="姓名" align="center" prop="nickName" show-overflow-tooltip/>
  474. <el-table-column label="工号" align="center" prop="userName" show-overflow-tooltip width="150"/>
  475. <el-table-column label="所在部门" align="center" prop="deptName" show-overflow-tooltip width="168"/>
  476. </el-table>
  477. <pagination layout="total, prev, pager, next, jumper"
  478. v-show="userTotalLeft>0"
  479. :total="userTotalLeft"
  480. :pager-count="5"
  481. :page.sync="userQueryParamsLeft.pageNum"
  482. :limit.sync="userQueryParamsLeft.pageSize"
  483. @pagination="userGetListLeft"/>
  484. </div>
  485. </div>
  486. <div class="center-box">
  487. <p class="el-icon-arrow-left" @click="userArrowButton(1)"></p>
  488. <p class="el-icon-arrow-right" @click="userArrowButton(2)"></p>
  489. </div>
  490. <div class="right-max-box">
  491. <div class="dept-table-title-box">
  492. <p>已选成员</p>
  493. <p>{{userNumRight}}/{{userTotalRight}}</p>
  494. </div>
  495. <div class="dept-table-max-box">
  496. <el-form :model="userQueryParamsRight" class="form-box" ref="queryForm" :inline="true" label-width="50px">
  497. <el-form-item label="" prop="deptId">
  498. <el-select v-model="userQueryParamsRight.deptId" clearable placeholder="选择部门" style="width: 110px">
  499. <el-option
  500. v-for="item in deptSelectList"
  501. :key="item.deptId"
  502. :label="item.deptName"
  503. :value="item.deptId">
  504. </el-option>
  505. </el-select>
  506. </el-form-item>
  507. <el-form-item label="" prop="searchValue" class="form-index">
  508. <el-input
  509. maxLength="20"
  510. v-model="userQueryParamsRight.searchValue"
  511. placeholder="搜索姓名/工号"
  512. clearable
  513. style="width: 240px">
  514. <p class="el-icon-search" slot="append" @click="userHandleQueryRight"></p>
  515. </el-input>
  516. </el-form-item>
  517. <el-form-item style="margin-right:0;">
  518. <p class="reset-button-one" @click="userResetQueryRight" style="width:60px;">重置</p>
  519. </el-form-item>
  520. </el-form>
  521. <el-table ref="rightUserTable" border :data="userTableListRight" @selection-change="userChangeRight" :row-key="getRowKeys">
  522. <el-table-column type="selection" width="50" :reserve-selection="true" align="center"/>
  523. <el-table-column label="姓名" align="center" prop="nickName" show-overflow-tooltip/>
  524. <el-table-column label="工号" align="center" prop="userName" show-overflow-tooltip width="150"/>
  525. <el-table-column label="所在部门" align="center" prop="deptName" show-overflow-tooltip width="168"/>
  526. </el-table>
  527. <pagination layout="total, prev, pager, next, jumper"
  528. v-show="userTotalRight>0"
  529. :total="userTotalRight"
  530. :pager-count="5"
  531. :page.sync="userQueryParamsRight.pageNum"
  532. :limit.sync="userQueryParamsRight.pageSize"
  533. @pagination="userGetListRight"/>
  534. </div>
  535. </div>
  536. </div>
  537. <div class="inspectionPlan-dialog-look-box" v-if="addDialogBoxType==5">
  538. <iframe
  539. class="iframe-box"
  540. :src="iframeSrc" scrolling="auto" frameborder="0">
  541. </iframe>
  542. </div>
  543. <div class="inspectionPlan-dialog-user-box" v-show="addDialogBoxType==6">
  544. <div class="left-max-box">
  545. <div class="dept-table-title-box">
  546. <p>待选</p>
  547. <p>{{deviceNumLeft}}/{{deviceTotalLeft}}</p>
  548. </div>
  549. <div class="dept-table-max-box">
  550. <el-form :model="deviceQueryParamsLeft" class="form-box" ref="queryForm" :inline="true" label-width="50px">
  551. <el-form-item label="" prop="deptId">
  552. <el-select v-model="deviceQueryParamsLeft.hazardTypeMode" clearable placeholder="选择类型" style="width: 110px">
  553. <el-option
  554. v-for="item in dangerArr"
  555. :key="item.dictValue"
  556. :label="item.dictLabel"
  557. :value="item.dictValue">
  558. </el-option>
  559. </el-select>
  560. </el-form-item>
  561. <el-form-item label="" prop="searchValue" class="form-index">
  562. <el-input
  563. maxLength="20"
  564. v-model="deviceQueryParamsLeft.searchValue"
  565. placeholder="搜索设备名称"
  566. clearable
  567. style="width: 240px">
  568. <p class="el-icon-search" slot="append" @click="deviceHandleQueryLeft"></p>
  569. </el-input>
  570. </el-form-item>
  571. <el-form-item style="margin-right:0;">
  572. <p class="reset-button-one" @click="deviceResetQueryLeft" style="width:60px;">重置</p>
  573. </el-form-item>
  574. </el-form>
  575. <el-table ref="leftDeviceTable" border :data="deviceTableListLeft" @selection-change="deviceChangeLeft" :row-key="getDeviceRowKeys">
  576. <el-table-column type="selection" width="50" :reserve-selection="true" align="center"/>
  577. <el-table-column label="名称" align="center" prop="chName" show-overflow-tooltip/>
  578. <el-table-column label="型号" align="center" prop="code" show-overflow-tooltip width="150"/>
  579. <el-table-column label="类型" align="center" prop="hazardTypeMode" show-overflow-tooltip width="168"/>
  580. </el-table>
  581. <pagination layout="total, prev, pager, next, jumper"
  582. v-show="deviceTotalLeft>0"
  583. :total="deviceTotalLeft"
  584. :pager-count="5"
  585. :page.sync="deviceQueryParamsLeft.pageNum"
  586. :limit.sync="deviceQueryParamsLeft.pageSize"
  587. @pagination="deviceGetListLeft"/>
  588. </div>
  589. </div>
  590. <div class="center-box">
  591. <p class="el-icon-arrow-left" @click="deviceArrowButton(1)"></p>
  592. <p class="el-icon-arrow-right" @click="deviceArrowButton(2)"></p>
  593. </div>
  594. <div class="right-max-box">
  595. <div class="dept-table-title-box">
  596. <p>已选</p>
  597. <p>{{deviceNumRight}}/{{deviceTotalRight}}</p>
  598. </div>
  599. <div class="dept-table-max-box">
  600. <el-form :model="deviceQueryParamsRight" class="form-box" ref="queryForm" :inline="true" label-width="50px">
  601. <el-form-item label="" prop="deptId">
  602. <el-select v-model="deviceQueryParamsRight.hazardTypeMode" clearable placeholder="选择类型" style="width: 110px">
  603. <el-option
  604. v-for="item in dangerArr"
  605. :key="item.dictValue"
  606. :label="item.dictLabel"
  607. :value="item.dictValue">
  608. </el-option>
  609. </el-select>
  610. </el-form-item>
  611. <el-form-item label="" prop="searchValue" class="form-index">
  612. <el-input
  613. maxLength="20"
  614. v-model="deviceQueryParamsRight.searchValue"
  615. placeholder="搜索设备名称"
  616. clearable
  617. style="width: 240px">
  618. <p class="el-icon-search" slot="append" @click="deviceHandleQueryRight"></p>
  619. </el-input>
  620. </el-form-item>
  621. <el-form-item style="margin-right:0;">
  622. <p class="reset-button-one" @click="deviceResetQueryRight" style="width:60px;">重置</p>
  623. </el-form-item>
  624. </el-form>
  625. <el-table ref="rightDeviceTable" border :data="deviceTableListRight" @selection-change="deviceChangeRight" :row-key="getDeviceRowKeys">
  626. <el-table-column type="selection" width="50" :reserve-selection="true" align="center"/>
  627. <el-table-column label="名称" align="center" prop="chName" show-overflow-tooltip/>
  628. <el-table-column label="型号" align="center" prop="code" show-overflow-tooltip width="150"/>
  629. <el-table-column label="类型" align="center" prop="hazardTypeMode" show-overflow-tooltip width="168"/>
  630. </el-table>
  631. <pagination layout="total, prev, pager, next, jumper"
  632. v-show="deviceTotalRight>0"
  633. :total="deviceTotalRight"
  634. :pager-count="5"
  635. :page.sync="deviceQueryParamsRight.pageNum"
  636. :limit.sync="deviceQueryParamsRight.pageSize"
  637. @pagination="deviceGetListRight"/>
  638. </div>
  639. </div>
  640. </div>
  641. <div slot="footer" class="dialog-footer dialog-footer-box" style="display: flex">
  642. <p class="dialog-footer-button-null"></p>
  643. <p class="dialog-footer-button-info" @click="addDialogOff">{{addDialogBoxType==1?'取消':'返回'}}</p>
  644. <p class="dialog-footer-button-primary" v-if="!lookInfoType && addDialogBoxType!=5" @click="addUserButton">确定</p>
  645. <p class="dialog-footer-button-null"></p>
  646. </div>
  647. </el-dialog>
  648. </template>
  649. <script>
  650. import { getToken } from "@/utils/auth";
  651. import { listDepartments } from "@/api/system/dept";
  652. import { listClassifiedAll } from "@/api/laboratory/classified";
  653. import { listClasstypeAll } from "@/api/laboratory/classtype";
  654. import {
  655. getHistoryPlanTitles, findGroupList, checkGroupFind, findUserList,
  656. getAllSubNum, isSCollege, conditionCollegeInfo, findSubInfoByDeptIds,
  657. checkPlanAdd, conditionSubjectInfo, findCheckPlan, checkPlanUpdate,
  658. hideHistoryPlanTitle, findDeviceList,haveHazardInSub
  659. } from '@/api/safetyCheck/index'
  660. import { dangerList } from '@/api/gasManage3_0/gasManage'
  661. export default {
  662. name: 'addDialog',
  663. props:{
  664. addDialogData:{},
  665. },
  666. data(){
  667. return{
  668. loading:false,
  669. uploadImgUrl: this.uploadUrl(), // 上传的图片服务器地址
  670. headers: {
  671. Authorization: "Bearer " + getToken(),
  672. },
  673. addDialogTitle:"",
  674. addDialogType:true,
  675. //弹窗内容状态
  676. addDialogBoxType:1,
  677. // 设置只能选择当前日期及之后的日期
  678. pickerOptions: {
  679. disabledDate(time) {
  680. return time.getTime() < Date.now() - 8.64e7;//如果没有后面的-8.64e7就是不可以选择今天的
  681. }
  682. },
  683. //标题快选数据
  684. quickSelectionList:[],
  685. //巡查组列表
  686. dialogOptions:[],
  687. //上传文件名称暂存
  688. upDataName:"",
  689. //巡查组
  690. groupData:"",
  691. //巡查组状态 院级/校级
  692. groupDataType:"",
  693. //选中巡查人员列表
  694. dialogTableList:[],
  695. //巡查范围列表
  696. dialogRangeOptions:[],
  697. //检查类型
  698. inspectCategoryList:[{id:'1',name:'综合检查'},{id:'2',name:'专项检查'}],
  699. //学院数量
  700. collegeNum:0,
  701. //学院实验室数量
  702. collegeSubNum:0,
  703. //学院选择页面已选数据
  704. deptCheckData:{
  705. deptIds:[],
  706. deptNum:0,
  707. subNum:0
  708. },
  709. //实验室选择页面已选数据
  710. subCheckData:{
  711. subIds:[]
  712. },
  713. //巡查院系列表
  714. deptList:[],
  715. //巡查实验室列表
  716. subList:[],
  717. //提交数据
  718. dialogForm:{
  719. title:"",//奥体
  720. checkType:"1",//检查组织
  721. dateRange:[],//时间
  722. checkCategory:'1',//检查类型
  723. hazardIds:'',//危险源ids
  724. hazardNum:'0',// 危险源数量
  725. checkRange:"",//检查范围
  726. checkDemand:"",//检查要点
  727. schoolSubCheckNum:0,//学校实验室数量
  728. collegeNum:0,//学院数量
  729. collegeSubNum:0,//学院实验室数量
  730. subCheckNum:0,//实验室数量
  731. subjectNum:0,
  732. collegeIds:[],
  733. uploadDtoList:[],
  734. },
  735. // 表单校验
  736. rules: {
  737. title: [
  738. { required: true, message: "请输入计划标题", trigger: "change" },
  739. { required: true, message: "请输入计划标题", validator: this.spaceJudgment, trigger: "change" },
  740. ],
  741. checkCategory: [
  742. { required: true, message: "请选择检查类型", trigger: "change" },
  743. ],
  744. dateRange: [
  745. { required: true, message: "请选择计划周期", trigger: "change" },
  746. ],
  747. checkRange: [
  748. { required: true, message: "请选择检查范围", trigger: "change" },
  749. ],
  750. },
  751. classTypeList:[],
  752. classifiedList:[],
  753. deptSelectList:[],
  754. //查看状态
  755. lookInfoType:false,
  756. /*===================================学院选择相关===================================*/
  757. changeDeptSelectList:[],
  758. deptQueryParamsLeft:{
  759. searchValue:"",
  760. },
  761. deptTableListLeft:[],
  762. deptTotalLeft:0,
  763. deptNumLeft:0,
  764. deptIdsLeft:[],
  765. deptQueryParamsRight:{
  766. pageNum:1,
  767. pageSize:20,
  768. searchValue:"",
  769. deptId:"",
  770. deptIds:"",
  771. level:"",
  772. typeId:"",
  773. },
  774. deptTableListRight:[],
  775. deptTotalRight:0,
  776. /*===================================实验室选择相关===================================*/
  777. subQueryParamsLeft:{
  778. pageNum:1,
  779. pageSize:20,
  780. typeId:"",
  781. level:"",
  782. deptId:"",
  783. searchValue:"",
  784. filtType:1
  785. },
  786. subTableListLeft:[],
  787. subTotalLeft:0,
  788. subNumLeft:0,
  789. subIdsLeft:[],
  790. subQueryParamsRight:{
  791. pageNum:1,
  792. pageSize:20,
  793. typeId:"",
  794. level:"",
  795. deptId:"",
  796. searchValue:"",
  797. filtType:2
  798. },
  799. subTableListRight:[],
  800. subTotalRight:0,
  801. subNumRight:0,
  802. subIdsRight:[],
  803. dialogTableSubList:[],
  804. dialogTableSubDataList:[],
  805. /*===================================人员选择相关===================================*/
  806. userQueryParamsLeft:{
  807. pageNum: 1,
  808. pageSize: 20,
  809. deptId:"",
  810. searchValue:"",
  811. filtType:1
  812. },
  813. userTableListLeft:[],
  814. userTotalLeft:0,
  815. userNumLeft:0,
  816. userIdsLeft:[],
  817. userQueryParamsRight:{
  818. pageNum: 1,
  819. pageSize: 20,
  820. deptId:"",
  821. searchValue:"",
  822. filtType:2
  823. },
  824. userTableListRight:[],
  825. userTotalRight:0,
  826. userNumRight:0,
  827. userIdsRight:[],
  828. dialogTableDataList:[],
  829. /*===================================设备相关===================================*/
  830. deviceQueryParamsLeft:{
  831. pageNum: 1,
  832. pageSize: 20,
  833. searchValue:"",
  834. hazardTypeMode:"",
  835. filtType:1//1是过滤,2是不过滤
  836. },
  837. deviceTableListLeft:[],
  838. deviceTotalLeft:0,
  839. deviceNumLeft:0,
  840. deviceIdsLeft:[],
  841. deviceQueryParamsRight:{
  842. pageNum: 1,
  843. pageSize: 20,
  844. searchValue:"",
  845. hazardTypeMode:"",
  846. filtType:2
  847. },
  848. deviceTableListRight:[],
  849. deviceTotalRight:0,
  850. deviceNumRight:0,
  851. deviceIdsRight:[],
  852. deviceDialogTableDataList:[],
  853. deviceDialogList:[],//存储所有的设备
  854. dangerArr:[],
  855. deviceIsEmpty:false,//如果是专项检查-判断是否选择检查范围和检查内容
  856. /*===================================文档预览===================================*/
  857. iframeSrc:"",
  858. /*===================================弹窗相关结束===================================*/
  859. }
  860. },
  861. created(){
  862. this.$set(this,'addDialogTitle',this.addDialogData.title);
  863. this.$set(this,'lookInfoType',this.addDialogData.lookInfoType);
  864. },
  865. mounted(){
  866. this.dangerList();
  867. this.initializationInterface();
  868. this.deviceGetList();//查询所有设备
  869. },
  870. methods:{
  871. //初始化接口
  872. initializationInterface(){
  873. //获取历史标题
  874. this.getHistoryPlanTitles();
  875. //获取学院列表
  876. listDepartments().then(response => {
  877. this.deptSelectList = response.data;
  878. });
  879. /**获取分级*/
  880. listClassifiedAll().then(response=>{
  881. this.classifiedList = response.data
  882. })
  883. /**获取分类*/
  884. listClasstypeAll().then(response=>{
  885. this.classTypeList = response.data;
  886. });
  887. //查询当前用户是否是院级
  888. isSCollege().then(response=>{
  889. if(response.data.userFlg){
  890. // 院级
  891. this.$set(this,'dialogRangeOptions',[{label:"学院",value:2},{label:"实验室",value:3}]);
  892. this.$set(this,'groupDataType',2);
  893. }else{
  894. // 校级
  895. this.$set(this,'dialogRangeOptions',[{label:"全校",value:1},{label:"学院",value:2},{label:"实验室",value:3}]);
  896. this.$set(this,'groupDataType',0);
  897. }
  898. //获取巡查组 checkLevel: 0全部 1校级 2院级
  899. findGroupList({checkLevel:this.groupDataType}).then(response => {
  900. this.$set(this,'dialogOptions',response.data);
  901. });
  902. });
  903. if(!this.addDialogData.addType){
  904. //编辑-详情查询
  905. findCheckPlan({id:this.addDialogData.id}).then(response => {
  906. //处理基础数据
  907. let obj = {
  908. id:response.data.id,
  909. title:response.data.title,
  910. checkType:response.data.checkType,
  911. checkCategory:response.data.checkCategory+'',
  912. hazardIds:response.data.hazardIds,
  913. hazardNum:response.data.hazardNum,
  914. dateRange:[response.data.cycleStartTime,response.data.cycleEndTime],
  915. checkRange:response.data.checkRange,
  916. schoolSubCheckNum:response.data.checkRange == 1?response.data.subjectNum:0,
  917. collegeSubNum:response.data.checkRange == 2?response.data.subjectNum:0,
  918. collegeNum:response.data.checkRange == 2?response.data.collegeNum:0,
  919. subCheckNum:response.data.checkRange == 3?response.data.subjectNum:0,
  920. collegeIds:response.data.collegeIds?response.data.collegeIds.split(','):[],
  921. checkDemand:response.data.checkDemand,
  922. uploadDtoList:response.data.uploadDtoList,
  923. checkMemberDtoList:response.data.checkMemberDtoList,
  924. }
  925. this.$set(this,'dialogForm',obj);
  926. //处理人员数据
  927. let userData = [];
  928. for(let i=0;i<response.data.checkMemberDtoList.length;i++){
  929. userData.push({
  930. userId:response.data.checkMemberDtoList[i].userId,
  931. name:response.data.checkMemberDtoList[i].name,
  932. jobNum:response.data.checkMemberDtoList[i].jobNum,
  933. deptName:response.data.checkMemberDtoList[i].deptName,
  934. deptId:response.data.checkMemberDtoList[i].deptId,
  935. userType:response.data.checkMemberDtoList[i].userType,
  936. enable:response.data.checkMemberDtoList[i].enable,
  937. })
  938. }
  939. this.$set(this,'dialogTableList',userData);
  940. //处理实验室数据
  941. let subList = response.data.subIds?response.data.subIds.split(','):[];
  942. let subDataList = [];
  943. for(let i=0;i<subList.length;i++){
  944. subList[i] = parseInt(subList[i]);
  945. let obj = {
  946. subId:subList[i],
  947. }
  948. subDataList.push(obj);
  949. }
  950. this.$set(this,'dialogTableSubList',subDataList);
  951. this.$set(this.subCheckData,'subIds',subList);
  952. });
  953. }
  954. },
  955. //选中检查类型
  956. inspectCategoryChange(val){
  957. },
  958. //选中检查范围
  959. rangeChange(val){
  960. if(val == 1){
  961. //全校
  962. getAllSubNum().then(response => {
  963. this.$set(this.dialogForm,'schoolSubCheckNum',response.data.subCount);
  964. })
  965. }
  966. },
  967. //选中巡查组
  968. groupChange(val){
  969. checkGroupFind({id:val,selectEnable:1}).then(response => {
  970. this.$set(this,'dialogTableList',response.data.checkGroupMemberList);
  971. });
  972. },
  973. //确定按钮
  974. addUserButton(){
  975. let self = this;
  976. if(this.addDialogBoxType == 1){
  977. //提交
  978. this.$refs["addDialogForm"].validate(valid => {
  979. if (valid) {
  980. //检查范围内是否选择实验室获学院
  981. if(this.dialogForm.checkRange == 2){
  982. if(!this.dialogForm.collegeIds[0]){
  983. this.msgError('请选择学院')
  984. return
  985. }
  986. }else if(this.dialogForm.checkRange == 3){
  987. if(!this.subCheckData.subIds[0]){
  988. this.msgError('请选择实验室')
  989. return
  990. }
  991. }
  992. if(this.dialogForm.checkCategory==2){
  993. if(this.dialogForm.hazardNum==0){
  994. this.msgError('请选择检查内容')
  995. return
  996. }
  997. }
  998. if(!this.dialogTableList[0]){
  999. this.msgError('请添加至少一名巡查成员')
  1000. return
  1001. }
  1002. let obj = {
  1003. title:this.dialogForm.title,
  1004. checkType:this.dialogForm.checkType,
  1005. cycleStartTime:this.dialogForm.dateRange[0],
  1006. cycleEndTime:this.dialogForm.dateRange[1],
  1007. checkCategory:this.dialogForm.checkCategory,//检查类型
  1008. hazardIds:this.dialogForm.hazardIds,//危险源ids
  1009. hazardNum:this.dialogForm.hazardNum,// 危险源数量
  1010. checkRange:this.dialogForm.checkRange,//检查范围
  1011. subjectNum:this.dialogForm.checkRange == 1?this.dialogForm.schoolSubCheckNum:(
  1012. this.dialogForm.checkRange == 2?this.dialogForm.collegeSubNum:(
  1013. this.dialogForm.checkRange == 3?this.dialogForm.subCheckNum:0)),//实验室数量
  1014. collegeIds:this.dialogForm.checkRange==2?this.dialogForm.collegeIds+'':'',//学院ID转换字符串
  1015. collegeNum:this.dialogForm.checkRange==2?this.dialogForm.collegeNum:0,//学院数量
  1016. subIds:this.dialogForm.checkRange == 3?this.subCheckData.subIds+'':'',//实验室ID
  1017. checkDemand:this.dialogForm.checkDemand,//检查要求
  1018. uploadDtoList:this.dialogForm.uploadDtoList,//检查要求
  1019. checkMemberDtoList:[],//成员
  1020. };
  1021. let userList = [];
  1022. //过滤多余字段
  1023. for(let i=0;i<self.dialogTableList.length;i++){
  1024. let obj = {
  1025. deptId: self.dialogTableList[i].deptId,
  1026. deptName: self.dialogTableList[i].deptName,
  1027. enable: self.dialogTableList[i].enable,
  1028. jobNum: self.dialogTableList[i].jobNum,
  1029. name: self.dialogTableList[i].name,
  1030. userId: self.dialogTableList[i].userId,
  1031. userType: self.dialogTableList[i].userType,
  1032. };
  1033. //编辑时需要带上父类ID
  1034. if(this.addDialogData.id){
  1035. obj.checkPlanId = this.addDialogData.id
  1036. }
  1037. userList.push(obj);
  1038. }
  1039. obj.checkMemberDtoList = userList
  1040. if(this.addDialogData.id){
  1041. //编辑
  1042. for(let i=0;i<obj.uploadDtoList.length;i++){
  1043. obj.uploadDtoList[i].keyId = this.addDialogData.id;
  1044. }
  1045. obj.id = this.addDialogData.id;
  1046. checkPlanUpdate(obj).then(response => {
  1047. this.msgSuccess(response.msg)
  1048. this.$parent.addDialogOpen(5)
  1049. })
  1050. }else{
  1051. //新增
  1052. checkPlanAdd(obj).then(response => {
  1053. this.msgSuccess(response.msg)
  1054. this.$parent.addDialogOpen(5)
  1055. })
  1056. }
  1057. }
  1058. })
  1059. }else if(this.addDialogBoxType == 2){
  1060. // 学院选择页面确定
  1061. this.$set(this.dialogForm,'collegeNum',this.deptCheckData.deptNum);
  1062. this.$set(this.dialogForm,'collegeSubNum',this.deptCheckData.subNum);
  1063. this.$set(this.dialogForm,'collegeIds',this.deptCheckData.deptIds);
  1064. this.dialogClickType(1);
  1065. }else if(this.addDialogBoxType == 3){
  1066. //实验室选择页面确定
  1067. let list = [];
  1068. let ids = [];
  1069. for(let o=0;o<self.dialogTableSubDataList.length;o++){
  1070. ids.push(self.dialogTableSubDataList[o].subId)
  1071. let obj = {
  1072. subId:self.dialogTableSubDataList[o].subId,
  1073. subjectName:self.dialogTableSubDataList[o].subjectName,
  1074. typeId:self.dialogTableSubDataList[o].typeId,
  1075. level:self.dialogTableSubDataList[o].level,
  1076. collegeName:self.dialogTableSubDataList[o].collegeName,
  1077. };
  1078. list.push(obj)
  1079. }
  1080. this.$set(this.subCheckData,'subIds',ids);
  1081. this.$set(this.dialogForm,'subCheckNum',list.length);
  1082. this.$set(this,'dialogTableSubList',list);
  1083. this.dialogClickType(1);
  1084. }else if(this.addDialogBoxType == 4){
  1085. //人员选择页面确定
  1086. let list = [];
  1087. for(let o=0;o<self.dialogTableDataList.length;o++){
  1088. let obj = {
  1089. userId:self.dialogTableDataList[o].userId,
  1090. name:self.dialogTableDataList[o].name,
  1091. jobNum:self.dialogTableDataList[o].jobNum,
  1092. deptName:self.dialogTableDataList[o].deptName,
  1093. deptId:self.dialogTableDataList[o].deptId,
  1094. userType:self.dialogTableDataList[o].userType,
  1095. enable:1,
  1096. };
  1097. list.push(obj)
  1098. }
  1099. this.$set(this,'dialogTableList',list);
  1100. this.dialogClickType(1);
  1101. }else if(this.addDialogBoxType == 6){
  1102. let list=[]
  1103. for(let i=0;i<self.deviceDialogTableDataList.length;i++){
  1104. list.push(self.deviceDialogTableDataList[i].id)
  1105. }
  1106. this.$set(this.dialogForm,'hazardIds',list.join(','));
  1107. this.$set(this.dialogForm,'hazardNum',list.length);
  1108. //实验室是否有当前设备
  1109. let obj={
  1110. "checkRange":this.dialogForm.checkRange,
  1111. "collegeIds":this.dialogForm.checkRange==2?this.dialogForm.collegeIds+'':'',//学院ID转换字符串
  1112. "subIds":this.dialogForm.checkRange == 3?this.subCheckData.subIds+'':'',//实验室ID
  1113. "hazardIds":this.dialogForm.hazardIds,
  1114. }
  1115. haveHazardInSub(obj).then(response => {
  1116. if(response.code==200){
  1117. this.dialogClickType(1);
  1118. }else{
  1119. this.$set(this.dialogForm,'hazardIds','');
  1120. this.$set(this.dialogForm,'hazardNum',0);
  1121. }
  1122. });
  1123. }
  1124. },
  1125. /*===================================弹窗相关===================================*/
  1126. //弹窗关闭
  1127. addDialogAllOff(){
  1128. this.$parent.addDialogOpen(4)
  1129. },
  1130. addDialogOff(){
  1131. if(this.addDialogBoxType == 1){
  1132. this.$parent.addDialogOpen(4)
  1133. }else{
  1134. this.dialogClickType(1);
  1135. }
  1136. },
  1137. //弹窗状态切换
  1138. dialogClickType(type,item){
  1139. let self = this;
  1140. if(type == 5){
  1141. console.log('item',item);
  1142. this.$set(this,'iframeSrc',this.urlJudge(item.fileUrl));
  1143. this.$set(this,'addDialogBoxType',type);
  1144. }else if(type == 6){//检查设备
  1145. //设备
  1146. let list=[];
  1147. let list2=[];
  1148. if(this.dialogForm.hazardIds){
  1149. list=this.dialogForm.hazardIds.split(',')
  1150. for(let i=0;i<this.deviceDialogList.length;i++){
  1151. for(let b=0;b<list.length;b++){
  1152. if(list[b]==this.deviceDialogList[i].id){
  1153. list2.push(this.deviceDialogList[i])
  1154. }
  1155. }
  1156. }
  1157. }
  1158. this.$set(self,'deviceDialogTableDataList',list2);
  1159. this.deviceResetQueryLeft();
  1160. this.deviceResetQueryRight();
  1161. this.$set(this,'addDialogBoxType',type);
  1162. }else if(type == 4){
  1163. //添加成员
  1164. this.$set(self,'dialogTableDataList',JSON.parse(JSON.stringify(this.dialogTableList)));
  1165. this.userResetQueryLeft();
  1166. this.userResetQueryRight();
  1167. this.$set(this,'addDialogBoxType',type);
  1168. }else if(type == 2){
  1169. //选择学院
  1170. this.$set(this,'addDialogBoxType',type);
  1171. this.deptResetQueryLeft();
  1172. if(this.dialogForm.collegeIds[0]){
  1173. this.$nextTick(() => {
  1174. this.$set(this,'deptQueryParamsLeft',{ searchValue:"", });
  1175. conditionCollegeInfo(self.deptQueryParamsLeft).then(response => {
  1176. if(this.lookInfoType){
  1177. //查看时
  1178. let list = [];
  1179. for(let i=0;i<response.data.length;i++){
  1180. let num = 0;
  1181. for(let o=0;o<self.dialogForm.collegeIds.length;o++){
  1182. if(response.data[i].deptId == self.dialogForm.collegeIds[o]){
  1183. num++
  1184. }
  1185. }
  1186. if(num == 0){
  1187. response.data.splice(i,1);
  1188. i--
  1189. }
  1190. }
  1191. self.$set(self,'deptTableListLeft',response.data);
  1192. self.$set(self,'deptTotalLeft',response.data.length);
  1193. self.$set(self,'changeDeptSelectList',response.data);
  1194. this.$set(this,'deptQueryParamsRight',{
  1195. pageNum:1,
  1196. pageSize:20,
  1197. searchValue:"",
  1198. deptId:"",
  1199. level:"",
  1200. typeId:"",
  1201. });
  1202. let obj = JSON.parse(JSON.stringify(this.deptQueryParamsRight));
  1203. obj.deptIds = self.dialogForm.collegeIds;
  1204. findSubInfoByDeptIds(obj).then(response => {
  1205. this.deptTotalRight = response.total;
  1206. this.deptTableListRight = response.rows;
  1207. this.$set(this.deptCheckData,'subNum',response.total);
  1208. this.$set(this,'deptNumLeft',self.dialogForm.collegeIds.length);
  1209. });
  1210. }else{
  1211. //新增-编辑时
  1212. self.$set(self,'deptTableListLeft',response.data);
  1213. self.$set(self,'deptTotalLeft',response.data.length);
  1214. let list = [];
  1215. for(let i=0;i<self.dialogForm.collegeIds.length;i++){
  1216. for(let o=0;o<self.deptTableListLeft.length;o++){
  1217. if(self.dialogForm.collegeIds[i] == self.deptTableListLeft[o].deptId){
  1218. list.push(self.deptTableListLeft[o])
  1219. self.$refs.leftDeptTable.toggleRowSelection(self.deptTableListLeft[o]);
  1220. }
  1221. }
  1222. }
  1223. self.deptChange(list);
  1224. }
  1225. })
  1226. })
  1227. }
  1228. }else if(type == 3){
  1229. //选择实验室
  1230. this.$set(self,'dialogTableSubDataList',JSON.parse(JSON.stringify(this.dialogTableSubList)));
  1231. this.subResetQueryLeft();
  1232. this.subResetQueryRight();
  1233. this.$set(this,'addDialogBoxType',type);
  1234. }else{
  1235. this.$set(this,'addDialogBoxType',type);
  1236. }
  1237. },
  1238. //选中对应周期
  1239. checkTime(type){
  1240. let myDate = new Date();
  1241. let year = myDate.getFullYear();
  1242. let month = myDate.getMonth()+1;
  1243. let day = myDate.getDate();
  1244. let minTime = year + '-' + month + '-' + day
  1245. let maxTime = '';
  1246. if(type==1){
  1247. maxTime = this.getMonthFinalDay(year,month);
  1248. }else if(type==2){
  1249. if(month>0 && month<4){
  1250. maxTime = this.getMonthFinalDay(year,3);
  1251. }else if(month>3 && month<7){
  1252. maxTime = this.getMonthFinalDay(year,6);
  1253. }else if(month>6 && month<10){
  1254. maxTime = this.getMonthFinalDay(year,9);
  1255. }else if(month>9 && month<13){
  1256. maxTime = this.getMonthFinalDay(year,12);
  1257. }
  1258. }else if(type==3){
  1259. maxTime = this.getMonthFinalDay(year,12);
  1260. }
  1261. let timeListA = minTime.split('-')
  1262. minTime = timeListA[0]+'-'+(timeListA[1]<10?'0'+timeListA[1]:timeListA[1])+'-'+(timeListA[2]<10?'0'+timeListA[1]:timeListA[2])
  1263. let timeListB = maxTime.split('-')
  1264. maxTime = timeListB[0]+'-'+(timeListB[1]<10?'0'+timeListB[1]:timeListB[1])+'-'+(timeListB[2]<10?'0'+timeListB[1]:timeListB[2])
  1265. this.$set(this.dialogForm,'dateRange',[minTime,maxTime]);
  1266. },
  1267. //返回指定月份最后一天
  1268. getMonthFinalDay(year,month){
  1269. var day='';
  1270. if(year==null || year==undefined || year==''){
  1271. year = new Date().getFullYear();
  1272. }
  1273. if(month==null || month==undefined || month==''){
  1274. month = new Date().getMonth()+1;
  1275. }
  1276. day = new Date(new Date(year,month).setDate(0)).getDate();
  1277. return year+"-"+month+"-"+day;
  1278. },
  1279. //删除弹窗上传文件
  1280. delUpData(index){
  1281. this.dialogForm.uploadDtoList.splice(index,1)
  1282. },
  1283. //删除弹窗列表
  1284. delTable(row){
  1285. let self = this;
  1286. for(let i=0;i<self.dialogTableList.length;i++){
  1287. if(row.userId == self.dialogTableList[i].userId){
  1288. this.dialogTableList.splice(i,1)
  1289. }
  1290. }
  1291. },
  1292. //快捷选中标题
  1293. checkTitle(item){
  1294. this.$set(this.dialogForm,'title',item.title);
  1295. },
  1296. /*===================================学院选择相关===================================*/
  1297. //重置
  1298. deptResetQueryLeft(){
  1299. this.$set(this,'deptQueryParamsLeft',{ searchValue:"", });
  1300. this.$set(this,'deptNumLeft',0);
  1301. this.$set(this,'deptIdsLeft',[]);
  1302. this.$refs.leftDeptTable.clearSelection();
  1303. this.deptGetListLeft();
  1304. },
  1305. //查询接口
  1306. deptGetListLeft(){
  1307. conditionCollegeInfo(this.deptQueryParamsLeft).then(response => {
  1308. this.$set(this,'deptTableListLeft',response.data);
  1309. this.$set(this,'deptTotalLeft',response.data.length);
  1310. })
  1311. },
  1312. //查询
  1313. deptHandleQueryRight(){
  1314. this.deptGetListRight();
  1315. },
  1316. //重置
  1317. deptResetQueryRight(){
  1318. this.$set(this,'deptQueryParamsRight',{
  1319. pageNum:1,
  1320. pageSize:20,
  1321. searchValue:"",
  1322. deptId:"",
  1323. deptIds:"",
  1324. level:"",
  1325. typeId:"",
  1326. });
  1327. this.deptHandleQueryRight();
  1328. },
  1329. //查询接口
  1330. deptGetListRight(){
  1331. let obj = JSON.parse(JSON.stringify(this.deptQueryParamsRight));
  1332. if(this.lookInfoType){
  1333. obj.deptIds = this.dialogForm.collegeIds;
  1334. }else{
  1335. obj.deptIds = this.deptIdsLeft;
  1336. }
  1337. findSubInfoByDeptIds(obj).then(response => {
  1338. this.deptTotalRight = response.total;
  1339. this.deptTableListRight = response.rows;
  1340. });
  1341. },
  1342. /*===================================实验室选择相关===================================*/
  1343. //查询
  1344. subHandleQueryLeft(){
  1345. this.$set(this.subQueryParamsLeft,'pageNum',1);
  1346. this.subGetListLeft();
  1347. },
  1348. //重置
  1349. subResetQueryLeft(){
  1350. this.$set(this,'subQueryParamsLeft',{
  1351. pageNum:1,
  1352. pageSize:20,
  1353. typeId:"",
  1354. level:"",
  1355. deptId:"",
  1356. searchValue:"",
  1357. filtType:1
  1358. });
  1359. this.subHandleQueryLeft();
  1360. },
  1361. //查询接口
  1362. subGetListLeft(){
  1363. let self = this;
  1364. let leftObj = JSON.parse(JSON.stringify(this.subQueryParamsLeft));
  1365. leftObj.selectedSubIds = [];
  1366. for(let i=0;i<self.dialogTableSubDataList.length;i++){
  1367. leftObj.selectedSubIds.push(self.dialogTableSubDataList[i].subId);
  1368. }
  1369. conditionSubjectInfo(leftObj).then(response => {
  1370. this.subTotalLeft = response.total;
  1371. this.subTableListLeft = response.rows;
  1372. });
  1373. },
  1374. //查询
  1375. subHandleQueryRight(){
  1376. this.$set(this.subQueryParamsRight,'pageNum',1);
  1377. this.subGetListRight();
  1378. },
  1379. //重置
  1380. subResetQueryRight(){
  1381. this.$set(this,'subQueryParamsRight',{
  1382. pageNum:1,
  1383. pageSize:20,
  1384. typeId:"",
  1385. level:"",
  1386. deptId:"",
  1387. searchValue:"",
  1388. filtType:2
  1389. });
  1390. this.subHandleQueryRight();
  1391. },
  1392. //查询接口
  1393. subGetListRight(){
  1394. let self = this;
  1395. let rightObj = JSON.parse(JSON.stringify(this.subQueryParamsRight));
  1396. rightObj.subIds = [];
  1397. for(let i=0;i<self.dialogTableSubDataList.length;i++){
  1398. rightObj.subIds.push(self.dialogTableSubDataList[i].subId);
  1399. }
  1400. conditionSubjectInfo(rightObj).then(response => {
  1401. this.subTotalRight = response.total;
  1402. this.subTableListRight = response.rows;
  1403. });
  1404. },
  1405. //实验室穿梭按钮
  1406. subArrowButton(type){
  1407. if(type == 1){
  1408. if(this.$refs.rightSubTable.selection[0]){
  1409. let list = JSON.parse(JSON.stringify(this.dialogTableSubDataList));
  1410. let subIdsRight = JSON.parse(JSON.stringify(this.$refs.rightSubTable.selection))
  1411. for(let i=0;i<subIdsRight.length;i++){
  1412. for(let s=0;s<list.length;s++){
  1413. if(subIdsRight[i].subId == list[s].subId){
  1414. list.splice(s,1);
  1415. s--
  1416. }
  1417. }
  1418. }
  1419. this.$set(this,'dialogTableSubDataList',list);
  1420. this.$refs.rightSubTable.clearSelection();
  1421. this.subHandleQueryLeft();
  1422. this.subHandleQueryRight();
  1423. }else{
  1424. this.msgError('请先勾选右侧列表')
  1425. }
  1426. }else if(type == 2){
  1427. if(this.$refs.leftSubTable.selection[0]){
  1428. let list = JSON.parse(JSON.stringify(this.dialogTableSubDataList));
  1429. let subIdsLeft = JSON.parse(JSON.stringify(this.$refs.leftSubTable.selection))
  1430. for(let i=0;i<subIdsLeft.length;i++){
  1431. let obj = {
  1432. subId:subIdsLeft[i].subId,
  1433. subjectName:subIdsLeft[i].subjectName,
  1434. typeId:subIdsLeft[i].typeId,
  1435. level:subIdsLeft[i].level,
  1436. collegeName:subIdsLeft[i].collegeName,
  1437. }
  1438. list.push(obj);
  1439. }
  1440. this.$set(this,'dialogTableSubDataList',list);
  1441. this.$refs.leftSubTable.clearSelection();
  1442. this.subHandleQueryLeft();
  1443. this.subHandleQueryRight();
  1444. }else{
  1445. this.msgError('请先勾选左侧列表')
  1446. }
  1447. }
  1448. },
  1449. /*===================================人员选择相关===================================*/
  1450. //查询
  1451. userHandleQueryLeft(){
  1452. this.$set(this.userQueryParamsLeft,'pageNum',1);
  1453. this.$set(this,'userNumLeft',0);
  1454. this.$set(this,'userIdsLeft',[]);
  1455. this.$refs.leftUserTable.clearSelection();
  1456. this.userGetListLeft();
  1457. },
  1458. //重置
  1459. userResetQueryLeft(){
  1460. this.$set(this,'userQueryParamsLeft',{
  1461. pageNum: 1,
  1462. pageSize: 20,
  1463. deptId:"",
  1464. searchValue:"",
  1465. filtType:1
  1466. });
  1467. this.userHandleQueryLeft();
  1468. },
  1469. //查询接口
  1470. userGetListLeft(){
  1471. let self = this;
  1472. let leftObj = JSON.parse(JSON.stringify(this.userQueryParamsLeft));
  1473. leftObj.selectedUserIds = [];
  1474. for(let i=0;i<self.dialogTableDataList.length;i++){
  1475. leftObj.selectedUserIds.push(self.dialogTableDataList[i].userId);
  1476. }
  1477. findUserList(leftObj).then(response => {
  1478. this.userTotalLeft = response.total;
  1479. this.userTableListLeft = response.rows;
  1480. });
  1481. },
  1482. //查询
  1483. userHandleQueryRight(){
  1484. this.$set(this.userQueryParamsRight,'pageNum',1);
  1485. this.$set(this,'userNumRight',0);
  1486. this.$set(this,'userIdsRight',[]);
  1487. this.$refs.rightUserTable.clearSelection();
  1488. this.userGetListRight();
  1489. },
  1490. //重置
  1491. userResetQueryRight(){
  1492. this.$set(this,'userQueryParamsRight',{
  1493. pageNum: 1,
  1494. pageSize: 20,
  1495. deptId:"",
  1496. searchValue:"",
  1497. filtType:2
  1498. });
  1499. this.userHandleQueryRight();
  1500. },
  1501. //查询接口
  1502. userGetListRight(){
  1503. let self = this;
  1504. let rightObj = JSON.parse(JSON.stringify(this.userQueryParamsRight));
  1505. rightObj.userIds = [];
  1506. for(let i=0;i<self.dialogTableDataList.length;i++){
  1507. rightObj.userIds.push(self.dialogTableDataList[i].userId);
  1508. }
  1509. findUserList(rightObj).then(response => {
  1510. this.userTotalRight = response.total;
  1511. this.userTableListRight = response.rows;
  1512. });
  1513. },
  1514. //人员穿梭按钮
  1515. userArrowButton(type){
  1516. let self = this;
  1517. if(type == 1){
  1518. //右至左
  1519. if(this.$refs.rightUserTable.selection[0]){
  1520. let list = JSON.parse(JSON.stringify(this.dialogTableDataList));
  1521. let userIdsRight = JSON.parse(JSON.stringify(this.$refs.rightUserTable.selection))
  1522. for(let i=0;i<userIdsRight.length;i++){
  1523. for(let s=0;s<list.length;s++){
  1524. if(userIdsRight[i].userId == list[s].userId){
  1525. list.splice(s,1);
  1526. s--
  1527. }
  1528. }
  1529. }
  1530. this.$set(this,'dialogTableDataList',list);
  1531. this.$refs.rightUserTable.clearSelection();
  1532. this.userHandleQueryLeft();
  1533. this.userHandleQueryRight();
  1534. }else{
  1535. this.msgError('请先勾选右侧列表')
  1536. }
  1537. }else if(type == 2){
  1538. //左至右
  1539. if(this.userIdsLeft[0]){
  1540. let list = JSON.parse(JSON.stringify(this.dialogTableDataList));
  1541. let userIdsLeft = JSON.parse(JSON.stringify(this.$refs.leftUserTable.selection))
  1542. for(let i=0;i<userIdsLeft.length;i++){
  1543. let obj = {
  1544. userId:userIdsLeft[i].userId,
  1545. name:userIdsLeft[i].nickName,
  1546. jobNum:userIdsLeft[i].userName,
  1547. deptName:userIdsLeft[i].deptName,
  1548. deptId:userIdsLeft[i].deptId,
  1549. userType:userIdsLeft[i].userType,
  1550. }
  1551. list.push(obj);
  1552. }
  1553. if(list.length>50){
  1554. this.msgError('巡查成员最多50人')
  1555. return
  1556. }
  1557. this.$set(this,'dialogTableDataList',list);
  1558. this.$refs.leftUserTable.clearSelection();
  1559. this.userHandleQueryLeft();
  1560. this.userHandleQueryRight();
  1561. }else{
  1562. this.msgError('请先勾选左侧列表')
  1563. }
  1564. }
  1565. },
  1566. /*===================================设备相关相关===================================*/
  1567. //获取危险源类型
  1568. dangerList(){
  1569. let _this=this;
  1570. dangerList().then( response => {
  1571. let res=response.rows;
  1572. _this.dangerArr=res;
  1573. });
  1574. },
  1575. //查询
  1576. deviceHandleQueryLeft(){
  1577. this.$set(this.deviceQueryParamsLeft,'pageNum',1);
  1578. this.$set(this,'deviceNumLeft',0);
  1579. this.$set(this,'deviceIdsLeft',[]);
  1580. this.$refs.leftDeviceTable.clearSelection();
  1581. this.deviceGetListLeft();
  1582. },
  1583. //重置
  1584. deviceResetQueryLeft(){
  1585. this.$set(this,'deviceQueryParamsLeft',{
  1586. pageNum: 1,
  1587. pageSize: 20,
  1588. hazardTypeMode:"",
  1589. searchValue:"",
  1590. filtType:1
  1591. });
  1592. this.deviceHandleQueryLeft();
  1593. },
  1594. //查询接口
  1595. deviceGetListLeft(){
  1596. let self = this;
  1597. let leftObj = JSON.parse(JSON.stringify(this.deviceQueryParamsLeft));
  1598. leftObj.selectedHazardIds = [];
  1599. for(let i=0;i<self.deviceDialogTableDataList.length;i++){
  1600. leftObj.selectedHazardIds.push(self.deviceDialogTableDataList[i].id);
  1601. }
  1602. findDeviceList(leftObj).then(response => {
  1603. this.deviceTotalLeft = response.total;
  1604. this.deviceTableListLeft = response.rows;
  1605. });
  1606. },
  1607. //查询
  1608. deviceHandleQueryRight(){
  1609. this.$set(this.deviceQueryParamsRight,'pageNum',1);
  1610. this.$set(this,'deviceNumRight',0);
  1611. this.$set(this,'deviceIdsRight',[]);
  1612. this.$refs.rightDeviceTable.clearSelection();
  1613. this.deviceGetListRight();
  1614. },
  1615. //重置
  1616. deviceResetQueryRight(){
  1617. this.$set(this,'deviceQueryParamsRight',{
  1618. pageNum: 1,
  1619. pageSize: 20,
  1620. hazardTypeMode:"",
  1621. searchValue:"",
  1622. filtType:2
  1623. });
  1624. this.deviceHandleQueryRight();
  1625. },
  1626. //查询所有的设备
  1627. deviceGetList(){
  1628. let obj={
  1629. pageNum: 1,
  1630. pageSize: 200,
  1631. hazardTypeMode:"",
  1632. searchValue:"",
  1633. filtType:""
  1634. }
  1635. findDeviceList(obj).then(response => {
  1636. this.deviceDialogList=response.rows
  1637. });
  1638. },
  1639. //查询接口
  1640. deviceGetListRight(){
  1641. let self = this;
  1642. let rightObj = JSON.parse(JSON.stringify(this.deviceQueryParamsRight));
  1643. rightObj.hazardIds = [];
  1644. for(let i=0;i<self.deviceDialogTableDataList.length;i++){
  1645. rightObj.hazardIds.push(self.deviceDialogTableDataList[i].id);
  1646. }
  1647. findDeviceList(rightObj).then(response => {
  1648. this.deviceTotalRight = response.total;
  1649. this.deviceTableListRight = response.rows;
  1650. });
  1651. },
  1652. //设备穿梭按钮
  1653. deviceArrowButton(type){
  1654. let self = this;
  1655. if(type == 1){
  1656. //右至左
  1657. if(this.$refs.rightDeviceTable.selection[0]){
  1658. let list = JSON.parse(JSON.stringify(this.deviceDialogTableDataList));
  1659. let deviceIdsRight = JSON.parse(JSON.stringify(this.$refs.rightDeviceTable.selection))
  1660. for(let i=0;i<deviceIdsRight.length;i++){
  1661. for(let s=0;s<list.length;s++){
  1662. if(deviceIdsRight[i].id == list[s].id){
  1663. list.splice(s,1);
  1664. s--
  1665. }
  1666. }
  1667. }
  1668. this.$set(this,'deviceDialogTableDataList',list);
  1669. this.$refs.rightDeviceTable.clearSelection();
  1670. this.deviceHandleQueryLeft();
  1671. this.deviceHandleQueryRight();
  1672. }else{
  1673. this.msgError('请先勾选右侧列表')
  1674. }
  1675. }else if(type == 2){
  1676. //左至右
  1677. if(this.deviceIdsLeft[0]){
  1678. let list = JSON.parse(JSON.stringify(this.deviceDialogTableDataList));
  1679. let deviceIdsLeft = JSON.parse(JSON.stringify(this.$refs.leftDeviceTable.selection))
  1680. for(let i=0;i<deviceIdsLeft.length;i++){
  1681. let obj = {
  1682. chName:deviceIdsLeft[i].chName,
  1683. code:deviceIdsLeft[i].code,
  1684. hazardTypeMode:deviceIdsLeft[i].hazardTypeMode,
  1685. id:deviceIdsLeft[i].id,
  1686. }
  1687. list.push(obj);
  1688. }
  1689. this.$set(this,'deviceDialogTableDataList',list);
  1690. this.$refs.leftDeviceTable.clearSelection();
  1691. this.deviceHandleQueryLeft();
  1692. this.deviceHandleQueryRight();
  1693. }else{
  1694. this.msgError('请先勾选左侧列表')
  1695. }
  1696. }
  1697. },
  1698. /*===================================弹窗相关结束===================================*/
  1699. // 单个下载按钮
  1700. downloadButton(item){
  1701. this.downloadUrl(item.fileUrl,item.fileName);
  1702. },
  1703. /*==========上传相关==========*/
  1704. handleAvatarSuccess(res) {
  1705. this.$set(this,'loading',false);
  1706. if(this.dialogForm.uploadDtoList.length>9){
  1707. this.msgError('已到达上传数量上限')
  1708. return
  1709. }
  1710. let suffixName= this.upDataName.split('.')[this.upDataName.split('.').length - 2]
  1711. //判断文件名中是否有逗号和分号
  1712. if(suffixName.indexOf(',')==-1 && suffixName.indexOf(';')==-1){
  1713. }else{
  1714. this.$message.info('文件名里包含逗号或分号,请修改后重新上传!')
  1715. return
  1716. }
  1717. let obj ={
  1718. fileName:this.upDataName,
  1719. fileUrl:res.data.url,
  1720. fileType:1,
  1721. source:1,
  1722. };
  1723. this.dialogForm.uploadDtoList.push(obj);
  1724. this.$forceUpdate()
  1725. },
  1726. beforeAvatarUpload(file) {
  1727. let type = false;
  1728. if (file.type == 'application/pdf' || file.type == 'application/msword' || file.type == 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'|| file.type == 'application/vnd.ms-excel' || file.type == 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet') {
  1729. if(file.size> 5250000){
  1730. this.msgError('上传大小不能超过5M')
  1731. return false
  1732. }
  1733. this.$set(this,'loading',true);
  1734. this.upDataName = file.name;
  1735. type = true;
  1736. }else{
  1737. this.$message.error('只能上传doc/docx/xls/xlsx/pdf格式');
  1738. type = false;
  1739. }
  1740. return type;
  1741. },
  1742. /*===记录勾选数据===
  1743. 需要再el-table 添加 :row-key="getRowKeys"
  1744. 需要在selection 添加 :reserve-selection="true"
  1745. */
  1746. getRowKeys(row) {
  1747. return row.userId
  1748. },
  1749. getDeptRowKeys(row) {
  1750. return row.deptId
  1751. },
  1752. getSubRowKeys(row) {
  1753. return row.subId
  1754. },
  1755. getDeviceRowKeys(row) {
  1756. return row.id
  1757. },
  1758. deptChange(selection){
  1759. let self = this;
  1760. this.deptNumLeft = selection.length;
  1761. this.deptIdsLeft = selection.map(item => item.deptId);
  1762. let num = 0;
  1763. let list = [];
  1764. for(let i=0;i<self.deptIdsLeft.length;i++){
  1765. for(let o=0;o<self.deptTableListLeft.length;o++){
  1766. if(self.deptIdsLeft[i] == self.deptTableListLeft[o].deptId){
  1767. num = self.accAdd(num,self.deptTableListLeft[o].subNum)
  1768. let obj = {
  1769. deptId:self.deptTableListLeft[o].deptId,
  1770. deptName:self.deptTableListLeft[o].deptName,
  1771. }
  1772. list.push(obj)
  1773. }
  1774. }
  1775. }
  1776. this.$set(this,'changeDeptSelectList',list);
  1777. this.$set(this.subQueryParamsRight,'deptId','');
  1778. let obj = {
  1779. deptIds:this.deptIdsLeft,
  1780. deptNum:this.deptNumLeft,
  1781. subNum:num
  1782. }
  1783. this.$set(this,'deptCheckData',JSON.parse(JSON.stringify(obj)));
  1784. this.deptResetQueryRight();
  1785. },
  1786. subChangeLeft(selection){
  1787. this.subNumLeft = selection.length;
  1788. this.subIdsLeft = selection.map(item => item.subId);
  1789. },
  1790. subChangeRight(selection){
  1791. this.subNumRight = selection.length;
  1792. this.subIdsRight = selection.map(item => item.subId);
  1793. },
  1794. userChangeLeft(selection){
  1795. this.userNumLeft = selection.length;
  1796. this.userIdsLeft = selection.map(item => item.userId);
  1797. },
  1798. userChangeRight(selection){
  1799. this.userNumRight = selection.length;
  1800. this.userIdsRight = selection.map(item => item.userId);
  1801. },
  1802. deviceChangeLeft(selection){
  1803. this.deviceNumLeft = selection.length;
  1804. this.deviceIdsLeft = selection.map(item => item.id);
  1805. },
  1806. deviceChangeRight(selection){
  1807. this.deviceNumRight = selection.length;
  1808. this.deviceIdsRight = selection.map(item => item.id);
  1809. },
  1810. //加法
  1811. accAdd(arg1,arg2){
  1812. var r1,r2,m;
  1813. try{r1=arg1.toString().split(".")[1].length}catch(e){r1=0}
  1814. try{r2=arg2.toString().split(".")[1].length}catch(e){r2=0}
  1815. m=Math.pow(10,Math.max(r1,r2))
  1816. return ((arg1*m+arg2*m)/m).toFixed(0);
  1817. },
  1818. //获取历史标题
  1819. getHistoryPlanTitles(){
  1820. getHistoryPlanTitles().then(response => {
  1821. let list = [
  1822. {title:"校院春季开学检查",type:false,},
  1823. {title:"校院秋季开学检查",type:false,},
  1824. {title:"日常安全检查",type:false,},
  1825. {title:"年度安全检查",type:false,},
  1826. {title:"季度安全检查",type:false,},
  1827. {title:"月度安全检查",type:false,},
  1828. {title:"专项检查",type:false,},
  1829. ];
  1830. for(let i=0;i<response.data.length;i++){
  1831. list.push({title:response.data[i].title,type:true,id:response.data[i].id});
  1832. }
  1833. this.$set(this,'quickSelectionList',list);
  1834. });
  1835. },
  1836. //删除历史标题
  1837. delTitleObj(item){
  1838. let self = this;
  1839. this.$confirm('是否确认删除?', "警告", {
  1840. confirmButtonText: "确定",
  1841. cancelButtonText: "取消",
  1842. type: "warning"
  1843. }).then(function() {
  1844. hideHistoryPlanTitle({checkPlanId:item.id}).then(response => {
  1845. self.msgSuccess(response.msg)
  1846. self.getHistoryPlanTitles();
  1847. });
  1848. }).then(() => {
  1849. }).catch(() => {});
  1850. },
  1851. //查看时学院左侧搜索
  1852. lookDeptLeftSearch(){
  1853. let self = this;
  1854. conditionCollegeInfo(self.deptQueryParamsLeft).then(response => {
  1855. let list = [];
  1856. for(let i=0;i<response.data.length;i++){
  1857. for(let o=0;o<self.dialogForm.collegeIds.length;o++){
  1858. if(response.data[i].deptId == self.dialogForm.collegeIds[o] && response.data[i].deptName.indexOf(this.deptQueryParamsLeft.searchValue)!= -1){
  1859. list.push(response.data[i]);
  1860. }
  1861. }
  1862. }
  1863. self.$set(self,'deptTableListLeft',list);
  1864. self.$set(self,'deptTotalLeft',list.length);
  1865. self.$set(self,'changeDeptSelectList',list);
  1866. this.$set(this,'deptQueryParamsRight',{
  1867. pageNum:1,
  1868. pageSize:20,
  1869. searchValue:"",
  1870. deptId:"",
  1871. level:"",
  1872. typeId:"",
  1873. });
  1874. let obj = JSON.parse(JSON.stringify(this.deptQueryParamsRight));
  1875. let ids = [];
  1876. for(let o=0;o<list.length;o++){
  1877. ids.push(list[o].deptId)
  1878. }
  1879. obj.deptIds = ids;
  1880. findSubInfoByDeptIds(obj).then(response => {
  1881. this.deptTotalRight = response.total;
  1882. this.deptTableListRight = response.rows;
  1883. this.$set(this.deptCheckData,'subNum',response.total);
  1884. this.$set(this,'deptNumLeft',self.dialogForm.collegeIds.length);
  1885. });
  1886. })
  1887. },
  1888. //查看时学院左侧重置
  1889. lookDeptLeftReset(){
  1890. let self = this;
  1891. this.$set(this,'deptQueryParamsLeft',{ searchValue:"", });
  1892. conditionCollegeInfo(self.deptQueryParamsLeft).then(response => {
  1893. //查看时
  1894. for(let i=0;i<response.data.length;i++){
  1895. let num = 0;
  1896. for(let o=0;o<self.dialogForm.collegeIds.length;o++){
  1897. if(response.data[i].deptId == self.dialogForm.collegeIds[o]){
  1898. num++
  1899. }
  1900. }
  1901. if(num == 0){
  1902. response.data.splice(i,1);
  1903. i--
  1904. }
  1905. }
  1906. self.$set(self,'deptTableListLeft',response.data);
  1907. self.$set(self,'deptTotalLeft',response.data.length);
  1908. self.$set(self,'changeDeptSelectList',response.data);
  1909. this.$set(this,'deptQueryParamsRight',{
  1910. pageNum:1,
  1911. pageSize:20,
  1912. searchValue:"",
  1913. deptId:"",
  1914. level:"",
  1915. typeId:"",
  1916. });
  1917. let obj = JSON.parse(JSON.stringify(this.deptQueryParamsRight));
  1918. obj.deptIds = self.dialogForm.collegeIds;
  1919. findSubInfoByDeptIds(obj).then(response => {
  1920. this.deptTotalRight = response.total;
  1921. this.deptTableListRight = response.rows;
  1922. this.$set(this.deptCheckData,'subNum',response.total);
  1923. this.$set(this,'deptNumLeft',self.dialogForm.collegeIds.length);
  1924. });
  1925. })
  1926. },
  1927. //查看时学院右侧搜索
  1928. lookDeptRightSearch(){
  1929. let self = this;
  1930. let obj = JSON.parse(JSON.stringify(this.deptQueryParamsRight));
  1931. let ids = [];
  1932. for(let o=0;o<self.deptTableListLeft.length;o++){
  1933. ids.push(self.deptTableListLeft[o].deptId)
  1934. }
  1935. obj.deptIds = ids;
  1936. findSubInfoByDeptIds(obj).then(response => {
  1937. this.deptTotalRight = response.total;
  1938. this.deptTableListRight = response.rows;
  1939. });
  1940. },
  1941. //查看时学院右侧重置
  1942. lookDeptRightReset(){
  1943. let self = this;
  1944. this.$set(this,'deptQueryParamsRight',{
  1945. pageNum:1,
  1946. pageSize:20,
  1947. searchValue:"",
  1948. deptId:"",
  1949. level:"",
  1950. typeId:"",
  1951. });
  1952. let obj = JSON.parse(JSON.stringify(this.deptQueryParamsRight));
  1953. let ids = [];
  1954. for(let o=0;o<self.deptTableListLeft.length;o++){
  1955. ids.push(self.deptTableListLeft[o].deptId)
  1956. }
  1957. obj.deptIds = ids;
  1958. findSubInfoByDeptIds(obj).then(response => {
  1959. this.deptTotalRight = response.total;
  1960. this.deptTableListRight = response.rows;
  1961. });
  1962. },
  1963. }
  1964. }
  1965. </script>
  1966. <style lang="scss">
  1967. .inspectionPlan-dialog-box{
  1968. .el-dialog__body{
  1969. padding:20px 0 20px 30px;
  1970. }
  1971. .is-disabled{
  1972. background-color: #f5f5f5;
  1973. color: #333;
  1974. border-color: #f5f5f5;
  1975. cursor:auto;
  1976. border-radius: 4px;
  1977. .el-input__icon{
  1978. display: none;
  1979. }
  1980. .el-input__inner{
  1981. background-color: #f5f5f5;
  1982. color: #333;
  1983. border-color: #f5f5f5;
  1984. cursor:auto!important;
  1985. border-radius: 4px;
  1986. }
  1987. .el-range-input{
  1988. background-color: #f5f5f5;
  1989. color: #333;
  1990. border-color: #f5f5f5;
  1991. cursor:auto;
  1992. border-radius: 4px;
  1993. }
  1994. .el-textarea__inner{
  1995. background-color: #f5f5f5;
  1996. color: #333;
  1997. border-color: #f5f5f5;
  1998. cursor:auto;
  1999. border-radius: 4px;
  2000. }
  2001. }
  2002. .inspectionPlan-dialog-add-box{
  2003. display: flex;
  2004. overflow: hidden;
  2005. height:610px;
  2006. .el-table__empty-text{
  2007. background-size: 20%!important;
  2008. }
  2009. .left-max-box{
  2010. width:270px;
  2011. border-right:1px dashed #D8D8D8;
  2012. display: flex;
  2013. flex-direction: column;
  2014. .left-max-title-box{
  2015. width:230px;
  2016. display: flex;
  2017. border-bottom:1px solid #E0E0E0;
  2018. img{
  2019. width:14px;
  2020. height:11px;
  2021. margin:33px 18px 33px 0;
  2022. }
  2023. p{
  2024. line-height:78px;
  2025. color:#0183FA;
  2026. font-size:16px;
  2027. }
  2028. }
  2029. .left-max-list-box{
  2030. flex:1;
  2031. width:230px;
  2032. overflow-x: hidden;
  2033. div{
  2034. width:230px;
  2035. height:40px;
  2036. line-height:40px;
  2037. padding:0 10px;
  2038. margin-top: 10px;
  2039. cursor: pointer;
  2040. font-size:16px;
  2041. color:#333333;
  2042. overflow:hidden;
  2043. display: flex;
  2044. .left-max-list-for-p{
  2045. flex:1;
  2046. display:block;
  2047. overflow:hidden;
  2048. text-overflow:ellipsis;
  2049. white-space:nowrap;
  2050. }
  2051. .left-max-list-for-icon{
  2052. color:#999;
  2053. width:32px;
  2054. line-height: 40px;
  2055. text-align: center;
  2056. font-size:16px;
  2057. }
  2058. }
  2059. div:hover{
  2060. background: rgba(1,131,250,0.2);
  2061. color:#0183FA;
  2062. .left-max-list-for-icon{
  2063. color:#0183FA!important;
  2064. }
  2065. }
  2066. }
  2067. }
  2068. .right-max-box{
  2069. flex:1;
  2070. padding-right:10px;
  2071. .date-range-box{
  2072. display: flex;
  2073. .date-range-left-box{
  2074. margin-right:15px;
  2075. }
  2076. .date-range-right-box{
  2077. display: flex;
  2078. border-radius:4px;
  2079. overflow: hidden;
  2080. border:1px solid #E0E0E0;
  2081. p{
  2082. width: 70px;
  2083. height:34px;
  2084. line-height:34px;
  2085. color:#333;
  2086. font-size:14px;
  2087. text-align: center;
  2088. cursor: pointer;
  2089. }
  2090. p:hover{
  2091. color:#fff;
  2092. background: #0045AF;
  2093. }
  2094. p:nth-child(2){
  2095. border-left:1px solid #E0E0E0;
  2096. border-right:1px solid #E0E0E0;
  2097. }
  2098. }
  2099. }
  2100. .dialog-range-max-box{
  2101. display: flex;
  2102. .dialog-range-select-box{
  2103. }
  2104. .dialog-range-text-box{
  2105. display: flex;
  2106. .button-p{
  2107. margin-left:15px;
  2108. width:100px;
  2109. margin-right:0;
  2110. }
  2111. .text-p{
  2112. line-height:40px;
  2113. color:#0183FA;
  2114. font-size:14px;
  2115. margin-left:15px;
  2116. }
  2117. }
  2118. }
  2119. .dialog-material-max-box{
  2120. .dialog-material-button-box{
  2121. display: flex;
  2122. .dialog-material-text{
  2123. margin-left:20px;
  2124. color:#333333;
  2125. font-size:14px;
  2126. line-height:40px;
  2127. }
  2128. }
  2129. .dialog-material-list-box:nth-child(1){
  2130. margin-top:0;
  2131. }
  2132. .dialog-material-list-box{
  2133. margin-top:20px;
  2134. div{
  2135. height:40px;
  2136. width:550px;
  2137. display: flex;
  2138. img{
  2139. width:16px;
  2140. height:14px;
  2141. margin:11px 23px 13px 0;
  2142. }
  2143. p:nth-child(2){
  2144. flex:1;
  2145. display:block;
  2146. overflow:hidden;
  2147. text-overflow:ellipsis;
  2148. white-space:nowrap;
  2149. }
  2150. p:nth-child(3){
  2151. color:#0183FA;
  2152. font-size:14px;
  2153. cursor: pointer;
  2154. margin-left:40px;
  2155. }
  2156. p:nth-child(4){
  2157. color:#0183FA;
  2158. font-size:14px;
  2159. cursor: pointer;
  2160. margin-left:40px;
  2161. }
  2162. }
  2163. .dialog-material-list-null{
  2164. width:450px;
  2165. text-align: center;
  2166. color:#999;
  2167. font-size:14px;
  2168. }
  2169. }
  2170. }
  2171. .dialog-table-max-box-look{
  2172. width:1040px!important;
  2173. }
  2174. .dialog-table-max-box{
  2175. width:747px;
  2176. height:357px;
  2177. display: flex;
  2178. flex-direction: column;
  2179. flex:1;
  2180. /*background: #A11DDF;*/
  2181. overflow: hidden;
  2182. .dialog-table-box{
  2183. margin-top:20px;
  2184. display: flex;
  2185. flex-direction: column;
  2186. flex:1;
  2187. overflow: hidden;
  2188. .dialog-table-title-box{
  2189. display: flex;
  2190. border:1px solid #e0e0e0;
  2191. border-bottom:none;
  2192. img{
  2193. width:14px;
  2194. height:14px;
  2195. margin:18px 12px 18px 12px;
  2196. }
  2197. .dialog-table-title-p{
  2198. line-height:50px;
  2199. flex:1;
  2200. font-size:16px;
  2201. }
  2202. .dialog-table-title-button{
  2203. width:70px;
  2204. height:30px;
  2205. line-height:28px;
  2206. margin:10px 26px;
  2207. }
  2208. }
  2209. }
  2210. }
  2211. }
  2212. }
  2213. .inspectionPlan-dialog-dept-box{
  2214. display: flex;
  2215. overflow: hidden;
  2216. height:610px;
  2217. margin-right:30px;
  2218. .el-table__empty-text{
  2219. background-size: 24%!important;
  2220. }
  2221. .dept-table-title-box{
  2222. display: flex;
  2223. padding:0 20px;
  2224. background: rgba(1,131,250,0.1);
  2225. p{
  2226. flex:1;
  2227. color:#0183FA;
  2228. font-size:16px;
  2229. line-height:40px;
  2230. }
  2231. p:nth-child(1){
  2232. text-align: left;
  2233. }
  2234. p:nth-child(2){
  2235. text-align: right;
  2236. }
  2237. }
  2238. .dept-table-max-box{
  2239. border: 1px solid #e0e0e0;
  2240. flex:1;
  2241. display: flex;
  2242. flex-direction: column;
  2243. overflow: hidden;
  2244. padding:20px;
  2245. .form-index{
  2246. .el-input__inner{
  2247. border-right:none;
  2248. padding-right:0;
  2249. }
  2250. .el-input-group__append{
  2251. background: #fff;
  2252. cursor: pointer;
  2253. padding:0 10px;
  2254. }
  2255. }
  2256. input{
  2257. border: 1px solid #DCDFE6;
  2258. }
  2259. }
  2260. .left-max-box{
  2261. height:610px;
  2262. display: flex;
  2263. flex-direction: column;
  2264. overflow: hidden;
  2265. width:475px;
  2266. margin-right:20px;
  2267. }
  2268. .right-max-box{
  2269. height:610px;
  2270. display: flex;
  2271. flex-direction: column;
  2272. overflow: hidden;
  2273. width:755px;
  2274. }
  2275. }
  2276. .inspectionPlan-dialog-sub-box{
  2277. display: flex;
  2278. overflow: hidden;
  2279. height:610px;
  2280. margin-right:30px;
  2281. .el-table__empty-text{
  2282. background-size: 30%!important;
  2283. }
  2284. .dept-table-title-box{
  2285. display: flex;
  2286. padding:0 20px;
  2287. background: rgba(1,131,250,0.1);
  2288. p{
  2289. flex:1;
  2290. color:#0183FA;
  2291. font-size:16px;
  2292. line-height:40px;
  2293. }
  2294. p:nth-child(1){
  2295. text-align: left;
  2296. }
  2297. p:nth-child(2){
  2298. text-align: right;
  2299. }
  2300. }
  2301. .dept-table-max-box{
  2302. border: 1px solid #e0e0e0;
  2303. flex:1;
  2304. display: flex;
  2305. flex-direction: column;
  2306. overflow: hidden;
  2307. padding:20px;
  2308. .form-index{
  2309. .el-input__inner{
  2310. border-right:none;
  2311. padding-right:0;
  2312. }
  2313. .el-input-group__append{
  2314. background: #fff;
  2315. cursor: pointer;
  2316. padding:0 10px;
  2317. }
  2318. }
  2319. input{
  2320. border: 1px solid #DCDFE6;
  2321. }
  2322. }
  2323. .left-max-box{
  2324. height:610px;
  2325. display: flex;
  2326. flex-direction: column;
  2327. overflow: hidden;
  2328. width:588px;
  2329. }
  2330. .right-max-box{
  2331. height:610px;
  2332. display: flex;
  2333. flex-direction: column;
  2334. overflow: hidden;
  2335. width:588px;
  2336. flex:1;
  2337. }
  2338. .center-box{
  2339. width:68px;
  2340. p{
  2341. display: block;
  2342. border-radius:50%;
  2343. width:30px;
  2344. height:30px;
  2345. line-height:30px;
  2346. text-align: center;
  2347. background: rgba(245,245,245,1);
  2348. color:rgba(62,62,62,1);
  2349. cursor: pointer;
  2350. font-size:16px;
  2351. }
  2352. p:nth-child(1){
  2353. margin:270px 19px 0;
  2354. }
  2355. p:nth-child(2){
  2356. margin:14px 19px 0;
  2357. }
  2358. p:hover{
  2359. color:#fff;
  2360. background: #0183fa;
  2361. }
  2362. }
  2363. }
  2364. .inspectionPlan-dialog-user-box{
  2365. display: flex;
  2366. overflow: hidden;
  2367. height:610px;
  2368. margin-right:30px;
  2369. .el-table__empty-text{
  2370. background-size: 30%!important;
  2371. }
  2372. .dept-table-title-box{
  2373. display: flex;
  2374. padding:0 20px;
  2375. background: rgba(1,131,250,0.1);
  2376. p{
  2377. flex:1;
  2378. color:#0183FA;
  2379. font-size:16px;
  2380. line-height:40px;
  2381. }
  2382. p:nth-child(1){
  2383. text-align: left;
  2384. }
  2385. p:nth-child(2){
  2386. text-align: right;
  2387. }
  2388. }
  2389. .dept-table-max-box{
  2390. border: 1px solid #e0e0e0;
  2391. flex:1;
  2392. display: flex;
  2393. flex-direction: column;
  2394. overflow: hidden;
  2395. padding:20px;
  2396. .form-index{
  2397. .el-input__inner{
  2398. border-right:none;
  2399. padding-right:0;
  2400. }
  2401. .el-input-group__append{
  2402. background: #fff;
  2403. cursor: pointer;
  2404. padding:0 10px;
  2405. }
  2406. }
  2407. input{
  2408. border: 1px solid #DCDFE6;
  2409. }
  2410. }
  2411. .left-max-box{
  2412. height:610px;
  2413. display: flex;
  2414. flex-direction: column;
  2415. overflow: hidden;
  2416. width:588px;
  2417. }
  2418. .right-max-box{
  2419. height:610px;
  2420. display: flex;
  2421. flex-direction: column;
  2422. overflow: hidden;
  2423. width:588px;
  2424. flex:1;
  2425. }
  2426. .center-box{
  2427. width:68px;
  2428. p{
  2429. display: block;
  2430. border-radius:50%;
  2431. width:30px;
  2432. height:30px;
  2433. line-height:30px;
  2434. text-align: center;
  2435. background: rgba(245,245,245,1);
  2436. color:rgba(62,62,62,1);
  2437. cursor: pointer;
  2438. font-size:16px;
  2439. }
  2440. p:nth-child(1){
  2441. margin:270px 19px 0;
  2442. }
  2443. p:nth-child(2){
  2444. margin:14px 19px 0;
  2445. }
  2446. p:hover{
  2447. color:#fff;
  2448. background: #0183fa;
  2449. }
  2450. }
  2451. }
  2452. .inspectionPlan-dialog-look-box{
  2453. display: flex;
  2454. overflow: hidden;
  2455. height:610px;
  2456. margin-right:30px;
  2457. .iframe-box{
  2458. flex:1;
  2459. }
  2460. }
  2461. }
  2462. </style>