田源
2024-08-02 ae4fb4b7ca7692985af31a6faab8c0d9fc290c4e
整合富文本
已修改2个文件
165 ■■■■■ 文件已修改
Source/plt-web/plt-web-ui/src/api/modeling/linkType/api.js 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/linkType/index.vue 145 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/api/modeling/linkType/api.js
@@ -33,3 +33,23 @@
    method: "post",
  });
}
// 查业务类型接口
export function getBizTypes() {
  return request({
    url: "/api/linkTypeController/expData",
    method: "post",
  });
}
// 导出
export function exportStatus  (params) {
  return request({
    url: '/api/statusController/exportStatus',
    method: 'get',
    headers: {'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'},
    responseType: 'blob',
    params
  })
}
Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/linkType/index.vue
@@ -238,8 +238,8 @@
        </avue-crud>
      </div>
      <span slot="footer" class="dialog-footer">
         <el-button>取 消</el-button>
         <el-button type="primary">确 定</el-button>
         <el-button @click="addDialogClose">取 消</el-button>
         <el-button type="primary" @click="addDialogSavaHandler">确 定</el-button>
        </span>
      <!-- 属性池列表 -->
@@ -253,18 +253,23 @@
        @close="dialogAttrClose"
      >
        <avue-crud
          ref="dialogAttrCrud"
          :key="dialogAttrReload"
          ref="dialogAttrCrud"
          :data="dialogAttrData"
          :option="dialogAttrOption"
          :page.sync="attrPage"
          :table-loading="dialogAttrLoading"
          @selection-change="dialogAttrSelectChange"
          @row-click="dialogAttrRowClickHandler"
          @size-change="attrSizeChange"
          @current-change="attrCurrentChange"
          @search-change="attrHandleSearch"
          @search-reset="attrHandleReset"
        >
        </avue-crud>
        <span slot="footer" class="dialog-footer">
         <el-button @click="dialogAttrClose">取 消</el-button>
         <el-button type="primary">确 定</el-button>
         <el-button type="primary" @click="dialogAttrAddClickHandler">确 定</el-button>
        </span>
      </el-dialog>
    </el-dialog>
@@ -272,12 +277,17 @@
    <!-- 一致性检查 -->
    <el-dialog
      v-dialogDrag
      :visible.sync="checkVisible"
      :visible.sync="conCheckVisible"
      append-to-body="true"
      class="avue-dialog"
      title="一致性检查"
      width="60%"
    >
      <avue-crud
        :data="conCheckData"
        :option="conCheckOption"
        :table-loading="conCheckLoading">
      </avue-crud>
    </el-dialog>
  </el-container>
</template>
@@ -291,23 +301,45 @@
  name: "index",
  data() {
    return {
      conDefaultCheckData: [], // 保留上个接口返回的数据
      conCheckLoading: false,
      conCheckOption: {
        ...basicOption,
        menu: false,
        addBtn: false,
        index: false,
        selection: false,
        refreshBtn: false
      },
      conCheckData: [],
      conCheckVisible: false,
      attrPage: {
        currentPage: 1,
        pageSize: 30,
        total: 0,
        pageSizes: [30, 50, 100, 200],
      },
      searchAttrParams: {},
      dialogAttrReload: Math.random(),
      dialogAttrSelectList: [],
      dialogAttrLoading: false,
      dialogAttrData: [], // 属性池新增表格
      dialogAttrOption: {
        ...basicOption,
        calcHeight: -60,
        addBtn: false,
        menu: false,
        refreshBtn: false,
        index:false,
        index: false,
        highlightCurrentRow: true,
        height:450,
        height: 450,
        searchMenuSpan: 8,
        column: [
          {
            label: '属性名',
            prop: 'id',
            sortable: true,
            search: true,
          },
          {
            label: '属性类型',
@@ -323,7 +355,7 @@
            label: '说明',
            prop: 'description',
            sortable: true,
            overHidden:true
            overHidden: true
          }
        ]
      },
@@ -355,7 +387,6 @@
        selection: false,
        height: 300,
        addBtn: false,
        delBtn: false,
        // index:false,
        column: [
          {
@@ -482,9 +513,21 @@
    // 一致性检查
    checkClickHandler() {
      this.checkVisible = true;
      this.conCheckVisible = true;
      this.conCheckLoading = true;
      checkLinkType().then(res => {
        if (res.data.code === 200) {
          const data = res.data.data;
          this.conDefaultCheckData = data;
          data.map(item => {
            // 获取 btmCheckMap 对象的属性名
            const keys = Object.keys(item.btmCheckMap);
            return {
              id: keys[0],
            }
          })
        }
      }).catch(err => {
        this.$message.error(err)
      })
@@ -506,9 +549,15 @@
      this.dialogAttrLoading = true;
      this.attrPollDialogVisible = true;
      this.dialogAttrReload = Math.random(); // 强制刷新表格 解决表格错行
      gridAttribute(1, -1, this.searchParams).then(res => {
      this.getAttrDialogDta()
    },
    // 查询属性池列表数据
    getAttrDialogDta() {
      gridAttribute(this.attrPage.currentPage, this.attrPage.pageSize, this.searchAttrParams).then(res => {
        const data = res.data.data;
        this.dialogAttrData = data;
        this.attrPage.total = res.data.total;
        this.dialogAttrLoading = false;
      }).catch(err => {
        this.$message.error(err)
@@ -526,8 +575,80 @@
    },
    // 添加属性池 关闭对话框
    dialogAttrClose(){
    dialogAttrClose() {
      this.attrPollDialogVisible = false;
      this.searchAttrParams = {};
    },
    // 添加属性池 保存
    dialogAttrAddClickHandler() {
      let hasDuplicate = false;
      // 先创建一个临时数组来存储不重复的项
      const newItems = [];
      this.dialogAttrSelectList.forEach(item => {
        const exists = this.dialogBottomData.some(existingItem => existingItem.id === item.id);
        if (exists) {
          hasDuplicate = true;
          return;
        }
        // 如果没有重复项,则将该项添加到临时数组中
        newItems.push({
          id: item.id,
          attributeDataType: item.attributeDataType,
          defaultValue: item.defaultValue,
          description: item.description
        });
      });
      if (hasDuplicate) {
        this.$message.error('请检查是否有添加重复项!');
      } else {
        // 如果没有重复项,将新项添加到 dialogBottomData
        this.dialogBottomData.push(...newItems);
        this.attrPollDialogVisible = false;
      }
    },
    //添加属性池 条数
    attrSizeChange(val) {
      this.attrPage.pageSize = val;
      this.getAttrDialogDta()
    },
    //添加属性池 页码
    attrCurrentChange(val) {
      this.attrPage.currentPage = val;
      this.getAttrDialogDta();
    },
    //添加属性池 搜索
    attrHandleSearch(params, done) {
      this.searchAttrParams = {
        "conditionMap[id]": "*" + params.id + "*"
      };
      this.getAttrDialogDta();
      done();
    },
    //添加属性池 清空搜索
    attrHandleReset() {
      this.searchAttrParams = {};
      this.getAttrDialogDta();
    },
    // 创建 编辑 对话框关闭
    addDialogClose() {
      this.visible = false;
      this.dialogBottomData = [];
    },
    // 创建编辑 保存
    addDialogSavaHandler() {
    }
  }
}