account_manager.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690
  1. <template>
  2. <div>
  3. <div>
  4. <el-tabs v-model="activeName" @tab-click="handleClick">
  5. <el-tab-pane label="客户总览" name="manage">
  6. <el-form :inline="true" :model="filterForm" class="filter-form" label-width="110px" :label-position="labelPosition">
  7. <el-tag>客户总数:共 <b>{{total}}</b> 个需求方客户</el-tag>
  8. <el-row>
  9. <el-form-item label="客户来源">
  10. <el-radio-group v-model="filterForm.source" size="mini">
  11. <el-radio-button :label="0">全部</el-radio-button>
  12. <el-radio-button v-for="itm in counter.source" :label="itm.id" :key="itm.id">{{itm.name}}({{itm.counter}})</el-radio-button>
  13. </el-radio-group>
  14. </el-form-item>
  15. </el-row>
  16. <el-row>
  17. <el-form-item label="是否发布过项目">
  18. <el-radio-group v-model="filterForm.is_publish" size="mini">
  19. <el-radio-button :label="0">全部</el-radio-button>
  20. <el-radio-button :label="4">发布过({{counter.published}})</el-radio-button>
  21. <el-radio-button :label="5">未发布过({{counter.unpublished}})</el-radio-button>
  22. </el-radio-group>
  23. </el-form-item>
  24. </el-row>
  25. <el-row>
  26. <el-form-item label="客户类别">
  27. <el-radio-group v-model="filterForm.type" size="mini">
  28. <el-radio-button :label="0">全部</el-radio-button>
  29. <el-radio-button :label="1">企业客户({{counter.company}})</el-radio-button>
  30. <el-radio-button :label="2">个人客户({{counter.personal}})</el-radio-button>
  31. </el-radio-group>
  32. </el-form-item>
  33. </el-row>
  34. <el-row>
  35. <el-form-item label="注册时间">
  36. <el-date-picker
  37. size="small"
  38. style="width: 360px;"
  39. v-model="timeRange"
  40. type="daterange"
  41. align="left"
  42. unlink-panels
  43. range-separator="到"
  44. start-placeholder="开始日期"
  45. end-placeholder="结束日期"
  46. value-format="yyyy-MM-dd"
  47. :picker-options="pickerOptions"
  48. ></el-date-picker>
  49. </el-form-item>
  50. </el-row>
  51. <el-row>
  52. <el-form-item label="客户经理">
  53. <el-radio-group v-model="filterForm.manager" size="mini">
  54. <el-radio-button :label="0">全部</el-radio-button>
  55. <el-radio-button v-for="itm in managerList" :label="itm.uid" :key="itm.uid">{{itm.nickname}}({{itm.counter}})</el-radio-button>
  56. </el-radio-group>
  57. </el-form-item>
  58. <el-form-item>
  59. <el-button type="primary" @click="searchManage()" size="small">查询</el-button>
  60. </el-form-item>
  61. <el-form-item style="float: right;margin-right: 20px;">
  62. <el-button @click="exportList" type="primary" size="small">导出报表</el-button>
  63. </el-form-item>
  64. </el-row>
  65. </el-form>
  66. <el-table :data="manageData" border >
  67. <el-table-column label="用户">
  68. <template slot-scope="scope">
  69. <span class="lblue point">
  70. <a target="_blank" :href="scope.row.host+'/rooter/user/'+scope.row.uid">{{scope.row.nickname}}</a>
  71. </span>
  72. </template>
  73. </el-table-column>
  74. <el-table-column prop="user_from" label="来源"></el-table-column>
  75. <el-table-column prop="company_name" label="企业信息"></el-table-column>
  76. <el-table-column prop="customer_type" label="客户类别"></el-table-column>
  77. <el-table-column label="企业背景">
  78. <template slot-scope="scope">
  79. <span class="lblue point" v-if="scope.row.customer_id">
  80. <a target="_blank" :href="'https://www.tianyancha.com/search?key='+scope.row.customer_name">{{scope.row.customer_name}}</a>
  81. </span>
  82. <span v-else>--</span>
  83. </template>
  84. </el-table-column>
  85. <el-table-column label="地区">
  86. <template slot-scope="scope">
  87. <span>{{scope.row.province}}</span>
  88. <span>{{scope.row.city}}</span>
  89. </template>
  90. </el-table-column>
  91. <el-table-column prop="mobile" label="联系方式">
  92. <template slot-scope="scope">
  93. <span>手机:{{scope.row.mobile}}</span>
  94. <br>
  95. <span>微信:{{scope.row.weixin}}</span>
  96. </template>
  97. </el-table-column>
  98. <el-table-column prop="logintime" label="注册时间"></el-table-column>
  99. <el-table-column prop="count_total" label="发布项目数"></el-table-column>
  100. <el-table-column prop="outcome" label="总托管费用"></el-table-column>
  101. <el-table-column prop="obj_id" label="客户经理">
  102. <template slot-scope="scope">
  103. <span class="lblue point">
  104. <a target="_blank" :href="scope.row.host+'/rooter/user/'+scope.row.manager_id">{{scope.row.manager_nickname}}</a>
  105. </span>
  106. </template>
  107. </el-table-column>
  108. <el-table-column label="备注">
  109. <template slot-scope="scope">
  110. <div>{{ scope.row.remark_text }}</div>
  111. <el-button type="text" @click="onToList(scope.row.uid, 6)">查看备注({{ scope.row.remark_num }})</el-button>
  112. </template>
  113. </el-table-column>
  114. <el-table-column label="操作">
  115. <template slot-scope="scope">
  116. <el-button type="text" @click="onRemark(scope.row.uid, 6)">添加备注</el-button>
  117. </template>
  118. </el-table-column>
  119. </el-table>
  120. </el-tab-pane>
  121. <el-tab-pane label="客户经理评级" name="grade">
  122. <el-table :data="gradeData" border style="width: 100%">
  123. <el-table-column
  124. prop=""
  125. label="评价者">
  126. <template slot-scope="scope">
  127. <span class="lblue point">
  128. <a target="_blank" :href="scope.row.host+'/rooter/user/'+scope.row.user_id">{{
  129. scope.row.user_id_name + '(' + scope.row.user_id + ')'
  130. }}</a>
  131. </span>
  132. </template>
  133. </el-table-column>
  134. <el-table-column
  135. prop=""
  136. label="被评价者">
  137. <template slot-scope="scope">
  138. <span class="lblue point">
  139. <a target="_blank" :href="scope.row.host+'/rooter/user/'+scope.row.manager_uid">{{
  140. scope.row.manager_uid_name + '(' + scope.row.manager_uid + ')'
  141. }}</a>
  142. </span>
  143. </template>
  144. </el-table-column>
  145. <el-table-column
  146. prop=""
  147. label="评价等级">
  148. <template slot-scope="scope">
  149. <span class="lblue point">
  150. <el-rate :value="scope.row.grade" disabled></el-rate>
  151. </span>
  152. <span>
  153. {{ scope.row.grade_name }}
  154. </span>
  155. </template>
  156. </el-table-column>
  157. <el-table-column prop="create_time" label="评价标签">
  158. <template slot-scope="scope">
  159. <span v-for="item in scope.row.labels" style="margin-left: 5px">
  160. <el-tag size="mini" type="info">{{ item }}</el-tag>
  161. </span>
  162. </template>
  163. </el-table-column>
  164. <el-table-column prop="create_time" label="评价时间">
  165. <template slot-scope="scope">
  166. <span>{{ formatDate(scope.row.create_time, 'Y-m-d H:i') }}</span>
  167. </template>
  168. </el-table-column>
  169. </el-table>
  170. </el-tab-pane>
  171. <el-tab-pane label="更换客户经理" name="change">
  172. <el-table :data="changeData" border style="width: 100%">
  173. <el-table-column
  174. prop=""
  175. label="申请者">
  176. <template slot-scope="scope">
  177. <span class="lblue point">
  178. <a target="_blank" :href="scope.row.host+'/rooter/user/'+scope.row.apply_uid">{{
  179. scope.row.apply_uid_name + '(' + scope.row.apply_uid + ')'
  180. }}</a>
  181. </span>
  182. </template>
  183. </el-table-column>
  184. <el-table-column
  185. prop=""
  186. label="原客户经理">
  187. <template slot-scope="scope">
  188. <span class="lblue point">
  189. <a target="_blank" :href="scope.row.host+'/rooter/user/'+scope.row.before_uid"
  190. v-if="scope.row.before_uid != '0'">{{
  191. scope.row.before_uid_name + '(' + scope.row.before_uid + ')'
  192. }}</a>
  193. <a href="javascript:;" v-else>-</a>
  194. </span>
  195. </template>
  196. </el-table-column>
  197. <el-table-column
  198. prop=""
  199. label="更换后客户经理">
  200. <template slot-scope="scope">
  201. <span class="lblue point">
  202. <a target="_blank" :href="scope.row.host+'/rooter/user/'+scope.row.this_uid"
  203. v-if="scope.row.this_uid != '0'">{{
  204. scope.row.this_uid_name + '(' + scope.row.this_uid + ')'
  205. }}</a>
  206. <a href="javascript:;" v-else>-</a>
  207. </span>
  208. </template>
  209. </el-table-column>
  210. <el-table-column prop="create_time" label="申请时间">
  211. <template slot-scope="scope">
  212. <span>{{ formatDate(scope.row.create_time, 'Y-m-d H:i') }}</span>
  213. </template>
  214. </el-table-column>
  215. <el-table-column label="状态">
  216. <template slot-scope="scope">
  217. <span v-if="scope.row.status === '0'">待处理</span>
  218. <span v-else-if="scope.row.status === '1'">已处理</span>
  219. <span v-else>--</span>
  220. </template>
  221. </el-table-column>
  222. <el-table-column label="备注">
  223. <template slot-scope="scope">
  224. <div>{{ scope.row.remark_text }}</div>
  225. <el-button type="text" @click="onToList(scope.row.id, 4)">查看备注({{ scope.row.remark_num }})</el-button>
  226. </template>
  227. </el-table-column>
  228. <el-table-column label="操作">
  229. <template slot-scope="scope">
  230. <el-button type="text" @click="onRemark(scope.row.id, 4)">添加备注</el-button>
  231. <el-button type="text" v-if="scope.row.status === '0'" @click="onUpdateManager(scope.row)">立即处理
  232. </el-button>
  233. <el-button type="text" v-else disabled>已处理</el-button>
  234. </template>
  235. </el-table-column>
  236. </el-table>
  237. </el-tab-pane>
  238. <el-tab-pane label="客户经理管理" name="manager_info">
  239. <div class="mainTableTagbox">
  240. <el-tag>客户经理数: <b>{{total}}</b></el-tag>
  241. <el-tag>客户转化率: <b>{{managerInfoCounter.outcomeRate}}%</b></el-tag>
  242. <el-tag>待跟进项目数: <b>{{managerInfoCounter.pendingCount}}</b></el-tag>
  243. </div>
  244. <div style="margin-bottom:10px">
  245. <el-button type="primary" size="small" icon="el-icon-circle-plus-outline" @click="addManagerDialog = true">添加客户经理</el-button>
  246. </div>
  247. <el-table :data="managerInfo" border>
  248. <el-table-column label="用户">
  249. <template slot-scope="scope">
  250. <span class="lblue point">
  251. <a target="_blank" :href="scope.row.host+'/rooter/user/'+scope.row.uid">{{scope.row.nickname}}</a>
  252. </span>
  253. </template>
  254. </el-table-column>
  255. <el-table-column prop="total_count" label="客户总数"></el-table-column>
  256. <el-table-column prop="month_achievment" label="本月业绩"></el-table-column>
  257. <el-table-column prop="outcome_rate" label="客户转化率">
  258. <template slot-scope="scope">
  259. <span >{{scope.row.outcome_rate}}%</span>
  260. </template>
  261. </el-table-column>
  262. <el-table-column prop="pending_count" label="待跟进项目数"></el-table-column>
  263. <el-table-column prop="avg_grade" label="客户评分"></el-table-column>
  264. <el-table-column prop="status" label="当前状态">
  265. <template slot-scope="scope">
  266. <span :class="'status-' + scope.row.status">{{scope.row.status_name}}</span>
  267. </template>
  268. </el-table-column>
  269. <el-table-column prop="create_time" label="入职时间"></el-table-column>
  270. <el-table-column prop="leave_time" label="离职时间"></el-table-column>
  271. <el-table-column label="推荐人">
  272. <template slot-scope="scope">
  273. <span class="lblue point">
  274. <a target="_blank" :href="scope.row.host+'/rooter/user/'+scope.row.creater_uid">{{scope.row.creater_nickname}}</a>
  275. </span>
  276. </template>
  277. </el-table-column>
  278. <el-table-column label="操作">
  279. <template slot-scope="scope">
  280. <el-button type="text" v-if="scope.row.status != 2" @click="managerLeave(scope.row)">办理离职</el-button>
  281. </template>
  282. </el-table-column>
  283. </el-table>
  284. </el-tab-pane>
  285. </el-tabs>
  286. </div>
  287. <div class="page">
  288. <el-pagination
  289. class="order-footer"
  290. background
  291. layout="total, prev, pager, next"
  292. :page-size="20"
  293. :total="total"
  294. @current-change="handleCurrentChange"
  295. />
  296. </div>
  297. <el-dialog title="添加备注" :visible.sync="remarkModel">
  298. <div>
  299. <el-input
  300. type="textarea"
  301. :rows="5"
  302. placeholder="请输入内容"
  303. v-model="remarkData.content">
  304. </el-input>
  305. </div>
  306. <div slot="footer" class="dialog-footer">
  307. <el-button @click="remarkModel = false">取 消</el-button>
  308. <el-button type="primary" :loading="loading" @click="onRemarkSave">确 定</el-button>
  309. </div>
  310. </el-dialog>
  311. <el-dialog title="添加客户经理" :visible.sync="addManagerDialog" width="400px">
  312. <el-form :model="add_form" :label-position="labelPosition" label-width="100px">
  313. <el-form-item label="客户经理UID">
  314. <el-input v-model="add_form.uid"></el-input>
  315. </el-form-item>
  316. </el-form>
  317. <div slot="footer" class="dialog-footer">
  318. <el-button size="medium" @click="addManagerDialog = false">取消</el-button>
  319. <el-button size="medium" type="primary" @click="addManager">确定</el-button>
  320. </div>
  321. </el-dialog>
  322. <el-dialog title="办理离职" :visible.sync="managerLeaveDialog" width="400px">
  323. <el-form :model="leave_form" :label-position="labelPosition" label-width="100px">
  324. <el-form-item label="交接客户">
  325. <el-select v-model="leave_form.change_uid" placeholder="请选择交接的客户经理">
  326. <el-option v-for="(itm, idx) of managerList" :label="itm.nickname" :key="idx" :value="itm.uid"></el-option>
  327. </el-select>
  328. </el-form-item>
  329. </el-form>
  330. <div slot="footer" class="dialog-footer">
  331. <el-button size="medium" @click="managerLeaveDialog = false">取消</el-button>
  332. <el-button size="medium" type="primary" @click="managerLeaveSubmit">确定</el-button>
  333. </div>
  334. </el-dialog>
  335. </div>
  336. </template>
  337. <script>
  338. export default {
  339. name: "user_cards_list",
  340. data() {
  341. return {
  342. page: 1,
  343. total: 0,
  344. loading: false,
  345. activeName: 'manage',
  346. remarkModel: false,
  347. remarkType: 6,
  348. remarkData: {id: '0', content: ''},
  349. labelPosition: 'left',
  350. gradeData: [],
  351. changeData: [],
  352. filterForm: {
  353. source: 0,
  354. is_publish: 0,
  355. manager:0,
  356. type:0
  357. },
  358. addManagerDialog: false,
  359. add_form: {
  360. uid: '',
  361. },
  362. managerLeaveDialog: false,
  363. leave_form: {
  364. uid: '',
  365. change_uid:''
  366. },
  367. managerList: [],
  368. managerInfoCounter: {pendingCount: 0, outcomeRate:0},
  369. manageData: [],
  370. counter: [],
  371. timeRange: [],
  372. managerInfo: [],
  373. pickerOptions: {
  374. shortcuts: [
  375. {
  376. text: "全部",
  377. onClick(picker) {
  378. this.timeRange = [];
  379. picker.$emit("pick", []);
  380. }
  381. },
  382. {
  383. text: "最近7天",
  384. onClick(picker) {
  385. const end = new Date();
  386. const start = new Date();
  387. start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
  388. picker.$emit("pick", [start, end]);
  389. }
  390. },
  391. {
  392. text: "最近30天",
  393. onClick(picker) {
  394. const end = new Date();
  395. const start = new Date();
  396. start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
  397. picker.$emit("pick", [start, end]);
  398. }
  399. },
  400. {
  401. text: "本周",
  402. onClick(picker) {
  403. let week = new Date().getDay() - 1;
  404. if (week == -1) {
  405. week = 6;
  406. }
  407. const end = new Date();
  408. const start = new Date();
  409. start.setTime(start.getTime() - 3600 * 1000 * 24 * week);
  410. picker.$emit("pick", [start, end]);
  411. }
  412. },
  413. {
  414. text: "本月",
  415. onClick(picker) {
  416. let month = new Date().getMonth + 1;
  417. let year = new Date().getFullYear();
  418. let day = new Date().getDate() - 1;
  419. const end = new Date();
  420. const start = new Date();
  421. start.setTime(start.getTime() - 3600 * 1000 * 24 * day);
  422. picker.$emit("pick", [start, end]);
  423. }
  424. },
  425. {
  426. text: "本年",
  427. onClick(picker) {
  428. let month = new Date().getMonth + 1;
  429. let year = new Date().getFullYear();
  430. let day = new Date().getDate() - 1;
  431. let firstDay = new Date(year, 0, 1);
  432. let dateDiff = new Date() - firstDay;
  433. let msPerDay = 1000 * 60 * 60 * 24;
  434. //计算天数
  435. let diffDays = Math.ceil(dateDiff / msPerDay) - 1;
  436. const end = new Date();
  437. const start = new Date();
  438. start.setTime(start.getTime() - 3600 * 1000 * 24 * diffDays);
  439. picker.$emit("pick", [start, end]);
  440. }
  441. }
  442. ]
  443. },
  444. }
  445. },
  446. mounted() {
  447. this.getData();
  448. this.getManagerList();
  449. this.getCounter();
  450. },
  451. methods: {
  452. getData() {
  453. if (this.activeName === 'change') {
  454. this.getChangeList();
  455. }else if(this.activeName === 'grade') {
  456. this.getGradeList();
  457. }else if(this.activeName === 'manage') {
  458. this.getManageList();
  459. }else if(this.activeName === 'manager_info') {
  460. this.getManagerInfoList();
  461. }
  462. },
  463. handleClick(tab, event) {
  464. this.activeName = tab.name;
  465. this.getData();
  466. },
  467. async getChangeList() {
  468. const page = this.page;
  469. const data = {
  470. page
  471. };
  472. let res = await this.$post("/api/admin/accountManager/getChangeManagerList", data);
  473. if (res && res.status === 1) {
  474. this.changeData = res.data.list || [];
  475. this.total = res.data.total * 1;
  476. }
  477. },
  478. async getGradeList() {
  479. const page = this.page;
  480. const data = {
  481. page
  482. };
  483. let res = await this.$post("/api/admin/accountManager/getGradeList", data);
  484. if (res && res.status === 1) {
  485. this.gradeData = res.data.list || [];
  486. this.total = res.data.total * 1;
  487. }
  488. },
  489. async getManageList() {
  490. const page = this.page;
  491. const data = {
  492. page,
  493. source: this.filterForm.source,
  494. manager: this.filterForm.manager,
  495. is_publish: this.filterForm.is_publish,
  496. type: this.filterForm.type
  497. };
  498. if (this.timeRange != null) {
  499. data.start_time = this.timeRange[0];
  500. data.end_time = this.timeRange[1];
  501. }
  502. console.log(this.timeRange);
  503. let res = await this.$post("/api/admin/accountManager/getUserList", data);
  504. if (res && res.status === 1) {
  505. this.manageData = res.data.list || [];
  506. this.total = res.data.total * 1;
  507. }
  508. },
  509. async getManagerList() {
  510. let res = await this.$post("/api/admin/accountManager/getManagers");
  511. if (res && res.status === 1) {
  512. this.managerList = res.data;
  513. }
  514. },
  515. async getManagerInfoList() {
  516. const page = this.page;
  517. const data = {
  518. page
  519. };
  520. let res = await this.$post("/api/admin/accountManager/managerInfo", data);
  521. if (res && res.status === 1) {
  522. this.managerInfo = res.data.list || [];
  523. this.total = res.data.total * 1;
  524. this.managerInfoCounter.pendingCount = res.data.total_pending_count;
  525. this.managerInfoCounter.outcomeRate = res.data.total_outcome_rate;
  526. }
  527. },
  528. async addManager() {
  529. let res = await this.$post("/api/admin/accountManager/managerAdd", {
  530. uid: this.add_form.uid
  531. });
  532. if (res && res.status === 1) {
  533. this.getManagerInfoList();
  534. this.$message.success('添加成功')
  535. this.addManagerDialog = false;
  536. }
  537. },
  538. managerLeave(row) {
  539. this.leave_form.uid = row.uid;
  540. this.managerLeaveDialog = true;
  541. },
  542. managerLeaveSubmit() {
  543. this.$post("/api/admin/accountManager/managerLeave", this.leave_form).then(res => {
  544. if (res && res.status === 1) {
  545. this.getManagerInfoList();
  546. this.getManagerList();
  547. this.$message.success('设置成功')
  548. this.managerLeaveDialog = false;
  549. }
  550. });
  551. },
  552. searchManage() {
  553. this.page = 1;
  554. this.getManageList();
  555. },
  556. async exportList() {
  557. window.location.href = '/api/admin/accountManager/exportUserList?download=1' +
  558. '&source=' + this.filterForm.source + '&manager=' + this.filterForm.manager+ '&is_publish=' + this.filterForm.is_publish;
  559. },
  560. onRemark(id, type) {
  561. this.remarkData.id = id;
  562. this.remarkType = type;
  563. this.remarkModel = true;
  564. },
  565. onToList(id, type) {
  566. let data = {
  567. obj_id: id,
  568. type: type
  569. }
  570. this.$router.push({path: '/main/remark_list', query: data});
  571. },
  572. async onRemarkSave() {
  573. this.loading = true;
  574. if (this.remarkData.content === '' || this.remarkData.id === '0') {
  575. this.$message.error('请输入内容')
  576. this.loading = false
  577. return false
  578. }
  579. let data = {content: this.remarkData.content, id: this.remarkData.id, type:this.remarkType}
  580. let res = await this.$post("/api/admin/accountManager/saveRemark", data);
  581. if (res && res.status === 1) {
  582. this.$message.success('备注成功')
  583. this.remarkModel = false
  584. this.getData()
  585. }
  586. this.loading = false
  587. },
  588. async onUpdateManager(row) {
  589. let data = {id: row.id}
  590. let res = await this.$post("/api/admin/accountManager/updateManager", data);
  591. if (res && res.status === 1) {
  592. this.$message.success('已备注')
  593. this.getData();
  594. }
  595. },
  596. async getCounter(row) {
  597. let res = await this.$post("/api/admin/accountManager/getUserCount");
  598. if (res && res.status === 1) {
  599. this.counter = res.data;
  600. }
  601. },
  602. handleCurrentChange(val) {
  603. this.page = val;
  604. this.getData();
  605. },
  606. formatDate(time, format = '') {
  607. if (time === "0") {
  608. return "--";
  609. }
  610. let now = new Date(time * 1000);
  611. let year = now.getFullYear();
  612. let month = now.getMonth() + 1;
  613. let date = now.getDate();
  614. let hour = now.getHours();
  615. let minute = now.getMinutes();
  616. let second = now.getSeconds();
  617. if (hour < 10) {
  618. hour = "0" + hour;
  619. }
  620. if (minute < 10) {
  621. minute = "0" + minute;
  622. }
  623. if (second < 10) {
  624. second = "0" + second;
  625. }
  626. return (format == '' ?
  627. year +
  628. "-" +
  629. month +
  630. "-" +
  631. date +
  632. " " +
  633. hour +
  634. ":" +
  635. minute +
  636. ":" +
  637. second
  638. :
  639. year +
  640. "-" +
  641. month +
  642. "-" +
  643. date +
  644. " " +
  645. hour +
  646. ":" +
  647. minute
  648. );
  649. },
  650. }
  651. }
  652. </script>
  653. <style scoped>
  654. .page {
  655. margin-top: 10px;
  656. }
  657. .el-form-item{
  658. margin-bottom: 0;
  659. }
  660. .filter-form{
  661. margin-bottom: 10px;
  662. }
  663. .mainTableTagbox{
  664. margin-bottom: 15px;
  665. }
  666. .status-1 {
  667. color:#409EFF;
  668. }
  669. .status-2 {
  670. color:#909399;
  671. }
  672. </style>