liuc 5 сар өмнө
parent
commit
b7cc3c985b

+ 3 - 3
src/views/flow/stDesignMain/index.vue

@@ -18,11 +18,11 @@
           </a-button>
         </a-button-group>
         <a-tooltip title="流程设置">
-          <a-button size="large" @click="openSetting" type="link"
+          <a-button size="large" @click="openSetting" type="text"
                     :icon="h(SettingOutlined)"/>
         </a-tooltip>
         <a-tooltip title="帮助文档">
-          <a-button size="large" @click="openHelp" type="link"
+          <a-button size="large" @click="openHelp" type="text"
                     :icon="h(BookOutlined)"/>
         </a-tooltip>
         <MainSetting ref="mainSettingRef"/>
@@ -96,7 +96,7 @@ const visible = ref(false);
 const currentComName = ref("");
 
 const showModal = (row) => {
-  currentComName.value = headerList.value[0].componentName;
+  currentComName.value = headerList.value[1].componentName;
   currentRow.value = row;
   title.value = row.flowName;
   flowCode.value = row.flowCode

+ 0 - 1
src/views/flow/stFormDesign/packages/PopUpQuery/index.vue

@@ -217,7 +217,6 @@ export default {
     }
   },
   methods: {
-
     handleRow(record, index) {
       return {
         onDblclick: (event) => {

+ 5 - 5
src/views/flow/stFormDesign/packages/PopUpQueryChild/index.vue

@@ -208,11 +208,14 @@ export default {
         this.record.queryMapKeyValData.forEach((item, index) => {
           const keyVal = {}
           keyVal.key = item.queryKey
+
           if (item.queryValue.indexOf("[") < 0) {
             if (item.queryValue.indexOf("{") >= 0) {
-              keyVal.value = this.rowData[item.queryValue.substring(1, item.queryValue.length - 1)];
+              //主表的queryValue,主表的被{}包裹着,所以会在这里触发
+              const targetField = item.queryValue.substring(1, item.queryValue.length - 1)
+              keyVal.value = this.formData[targetField]
             } else {
-              //子表的queryValue,子表的没有被{}包裹,所以会在这里触发,这是在组件PopUpMapping中的queryMapKeyValOpts没有写好的,已经没有写好了,所以就这么地吧,也没啥影响
+              //子表的queryValue,子表的没有被{}包裹,所以会在这里触发
               keyVal.value = this.rowData[item.queryValue];
             }
             if (!keyVal.value) {
@@ -254,9 +257,6 @@ export default {
       setTimeout(() => {
         this.visible = false
         const queryMapField = this.record.queryMapField
-        console.log(queryMapField, 'queryMapField')
-        console.log(this.rowData, 'this.rowData')
-        console.log(this.selectRecord, 'this.selectRecord')
         for (const key in queryMapField) {
           const mapField = queryMapField[key].mapField
           if (mapField) {

+ 2 - 2
src/views/flow/stFormDesign/packages/StFormDesign/config/formItemsConfig.js

@@ -64,7 +64,7 @@ export const basicsList = [
             defaultValue: "", // 默认值
             placeholder: "请输入", // 没有输入时,提示文字
             clearable: false,
-            maxLength: null,
+            maxLength: 127,
             addonBefore: "",
             addonAfter: "",
             hidden: false, // 是否隐藏,false显示,true隐藏
@@ -89,7 +89,7 @@ export const basicsList = [
             width: "100%", // 宽度
             minRows: 4,
             maxRows: 6,
-            maxLength: null,
+            maxLength: 2000,
             defaultValue: "",
             clearable: false,
             hidden: false, // 是否隐藏,false显示,true隐藏

+ 1 - 1
src/views/flow/stFormDesign/packages/StFormDesign/config/jsonFormat.js

@@ -10,7 +10,7 @@ export default `{
 				"defaultValue": "",
 				"placeholder": "请输入",
 				"clearable": false,
-				"maxLength": null,
+				"maxLength": 100,
 				"hidden": false,
 				"disabled": false
 			},

+ 1 - 0
src/views/flow/stFormDesign/packages/StFormDesign/module/formComponentPanel.vue

@@ -39,6 +39,7 @@
         <template #item="{ element, index }">
           <transition-group tag="div" name="list" class="list-main">
             <layoutItem
+                :key="index"
                 class="drag-move"
                 :record="element"
                 :config="data.config"

+ 0 - 75
src/views/flow/stFormDesign/packages/StFormDesign/module/formItemProperties.vue

@@ -426,23 +426,6 @@
             <a-radio value='danger'>Danger</a-radio>
           </a-radio-group>
         </a-form-item>
-        <!-- 下载方式 start -->
-        <a-form-item
-            v-if="typeof options.downloadWay !== 'undefined'"
-            label='下载方式'
-        >
-          <a-radio-group buttonStyle='solid' v-model:value='options.downloadWay'>
-            <a-radio-button value='a'>a标签</a-radio-button>
-            <a-radio-button value='ajax'>ajax</a-radio-button>
-            <a-radio-button value='dynamic'>动态函数</a-radio-button>
-          </a-radio-group>
-          <a-input
-              v-show="options.downloadWay === 'dynamic'"
-              v-model:value='options.dynamicFun'
-              placeholder='动态函数名'
-          ></a-input>
-        </a-form-item>
-        <!-- 下载方式 end -->
         <a-form-item v-if="selectItem.type === 'button'" label='按钮操作'>
           <a-button @click="OnChangeJs(selectItem, 'click')" type='primary'>点击事件</a-button>
         </a-form-item>
@@ -485,59 +468,6 @@
         >
           <a-input-number :min='0' v-model:value='options.scrollY'/>
         </a-form-item>
-
-        <!-- 上传地址 -->
-        <a-form-item
-            v-if="typeof options.action !== 'undefined'"
-            label='上传地址'
-        >
-          <a-input v-model:value='options.action' placeholder='请输入'></a-input>
-        </a-form-item>
-
-        <!-- 文件name -->
-        <a-form-item
-            v-if="typeof options.fileName !== 'undefined'"
-            label='文件name'
-        >
-          <a-input v-model:value='options.fileName' placeholder='请输入'></a-input>
-        </a-form-item>
-        <!-- 上传额外参数 -->
-        <a-form-item
-            v-if="typeof options.data !== 'undefined'"
-            label='额外参数(JSON格式)'
-        >
-          <a-textarea
-              v-model:value='options.data'
-              placeholder='严格JSON格式'
-          ></a-textarea>
-        </a-form-item>
-        <!--        &lt;!&ndash; 文字对齐方式 &ndash;&gt;-->
-        <!--        <a-form-item v-if="selectItem.type === 'text'" label='文字对齐方式'>-->
-        <!--          <a-radio-group buttonStyle='solid' v-model:value='options.textAlign'>-->
-        <!--            <a-radio-button value='left'>左</a-radio-button>-->
-        <!--            <a-radio-button value='center'>居中</a-radio-button>-->
-        <!--            <a-radio-button value='right'>右</a-radio-button>-->
-        <!--          </a-radio-group>-->
-        <!--        </a-form-item>-->
-        <!--        &lt;!&ndash; 文字字体 &ndash;&gt;-->
-        <!--        <a-form-item v-if="selectItem.type === 'text'" label='字体属性设置'>-->
-        <!--          &lt;!&ndash; <colorPicker v-model:value='options.color' /> &ndash;&gt;-->
-        <!--          <a-select-->
-        <!--              :options='familyOptions'-->
-        <!--              v-model:value='options.fontFamily'-->
-        <!--              style='width:36%;margin-left:2%;vertical-align:bottom;'-->
-        <!--          />-->
-        <!--          <a-select-->
-        <!--              :options='sizeOptions'-->
-        <!--              v-model:value='options.fontSize'-->
-        <!--              style='width:35%;margin-left:2%;vertical-align:bottom;'-->
-        <!--          />-->
-        <!--          <a-checkbox v-model:checked="options.fontBold">加粗</a-checkbox>-->
-        <!--        </a-form-item>-->
-        <!--        <a-form-item v-if="selectItem.type === 'text'" label='操作属性'>-->
-        <!--          <stCheckbox v-model:value='options.showRequiredMark' label='显示必选标记'/>-->
-        <!--        </a-form-item>-->
-
         <a-form-item
             v-if="  selectItem.type!='text'&&
             ((typeof options.hidden !== 'undefined' ||
@@ -614,11 +544,6 @@
               v-model:value='options.hideSequence'
               label='隐藏序号'
           />
-          <stCheckbox
-              v-if="typeof options.drag !== 'undefined'"
-              v-model:value='options.drag'
-              label='允许拖拽'
-          />
           <stCheckbox
               v-if="typeof options.showSearch !== 'undefined'"
               v-model:value='options.showSearch'

+ 1 - 1
src/views/flow/stFormDesign/packages/StFormDesign/module/jsModal.vue

@@ -757,7 +757,7 @@ const commonMethods = [
     "field": "表单自定义组件",
     "fieldCode": "    //1、系统共预制10个自定义组件(custom_0到custom_9)\n" +
         "    //2、使用时需要首先在表单中拖拽html组件,并设置内容为:<div id=\"custom_0\"></div>\n" +
-        "    //3、在表单保存前事件中this.getValues()[\"custome_child\"]=this.customComponent[0].values\n" +
+        "    //3、在表单保存前事件”和“表单提交前事件”中this.getValues()[\"custome_child\"]=this.customComponent[0].values\n" +
         "    this.customComponent[0].values = this.getValues()[\"custome_child\"]//页面传值,非必填\n" +
         "    this.customComponent[0].callbackMethod = () => {//唯一一个回调方法,非必填\n" +
         "        console.log('回调内容')\n" +

+ 18 - 3
src/views/flow/stFormDesign/packages/StFormDesign/module/layoutItem.vue

@@ -26,6 +26,7 @@
             :style="config.layout === 'horizontal' && config.labelLayout === 'flex' && record.options.showLabel ? { display: 'flex' } : {}"
         >
           <draggable
+              item-key="key"
               tag="div"
               class="draggable-box batch-draggable-box"
               v-bind="{
@@ -121,6 +122,7 @@
               </a-radio-group>
             </div>
             <draggable
+                item-key="key"
                 tag="div"
                 class="draggable-box"
                 v-bind="{
@@ -180,6 +182,7 @@
           <a-tab-pane v-for="(tabItem, index) in record.columns" :key="index" :tab="tabItem.label">
             <div class="grid-col">
               <draggable
+                  item-key="key"
                   tag="div"
                   class="draggable-box"
                   v-bind="{
@@ -217,7 +220,9 @@
             </div>
           </a-tab-pane>
         </a-tabs>
-
+        <div class="cover"
+             v-show="!( !record.options||!record.options.hidden||record.options.hidden == false )">
+        </div>
         <div class="copy" :class="record.key === selectItem.key ? 'active' : 'unactivated'"
              @click.stop="$emit('handleCopy')">
           <!-- <a-icon type="copy" /> -->
@@ -238,6 +243,7 @@
         <a-row class="grid-row" :gutter="record.options.gutter">
           <a-col class="grid-col" v-for="(colItem, idnex) in record.columns" :key="idnex" :span="colItem.span || 0">
             <draggable
+                item-key="key"
                 tag="div"
                 class="draggable-box"
                 v-bind="{
@@ -274,7 +280,9 @@
             </draggable>
           </a-col>
         </a-row>
-
+        <div class="cover"
+             v-show="!( !record.options||!record.options.hidden||record.options.hidden == false )">
+        </div>
         <div class="copy" :class="record.key === selectItem.key ? 'active' : 'unactivated'"
              @click.stop="$emit('handleCopy')">
           <!-- <a-icon type="copy" /> -->
@@ -294,6 +302,7 @@
         <a-card class="grid-row" :title="record.label">
           <div class="grid-col">
             <draggable
+                item-key="key"
                 tag="div"
                 class="draggable-box"
                 v-bind="{
@@ -331,6 +340,9 @@
             </draggable>
           </div>
         </a-card>
+        <div class="cover"
+             v-show="!( !record.options||!record.options.hidden||record.options.hidden == false )">
+        </div>
         <div class="copy" :class="record.key === selectItem.key ? 'active' : 'unactivated'"
              @click.stop="$emit('handleCopy')">
           <!-- <a-icon type="copy" /> -->
@@ -367,6 +379,7 @@
                 @contextmenu.prevent="$emit('handleShowRightMenu', $event, record, trIndex, tdIndex)"
             >
               <draggable
+                  item-key="key"
                   tag="div"
                   class="draggable-box"
                   v-bind="{
@@ -405,7 +418,9 @@
             </td>
           </tr>
         </table>
-
+        <div class="cover"
+             v-show="!( !record.options||!record.options.hidden||record.options.hidden == false )">
+        </div>
         <div class="copy" :class="record.key === selectItem.key ? 'active' : 'unactivated'"
              @click.stop="$emit('handleCopy')">
           <!-- <a-icon type="copy" /> -->

+ 22 - 8
src/views/flow/stFormWork/formWork.vue

@@ -1,5 +1,5 @@
 <template>
-  <a-watermark :content="watermarkContent" :gap="[360, 360]">
+  <a-watermark :zIndex="waterMarkIndex" :content="watermarkContent" :gap="[360, 360]">
     <a-spin :spinning="!loadBeforeOver" size="large" tip="表单加载中...">
       <div class="form-data-page">
         <div class="MvcSheet">
@@ -210,6 +210,7 @@ const flowStore = useFlowStore();
 const {watermarkContent} = useWatermark();
 import lodash from 'lodash';
 
+const waterMarkIndex = ref(9999)
 const userStore = useUserStore();
 const WebSocketStore = useWebSocketStore();
 const preView = ref(null)
@@ -994,19 +995,32 @@ const handlePrint = () => {
               }
             }
           }
-
-
         }
       }
       preView.value.show(hiprintTemplate, data, 220)
     } else {
-      window.print();
-
+      waterMarkIndex.value = -1
+      setTimeout(() => {
+        if (window.pageYOffset === 0) {
+          window.print();
+          waterMarkIndex.value = 9999
+        } else {
+          window.scrollTo({top: 0, behavior: 'smooth'});
+          const handleScroll = () => {
+            if (window.pageYOffset === 0) {
+              window.removeEventListener('scroll', handleScroll);
+              setTimeout(() => {
+                window.print();
+                waterMarkIndex.value = 9999
+              }, 500)
+            }
+          };
+          window.addEventListener('scroll', handleScroll);
+        }
+      }, 100)
     }
   })
-
-
-};
+}
 
 const findDynamicObjects = (formConfig) => {
   const dynamicElements = [];

+ 2 - 1
src/views/flow/stFormWork/style/formWork.less

@@ -40,8 +40,9 @@
 
 .mvc-a-hh {
   margin: 0 auto;
-  width: 1200px;
+  width: 100%;
   height: 130px;
+  max-width: 1200px;
   background: white;
 
   .mvc-header {

+ 28 - 13
src/views/flow/stPrint/index.vue

@@ -1,6 +1,6 @@
 <template>
   <a-card>
-    <a-row :gutter="[8,0]" style="margin-bottom: 10px" >
+    <a-row :gutter="[8,0]" style="margin-bottom: 10px">
       <a-col :span="2" v-if="1==2">
         <!-- 模板选择 -->
         <a-select v-if="1==2" v-model='mode' showSearch @change="changeMode" :defaultValue="0"
@@ -16,14 +16,19 @@
           <a-space style="display: flex;justify-content: space-between;">
 
             <div>
-              <ZoomInOutlined style="font-size: 18px;padding: 4px;border: 1px solid #ddd; border-radius: 4px; box-shadow: 1px 1px 0 0 rgba(0,0,0,.15);margin-right: 10px;" @click="changeScale(true)"/>
+              <ZoomInOutlined
+                  style="font-size: 18px;padding: 4px;border: 1px solid #ddd; border-radius: 4px; box-shadow: 1px 1px 0 0 rgba(0,0,0,.15);margin-right: 10px;"
+                  @click="changeScale(true)"/>
               <a-input style="width: 50px;" v-model:value="scaleValue" placeholder="default size" disabled/>
-              <ZoomOutOutlined style="font-size: 18px;padding: 4px;border: 1px solid #ddd; border-radius: 4px; box-shadow: 1px 1px 0 0 rgba(0,0,0,.15);margin-left: 10px;" @click="changeScale(false)"/>
+              <ZoomOutOutlined
+                  style="font-size: 18px;padding: 4px;border: 1px solid #ddd; border-radius: 4px; box-shadow: 1px 1px 0 0 rgba(0,0,0,.15);margin-left: 10px;"
+                  @click="changeScale(false)"/>
 
             </div>
-            <div class="hiprint-printPagination" style="display: flex;margin: 0;align-items: center;height: auto !important;"></div>
+            <div class="hiprint-printPagination"
+                 style="display: flex;margin: 0;align-items: center;height: auto !important;"></div>
             <!-- 预览/打印 -->
-             <div>
+            <div>
               <a-button-group>
                 <a-button type="primary" @click="preView" style="margin-right: 12px;">
                   预览
@@ -35,7 +40,7 @@
                   保存
                 </a-button>
               </a-button-group>
-             </div>
+            </div>
 
           </a-space>
           <!-- 多面板的容器 -->
@@ -269,8 +274,8 @@ export default {
         if (this.fieldData[index].type != 'CHILDREN') {
           let data = ''
           let type = 'text'
-          if (this.fieldData[index].type=="TEXT"){
-            type='longText'
+          if (this.fieldData[index].type == "TEXT") {
+            type = 'longText'
           }
           mainFieldData.push({
             tid: 'panelsProvider1.' + this.fieldData[index].code, title: title, data: data, type: type,
@@ -300,7 +305,7 @@ export default {
             tid: 'panelsProvider1.' + this.fieldData[index].code, title: title,
             type: 'table',
             options: {
-              field:  this.fieldData[index].code,
+              field: this.fieldData[index].code,
               tableHeaderRepeat: 'first',
               tableFooterRepeat: 'last',
               fields: fields,
@@ -404,7 +409,10 @@ export default {
                   type: 'text'
                 },
                 {
-                  tid: 'panelsProvider1.longText', title: '长文本', type: 'longText', options: {
+                  tid: 'panelsProvider1.longText',
+                  title: '长文本',
+                  type: 'longText',
+                  options: {
                     field: 'test.longText',
                     width: 200,
                     testData: '长文本分页/不分页'
@@ -429,7 +437,12 @@ export default {
                   tid: 'panelsProvider1.oval',
                   title: '椭圆',
                   type: 'oval'
-                }
+                },
+                {
+                  tid: 'panelsProvider1.html',
+                  title: 'html',
+                  type: 'html'
+                },
               ])
             ]
         );
@@ -458,10 +471,12 @@ export default {
   img {
   }
 }
-:deep(.hiprint-pagination){
+
+:deep(.hiprint-pagination) {
   margin: 0;
 }
-:deep(.ant-row){
+
+:deep(.ant-row) {
   justify-content: space-around;
 }