useColumns.tsx 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665
  1. import { useCountryInfoStore } from '/@/stores/countryInfo';
  2. const countryInfoStore = useCountryInfoStore();
  3. export const platformColumns = [
  4. { type: 'seq', width: 50, align: 'center', fixed: 'left' },
  5. {
  6. field: 'operatorName', title: '运营', minWidth: 'auto', align: 'center', fixed: 'left',
  7. slots: {
  8. default({ row }: any) {
  9. return <span class={ 'font-medium' }>{ row.operatorName ? row.operatorName : '--' }</span>;
  10. }
  11. }
  12. },
  13. {
  14. field: 'platformNumber', title: '平台编号', minWidth: 'auto', align: 'center', slots: { default: 'platformNumber' }
  15. },
  16. {
  17. field: 'platformName', title: '平台名称', minWidth: 'auto', align: 'center', slots: {
  18. default({ row }: any) {
  19. return <span class={ 'font-medium' }
  20. style={ { color: '#303133' } }>{ row.platformName ? row.platformName : '--' }</span>;
  21. }
  22. }
  23. },
  24. {
  25. field: 'country', title: '国家', minWidth: 'auto', align: 'center',
  26. slots: {
  27. default({ row }: any) {
  28. const country = countryInfoStore.countries.find(c => c.name === row.country);
  29. const color = country ? country.color : '#3875F6';
  30. return <el-tag effect="plain" round
  31. style={ { color: color, borderColor: color } }>{ row.country ? row.country : '--' }</el-tag>;
  32. }
  33. }
  34. },
  35. {
  36. field: 'brandName', title: '品牌名称', minWidth: 'auto', align: 'center',
  37. slots: {
  38. default({ row }: any) {
  39. return <span class={ 'font-medium' }>{ row.brandName ? row.brandName : '--' }</span>;
  40. }
  41. }
  42. },
  43. {
  44. field: 'currencyCode', title: '货币代码', minWidth: 'auto', align: 'center',
  45. slots: {
  46. default({ row }: any) {
  47. return <span class={ 'font-medium' }>{ row.currencyCode ? row.currencyCode : '--' }</span>;
  48. }
  49. }
  50. },
  51. {
  52. field: 'status', title: '状态', minWidth: 'auto', align: 'center',
  53. slots: {
  54. default({ row }: any) {
  55. return <span class={ 'font-medium' }>{ row.status ? row.status : '--' }</span>;
  56. }
  57. }
  58. },
  59. {
  60. field: 'platform', title: '平台', minWidth: 'auto', align: 'center',
  61. slots: {
  62. default({ row }: any) {
  63. return <span class={ 'font-medium' }>{ row.platform ? row.platform : '--' }</span>;
  64. }
  65. }
  66. },
  67. {
  68. field: 'line', title: '线路', minWidth: 'auto', align: 'center',
  69. slots: {
  70. default({ row }: any) {
  71. return <span class={ 'font-medium' }>{ row.line ? row.line : '--' }</span>;
  72. }
  73. }
  74. },
  75. {
  76. field: 'ipaddress', title: 'IP地址', minWidth: 'auto', align: 'center',
  77. slots: {
  78. default({ row }: any) {
  79. return <span class={ 'font-medium' }>{ row.ipaddress ? row.ipaddress : '--' }</span>;
  80. }
  81. }
  82. },
  83. {
  84. field: 'company', title: '公司名称', minWidth: 'auto', align: 'center',
  85. slots: {
  86. default({ row }: any) {
  87. return <span class={ 'font-medium' }>{ row.company ? row.company : '--' }</span>;
  88. }
  89. }
  90. },
  91. {
  92. field: 'companyEnglishName', title: '公司英文名称', minWidth: 'auto', align: 'center',
  93. slots: {
  94. default({ row }: any) {
  95. return <span class={ 'font-medium' }>{ row.companyEnglishName ? row.companyEnglishName : '--' }</span>;
  96. }
  97. }
  98. },
  99. {
  100. field: 'address', title: '公司地址', minWidth: 'auto', align: 'center',
  101. slots: {
  102. default({ row }: any) {
  103. return <span class={ 'font-medium' }>{ row.address ? row.address : '--' }</span>;
  104. }
  105. }
  106. },
  107. {
  108. field: 'juridicalPerson', title: '法人', minWidth: 'auto', align: 'center',
  109. slots: {
  110. default({ row }: any) {
  111. return <span class={ 'font-medium' }>{ row.juridicalPerson ? row.juridicalPerson : '--' }</span>;
  112. }
  113. }
  114. },
  115. {
  116. field: 'juridicalPersonCreditCard', title: '法人信用卡', minWidth: 'auto', align: 'center',
  117. slots: {
  118. default({ row }: any) {
  119. return <span
  120. class={ 'font-medium' }>{ row.juridicalPersonCreditCard ? row.juridicalPersonCreditCard : '--' }</span>;
  121. }
  122. }
  123. },
  124. {
  125. field: 'juridicalPersonCreditCardAddress', title: '法人信用卡地址', minWidth: 'auto', align: 'center',
  126. slots: {
  127. default({ row }: any) {
  128. return <span
  129. class={ 'font-medium' }>{ row.juridicalPersonCreditCardAddress ? row.juridicalPersonCreditCardAddress : '--' }</span>;
  130. }
  131. }
  132. },
  133. {
  134. field: 'receivablesAccount', title: '收款账户', minWidth: 'auto', align: 'center',
  135. slots: {
  136. default({ row }: any) {
  137. return <span class={ 'font-medium' }>{ row.receivablesAccount ? row.receivablesAccount : '--' }</span>;
  138. }
  139. }
  140. },
  141. {
  142. field: 'receivablesAccountCompany', title: '收款账户公司', minWidth: 'auto', align: 'center',
  143. slots: {
  144. default({ row }: any) {
  145. return <span
  146. class={ 'font-medium' }>{ row.receivablesAccountCompany ? row.receivablesAccountCompany : '--' }</span>;
  147. }
  148. }
  149. },
  150. {
  151. field: 'vatNumber', title: 'VAT税号', minWidth: 200, align: 'center',
  152. slots: {
  153. default({ row }: any) {
  154. return <span class={ 'font-medium' }>{ row.vatNumber ? row.vatNumber : '--' }</span>;
  155. }
  156. }
  157. },
  158. {
  159. field: 'vatCompany', title: 'VAT公司', minWidth: 'auto', align: 'center',
  160. slots: {
  161. default({ row }: any) {
  162. return <span class={ 'font-medium' }>{ row.vatCompany ? row.vatCompany : '--' }</span>;
  163. }
  164. }
  165. },
  166. {
  167. field: 'shopPhoneEmail', title: '店铺电话与邮箱', minWidth: 'auto', align: 'center',
  168. slots: {
  169. default({ row }: any) {
  170. return <span class={ 'font-medium' }>{ row.shopPhoneEmail ? row.shopPhoneEmail : '--' }</span>;
  171. }
  172. }
  173. }
  174. ];
  175. export const shopCurrentColumns = [
  176. { type: 'seq', width: 50, align: 'center', fixed: 'left' },
  177. {
  178. field: 'operatorName', title: '运营', minWidth: 'auto', align: 'center', fixed: 'left',
  179. slots: {
  180. default({ row }: any) {
  181. return <span class={ 'font-medium' }>{ row.operatorName ? row.operatorName : '--' }</span>;
  182. }
  183. }
  184. },
  185. {
  186. field: 'platformNumber', title: '平台编号', minWidth: 'auto', align: 'center',
  187. slots: {
  188. default({ row }: any) {
  189. return <span class={ 'font-medium' }>{ row.platformNumber ? row.platformNumber : '--' }</span>;
  190. }
  191. }
  192. },
  193. {
  194. field: 'platformName', title: '平台名称', minWidth: 'auto', align: 'center',
  195. slots: {
  196. default({ row }: any) {
  197. return <span class={ 'font-medium' }>{ row.platformName ? row.platformName : '--' }</span>;
  198. }
  199. }
  200. },
  201. {
  202. field: 'country', title: '国家', minWidth: 'auto', align: 'center',
  203. slots: {
  204. default({ row }: any) {
  205. const country = countryInfoStore.countries.find(c => c.name === row.country);
  206. const color = country ? country.color : '#3875F6';
  207. return <el-tag effect="plain" round
  208. style={ { color: color, borderColor: color } }>{ row.country ? row.country : '--' }</el-tag>;
  209. }
  210. }
  211. },
  212. {
  213. field: 'brandName', title: '品牌名称', minWidth: 'auto', align: 'center',
  214. slots: {
  215. default({ row }: any) {
  216. return <span class={ 'font-medium' }>{ row.brandName ? row.brandName : '--' }</span>;
  217. }
  218. }
  219. },
  220. {
  221. field: 'currencyCode', title: '货币代码', minWidth: 'auto', align: 'center',
  222. slots: {
  223. default({ row }: any) {
  224. return <span class={ 'font-medium' }>{ row.currencyCode ? row.currencyCode : '--' }</span>;
  225. }
  226. }
  227. },
  228. {
  229. field: 'status', title: '状态', minWidth: 'auto', align: 'center',
  230. slots: {
  231. default({ row }: any) {
  232. return (
  233. <el-tag
  234. class="font-medium"
  235. type={ row.status === 1 ? 'success' : 'danger' } // 动态绑定 type
  236. >
  237. { row.status === 1 ? '启用' : '暂停' }
  238. </el-tag>
  239. );
  240. }
  241. }
  242. },
  243. {
  244. field: 'platform', title: '平台', minWidth: 'auto', align: 'center',
  245. slots: {
  246. default({ row }: any) {
  247. return <span class={ 'font-medium' }>{ row.platform ? row.platform : '--' }</span>;
  248. }
  249. }
  250. },
  251. {
  252. field: 'line', title: '线路', minWidth: 'auto', align: 'center',
  253. slots: {
  254. default({ row }: any) {
  255. return <span class={ 'font-medium' }>{ row.line ? row.line : '--' }</span>;
  256. }
  257. }
  258. },
  259. {
  260. field: 'ipaddress', title: 'IP地址', minWidth: 'auto', align: 'center',
  261. slots: {
  262. default({ row }: any) {
  263. return <span class={ 'font-medium' }>{ row.ipaddress ? row.ipaddress : '--' }</span>;
  264. }
  265. }
  266. },
  267. {
  268. field: 'company', title: '公司名称', minWidth: 'auto', align: 'center',
  269. slots: {
  270. default({ row }: any) {
  271. return <span class={ 'font-medium' }>{ row.company ? row.company : '--' }</span>;
  272. }
  273. }
  274. },
  275. {
  276. field: 'companyEnglishName', title: '公司英文名称', minWidth: 'auto', align: 'center',
  277. slots: {
  278. default({ row }: any) {
  279. return <span class={ 'font-medium' }>{ row.companyEnglishName ? row.companyEnglishName : '--' }</span>;
  280. }
  281. }
  282. },
  283. {
  284. field: 'address', title: '公司地址', minWidth: 'auto', align: 'center',
  285. slots: {
  286. default({ row }: any) {
  287. return <span class={ 'font-medium' }>{ row.address ? row.address : '--' }</span>;
  288. }
  289. }
  290. },
  291. {
  292. field: 'juridicalPerson', title: '法人', minWidth: 'auto', align: 'center',
  293. slots: {
  294. default({ row }: any) {
  295. return <span class={ 'font-medium' }>{ row.juridicalPerson ? row.juridicalPerson : '--' }</span>;
  296. }
  297. }
  298. },
  299. {
  300. field: 'juridicalPersonCreditCard', title: '法人信用卡', minWidth: 'auto', align: 'center',
  301. slots: {
  302. default({ row }: any) {
  303. return <span
  304. class={ 'font-medium' }>{ row.juridicalPersonCreditCard ? row.juridicalPersonCreditCard : '--' }</span>;
  305. }
  306. }
  307. },
  308. {
  309. field: 'juridicalPersonCreditCardAddress', title: '法人信用卡地址', minWidth: 'auto', align: 'center',
  310. slots: {
  311. default({ row }: any) {
  312. return <span
  313. class={ 'font-medium' }>{ row.juridicalPersonCreditCardAddress ? row.juridicalPersonCreditCardAddress : '--' }</span>;
  314. }
  315. }
  316. },
  317. {
  318. field: 'receivablesAccount', title: '收款账户', minWidth: 'auto', align: 'center',
  319. slots: {
  320. default({ row }: any) {
  321. return <span class={ 'font-medium' }>{ row.receivablesAccount ? row.receivablesAccount : '--' }</span>;
  322. }
  323. }
  324. },
  325. {
  326. field: 'receivablesAccountCompany', title: '收款账户公司', minWidth: 'auto', align: 'center',
  327. slots: {
  328. default({ row }: any) {
  329. return <span
  330. class={ 'font-medium' }>{ row.receivablesAccountCompany ? row.receivablesAccountCompany : '--' }</span>;
  331. }
  332. }
  333. },
  334. {
  335. field: 'vatNumber', title: 'VAT税号', minWidth: 'auto', align: 'center',
  336. slots: {
  337. default({ row }: any) {
  338. return <span class={ 'font-medium' }>{ row.vatNumber ? row.vatNumber : '--' }</span>;
  339. }
  340. }
  341. },
  342. {
  343. field: 'vatCompany', title: 'VAT公司', minWidth: 'auto', align: 'center',
  344. slots: {
  345. default({ row }: any) {
  346. return <span class={ 'font-medium' }>{ row.vatCompany ? row.vatCompany : '--' }</span>;
  347. }
  348. }
  349. },
  350. {
  351. field: 'shopPhoneAndName', title: '主账户电话', minWidth: 'auto', align: 'center',
  352. slots: {
  353. default({ row }: any) {
  354. console.log('Row data:', row); // 打印行数据,检查是否正确
  355. return <span class={ 'font-medium' }>{ row.shopPhoneAndName !== null ? row.shopPhoneAndName : '--' }</span>;
  356. }
  357. }
  358. },
  359. {
  360. field: 'shopEmail', title: '主账户邮箱', minWidth: 'auto', align: 'center',
  361. slots: {
  362. default({ row }: any) {
  363. return <span class={ 'font-medium' }>{ row.shopEmail ? row.shopEmail : '--' }</span>;
  364. }
  365. }
  366. },
  367. {
  368. field: 'subShopPhoneAndName', title: '子账户电话', minWidth: 'auto', align: 'center',
  369. slots: {
  370. default({ row }: any) {
  371. return <span class={ 'font-medium' }>{ row.subShopPhoneAndName ? row.subShopPhoneAndName : '--' }</span>;
  372. }
  373. }
  374. },
  375. {
  376. field: 'subShopEmail', title: '子账户邮箱', minWidth: 'auto', align: 'center',
  377. slots: {
  378. default({ row }: any) {
  379. return <span class={ 'font-medium' }>{ row.subShopEmail ? row.subShopEmail : '--' }</span>;
  380. }
  381. }
  382. }
  383. ];
  384. export const historyColumns: any = [
  385. { type: 'seq', width: 50, align: 'center', fixed: 'left' },
  386. {
  387. field: 'operatorName', title: '运营', minWidth: 'auto', align: 'center', fixed: 'left',
  388. slots: {
  389. default({ row }: any) {
  390. return <span class={ 'font-medium' }>{ row.operatorName ? row.operatorName : '--' }</span>;
  391. }
  392. }
  393. },
  394. {
  395. field: 'platformNumber', title: '平台编号', minWidth: 'auto', align: 'center',
  396. slots: {
  397. default({ row }: any) {
  398. return <span class={ 'font-medium' }>{ row.platformNumber ? row.platformNumber : '--' }</span>;
  399. }
  400. }
  401. },
  402. {
  403. field: 'platformName', title: '平台名称', minWidth: 'auto', align: 'center',
  404. slots: {
  405. default({ row }: any) {
  406. return <span class={ 'font-medium' }>{ row.platformName ? row.platformName : '--' }</span>;
  407. }
  408. }
  409. },
  410. {
  411. field: 'country', title: '国家', minWidth: 'auto', align: 'center',
  412. slots: {
  413. default({ row }: any) {
  414. const country = countryInfoStore.countries.find(c => c.name === row.country);
  415. const color = country ? country.color : '#3875F6';
  416. return <el-tag effect="plain" round
  417. style={ { color: color, borderColor: color } }>{ row.country ? row.country : '--' }</el-tag>;
  418. }
  419. }
  420. },
  421. {
  422. field: 'brandName', title: '品牌名称', minWidth: 'auto', align: 'center',
  423. slots: {
  424. default({ row }: any) {
  425. return <span class={ 'font-medium' }>{ row.brandName ? row.brandName : '--' }</span>;
  426. }
  427. }
  428. },
  429. {
  430. field: 'currencyCode', title: '货币代码', minWidth: 'auto', align: 'center',
  431. slots: {
  432. default({ row }: any) {
  433. return <span class={ 'font-medium' }>{ row.currencyCode ? row.currencyCode : '--' }</span>;
  434. }
  435. }
  436. },
  437. {
  438. field: 'status', title: '状态', minWidth: 'auto', align: 'center',
  439. slots: {
  440. default({ row }: any) {
  441. return (
  442. <el-tag
  443. class="font-medium"
  444. type={ row.status === 1 ? 'success' : 'danger' } // 动态绑定 type
  445. >
  446. { row.status === 1 ? '启用' : '暂停' }
  447. </el-tag>
  448. );
  449. }
  450. }
  451. },
  452. {
  453. field: 'platform', title: '平台', minWidth: 'auto', align: 'center',
  454. slots: {
  455. default({ row }: any) {
  456. return <span class={ 'font-medium' }>{ row.platform ? row.platform : '--' }</span>;
  457. }
  458. }
  459. },
  460. {
  461. field: 'line', title: '线路', minWidth: 'auto', align: 'center',
  462. slots: {
  463. default({ row }: any) {
  464. return <span class={ 'font-medium' }>{ row.line ? row.line : '--' }</span>;
  465. }
  466. }
  467. },
  468. {
  469. field: 'ipaddress', title: 'IP地址', minWidth: 'auto', align: 'center',
  470. slots: {
  471. default({ row }: any) {
  472. return <span class={ 'font-medium' }>{ row.ipaddress ? row.ipaddress : '--' }</span>;
  473. }
  474. }
  475. },
  476. {
  477. field: 'company', title: '公司名称', minWidth: 'auto', align: 'center',
  478. slots: {
  479. default({ row }: any) {
  480. return <span class={ 'font-medium' }>{ row.company ? row.company : '--' }</span>;
  481. }
  482. }
  483. },
  484. {
  485. field: 'companyEnglishName', title: '公司英文名称', minWidth: 'auto', align: 'center',
  486. slots: {
  487. default({ row }: any) {
  488. return <span class={ 'font-medium' }>{ row.companyEnglishName ? row.companyEnglishName : '--' }</span>;
  489. }
  490. }
  491. },
  492. {
  493. field: 'address', title: '公司地址', minWidth: 'auto', align: 'center',
  494. slots: {
  495. default({ row }: any) {
  496. return <span class={ 'font-medium' }>{ row.address ? row.address : '--' }</span>;
  497. }
  498. }
  499. },
  500. {
  501. field: 'juridicalPerson', title: '法人', minWidth: 'auto', align: 'center',
  502. slots: {
  503. default({ row }: any) {
  504. return <span class={ 'font-medium' }>{ row.juridicalPerson ? row.juridicalPerson : '--' }</span>;
  505. }
  506. }
  507. },
  508. {
  509. field: 'juridicalPersonCreditCard', title: '法人信用卡', minWidth: 'auto', align: 'center',
  510. slots: {
  511. default({ row }: any) {
  512. return <span
  513. class={ 'font-medium' }>{ row.juridicalPersonCreditCard ? row.juridicalPersonCreditCard : '--' }</span>;
  514. }
  515. }
  516. },
  517. {
  518. field: 'juridicalPersonCreditCardAddress', title: '法人信用卡地址', minWidth: 'auto', align: 'center',
  519. slots: {
  520. default({ row }: any) {
  521. return <span
  522. class={ 'font-medium' }>{ row.juridicalPersonCreditCardAddress ? row.juridicalPersonCreditCardAddress : '--' }</span>;
  523. }
  524. }
  525. },
  526. {
  527. field: 'receivablesAccount', title: '收款账户', minWidth: 'auto', align: 'center',
  528. slots: {
  529. default({ row }: any) {
  530. return <span class={ 'font-medium' }>{ row.receivablesAccount ? row.receivablesAccount : '--' }</span>;
  531. }
  532. }
  533. },
  534. {
  535. field: 'receivablesAccountCompany', title: '收款账户公司', minWidth: 'auto', align: 'center',
  536. slots: {
  537. default({ row }: any) {
  538. return <span
  539. class={ 'font-medium' }>{ row.receivablesAccountCompany ? row.receivablesAccountCompany : '--' }</span>;
  540. }
  541. }
  542. },
  543. {
  544. field: 'vatNumber', title: 'VAT税号', minWidth: 'auto', align: 'center',
  545. slots: {
  546. default({ row }: any) {
  547. return <span class={ 'font-medium' }>{ row.vatNumber ? row.vatNumber : '--' }</span>;
  548. }
  549. }
  550. },
  551. {
  552. field: 'vatCompany', title: 'VAT公司', minWidth: 'auto', align: 'center',
  553. slots: {
  554. default({ row }: any) {
  555. return <span class={ 'font-medium' }>{ row.vatCompany ? row.vatCompany : '--' }</span>;
  556. }
  557. }
  558. },
  559. {
  560. field: 'create_datetime', title: '创建时间', minWidth: 'auto', align: 'center',
  561. slots: {
  562. default({ row }: any) {
  563. return <span class={ 'font-medium' }>{ row.create_datetime ? row.create_datetime : '--' }</span>;
  564. }
  565. }
  566. },
  567. {
  568. field: 'approveNum', title: '审批数量', minWidth: 'auto', align: 'center',
  569. slots: {
  570. default({ row }: any) {
  571. return <span class={ 'font-medium' }>{ row.approveNum ? row.approveNum : '--' }</span>;
  572. }
  573. }
  574. },
  575. {
  576. field: 'shopPhoneAndName', title: '主账户电话', minWidth: 'auto', align: 'center',
  577. slots: {
  578. default({ row }: any) {
  579. return <span class={ 'font-medium' }>{ row.shopPhoneAndName !== null ? row.shopPhoneAndName : '--' }</span>;
  580. }
  581. }
  582. },
  583. {
  584. field: 'shopEmail', title: '主账户邮箱', minWidth: 'auto', align: 'center',
  585. slots: {
  586. default({ row }: any) {
  587. return <span class={ 'font-medium' }>{ row.shopEmail ? row.shopEmail : '--' }</span>;
  588. }
  589. }
  590. },
  591. {
  592. field: 'subShopPhoneAndName', title: '子账户电话', minWidth: 'auto', align: 'center',
  593. slots: {
  594. default({ row }: any) {
  595. return <span class={ 'font-medium' }>{ row.subShopPhoneAndName ? row.subShopPhoneAndName : '--' }</span>;
  596. }
  597. }
  598. },
  599. {
  600. field: 'subShopEmail', title: '子账户邮箱', minWidth: 'auto', align: 'center',
  601. slots: {
  602. default({ row }: any) {
  603. return <span class={ 'font-medium' }>{ row.subShopEmail ? row.subShopEmail : '--' }</span>;
  604. }
  605. }
  606. }
  607. ];
  608. export const computerColumns: any = [
  609. { type: 'seq', width: 50, align: 'center', fixed: 'left' },
  610. {
  611. field: 'operatorName', title: '使用人', minWidth: 'auto', align: 'center',
  612. slots: {
  613. default({ row }: any) {
  614. return <span class={ 'font-medium' }>{ row.operatorName ? row.operatorName : '--' }</span>;
  615. }
  616. }
  617. },
  618. {
  619. field: 'computerNumber', title: '电脑编号', minWidth: 'auto', align: 'center',
  620. slots: {
  621. default({ row }: any) {
  622. return <span class={ 'font-medium' }>{ row.computerNumber ? row.computerNumber : '--' }</span>;
  623. }
  624. }
  625. },
  626. {
  627. field: 'computerType', title: '计算机类型', minWidth: 'auto', align: 'center',
  628. slots: {
  629. default({ row }: any) {
  630. return <span class={ 'font-medium' }>{ row.computerType ? row.computerType : '--' }</span>;
  631. }
  632. }
  633. },
  634. {
  635. field: 'station', title: '位置', minWidth: 'auto', align: 'center',
  636. slots: {
  637. default({ row }: any) {
  638. return <span class={ 'font-medium' }>{ row.station ? row.station : '--' }</span>;
  639. }
  640. }
  641. },
  642. {
  643. field: 'ipaddress', title: 'IP地址', minWidth: 'auto', align: 'center',
  644. slots: {
  645. default({ row }: any) {
  646. return <span class={ 'font-medium' }>{ row.ipaddress ? row.ipaddress : '--' }</span>;
  647. }
  648. }
  649. },
  650. {
  651. field: 'macaddress', title: 'MAC地址', minWidth: 'auto', align: 'center',
  652. slots: {
  653. default({ row }: any) {
  654. return <span class={ 'font-medium' }>{ row.macaddress ? row.macaddress : '--' }</span>;
  655. }
  656. }
  657. }
  658. ];