PersonList.vue 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839
  1. <template>
  2. <div class="manage-root organize-manage person-list">
  3. <Header />
  4. <div class="manage-root-contain">
  5. <nav-menu class="manage-root-contain-left" :activeMenuIndex="activeMenuIndex"></nav-menu>
  6. <div class="manage-root-contain-right personnel-manage-right">
  7. <breadcrumb :breadcrumbList="breadcrumbList" class="breadcrumb-box"></breadcrumb>
  8. <div class="personal-inner" v-if="info">
  9. <div class="common-title-box">
  10. <h3>{{info.name}}<span class="total-number">共{{info.person_count_audited}}人</span></h3>
  11. <div class="btn-box">
  12. <el-button type="primary" size="small" @click="handleBatchImport">批量导入</el-button>
  13. </div>
  14. </div>
  15. <div class="tabs">
  16. <a :class="[tabsIndex===0?'active':'']" @click="handleChangeTabs(0)">人员列表</a>
  17. <a :class="[tabsIndex===1?'active':'']" @click="handleChangeTabs(1)">人员审核 {{info.person_count_wait_audit}}</a>
  18. </div>
  19. <div class="search">
  20. <div class="search-box">
  21. <div class="search-item">
  22. <label>搜索</label>
  23. <el-input
  24. placeholder="输入搜索内容"
  25. v-model="searchInput">
  26. <i slot="suffix" class="el-input__icon el-icon-search" @click="getList(1)" style="cursor: pointer;"></i>
  27. </el-input>
  28. </div>
  29. <div class="search-item">
  30. <label>权限</label>
  31. <el-select v-model="searchType" @change="getList(1)" placeholder="请选择">
  32. <el-option
  33. v-for="item in typeList"
  34. :key="item.account_type"
  35. :label="item.account_type_name"
  36. :value="item.account_type">
  37. </el-option>
  38. </el-select>
  39. </div>
  40. <div class="search-item" v-if="tabsIndex===0">
  41. <label>状态</label>
  42. <el-select v-model="searchStatus" @change="getList(1)" placeholder="请选择">
  43. <el-option
  44. v-for="item in searchStatusList"
  45. :key="item.value"
  46. :label="item.label"
  47. :value="item.value">
  48. </el-option>
  49. </el-select>
  50. </div>
  51. <div class="search-item" v-if="tabsIndex===1">
  52. <label>状态</label>
  53. <el-select v-model="searchAuditStatus" @change="getList(1)" placeholder="请选择">
  54. <el-option
  55. v-for="item in searchAuditStatusList"
  56. :key="item.value"
  57. :label="item.label"
  58. :value="item.value">
  59. </el-option>
  60. </el-select>
  61. </div>
  62. </div>
  63. <div class="search-right" v-if="tabsIndex===0">
  64. <el-button class="gray-btn" size="small" @click="handleUp('','up',multipleSelection)">开启选中用户</el-button>
  65. <el-button class="pink-btn" size="small" @click="handleUp('','down',multipleSelection)">停用选中用户</el-button>
  66. <el-button class="red-btn" size="small" @click="handleDelete('',multipleSelection)">删除选中用户</el-button>
  67. </div>
  68. <div class="search-right" v-if="tabsIndex===1">
  69. <el-button class="gray-btn" size="small" @click="handleAudit('','up',multipleSelection)">同意选中用户</el-button>
  70. <el-button class="pink-btn" size="small" @click="handleAudit('','down',multipleSelection)">拒绝选中用户</el-button>
  71. </div>
  72. </div>
  73. <template v-if="tabsIndex===0">
  74. <el-table
  75. class="search-table"
  76. :data="tableData"
  77. style="width: 100%"
  78. key="table"
  79. @sort-change="handleSort"
  80. :default-sort = dataSort
  81. :max-height="tableHeight"
  82. @selection-change="handleSelectionChange">
  83. <el-table-column
  84. type="selection"
  85. width="40"
  86. fixed>
  87. </el-table-column>
  88. <el-table-column
  89. prop="user_name"
  90. label="用户名"
  91. sortable="custom"
  92. min-width="132"
  93. class-name="user-info">
  94. <template slot-scope="scope">
  95. <el-image
  96. class="touxiang"
  97. :src="scope.row.image_url?scope.row.image_url:require('../../assets/avatar.png')"
  98. fit="cover" style="width:24px;height:24px;margin-right:8px">
  99. </el-image>
  100. <!-- <img class="touxiang" :src="scope.row.image_url?scope.row.image_url:require('../../assets/avatar.png')" /> -->
  101. <span class="name">{{scope.row.user_name}}</span>
  102. </template>
  103. </el-table-column>
  104. <el-table-column
  105. prop="real_name"
  106. label="真实姓名"
  107. width="103">
  108. </el-table-column>
  109. <el-table-column
  110. prop="sex_name"
  111. label="性别"
  112. width="56">
  113. </el-table-column>
  114. <el-table-column
  115. prop="type"
  116. label="权限"
  117. width="88" >
  118. <template slot-scope="scope">
  119. {{scope.row.is_manager==='true'?'管理员':'普通用户'}}
  120. </template>
  121. </el-table-column>
  122. <el-table-column
  123. prop="email"
  124. label="邮箱"
  125. sortable="custom"
  126. min-width="180">
  127. </el-table-column>
  128. <el-table-column
  129. prop="phone"
  130. label="手机号"
  131. sortable="custom"
  132. width="160">
  133. </el-table-column>
  134. <el-table-column
  135. prop="register_time"
  136. label="注册时间"
  137. sortable="custom"
  138. width="144">
  139. <template slot-scope="scope">
  140. {{scope.row.register_time?scope.row.register_time.substring(0,16):'-'}}
  141. </template>
  142. </el-table-column>
  143. <el-table-column
  144. prop="status"
  145. label="状态"
  146. width="116" >
  147. <template slot-scope="scope">
  148. <div class="status-box">
  149. <span :style="{background:statusList[scope.row.status].bg}"></span>
  150. <b :style="{color:statusList[scope.row.status].color}">{{statusList[scope.row.status].text}}</b>
  151. </div>
  152. </template>
  153. </el-table-column>
  154. <el-table-column
  155. fixed="right"
  156. label="操作"
  157. width="140">
  158. <template slot-scope="scope">
  159. <el-button
  160. @click.native.prevent="handleEdit(scope.row)"
  161. type="text"
  162. size="small"
  163. class="primary-btn">
  164. 编辑
  165. </el-button>
  166. <el-button
  167. @click.native.prevent="handleUp(scope.row, 'up')"
  168. type="text"
  169. size="small"
  170. class="primary-btn"
  171. v-if="scope.row.status===0">
  172. 开启
  173. </el-button>
  174. <el-button
  175. @click.native.prevent="handleUp(scope.row, 'down')"
  176. type="text"
  177. size="small"
  178. class="red-btn"
  179. v-else-if="scope.row.status===1">
  180. 停用
  181. </el-button>
  182. <el-button
  183. @click.native.prevent="handleDelete(scope.row)"
  184. type="text"
  185. size="small"
  186. class="red-btn"
  187. v-if="scope.row.status===0">
  188. 删除
  189. </el-button>
  190. </template>
  191. </el-table-column>
  192. </el-table>
  193. <el-pagination
  194. key="pagination"
  195. background
  196. @size-change="(val)=>handleSizeChange(val,'pageSize','pageNumber')"
  197. @current-change="(val)=>handleCurrentChange(val,'pageNumber')"
  198. :current-page="pageNumber"
  199. :page-sizes="[10, 20, 30, 40]"
  200. :page-size="pageSize"
  201. layout="total, prev, pager, next, sizes, jumper"
  202. :total="total_count">
  203. </el-pagination>
  204. </template>
  205. <template v-if="tabsIndex===1">
  206. <el-table
  207. class="search-table"
  208. :data="tableData"
  209. style="width: 100%"
  210. :max-height="tableHeight"
  211. key="auditTable"
  212. @sort-change="handleSort"
  213. :default-sort = dataSorts
  214. @selection-change="handleSelectionChange">
  215. <el-table-column
  216. type="selection"
  217. width="40"
  218. fixed>
  219. </el-table-column>
  220. <el-table-column
  221. prop="user_name"
  222. label="用户名"
  223. sortable="custom"
  224. min-width="132"
  225. class-name="user-info">
  226. <template slot-scope="scope">
  227. <el-image
  228. class="touxiang"
  229. :src="scope.row.image_url?scope.row.image_url:require('../../assets/avatar.png')"
  230. fit="cover" style="width:24px;height:24px;margin-right:8px">
  231. </el-image>
  232. <!-- <img class="touxiang" :src="scope.row.image_url?scope.row.image_url:require('../../assets/avatar.png')" /> -->
  233. <span class="name">{{scope.row.user_name}}</span>
  234. </template>
  235. </el-table-column>
  236. <el-table-column
  237. prop="real_name"
  238. label="真实姓名"
  239. width="103">
  240. </el-table-column>
  241. <el-table-column
  242. prop="sex_name"
  243. label="性别"
  244. width="56">
  245. </el-table-column>
  246. <el-table-column
  247. prop="email"
  248. label="邮箱"
  249. sortable="custom"
  250. min-width="180">
  251. </el-table-column>
  252. <el-table-column
  253. prop="phone"
  254. label="手机号"
  255. sortable="custom"
  256. width="160">
  257. </el-table-column>
  258. <el-table-column
  259. prop="apply_time"
  260. label="申请时间"
  261. sortable="custom"
  262. width="144">
  263. <template slot-scope="scope">
  264. {{scope.row.apply_time?scope.row.apply_time.substring(0,16):'-'}}
  265. </template>
  266. </el-table-column>
  267. <el-table-column
  268. prop="audit_time"
  269. label="审核时间"
  270. sortable="custom"
  271. width="144">
  272. <template slot-scope="scope">
  273. {{scope.row.audit_time?scope.row.audit_time.substring(0,16):'-'}}
  274. </template>
  275. </el-table-column>
  276. <el-table-column
  277. prop="status"
  278. label="状态"
  279. width="116" >
  280. <template slot-scope="scope">
  281. <div class="status-box" v-if="auditStatusList[scope.row.audit_status]">
  282. <span :style="{background:auditStatusList[scope.row.audit_status].bg}"></span>
  283. <b :style="{color:auditStatusList[scope.row.audit_status].color}">{{auditStatusList[scope.row.audit_status].text}}</b>
  284. </div>
  285. </template>
  286. </el-table-column>
  287. <el-table-column
  288. fixed="right"
  289. label="操作"
  290. width="140">
  291. <template slot-scope="scope">
  292. <el-button
  293. @click.native.prevent="handleLook(scope.row)"
  294. type="text"
  295. size="small"
  296. class="primary-btn">
  297. 查看
  298. </el-button>
  299. <el-button
  300. @click.native.prevent="handleAudit(scope.row,'up')"
  301. type="text"
  302. size="small"
  303. class="primary-btn">
  304. 同意
  305. </el-button>
  306. <el-button
  307. @click.native.prevent="handleAudit(scope.row,'down')"
  308. type="text"
  309. size="small"
  310. class="red-btn"
  311. v-if="scope.row.audit_status===0">
  312. 拒绝
  313. </el-button>
  314. </template>
  315. </el-table-column>
  316. </el-table>
  317. <el-pagination
  318. background
  319. key="auditpagination"
  320. @size-change="(val)=>handleSizeChange(val,'pageSizes','pageNumbers')"
  321. @current-change="(val)=>handleCurrentChange(val,'pageNumbers')"
  322. :current-page="pageNumbers"
  323. :page-sizes="[10, 20, 30, 40]"
  324. :page-size="pageSizes"
  325. layout="total, prev, pager, next, sizes, jumper"
  326. :total="total_count">
  327. </el-pagination>
  328. </template>
  329. </div>
  330. </div>
  331. </div>
  332. <el-dialog
  333. :visible.sync="importFlag"
  334. :show-close="false"
  335. :close-on-click-modal="false"
  336. :modal-append-to-body="false"
  337. width="398px"
  338. class="login-dialog person-dialog"
  339. v-if="importFlag">
  340. <batch-import @closeDialog="closeDialog" :exportUrl="exportUrl"></batch-import>
  341. </el-dialog>
  342. </div>
  343. </template>
  344. <script>
  345. //这里可以导入其它文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
  346. //例如:import 《组件名称》from ‘《组件路径》';
  347. import Header from "../../components/Header.vue";
  348. import NavMenu from "../../components/NavMenu.vue"
  349. import Breadcrumb from '../../components/Breadcrumb.vue';
  350. import BatchImport from './BatchImport.vue'
  351. import { getLogin } from "@/api/ajax";
  352. export default {
  353. //import引入的组件需要注入到对象中才能使用
  354. components: { Header, NavMenu, Breadcrumb, BatchImport },
  355. props: {},
  356. data() {
  357. //这里存放数据
  358. return {
  359. activeMenuIndex: "organize_manage",
  360. breadcrumbList:[
  361. {
  362. icon:'school-line',
  363. url:'',
  364. text:''
  365. },
  366. {
  367. icon:'',
  368. url:'',
  369. text:'机构管理'
  370. }
  371. ],
  372. searchInput: '',
  373. searchType: -1,
  374. searchStatus: -1,
  375. searchAuditStatus: -1,
  376. typeList:[
  377. {
  378. account_type:-1,
  379. account_type_name:'全部'
  380. },
  381. {
  382. account_type:1,
  383. account_type_name:'管理员'
  384. },
  385. {
  386. account_type:0,
  387. account_type_name:'普通用户'
  388. }
  389. ],
  390. searchAuditStatusList:[
  391. {
  392. value:-1,
  393. label:'全部'
  394. },
  395. {
  396. value:0,
  397. label:'待审核'
  398. },
  399. {
  400. value:2,
  401. label:'已拒绝'
  402. }
  403. ], // 审核状态列表
  404. searchStatusList:[
  405. {
  406. value:-1,
  407. label:'全部'
  408. },
  409. {
  410. value:1,
  411. label:'正常'
  412. },
  413. {
  414. value:0,
  415. label:'停用'
  416. }
  417. ],
  418. statusList:{
  419. 1:{
  420. text:'正常',
  421. bg:'#165DFF',
  422. color:''
  423. },
  424. 0:{
  425. text:'停用',
  426. bg:'#F53F3F',
  427. color:'#F53F3F'
  428. }
  429. },
  430. auditStatusList:{
  431. 0:{
  432. text:'待审核',
  433. bg:'#165DFF',
  434. color:''
  435. },
  436. 2:{
  437. text:'已拒绝',
  438. bg:'#F53F3F',
  439. color:'#F53F3F'
  440. }
  441. },
  442. tableData:[],
  443. pageSize: window.localStorage.getItem('pageSizec')?Number(window.localStorage.getItem('pageSize-people')):10,
  444. pageNumber: window.localStorage.getItem('pageNumber-people')?Number(window.localStorage.getItem('pageNumber-people')):1,
  445. tableHeight: "", // 表格高度
  446. orgName:'', // 机构名称
  447. id:this.$route.query.id?this.$route.query.id:'',
  448. multipleSelection:[],
  449. tabsIndex:0,
  450. pageSizes: window.localStorage.getItem('pageSize-check')?Number(window.localStorage.getItem('pageSize-check')):10,
  451. pageNumbers: window.localStorage.getItem('pageNumber-check')?Number(window.localStorage.getItem('pageNumber-check')):1,
  452. importFlag: false, // 批量导入flag
  453. info: null,
  454. total_count: 0,
  455. dataSort: {},
  456. dataSorts: {},
  457. exportUrl: '', // 下载模板链接
  458. }
  459. },
  460. //计算属性 类似于data概念
  461. computed: {
  462. },
  463. //监控data中数据变化
  464. watch: {},
  465. //方法集合
  466. methods: {
  467. handleSort(value){
  468. let dataSort = {
  469. prop: value.prop,
  470. order: value.order
  471. }
  472. if(this.tabsIndex===0){
  473. this.dataSort = dataSort
  474. }else{
  475. this.dataSorts = dataSort
  476. }
  477. this.getList()
  478. },
  479. // 查询列表
  480. getList(page){
  481. if(page){
  482. this.pageNumber = page
  483. }
  484. let MethodName = "/OrgServer/Manager/PageQuery/PageQueryPersonList";
  485. let order_column_list = []
  486. if(this.tabsIndex===0){
  487. if(this.dataSort != {}){
  488. if(this.dataSort.order=='descending'){
  489. order_column_list = [this.dataSort.prop + ':desc']
  490. }else if(this.dataSort.order=='ascending'){
  491. // 升序不传值
  492. order_column_list = [this.dataSort.prop]
  493. }else{
  494. order_column_list = ['register_time:desc']
  495. }
  496. }else{
  497. order_column_list = ['register_time:desc']
  498. }
  499. }else{
  500. if(this.dataSorts != {}){
  501. if(this.dataSort.order=='descending'){
  502. order_column_list = [this.dataSorts.prop + ':desc']
  503. }else if(this.dataSort.order=='ascending'){
  504. // 升序不传值
  505. order_column_list = [this.dataSorts.prop]
  506. }else{
  507. order_column_list = ['apply_time:desc']
  508. }
  509. }else{
  510. order_column_list = ['apply_time:desc']
  511. }
  512. }
  513. let data = {
  514. org_id: this.id,
  515. search_content:this.searchInput.trim(),
  516. role_type:this.searchType,
  517. status:this.tabsIndex===0?this.searchStatus:-1,
  518. audit_status:this.tabsIndex===1?this.searchAuditStatus:-1,
  519. page_capacity:this.tabsIndex===0?this.pageSize:this.pageSizes,
  520. cur_page:this.tabsIndex===0?this.pageNumber:this.pageNumbers,
  521. list_type: this.tabsIndex*1,
  522. order_column_list: order_column_list
  523. }
  524. getLogin(MethodName, data)
  525. .then((res) => {
  526. if(res.status===1){
  527. this.tableData = res.person_list
  528. this.total_count = res.total_count
  529. }
  530. })
  531. .catch(() => {
  532. this.loading = false
  533. });
  534. },
  535. // 创建机构或者编辑信息
  536. handleEdit(row){
  537. // 根据登录用户判断当前用户是不是超管 在table里加上disabled
  538. // 点击时记录页码和每页条数
  539. window.localStorage.setItem('pageSize-people',this.pageSize)
  540. window.localStorage.setItem('pageNumber-people',this.pageNumber)
  541. this.$router.push({
  542. path: "/editOrgPerson",
  543. query: {
  544. id: row?row.id:''
  545. },
  546. });
  547. },
  548. // 人员管理
  549. handleLook(row){
  550. window.localStorage.setItem('pageSize-check',this.pageSizes)
  551. window.localStorage.setItem('pageNumber-check',this.pageNumbers)
  552. this.$router.push({
  553. path: "/editOrgPerson",
  554. query: {
  555. id: row?row.id:'',
  556. page: 'personCheck'
  557. },
  558. });
  559. },
  560. // 停用 启用
  561. handleUp(row,type,arr) {
  562. if(!row&&arr.length===0){
  563. return false
  564. }
  565. let Mname = "/OrgServer/Manager/PersonManager/EnablePerson";
  566. let data = {
  567. id_list: arr?arr:[row.id]
  568. };
  569. if (type==='up') {
  570. // 下架状态
  571. data.is_enable = "true";
  572. } else if (type==='down') {
  573. data.is_enable = "false";
  574. }
  575. getLogin(Mname, data).then(res => {
  576. this.$message.success("操作成功");
  577. this.getList()
  578. });
  579. },
  580. // 通过 拒绝
  581. handleAudit(row,type,arr) {
  582. if(!row&&arr.length===0){
  583. return false
  584. }
  585. let Mname = "/OrgServer/Manager/PersonManager/AuditPerson";
  586. let data = {
  587. id_list: arr?arr:[row.id]
  588. };
  589. if (type==='up') {
  590. // 下架状态
  591. data.is_pass = "true";
  592. } else if (type==='down') {
  593. data.is_pass = "false";
  594. }
  595. getLogin(Mname, data).then(res => {
  596. this.$message.success("操作成功");
  597. this.getList()
  598. });
  599. },
  600. handleSizeChange(val,type,page) {
  601. this[type] = val
  602. this[page] = 1
  603. this.getList()
  604. },
  605. handleCurrentChange(val,type) {
  606. this[type] = val
  607. this.getList()
  608. },
  609. //计算table高度(动态设置table高度)
  610. getTableHeight() {
  611. let tableH = 434; //距离页面下方的高度
  612. let tableHeightDetil = window.innerHeight - tableH;
  613. if (tableHeightDetil <= 300) {
  614. this.tableHeight = 300;
  615. } else {
  616. this.tableHeight = window.innerHeight - tableH;
  617. }
  618. },
  619. // 删除
  620. handleDelete(row,arr){
  621. this.$confirm('确定删除吗?', '提示', {
  622. confirmButtonText: '确定',
  623. cancelButtonText: '取消',
  624. type: 'warning'
  625. }).then(() => {
  626. if(!row&&arr.length===0){
  627. return false
  628. }
  629. let Mname = "/OrgServer/Manager/PersonManager/BatchDeleteOrgPerson";
  630. let data = {
  631. org_id: this.id,
  632. person_id_list: arr?arr:[row.id]
  633. };
  634. getLogin(Mname, data).then(res => {
  635. this.$message.success("删除成功");
  636. this.getList()
  637. });
  638. }).catch(() => {
  639. });
  640. },
  641. // 复选框
  642. handleSelectionChange(val) {
  643. this.multipleSelection = []
  644. val.forEach(item => {
  645. this.multipleSelection.push(item.id)
  646. });
  647. },
  648. handleChangeTabs(value){
  649. this.tabsIndex = value
  650. // this.pageNumber = 1
  651. this.getList()
  652. },
  653. // 批量导入
  654. handleBatchImport(){
  655. this.importFlag = true
  656. },
  657. // 关闭批量导入
  658. closeDialog(){
  659. this.importFlag = false
  660. this.getList()
  661. this.getInfo()
  662. },
  663. // 获取机构信息
  664. getInfo(){
  665. let MethodName = "/OrgServer/Manager/OrgManager/GetOrgTitleInfo";
  666. let data = {
  667. id: this.id,
  668. }
  669. getLogin(MethodName, data)
  670. .then((res) => {
  671. if(res.status===1){
  672. this.info = res
  673. let obj = {
  674. icon:'',
  675. url:'',
  676. text:res.name
  677. }
  678. this.breadcrumbList=[
  679. {
  680. icon:'school-line',
  681. url:'',
  682. text:''
  683. },
  684. {
  685. icon:'',
  686. url:'',
  687. text:'机构管理'
  688. }
  689. ]
  690. this.breadcrumbList.push(obj)
  691. }
  692. })
  693. .catch(() => {
  694. });
  695. getLogin('/OrgServer/Manager/SysConfigManager/GetSysConfig_DataImport', {})
  696. .then((res) => {
  697. if(res.status===1){
  698. this.exportUrl = res.person_data_import_template_file_url
  699. }
  700. }).catch((res) =>{
  701. })
  702. },
  703. },
  704. //生命周期 - 创建完成(可以访问当前this实例)
  705. created() {
  706. this.getList()
  707. this.getTableHeight();
  708. if(this.id){
  709. this.getInfo()
  710. }
  711. },
  712. //生命周期 - 挂载完成(可以访问DOM元素)
  713. mounted() {
  714. },
  715. //生命周期-创建之前
  716. beforeCreated() { },
  717. //生命周期-挂载之前
  718. beforeMount() { },
  719. //生命周期-更新之前
  720. beforUpdate() { },
  721. //生命周期-更新之后
  722. updated() { },
  723. //生命周期-销毁之前
  724. beforeDestory() { },
  725. //生命周期-销毁完成
  726. destoryed() { },
  727. //如果页面有keep-alive缓存功能,这个函数会触发
  728. activated() { }
  729. }
  730. </script>
  731. <style lang="scss" scoped>
  732. /* @import url(); 引入css类 */
  733. .total-number{
  734. color: #86909C;
  735. font-weight: 400;
  736. font-size: 14px;
  737. line-height: 22px;
  738. margin-left: 4px;
  739. }
  740. .tabs{
  741. display: flex;
  742. padding: 16px 0;
  743. a{
  744. font-size: 14px;
  745. line-height: 22px;
  746. color: #4E5969;
  747. border-radius: 100px;
  748. padding: 5px 16px;
  749. margin-right: 12px;
  750. &:hover{
  751. background: #F2F3F5;
  752. }
  753. &.active{
  754. background: #F2F3F5;
  755. font-weight: 500;
  756. color: #165DFF;
  757. }
  758. }
  759. }
  760. .search{
  761. display: flex;
  762. justify-content: space-between;
  763. align-items: flex-end;
  764. }
  765. .search-box{
  766. padding-top: 0;
  767. }
  768. .search-right{
  769. height: 34px;
  770. button{
  771. font-size: 14px;
  772. }
  773. .pink-btn{
  774. background: #FFECE8;
  775. color: #F53F3F;
  776. border-color: #FFECE8;
  777. &:hover{
  778. background: #fde0da;
  779. border-color: #fde0da;
  780. }
  781. &:focus{
  782. background: #f8cfc6;
  783. border-color: #f8cfc6;
  784. }
  785. }
  786. .red-btn{
  787. background: #F53F3F;
  788. color: #fff;
  789. border-color: #F53F3F;
  790. &:hover{
  791. background: #ed3b3b;
  792. }
  793. &:focus{
  794. background: #ec1111;
  795. }
  796. }
  797. }
  798. </style>
  799. <style lang="scss">
  800. .organize-manage{
  801. .el-cascader{
  802. width: 160px;
  803. height: 32px;
  804. line-height: 32px;
  805. .el-input{
  806. width: 100%;
  807. height: 32px;
  808. }
  809. }
  810. }
  811. .person-dialog{
  812. .el-dialog{
  813. border-radius: 8px;
  814. }
  815. }
  816. .person-list{
  817. .user-info{
  818. .cell{
  819. display: flex;
  820. align-items: center;
  821. .touxiang{
  822. width: 24px;
  823. height: 24px;
  824. border-radius: 50%;
  825. margin-right: 8px;
  826. }
  827. }
  828. }
  829. }
  830. </style>