fujunling
2023-06-06 f8fe13b6f7d8ad1ae53e7bf6a6cf83f584d52a4d
Source/UBCS-WEB/src/components/FormTemplate/FormTempalte.vue
@@ -24,11 +24,11 @@
        </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>
@@ -513,10 +513,8 @@
      })
        .then((res) => {
          if (res.status === 200) {
            this.templateRender(this.testItems);
            // 测试数据展示
            // this.templateRender(res.data.formDefineVO.items);
            this.$emit("getFormTemplateEnd", res.data);
            this.$emit('getFormTemplateEnd', res.data)
            this.templateRender(res.data.formDefineVO.items);
          }
        })
        .catch((err) => {
@@ -583,9 +581,6 @@
          maxlength: formItem.maxlength,
          filterable: true,
          referConfig: formItem.referConfig,
          change: () => {
            this.changeFun(formItem.displayExtension, formItem.prop);
          },
          span: formItem.type === "textarea" ? 24 : this.trendsSpan,
          rules: [
            {
@@ -618,8 +613,7 @@
      this.formIndex++;
      this.loading = false;
      this.geDictData(dictKeys);
      // 测试数据展示
      // this.getFormDetail();
      this.getFormDetail();
    },
    // 使用传入的表单数据配置
    resetFormConfig(formItem) {
@@ -665,11 +659,6 @@
      if ((type === "text" && !isIcon) || (type === "icon" && isIcon)) {
        return val;
      }
    },
    changeFun(displayExtension, prop) {
      // executeCode({displayExtension, data: this.form}).then(res => {
      //   this.form[prop] = res.data.data
      // })
    },
    // 获取swich和已拿到的下拉数据
    getDataList(type, dicData) {
@@ -725,9 +714,11 @@
    },
    // 获取表单详情数据
    getFormDetail() {
      if (this.type === 'add') return
      if (this.type === "add") return;
      getFormDetail({ templateOid: this.templateOid, oid: this.rowOid }).then(
        (res) => {
          this.form = Object.assign(this.form, res.obj)
          console.log(res, "res");
        }
      );