fjl
fujunling
2023-07-11 5e55262ee63e6587368ebbdb9386d71da5695386
fjl
已修改4个文件
112 ■■■■ 文件已修改
Source/UBCS-WEB/src/api/modeling/cycle.js 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/FormTemplate/index.vue 38 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/flow-cycle/components/DetailPanel.vue 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/views/modeling/cycle.vue 59 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/api/modeling/cycle.js
@@ -15,7 +15,15 @@
      data
  })
}
export const detail = (params) => {
  return request({
      url: '/api/ubcs-omd/lifeCycle/detail',
      method: 'get',
      params
  })
}
export default {
  getList,
  add
  add,
  detail
}
Source/UBCS-WEB/src/components/FormTemplate/index.vue
@@ -196,7 +196,7 @@
        "copyfromversion",
        "secretgrade",
      ],
      codeRuleOid: ''
      codeRuleOid: "",
    };
  },
  created() {},
@@ -237,9 +237,9 @@
              this.activeName = "resembleQuery";
              this.showResembleQuery = true;
            } else {
              this.showResembleQuery = false
              this.showResembleQuery = false;
            }
            console.log(this.hasResemble, 'this.hasResemblethis.hasResemble');
            console.log(this.hasResemble, "this.hasResemblethis.hasResemble");
            this.$nextTick(() => {
              this.$refs.FormTemplate.templateRender(
                res.data.formDefineVO.items
@@ -258,7 +258,7 @@
    getCodeRule() {
      getCodeRule({ codeClassifyOid: this.codeClassifyOid }).then((res) => {
        if (res.data && res.data.code === 200) {
          this.codeRuleOid = res.data.data.oid
          this.codeRuleOid = res.data.data.oid;
          const typeList = [
            "codefixedsec",
            "codeclassifysec",
@@ -320,12 +320,12 @@
          return false;
        }
      }
      let resembleQueryList = []
      let resembleQueryList = [];
      if (this.$refs.resembleQueryRef) {
        // 进行相似项查询
      resembleQueryList = await this.$refs.resembleQueryRef.resembleQuery(
        this.form
      );
        resembleQueryList = await this.$refs.resembleQueryRef.resembleQuery(
          this.form
        );
      }
      if (resembleQueryList.length === 0) {
        let resForm = {};
@@ -358,20 +358,38 @@
          }
        )
          .then(() => {
            // 排除一些字段
            const noData = [
              "jiliangdwname",
              "materialtypeText",
              "morengongysname",
              "$caigouwl",
              "$xiaoshouwl",
              "$shifoupihaoguanli",
              "lcstatus_text",
              "hesuanfenleiname",
              "$kucunwl",
            ];
            let resForm = {};
            const { defaultValue, formValue } =
              this.getDefaultValueAndFormValues(this.form);
            noData.forEach(item => {
              if (formValue[item]) {
                this.$delete(formValue, item)
              }
            })
            resForm.data = formValue;
            resForm = Object.assign({}, resForm, defaultValue);
            resForm.secDTOList = this.secVOList.map(item => {
            resForm.secDTOList = this.secVOList.map((item) => {
              return {
                secOid: item.oid,
                secValue: this.codeApplyForm[item.oid],
              }
              };
            });
            resForm.codeClassifyOid = this.codeClassifyOid;
            resForm.codeRuleOid = this.codeRuleOid;
            resForm.templateOid = this.templateOid;
            console.log(resForm, 'ddd');
            this.$emit("submit", resForm);
          })
          .catch(() => {});
Source/UBCS-WEB/src/components/flow-cycle/components/DetailPanel.vue
@@ -85,7 +85,10 @@
      },
      rules: {
        name: [{ required: true, message: "名称不能为空", trigger: "blur" }],
        id: [{ required: true, message: "标签不能为空", trigger: "blur" }],
        id: [
          { required: true, message: "标签不能为空", trigger: "blur" },
          { pattern: /^[A-z]+$/g, message: "标签只能输入英文", trigger: "blur" }
        ],
        startStatus: [
          { required: true, message: "起始状态不能为空", trigger: "change" },
        ],
Source/UBCS-WEB/src/views/modeling/cycle.vue
@@ -51,7 +51,7 @@
        v-if="visible"
        class="cycle_flow"
        :type="type"
        :chart-data="rowData.data || {}"
        :chart-data="nodesEdgesData"
        :chart-data-node-items="flowChartNodeItems"
        :rowData="rowData"
        ref="vueFlowchartEditor"
@@ -78,7 +78,7 @@
        pageSize: 10,
        total: 0,
        currentPage: 1,
        layout: "total, sizes, prev, pager, next, jumper"
        layout: "total, sizes, prev, pager, next, jumper",
      },
      option: {
        searchMenuSpan: 12,
@@ -116,6 +116,7 @@
      visible: false,
      flowChartNodeItems: [],
      rowData: {},
      nodesEdgesData: {},
      dialogWidth: "50%",
      type: "detail",
      loading: false,
@@ -136,10 +137,6 @@
        };
      }
      this.loading = true;
      console.log(
        Object.assign({}, params, this.page),
        "Object.assign({}, params, this.page)"
      );
      const { limit, page } = this.page;
      API.getList(Object.assign({}, params, { limit, page })).then((res) => {
        this.loading = false;
@@ -150,35 +147,57 @@
      });
    },
    openDialog(type, row) {
      if (type === "detail") {
        this.title = "预览生命周期流程图";
        this.dialogWidth = "50%";
      } else if (type === "edit") {
      this.type = type;
      if (type === "edit") {
        this.$set(row, "editLoading", true);
        this.title = "编辑生命周期流程图";
        this.dialogWidth = "95%";
      } else if (type === "add") {
      } else if (type === "detail") {
        this.$set(row, "detailLoading", true);
        this.title = "预览生命周期流程图";
        this.dialogWidth = "50%";
      }
      if (type !== "add") {
        API.detail({ id: row.id }).then((res) => {
          this.$set(row, "detailLoading", false);
          this.$set(row, "editLoading", false);
          this.rowData = row;
          this.nodesEdgesData = {nodes: res.nodes, edges: res.edges}
        });
      } else {
        this.title = "新增生命周期流程图";
        this.dialogWidth = "95%";
        this.visible = true;
      }
      this.type = type;
      this.rowData = row;
      this.visible = true;
    },
    async submit() {
      const newRowData = await this.$refs.vueFlowchartEditor.getNewRowData();
      console.log(newRowData, 'newRowDatanewRowData');
      console.log(newRowData, "newRowDatanewRowData");
      if (!newRowData) {
        return;
      }
      const flowData = this.$refs.vueFlowchartEditor.getFlowData();
      if (Array.isArray(flowData.nodes)) {
        flowData.nodes = flowData.nodes.map((item) => {
          item.name = item.id;
          return item;
        });
      }
      if (Array.isArray(flowData.edges)) {
        flowData.edges = flowData.edges.map((item) => {
          item.name = item.label;
          return item;
        });
      }
      let params = {
        ...flowData,
        ...newRowData
      }
        ...newRowData,
      };
      console.log(flowData, newRowData);
      API.add(params).then(res => {
        console.log(res, 'res');
      })
      API.add(params).then((res) => {
        console.log(res, "res");
      });
    },
  },
  watch: {