FormModal.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632
  1. <template>
  2. <BasicModal
  3. v-bind="$attrs"
  4. destroyOnClose
  5. @register="registerModal"
  6. :title="getTitle"
  7. :width="width"
  8. @ok="handleSubmit"
  9. :showFooter="true"
  10. >
  11. <div class="!pl-8 !pt-4">
  12. <BasicForm @register="registerForm" layout="vertical" />
  13. <div v-if="type != DiagnosisEnum.firstDialysis_field">
  14. <div class="mb-4">
  15. <a-button type="primary" shape="round" @click="handleAdd">
  16. <template #icon>
  17. <PlusOutlined />
  18. </template>
  19. 添加
  20. </a-button>
  21. </div>
  22. <!-- 过敏原添加 -->
  23. <div v-if="type == DiagnosisEnum.allergic_field">
  24. <BasicTable @register="registerTable" @edit-change="callEditChange">
  25. <template #bodyCell="{ column, record }">
  26. <template v-if="column.key === 'action'">
  27. <TableAction :actions="createActions(record, column)" />
  28. </template>
  29. </template>
  30. </BasicTable>
  31. </div>
  32. <div v-if="type == DiagnosisEnum.operation_field">
  33. <BasicTable @register="registerTableOperation" @edit-change="callEditChange">
  34. <template #bodyCell="{ column, record }">
  35. <template v-if="column.key === 'action'">
  36. <TableAction :actions="createActions(record, column)" />
  37. </template>
  38. </template>
  39. </BasicTable>
  40. </div>
  41. <div v-if="type == DiagnosisEnum.contagious_field">
  42. <BasicTable @register="registerTableContagious" @edit-change="callEditChange">
  43. <template #bodyCell="{ column, record }">
  44. <template v-if="column.key === 'action'">
  45. <TableAction :actions="createActions(record, column)" />
  46. </template>
  47. </template>
  48. </BasicTable>
  49. </div>
  50. <div
  51. v-if="
  52. type == DiagnosisEnum.complications_field ||
  53. type == DiagnosisEnum.clinic_field ||
  54. type == DiagnosisEnum.pathological_field ||
  55. type == DiagnosisEnum.ckd_field
  56. "
  57. >
  58. <BasicTable @register="registerTableMulti" @edit-change="callEditChange">
  59. <template #bodyCell="{ column, record }">
  60. <template v-if="column.key === 'action'">
  61. <TableAction :actions="createActions(record, column)" />
  62. </template>
  63. </template>
  64. </BasicTable>
  65. </div>
  66. <div v-if="type == DiagnosisEnum.elseRemark_field">
  67. <BasicTable @register="registerTableOther" @edit-change="callEditChange">
  68. <template #bodyCell="{ column, record }">
  69. <template v-if="column.key === 'action'">
  70. <TableAction :actions="createActions(record, column)" />
  71. </template>
  72. </template>
  73. </BasicTable>
  74. </div>
  75. </div>
  76. <!-- {{ type }} -->
  77. </div>
  78. </BasicModal>
  79. </template>
  80. <script lang="ts" setup>
  81. import { ref, unref, nextTick, reactive } from 'vue';
  82. import { BasicModal, useModalInner } from '/@/components/Modal';
  83. import { BasicForm, useForm } from '/@/components/Form';
  84. import { BasicTable, useTable, TableAction, BasicColumn, ActionItem } from '/@/components/Table';
  85. import { PlusOutlined } from '@ant-design/icons-vue';
  86. import { useMessage } from '/@/hooks/web/useMessage';
  87. import {
  88. dataFormSchema,
  89. columnsAllergic,
  90. DiagnosisEnum,
  91. columnsMulti,
  92. columnsContagious,
  93. columnsOther,
  94. columnsOperation,
  95. } from './data';
  96. import {
  97. archivesDiagnosisHistorySingleAddOrEdit,
  98. archivesDiagnosisHistoryMultiAddOrEdit,
  99. } from '/@/api/biz/archives/diagnosisHistoryApi';
  100. import { nanoid } from 'nanoid';
  101. import { listDictModel, listDictModelBatch } from '@/api/common';
  102. import dayjs from 'dayjs';
  103. const emit = defineEmits(['success', 'register']);
  104. const getTitle = ref('编辑');
  105. const width = '850px';
  106. const isSingle = ref(true);
  107. const type = ref('');
  108. const typeOptions = ref([]);
  109. const rowId = ref('');
  110. const patientBasicId = ref('');
  111. // 表格数据
  112. // 过敏史
  113. const tableDataAllergic = ref([]);
  114. const tableRecordType = ref('');
  115. // 传染病史
  116. const tableDataContagious = ref([]);
  117. const tableDataOperation = ref([]);
  118. const tableDataMulti = ref([]);
  119. const tableDataOther = ref([]);
  120. const { createMessage } = useMessage();
  121. const bizDictOptions = reactive<any>({});
  122. const bizDictData = ref([
  123. { key: 'allergic', dictCode: 'allergic' },
  124. { key: 'allergic_food', dictCode: 'allergic_food' },
  125. { key: 'allergic_touch', dictCode: 'allergic_touch' },
  126. { key: 'allergic_air', dictCode: 'allergic_air' },
  127. { key: 'allergic_inject', dictCode: 'allergic_inject' },
  128. { key: 'contagious', dictCode: 'contagious' },
  129. { key: 'pb_epidemic', dictCode: 'pb_epidemic' },
  130. { key: 'complications', dictCode: 'complications' },
  131. { key: 'complications_breath', dictCode: 'complications_breath' },
  132. { key: 'complications_blood', dictCode: 'complications_blood' },
  133. { key: 'complications_incretion', dictCode: 'complications_incretion' },
  134. { key: 'clinic', dictCode: 'clinic' },
  135. { key: 'clinic_breath', dictCode: 'clinic_breath' },
  136. { key: 'clinic_heart', dictCode: 'clinic_heart' },
  137. { key: 'clinic_blood', dictCode: 'clinic_blood' },
  138. { key: 'clinic_hbgr', dictCode: 'clinic_hbgr' },
  139. { key: 'pathological', dictCode: 'pathological' },
  140. { key: 'pathological_breath', dictCode: 'pathological_breath' },
  141. { key: 'pathological_heart', dictCode: 'pathological_heart' },
  142. { key: 'pathological_blood', dictCode: 'pathological_blood' },
  143. { key: 'pathological_hbgr', dictCode: 'pathological_hbgr' },
  144. { key: 'ckd', dictCode: 'ckd' },
  145. { key: 'ckd_breath', dictCode: 'ckd_breath' },
  146. { key: 'ckd_heart', dictCode: 'ckd_heart' },
  147. { key: 'ckd_blood', dictCode: 'ckd_blood' },
  148. { key: 'ckd_hbgr', dictCode: 'ckd_hbgr' },
  149. ]);
  150. const [registerModal, { setModalProps, closeModal }] = useModalInner(async data => {
  151. await resetFields();
  152. setModalProps({ confirmLoading: false });
  153. console.log('🚀 ~ file: FormModal.vue:52 ~ data:', data);
  154. const res = await listDictModelBatch(bizDictData.value.map(ele => ele.dictCode));
  155. for (const i in res) {
  156. const filter = bizDictData.value.filter(ele => ele.dictCode == i)[0];
  157. bizDictOptions[filter.key] = res[i];
  158. }
  159. tableDataAllergic.value = [];
  160. type.value = data.type || '';
  161. typeOptions.value = data.dictOptions;
  162. rowId.value = data?.id || '';
  163. patientBasicId.value = data?.patientBasicId || '';
  164. isSingle.value = data.isSingle;
  165. getTitle.value = `${data.id ? '编辑' : '新增'} — ${data.title}`;
  166. // 其他诊断
  167. if (type.value == DiagnosisEnum.elseRemark_field) {
  168. tableDataOther.value =
  169. (data.multiContent.length &&
  170. data.multiContent.map(ele => {
  171. return {
  172. remark: ele.remark,
  173. id: nanoid(5),
  174. };
  175. })) ||
  176. [];
  177. console.log('🚀 ~ file: FormModal.vue:179 ~ tableDataOther.value:', tableDataOther.value);
  178. await nextTick();
  179. await setTableDataOther(tableDataOther.value);
  180. }
  181. // 过敏原
  182. if (type.value == DiagnosisEnum.allergic_field) {
  183. tableDataAllergic.value =
  184. (data.content.length &&
  185. data.content.map(ele => {
  186. const nameOptions = bizDictOptions[ele.contentType];
  187. return {
  188. type: type.value,
  189. contentType: ele.contentType,
  190. typeOptions: typeOptions.value,
  191. name: ele.multiName,
  192. nameOptions,
  193. id: nanoid(5),
  194. };
  195. })) ||
  196. [];
  197. await nextTick();
  198. await setTableDataAllergic(tableDataAllergic.value);
  199. }
  200. // 手术史
  201. if (type.value == DiagnosisEnum.operation_field) {
  202. tableDataOperation.value =
  203. (data.content.length &&
  204. data.content.map(ele => {
  205. return {
  206. type: type.value,
  207. singleName: ele.singleName,
  208. recordTime: dayjs(ele.recordTime).format('YYYY-MM-DD'),
  209. remark: ele.remark,
  210. id: nanoid(5),
  211. };
  212. })) ||
  213. [];
  214. await nextTick();
  215. await setTableDataOperation(tableDataOperation.value);
  216. }
  217. // 传染病史
  218. if (type.value == DiagnosisEnum.contagious_field) {
  219. console.log('🚀 ~ file: FormModal.vue:178 ~ data.data:', data);
  220. tableDataContagious.value =
  221. (data.content.length &&
  222. data.content.map(ele => {
  223. return {
  224. type: type.value,
  225. contentType: ele.contentType,
  226. typeOptions: typeOptions.value,
  227. startTime: ele.startTime ? dayjs(ele.startTime).format('YYYY-MM-DD') : '',
  228. endTime: ele.endTime ? dayjs(ele.endTime).format('YYYY-MM-DD') : '',
  229. status: ele.status,
  230. remark: ele.remark,
  231. id: nanoid(5),
  232. };
  233. })) ||
  234. [];
  235. await nextTick();
  236. await setTableDataContagious(tableDataContagious.value);
  237. }
  238. // 合并症类型、临床诊断类型、病理类型、CKD类型
  239. if (
  240. type.value == DiagnosisEnum.complications_field ||
  241. type.value == DiagnosisEnum.clinic_field ||
  242. type.value == DiagnosisEnum.pathological_field ||
  243. type.value == DiagnosisEnum.ckd_field
  244. ) {
  245. console.log('🚀 ~ file: FormModal.vue:178 ~ data.data:', data);
  246. tableDataMulti.value =
  247. (data.multiContent.length &&
  248. data.multiContent.map(ele => {
  249. const nameOptions = bizDictOptions[ele.type];
  250. return {
  251. type: type.value,
  252. contentType: ele.type,
  253. typeOptions: typeOptions.value,
  254. name: ele.multiName || [],
  255. nameOptions,
  256. id: nanoid(5),
  257. };
  258. })) ||
  259. [];
  260. await nextTick();
  261. await setTableDataMulti(tableDataMulti.value);
  262. }
  263. let resData = {} as any;
  264. // resData = {
  265. // recordTime: data.isSingle ? data.content?.recordTime : '',
  266. // name: data.isSingle ? useUser.getUserInfo?.nickname,
  267. // type: type.value,
  268. // };
  269. resData = {
  270. recordTime: data.updateTime
  271. ? dayjs(data.updateTime).format('YYYY-MM-DD')
  272. : dayjs().format('YYYY-MM-DD'),
  273. name: data.updatorName,
  274. type: type.value,
  275. };
  276. // 首次透析方式
  277. if (type.value == DiagnosisEnum.firstDialysis_field) {
  278. resData.firstDialysisType = data.content[0]?.contentType;
  279. resData.firstDialysisDate = dayjs(data.content[0]?.recordTime || Date.now()).format(
  280. 'YYYY-MM-DD',
  281. );
  282. resData.recordTime = dayjs(data.updateTime || Date.now()).format('YYYY-MM-DD');
  283. }
  284. await setFieldsValue({
  285. ...resData,
  286. });
  287. });
  288. const [registerForm, { setFieldsValue, resetFields, validate }] = useForm({
  289. labelWidth: 100,
  290. schemas: dataFormSchema,
  291. showActionButtonGroup: false,
  292. actionColOptions: {
  293. span: 23,
  294. },
  295. baseColProps: {
  296. span: 12,
  297. },
  298. wrapperCol: {
  299. span: 22,
  300. },
  301. });
  302. const useTbaleObj = {
  303. rowKey: 'id',
  304. showIndexColumn: false,
  305. bordered: true,
  306. striped: false,
  307. pagination: false,
  308. maxHeight: 200,
  309. actionColumn: {
  310. width: 40,
  311. title: '操作',
  312. dataIndex: 'action',
  313. },
  314. };
  315. // 过敏史 allergic
  316. const [
  317. registerTable,
  318. { setTableData: setTableDataAllergic, getDataSource: getDataSourceAllergic },
  319. ] = useTable({
  320. ...useTbaleObj,
  321. dataSource: tableDataAllergic.value,
  322. columns: columnsAllergic,
  323. });
  324. // 传染病 contagious
  325. const [
  326. registerTableContagious,
  327. { setTableData: setTableDataContagious, getDataSource: getDataSourceContagious },
  328. ] = useTable({
  329. ...useTbaleObj,
  330. dataSource: tableDataContagious.value,
  331. columns: columnsContagious,
  332. });
  333. const [
  334. registerTableOperation,
  335. { setTableData: setTableDataOperation, getDataSource: getDataSourceOperation },
  336. ] = useTable({
  337. ...useTbaleObj,
  338. dataSource: tableDataOperation.value,
  339. columns: columnsOperation,
  340. });
  341. // 治疗前合并症 contagious
  342. const [
  343. registerTableMulti,
  344. { setTableData: setTableDataMulti, getDataSource: getDataSourceMulti },
  345. ] = useTable({
  346. ...useTbaleObj,
  347. dataSource: tableDataMulti.value || [],
  348. columns: columnsMulti,
  349. });
  350. // 其他
  351. const [
  352. registerTableOther,
  353. { setTableData: setTableDataOther, getDataSource: getDataSourceOther },
  354. ] = useTable({
  355. ...useTbaleObj,
  356. dataSource: tableDataOther.value,
  357. columns: columnsOther,
  358. });
  359. // 创建 删除 按钮
  360. function createActions(record, column: BasicColumn): ActionItem[] {
  361. return [
  362. {
  363. auth: 'archives:diagnosisHistory:edit',
  364. icon: 'icon-xt-details_delete_default|iconfont',
  365. tooltip: '删除',
  366. popConfirm: {
  367. title: '是否取消删除',
  368. confirm: handleDel.bind(null, record, column),
  369. },
  370. },
  371. ];
  372. }
  373. async function handleAdd() {
  374. if (type.value == DiagnosisEnum.allergic_field) {
  375. tableDataAllergic.value.push({
  376. type: type.value,
  377. contentType: '',
  378. typeOptions: typeOptions.value,
  379. name: [],
  380. nameOptions: [],
  381. id: nanoid(5),
  382. });
  383. console.log(
  384. '🚀 ~ file: FormModal.vue:135 ~ handleAdd ~ tableDataAllergic.value:',
  385. tableDataAllergic.value,
  386. );
  387. await nextTick();
  388. await setTableDataAllergic(tableDataAllergic.value);
  389. }
  390. if (type.value == DiagnosisEnum.operation_field) {
  391. tableDataOperation.value.push({
  392. type: type.value,
  393. singleName: '',
  394. recordTime: dayjs().format('YYYY-MM-DD'),
  395. remark: '',
  396. id: nanoid(5),
  397. });
  398. console.log(
  399. '🚀 ~ file: FormModal.vue:135 ~ handleAdd ~ tableDataOperation.value:',
  400. tableDataOperation.value,
  401. );
  402. await nextTick();
  403. await setTableDataOperation(tableDataOperation.value);
  404. }
  405. if (type.value == DiagnosisEnum.contagious_field) {
  406. tableDataContagious.value.push({
  407. type: type.value,
  408. contentType: '',
  409. startTime: '',
  410. endTime: '',
  411. status: 'contagious_status_alive',
  412. remark: '',
  413. id: nanoid(5),
  414. });
  415. console.log(
  416. '🚀 ~ file: FormModal.vue:135 ~ handleAdd ~ tableDataAllergic.value:',
  417. tableDataContagious.value,
  418. );
  419. await nextTick();
  420. await setTableDataContagious(tableDataContagious.value);
  421. }
  422. if (
  423. type.value == DiagnosisEnum.complications_field ||
  424. type.value == DiagnosisEnum.clinic_field ||
  425. type.value == DiagnosisEnum.pathological_field ||
  426. type.value == DiagnosisEnum.ckd_field
  427. ) {
  428. tableDataMulti.value.push({
  429. type: type.value,
  430. contentType: '',
  431. typeOptions: typeOptions.value,
  432. name: [],
  433. nameOptions: [],
  434. id: nanoid(5),
  435. });
  436. console.log(
  437. '🚀 ~ file: FormModal.vue:135 ~ handleAdd ~ tableDataAllergic.value:',
  438. tableDataMulti.value,
  439. );
  440. await nextTick();
  441. await setTableDataMulti(tableDataMulti.value);
  442. }
  443. if (type.value == DiagnosisEnum.elseRemark_field) {
  444. tableDataOther.value.push({
  445. type: type.value,
  446. remark: '',
  447. id: nanoid(5),
  448. });
  449. console.log(
  450. '🚀 ~ file: FormModal.vue:135 ~ handleAdd ~ tableDataAllergic.value:',
  451. tableDataOther.value,
  452. );
  453. await nextTick();
  454. await setTableDataOther(tableDataOther.value);
  455. }
  456. }
  457. async function handleDel(record) {
  458. console.log('🚀 ~ file: FormModal.vue:488 ~ handleDel ~ record:', record);
  459. let data = [];
  460. let index = null;
  461. if (type.value == DiagnosisEnum.operation_field) {
  462. data = getDataSourceOperation();
  463. index = data.findIndex(item => item.id === record.id);
  464. tableDataOperation.value.splice(index, 1);
  465. setTableDataOperation(tableDataOperation.value);
  466. }
  467. if (type.value == DiagnosisEnum.allergic_field) {
  468. data = getDataSourceAllergic();
  469. index = data.findIndex(item => item.id === record.id);
  470. tableDataAllergic.value.splice(index, 1);
  471. setTableDataAllergic(tableDataAllergic.value);
  472. }
  473. if (type.value == DiagnosisEnum.contagious_field) {
  474. data = getDataSourceContagious();
  475. index = data.findIndex(item => item.id === record.id);
  476. tableDataContagious.value.splice(index, 1);
  477. setTableDataContagious(tableDataContagious.value);
  478. }
  479. if (type.value == DiagnosisEnum.elseRemark_field) {
  480. data = getDataSourceOther();
  481. index = data.findIndex(item => item.id === record.id);
  482. tableDataOther.value.splice(index, 1);
  483. setTableDataOther(tableDataOther.value);
  484. }
  485. if (!isSingle.value && type.value != DiagnosisEnum.elseRemark_field) {
  486. data = getDataSourceMulti();
  487. index = data.findIndex(item => item.id === record.id);
  488. tableDataMulti.value.splice(index, 1);
  489. setTableDataMulti(tableDataMulti.value);
  490. }
  491. }
  492. // 提交按钮事件
  493. async function handleSubmit() {
  494. try {
  495. const values = await validate();
  496. const sendData = {
  497. content: [],
  498. multiContent: [],
  499. id: isSingle.value ? '' : rowId.value,
  500. patientBasicId: patientBasicId.value,
  501. type: type.value,
  502. };
  503. setModalProps({ confirmLoading: true });
  504. // 首次透析
  505. if (type.value == DiagnosisEnum.firstDialysis_field) {
  506. sendData.content = [
  507. {
  508. recordTime: values.firstDialysisDate,
  509. contentType: values.firstDialysisType,
  510. },
  511. ];
  512. }
  513. // 手术史
  514. if (type.value == DiagnosisEnum.operation_field) {
  515. sendData.content = tableDataOperation.value.map(ele => {
  516. return {
  517. singleName: ele.singleName,
  518. recordTime: ele.recordTime,
  519. remark: ele.remark,
  520. };
  521. });
  522. }
  523. // 过敏史
  524. if (type.value == DiagnosisEnum.allergic_field) {
  525. sendData.content = tableDataAllergic.value.map(ele => {
  526. return {
  527. contentType: ele.contentType,
  528. multiName: ele.name,
  529. };
  530. });
  531. }
  532. // 传染病史
  533. if (type.value == DiagnosisEnum.contagious_field) {
  534. sendData.content = tableDataContagious.value.map(ele => {
  535. return {
  536. contentType: ele.contentType,
  537. status: ele.status,
  538. startTime: ele.startTime,
  539. endTime: ele.endTime,
  540. remark: ele.remark,
  541. };
  542. });
  543. }
  544. // 合并症类型、临床诊断类型、病理类型、CKD类型 编辑(添加)
  545. if (
  546. type.value == DiagnosisEnum.complications_field ||
  547. type.value == DiagnosisEnum.clinic_field ||
  548. type.value == DiagnosisEnum.pathological_field ||
  549. type.value == DiagnosisEnum.ckd_field
  550. ) {
  551. sendData.multiContent = tableDataMulti.value.map(ele => {
  552. return {
  553. type: ele.contentType,
  554. multiName: ele.name,
  555. remark: '',
  556. };
  557. });
  558. }
  559. // 其他编辑(添加)
  560. if (type.value == DiagnosisEnum.elseRemark_field) {
  561. sendData.multiContent = tableDataOther.value.map(ele => {
  562. return {
  563. type: '',
  564. multiName: [],
  565. remark: ele.remark,
  566. };
  567. });
  568. }
  569. console.log('🚀 ~ file: FormModal.vue:528 ~ handleSubmit ~ sendData:', sendData);
  570. unref(isSingle)
  571. ? await archivesDiagnosisHistorySingleAddOrEdit(sendData)
  572. : await archivesDiagnosisHistoryMultiAddOrEdit(sendData);
  573. createMessage.success(`${rowId.value ? '编辑' : '新增'}成功!`);
  574. closeModal();
  575. emit('success');
  576. } finally {
  577. setModalProps({ confirmLoading: false });
  578. }
  579. }
  580. // 回调
  581. async function callEditChange({ record }) {
  582. // console.log('🚀 ~ file: FormModal.vue:638 ~ callEditChange ~ record:', record);
  583. // console.log(
  584. // '🚀 ~ file: FormModal.vue:648 ~ callEditChange ~ tableRecordType.value:',
  585. // tableRecordType.value,
  586. // );
  587. if (
  588. record.type == DiagnosisEnum.complications_field ||
  589. record.type == DiagnosisEnum.clinic_field ||
  590. record.type == DiagnosisEnum.pathological_field ||
  591. record.type == DiagnosisEnum.ckd_field ||
  592. record.type == DiagnosisEnum.allergic_field
  593. ) {
  594. if (tableRecordType.value != record.contentType || !record.nameOptions.length) {
  595. tableRecordType.value = record.contentType;
  596. let res = [];
  597. res = await listDictModel({ dictCode: record.contentType });
  598. record.nameOptions = res;
  599. record.name = [];
  600. }
  601. if (record.name.length > 3) {
  602. // createMessage.error('每次最多选择4个');
  603. record.nameOptions = record.nameOptions.map(ele => {
  604. if (!record.name.includes(ele.value)) {
  605. ele.disabled = true;
  606. }
  607. return ele;
  608. });
  609. } else {
  610. record.nameOptions = record.nameOptions.map(ele => {
  611. ele.disabled = false;
  612. return ele;
  613. });
  614. }
  615. }
  616. }
  617. </script>
  618. <style lang="less" scoped>
  619. ::v-deep(.ant-btn-link) {
  620. color: rgb(61 65 85 / 100%);
  621. }
  622. ::v-deep(.ant-table-body) {
  623. height: 200px !important;
  624. }
  625. </style>