1
0

utils.ts 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. import mockjs from 'mockjs'
  2. export const icons = [
  3. 'CertMine',
  4. 'CertVerify',
  5. 'CertDeferredReview',
  6. 'CertMake',
  7. 'CertFile',
  8. 'CompanyTransfer',
  9. 'OriginPreSelect',
  10. 'WhitelistReview',
  11. 'ExporterHandle',
  12. 'ExportVerify',
  13. 'ExporterReview',
  14. 'ExportInfoManage'
  15. ] as const
  16. export const colorTypes = ['primary', 'success', 'info', 'warning', 'danger']
  17. export const sex = ['男', '女', '未知']
  18. export const universities = [
  19. '清华大学',
  20. '北京大学',
  21. '西安交通大学',
  22. '西北工业大学',
  23. '复旦大学',
  24. '浙江大学',
  25. '南京大学',
  26. '四川大学',
  27. '电子科技大学'
  28. ]
  29. export const educational = ['小学', '初中', '高中', '大专', '本科', '研究生']
  30. export const profession = ['计算机', '土木', '电气', '幼教', '金融', '考古']
  31. const reasons = ['不再需要', '信息错误', '重复提交', '不符合条件', '审核未通过', '用户取消', '资料补全']
  32. const taxInvoiceSource = [
  33. '客户提交',
  34. '供应商提供',
  35. '在线平台',
  36. '手动录入',
  37. '第三方代开',
  38. '电子发票系统',
  39. '纸质发票扫描',
  40. '自动导入',
  41. '其他'
  42. ]
  43. const goods = [
  44. { name: '笔记本电脑', desc: '轻薄便携笔记本电脑' },
  45. { name: '智能电脑', desc: '高清智能4k电视' },
  46. { name: '蓝牙耳机', desc: '无线蓝牙降噪耳机' },
  47. { name: '吸尘器', desc: '多功能手持吸尘器' },
  48. { name: '冰箱', desc: '高效节能家用冰箱' },
  49. { name: '相机', desc: '拍立得相机' },
  50. { name: '背包', desc: '防水户外登山包' }
  51. ]
  52. const units = ['件', '个', '台', '套', '箱']
  53. const shipNames = [
  54. '报关单与货物',
  55. '报关单与提单',
  56. '报关单与发票',
  57. '海关税号与商品',
  58. '进出口许可证与商品',
  59. '海关查验与货物',
  60. '关税与商品',
  61. '海关统计与贸易数据'
  62. ]
  63. const jobTitle = [
  64. { name: '报关员', code: 'C001' },
  65. { name: '审计员', code: 'C002' },
  66. { name: '查验员', code: 'C003' },
  67. { name: '监督员', code: 'C004' },
  68. { name: '关税分析师', code: 'C005' },
  69. { name: '统计分析师', code: 'C006' },
  70. { name: '稽查员', code: 'C007' },
  71. { name: '安全检查员', code: 'C008' },
  72. { name: '海关事务顾问', code: 'C009' }
  73. ]
  74. const foreignTrade = ['国际贸易', '机械与设备', '计算机设备', '消费电子', '化工产品']
  75. const cuntries = ['中国', '美国', '日本', '澳大利亚', '英国', '法国', '德国', '俄罗斯', '印度尼西亚']
  76. const expertTags = ['初级', '中级', '高级', '资深', '专家', '架构师']
  77. const product = ['儿童', '商务', '家庭', '学生', '专业级']
  78. const jobQualifications = [
  79. '计算机科学学士学位',
  80. '5年开发经验',
  81. 'CSM认证',
  82. '产品经理认证',
  83. '注册会计师(CPA)',
  84. 'CFA认证',
  85. '销售管理和CRM'
  86. ]
  87. const expertise = ['精通Java', '精通Python', '擅长UI/UX设计', '精通审计', '打乒乓球', '踢足球']
  88. mockjs.Random.extend({
  89. sex: function () {
  90. return this.pick(sex)
  91. },
  92. colorTypes: function () {
  93. return this.pick(colorTypes)
  94. },
  95. icons: function () {
  96. return this.pick(icons)
  97. },
  98. universities: function () {
  99. return this.pick(universities)
  100. },
  101. educational: function () {
  102. return this.pick(educational)
  103. },
  104. profession: function () {
  105. return this.pick(profession)
  106. },
  107. phone: function () {
  108. return this.integer(130, 199) + '' + this.integer(10000000, 99999999)
  109. },
  110. types: function () {
  111. return this.pick(['更新', '创建', '修改'])
  112. },
  113. reason: function () {
  114. return this.pick(reasons)
  115. },
  116. taxInvoiceSource: function () {
  117. return this.pick(taxInvoiceSource)
  118. },
  119. goods: function (value?: string) {
  120. const g = this.pick(goods)
  121. if (value) return g[value]
  122. return g
  123. },
  124. unit: function () {
  125. return this.pick(units)
  126. },
  127. shipNames: function () {
  128. return this.pick(shipNames)
  129. },
  130. randomJob: function () {
  131. return this.pick(jobTitle)
  132. },
  133. foreignTrade: function () {
  134. return this.pick(foreignTrade)
  135. },
  136. country: function () {
  137. return this.pick(cuntries)
  138. },
  139. expertTags: function () {
  140. return this.pick(expertTags)
  141. },
  142. product: function () {
  143. return this.pick(product)
  144. },
  145. jobQualifications: function () {
  146. return this.pick(jobQualifications)
  147. },
  148. expertise: function () {
  149. return this.pick(expertise)
  150. }
  151. })