addSubject.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763
  1. <template>
  2. <div class="addSubject scrollbar-box">
  3. <el-form ref="form" :model="form" label-width="120px" :rules="rules" >
  4. <div class="title-box">
  5. <p class="left-title">基本信息</p>
  6. </div>
  7. <el-form-item label="实验室名称" prop="name" class="form-item">
  8. <el-input
  9. style="width:320px;"
  10. maxlength="30"
  11. v-model="form.name"
  12. placeholder="请输实验室名称"
  13. clearable
  14. size="small"
  15. />
  16. </el-form-item>
  17. <el-form-item label="类型" prop="moldId" class="form-item">
  18. <el-select v-model="form.moldId" placeholder="请选择类型" clearable style="width:320px;">
  19. <el-option
  20. v-for="dict in labMoldList"
  21. :key="dict.id"
  22. :label="dict.moldName"
  23. :value="dict.id"
  24. ></el-option>
  25. </el-select>
  26. </el-form-item>
  27. <el-form-item label="安全分类" prop="typeId" class="form-item">
  28. <el-select v-model="form.typeId" placeholder="请选择安全分类" clearable style="width:320px;">
  29. <el-option
  30. v-for="dict in typeList"
  31. :key="dict.id"
  32. :label="dict.typeName"
  33. :value="dict.id"
  34. ></el-option>
  35. </el-select>
  36. </el-form-item>
  37. <el-form-item label="安全分级" prop="level" class="form-item">
  38. <el-select v-model="form.level" placeholder="请选择安全分级" clearable style="width:320px;">
  39. <el-option
  40. v-for="dict in levelList"
  41. :key="dict.id"
  42. :label="dict.classifiedName"
  43. :value="dict.id"
  44. ></el-option>
  45. </el-select>
  46. </el-form-item>
  47. <el-form-item label="学院" prop="deptId" class="form-item">
  48. <el-select v-model="form.deptId" placeholder="请选择学院" @change="getBuildings" style="width:320px;">
  49. <el-option
  50. v-for="dict in deptOptions"
  51. :key="dict.deptId"
  52. :label="dict.deptName"
  53. :value="dict.deptId"
  54. ></el-option>
  55. </el-select>
  56. </el-form-item>
  57. <el-form-item label="楼栋" prop="buildId" class="form-item">
  58. <el-select v-model="form.buildId" placeholder="请选择楼栋" @change="getFloors" style="width:320px;">
  59. <el-option
  60. v-for="dict in buildings"
  61. :key="dict.deptId"
  62. :label="dict.deptName"
  63. :value="dict.deptId"
  64. ></el-option>
  65. </el-select>
  66. </el-form-item>
  67. <el-form-item label="楼层" prop="floorId" class="form-item">
  68. <el-select v-model="form.floorId" placeholder="请选择层数" @change="getLayouts" style="width:320px;">
  69. <el-option
  70. v-for="dict in floors"
  71. :key="dict.id"
  72. :label="dict.name"
  73. :value="dict.id"
  74. ></el-option>
  75. </el-select>
  76. </el-form-item>
  77. <el-form-item label="房间号" prop="room" class="form-item">
  78. <el-input
  79. style="width:320px;"
  80. maxlength="10"
  81. v-model="form.room"
  82. placeholder="请输房间号"
  83. clearable
  84. size="small"
  85. />
  86. </el-form-item>
  87. <el-form-item label="准入设备" class="form-item">
  88. <el-select v-model="form.hardwareType" placeholder="请选择整改类型" style="width:320px;" @change="hardwareTypeFun()" >
  89. <el-option label="无" :value="0" />
  90. <el-option label="海康智能门禁" :value="1" />
  91. <el-option label="电子信息牌" :value="2" />
  92. </el-select>
  93. </el-form-item>
  94. <!--<el-form-item label="详细位置" prop="layoutId" class="form-item">-->
  95. <!--<el-select v-model="form.layoutId" placeholder="请选择详细位置" style="width:320px;">-->
  96. <!--<el-option-->
  97. <!--v-for="dict in layoutLists"-->
  98. <!--:key="dict.id"-->
  99. <!--:label="dict.room"-->
  100. <!--:value="dict.id"-->
  101. <!--&gt;</el-option>-->
  102. <!--</el-select>-->
  103. <!--</el-form-item>-->
  104. <div class="title-button-box">
  105. <div class="title-min-button-box" :class="checkButtonType == 1?'checkButtonBox':''">
  106. <p @click="clickButtonType(1)">管控一体机</p>
  107. <p></p>
  108. </div>
  109. <div class="title-min-button-box" :class="checkButtonType == 2?'checkButtonBox':''">
  110. <p @click="clickButtonType(2)">安全信息牌</p>
  111. <p></p>
  112. </div>
  113. <div class="title-null-div">
  114. <p></p>
  115. <p></p>
  116. </div>
  117. </div>
  118. <!--管控一体机-->
  119. <div class="bottom-form-box-one" v-if="checkButtonType == 1">
  120. <div class="left-form-box">
  121. <el-form-item label="实验室负责人" prop="adminId" class="form-item">
  122. <el-select
  123. style="width:500px;"
  124. v-model="form.adminId"
  125. filterable
  126. remote
  127. clearable
  128. reserve-keyword
  129. placeholder="请输入至少2个字符搜索相关人员"
  130. :remote-method="userSelectList"
  131. :loading="loading">
  132. <el-option
  133. v-for="item in optionsUser"
  134. :key="item.userId"
  135. :label="item.nickName"
  136. :value="item.userId">
  137. </el-option>
  138. </el-select>
  139. </el-form-item>
  140. <el-form-item label="安全警示标识" prop="safeSigns" class="form-item">
  141. <el-select v-model="form.safeSigns" multiple placeholder="请选择安全警示标识" style="width:500px;">
  142. <el-option
  143. v-for="dict in safetyWarning"
  144. :key="dict.dictValue"
  145. :label="dict.dictLabel"
  146. :value="dict.dictValue"
  147. ></el-option>
  148. </el-select>
  149. </el-form-item>
  150. <el-form-item label="风控防控措施" prop="riskMeasure" class="form-item">
  151. <el-select v-model="form.riskMeasure" multiple placeholder="请选择风险防控措施" style="width:500px;">
  152. <el-option
  153. v-for="dict in riskMeasure"
  154. :key="dict.dictValue"
  155. :label="dict.dictLabel"
  156. :value="dict.dictValue"
  157. ></el-option>
  158. </el-select>
  159. </el-form-item>
  160. </div>
  161. <div class="right-form-box">
  162. <el-form-item label="安全责任人" prop="safeUserId" class="form-item">
  163. <el-select
  164. style="width:500px;"
  165. v-model="form.safeUserId"
  166. :multiple-limit="2"
  167. multiple
  168. filterable
  169. remote
  170. clearable
  171. reserve-keyword
  172. placeholder="请输入至少2个字符搜索相关人员"
  173. :remote-method="userSelectListOne"
  174. :loading="loading">
  175. <el-option
  176. v-for="item in optionsUserOne"
  177. :key="item.userId"
  178. :label="item.nickName"
  179. :value="item.userId">
  180. </el-option>
  181. </el-select>
  182. </el-form-item>
  183. <el-form-item label="主要危险类别" prop="hazardCategory" class="form-item">
  184. <el-select v-model="form.hazardCategory" multiple placeholder="请选择主要危险类别" style="width:500px;">
  185. <el-option
  186. v-for="dict in hazardCategory"
  187. :key="dict.dictValue"
  188. :label="dict.dictLabel"
  189. :value="dict.dictValue"
  190. ></el-option>
  191. </el-select>
  192. </el-form-item>
  193. <el-form-item label="灭火要点" prop="outfire" class="form-item">
  194. <el-select v-model="form.outfire" multiple placeholder="请选择灭火要点" style="width:500px;">
  195. <el-option
  196. v-for="dict in extinguishingKeyPoints"
  197. :key="dict.dictValue"
  198. :label="dict.dictLabel"
  199. :value="dict.dictValue"
  200. ></el-option>
  201. </el-select>
  202. </el-form-item>
  203. </div>
  204. </div>
  205. <!--安全信息牌-->
  206. <div class="bottom-form-box" v-if="checkButtonType == 2">
  207. <div class="top-form-box">
  208. <el-form-item label="实验室负责人" prop="adminId" class="form-item" label-width="180px">
  209. <el-select
  210. style="width:500px;"
  211. v-model="form.adminId"
  212. filterable
  213. remote
  214. clearable
  215. reserve-keyword
  216. placeholder="请输入至少2个字符搜索相关人员"
  217. :remote-method="userSelectList"
  218. :loading="loading">
  219. <el-option
  220. v-for="item in optionsUser"
  221. :key="item.userId"
  222. :label="item.nickName"
  223. :value="item.userId">
  224. </el-option>
  225. </el-select>
  226. </el-form-item>
  227. <el-form-item label="安全责任人" prop="safeUserId" class="form-item" label-width="180px">
  228. <el-select
  229. style="width:500px;"
  230. v-model="form.safeUserId"
  231. :multiple-limit="2"
  232. multiple
  233. filterable
  234. remote
  235. clearable
  236. reserve-keyword
  237. placeholder="请输入至少2个字符搜索相关人员"
  238. :remote-method="userSelectListOne"
  239. :loading="loading">
  240. <el-option
  241. v-for="item in optionsUserOne"
  242. :key="item.userId"
  243. :label="item.nickName"
  244. :value="item.userId">
  245. </el-option>
  246. </el-select>
  247. </el-form-item>
  248. </div>
  249. <div class="bottom-form-box">
  250. <el-form-item v-if="item.publicList.length>0" :label="item.classifyName" prop="safeSigns" class="form-item" v-for="(item,index) in safetyInfoList" label-width="180px">
  251. <el-select v-if="item.publicList.length>0" v-model="item.privateList" multiple placeholder="请选择" style="width:500px;">
  252. <el-option
  253. v-for="dict in item.publicList"
  254. :key="dict.id"
  255. :label="dict.infoName"
  256. :value="dict.id"
  257. ></el-option>
  258. </el-select>
  259. </el-form-item>
  260. </div>
  261. </div>
  262. <div class="title-box">
  263. <p class="left-title">实验室简介</p>
  264. </div>
  265. <div class="rich-text">
  266. <UEditor ref="UEditor" :content="form.details" :min-height="192" />
  267. </div>
  268. <div class="bottom-button-box">
  269. <p class="reset-button-one left-button" @click="backPage">取消</p>
  270. <p class="inquire-button-one right-button" @click="upData">提交</p>
  271. </div>
  272. </el-form>
  273. </div>
  274. </template>
  275. <script>
  276. import { listDepartments,listbuildings } from "@/api/system/dept";
  277. import { listClassifiedAll } from "@/api/laboratory/classified";
  278. import { listClasstypeAll } from "@/api/laboratory/classtype";
  279. import { onUselistLayoutByFloorId,onUselistLayoutByFloorIdTwo } from "@/api/laboratory/layout";
  280. import { listFloorByBuildId } from "@/api/laboratory/building";
  281. import { selectTeacherList } from "@/api/system/user";
  282. import { addSubject, getClassifyBySubId, updateSubject } from '@/api/laboratory/subject'
  283. import { labMoldQueryOption } from "@/api/laboratory/subjectClass";
  284. export default {
  285. name: "addSubject",
  286. props:{
  287. subjectData:{},
  288. },
  289. data() {
  290. return {
  291. loading:false,
  292. levelList:[],
  293. typeList:[],
  294. deptOptions:[],
  295. buildings:[],
  296. floors:[],
  297. layoutLists:[],
  298. optionsUser:[],
  299. optionsUserOne:[],
  300. //安全标识
  301. safetyWarning:[],
  302. //主要危险类别
  303. hazardCategory:[],
  304. //风险防控措施
  305. riskMeasure:[],
  306. //灭火要点
  307. extinguishingKeyPoints:[],
  308. //安全信息牌列表信息存储
  309. safetyInfoList:[],
  310. form:{
  311. details:"",
  312. hardwareType:0,
  313. },
  314. hardwareTypeTow:0,//临时存储准入设备状态
  315. // 表单校验
  316. rules: {
  317. name:[
  318. {required: true, message: '请输实验室名称', trigger: 'blur'},
  319. { required: true, message: "请输实验室名称", validator: this.spaceJudgment, trigger: "blur" }
  320. ],
  321. moldId:[
  322. {required: true, message: '请选择类型', trigger: 'blur'}
  323. ],
  324. typeId:[
  325. {required: true, message: '请选择安全分类', trigger: 'blur'}
  326. ],
  327. level:[
  328. {required: true, message: '请选择安全分级', trigger: 'blur'}
  329. ],
  330. deptId:[
  331. {required: true, message: '请选择学院', trigger: 'blur'}
  332. ],
  333. buildId:[
  334. {required: true, message: '请选择楼栋', trigger: 'blur'}
  335. ],
  336. floorId:[
  337. {required: true, message: '请选择层数', trigger: 'blur'}
  338. ],
  339. room:[
  340. {required: true, message: '请输入房间号', trigger: 'blur'}
  341. ],
  342. layoutId:[
  343. {required: true, message: '请选择详细位置', trigger: 'blur'}
  344. ],
  345. },
  346. labMoldList:[],
  347. //一体机/电子信息牌状态切换
  348. checkButtonType:1,
  349. }
  350. },
  351. created() {
  352. },
  353. mounted(){
  354. this.getDeptList();
  355. this.getListClassifiedAll();
  356. this.getListClasstypeAll();
  357. this.labMoldQueryOption();
  358. //安全标识字典
  359. this.getDicts("sys_safety_warning").then(response => {
  360. this.safetyWarning = response.data;
  361. });
  362. //主要危险类别
  363. this.getDicts("sys_hazard_category").then(response => {
  364. this.hazardCategory = response.data;
  365. });
  366. //风险防控措施
  367. this.getDicts("sys_risk_measure").then(response => {
  368. this.riskMeasure = response.data;
  369. });
  370. //灭火要点
  371. this.getDicts("sys_extinguishing_key_points").then(response => {
  372. this.extinguishingKeyPoints = response.data;
  373. });
  374. //编辑数据回填
  375. if(this.subjectData.id){
  376. this.$set(this.form,'id',this.subjectData.id)
  377. this.$set(this.form,'name',this.subjectData.name)
  378. this.$set(this.form,'typeId',this.subjectData.typeId)
  379. this.$set(this.form,'level',this.subjectData.level)
  380. this.$set(this.form,'deptId',this.subjectData.deptId)
  381. this.$set(this.form,'buildId',this.subjectData.buildId)
  382. this.$set(this.form,'floorId',this.subjectData.floorId)
  383. this.$set(this.form,'room',this.subjectData.room)
  384. this.$set(this.form,'hardwareType',this.subjectData.hardwareType==null?0:this.subjectData.hardwareType)
  385. this.$set(this,'hardwareTypeTow',this.subjectData.hardwareType==null?0:this.subjectData.hardwareType)
  386. this.$set(this.form,'details',this.subjectData.details)
  387. this.$refs.UEditor.text=unescape(this.subjectData.details)
  388. this.$set(this.form,'moldId',this.subjectData.moldId)
  389. this.$set(this.form,'room',this.subjectData.room)
  390. this.$set(this.form,'details',this.subjectData.details)
  391. this.$refs.UEditor.text=unescape(this.subjectData.details)
  392. if(this.subjectData.adminId){
  393. this.$set(this.form,'adminId',this.subjectData.adminId)
  394. this.userSelectList(this.subjectData.adminName);
  395. }
  396. if(this.subjectData.safeSigns){
  397. this.$set(this.form,'safeSigns',this.subjectData.safeSigns.split(','))
  398. }
  399. if(this.subjectData.riskMeasure){
  400. this.$set(this.form,'riskMeasure',this.subjectData.riskMeasure.split(','))
  401. }
  402. if(this.subjectData.hazardCategory){
  403. this.$set(this.form,'hazardCategory',this.subjectData.hazardCategory.split(','))
  404. }
  405. if(this.subjectData.outfire){
  406. this.$set(this.form,'outfire',this.subjectData.outfire.split(','))
  407. }
  408. if(this.subjectData.safeUserId){
  409. let list = [];
  410. let safeUserIdList = [];
  411. let nameList = "";
  412. if(this.subjectData.safeUserName){
  413. nameList = this.subjectData.safeUserName.split(",");
  414. }
  415. let idList = "";
  416. if(this.subjectData.safeUserId){
  417. idList = this.subjectData.safeUserId.split(",");
  418. }
  419. for(let i=0;i<nameList.length;i++){
  420. safeUserIdList.push(parseInt(idList[i]))
  421. let obj = {
  422. nickName:nameList[i],
  423. userId:parseInt(idList[i]),
  424. };
  425. list.push(obj)
  426. }
  427. this.optionsUserOne = list;
  428. this.$set(this.form, 'safeUserId', safeUserIdList);
  429. }
  430. //安全信息牌
  431. if(this.subjectData.classifyList[0]){
  432. //循环取安全信息牌信息
  433. let list=this.subjectData.classifyList
  434. for(let i=0;i<list.length;i++){
  435. let list2=[];
  436. if(list[i].privateList.length>0){
  437. for(let b=0;b<list[i].privateList.length;b++){
  438. list2.push(list[i].privateList[b].id)
  439. }
  440. list[i].privateList=list2
  441. }
  442. }
  443. this.safetyInfoList=list
  444. }else{
  445. this.getClassifyBySubId();
  446. }
  447. //根据学院获取楼栋
  448. listbuildings(this.form.deptId).then(response => {
  449. this.buildings = response.data;
  450. //根据楼栋获取层
  451. listFloorByBuildId(this.form.buildId).then(response=>{
  452. this.floors = response.data;
  453. //根据层获取实验室
  454. // onUselistLayoutByFloorIdTwo(this.form.floorId,this.form.layoutId).then(response=>{
  455. // this.layoutLists = response.data;
  456. // });
  457. });
  458. });
  459. }
  460. },
  461. methods:{
  462. //一体机/电子信息牌切换
  463. clickButtonType(type){
  464. if(type != this.checkButtonType){
  465. this.$set(this,'checkButtonType',type);
  466. }
  467. },
  468. hardwareTypeFun(){
  469. if(this.hardwareTypeTow==1 && this.subjectData.hKCount>0){
  470. this.msgError("删除现有准入设备后,才能更改准入设备类型!");
  471. this.form.hardwareType=this.hardwareTypeTow
  472. }else if(this.hardwareTypeTow==2 && this.subjectData.cardInfoCount>0){
  473. this.msgError("删除现有准入设备后,才能更改准入设备类型!");
  474. this.form.hardwareType=this.hardwareTypeTow
  475. }else{
  476. console.log(this.form.hardwareType)
  477. }
  478. },
  479. //获取实验室类型列表
  480. labMoldQueryOption(){
  481. labMoldQueryOption({}).then(response => {
  482. this.$set(this,'labMoldList',response.data);
  483. });
  484. },
  485. upData(){
  486. let self = this;
  487. this.$set(this.form,'details',this.$refs.UEditor.text);
  488. this.$refs["form"].validate(valid => {
  489. if (valid) {
  490. self.$confirm('是否确认提交?', "", {
  491. confirmButtonText: "确定",
  492. cancelButtonText: "取消",
  493. type: "warning"
  494. }).then(function() {
  495. if(self.form.hazardCategory) {
  496. self.form.hazardCategory = self.form.hazardCategory.join() ;
  497. }
  498. if(self.form.outfire) {
  499. self.form.outfire = self.form.outfire.join() ;
  500. }
  501. if(self.form.riskMeasure) {
  502. self.form.riskMeasure = self.form.riskMeasure.join() ;
  503. }
  504. if(self.form.safeSigns) {
  505. self.form.safeSigns = self.form.safeSigns.join() ;
  506. }
  507. if(self.form.safeUserId) {
  508. self.form.safeUserId = self.form.safeUserId.join() ;
  509. }
  510. //循环取安全信息牌信息
  511. let list=[]
  512. for(let i=0;i<self.safetyInfoList.length;i++){
  513. let list2=[];
  514. if(self.safetyInfoList[i].privateList && self.safetyInfoList[i].privateList.length>0){
  515. for(let b=0;b<self.safetyInfoList[i].privateList.length;b++){
  516. list2.push({id:self.safetyInfoList[i].privateList[b]})
  517. }
  518. list.push({id:self.safetyInfoList[i].id,privateDetailList:list2})
  519. }
  520. }
  521. self.form.classifyList=list
  522. if(self.form.id){
  523. self.updateSubject();
  524. }else{
  525. self.addSubject();
  526. }
  527. }).then(() => {}).catch(() => {});
  528. }
  529. })
  530. },
  531. //新增实验室
  532. addSubject(){
  533. this.form.details = escape(this.form.details);
  534. addSubject(this.form).then(response => {
  535. this.msgSuccess("新增成功");
  536. this.$parent.clickPage(1);
  537. });
  538. },
  539. //修改实验室
  540. updateSubject(){
  541. this.form.details = escape(this.form.details);
  542. updateSubject(this.form).then(response => {
  543. this.msgSuccess("修改成功");
  544. this.$parent.clickPage(1);
  545. });
  546. },
  547. backPage(){
  548. this.$parent.clickPage(1);
  549. },
  550. /** 查询学院列表 */
  551. getDeptList() {
  552. listDepartments().then(response => {
  553. this.$set(this, 'deptOptions', response.data)
  554. });
  555. },
  556. /** 查询楼栋列表 */
  557. getBuildings(id) {
  558. if(id) {
  559. this.$set(this.form, 'buildId', '');//楼栋
  560. this.buildings = [];
  561. this.$set(this.form, 'floorId', '');//楼层
  562. this.floors = [];
  563. // this.$set(this.form, 'layoutId', '');//房间
  564. this.layoutLists = [];
  565. listbuildings(id).then(response => {
  566. this.buildings = response.data;
  567. });
  568. }
  569. },
  570. //查询楼层
  571. getFloors(id) {
  572. if(id) {
  573. this.$set(this.form, 'floorId', '');//楼层
  574. this.floors = [];
  575. // this.$set(this.form, 'layoutId', '');//房间
  576. this.layoutLists = [];
  577. listFloorByBuildId(id).then(response=>{
  578. this.floors = response.data;
  579. });
  580. }
  581. },
  582. //查询布局信息
  583. getLayouts(id) {
  584. if(id) {
  585. // this.$set(this.form, 'layoutId', '');//房间
  586. this.layoutLists = [];
  587. onUselistLayoutByFloorId(id).then(response=>{
  588. this.layoutLists = response.data;
  589. });
  590. }
  591. },
  592. //获取分级
  593. getListClassifiedAll(){
  594. listClassifiedAll().then(response=>{
  595. if(response.code==200){
  596. this.levelList = response.data
  597. }
  598. })
  599. },
  600. //获取分类
  601. getListClasstypeAll(){
  602. listClasstypeAll().then(response=>{
  603. if(response.code==200){
  604. this.typeList = response.data;
  605. }
  606. });
  607. },
  608. //获取电子信息牌下拉列表数据
  609. getClassifyBySubId(){
  610. getClassifyBySubId().then(response=>{
  611. if(response.code==200){
  612. this.safetyInfoList=response.data;
  613. }
  614. });
  615. },
  616. /** 下列人员-懒加载 */
  617. userSelectList(query) {
  618. if (query !== '' && query.length>1) {
  619. selectTeacherList({"nickName":query}).then(response => {
  620. this.optionsUser = response.data;
  621. });
  622. } else {
  623. this.optionsUser = [];
  624. }
  625. },
  626. userSelectListOne(query) {
  627. if (query !== '' && query.length>1) {
  628. this.userSelectListOne.nickName=query;
  629. selectTeacherList(this.userSelectListOne).then(response => {
  630. this.optionsUserOne = response.data;
  631. });
  632. } else {
  633. this.optionsUserOne = [];
  634. }
  635. },
  636. }
  637. }
  638. </script>
  639. <style scoped lang="scss">
  640. .addSubject{
  641. flex:1;
  642. display: flex;
  643. flex-direction: column;
  644. border-radius:10px!important;
  645. margin:5px 20px 20px 10px!important;
  646. box-shadow: 0 0 8px 1px rgba(0, 0, 0, 0.1) !important;
  647. *{
  648. margin:0;
  649. }
  650. .title-button-box{
  651. display: flex;
  652. padding:0 20px 30px 20px;
  653. .title-min-button-box{
  654. p:nth-child(1){
  655. cursor: pointer;
  656. text-align: center;
  657. font-size:18px;
  658. color:#999;
  659. line-height:80px;
  660. height:80px;
  661. padding-right:40px;
  662. }
  663. p:nth-child(2){
  664. height:1px;
  665. background-color: #dedede;
  666. }
  667. .checkButtonBox{
  668. color:#0045AF;
  669. }
  670. }
  671. .checkButtonBox{
  672. p:nth-child(1){
  673. color:#0045AF!important;
  674. }
  675. }
  676. .title-null-div{
  677. flex:1;
  678. p:nth-child(1){
  679. height:80px;
  680. }
  681. p:nth-child(2){
  682. height:1px;
  683. background-color: #dedede;
  684. }
  685. }
  686. }
  687. .title-box{
  688. display: flex;
  689. margin:0 20px 30px;
  690. border-bottom:1px solid #E0E0E0;
  691. .left-title{
  692. flex:1;
  693. height:80px;
  694. line-height:80px;
  695. color:#0045AF;
  696. font-size:18px;
  697. }
  698. .right-button{
  699. margin:20px 0;
  700. }
  701. }
  702. .form-item{
  703. display: inline-block;
  704. overflow: hidden;
  705. min-height:70px;
  706. }
  707. .bottom-form-box{
  708. //display: flex;
  709. .left-form-box{
  710. width:650px;
  711. }
  712. .right-form-box{
  713. width:650px;
  714. }
  715. .form-item{
  716. display: inline-block;
  717. overflow: hidden;
  718. min-height:40px;
  719. margin-bottom:30px;
  720. }
  721. }
  722. .bottom-form-box-one{
  723. display: flex;
  724. padding-left:20px;
  725. .left-form-box{
  726. width:650px;
  727. }
  728. .right-form-box{
  729. width:650px;
  730. }
  731. .form-item{
  732. display: inline-block;
  733. overflow: hidden;
  734. min-height:40px;
  735. margin-bottom:30px;
  736. }
  737. }
  738. .rich-text{
  739. margin: 20px;
  740. }
  741. .bottom-button-box{
  742. display: flex;
  743. width:400px;
  744. margin:10px auto 40px;
  745. .null-p{
  746. flex:1;
  747. }
  748. .left-button{
  749. margin-right:20px;
  750. }
  751. }
  752. }
  753. </style>