index.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801
  1. <template>
  2. <div
  3. id="box"
  4. class="bs-container"
  5. @mousemove="mousemoveOnBox"
  6. @mouseup="mouseupOnBox"
  7. >
  8. <el-row
  9. v-show="datasetType === null"
  10. type="flex"
  11. class="layout"
  12. >
  13. <div
  14. id="left-box"
  15. class="left-box"
  16. :style="{ 'transition': transition + 's' }"
  17. >
  18. <div class="inner-container">
  19. <TypeTree
  20. ref="datasetsTypeTree"
  21. :dataset-type-list="datasetTypeList"
  22. :app-code="appCode"
  23. @nodeClick="nodeClick"
  24. @refreshData="refreshData"
  25. @expandedNodes="expandedNodes"
  26. @reCategory="getTreeList"
  27. />
  28. </div>
  29. </div>
  30. <div
  31. class="right-box inner-container"
  32. :style="{ 'transition': transition + 's' }"
  33. >
  34. <div
  35. id="resize"
  36. class="resize pack-up-box"
  37. @mousedown="mousedown"
  38. @mouseup="mouseup"
  39. @mousemove="mousemove"
  40. >
  41. <a
  42. v-if="isPackUpTree"
  43. @click="packUpTree"
  44. @mousedown="resize = null"
  45. @mouseup="resize = null"
  46. @mousemove="resize = null"
  47. >
  48. <i :class="isPackUpTree === false ? 'el-icon-caret-left' : 'el-icon-caret-right'" />
  49. </a>
  50. <a
  51. v-else
  52. class="visible-pack-up"
  53. >
  54. <span>||</span>
  55. </a>
  56. </div>
  57. <el-form
  58. ref="queryForm"
  59. :model="queryForm"
  60. class="filter-container bs-el-form"
  61. @submit.native.prevent
  62. >
  63. <el-form-item
  64. class="filter-item"
  65. prop="name"
  66. >
  67. <el-input
  68. v-model="queryForm.name"
  69. class="bs-el-input"
  70. placeholder="请输入数据集名称"
  71. clearable
  72. @keyup.enter.native="handleSearch()"
  73. @clear="handleSearch()"
  74. />
  75. </el-form-item>
  76. <el-form-item
  77. class="filter-item"
  78. prop="labelIds"
  79. >
  80. <el-select
  81. v-model="queryForm.labelIds"
  82. class="bs-el-select"
  83. popper-class="bs-el-select"
  84. clearable
  85. filterable
  86. multiple
  87. collapse-tags
  88. placeholder="请选择数据集关联标签"
  89. @clear="handleSearch()"
  90. >
  91. <el-option
  92. v-for="labelItem in labelList"
  93. :key="labelItem.id"
  94. :label="labelItem.labelName"
  95. :value="labelItem.id"
  96. />
  97. </el-select>
  98. </el-form-item>
  99. <el-form-item class="filter-item">
  100. <el-button
  101. :loading="dataListLoading"
  102. type="primary"
  103. icon="el-icon-search"
  104. @click="handleSearch()"
  105. >
  106. 查询
  107. </el-button>
  108. </el-form-item>
  109. <el-form-item class="filter-item">
  110. <el-button
  111. v-if="toAdd"
  112. class="bs-el-button-default"
  113. @click="addDataset"
  114. >
  115. 新增
  116. </el-button>
  117. </el-form-item>
  118. </el-form>
  119. <div class="bs-table-box">
  120. <el-table
  121. ref="userTable"
  122. v-table
  123. v-loading="dataListLoading"
  124. height="100%"
  125. class="bs-el-table bs-scrollbar"
  126. :element-loading-text="loadingText"
  127. :data="tableData"
  128. :header-cell-style="sortStyle"
  129. @sort-change="reSort"
  130. @current-change="handleCurrentChange"
  131. @select="selectDs"
  132. @select-all="selectAll"
  133. >
  134. <el-empty slot="empty" />
  135. <el-table-column
  136. v-if="isDialog && multiple"
  137. type="selection"
  138. width="55"
  139. />
  140. <el-table-column
  141. prop="name"
  142. label="数据集名称"
  143. align="left"
  144. show-overflow-tooltip
  145. >
  146. <template slot-scope="scope">
  147. <el-radio
  148. v-if="isDialog && !multiple"
  149. v-model="curRow"
  150. :label="scope.row"
  151. >
  152. {{ scope.row.name }}
  153. </el-radio>
  154. <span v-else>{{ scope.row.name }}</span>
  155. </template>
  156. </el-table-column>
  157. <el-table-column
  158. prop="datasetType"
  159. label="数据集类型"
  160. align="center"
  161. show-overflow-tooltip
  162. >
  163. <template slot-scope="scope">
  164. <span>{{ datasetTypeList.find(type=>type.datasetType===scope.row.datasetType) ? datasetTypeList.find(type=>type.datasetType===scope.row.datasetType).name : '其他' }}</span>
  165. </template>
  166. </el-table-column>
  167. <el-table-column
  168. prop="labelIds"
  169. label="标签"
  170. align="center"
  171. show-overflow-tooltip
  172. >
  173. <template slot-scope="scope">
  174. <span>{{ getLabels(scope.row.labelIds).join(',') }}</span>
  175. </template>
  176. </el-table-column>
  177. <el-table-column
  178. prop="remark"
  179. label="备注"
  180. align="left"
  181. show-overflow-tooltip
  182. />
  183. <!--操作栏-->
  184. <el-table-column
  185. v-if="doEdit||isDelete"
  186. label="操作"
  187. width="200"
  188. align="center"
  189. >
  190. <template
  191. v-if="showOperate(scope.row.datasetType)"
  192. slot-scope="scope"
  193. >
  194. <el-button
  195. v-if="doEdit"
  196. class="bs-el-button-default"
  197. :disabled="scope.row.editable === 1 && !appCode"
  198. @click="toEdit(scope.row.id, scope.row.datasetType, scope.row.name, scope.row.typeId)"
  199. >
  200. 编辑
  201. </el-button>
  202. <el-button
  203. v-if="isDelete"
  204. class="bs-el-button-default"
  205. :loading="scope.row.loading"
  206. :disabled="scope.row.editable === 1 && !appCode"
  207. @click="delDataset(scope.row)"
  208. >
  209. 删除
  210. </el-button>
  211. </template>
  212. </el-table-column>
  213. </el-table>
  214. </div>
  215. <div class="bs-pagination">
  216. <el-pagination
  217. class="bs-el-pagination"
  218. popper-class="bs-el-pagination"
  219. :current-page="current"
  220. :page-sizes="[10, 20, 50, 100]"
  221. :page-size="size"
  222. :total="totalCount"
  223. background
  224. prev-text="上一页"
  225. next-text="下一页"
  226. layout="total, prev, pager, next, sizes"
  227. @size-change="sizeChangeHandle"
  228. @current-change="currentChangeHandle"
  229. />
  230. </div>
  231. </div>
  232. </el-row>
  233. <!-- 新增-类型窗口 -->
  234. <DatasetTypeDialog
  235. ref="DatasetTypeDialog"
  236. :dataset-type-list="datasetTypeList"
  237. @openAddForm="openAddForm"
  238. />
  239. <checkDatasource
  240. ref="checkDatasource"
  241. :reason-list="reasonList"
  242. />
  243. <component
  244. :is="componentData.component"
  245. v-if="datasetType"
  246. ref="EditForm"
  247. :key="componentData.key"
  248. :config="componentData.config"
  249. :dataset-id="datasetId"
  250. :dataset-name="datasetName"
  251. :type-id="typeId"
  252. :is-edit="isEdit"
  253. :app-code="appCode"
  254. @back="back"
  255. >
  256. <template #output-field-table-column>
  257. <slot name="output-field-table-column" />
  258. </template>
  259. </component>
  260. </div>
  261. </template>
  262. <script>
  263. import TypeTree from './TypeTree.vue'
  264. import JsEditForm from './JsEditForm.vue'
  265. import JsonEditForm from './JsonEditForm.vue'
  266. import table from 'data-room-ui/js/utils/table.js'
  267. import ScriptEditForm from './ScriptEditForm.vue'
  268. import checkDatasource from 'data-room-ui/DataSourceManagement/src/checkDatasource.vue'
  269. import CustomEditForm from './CustomEditForm.vue'
  270. import { pageMixins } from 'data-room-ui/js/mixins/page'
  271. import OriginalEditForm from './OriginalEditForm.vue'
  272. import HttpEditForm from './HttpEditForm.vue'
  273. import DatasetTypeDialog from './DatasetTypeDialog.vue'
  274. import StoredProcedureEditForm from './StoredProcedureEditForm.vue'
  275. import { datasetPage, datasetRemove, datasetCheck } from 'data-room-ui/js/utils/datasetConfigService'
  276. import { getLabelList } from 'data-room-ui/js/utils/LabelConfigService'
  277. export default {
  278. name: 'DataSetManagement',
  279. directives: {
  280. table // 注册自定义指令
  281. },
  282. components: {
  283. TypeTree,
  284. DatasetTypeDialog,
  285. OriginalEditForm,
  286. CustomEditForm,
  287. JsonEditForm,
  288. StoredProcedureEditForm,
  289. ScriptEditForm,
  290. JsEditForm,
  291. checkDatasource,
  292. HttpEditForm
  293. },
  294. mixins: [pageMixins],
  295. props: {
  296. multiple: {
  297. type: Boolean,
  298. default: false
  299. },
  300. isDialog: {
  301. type: Boolean,
  302. default: false
  303. },
  304. dsValue: {
  305. type: [Array, Object],
  306. default: null
  307. },
  308. appCode: {
  309. type: String,
  310. default: ''
  311. },
  312. isBorder: {
  313. type: Boolean,
  314. default: false
  315. },
  316. toAdd: {
  317. type: Boolean,
  318. default: true
  319. },
  320. doEdit: {
  321. type: Boolean,
  322. default: true
  323. },
  324. isDelete: {
  325. type: Boolean,
  326. default: true
  327. }
  328. },
  329. data () {
  330. return {
  331. reasonList: [],
  332. datasetType: null,
  333. isEdit: false,
  334. categoryData: [],
  335. tableData: [], // 表格数据
  336. queryForm: {
  337. name: '',
  338. datasetType: '',
  339. typeId: '', // 分类id
  340. labelIds: []
  341. }, // 查询条件
  342. // 数据集类型
  343. datasetTypeList: [],
  344. labelList: [],
  345. isPackUpTree: false,
  346. transition: 0.1,
  347. loadingText: '正在加载数据',
  348. dataListLoading: false,
  349. leftBox: null,
  350. rightBox: null,
  351. startX: null,
  352. event: null,
  353. endX: null,
  354. resize: null,
  355. datasetId: '', // 数据集Id,用于详情与编辑
  356. datasetName: '', // 数据集名称
  357. typeId: '', // 详情typeId
  358. curRow: null,
  359. multipleSelection: [],
  360. // 远程组件
  361. componentData: {
  362. component: null,
  363. config: null,
  364. key: new Date().getTime()
  365. }
  366. }
  367. },
  368. computed: {
  369. allType () {
  370. return this.datasetTypeList.map(item => item.datasetType).filter(item => item !== '')
  371. }
  372. },
  373. watch: {
  374. datasetType (value) {
  375. if (value === null) {
  376. this.datasetId = ''
  377. this.datasetName = ''
  378. this.isEdit = false
  379. }
  380. }
  381. },
  382. mounted () {
  383. this.init()
  384. if (/Safari/.test(navigator.userAgent) && !/Chrome/.test(navigator.userAgent)) {
  385. // 当前浏览器为Safari浏览器
  386. // 执行相关操作
  387. document.addEventListener('mousemove', function (event) {
  388. if (event.buttons === 1) {
  389. event.preventDefault()
  390. }
  391. })
  392. }
  393. },
  394. methods: {
  395. getLabels (list) {
  396. const arr = []
  397. list?.forEach((item) => {
  398. arr.push(this.labelList.filter(x => x.id === item)[0]?.labelName)
  399. })
  400. return arr
  401. },
  402. toggleRowSelection () {
  403. this.$nextTick(() => {
  404. const dsIds = this.multipleSelection.map(ds => ds.id)
  405. this.$refs.userTable.clearSelection()
  406. this.tableData.forEach(item => {
  407. if (dsIds.includes(item.id)) {
  408. this.$refs.userTable.toggleRowSelection(item, true)
  409. }
  410. })
  411. })
  412. },
  413. // 全选
  414. selectAll (selection) {
  415. if (this.isDialog && this.multiple) {
  416. if (selection.length) {
  417. const dsIds = this.multipleSelection.map(ds => ds.id)
  418. selection.forEach(ds => {
  419. if (!dsIds.includes(ds.id)) {
  420. this.multipleSelection.push(ds)
  421. }
  422. })
  423. } else {
  424. this.tableData.forEach(row => {
  425. const dsIds = this.multipleSelection.map(ds => ds.id)
  426. const i = dsIds.indexOf(row.id)
  427. if (i > -1) this.multipleSelection.splice(i, 1)
  428. })
  429. }
  430. }
  431. },
  432. // 手动勾选
  433. selectDs (selection, row) {
  434. if (this.isDialog && this.multiple) {
  435. let dsIndex = null
  436. const ds = this.multipleSelection.find((ds, index) => {
  437. if (ds.id === row.id) {
  438. dsIndex = index
  439. return ds
  440. }
  441. })
  442. if (!ds) {
  443. this.multipleSelection.push(row)
  444. } else {
  445. this.multipleSelection.splice(dsIndex, 1)
  446. }
  447. }
  448. },
  449. // 获取选中数据集信息
  450. getSelectDs () {
  451. if (!this.isDialog) return
  452. if (this.multiple) {
  453. // 多选返回
  454. return this.multipleSelection
  455. } else {
  456. // 单选返回
  457. return this.curRow ? this.curRow : null
  458. }
  459. },
  460. // 单选数据集
  461. handleCurrentChange (currentRow) {
  462. this.curRow = currentRow
  463. },
  464. // 删除数据集
  465. delDataset (row) {
  466. row.loading = true
  467. datasetCheck(row.id).then((res) => {
  468. row.loading = false
  469. if (res.canDelete) {
  470. this.$confirm('确定删除当前数据集吗?', '提示', {
  471. confirmButtonText: '确定',
  472. cancelButtonText: '取消',
  473. type: 'warning',
  474. customClass: 'bs-el-message-box'
  475. }).then(() => {
  476. datasetRemove(row.id).then(res => {
  477. this.init(false)
  478. this.$message.success('删除成功')
  479. })
  480. }).catch(() => {
  481. })
  482. } else {
  483. this.reasonList = res.reasons
  484. this.$refs.checkDatasource.checkDatasourceVisible = true
  485. }
  486. })
  487. },
  488. // 详情
  489. toPreview (id, type, name, typeId) {
  490. this.datasetId = id
  491. this.datasetType = type
  492. this.datasetName = name
  493. this.typeId = typeId
  494. this.isEdit = false
  495. },
  496. toEdit (id, type, name, typeId) {
  497. this.datasetId = id
  498. this.datasetType = type
  499. this.componentData = this.getComponents(this.datasetTypeList.find(item => item?.datasetType === type)?.componentName) ?? ''
  500. this.datasetName = name
  501. this.typeId = typeId
  502. this.isEdit = true
  503. },
  504. // 回到管理端
  505. back () {
  506. this.datasetType = null
  507. this.isEdit = false
  508. },
  509. // 新增数据集-类型
  510. openAddForm (type, componentName) {
  511. this.datasetType = type
  512. this.componentData = this.getComponents(componentName)
  513. this.typeId = this.queryForm.typeId
  514. this.isEdit = true
  515. },
  516. showOperate (datasetType) {
  517. return this.getComponents(this.datasetTypeList.find(type => type.datasetType === datasetType)?.componentName)?.config?.showOperate ?? true
  518. },
  519. getComponents (componentName) {
  520. const components = Object.values(this.$options.components)
  521. let remoteComponentData = null
  522. if (window.BS_CONFIG?.customDatasetComponents && window.BS_CONFIG?.customDatasetComponents.length > 0) {
  523. // 获取远程组件
  524. remoteComponentData = window.BS_CONFIG?.customDatasetComponents.find(item => item.config.componentName === componentName)
  525. }
  526. return {
  527. component: components.find(component => component.name === componentName) || remoteComponentData?.vueFile,
  528. config: remoteComponentData?.config || null,
  529. key: new Date().getTime()
  530. }
  531. },
  532. // 初始化
  533. init (temp = true) {
  534. if (temp) {
  535. this.getTreeList()
  536. }
  537. if (this.isDialog) {
  538. if (this.multiple) {
  539. this.multipleSelection = this.dsValue ? this.dsValue : []
  540. } else {
  541. this.curRow = this.dsValue
  542. }
  543. }
  544. this.current = 1
  545. const list = [
  546. { name: '全部', datasetType: '' },
  547. { name: '原始数据集', datasetType: 'original', componentName: 'OriginalEditForm', description: '直接查询某个数据库表' },
  548. { name: '自助数据集', datasetType: 'custom', componentName: 'CustomEditForm', description: '自定义SQL语句查询' },
  549. { name: '存储过程数据集', datasetType: 'storedProcedure', componentName: 'StoredProcedureEditForm', description: '调用数据库存储过程查询' },
  550. { name: 'JSON数据集', datasetType: 'json', componentName: 'JsonEditForm', description: '直接定义静态数据' },
  551. { name: 'JS数据集', datasetType: 'js', componentName: 'JsEditForm', description: '编写JS代码进行动态模拟数据创建' },
  552. { name: 'HTTP数据集', datasetType: 'http', componentName: 'HttpEditForm', description: '接入第三方HTTP服务查询' },
  553. { name: '脚本数据集', datasetType: 'script', componentName: 'ScriptEditForm', description: '支持ES、Mongodb、国产化数据库、自定义Java代码查询' }
  554. ]
  555. if (window.BS_CONFIG?.datasetTypeList && window.BS_CONFIG?.datasetTypeList?.length !== 0) {
  556. this.datasetTypeList = [{ name: '全部', datasetType: '' }, ...list.filter(item => window.BS_CONFIG?.datasetTypeList.findIndex(x => x === item.datasetType) !== -1)]
  557. } else {
  558. this.datasetTypeList = [
  559. ...list
  560. ]
  561. }
  562. if (window.BS_CONFIG?.customDatasetComponents && window.BS_CONFIG?.customDatasetComponents.length > 0) {
  563. // 将获得到的远程数据集进行组装
  564. window.BS_CONFIG?.customDatasetComponents.forEach((item) => {
  565. this.datasetTypeList.push({ name: item.config.name, datasetType: item.config.datasetType, componentName: item.config.componentName })
  566. })
  567. }
  568. this.getDataList()
  569. // getLabelList().then(res => {
  570. // this.labelList = res
  571. // })
  572. },
  573. // 新增数据集
  574. addDataset () {
  575. this.$refs.DatasetTypeDialog.dialogVisible = true
  576. },
  577. selectChange () {
  578. this.getDataList()
  579. },
  580. getTreeList () {
  581. },
  582. // 获取表格数据
  583. getDataList () {
  584. getLabelList().then(res => {
  585. this.labelList = res
  586. })
  587. this.dataListLoading = true
  588. datasetPage({
  589. current: this.current,
  590. size: this.size,
  591. moduleCode: this.appCode,
  592. ...this.queryForm,
  593. datasetType: this.queryForm.datasetType === '' ? [...this.allType] : [this.queryForm.datasetType]
  594. }).then((data) => {
  595. this.tableData = data.list
  596. this.tableData.forEach(r => {
  597. this.$set(r, 'loading', false)
  598. })
  599. if (this.isDialog) {
  600. if (this.multiple && this.multipleSelection.length) {
  601. this.toggleRowSelection()
  602. } else if (this.curRow.id) {
  603. const ds = this.tableData.find(item => item.id === this.curRow.id)
  604. if (ds) this.curRow = ds
  605. }
  606. }
  607. this.totalCount = data.totalCount
  608. this.dataListLoading = false
  609. }).catch(() => {
  610. this.dataListLoading = false
  611. })
  612. },
  613. expandedNodes (data) {
  614. if (data && data > 50) {
  615. this.transition = 0
  616. } else {
  617. this.transition = 0.1
  618. }
  619. },
  620. nodeClick (row, type) {
  621. this.current = 1
  622. if (type === 'group') {
  623. this.queryForm.typeId = row.id
  624. this.queryForm.datasetType = ''
  625. } else if (type === 'type') {
  626. this.queryForm.typeId = ''
  627. this.queryForm.datasetType = row
  628. }
  629. this.getDataList()
  630. },
  631. refreshData (node) {
  632. if (node && node.id === this.queryForm.typeId) {
  633. this.queryForm.typeId = ''
  634. }
  635. this.getDataList()
  636. },
  637. handleSearch () {
  638. this.current = 1
  639. this.queryForm.typeId = ''
  640. // 清除左侧机构树的选中状态
  641. this.$refs.datasetsTypeTree.ztreeObj.cancelSelectedNode()
  642. this.getDataList()
  643. },
  644. // 拖拽修改div宽度
  645. mousedown (e) {
  646. this.resize = document.getElementsByClassName('resize')[0]
  647. this.resize.left = document.getElementById('left-box').getBoundingClientRect().width
  648. this.leftBox = document.getElementsByClassName('left-box')[0]
  649. this.rightBox = document.getElementsByClassName('right-box')[0]
  650. this.startX = e.clientX
  651. },
  652. mousemove (e) {
  653. this.event = e
  654. if (this.resize) {
  655. const boxWidth = document.getElementById('box').getBoundingClientRect().width
  656. this.endX = e.clientX
  657. const offset = document.getElementById('box').getBoundingClientRect().left > 300 ? 0 : 25
  658. const moveLen = this.resize.left + (this.endX - this.startX) + offset
  659. this.leftBox.style.width = moveLen / boxWidth * 100 + '%'
  660. this.rightBox.style.width = ((1 - moveLen / boxWidth) * 100) + '%'
  661. this.isPackUpTree = false
  662. if (moveLen < 100 && this.endX - this.startX < 0) {
  663. this.isPackUpTree = true
  664. this.leftBox.style.width = '0%'
  665. this.rightBox.style.width = '100%'
  666. } else if (moveLen / boxWidth > 0.5) {
  667. this.leftBox.style.width = '50%'
  668. this.rightBox.style.width = '50%'
  669. }
  670. }
  671. },
  672. packUpTree () {
  673. this.$refs.datasetsTypeTree.expandedNodes()
  674. this.isPackUpTree = !this.isPackUpTree
  675. if (!this.isPackUpTree) {
  676. this.leftBox.style.width = '25%'
  677. this.rightBox.style.width = '75%'
  678. } else {
  679. this.leftBox.style.width = '0%'
  680. this.rightBox.style.width = '100%'
  681. }
  682. },
  683. mouseup () {
  684. if (this.resize) {
  685. this.resize = null
  686. if (this.endX < 350 && this.endX - this.startX > 0) {
  687. this.isPackUpTree = false
  688. this.leftBox.style.width = '25%'
  689. this.rightBox.style.width = '75%'
  690. }
  691. }
  692. },
  693. mousemoveOnBox (e) {
  694. this.mousemove(e)
  695. },
  696. mouseupOnBox () {
  697. this.resize = null
  698. if (this.endX < 350 && this.endX - this.startX > 0) {
  699. this.isPackUpTree = false
  700. this.leftBox.style.width = '25%'
  701. this.rightBox.style.width = '75%'
  702. }
  703. this.resize = null
  704. }
  705. }
  706. }
  707. </script>
  708. <style lang="scss" scoped>
  709. @import '../../assets/style/bsTheme.scss';
  710. @import '../../assets/style/zTree/treePackUp.scss';
  711. ::v-deep .big-screen-router-view-wrap{
  712. padding-left: 16px !important;
  713. }
  714. .bs-pagination {
  715. padding: 0 !important;
  716. right: 16px !important;
  717. bottom: 16px !important;
  718. position: absolute !important;
  719. ::v-deep .el-input__inner {
  720. width: 110px !important;
  721. border:none;
  722. background: var(--bs-el-background-1);
  723. }
  724. }
  725. .bs-container .inner-container .el-form .filter-item {
  726. ::v-deep .el-input__inner {
  727. width: 200px;
  728. }
  729. }
  730. ::v-deep .left-tab-box {
  731. span {
  732. color: var(--bs-el-text);
  733. }
  734. }
  735. ::v-deep .left-tab-box ul li.tab-active {
  736. background-color: var(--bs-el-background-3);
  737. }
  738. ::v-deep .left-tab-box ul li:hover {
  739. background-color: var(--bs-el-background-3);
  740. }
  741. .el-dialog {
  742. .bs-container {
  743. max-height: calc(90vh - 236px) !important;
  744. .el-table {
  745. height: calc(90vh - 340px);
  746. }
  747. ::v-deep .ztree {
  748. max-height: calc(90vh - 325px) !important;
  749. }
  750. ::v-deep .el-tabs__item.is-active {
  751. border-bottom: none !important;
  752. }
  753. }
  754. }
  755. ::v-deep .ztreeNodeMenu {
  756. ul {
  757. background-color: var(--bs-background-1);
  758. }
  759. li:hover {
  760. background-color: var(--bs-el-background-3);
  761. span {
  762. color: var(--bs-el-color-primary);
  763. }
  764. }
  765. span {
  766. color: var(--bs-el-text);
  767. }
  768. .triangle {
  769. background-color: var(--bs-background-1) !important;
  770. }
  771. }
  772. .layout {
  773. width: 100%;
  774. height: 100%;
  775. }
  776. ::v-deep .el-table__body-wrapper{
  777. max-height: unset !important;
  778. }
  779. </style>