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

+ 18 - 18
lib/vue-form-making/src/components/GenerateForm.vue

@@ -1,5 +1,5 @@
 <template>
 <template>
-  <div :style="{width: formData.config && formData.config.width}" class="fm-form" 
+  <div :style="{width: formData.config && formData.config.width}" class="fm-form"
     :class="{
     :class="{
       ['fm-'+formStyleKey]: true,
       ['fm-'+formStyleKey]: true,
       'is-print': printRead
       'is-print': printRead
@@ -13,9 +13,9 @@
         'no-label-form': formData.config && (formData.config.labelWidth == 0)
         'no-label-form': formData.config && (formData.config.labelWidth == 0)
       }"
       }"
       :size="formSize"
       :size="formSize"
-      :model="models" 
-      :rules="rules" 
-      :label-position="formData.config && formData.config.labelPosition" 
+      :model="models"
+      :rules="rules"
+      :label-position="formData.config && formData.config.labelPosition"
       :disabled="!edit"
       :disabled="!edit"
       :label-width="formData.config && formData.config.labelWidth + 'px'"
       :label-width="formData.config && formData.config.labelWidth + 'px'"
       :label-suffix="formData.config?.labelSuffix ? ' : ' : ' '"
       :label-suffix="formData.config?.labelSuffix ? ' : ' : ' '"
@@ -312,7 +312,7 @@ export default {
     },
     },
     platform: {
     platform: {
       type: String,
       type: String,
-      default: 'pc'
+      default: 'mobile'
     }
     }
   },
   },
   data () {
   data () {
@@ -424,7 +424,7 @@ export default {
           this.formShow = true
           this.formShow = true
 
 
           if (this.formData.config && this.formData.config.styleSheets) {
           if (this.formData.config && this.formData.config.styleSheets) {
-            
+
             let head = '.fm-' + this.formStyleKey + ' '
             let head = '.fm-' + this.formStyleKey + ' '
 
 
             console.log('----head', head)
             console.log('----head', head)
@@ -617,7 +617,7 @@ export default {
               sourceValue.value = data
               sourceValue.value = data
             } else {
             } else {
               this.dataSourceValue.push({
               this.dataSourceValue.push({
-                key: curKey, 
+                key: curKey,
                 args: curArgs,
                 args: curArgs,
                 value: data
                 value: data
               })
               })
@@ -633,7 +633,7 @@ export default {
               sourceValue.value = data
               sourceValue.value = data
             } else {
             } else {
               this.dynamicValueData.push({
               this.dynamicValueData.push({
-                key: curKey, 
+                key: curKey,
                 args: curArgs,
                 args: curArgs,
                 value: data
                 value: data
               })
               })
@@ -738,7 +738,7 @@ export default {
               sourceValue.value = data
               sourceValue.value = data
             } else {
             } else {
               this.dataSourceValue.push({
               this.dataSourceValue.push({
-                key: curKey, 
+                key: curKey,
                 value: data
                 value: data
               })
               })
             }
             }
@@ -800,7 +800,7 @@ export default {
           })
           })
 
 
           Object.keys(optionsHeaders).length && (options['headers'] = optionsHeaders)
           Object.keys(optionsHeaders).length && (options['headers'] = optionsHeaders)
-          
+
           let optionsParams = {}
           let optionsParams = {}
           currentDataSource.params && Object.keys(currentDataSource.params).forEach(key => {
           currentDataSource.params && Object.keys(currentDataSource.params).forEach(key => {
             if (isExpression(currentDataSource.params[key])) {
             if (isExpression(currentDataSource.params[key])) {
@@ -1112,7 +1112,7 @@ export default {
         } else {
         } else {
           if (Object.keys(this.formValue).indexOf(genList[i].model) >= 0) {
           if (Object.keys(this.formValue).indexOf(genList[i].model) >= 0) {
             this.models[genList[i].model] = this.formValue[genList[i].model]
             this.models[genList[i].model] = this.formValue[genList[i].model]
-            
+
             this.displayFields[genList[i].model] = !genList[i].options.hidden
             this.displayFields[genList[i].model] = !genList[i].options.hidden
 
 
             if (genList[i].type === 'blank') {
             if (genList[i].type === 'blank') {
@@ -1125,7 +1125,7 @@ export default {
             if (genList[i].type === 'blank') {
             if (genList[i].type === 'blank') {
               // bound the default value
               // bound the default value
               this.models[genList[i].model] = genList[i].options.defaultType === 'String' ? '' : (genList[i].options.defaultType === 'Object' ? {} : [])
               this.models[genList[i].model] = genList[i].options.defaultType === 'String' ? '' : (genList[i].options.defaultType === 'Object' ? {} : [])
-              
+
               this.displayFields[genList[i].model] = !genList[i].options.hidden
               this.displayFields[genList[i].model] = !genList[i].options.hidden
 
 
               this.blanks.push({
               this.blanks.push({
@@ -1139,7 +1139,7 @@ export default {
           }
           }
 
 
           if ((Object.keys(genList[i].options).indexOf('dataBind') < 0 || genList[i].options.dataBind) && genList[i].key && genList[i].model) {
           if ((Object.keys(genList[i].options).indexOf('dataBind') < 0 || genList[i].options.dataBind) && genList[i].key && genList[i].model) {
-            
+
             if (['subform', 'table', 'dialog', 'group'].includes(genList[i].type)) {
             if (['subform', 'table', 'dialog', 'group'].includes(genList[i].type)) {
               this.dataBindFields[genList[i].model] = {}
               this.dataBindFields[genList[i].model] = {}
             } else {
             } else {
@@ -1176,7 +1176,7 @@ export default {
             // 处理子表单中的DataSource
             // 处理子表单中的DataSource
             this._generateDataSource(item, `${genList[i].model}.${item.model}`)
             this._generateDataSource(item, `${genList[i].model}.${item.model}`)
           })
           })
-          
+
           this._generateRules(genList[i].model, genList[i].rules)
           this._generateRules(genList[i].model, genList[i].rules)
 
 
           // 处理DataSource
           // 处理DataSource
@@ -1221,7 +1221,7 @@ export default {
           }) : [])
           }) : [])
         ]
         ]
       } else {
       } else {
-        
+
         this.rules[model] = [
         this.rules[model] = [
           ...(rules ? rules.map(im => {
           ...(rules ? rules.map(im => {
             if (im.pattern) {
             if (im.pattern) {
@@ -1389,7 +1389,7 @@ export default {
 
 
             let newFields = [...fields]
             let newFields = [...fields]
             newFields.splice(0, 1)
             newFields.splice(0, 1)
-            
+
             if (genList[i].type === 'table') {
             if (genList[i].type === 'table') {
               this._setSubOptions(genList[i].tableColumns, newFields, opts)
               this._setSubOptions(genList[i].tableColumns, newFields, opts)
             }
             }
@@ -1477,7 +1477,7 @@ export default {
 
 
             let newFields = [...fields]
             let newFields = [...fields]
             newFields.splice(0, 1)
             newFields.splice(0, 1)
-            
+
             if (genList[i].type === 'table') {
             if (genList[i].type === 'table') {
               const options = this._getSubOptions(genList[i].tableColumns, newFields)
               const options = this._getSubOptions(genList[i].tableColumns, newFields)
               if(options) return options
               if(options) return options
@@ -1803,7 +1803,7 @@ export default {
 
 
       if (dialogComponent) {
       if (dialogComponent) {
         dialogComponent.close()
         dialogComponent.close()
-      } 
+      }
     },
     },
     getDynamicValue (key) {
     getDynamicValue (key) {
       return this.dynamicValueData.find(item => item.key == key)
       return this.dynamicValueData.find(item => item.key == key)

+ 22 - 13
src/BIZComponents/processSubmitDialog/processSubmitDialog.vue

@@ -15,6 +15,7 @@
         <!--          {{ form.name }}-->
         <!--          {{ form.name }}-->
         <!--        </div>-->
         <!--        </div>-->
         <fm-generate-form
         <fm-generate-form
+          :preview="true"
           class="el-form-box"
           class="el-form-box"
           v-if="Object.keys(form?.formJson || {}).length !== 0"
           v-if="Object.keys(form?.formJson || {}).length !== 0"
           :data="jsonData"
           :data="jsonData"
@@ -222,12 +223,16 @@
       <!--      </el-button>-->
       <!--      </el-button>-->
       <el-button type="primary" size="small" @click="submit">提交</el-button>
       <el-button type="primary" size="small" @click="submit">提交</el-button>
       <el-button size="small" @click="cancel">关闭</el-button>
       <el-button size="small" @click="cancel">关闭</el-button>
-      <visibility-range-dialog
-        :visibilityRangeDialogFlag.sync="visibilityRangeDialogFlag"
-        v-if="visibilityRangeDialogFlag"
-        @getTreeList="getTreeList"
-        ref="visibilityRangeDialogRef"
-      ></visibility-range-dialog>
+<!--      <visibility-range-dialog-->
+<!--        :visibilityRangeDialogFlag.sync="visibilityRangeDialogFlag"-->
+<!--        v-if="visibilityRangeDialogFlag"-->
+<!--        @getTreeList="getTreeList"-->
+<!--        ref="visibilityRangeDialogRef"-->
+<!--      ></visibility-range-dialog>-->
+      <staffSelection
+        ref="staffSelection"
+        @confirm="getTreeList"
+      ></staffSelection>
     </div>
     </div>
   </ele-modal>
   </ele-modal>
 </template>
 </template>
@@ -252,10 +257,10 @@
   import { getProcessDefinitionList } from '@/api/bpm/definition';
   import { getProcessDefinitionList } from '@/api/bpm/definition';
   import { getToken } from '@/utils/token-util';
   import { getToken } from '@/utils/token-util';
   import { mapGetters } from 'vuex';
   import { mapGetters } from 'vuex';
-
+import staffSelection from '@/components/staffSelection/staffSelection.vue';
   export default {
   export default {
     name: 'processSubmitDialog',
     name: 'processSubmitDialog',
-    components: { visibilityRangeDialog },
+    components: { visibilityRangeDialog,staffSelection },
     mixins: [dictMixins],
     mixins: [dictMixins],
     props: {
     props: {
       processSubmitDialogFlag: {
       processSubmitDialogFlag: {
@@ -375,7 +380,6 @@ this.postOptions.push(...response.data);
             // item.url = item.url && item.url.replace('/api', this.APIUrl);
             // item.url = item.url && item.url.replace('/api', this.APIUrl);
           });
           });
         this.jsonData.list.forEach((item) => {
         this.jsonData.list.forEach((item) => {
-          console.log(item.type);
           if (item.type == 'deptAndUserCascader') {
           if (item.type == 'deptAndUserCascader') {
           }
           }
           if (item.type == 'deptCascader') {
           if (item.type == 'deptCascader') {
@@ -433,12 +437,16 @@ this.postOptions.push(...response.data);
         });
         });
       },
       },
       handleEditDataScope() {
       handleEditDataScope() {
-        this.visibilityRangeDialogFlag = true;
-        this.$nextTick(() => {
-          this.$refs.visibilityRangeDialogRef.init(this.form);
-        });
+        this.$refs.staffSelection.open(this.form.noticeScope);
+        // this.visibilityRangeDialogFlag = true;
+        // this.$nextTick(() => {
+        //   this.$refs.visibilityRangeDialogRef.init(this.form);
+        // });
       },
       },
       getTreeList(list) {
       getTreeList(list) {
+        list.forEach((item) => {
+          item.type = 1
+        })
         this.form.noticeScope = list;
         this.form.noticeScope = list;
       },
       },
       handleCloseTag(index) {
       handleCloseTag(index) {
@@ -573,6 +581,7 @@ this.postOptions.push(...response.data);
       async submit() {
       async submit() {
         this.form.valueJson = await this.generateFormValid();
         this.form.valueJson = await this.generateFormValid();
         this.form.processType = '1';
         this.form.processType = '1';
+
         await processInstanceCreateAPI({
         await processInstanceCreateAPI({
           ...this.form,
           ...this.form,
           variables: { ...this.form.valueJson }
           variables: { ...this.form.valueJson }

+ 34 - 9
src/components/staffSelection/staffSelection.vue

@@ -59,7 +59,25 @@
                       <div>{{ row.jobNumber }}</div>
                       <div>{{ row.jobNumber }}</div>
                     </template>
                     </template>
                   </el-table-column>
                   </el-table-column>
-                  <el-table-column width="80" label="操作">
+                  <el-table-column width="180" label="操作">
+                    <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>
                     <template slot-scope="{ row }">
                     <template slot-scope="{ row }">
                       <el-button
                       <el-button
                         size="mini"
                         size="mini"
@@ -73,14 +91,6 @@
                     </template>
                     </template>
                   </el-table-column>
                   </el-table-column>
                 </el-table>
                 </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>
               </el-container>
               </el-container>
             </div>
             </div>
           </el-card>
           </el-card>
@@ -143,6 +153,8 @@
         form: {
         form: {
           groupId: null
           groupId: null
         },
         },
+        userName: '',
+        currentData: {},
         treeList: [],
         treeList: [],
         staffList: [],
         staffList: [],
         selectStafflist: [], //已选员工
         selectStafflist: [], //已选员工
@@ -177,6 +189,7 @@
       },
       },
       //选择分类
       //选择分类
       handleNodeClick(data) {
       handleNodeClick(data) {
+        this.currentData = data
         this.staffList = [];
         this.staffList = [];
 
 
         this.form.groupId = data.id;
         this.form.groupId = data.id;
@@ -187,6 +200,18 @@
         };
         };
         this.getStaffList(params);
         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) {
       async getStaffList(params) {
         let res = await getUserPage(params);
         let res = await getUserPage(params);

+ 13 - 11
src/views/bpm/collaborative/index.vue

@@ -179,7 +179,7 @@
                 <div class="filter-container">
                 <div class="filter-container">
                   <el-form
                   <el-form
                     class="ele-form-search"
                     class="ele-form-search"
-                    @keyup.enter.native="reload"
+                    @keyup.enter.native="deptReload"
                     @submit.native.prevent
                     @submit.native.prevent
                   >
                   >
                     <el-row :gutter="15" style="display: flex;align-items: center">
                     <el-row :gutter="15" style="display: flex;align-items: center">
@@ -244,11 +244,11 @@
                       type="primary"
                       type="primary"
                       icon="el-icon-search"
                       icon="el-icon-search"
                       class="ele-btn-icon"
                       class="ele-btn-icon"
-                      @click="reload"
+                      @click="deptReload"
                     >
                     >
                       查询
                       查询
                     </el-button>
                     </el-button>
-                    <el-button @click="reset">重置</el-button>
+                    <el-button @click="deptReset">重置</el-button>
                   </div>
                   </div>
                 </div>
                 </div>
               </template>
               </template>
@@ -307,7 +307,7 @@
               </template>
               </template>
             </ele-pro-table>
             </ele-pro-table>
           </el-tab-pane>
           </el-tab-pane>
-          <el-tab-pane label="通知记录">
+          <el-tab-pane label="通知我的记录">
 
 
             <ele-pro-table
             <ele-pro-table
               ref="noticeTable"
               ref="noticeTable"
@@ -322,7 +322,7 @@
                 <div class="filter-container">
                 <div class="filter-container">
                   <el-form
                   <el-form
                     class="ele-form-search"
                     class="ele-form-search"
-                    @keyup.enter.native="reload"
+                    @keyup.enter.native="noticeReload"
                     @submit.native.prevent
                     @submit.native.prevent
                   >
                   >
                     <el-row :gutter="15" style="display: flex;align-items: center">
                     <el-row :gutter="15" style="display: flex;align-items: center">
@@ -387,11 +387,11 @@
                       type="primary"
                       type="primary"
                       icon="el-icon-search"
                       icon="el-icon-search"
                       class="ele-btn-icon"
                       class="ele-btn-icon"
-                      @click="reload"
+                      @click="noticeReload"
                     >
                     >
                       查询
                       查询
                     </el-button>
                     </el-button>
-                    <el-button @click="reset">重置</el-button>
+                    <el-button @click="noticeReset">重置</el-button>
                   </div>
                   </div>
                 </div>
                 </div>
               </template>
               </template>
@@ -934,14 +934,16 @@ export default {
       display: flex;
       display: flex;
       flex-direction: row;
       flex-direction: row;
       flex-wrap: wrap;
       flex-wrap: wrap;
-
+      height: 60px;
+      overflow: auto;
       .category_content {
       .category_content {
-        width: 60px;
-        height: 60px;
+        min-width: 60px;
+        min-height: 60px;
+        //flex: 1 1 0;
         display: flex;
         display: flex;
         flex-direction: column;
         flex-direction: column;
         border-right: 1px solid #e1e1e1;
         border-right: 1px solid #e1e1e1;
-
+        border-bottom: 1px solid #e1e1e1;
         align-items: center;
         align-items: center;
         justify-content: center;
         justify-content: center;
       //  font-weight: bold;
       //  font-weight: bold;