addPage.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956
  1. <template>
  2. <div class="teacher-add-page" @click="checkTypeButton">
  3. <div class="public-form-box scrollbar-box">
  4. <div class="top-title-box">
  5. <p>{{propsData.title}}</p>
  6. </div>
  7. <el-form :model="form" ref="form" :inline="true" :rules="rules" label-width="120px">
  8. <div class="top-info-box">
  9. <div class="right-info-box">
  10. <el-form-item label="身份名称:" prop="roleName">
  11. <el-input
  12. style="width:250px;"
  13. maxlength="50"
  14. v-model="form.roleName"
  15. placeholder="请输入身份名称"
  16. clearable
  17. />
  18. </el-form-item>
  19. </div>
  20. <div class="right-info-box">
  21. <el-form-item label="权限字符:" prop="roleKey" label-width="215px">
  22. <el-input
  23. style="width:250px;"
  24. maxlength="50"
  25. v-model="form.roleKey"
  26. placeholder="请输入权限字符"
  27. clearable
  28. />
  29. </el-form-item>
  30. </div>
  31. </div>
  32. <div class="top-tow-box">
  33. <p>权限配置</p>
  34. </div>
  35. <div class="data_scope">
  36. <div class="data_scope_l">
  37. <el-form-item label="数据范围:" prop="dataScope">
  38. <el-select
  39. style="width:250px;"
  40. @visible-change="dataScopeFun"
  41. v-model="form.dataScope"
  42. placeholder="请选择数据范围"
  43. clearable
  44. >
  45. <el-option
  46. v-for="item in optionsDataList"
  47. :key="item.type"
  48. :label="item.value"
  49. :value="item.type"
  50. />
  51. </el-select>
  52. </el-form-item>
  53. </div>
  54. <div class="data_scope_r" @click="dataScopeClearFun">清除</div>
  55. </div>
  56. </el-form>
  57. <!--权限模块-->
  58. <div class="table-for-max-box">
  59. <div class="table-title-box">
  60. <p>模块菜单</p>
  61. <p>权限</p>
  62. </div>
  63. <div class="table-for-big-box" v-for="(maxItem,maxIndex) in menuList" :key="maxIndex">
  64. <!--一级目录-->
  65. <div class="max-title-box" :class="!maxItem.children?'max-title-box-null':''">
  66. <p><el-checkbox v-model="maxItem.checkType" @change="(type)=>itemCheckClick(type,maxItem)">{{maxItem.menuName}}</el-checkbox></p>
  67. </div>
  68. <div class="max-right-box">
  69. <div class="big-box" v-for="(bigItem,bigIndex) in maxItem.children" :key="bigIndex">
  70. <!--二级页面-->
  71. <div class="big-title-box" :class="bigItem.menuType == 'C'?'big-title-box-null':''">
  72. <p><el-checkbox v-model="bigItem.checkType" @change="(type)=>itemCheckClick(type,bigItem,maxItem)">{{bigItem.menuName}}</el-checkbox></p>
  73. </div>
  74. <!--三级页面/四级按钮-->
  75. <div class="big-right-box" v-if="bigItem.menuType !='C'">
  76. <div class="min-box" v-for="(minItem,minIndex) in bigItem.children" :key="minIndex">
  77. <div class="min-title-box">
  78. <!--三级页面-->
  79. <div class="title-left-box">
  80. <p class="min-title-box-null"></p>
  81. <p><el-checkbox v-model="minItem.checkType" @change="(type)=>itemCheckClick(type,minItem,bigItem,maxItem)">{{minItem.menuName}}</el-checkbox></p>
  82. <p class="min-title-box-null"></p>
  83. </div>
  84. </div>
  85. <div class="min-right-box">
  86. <!--四级按钮-->
  87. <div v-for="(btnItem,btnIndex) in minItem.children">
  88. <el-checkbox v-model="btnItem.checkType"
  89. @change="(type)=>itemCheckClick(type,btnItem,minItem,bigItem,maxItem)">
  90. {{btnItem.menuName}}
  91. </el-checkbox>
  92. </div>
  93. <p v-if="!minItem.children" style="font-weight:500;color:#999;text-align: center">该页面没有按钮</p>
  94. </div>
  95. </div>
  96. </div>
  97. <!--三级按钮-->
  98. <div class="big-right-box-null" v-if="bigItem.menuType == 'C'">
  99. <div v-for="(btnItem,btnIndex) in bigItem.children">
  100. <el-checkbox v-model="btnItem.checkType"
  101. @change="(type)=>itemCheckClick(type,btnItem,minItem,bigItem,maxItem)">
  102. {{btnItem.menuName}}
  103. </el-checkbox>
  104. </div>
  105. <p v-if="!bigItem.children" style="font-weight:500;color:#999;text-align: center">该页面没有按钮</p>
  106. </div>
  107. </div>
  108. <p class="big-box-null" v-if="!maxItem.children&&maxItem.menuName == '数据可视化'">数据可视化大屏查看权限</p>
  109. </div>
  110. </div>
  111. </div>
  112. <el-dialog title="选择指定部门(可多选)" @close="deptCancel" :visible.sync="deptOpen"
  113. :close-on-click-modal="false" v-if="deptOpen" width="500px"
  114. append-to-body class="managePermissionTemplates-dept-dialog-box">
  115. <el-form :model="deptForm" ref="deptForm" :inline="true" :rules="rules" class="addCheckPage-min">
  116. <el-form-item label="指定部门" prop="deptIds" label-width="90px" class="el-form-item-bottom">
  117. <el-cascader
  118. style="width:300px;"
  119. :options="treeselectList"
  120. :props="{multiple: true,value: 'id', label: 'label'}"
  121. collapse-tags
  122. v-model="deptForm.deptIds"
  123. clearable>
  124. </el-cascader>
  125. </el-form-item>
  126. </el-form>
  127. <div slot="footer" class="managePermissionTemplates-dept-dialog-button-box">
  128. <p class="reset-button-one" @click="deptCancel">取消</p>
  129. <p class="inquire-button-one" @click="deptSure">确定</p>
  130. </div>
  131. </el-dialog>
  132. </div>
  133. <div class="bottom-button-box">
  134. <p class="null-p"></p>
  135. <p class="button-p-1 reset-button-one" @click="outPageButton">返回</p>
  136. <p class="inquire-button-one" @click="upDataButton">提交</p>
  137. <p class="null-p"></p>
  138. </div>
  139. </div>
  140. </template>
  141. <script>
  142. import { addRoleByScope, editRoleByScope } from '@/api/system/role'
  143. import { listMenuAll} from "@/api/system/menu";
  144. import { treeselect } from "@/api/system/dept";
  145. export default {
  146. name: "addPage",
  147. props:{
  148. propsData:{},
  149. },
  150. data() {
  151. return {
  152. menuList:[],
  153. originalMenuList:[],
  154. form:{
  155. roleName:"", //姓名
  156. roleKey:"",
  157. dataScope:null,
  158. },
  159. rules:{
  160. roleName: [
  161. { required: true, message: "请输入姓名", trigger: "blur" },
  162. { required: true, message: "请输入姓名", validator: this.spaceJudgment, trigger: "blur" }
  163. ],
  164. roleKey: [
  165. { required: true, message: "请输入权限标识", trigger: "blur" },
  166. { required: true, message: "请输入权限标识", validator: this.spaceJudgment, trigger: "blur" }
  167. ],
  168. dataScope: [
  169. { required: true, message: "请选择数据范围", trigger: "blur" },
  170. ],
  171. deptIds: [
  172. { required: true, message: "请选择指定部门", trigger: "blur" },
  173. ],
  174. },
  175. //数据范围(1:全部, 2:部门及下级, 3:本部门, 4:仅本人,5:自定义)
  176. optionsDataList:[
  177. {type: 1, value: "所有数据",},
  178. {type: 2, value: "本部门及下级部门数据",},
  179. {type: 3, value: "本部门",},
  180. {type: 4, value: "当前账号数据",},
  181. {type: 5, value: "自定义",},
  182. ],
  183. //数据范围部门弹窗
  184. deptOpen:false,
  185. deptOpenType:'',
  186. //部门数据结构树
  187. treeselectList:[],
  188. //指定部门数据
  189. deptForm:{
  190. deptIds:[],
  191. },
  192. checkDeptType:null,
  193. checkAllType:false,
  194. }
  195. },
  196. created(){
  197. },
  198. mounted(){
  199. this.getMenu();
  200. },
  201. methods:{
  202. //提交按钮
  203. upDataButton(){
  204. this.$refs["form"].validate(valid => {
  205. if (valid) {
  206. if(this.propsData.roleId){
  207. //修改
  208. this.editRoleByScope()
  209. }else{
  210. //发布
  211. this.addRoleByScope()
  212. }
  213. }
  214. });
  215. },
  216. //新增
  217. addRoleByScope(){
  218. let self = this;
  219. let obj = JSON.parse(JSON.stringify(this.form))
  220. obj.roleSort = 1;
  221. obj.menuCheckStrictly = 0;
  222. obj.status = 0;
  223. obj.menuIds = this.toArray();
  224. obj.viewDeptIds = JSON.stringify(self.deptForm.deptIds);
  225. obj.deptIds = [];
  226. let list = [];
  227. for(let i=0;i<self.deptForm.deptIds.length;i++){
  228. for(let o=0;o<self.deptForm.deptIds[i].length;o++){
  229. list.push(self.deptForm.deptIds[i][o])
  230. }
  231. }
  232. for (var i = 0,len=list.length; i < len; i++) {
  233. if(obj.deptIds.indexOf(list[i]) === -1){
  234. obj.deptIds.push(list[i]);
  235. }
  236. }
  237. addRoleByScope(obj).then(response => {
  238. if(response.code == 200){
  239. this.msgSuccess(response.msg);
  240. this.$parent.goPage(3);
  241. }
  242. });
  243. },
  244. //编辑
  245. editRoleByScope(){
  246. let self = this;
  247. let obj = JSON.parse(JSON.stringify(this.form))
  248. obj.roleSort = 1;
  249. obj.menuCheckStrictly = 0;
  250. obj.status = 0;
  251. obj.menuIds = this.toArray();
  252. obj.viewDeptIds = JSON.stringify(self.deptForm.deptIds);
  253. obj.deptIds = [];
  254. let list = [];
  255. for(let i=0;i<self.deptForm.deptIds.length;i++){
  256. for(let o=0;o<self.deptForm.deptIds[i].length;o++){
  257. list.push(self.deptForm.deptIds[i][o])
  258. }
  259. }
  260. for (var i = 0,len=list.length; i < len; i++) {
  261. if(obj.deptIds.indexOf(list[i]) === -1){
  262. obj.deptIds.push(list[i]);
  263. }
  264. }
  265. editRoleByScope(obj).then(response => {
  266. if(response.code == 200){
  267. this.msgSuccess(response.msg);
  268. this.$parent.goPage(3);
  269. }
  270. });
  271. },
  272. checkTypeButton(){
  273. this.$set(this,'checkAllType',false);
  274. },
  275. //数据范围选中
  276. dataScopeFun(type){
  277. let self = this;
  278. console.log('dataScopeFun',self.form.dataScope)
  279. if(!type){
  280. setTimeout(function(){
  281. if(self.checkAllType){
  282. if(self.form.dataScope == 5){
  283. //指定范围弹窗
  284. self.$set(self,'deptOpen',true)
  285. }else{
  286. self.$set(self,'checkDeptType',self.form.dataScope)
  287. self.$set(self.deptForm,'deptIds',[])
  288. }
  289. }
  290. },50);
  291. }else{
  292. this.$set(this,'checkAllType',true);
  293. }
  294. },
  295. //数据范围选择清除
  296. dataScopeClearFun(){
  297. this.$set(this.form,'dataScope',null)
  298. this.$set(this.deptForm,'deptIds',[])
  299. },
  300. //指定部门弹窗取消
  301. deptCancel(){
  302. this.$set(this.form,'dataScope',this.checkDeptType)
  303. this.$set(this,'deptOpen',false)
  304. },
  305. //指定部门弹窗确定
  306. deptSure(){
  307. this.$refs["deptForm"].validate(valid => {
  308. if (valid) {
  309. this.$set(this,'checkDeptType',this.form.dataScope)
  310. this.$set(this,'deptOpen',false);
  311. }
  312. });
  313. },
  314. //模块勾选逻辑
  315. itemCheckClick(type,item,minItem,bigItem,maxItem){
  316. if(item.children){
  317. for(let i=0;i<item.children.length;i++){
  318. item.children[i].checkType = !!type;
  319. if(item.children[i].children){
  320. for(let o=0;o<item.children[i].children.length;o++){
  321. item.children[i].children[o].checkType = !!type;
  322. if(item.children[i].children[o].children){
  323. for(let x=0;x<item.children[i].children[o].children.length;x++){
  324. item.children[i].children[o].children[x].checkType = !!type;
  325. }
  326. }
  327. }
  328. }
  329. }
  330. }
  331. if(minItem&&type){
  332. minItem.checkType = type;
  333. }
  334. if(bigItem&&type){
  335. bigItem.checkType = type;
  336. }
  337. if(maxItem&&type){
  338. maxItem.checkType = type;
  339. }
  340. },
  341. getMenu() {
  342. let self = this;
  343. this.loading = true;
  344. listMenuAll(this.queryParams).then(response => {
  345. let newList = [];
  346. for(let i=0;i<response.data.length;i++){
  347. if(response.data[i].status == 0 && response.data[i].visible == 0){
  348. newList.push(response.data[i]);
  349. }
  350. }
  351. if(this.propsData.type == 1){
  352. //新增
  353. this.menuList = JSON.parse(JSON.stringify(this.handleTree(newList, "menuId")))
  354. }else {
  355. if(this.propsData.type == 2){
  356. //编辑
  357. this.$set(this.form,'roleId',this.propsData.roleId);
  358. this.$set(this.form,'roleName',this.propsData.name);
  359. this.$set(this.form,'roleKey',this.propsData.key);
  360. }
  361. //页面权限处理
  362. for(let i=0;i<self.propsData.list.length;i++){
  363. for(let o=0;o<newList.length;o++){
  364. if(self.propsData.list[i] == newList[o].menuId){
  365. newList[o].checkType = true;
  366. }
  367. }
  368. }
  369. //数据权限范围
  370. this.$set(this.form,'dataScope',this.propsData.dataScope);
  371. this.$set(this,'checkDeptType',this.propsData.dataScope)
  372. //如果权限范围为指定部门
  373. if (this.propsData.dataScope == 5){
  374. this.$set(this.deptForm,'deptIds',JSON.parse(this.propsData.viewDeptIds));
  375. }
  376. }
  377. this.menuList = JSON.parse(JSON.stringify(this.handleTree(newList, "menuId")))
  378. this.getTreeselect();
  379. this.loading = false;
  380. });
  381. },
  382. /** 查询部门下拉树结构 */
  383. getTreeselect() {
  384. treeselect().then(response => {
  385. this.deptOptions = response.data;
  386. this.$set(this,'treeselectList',response.data[0].children);
  387. });
  388. },
  389. //返回事件
  390. outPageButton(){
  391. this.$parent.goPage(1);
  392. },
  393. //结构树转数组并筛选选中项
  394. toArray(){
  395. let list = [];
  396. let newList = JSON.parse(JSON.stringify(this.menuList));
  397. for(let i=0;i<newList.length;i++){
  398. pushNode(newList[i]);
  399. }
  400. function pushNode(node){
  401. if(node.children){
  402. for (let nodeItem of node.children){
  403. pushNode(nodeItem)
  404. }
  405. delete node.children;
  406. if(node.checkType){
  407. list.push(node)
  408. }
  409. }else{
  410. if(node.children){
  411. delete node.children
  412. }
  413. if(node.checkType){
  414. list.push(node)
  415. }
  416. }
  417. }
  418. let idList = [];
  419. for(let i=0;i<list.length;i++){
  420. idList.push(list[i].menuId)
  421. }
  422. return idList
  423. }
  424. }
  425. }
  426. </script>
  427. <style scoped lang="scss">
  428. .teacher-add-page{
  429. flex:1;
  430. display: flex;
  431. flex-direction: column;
  432. box-shadow: 0 0 8px 2px rgba(0, 0, 0, 0.1);
  433. padding:0 0 20px!important;
  434. overflow: hidden;
  435. *{
  436. margin:0;
  437. }
  438. .public-form-box{
  439. flex:1;
  440. overflow-y: scroll;
  441. overflow-x: hidden;
  442. }
  443. .top-title-box{
  444. border-bottom:1px solid #E0E0E0;
  445. display: flex;
  446. p:nth-child(1){
  447. color:#0045AF;
  448. line-height:80px;
  449. margin-left:24px;
  450. font-size:18px;
  451. flex:1;
  452. }
  453. p:nth-child(2){
  454. border:1px solid #0045AF;
  455. color:#0045AF;
  456. width:80px;
  457. height:30px;
  458. text-align: center;
  459. font-size:16px;
  460. border-radius: 6px;
  461. line-height:30px;
  462. margin:25px 20px 0 0;
  463. cursor: pointer;
  464. }
  465. }
  466. .top-info-box{
  467. display: flex;
  468. padding:40px 20px 0;
  469. .left-info-box{
  470. margin-right:20px;
  471. img{
  472. width:100px;
  473. height:120px;
  474. }
  475. p{
  476. width: 80px;
  477. height: 26px;
  478. border: 1px solid #0183FA;
  479. border-radius: 6px;
  480. line-height:24px;
  481. font-size:12px;
  482. color:#0183FA;
  483. text-align: center;
  484. margin:24px 10px;
  485. }
  486. }
  487. }
  488. .top-tow-box{
  489. display: flex;
  490. align-items: center;
  491. height: 50px;
  492. background: #F5F5F5;
  493. >p{
  494. color:#0045AF;
  495. line-height:80px;
  496. margin-left:24px;
  497. font-size:18px;
  498. flex:1;
  499. }
  500. }
  501. /*数据范围*/
  502. .data_scope{
  503. margin: 40px 20px;
  504. display: flex;
  505. justify-content: space-between;
  506. .data_scope_l{
  507. display: flex;
  508. justify-content: flex-start;
  509. .data_scope_l_l{
  510. font-size: 16px;
  511. font-family: Microsoft YaHei-Regular, Microsoft YaHei;
  512. font-weight: 400;
  513. color: #333333;
  514. line-height: 24px;
  515. margin-right: 8px;
  516. >i{
  517. font-size: 14px;
  518. color: #FF0000;
  519. font-style: normal;
  520. margin-right: 4px;
  521. }
  522. }
  523. .data_scope_l_r{
  524. display: flex;
  525. justify-content: flex-start;
  526. >i{
  527. height: 40px;
  528. font-style: normal;
  529. display: inline-block;
  530. font-size: 14px;
  531. font-family: Microsoft YaHei-Regular, Microsoft YaHei;
  532. font-weight: 400;
  533. color: #CCCCCC;
  534. line-height: 40px;
  535. padding: 0 14px;
  536. box-sizing: border-box;
  537. border: 1px dashed #E0E0E0;
  538. margin-right: 20px;
  539. cursor: pointer;
  540. &.on{
  541. color:#0183FA;
  542. border: 1px dashed #0183FA;
  543. }
  544. }
  545. }
  546. }
  547. .data_scope_r{
  548. width: 70px;
  549. height: 40px;
  550. border-radius: 6px 6px 6px 6px;
  551. opacity: 1;
  552. border: 1px solid #0045AF;
  553. font-size: 14px;
  554. font-family: Microsoft YaHei-Regular, Microsoft YaHei;
  555. font-weight: 400;
  556. color: #0045AF;
  557. line-height: 40px;
  558. text-align: center;
  559. cursor: pointer;
  560. }
  561. }
  562. .top-title-one{
  563. display: flex;
  564. border-top:1px solid #E0E0E0;
  565. position: relative;
  566. .title-p{
  567. font-size:18px;
  568. color:#0045AF;
  569. line-height:80px;
  570. margin-left:24px;
  571. }
  572. .img-p{
  573. font-size:18px;
  574. margin:0 10px;
  575. line-height:80px;
  576. color:#FFC000;
  577. }
  578. .position-box{
  579. width: 420px;
  580. height: 194px;
  581. padding:20px;
  582. background: #F5F5F5;
  583. position: absolute;
  584. top:10px;
  585. left:134px;
  586. p{
  587. font-size:12px;
  588. line-height:18px;
  589. color:#333;
  590. }
  591. }
  592. }
  593. .name-input-box{
  594. height:100px;
  595. }
  596. .for-button-list{
  597. background: #E5F2FE;
  598. margin:0 20px;
  599. display: flex;
  600. .for-title-p{
  601. width:175px;
  602. height:80px;
  603. line-height:80px;
  604. font-size:16px;
  605. color:#333;
  606. text-align: center;
  607. }
  608. .for-button-max-box{
  609. flex:1;
  610. .for-button-min-box{
  611. font-size:16px;
  612. display: inline-block;
  613. overflow: hidden;
  614. height:30px;
  615. line-height:30px;
  616. border-radius:6px;
  617. margin:25px 28px 0 0;
  618. cursor: pointer;
  619. i{
  620. height:30px;
  621. line-height:30px;
  622. font-size:16px;
  623. color:#fff;
  624. margin-right:6px;
  625. }
  626. }
  627. .colorAA{
  628. color: #ffffff;
  629. background: #0183FA;
  630. padding:0 26px 0 16px;
  631. }
  632. .colorBB{
  633. padding:0 26px;
  634. color: #333;
  635. background: #E0E0E0;
  636. }
  637. }
  638. }
  639. .template-name-box{
  640. display: flex;
  641. .template-name-p{
  642. font-weight:500;
  643. height:80px;
  644. line-height:80px;
  645. font-size:16px;
  646. color:#333;
  647. margin-left:20px;
  648. flex: 1;
  649. }
  650. .template-name-button{
  651. width:80px;
  652. height:40px;
  653. line-height:40px;
  654. margin:20px 20px 0 0;
  655. }
  656. .template-name-button-one{
  657. width:180px;
  658. height:40px;
  659. line-height:40px;
  660. margin:20px 40px 0 0;
  661. color:#fff;
  662. background: #0183FA;
  663. border: 1px solid #E0E0E0;
  664. cursor: pointer;
  665. font-size: 14px;
  666. text-align: center;
  667. border-radius: 6px;
  668. }
  669. }
  670. .table-for-max-box{
  671. border:1px solid #D7D7D7;
  672. margin:0 20px;
  673. *{
  674. margin:0;
  675. padding:0;
  676. }
  677. .table-title-box{
  678. background: rgba(1,131,250,0.1);
  679. display: flex;
  680. p{
  681. font-size:14px;
  682. font-weight:700;
  683. color:#333;
  684. line-height:48px;
  685. padding-left:20px;
  686. }
  687. p:nth-child(1){
  688. width:616px;
  689. border-right:1px solid #D7D7D7;
  690. }
  691. }
  692. .table-for-big-box{
  693. border-top:1px solid #D7D7D7;
  694. display: flex;
  695. font-size:14px;
  696. .max-title-box-null{
  697. width:616px!important;
  698. }
  699. .max-title-box{
  700. width:230px;
  701. border-right:1px solid #D7D7D7;
  702. min-height:48px;
  703. position: relative;
  704. p{
  705. position: absolute;
  706. top:50%;
  707. left:20px;
  708. height:18px;
  709. line-height:18px;
  710. margin-top:-9px;
  711. }
  712. }
  713. .max-right-box{
  714. flex:5;
  715. min-height:48px;
  716. .big-box:nth-child(1){
  717. border:none!important;
  718. }
  719. .big-box-null{
  720. line-height:48px;
  721. margin-left:20px;
  722. color:#606266;
  723. }
  724. .big-box{
  725. display: flex;
  726. border-top:1px solid #D7D7D7;
  727. .big-title-box-null{
  728. width:386px!important;
  729. }
  730. .big-title-box{
  731. width:180px;
  732. border-right:1px solid #D7D7D7;
  733. min-height:48px;
  734. position: relative;
  735. overflow: hidden;
  736. p{
  737. position: absolute;
  738. top:50%;
  739. left:20px;
  740. height:48px;
  741. line-height:48px;
  742. margin-top:-24px;
  743. }
  744. }
  745. .big-right-box-null{
  746. flex:1;
  747. padding:14px 0 0 20px;
  748. div{
  749. display: inline-block;
  750. margin:0 20px 14px 0;
  751. }
  752. }
  753. .big-right-box{
  754. flex:5;
  755. min-height:48px;
  756. .min-box:nth-child(1){
  757. border:none!important;
  758. }
  759. .min-box{
  760. display: flex;
  761. border-top:1px solid #D7D7D7;
  762. .min-title-box{
  763. display: flex;
  764. flex-direction: column;
  765. border-right:1px solid #D7D7D7;
  766. min-height:48px;
  767. position: relative;
  768. overflow: hidden;
  769. .title-left-box{
  770. width:205px;
  771. display: flex;
  772. .min-title-box-null{
  773. flex:1;
  774. }
  775. p{
  776. width:205px;
  777. position: absolute;
  778. top:50%;
  779. left:20px;
  780. height:48px;
  781. line-height:48px;
  782. margin-top:-24px;
  783. }
  784. }
  785. }
  786. .min-right-box{
  787. flex:1;
  788. padding:14px 0 0 20px;
  789. div{
  790. display: inline-block;
  791. margin:0 20px 14px 0 ;
  792. }
  793. }
  794. }
  795. }
  796. }
  797. }
  798. }
  799. }
  800. .bottom-button-box{
  801. display: flex;
  802. width:600px;
  803. margin:30px auto 10px;
  804. .null-p{
  805. flex:1;
  806. }
  807. .button-p-1{
  808. width:100px;
  809. margin-right:20px;
  810. }
  811. .button-p-2{
  812. width:100px;
  813. margin-right:20px;
  814. }
  815. .button-p-3{
  816. width:180px;
  817. }
  818. }
  819. }
  820. </style>
  821. <style lang="scss">
  822. .teacher-add-page{
  823. .top-info-box{
  824. .el-form-item{
  825. height:70px;
  826. }
  827. .switch .el-switch__label {
  828. position: absolute;
  829. display: none;
  830. color: #fff !important;
  831. }
  832. .switch .el-switch__label--right {
  833. z-index: 1;
  834. }
  835. .switch .el-switch__label--right span{
  836. margin-left: 10px;
  837. }
  838. .switch .el-switch__label--left {
  839. z-index: 1;
  840. }
  841. .switch .el-switch__label--left span{
  842. margin-left: 24px;
  843. }
  844. .switch .el-switch__label.is-active {
  845. display: block;
  846. }
  847. .switch.el-switch .el-switch__core,
  848. .el-switch .el-switch__label {
  849. width: 64px !important;
  850. margin: 0;
  851. }
  852. }
  853. }
  854. .managePermissionTemplates-permission-dialog-box{
  855. *{
  856. margin:0;
  857. }
  858. .title-p{
  859. font-size:15px;
  860. font-weight:700;
  861. margin-bottom:30px;
  862. }
  863. .managePermissionTemplates-permission-dialog-form-box{
  864. .title-box{
  865. display: flex;
  866. height: 60px;
  867. background: #F5F5F5;
  868. .left-title-p{
  869. width:198px;
  870. border-right:1px solid #E0E0E0;
  871. font-size:15px;
  872. font-weight:700;
  873. padding-left:26px;
  874. line-height:60px;
  875. color:#333;
  876. }
  877. .right-box{
  878. flex:1;
  879. .right-box-min{
  880. height:20px;
  881. margin:20px 0 0 50px;
  882. .el-checkbox__label{
  883. font-size:15px;
  884. font-weight:700;
  885. }
  886. }
  887. }
  888. }
  889. .check-box{
  890. display: flex;
  891. .left-title-box{
  892. width:198px;
  893. border:1px solid #E0E0E0;
  894. position: relative;
  895. .left-title-p{
  896. position: absolute;
  897. left:27px;
  898. height:20px;
  899. line-height:20px;
  900. top:50%;
  901. margin-top:-10px;
  902. }
  903. }
  904. .right-box{
  905. padding:0 50px 41px 0;
  906. flex:1;
  907. border:1px solid #E0E0E0;
  908. border-left:none;
  909. .for-check-box{
  910. margin:41px 0 0 50px;
  911. }
  912. }
  913. }
  914. }
  915. .managePermissionTemplates-permission-dialog-button-box{
  916. display: flex;
  917. width:160px;
  918. margin:0 auto;
  919. p{
  920. margin:0;
  921. width:70px;
  922. height:30px;
  923. line-height:30px;
  924. font-size:14px;
  925. }
  926. p:nth-child(1){
  927. margin-right:20px;
  928. }
  929. }
  930. }
  931. .managePermissionTemplates-dept-dialog-box{
  932. *{
  933. margin:0;
  934. }
  935. .managePermissionTemplates-dept-dialog-button-box{
  936. display: flex;
  937. width:190px;
  938. margin:0 auto;
  939. p{
  940. margin:0;
  941. width:70px;
  942. height:30px;
  943. line-height:30px;
  944. font-size:14px;
  945. }
  946. p:nth-child(1){
  947. margin-right:50px;
  948. }
  949. }
  950. }
  951. </style>