tableData.ts 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317
  1. /**
  2. * index:序号
  3. * txt:正常数据
  4. * img:图片
  5. * txtChange:判断显示不同字段
  6. * text:文字比较多的情况、获取使用其他标签(没有的需要自己配置)
  7. */
  8. // export const A1tableCFu = (type: "video" | "poster") => {
  9. // return [
  10. // ["index", "序号"],
  11. // ["txt", "标题", "name"]
  12. // ["img", type === "video" ? "视频封面" : "海报", "thumb"],
  13. // ["txtChange", "自动播放", "display", { 0: "否", 1: "是" }],
  14. // ["text", "创建日期",'description', 50,A],
  15. // ];
  16. import { selectObj } from './dataChange'
  17. import dayjs from 'dayjs'
  18. // 列表页面(大部分相同和复用的)
  19. export const baseTableC = (val: string) => {
  20. return [
  21. ['dateRes', `${val}日期`, 'date'],
  22. ['txt', '申请编号', 'num'],
  23. ['txt', '发起部门', 'deptName'],
  24. ['txt', '发起人', 'creatorName'],
  25. ['txt', '发起日期', 'createTime'],
  26. ['select', '申请状态', 'status', selectObj['订单审批状态']]
  27. ]
  28. }
  29. // 藏品征集-订单页面的线索清单
  30. export const SonClueListTableC = [
  31. ['img', '封面', 'thumb'],
  32. ['txt', '线索名称', 'name'],
  33. ['txt', '线索编号', 'num'],
  34. ['text', '线索简介', 'intro', 50],
  35. ['txt', '联系方式', 'phone'],
  36. ['txtCTag', '初步藏品类别', 'tagDictId', '藏品'],
  37. ['txtC', '初步藏品年代', 'ageDictId'],
  38. ['select', '完残程度', 'tornLevel', selectObj['完残程度']],
  39. ['text', '备注', 'remark', 50]
  40. ]
  41. // 藏品登记-订单页面的藏品清单 、-----选择藏品-藏品
  42. export const goodsSonTableC = (loc?: boolean) => {
  43. const arr: any = [
  44. ['txt', '藏品登记号', 'num'],
  45. ['img', '封面', 'thumb'],
  46. ['txtCTag', '藏品类别', 'tagDictId', '藏品'],
  47. ['txtCTag', '文化标签', 'artDictId', '文创'],
  48. ['txt', '藏品名称', 'name'],
  49. ['select', '级别', 'level', selectObj['藏品级别']],
  50. ['txtC', '年代', 'ageDictId'],
  51. ['txtCTag', '质地', 'textureDictId', '质地3'],
  52. ['select', '完残程度', 'tornLevel', selectObj['完残程度']],
  53. ['ping', '数量', 'pcs', 'pcsUnitDictId']
  54. ]
  55. if (loc) arr.push(['connectTxt', '库房位置', 'storageName', 'siteLoc'])
  56. return arr
  57. }
  58. // -----选择藏品-线索
  59. export const goodsSelectCuleC = [
  60. ['txt', '线索编号', 'num'],
  61. ['img', '封面', 'thumb'],
  62. ['txt', '线索名称', 'name'],
  63. ['txtCTag', '初步藏品类别', 'tagDictId', '藏品'],
  64. ['txtC', '初定年代', 'ageDictId'],
  65. ['select', '完残程度', 'tornLevel', selectObj['完残程度']]
  66. ]
  67. export const I3tableC = [
  68. ['txt', '编号类型', 'name'],
  69. ['txt', '前缀', 'prefix'],
  70. ['txt', '日期方式', 'dateType'],
  71. ['txt', '起始流水编号', 'length']
  72. ]
  73. export const I4tableC = [
  74. ['txt', '规则名称', 'name'],
  75. ['text', '规则说明', 'remark', 50],
  76. ['text2', '关联流程', 'guanLian', 200],
  77. ['txtChange', '规则状态', 'enabled', { 0: '禁用', 1: '启用' }]
  78. ]
  79. export const I4tableC2 = [
  80. ['index', '序号'],
  81. ['txt', '节点名称', 'name'],
  82. ['txt', '排序值', 'sort'],
  83. ['txtChange', '办理人', 'type', { user: '指定用户', role: '按角色' }]
  84. ]
  85. export const I6tableC = [
  86. ['txt', '角色名称', 'roleName'],
  87. ['text', '角色说明', 'roleDesc', 50],
  88. ['txt', '排序值', 'sort']
  89. ]
  90. export const I7tableC = [
  91. ['txt', '登录账号', 'userName'],
  92. ['txt', '所属部门', 'deptNameRes'],
  93. ['txt', '角色', 'roleName'],
  94. ['txt', '真实姓名', 'realName'],
  95. ['txt', '创建日期', 'createTime']
  96. ]
  97. export const I8tableC = [
  98. ['index', '序号'],
  99. ['txt', '账号', 'userName'],
  100. ['txt', '操作日期', 'createTime'],
  101. ['txt', 'IP记录', 'ip'],
  102. ['txt', '操作模块', 'type'],
  103. ['txt', '操作事件', 'description']
  104. ]
  105. // 故事管理
  106. export const storyTableC = [
  107. ['txt', '故事标题', 'name'],
  108. ['txt', '关联藏品', 'goodName'],
  109. ['txtCTag', '藏品类别', 'tagDictId', '藏品'],
  110. ['txt', '录入人', 'creatorName'],
  111. ['txt', '录入日期', 'createTime']
  112. ]
  113. // 故事管理里面的添加藏品
  114. export const storyAndGoodsTableC = [
  115. ['txt', '藏品登记号', 'num'],
  116. ['img', '封面', 'thumb'],
  117. ['txtCTag', '藏品类别', 'tagDictId', '藏品'],
  118. ['txt', '藏品名称', 'name']
  119. ]
  120. // 库房设置
  121. export const storageSetTableC = [
  122. ['txt', '库房名称', 'storageName'],
  123. [
  124. 'custom',
  125. '仓位编号(排-列-层-格)',
  126. (item: any) =>
  127. [item.layer1, item.layer2, item.layer3, item.layer4].filter(i => Boolean(i)).join('-')
  128. ]
  129. ]
  130. export const warehouseSetTableC = [
  131. ['txt', '库房名称', 'name'],
  132. ['txt', '库房负责人', 'managerUser'],
  133. ['txt', '库房说明', 'description']
  134. ]
  135. //藏品附件
  136. export const goodsFileTableC = [
  137. ['select', '附件类型', 'type', selectObj['附件类型']],
  138. ['txt', '附件名称', 'fileName'],
  139. ['txt', '藏品登记号', 'joinNum'],
  140. ['txt', '藏品名称', 'joinName'],
  141. ['dateRes', '上传日期', 'createTime'],
  142. ['txt', '上传人', 'creatorName'],
  143. ['sizeNum', '文件大小(mb)', 'fileSize', 1024]
  144. ]
  145. // 藏品入库
  146. export const inStorageTableC = [
  147. ['txt', '入库日期', 'createTime'],
  148. ['txt', '入库库房', 'storageName'],
  149. ['txt', '申请编号', 'num'],
  150. ['txt', '发起部门', 'deptName'],
  151. ['txt', '发起人', 'creatorName'],
  152. ['txt', '发起日期', 'date'],
  153. ['select', '申请状态', 'status', selectObj['藏品入库申请状态']]
  154. ]
  155. // 藏品出库
  156. export const outStorageTableC = [
  157. ['txt', '出库日期', 'createTime'],
  158. ['txt', '出库库房', 'storageName'],
  159. ['txt', '申请编号', 'num'],
  160. ['txt', '发起部门', 'deptName'],
  161. ['txt', '发起人', 'creatorName'],
  162. ['txt', '发起日期', 'date'],
  163. ['select', '申请状态', 'status', selectObj['藏品入库申请状态']]
  164. ]
  165. // 藏品详情----藏品附件
  166. export const GI3tableC = [
  167. ['select', '附件类型', 'type', selectObj['附件类型']],
  168. ['txt', '附件名称', 'fileName'],
  169. ['dateRes', '上传日期', 'createTime'],
  170. ['txt', '上传人', 'creatorName'],
  171. ['sizeNum', '文件大小(mb)', 'fileSize', 1024]
  172. ]
  173. // 藏品详情----藏品故事
  174. export const GI4tableC = [
  175. ['txt', '故事名称', 'name'],
  176. ['text', '备注', 'remark', 50],
  177. ['txt', '编辑人', 'creatorName']
  178. ]
  179. // 藏品详情----藏品日志 / 工作台
  180. export const GI5tableC = (flag?: boolean) => {
  181. let arr = [
  182. ['dateRes', '业务发生日期', 'date'],
  183. ['txt', '申请编号', 'num'],
  184. ['txt', '发起部门', 'deptName'],
  185. ['txt', '发起人', 'creatorName'],
  186. ['txt', '发起日期', 'date'],
  187. ['select', '申请状态', 'status', selectObj['藏品入库申请状态']]
  188. ]
  189. if (flag) arr.shift()
  190. return arr
  191. }
  192. // 流程中心
  193. export const flowCenterTableC = [
  194. ['txt', '申请编号', 'num'],
  195. ['txt', '发起部门', 'deptName'],
  196. ['txt', '发起人', 'creatorName'],
  197. ['txt', '发起日期', 'date'],
  198. ['select', '申请状态', 'status', selectObj['藏品入库申请状态']]
  199. ]
  200. // 凭证中心
  201. export const voucherCenterTableC = [
  202. ['txt', '凭证名称', 'fileName'],
  203. ['txt', '归档日期', 'createTime'],
  204. ['txt', '归档人', 'creatorName'],
  205. ['txt', '业务编号', 'joinNum']
  206. ]
  207. // 藏品盘点
  208. export const checkTableC = [
  209. ['txt', '盘点日期', 'createTime'],
  210. ['txt', '盘点库房', 'storageName'],
  211. ['txt', '申请编号', 'num'],
  212. ['txt', '发起部门', 'deptName'],
  213. ['txt', '发起人', 'creatorName'],
  214. ['txt', '发起日期', 'date'],
  215. ['select', '申请状态', 'status', selectObj['藏品入库申请状态']]
  216. ]
  217. // 导入藏品数据/图片
  218. export const importDataTableC = [
  219. ['txt', '文件名称', 'fileName'],
  220. ['txt', '导入数据', 'pcsTotal'],
  221. ['txt', '成功数据', 'pcsSuccess'],
  222. ['txt', '失败数据', 'pcsError'],
  223. ['dateRes', '导入日期', 'createTime'],
  224. ['txt', '导入用户', 'creatorName']
  225. ]
  226. // 导入藏品数据校验
  227. export const importDataTableCheckC = [
  228. ['txt', '藏品登记号', 'num'],
  229. ['txt', '藏品名称', 'name'],
  230. ['txtChange', '校验结果', 'importIsTrue', { 0: '失败', 1: '成功' }]
  231. ]
  232. // 导入藏品图片校验
  233. export const importZipDataTableCheckC = [
  234. ['txt', '图片名称', 'fileName'],
  235. ['txtChange', '校验结果', 'isTrue', { 0: '失败', 1: '成功' }]
  236. ]
  237. // 资源使用
  238. export const resourceTableC = [
  239. ['txt', '使用日期', 'createTime'],
  240. ['txt', '申请编号', 'num'],
  241. ['txt', '发起部门', 'deptName'],
  242. ['txt', '发起人', 'creatorName'],
  243. ['txt', '发起日期', 'date'],
  244. ['select', '申请状态', 'status', selectObj['藏品入库申请状态']]
  245. ]
  246. // 藏品移库
  247. export const moveStorageTableC = [
  248. ['txt', '移库日期', 'createTime'],
  249. ['txt', '移库库房', 'extraInfo'],
  250. ['txt', '申请编号', 'num'],
  251. ['txt', '发起部门', 'deptName'],
  252. ['txt', '发起人', 'creatorName'],
  253. ['txt', '发起日期', 'date'],
  254. ['select', '申请状态', 'status', selectObj['藏品入库申请状态']]
  255. ]
  256. // 人员出入库
  257. export const staffTableC = [
  258. ['txt', '出入日期', 'createTime'],
  259. ['txt', '相关库房', 'storageName'],
  260. ['txt', '申请编号', 'num'],
  261. ['txt', '发起部门', 'deptName'],
  262. ['txt', '发起人', 'creatorName'],
  263. ['txt', '发起日期', 'date'],
  264. ['select', '申请状态', 'status', selectObj['藏品入库申请状态']]
  265. ]
  266. // 借展详情-展品清单
  267. export const showGoodTableC = [
  268. ['txt', '藏品登记号', 'goodNum'],
  269. ['img', '封面', 'goodThumb'],
  270. ['txtCTag', '藏品类别', 'tagDictId', '藏品'],
  271. ['txt', '藏品名称', 'goodName'],
  272. ['txt', '展区', 'region'],
  273. ['txt', '具体位置', 'address'],
  274. ['select', '展览状态', 'status', selectObj['展览状态']]
  275. ]
  276. // 展品管理
  277. export const loanTableC = [
  278. ['txt', '展览名称', 'name'],
  279. ['txt', '展览类型', 'type'],
  280. [
  281. 'custom',
  282. '起止日期',
  283. (item: any) =>
  284. !item.dateOpen && !item.dateEnd
  285. ? '长期'
  286. : `${dayjs(item.dateOpen).format('YYYY年MM月DD日')} - ${dayjs(item.dateEnd).format('YYYY年MM月DD日')}`
  287. ],
  288. ['txt', '相关展区', 'region'],
  289. ['txt', '相关展品', 'creatorName']
  290. ]