addDialog.vue 79 KB

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