瀏覽代碼

流程编辑添加异常脚本绑定表单/优化流程建模工具的请求次数

lph 1 年之前
父節點
當前提交
c33ddccd19

+ 0 - 1
ruoyi-ui/src/utils/request.js

@@ -6,7 +6,6 @@ import errorCode from '@/utils/errorCode'
 import { tansParams, blobValidate } from "@/utils/ruoyi";
 import cache from '@/plugins/cache'
 import { saveAs } from 'file-saver'
-import { throttle } from '@/utils/index'
 
 let downloadLoadingInstance;
 // 是否显示重新登录

+ 19 - 5
ruoyi-ui/src/views/bussiness/processMange.vue

@@ -40,9 +40,14 @@
               <el-radio-button :label="1">我的处理</el-radio-button>
               <el-radio-button :label="2">其他处理</el-radio-button>
             </el-radio-group>
-            <el-radio-group class="btn-list-two" v-model="taskStatus">
-              <el-radio-button :label="3">已完成</el-radio-button>
-              <el-radio-button :label="4">进行中</el-radio-button>
+            <el-radio-group
+              class="btn-list-two"
+              v-model="queryParams.bepTaskProcessState"
+              @change="getList"
+            >
+              <el-radio-button label="3">已完成</el-radio-button>
+              <el-radio-button label="0">进行中</el-radio-button>
+              <el-radio-button label="">所有</el-radio-button>
             </el-radio-group>
           </div>
           <div class="search-input">
@@ -218,12 +223,13 @@ export default {
       commonData: {},
       taskType: 1,
       queryString: "",
-      taskStatus: 3,
+      taskStatus: "",
       tableData: [], //表格数据
       // 查询参数
       queryParams: {
         pageNum: 1,
         pageSize: 10,
+        bepTaskProcessState: "",
       },
       total: 0,
       columns: [
@@ -286,7 +292,6 @@ export default {
     // 获取列表数据
     getList() {
       processList(this.queryParams).then((res) => {
-        console.log(res);
         if (res.code == 200) {
           this.tableData = res.rows.map((item) => item.resultMap);
           this.total = res.total;
@@ -378,6 +383,15 @@ export default {
         benTaskNodeKey,
         bepTaskProcessXmlContent
       );
+      // 只有完成状态的可以运行
+      if (this.formType == "composeForm") {
+        let res = this.$refs.dialogRef.getComposeFormData();
+        if (!res.isSuccess) {
+          this.$message.warning("非完成状态节点不能运行!");
+          return;
+        }
+      }
+      // return;
       let formData = await this.getFormData();
       formData.taskPlanKey = this.row.bepTaskPlanKey;
       let payLoad = {

+ 50 - 9
ruoyi-ui/src/views/dialogTemplate/components/index.vue

@@ -15,16 +15,19 @@
       <div class="top">
         <div class="left" v-if="topTableCountInfo.length">
           <p>{{ topTableCountInfo[0].title }}</p>
-          <i>{{ topTableCountInfo[0].value }}</i>
+          <i>{{
+            getDictLabel(topTableCountInfo[0].value, dict.type.node_task_status)
+          }}</i>
         </div>
-        <div class="right">
+        <!-- <div class="right">
           <p>是否外协</p>
           <el-checkbox v-model="checked"></el-checkbox>
-        </div>
+        </div> -->
       </div>
       <!-- 按钮组 -->
       <el-button-group>
         <el-button v-for="(item, index) in controlBtnArr" :key="index">
+          <!-- :loading="isLoading" -->
           <template>
             <span @click="clickHandler(item, index)"
               ><svg-icon
@@ -128,11 +131,14 @@ import {
   getProcessPopupTableInfo,
   getProcessPopupTableList,
 } from "@/api/dragform/form"; //新的弹窗数据请求
+import dict from "@/utils/dict";
 
 export default {
   components: { Menu },
+  dicts: ["node_task_status"],
   data() {
     return {
+      isLoading: false,
       conditions: {}, //查询条件
       // 当前行信息
       row: {},
@@ -209,6 +215,13 @@ export default {
       this.addListData.push(obj);
       this.tableData.push(obj);
     },
+    // 校验新增数据非空
+    getValidateRes(addListData) {
+      let hasEmpty = addListData.some((item) => {
+        return Object.values(item).some((val) => val == "");
+      });
+      return hasEmpty;
+    },
     // 保存
     saveBtnHandler() {
       let addCondition = {
@@ -221,6 +234,11 @@ export default {
       //     this.conditions[key];
       // }
       let addListData = this.tableData.filter((item) => !item.id);
+      let validate = this.getValidateRes(addListData);
+      if (validate) {
+        this.$message.warning("请完善表单字段!");
+        return;
+      }
       addListData.forEach((item) => {
         Object.assign(item, addCondition);
       });
@@ -597,7 +615,7 @@ export default {
     },
     // 按钮组点击
     async clickHandler(btnData) {
-      console.log(this.topInfo, this.topData);
+      this.isLoading = true;
       let { primaryKey, dtName } = this.topInfo;
       let { btnParams, btnType, btnKey } = btnData;
       let payload = {
@@ -614,13 +632,36 @@ export default {
         let tempParams = JSON.parse(btnParams)[0];
         payload.commMap[tempParams.fieldName] = tempParams.fieldValue;
       }
-      let res = await batchEdit(payload);
-      if (res.code == 200) {
-        this.reloadInfo();
-      } else {
-        this.$message.error("网络异常请稍后再试");
+      try {
+        let res = await batchEdit(payload);
+        if (res.code == 200) {
+          this.$message.success("修改成功!");
+          this.reloadInfo();
+        } else {
+          this.$message.error("网络异常请稍后再试");
+        }
+        this.isLoading = false;
+      } catch (error) {
+        this.isLoading = false;
       }
     },
+    // 获取字典对应label
+    getDictLabel(value, dictLsit = []) {
+      // value += "";
+      return dictLsit.find((item) => {
+        return item.value == value;
+      })?.label;
+    },
+    // 获取状态等数据
+    getComposeFormData() {
+      let res = {};
+      console.log(this.dict.type.node_task_status);
+      let currentStatus = this.dict.type.node_task_status.filter(
+        (item) => item.value == this.topTableCountInfo[0].value
+      );
+      res.isSuccess = currentStatus[0].raw.listClass == "success";
+      return res;
+    },
   },
   mounted() {
     // this.getLists()

+ 7 - 4
ruoyi-ui/src/views/system/bpmnPro/components/Panel/components/ElementAsyncContinuations.vue

@@ -73,10 +73,12 @@ import {
 import EventEmitter from "@utils/EventEmitter";
 import { getActive } from "@packages/bpmn-utils/BpmnDesignerUtils";
 import { listScript } from "@/api/bpmprocess/process";
+import { filterUtil } from "@packages/bo-utils/filterUtil.js";
 
 export default {
   name: "ElementAsyncContinuations",
   dicts: ["industry_type"],
+  props: ["allScriptList"],
   data() {
     return {
       acBefore: true,
@@ -136,10 +138,11 @@ export default {
         isEnablePaging: false,
         industryType,
       });
-      this.scriptList = res.rows.map((item) => ({
-        value: item.scriptKey,
-        label: item.scriptName,
-      }));
+      this.scriptList = filterUtil({ industryType }, this.allScriptList);
+      // this.scriptList = res.rows.map((item) => ({
+      //   value: item.scriptKey,
+      //   label: item.scriptName,
+      // }));
     },
   },
 };

+ 50 - 23
ruoyi-ui/src/views/system/bpmnPro/components/Panel/components/ElementExecuteUser.vue

@@ -34,8 +34,8 @@
         :label-width="100"
       >
         <div class="exe_user_type_input">
+          <!-- v-scroll="scrollHandler" -->
           <el-select
-            v-scroll="scrollHandler"
             v-model="exeUserValue"
             placeholder="请选择执行人"
             :multiple="exeUserType == 2"
@@ -77,9 +77,11 @@ import {
 import { getActive } from "@packages/bpmn-utils/BpmnDesignerUtils";
 import { listUser, deptTreeSelect } from "@/api/system/user";
 import { listRole } from "@/api/system/role";
+import { filterUtil } from "@packages/bo-utils/filterUtil.js";
 
 export default {
   name: "ElementExecuteUser",
+  props: ["allUserList", "allRoleList"],
   data() {
     return {
       userTypeList: [
@@ -127,6 +129,22 @@ export default {
           ?.label || "";
       return label;
     },
+    userList() {
+      return this.allUserList.map((item) => {
+        return {
+          value: item.userId.toString(),
+          label: item.nickName,
+        };
+      });
+    },
+    roleList() {
+      return this.allRoleList.map((item) => {
+        return {
+          value: item.roleKey,
+          label: item.roleName,
+        };
+      });
+    },
   },
   methods: {
     initFormData() {
@@ -164,32 +182,41 @@ export default {
       this.exeUserValue = "";
       if (!value) return;
       if (value == 3) {
-        this.exeRoleListHandler();
+        // this.exeRoleListHandler();
+        this.exeUserValueList = this.roleList;
       } else {
-        this.exeUserListHandler();
+        // this.exeUserListHandler();
+        this.exeUserValueList = this.userList;
       }
     },
     async exeUserListHandler() {
-      try {
-        let res = await listUser(this.queryParams);
-        if (res.code == 200) {
-          if (
-            res.rows.length == 0 ||
-            res.rows.length < this.queryParams.pageSize
-          ) {
-            this.isArriveBoottom = true; //到底了
-          }
-          res.rows.forEach((item) => {
-            this.exeUserValueList.push({
-              value: item.userId.toString(),
-              label: item.nickName,
-            });
-          });
-          console.log(this.exeUserValueList);
-        }
-      } catch (error) {
-        console.log(error);
-      }
+      this.allUserList.forEach((item) => {
+        this.exeUserValueList.push({
+          value: item.userId.toString(),
+          label: item.nickName,
+        });
+      });
+      // try {
+
+      //   let res = await listUser(this.queryParams);
+      //   if (res.code == 200) {
+      //     if (
+      //       res.rows.length == 0 ||
+      //       res.rows.length < this.queryParams.pageSize
+      //     ) {
+      //       this.isArriveBoottom = true; //到底了
+      //     }
+      //     res.rows.forEach((item) => {
+      //       this.exeUserValueList.push({
+      //         value: item.userId.toString(),
+      //         label: item.nickName,
+      //       });
+      //     });
+      //     console.log(this.exeUserValueList);
+      //   }
+      // } catch (error) {
+      //   console.log(error);
+      // }
     },
     async exeRoleListHandler() {
       try {

+ 15 - 9
ruoyi-ui/src/views/system/bpmnPro/components/Panel/components/ElementNormalTask.vue

@@ -84,10 +84,12 @@ import {
 } from "@packages/bo-utils/myFieldUtil";
 import { getActive } from "@packages/bpmn-utils/BpmnDesignerUtils";
 import { listScript } from "@/api/bpmprocess/process";
+import { filterUtil } from "@packages/bo-utils/filterUtil.js";
 
 export default {
   name: "ElementNormalTask",
   dicts: ["industry_type", "script_trigger_type"],
+  props: ["allScriptList"],
   data() {
     return {
       scriptList: [],
@@ -121,15 +123,19 @@ export default {
       this.normalScriptKey = "";
     },
     async getScriptList(industryType) {
-      let res = await listScript({
-        isEnablePaging: false,
-        scriptType: 1,
-        industryType,
-      });
-      this.scriptList = res.rows.map((item) => ({
-        value: item.scriptKey,
-        label: item.scriptName,
-      }));
+      // let res = await listScript({
+      //   isEnablePaging: false,
+      //   scriptType: 1,
+      //   industryType,
+      // });
+      this.scriptList = filterUtil(
+        { scriptType: 1, industryType },
+        this.allScriptList
+      );
+      // this.scriptList = res.rows.map((item) => ({
+      //   value: item.scriptKey,
+      //   label: item.scriptName,
+      // }));
     },
     updateScriptKey(value) {
       setNormalScriptKey(getActive(), value);

+ 179 - 18
ruoyi-ui/src/views/system/bpmnPro/components/Panel/components/ElementUnusualTasks.vue

@@ -121,6 +121,64 @@
             />
           </el-select>
         </el-form-item>
+        <el-form-item prop="formType" label="表单类型" size="normal">
+          <el-select
+            v-model="newUnusualTask.formType"
+            placeholder="请选择表单类型"
+            clearable
+            filterable
+            @change="formTypeChangeHandler"
+          >
+            <el-option
+              v-for="item in formTypeList"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            >
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item
+          v-if="newUnusualTask.formType == 'designForm'"
+          label="表单:"
+          size="normal"
+        >
+          <el-col :span="8">
+            <el-input
+              v-model="newUnusualTask.compName"
+              placeholder="组件名"
+              size="normal"
+              clearable
+            ></el-input>
+          </el-col>
+          <el-col class="line" :span="2">---</el-col>
+          <el-col :span="8">
+            <el-input
+              v-model="newUnusualTask.scriptName"
+              placeholder="脚本名"
+              size="normal"
+              clearable
+            ></el-input>
+          </el-col>
+        </el-form-item>
+
+        <el-form-item v-else prop="formId" label="表单" size="normal">
+          <el-select
+            v-model="newUnusualTask.formId"
+            placeholder="请选择表单"
+            clearable
+            filterable
+            @change="formChangeHandler"
+          >
+            <el-option
+              v-for="item in formList"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            >
+            </el-option>
+          </el-select>
+        </el-form-item>
       </el-form>
       <template #footer>
         <el-button @click="modelVisible = false">取 消</el-button>
@@ -145,10 +203,13 @@ import { getScriptType } from "@packages/bo-utils/scriptUtil";
 import EventEmitter from "@utils/EventEmitter";
 import { getActive } from "@packages/bpmn-utils/BpmnDesignerUtils";
 import { listScript } from "@/api/bpmprocess/process";
-
+import { listForm } from "@/api/dragform/form";
+import { listGroup } from "@/api/relateTable/index.js";
+import { filterUtil } from "@packages/bo-utils/filterUtil.js";
 export default {
   name: "ElementUnusualTasks",
   dicts: ["script_trigger_type", "bpm_script_type", "industry_type"],
+  props: ["allScriptList"],
   data() {
     return {
       modelVisible: false,
@@ -160,7 +221,7 @@ export default {
       formRules: {
         scriptKey: {
           required: true,
-          trigger: ["blur", "change"],
+          trigger: ["change"],
           message: "任务脚本不能为空",
         },
         // scriptTriggerType: {
@@ -180,28 +241,38 @@ export default {
           label: "自动",
         },
       ],
+      formTypeList: [
+        {
+          value: "dragForm",
+          label: "拖拽表单",
+        },
+        {
+          value: "composeForm",
+          label: "组合表单",
+        },
+        {
+          value: "designForm",
+          label: "自定义表单",
+        },
+      ],
+      formList: [],
     };
   },
 
   mounted() {
+    console.log("allScriptList", this.allScriptList);
     this.reloadExtensionListeners();
     EventEmitter.on("element-update", this.reloadExtensionListeners);
   },
   methods: {
     reloadExtensionListeners() {
       this.modelVisible = false;
-      this.newUnusualTask = {
-        scriptKey: "",
-        scriptTriggerType: "0",
-        industryType: "0",
-        scriptName: "",
-        // event: getDefaultEvent(getActive()),
-        // type: "class",
-      };
+
       this._listenersRaw = getUnusualTasks(getActive());
       this.scriptForm.scriptTriggerType = getScriptTriggerType(getActive());
 
       this.listeners = getUnusualTaskTableData(this._listenersRaw);
+      console.log(this.listeners);
     },
 
     updateScriptType(value) {
@@ -229,8 +300,23 @@ export default {
 
     async openScriptModel(index, TaskData) {
       this.activeIndex = index;
+      this.newUnusualTask = {
+        scriptKey: "",
+        scriptTriggerType: "0",
+        industryType: "0",
+        scriptName: "",
+        formType: "",
+        formId: "",
+        compName: "", //组件名
+        // event: getDefaultEvent(getActive()),
+        // type: "class",
+      };
+      console.log(JSON.parse(JSON.stringify(TaskData)));
       TaskData && (this.newUnusualTask = JSON.parse(JSON.stringify(TaskData)));
-      this.getScriptList(this.newUnusualTask.industryType);
+      console.log(this.newUnusualTask);
+      let { industryType, formType } = this.newUnusualTask;
+      this.getScriptList(industryType);
+      formType && this.switchFormType(formType);
       this.modelVisible = true;
       await this.$nextTick();
       this.$refs.formRef && this.$refs.formRef.clearValidate();
@@ -260,16 +346,91 @@ export default {
 
     // 获取脚本列表
     async getScriptList(industryType = "0") {
-      let res = await listScript({
-        isEnablePaging: false,
+      // let res = await listScript({
+      //   isEnablePaging: false,
+      //   scriptType: "0",
+      //   industryType,
+      // });
+      // this.scriptKeyList = res.rows.map((item) => ({
+      //   value: item.scriptKey,
+      //   label: item.scriptName,
+      // }));
+      // 自定义筛选数据
+      let condition = {
         scriptType: "0",
         industryType,
-      });
-      this.scriptKeyList = res.rows.map((item) => ({
-        value: item.scriptKey,
-        label: item.scriptName,
-      }));
+      };
+      this.scriptKeyList = filterUtil(condition, this.allScriptList).map(
+        (item) => ({
+          value: item.scriptKey,
+          label: item.scriptName,
+        })
+      );
+    },
+    async getDragFormList() {
+      try {
+        let res = await listForm({ isEnablePaging: false });
+        if (res.code == 200) {
+          this.formList = res.rows.map((item) => {
+            return {
+              label: item.dfName,
+              value: item.fId + "",
+            };
+          });
+        } else {
+          throw Error(res);
+        }
+      } catch (error) {
+        console.log(error);
+        this.$message.warning("网络异常,获取表单列表失败");
+      }
+    },
+    async getComposeFormList() {
+      try {
+        let res = await listGroup({ isEnablePaging: false });
+        if (res.code == 200) {
+          this.formList = res.rows.map((item) => {
+            return {
+              label: item.groupName,
+              value: item.groupKey,
+            };
+          });
+        } else {
+          throw Error(res);
+        }
+      } catch (error) {
+        console.log(error);
+        this.$message.warning("网络异常,获取表单列表失败");
+      }
+    },
+
+    // 表单类型改变回调
+    formTypeChangeHandler(type) {
+      this.switchFormType(type);
+      this.newUnusualTask.formId = "";
+    },
+    switchFormType(type) {
+      switch (type) {
+        case "dragForm":
+          this.getDragFormList();
+          break;
+        case "composeForm":
+          this.getComposeFormList();
+        default:
+          break;
+      }
+    },
+    // 表单改变回调
+    formChangeHandler(formId) {
+      console.log(this.newUnusualTask.formId);
+      console.log(this.formList);
     },
   },
 };
 </script>
+<style lang="scss" scoped>
+.line {
+  display: flex;
+  justify-content: center;
+}
+</style>

+ 71 - 1
ruoyi-ui/src/views/system/bpmnPro/components/Panel/index.vue

@@ -6,7 +6,14 @@
       <p>{{ customTranslate(currentElementType || "Process") }}</p>
     </div>
     <el-collapse>
-      <component v-for="cp in this.renderComponents" :key="cp.name" :is="cp" />
+      <component
+        v-for="cp in this.renderComponents"
+        :key="cp.name"
+        :is="cp"
+        :allScriptList="allScriptList"
+        :allUserList="allUserList"
+        :allRoleList="allRoleList"
+      />
     </el-collapse>
   </div>
 </template>
@@ -50,6 +57,9 @@ import ElementUnusualTasks from "@packages/Panel/components/ElementUnusualTasks"
 import ElementNormalTask from "@packages/Panel/components/ElementNormalTask";
 import ElementExcuteType from "@packages/Panel/components/ElementExcuteType";
 
+import { listScript } from "@/api/bpmprocess/process";
+import { listUser } from "@/api/system/user";
+import { listRole } from "@/api/system/role";
 export default {
   name: "BpmnPanel",
   components: {
@@ -78,6 +88,10 @@ export default {
       currentElementId: undefined,
       customTranslate,
       renderComponents: [],
+      // 列表选择数据
+      allScriptList: [],
+      allUserList: [],
+      allRoleList: [],
     };
   },
   created() {
@@ -99,6 +113,9 @@ export default {
     });
   },
   mounted() {
+    this.getAllScriptList();
+    this.getAllRoleList();
+    this.getAllUserList();
     !this.currentElementId && this.setCurrentElement();
   },
   methods: {
@@ -182,6 +199,59 @@ export default {
       // !isProcess(element) && this.renderComponents.push(ElementBeforeNode);
       // !isProcess(element) && this.renderComponents.push(ElementAfterNode);
     },
+    // 获取所有脚本列表
+    async getAllScriptList() {
+      try {
+        let res = await listScript({ isEnablePaging: false });
+        // console.log(res);
+        if (res.code == 200) {
+          this.allScriptList = res.rows;
+        } else {
+          throw Error(res?.msg);
+        }
+      } catch (error) {
+        this.$message.warning("网络异常,请稍后再试");
+      }
+    },
+    // 获取所有用户列表
+    async getAllUserList() {
+      try {
+        let res = await listUser({ isEnablePaging: false });
+        if (res.code == 200) {
+          // res.rows.forEach((item) => {
+          // this.exeUserValueList.push({
+          //   value: item.userId.toString(),
+          //   label: item.nickName,
+          // });
+
+          // });
+          this.allUserList = res.rows;
+        } else {
+          throw Error(res?.msg);
+        }
+      } catch (error) {
+        this.$message.warning("网络异常,请稍后再试");
+      }
+    },
+    // 获取所有角色列表
+    async getAllRoleList() {
+      try {
+        let res = await listRole(this.queryParams);
+        if (res.code == 200) {
+          // res.rows.forEach((item) => {
+          //   this.exeUserValueList.push({
+          //     value: item.roleKey,
+          //     label: item.roleName,
+          //   });
+          // });
+          this.allRoleList = res.rows;
+        } else {
+          throw Error(res?.msg);
+        }
+      } catch (error) {
+        this.$message.warning("网络异常,请稍后再试");
+      }
+    },
   },
 };
 </script>

+ 0 - 2
ruoyi-ui/src/views/system/bpmnPro/components/Toolbar/tools/Save.vue

@@ -180,8 +180,6 @@ export default {
     },
     async saveNodeMsg(obj) {
       let data = getNodeMsg(obj);
-      // console.dir(obj.getElementsByTagName("bpmn:process")[0].id);
-      // return;
       if (!data.bpmProcessConfigurationList.length) return;
       data.bpmProcessConfigurationList.forEach((item) => {
         // item.createBy = this.$store.state.user.name;

+ 18 - 0
ruoyi-ui/src/views/system/bpmnPro/components/bo-utils/filterUtil.js

@@ -0,0 +1,18 @@
+
+
+/**
+ * 
+ * @param {Object} condition 筛选条件
+ * @param {Array} dataList   被筛选数组
+ */
+export function filterUtil(condition = {}, dataList = []) {
+  if (dataList.length == 0) return [];
+  const keys = Object.keys(condition)
+  if (keys.length == 0) return []
+
+  let res = dataList.filter(item => keys.every(key =>
+    condition[key] == item[key]
+  )
+  )
+  return res;
+}

+ 12 - 1
ruoyi-ui/src/views/system/bpmnPro/components/bo-utils/getNodeMsg.js

@@ -114,9 +114,20 @@ function getNodeException(node, nodeObj) {
     if (extensionElements) {
       extensionElements.childNodes.forEach(item => {
         if (item.nodeName == `${prefix}:unusualTask`) {
+          let formName = '', formType = item.attributes.formType?.nodeValue || '';
+
+          if (formType == 'designForm') {
+            formName = item.getAttribute('compName') + '-' + item.getAttribute('scriptName');
+          } else {
+            formName = item.getAttribute('scriptName');
+          }
           res.push({
             scriptKey: item.attributes.scriptKey?.nodeValue,
-            scriptTriggerType: item.attributes?.scriptTriggerType?.nodeValue || 0
+            // scriptTriggerType: item.attributes?.scriptTriggerType?.nodeValue || 0,
+            scriptTriggerType: 0,
+            nodeFormType: item.getAttribute('formType'),
+            scriptNodeName: formName,
+            formKey: item.getAttribute('formId')
           })
         }
       })

+ 8 - 1
ruoyi-ui/src/views/system/bpmnPro/components/bo-utils/myFieldUtil.js

@@ -242,6 +242,10 @@ export function getUnusualTaskTableData(moddleList = []) {
       scriptTriggerType: item?.$attrs.scriptTriggerType || '0',
       scriptName: item?.$attrs.scriptName || '',
       industryType: item?.$attrs.industryType || '0',
+      formType: item?.$attrs.formType || '',
+      formId: item?.$attrs.formId || '',
+      designFormName: item?.$attrs.designFormName || '',
+      compName: item?.$attrs.compName || '',
     }
   })
   return res
@@ -250,7 +254,7 @@ export function getUnusualTaskTableData(moddleList = []) {
 function updateTaskProperty(element, listener, props) {
   const modeling = getModeler.getModeling();
   const prefix = getProcessEngine();
-  const { scriptKey, scriptTriggerType, scriptName, industryType } = props;
+  const { scriptKey, scriptTriggerType, scriptName, industryType, formType, compName, formId, formName } = props;
 
   const updateProperty = (key, value) =>
     modeling.updateModdleProperties(element, listener, { [`${key}`]: value });
@@ -259,6 +263,9 @@ function updateTaskProperty(element, listener, props) {
   scriptTriggerType && updateProperty("scriptTriggerType", scriptTriggerType);
   scriptName && updateProperty('scriptName', scriptName);
   industryType && updateProperty('industryType', industryType);
+  formType && updateProperty('formType', formType)
+  compName && updateProperty('compName', compName)
+  formId && updateProperty('formId', formId)
 }
 // 修改任务
 export function updateUnusualTask(element, props, listener) {