金币系统前端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

840 lines
22 KiB

1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
3 weeks ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
3 weeks ago
1 month ago
1 month ago
1 month ago
  1. <script setup>
  2. import { ref, onMounted, reactive, computed } from 'vue'
  3. import ElementPlus from 'element-plus'
  4. import { ElMessage, ElMessageBox } from 'element-plus'
  5. import axios from 'axios'
  6. import moment from 'moment'
  7. import { ta } from 'element-plus/es/locales.mjs'
  8. import API from '@/util/http'
  9. import { writeFile, utils } from 'xlsx'
  10. // 变量
  11. //这是获取用户信息的接口
  12. const adminData = ref({})
  13. const getAdminData = async function () {
  14. try {
  15. const result = await API({
  16. url: '/admin/userinfo',
  17. method: 'post',
  18. data: {}
  19. })
  20. adminData.value = result
  21. console.log('请求成功', result)
  22. console.log('用户信息', adminData.value)
  23. } catch (error) {
  24. console.log('请求失败', error)
  25. }
  26. }
  27. // 充值明细表格
  28. const tableData = ref([])
  29. // 计算用户各金币总数的不分页对象
  30. // const tableAllData = ref([]);
  31. // 各金币总数
  32. const rechargeCoin = ref(0)
  33. const freeCoin = ref(0)
  34. const taskCoin = ref(0)
  35. // 搜索===========================================
  36. //分页总条目
  37. const total = ref(100)
  38. // 搜索对象时间
  39. const getTime = ref([])
  40. // 搜索detailY
  41. const detailY = ref({})
  42. // 不分页的搜索对象
  43. const getAllObj = ref({})
  44. // 搜索对象
  45. const getObj = ref({
  46. pageNum: 1,
  47. pageSize: 50
  48. })
  49. //开启条件筛选导出excel
  50. const getPutEX = ref(false)
  51. // 支付方式选项
  52. const num = [
  53. {
  54. value: '1',
  55. label: '增加'
  56. },
  57. {
  58. value: '2',
  59. label: '减少'
  60. }
  61. ]
  62. // //表格高度
  63. // const tableHeight = computed(function () {
  64. // return (getObj.value.pageSize + 2) * 38 + "px";
  65. // });
  66. // 方法
  67. // 搜索===========================================================================
  68. // 搜索方法
  69. const get = async function (val) {
  70. try {
  71. // 地区赋值
  72. if (adminData.value.area === '泰国') {
  73. detailY.value.areas = ['泰国', '越南']
  74. } else if (adminData.value.area !== '总部') {
  75. detailY.value.area = adminData.value.area
  76. }
  77. // 搜索参数页码赋值
  78. if (typeof val === 'number') {
  79. getObj.value.pageNum = val
  80. }
  81. // 搜索参数时间赋值
  82. if (getTime.value != null) {
  83. if (getTime.value.startDate != '' && getTime.value.endDate != '') {
  84. detailY.value.startDate = getTime.value[0]
  85. detailY.value.endDate = getTime.value[1]
  86. }
  87. } else {
  88. detailY.value.startDate = ''
  89. detailY.value.endDate = ''
  90. }
  91. // 添加排序字段和排序方式到请求参数
  92. detailY.value.sortField = sortField.value
  93. detailY.value.sortOrder = sortOrder.value
  94. console.log('搜索参数', getObj.value)
  95. // 发送POST请求
  96. const result = await API({
  97. url: '/detailY',
  98. method: 'post',
  99. data: { ...getObj.value, detailY: { ...detailY.value } }
  100. })
  101. // const result2 = await API.post("http://54.251.137.151:10702/detailY", {
  102. // ...getAllObj.value,
  103. // detailY: { ...detailY.value },
  104. // });
  105. // 将响应结果存储到响应式数据中
  106. console.log('请求成功', result)
  107. // console.log("请求成功2", result2);
  108. // 存储表格数据
  109. tableData.value = result.data.list
  110. console.log('tableData', tableData.value)
  111. // tableAllData.value = result2.data;
  112. // console.log("tableAllData", tableAllData.value);
  113. // 存储分页总数
  114. total.value = result.data.total
  115. console.log('total', total.value)
  116. // 计算各金币总数并除以100
  117. // 下列各数除以100,并最多显示两位小数
  118. // rechargeCoin.value = parseFloat((tableAllData.value.sumR / 100).toFixed(2));
  119. // freeCoin.value = parseFloat((tableAllData.value.sumF / 100).toFixed(2));
  120. // taskCoin.value = parseFloat((tableAllData.value.sumT / 100).toFixed(2));
  121. // for (let i = 0; i < tableAllData.value.length; i++) {
  122. // rechargeCoin.value += tableAllData.value[i].rechargeCoin;
  123. // freeCoin.value += tableAllData.value[i].freeCoin;
  124. // taskCoin.value += tableAllData.value[i].taskCoin;
  125. // }
  126. // console.log(
  127. // "各金币总数",
  128. // rechargeCoin.value,
  129. // freeCoin.value,
  130. // taskCoin.value
  131. // );
  132. } catch (error) {
  133. console.log('请求失败', error)
  134. // 在这里可以处理错误逻辑,比如显示错误提示等
  135. }
  136. }
  137. // 搜索
  138. const search = function () {
  139. getObj.value.pageNum = 1
  140. get()
  141. }
  142. // 重置
  143. const reset = function () {
  144. // 删除精网号字段
  145. delete detailY.value.jwcode
  146. // 删除更新类型字段
  147. delete detailY.value.num
  148. // 删除开始时间字段
  149. delete detailY.value.startDate
  150. // 删除结束时间字段
  151. delete detailY.value.endDate
  152. // 删除所属地区字段
  153. delete detailY.value.area
  154. delete sortField.value
  155. delete sortOrder.value
  156. getTime.value = {}
  157. // 删除平台信息字段
  158. delete detailY.value.consumePlatform
  159. }
  160. // 今天
  161. const getToday = function () {
  162. const today = new Date()
  163. const startDate = new Date(
  164. today.getFullYear(),
  165. today.getMonth(),
  166. today.getDate()
  167. )
  168. const endDate = new Date(
  169. today.getFullYear(),
  170. today.getMonth(),
  171. today.getDate() + 1
  172. )
  173. getTime.value = [startDate, endDate]
  174. console.log('getTime', getTime.value)
  175. get()
  176. }
  177. // 昨天
  178. const getYesterday = function () {
  179. const yesterday = new Date()
  180. yesterday.setDate(yesterday.getDate() - 1)
  181. const startDate = new Date(
  182. yesterday.getFullYear(),
  183. yesterday.getMonth(),
  184. yesterday.getDate()
  185. )
  186. const endDate = new Date(
  187. yesterday.getFullYear(),
  188. yesterday.getMonth(),
  189. yesterday.getDate() + 1
  190. )
  191. getTime.value = [startDate, endDate]
  192. console.log('getTime', getTime.value)
  193. get()
  194. }
  195. // 近7天
  196. const get7Days = function () {
  197. const today = new Date()
  198. const startDate = new Date(
  199. today.getFullYear(),
  200. today.getMonth(),
  201. today.getDate() - 6
  202. )
  203. const endDate = new Date(
  204. today.getFullYear(),
  205. today.getMonth(),
  206. today.getDate() + 1
  207. )
  208. getTime.value = [startDate, endDate]
  209. console.log('getTime', getTime.value)
  210. get()
  211. }
  212. // 验证跳转输入框的数字是否合法
  213. const checkNumber = function () {
  214. if (typeof parseInt(getObj.value.pageNum) === 'number') {
  215. console.log('总共有多少页' + Math.ceil(total.value / getObj.value.pageSize))
  216. if (
  217. getObj.value.pageNum > 0 &&
  218. getObj.value.pageNum <= Math.ceil(total.value / getObj.value.pageSize)
  219. ) {
  220. getObj.value.pageNum = parseInt(getObj.value.pageNum)
  221. console.log('输入的数字合法')
  222. get()
  223. } else {
  224. //提示
  225. ElMessage({
  226. type: 'error',
  227. message: '请检查输入内容'
  228. })
  229. }
  230. } else {
  231. //提示
  232. ElMessage({
  233. type: 'error',
  234. message: '请检查输入内容'
  235. })
  236. }
  237. }
  238. // 挂载
  239. onMounted(async function () {
  240. await getAdminData()
  241. await get()
  242. })
  243. // 这是导出excel表格的方法
  244. // 导出Excel的方法
  245. // 定义字段映射
  246. const json_fields = (row) => {
  247. return [
  248. row.jwcode, // 姓名
  249. row.area, // 精网号
  250. row.platform, // 所属地区
  251. row.consumePlatform, // 平台信息
  252. row.gold, // 更新数量
  253. row.rechargeCoin, // 免费金币
  254. row.freeCoin, // 永久金币
  255. row.taskCoin, // 任务金币
  256. row.createAdmin, // 提交人
  257. row.createTime,
  258. row.name,
  259. row.id
  260. ]
  261. }
  262. // 定义元数据
  263. const json_meta = [
  264. [
  265. {
  266. key: 'charset',
  267. value: 'utf-8'
  268. }
  269. ]
  270. ]
  271. const headers = [
  272. '精网号',
  273. '地区',
  274. '平台信息',
  275. '数量',
  276. '数量更新类型',
  277. '永久金币',
  278. '免费金币',
  279. '任务金币',
  280. '提交人',
  281. '更新时间',
  282. '用户名',
  283. 'id'
  284. ]
  285. const exportExcel = () => {
  286. // 先将 json_fields 应用到数据上
  287. const data = excelInfo.value.map(json_fields)
  288. const ws = utils.aoa_to_sheet(data)
  289. // 添加表头到工作表
  290. utils.sheet_add_aoa(ws, [headers], { origin: 'A1' })
  291. const wb = utils.book_new()
  292. utils.book_append_sheet(wb, ws, 'Sheet1')
  293. writeFile(wb, '客户金币明细.xlsx')
  294. }
  295. const today = new Date()
  296. const startDate = new Date(
  297. today.getFullYear(),
  298. today.getMonth(),
  299. today.getDate()
  300. )
  301. const endDate = new Date(
  302. today.getFullYear(),
  303. today.getMonth(),
  304. today.getDate() + 1
  305. )
  306. const putExcel = ref({
  307. startDate: startDate,
  308. endDate: endDate
  309. })
  310. const excelInfo = ref({})
  311. const loading = ref(false)
  312. const areyour = async function () {
  313. try {
  314. loading.value = true
  315. const result = await API({
  316. url: '/detailY/searchAll',
  317. method: 'post',
  318. data: { ...putExcel.value }
  319. })
  320. excelInfo.value = result.data
  321. // 处理 excelInfo 中的数据
  322. if (Array.isArray(excelInfo.value)) {
  323. excelInfo.value.forEach((item) => {
  324. if (item.rechargeCoin) {
  325. item.rechargeCoin = item.rechargeCoin / 100
  326. }
  327. if (item.freeCoin) {
  328. item.freeCoin = item.freeCoin / 100
  329. }
  330. if (item.taskCoin) {
  331. item.taskCoin = item.taskCoin / 100
  332. }
  333. })
  334. }
  335. areyouright.value = true
  336. ElMessage({
  337. type: 'success',
  338. message: '查询成功'
  339. })
  340. loading.value = false
  341. } catch (error) {
  342. console.log('请求失败', error)
  343. loading.value = false
  344. }
  345. }
  346. const areyouright = ref(false)
  347. //选地区
  348. const area = [
  349. {
  350. value: '马来西亚',
  351. label: '马来西亚'
  352. },
  353. {
  354. value: '新加坡',
  355. label: '新加坡'
  356. },
  357. {
  358. value: '香港',
  359. label: '香港'
  360. },
  361. {
  362. value: '泰国',
  363. label: '泰国'
  364. },
  365. {
  366. value: '加拿大',
  367. label: '加拿大'
  368. },
  369. {
  370. value: '越南HCM',
  371. label: '越南HCM'
  372. }
  373. ]
  374. //选消费平台
  375. const platform = [
  376. {
  377. value: '4',
  378. label: '金币系统'
  379. },
  380. {
  381. value: '1',
  382. label: 'ERP系统'
  383. },
  384. {
  385. value: '2',
  386. label: 'Homily Chart'
  387. },
  388. {
  389. value: '3',
  390. label: 'Homily Link'
  391. },
  392. {
  393. value: '0',
  394. label: '初始化金币'
  395. }
  396. ]
  397. const TimeGet = ref('1')
  398. // 今天
  399. const getT = function () {
  400. const today = new Date()
  401. const startDate = new Date(
  402. today.getFullYear(),
  403. today.getMonth(),
  404. today.getDate()
  405. )
  406. const endDate = new Date(
  407. today.getFullYear(),
  408. today.getMonth(),
  409. today.getDate() + 1
  410. )
  411. putExcel.value.startDate = startDate
  412. putExcel.value.endDate = endDate
  413. console.log('putExcel', putExcel.value)
  414. }
  415. //3天
  416. const get3 = function () {
  417. const today = new Date()
  418. const startDate = new Date(
  419. today.getFullYear(),
  420. today.getMonth(),
  421. today.getDate() - 2
  422. )
  423. const endDate = new Date(
  424. today.getFullYear(),
  425. today.getMonth(),
  426. today.getDate() + 1
  427. )
  428. putExcel.value.startDate = startDate
  429. putExcel.value.endDate = endDate
  430. console.log('putExcel', putExcel.value)
  431. }
  432. // 7天
  433. const get7 = function () {
  434. const today = new Date()
  435. const startDate = new Date(
  436. today.getFullYear(),
  437. today.getMonth(),
  438. today.getDate() - 6
  439. )
  440. const endDate = new Date(
  441. today.getFullYear(),
  442. today.getMonth(),
  443. today.getDate() + 1
  444. )
  445. putExcel.value.startDate = startDate
  446. putExcel.value.endDate = endDate
  447. console.log('putExcel', putExcel.value)
  448. }
  449. // 30天
  450. const get30 = function () {
  451. const today = new Date()
  452. const startDate = new Date(
  453. today.getFullYear(),
  454. today.getMonth() - 1,
  455. today.getDate()
  456. )
  457. const endDate = new Date(
  458. today.getFullYear(),
  459. today.getMonth(),
  460. today.getDate() + 1
  461. )
  462. putExcel.value.startDate = startDate
  463. putExcel.value.endDate = endDate
  464. console.log('putExcel', putExcel.value)
  465. }
  466. // 新增排序字段和排序方式
  467. const sortField = ref('')
  468. const sortOrder = ref('')
  469. // 处理排序事件
  470. const handleSortChange = (column) => {
  471. console.log('排序字段:', column.prop)
  472. console.log('排序方式:', column.order)
  473. if (column.prop === 'rechargeCoin') {
  474. sortField.value = 'recharge_coin'
  475. } else if (column.prop === 'taskCoin') {
  476. sortField.value = 'task_coin'
  477. } else if (column.prop === 'freeCoin') {
  478. sortField.value = 'free_coin'
  479. } else if (column.prop === 'createTime') {
  480. sortField.value = 'create_time'
  481. } else if (column.prop === 'gold') {
  482. sortField.value = 'gold'
  483. }
  484. sortOrder.value = column.order === 'ascending' ? 'ASC' : 'DESC'
  485. }
  486. get()
  487. const handlePageSizeChange = function (val) {
  488. getObj.value.pageSize = val
  489. get()
  490. }
  491. const handleCurrentChange = function (val) {
  492. getObj.value.pageNum = val
  493. get()
  494. }
  495. </script>
  496. <template>
  497. <el-dialog
  498. v-model="areyouright"
  499. title=""
  500. width="500"
  501. :close-on-click-modal="false"
  502. >
  503. <el-button type="success" @click="exportExcel()">导出</el-button>
  504. </el-dialog>
  505. <!-- 这是导出excel的弹窗 -->
  506. <el-dialog
  507. v-model="getPutEX"
  508. title="请选择导出条件"
  509. width="500"
  510. :close-on-click-modal="false"
  511. >
  512. <template #footer>
  513. <el-form
  514. v-loading="loading"
  515. ref="ruleFormRef"
  516. style="max-width: 600px"
  517. :model="putExcel"
  518. :rules="rules"
  519. label-width="auto"
  520. class="demo-ruleForm"
  521. :size="formSize"
  522. status-icon
  523. >
  524. <el-form-item prop="activityName" label="精网号:">
  525. <el-input
  526. v-model="putExcel.jwcode"
  527. placeholder="请输入精网号"
  528. style="width: 220px"
  529. />
  530. </el-form-item>
  531. <el-form-item label="所属地区:"
  532. ><el-select
  533. v-model="putExcel.area"
  534. placeholder="请选择所属地区"
  535. style="width: 240px"
  536. clearable
  537. >
  538. <el-option
  539. v-for="item in area"
  540. :key="item.value"
  541. :label="item.label"
  542. :value="item.value"
  543. />
  544. </el-select>
  545. </el-form-item>
  546. <el-form-item label="更新时间:">
  547. <el-radio-group v-model="TimeGet">
  548. <el-radio value="1" @click="getT()">今天</el-radio>
  549. <el-radio value="3" @click="get3()">近三天</el-radio>
  550. <el-radio value="7" @click="get7()">近一周</el-radio>
  551. <el-radio value="30" @click="get30()">近一个月</el-radio>
  552. </el-radio-group>
  553. </el-form-item>
  554. <el-button
  555. type="primary"
  556. size="small"
  557. style="margin-left: 10px"
  558. @click="areyour()"
  559. >确定</el-button
  560. >
  561. </el-form>
  562. </template>
  563. </el-dialog>
  564. <el-row>
  565. <el-col>
  566. <el-card style="margin-bottom: 20px">
  567. <el-row style="margin-bottom: 10px">
  568. <el-col :span="6">
  569. <div class="head-card-element">
  570. <el-text class="mx-1" size="large">精网号</el-text>
  571. <el-input
  572. v-model="detailY.jwcode"
  573. style="width: 240px"
  574. placeholder="请输入精网号"
  575. clearable
  576. />
  577. </div>
  578. </el-col>
  579. <el-col :span="6">
  580. <div class="head-card-element">
  581. <el-text class="mx-1" size="large">平台信息</el-text>
  582. <el-select
  583. v-model="detailY.consumePlatform"
  584. placeholder="请选择平台信息"
  585. style="width: 200px"
  586. clearable
  587. >
  588. <el-option
  589. v-for="item in platform"
  590. :key="item.value"
  591. :label="item.label"
  592. :value="item.value"
  593. />
  594. </el-select>
  595. </div>
  596. </el-col>
  597. <el-col :span="6">
  598. <div class="head-card-element">
  599. <el-text class="mx-1" size="large">数量更新类型</el-text>
  600. <el-select
  601. v-model="detailY.num"
  602. placeholder="请选择更新类型"
  603. style="width: 200px"
  604. clearable
  605. >
  606. <el-option
  607. v-for="item in num"
  608. :key="item.value"
  609. :label="item.label"
  610. :value="item.value"
  611. />
  612. </el-select>
  613. </div>
  614. </el-col>
  615. <el-col :span="6">
  616. <div class="head-card-element">
  617. <el-text class="mx-1" size="large">所属地区</el-text>
  618. <el-select
  619. v-model="detailY.area"
  620. placeholder="请选择所属地区"
  621. style="width: 200px"
  622. clearable
  623. >
  624. <el-option
  625. v-for="item in area"
  626. :key="item.value"
  627. :label="item.label"
  628. :value="item.value"
  629. />
  630. </el-select>
  631. </div>
  632. </el-col>
  633. </el-row>
  634. <div class="head-card-element">
  635. <el-text class="mx-1" size="large">更新时间</el-text>
  636. <el-date-picker
  637. v-model="getTime"
  638. type="datetimerange"
  639. range-separator="至"
  640. start-placeholder="起始时间"
  641. end-placeholder="结束时间"
  642. style="margin-right: 700px"
  643. />
  644. <el-button type="success" @click="getPutEX = true"
  645. >导出Excel表格</el-button
  646. >
  647. <el-button @click="reset()">重置</el-button>
  648. <el-button type="primary" @click="search()">查询</el-button>
  649. </div>
  650. </el-card>
  651. </el-col>
  652. </el-row>
  653. <el-row>
  654. <el-col>
  655. <el-card>
  656. <!-- <div>
  657. 现有金币永久金币{{ Math.abs(rechargeCoin) }}免费金币{{
  658. Math.abs(freeCoin)
  659. }}任务金币{{ Math.abs(taskCoin) }}
  660. </div> -->
  661. <!-- 设置表格容器的高度和滚动样式 -->
  662. <div style="height: 584px; overflow-y: auto">
  663. <el-table
  664. :data="tableData"
  665. style="width: 100%"
  666. @sort-change="handleSortChange"
  667. height="584px"
  668. >
  669. <el-table-column
  670. type="index"
  671. label="序号"
  672. width="100px"
  673. fixed="left"
  674. >
  675. <template #default="scope">
  676. <span>{{
  677. scope.$index + 1 + (getObj.pageNum - 1) * getObj.pageSize
  678. }}</span>
  679. </template>
  680. </el-table-column>
  681. <el-table-column
  682. fixed="left"
  683. prop="username"
  684. label="姓名"
  685. width="150"
  686. />
  687. <el-table-column
  688. fixed="left"
  689. prop="jwcode"
  690. label="精网号"
  691. width="120"
  692. />
  693. <el-table-column prop="area" label="所属地区" width="120" />
  694. <el-table-column
  695. prop="consumePlatform"
  696. label="平台信息"
  697. width="140"
  698. >
  699. <template #default="scope">
  700. <!-- 使用非严格相等比较 -->
  701. <span v-if="scope.row.consumePlatform == 0">初始化金币</span>
  702. <span v-if="scope.row.consumePlatform == 1">ERP系统</span>
  703. <span v-if="scope.row.consumePlatform == 3">Homily Link</span>
  704. <span v-if="scope.row.consumePlatform == 2">Homily Chart</span>
  705. <span v-if="scope.row.consumePlatform == 4">金币系统</span>
  706. </template>
  707. </el-table-column>
  708. <el-table-column
  709. prop="gold"
  710. label="更新数量"
  711. width="120"
  712. sortable="“custom”"
  713. >
  714. <template #default="scope">
  715. <span>{{ scope.row.gold / 100 }}</span>
  716. </template>
  717. </el-table-column>
  718. <el-table-column prop="updateType" label="更新类型" width="110">
  719. <!-- 模板内容 -->
  720. <template #default="scope">
  721. <span v-if="scope.row.updateType == 1">
  722. <span>消费</span>
  723. </span>
  724. <span v-if="scope.row.updateType == 0">
  725. <span>充值</span>
  726. </span>
  727. <span v-if="scope.row.updateType == 2">
  728. <span>退款</span>
  729. </span>
  730. <span v-if="scope.row.updateType == 3">
  731. <span>其他</span>
  732. </span>
  733. </template>
  734. </el-table-column>
  735. <el-table-column
  736. prop="rechargeCoin"
  737. sortable="“custom”"
  738. label="永久金币"
  739. width="110"
  740. >
  741. <template #default="scope">
  742. <span>{{ scope.row.rechargeCoin / 100 }}</span>
  743. </template>
  744. </el-table-column>
  745. <el-table-column
  746. prop="freeCoin"
  747. sortable="“custom”"
  748. label="免费金币"
  749. width="110"
  750. >
  751. <template #default="scope">
  752. <span>{{ scope.row.freeCoin / 100 }}</span>
  753. </template>
  754. </el-table-column>
  755. <el-table-column
  756. prop="taskCoin"
  757. sortable="“custom”"
  758. label="任务金币"
  759. width="110"
  760. >
  761. <template #default="scope">
  762. <span>{{ scope.row.taskCoin / 100 }}</span>
  763. </template>
  764. </el-table-column>
  765. <el-table-column prop="name" label="提交人" width="110" />
  766. <el-table-column
  767. prop="createTime"
  768. sortable="“custom”"
  769. label="更新时间"
  770. width="210"
  771. show-overflow-tooltip
  772. >
  773. <template #default="scope">
  774. <span>{{
  775. moment(scope.row.createTime).format('YYYY-MM-DD HH:mm:ss')
  776. }}</span>
  777. </template>
  778. </el-table-column>
  779. </el-table>
  780. </div>
  781. <!-- 分页 -->
  782. <!-- 分页 -->
  783. <div class="pagination" style="margin-top: 20px">
  784. <el-pagination
  785. background
  786. :page-size="getObj.pageSize"
  787. :page-sizes="[5, 10, 20, 50, 100]"
  788. layout="total, sizes, prev, pager, next, jumper"
  789. :total="total"
  790. @size-change="handlePageSizeChange"
  791. @current-change="handleCurrentChange"
  792. ></el-pagination>
  793. </div>
  794. </el-card>
  795. </el-col>
  796. </el-row>
  797. </template>
  798. <style scoped>
  799. .pagination {
  800. display: flex;
  801. }
  802. .status {
  803. display: flex;
  804. }
  805. .head-card {
  806. display: flex;
  807. }
  808. /* .head-card-element {
  809. margin-right: 20px;
  810. } */
  811. /* .head-card-btn {
  812. margin-left: auto;
  813. } */
  814. </style>