123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117 |
- <template>
- <a-card>
- <sd-detail-form
- v-show="showForm"
- ref="docform"
- page-id="onl:00788856205141a18048cfb8b01b07e7"
- :record-id="id"
- :class="[$style.form]"
- @close="close(true)"
- @saved="saved"
- >
- <template v-slot="{ formData, model, fields }">
- <table :class="$style.detailForm">
- <tr>
- <td colspan="4" style="border:none">
- <sd-form-by-builder :form-data="formData.pageFormData"></sd-form-by-builder>
- </td>
- </tr>
- </table>
- </template>
- </sd-detail-form>
- </a-card>
- </template>
- <script>
- import { message } from '@/common/one-ui'
- import axios from '@/common/services/axios-instance'
- import components from './_import-components/law-work-bench-config-import'
- export default {
- name: 'LawWorkBenchConfig',
- metaInfo: {
- title: 'LawWorkBenchConfig',
- },
- components: {
- ...components,
- },
- data() {
- return {
- showForm: false,
- id: this.$route.query.id ? this.$route.query.id : '',
- }
- },
- mounted() {
- const ini = setInterval(() => {
- if (
- this.$refs.docform &&
- (this.$refs.docform.$refs.form || this.$refs.docform.$refs.sdForm)
- ) {
- clearInterval(ini)
- axios({
- method: 'post',
- url: 'api/xcoa-mobile/v1/iam-page/businessList',
- data: {
- columns: 'LAW_CASE_SHOW,LAW_DISPUTE_SHOW',
- expressions: [],
- formId: 'onlhead:00788856205141a18048cfb8b01b07e7',
- maxResults: 10,
- startPosition: 0,
- },
- }).then((res) => {
- if (res.data.data.length > 0) {
- const showCase = res.data.data[0].LAW_CASE_SHOW === '显示' ? '1' : '0'
- const showDispute = res.data.data[0].LAW_DISPUTE_SHOW === '显示' ? '1' : '0'
- this.$refs.docform.setFieldValue('LAW_CASE_SHOW', showCase)
- this.$refs.docform.setFieldValue('LAW_DISPUTE_SHOW', showDispute)
- this.id = res.data.data[0].id
- } else {
- this.$refs.docform.setFieldValue('LAW_CASE_SHOW', '0')
- this.$refs.docform.setFieldValue('LAW_DISPUTE_SHOW', '0')
- }
- this.showForm = true
- })
- }
- }, 100)
- },
- methods: {
- saved(t) {
- const idobj = t.pageFormData.pageFieldInfos.find((i) => i.name === 'id').value
- this.id = idobj
- message.success({ content: '保存成功!' }, 1)
- },
- // 保存
- saveForm() {
- this.$refs.docform.saveBtnClick()
- },
- close(flag) {
- window.close()
- },
- // initDaF(array) {
- // if (array) {
- // array.attrFD.keepHiddenCell = false
- // }
- // if (this.flag) {
- // setTimeout(() => {
- // this.$refs.docform.setFieldValue('BASE_INFO', 'true')
- // this.$refs.docform.setFieldValue('SUPPORT_LIST', 'true')
- // }, 1000)
- // this.flag = false
- // }
- // return array
- // },
- },
- }
- </script>
- <style module lang="scss">
- @use '@/common/design' as *;
- @import '@/webflow/sd-flow-form.scss';
- .detailForm {
- width: 100% !important;
- margin: 0px;
- :global(.sd-form-table) {
- // width: 100% !important;
- }
- }
- </style>
|