userManagement.vue 68 KB

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