addDialog.vue 78 KB

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