userManagement.vue 66 KB

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