addPage.vue 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735
  1. <!--安全准入办理-->
  2. <template>
  3. <div class="page-container approval_handle_addPage">
  4. <div class="page-top-title-box">
  5. <p class="page-top-title-name-p">准入申请</p>
  6. <p class="page-top-title-out-p" @click="backPage">返回</p>
  7. <p class="page-top-title-submit-p" v-if="minType == 1" style="width:230px;" @click="typeClick">我已选择实验室,上传准入材料</p>
  8. <p class="page-top-title-submit-p" v-if="minType == 2" style="width:230px;" @click="upDataButton">
  9. 准入材料上传完毕,提交申请</p>
  10. </div>
  11. <div class="addPage-max-box scrollbar-box">
  12. <el-form :model="form" ref="form" :rules="rules" label-position="left" label-width="100px">
  13. <div class="addPage-type-one" style="text-align: center" v-if="minType == 1">
  14. <p class="addPage-type-one-title">实验室安全准入是进入实验室所需的必要手续,为保障您能够顺利申请准入资格,请在申请前请认真阅读以下内容。</p>
  15. <div style="text-align: left;margin-left:36%">
  16. <p class="addPage-type-one-title-min">1、您在申请前请提前了解所申请实验室的准入材料并提前准备相应材料;</p>
  17. <p class="addPage-type-one-title-min">2、为保障您的安全,请在申请准入前认真学习相关实验室知识;</p>
  18. <p class="addPage-type-one-title-min">3、如您提供的材料涉嫌造假,将会剥夺您的准入申请资格;</p>
  19. <el-form-item label="申请实验室" prop="subjectId">
  20. <el-select
  21. style="width:300px;"
  22. v-model="form.subjectId"
  23. filterable
  24. remote
  25. reserve-keyword
  26. @change="selectChange"
  27. placeholder="请输入实验室关键词"
  28. :remote-method="userSelectList"
  29. :loading="loading">
  30. <el-option
  31. v-for="item in laboratoryOptions"
  32. :key="item.subId"
  33. :label="item.subName"
  34. :value="item.subId">
  35. </el-option>
  36. </el-select>
  37. </el-form-item>
  38. <el-form-item label="申请期限" prop="dateRange">
  39. <el-date-picker
  40. :clearable="false"
  41. v-model="dateRange"
  42. size="small"
  43. style="width: 300px"
  44. value-format="yyyy-MM-dd"
  45. type="daterange"
  46. range-separator="-"
  47. :picker-options="pickerOptions0"
  48. start-placeholder="开始日期"
  49. end-placeholder="结束日期"
  50. ></el-date-picker>
  51. </el-form-item>
  52. <el-form-item label="申请备注" prop="applyCause">
  53. <el-input type="textarea" style="width: 300px" v-model="form.applyCause" resize="none"
  54. placeholder="请输入申请备注" maxlength="50"/>
  55. </el-form-item>
  56. </div>
  57. </div>
  58. <!--学生-->
  59. <div class="addPage-type-two" v-if="minType == 2&&subjectData.sysUser.userType == '2'">
  60. <el-form class="item-max-box" :model="queryParams" ref="queryParams" :rules="rules" label-width="80px">
  61. <div class="item-title-box">
  62. <p>*</p>
  63. <p style="margin-right:10px;">身份卡</p>
  64. <p>(关联学生信息材料)</p>
  65. </div>
  66. <el-row>
  67. <el-col :span="6">
  68. <el-form-item label="申请人" prop="userName">
  69. <el-input v-model="queryParams.userName" disabled placeholder="未绑定信息" clearable
  70. style="width:220px;"/>
  71. </el-form-item>
  72. </el-col>
  73. <el-col :span="6">
  74. <el-form-item label="联系方式" prop="mobile">
  75. <el-input v-model="queryParams.mobile" disabled placeholder="未绑定联系方式" clearable
  76. style="width:220px;"/>
  77. </el-form-item>
  78. </el-col>
  79. </el-row>
  80. <el-row>
  81. <el-col :span="6">
  82. <el-form-item label="学号" prop="account">
  83. <el-input v-model="queryParams.account" disabled placeholder="未绑定学号" clearable
  84. style="width:220px;"/>
  85. </el-form-item>
  86. </el-col>
  87. <el-col :span="6">
  88. <el-form-item label="物理卡号" prop="cardNumSimple">
  89. <el-input v-model="queryParams.cardNumSimple" disabled placeholder="未绑定物理卡号" clearable
  90. style="width:220px;"/>
  91. </el-form-item>
  92. </el-col>
  93. </el-row>
  94. <el-row>
  95. <el-col :span="6">
  96. <el-form-item label="班级" prop="gradeName">
  97. <el-input v-model="queryParams.gradeName" disabled maxlength="10" placeholder="未绑定班级" clearable
  98. style="width:220px;"/>
  99. </el-form-item>
  100. </el-col>
  101. <el-col :span="6">
  102. <el-form-item label="导师" prop="tutorUserId" class="form-item">
  103. <el-select
  104. style="width:220px;"
  105. disabled
  106. v-model="queryParams.tutorUserId"
  107. filterable
  108. remote
  109. clearable
  110. reserve-keyword
  111. placeholder="未绑定导师"
  112. :remote-method="systemUserSelectUser"
  113. :loading="loading">
  114. <el-option
  115. v-for="item in optionsUser"
  116. :key="item.userId"
  117. :label="item.userName"
  118. :value="item.userId">
  119. </el-option>
  120. </el-select>
  121. </el-form-item>
  122. </el-col>
  123. </el-row>
  124. </el-form>
  125. <div v-for="(item,index) in subjectData.listStudent" :key="index">
  126. <div class="item-max-box" v-if="item.materialType==2&&item.relationType==2">
  127. <div class="item-title-box">
  128. <p>*</p>
  129. <p>安全考试证书</p>
  130. <p>(已同步证书信息):</p>
  131. </div>
  132. <img v-if="item.materialType==2&&item.relationType==2&&subjectData.userCertificate"
  133. @click="fullScreenViewClick(subjectData.userCertificate)"
  134. class="item-img-box" :src="subjectData.userCertificate">
  135. <p v-if="item.materialType==2&&item.relationType==2&&!subjectData.userCertificate"
  136. style="margin-left:40px;color:#999;font-size:14px;line-height:40px;">暂无证书</p>
  137. </div>
  138. <div class="item-max-box" v-if="item.materialType==1">
  139. <div class="item-title-box">
  140. <p>*</p>
  141. <p>{{item.materialName}}:</p>
  142. <p></p>
  143. </div>
  144. <p class="item-title-text">{{item.materialDescribe}}</p>
  145. <el-form-item label="" prop="userIds" label-width="0">
  146. <div class="item-input-box">
  147. <input type="text" v-model="form.proveImg" disabled :placeholder="item.materialName">
  148. <el-upload
  149. class="avatar-uploader"
  150. :action="uploadImgUrl"
  151. :show-file-list="false"
  152. accept=".jpeg,.gif,.png,.pdf,.docx"
  153. :on-success="(res)=>handleAvatarSuccess(res,item)"
  154. :headers="headers"
  155. :before-upload="(file)=>beforeAvatarUpload(file,item)">
  156. <p
  157. style="line-height:40px;text-align: center;background-color: #0183FA;color:#fff;width:80px;border-radius:6px;">
  158. 上传</p>
  159. </el-upload>
  160. </div>
  161. <!-- <div style="color: #999;padding-left: 12px;">此处为准入条件中的材料备注</div>-->
  162. <div class="item-input-for-box">
  163. <!--循环-->
  164. <div class="item-input-for-big" v-for="(minItem,minIndex) in item.upList" :key="minIndex">
  165. <div class="item-input-for-min">
  166. <p>{{minItem.name}}</p>
  167. <!-- <a class="file_list_look" :href="minItem.url" target="_blank">查看</a>-->
  168. <i style="font-style:normal;" @click="fullScreenFileLookClick(minItem)">查看</i>
  169. <i style="font-style:normal;" @click="delUpData(item,minIndex)">删除</i>
  170. </div>
  171. </div>
  172. </div>
  173. </el-form-item>
  174. </div>
  175. </div>
  176. </div>
  177. </el-form>
  178. </div>
  179. <fullScreenView :fullScreenViewProps="fullScreenViewProps" ref="fullScreenView"></fullScreenView>
  180. <fullScreenFileLook ref="fullScreenFileLook"></fullScreenFileLook>
  181. </div>
  182. </template>
  183. <script>
  184. let Base64 = require('js-base64').Base64
  185. import { mapGetters } from 'vuex'
  186. // V3
  187. import { materialApply, laboratoryApplyMaterialAdd, laboratoryApplyMaterialUpdate } from '@/api/secureAccess/index'
  188. import { laboratorySubRelInfoGetRelListByPower, systemUserSelectUser } from '@/api/commonality/permission'
  189. import { getToken } from '@/utils/auth'
  190. import fullScreenView from "@/components/fullScreenView/fullScreenView.vue";
  191. import fullScreenFileLook from "@/components/fullScreenFileLook/fullScreenFileLook.vue";
  192. export default {
  193. name: 'addPage',
  194. components: {
  195. fullScreenView,
  196. fullScreenFileLook
  197. },
  198. props: {
  199. infoData: {},
  200. infoType: {}
  201. },
  202. data() {
  203. return {
  204. uploadImgUrl: this.uploadUrl(), // 上传的图片服务器地址
  205. headers: {
  206. Authorization: getToken()
  207. },
  208. // 设置只能选择当前日期及之后的日期
  209. pickerOptions0: {
  210. disabledDate(time) {
  211. return time.getTime() < Date.now() - 8.64e7//如果没有后面的-8.64e7就是不可以选择今天的
  212. }
  213. },
  214. loading: false,
  215. minType: 1,
  216. laboratoryOptions: [],
  217. form: {
  218. validTime: 12,
  219. subjectId: '',
  220. subjectName: '',
  221. validBegin_time: '',//开始时间
  222. validEnd_time: '',//结束时间
  223. applyCause: ''//备注
  224. },
  225. dateRange: [],
  226. // 表单校验
  227. rules: {
  228. validTime: [
  229. { required: true, message: '请选择资格有效期', trigger: 'blur' }
  230. ],
  231. subjectId: [
  232. { required: true, message: '请选择实验室', trigger: 'blur' }
  233. ],
  234. chName: [
  235. { required: true, message: '请输入标题', trigger: 'blur' },
  236. { required: true, message: '请输入标题', validator: this.spaceJudgment, trigger: 'blur' }
  237. ],
  238. code: [
  239. { required: true, message: '请输入编号', trigger: 'blur' },
  240. { required: true, message: '请输入编号', validator: this.spaceJudgment, trigger: 'blur' }
  241. ],
  242. content: [
  243. { required: true, message: '请编辑详情', trigger: 'change' },
  244. { required: true, message: '请编辑详情', validator: this.spaceJudgment, trigger: 'blur' }
  245. ],
  246. /* applyCause: [
  247. { required: true, message: "请输入备注", trigger: "blur" }
  248. ],*/
  249. dateRange: [
  250. { type: '', required: true, message: '请选择申请期限', trigger: ' ' }
  251. ],
  252. /*身份卡信息校验*/
  253. userName: [
  254. { required: true, message: '请先行编辑个人信息', trigger: 'change' },
  255. { required: true, message: '请先行编辑个人信息', validator: this.spaceJudgment, trigger: 'blur' }
  256. ],
  257. mobile: [
  258. { required: true, message: '请先行绑定联系方式', trigger: 'change' },
  259. { required: true, message: '请先行绑定联系方式', validator: this.spaceJudgment, trigger: 'blur' }
  260. ],
  261. account: [
  262. { required: true, message: '请先行绑定学号', trigger: 'change' },
  263. { required: true, message: '请先行绑定学号', validator: this.spaceJudgment, trigger: 'blur' }
  264. ],
  265. cardNumSimple: [
  266. { required: true, message: '请先行绑定物理卡号', trigger: 'change' },
  267. { required: true, message: '请先行绑定物理卡号', validator: this.spaceJudgment, trigger: 'blur' }
  268. ],
  269. tutorUserId: [
  270. { required: true, message: '请先行绑定导师', trigger: 'change' },
  271. { required: true, message: '请先行绑定导师', validator: this.spaceJudgment, trigger: 'blur' }
  272. ],
  273. gradeName: [
  274. { required: true, message: '请输入班级', trigger: 'change' },
  275. { required: true, message: '请输入班级', validator: this.spaceJudgment, trigger: 'blur' }
  276. ]
  277. },
  278. subject: {},
  279. //实验室准入条件
  280. subjectData: {},
  281. upDataName: '',
  282. queryParams: {},
  283. optionsUser: [],
  284. remark: '1',
  285. //图片浏览
  286. fullScreenViewProps:[],
  287. }
  288. },
  289. computed: {
  290. ...mapGetters([
  291. 'name'
  292. ])
  293. },
  294. created() {
  295. if (this.infoType) {
  296. this.$set(this,'remark','');
  297. this.$set(this.form,'subjectId',this.infoData.labSecurityApply.subId);
  298. this.$set(this,'dateRange',[
  299. this.parseTime(this.infoData.labSecurityApply.validBeginTime,"{y}-{m}-{d}"),
  300. this.parseTime(this.infoData.labSecurityApply.validEndTime,"{y}-{m}-{d}")
  301. ]);
  302. this.getApproval()
  303. }
  304. },
  305. methods: {
  306. //图片浏览
  307. fullScreenViewClick(url){
  308. this.$set(this,'fullScreenViewProps',[url]);
  309. this.$refs['fullScreenView'].initialize();
  310. },
  311. //文件浏览
  312. fullScreenFileLookClick(item){
  313. //判断类型
  314. let type = '';
  315. if(item.name.split('.')[1] == 'docx'){
  316. type = 'docx'
  317. }else if(item.name.split('.')[1] == 'xlsx'){
  318. type = 'excel'
  319. }else if(item.name.split('.')[1] == 'pdf'){
  320. type = 'pdf'
  321. }else if(item.name.split('.')[1] == 'png' || item.name.split('.')[1] == 'jpg' || item.name.split('.')[1] == 'gif'){
  322. type = 'img'
  323. }
  324. //整合地址
  325. let url = window.location.href.split('://')[0]+'://'+localStorage.getItem('fileBrowseEnvironment')+item.url;
  326. // 判断图片还是文件
  327. if(type == 'img'){
  328. this.$set(this,'fullScreenViewProps',[url]);
  329. this.$refs['fullScreenView'].initialize();
  330. }else if(type == 'docx' || type == 'excel' || type == 'pdf'){
  331. this.$refs['fullScreenFileLook'].initialize(item.name,url,type);
  332. }
  333. },
  334. /** 导师-懒加载 */
  335. systemUserSelectUser(query) {
  336. if (query !== '' && query) {
  337. let obj = {
  338. userName: query,
  339. userType: '1'
  340. }
  341. systemUserSelectUser(obj).then(response => {
  342. this.optionsUser = response.data
  343. })
  344. } else {
  345. this.optionsUser = []
  346. }
  347. },
  348. laboratoryApplyMaterialUpdate(obj) {
  349. laboratoryApplyMaterialUpdate(obj).then(response => {
  350. this.msgSuccess('提交成功')
  351. this.$parent.pageClick(1)
  352. })
  353. },
  354. laboratoryApplyMaterialAdd(obj) {
  355. laboratoryApplyMaterialAdd(obj).then(response => {
  356. this.msgSuccess('提交成功')
  357. this.$parent.pageClick(1)
  358. })
  359. },
  360. //提交按钮
  361. upDataButton() {
  362. let self = this
  363. this.$refs['queryParams'].validate(valid => {
  364. if (valid) {
  365. if (this.dateRange && this.dateRange.length > 0) {
  366. this.form.validBegin_time = this.dateRange[0]+'T00:00:00'
  367. this.form.validEnd_time = this.dateRange[1]+'T23:59:59'
  368. } else {
  369. this.form.validBegin_time = null
  370. this.form.validEnd_time = null
  371. }
  372. let sysUser = {
  373. userName: this.queryParams.userName,
  374. mobile: this.queryParams.mobile,
  375. account: this.queryParams.account,
  376. cardNumSimple: this.queryParams.cardNumSimple,
  377. tutorUserId: this.queryParams.tutorUserId,
  378. grade: this.queryParams.gradeName,
  379. tutorUserName: this.queryParams.tutorUserName,
  380. userId: this.queryParams.userId
  381. }
  382. let obj = {
  383. subAdminId: this.subjectData.fzrSysUser.userId,
  384. userNumber: this.subjectData.sysUser.account,//学号/工号
  385. userMajor: this.subjectData.sysUser.majorName,//专业名称
  386. userMajorId: this.subjectData.sysUser.major,//专业ID
  387. deptId: this.subject.deptId, //NULL部门id
  388. deptName: this.subject.deptName, //NULL部门名称
  389. subId: this.subject.subId, //NULL实验室id
  390. subName: this.subject.subName, //NULL实验室名称
  391. auditStatus: '0', //NULL审核状态 0待审核 1驳回 2通过
  392. //validLength:this.form.validTime, //NULL有效期 月份时长
  393. relList: [],//上传资料
  394. sysUserModel: sysUser,//身份卡用户信息
  395. validBeginTime: this.form.validBegin_time,//申请期限开始时间
  396. validEndTime: this.form.validEnd_time,//申请期限结束时间
  397. applyCause: this.form.applyCause//申请备注
  398. }
  399. if (this.subjectData.sysUser.userType == '2') {
  400. for (let i = 0; i < self.subjectData.listStudent.length; i++) {
  401. if (self.subjectData.listStudent[i].materialType == 1) {
  402. if (!self.subjectData.listStudent[i].upList[0]) {
  403. this.msgError(self.subjectData.listStudent[i].materialName + '未上传')
  404. return
  405. } else {
  406. let upData = {
  407. materialId: self.subjectData.listStudent[i].materialId,
  408. dataName: self.subjectData.listStudent[i].materialName,
  409. dataDescribe: self.subjectData.listStudent[i].materialDescribe,
  410. dataUrl: ''
  411. }
  412. for (let o = 0; o < self.subjectData.listStudent[i].upList.length; o++) {
  413. upData.dataUrl = upData.dataUrl + self.subjectData.listStudent[i].upList[o].name + ';' + self.subjectData.listStudent[i].upList[o].url + ','
  414. }
  415. obj.relList.push(upData)
  416. }
  417. }
  418. }
  419. }
  420. this.$confirm('是否确认提交?', "", {
  421. confirmButtonText: "确定",
  422. cancelButtonText: "取消",
  423. type: "warning"
  424. }).then(function() {
  425. if (self.infoType) {
  426. obj.applyId = self.infoData.labSecurityApply.applyId
  427. self.laboratoryApplyMaterialUpdate(obj)
  428. } else {
  429. self.laboratoryApplyMaterialAdd(obj)
  430. }
  431. }).then(() => {}).catch(() => {});
  432. }
  433. })
  434. },
  435. //删除对应资料
  436. delUpData(item, index) {
  437. item.upList.splice(index, 1)
  438. this.$forceUpdate()
  439. },
  440. //查看对应资料
  441. lookUpData(item, index) {
  442. this.$refs.preview.showViewer = true
  443. // this.$forceUpdate()
  444. },
  445. //上传相关
  446. handleAvatarSuccess(res, item) {
  447. let obj = {
  448. name: this.queryParams.userName + item.materialName + '.' + this.upDataName.split('.')[this.upDataName.split('.').length - 1],
  449. url: res.data.url
  450. }
  451. item.upList.push(obj)
  452. this.$forceUpdate()
  453. },
  454. beforeAvatarUpload(file, item) {
  455. let type = true
  456. let suffix = file.name.split('.')[file.name.split('.').length - 1]
  457. let suffixName = file.name.split('.')[file.name.split('.').length - 2]
  458. let fileTypeArr = item.fileType.split(',')
  459. let strArr = []
  460. fileTypeArr.forEach(function(item) {
  461. if (item == '1') {
  462. strArr.push('pdf')
  463. } else if (item == '2') {
  464. strArr.push('docx')
  465. } else if (item == '3') {
  466. strArr.push('png', 'jpg', 'gif')
  467. }
  468. })
  469. if (item.upList.length > 4) {
  470. this.msgError('已到达上传数量上限')
  471. type = false
  472. }
  473. //判断文件名中是否有逗号和分号
  474. if (suffixName.indexOf(',') == -1 && suffixName.indexOf(';') == -1) {
  475. } else {
  476. this.$message.info('文件名里包含逗号或分号,请修改后重新上传!')
  477. type = false
  478. }
  479. if (strArr.indexOf(suffix) == -1) {
  480. this.$message.error('请上传' + strArr.join(',') + '格式文件')
  481. type = false
  482. }
  483. //学生名称+文件名称
  484. if (file.type == 'image/png' || file.type == 'image/jpeg' || file.type == 'image/gif' || file.type == 'application/pdf' || file.type == 'application/vnd.openxmlformats-officedocument.wordprocessingml.document') {
  485. this.upDataName = file.name
  486. // type = true
  487. } else {
  488. this.$message.error('只能上传png/jpeg/gif/docx格式')
  489. type = false
  490. }
  491. return type
  492. },
  493. //实验室选择
  494. selectChange(e) {
  495. let self = this
  496. for (let i = 0; i < self.laboratoryOptions.length; i++) {
  497. if (self.laboratoryOptions[i].subId == e) {
  498. this.$set(this, 'subject', self.laboratoryOptions[i])
  499. }
  500. }
  501. this.$set(this.form, 'subjectId', e)
  502. },
  503. //获取当前实验室准入配置
  504. getApproval() {
  505. let self = this
  506. let obj = {
  507. subId: this.form.subjectId,
  508. remark: this.remark,
  509. startTime: this.dateRange[0] + 'T00:00:00',
  510. endTime: this.dateRange[1] + 'T23:59:59'
  511. }
  512. materialApply(obj).then(response => {
  513. if (response.data.sysUser.userType == '2') {
  514. if (!response.data.listStudent[0]) {
  515. this.msgError('该实验室未设置准入条件')
  516. return
  517. }
  518. if (response.data.listStudent) {
  519. for (let i = 0; i < response.data.listStudent.length; i++) {
  520. if (response.data.listStudent[i].materialType == 1) {
  521. response.data.listStudent[i].upList = []
  522. }
  523. }
  524. }
  525. this.$set(this, 'subjectData', response.data)
  526. this.$set(this, 'queryParams', response.data.sysUser)
  527. //选择框禁用判定
  528. if (this.queryParams.tutorUserId) {
  529. this.$set(this.queryParams, 'tutorUserId', this.queryParams.tutorUserId)
  530. this.systemUserSelectUser(this.queryParams.tutorUserName)
  531. }
  532. this.minType = 2
  533. if (this.infoType) {
  534. this.form.validTime = this.infoData.labSecurityApply.validLength
  535. for (let i = 0; i < self.infoData.listTemp.length; i++) {
  536. if (self.infoData.listTemp[i].materialType == 1) {
  537. if (self.subjectData.sysUser.userType == '2') {
  538. for (let o = 0; o < self.subjectData.listStudent.length; o++) {
  539. if (self.subjectData.listStudent[o].materialType == 1 && self.subjectData.listStudent[o].id == self.infoData.listTemp[i].id) {
  540. self.subjectData.listStudent[o].upList = JSON.parse(JSON.stringify(self.infoData.listTemp[i].upList))
  541. }
  542. }
  543. }
  544. }
  545. }
  546. }
  547. } else {
  548. this.msgError('您不是学生,无法申请准入')
  549. }
  550. })
  551. },
  552. //状态切换
  553. typeClick() {
  554. if (!this.form.subjectId) {
  555. this.msgError('请选择实验室')
  556. return
  557. }
  558. if (this.dateRange.length <= 0) {
  559. this.msgError('请选择申请期限')
  560. return
  561. }
  562. this.getApproval()
  563. },
  564. //返回
  565. backPage() {
  566. this.$parent.pageClick(1)
  567. },
  568. //懒加载
  569. userSelectList(e) {
  570. laboratorySubRelInfoGetRelListByPower({ subName: e }).then(response => {
  571. this.laboratoryOptions = response.data
  572. })
  573. }
  574. }
  575. }
  576. </script>
  577. <style scoped lang="scss">
  578. .approval_handle_addPage {
  579. .top-title-box {
  580. display: flex;
  581. border-bottom: 1px solid #E0E0E0;
  582. padding-top: 20px;
  583. p:nth-child(1) {
  584. flex: 1;
  585. line-height: 60px;
  586. color: #0045AF;
  587. font-size: 18px;
  588. margin: 0 0 0 40px;
  589. }
  590. p:nth-child(2) {
  591. margin-right: 20px;
  592. }
  593. }
  594. .addPage-max-box {
  595. flex: 1;
  596. padding: 20px 20px 20px !important;
  597. .addPage-type-one {
  598. .addPage-type-one-title {
  599. font-size: 16px;
  600. font-weight: 700;
  601. line-height: 18px;
  602. margin: 26px 38px;
  603. }
  604. .addPage-type-one-title-min {
  605. font-size: 14px;
  606. line-height: 16px;
  607. margin: 20px 62px 20px 0;
  608. color: #666666;
  609. }
  610. }
  611. .addPage-type-two {
  612. p {
  613. margin: 0;
  614. }
  615. .item-max-box {
  616. margin-left: 58px;
  617. .item-title-box {
  618. display: flex;
  619. p {
  620. font-size: 16px;
  621. line-height: 80px;
  622. }
  623. p:nth-child(1) {
  624. color: red;
  625. margin-right: 10px;
  626. }
  627. p:nth-child(2) {
  628. color: #333;
  629. font-weight: 700;
  630. }
  631. p:nth-child(3) {
  632. color: #999;
  633. font-weight: 700;
  634. }
  635. }
  636. .item-user-box {
  637. display: flex;
  638. margin-left: 15px;
  639. div {
  640. display: flex;
  641. margin-right: 60px;
  642. p {
  643. font-size: 14px;
  644. }
  645. p:nth-child(1) {
  646. color: #999;
  647. }
  648. p:nth-child(2) {
  649. color: #666;
  650. }
  651. }
  652. }
  653. .item-title-text {
  654. margin-left: 15px;
  655. font-size: 14px;
  656. line-height: 20px;
  657. color: #999;
  658. }
  659. .item-input-box {
  660. display: flex;
  661. margin: 20px 0 0 15px;
  662. input {
  663. width: 390px;
  664. height: 40px;
  665. padding: 0 20px;
  666. margin-right: 20px;
  667. }
  668. }
  669. .item-input-for-box {
  670. margin: 20px 0 0 5px;
  671. .item-input-for-big {
  672. display: inline-block;
  673. border-radius: 6px;
  674. background: rgba(1, 131, 250, 0.2);
  675. margin: 0 10px 10px;
  676. .item-input-for-min {
  677. display: flex;
  678. p {
  679. flex: 1;
  680. padding: 0 20px;
  681. margin: 0;
  682. line-height: 30px;
  683. color: #0183FA;
  684. }
  685. i {
  686. line-height: 30px;
  687. color: #0183FA;
  688. margin-right: 8px;
  689. cursor: pointer;
  690. }
  691. a {
  692. line-height: 30px;
  693. color: #0183FA;
  694. margin-right: 8px;
  695. cursor: pointer;
  696. }
  697. img {
  698. width: 16px;
  699. height: 16px;
  700. margin: 7px 7px;
  701. cursor: pointer;
  702. }
  703. }
  704. }
  705. }
  706. .item-img-box {
  707. width: 240px;
  708. margin-left: 15px;
  709. cursor: pointer;
  710. }
  711. }
  712. }
  713. }
  714. }
  715. /*点击查看图片预览*/
  716. /* .my-img {
  717. width: 10px;
  718. height: 10px;
  719. visibility: hidden;
  720. }*/
  721. </style>