userManagement.vue 68 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582
  1. <template>
  2. <div class="userRights_template">
  3. <div class="nav_top">
  4. <div class="left_title">
  5. <img src="../img/iconfont/notice.png"><span class="span">Please pay attention to the updated content at any time.</span>
  6. </div>
  7. <div class="right_operation">
  8. <el-dropdown @command="commandDropdown" trigger="click" @visible-change="commandHide('dropdown_projectManagement_role_')">
  9. <span class="el-dropdown-link">
  10. <span>{{role_Name}}</span><i class="el-icon-caret-bottom el-icon--right"></i>
  11. </span>
  12. <el-dropdown-menu slot="dropdown" class="scrollbar_style dropdown_projectManagement_role_">
  13. <el-dropdown-item :class="{'select':role_ == '0'}" :command="{'key':'role_','id':'0'}" :key="'0'">All</el-dropdown-item>
  14. <el-dropdown-item v-for="item in roleList" :class="{'select':item.id==role_}" :command="{'key':'role_','id':item.id}" :key="item.id">{{item.name}}</el-dropdown-item>
  15. </el-dropdown-menu>
  16. </el-dropdown>
  17. <el-input placeholder="search..." type='search' v-model="keywords" @keyup.native="getUserSub_listKeyUp($event)" class="input-with-select">
  18. <i slot="suffix" class="el-input__icon el-icon-search" @click="getUserSub_list()"></i>
  19. </el-input>
  20. <div class="btn" @click="addAccountFun()"><img src="../img/iconfont/add.png"><span>New account</span></div>
  21. </div>
  22. </div>
  23. <div class="userRights_main">
  24. <div class="userRights_left">
  25. <div class="editBtn" @click="editFun(userInfo)" title="Edit">
  26. <i class="iconfont icon-bianji" style="color: #A3AFBB"></i>
  27. </div>
  28. <el-upload
  29. class="avatar-uploader"
  30. :action="actionImg"
  31. :data="imgUploadData"
  32. :show-file-list="false"
  33. :on-success="handleAvatarSuccess"
  34. :before-upload="beforeAvatarUpload">
  35. <img v-if="userInfo.avatar" :src="userInfo.avatar" class="avatar">
  36. <i v-else class="el-icon-plus avatar-uploader-icon"></i>
  37. </el-upload>
  38. <p class="name">{{userInfo.name}}</p>
  39. <div class="from">
  40. <div class="item_form">
  41. <div class="key">Name</div>
  42. <div class="val">{{userInfo.name}}</div>
  43. </div>
  44. <div class="item_form">
  45. <div class="key">Account type</div>
  46. <div class="val">{{roleArr[userInfo.role]}}</div>
  47. </div>
  48. <div class="item_form">
  49. <div class="key">Phone</div>
  50. <div class="val">{{userInfo.phone}}</div>
  51. </div>
  52. <div class="item_form">
  53. <div class="key">E-mail</div>
  54. <div class="val">{{userInfo.email}}</div>
  55. </div>
  56. <div class="item_form">
  57. <div class="key">Password</div>
  58. <div class="val">{{userInfo.name}}</div>
  59. </div>
  60. <div class="item_form">
  61. <div class="key">Company</div>
  62. <div class="val">{{userInfo.company}}</div>
  63. </div>
  64. </div>
  65. <div class="bottom_authority" @click="jurisdictionFun(userInfo,'view')">
  66. <p class="p1">Account authority</p>
  67. <p class="p2">{{userData.permCount}}</p>
  68. <p class="p3">
  69. <i class="iconfont icon-celan-gou" v-if="userData.view == 1"></i>
  70. <i class="iconfont icon-celan-guanbi" v-if="userData.view == 0"></i>
  71. <span>View</span>
  72. </p>
  73. <p class="p3">
  74. <i class="iconfont icon-celan-gou" v-if="userData.operating == 1"></i>
  75. <i class="iconfont icon-celan-guanbi" v-if="userData.operating == 0"></i>
  76. <span>Operating</span>
  77. </p>
  78. <p class="p3">
  79. <i class="iconfont icon-celan-gou" v-if="userData.parameter == 1"></i>
  80. <i class="iconfont icon-celan-guanbi" v-if="userData.parameter == 0"></i>
  81. <span>Parameter</span>
  82. </p>
  83. <i class="iconfont icon-youjiantou-dan"></i>
  84. </div>
  85. </div>
  86. <div class="userRights_right">
  87. <div class="userRights_right_top">
  88. <div class="li li1">
  89. <div class="i_box">
  90. <i class="iconfont icon-quanbuzhanghu"></i>
  91. </div>
  92. <div class="text_box">
  93. <p class="p1">{{userData.total}}</p>
  94. <p class="p2">Total accounts</p>
  95. </div>
  96. </div>
  97. <div class="li">
  98. <p class="p1">{{userData.manuCount}}</p>
  99. <p class="p2">Manufacturer</p>
  100. <div class="line"></div>
  101. </div>
  102. <div class="li">
  103. <p class="p1">{{userData.suppCount}}</p>
  104. <p class="p2">Supplier</p>
  105. <div class="line"></div>
  106. </div>
  107. <div class="li">
  108. <p class="p1">{{userData.poCount}}</p>
  109. <p class="p2">PO</p>
  110. <div class="line"></div>
  111. </div>
  112. <div class="li">
  113. <p class="p1">{{userData.upaCount}}</p>
  114. <p class="p2">Upazilla</p>
  115. <div class="line"></div>
  116. </div>
  117. <div class="li">
  118. <p class="p1">{{userData.monCount}}</p>
  119. <p class="p2">Monitoring</p>
  120. <div class="line"></div>
  121. </div>
  122. <div class="li">
  123. <p class="p1">{{userData.conCount}}</p>
  124. <p class="p2">Controlling</p>
  125. <div class="line"></div>
  126. </div>
  127. </div>
  128. <div class="table_box">
  129. <el-table
  130. ref="faultInformationList"
  131. v-loading="loading.faultInformationList"
  132. element-loading-background="rgba(0, 0, 0, 0.5)"
  133. height="calc(100% - 3.5rem)"
  134. :data="faultInformationList">
  135. <el-table-column
  136. label="Num"
  137. prop="webIndex"
  138. align="center"
  139. header-align="center"
  140. width="60">
  141. </el-table-column>
  142. <el-table-column
  143. v-for="(item) in faultInformationArr"
  144. :key="'table_'+item.prop"
  145. :prop="item.prop"
  146. :label="item.label"
  147. :align="item.align?item.align:'center'"
  148. :width="item.width"
  149. :show-overflow-tooltip="true"
  150. :min-width="item.minWidth">
  151. <template slot-scope="scope">
  152. <div v-if="item.type != 1">{{scope.row[item.prop]}}{{item.unit?item.unit:''}}</div>
  153. <div v-if="item.prop == 'role'" class="Type">
  154. <div class="box">{{roleArr[scope.row[item.prop]]}}{{item.unit?item.unit:''}}</div>
  155. </div>
  156. <div v-if="item.prop == 'status'" class="State" v-loading="scope.row.block_userLoading">
  157. <span class="pl_switch" :class="{'checked':scope.row['status'] == '1'}" @click="blockUser(scope.row)"></span>
  158. </div>
  159. </template>
  160. </el-table-column>
  161. <el-table-column
  162. align="center"
  163. :width="120"
  164. :label="'Operation'">
  165. <template slot-scope="scope">
  166. <span class="btn" @click="editFun(scope.row)" title="Edit">
  167. <i class="iconfont icon-bianji" style="color: #A3AFBB"></i>
  168. </span>
  169. <span class="btn" @click="jurisdictionFun(scope.row)" title="Jurisdiction">
  170. <i class="iconfont icon-quanxian" style="color: #A3AFBB"></i>
  171. </span>
  172. <span class="btn" @click="delFun(scope.row)" title="Delete">
  173. <i class="iconfont icon-shanchu" style="color: #A3AFBB"></i>
  174. </span>
  175. </template>
  176. </el-table-column>
  177. </el-table>
  178. </div>
  179. </div>
  180. </div>
  181. <!-- 编辑用户权限 -->
  182. <div class="permissions_wrap" v-show="permissionsTkShowbg">
  183. <div class="permissions_wrap_bg" @click="permissionsTkClose()"></div>
  184. <div class="permissions_box" :class="{'permissions_tk_show':permissionsTkShow}">
  185. <div class="permissions_title">
  186. <span class="span1">Edit permissions</span>
  187. </div>
  188. <div class="form scrollbar_style">
  189. <div class="form_item" :class="{'open':item.open}" v-for="item in privilegeList" :key="item.id">
  190. <p class="form_item_title" @click="privilegeOpenFun(item)">
  191. <span class="laber">{{item.en_name}}</span>
  192. <i class="iconfont icon-xialajiantou"></i>
  193. </p>
  194. <div class="form_item_main" v-if="item.open">
  195. <div class="checkbox_inde">
  196. <el-checkbox :indeterminate="item.indeterminate" v-model="item.checkAll" :disabled="userId == userInfo.id" @change="handleCheckAllChange(item)">All</el-checkbox>
  197. </div>
  198. <div>
  199. <el-checkbox-group v-model="item.checkedCities" @change="handleCheckedCitiesChange(item)">
  200. <el-checkbox v-for="obj in item.sub_list" :label="obj.id" :key="obj.id" :disabled="userId == userInfo.id">{{obj.en_name}}</el-checkbox>
  201. </el-checkbox-group>
  202. </div>
  203. </div>
  204. </div>
  205. </div>
  206. <div class="btn_box">
  207. <div class="cancel" @click="permissionsTkClose()">Cancel</div>
  208. <div class="btn" @click="permissionsSave()" v-if="userId != userInfo.id">Confirm</div>
  209. </div>
  210. </div>
  211. </div>
  212. <!-- 添加编辑用户 -->
  213. <div class="account_wrap" v-show="accountTkShowbg">
  214. <div class="account_wrap_bg" @click="accountTkClose()"></div>
  215. <div class="account_box" :class="{'account_tk_show':accountTkShow}">
  216. <div class="account_title">
  217. <span class="span1">{{accountTkTitle}}</span>
  218. </div>
  219. <div class="form_box scrollbar_style" v-if="accountType == '0'">
  220. <div class="form form1">
  221. <div class="form_item">
  222. <span class="laber">Account type</span>
  223. <!-- <el-input v-model="accountForm.roleType" placeholder=""></el-input> -->
  224. <el-dropdown @command="commandDropdown" trigger="click" @visible-change="commandHide('dropdown_projectManagement_roleName')" v-if="accountForm.roleType != 1">
  225. <span class="el-dropdown-link">
  226. <span>{{accountFormRoleName}}</span><i class="el-icon-caret-bottom el-icon--right"></i>
  227. </span>
  228. <el-dropdown-menu slot="dropdown" class="scrollbar_style dropdown_projectManagement_roleName_">
  229. <el-dropdown-item v-for="item in roleList" :class="{'select':item.id==accountForm.roleType}" :command="{'key':'accountForm.roleType','id':item.id}" :key="item.id">{{item.name}}</el-dropdown-item>
  230. </el-dropdown-menu>
  231. </el-dropdown>
  232. <span class="text" v-if="accountForm.roleType == 1">Admin</span>
  233. </div>
  234. <div class="form_item" v-if="accountTkTitle == 'Add account'">
  235. <span class="laber">Account name</span>
  236. <el-input v-model="accountForm.account" placeholder=""></el-input>
  237. </div>
  238. <div class="form_item" v-if="accountTkTitle == 'Add account'">
  239. <span class="laber">Password</span>
  240. <el-input v-model="accountForm.password" type="password" placeholder=""></el-input>
  241. </div>
  242. </div>
  243. <div class="form">
  244. <div class="form_item">
  245. <span class="laber">Name</span>
  246. <el-input v-model="accountForm.name" placeholder=""></el-input>
  247. </div>
  248. <div class="form_item">
  249. <span class="laber">Phone</span>
  250. <el-input v-model="accountForm.phone" placeholder=""></el-input>
  251. </div>
  252. <div class="form_item">
  253. <span class="laber">E-mail</span>
  254. <el-input v-model="accountForm.email" placeholder=""></el-input>
  255. </div>
  256. <div class="form_item">
  257. <span class="laber">Company</span>
  258. <el-dropdown @command="commandDropdown" trigger="click" @visible-change="commandHide('dropdown_projectManagement_roleName')">
  259. <span class="el-dropdown-link">
  260. <span>{{accountFormCompanyeName}}</span><i class="el-icon-caret-bottom el-icon--right"></i>
  261. </span>
  262. <el-dropdown-menu slot="dropdown" class="scrollbar_style dropdown_projectManagement_roleName_">
  263. <el-dropdown-item v-for="item in companyNav" :class="{'select':item.id==accountForm.company}" :command="{'key':'accountForm.company','id':item.id}" :key="item.id">{{item.name}}</el-dropdown-item>
  264. </el-dropdown-menu>
  265. </el-dropdown>
  266. </div>
  267. </div>
  268. </div>
  269. <div class="form_ul scrollbar_style" v-if="accountType == '1'">
  270. <div class="form_item" :class="{'open':item.open}" v-for="item in privilegeList" :key="item.id">
  271. <p class="form_item_title" @click="privilegeOpenFun(item)">
  272. <span class="laber">{{item.en_name}}</span>
  273. <i class="iconfont icon-xialajiantou"></i>
  274. </p>
  275. <div class="form_item_main" v-if="item.open">
  276. <div class="checkbox_inde">
  277. <el-checkbox :indeterminate="item.indeterminate" v-model="item.checkAll" @change="handleCheckAllChange(item)">All</el-checkbox>
  278. </div>
  279. <div>
  280. <el-checkbox-group v-model="item.checkedCities" @change="handleCheckedCitiesChange(item)">
  281. <el-checkbox v-for="obj in item.sub_list" :label="obj.id" :key="obj.id">{{obj.en_name}}</el-checkbox>
  282. </el-checkbox-group>
  283. </div>
  284. </div>
  285. </div>
  286. </div>
  287. <div class="btn_box">
  288. <div class="cancel" @click="accountTkClose()" v-if="accountTkTitle == 'Edit account'||(accountTkTitle == 'Add account'&&accountType == '0')">Cancel</div>
  289. <div class="btn" @click="accountSave()" v-if="accountTkTitle == 'Edit account'">Confirm</div>
  290. <div class="btn" @click="accountNextStep()" v-if="accountTkTitle == 'Add account'&&accountType == '0'">next step</div>
  291. <div class="btn" @click="accountLastStep()" v-if="accountTkTitle == 'Add account'&&accountType == '1'">Last step</div>
  292. <div class="btn" @click="accountSave()" v-if="accountTkTitle == 'Add account'&&accountType == '1'">Confirm</div>
  293. </div>
  294. </div>
  295. </div>
  296. </div>
  297. </template>
  298. <script type="text/javascript">
  299. import { mapGetters } from 'vuex'
  300. import allUel from '../api/allUel.js'
  301. import base from '../api/base.js'
  302. export default{
  303. name:'userRights',
  304. data(){
  305. return{
  306. userId:'',
  307. userInfo:{
  308. avatar:'',
  309. },
  310. userData:{},
  311. actionImg:'',
  312. imgUploadData:{
  313. username:'',
  314. client_key:'',
  315. token:'',
  316. },
  317. privilegeList: [],
  318. keywords:'',
  319. role_:'',
  320. role_Nav:[{id:'0',name:'All'},{id:'1',name:'admin'},{id:2,name:'Manufacturer'},{id:3,name:'Supplier'},{id:4,name:'PO'},{id:5,name:'Upazilla'},{id:6,name:'Monitoring'},{id:7,name:'Controlling'}],
  321. rightDate:'',
  322. rightDateNav:[{id:'0',name:'Today'}],
  323. myChart1:'',
  324. faultInformationList:[],
  325. faultInformationArr:[],
  326. permissionsTkShowbg:false,
  327. permissionsTkShow:false,
  328. accountTkShowbg:false,
  329. accountTkShow:false,
  330. accountForm:{
  331. id:'',
  332. name:'',
  333. phone:'',
  334. account:'',
  335. company:'',
  336. password:'',
  337. email:'',
  338. roleType:'',
  339. privilegeIds:'',
  340. },
  341. accountTkTitle:'Edit account',
  342. accountType:'0',
  343. roleArr:['','Admin','Manufacturer','Supplier','PO','Upazilla','Monitoring','Controlling'],
  344. roleList:[{id:2,name:'Manufacturer'},{id:3,name:'Supplier'},{id:4,name:'PO'},{id:5,name:'Upazilla'},{id:6,name:'Monitoring'},{id:7,name:'Controlling'}],
  345. companyNav:[],
  346. loading:{
  347. faultInformationList:false,
  348. }
  349. }
  350. },
  351. // components:{sideBarIdcol},
  352. computed:{
  353. ...mapGetters({
  354. token:'token',
  355. client_key:'client_key',
  356. username:'username',
  357. version:'version',
  358. id:'id',
  359. role:'role'
  360. }),
  361. role_Name(){
  362. let name;
  363. for(let d of this.role_Nav){
  364. if(d.id == this.role_){
  365. name = d.name;
  366. }
  367. }
  368. return name;
  369. },
  370. accountFormRoleName(){
  371. let name;
  372. for(let d of this.roleList){
  373. if(d.id == this.accountForm.roleType){
  374. name = d.name;
  375. }
  376. }
  377. return name;
  378. },
  379. accountFormCompanyeName(){
  380. let name;
  381. for(let d of this.companyNav){
  382. if(d.id == this.accountForm.company){
  383. name = d.name;
  384. }
  385. }
  386. return name;
  387. }
  388. },
  389. mounted(){
  390. this.actionImg = allUel.user.update_avatar;
  391. this.imgUploadData.username = this.username;
  392. this.imgUploadData.client_key = this.client_key;
  393. this.imgUploadData.token = this.token;
  394. this.role_ = 0;
  395. this.faultInformationArr = [
  396. {prop:'role',label:'Type',minWidth:120,type:1},
  397. {prop:'name',label:'Name',minWidth:80,align:'left'},
  398. {prop:'id',label:'ID',minWidth:80,align:'left'},
  399. {prop:'phone',label:'phone',minWidth:80,align:'left'},
  400. {prop:'email',label:'E-mail',width:80,align:'left'},
  401. {prop:'company',label:'Affiliated unit',minWidth:80},
  402. {prop:'status',label:'State',minWidth:60,type:1},
  403. ];
  404. // this.faultInformationList = [
  405. // {'Name':'Claudia Bryant','Type':'Upa','ID':'3432525053','phone':18126534952,'eMail':'nupuid@unwot.ht','AffiliatedUnit':'City-Name','State':1},
  406. // {'Name':'Claudia Bryant','Type':'Upa','ID':'3432525053','phone':18126534952,'eMail':'nupuid@unwot.ht','AffiliatedUnit':'City-Name','State':0},
  407. // ];
  408. this.getUserSub_list();
  409. this.getUserInfo(this.id,data=>{
  410. this.userInfo = data.data;
  411. });
  412. this.getUserData();
  413. },
  414. methods:{
  415. commandHide(val){
  416. this.$nextTick(function(){
  417. if($('.'+val)&&$('.'+val+' >.select').offset()){
  418. $('.'+val).animate({scrollTop: $('.'+val).scrollTop() + $('.'+val+' >.select').offset().top - $('.'+val).offset().top - 100})
  419. }
  420. })
  421. },
  422. commandDropdown(obj){
  423. if(obj.key.split('.').length == 1){
  424. this.$set(this,obj.key,obj.id)
  425. }else if(obj.key.split('.').length == 2){
  426. this.$set(this[obj.key.split('.')[0]],obj.key.split('.')[1],obj.id)
  427. }
  428. if(obj.key == 'role_'){
  429. this.getUserSub_list();
  430. }
  431. },
  432. getUserInfo(id,callback,error){
  433. base.ajax_post(
  434. allUel.user.info,
  435. {
  436. username:this.username,
  437. token:this.token,
  438. client_key:this.client_key,
  439. id:id,
  440. },
  441. {},
  442. data => {
  443. if(callback){
  444. callback(data)
  445. }
  446. },
  447. this,
  448. data =>{
  449. if(error){
  450. error(data)
  451. }
  452. }
  453. )
  454. },
  455. getUserData(){
  456. base.ajax_post(
  457. allUel.user.data,
  458. {
  459. username:this.username,
  460. token:this.token,
  461. client_key:this.client_key,
  462. id:this.id,
  463. },
  464. {},
  465. data => {
  466. this.userData = data.data;
  467. console.log(data)
  468. },
  469. this
  470. )
  471. },
  472. getPrivilege_list(id){
  473. base.ajax_post(
  474. allUel.user.privilege_list,
  475. {
  476. username:this.username,
  477. token:this.token,
  478. client_key:this.client_key,
  479. id:id,
  480. },
  481. {},
  482. data => {
  483. this.privilegeList = data.data.list;
  484. for(let d of this.privilegeList){
  485. this.$set(d,'open',true);
  486. this.$set(d,'AllModel',true);
  487. this.$set(d,'cityOptions',[]);
  488. this.$set(d,'checkedCities',[]);
  489. // d.sub_list =
  490. for(let dd of d.sub_list){
  491. this.$set(d.cityOptions,d.cityOptions.length,dd.id);
  492. if(dd.select){
  493. this.$set(d.checkedCities,d.checkedCities.length,dd.id);
  494. }
  495. }
  496. this.$set(d,'indeterminate',d.checkedCities.length > 0 && d.checkedCities.length < d.sub_list.length);
  497. this.$set(d,'checkAll',d.checkedCities.length === d.sub_list.length);
  498. }
  499. },
  500. this
  501. )
  502. },
  503. addAccountFun(){
  504. this.accountTkTitle = 'Add account';
  505. for(let key in this.accountForm){
  506. this.accountForm[key] = '';
  507. }
  508. this.accountForm.roleType = 2;
  509. this.accountType = '0';
  510. let this_ = this;
  511. this.accountTkShowbg = true;
  512. setTimeout(function(){
  513. this_.accountTkShow = true;
  514. },300)
  515. this.getCompanyNav();
  516. },
  517. editFun(data){
  518. this.getCompanyNav();
  519. this.accountTkTitle = 'Edit account';
  520. this.accountTkShowbg = true;
  521. this.getUserInfo(data.id,data=>{
  522. for(let key in data.data){
  523. this.accountForm[key] = data.data[key];
  524. }
  525. this.accountTkShow = true;
  526. },()=>{
  527. this.accountTkShowbg = false;
  528. });
  529. },
  530. accountTkClose(){
  531. let this_ = this;
  532. this.accountTkShow = false;
  533. setTimeout(function(){
  534. this_.accountTkShowbg = false;
  535. },300)
  536. },
  537. accountLastStep(){
  538. this.accountType = '0';
  539. },
  540. accountNextStep(){
  541. this.getPrivilege_list();
  542. this.accountType = '1';
  543. },
  544. accountSave(){
  545. this.accountTkShow = false;
  546. this.accountForm.privilegeIds = '';
  547. for(let d of this.privilegeList){
  548. for(let id of d.checkedCities){
  549. if(this.accountForm.privilegeIds == ''){
  550. this.accountForm.privilegeIds = id
  551. }else{
  552. this.accountForm.privilegeIds += ','+id;
  553. }
  554. }
  555. }
  556. base.ajax_post(
  557. allUel.user.user_update,
  558. {
  559. username:this.username,
  560. token:this.token,
  561. client_key:this.client_key,
  562. ...this.accountForm,
  563. },
  564. {},
  565. data => {
  566. this.$message({
  567. showClose: true,
  568. message: data.msg,
  569. type: 'success'
  570. });
  571. this.accountTkShowbg = false;
  572. this.getUserSub_list();
  573. this.getUserData();
  574. if(this.accountForm.id == this.userInfo.id){
  575. this.getUserInfo(this.userInfo.id,data=>{
  576. this.userInfo = data.data;
  577. });
  578. }
  579. },
  580. this,()=>{
  581. this.accountTkShow = true;
  582. }
  583. )
  584. },
  585. /*公司下拉列表*/
  586. getCompanyNav(){
  587. console.log(this.sideBarCompanyType)
  588. base.ajax_post(
  589. allUel.user.company_nav,
  590. {
  591. username:this.username,
  592. client_key:this.client_key,
  593. token:this.token,
  594. type:this.sideBarCompanyType,
  595. },
  596. {},
  597. data =>{
  598. this.companyNav = data.data.list;
  599. },
  600. this)
  601. },
  602. /*删除*/
  603. delFun(obj,type){
  604. let ids = '',isTrue = true;
  605. if(type == 'batch'){
  606. if(obj.length == 0){
  607. isTrue = false;
  608. this.$message({
  609. message: 'Please select the devices',
  610. type: 'warning'
  611. });
  612. }else{
  613. for(let id of obj){
  614. if(id == ''){
  615. ids = id;
  616. }else{
  617. ids += ','+id;
  618. }
  619. }
  620. }
  621. }else{
  622. ids = obj.id;
  623. }
  624. if(isTrue){
  625. this.$confirm(
  626. 'Are you sure you want to delete the user?', 'Warning', {
  627. confirmButtonText: 'Confirm',
  628. cancelButtonText: 'Cancel',
  629. type: 'warning'
  630. }
  631. ).then(() => {
  632. base.ajax_post(
  633. allUel.user.del,
  634. {
  635. username:this.username,
  636. client_key:this.client_key,
  637. token:this.token,
  638. id:ids,
  639. },
  640. {},
  641. data =>{
  642. this.$message({
  643. showClose: true,
  644. message: data.msg,
  645. type: 'success'
  646. });
  647. this.getUserSub_list();
  648. this.getUserData();
  649. },
  650. this
  651. )
  652. }).catch(() => {
  653. this.$message({
  654. type: 'info',
  655. message: 'Delete canceled'
  656. });
  657. });
  658. }
  659. },
  660. blockUser(data){
  661. if(data.status == '1'){
  662. data.status = '0'
  663. }else{
  664. data.status = '1'
  665. }
  666. data.block_userLoading = true;
  667. base.ajax_post(
  668. allUel.user.block_user,
  669. {
  670. username:this.username,
  671. token:this.token,
  672. client_key:this.client_key,
  673. id:data.id,
  674. status:data.status,
  675. },
  676. {},
  677. obj => {
  678. this.$message({
  679. showClose: true,
  680. message: obj.msg,
  681. type: 'success'
  682. });
  683. data.block_userLoading = false;
  684. },
  685. this,()=>{
  686. if(data.status == '1'){
  687. data.status = '0'
  688. }else{
  689. data.status = '1'
  690. }
  691. data.block_userLoading = false;
  692. }
  693. )
  694. },
  695. privilegeOpenFun(data){
  696. if(data.open){
  697. data.open = false;
  698. }else{
  699. data.open = true;
  700. }
  701. },
  702. handleCheckAllChange(data) {
  703. data.checkedCities = data.checkAll ? data.cityOptions : [];
  704. data.indeterminate = false;
  705. },
  706. handleCheckedCitiesChange(data) {
  707. let checkedCount = data.checkedCities.length;
  708. data.checkAll = checkedCount === data.sub_list.length;
  709. data.indeterminate = checkedCount > 0 && checkedCount < data.sub_list.length;
  710. },
  711. jurisdictionFun(data){
  712. let this_ = this;
  713. this.permissionsTkShowbg = true;
  714. setTimeout(function(){
  715. this_.permissionsTkShow = true;
  716. },300)
  717. this.getPrivilege_list(data.id);
  718. this.userId = data.id;
  719. },
  720. permissionsTkClose(){
  721. let this_ = this;
  722. this.permissionsTkShow = false;
  723. setTimeout(function(){
  724. this_.permissionsTkShowbg = false;
  725. },300)
  726. },
  727. permissionsSave(){
  728. let privilegeIds = '';
  729. for(let d of this.privilegeList){
  730. for(let id of d.checkedCities){
  731. if(privilegeIds == ''){
  732. privilegeIds = id
  733. }else{
  734. privilegeIds += ','+id;
  735. }
  736. }
  737. }
  738. base.ajax_post(
  739. allUel.user.save_user_privilege,
  740. {
  741. username:this.username,
  742. token:this.token,
  743. client_key:this.client_key,
  744. userid:this.userId,
  745. privilegeIds:privilegeIds,
  746. },
  747. {},
  748. data => {
  749. this.$message({
  750. showClose: true,
  751. message: data.msg,
  752. type: 'success'
  753. });
  754. this.permissionsTkShowbg = false;
  755. this.getUserSub_list();
  756. },
  757. this,()=>{
  758. this.permissionsTkShow = true;
  759. }
  760. )
  761. },
  762. handleAvatarSuccess(res, file) {
  763. console.log(res, file)
  764. if(res.code == '0000'){
  765. this.$message({
  766. showClose: true,
  767. message: res.msg,
  768. type: 'success'
  769. });
  770. this.userInfo.avatar = URL.createObjectURL(file.raw);
  771. }else{
  772. this.$alert(res.msg, 'System hints', {
  773. confirmButtonText: 'Confirm',
  774. });
  775. }
  776. },
  777. beforeAvatarUpload(file) {
  778. const isJPG = file.type === 'image/jpeg';
  779. const isLt2M = file.size / 1024 / 1024 < 2;
  780. if (!isJPG) {
  781. this.$message.error('上传头像图片只能是 JPG 格式!');
  782. }
  783. if (!isLt2M) {
  784. this.$message.error('上传头像图片大小不能超过 2MB!');
  785. }
  786. return isJPG && isLt2M;
  787. },
  788. /*列表*/
  789. getUserSub_listKeyUp(e){
  790. if(e.key == 'Enter'){
  791. this.getUserSub_list();
  792. this.getUserInfo(this.id,data=>{
  793. this.userInfo = data.data;
  794. });
  795. this.getUserData();
  796. }
  797. },
  798. getUserSub_list(){
  799. base.ajax_post(
  800. allUel.user.sub_list,
  801. {
  802. username:this.username,
  803. token:this.token,
  804. client_key:this.client_key,
  805. keywords:this.keywords,
  806. roleType:this.role_,
  807. },
  808. {},
  809. data => {
  810. this.faultInformationList = data.data.list;
  811. let i = 1;
  812. for(let d of this.faultInformationList){
  813. this.$set(d,'block_userLoading',false)
  814. d.webIndex = i;
  815. i++;
  816. }
  817. },
  818. this
  819. )
  820. },
  821. }
  822. }
  823. </script>
  824. <style type="text/css" lang="less">
  825. .userRights_template{
  826. width: 100%;
  827. // height: 100%;
  828. // height: 105rem;
  829. min-height: 50rem;
  830. // min-width: 120rem;
  831. margin: 0 auto;
  832. overflow: hidden;
  833. position: relative;
  834. .nav_top{
  835. display: flex;
  836. justify-content: space-between;
  837. width:100%;
  838. height:3.3rem;line-height: 3.3rem;
  839. background:rgba(255,255,255,1);
  840. border:0.1rem solid rgba(240,240,240,1);
  841. .left_title{
  842. display: flex;
  843. align-items: center;
  844. img{
  845. display: inline-block;
  846. // width: 1.2rem;
  847. height: 1rem;
  848. margin: 0 0.6rem;
  849. }
  850. .span{
  851. font-size:1rem;
  852. font-family:HiraginoSansGB-W3,HiraginoSansGB;
  853. font-weight:normal;
  854. color:rgba(101,112,133,1);
  855. }
  856. }
  857. .right_operation{
  858. display: flex;
  859. align-items: center;
  860. padding-right: 1.6rem;
  861. .el-dropdown{
  862. width: 10rem;
  863. height: 2rem;line-height: 2rem;
  864. background:rgba(246,248,250,1);
  865. border-radius: 0.2rem;
  866. margin-right: 0.8rem;
  867. .el-dropdown-link{
  868. cursor: pointer;
  869. height: 100%;
  870. display: flex;
  871. align-items: center;
  872. justify-content: space-between;
  873. padding: 0 0.8rem;
  874. font-size:1rem;
  875. font-family:PingFang-SC-Medium,PingFang-SC;
  876. font-weight:500;
  877. color:rgba(101,112,133,1);
  878. }
  879. }
  880. .el-input{
  881. width: 16.5rem;
  882. height: 2rem;line-height: 2rem;
  883. .el-input__inner{
  884. height: 2rem;line-height: 2rem;
  885. background:rgba(246,248,250,1);
  886. border: none;
  887. }
  888. .el-input__suffix{
  889. right: 0;
  890. border-top-right-radius: 0.2rem;
  891. border-bottom-right-radius: 0.2rem;
  892. }
  893. .el-input__icon{
  894. width: 1.8rem;
  895. height: 2rem;line-height: 2rem;
  896. border-top-right-radius: 0.2rem;
  897. border-bottom-right-radius: 0.2rem;
  898. background:#FC8440;
  899. color: #fff;
  900. font-size: 1rem;
  901. cursor: pointer;
  902. position: absolute;
  903. top: 0;
  904. right: 0;
  905. }
  906. }
  907. .btn{
  908. margin-left: 0.6rem;
  909. display: flex;
  910. align-items: center;
  911. padding: 0.5rem 1rem;
  912. height:2rem;line-height: 2rem;
  913. background:rgba(255,255,255,1);
  914. border-radius:0.2rem 0.1rem 0.1rem 0.2rem;
  915. border:0.1rem solid rgba(240,240,240,1);
  916. cursor: pointer;
  917. font-size:1rem;
  918. font-family:PingFang-SC-Medium,PingFang-SC;
  919. font-weight:500;
  920. color:rgba(51,51,51,1);
  921. img{
  922. height: 1.2rem;
  923. margin-right: 0.5rem;
  924. }
  925. }
  926. }
  927. }
  928. .userRights_main{
  929. display: flex;
  930. .userRights_left{
  931. width: 30rem;
  932. height: 60rem;
  933. border-right: 0.08rem solid rgba(240,240,240,1);
  934. position: relative;
  935. .editBtn{
  936. cursor: pointer;
  937. position: absolute;
  938. text-align: center;
  939. width: 1.6rem;height: 1.6rem;line-height: 1.6rem;
  940. right: 2rem;top: 2rem;
  941. i{
  942. font-size: 1.4rem;
  943. }
  944. }
  945. .avatar-uploader{
  946. margin: 3.4rem auto 0;
  947. width: 8.3rem;height: 8.3rem;
  948. text-align: center;
  949. overflow: hidden;
  950. border:0.17rem solid rgba(233,233,233,1);
  951. border-radius: 50%;
  952. .avatar-uploader-icon{
  953. width: 8.3rem;height: 8.3rem;line-height: 8.3rem;
  954. }
  955. .avatar{
  956. width: 8.3rem;height: 8.3rem;line-height: 8.3rem;
  957. }
  958. }
  959. .name{
  960. margin: 1rem 0 2.5rem;
  961. text-align: center;
  962. font-size:1.17rem;
  963. font-family:HiraginoSansGB-W3,HiraginoSansGB;
  964. font-weight:normal;
  965. color:rgba(51,51,51,1);
  966. }
  967. .from{
  968. padding: 0 2rem;
  969. .item_form{
  970. display: flex;
  971. align-items: center;
  972. justify-content: space-between;
  973. height:3.1rem;line-height:3.1rem;
  974. background:rgba(255,255,255,1);
  975. border-radius:0.17rem;
  976. border:0.08rem solid rgba(235,239,242,1);
  977. padding: 0 1.2rem;
  978. margin-bottom: 0.8rem;
  979. .key{
  980. font-size:1rem;
  981. font-family:HiraginoSansGB-W3,HiraginoSansGB;
  982. font-weight:normal;
  983. color:rgba(101,112,133,1);
  984. }
  985. .val{
  986. max-width: 60%;
  987. line-height: 1.5rem;
  988. font-size:1rem;
  989. font-family:HiraginoSansGB-W3,HiraginoSansGB;
  990. font-weight:normal;
  991. color:rgba(51,51,51,1);
  992. }
  993. }
  994. }
  995. .bottom_authority{
  996. margin: 1.4rem 2rem 0rem;
  997. height:15.4rem;
  998. border-radius:0.5rem;
  999. padding-top: 2rem;
  1000. // border:0.08rem solid rgba(240,240,240,1);
  1001. cursor: pointer;
  1002. background-image: url('../img/userManagement/permissions.png');
  1003. background-size: 100% 100%;
  1004. background-position: center;
  1005. position: relative;
  1006. .icon-youjiantou-dan{
  1007. color: #fff;
  1008. font-size: 1.6rem;
  1009. position: absolute;right: 1.5rem;top: 8rem;
  1010. }
  1011. .p1{
  1012. margin-top: 1.2rem;
  1013. margin-left: 11.5rem;
  1014. font-size:1.33rem;
  1015. font-family:AlibabaPuHuiTiB;
  1016. color:rgba(255,255,255,1);
  1017. }
  1018. .p2{
  1019. margin-left: 11.5rem;
  1020. font-size:3rem;
  1021. font-family:AlibabaPuHuiTiB;
  1022. color:rgba(255,255,255,1);
  1023. }
  1024. .p3{
  1025. margin-left: 9.6rem;
  1026. display: flex;
  1027. align-items: center;
  1028. i{
  1029. font-size: 1.2rem;
  1030. color: #FFDB00;
  1031. &.icon-celan-guanbi{
  1032. font-size: 1rem;
  1033. }
  1034. }
  1035. span{
  1036. margin-left: 0.6rem;
  1037. font-size:1rem;
  1038. font-family:AlibabaPuHuiTiR;
  1039. color:rgba(255,255,255,1);
  1040. }
  1041. }
  1042. }
  1043. }
  1044. .userRights_right{
  1045. margin-left: 0.8rem;
  1046. margin-right: 1.6rem;
  1047. flex: 1;
  1048. width: calc(100% - 32.4rem);
  1049. .userRights_right_top{
  1050. margin-top: 0.8rem;
  1051. height:5.8rem;
  1052. background:rgba(255,255,255,1);
  1053. border:0.08rem solid rgba(240,240,240,1);
  1054. display: flex;
  1055. align-items: center;
  1056. .li{
  1057. flex: 1;
  1058. text-align: center;
  1059. &.li1{
  1060. flex: 1.3;
  1061. height: 100%;
  1062. display: flex;
  1063. align-items: center;
  1064. border-right: 0.08rem solid rgba(240,240,240,1);
  1065. .i_box{
  1066. margin: 0rem 0.8rem 0 2.5rem;
  1067. width:2.2rem;
  1068. height:2.2rem;line-height: 2.2rem;
  1069. background:linear-gradient(134deg,rgba(252,169,64,1) 0%,rgba(252,132,64,1) 100%);
  1070. border-radius:0.33rem;
  1071. i{
  1072. color: #fff;
  1073. }
  1074. }
  1075. .text_box{
  1076. text-align: left;
  1077. }
  1078. }
  1079. .p1{
  1080. font-size:1.67rem;
  1081. font-family:AlibabaPuHuiTiB;
  1082. color:rgba(51,51,51,1);
  1083. }
  1084. .p2{
  1085. font-size:1rem;
  1086. font-family:HiraginoSansGB-W3,HiraginoSansGB;
  1087. font-weight:normal;
  1088. color:rgba(101,112,133,1);
  1089. margin-bottom: 0.2rem;
  1090. }
  1091. .line{
  1092. margin: 0 auto;
  1093. width:1.2rem;
  1094. height:0.2rem;
  1095. background:linear-gradient(134deg,rgba(0,124,255,1) 0%,rgba(0,93,236,1) 100%);
  1096. border-radius:0.08rem;
  1097. }
  1098. }
  1099. }
  1100. .table_box{
  1101. margin-top: 0.8rem;
  1102. height:50rem;
  1103. background:rgba(255,255,255,1);
  1104. border:0.08rem solid rgba(240,240,240,1);
  1105. .el-table{
  1106. width: 100%;
  1107. th,td{
  1108. padding: 0;
  1109. >.cell{
  1110. padding: 0 0.5rem;
  1111. }
  1112. }
  1113. th{
  1114. height: 3.33rem;line-height: 3.33rem;
  1115. background:rgba(246,248,250,1);
  1116. font-size:1rem;
  1117. font-family:PingFang-SC-Medium,PingFang-SC;
  1118. font-weight:500;
  1119. color:rgba(102,102,102,1);
  1120. }
  1121. td{
  1122. height: 4.2rem;line-height: 4.2rem;
  1123. font-size:1rem;
  1124. font-family:PingFangSC-Medium,PingFang SC;
  1125. font-weight:500;
  1126. color:rgba(51,51,51,1);
  1127. }
  1128. .btn{
  1129. padding: 0.2rem 0.5rem;
  1130. cursor: pointer;
  1131. i{
  1132. font-size: 1rem;
  1133. color: #A3AFBB;
  1134. }
  1135. }
  1136. .Type{
  1137. display: flex;
  1138. align-items: center;
  1139. justify-content: center;
  1140. // width: calc(100% - 1rem);
  1141. // margin: 0 0.5rem;
  1142. .box{
  1143. padding: 0 1rem;
  1144. height:1.8rem;line-height: 1.8rem;
  1145. background:rgba(29,125,253,0.1);
  1146. border-radius:1rem;
  1147. font-size:1rem;
  1148. font-family:PingFang-SC-Medium,PingFang-SC;
  1149. font-weight:500;
  1150. color:rgba(29,125,253,1);
  1151. }
  1152. }
  1153. .State{
  1154. display: flex;
  1155. align-items: center;
  1156. // width: calc(100% - 1rem);
  1157. // margin: 0 0.5rem;
  1158. .pl_switch{
  1159. margin: 0 auto;
  1160. position: relative;
  1161. display: inline-block;
  1162. width: 2.5rem;
  1163. height: 1.4rem;
  1164. background: #EBEFF2;
  1165. border-radius: 1.1rem;
  1166. cursor: pointer;
  1167. &::after{
  1168. position: absolute;
  1169. left: 0.3rem;top: 0.2rem;
  1170. width: 1rem;height: 1rem;border-radius: 50%;
  1171. content: '';
  1172. background: #A3AFBB;
  1173. transition: all 0.5s;
  1174. }
  1175. &.checked{
  1176. background: #F2EEEB;
  1177. &::after{
  1178. left: 1.2rem;
  1179. background: #FC8440;
  1180. }
  1181. }
  1182. }
  1183. }
  1184. .el-loading-spinner{
  1185. height: 100%;
  1186. top: 0;
  1187. margin-top: 0;
  1188. .circular{
  1189. height: 100%;
  1190. width: inherit;
  1191. }
  1192. }
  1193. }
  1194. }
  1195. }
  1196. }
  1197. .permissions_wrap{
  1198. position: fixed;
  1199. top: 0;left: 0;right: 0;bottom: 0;
  1200. z-index: 2000;
  1201. .permissions_wrap_bg{
  1202. position: absolute;
  1203. top: 0;left: 0;width: 100%;height: 100%;
  1204. background-color:rgba(57,57,57,0.3);
  1205. }
  1206. // overflow: hidden;
  1207. .permissions_box{
  1208. position: absolute;
  1209. width: 36rem;height: calc(100% - 4.1rem);
  1210. top: 4.1rem;
  1211. // min-height: 50rem;
  1212. background: #FFFFFF;
  1213. box-shadow: 0 0 8px 0 rgba(0,0,0,0.12);
  1214. right: -36rem;
  1215. transition: all 0.5s;
  1216. &.permissions_tk_show{
  1217. right: 0rem;
  1218. }
  1219. .permissions_title{
  1220. height: 4.1rem;line-height: 4.1rem;
  1221. display: flex;
  1222. justify-content: space-between;
  1223. padding: 0 1.6rem 0 1.6rem;
  1224. .span1{
  1225. font-family: PingFang-SC-Medium;
  1226. font-size: 1.17rem;
  1227. color: #333333;
  1228. }
  1229. }
  1230. .form{
  1231. padding: 0 0.8rem 0 1.6rem;
  1232. margin-top: 1.96rem;
  1233. height: calc(100% - 11.1rem);
  1234. margin-right: 0.8rem;
  1235. .form_item{
  1236. &.open{
  1237. .form_item_title{
  1238. i{
  1239. transform: rotate(180deg);
  1240. }
  1241. }
  1242. }
  1243. .form_item_title{
  1244. display: flex;
  1245. justify-content: space-between;
  1246. align-items: center;
  1247. height:2.5rem;
  1248. background:rgba(246,248,250,1);
  1249. border-radius:0.17rem;
  1250. padding: 0 1rem;
  1251. cursor: pointer;
  1252. span{
  1253. font-size:1rem;
  1254. font-family:PingFang-SC-Medium,PingFang-SC;
  1255. font-weight:500;
  1256. color:rgba(101,112,133,1);
  1257. }
  1258. .icon-xialajiantou{
  1259. font-size: 0.6rem;
  1260. transition: all 0.5s;
  1261. color: #657085;
  1262. }
  1263. }
  1264. .form_item_main{
  1265. margin-top: 0.5rem;
  1266. padding-left: 1rem;
  1267. &.open{
  1268. .checkbox_inde{
  1269. .icon-xialajiantou{
  1270. transform: rotate(180deg);
  1271. }
  1272. }
  1273. }
  1274. .checkbox_inde{
  1275. display: flex;
  1276. align-items: center;
  1277. cursor: pointer;
  1278. .icon-xialajiantou{
  1279. margin-right: 0.5rem;
  1280. font-size: 0.6rem;
  1281. transition: all 0.5s;
  1282. color: #657085;
  1283. }
  1284. }
  1285. .el-checkbox__input{
  1286. .el-checkbox__inner{
  1287. width: 1.2rem;height: 1.2rem;
  1288. background-color: #EBEFF2;
  1289. border: none;
  1290. &::after{
  1291. border: 0.1rem solid rgba(252, 132, 64, 1);
  1292. border-left: 0;
  1293. border-top: 0;
  1294. height: 0.6rem;width: 0.25rem;
  1295. top:0.15rem;left: 0.5rem;
  1296. }
  1297. &::before{
  1298. background-color: rgba(252, 132, 64, 1);
  1299. }
  1300. }
  1301. &.is-checked .el-checkbox__inner,&.is-indeterminate .el-checkbox__inner{
  1302. background-color: #EBEFF2;
  1303. border: none;
  1304. }
  1305. }
  1306. .el-checkbox{
  1307. margin-right: 0.3rem;
  1308. }
  1309. .el-checkbox__label{
  1310. font-size:1rem;
  1311. font-family:PingFang-SC-Medium,PingFang-SC;
  1312. font-weight:500;
  1313. color:rgba(101,112,133,1);
  1314. }
  1315. .el-checkbox{
  1316. display: block;
  1317. }
  1318. .el-checkbox-group{
  1319. padding-left: 3rem;
  1320. }
  1321. }
  1322. }
  1323. }
  1324. .btn_box{
  1325. margin-top: 1rem;
  1326. width: 100%;
  1327. display: flex;
  1328. justify-content: center;
  1329. .cancel{
  1330. padding: 0 1rem;
  1331. height: 2.67rem;line-height: 2.67rem;
  1332. cursor: pointer;
  1333. font-size:1rem;
  1334. font-family:PingFang-SC-Medium,PingFang-SC;
  1335. font-weight:500;
  1336. color:rgba(101,112,133,1);
  1337. }
  1338. .btn{
  1339. width: 9rem;height: 2.67rem;line-height: 2.67rem;
  1340. margin-left: 2rem;
  1341. background:linear-gradient(134deg,rgba(252,169,64,1) 0%,rgba(252,132,64,1) 100%);
  1342. border-radius: 0.2rem;
  1343. text-align:center;
  1344. cursor: pointer;
  1345. font-size:1rem;
  1346. font-family:PingFang-SC-Medium,PingFang-SC;
  1347. font-weight:500;
  1348. color:rgba(255,255,255,1);
  1349. }
  1350. }
  1351. }
  1352. }
  1353. .account_wrap{
  1354. position: fixed;
  1355. top: 0;left: 0;right: 0;bottom: 0;
  1356. z-index: 2000;
  1357. .account_wrap_bg{
  1358. position: absolute;
  1359. top: 0;left: 0;width: 100%;height: 100%;
  1360. background-color:rgba(57,57,57,0.3);
  1361. }
  1362. // overflow: hidden;
  1363. .account_box{
  1364. position: absolute;
  1365. width: 36rem;height: calc(100% - 4.1rem);
  1366. top: 4.1rem;
  1367. background: #FFFFFF;
  1368. box-shadow: 0 0 8px 0 rgba(0,0,0,0.12);
  1369. right: -36rem;
  1370. transition: all 0.5s;
  1371. &.account_tk_show{
  1372. right: 0rem;
  1373. }
  1374. .account_title{
  1375. height: 4.1rem;line-height: 4.1rem;
  1376. display: flex;
  1377. justify-content: space-between;
  1378. padding: 0 1.6rem 0 1.6rem;
  1379. .span1{
  1380. font-family: PingFang-SC-Medium;
  1381. font-size: 1.17rem;
  1382. color: #333333;
  1383. }
  1384. }
  1385. .form_box{
  1386. height: calc(100% - 9.1rem);
  1387. }
  1388. .form{
  1389. margin: 0 1.6rem 0 1.6rem;
  1390. &.form1{
  1391. border-bottom: 0.1rem dotted #C6CDD5;
  1392. padding-bottom: 1rem;
  1393. margin-bottom: 1.5rem;
  1394. }
  1395. .form_item{
  1396. display: flex;
  1397. justify-content: space-between;
  1398. align-items: center;
  1399. margin-bottom: 0.8rem;
  1400. padding: 0 0.8rem 0;
  1401. height:2.5rem;line-height: 2.5rem;
  1402. background:rgba(246,248,250,1);
  1403. border-radius:0.17rem;
  1404. .laber{
  1405. font-family: PingFang-SC-Medium;
  1406. font-size: 1rem;
  1407. color: #333333;
  1408. }
  1409. .el-dropdown{
  1410. cursor: pointer;
  1411. i{
  1412. margin-left: 1.67rem;
  1413. }
  1414. }
  1415. .el-input{
  1416. width: calc(100% - 8rem);
  1417. .el-input__inner{
  1418. height:2.5rem;line-height: 2.5rem;
  1419. font-family: PingFang-SC-Medium;
  1420. font-size: 1rem;
  1421. color: #657085;
  1422. text-align: right;
  1423. background: initial;
  1424. border: none;
  1425. }
  1426. }
  1427. .text{
  1428. margin-right: 15px;
  1429. }
  1430. }
  1431. }
  1432. .form_ul{
  1433. padding: 0 0.8rem 0 1.6rem;
  1434. margin-top: 1.96rem;
  1435. height: calc(100% - 11.1rem);
  1436. margin-right: 0.8rem;
  1437. .form_item{
  1438. &.open{
  1439. .form_item_title{
  1440. i{
  1441. transform: rotate(180deg);
  1442. }
  1443. }
  1444. }
  1445. .form_item_title{
  1446. display: flex;
  1447. justify-content: space-between;
  1448. align-items: center;
  1449. height:2.5rem;
  1450. background:rgba(246,248,250,1);
  1451. border-radius:0.17rem;
  1452. padding: 0 1rem;
  1453. cursor: pointer;
  1454. span{
  1455. font-size:1rem;
  1456. font-family:PingFang-SC-Medium,PingFang-SC;
  1457. font-weight:500;
  1458. color:rgba(101,112,133,1);
  1459. }
  1460. .icon-xialajiantou{
  1461. font-size: 0.6rem;
  1462. transition: all 0.5s;
  1463. color: #657085;
  1464. }
  1465. }
  1466. .form_item_main{
  1467. margin-top: 0.5rem;
  1468. padding-left: 1rem;
  1469. &.open{
  1470. .checkbox_inde{
  1471. .icon-xialajiantou{
  1472. transform: rotate(180deg);
  1473. }
  1474. }
  1475. }
  1476. .checkbox_inde{
  1477. display: flex;
  1478. align-items: center;
  1479. cursor: pointer;
  1480. .icon-xialajiantou{
  1481. margin-right: 0.5rem;
  1482. font-size: 0.6rem;
  1483. transition: all 0.5s;
  1484. color: #657085;
  1485. }
  1486. }
  1487. .el-checkbox__input{
  1488. .el-checkbox__inner{
  1489. width: 1.2rem;height: 1.2rem;
  1490. background-color: #EBEFF2;
  1491. border: none;
  1492. &::after{
  1493. border: 0.1rem solid rgba(252, 132, 64, 1);
  1494. border-left: 0;
  1495. border-top: 0;
  1496. height: 0.6rem;width: 0.25rem;
  1497. top:0.15rem;left: 0.5rem;
  1498. }
  1499. &::before{
  1500. background-color: rgba(252, 132, 64, 1);
  1501. }
  1502. }
  1503. &.is-checked .el-checkbox__inner,&.is-indeterminate .el-checkbox__inner{
  1504. background-color: #EBEFF2;
  1505. border: none;
  1506. }
  1507. }
  1508. .el-checkbox{
  1509. margin-right: 0.3rem;
  1510. }
  1511. .el-checkbox__label{
  1512. font-size:1rem;
  1513. font-family:PingFang-SC-Medium,PingFang-SC;
  1514. font-weight:500;
  1515. color:rgba(101,112,133,1);
  1516. }
  1517. .el-checkbox{
  1518. display: block;
  1519. }
  1520. .el-checkbox-group{
  1521. padding-left: 3rem;
  1522. }
  1523. }
  1524. }
  1525. }
  1526. .btn_box{
  1527. position: absolute;
  1528. width: 100%;
  1529. bottom: 1.67rem;
  1530. display: flex;
  1531. justify-content: center;
  1532. .cancel{
  1533. padding: 0 1rem;
  1534. height: 2.67rem;line-height: 2.67rem;
  1535. cursor: pointer;
  1536. font-size:1rem;
  1537. font-family:PingFang-SC-Medium,PingFang-SC;
  1538. font-weight:500;
  1539. color:rgba(101,112,133,1);
  1540. }
  1541. .btn{
  1542. width: 9rem;height: 2.67rem;line-height: 2.67rem;
  1543. margin-left: 2rem;
  1544. background:linear-gradient(134deg,rgba(252,169,64,1) 0%,rgba(252,132,64,1) 100%);
  1545. border-radius: 0.2rem;
  1546. text-align:center;
  1547. cursor: pointer;
  1548. font-size:1rem;
  1549. font-family:PingFang-SC-Medium,PingFang-SC;
  1550. font-weight:500;
  1551. color:rgba(255,255,255,1);
  1552. }
  1553. }
  1554. }
  1555. }
  1556. }
  1557. </style>