FormModal.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630
  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().format('YYYY-MM-DD');
  280. resData.recordTime = dayjs(data.content[0]?.recordTime).format('YYYY-MM-DD');
  281. }
  282. await setFieldsValue({
  283. ...resData,
  284. });
  285. });
  286. const [registerForm, { setFieldsValue, resetFields, validate }] = useForm({
  287. labelWidth: 100,
  288. schemas: dataFormSchema,
  289. showActionButtonGroup: false,
  290. actionColOptions: {
  291. span: 23,
  292. },
  293. baseColProps: {
  294. span: 12,
  295. },
  296. wrapperCol: {
  297. span: 22,
  298. },
  299. });
  300. const useTbaleObj = {
  301. rowKey: 'id',
  302. showIndexColumn: false,
  303. bordered: true,
  304. striped: false,
  305. pagination: false,
  306. maxHeight: 200,
  307. actionColumn: {
  308. width: 40,
  309. title: '操作',
  310. dataIndex: 'action',
  311. },
  312. };
  313. // 过敏史 allergic
  314. const [
  315. registerTable,
  316. { setTableData: setTableDataAllergic, getDataSource: getDataSourceAllergic },
  317. ] = useTable({
  318. ...useTbaleObj,
  319. dataSource: tableDataAllergic.value,
  320. columns: columnsAllergic,
  321. });
  322. // 传染病 contagious
  323. const [
  324. registerTableContagious,
  325. { setTableData: setTableDataContagious, getDataSource: getDataSourceContagious },
  326. ] = useTable({
  327. ...useTbaleObj,
  328. dataSource: tableDataContagious.value,
  329. columns: columnsContagious,
  330. });
  331. const [
  332. registerTableOperation,
  333. { setTableData: setTableDataOperation, getDataSource: getDataSourceOperation },
  334. ] = useTable({
  335. ...useTbaleObj,
  336. dataSource: tableDataOperation.value,
  337. columns: columnsOperation,
  338. });
  339. // 治疗前合并症 contagious
  340. const [
  341. registerTableMulti,
  342. { setTableData: setTableDataMulti, getDataSource: getDataSourceMulti },
  343. ] = useTable({
  344. ...useTbaleObj,
  345. dataSource: tableDataMulti.value || [],
  346. columns: columnsMulti,
  347. });
  348. // 其他
  349. const [
  350. registerTableOther,
  351. { setTableData: setTableDataOther, getDataSource: getDataSourceOther },
  352. ] = useTable({
  353. ...useTbaleObj,
  354. dataSource: tableDataOther.value,
  355. columns: columnsOther,
  356. });
  357. // 创建 删除 按钮
  358. function createActions(record, column: BasicColumn): ActionItem[] {
  359. return [
  360. {
  361. auth: 'archives:diagnosisHistory:edit',
  362. icon: 'icon-xt-details_delete_default|iconfont',
  363. tooltip: '删除',
  364. popConfirm: {
  365. title: '是否取消删除',
  366. confirm: handleDel.bind(null, record, column),
  367. },
  368. },
  369. ];
  370. }
  371. async function handleAdd() {
  372. if (type.value == DiagnosisEnum.allergic_field) {
  373. tableDataAllergic.value.push({
  374. type: type.value,
  375. contentType: '',
  376. typeOptions: typeOptions.value,
  377. name: [],
  378. nameOptions: [],
  379. id: nanoid(5),
  380. });
  381. console.log(
  382. '🚀 ~ file: FormModal.vue:135 ~ handleAdd ~ tableDataAllergic.value:',
  383. tableDataAllergic.value,
  384. );
  385. await nextTick();
  386. await setTableDataAllergic(tableDataAllergic.value);
  387. }
  388. if (type.value == DiagnosisEnum.operation_field) {
  389. tableDataOperation.value.push({
  390. type: type.value,
  391. singleName: '',
  392. recordTime: dayjs().format('YYYY-MM-DD'),
  393. remark: '',
  394. id: nanoid(5),
  395. });
  396. console.log(
  397. '🚀 ~ file: FormModal.vue:135 ~ handleAdd ~ tableDataOperation.value:',
  398. tableDataOperation.value,
  399. );
  400. await nextTick();
  401. await setTableDataOperation(tableDataOperation.value);
  402. }
  403. if (type.value == DiagnosisEnum.contagious_field) {
  404. tableDataContagious.value.push({
  405. type: type.value,
  406. contentType: '',
  407. startTime: '',
  408. endTime: '',
  409. status: 'contagious_status_alive',
  410. remark: '',
  411. id: nanoid(5),
  412. });
  413. console.log(
  414. '🚀 ~ file: FormModal.vue:135 ~ handleAdd ~ tableDataAllergic.value:',
  415. tableDataContagious.value,
  416. );
  417. await nextTick();
  418. await setTableDataContagious(tableDataContagious.value);
  419. }
  420. if (
  421. type.value == DiagnosisEnum.complications_field ||
  422. type.value == DiagnosisEnum.clinic_field ||
  423. type.value == DiagnosisEnum.pathological_field ||
  424. type.value == DiagnosisEnum.ckd_field
  425. ) {
  426. tableDataMulti.value.push({
  427. type: type.value,
  428. contentType: '',
  429. typeOptions: typeOptions.value,
  430. name: [],
  431. nameOptions: [],
  432. id: nanoid(5),
  433. });
  434. console.log(
  435. '🚀 ~ file: FormModal.vue:135 ~ handleAdd ~ tableDataAllergic.value:',
  436. tableDataMulti.value,
  437. );
  438. await nextTick();
  439. await setTableDataMulti(tableDataMulti.value);
  440. }
  441. if (type.value == DiagnosisEnum.elseRemark_field) {
  442. tableDataOther.value.push({
  443. type: type.value,
  444. remark: '',
  445. id: nanoid(5),
  446. });
  447. console.log(
  448. '🚀 ~ file: FormModal.vue:135 ~ handleAdd ~ tableDataAllergic.value:',
  449. tableDataOther.value,
  450. );
  451. await nextTick();
  452. await setTableDataOther(tableDataOther.value);
  453. }
  454. }
  455. async function handleDel(record) {
  456. console.log('🚀 ~ file: FormModal.vue:488 ~ handleDel ~ record:', record);
  457. let data = [];
  458. let index = null;
  459. if (type.value == DiagnosisEnum.operation_field) {
  460. data = getDataSourceOperation();
  461. index = data.findIndex(item => item.id === record.id);
  462. tableDataOperation.value.splice(index, 1);
  463. setTableDataOperation(tableDataOperation.value);
  464. }
  465. if (type.value == DiagnosisEnum.allergic_field) {
  466. data = getDataSourceAllergic();
  467. index = data.findIndex(item => item.id === record.id);
  468. tableDataAllergic.value.splice(index, 1);
  469. setTableDataAllergic(tableDataAllergic.value);
  470. }
  471. if (type.value == DiagnosisEnum.contagious_field) {
  472. data = getDataSourceContagious();
  473. index = data.findIndex(item => item.id === record.id);
  474. tableDataContagious.value.splice(index, 1);
  475. setTableDataContagious(tableDataContagious.value);
  476. }
  477. if (type.value == DiagnosisEnum.elseRemark_field) {
  478. data = getDataSourceOther();
  479. index = data.findIndex(item => item.id === record.id);
  480. tableDataOther.value.splice(index, 1);
  481. setTableDataOther(tableDataOther.value);
  482. }
  483. if (!isSingle.value && type.value != DiagnosisEnum.elseRemark_field) {
  484. data = getDataSourceMulti();
  485. index = data.findIndex(item => item.id === record.id);
  486. tableDataMulti.value.splice(index, 1);
  487. setTableDataMulti(tableDataMulti.value);
  488. }
  489. }
  490. // 提交按钮事件
  491. async function handleSubmit() {
  492. try {
  493. const values = await validate();
  494. const sendData = {
  495. content: [],
  496. multiContent: [],
  497. id: isSingle.value ? '' : rowId.value,
  498. patientBasicId: patientBasicId.value,
  499. type: type.value,
  500. };
  501. setModalProps({ confirmLoading: true });
  502. // 首次透析
  503. if (type.value == DiagnosisEnum.firstDialysis_field) {
  504. sendData.content = [
  505. {
  506. recordTime: values.firstDialysisDate,
  507. contentType: values.firstDialysisType,
  508. },
  509. ];
  510. }
  511. // 手术史
  512. if (type.value == DiagnosisEnum.operation_field) {
  513. sendData.content = tableDataOperation.value.map(ele => {
  514. return {
  515. singleName: ele.singleName,
  516. recordTime: ele.recordTime,
  517. remark: ele.remark,
  518. };
  519. });
  520. }
  521. // 过敏史
  522. if (type.value == DiagnosisEnum.allergic_field) {
  523. sendData.content = tableDataAllergic.value.map(ele => {
  524. return {
  525. contentType: ele.contentType,
  526. multiName: ele.name,
  527. };
  528. });
  529. }
  530. // 传染病史
  531. if (type.value == DiagnosisEnum.contagious_field) {
  532. sendData.content = tableDataContagious.value.map(ele => {
  533. return {
  534. contentType: ele.contentType,
  535. status: ele.status,
  536. startTime: ele.startTime,
  537. endTime: ele.endTime,
  538. remark: ele.remark,
  539. };
  540. });
  541. }
  542. // 合并症类型、临床诊断类型、病理类型、CKD类型 编辑(添加)
  543. if (
  544. type.value == DiagnosisEnum.complications_field ||
  545. type.value == DiagnosisEnum.clinic_field ||
  546. type.value == DiagnosisEnum.pathological_field ||
  547. type.value == DiagnosisEnum.ckd_field
  548. ) {
  549. sendData.multiContent = tableDataMulti.value.map(ele => {
  550. return {
  551. type: ele.contentType,
  552. multiName: ele.name,
  553. remark: '',
  554. };
  555. });
  556. }
  557. // 其他编辑(添加)
  558. if (type.value == DiagnosisEnum.elseRemark_field) {
  559. sendData.multiContent = tableDataOther.value.map(ele => {
  560. return {
  561. type: '',
  562. multiName: [],
  563. remark: ele.remark,
  564. };
  565. });
  566. }
  567. console.log('🚀 ~ file: FormModal.vue:528 ~ handleSubmit ~ sendData:', sendData);
  568. unref(isSingle)
  569. ? await archivesDiagnosisHistorySingleAddOrEdit(sendData)
  570. : await archivesDiagnosisHistoryMultiAddOrEdit(sendData);
  571. createMessage.success(`${rowId.value ? '编辑' : '新增'}成功!`);
  572. closeModal();
  573. emit('success');
  574. } finally {
  575. setModalProps({ confirmLoading: false });
  576. }
  577. }
  578. // 回调
  579. async function callEditChange({ record }) {
  580. // console.log('🚀 ~ file: FormModal.vue:638 ~ callEditChange ~ record:', record);
  581. // console.log(
  582. // '🚀 ~ file: FormModal.vue:648 ~ callEditChange ~ tableRecordType.value:',
  583. // tableRecordType.value,
  584. // );
  585. if (
  586. record.type == DiagnosisEnum.complications_field ||
  587. record.type == DiagnosisEnum.clinic_field ||
  588. record.type == DiagnosisEnum.pathological_field ||
  589. record.type == DiagnosisEnum.ckd_field ||
  590. record.type == DiagnosisEnum.allergic_field
  591. ) {
  592. if (tableRecordType.value != record.contentType || !record.nameOptions.length) {
  593. tableRecordType.value = record.contentType;
  594. let res = [];
  595. res = await listDictModel({ dictCode: record.contentType });
  596. record.nameOptions = res;
  597. record.name = [];
  598. }
  599. if (record.name.length > 3) {
  600. // createMessage.error('每次最多选择4个');
  601. record.nameOptions = record.nameOptions.map(ele => {
  602. if (!record.name.includes(ele.value)) {
  603. ele.disabled = true;
  604. }
  605. return ele;
  606. });
  607. } else {
  608. record.nameOptions = record.nameOptions.map(ele => {
  609. ele.disabled = false;
  610. return ele;
  611. });
  612. }
  613. }
  614. }
  615. </script>
  616. <style lang="less" scoped>
  617. ::v-deep(.ant-btn-link) {
  618. color: rgb(61 65 85 / 100%);
  619. }
  620. ::v-deep(.ant-table-body) {
  621. height: 200px !important;
  622. }
  623. </style>