addDialog.vue 56 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571
  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" v-if="dialogForm.checkRange == 2" @click="dialogClickType(2)">{{lookInfoType?'查看':'选择学院'}}</p>
  65. <p class="inquire-button-one button-p" 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="width:450px;">
  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">
  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">下载</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>
  112. </div>
  113. </div>
  114. <div class="inspectionPlan-dialog-dept-box" v-show="addDialogBoxType==2">
  115. <div class="left-max-box">
  116. <div class="dept-table-title-box">
  117. <p>已选学院</p>
  118. <p v-if="!lookInfoType">{{deptNumLeft}}/{{deptTotalLeft}}</p>
  119. <p v-if="lookInfoType">{{deptNumLeft}}</p>
  120. </div>
  121. <div class="dept-table-max-box">
  122. <el-form v-if="!lookInfoType" :model="deptQueryParamsLeft" class="form-box" ref="queryForm" :inline="true" label-width="50px">
  123. <el-form-item label="" prop="searchValue" class="form-index">
  124. <el-input
  125. maxLength="30"
  126. v-model="deptQueryParamsLeft.searchValue"
  127. placeholder="搜索学院"
  128. clearable
  129. style="width: 240px">
  130. <p class="el-icon-search" slot="append" @click="deptGetListLeft"></p>
  131. </el-input>
  132. </el-form-item>
  133. <el-form-item style="margin-right:0;">
  134. <p class="inquire-button-one" @click="deptResetQueryLeft" style="width:60px;margin-right:0;">重置</p>
  135. </el-form-item>
  136. </el-form>
  137. <el-table ref="leftDeptTable" border :data="deptTableListLeft" @selection-change="deptChange" :row-key="getDeptRowKeys">
  138. <el-table-column v-if="!lookInfoType" type="selection" width="50" :reserve-selection="true" align="center"/>
  139. <el-table-column label="学院" align="center" prop="deptName" show-overflow-tooltip/>
  140. </el-table>
  141. </div>
  142. </div>
  143. <div class="right-max-box">
  144. <div class="dept-table-title-box">
  145. <p>已选实验室{{deptCheckData.subNum}}间</p>
  146. <p></p>
  147. </div>
  148. <div class="dept-table-max-box">
  149. <el-form v-if="!lookInfoType" :model="deptQueryParamsRight" class="form-box" ref="queryForm" :inline="true" label-width="50px">
  150. <el-form-item label="" prop="typeId">
  151. <el-select v-model="deptQueryParamsRight.typeId" clearable placeholder="选择分类" style="width: 120px">
  152. <el-option
  153. v-for="item in classTypeList"
  154. :key="item.id"
  155. :label="item.typeName"
  156. :value="item.id">
  157. </el-option>
  158. </el-select>
  159. </el-form-item>
  160. <el-form-item label="" prop="level">
  161. <el-select v-model="deptQueryParamsRight.level" clearable placeholder="选择分级" style="width: 120px">
  162. <el-option
  163. v-for="item in classifiedList"
  164. :key="item.id"
  165. :label="item.classifiedName"
  166. :value="item.id">
  167. </el-option>
  168. </el-select>
  169. </el-form-item>
  170. <el-form-item label="" prop="deptId">
  171. <el-select v-model="deptQueryParamsRight.deptId" clearable placeholder="选择学院" style="width: 120px">
  172. <el-option
  173. v-for="item in changeDeptSelectList"
  174. :key="item.deptId"
  175. :label="item.deptName"
  176. :value="item.deptId">
  177. </el-option>
  178. </el-select>
  179. </el-form-item>
  180. <el-form-item label="" prop="searchValue" class="form-index">
  181. <el-input
  182. maxLength="30"
  183. v-model="deptQueryParamsRight.searchValue"
  184. placeholder="实验室/房间号"
  185. clearable
  186. style="width: 190px">
  187. <p class="el-icon-search" slot="append" @click="deptHandleQueryRight"></p>
  188. </el-input>
  189. </el-form-item>
  190. <el-form-item style="margin-right:0;">
  191. <p class="inquire-button-one" @click="deptResetQueryRight" style="width:60px;margin-right:0;">重置</p>
  192. </el-form-item>
  193. </el-form>
  194. <el-table border :data="deptTableListRight">
  195. <el-table-column label="序号" align="center" type="index" width="60"/>
  196. <el-table-column label="实验室" align="center" prop="subjectName" show-overflow-tooltip/>
  197. <el-table-column label="楼栋楼层" align="center" prop="buildName" show-overflow-tooltip width="150"/>
  198. <el-table-column label="分类分级" align="center" prop="deptName" show-overflow-tooltip width="150">
  199. <template slot-scope="scope">
  200. <span v-for="item in classTypeList" v-if="item.id == scope.row.typeId">{{item.typeName}}</span>
  201. <span style="border-right:1px solid #E0E0E0;margin:0 10px;"></span>
  202. <span v-for="item in classifiedList" v-if="item.id == scope.row.level" :style="'color:'+item.classifiedColor+';'">{{item.classifiedName}}</span>
  203. </template>
  204. </el-table-column>
  205. <el-table-column label="学院" align="center" prop="collegeName" show-overflow-tooltip width="140"/>
  206. </el-table>
  207. <pagination layout="total, prev, pager, next, jumper"
  208. v-show="deptTotalRight>0"
  209. :total="deptTotalRight"
  210. :page.sync="deptQueryParamsRight.pageNum"
  211. :limit.sync="deptQueryParamsRight.pageSize"
  212. @pagination="deptGetListRight"
  213. />
  214. </div>
  215. </div>
  216. </div>
  217. <div class="inspectionPlan-dialog-sub-box" v-show="addDialogBoxType==3">
  218. <div v-if="!lookInfoType" class="left-max-box">
  219. <div class="dept-table-title-box">
  220. <p>待选实验室</p>
  221. <p>{{subNumLeft}}/{{subTotalLeft}}</p>
  222. </div>
  223. <div class="dept-table-max-box">
  224. <el-form :model="subQueryParamsLeft" class="form-box" ref="queryForm" :inline="true" label-width="50px">
  225. <el-form-item label="" prop="typeId">
  226. <el-select v-model="subQueryParamsLeft.typeId" clearable placeholder="选择分类" style="width: 110px">
  227. <el-option
  228. v-for="item in classTypeList"
  229. :key="item.id"
  230. :label="item.typeName"
  231. :value="item.id">
  232. </el-option>
  233. </el-select>
  234. </el-form-item>
  235. <el-form-item label="" prop="level">
  236. <el-select v-model="subQueryParamsLeft.level" clearable placeholder="选择分级" style="width: 110px">
  237. <el-option
  238. v-for="item in classifiedList"
  239. :key="item.id"
  240. :label="item.classifiedName"
  241. :value="item.id">
  242. </el-option>
  243. </el-select>
  244. </el-form-item>
  245. <el-form-item label="" prop="deptId">
  246. <el-select v-model="subQueryParamsLeft.deptId" clearable placeholder="学院" style="width: 80px">
  247. <el-option
  248. v-for="item in deptSelectList"
  249. :key="item.deptId"
  250. :label="item.deptName"
  251. :value="item.deptId">
  252. </el-option>
  253. </el-select>
  254. </el-form-item>
  255. <el-form-item label="" prop="searchValue" class="form-index">
  256. <el-input
  257. maxLength="30"
  258. v-model="subQueryParamsLeft.searchValue"
  259. placeholder="实验室/房间号"
  260. clearable
  261. style="width: 140px">
  262. <p class="el-icon-search" slot="append" @click="subHandleQueryLeft"></p>
  263. </el-input>
  264. </el-form-item>
  265. <el-form-item style="margin-right:0;">
  266. <p class="inquire-button-one" @click="subResetQueryLeft" style="width:60px;margin-right:0;">重置</p>
  267. </el-form-item>
  268. </el-form>
  269. <el-table ref="leftSubTable" border :data="subTableListLeft" @selection-change="subChangeLeft" :row-key="getSubRowKeys">
  270. <el-table-column type="selection" width="50" :reserve-selection="true" align="center"/>
  271. <el-table-column label="实验室" align="center" prop="subjectName" show-overflow-tooltip/>
  272. <el-table-column label="分类分级" align="center" prop="deptName" show-overflow-tooltip width="140">
  273. <template slot-scope="scope">
  274. <span v-for="item in classTypeList" v-if="item.id == scope.row.typeId">{{item.typeName}}</span>
  275. <span style="border-right:1px solid #E0E0E0;margin:0 10px;"></span>
  276. <span v-for="item in classifiedList" v-if="item.id == scope.row.level" :style="'color:'+item.classifiedColor+';'">{{item.classifiedName}}</span>
  277. </template>
  278. </el-table-column>
  279. <el-table-column label="学院" align="center" prop="collegeName" show-overflow-tooltip width="150"/>
  280. </el-table>
  281. <pagination layout="total, prev, pager, next, jumper"
  282. v-show="subTotalLeft>0"
  283. :total="subTotalLeft"
  284. :page.sync="subQueryParamsLeft.pageNum"
  285. :limit.sync="subQueryParamsLeft.pageSize"
  286. @pagination="subGetListLeft"/>
  287. </div>
  288. </div>
  289. <div v-if="!lookInfoType" class="center-box">
  290. <p class="el-icon-arrow-left" @click="subArrowButton(1)"></p>
  291. <p class="el-icon-arrow-right" @click="subArrowButton(2)"></p>
  292. </div>
  293. <div class="right-max-box">
  294. <div class="dept-table-title-box">
  295. <p>已选实验室</p>
  296. <p v-if="!lookInfoType">{{subNumRight}}/{{subTotalRight}}</p>
  297. <p v-if="lookInfoType">{{subTotalRight}}</p>
  298. </div>
  299. <div class="dept-table-max-box">
  300. <el-form v-if="!lookInfoType" :model="subQueryParamsRight" class="form-box" ref="queryForm" :inline="true" label-width="50px">
  301. <el-form-item label="" prop="typeId">
  302. <el-select v-model="subQueryParamsRight.typeId" clearable placeholder="选择分类" style="width: 110px">
  303. <el-option
  304. v-for="item in classTypeList"
  305. :key="item.id"
  306. :label="item.typeName"
  307. :value="item.id">
  308. </el-option>
  309. </el-select>
  310. </el-form-item>
  311. <el-form-item label="" prop="level">
  312. <el-select v-model="subQueryParamsRight.level" clearable placeholder="选择分级" style="width: 110px">
  313. <el-option
  314. v-for="item in classifiedList"
  315. :key="item.id"
  316. :label="item.classifiedName"
  317. :value="item.id">
  318. </el-option>
  319. </el-select>
  320. </el-form-item>
  321. <el-form-item label="" prop="deptId">
  322. <el-select v-model="subQueryParamsRight.deptId" clearable placeholder="学院" style="width: 80px">
  323. <el-option
  324. v-for="item in deptSelectList"
  325. :key="item.deptId"
  326. :label="item.deptName"
  327. :value="item.deptId">
  328. </el-option>
  329. </el-select>
  330. </el-form-item>
  331. <el-form-item label="" prop="searchValue" class="form-index">
  332. <el-input
  333. maxLength="30"
  334. v-model="subQueryParamsRight.searchValue"
  335. placeholder="实验室/房间号"
  336. clearable
  337. style="width: 140px">
  338. <p class="el-icon-search" slot="append" @click="subHandleQueryRight"></p>
  339. </el-input>
  340. </el-form-item>
  341. <el-form-item style="margin-right:0;">
  342. <p class="inquire-button-one" @click="subResetQueryRight" style="width:60px;margin-right:0;">重置</p>
  343. </el-form-item>
  344. </el-form>
  345. <el-table ref="rightSubTable" border :data="subTableListRight" @selection-change="subChangeRight" :row-key="getSubRowKeys">
  346. <el-table-column v-if="!lookInfoType" type="selection" width="50" :reserve-selection="true" align="center"/>
  347. <el-table-column label="实验室" align="center" prop="subjectName" show-overflow-tooltip/>
  348. <el-table-column label="分类分级" align="center" prop="deptName" show-overflow-tooltip width="140">
  349. <template slot-scope="scope">
  350. <span v-for="item in classTypeList" v-if="item.id == scope.row.typeId">{{item.typeName}}</span>
  351. <span style="border-right:1px solid #E0E0E0;margin:0 10px;"></span>
  352. <span v-for="item in classifiedList" v-if="item.id == scope.row.level" :style="'color:'+item.classifiedColor+';'">{{item.classifiedName}}</span>
  353. </template>
  354. </el-table-column>
  355. <el-table-column label="学院" align="center" prop="collegeName" show-overflow-tooltip width="150"/>
  356. </el-table>
  357. <pagination layout="total, prev, pager, next, jumper"
  358. v-show="subTotalRight>0"
  359. :total="subTotalRight"
  360. :page.sync="subQueryParamsRight.pageNum"
  361. :limit.sync="subQueryParamsRight.pageSize"
  362. @pagination="subGetListRight"/>
  363. </div>
  364. </div>
  365. </div>
  366. <div class="inspectionPlan-dialog-look-box" v-show="addDialogBoxType==5">
  367. <iframe
  368. class="iframe-box"
  369. :src="iframeSrc" scrolling="auto" frameborder="0">
  370. </iframe>
  371. </div>
  372. <div slot="footer" class="dialog-footer dialog-footer-box" style="display: flex">
  373. <p class="dialog-footer-button-null"></p>
  374. <p class="dialog-footer-button-info" @click="addDialogOff">{{addDialogBoxType==1?'取消':'返回'}}</p>
  375. <p class="dialog-footer-button-primary" v-if="!lookInfoType" @click="addUserButton">确定</p>
  376. <p class="dialog-footer-button-null"></p>
  377. </div>
  378. </el-dialog>
  379. </template>
  380. <script>
  381. import { getToken } from "@/utils/auth";
  382. import { listDepartments } from "@/api/system/dept";
  383. import { listClassifiedAll } from "@/api/laboratory/classified";
  384. import { listClasstypeAll } from "@/api/laboratory/classtype";
  385. import { getHistoryPlanTitles,checkGroupFind,findUserList,
  386. getAllSubNum,isSCollege,conditionCollegeInfo,findSubInfoByDeptIds,
  387. checkPlanAdd,conditionSubjectInfo,findCheckPlan,checkPlanUpdate,
  388. hideHistoryPlanTitle } from '@/api/safetyCheck/index'
  389. export default {
  390. name: 'addDialog',
  391. props:{
  392. addDialogData:{},
  393. },
  394. data(){
  395. return{
  396. loading:false,
  397. uploadImgUrl: this.uploadUrl(), // 上传的图片服务器地址
  398. headers: {
  399. Authorization: "Bearer " + getToken(),
  400. },
  401. addDialogTitle:"",
  402. addDialogType:true,
  403. //弹窗内容状态
  404. addDialogBoxType:1,
  405. // 设置只能选择当前日期及之后的日期
  406. pickerOptions: {
  407. disabledDate(time) {
  408. return time.getTime() < Date.now() - 8.64e7;//如果没有后面的-8.64e7就是不可以选择今天的
  409. }
  410. },
  411. //标题快选数据
  412. quickSelectionList:[],
  413. //上传文件名称暂存
  414. upDataName:"",
  415. //巡查范围列表
  416. dialogRangeOptions:[],
  417. //学院数量
  418. collegeNum:0,
  419. //学院实验室数量
  420. collegeSubNum:0,
  421. //学院选择页面已选数据
  422. deptCheckData:{
  423. deptIds:[],
  424. deptNum:0,
  425. subNum:0
  426. },
  427. //实验室选择页面已选数据
  428. subCheckData:{
  429. subIds:[]
  430. },
  431. //巡查院系列表
  432. deptList:[],
  433. //巡查实验室列表
  434. subList:[],
  435. //提交数据
  436. dialogForm:{
  437. title:"",//奥体
  438. checkType:"2",//检查类型
  439. dateRange:[],//时间
  440. checkRange:"",//检查范围
  441. checkDemand:"",//检查要点
  442. schoolSubCheckNum:0,//学校实验室数量
  443. collegeNum:0,//学院数量
  444. collegeSubNum:0,//学院实验室数量
  445. subCheckNum:0,//实验室数量
  446. subjectNum:0,
  447. collegeIds:[],
  448. uploadDtoList:[],
  449. },
  450. // 表单校验
  451. rules: {
  452. title: [
  453. { required: true, message: "请输入计划标题", trigger: "change" },
  454. { required: true, message: "请输入计划标题", validator: this.spaceJudgment, trigger: "change" },
  455. ],
  456. dateRange: [
  457. { required: true, message: "请选择检查周期", trigger: "change" },
  458. ],
  459. checkRange: [
  460. { required: true, message: "请选择检查范围", trigger: "change" },
  461. ],
  462. },
  463. classTypeList:[],
  464. classifiedList:[],
  465. deptSelectList:[],
  466. //查看状态
  467. lookInfoType:false,
  468. /*===================================学院选择相关===================================*/
  469. changeDeptSelectList:[],
  470. deptQueryParamsLeft:{
  471. searchValue:"",
  472. },
  473. deptTableListLeft:[],
  474. deptTotalLeft:0,
  475. deptNumLeft:0,
  476. deptIdsLeft:[],
  477. deptQueryParamsRight:{
  478. pageNum:1,
  479. pageSize:20,
  480. searchValue:"",
  481. deptId:"",
  482. deptIds:"",
  483. level:"",
  484. typeId:"",
  485. },
  486. deptTableListRight:[],
  487. deptTotalRight:0,
  488. /*===================================实验室选择相关===================================*/
  489. subQueryParamsLeft:{
  490. pageNum:1,
  491. pageSize:20,
  492. typeId:"",
  493. level:"",
  494. deptId:"",
  495. searchValue:"",
  496. filtType:1
  497. },
  498. subTableListLeft:[],
  499. subTotalLeft:0,
  500. subNumLeft:0,
  501. subIdsLeft:[],
  502. subQueryParamsRight:{
  503. pageNum:1,
  504. pageSize:20,
  505. typeId:"",
  506. level:"",
  507. deptId:"",
  508. searchValue:"",
  509. filtType:2
  510. },
  511. subTableListRight:[],
  512. subTotalRight:0,
  513. subNumRight:0,
  514. subIdsRight:[],
  515. dialogTableSubList:[],
  516. dialogTableSubDataList:[],
  517. /*===================================文档预览===================================*/
  518. iframeSrc:"",
  519. /*===================================弹窗相关结束===================================*/
  520. }
  521. },
  522. created(){
  523. this.$set(this,'addDialogTitle',this.addDialogData.title);
  524. this.$set(this,'lookInfoType',this.addDialogData.lookInfoType);
  525. },
  526. mounted(){
  527. this.initializationInterface();
  528. },
  529. methods:{
  530. //初始化接口
  531. initializationInterface(){
  532. //获取历史标题
  533. this.getHistoryPlanTitles();
  534. //获取学院列表
  535. listDepartments().then(response => {
  536. this.deptSelectList = response.data;
  537. });
  538. /**获取分级*/
  539. listClassifiedAll().then(response=>{
  540. this.classifiedList = response.data
  541. })
  542. /**获取分类*/
  543. listClasstypeAll().then(response=>{
  544. this.classTypeList = response.data;
  545. });
  546. //查询当前用户是否是院级
  547. isSCollege().then(response=>{
  548. if(response.data.userFlg){
  549. // 院级
  550. this.$set(this,'dialogRangeOptions',[{label:"学院",value:2},{label:"实验室",value:3}]);
  551. }else{
  552. // 校级
  553. this.$set(this,'dialogRangeOptions',[{label:"全校",value:1},{label:"学院",value:2},{label:"实验室",value:3}]);
  554. }
  555. });
  556. if(!this.addDialogData.addType){
  557. //编辑-详情查询
  558. findCheckPlan({id:this.addDialogData.id}).then(response => {
  559. //处理基础数据
  560. let obj = {
  561. id:response.data.id,
  562. title:response.data.title,
  563. checkType:response.data.checkType,
  564. dateRange:[response.data.cycleStartTime,response.data.cycleEndTime],
  565. checkRange:response.data.checkRange,
  566. schoolSubCheckNum:response.data.checkRange == 1?response.data.subjectNum:0,
  567. collegeSubNum:response.data.checkRange == 2?response.data.subjectNum:0,
  568. collegeNum:response.data.checkRange == 2?response.data.collegeNum:0,
  569. subCheckNum:response.data.checkRange == 3?response.data.subjectNum:0,
  570. collegeIds:response.data.collegeIds?response.data.collegeIds.split(','):[],
  571. checkDemand:response.data.checkDemand,
  572. uploadDtoList:response.data.uploadDtoList,
  573. }
  574. this.$set(this,'dialogForm',obj);
  575. //处理实验室数据
  576. let subList = response.data.subIds?response.data.subIds.split(','):[];
  577. let subDataList = [];
  578. for(let i=0;i<subList.length;i++){
  579. subList[i] = parseInt(subList[i]);
  580. let obj = {
  581. subId:subList[i],
  582. }
  583. subDataList.push(obj);
  584. }
  585. this.$set(this,'dialogTableSubList',subDataList);
  586. this.$set(this.subCheckData,'subIds',subList);
  587. });
  588. }
  589. },
  590. //选中检查范围
  591. rangeChange(val){
  592. if(val == 1){
  593. //全校
  594. getAllSubNum().then(response => {
  595. this.$set(this.dialogForm,'schoolSubCheckNum',response.data.subCount);
  596. })
  597. }
  598. },
  599. //确定按钮
  600. addUserButton(){
  601. let self = this;
  602. if(this.addDialogBoxType == 1){
  603. //提交
  604. this.$refs["addDialogForm"].validate(valid => {
  605. if (valid) {
  606. //检查范围内是否选择实验室获学院
  607. if(this.dialogForm.checkRange == 2){
  608. if(!this.dialogForm.collegeIds[0]){
  609. this.msgError('请选择学院')
  610. return
  611. }
  612. }else if(this.dialogForm.checkRange == 3){
  613. if(!this.subCheckData.subIds[0]){
  614. this.msgError('请选择实验室')
  615. return
  616. }
  617. }
  618. let obj = {
  619. title:this.dialogForm.title,
  620. checkType:this.dialogForm.checkType,
  621. cycleStartTime:this.dialogForm.dateRange[0],
  622. cycleEndTime:this.dialogForm.dateRange[1],
  623. checkRange:this.dialogForm.checkRange,//检查范围
  624. subjectNum:this.dialogForm.checkRange == 1?this.dialogForm.schoolSubCheckNum:(
  625. this.dialogForm.checkRange == 2?this.dialogForm.collegeSubNum:(
  626. this.dialogForm.checkRange == 3?this.dialogForm.subCheckNum:0)),//实验室数量
  627. collegeIds:this.dialogForm.checkRange==2?this.dialogForm.collegeIds+'':'',//学院ID转换字符串
  628. collegeNum:this.dialogForm.checkRange==2?this.dialogForm.collegeNum:0,//学院数量
  629. subIds:this.dialogForm.checkRange == 3?this.subCheckData.subIds+'':'',//实验室ID
  630. checkDemand:this.dialogForm.checkDemand,//检查要求
  631. uploadDtoList:this.dialogForm.uploadDtoList,//检查要求
  632. };
  633. if(this.addDialogData.id){
  634. //编辑
  635. for(let i=0;i<obj.uploadDtoList.length;i++){
  636. obj.uploadDtoList[i].keyId = this.addDialogData.id;
  637. }
  638. obj.id = this.addDialogData.id;
  639. checkPlanUpdate(obj).then(response => {
  640. this.msgSuccess(response.msg)
  641. this.$parent.addDialogOpen(5)
  642. })
  643. }else{
  644. //新增
  645. checkPlanAdd(obj).then(response => {
  646. this.msgSuccess(response.msg)
  647. this.$parent.addDialogOpen(5)
  648. })
  649. }
  650. }
  651. })
  652. }else if(this.addDialogBoxType == 2){
  653. // 学院选择页面确定
  654. this.$set(this.dialogForm,'collegeNum',this.deptCheckData.deptNum);
  655. this.$set(this.dialogForm,'collegeSubNum',this.deptCheckData.subNum);
  656. this.$set(this.dialogForm,'collegeIds',this.deptCheckData.deptIds);
  657. this.dialogClickType(1);
  658. }else if(this.addDialogBoxType == 3){
  659. //实验室选择页面确定
  660. let list = [];
  661. let ids = [];
  662. for(let o=0;o<self.dialogTableSubDataList.length;o++){
  663. ids.push(self.dialogTableSubDataList[o].subId)
  664. let obj = {
  665. subId:self.dialogTableSubDataList[o].subId,
  666. subjectName:self.dialogTableSubDataList[o].subjectName,
  667. typeId:self.dialogTableSubDataList[o].typeId,
  668. level:self.dialogTableSubDataList[o].level,
  669. collegeName:self.dialogTableSubDataList[o].collegeName,
  670. };
  671. list.push(obj)
  672. }
  673. this.$set(this.subCheckData,'subIds',ids);
  674. this.$set(this.dialogForm,'subCheckNum',list.length);
  675. this.$set(this,'dialogTableSubList',list);
  676. this.dialogClickType(1);
  677. }
  678. },
  679. /*===================================弹窗相关===================================*/
  680. //弹窗关闭
  681. addDialogAllOff(){
  682. this.$parent.addDialogOpen(4)
  683. },
  684. addDialogOff(){
  685. if(this.addDialogBoxType == 1){
  686. this.$parent.addDialogOpen(4)
  687. }else{
  688. this.dialogClickType(1);
  689. }
  690. },
  691. //弹窗状态切换
  692. dialogClickType(type,item){
  693. let self = this;
  694. if(type == 5){
  695. this.$set(this,'iframeSrc',this.urlJudge(item.fileUrl));
  696. this.$set(this,'addDialogBoxType',type);
  697. }else if(type == 2){
  698. //选择学院
  699. this.$set(this,'addDialogBoxType',type);
  700. this.deptResetQueryLeft();
  701. if(this.dialogForm.collegeIds[0]){
  702. this.$nextTick(() => {
  703. conditionCollegeInfo(self.deptQueryParamsLeft).then(response => {
  704. if(this.lookInfoType){
  705. //查看时
  706. let list = [];
  707. for(let i=0;i<response.data.length;i++){
  708. let num = 0;
  709. for(let o=0;o<self.dialogForm.collegeIds.length;o++){
  710. if(response.data[i].deptId == self.dialogForm.collegeIds[o]){
  711. num++
  712. }
  713. }
  714. if(num == 0){
  715. response.data.splice(i,1);
  716. i--
  717. }
  718. }
  719. self.$set(self,'deptTableListLeft',response.data);
  720. self.$set(self,'deptTotalLeft',response.data.length);
  721. let obj = JSON.parse(JSON.stringify(this.deptQueryParamsRight));
  722. obj.deptIds = self.dialogForm.collegeIds;
  723. findSubInfoByDeptIds(obj).then(response => {
  724. this.deptTotalRight = response.total;
  725. this.deptTableListRight = response.rows;
  726. this.$set(this.deptCheckData,'subNum',response.total);
  727. this.$set(this,'deptNumLeft',self.dialogForm.collegeIds.length);
  728. });
  729. }else{
  730. //新增-编辑时
  731. self.$set(self,'deptTableListLeft',response.data);
  732. self.$set(self,'deptTotalLeft',response.data.length);
  733. for(let i=0;i<self.dialogForm.collegeIds.length;i++){
  734. for(let o=0;o<self.deptTableListLeft.length;o++){
  735. if(self.dialogForm.collegeIds[i] == self.deptTableListLeft[o].deptId){
  736. self.$refs.leftDeptTable.toggleRowSelection(self.deptTableListLeft[o]);
  737. }
  738. }
  739. }
  740. }
  741. })
  742. })
  743. }
  744. }else if(type == 3){
  745. //选择实验室
  746. this.$set(self,'dialogTableSubDataList',JSON.parse(JSON.stringify(this.dialogTableSubList)));
  747. this.subResetQueryLeft();
  748. this.subResetQueryRight();
  749. this.$set(this,'addDialogBoxType',type);
  750. }else{
  751. this.$set(this,'addDialogBoxType',type);
  752. }
  753. },
  754. //选中对应周期
  755. checkTime(type){
  756. let myDate = new Date();
  757. let year = myDate.getFullYear();
  758. let month = myDate.getMonth()+1;
  759. let day = myDate.getDate();
  760. let minTime = year + '-' + month + '-' + day
  761. let maxTime = '';
  762. if(type==1){
  763. maxTime = this.getMonthFinalDay(year,month);
  764. }else if(type==2){
  765. if(month>0 && month<4){
  766. maxTime = this.getMonthFinalDay(year,3);
  767. }else if(month>3 && month<7){
  768. maxTime = this.getMonthFinalDay(year,6);
  769. }else if(month>6 && month<10){
  770. maxTime = this.getMonthFinalDay(year,9);
  771. }else if(month>9 && month<13){
  772. maxTime = this.getMonthFinalDay(year,12);
  773. }
  774. }else if(type==3){
  775. maxTime = this.getMonthFinalDay(year,12);
  776. }
  777. let timeListA = minTime.split('-')
  778. minTime = timeListA[0]+'-'+(timeListA[1]<10?'0'+timeListA[1]:timeListA[1])+'-'+(timeListA[2]<10?'0'+timeListA[1]:timeListA[2])
  779. let timeListB = maxTime.split('-')
  780. maxTime = timeListB[0]+'-'+(timeListB[1]<10?'0'+timeListB[1]:timeListB[1])+'-'+(timeListB[2]<10?'0'+timeListB[1]:timeListB[2])
  781. this.$set(this.dialogForm,'dateRange',[minTime,maxTime]);
  782. },
  783. //返回指定月份最后一天
  784. getMonthFinalDay(year,month){
  785. var day='';
  786. if(year==null || year==undefined || year==''){
  787. year = new Date().getFullYear();
  788. }
  789. if(month==null || month==undefined || month==''){
  790. month = new Date().getMonth()+1;
  791. }
  792. day = new Date(new Date(year,month).setDate(0)).getDate();
  793. return year+"-"+month+"-"+day;
  794. },
  795. //删除弹窗上传文件
  796. delUpData(index){
  797. this.dialogForm.uploadDtoList.splice(index,1)
  798. },
  799. //快捷选中标题
  800. checkTitle(item){
  801. this.$set(this.dialogForm,'title',item.title);
  802. },
  803. /*===================================学院选择相关===================================*/
  804. //重置
  805. deptResetQueryLeft(){
  806. this.$set(this,'deptQueryParamsLeft',{ searchValue:"", });
  807. this.$set(this,'deptNumLeft',0);
  808. this.$set(this,'deptIdsLeft',[]);
  809. this.$refs.leftDeptTable.clearSelection();
  810. this.deptGetListLeft();
  811. },
  812. //查询接口
  813. deptGetListLeft(){
  814. conditionCollegeInfo(this.deptQueryParamsLeft).then(response => {
  815. this.$set(this,'deptTableListLeft',response.data);
  816. this.$set(this,'deptTotalLeft',response.data.length);
  817. })
  818. },
  819. //查询
  820. deptHandleQueryRight(){
  821. this.deptGetListRight();
  822. },
  823. //重置
  824. deptResetQueryRight(){
  825. this.$set(this,'deptQueryParamsRight',{
  826. pageNum:1,
  827. pageSize:20,
  828. searchValue:"",
  829. deptId:"",
  830. deptIds:"",
  831. level:"",
  832. typeId:"",
  833. });
  834. this.deptHandleQueryRight();
  835. },
  836. //查询接口
  837. deptGetListRight(){
  838. let obj = JSON.parse(JSON.stringify(this.deptQueryParamsRight));
  839. if(this.lookInfoType){
  840. obj.deptIds = this.dialogForm.collegeIds;
  841. }else{
  842. obj.deptIds = this.deptIdsLeft;
  843. }
  844. findSubInfoByDeptIds(obj).then(response => {
  845. this.deptTotalRight = response.total;
  846. this.deptTableListRight = response.rows;
  847. });
  848. },
  849. /*===================================实验室选择相关===================================*/
  850. //查询
  851. subHandleQueryLeft(){
  852. this.$set(this.subQueryParamsLeft,'pageNum',1);
  853. this.subGetListLeft();
  854. },
  855. //重置
  856. subResetQueryLeft(){
  857. this.$set(this,'subQueryParamsLeft',{
  858. pageNum:1,
  859. pageSize:20,
  860. typeId:"",
  861. level:"",
  862. deptId:"",
  863. searchValue:"",
  864. filtType:1
  865. });
  866. this.subHandleQueryLeft();
  867. },
  868. //查询接口
  869. subGetListLeft(){
  870. let self = this;
  871. let leftObj = JSON.parse(JSON.stringify(this.subQueryParamsLeft));
  872. leftObj.selectedSubIds = [];
  873. for(let i=0;i<self.dialogTableSubDataList.length;i++){
  874. leftObj.selectedSubIds.push(self.dialogTableSubDataList[i].subId);
  875. }
  876. conditionSubjectInfo(leftObj).then(response => {
  877. this.subTotalLeft = response.total;
  878. this.subTableListLeft = response.rows;
  879. });
  880. },
  881. //查询
  882. subHandleQueryRight(){
  883. this.$set(this.subQueryParamsRight,'pageNum',1);
  884. this.subGetListRight();
  885. },
  886. //重置
  887. subResetQueryRight(){
  888. this.$set(this,'subQueryParamsRight',{
  889. pageNum:1,
  890. pageSize:20,
  891. typeId:"",
  892. level:"",
  893. deptId:"",
  894. searchValue:"",
  895. filtType:2
  896. });
  897. this.subHandleQueryRight();
  898. },
  899. //查询接口
  900. subGetListRight(){
  901. let self = this;
  902. let rightObj = JSON.parse(JSON.stringify(this.subQueryParamsRight));
  903. rightObj.subIds = [];
  904. for(let i=0;i<self.dialogTableSubDataList.length;i++){
  905. rightObj.subIds.push(self.dialogTableSubDataList[i].subId);
  906. }
  907. conditionSubjectInfo(rightObj).then(response => {
  908. this.subTotalRight = response.total;
  909. this.subTableListRight = response.rows;
  910. });
  911. },
  912. //实验室穿梭按钮
  913. subArrowButton(type){
  914. if(type == 1){
  915. if(this.$refs.rightSubTable.selection[0]){
  916. let list = JSON.parse(JSON.stringify(this.dialogTableSubDataList));
  917. let subIdsRight = JSON.parse(JSON.stringify(this.$refs.rightSubTable.selection))
  918. for(let i=0;i<subIdsRight.length;i++){
  919. for(let s=0;s<list.length;s++){
  920. if(subIdsRight[i].subId == list[s].subId){
  921. list.splice(s,1);
  922. s--
  923. }
  924. }
  925. }
  926. this.$set(this,'dialogTableSubDataList',list);
  927. this.$refs.rightSubTable.clearSelection();
  928. this.subGetListLeft();
  929. this.subGetListRight();
  930. }else{
  931. this.msgError('请先勾选右侧列表')
  932. }
  933. }else if(type == 2){
  934. if(this.$refs.leftSubTable.selection[0]){
  935. let list = JSON.parse(JSON.stringify(this.dialogTableSubDataList));
  936. let subIdsLeft = JSON.parse(JSON.stringify(this.$refs.leftSubTable.selection))
  937. for(let i=0;i<subIdsLeft.length;i++){
  938. let obj = {
  939. subId:subIdsLeft[i].subId,
  940. subjectName:subIdsLeft[i].subjectName,
  941. typeId:subIdsLeft[i].typeId,
  942. level:subIdsLeft[i].level,
  943. collegeName:subIdsLeft[i].collegeName,
  944. }
  945. list.push(obj);
  946. }
  947. this.$set(this,'dialogTableSubDataList',list);
  948. this.$refs.leftSubTable.clearSelection();
  949. this.subGetListLeft();
  950. this.subGetListRight();
  951. }else{
  952. this.msgError('请先勾选左侧列表')
  953. }
  954. }
  955. },
  956. /*===================================弹窗相关结束===================================*/
  957. /*==========上传相关==========*/
  958. handleAvatarSuccess(res) {
  959. this.$set(this,'loading',false);
  960. if(this.dialogForm.uploadDtoList.length>9){
  961. this.msgError('已到达上传数量上限')
  962. return
  963. }
  964. let suffixName= this.upDataName.split('.')[this.upDataName.split('.').length - 2]
  965. //判断文件名中是否有逗号和分号
  966. if(suffixName.indexOf(',')==-1 && suffixName.indexOf(';')==-1){
  967. }else{
  968. this.$message.info('文件名里包含逗号或分号,请修改后重新上传!')
  969. return
  970. }
  971. let obj ={
  972. fileName:this.upDataName,
  973. fileUrl:res.data.url,
  974. fileType:1,
  975. source:1,
  976. };
  977. this.dialogForm.uploadDtoList.push(obj);
  978. this.$forceUpdate()
  979. },
  980. beforeAvatarUpload(file) {
  981. this.$set(this,'loading',true);
  982. let type = false;
  983. 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') {
  984. this.upDataName = file.name;
  985. type = true;
  986. }else{
  987. this.$set(this,'loading',false);
  988. this.$message.error('只能上传doc/docx/xls/xlsx/pdf格式');
  989. type = false;
  990. }
  991. return type;
  992. },
  993. /*===记录勾选数据===
  994. 需要再el-table 添加 :row-key="getRowKeys"
  995. 需要在selection 添加 :reserve-selection="true"
  996. */
  997. getRowKeys(row) {
  998. return row.userId
  999. },
  1000. getDeptRowKeys(row) {
  1001. return row.deptId
  1002. },
  1003. getSubRowKeys(row) {
  1004. return row.subId
  1005. },
  1006. deptChange(selection){
  1007. let self = this;
  1008. this.deptNumLeft = selection.length;
  1009. this.deptIdsLeft = selection.map(item => item.deptId);
  1010. let num = 0;
  1011. let list = [];
  1012. for(let i=0;i<self.deptIdsLeft.length;i++){
  1013. for(let o=0;o<self.deptTableListLeft.length;o++){
  1014. if(self.deptIdsLeft[i] == self.deptTableListLeft[o].deptId){
  1015. num = self.accAdd(num,self.deptTableListLeft[o].subNum)
  1016. let obj = {
  1017. deptId:self.deptTableListLeft[o].deptId,
  1018. deptName:self.deptTableListLeft[o].deptName,
  1019. }
  1020. list.push(obj)
  1021. }
  1022. }
  1023. }
  1024. this.$set(this,'changeDeptSelectList',list);
  1025. this.$set(this.subQueryParamsRight,'deptId','');
  1026. let obj = {
  1027. deptIds:this.deptIdsLeft,
  1028. deptNum:this.deptNumLeft,
  1029. subNum:num
  1030. }
  1031. this.$set(this,'deptCheckData',JSON.parse(JSON.stringify(obj)));
  1032. this.deptResetQueryRight();
  1033. },
  1034. subChangeLeft(selection){
  1035. this.subNumLeft = selection.length;
  1036. this.subIdsLeft = selection.map(item => item.subId);
  1037. },
  1038. subChangeRight(selection){
  1039. this.subNumRight = selection.length;
  1040. this.subIdsRight = selection.map(item => item.subId);
  1041. },
  1042. //加法
  1043. accAdd(arg1,arg2){
  1044. var r1,r2,m;
  1045. try{r1=arg1.toString().split(".")[1].length}catch(e){r1=0}
  1046. try{r2=arg2.toString().split(".")[1].length}catch(e){r2=0}
  1047. m=Math.pow(10,Math.max(r1,r2))
  1048. return ((arg1*m+arg2*m)/m).toFixed(0);
  1049. },
  1050. //获取历史标题
  1051. getHistoryPlanTitles(){
  1052. getHistoryPlanTitles().then(response => {
  1053. let list = [
  1054. {title:"校院春季开学检查",type:false,},
  1055. {title:"校院秋季开学检查",type:false,},
  1056. {title:"日常安全检查",type:false,},
  1057. {title:"年度安全检查",type:false,},
  1058. {title:"季度安全检查",type:false,},
  1059. {title:"月度安全检查",type:false,},
  1060. {title:"专项检查",type:false,},
  1061. ];
  1062. for(let i=0;i<response.data.length;i++){
  1063. list.push({title:response.data[i].title,type:true,id:response.data[i].id});
  1064. }
  1065. this.$set(this,'quickSelectionList',list);
  1066. });
  1067. },
  1068. //删除历史标题
  1069. delTitleObj(item){
  1070. let self = this;
  1071. this.$confirm('是否确认删除?', "警告", {
  1072. confirmButtonText: "确定",
  1073. cancelButtonText: "取消",
  1074. type: "warning"
  1075. }).then(function() {
  1076. hideHistoryPlanTitle({checkPlanId:item.id}).then(response => {
  1077. self.msgSuccess(response.msg)
  1078. self.getHistoryPlanTitles();
  1079. });
  1080. }).then(() => {
  1081. }).catch(() => {});
  1082. },
  1083. }
  1084. }
  1085. </script>
  1086. <style lang="scss">
  1087. .inspectionPlan-dialog-box{
  1088. .el-dialog__body{
  1089. padding:20px 0 20px 30px;
  1090. }
  1091. .is-disabled{
  1092. background-color: #f5f5f5;
  1093. color: #333;
  1094. border-color: #f5f5f5;
  1095. cursor:auto;
  1096. border-radius: 4px;
  1097. .el-input__icon{
  1098. display: none;
  1099. }
  1100. .el-input__inner{
  1101. background-color: #f5f5f5;
  1102. color: #333;
  1103. border-color: #f5f5f5;
  1104. cursor:auto!important;
  1105. border-radius: 4px;
  1106. }
  1107. .el-range-input{
  1108. background-color: #f5f5f5;
  1109. color: #333;
  1110. border-color: #f5f5f5;
  1111. cursor:auto;
  1112. border-radius: 4px;
  1113. }
  1114. .el-textarea__inner{
  1115. background-color: #f5f5f5;
  1116. color: #333;
  1117. border-color: #f5f5f5;
  1118. cursor:auto;
  1119. border-radius: 4px;
  1120. }
  1121. }
  1122. .inspectionPlan-dialog-add-box{
  1123. display: flex;
  1124. overflow: hidden;
  1125. height:610px;
  1126. .left-max-box{
  1127. width:270px;
  1128. border-right:1px dashed #D8D8D8;
  1129. display: flex;
  1130. flex-direction: column;
  1131. .left-max-title-box{
  1132. width:230px;
  1133. display: flex;
  1134. border-bottom:1px solid #E0E0E0;
  1135. img{
  1136. width:14px;
  1137. height:11px;
  1138. margin:33px 18px 33px 0;
  1139. }
  1140. p{
  1141. line-height:78px;
  1142. color:#0183FA;
  1143. font-size:16px;
  1144. }
  1145. }
  1146. .left-max-list-box{
  1147. flex:1;
  1148. width:230px;
  1149. overflow-x: hidden;
  1150. div{
  1151. width:230px;
  1152. height:40px;
  1153. line-height:40px;
  1154. padding:0 10px;
  1155. margin-top: 10px;
  1156. cursor: pointer;
  1157. font-size:16px;
  1158. color:#333333;
  1159. overflow:hidden;
  1160. display: flex;
  1161. .left-max-list-for-p{
  1162. flex:1;
  1163. display:block;
  1164. overflow:hidden;
  1165. text-overflow:ellipsis;
  1166. white-space:nowrap;
  1167. }
  1168. .left-max-list-for-icon{
  1169. color:#999;
  1170. width:32px;
  1171. line-height: 40px;
  1172. text-align: center;
  1173. font-size:16px;
  1174. }
  1175. }
  1176. div:hover{
  1177. background: rgba(1,131,250,0.2);
  1178. color:#0183FA;
  1179. .left-max-list-for-icon{
  1180. color:#0183FA!important;
  1181. }
  1182. }
  1183. }
  1184. }
  1185. .right-max-box{
  1186. flex:1;
  1187. padding-right:10px;
  1188. .date-range-box{
  1189. display: flex;
  1190. .date-range-left-box{
  1191. margin-right:15px;
  1192. }
  1193. .date-range-right-box{
  1194. display: flex;
  1195. border-radius:4px;
  1196. overflow: hidden;
  1197. border:1px solid #E0E0E0;
  1198. p{
  1199. width: 70px;
  1200. height:34px;
  1201. line-height:34px;
  1202. color:#333;
  1203. font-size:14px;
  1204. text-align: center;
  1205. cursor: pointer;
  1206. }
  1207. p:hover{
  1208. color:#fff;
  1209. background: #0045AF;
  1210. }
  1211. p:nth-child(2){
  1212. border-left:1px solid #E0E0E0;
  1213. border-right:1px solid #E0E0E0;
  1214. }
  1215. }
  1216. }
  1217. .dialog-range-max-box{
  1218. display: flex;
  1219. .dialog-range-select-box{
  1220. }
  1221. .dialog-range-text-box{
  1222. display: flex;
  1223. .button-p{
  1224. margin-left:15px;
  1225. width:100px;
  1226. margin-right:0;
  1227. }
  1228. .text-p{
  1229. line-height:40px;
  1230. color:#0183FA;
  1231. font-size:14px;
  1232. margin-left:15px;
  1233. }
  1234. }
  1235. }
  1236. .dialog-material-max-box{
  1237. .dialog-material-button-box{
  1238. display: flex;
  1239. .dialog-material-text{
  1240. margin-left:20px;
  1241. color:#333333;
  1242. font-size:14px;
  1243. line-height:40px;
  1244. }
  1245. }
  1246. .dialog-material-list-box:nth-child(1){
  1247. margin-top:0;
  1248. }
  1249. .dialog-material-list-box{
  1250. margin-top:20px;
  1251. div{
  1252. height:40px;
  1253. width:550px;
  1254. display: flex;
  1255. img{
  1256. width:16px;
  1257. height:14px;
  1258. margin:11px 23px 13px 0;
  1259. }
  1260. p:nth-child(2){
  1261. flex:1;
  1262. display:block;
  1263. overflow:hidden;
  1264. text-overflow:ellipsis;
  1265. white-space:nowrap;
  1266. }
  1267. p:nth-child(3){
  1268. color:#0183FA;
  1269. font-size:14px;
  1270. cursor: pointer;
  1271. margin-left:40px;
  1272. }
  1273. p:nth-child(4){
  1274. color:#0183FA;
  1275. font-size:14px;
  1276. cursor: pointer;
  1277. margin-left:40px;
  1278. }
  1279. }
  1280. .dialog-material-list-null{
  1281. text-align: center;
  1282. color:#999;
  1283. font-size:14px;
  1284. }
  1285. }
  1286. }
  1287. .dialog-table-max-box{
  1288. width:747px;
  1289. height:357px;
  1290. display: flex;
  1291. flex-direction: column;
  1292. flex:1;
  1293. /*background: #A11DDF;*/
  1294. overflow: hidden;
  1295. .dialog-table-box{
  1296. margin-top:20px;
  1297. display: flex;
  1298. flex-direction: column;
  1299. flex:1;
  1300. overflow: hidden;
  1301. .dialog-table-title-box{
  1302. display: flex;
  1303. border:1px solid #e0e0e0;
  1304. border-bottom:none;
  1305. img{
  1306. width:14px;
  1307. height:14px;
  1308. margin:18px 12px 18px 12px;
  1309. }
  1310. .dialog-table-title-p{
  1311. line-height:50px;
  1312. flex:1;
  1313. font-size:16px;
  1314. }
  1315. .dialog-table-title-button{
  1316. width:70px;
  1317. height:30px;
  1318. line-height:28px;
  1319. margin:10px 26px;
  1320. }
  1321. }
  1322. }
  1323. }
  1324. }
  1325. }
  1326. .inspectionPlan-dialog-dept-box{
  1327. display: flex;
  1328. overflow: hidden;
  1329. height:610px;
  1330. margin-right:30px;
  1331. .dept-table-title-box{
  1332. display: flex;
  1333. padding:0 20px;
  1334. background: rgba(1,131,250,0.1);
  1335. p{
  1336. flex:1;
  1337. color:#0183FA;
  1338. font-size:16px;
  1339. line-height:40px;
  1340. }
  1341. p:nth-child(1){
  1342. text-align: left;
  1343. }
  1344. p:nth-child(2){
  1345. text-align: right;
  1346. }
  1347. }
  1348. .dept-table-max-box{
  1349. border: 1px solid #e0e0e0;
  1350. flex:1;
  1351. display: flex;
  1352. flex-direction: column;
  1353. overflow: hidden;
  1354. padding:20px;
  1355. .form-index{
  1356. .el-input__inner{
  1357. border-right:none;
  1358. padding-right:0;
  1359. }
  1360. .el-input-group__append{
  1361. background: #fff;
  1362. cursor: pointer;
  1363. padding:0 10px;
  1364. }
  1365. }
  1366. input{
  1367. border: 1px solid #DCDFE6;
  1368. }
  1369. }
  1370. .left-max-box{
  1371. height:610px;
  1372. display: flex;
  1373. flex-direction: column;
  1374. overflow: hidden;
  1375. width:475px;
  1376. margin-right:20px;
  1377. }
  1378. .right-max-box{
  1379. height:610px;
  1380. display: flex;
  1381. flex-direction: column;
  1382. overflow: hidden;
  1383. width:755px;
  1384. }
  1385. }
  1386. .inspectionPlan-dialog-sub-box{
  1387. display: flex;
  1388. overflow: hidden;
  1389. height:610px;
  1390. margin-right:30px;
  1391. .dept-table-title-box{
  1392. display: flex;
  1393. padding:0 20px;
  1394. background: rgba(1,131,250,0.1);
  1395. p{
  1396. flex:1;
  1397. color:#0183FA;
  1398. font-size:16px;
  1399. line-height:40px;
  1400. }
  1401. p:nth-child(1){
  1402. text-align: left;
  1403. }
  1404. p:nth-child(2){
  1405. text-align: right;
  1406. }
  1407. }
  1408. .dept-table-max-box{
  1409. border: 1px solid #e0e0e0;
  1410. flex:1;
  1411. display: flex;
  1412. flex-direction: column;
  1413. overflow: hidden;
  1414. padding:20px;
  1415. .form-index{
  1416. .el-input__inner{
  1417. border-right:none;
  1418. padding-right:0;
  1419. }
  1420. .el-input-group__append{
  1421. background: #fff;
  1422. cursor: pointer;
  1423. padding:0 10px;
  1424. }
  1425. }
  1426. input{
  1427. border: 1px solid #DCDFE6;
  1428. }
  1429. }
  1430. .left-max-box{
  1431. height:610px;
  1432. display: flex;
  1433. flex-direction: column;
  1434. overflow: hidden;
  1435. width:588px;
  1436. }
  1437. .right-max-box{
  1438. height:610px;
  1439. display: flex;
  1440. flex-direction: column;
  1441. overflow: hidden;
  1442. width:588px;
  1443. flex:1;
  1444. }
  1445. .center-box{
  1446. width:68px;
  1447. p{
  1448. display: block;
  1449. border-radius:50%;
  1450. width:30px;
  1451. height:30px;
  1452. line-height:30px;
  1453. text-align: center;
  1454. background: rgba(245,245,245,1);
  1455. color:rgba(62,62,62,1);
  1456. cursor: pointer;
  1457. font-size:16px;
  1458. }
  1459. p:nth-child(1){
  1460. margin:270px 19px 0;
  1461. }
  1462. p:nth-child(2){
  1463. margin:14px 19px 0;
  1464. }
  1465. p:hover{
  1466. color:#fff;
  1467. background: #0183fa;
  1468. }
  1469. }
  1470. }
  1471. .inspectionPlan-dialog-user-box{
  1472. display: flex;
  1473. overflow: hidden;
  1474. height:610px;
  1475. margin-right:30px;
  1476. .dept-table-title-box{
  1477. display: flex;
  1478. padding:0 20px;
  1479. background: rgba(1,131,250,0.1);
  1480. p{
  1481. flex:1;
  1482. color:#0183FA;
  1483. font-size:16px;
  1484. line-height:40px;
  1485. }
  1486. p:nth-child(1){
  1487. text-align: left;
  1488. }
  1489. p:nth-child(2){
  1490. text-align: right;
  1491. }
  1492. }
  1493. .dept-table-max-box{
  1494. border: 1px solid #e0e0e0;
  1495. flex:1;
  1496. display: flex;
  1497. flex-direction: column;
  1498. overflow: hidden;
  1499. padding:20px;
  1500. .form-index{
  1501. .el-input__inner{
  1502. border-right:none;
  1503. padding-right:0;
  1504. }
  1505. .el-input-group__append{
  1506. background: #fff;
  1507. cursor: pointer;
  1508. padding:0 10px;
  1509. }
  1510. }
  1511. input{
  1512. border: 1px solid #DCDFE6;
  1513. }
  1514. }
  1515. .left-max-box{
  1516. height:610px;
  1517. display: flex;
  1518. flex-direction: column;
  1519. overflow: hidden;
  1520. width:588px;
  1521. }
  1522. .right-max-box{
  1523. height:610px;
  1524. display: flex;
  1525. flex-direction: column;
  1526. overflow: hidden;
  1527. width:588px;
  1528. flex:1;
  1529. }
  1530. .center-box{
  1531. width:68px;
  1532. p{
  1533. display: block;
  1534. border-radius:50%;
  1535. width:30px;
  1536. height:30px;
  1537. line-height:30px;
  1538. text-align: center;
  1539. background: rgba(245,245,245,1);
  1540. color:rgba(62,62,62,1);
  1541. cursor: pointer;
  1542. font-size:16px;
  1543. }
  1544. p:nth-child(1){
  1545. margin:270px 19px 0;
  1546. }
  1547. p:nth-child(2){
  1548. margin:14px 19px 0;
  1549. }
  1550. p:hover{
  1551. color:#fff;
  1552. background: #0183fa;
  1553. }
  1554. }
  1555. }
  1556. .inspectionPlan-dialog-look-box{
  1557. display: flex;
  1558. overflow: hidden;
  1559. height:610px;
  1560. margin-right:30px;
  1561. .iframe-box{
  1562. flex:1;
  1563. }
  1564. }
  1565. }
  1566. </style>