JsonEditForm.vue 23 KB

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