wangting
2023-06-12 3f5ffa69d5316c17a37de310bdea027523186064
Source/UBCS-WEB/src/components/FormTemplate/FormTempalte.vue
@@ -558,7 +558,7 @@
          maxlength: formItem.maxlength,
          filterable: true,
          referConfig:formItem.type=='refer'?{
            title:formItem.text,
            title:formItem.text ,
            showField:formItem.showField || formItem.field,
            field: formItem.field,
            placeholder: formItem.inputTip,
@@ -594,7 +594,9 @@
      this.$set(this.option, "column", column);
      this.$set(this.option, "group", group);
      this.formIndex++;
      this.loading = false;
      if (this.type === 'add') {
        this.loading = false;
      }
      this.geDictData(dictKeys);
      this.getFormDetail();
    },
@@ -643,11 +645,6 @@
        return val;
      }
    },
    changeFun(displayExtension, prop) {
      // executeCode({displayExtension, data: this.form}).then(res => {
      //   this.form[prop] = res.data.data
      // })
    },
    // 获取swich和已拿到的下拉数据
    getDataList(type, dicData) {
      if (type === "truefalse") {
@@ -689,8 +686,7 @@
    // 表单校验
    validate() {
      return new Promise((resolve) => {
        this.$refs.form.validate((valid, done, msg) => {
          console.error(msg, valid);
        this.$refs.form.validate((valid, done) => {
          if (valid) {
            done();
            resolve(true);
@@ -705,8 +701,8 @@
      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");
          this.form = Object.assign(this.form, res.data.data[0])
          this.loading = false;
        }
      );
    },