addDialog.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758
  1. <template>
  2. <el-dialog class="inspectionGroup-dialog-box"
  3. :close-on-click-modal="false"
  4. :title="addDialogTitle" :visible.sync="addDialogType" v-if="addDialogType"
  5. @close="addDialogAllOff" width="1303px" append-to-body>
  6. <div class="add-max-box" v-if="addDialogBoxType == 1">
  7. <el-form ref="addDialogForm" :model="dialogForm" :rules="rules" label-width="100px" class="add-form-box">
  8. <el-form-item label="是否启用:" prop="enable">
  9. <el-switch
  10. v-if="!lookInfoType"
  11. @click.native="changeIsNeedCaptcha(dialogForm.enable)"
  12. class="switch captcha-img"
  13. :active-value="1"
  14. :inactive-value="0"
  15. active-color="#0183FA"
  16. inactive-color="#999"
  17. v-model="dialogForm.enable"
  18. active-text="启用"
  19. inactive-text="停用"
  20. ></el-switch>
  21. <p v-if="lookInfoType" :class="dialogForm.enable==1?'switchFontColor':''" style="line-height:40px;">{{dialogForm.enable==1?'启用':'停用'}}</p>
  22. </el-form-item>
  23. <el-form-item label="巡查组名称:" prop="groupName">
  24. <el-input :disabled="lookInfoType" v-model="dialogForm.groupName" placeholder="请输入巡查组名称" maxLength="20" style="width:450px;"/>
  25. </el-form-item>
  26. <el-form-item label="巡查层级:" prop="checkLevel">
  27. <el-select :disabled="lookInfoType" v-model="dialogForm.checkLevel" placeholder="请选择巡查层级" style="width:450px;">
  28. <el-option
  29. v-for="item in dialogRangeOptions"
  30. :key="item.key"
  31. :label="item.label"
  32. :value="item.key">
  33. </el-option>
  34. </el-select>
  35. </el-form-item>
  36. </el-form>
  37. <div class="dialog-table-box">
  38. <div class="dialog-table-title-box">
  39. <img src="@/assets/ZDimages/safetyCheck/icon_xyxc_cy.png">
  40. <p class="dialog-table-title-p">巡查成员</p>
  41. <p v-if="!lookInfoType" class="inquire-button-one dialog-table-title-button" @click="dialogClickType(2)">+ 添加</p>
  42. <p v-if="lookInfoType" class="dialog-table-title-text">{{dialogTableList[0]?dialogTableList.length+'人':'0人'}}</p>
  43. </div>
  44. <el-table border :data="dialogTableList">
  45. <el-table-column label="序号" align="center" type="index" width="140"/>
  46. <el-table-column label="姓名" align="center" prop="name" show-overflow-tooltip/>
  47. <el-table-column label="工号" align="center" prop="jobNum" show-overflow-tooltip/>
  48. <el-table-column label="所在部门" align="center" prop="deptName" show-overflow-tooltip/>
  49. <el-table-column label="是否启用" align="center" prop="enable" width="150">
  50. <template slot-scope="scope">
  51. <el-switch
  52. v-if="!lookInfoType"
  53. @click.native="changeIsNeedCaptcha(scope.row.deptName)"
  54. class="switch captcha-img"
  55. :active-value="1"
  56. :inactive-value="0"
  57. active-color="#0183FA"
  58. inactive-color="#999"
  59. v-model="scope.row.enable"
  60. active-text="启用"
  61. inactive-text="停用"
  62. ></el-switch>
  63. <p v-if="lookInfoType" :class="scope.row.enable==1?'switchFontColor':''">{{scope.row.enable==1?'启用':'停用'}}</p>
  64. </template>
  65. </el-table-column>
  66. <el-table-column label="操作" align="center" prop="deptName" width="150" v-if="!lookInfoType">
  67. <template slot-scope="scope">
  68. <div class="table-button-box">
  69. <p class="table-button-null"></p>
  70. <p class="table-button-p" @click="delTable(scope.row)">删除</p>
  71. <p class="table-button-null"></p>
  72. </div>
  73. </template>
  74. </el-table-column>
  75. </el-table>
  76. </div>
  77. </div>
  78. <div class="inspectionPlan-dialog-user-box" v-show="addDialogBoxType == 2">
  79. <div class="left-max-box">
  80. <div class="dept-table-title-box">
  81. <p>待选人员</p>
  82. <p>{{userNumLeft}}/{{userTotalLeft}}</p>
  83. </div>
  84. <div class="dept-table-max-box">
  85. <el-form :model="userQueryParamsLeft" class="form-box" ref="queryForm" :inline="true" label-width="50px">
  86. <el-form-item label="" prop="deptId">
  87. <el-select v-model="userQueryParamsLeft.deptId" clearable placeholder="选择部门" style="width: 110px">
  88. <el-option
  89. v-for="item in deptSelectList"
  90. :key="item.deptId"
  91. :label="item.deptName"
  92. :value="item.deptId">
  93. </el-option>
  94. </el-select>
  95. </el-form-item>
  96. <el-form-item label="" prop="searchValue" class="form-index">
  97. <el-input
  98. maxLength="20"
  99. v-model="userQueryParamsLeft.searchValue"
  100. placeholder="搜索姓名/工号"
  101. clearable
  102. style="width: 240px">
  103. <p class="el-icon-search" slot="append" @click="userHandleQueryLeft"></p>
  104. </el-input>
  105. </el-form-item>
  106. <el-form-item style="margin-right:0;">
  107. <p class="reset-button-one" @click="userResetQueryLeft" style="width:60px;">重置</p>
  108. </el-form-item>
  109. </el-form>
  110. <el-table ref="leftUserTable" border :data="userTableListLeft" @selection-change="userChangeLeft" :row-key="getRowKeys">
  111. <el-table-column type="selection" width="50" :reserve-selection="true" align="center"/>
  112. <el-table-column label="姓名" align="center" prop="nickName" show-overflow-tooltip/>
  113. <el-table-column label="工号" align="center" prop="userName" show-overflow-tooltip width="150"/>
  114. <el-table-column label="所在部门" align="center" prop="deptName" show-overflow-tooltip width="168"/>
  115. </el-table>
  116. <pagination layout="total, prev, pager, next, jumper"
  117. v-show="userTotalLeft>0"
  118. :total="userTotalLeft"
  119. :pager-count="5"
  120. :page.sync="userQueryParamsLeft.pageNum"
  121. :limit.sync="userQueryParamsLeft.pageSize"
  122. @pagination="userGetListLeft"/>
  123. </div>
  124. </div>
  125. <div class="center-box">
  126. <p class="el-icon-arrow-left" @click="userArrowButton(1)"></p>
  127. <p class="el-icon-arrow-right" @click="userArrowButton(2)"></p>
  128. </div>
  129. <div class="right-max-box">
  130. <div class="dept-table-title-box">
  131. <p>已选成员</p>
  132. <p>{{userNumRight}}/{{userTotalRight}}</p>
  133. </div>
  134. <div class="dept-table-max-box">
  135. <el-form :model="userQueryParamsRight" class="form-box" ref="queryForm" :inline="true" label-width="50px">
  136. <el-form-item label="" prop="deptId">
  137. <el-select v-model="userQueryParamsRight.deptId" clearable placeholder="选择部门" style="width: 110px">
  138. <el-option
  139. v-for="item in deptSelectList"
  140. :key="item.deptId"
  141. :label="item.deptName"
  142. :value="item.deptId">
  143. </el-option>
  144. </el-select>
  145. </el-form-item>
  146. <el-form-item label="" prop="searchValue" class="form-index">
  147. <el-input
  148. maxLength="20"
  149. v-model="userQueryParamsRight.searchValue"
  150. placeholder="搜索姓名/工号"
  151. clearable
  152. style="width: 240px">
  153. <p class="el-icon-search" slot="append" @click="userHandleQueryRight"></p>
  154. </el-input>
  155. </el-form-item>
  156. <el-form-item style="margin-right:0;">
  157. <p class="reset-button-one" @click="userResetQueryRight" style="width:60px;">重置</p>
  158. </el-form-item>
  159. </el-form>
  160. <el-table ref="rightUserTable" border :data="userTableListRight" @selection-change="userChangeRight" :row-key="getRowKeys">
  161. <el-table-column type="selection" width="50" :reserve-selection="true" align="center"/>
  162. <el-table-column label="姓名" align="center" prop="nickName" show-overflow-tooltip/>
  163. <el-table-column label="工号" align="center" prop="userName" show-overflow-tooltip width="150"/>
  164. <el-table-column label="所在部门" align="center" prop="deptName" show-overflow-tooltip width="168"/>
  165. </el-table>
  166. <pagination layout="total, prev, pager, next, jumper"
  167. v-show="userTotalRight>0"
  168. :total="userTotalRight"
  169. :pager-count="5"
  170. :page.sync="userQueryParamsRight.pageNum"
  171. :limit.sync="userQueryParamsRight.pageSize"
  172. @pagination="userGetListRight"/>
  173. </div>
  174. </div>
  175. </div>
  176. <div slot="footer" class="dialog-footer dialog-footer-box" style="display: flex">
  177. <p class="dialog-footer-button-null"></p>
  178. <p class="dialog-footer-button-info" @click="addDialogOff">{{addDialogBoxType==1?'取消':'返回'}}</p>
  179. <p class="dialog-footer-button-primary" v-if="!lookInfoType" @click="addUserButton">确定</p>
  180. <p class="dialog-footer-button-null"></p>
  181. </div>
  182. </el-dialog>
  183. </template>
  184. <script>
  185. import { listDepartments } from "@/api/system/dept";
  186. import { checkGroupFind,findUserList,checkGroupAdd,checkGroupUpdate } from '@/api/safetyCheck/index'
  187. export default {
  188. name: 'addDialog',
  189. props:{
  190. addDialogData:{},
  191. },
  192. data(){
  193. return{
  194. addDialogTitle:"",
  195. addDialogType:true,
  196. addDialogBoxType:1,
  197. lookInfoType:false,
  198. dialogForm:{
  199. enable:1,
  200. groupName:"",
  201. checkLevel:"",
  202. },
  203. //层级
  204. dialogRangeOptions:[{key:1,label:"校级"},{key:2,label:"院级"}],
  205. //院系
  206. deptSelectList:[],
  207. //选中巡查人员列表
  208. dialogTableList:[],
  209. //选中页面人员列表数据
  210. dialogTableDataList:[],
  211. //弹窗内容状态
  212. userQueryParamsLeft:{
  213. pageNum: 1,
  214. pageSize: 20,
  215. deptId:"",
  216. searchValue:"",
  217. filtType:1
  218. },
  219. userTableListLeft:[],
  220. userTotalLeft:0,
  221. userNumLeft:0,
  222. userIdsLeft:[],
  223. userQueryParamsRight:{
  224. pageNum: 1,
  225. pageSize: 20,
  226. deptId:"",
  227. searchValue:"",
  228. filtType:2
  229. },
  230. userTableListRight:[],
  231. userTotalRight:0,
  232. userNumRight:0,
  233. userIdsRight:[],
  234. // 表单校验
  235. rules: {
  236. enable: [
  237. { required: true, message: "请选择是否启用", trigger: "change" },
  238. ],
  239. groupName: [
  240. { required: true, message: "请输入巡查组名称", trigger: "change" },
  241. { required: true, message: "请输入巡查组名称", validator: this.spaceJudgment, trigger: "change" },
  242. ],
  243. checkLevel: [
  244. { required: true, message: "请选择巡查层级", trigger: "change" },
  245. ],
  246. },
  247. }
  248. },
  249. created(){
  250. this.$set(this,'addDialogTitle',this.addDialogData.title);
  251. this.$set(this,'lookInfoType',this.addDialogData.lookInfoType);
  252. if(this.addDialogData.addType){
  253. //新增
  254. }else{
  255. //详情-编辑
  256. this.checkGroupFind();
  257. }
  258. },
  259. mounted(){
  260. this.listDepartments();
  261. },
  262. methods:{
  263. //获取详情
  264. checkGroupFind(){
  265. checkGroupFind({id:this.addDialogData.id,selectEnable:0}).then(response => {
  266. this.$set(this.dialogForm,'id',response.data.id?response.data.id:'');
  267. this.$set(this.dialogForm,'enable',response.data.enable);
  268. this.$set(this.dialogForm,'groupName',response.data.groupName);
  269. this.$set(this.dialogForm,'checkLevel',response.data.checkLevel);
  270. this.$set(this,'dialogTableList',response.data.checkGroupMemberList);
  271. });
  272. },
  273. //弹窗关闭
  274. addDialogAllOff(){
  275. this.$parent.addDialogOpen(4)
  276. },
  277. addDialogOff(){
  278. if(this.addDialogBoxType == 1){
  279. this.$parent.addDialogOpen(4)
  280. }else{
  281. this.dialogClickType(1);
  282. }
  283. },
  284. //添加人员
  285. addUserButton(){
  286. let self = this;
  287. if(this.addDialogBoxType == 1){
  288. this.$refs["addDialogForm"].validate(valid => {
  289. if (valid) {
  290. if(!this.dialogTableList[0]){
  291. this.msgError('请添加至少一名巡查成员')
  292. return
  293. }
  294. if(this.dialogForm.id){
  295. //编辑
  296. let obj = this.dialogForm;
  297. obj.checkGroupMemberList = this.dialogTableList
  298. checkGroupUpdate(obj).then(response => {
  299. this.msgSuccess(response.msg);
  300. this.$parent.addDialogOpen(5)
  301. })
  302. }else{
  303. //新增
  304. let obj = this.dialogForm;
  305. obj.checkGroupMemberList = this.dialogTableList
  306. checkGroupAdd(obj).then(response => {
  307. this.msgSuccess(response.msg);
  308. this.$parent.addDialogOpen(5)
  309. })
  310. }
  311. }
  312. })
  313. }else{
  314. let list = [];
  315. let newObj = {};
  316. for(let o=0;o<self.dialogTableDataList.length;o++){
  317. let num = 0;
  318. for(let i=0;i<self.dialogTableList.length;i++){
  319. if(self.dialogTableList[i].userId == self.dialogTableDataList[o].userId){
  320. num++
  321. newObj = JSON.parse(JSON.stringify(self.dialogTableList[i]))
  322. }
  323. }
  324. if(num == 0){
  325. let obj = {
  326. userId:self.dialogTableDataList[o].userId,
  327. name:self.dialogTableDataList[o].name,
  328. jobNum:self.dialogTableDataList[o].jobNum,
  329. deptName:self.dialogTableDataList[o].deptName,
  330. deptId:self.dialogTableDataList[o].deptId,
  331. userType:self.dialogTableDataList[o].userType,
  332. enable:1,
  333. };
  334. list.push(obj)
  335. }else{
  336. let obj = {
  337. userId:self.dialogTableDataList[o].userId,
  338. name:self.dialogTableDataList[o].name,
  339. jobNum:self.dialogTableDataList[o].jobNum,
  340. deptName:self.dialogTableDataList[o].deptName,
  341. deptId:self.dialogTableDataList[o].deptId,
  342. userType:self.dialogTableDataList[o].userType,
  343. enable:newObj.enable,
  344. };
  345. list.push(obj)
  346. }
  347. }
  348. this.$set(this,'dialogTableList',list);
  349. this.dialogClickType(1);
  350. }
  351. },
  352. //弹窗状态切换
  353. dialogClickType(type){
  354. let self = this;
  355. if(type == 2){
  356. this.$set(self,'dialogTableDataList',JSON.parse(JSON.stringify(this.dialogTableList)));
  357. this.userResetQueryLeft();
  358. this.userResetQueryRight();
  359. this.$set(this,'addDialogBoxType',type);
  360. }else{
  361. this.$set(this,'addDialogBoxType',type);
  362. }
  363. },
  364. //删除弹窗列表
  365. delTable(row){
  366. let self = this;
  367. for(let i=0;i<self.dialogTableList.length;i++){
  368. if(row.userId == self.dialogTableList[i].userId){
  369. this.dialogTableList.splice(i,1)
  370. }
  371. }
  372. },
  373. /*===================================人员选择相关===================================*/
  374. //查询
  375. userHandleQueryLeft(){
  376. this.$set(this.userQueryParamsLeft,'pageNum',1);
  377. this.$set(this,'userNumLeft',0);
  378. this.$set(this,'userIdsLeft',[]);
  379. this.$refs.leftUserTable.clearSelection();
  380. this.userGetListLeft();
  381. },
  382. //重置
  383. userResetQueryLeft(){
  384. this.$set(this,'userQueryParamsLeft',{
  385. pageNum: 1,
  386. pageSize: 20,
  387. deptId:"",
  388. searchValue:"",
  389. filtType:1
  390. });
  391. this.userHandleQueryLeft();
  392. },
  393. //查询接口
  394. userGetListLeft(){
  395. let self = this;
  396. let leftObj = JSON.parse(JSON.stringify(this.userQueryParamsLeft));
  397. leftObj.selectedUserIds = [];
  398. for(let i=0;i<self.dialogTableDataList.length;i++){
  399. leftObj.selectedUserIds.push(self.dialogTableDataList[i].userId);
  400. }
  401. findUserList(leftObj).then(response => {
  402. this.userTotalLeft = response.total;
  403. this.userTableListLeft = response.rows;
  404. });
  405. },
  406. //查询
  407. userHandleQueryRight(){
  408. this.$set(this.userQueryParamsRight,'pageNum',1);
  409. this.$set(this,'userNumRight',0);
  410. this.$set(this,'userIdsRight',[]);
  411. this.$refs.rightUserTable.clearSelection();
  412. this.userGetListRight();
  413. },
  414. //重置
  415. userResetQueryRight(){
  416. this.$set(this,'userQueryParamsRight',{
  417. pageNum: 1,
  418. pageSize: 20,
  419. deptId:"",
  420. searchValue:"",
  421. filtType:2
  422. });
  423. this.userHandleQueryRight();
  424. },
  425. //查询接口
  426. userGetListRight(){
  427. let self = this;
  428. let rightObj = JSON.parse(JSON.stringify(this.userQueryParamsRight));
  429. rightObj.userIds = [];
  430. for(let i=0;i<self.dialogTableDataList.length;i++){
  431. rightObj.userIds.push(self.dialogTableDataList[i].userId);
  432. }
  433. findUserList(rightObj).then(response => {
  434. this.userTotalRight = response.total;
  435. this.userTableListRight = response.rows;
  436. });
  437. },
  438. //穿梭按钮
  439. userArrowButton(type){
  440. let self = this;
  441. if(type == 1){
  442. //右至左
  443. if(this.$refs.rightUserTable.selection[0]){
  444. let list = JSON.parse(JSON.stringify(this.dialogTableDataList));
  445. let userIdsRight = JSON.parse(JSON.stringify(this.$refs.rightUserTable.selection))
  446. for(let i=0;i<userIdsRight.length;i++){
  447. for(let s=0;s<list.length;s++){
  448. if(userIdsRight[i].userId == list[s].userId){
  449. list.splice(s,1);
  450. s--
  451. }
  452. }
  453. }
  454. this.$set(this,'dialogTableDataList',list);
  455. this.$refs.rightUserTable.clearSelection();
  456. this.userHandleQueryLeft();
  457. this.userHandleQueryRight();
  458. }else{
  459. this.msgError('请先勾选右侧列表')
  460. }
  461. }else if(type == 2){
  462. //左至右
  463. if(this.$refs.leftUserTable.selection[0]){
  464. let list = JSON.parse(JSON.stringify(this.dialogTableDataList));
  465. let userIdsLeft = JSON.parse(JSON.stringify(this.$refs.leftUserTable.selection))
  466. for(let i=0;i<userIdsLeft.length;i++){
  467. let obj = {
  468. userId:userIdsLeft[i].userId,
  469. name:userIdsLeft[i].nickName,
  470. jobNum:userIdsLeft[i].userName,
  471. deptName:userIdsLeft[i].deptName,
  472. deptId:userIdsLeft[i].deptId,
  473. userType:userIdsLeft[i].userType,
  474. }
  475. list.push(obj);
  476. }
  477. if(list.length>50){
  478. this.msgError('巡查成员最多50人')
  479. return
  480. }
  481. this.$set(this,'dialogTableDataList',list);
  482. this.$refs.leftUserTable.clearSelection();
  483. this.userHandleQueryLeft();
  484. this.userHandleQueryRight();
  485. }else{
  486. this.msgError('请先勾选左侧列表')
  487. }
  488. }
  489. },
  490. /*===记录勾选数据===
  491. 需要再el-table 添加 :row-key="getRowKeys"
  492. 需要在selection 添加 :reserve-selection="true"
  493. */
  494. getRowKeys(row) {
  495. return row.userId
  496. },
  497. userChangeLeft(selection){
  498. this.userNumLeft = selection.length;
  499. this.userIdsLeft = selection.map(item => item.userId);
  500. },
  501. userChangeRight(selection){
  502. this.userNumRight = selection.length;
  503. this.userIdsRight = selection.map(item => item.userId);
  504. },
  505. changeIsNeedCaptcha(data){
  506. if(this.lookInfoType){
  507. return
  508. }
  509. data = data == 1?0:1;
  510. this.$forceUpdate()
  511. },
  512. //获取学院列表
  513. listDepartments(){
  514. listDepartments().then(response => {
  515. this.deptSelectList = response.data;
  516. });
  517. },
  518. }
  519. }
  520. </script>
  521. <style lang="scss">
  522. .inspectionGroup-dialog-box{
  523. .el-dialog__body{
  524. padding:20px 30px 20px 30px;
  525. }
  526. .is-disabled{
  527. background-color: #f5f5f5;
  528. color: #333;
  529. border-color: #f5f5f5;
  530. cursor:auto;
  531. border-radius: 4px;
  532. .el-input__icon{
  533. display: none;
  534. }
  535. .el-input__inner{
  536. background-color: #f5f5f5;
  537. color: #333;
  538. border-color: #f5f5f5;
  539. cursor:auto!important;
  540. border-radius: 4px;
  541. }
  542. .el-range-input{
  543. background-color: #f5f5f5;
  544. color: #333;
  545. border-color: #f5f5f5;
  546. cursor:auto;
  547. border-radius: 4px;
  548. }
  549. .el-textarea__inner{
  550. background-color: #f5f5f5;
  551. color: #333;
  552. border-color: #f5f5f5;
  553. cursor:auto;
  554. border-radius: 4px;
  555. }
  556. }
  557. .switchFontColor{
  558. color:#0183FA;
  559. }
  560. .add-max-box{
  561. display: flex;
  562. flex-direction: column;
  563. overflow: hidden;
  564. height:610px;
  565. .add-form-box{
  566. .switch .el-switch__label {
  567. position: absolute;
  568. display: none;
  569. color: #fff !important;
  570. }
  571. .switch .el-switch__label--right {
  572. z-index: 1;
  573. }
  574. .switch .el-switch__label--right span{
  575. margin-left: 10px;
  576. margin-top: 8px;
  577. }
  578. .switch .el-switch__label--left {
  579. z-index: 1;
  580. }
  581. .switch .el-switch__label--left span{
  582. margin-top: 8px;
  583. margin-left: 30px;
  584. }
  585. .switch .el-switch__label.is-active {
  586. display: block;
  587. }
  588. .el-switch__core:after{
  589. width:20px;
  590. height:20px;
  591. top:4px;
  592. margin-left: 4px;
  593. }
  594. .el-switch.is-checked .el-switch__core::after{
  595. width:20px;
  596. height:20px;
  597. top:4px;
  598. margin-left: -24px;
  599. }
  600. .switch.el-switch .el-switch__core,
  601. .el-switch .el-switch__label {
  602. width: 70px !important;
  603. height:30px !important;
  604. border-radius: 50px 50px 50px 50px;
  605. margin: 0;
  606. }
  607. }
  608. .dialog-table-box{
  609. margin-top:20px;
  610. display: flex;
  611. flex-direction: column;
  612. flex:1;
  613. overflow: hidden;
  614. .dialog-table-title-box{
  615. display: flex;
  616. border:1px solid #e0e0e0;
  617. border-bottom:none;
  618. img{
  619. width:14px;
  620. height:14px;
  621. margin:18px 12px 18px 12px;
  622. }
  623. .dialog-table-title-p{
  624. line-height:50px;
  625. flex:1;
  626. font-size:16px;
  627. }
  628. .dialog-table-title-button{
  629. width:70px;
  630. height:30px;
  631. line-height:28px;
  632. margin:10px 26px;
  633. }
  634. .dialog-table-title-text{
  635. height:30px;
  636. line-height:28px;
  637. margin:10px 26px;
  638. }
  639. }
  640. .switch .el-switch__label {
  641. position: absolute;
  642. display: none;
  643. }
  644. .switch .el-switch__label--right {
  645. z-index: 1;
  646. color: #fff !important;
  647. }
  648. .switch .el-switch__label--right span{
  649. margin-left: 10px;
  650. }
  651. .switch .el-switch__label--left {
  652. z-index: 1;
  653. color: #fff !important;
  654. }
  655. .switch .el-switch__label--left span{
  656. margin-left: 24px;
  657. }
  658. .switch .el-switch__label.is-active {
  659. display: block;
  660. }
  661. .switch.el-switch .el-switch__core,
  662. .el-switch .el-switch__label {
  663. width: 60px !important;
  664. margin: 0;
  665. }
  666. }
  667. }
  668. .inspectionPlan-dialog-user-box{
  669. display: flex;
  670. overflow: hidden;
  671. height:610px;
  672. .dept-table-title-box{
  673. display: flex;
  674. padding:0 20px;
  675. background: rgba(1,131,250,0.1);
  676. p{
  677. flex:1;
  678. color:#0183FA;
  679. font-size:16px;
  680. line-height:40px;
  681. }
  682. p:nth-child(1){
  683. text-align: left;
  684. }
  685. p:nth-child(2){
  686. text-align: right;
  687. }
  688. }
  689. .dept-table-max-box{
  690. border: 1px solid #e0e0e0;
  691. flex:1;
  692. display: flex;
  693. flex-direction: column;
  694. overflow: hidden;
  695. padding:20px;
  696. .form-index{
  697. .el-input__inner{
  698. border-right:none;
  699. padding-right:0;
  700. }
  701. .el-input-group__append{
  702. background: #fff;
  703. cursor: pointer;
  704. padding:0 10px;
  705. }
  706. }
  707. input{
  708. border: 1px solid #DCDFE6;
  709. }
  710. }
  711. .left-max-box{
  712. height:610px;
  713. display: flex;
  714. flex-direction: column;
  715. overflow: hidden;
  716. width:588px;
  717. }
  718. .right-max-box{
  719. height:610px;
  720. display: flex;
  721. flex-direction: column;
  722. overflow: hidden;
  723. width:588px;
  724. flex:1;
  725. }
  726. .center-box{
  727. width:68px;
  728. p{
  729. display: block;
  730. border-radius:50%;
  731. width:30px;
  732. height:30px;
  733. line-height:30px;
  734. text-align: center;
  735. background: rgba(245,245,245,1);
  736. color:rgba(62,62,62,1);
  737. cursor: pointer;
  738. font-size:16px;
  739. }
  740. p:nth-child(1){
  741. margin:270px 19px 0;
  742. }
  743. p:nth-child(2){
  744. margin:14px 19px 0;
  745. }
  746. p:hover{
  747. color:#fff;
  748. background: #0183fa;
  749. }
  750. }
  751. }
  752. }
  753. </style>