wangting
2024-12-25 8bc25357d5742f07710baa7a6f1d6ac4023da3ac
Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/formDefine/components/formDialog.vue
@@ -35,7 +35,7 @@
                <span style="display: flex;align-items: center; margin-right: 5px;">
                 <p class="tableTopLabel">查询模板名称:</p>
                  <el-select v-model="form.itemQtName" placeholder="请选择查询模板" size="mini">
                  <el-select v-model="topForm.itemQtName" placeholder="请选择查询模板" size="mini">
                    <el-option v-for="(item,index) in searchQtNameList" :key="index" :label="item.qtName"
                               :value="item.qtName"></el-option>
                  </el-select>
@@ -410,6 +410,7 @@
    </el-container>
    <!-- 添加自定义组件 -->
    <el-dialog
      v-dialogDrag
      v-loading="customLoading"
@@ -795,7 +796,7 @@
          <avue-tree :key="refresh" ref="authTree" v-model="treeAuthForm" :data="treeAuthData" :option="treeAuthOption"
                     @check-change="treeAuthCheckChange">
              <span slot-scope="{ node, data }" class="el-tree-node__label">
           <span style="font-size: 15px">
           <span>
              <i class="el-icon-s-promotion"></i>
                {{ (node || {}).label }}
            </span>
@@ -852,7 +853,6 @@
          children: 'childNodes',
        },
        treeLoad: (node, resolve) => {
          // console.log(node);
          const params = {
            'conditionMap[dataType]': node.data.data,
            'conditionMap[parentId]': node.data.data,
@@ -1027,6 +1027,7 @@
      ],
      form: {},
      topForm: {
        itemQtName: '',
        columnNumber: 8,
        showColumn: '3',
        viName: '',
@@ -1065,7 +1066,6 @@
      const types = ['radio', 'checkbox', 'select'];
      return types.includes(this.form.itemType); // 展示
    },
    itemStyleTypeStatus() {
      const types = ['hidden', 'webeditor', 'radio', 'checkbox'];
      return !types.includes(this.form.itemType); // 不展示
@@ -1245,7 +1245,6 @@
    // 选项表格行点击
    optionTableClick(row) {
      this.optionRow = row;
      console.log(row);
    },
    customOptionTableClick(row) {
@@ -1289,11 +1288,10 @@
    // 选项删除
    optionDeleteClickHandler(val) {
      // console.log(this.optionRow);
      if (val === 'dialog') {
        this.customForm.itemKeyValueList.splice(this.customOptionRow.index,1);
        this.customForm.itemKeyValueList.splice(this.customOptionRow.index, 1);
      } else {
        this.form.itemKeyValueList.splice(this.optionRow.index,1);
        this.form.itemKeyValueList.splice(this.optionRow.index, 1);
      }
    },
@@ -1315,7 +1313,7 @@
      this.formList = this.formList.map(item => {
        return {
          ...item,
          itemField: item.text // 将itemField赋值为text,因为忘记父组件为什么在编辑回填时把itemField赋值为text了
          itemField: item.text // 将itemField重新赋值为text,因为忘记当时在父组件编辑回填方法里为什么把itemField赋值为text了
        };
      });
      const params = {
@@ -1327,7 +1325,7 @@
        viType: 1, // 视图类型
        viTypeText: "表单", // 视图中文名称
        prm: {
          formQtName: this.form.qtName, // 查询模板名称
          formQtName: this.topForm.itemQtName, // 查询模板名称
          showCols: this.topForm.showColumn,
          prmItemList: this.formList
        },
@@ -1427,7 +1425,6 @@
        this.$message.error('请选择一条数据进行保存');
        return;
      }
      // console.log(this.customAttrRow)
      this.customForm.text = this.customAttrRow.id;
      this.customAttrVisible = false;
    },
@@ -1439,11 +1436,9 @@
        return;
      }
      this.formList = this.formList.map(item =>
        item.text === this.form.text ? this.form : item
      );
      console.log(this.formList);
      this.$message.success('应用成功');
    },
@@ -1501,13 +1496,11 @@
        return `${key}=${oids.join(',')}`; // 用 , 连接同一类型的 oid
      }).join('&&'); // 最后用 && 连接不同类型
      // console.log(resultString);
      if (this.authType === 'attr') {
        this.customForm.itemRight = resultString;
      } else {
        this.form.itemRight = resultString;
      }
      // this.form.itemRight = resultString;
      this.authDialogClose();
    }
@@ -1554,3 +1547,4 @@
//}
</style>