Z 1 год назад
Родитель
Сommit
b1f8d7bd1f

+ 11 - 20
src/components/bpmnProcessDesigner/package/penal/multi-instance/ElementMultiInstance.vue

@@ -64,9 +64,7 @@ export default {
         asyncBefore: false,
         exclusive: false
       },
-      loopInstanceForm: {
-        completionCondition:''
-      }
+      loopInstanceForm: {}
     };
   },
   watch: {
@@ -114,17 +112,10 @@ export default {
       }
     },
     changeLoopCharacteristicsType(type) {
-      this.loopInstanceForm.completionCondition = ''
       // this.loopInstanceForm = { ...this.defaultLoopInstanceForm }; // 切换类型取消原表单配置
       // 取消多实例配置
       if (type === "Null") {
-        window.bpmnInstances.modeling.updateProperties(this.bpmnElement, { loopCharacteristics: null });
-        return;
-      }
-      // 并行
-      if (type === "ParallelMultiInstance") {
-        this.loopInstanceForm.completionCondition = '${ nrOfCompletedInstances == 1 }'
-        this.updateLoopCondition(this.loopInstanceForm.completionCondition)
+        window.bpmnInstances.modeling.updateProperties(this.bpmnElement, {loopCharacteristics: null});
         return;
       }
       // 配置循环
@@ -138,9 +129,9 @@ export default {
       }
       // 时序
       if (type === "SequentialMultiInstance") {
-        this.multiLoopInstance = window.bpmnInstances.moddle.create("bpmn:MultiInstanceLoopCharacteristics", { isSequential: true });
+        this.multiLoopInstance = window.bpmnInstances.moddle.create("bpmn:MultiInstanceLoopCharacteristics", {isSequential: true});
       } else {
-        this.multiLoopInstance = window.bpmnInstances.moddle.create("bpmn:MultiInstanceLoopCharacteristics", { collection: "${coll_userList}" });
+        this.multiLoopInstance = window.bpmnInstances.moddle.create("bpmn:MultiInstanceLoopCharacteristics", {collection: "${coll_userList}"});
       }
       window.bpmnInstances.modeling.updateProperties(this.bpmnElement, {
         loopCharacteristics: this.multiLoopInstance
@@ -150,17 +141,17 @@ export default {
     updateLoopCardinality(cardinality) {
       let loopCardinality = null;
       if (cardinality && cardinality.length) {
-        loopCardinality = window.bpmnInstances.moddle.create("bpmn:FormalExpression", { body: cardinality });
+        loopCardinality = window.bpmnInstances.moddle.create("bpmn:FormalExpression", {body: cardinality});
       }
-      window.bpmnInstances.modeling.updateModdleProperties(this.bpmnElement, this.multiLoopInstance, { loopCardinality });
+      window.bpmnInstances.modeling.updateModdleProperties(this.bpmnElement, this.multiLoopInstance, {loopCardinality});
     },
     // 完成条件
     updateLoopCondition(condition) {
       let completionCondition = null;
       if (condition && condition.length) {
-        completionCondition = window.bpmnInstances.moddle.create("bpmn:FormalExpression", { body: condition });
+        completionCondition = window.bpmnInstances.moddle.create("bpmn:FormalExpression", {body: condition});
       }
-      window.bpmnInstances.modeling.updateModdleProperties(this.bpmnElement, this.multiLoopInstance, { completionCondition });
+      window.bpmnInstances.modeling.updateModdleProperties(this.bpmnElement, this.multiLoopInstance, {completionCondition});
     },
     // 重试周期
     updateLoopTimeCycle(timeCycle) {
@@ -171,7 +162,7 @@ export default {
           })
         ]
       });
-      window.bpmnInstances.modeling.updateModdleProperties(this.bpmnElement, this.multiLoopInstance, { extensionElements });
+      window.bpmnInstances.modeling.updateModdleProperties(this.bpmnElement, this.multiLoopInstance, {extensionElements});
     },
     // 直接更新的基础信息
     updateLoopBase() {
@@ -182,11 +173,11 @@ export default {
     },
     // 各异步状态
     updateLoopAsync(key) {
-      const { asyncBefore, asyncAfter } = this.loopInstanceForm;
+      const {asyncBefore, asyncAfter} = this.loopInstanceForm;
       let asyncAttr = Object.create(null);
       if (!asyncBefore && !asyncAfter) {
         this.$set(this.loopInstanceForm, "exclusive", false);
-        asyncAttr = { asyncBefore: false, asyncAfter: false, exclusive: false, extensionElements: null };
+        asyncAttr = {asyncBefore: false, asyncAfter: false, exclusive: false, extensionElements: null};
       } else {
         asyncAttr[key] = this.loopInstanceForm[key];
       }

+ 58 - 19
src/views/workforceManagement/team/components/staffSelection.vue

@@ -59,28 +59,47 @@
                       <div>{{ row.jobNumber }}</div>
                     </template>
                   </el-table-column>
-                  <el-table-column width="80" label="操作">
-                    <template slot-scope="{ row }">
-                      <el-button
-                        size="mini"
-                        type="primary"
-                        @click="choiceAsset(row)"
-                        :disabled="row.disabled"
-                        icon="el-icon-arrow-right"
-                        circle
-                      >
-                      </el-button>
+                  <el-table-column width="180" label="操作" align="right">
+                    <template slot="header" slot-scope="scope">
+                      <div style="display: flex">
+
+                        <el-input v-model="userName" placeholder="输入姓名查询" clearable
+                                  @change="changeUserName"></el-input>
+                        <div
+                          v-if="staffList.length !== 0 && isMore"
+                          class="zw-page-list-more"
+                        >
+                          <el-button type="text" @click="getMore()">更多<i class="el-icon-caret-bottom"></i></el-button>
+                        </div>
+                      </div>
                     </template>
                   </el-table-column>
+<!--                  <el-table-column width="80" label="操作">-->
+
+
+
+
+<!--                    <template slot-scope="{ row }">-->
+<!--                      <el-button-->
+<!--                        size="mini"-->
+<!--                        type="primary"-->
+<!--                        @click="choiceAsset(row)"-->
+<!--                        :disabled="row.disabled"-->
+<!--                        icon="el-icon-arrow-right"-->
+<!--                        circle-->
+<!--                      >-->
+<!--                      </el-button>-->
+<!--                    </template>-->
+<!--                  </el-table-column>-->
                 </el-table>
-                <div
-                  v-if="staffList.length !== 0 && isMore"
-                  class="zw-page-list-more"
-                >
-                  <el-link @click="getMore()" type="primary"
-                    >更多<i class="el-icon-caret-bottom"></i>
-                  </el-link>
-                </div>
+<!--                <div-->
+<!--                  v-if="staffList.length !== 0 && isMore"-->
+<!--                  class="zw-page-list-more"-->
+<!--                >-->
+<!--                  <el-link @click="getMore()" type="primary"-->
+<!--                    >更多<i class="el-icon-caret-bottom"></i>-->
+<!--                  </el-link>-->
+<!--                </div>-->
               </el-container>
             </div>
           </el-card>
@@ -151,6 +170,8 @@
           label: 'name',
           value: 'code'
         },
+        userName: '',
+        currentData: {},
         pageNum: 1, //设备当前页数
         size: 10,
         isMore: false,
@@ -178,10 +199,16 @@
           idField: 'id',
           parentIdField: 'parentId'
         });
+        this.$nextTick(()=>{
+          this.handleNodeClick(this.treeList[0])
+          this.$refs.tree.setCurrentKey(this.treeList[0].id)
+
+        })
         //this.treeList = res.data;
       },
      //选择分类
     handleNodeClick(data) {
+      this.currentData = data
       this.staffList = [];
 
       this.form.groupId = data.id;
@@ -193,6 +220,18 @@
       };
       this.getStaffList(params);
     },
+      changeUserName() {
+        this.staffList = [];
+
+        this.form.groupId = this.currentData.id;
+        let params = {
+          pageNum: 1,
+          size: this.size,
+          groupId: this.form.groupId,
+          name: this.userName
+        };
+        this.getStaffList(params);
+      },
     //获取员工列表
     async getStaffList(params) {
       let res = await getUserPage(params);