index.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847
  1. <template>
  2. <div
  3. class="inner-container"
  4. :element-loading-text="saveText"
  5. >
  6. <el-scrollbar class="data-set-scrollbar">
  7. <div class="header">
  8. <el-page-header class="bs-el-page-header">
  9. <template slot="content">
  10. <div class="page-header">
  11. <div class="page-header-left">
  12. {{ !isEdit ? 'js数据集详情' : dataForm.id ? 'js数据集编辑' : 'js数据集新增' }}
  13. </div>
  14. <div class="page-header-right">
  15. <el-button
  16. class="bs-el-button-default"
  17. @click="openNewWindow('https://www.yuque.com/chuinixiongkou/bigscreen/groovy_dataset')"
  18. >
  19. 帮助
  20. </el-button>
  21. <el-button
  22. v-if="isEdit"
  23. type="primary"
  24. @click="save('form')"
  25. >
  26. 保存
  27. </el-button>
  28. <el-button
  29. class="bs-el-button-default"
  30. @click="goBack"
  31. >
  32. 返回
  33. </el-button>
  34. </div>
  35. </div>
  36. </template>
  37. </el-page-header>
  38. </div>
  39. <el-row style="margin: 16px 16px 0;">
  40. <el-col :span="isEdit ? 16 : 24">
  41. <el-form
  42. ref="form"
  43. :model="dataForm"
  44. :rules="rules"
  45. label-width="120px"
  46. style="padding: 16px 16px 0;"
  47. >
  48. <el-row :gutter="20">
  49. <el-col :span="12">
  50. <el-form-item
  51. label="名称"
  52. prop="name"
  53. >
  54. <el-input
  55. v-model="dataForm.name"
  56. class="bs-el-input"
  57. clearable
  58. :disabled="!isEdit"
  59. />
  60. </el-form-item>
  61. </el-col>
  62. <el-col :span="12">
  63. <el-form-item
  64. label="分组"
  65. prop="typeId"
  66. >
  67. <el-select
  68. ref="selectParentName"
  69. v-model="dataForm.typeId"
  70. class="bs-el-select"
  71. popper-class="bs-el-select"
  72. clearable
  73. :disabled="!isEdit"
  74. @clear="clearType"
  75. @visible-change="setCurrentNode"
  76. >
  77. <el-option
  78. style="height: auto;padding: 0;"
  79. :label="typeName"
  80. :value="dataForm.typeId"
  81. >
  82. <div class="tree-box">
  83. <el-tree
  84. ref="categorySelectTree"
  85. :data="categoryData"
  86. node-key="id"
  87. :indent="0"
  88. :props="{ label: 'name', children: 'children' }"
  89. :default-expand-all="true"
  90. :highlight-current="true"
  91. :expand-on-click-node="false"
  92. class="bs-el-tree"
  93. @node-click="selectParentCategory"
  94. >
  95. <span
  96. slot-scope="{ data }"
  97. class="custom-tree-node"
  98. >
  99. <span>
  100. <i
  101. :class="data.children && data.children.length ? 'el-icon el-icon-folder' : 'el-icon el-icon-document'"
  102. />
  103. {{ data.name }}
  104. </span>
  105. </span>
  106. </el-tree>
  107. </div>
  108. </el-option>
  109. </el-select>
  110. </el-form-item>
  111. </el-col>
  112. </el-row>
  113. <el-row :gutter="20">
  114. <el-col :span="12">
  115. <el-form-item
  116. label="描述"
  117. prop="remark"
  118. >
  119. <el-input
  120. v-model="dataForm.remark"
  121. class="bs-el-input"
  122. :disabled="!isEdit"
  123. />
  124. </el-form-item>
  125. </el-col>
  126. </el-row>
  127. </el-form>
  128. <div
  129. v-if="isEdit"
  130. class="sql-config"
  131. >
  132. <div>
  133. <codemirror
  134. ref="targetInSql"
  135. v-model="dataForm.config.script"
  136. :options="codemirrorOption"
  137. style="margin-top: 2px"
  138. />
  139. </div>
  140. <div style="text-align: center; padding: 16px 0;">
  141. <el-button
  142. type="primary"
  143. @click="toExecute"
  144. >
  145. 执行
  146. </el-button>
  147. </div>
  148. </div>
  149. </el-col>
  150. <el-col
  151. v-if="isEdit"
  152. :span="8"
  153. >
  154. <div class="right-setting">
  155. <div class="paramConfig">
  156. <div class="title-style bs-title-style">
  157. 方法参数
  158. <el-button
  159. type="text"
  160. style="float: right;border: none;margin-top: -4px;"
  161. @click="$refs.paramsSettingDialog.open()"
  162. >
  163. 配置
  164. </el-button>
  165. </div>
  166. <div class="field-wrap bs-field-wrap bs-scrollbar">
  167. <div
  168. v-for="param in dataForm.config.paramsList"
  169. :key="param.name"
  170. class="field-item"
  171. @click="$refs.paramsSettingDialog.open()"
  172. >
  173. <span>{{ param.name }}</span>&nbsp;<span
  174. v-show="param.remark"
  175. style="color: #909399;"
  176. >
  177. ({{ param.remark }})
  178. </span>
  179. <el-button
  180. class="edit_field"
  181. type="text"
  182. style="float: right;border: none;margin-top: 2px;"
  183. @click="$refs.paramsSettingDialog.open()"
  184. >
  185. 配置
  186. </el-button>
  187. </div>
  188. </div>
  189. </div>
  190. <div class="structure">
  191. <div class="title-style bs-title-style">
  192. 输出字段
  193. <el-button
  194. type="text"
  195. style="float: right;border: none;margin-top: -4px;"
  196. @click="$refs.outputFieldDialog.open()"
  197. >
  198. 配置
  199. </el-button>
  200. </div>
  201. <div class="field-wrap bs-field-wrap bs-scrollbar">
  202. <div
  203. v-for="(field,key) in outputFieldList"
  204. :key="key"
  205. class="field-item"
  206. @click="$refs.outputFieldDialog.open()"
  207. >
  208. <span>{{ field.fieldName }}</span>&nbsp;
  209. <span
  210. v-show="field.fieldDesc"
  211. style="color: #909399;"
  212. >
  213. ({{ field.fieldDesc }})</span>
  214. <el-button
  215. class="edit_field"
  216. type="text"
  217. style="float: right;border: none;margin-top: 2px;"
  218. @click="$refs.outputFieldDialog.open()"
  219. >
  220. 配置
  221. </el-button>
  222. </div>
  223. </div>
  224. </div>
  225. </div>
  226. </el-col>
  227. </el-row>
  228. <div
  229. v-if="isEdit"
  230. class="dataPreView"
  231. style="margin-top: 12px;"
  232. >
  233. <div class="result-view">
  234. 数据预览
  235. </div>
  236. <div
  237. v-loading="tableLoading"
  238. class="bs-table-box is-Edit bs-scrollbar"
  239. >
  240. <el-table
  241. align="center"
  242. :data="dataPreviewList"
  243. max-height="400"
  244. :border="true"
  245. class="bs-el-table bs-scrollbar"
  246. >
  247. <el-table-column
  248. v-for="(value, key) in dataPreviewList[0]"
  249. :key="key"
  250. :label="key"
  251. align="center"
  252. show-overflow-tooltip
  253. :render-header="renderHeader"
  254. >
  255. <template slot-scope="scope">
  256. <span>{{ scope.row[key] }}</span>
  257. </template>
  258. </el-table-column>
  259. </el-table>
  260. </div>
  261. </div>
  262. <div
  263. v-if="!isEdit"
  264. class="dataPreView"
  265. >
  266. <el-tabs v-model="activeName">
  267. <el-tab-pane
  268. v-loading="tableLoading"
  269. label="数据预览"
  270. name="data"
  271. >
  272. <div class="bs-table-box">
  273. <el-table
  274. align="center"
  275. :data="dataPreviewList"
  276. max-height="400"
  277. :border="true"
  278. class="bs-el-table"
  279. >
  280. <el-table-column
  281. v-for="(value, key) in dataPreviewList[0]"
  282. :key="key"
  283. :label="key"
  284. align="center"
  285. show-overflow-tooltip
  286. :render-header="renderHeader"
  287. >
  288. <template slot-scope="scope">
  289. <span>{{ scope.row[key] }}</span>
  290. </template>
  291. </el-table-column>
  292. </el-table>
  293. </div>
  294. </el-tab-pane>
  295. <el-tab-pane
  296. v-loading="tableLoading"
  297. label="数据集结构"
  298. name="structure"
  299. >
  300. <div class="bs-table-box">
  301. <el-table
  302. max-height="400"
  303. :data="outputFieldList"
  304. :border="true"
  305. align="center"
  306. >
  307. <el-table-column
  308. align="center"
  309. show-overflow-tooltip
  310. prop="fieldName"
  311. label="字段值"
  312. />
  313. <el-table-column
  314. align="center"
  315. prop="fieldDesc"
  316. label="字段描述"
  317. >
  318. <template slot-scope="scope">
  319. <el-input
  320. v-if="isEdit"
  321. v-model="scope.row.fieldDesc"
  322. size="small"
  323. class="labeldsc bs-el-input"
  324. />
  325. <span v-else>{{ scope.row.fieldDesc }}</span>
  326. </template>
  327. </el-table-column>
  328. </el-table>
  329. </div>
  330. </el-tab-pane>
  331. </el-tabs>
  332. </div>
  333. <ParamsSettingDialog
  334. ref="paramsSettingDialog"
  335. :params-list="dataForm.config.paramsList"
  336. @saveParams="saveParams"
  337. />
  338. <OutputFieldDialog
  339. ref="outputFieldDialog"
  340. :output-field-list="outputFieldList"
  341. />
  342. </el-scrollbar>
  343. <FieldFillDialog
  344. ref="fieldFillDialog"
  345. @fieldDescFill="fieldDescFill"
  346. @fieldDescEdit="fieldDescEdit"
  347. @toSave="toSave"
  348. />
  349. </div>
  350. </template>
  351. <script>
  352. import ParamsSettingDialog from './ParamsSettingDialog.vue'
  353. import OutputFieldDialog from './OutputFieldDialog.vue'
  354. import FieldFillDialog from './FieldFillDialog.vue'
  355. import { nameCheckRepeat, datasetAdd, datasetUpdate, getDataset, getCategoryTree } from 'packages/js/utils/datasetConfigService'
  356. import { codemirror } from 'vue-codemirror'
  357. import 'codemirror/mode/javascript/javascript'
  358. import 'codemirror/lib/codemirror.css'
  359. import 'codemirror/theme/nord.css'
  360. export default {
  361. name: 'JsDataSet',
  362. components: {
  363. codemirror,
  364. FieldFillDialog,
  365. ParamsSettingDialog,
  366. OutputFieldDialog
  367. },
  368. props: {
  369. config: {
  370. type: Object,
  371. default: () => {}
  372. },
  373. isEdit: {
  374. type: Boolean,
  375. default: false
  376. },
  377. datasetId: {
  378. type: String,
  379. default: null
  380. },
  381. typeId: {
  382. type: String,
  383. default: ''
  384. },
  385. appCode: {
  386. type: String,
  387. default: ''
  388. }
  389. },
  390. data () {
  391. const validateName = (rule, value, callback) => {
  392. nameCheckRepeat({
  393. id: this.datasetId,
  394. name: value,
  395. moduleCode: this.appCode
  396. }).then((r) => {
  397. if (r) {
  398. callback(new Error('数据集名称已存在'))
  399. } else {
  400. callback()
  401. }
  402. })
  403. }
  404. return {
  405. dataForm: {
  406. id: '',
  407. name: '',
  408. typeId: '',
  409. remark: '',
  410. config: {
  411. script: '',
  412. paramsList: []
  413. }
  414. },
  415. rules: {
  416. name: [
  417. { required: true, message: '请输入数据集名称', trigger: 'blur' },
  418. { validator: validateName, trigger: 'blur' }
  419. ]
  420. },
  421. codemirrorOption: {
  422. mode: 'text/javascript',
  423. lineNumbers: true,
  424. lineWrapping: true,
  425. theme: 'nord',
  426. extraKey: { Ctrl: 'autocomplete' },
  427. hintOptions: {
  428. completeSingle: true
  429. }
  430. },
  431. activeName: 'data',
  432. dataPreviewList: [],
  433. outputFieldList: [],
  434. structurePreviewListCopy: [],
  435. typeName: '',
  436. categoryData: [],
  437. // fieldDescVisible: false,
  438. fieldsetVisible: false,
  439. paramsVisible: false,
  440. tableLoading: false,
  441. saveloading: false,
  442. saveText: '',
  443. // paramsListCopy: [],
  444. isSet: false, // 参数是否配置状态
  445. passTest: false,
  446. fieldDesc: null // 字段描述
  447. }
  448. },
  449. watch: {
  450. 'dataForm.config.script' () {
  451. this.passTest = false
  452. }
  453. },
  454. mounted () {
  455. this.init()
  456. },
  457. methods: {
  458. async init () {
  459. this.categoryData = await getCategoryTree({ tableName: 'dataset', moduleCode: this.appCode })
  460. if (this.typeId) {
  461. this.dataForm.typeId = this.typeId
  462. this.$nextTick(() => {
  463. try {
  464. this.typeName = this.$refs.categorySelectTree.getNode(this.dataForm.typeId).data.name
  465. } catch (error) {
  466. console.error(error)
  467. }
  468. })
  469. }
  470. if (this.datasetId) {
  471. getDataset(this.datasetId).then(res => {
  472. const { id, name, typeId, remark, config } = res
  473. const { script, paramsList, fieldDesc, fieldList } = config
  474. this.dataForm = { id, name, typeId, remark, config: { script, paramsList } }
  475. this.fieldDesc = fieldDesc
  476. this.outputFieldList = fieldList
  477. this.scriptExecute(true)
  478. })
  479. }
  480. },
  481. // 保存数据集
  482. save (formName, nochecktosave = false) {
  483. if (this.passTest === false) {
  484. this.$message.error('请确保脚本不为空且执行通过')
  485. return
  486. }
  487. if (!this.outputFieldList.length) {
  488. this.$message.warning('该执行脚本未生成输出字段,请重新检查')
  489. return
  490. }
  491. if (!nochecktosave) {
  492. const temp = this.outputFieldList.some(item => {
  493. return item.fieldDesc === '' || !item.hasOwnProperty('fieldDesc')
  494. }) // true-存在为空
  495. if (temp) {
  496. this.$refs.fieldFillDialog.open()
  497. // this.fieldDescVisible = true
  498. return
  499. }
  500. }
  501. this.$refs[formName].validate((valid) => {
  502. if (valid) {
  503. this.saveloading = true
  504. this.saveText = '正在保存...'
  505. const { datasetId, dataForm, config, appCode, fieldDesc, outputFieldList } = this
  506. const form = {
  507. id: datasetId,
  508. name: dataForm.name,
  509. typeId: dataForm.typeId,
  510. remark: dataForm.remark,
  511. datasetType: config.datasetType,
  512. moduleCode: appCode,
  513. editable: appCode ? 1 : 0,
  514. config: {
  515. className: config.className,
  516. script: dataForm.config.script,
  517. fieldDesc,
  518. paramsList: dataForm.config.paramsList,
  519. fieldList: outputFieldList
  520. }
  521. }
  522. const datasetSave = this.dataForm.id === '' ? datasetAdd : datasetUpdate
  523. datasetSave(form).then(() => {
  524. this.$message.success('操作成功')
  525. this.$parent.init(false)
  526. this.$parent.setType = null
  527. this.saveloading = false
  528. this.saveText = ''
  529. }).catch(() => {
  530. this.saveloading = false
  531. this.saveText = ''
  532. })
  533. }
  534. })
  535. },
  536. saveParams (val) {
  537. this.dataForm.config.paramsList = val
  538. },
  539. // 取消操作
  540. // cancelField () {
  541. // this.structurePreviewListCopy = cloneDeep(this.outputFieldList)
  542. // this.fieldsetVisible = false
  543. // },
  544. // 设置输出字段
  545. setField () {
  546. // this.outputFieldList = cloneDeep(this.structurePreviewListCopy)
  547. // if (this.outputFieldList.length) {
  548. // this.fieldDesc = {}
  549. // this.outputFieldList.forEach(key => {
  550. // this.fieldDesc[key.fieldName] = key.fieldDesc
  551. // })
  552. // } else {
  553. // this.fieldDesc = null
  554. // }
  555. // this.fieldsetVisible = false
  556. },
  557. // 字段值填充
  558. fieldDescFill () {
  559. this.fieldDesc = {}
  560. this.outputFieldList.forEach(field => {
  561. if (field.fieldDesc === '' || !field.hasOwnProperty('fieldDesc')) {
  562. field.fieldDesc = field.fieldName
  563. this.fieldDesc[field.fieldName] = field.fieldName
  564. } else {
  565. this.fieldDesc[field.fieldName] = field.fieldDesc
  566. }
  567. })
  568. this.save('form')
  569. this.$refs.fieldFillDialog.close()
  570. // this.fieldDescVisible = false
  571. },
  572. // 进入编辑
  573. fieldDescEdit () {
  574. this.$refs.fieldFillDialog.close()
  575. // this.fieldDescVisible = false
  576. this.fieldsetVisible = true
  577. },
  578. // 继续保存
  579. toSave () {
  580. this.fieldDesc = {}
  581. this.outputFieldList.forEach(field => {
  582. this.fieldDesc[field.fieldName] = field.fieldDesc
  583. })
  584. this.save('form', true)
  585. this.$refs.fieldFillDialog.close()
  586. // this.fieldDescVisible = false
  587. },
  588. // 字段描述构建及同步
  589. buildFieldDesc () {
  590. const fieldDesc = {}
  591. this.outputFieldList.forEach(field => {
  592. if (this.fieldDesc.hasOwnProperty(field.fieldName)) {
  593. field.fieldDesc = this.fieldDesc[field.fieldName]
  594. }
  595. fieldDesc[field.fieldName] = field.fieldDesc
  596. })
  597. this.fieldDesc = fieldDesc
  598. },
  599. // 脚本执行
  600. scriptExecute (isInit = false) {
  601. if (this.dataForm.config.script) {
  602. const javascript = this.dataForm.config.script
  603. let scriptMethod = null
  604. try {
  605. scriptMethod = eval(`(${javascript})`)
  606. } catch (error) {
  607. this.passTest = false
  608. this.$message.error('脚本执行错误,请检查脚本')
  609. return
  610. }
  611. // 调用方法生成随机数据
  612. const returnResult = scriptMethod()
  613. // 检查数据是否为数组
  614. if (!Array.isArray(returnResult)) {
  615. this.passTest = false
  616. this.$message.error('脚本执行结果不是数组,请检查脚本')
  617. return
  618. }
  619. const keys = []
  620. returnResult.forEach(item => {
  621. Object.keys(item).forEach(key => {
  622. if (!keys.includes(key)) {
  623. keys.push(key)
  624. }
  625. })
  626. })
  627. this.outputFieldList = keys.map(item => {
  628. return {
  629. fieldName: item,
  630. fieldDesc: ''
  631. }
  632. })
  633. if (this.outputFieldList.length && this.fieldDesc) {
  634. this.buildFieldDesc()
  635. }
  636. // 如果有数据,就通过测试
  637. if (this.outputFieldList.length > 0) {
  638. // this.structurePreviewListCopy = cloneDeep(this.outputFieldList)
  639. this.dataPreviewList = returnResult
  640. this.passTest = true
  641. if (!isInit) {
  642. this.$message.success('脚本执行通过')
  643. }
  644. } else {
  645. this.passTest = false
  646. }
  647. } else {
  648. this.passTest = false
  649. this.$message.error('请填写脚本')
  650. }
  651. },
  652. // 执行事件
  653. toExecute () {
  654. // if (this.dataForm.config.paramsList.length) {
  655. // this.isSet = false
  656. // this.paramsVisible = true
  657. // } else {
  658. // 无参数,直接执行脚本
  659. this.scriptExecute()
  660. // }
  661. },
  662. // 清空分类
  663. clearType () {
  664. this.typeName = ''
  665. this.dataForm.typeId = ''
  666. },
  667. // 分类展开高亮
  668. setCurrentNode ($event) {
  669. if ($event) {
  670. const key = this.dataForm.typeId || null
  671. this.$refs.categorySelectTree.setCurrentKey(key)
  672. }
  673. },
  674. // openParamsSetting () {
  675. // this.$refs.paramsSettingDialog.open()
  676. // },
  677. // 分类选择
  678. selectParentCategory (value) {
  679. this.dataForm.typeId = value.id
  680. this.typeName = value.name
  681. this.$refs.selectParentName.blur()
  682. },
  683. goBack () {
  684. this.$emit('back')
  685. },
  686. renderHeader (h, { column, index }) {
  687. const labelLong = column.label.length // 表头label长度
  688. const size = 14 // 根据需要定义标尺,直接使用字体大小确定就行,也可以根据需要定义
  689. column.minWidth = labelLong * size < 120 ? 120 : labelLong * size // 根据label长度计算该表头最终宽度
  690. return h('span', { class: 'cell-content', style: { width: '100%' } }, [column.label])
  691. },
  692. openNewWindow (url) {
  693. window.open(url, '_blank')
  694. }
  695. }
  696. }
  697. </script>
  698. <style lang="scss" scoped>
  699. @import '../../../packages/assets/style/bsTheme.scss';
  700. .data-set-scrollbar {
  701. height: 100%;
  702. overflow-y: auto;
  703. overflow-x: none;
  704. .el-scrollbar__view {
  705. height: 100%;
  706. }
  707. }
  708. /deep/ .el-input__inner {
  709. width: 100% !important;
  710. }
  711. .page-header {
  712. display: flex;
  713. position: relative;
  714. .page-header-right {
  715. position: absolute;
  716. right: 16px;
  717. }
  718. }
  719. .sql-config {
  720. padding: 0 16px;
  721. }
  722. .operation {
  723. /deep/ .el-select {
  724. width: 200px !important;
  725. margin-right: 16px;
  726. }
  727. display: flex;
  728. }
  729. /deep/ .CodeMirror {
  730. height: 180px !important;
  731. font-family: Helvetica, Tahoma;
  732. }
  733. .no-border {
  734. border: 0;
  735. }
  736. /deep/ .fieldDescCheck {
  737. .el-dialog__body {
  738. height: fit-content !important;
  739. min-height: unset !important;
  740. }
  741. }
  742. .title-style {
  743. padding: 8px 12px;
  744. background-color: #f6f7fb;
  745. border-left: 5px solid var(--bs-el-color-primary);
  746. margin: 16px 16px 0 0;
  747. }
  748. .field-wrap {
  749. // max-height: 110px;
  750. overflow: auto;
  751. margin-right: 16px;
  752. cursor: pointer;
  753. .field-item {
  754. line-height: 32px;
  755. padding: 0 12px 0 16px;
  756. .edit_field {
  757. display: none;
  758. }
  759. &:hover {
  760. background-color: #f2f7fe;
  761. .edit_field {
  762. display: block;
  763. }
  764. }
  765. }
  766. }
  767. .right-setting {
  768. height: 358px;
  769. overflow: hidden;
  770. display: flex;
  771. flex-direction: column;
  772. .paramConfig {
  773. max-height: 179px;
  774. .field-wrap {
  775. max-height: 127px;
  776. }
  777. }
  778. .structure {
  779. flex: 1;
  780. overflow: hidden;
  781. .field-wrap {
  782. height: calc(100% - 40px);
  783. }
  784. }
  785. }
  786. .result-view {
  787. font-size: 14px;
  788. font-weight: 600;
  789. color: var(--bs-el-text);
  790. position: relative;
  791. padding: 16px 0;
  792. padding-left: 12px;
  793. border-bottom: 1px solid var(--bs-background-1);
  794. &::before {
  795. content: "";
  796. height: 14px;
  797. position: absolute;
  798. left: 0;
  799. top: 50%;
  800. transform: translateY(-50%);
  801. border-left: 4px solid var(--bs-el-color-primary);
  802. }
  803. }
  804. /deep/ .bs-table-box.is-Edit .el-table {
  805. max-height: unset !important;
  806. .el-table__body-wrapper {
  807. max-height: unset !important;
  808. }
  809. }
  810. .bs-table-box {
  811. padding: 0;
  812. height: 100% !important;
  813. margin-bottom: 0 !important;
  814. }
  815. .tree-box{
  816. padding: 0;
  817. }
  818. </style>