index.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871
  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="scriptExecute()"
  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. @setFieldList="(list) => { outputFieldList = list }"
  342. />
  343. </el-scrollbar>
  344. <FieldFillDialog
  345. ref="fieldFillDialog"
  346. @fieldDescFill="fieldDescFill"
  347. @fieldDescEdit="fieldDescEdit"
  348. @toSave="toSave"
  349. />
  350. </div>
  351. </template>
  352. <script>
  353. import ParamsSettingDialog from './ParamsSettingDialog.vue'
  354. import OutputFieldDialog from './OutputFieldDialog.vue'
  355. import FieldFillDialog from './FieldFillDialog.vue'
  356. import { nameCheckRepeat, datasetAdd, datasetUpdate, getDataset, getCategoryTree } from 'packages/js/utils/datasetConfigService'
  357. import { codemirror } from 'vue-codemirror'
  358. import 'codemirror/mode/javascript/javascript'
  359. import 'codemirror/lib/codemirror.css'
  360. import 'codemirror/theme/nord.css'
  361. export default {
  362. name: 'JsDataSet',
  363. components: {
  364. codemirror,
  365. FieldFillDialog,
  366. ParamsSettingDialog,
  367. OutputFieldDialog
  368. },
  369. props: {
  370. config: {
  371. type: Object,
  372. default: () => { }
  373. },
  374. isEdit: {
  375. type: Boolean,
  376. default: false
  377. },
  378. datasetId: {
  379. type: String,
  380. default: null
  381. },
  382. typeId: {
  383. type: String,
  384. default: ''
  385. },
  386. appCode: {
  387. type: String,
  388. default: ''
  389. }
  390. },
  391. data () {
  392. const validateName = (rule, value, callback) => {
  393. nameCheckRepeat({
  394. id: this.datasetId,
  395. name: value,
  396. moduleCode: this.appCode
  397. }).then((r) => {
  398. if (r) {
  399. callback(new Error('数据集名称已存在'))
  400. } else {
  401. callback()
  402. }
  403. })
  404. }
  405. return {
  406. dataForm: {
  407. id: '',
  408. name: '',
  409. typeId: '',
  410. remark: '',
  411. config: {
  412. script: '',
  413. paramsList: []
  414. }
  415. },
  416. rules: {
  417. name: [
  418. { required: true, message: '请输入数据集名称', trigger: 'blur' },
  419. { validator: validateName, trigger: 'blur' }
  420. ]
  421. },
  422. codemirrorOption: {
  423. mode: 'text/javascript',
  424. lineNumbers: true,
  425. lineWrapping: true,
  426. theme: 'nord',
  427. extraKey: { Ctrl: 'autocomplete' },
  428. hintOptions: {
  429. completeSingle: true
  430. }
  431. },
  432. activeName: 'data',
  433. dataPreviewList: [],
  434. outputFieldList: [],
  435. structurePreviewListCopy: [],
  436. typeName: '',
  437. categoryData: [],
  438. // fieldDescVisible: false,
  439. fieldsetVisible: false,
  440. paramsVisible: false,
  441. tableLoading: false,
  442. saveloading: false,
  443. saveText: '',
  444. // paramsListCopy: [],
  445. isSet: false, // 参数是否配置状态
  446. passTest: false,
  447. fieldDesc: null // 字段描述
  448. }
  449. },
  450. watch: {
  451. 'dataForm.config.script' (val) {
  452. if (!val) {
  453. this.passTest = false
  454. }
  455. }
  456. },
  457. mounted () {
  458. this.init()
  459. },
  460. methods: {
  461. async init () {
  462. this.categoryData = await getCategoryTree({ tableName: 'dataset', moduleCode: this.appCode })
  463. if (this.typeId) {
  464. this.dataForm.typeId = this.typeId
  465. this.$nextTick(() => {
  466. try {
  467. this.typeName = this.$refs.categorySelectTree.getNode(this.dataForm.typeId).data.name
  468. } catch (error) {
  469. console.error(error)
  470. }
  471. })
  472. }
  473. if (this.datasetId) {
  474. getDataset(this.datasetId).then(res => {
  475. const { id, name, typeId, remark, config } = res
  476. const { script, paramsList, fieldDesc, fieldList } = config
  477. this.dataForm = { id, name, typeId, remark, config: { script, paramsList } }
  478. this.fieldDesc = fieldDesc
  479. this.outputFieldList = fieldList
  480. this.scriptExecute(true)
  481. })
  482. }
  483. },
  484. // 保存数据集
  485. save (formName, nochecktosave = false) {
  486. if (this.passTest === false) {
  487. this.$message.error('请确保脚本不为空且执行通过')
  488. return
  489. }
  490. if (!this.outputFieldList.length) {
  491. this.$message.warning('该执行脚本未生成输出字段,请重新检查')
  492. return
  493. }
  494. if (!nochecktosave) {
  495. const temp = this.outputFieldList.some(item => {
  496. return item.fieldDesc === '' || !item.hasOwnProperty('fieldDesc')
  497. }) // true-存在为空
  498. if (temp) {
  499. this.$refs.fieldFillDialog.open()
  500. // this.fieldDescVisible = true
  501. return
  502. }
  503. }
  504. this.$refs[formName].validate((valid) => {
  505. if (valid) {
  506. this.saveloading = true
  507. this.saveText = '正在保存...'
  508. const { datasetId, dataForm, config, appCode, fieldDesc, outputFieldList } = this
  509. const form = {
  510. id: datasetId,
  511. name: dataForm.name,
  512. typeId: dataForm.typeId,
  513. remark: dataForm.remark,
  514. datasetType: config.datasetType,
  515. moduleCode: appCode,
  516. editable: appCode ? 1 : 0,
  517. config: {
  518. className: config.className,
  519. script: dataForm.config.script,
  520. fieldDesc,
  521. paramsList: dataForm.config.paramsList,
  522. fieldList: outputFieldList
  523. }
  524. }
  525. const datasetSave = this.dataForm.id === '' ? datasetAdd : datasetUpdate
  526. datasetSave(form).then(() => {
  527. this.$message.success('操作成功')
  528. this.$parent.init(false)
  529. this.$parent.setType = null
  530. this.saveloading = false
  531. this.saveText = ''
  532. }).catch(() => {
  533. this.saveloading = false
  534. this.saveText = ''
  535. })
  536. }
  537. })
  538. },
  539. saveParams (val) {
  540. this.dataForm.config.paramsList = val
  541. },
  542. // 取消操作
  543. // cancelField () {
  544. // this.structurePreviewListCopy = cloneDeep(this.outputFieldList)
  545. // this.fieldsetVisible = false
  546. // },
  547. // 设置输出字段
  548. setField () {
  549. // this.outputFieldList = cloneDeep(this.structurePreviewListCopy)
  550. // if (this.outputFieldList.length) {
  551. // this.fieldDesc = {}
  552. // this.outputFieldList.forEach(key => {
  553. // this.fieldDesc[key.fieldName] = key.fieldDesc
  554. // })
  555. // } else {
  556. // this.fieldDesc = null
  557. // }
  558. // this.fieldsetVisible = false
  559. },
  560. // 字段值填充
  561. fieldDescFill () {
  562. this.fieldDesc = {}
  563. this.outputFieldList.forEach(field => {
  564. if (field.fieldDesc === '' || !field.hasOwnProperty('fieldDesc')) {
  565. field.fieldDesc = field.fieldName
  566. this.fieldDesc[field.fieldName] = field.fieldName
  567. } else {
  568. this.fieldDesc[field.fieldName] = field.fieldDesc
  569. }
  570. })
  571. this.save('form')
  572. this.$refs.fieldFillDialog.close()
  573. // this.fieldDescVisible = false
  574. },
  575. // 进入编辑
  576. fieldDescEdit () {
  577. this.$refs.fieldFillDialog.close()
  578. // this.fieldDescVisible = false
  579. this.fieldsetVisible = true
  580. },
  581. // 继续保存
  582. toSave () {
  583. this.fieldDesc = {}
  584. this.outputFieldList.forEach(field => {
  585. this.fieldDesc[field.fieldName] = field.fieldDesc
  586. })
  587. this.save('form', true)
  588. this.$refs.fieldFillDialog.close()
  589. // this.fieldDescVisible = false
  590. },
  591. // 字段描述构建及同步
  592. buildFieldDesc () {
  593. const fieldDesc = {}
  594. this.outputFieldList.forEach(field => {
  595. if (this.fieldDesc.hasOwnProperty(field.fieldName)) {
  596. field.fieldDesc = this.fieldDesc[field.fieldName]
  597. }
  598. fieldDesc[field.fieldName] = field.fieldDesc
  599. })
  600. this.fieldDesc = fieldDesc
  601. },
  602. // 脚本执行
  603. scriptExecute (isInit = false) {
  604. if (this.dataForm.config.script) {
  605. const javascript = this.dataForm.config.script
  606. let scriptMethod = null
  607. try {
  608. const scriptAfterReplacement = javascript.replace(/\${(.*?)}/g, (match, p) => {
  609. return `'${this.dataForm.config.paramsList.find(param => param.name === p).value}'`
  610. })
  611. // eslint-disable-next-line no-new-func
  612. scriptMethod = new Function(scriptAfterReplacement)
  613. } catch (error) {
  614. this.passTest = false
  615. this.$message.error(`脚本执行错误,请检查脚本,具体错误:${error}`)
  616. return
  617. }
  618. // 调用方法生成随机数据
  619. const returnResult = scriptMethod()
  620. // 检查数据是否为数组
  621. if (!Array.isArray(returnResult)) {
  622. this.passTest = false
  623. this.$message.error('脚本执行结果不是数组,请检查脚本')
  624. return
  625. }
  626. const keys = []
  627. returnResult.forEach(item => {
  628. Object.keys(item).forEach(key => {
  629. if (!keys.includes(key)) {
  630. keys.push(key)
  631. }
  632. })
  633. })
  634. if (this.outputFieldList.length === 0) {
  635. this.outputFieldList = keys.map(item => {
  636. return {
  637. fieldName: item,
  638. fieldDesc: ''
  639. }
  640. })
  641. }
  642. // 如果脚本有变化,生成的keys和outputFieldList的长度不一致,就重新生成outputFieldList,仅添加变化的那个字段,其余的不变化
  643. if (this.outputFieldList.length !== keys.length) {
  644. const newKeys = keys.filter(item => {
  645. return !this.outputFieldList.some(key => {
  646. return key.fieldName === item
  647. })
  648. })
  649. newKeys.forEach(item => {
  650. this.outputFieldList.push({
  651. fieldName: item,
  652. fieldDesc: ''
  653. })
  654. })
  655. }
  656. if (this.outputFieldList.length && this.fieldDesc && !isInit) {
  657. this.buildFieldDesc()
  658. }
  659. // 如果有数据,就通过测试
  660. if (this.outputFieldList.length > 0) {
  661. // this.structurePreviewListCopy = cloneDeep(this.outputFieldList)
  662. this.dataPreviewList = returnResult
  663. this.passTest = true
  664. if (!isInit) {
  665. this.$message.success('脚本执行通过')
  666. }
  667. } else {
  668. this.passTest = false
  669. }
  670. } else {
  671. this.passTest = false
  672. this.$message.error('请填写脚本')
  673. }
  674. },
  675. // 执行事件
  676. // toExecute () {
  677. // if (this.dataForm.config.paramsList.length) {
  678. // this.isSet = false
  679. // this.paramsVisible = true
  680. // } else {
  681. // 无参数,直接执行脚本
  682. // this.scriptExecute()
  683. // }
  684. // },
  685. // 清空分类
  686. clearType () {
  687. this.typeName = ''
  688. this.dataForm.typeId = ''
  689. },
  690. // 分类展开高亮
  691. setCurrentNode ($event) {
  692. if ($event) {
  693. const key = this.dataForm.typeId || null
  694. this.$refs.categorySelectTree.setCurrentKey(key)
  695. }
  696. },
  697. // openParamsSetting () {
  698. // this.$refs.paramsSettingDialog.open()
  699. // },
  700. // 分类选择
  701. selectParentCategory (value) {
  702. this.dataForm.typeId = value.id
  703. this.typeName = value.name
  704. this.$refs.selectParentName.blur()
  705. },
  706. goBack () {
  707. this.$emit('back')
  708. },
  709. renderHeader (h, { column, index }) {
  710. const labelLong = column.label.length // 表头label长度
  711. const size = 14 // 根据需要定义标尺,直接使用字体大小确定就行,也可以根据需要定义
  712. column.minWidth = labelLong * size < 120 ? 120 : labelLong * size // 根据label长度计算该表头最终宽度
  713. return h('span', { class: 'cell-content', style: { width: '100%' } }, [column.label])
  714. },
  715. openNewWindow (url) {
  716. window.open(url, '_blank')
  717. }
  718. }
  719. }
  720. </script>
  721. <style lang="scss" scoped>
  722. @import '../../../packages/assets/style/bsTheme.scss';
  723. .data-set-scrollbar {
  724. height: 100%;
  725. overflow-y: auto;
  726. overflow-x: none;
  727. .el-scrollbar__view {
  728. height: 100%;
  729. }
  730. }
  731. /deep/ .el-input__inner {
  732. width: 100% !important;
  733. }
  734. .page-header {
  735. display: flex;
  736. position: relative;
  737. .page-header-right {
  738. position: absolute;
  739. right: 16px;
  740. }
  741. }
  742. .sql-config {
  743. padding: 0 16px;
  744. }
  745. .operation {
  746. /deep/ .el-select {
  747. width: 200px !important;
  748. margin-right: 16px;
  749. }
  750. display: flex;
  751. }
  752. /deep/ .CodeMirror {
  753. height: 180px !important;
  754. font-family: Helvetica, Tahoma;
  755. }
  756. .no-border {
  757. border: 0;
  758. }
  759. /deep/ .fieldDescCheck {
  760. .el-dialog__body {
  761. height: fit-content !important;
  762. min-height: unset !important;
  763. }
  764. }
  765. .title-style {
  766. padding: 8px 12px;
  767. background-color: #f6f7fb;
  768. border-left: 5px solid var(--bs-el-color-primary);
  769. margin: 16px 16px 0 0;
  770. }
  771. .field-wrap {
  772. // max-height: 110px;
  773. overflow: auto;
  774. margin-right: 16px;
  775. cursor: pointer;
  776. .field-item {
  777. line-height: 32px;
  778. padding: 0 12px 0 16px;
  779. .edit_field {
  780. display: none;
  781. }
  782. &:hover {
  783. background-color: #f2f7fe;
  784. .edit_field {
  785. display: block;
  786. }
  787. }
  788. }
  789. }
  790. .right-setting {
  791. height: 358px;
  792. overflow: hidden;
  793. display: flex;
  794. flex-direction: column;
  795. .paramConfig {
  796. max-height: 179px;
  797. .field-wrap {
  798. max-height: 127px;
  799. }
  800. }
  801. .structure {
  802. flex: 1;
  803. overflow: hidden;
  804. .field-wrap {
  805. height: calc(100% - 40px);
  806. }
  807. }
  808. }
  809. .result-view {
  810. font-size: 14px;
  811. font-weight: 600;
  812. color: var(--bs-el-text);
  813. position: relative;
  814. padding: 16px 0;
  815. padding-left: 12px;
  816. border-bottom: 1px solid var(--bs-background-1);
  817. &::before {
  818. content: "";
  819. height: 14px;
  820. position: absolute;
  821. left: 0;
  822. top: 50%;
  823. transform: translateY(-50%);
  824. border-left: 4px solid var(--bs-el-color-primary);
  825. }
  826. }
  827. /deep/ .bs-table-box.is-Edit .el-table {
  828. max-height: unset !important;
  829. .el-table__body-wrapper {
  830. max-height: unset !important;
  831. }
  832. }
  833. .bs-table-box {
  834. padding: 0;
  835. height: 100% !important;
  836. margin-bottom: 0 !important;
  837. }
  838. .tree-box {
  839. padding: 0;
  840. }
  841. </style>