ic-measure-catalog-tree.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783
  1. <template>
  2. <a-card
  3. :class="[
  4. $style.treewrap,
  5. $style.ywlxtree,
  6. { [$style.collapse]: fold, [$style.single]: single, [$style.treesingle]: classstyle },
  7. ]"
  8. >
  9. <!-- 选择部门 -->
  10. <a-select
  11. ref="catselect"
  12. v-show="isSelectDep"
  13. v-model="depvalue"
  14. :options="depOptions"
  15. @change="changedep"
  16. :disabled="history"
  17. >
  18. </a-select>
  19. <a-spin :spinning="spinning" :class="$style.spin" />
  20. <a-empty v-if="empty" />
  21. <!-- :checkable="groupCheckable" -->
  22. <a-tree
  23. v-else
  24. :key="key"
  25. ref="mtxprocessCatalogTree"
  26. v-model="checkedKeys"
  27. :block-node="false"
  28. :show-icon="true"
  29. :show-line="showLine"
  30. :checkable="true"
  31. :check-strictly="true"
  32. :draggable="draggable"
  33. :tree-data="treeData"
  34. :replace-fields="replaceFields"
  35. :selected-keys="defaultSelectedKeys"
  36. :expanded-keys="expandedKeys"
  37. :default-expanded-keys="defaultTreeExpandedKeys"
  38. :default-checked-keys="defaultSelectedKeys"
  39. :load-data="onLoadData"
  40. node-key="id"
  41. @select="treeSelect"
  42. @check="treeCheck"
  43. @expand="onExpand"
  44. @drop="onDrop"
  45. >
  46. </a-tree>
  47. </a-card>
  48. </template>
  49. <script>
  50. import { Message } from 'ant-design-vue'
  51. import { getUserInfo } from '@/common/store-mixin'
  52. import IcService from './ic-service'
  53. import components from './_import-components/ic-measure-catalog-tree-import'
  54. export default {
  55. name: 'IcMeasureCatalogTree',
  56. metaInfo: {
  57. title: 'IcMeasureCatalogTree',
  58. },
  59. components,
  60. props: {
  61. // 默认选中节点
  62. selectedKeys: {
  63. type: Array,
  64. default: function() {
  65. return []
  66. },
  67. },
  68. // 查看模式 manager维护权限 read查看权限
  69. managerType: {
  70. type: String,
  71. default: 'manager',
  72. },
  73. // 是否显示复选框
  74. checkable: {
  75. type: Boolean,
  76. default: true,
  77. },
  78. // 是否可以拖拽
  79. draggable: {
  80. type: Boolean,
  81. default: false,
  82. },
  83. // 是否显示连线
  84. showLine: {
  85. type: Boolean,
  86. default: false,
  87. },
  88. // 根节点名称
  89. topNodeText: {
  90. type: String,
  91. default: '根节点',
  92. },
  93. // 地址树接口数据源
  94. treeparams: {
  95. type: Object,
  96. default: () => {
  97. return {}
  98. },
  99. },
  100. // 默认展开节点id
  101. defaultExpandedKeys: {
  102. type: Array,
  103. default: () => {
  104. return ['0']
  105. },
  106. },
  107. // 是否显示隐藏按钮
  108. showPrimary: {
  109. type: Boolean,
  110. default: true,
  111. },
  112. // 地址树是否单选
  113. single: {
  114. type: Boolean,
  115. default: false,
  116. },
  117. refreshKey: {
  118. type: Number,
  119. default: 0,
  120. },
  121. /**
  122. * 是否展示部门下拉列表
  123. */
  124. isSelectDep: {
  125. type: Boolean,
  126. default: false,
  127. },
  128. history: {
  129. type: Boolean,
  130. default: false,
  131. },
  132. hisv: {
  133. type: String,
  134. default: '',
  135. },
  136. hisorg: {
  137. type: String,
  138. default: '',
  139. },
  140. hisorgn: {
  141. type: String,
  142. default: '',
  143. },
  144. classstyle: {
  145. type: Boolean,
  146. default: false,
  147. },
  148. selecttype: {
  149. type: String,
  150. default: 'control',
  151. },
  152. },
  153. data() {
  154. return {
  155. treeData: [],
  156. defaultTreeExpandedKeys: ['0'],
  157. defaultSelectedKeys: ['0'],
  158. checkedKeys: { checked: [] }, // 选中的节点数据
  159. dataList: [], // 数组dataList,搜索要用
  160. spinning: true,
  161. empty: false,
  162. icontype: 'left',
  163. fold: false,
  164. replaceFields: {
  165. title: 'text',
  166. key: 'id',
  167. },
  168. expandedKeys: ['0'],
  169. backupsExpandedKeys: [],
  170. autoExpandParent: false,
  171. defaultTopNodeText: '流程分类',
  172. defaultTopNodeId: '0',
  173. key: 0,
  174. newtree: [],
  175. depOptions: [], // 部门下拉框列表值
  176. edit: true, // 当前节点是否可编辑
  177. depvalue: [], // 选择的组织数据
  178. depName: '',
  179. versionId: -1,
  180. }
  181. },
  182. created() {
  183. // 如果有默认展开节点,则赋值
  184. if (this.defaultExpandedKeys) {
  185. this.defaultTreeExpandedKeys = [...this.defaultExpandedKeys]
  186. }
  187. // 如果有传根节点名称,则赋值
  188. if (this.topNodeText) {
  189. this.defaultTopNodeText = this.topNodeText
  190. }
  191. // 如果有传默认选中节点,则赋值
  192. if (this.selectedKeys.length > 0) {
  193. this.defaultSelectedKeys = [...this.selectedKeys]
  194. }
  195. this.$nextTick(() => {
  196. this.selectedKeys.forEach((i) => {
  197. this.checkedKeys.checked.push(i)
  198. })
  199. })
  200. },
  201. methods: {
  202. groupCheckable() {
  203. return true
  204. },
  205. // 刷新树节点l
  206. refreshNode(nodeId) {
  207. this.key++
  208. this.parentId = nodeId
  209. this.refreshData(this.treeData[0])
  210. },
  211. // 刷新树节点
  212. refreshData(treeData) {
  213. if (treeData.id + '' === this.parentId + '') {
  214. return IcService.findIcIcmatrixCategoryTree(
  215. treeData.id,
  216. this.depvalue,
  217. this.versionId
  218. ).then((res) => {
  219. treeData.children = res.data
  220. if (res.data.length > 0) {
  221. treeData.isLeaf = false
  222. if (this.expandedKeys.indexOf(treeData.id) === -1) {
  223. this.expandedKeys = new Set(this.expandedKeys.push(treeData.id))
  224. }
  225. } else {
  226. treeData.isLeaf = true
  227. }
  228. return false
  229. })
  230. }
  231. if (treeData.children) {
  232. treeData.children.forEach((item) => {
  233. this.refreshData(item)
  234. })
  235. }
  236. },
  237. // 初始化部门下拉 分级授权获取部门下拉列表 维护权限
  238. initDeptList(formId) {
  239. if (this.history) {
  240. this.versionId = this.hisv
  241. this.depOptions.push({
  242. label: this.hisorgn,
  243. value: this.hisorg,
  244. text: this.hisorgn,
  245. edit: true,
  246. })
  247. this.depvalue = this.depOptions[0].value
  248. this.depName = this.depOptions[0].text
  249. this.defaultTopNodeId = -1
  250. this.defaultTopNodeText = this.depOptions[0].text + this.topNodeText
  251. this.defaultTreeExpandedKeys = [-1]
  252. // this.defaultSelectedKeys = [ this.depOptions[0].value]
  253. this.defaultSelectedKeys = [-1]
  254. this.edit = this.depOptions[0].edit
  255. this.initTreeData(this.hisorg)
  256. setTimeout(() => {
  257. this.$emit('depChanged', null, null)
  258. }, 1000)
  259. this.$emit('treeSelect', [this.depOptions[0].value], {
  260. selectedNodes: [
  261. {
  262. data: {
  263. props: {
  264. // id: this.depOptions[0].value,
  265. id: -1,
  266. text: this.depOptions[0].text + this.topNodeText,
  267. edit: this.depOptions[0].edit,
  268. isEnd: 0,
  269. },
  270. },
  271. },
  272. ],
  273. })
  274. } else {
  275. const id = 'icMtxVersion'
  276. IcService.getManagedHierarchyOrg(id).then((res) => {
  277. this.$emit('getManagedHorg', res.data)
  278. res.data.editNodes.forEach((item) => {
  279. this.depOptions.push({
  280. label: item.text,
  281. value: item.id,
  282. text: item.text,
  283. edit: true,
  284. })
  285. })
  286. if (this.managerType !== 'manager') {
  287. // 取编辑和查看节点并集
  288. res.data.viewNodes.forEach((item, index) => {
  289. const node = this.depOptions.find((nodeinfo) => {
  290. return nodeinfo.value === item.id
  291. })
  292. if (!node) {
  293. this.depOptions.push({
  294. label: item.text,
  295. value: item.id,
  296. text: item.text,
  297. edit: false,
  298. })
  299. }
  300. })
  301. }
  302. // 部门下拉框列表值赋值
  303. if (this.depOptions.length > 0) {
  304. this.depvalue = this.depOptions[0].value
  305. this.depName = this.depOptions[0].text
  306. // 加载默认值
  307. // this.defaultTopNodeId = this.depOptions[0].value
  308. this.defaultTopNodeId = -1
  309. this.defaultTopNodeText = this.depOptions[0].text + this.topNodeText
  310. this.defaultTreeExpandedKeys = [-1]
  311. // this.defaultSelectedKeys = [ this.depOptions[0].value]
  312. this.defaultSelectedKeys = [-1]
  313. this.edit = this.depOptions[0].edit
  314. IcService.getversion(this.depvalue).then((res) => {
  315. if (res.data.id) {
  316. this.versionId = res.data.id
  317. } else {
  318. // 没有版本 ,获取数据
  319. this.versionId = -1
  320. }
  321. this.initTreeData(this.depOptions[0].value)
  322. setTimeout(() => {
  323. this.$emit('depChanged', null, null)
  324. }, 1000)
  325. this.$emit('treeSelect', [this.depOptions[0].value], {
  326. selectedNodes: [
  327. {
  328. data: {
  329. props: {
  330. // id: this.depOptions[0].value,
  331. id: -1,
  332. text: this.depOptions[0].text + this.topNodeText,
  333. edit: this.depOptions[0].edit,
  334. isEnd: 0,
  335. },
  336. },
  337. },
  338. ],
  339. })
  340. })
  341. } else {
  342. this.defaultTopNodeId = null
  343. this.defaultTopNodeText = null
  344. this.defaultTreeExpandedKeys = []
  345. this.defaultSelectedKeys = []
  346. this.$emit('treeSelect', [9999999], {
  347. selectedNodes: [],
  348. })
  349. this.spinning = false
  350. this.empty = true
  351. }
  352. })
  353. }
  354. },
  355. /***
  356. * 选中复选框时的事件
  357. */
  358. treeCheck(allKeys, echecked) {
  359. // echecked.checkedNodes 选中的所有节点信息为数组 .data.props 获取详细信息
  360. // echecked.node.dataRef 当前选中的节点信息
  361. if (this.single) {
  362. this.checkedKeys.checked = []
  363. this.checkedKeys.checked = [echecked.node.dataRef.id]
  364. this.$emit('treeCheck', echecked.node.dataRef, [
  365. echecked.checkedNodes.find((i) => i.data.props.id === echecked.node.dataRef.id),
  366. ])
  367. } else {
  368. this.$emit('treeCheck', echecked.node.dataRef, echecked.checkedNodes)
  369. }
  370. },
  371. // 点击树
  372. treeSelect(selectedKeys, info) {
  373. this.defaultSelectedKeys = selectedKeys
  374. this.$emit('treeSelect', selectedKeys, info)
  375. },
  376. transformData(data) {
  377. return data.map((d) => {
  378. const { children, ...rest } = d
  379. rest.edit = this.edit
  380. return {
  381. ...rest,
  382. children: children && this.transformData(children),
  383. scopedSlots: { title: 'title' },
  384. }
  385. })
  386. },
  387. onExpand(expandedKeys) {
  388. // 用户点击展开时,取消自动展开效果
  389. this.expandedKeys = expandedKeys
  390. this.autoExpandParent = false
  391. },
  392. // 点击地址树展开时调用
  393. onLoadData(treeNode) {
  394. const id = treeNode.dataRef.id
  395. const parentId = parseInt(id)
  396. if (this.selecttype === 'cross') {
  397. return IcService.findIcIcmatrixCategoryTree(parentId, this.depvalue, this.versionId).then(
  398. (res) => {
  399. if (res.data.length) {
  400. res.data.forEach((i) => {
  401. if (i.props.isEnd !== '1') {
  402. i.disabled = true
  403. }
  404. if (this.selectedKeys.indexOf(i.id) > -1) {
  405. i.disabled = true
  406. }
  407. })
  408. treeNode.dataRef.children = res.data
  409. }
  410. // this.setDisabless(res.data)
  411. this.treeData = this.transformData([...this.treeData])
  412. }
  413. )
  414. } else {
  415. return IcService.findIcIcmeasureCategoryTree(parentId, this.depvalue, this.versionId).then(
  416. (res) => {
  417. if (res.data.length) {
  418. res.data.forEach((i) => {
  419. if (i.props.disabled) {
  420. i.disabled = true
  421. }
  422. if (this.selectedKeys.indexOf(i.id) > -1) {
  423. i.disabled = true
  424. }
  425. })
  426. }
  427. treeNode.dataRef.children = res.data
  428. // this.setDisabless(res.data)
  429. this.treeData = this.transformData([...this.treeData])
  430. // this.$nextTick(() => {
  431. // this.$refs.mtxprocessCatalogTree.setCheckedKeys(this.selectedKeys)
  432. // })
  433. }
  434. )
  435. }
  436. },
  437. // 添加是否可点击属性
  438. setDisabless(data) {
  439. return data.map((d) => {
  440. const props = d.props
  441. if (props && props.isEnd === '1') {
  442. // 置灰不可选
  443. d.disabled = true
  444. }
  445. })
  446. },
  447. // 初始化地址树
  448. initTreeData(depId) {
  449. const topDepId = depId === null ? 0 : depId
  450. IcService.findIcIcmatrixCategoryTree(-1, topDepId, this.versionId).then((res) => {
  451. this.spinning = false
  452. const treeNode = [
  453. {
  454. id: this.defaultTopNodeId,
  455. text: this.defaultTopNodeText,
  456. isLeaf: false,
  457. props: {
  458. isroot: true,
  459. },
  460. children: [],
  461. key: this.defaultTopNodeId,
  462. disabled: true,
  463. },
  464. ]
  465. if (res.data.length) {
  466. if (this.selecttype === 'cross') {
  467. res.data.forEach((i) => {
  468. if (i.props.isEnd !== '1') {
  469. i.disabled = true
  470. }
  471. if (this.selectedKeys.indexOf(i.id) > -1) {
  472. i.disabled = true
  473. }
  474. })
  475. } else {
  476. res.data.forEach((i) => {
  477. i.disabled = true
  478. })
  479. }
  480. treeNode[0].children = res.data
  481. }
  482. this.treeData = this.transformData(treeNode)
  483. this.expandedKeys = this.defaultTreeExpandedKeys
  484. this.generateList(this.treeData)
  485. this.empty = false
  486. })
  487. },
  488. // 处理搜索用的dataList
  489. generateList(data) {
  490. for (let i = 0; i < data.length; i++) {
  491. const node = data[i]
  492. const key = node.id
  493. const title = node.text
  494. const props = node.props
  495. // 用来判断此几点是否已经配置了用户,需要后台返回标识位进行判断
  496. if (props.showuser) {
  497. data[i].scopedSlots.icon = 'hasuser'
  498. }
  499. this.dataList.push({ key, id: key, title: title, props })
  500. if (node.children) {
  501. this.generateList(node.children)
  502. }
  503. }
  504. },
  505. mmInitTreeData(res) {
  506. this.spinning = false
  507. if (res.data.length) {
  508. this.treeData = this.transformData(res.data)
  509. this.expandedKeys = this.defaultTreeExpandedKeys
  510. this.empty = false
  511. } else {
  512. this.empty = true
  513. }
  514. },
  515. // 刷新树方法
  516. refreshTree() {
  517. this.key++
  518. },
  519. // 组织下拉框change时触发
  520. changedep(value, option) {
  521. if (option.data) {
  522. this.depName = option.data.props.text
  523. } else {
  524. this.depName = option.text
  525. }
  526. IcService.getversion(value).then((res) => {
  527. if (res.data.id) {
  528. this.versionId = res.data.id
  529. } else {
  530. // 没有版本 ,获取数据
  531. this.versionId = -1
  532. }
  533. this.key++
  534. if (!value) {
  535. this.defaultTreeExpandedKeys = ['0']
  536. this.defaultSelectedKeys = ['0']
  537. this.defaultTopNodeId = '0'
  538. this.defaultTopNodeText = this.topNodeText
  539. } else {
  540. this.defaultTreeExpandedKeys = [-1]
  541. this.defaultSelectedKeys = [-1]
  542. this.defaultTopNodeId = -1
  543. // this.defaultTreeExpandedKeys = [value]
  544. // this.defaultSelectedKeys = [value]
  545. // this.defaultTopNodeId = value
  546. if (option.data) {
  547. this.defaultTopNodeText = option.data.props.text + this.topNodeText
  548. this.edit = option.data.props.edit
  549. }
  550. }
  551. this.initTreeData(value)
  552. this.$emit('depChanged', value, option)
  553. this.$emit('treeSelect', value, {
  554. selectedNodes: [
  555. {
  556. data: {
  557. props: {
  558. id: -1,
  559. text: option.data.props.text + this.topNodeText,
  560. edit: option.data.props.edit,
  561. isEnd: 0,
  562. },
  563. },
  564. },
  565. ],
  566. })
  567. })
  568. },
  569. // 拖拽节点方法
  570. onDrop(info) {
  571. // 被插入节点信息
  572. const dropKey = info.node.eventKey
  573. const dropNode = info.node.dataRef
  574. // 拖拽节点信息
  575. const dragKey = info.dragNode.eventKey
  576. const dragNode = info.dragNode.dataRef
  577. const dropPos = info.node.pos.split('-')
  578. // -1表示之前 0表示合并 1表示之后
  579. const dropPosition = info.dropPosition - Number(dropPos[dropPos.length - 1])
  580. // 分类合并至事项内
  581. if (dropNode.props.isroot && (dropPosition === 1) | (dropPosition === -1)) {
  582. Message.info('不能将分类拖拽至与根节点同层级', 1)
  583. return false
  584. }
  585. // 如果被插入节点是末级节点,并且是合并方式的时候,则不可以执行
  586. if (dropPosition === 0) {
  587. if (dropNode.props.isEnd === '1') {
  588. Message.info('被插入节点是末级节点,不可执行', 1)
  589. return false
  590. }
  591. }
  592. const loop = (data, key, callback) => {
  593. data.forEach((item, index, arr) => {
  594. if (item.id === key) {
  595. return callback(item, index, arr)
  596. }
  597. if (item.children) {
  598. return loop(item.children, key, callback)
  599. }
  600. })
  601. }
  602. const data = this.treeData
  603. // Find dragObject
  604. let dragObj
  605. loop(data, dragKey, (item, index, arr) => {
  606. arr.splice(index, 1)
  607. dragObj = item
  608. })
  609. if (!info.dropToGap) {
  610. // Drop on the content
  611. loop(data, dropKey, (item) => {
  612. item.children = item.children || []
  613. // where to insert 示例添加到尾部,可以是随意位置
  614. item.children.push(dragObj)
  615. })
  616. } else if (
  617. (info.node.children || []).length > 0 && // Has children
  618. info.node.expanded && // Is expanded
  619. dropPosition === 1 // On the bottom gap
  620. ) {
  621. loop(data, dropKey, (item) => {
  622. item.children = item.children || []
  623. // where to insert 示例添加到尾部,可以是随意位置
  624. item.children.unshift(dragObj)
  625. })
  626. } else {
  627. let ar
  628. let i
  629. loop(data, dropKey, (item, index, arr) => {
  630. ar = arr
  631. i = index
  632. })
  633. if (dropPosition === -1) {
  634. ar.splice(i, 0, dragObj)
  635. } else {
  636. ar.splice(i + 1, 0, dragObj)
  637. }
  638. }
  639. this.treeData = data
  640. // 拖拽完成,调用接口
  641. const dragParams = {
  642. nodeId: dragNode.id,
  643. targetnodeType: dropNode.props.isroot ? 'root' : 'category', // category/root
  644. targetnodeId: dropNode.id,
  645. position: dropPosition, // -1 0 1 之前 合并 之后
  646. }
  647. IcService.dragNode(dragParams).then((res) => {
  648. if (!res) {
  649. Message.info(dropNode.text + '节点下存在相同分类编号,拖拽失败')
  650. }
  651. })
  652. },
  653. },
  654. }
  655. </script>
  656. <style module lang="scss">
  657. @use '@/common/design' as *;
  658. .spin {
  659. width: 100%;
  660. line-height: 30;
  661. }
  662. .ywlxtree {
  663. :global(.ant-tree-title) {
  664. display: inline-block;
  665. width: 100%;
  666. overflow: hidden;
  667. text-overflow: ellipsis;
  668. white-space: nowrap;
  669. }
  670. :global(.ant-input-search) {
  671. margin: 8px 0;
  672. overflow: hidden;
  673. }
  674. .active {
  675. color: $primary-color;
  676. }
  677. :global(.ant-select) {
  678. width: 100%;
  679. overflow: hidden;
  680. }
  681. }
  682. .treewrap {
  683. position: relative;
  684. display: flex;
  685. flex-direction: column;
  686. width: 20%;
  687. min-height: 100%;
  688. margin-right: $padding-lg;
  689. transition: width 0.2s;
  690. .fold {
  691. position: absolute;
  692. top: calc(50% - 30px);
  693. right: -15px;
  694. z-index: 2;
  695. width: 15px;
  696. height: 75px;
  697. padding: 0;
  698. border-radius: 0 10px 10px 0;
  699. }
  700. :global(.ant-tree) {
  701. overflow: hidden;
  702. text-overflow: ellipsis;
  703. white-space: nowrap;
  704. }
  705. :global(.ant-card-body) {
  706. background: $white;
  707. }
  708. }
  709. .collapse {
  710. width: 0;
  711. :global(.ant-card-body) {
  712. background: transparent;
  713. :global(.ant-empty) {
  714. display: none;
  715. }
  716. }
  717. }
  718. // 单选样式
  719. .single {
  720. :global .ant-tree-checkbox {
  721. .ant-tree-checkbox-inner {
  722. border-radius: 100px;
  723. &::after {
  724. position: absolute;
  725. top: 3px;
  726. left: 3px;
  727. display: table;
  728. width: 8px;
  729. height: 8px;
  730. content: ' ';
  731. background-color: $primary-color;
  732. border: 0;
  733. border-radius: 8px;
  734. opacity: 0;
  735. transition: all 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86);
  736. transform: scale(0);
  737. }
  738. }
  739. &.ant-tree-checkbox-checked {
  740. &::after {
  741. position: absolute;
  742. top: 16.67%;
  743. left: 0;
  744. width: 100%;
  745. height: 66.67%;
  746. content: '';
  747. border: 1px solid #1890ff;
  748. border-radius: 50%;
  749. animation: antRadioEffect 0.36s ease-in-out;
  750. animation-fill-mode: both;
  751. }
  752. .ant-tree-checkbox-inner {
  753. background-color: $white;
  754. &::after {
  755. opacity: 1;
  756. transition: all 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86);
  757. transform: scale(1);
  758. }
  759. }
  760. }
  761. }
  762. }
  763. .treesingle {
  764. width: 95% !important;
  765. }
  766. </style>