addDialog.vue 78 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080
  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&&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">
  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. conditionCollegeInfo(self.deptQueryParamsLeft).then(response => {
  956. if(this.lookInfoType){
  957. //查看时
  958. let list = [];
  959. for(let i=0;i<response.data.length;i++){
  960. let num = 0;
  961. for(let o=0;o<self.dialogForm.collegeIds.length;o++){
  962. if(response.data[i].deptId == self.dialogForm.collegeIds[o]){
  963. num++
  964. }
  965. }
  966. if(num == 0){
  967. response.data.splice(i,1);
  968. i--
  969. }
  970. }
  971. self.$set(self,'deptTableListLeft',response.data);
  972. self.$set(self,'deptTotalLeft',response.data.length);
  973. self.$set(self,'changeDeptSelectList',response.data);
  974. let obj = JSON.parse(JSON.stringify(this.deptQueryParamsRight));
  975. obj.deptIds = self.dialogForm.collegeIds;
  976. findSubInfoByDeptIds(obj).then(response => {
  977. this.deptTotalRight = response.total;
  978. this.deptTableListRight = response.rows;
  979. this.$set(this.deptCheckData,'subNum',response.total);
  980. this.$set(this,'deptNumLeft',self.dialogForm.collegeIds.length);
  981. });
  982. }else{
  983. //新增-编辑时
  984. self.$set(self,'deptTableListLeft',response.data);
  985. self.$set(self,'deptTotalLeft',response.data.length);
  986. let list = [];
  987. for(let i=0;i<self.dialogForm.collegeIds.length;i++){
  988. for(let o=0;o<self.deptTableListLeft.length;o++){
  989. if(self.dialogForm.collegeIds[i] == self.deptTableListLeft[o].deptId){
  990. list.push(self.deptTableListLeft[o])
  991. self.$refs.leftDeptTable.toggleRowSelection(self.deptTableListLeft[o]);
  992. }
  993. }
  994. }
  995. self.deptChange(list);
  996. }
  997. })
  998. })
  999. }
  1000. }else if(type == 3){
  1001. //选择实验室
  1002. this.$set(self,'dialogTableSubDataList',JSON.parse(JSON.stringify(this.dialogTableSubList)));
  1003. this.subResetQueryLeft();
  1004. this.subResetQueryRight();
  1005. this.$set(this,'addDialogBoxType',type);
  1006. }else{
  1007. this.$set(this,'addDialogBoxType',type);
  1008. }
  1009. },
  1010. //选中对应周期
  1011. checkTime(type){
  1012. let myDate = new Date();
  1013. let year = myDate.getFullYear();
  1014. let month = myDate.getMonth()+1;
  1015. let day = myDate.getDate();
  1016. let minTime = year + '-' + month + '-' + day
  1017. let maxTime = '';
  1018. if(type==1){
  1019. maxTime = this.getMonthFinalDay(year,month);
  1020. }else if(type==2){
  1021. if(month>0 && month<4){
  1022. maxTime = this.getMonthFinalDay(year,3);
  1023. }else if(month>3 && month<7){
  1024. maxTime = this.getMonthFinalDay(year,6);
  1025. }else if(month>6 && month<10){
  1026. maxTime = this.getMonthFinalDay(year,9);
  1027. }else if(month>9 && month<13){
  1028. maxTime = this.getMonthFinalDay(year,12);
  1029. }
  1030. }else if(type==3){
  1031. maxTime = this.getMonthFinalDay(year,12);
  1032. }
  1033. let timeListA = minTime.split('-')
  1034. minTime = timeListA[0]+'-'+(timeListA[1]<10?'0'+timeListA[1]:timeListA[1])+'-'+(timeListA[2]<10?'0'+timeListA[1]:timeListA[2])
  1035. let timeListB = maxTime.split('-')
  1036. maxTime = timeListB[0]+'-'+(timeListB[1]<10?'0'+timeListB[1]:timeListB[1])+'-'+(timeListB[2]<10?'0'+timeListB[1]:timeListB[2])
  1037. this.$set(this.dialogForm,'dateRange',[minTime,maxTime]);
  1038. },
  1039. //返回指定月份最后一天
  1040. getMonthFinalDay(year,month){
  1041. var day='';
  1042. if(year==null || year==undefined || year==''){
  1043. year = new Date().getFullYear();
  1044. }
  1045. if(month==null || month==undefined || month==''){
  1046. month = new Date().getMonth()+1;
  1047. }
  1048. day = new Date(new Date(year,month).setDate(0)).getDate();
  1049. return year+"-"+month+"-"+day;
  1050. },
  1051. //删除弹窗上传文件
  1052. delUpData(index){
  1053. this.dialogForm.uploadDtoList.splice(index,1)
  1054. },
  1055. //删除弹窗列表
  1056. delTable(row){
  1057. let self = this;
  1058. for(let i=0;i<self.dialogTableList.length;i++){
  1059. if(row.userId == self.dialogTableList[i].userId){
  1060. this.dialogTableList.splice(i,1)
  1061. }
  1062. }
  1063. },
  1064. //快捷选中标题
  1065. checkTitle(item){
  1066. this.$set(this.dialogForm,'title',item.title);
  1067. },
  1068. /*===================================学院选择相关===================================*/
  1069. //重置
  1070. deptResetQueryLeft(){
  1071. this.$set(this,'deptQueryParamsLeft',{ searchValue:"", });
  1072. this.$set(this,'deptNumLeft',0);
  1073. this.$set(this,'deptIdsLeft',[]);
  1074. this.$refs.leftDeptTable.clearSelection();
  1075. this.deptGetListLeft();
  1076. },
  1077. //查询接口
  1078. deptGetListLeft(){
  1079. conditionCollegeInfo(this.deptQueryParamsLeft).then(response => {
  1080. this.$set(this,'deptTableListLeft',response.data);
  1081. this.$set(this,'deptTotalLeft',response.data.length);
  1082. })
  1083. },
  1084. //查询
  1085. deptHandleQueryRight(){
  1086. this.deptGetListRight();
  1087. },
  1088. //重置
  1089. deptResetQueryRight(){
  1090. this.$set(this,'deptQueryParamsRight',{
  1091. pageNum:1,
  1092. pageSize:20,
  1093. searchValue:"",
  1094. deptId:"",
  1095. deptIds:"",
  1096. level:"",
  1097. typeId:"",
  1098. });
  1099. this.deptHandleQueryRight();
  1100. },
  1101. //查询接口
  1102. deptGetListRight(){
  1103. let obj = JSON.parse(JSON.stringify(this.deptQueryParamsRight));
  1104. if(this.lookInfoType){
  1105. obj.deptIds = this.dialogForm.collegeIds;
  1106. }else{
  1107. obj.deptIds = this.deptIdsLeft;
  1108. }
  1109. findSubInfoByDeptIds(obj).then(response => {
  1110. this.deptTotalRight = response.total;
  1111. this.deptTableListRight = response.rows;
  1112. });
  1113. },
  1114. /*===================================实验室选择相关===================================*/
  1115. //查询
  1116. subHandleQueryLeft(){
  1117. this.$set(this.subQueryParamsLeft,'pageNum',1);
  1118. this.subGetListLeft();
  1119. },
  1120. //重置
  1121. subResetQueryLeft(){
  1122. this.$set(this,'subQueryParamsLeft',{
  1123. pageNum:1,
  1124. pageSize:20,
  1125. typeId:"",
  1126. level:"",
  1127. deptId:"",
  1128. searchValue:"",
  1129. filtType:1
  1130. });
  1131. this.subHandleQueryLeft();
  1132. },
  1133. //查询接口
  1134. subGetListLeft(){
  1135. let self = this;
  1136. let leftObj = JSON.parse(JSON.stringify(this.subQueryParamsLeft));
  1137. leftObj.selectedSubIds = [];
  1138. for(let i=0;i<self.dialogTableSubDataList.length;i++){
  1139. leftObj.selectedSubIds.push(self.dialogTableSubDataList[i].subId);
  1140. }
  1141. conditionSubjectInfo(leftObj).then(response => {
  1142. this.subTotalLeft = response.total;
  1143. this.subTableListLeft = response.rows;
  1144. });
  1145. },
  1146. //查询
  1147. subHandleQueryRight(){
  1148. this.$set(this.subQueryParamsRight,'pageNum',1);
  1149. this.subGetListRight();
  1150. },
  1151. //重置
  1152. subResetQueryRight(){
  1153. this.$set(this,'subQueryParamsRight',{
  1154. pageNum:1,
  1155. pageSize:20,
  1156. typeId:"",
  1157. level:"",
  1158. deptId:"",
  1159. searchValue:"",
  1160. filtType:2
  1161. });
  1162. this.subHandleQueryRight();
  1163. },
  1164. //查询接口
  1165. subGetListRight(){
  1166. let self = this;
  1167. let rightObj = JSON.parse(JSON.stringify(this.subQueryParamsRight));
  1168. rightObj.subIds = [];
  1169. for(let i=0;i<self.dialogTableSubDataList.length;i++){
  1170. rightObj.subIds.push(self.dialogTableSubDataList[i].subId);
  1171. }
  1172. conditionSubjectInfo(rightObj).then(response => {
  1173. this.subTotalRight = response.total;
  1174. this.subTableListRight = response.rows;
  1175. });
  1176. },
  1177. //实验室穿梭按钮
  1178. subArrowButton(type){
  1179. if(type == 1){
  1180. if(this.$refs.rightSubTable.selection[0]){
  1181. let list = JSON.parse(JSON.stringify(this.dialogTableSubDataList));
  1182. let subIdsRight = JSON.parse(JSON.stringify(this.$refs.rightSubTable.selection))
  1183. for(let i=0;i<subIdsRight.length;i++){
  1184. for(let s=0;s<list.length;s++){
  1185. if(subIdsRight[i].subId == list[s].subId){
  1186. list.splice(s,1);
  1187. s--
  1188. }
  1189. }
  1190. }
  1191. this.$set(this,'dialogTableSubDataList',list);
  1192. this.$refs.rightSubTable.clearSelection();
  1193. this.subHandleQueryLeft();
  1194. this.subHandleQueryRight();
  1195. }else{
  1196. this.msgError('请先勾选右侧列表')
  1197. }
  1198. }else if(type == 2){
  1199. if(this.$refs.leftSubTable.selection[0]){
  1200. let list = JSON.parse(JSON.stringify(this.dialogTableSubDataList));
  1201. let subIdsLeft = JSON.parse(JSON.stringify(this.$refs.leftSubTable.selection))
  1202. for(let i=0;i<subIdsLeft.length;i++){
  1203. let obj = {
  1204. subId:subIdsLeft[i].subId,
  1205. subjectName:subIdsLeft[i].subjectName,
  1206. typeId:subIdsLeft[i].typeId,
  1207. level:subIdsLeft[i].level,
  1208. collegeName:subIdsLeft[i].collegeName,
  1209. }
  1210. list.push(obj);
  1211. }
  1212. this.$set(this,'dialogTableSubDataList',list);
  1213. this.$refs.leftSubTable.clearSelection();
  1214. this.subHandleQueryLeft();
  1215. this.subHandleQueryRight();
  1216. }else{
  1217. this.msgError('请先勾选左侧列表')
  1218. }
  1219. }
  1220. },
  1221. /*===================================人员选择相关===================================*/
  1222. //查询
  1223. userHandleQueryLeft(){
  1224. this.$set(this.userQueryParamsLeft,'pageNum',1);
  1225. this.$set(this,'userNumLeft',0);
  1226. this.$set(this,'userIdsLeft',[]);
  1227. this.$refs.leftUserTable.clearSelection();
  1228. this.userGetListLeft();
  1229. },
  1230. //重置
  1231. userResetQueryLeft(){
  1232. this.$set(this,'userQueryParamsLeft',{
  1233. pageNum: 1,
  1234. pageSize: 20,
  1235. deptId:"",
  1236. searchValue:"",
  1237. filtType:1
  1238. });
  1239. this.userHandleQueryLeft();
  1240. },
  1241. //查询接口
  1242. userGetListLeft(){
  1243. let self = this;
  1244. let leftObj = JSON.parse(JSON.stringify(this.userQueryParamsLeft));
  1245. leftObj.selectedUserIds = [];
  1246. for(let i=0;i<self.dialogTableDataList.length;i++){
  1247. leftObj.selectedUserIds.push(self.dialogTableDataList[i].userId);
  1248. }
  1249. findUserList(leftObj).then(response => {
  1250. this.userTotalLeft = response.total;
  1251. this.userTableListLeft = response.rows;
  1252. });
  1253. },
  1254. //查询
  1255. userHandleQueryRight(){
  1256. this.$set(this.userQueryParamsRight,'pageNum',1);
  1257. this.$set(this,'userNumRight',0);
  1258. this.$set(this,'userIdsRight',[]);
  1259. this.$refs.rightUserTable.clearSelection();
  1260. this.userGetListRight();
  1261. },
  1262. //重置
  1263. userResetQueryRight(){
  1264. this.$set(this,'userQueryParamsRight',{
  1265. pageNum: 1,
  1266. pageSize: 20,
  1267. deptId:"",
  1268. searchValue:"",
  1269. filtType:2
  1270. });
  1271. this.userHandleQueryRight();
  1272. },
  1273. //查询接口
  1274. userGetListRight(){
  1275. let self = this;
  1276. let rightObj = JSON.parse(JSON.stringify(this.userQueryParamsRight));
  1277. rightObj.userIds = [];
  1278. for(let i=0;i<self.dialogTableDataList.length;i++){
  1279. rightObj.userIds.push(self.dialogTableDataList[i].userId);
  1280. }
  1281. findUserList(rightObj).then(response => {
  1282. this.userTotalRight = response.total;
  1283. this.userTableListRight = response.rows;
  1284. });
  1285. },
  1286. //人员穿梭按钮
  1287. userArrowButton(type){
  1288. let self = this;
  1289. if(type == 1){
  1290. //右至左
  1291. if(this.$refs.rightUserTable.selection[0]){
  1292. let list = JSON.parse(JSON.stringify(this.dialogTableDataList));
  1293. let userIdsRight = JSON.parse(JSON.stringify(this.$refs.rightUserTable.selection))
  1294. for(let i=0;i<userIdsRight.length;i++){
  1295. for(let s=0;s<list.length;s++){
  1296. if(userIdsRight[i].userId == list[s].userId){
  1297. list.splice(s,1);
  1298. s--
  1299. }
  1300. }
  1301. }
  1302. this.$set(this,'dialogTableDataList',list);
  1303. this.$refs.rightUserTable.clearSelection();
  1304. this.userHandleQueryLeft();
  1305. this.userHandleQueryRight();
  1306. }else{
  1307. this.msgError('请先勾选右侧列表')
  1308. }
  1309. }else if(type == 2){
  1310. //左至右
  1311. if(this.userIdsLeft[0]){
  1312. let list = JSON.parse(JSON.stringify(this.dialogTableDataList));
  1313. let userIdsLeft = JSON.parse(JSON.stringify(this.$refs.leftUserTable.selection))
  1314. for(let i=0;i<userIdsLeft.length;i++){
  1315. let obj = {
  1316. userId:userIdsLeft[i].userId,
  1317. name:userIdsLeft[i].nickName,
  1318. jobNum:userIdsLeft[i].userName,
  1319. deptName:userIdsLeft[i].deptName,
  1320. deptId:userIdsLeft[i].deptId,
  1321. userType:userIdsLeft[i].userType,
  1322. }
  1323. list.push(obj);
  1324. }
  1325. if(list.length>50){
  1326. this.msgError('巡查成员最多50人')
  1327. return
  1328. }
  1329. this.$set(this,'dialogTableDataList',list);
  1330. this.$refs.leftUserTable.clearSelection();
  1331. this.userHandleQueryLeft();
  1332. this.userHandleQueryRight();
  1333. }else{
  1334. this.msgError('请先勾选左侧列表')
  1335. }
  1336. }
  1337. },
  1338. /*===================================弹窗相关结束===================================*/
  1339. // 单个下载按钮
  1340. downloadButton(item){
  1341. this.downloadUrl(item.fileUrl,item.fileName);
  1342. },
  1343. /*==========上传相关==========*/
  1344. handleAvatarSuccess(res) {
  1345. this.$set(this,'loading',false);
  1346. if(this.dialogForm.uploadDtoList.length>9){
  1347. this.msgError('已到达上传数量上限')
  1348. return
  1349. }
  1350. let suffixName= this.upDataName.split('.')[this.upDataName.split('.').length - 2]
  1351. //判断文件名中是否有逗号和分号
  1352. if(suffixName.indexOf(',')==-1 && suffixName.indexOf(';')==-1){
  1353. }else{
  1354. this.$message.info('文件名里包含逗号或分号,请修改后重新上传!')
  1355. return
  1356. }
  1357. let obj ={
  1358. fileName:this.upDataName,
  1359. fileUrl:res.data.url,
  1360. fileType:1,
  1361. source:1,
  1362. };
  1363. this.dialogForm.uploadDtoList.push(obj);
  1364. this.$forceUpdate()
  1365. },
  1366. beforeAvatarUpload(file) {
  1367. let type = false;
  1368. 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') {
  1369. if(file.size> 5250000){
  1370. this.msgError('上传大小不能超过5M')
  1371. return false
  1372. }
  1373. this.$set(this,'loading',true);
  1374. this.upDataName = file.name;
  1375. type = true;
  1376. }else{
  1377. this.$message.error('只能上传doc/docx/xls/xlsx/pdf格式');
  1378. type = false;
  1379. }
  1380. return type;
  1381. },
  1382. /*===记录勾选数据===
  1383. 需要再el-table 添加 :row-key="getRowKeys"
  1384. 需要在selection 添加 :reserve-selection="true"
  1385. */
  1386. getRowKeys(row) {
  1387. return row.userId
  1388. },
  1389. getDeptRowKeys(row) {
  1390. return row.deptId
  1391. },
  1392. getSubRowKeys(row) {
  1393. return row.subId
  1394. },
  1395. deptChange(selection){
  1396. let self = this;
  1397. this.deptNumLeft = selection.length;
  1398. this.deptIdsLeft = selection.map(item => item.deptId);
  1399. let num = 0;
  1400. let list = [];
  1401. for(let i=0;i<self.deptIdsLeft.length;i++){
  1402. for(let o=0;o<self.deptTableListLeft.length;o++){
  1403. if(self.deptIdsLeft[i] == self.deptTableListLeft[o].deptId){
  1404. num = self.accAdd(num,self.deptTableListLeft[o].subNum)
  1405. let obj = {
  1406. deptId:self.deptTableListLeft[o].deptId,
  1407. deptName:self.deptTableListLeft[o].deptName,
  1408. }
  1409. list.push(obj)
  1410. }
  1411. }
  1412. }
  1413. this.$set(this,'changeDeptSelectList',list);
  1414. this.$set(this.subQueryParamsRight,'deptId','');
  1415. let obj = {
  1416. deptIds:this.deptIdsLeft,
  1417. deptNum:this.deptNumLeft,
  1418. subNum:num
  1419. }
  1420. this.$set(this,'deptCheckData',JSON.parse(JSON.stringify(obj)));
  1421. this.deptResetQueryRight();
  1422. },
  1423. subChangeLeft(selection){
  1424. this.subNumLeft = selection.length;
  1425. this.subIdsLeft = selection.map(item => item.subId);
  1426. },
  1427. subChangeRight(selection){
  1428. this.subNumRight = selection.length;
  1429. this.subIdsRight = selection.map(item => item.subId);
  1430. },
  1431. userChangeLeft(selection){
  1432. this.userNumLeft = selection.length;
  1433. this.userIdsLeft = selection.map(item => item.userId);
  1434. },
  1435. userChangeRight(selection){
  1436. this.userNumRight = selection.length;
  1437. this.userIdsRight = selection.map(item => item.userId);
  1438. },
  1439. //加法
  1440. accAdd(arg1,arg2){
  1441. var r1,r2,m;
  1442. try{r1=arg1.toString().split(".")[1].length}catch(e){r1=0}
  1443. try{r2=arg2.toString().split(".")[1].length}catch(e){r2=0}
  1444. m=Math.pow(10,Math.max(r1,r2))
  1445. return ((arg1*m+arg2*m)/m).toFixed(0);
  1446. },
  1447. //获取历史标题
  1448. getHistoryPlanTitles(){
  1449. getHistoryPlanTitles().then(response => {
  1450. let list = [
  1451. {title:"校院春季开学检查",type:false,},
  1452. {title:"校院秋季开学检查",type:false,},
  1453. {title:"日常安全检查",type:false,},
  1454. {title:"年度安全检查",type:false,},
  1455. {title:"季度安全检查",type:false,},
  1456. {title:"月度安全检查",type:false,},
  1457. {title:"专项检查",type:false,},
  1458. ];
  1459. for(let i=0;i<response.data.length;i++){
  1460. list.push({title:response.data[i].title,type:true,id:response.data[i].id});
  1461. }
  1462. this.$set(this,'quickSelectionList',list);
  1463. });
  1464. },
  1465. //删除历史标题
  1466. delTitleObj(item){
  1467. let self = this;
  1468. this.$confirm('是否确认删除?', "警告", {
  1469. confirmButtonText: "确定",
  1470. cancelButtonText: "取消",
  1471. type: "warning"
  1472. }).then(function() {
  1473. hideHistoryPlanTitle({checkPlanId:item.id}).then(response => {
  1474. self.msgSuccess(response.msg)
  1475. self.getHistoryPlanTitles();
  1476. });
  1477. }).then(() => {
  1478. }).catch(() => {});
  1479. },
  1480. //查看时学院左侧搜索
  1481. lookDeptLeftSearch(){
  1482. let self = this;
  1483. conditionCollegeInfo(self.deptQueryParamsLeft).then(response => {
  1484. let list = [];
  1485. for(let i=0;i<response.data.length;i++){
  1486. for(let o=0;o<self.dialogForm.collegeIds.length;o++){
  1487. if(response.data[i].deptId == self.dialogForm.collegeIds[o] && response.data[i].deptName.indexOf(this.deptQueryParamsLeft.searchValue)!= -1){
  1488. list.push(response.data[i]);
  1489. }
  1490. }
  1491. }
  1492. self.$set(self,'deptTableListLeft',list);
  1493. self.$set(self,'deptTotalLeft',list.length);
  1494. self.$set(self,'changeDeptSelectList',list);
  1495. this.$set(this,'deptQueryParamsRight',{
  1496. pageNum:1,
  1497. pageSize:20,
  1498. searchValue:"",
  1499. deptId:"",
  1500. level:"",
  1501. typeId:"",
  1502. });
  1503. let obj = JSON.parse(JSON.stringify(this.deptQueryParamsRight));
  1504. let ids = [];
  1505. for(let o=0;o<list.length;o++){
  1506. ids.push(list[o].deptId)
  1507. }
  1508. obj.deptIds = ids;
  1509. findSubInfoByDeptIds(obj).then(response => {
  1510. this.deptTotalRight = response.total;
  1511. this.deptTableListRight = response.rows;
  1512. this.$set(this.deptCheckData,'subNum',response.total);
  1513. this.$set(this,'deptNumLeft',self.dialogForm.collegeIds.length);
  1514. });
  1515. })
  1516. },
  1517. //查看时学院左侧重置
  1518. lookDeptLeftReset(){
  1519. let self = this;
  1520. this.$set(this,'deptQueryParamsLeft',{ searchValue:"", });
  1521. conditionCollegeInfo(self.deptQueryParamsLeft).then(response => {
  1522. //查看时
  1523. for(let i=0;i<response.data.length;i++){
  1524. let num = 0;
  1525. for(let o=0;o<self.dialogForm.collegeIds.length;o++){
  1526. if(response.data[i].deptId == self.dialogForm.collegeIds[o]){
  1527. num++
  1528. }
  1529. }
  1530. if(num == 0){
  1531. response.data.splice(i,1);
  1532. i--
  1533. }
  1534. }
  1535. self.$set(self,'deptTableListLeft',response.data);
  1536. self.$set(self,'deptTotalLeft',response.data.length);
  1537. self.$set(self,'changeDeptSelectList',response.data);
  1538. this.$set(this,'deptQueryParamsRight',{
  1539. pageNum:1,
  1540. pageSize:20,
  1541. searchValue:"",
  1542. deptId:"",
  1543. level:"",
  1544. typeId:"",
  1545. });
  1546. let obj = JSON.parse(JSON.stringify(this.deptQueryParamsRight));
  1547. obj.deptIds = self.dialogForm.collegeIds;
  1548. findSubInfoByDeptIds(obj).then(response => {
  1549. this.deptTotalRight = response.total;
  1550. this.deptTableListRight = response.rows;
  1551. this.$set(this.deptCheckData,'subNum',response.total);
  1552. this.$set(this,'deptNumLeft',self.dialogForm.collegeIds.length);
  1553. });
  1554. })
  1555. },
  1556. //查看时学院右侧搜索
  1557. lookDeptRightSearch(){
  1558. let self = this;
  1559. let obj = JSON.parse(JSON.stringify(this.deptQueryParamsRight));
  1560. let ids = [];
  1561. for(let o=0;o<self.deptTableListLeft.length;o++){
  1562. ids.push(self.deptTableListLeft[o].deptId)
  1563. }
  1564. obj.deptIds = ids;
  1565. findSubInfoByDeptIds(obj).then(response => {
  1566. this.deptTotalRight = response.total;
  1567. this.deptTableListRight = response.rows;
  1568. });
  1569. },
  1570. //查看时学院右侧重置
  1571. lookDeptRightReset(){
  1572. let self = this;
  1573. this.$set(this,'deptQueryParamsRight',{
  1574. pageNum:1,
  1575. pageSize:20,
  1576. searchValue:"",
  1577. deptId:"",
  1578. level:"",
  1579. typeId:"",
  1580. });
  1581. let obj = JSON.parse(JSON.stringify(this.deptQueryParamsRight));
  1582. let ids = [];
  1583. for(let o=0;o<self.deptTableListLeft.length;o++){
  1584. ids.push(self.deptTableListLeft[o].deptId)
  1585. }
  1586. obj.deptIds = ids;
  1587. findSubInfoByDeptIds(obj).then(response => {
  1588. this.deptTotalRight = response.total;
  1589. this.deptTableListRight = response.rows;
  1590. });
  1591. },
  1592. }
  1593. }
  1594. </script>
  1595. <style lang="scss">
  1596. .inspectionPlan-dialog-box{
  1597. .el-dialog__body{
  1598. padding:20px 0 20px 30px;
  1599. }
  1600. .is-disabled{
  1601. background-color: #f5f5f5;
  1602. color: #333;
  1603. border-color: #f5f5f5;
  1604. cursor:auto;
  1605. border-radius: 4px;
  1606. .el-input__icon{
  1607. display: none;
  1608. }
  1609. .el-input__inner{
  1610. background-color: #f5f5f5;
  1611. color: #333;
  1612. border-color: #f5f5f5;
  1613. cursor:auto!important;
  1614. border-radius: 4px;
  1615. }
  1616. .el-range-input{
  1617. background-color: #f5f5f5;
  1618. color: #333;
  1619. border-color: #f5f5f5;
  1620. cursor:auto;
  1621. border-radius: 4px;
  1622. }
  1623. .el-textarea__inner{
  1624. background-color: #f5f5f5;
  1625. color: #333;
  1626. border-color: #f5f5f5;
  1627. cursor:auto;
  1628. border-radius: 4px;
  1629. }
  1630. }
  1631. .inspectionPlan-dialog-add-box{
  1632. display: flex;
  1633. overflow: hidden;
  1634. height:610px;
  1635. .left-max-box{
  1636. width:270px;
  1637. border-right:1px dashed #D8D8D8;
  1638. display: flex;
  1639. flex-direction: column;
  1640. .left-max-title-box{
  1641. width:230px;
  1642. display: flex;
  1643. border-bottom:1px solid #E0E0E0;
  1644. img{
  1645. width:14px;
  1646. height:11px;
  1647. margin:33px 18px 33px 0;
  1648. }
  1649. p{
  1650. line-height:78px;
  1651. color:#0183FA;
  1652. font-size:16px;
  1653. }
  1654. }
  1655. .left-max-list-box{
  1656. flex:1;
  1657. width:230px;
  1658. overflow-x: hidden;
  1659. div{
  1660. width:230px;
  1661. height:40px;
  1662. line-height:40px;
  1663. padding:0 10px;
  1664. margin-top: 10px;
  1665. cursor: pointer;
  1666. font-size:16px;
  1667. color:#333333;
  1668. overflow:hidden;
  1669. display: flex;
  1670. .left-max-list-for-p{
  1671. flex:1;
  1672. display:block;
  1673. overflow:hidden;
  1674. text-overflow:ellipsis;
  1675. white-space:nowrap;
  1676. }
  1677. .left-max-list-for-icon{
  1678. color:#999;
  1679. width:32px;
  1680. line-height: 40px;
  1681. text-align: center;
  1682. font-size:16px;
  1683. }
  1684. }
  1685. div:hover{
  1686. background: rgba(1,131,250,0.2);
  1687. color:#0183FA;
  1688. .left-max-list-for-icon{
  1689. color:#0183FA!important;
  1690. }
  1691. }
  1692. }
  1693. }
  1694. .right-max-box{
  1695. flex:1;
  1696. padding-right:10px;
  1697. .date-range-box{
  1698. display: flex;
  1699. .date-range-left-box{
  1700. margin-right:15px;
  1701. }
  1702. .date-range-right-box{
  1703. display: flex;
  1704. border-radius:4px;
  1705. overflow: hidden;
  1706. border:1px solid #E0E0E0;
  1707. p{
  1708. width: 70px;
  1709. height:34px;
  1710. line-height:34px;
  1711. color:#333;
  1712. font-size:14px;
  1713. text-align: center;
  1714. cursor: pointer;
  1715. }
  1716. p:hover{
  1717. color:#fff;
  1718. background: #0045AF;
  1719. }
  1720. p:nth-child(2){
  1721. border-left:1px solid #E0E0E0;
  1722. border-right:1px solid #E0E0E0;
  1723. }
  1724. }
  1725. }
  1726. .dialog-range-max-box{
  1727. display: flex;
  1728. .dialog-range-select-box{
  1729. }
  1730. .dialog-range-text-box{
  1731. display: flex;
  1732. .button-p{
  1733. margin-left:15px;
  1734. width:100px;
  1735. margin-right:0;
  1736. }
  1737. .text-p{
  1738. line-height:40px;
  1739. color:#0183FA;
  1740. font-size:14px;
  1741. margin-left:15px;
  1742. }
  1743. }
  1744. }
  1745. .dialog-material-max-box{
  1746. .dialog-material-button-box{
  1747. display: flex;
  1748. .dialog-material-text{
  1749. margin-left:20px;
  1750. color:#333333;
  1751. font-size:14px;
  1752. line-height:40px;
  1753. }
  1754. }
  1755. .dialog-material-list-box:nth-child(1){
  1756. margin-top:0;
  1757. }
  1758. .dialog-material-list-box{
  1759. margin-top:20px;
  1760. div{
  1761. height:40px;
  1762. width:550px;
  1763. display: flex;
  1764. img{
  1765. width:16px;
  1766. height:14px;
  1767. margin:11px 23px 13px 0;
  1768. }
  1769. p:nth-child(2){
  1770. flex:1;
  1771. display:block;
  1772. overflow:hidden;
  1773. text-overflow:ellipsis;
  1774. white-space:nowrap;
  1775. }
  1776. p:nth-child(3){
  1777. color:#0183FA;
  1778. font-size:14px;
  1779. cursor: pointer;
  1780. margin-left:40px;
  1781. }
  1782. p:nth-child(4){
  1783. color:#0183FA;
  1784. font-size:14px;
  1785. cursor: pointer;
  1786. margin-left:40px;
  1787. }
  1788. }
  1789. .dialog-material-list-null{
  1790. text-align: center;
  1791. color:#999;
  1792. font-size:14px;
  1793. }
  1794. }
  1795. }
  1796. .dialog-table-max-box{
  1797. width:747px;
  1798. height:357px;
  1799. display: flex;
  1800. flex-direction: column;
  1801. flex:1;
  1802. /*background: #A11DDF;*/
  1803. overflow: hidden;
  1804. .dialog-table-box{
  1805. margin-top:20px;
  1806. display: flex;
  1807. flex-direction: column;
  1808. flex:1;
  1809. overflow: hidden;
  1810. .dialog-table-title-box{
  1811. display: flex;
  1812. border:1px solid #e0e0e0;
  1813. border-bottom:none;
  1814. img{
  1815. width:14px;
  1816. height:14px;
  1817. margin:18px 12px 18px 12px;
  1818. }
  1819. .dialog-table-title-p{
  1820. line-height:50px;
  1821. flex:1;
  1822. font-size:16px;
  1823. }
  1824. .dialog-table-title-button{
  1825. width:70px;
  1826. height:30px;
  1827. line-height:28px;
  1828. margin:10px 26px;
  1829. }
  1830. }
  1831. }
  1832. }
  1833. }
  1834. }
  1835. .inspectionPlan-dialog-dept-box{
  1836. display: flex;
  1837. overflow: hidden;
  1838. height:610px;
  1839. margin-right:30px;
  1840. .dept-table-title-box{
  1841. display: flex;
  1842. padding:0 20px;
  1843. background: rgba(1,131,250,0.1);
  1844. p{
  1845. flex:1;
  1846. color:#0183FA;
  1847. font-size:16px;
  1848. line-height:40px;
  1849. }
  1850. p:nth-child(1){
  1851. text-align: left;
  1852. }
  1853. p:nth-child(2){
  1854. text-align: right;
  1855. }
  1856. }
  1857. .dept-table-max-box{
  1858. border: 1px solid #e0e0e0;
  1859. flex:1;
  1860. display: flex;
  1861. flex-direction: column;
  1862. overflow: hidden;
  1863. padding:20px;
  1864. .form-index{
  1865. .el-input__inner{
  1866. border-right:none;
  1867. padding-right:0;
  1868. }
  1869. .el-input-group__append{
  1870. background: #fff;
  1871. cursor: pointer;
  1872. padding:0 10px;
  1873. }
  1874. }
  1875. input{
  1876. border: 1px solid #DCDFE6;
  1877. }
  1878. }
  1879. .left-max-box{
  1880. height:610px;
  1881. display: flex;
  1882. flex-direction: column;
  1883. overflow: hidden;
  1884. width:475px;
  1885. margin-right:20px;
  1886. }
  1887. .right-max-box{
  1888. height:610px;
  1889. display: flex;
  1890. flex-direction: column;
  1891. overflow: hidden;
  1892. width:755px;
  1893. }
  1894. }
  1895. .inspectionPlan-dialog-sub-box{
  1896. display: flex;
  1897. overflow: hidden;
  1898. height:610px;
  1899. margin-right:30px;
  1900. .dept-table-title-box{
  1901. display: flex;
  1902. padding:0 20px;
  1903. background: rgba(1,131,250,0.1);
  1904. p{
  1905. flex:1;
  1906. color:#0183FA;
  1907. font-size:16px;
  1908. line-height:40px;
  1909. }
  1910. p:nth-child(1){
  1911. text-align: left;
  1912. }
  1913. p:nth-child(2){
  1914. text-align: right;
  1915. }
  1916. }
  1917. .dept-table-max-box{
  1918. border: 1px solid #e0e0e0;
  1919. flex:1;
  1920. display: flex;
  1921. flex-direction: column;
  1922. overflow: hidden;
  1923. padding:20px;
  1924. .form-index{
  1925. .el-input__inner{
  1926. border-right:none;
  1927. padding-right:0;
  1928. }
  1929. .el-input-group__append{
  1930. background: #fff;
  1931. cursor: pointer;
  1932. padding:0 10px;
  1933. }
  1934. }
  1935. input{
  1936. border: 1px solid #DCDFE6;
  1937. }
  1938. }
  1939. .left-max-box{
  1940. height:610px;
  1941. display: flex;
  1942. flex-direction: column;
  1943. overflow: hidden;
  1944. width:588px;
  1945. }
  1946. .right-max-box{
  1947. height:610px;
  1948. display: flex;
  1949. flex-direction: column;
  1950. overflow: hidden;
  1951. width:588px;
  1952. flex:1;
  1953. }
  1954. .center-box{
  1955. width:68px;
  1956. p{
  1957. display: block;
  1958. border-radius:50%;
  1959. width:30px;
  1960. height:30px;
  1961. line-height:30px;
  1962. text-align: center;
  1963. background: rgba(245,245,245,1);
  1964. color:rgba(62,62,62,1);
  1965. cursor: pointer;
  1966. font-size:16px;
  1967. }
  1968. p:nth-child(1){
  1969. margin:270px 19px 0;
  1970. }
  1971. p:nth-child(2){
  1972. margin:14px 19px 0;
  1973. }
  1974. p:hover{
  1975. color:#fff;
  1976. background: #0183fa;
  1977. }
  1978. }
  1979. }
  1980. .inspectionPlan-dialog-user-box{
  1981. display: flex;
  1982. overflow: hidden;
  1983. height:610px;
  1984. margin-right:30px;
  1985. .dept-table-title-box{
  1986. display: flex;
  1987. padding:0 20px;
  1988. background: rgba(1,131,250,0.1);
  1989. p{
  1990. flex:1;
  1991. color:#0183FA;
  1992. font-size:16px;
  1993. line-height:40px;
  1994. }
  1995. p:nth-child(1){
  1996. text-align: left;
  1997. }
  1998. p:nth-child(2){
  1999. text-align: right;
  2000. }
  2001. }
  2002. .dept-table-max-box{
  2003. border: 1px solid #e0e0e0;
  2004. flex:1;
  2005. display: flex;
  2006. flex-direction: column;
  2007. overflow: hidden;
  2008. padding:20px;
  2009. .form-index{
  2010. .el-input__inner{
  2011. border-right:none;
  2012. padding-right:0;
  2013. }
  2014. .el-input-group__append{
  2015. background: #fff;
  2016. cursor: pointer;
  2017. padding:0 10px;
  2018. }
  2019. }
  2020. input{
  2021. border: 1px solid #DCDFE6;
  2022. }
  2023. }
  2024. .left-max-box{
  2025. height:610px;
  2026. display: flex;
  2027. flex-direction: column;
  2028. overflow: hidden;
  2029. width:588px;
  2030. }
  2031. .right-max-box{
  2032. height:610px;
  2033. display: flex;
  2034. flex-direction: column;
  2035. overflow: hidden;
  2036. width:588px;
  2037. flex:1;
  2038. }
  2039. .center-box{
  2040. width:68px;
  2041. p{
  2042. display: block;
  2043. border-radius:50%;
  2044. width:30px;
  2045. height:30px;
  2046. line-height:30px;
  2047. text-align: center;
  2048. background: rgba(245,245,245,1);
  2049. color:rgba(62,62,62,1);
  2050. cursor: pointer;
  2051. font-size:16px;
  2052. }
  2053. p:nth-child(1){
  2054. margin:270px 19px 0;
  2055. }
  2056. p:nth-child(2){
  2057. margin:14px 19px 0;
  2058. }
  2059. p:hover{
  2060. color:#fff;
  2061. background: #0183fa;
  2062. }
  2063. }
  2064. }
  2065. .inspectionPlan-dialog-look-box{
  2066. display: flex;
  2067. overflow: hidden;
  2068. height:610px;
  2069. margin-right:30px;
  2070. .iframe-box{
  2071. flex:1;
  2072. }
  2073. }
  2074. }
  2075. </style>