index.vue 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319
  1. <template>
  2. <div class="table-demo">
  3. <bs-table v-bind="tableOptions">
  4. </bs-table>
  5. <add-or-edit-drawer ref="addOrEditDrawerRef"/>
  6. </div>
  7. </template>
  8. <script setup lang="jsx">
  9. import BsTable, {useBsTable} from '/@/components/BsUi/Table/index.js';
  10. import {onMounted, ref} from 'vue';
  11. import AddOrEditDrawer from '/@/views/table-demo/components/AddOrEditDrawer.vue';
  12. import {useRouter} from 'vue-router';
  13. import {DISPLAY_STATE} from "/@/components/BsUi/constant.js";
  14. const addOrEditDrawerRef = ref(null);
  15. const router = useRouter();
  16. onMounted(() => {
  17. refreshTable();
  18. });
  19. const {
  20. tableOptions,
  21. setTablePropsValue: setValue,
  22. getTablePropsValue: getValue,
  23. refreshTable
  24. } = useBsTable({
  25. tableOptions: {
  26. // url: '/supports/project/queryPage',
  27. gridOptions: {
  28. loading: false,
  29. columns: [
  30. {
  31. type: 'seq',
  32. width: 80,
  33. },
  34. {
  35. field: 'name',
  36. title: '项目名称',
  37. width: 150
  38. },
  39. {
  40. field: 'code',
  41. title: '项目ID',
  42. width: 150
  43. },
  44. {
  45. field: 'location',
  46. title: '项目地址',
  47. width: 150
  48. },
  49. {
  50. field: 'estimatedContractAmount',
  51. title: '预计合同金额(元)',
  52. width: 150
  53. },
  54. {
  55. field: 'source',
  56. title: '项目来源',
  57. width: 150
  58. },
  59. {
  60. field: 'type',
  61. title: '项目类型',
  62. width: 150,
  63. slots: {
  64. default({row, column}) {
  65. return <span>{row?.type?.[0].valueName}</span>;
  66. },
  67. },
  68. },
  69. {
  70. field: 'productType',
  71. title: '产品类型',
  72. width: 150
  73. },
  74. {
  75. field: 'estimatedBidOpeningDate',
  76. title: '预计开标日期',
  77. width: 150
  78. },
  79. {
  80. field: 'estimatedBidSubmission',
  81. title: '预计投标',
  82. width: 150
  83. },
  84. {
  85. field: 'salesOwner',
  86. title: '归属营销',
  87. width: 150
  88. },
  89. {
  90. field: 'operator',
  91. title: '操作人',
  92. width: 150
  93. },
  94. {
  95. field: 'operationTime',
  96. title: '操作时间',
  97. width: 150
  98. },
  99. {
  100. cellRender: {
  101. name: 'CellOption',
  102. extraProps: {
  103. buttons: [
  104. {
  105. title: '查看详情',
  106. code: 'view',
  107. display: ({row}) => {
  108. return DISPLAY_STATE.VISIBLE;
  109. },
  110. disabled({row}) {
  111. return false;
  112. },
  113. onClick({row}) {
  114. goDetailPage(row)
  115. },
  116. extraProps: {},
  117. },
  118. ],
  119. },
  120. },
  121. }
  122. ],
  123. },
  124. searchConfig: {
  125. enabled: true,
  126. fieldSpan:
  127. 4,
  128. fields:
  129. [
  130. {
  131. field: 'projectName',
  132. component: 'a-input',
  133. componentProps: {
  134. placeholder: '请输入项目名称',
  135. },
  136. },
  137. {
  138. field: 'projectId',
  139. component: 'a-input',
  140. componentProps: {
  141. placeholder: '请输入项目ID',
  142. },
  143. },
  144. {
  145. field: 'projectAddress',
  146. component: 'a-select',
  147. componentProps: {
  148. placeholder: '请选择地址',
  149. },
  150. },
  151. {
  152. field: 'status',
  153. component: 'a-select',
  154. componentProps: {
  155. placeholder: '请选择项目状态',
  156. },
  157. },
  158. ],
  159. },
  160. data:[
  161. {
  162. id: 'BID20230001',
  163. name: '新能源充电桩建设项目',
  164. code: 'EV-2023-001',
  165. location: '北京市海淀区',
  166. estimatedContractAmount: '15,800,000',
  167. source: '政府招标',
  168. type: [{ valueName: '新能源基建' }],
  169. productType: 'EPC总包',
  170. estimatedBidOpeningDate: '2023-09-15',
  171. estimatedBidSubmission: '2023-09-10',
  172. salesOwner: '张经理',
  173. operator: '投标专员A',
  174. operationTime: '2023-08-01 14:20:00',
  175. status: '标书准备中'
  176. },
  177. {
  178. id: 'BID20230002',
  179. name: '智慧城市数据中心',
  180. code: 'DC-2023-002',
  181. location: '上海市浦东新区',
  182. estimatedContractAmount: '28,500,000',
  183. source: '央企合作',
  184. type: [{ valueName: '新基建' }],
  185. productType: '设备供应',
  186. estimatedBidOpeningDate: '2023-10-20',
  187. estimatedBidSubmission: '2023-10-15',
  188. salesOwner: '李经理',
  189. operator: '投标专员B',
  190. operationTime: '2023-09-05-09:45:00',
  191. status: '技术方案编制'
  192. },
  193. {
  194. id: 'BID20230003',
  195. name: '5G通信基站项目',
  196. code: '5G-2023-003',
  197. location: '广州市天河区',
  198. estimatedContractAmount: '9,200,000',
  199. source: '运营商招标',
  200. type: [{ valueName: '通信基建' }],
  201. productType: '专业服务',
  202. estimatedBidOpeningDate: '2023-08-25',
  203. estimatedBidSubmission: '2023-08-20',
  204. salesOwner: '王总监',
  205. operator: '投标专员C',
  206. operationTime: '2023-07-20-11:30:00',
  207. status: '商务条款确认'
  208. },
  209. {
  210. id: 'BID20230004',
  211. name: '医疗云平台升级',
  212. code: 'MED-2023-004',
  213. location: '深圳市南山区',
  214. estimatedContractAmount: '12,000,000',
  215. source: '医疗机构',
  216. type: [{ valueName: '医疗信息化' }],
  217. productType: '软件服务',
  218. estimatedBidOpeningDate: '2023-11-10',
  219. estimatedBidSubmission: '2023-11-05',
  220. salesOwner: '赵经理',
  221. operator: '投标专员D',
  222. operationTime: '2023-10-01-16:15:00',
  223. status: '预算编制'
  224. },
  225. {
  226. id: 'BID20230005',
  227. name: '工业4.0智能工厂',
  228. code: 'IND-2023-005',
  229. location: '成都市高新区',
  230. estimatedContractAmount: '45,000,000',
  231. source: '制造业龙头',
  232. type: [{ valueName: '工业自动化' }],
  233. productType: '交钥匙工程',
  234. estimatedBidOpeningDate: '2023-07-30',
  235. estimatedBidSubmission: '2023-07-25',
  236. salesOwner: '陈主管',
  237. operator: '投标专员E',
  238. operationTime: '2023-06-20-10:00:00',
  239. status: '资质文件准备'
  240. },
  241. {
  242. id: 'BID20230006',
  243. name: '智慧物流园区',
  244. code: 'LOG-2023-006',
  245. location: '杭州市余杭区',
  246. estimatedContractAmount: '18,600,000',
  247. source: '电商平台',
  248. type: [{ valueName: '物流自动化' }],
  249. productType: '设备集成',
  250. estimatedBidOpeningDate: '2023-08-15',
  251. estimatedBidSubmission: '2023-08-10',
  252. salesOwner: '马总监',
  253. operator: '投标专员F',
  254. operationTime: '2023-07-10-13:30:00',
  255. status: '标书制作完成'
  256. },
  257. {
  258. id: 'BID20230007',
  259. name: '高校智慧校园',
  260. code: 'EDU-2023-007',
  261. location: '武汉市洪山区',
  262. estimatedContractAmount: '8,500,000',
  263. source: '教育机构',
  264. type: [{ valueName: '教育信息化' }],
  265. productType: '综合解决方案',
  266. estimatedBidOpeningDate: '2023-09-05',
  267. estimatedBidSubmission: '2023-08-30',
  268. salesOwner: '徐经理',
  269. operator: '投标专员G',
  270. operationTime: '2023-07-25-09:20:00',
  271. status: '已投标'
  272. },
  273. {
  274. id: 'BID20230008',
  275. name: '金融数据中心',
  276. code: 'FIN-2023-008',
  277. location: '南京市江宁区',
  278. estimatedContractAmount: '32,000,000',
  279. source: '金融机构',
  280. type: [{ valueName: '金融科技' }],
  281. productType: '专业服务',
  282. estimatedBidOpeningDate: '2023-10-30',
  283. estimatedBidSubmission: '2023-10-25',
  284. salesOwner: '刘经理',
  285. operator: '投标专员H',
  286. operationTime: '2023-09-20-15:45:00',
  287. status: '等待开标'
  288. }
  289. ],
  290. pagerConfig: {
  291. enabled: true,
  292. pageSize:
  293. 10,
  294. pageNum:
  295. 1,
  296. total:
  297. 0,
  298. }
  299. ,
  300. },
  301. })
  302. ;
  303. const goDetailPage = (record) => {
  304. console.log(record.id)
  305. router.push({
  306. path: "/market-manage/external-manage/clue-management/view-details",
  307. query: {
  308. id: record.id
  309. }
  310. });
  311. }
  312. </script>
  313. <style scoped lang="scss">
  314. .table-demo {
  315. }
  316. </style>