fujunling
2023-06-06 e480475d30c1a079a39b6cbf1dd43dc485394e62
动态表单
已修改5个文件
64 ■■■■■ 文件已修改
Source/UBCS-WEB/src/components/FormTemplate/CodeApply.vue 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/FormTemplate/FormTempalte.vue 33 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/FormTemplate/ResembleQuery.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/FormTemplate/index.vue 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/vue.config.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/FormTemplate/CodeApply.vue
@@ -57,13 +57,6 @@
    getType(item) {
      return this.selfColumnType[item.sectype];
    },
    init(columnList) {
      this.$refs.FormTempalte.templateRender(columnList);
    },
    handleResize() {
      let windowWidth = document.body.clientWidth;
      this.trendsSpan = 24 / Math.floor(windowWidth / 500);
    },
    isRequired(item) {
      return item.nullableFlag != "true";
    },
@@ -90,6 +83,15 @@
        return [];
      }
    },
    init(columnList) {
      this.$refs.FormTempalte.templateRender(columnList);
    },
    handleResize() {
      let windowWidth = document.body.clientWidth;
      this.trendsSpan = 24 / Math.floor(windowWidth / 500);
    },
    async validate() {
      return await this.$refs.FormTempalte.validate();
    },
Source/UBCS-WEB/src/components/FormTemplate/FormTempalte.vue
@@ -24,18 +24,18 @@
        </span>
      </template>
      <template :slot="item.prop + ''" v-for="item in slotColumnList">
        <!-- <vciWebRefer
        <vciWebRefer
          v-if="item.type == 'refer'"
          :value="item.value"
          :options="item.referConfig || {}"
        ></vciWebRefer> -->
        ></vciWebRefer>
      </template>
    </avue-form>
  </div>
</template>
<script>
import { getFormTemplate, getFormDetail } from "@/api/formTemplate";
import { getFormDetail } from "@/api/formTemplate";
import { getDictionary } from "../../api/system/dict";
import vciWebRefer from "../refer/vciWebRefer.vue";
export default {
@@ -497,31 +497,6 @@
    this.handleResize();
  },
  methods: {
    // 初始化
    init(columnList) {
      if (Array.isArray(columnList)) {
        this.templateRender(columnList);
      } else {
        this.getFormTemplate();
      }
    },
    // 接口获取表单数据
    getFormTemplate() {
      getFormTemplate({
        templateOid: this.templateOid,
        codeClassifyOid: this.codeClassifyOid,
      })
        .then((res) => {
          if (res.status === 200) {
            this.$emit('getFormTemplateEnd', res.data)
            this.templateRender(res.data.formDefineVO.items);
          }
        })
        .catch((err) => {
          this.loading = false;
          console.log(err);
        });
    },
    // 渲染表单模板
    templateRender(formItemList) {
      // 无需分组数据
@@ -716,7 +691,7 @@
    getFormDetail() {
      if (this.type === 'add') return 
      if (this.type === "add") return;
      getFormDetail({ templateOid: this.templateOid, oid: this.rowOid }).then(
      getFormDetail({ templateOid: this.templateOid, oid: '213D13D5-76D3-6B42-0932-705693F6B6E4' }).then(
        (res) => {
          this.form = Object.assign(this.form, res.obj)
          console.log(res, "res");
Source/UBCS-WEB/src/components/FormTemplate/ResembleQuery.vue
@@ -36,7 +36,7 @@
      ref="FormTemplateDialog"
      type="detail"
      :visible.sync="formTemplateVisible"
      :templateOid="this.resembleTemplateOid"
      :templateOid="resembleTemplateOid"
      :rowOid="rowOid"
      title="查看详细信息"
      :codeClassifyOid="this.resembleCodeClassifyOid"
@@ -142,7 +142,8 @@
    },
    openFormTemlpate(row) {
      this.codetemplateoid = row.codetemplateoid;
      this.resembleTemplateOid = row.codetemplateoid
      this.resembleCodeClassifyOid = row.codeClassifyOid
      this.rowOid = row.iod
      this.formTemplateVisible = true;
    },
Source/UBCS-WEB/src/components/FormTemplate/index.vue
@@ -14,6 +14,7 @@
      :visible="visible"
      :type="type"
      :rowOid="rowOid"
      :templateOid="templateOid"
      ref="FormTempalte"
      @getFormData="getFormData"
    ></FormTempalte>
@@ -160,7 +161,9 @@
  methods: {
    openDialog() {
      this.getFormTemplate();
      this.getCodeRule();
      if (this.type === 'add') {
        this.getCodeRule();
      }
    },
    close() {
      this.dialogVisible = false;
Source/UBCS-WEB/vue.config.js
@@ -29,13 +29,8 @@
        //  target: 'http://localhost:37000',
        // target: 'http://192.168.1.63:37000',
        //target: 'http://192.168.3.7:37000',
<<<<<<< HEAD
        // target: 'http://dev.vci-tech.com:37000',
        target: 'http://192.168.1.51:37000/',
=======
        target: 'http://dev.vci-tech.com:37000',
        // target: 'http://192.168.1.51:37000/',
>>>>>>> a3c7b3f7a4778a777a78a72c968b0e172488df03
        //远程演示服务地址,可用于直接启动项目
        // target: 'https://saber.bladex.vip/api',
        ws: true,