addDialog.vue 79 KB

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