data.ts 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431
  1. import { FormSchema } from '/@/components/Form/index';
  2. import { incrementUseTypeList } from '/@/api/account';
  3. // 基础设置 form
  4. export const remarkschemas: FormSchema[] = [
  5. {
  6. field: 'remark',
  7. component: 'InputTextArea',
  8. label: '备注',
  9. componentProps: {
  10. placeholder: '请输入钉钉审批单号',
  11. rows: 4,
  12. },
  13. colProps: { span: 20 },
  14. },
  15. ];
  16. export const newAddschemas: FormSchema[] = [
  17. {
  18. field: 'useType',
  19. component: 'ApiSelect',
  20. required: true,
  21. label: '使用类型',
  22. componentProps: {
  23. // filterOption: onFilterOption,
  24. // showSearch: true,
  25. api: incrementUseTypeList,
  26. labelField: 'name',
  27. valueField: 'id',
  28. immediate: true,
  29. },
  30. itemProps: {
  31. autoLink: false,
  32. },
  33. colProps: {
  34. span: 20,
  35. },
  36. },
  37. {
  38. field: 'companyName',
  39. component: 'Select',
  40. label: '合同所属公司',
  41. rules: [{ required: true }],
  42. colProps: {
  43. span: 20,
  44. },
  45. itemProps: {
  46. autoLink: false,
  47. },
  48. componentProps: {
  49. options: [
  50. {
  51. label: '珠海市四维时代网络科技有限公司',
  52. value: '珠海市四维时代网络科技有限公司',
  53. key: '珠海市四维时代网络科技有限公司',
  54. },
  55. {
  56. label: '广东四维看看智能设备有限公司',
  57. value: '广东四维看看智能设备有限公司',
  58. key: '广东四维看看智能设备有限公司',
  59. },
  60. {
  61. label: '四维看看(香港)有限公司',
  62. value: '四维看看(香港)有限公司',
  63. key: '四维看看(香港)有限公司',
  64. },
  65. {
  66. label: '四维看看(北京)数据科技有限公司',
  67. value: '四维看看(北京)数据科技有限公司',
  68. key: '四维看看(北京)数据科技有限公司',
  69. },
  70. ],
  71. },
  72. },
  73. {
  74. field: 'businessDept',
  75. component: 'Select',
  76. label: '业务部门',
  77. rules: [{ required: true }],
  78. colProps: {
  79. span: 20,
  80. },
  81. itemProps: {
  82. autoLink: false,
  83. },
  84. componentProps: {
  85. options: [
  86. {
  87. label: '数字营销事业部',
  88. value: '数字营销事业部',
  89. key: '数字营销事业部',
  90. },
  91. {
  92. label: '政企事业部',
  93. value: '政企事业部',
  94. key: '政企事业部',
  95. },
  96. {
  97. label: '海外事业部',
  98. value: '海外事业部',
  99. key: '海外事业部',
  100. },
  101. {
  102. label: '市场部',
  103. value: '市场部',
  104. key: '市场部',
  105. },
  106. {
  107. label: '总经办',
  108. value: '总经办',
  109. key: '总经办',
  110. },
  111. {
  112. label: '考古',
  113. value: '考古',
  114. key: '考古',
  115. },
  116. {
  117. label: '不可移动文物保护事业部',
  118. value: '不可移动文物保护事业部',
  119. key: '不可移动文物保护事业部',
  120. },
  121. ],
  122. },
  123. },
  124. {
  125. field: 'businessName',
  126. component: 'Input',
  127. label: '业务员',
  128. required: true,
  129. colProps: { span: 20 },
  130. componentProps: {
  131. maxlength: 100,
  132. },
  133. },
  134. {
  135. field: 'customerPayTime',
  136. component: 'DatePicker',
  137. label: '客户付款时间',
  138. required: true,
  139. colProps: {
  140. span: 16,
  141. },
  142. itemProps: {
  143. autoLink: false,
  144. },
  145. componentProps: {
  146. // showTime: { defaultValue: moment('23:59:59', 'HH:mm:ss') },
  147. valueFormat: 'YYYY-MM-DD',
  148. // defaultValue: dayjs().add(7, 'day').format('YYYY-MM-DD') + ' 23:59:59',
  149. format: 'YYYY-MM-DD',
  150. },
  151. },
  152. ];
  153. export const Addschemas: FormSchema[] = [
  154. {
  155. field: 'customerName',
  156. component: 'Input',
  157. label: '客户名称',
  158. required: true,
  159. colProps: { span: 20 },
  160. },
  161. {
  162. field: 'customerType',
  163. component: 'Select',
  164. label: '客户类别',
  165. required: true,
  166. colProps: { span: 20 },
  167. componentProps: {
  168. options: [
  169. {
  170. label: '直销',
  171. value: 0,
  172. key: '0',
  173. },
  174. {
  175. label: '经销',
  176. value: 1,
  177. key: '1',
  178. },
  179. ],
  180. },
  181. },
  182. {
  183. field: 'endCustomer',
  184. component: 'Input',
  185. label: '终端客户',
  186. required: true,
  187. colProps: { span: 20 },
  188. },
  189. {
  190. field: 'projectNum',
  191. component: 'Input',
  192. label: '项目号',
  193. required: true,
  194. colProps: { span: 20 },
  195. },
  196. ];
  197. export const rtkdeviceColumns: any[] = [
  198. {
  199. title: '设备类型',
  200. dataIndex: 'cameraType',
  201. ellipsis: true,
  202. width: 120,
  203. customRender: ({ record }) => {
  204. const obj = {
  205. 0: '四维看看',
  206. 1: '四维看见',
  207. 2: '四维深时',
  208. 3: '四维深光',
  209. 4: '四维深巡',
  210. };
  211. return obj[record.cameraType] || '-';
  212. },
  213. },
  214. {
  215. title: '相机SN',
  216. ellipsis: true,
  217. dataIndex: 'cameraSn',
  218. width: 100,
  219. customRender: ({ record }) => {
  220. return record.cameraSn || '-';
  221. },
  222. },
  223. {
  224. title: '板卡类型',
  225. dataIndex: 'rtkType',
  226. ellipsis: true,
  227. width: 120,
  228. customRender: ({ record }) => {
  229. const obj = {
  230. 0: '千寻板卡',
  231. 1: '千寻板卡',
  232. 2: '北云板卡',
  233. };
  234. return obj[record.rtkType] || '-';
  235. },
  236. },
  237. {
  238. title: '板卡SN号',
  239. ellipsis: true,
  240. dataIndex: 'rtkSnCode',
  241. width: 265,
  242. },
  243. {
  244. title: '深光rtk插件SN号',
  245. ellipsis: true,
  246. dataIndex: 'sgRtkSn',
  247. customRender: ({ record }) => {
  248. return record.sgRtkSn || '-';
  249. },
  250. width: 160,
  251. },
  252. {
  253. title: '账号类型',
  254. ellipsis: true,
  255. dataIndex: 'accountType',
  256. width: 140,
  257. customRender: ({ record }) => {
  258. const obj = {
  259. 0: '账号池(不限期)',
  260. 2: '账号池(限期)',
  261. 1: '专用账号',
  262. };
  263. return obj[record.accountType] || '-';
  264. },
  265. },
  266. {
  267. title: '差分账号最新生效日期',
  268. ellipsis: true,
  269. dataIndex: 'validStartTime',
  270. width: 180,
  271. },
  272. {
  273. title: '差分账号最新到期日期',
  274. ellipsis: true,
  275. dataIndex: 'validEndTime',
  276. width: 180,
  277. },
  278. ];
  279. export const rtkuserColumns: any[] = [
  280. {
  281. title: '用户名称',
  282. ellipsis: true,
  283. dataIndex: 'userName',
  284. width: 120,
  285. },
  286. {
  287. title: '运营商',
  288. ellipsis: true,
  289. dataIndex: 'operator',
  290. width: 120,
  291. },
  292. {
  293. title: 'IP地址',
  294. ellipsis: true,
  295. dataIndex: 'ipAddr',
  296. width: 120,
  297. },
  298. {
  299. title: '挂载点',
  300. ellipsis: true,
  301. dataIndex: 'mountPoint',
  302. width: 120,
  303. },
  304. {
  305. title: '端口',
  306. ellipsis: true,
  307. dataIndex: 'port',
  308. width: 50,
  309. },
  310. {
  311. title: '到期时间',
  312. ellipsis: true,
  313. dataIndex: 'failureTime',
  314. width: 160,
  315. },
  316. {
  317. title: '创建人',
  318. ellipsis: true,
  319. dataIndex: 'createNickName',
  320. width: 120,
  321. },
  322. {
  323. title: '创建时间',
  324. ellipsis: true,
  325. dataIndex: 'createTime',
  326. width: 150,
  327. },
  328. ];
  329. export const newApiAddschemas: FormSchema[] = [
  330. {
  331. field: 'companyName',
  332. component: 'Select',
  333. label: '合同所属公司',
  334. rules: [{ required: true }],
  335. colProps: {
  336. span: 20,
  337. },
  338. itemProps: {
  339. autoLink: false,
  340. },
  341. componentProps: {
  342. options: [
  343. {
  344. label: '珠海市四维时代网络科技有限公司',
  345. value: '珠海市四维时代网络科技有限公司',
  346. key: '珠海市四维时代网络科技有限公司',
  347. },
  348. {
  349. label: '广东四维看看智能设备有限公司',
  350. value: '广东四维看看智能设备有限公司',
  351. key: '广东四维看看智能设备有限公司',
  352. },
  353. {
  354. label: '四维看看(香港)有限公司',
  355. value: '四维看看(香港)有限公司',
  356. key: '四维看看(香港)有限公司',
  357. },
  358. {
  359. label: '四维看看(北京)数据科技有限公司',
  360. value: '四维看看(北京)数据科技有限公司',
  361. key: '四维看看(北京)数据科技有限公司',
  362. },
  363. ],
  364. },
  365. },
  366. {
  367. field: 'businessDept',
  368. component: 'Select',
  369. label: '业务部门',
  370. rules: [{ required: true }],
  371. colProps: {
  372. span: 20,
  373. },
  374. itemProps: {
  375. autoLink: false,
  376. },
  377. componentProps: {
  378. options: [
  379. {
  380. label: '数字营销事业部',
  381. value: '数字营销事业部',
  382. key: '数字营销事业部',
  383. },
  384. {
  385. label: '政企事业部',
  386. value: '政企事业部',
  387. key: '政企事业部',
  388. },
  389. {
  390. label: '海外事业部',
  391. value: '海外事业部',
  392. key: '海外事业部',
  393. },
  394. {
  395. label: '市场部',
  396. value: '市场部',
  397. key: '市场部',
  398. },
  399. {
  400. label: '总经办',
  401. value: '总经办',
  402. key: '总经办',
  403. },
  404. {
  405. label: '考古',
  406. value: '考古',
  407. key: '考古',
  408. },
  409. {
  410. label: '不可移动文物保护事业部',
  411. value: '不可移动文物保护事业部',
  412. key: '不可移动文物保护事业部',
  413. },
  414. ],
  415. },
  416. },
  417. {
  418. field: 'businessName',
  419. component: 'Input',
  420. label: '业务员',
  421. required: true,
  422. colProps: { span: 20 },
  423. componentProps: {
  424. maxlength: 100,
  425. },
  426. },
  427. ];