Z 1 tahun lalu
induk
melakukan
8cf3c92f85

+ 2 - 2
lib/vue-form-making/src/components/Container.vue

@@ -664,10 +664,10 @@ export default {
       if (typeof json === 'string') {
         json = JSON.parse(json)
       }
-
       this.widgetForm = _.cloneDeep({
         ...json,
-        list: json.list ? json.list.map(item => UpgradeData(item)) : []
+        config: this.widgetForm.config,
+        list: json.list ? [ ...this.widgetForm.list,...json.list.map(item => UpgradeData(item))] : [...this.widgetForm.list]
       })
 
       if (this.widgetForm.config?.eventScript) {

+ 43 - 1
src/BIZComponents/processSubmitDialog/processSubmitDialog.vue

@@ -15,6 +15,7 @@
         <!--          {{ form.name }}-->
         <!--        </div>-->
         <fm-generate-form
+          class="el-form-box"
           v-if="Object.keys(form?.formJson || {}).length !== 0"
           :data="jsonData"
           :value="form.valueJson"
@@ -219,6 +220,8 @@
 
   import { getModel } from '@/api/bpm/model';
   import { getProcessDefinitionList } from '@/api/bpm/definition';
+  import { getToken } from '@/utils/token-util';
+  import {mapGetters} from "vuex";
 
   export default {
     name: 'processSubmitDialog',
@@ -273,6 +276,9 @@
         rules: {}
       };
     },
+    computed:{
+    ...mapGetters(['user']),
+    },
     async created() {
       let typeObj = await getProduceTreeByCode(
         treeClassifyCodeEnum['PROCESSTYPE']
@@ -320,7 +326,7 @@ this.postOptions.push(...response.data);
     },
     methods: {
       async init(row = {}) {
-        this.title = '申请' + row.name + '单';
+        this.title = '新建' + row.name + '单';
         this.form = _.cloneDeep(row);
         this.form.formId = row.id;
         this.$set(this.form, 'noticeScope', []);
@@ -328,7 +334,36 @@ this.postOptions.push(...response.data);
         this.$set(this.form, 'FQLC', '');
         this.$set(this.form, 'name', '');
         this.$set(this.form, 'key', '');
+        this.$set(this.form, 'valueJson', {});
         this.jsonData = JSON.parse(this.form.formJson.makingJson);
+        this.jsonData.config.dataSource &&
+          this.jsonData.config.dataSource.forEach((item) => {
+            item.headers = {
+              Authorization: getToken()
+            };
+            // item.url = item.url && item.url.replace('/api', this.APIUrl);
+          });
+        console.log(this.user,'');
+        this.jsonData.list.forEach((item) => {
+          if (item.type == 'deptAndUserCascader') {
+
+
+          }
+          if (item.type == 'deptCascader') {
+            this.form.valueJson[item.model] = this.user.info.deptIds
+          }
+          if (item.type == 'userSelect') {
+            this.form.valueJson[item.model] = this.user.info.userId
+          }
+          if (item.type == 'imgupload') {
+            // this.form.valueJson[item.model].length &&
+            //   this.form.valueJson[item.model].forEach((item) => {
+            //     //item.objectUrl = this.APIUrl +'/kd-aiot' + item.storePath
+            //     // item.objectUrl = item.url;
+            //     // console.log(item);
+            //   });
+          }
+        });
         await this.getProcessDefinitionBpmnXMLInfo(this.form.processModelId);
         await this.getTaskAssignRuleListInfo({
           modelId: this.form.processModelId,
@@ -549,5 +584,12 @@ this.postOptions.push(...response.data);
   }
   ::v-deep .el-dialog {
     min-width: 400px;
+    .el-dialog__header {
+      background: #1890ffd6;
+    }
+    .el-dialog__title,
+    .el-dialog__close {
+      color: #ffffff;
+    }
   }
 </style>

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

@@ -8,6 +8,7 @@
           <div class="category_box_title">{{ getDictV('collaborative_type', category) }}</div>
           <div class="category_box_content">
             <div v-for="v in templateList[category]" :key="v.id" class="category_content"
+                 :title="v.name"
                  @click="handleStartProcess(v)">
               <svg-icon
                 style="width: 1.5em;height: 1.5em;"
@@ -15,7 +16,7 @@
                 className="svg-icon-set"
               ></svg-icon>
               <span>
-              {{ v.name }}
+              {{ v.name.length>3?v.name[0]+v.name[1]+v.name[2]+'...':v.name }}
             </span>
             </div>
           </div>
@@ -911,20 +912,21 @@ export default {
   //justify-content: space-between;
 
   .category_box {
-    border: 1px solid #e1e1e1;
+    border-left: 1px solid #e1e1e1;
+    border-bottom: 1px solid #e1e1e1;
     border-radius: 1px;
     width: 25%;
     margin-top: 5px;
-
+    overflow: auto;
     .category_box_title {
       font-size: 14px;
       font-weight: bold;
-      color: #616161;
+      color: #fff8f8;
       height: 39px;
       display: flex;
       padding: 5px 20px;
       align-items: center;
-      background: rgb(248, 248, 248);
+      background: #1890ffd6;
       border-bottom: 1px solid #e1e1e1;
     }
 
@@ -942,7 +944,7 @@ export default {
 
         align-items: center;
         justify-content: center;
-        font-weight: bold;
+      //  font-weight: bold;
 
         &:nth-child(n) {
           span:nth-child(1) {
@@ -963,6 +965,9 @@ export default {
     }
 
   }
+  .category_box:last-child {
+    border-right: 1px solid #e1e1e1;
+  }
 }
 
 .tab-box {

+ 2 - 2
src/views/bpm/formConfig/json1.js

@@ -71,8 +71,8 @@ export default {
         "validator": "if(value<this.getValue('date_zrblmvzi')&&this.getValue('date_zrblmvzi')){\ncallback(new Error('结束时间不能早于开始时间'))\n}else if(!value){\ncallback(new Error('请输入结束时间'))\n} else{\ncallback()\n\n}",
         "width": "100%",
         "customClass": "",
-        "labelWidth": 100,
-        "isLabelWidth": true,
+        "labelWidth": 80,
+        "isLabelWidth": false,
         "hidden": false,
         "dataBind": true,
         "customProps": {},