Prechádzať zdrojové kódy

Merge branch 'master' of https://a.leanwo.com:3000/prodog-client-2023/client-base-v4

# Conflicts:
#	src/window1/tabGridView/TabGridEdit.vue
liuyanpeng 1 rok pred
rodič
commit
7ac8f0cdd4

+ 4 - 4
package-lock.json

@@ -44,7 +44,7 @@
         "click-outside-vue3": "^4.0.1",
         "dayjs": "^1.11.6",
         "dingtalk-jsapi": "^2.10.3",
-        "pc-component-v3": "1.0.87-test",
+        "pc-component-v3": "1.0.87-t2",
         "uuid": "^8.3.2",
         "v-tooltip": "^4.0.0-beta.17",
         "vue-request": "^1.2.4",
@@ -7214,9 +7214,9 @@
       }
     },
     "node_modules/pc-component-v3": {
-      "version": "1.0.87-test",
-      "resolved": "http://wuzhixin.vip:4873/pc-component-v3/-/pc-component-v3-1.0.87-test.tgz",
-      "integrity": "sha512-/kSoxFEtuuMyoXsURhyfT/CjV0ZCWKfWxn+Us+mFQyngqfqwEJxq7ZzgWGDHPtlPSWTBr8YwlDDfevAlY0fqlw==",
+      "version": "1.0.87-t2",
+      "resolved": "http://wuzhixin.vip:4873/pc-component-v3/-/pc-component-v3-1.0.87-t2.tgz",
+      "integrity": "sha512-mh8Huf7w0yYmKmihJdQIenOMa9fACr2bqdvcweltp6AWFxH6iw7aVqPVrN41OFM1emD7zl23uzyF+/haWZ3MsA==",
       "license": "Leanwo Business Software License",
       "peer": true,
       "peerDependencies": {

+ 4 - 2
package.json

@@ -4,10 +4,12 @@
   "version": "4.0.76",
   "author": "yangzhijie1488 <yangzhijie1488@163.com>",
   "scripts": {
+    "ins": "npm install --registry http://wuzhixin.vip:4873",
     "dev": "cross-env webpack serve --config ./webpack.dev.js",
     "remotedev": "cross-env remoteDevPort=8081 node server.js",
     "build-lib": "cross-env NODE_ENV=production webpack --progress --config ./webpack.lib.js",
-    "build": "cross-env NODE_ENV=production webpack --mode=production --config ./webpack.prod.js --progress"
+    "build": "cross-env NODE_ENV=production webpack --mode=production --config ./webpack.prod.js --progress",
+    "pub": "npm publish --registry http://wuzhixin.vip:4873/"
   },
   "files": [
     "package.json",
@@ -18,7 +20,7 @@
     "click-outside-vue3": "^4.0.1",
     "dayjs": "^1.11.6",
     "dingtalk-jsapi": "^2.10.3",
-    "pc-component-v3": "1.0.87-test",
+    "pc-component-v3": "1.0.87-t2",
     "uuid": "^8.3.2",
     "v-tooltip": "^4.0.0-beta.17",
     "vue-request": "^1.2.4",

+ 1 - 1
src/client/TopNavigation.vue

@@ -72,7 +72,7 @@ export default {
   data: function () {
     this.Common = Common;
     return {
-      loginInfo: '',
+      loginInfo: null,
       webSocket: undefined,
       clientCanAccessList: [],
       visible:true,

+ 1 - 1
src/client/UserParameters.vue

@@ -189,7 +189,7 @@ export default {
       newPassword2CheckResult: '',
       parameterValues: [],
       isShowUserParamter: false,
-      loginInfo: '',
+      loginInfo: null,
       loginUserDto: '',
     };
   },

+ 4 - 6
src/index.js

@@ -74,9 +74,8 @@ import CreateIdentity  from '../src/identity/CreateIdentity.vue';
 import SamlLogin  from './client/SamlLogin.vue';
 import CasLogin  from './client/CasLogin.vue';
 import PrinterConfiguration from '../src/printer/PrinterConfiguration.vue';
-import Window1 from './window1/Window.vue';
-import TabFormEdit1 from './window1/tabFormView/TabFormEdit.vue';
-import TabFormView1 from './window1/tabFormView/TabFormView.vue';
+import CurdWindow1 from './window1/CurdWindow.vue';
+import CurdWindowModal from './window1/CurdWindowModal.vue';
 
 export {
   App,
@@ -141,7 +140,6 @@ export {
   IdentityManager,
   CreateIdentity,
   PrinterConfiguration,
-  Window1,
-  TabFormEdit1,
-  TabFormView1,
+  CurdWindow1,
+  CurdWindowModal
 };

+ 3 - 0
src/main.js

@@ -113,6 +113,7 @@ const router = createRouter({
 });
 
 
+import CurdWindowModal from './window1/CurdWindowModal.vue';
 
 const app = createApp(App);
 app.use(Antd);
@@ -124,6 +125,8 @@ app.use(store);
 app.use(PcComponentV3);
 app.mount('#app');
 
+// 全局注册组件, CURD窗口模态框编辑器
+app.component('CurdWindowModal', CurdWindowModal);
 
 window.app = app;
 

+ 8 - 0
src/resource/dictionary/WindowClientUtil.js

@@ -73,6 +73,14 @@ export default {
     return null;
   },
 
+  // 获取表格标题行字段
+  getGridTitleField: function (tab) {
+    if (tab && tab.tabGridView) {
+      return tab.tabGridView.tabGridTitleFieldDtos;
+    }
+    return null;
+  },
+
   // 获取看板字段
   getDashBoardField: function (tab) {
     if (tab && tab.tabDashboardView) {

+ 2 - 2
src/routes/main_routes.js

@@ -3,7 +3,7 @@ import Desktop from '../client/Desktop.vue';
 const Dashboard = () => import(/* webpackChunkName: "component-1" */ '../dashboard/Dashboard.vue');
 const Window = () => import(/* webpackChunkName: "component-2" */ '../window/Window.vue');
 
-const Window1 = () => import(/* webpackChunkName: "component-2" */ '../window1/Window.vue');
+const CurdWindow1 = () => import(/* webpackChunkName: "component-2" */ '../window1/CurdWindow.vue');
 const TabFormEdit1 = () => import(/* webpackChunkName: "component-4" */ '../window1/tabFormEdit/TabFormEdit.vue');
 const TabFormEditModal = () => import(/* webpackChunkName: "component-4" */ '../window1/tabFormEdit/TabFormEditModal.vue');
 const TabFormView1 = () => import(/* webpackChunkName: "component-5" */ '../window1/tabFormView/TabFormView.vue');
@@ -155,7 +155,7 @@ export default [
 
 
       // 窗口
-      { path: 'window1/:windowNo', component: Window1 },
+      { path: 'window1/:windowNo', component: CurdWindow1 },
 
       // CRUD编辑窗口
       // eslint-disable-next-line

+ 0 - 0
src/window1/Window.vue → src/window1/CurdWindow.vue


+ 222 - 0
src/window1/CurdWindowModal.vue

@@ -0,0 +1,222 @@
+<template>
+  <TabFormEditModal
+    v-if="openTabEditModal"
+    v-model:open="openTabEditModal" :is-restore-data="tabEditViewIsRestoreData"
+    :window-no="mCurdWindowNo" :tab-index="mTabIndex" :type="tabEditViewType" :model-data-id="tabEditViewRecordId"
+    width="100%" :current-page="tabEditViewCurrentPage" :current-index="tabEditViewCurrentIndex"
+    :total-records="tabEditViewTotalRecords" :task-info-id="tabEditViewTaskInfoId"
+    :workflow-type="tabEditViewWorkflowType" :mask-closable="false" @open-tab-form-view="openTabFormView"
+  />
+  <TabFormViewModal
+    v-if="openTabViewModal"
+    v-model:open="openTabViewModal" :window-no="mCurdWindowNo" :tab-index="mTabIndex"
+    :type="tabFormViewType" :model-data-id="tabFormViewRecordId" width="100%" :current-page="tabFormViewCurrentPage"
+    :current-index="tabFormViewCurrentIndex" :total-records="tabFormViewTotalRecords"
+    :task-info-id="tabFormViewTaskInfoId" :workflow-type="tabFormViewWorkflowType" :mask-closable="false"
+    @open-tab-edit-view="openTabEditView"
+  />
+</template>
+
+<script setup>
+import { ref, onMounted, defineEmits, watch, defineProps } from 'vue';
+
+import TabFormEditModal from './tabFormEdit/TabFormEditModal.vue';
+import TabFormViewModal from './tabFormView/TabFormViewModal.vue';
+
+
+const props = defineProps({
+  // 是否打开
+  open: {
+    type: Boolean,
+    default: false,
+  },
+  // 窗口类型
+  // Edit:编辑界面,可选项如下(create:创建数据,edit:编辑数据,editRestore:恢复数据)
+  // View:表单界面,可选项如下(view:视图数据,viewRestore:恢复数据)
+  viewType: {
+    type: String,
+    default: '',
+  },
+  // CURD窗口编号
+  curdWindowNo: {
+    type: String,
+    default: '',
+  },
+  // 页签编号
+  tabIndex: {
+    type: Number,
+    default: 0,
+  },
+  // 数据记录Id
+  modelDataId: {
+    type: Number,
+    default: null,
+  },
+  // 当前记录所在的页码
+  currentPage: {
+    type: Number,
+    default: 0,
+  },
+  // 当前记录的排序
+  currentIndex: {
+    type: Number,
+    default: 0,
+  },
+  // 记录的总数量
+  totalRecords: {
+    type: Number,
+    default: 0,
+  },
+  // 窗口唯一Id(必须是唯一的)
+  uuid: {
+    type: String,
+    default: '',
+  },
+  // 是否恢复草稿数据(false:不恢复,true:恢复)
+  isRestoreData: {
+    type: Boolean,
+    default: false,
+  },
+  // 工作流任务Id(taskId)
+  taskInfoId: {
+    type: String,
+    default: null,
+  },
+  // 工作流任务类型(approve:审批任务,copyTask:抄送任务)
+  workflowType: {
+    type: String,
+    default: null,
+  },
+});
+
+
+const mCurdWindowNo = ref('20240910_193059');
+const mTabIndex = ref(0);
+
+const openTabEditModal = ref(true);
+const tabEditViewType = ref('create');
+const tabEditViewRecordId = ref(null);
+const tabEditViewCurrentPage = ref(null);
+const tabEditViewCurrentIndex = ref(null);
+const tabEditViewTotalRecords = ref(null);
+const tabEditViewIsRestoreData = ref(false);
+const tabEditViewTaskInfoId = ref(null);
+const tabEditViewWorkflowType = ref(null);
+
+const openTabViewModal = ref(false);
+const tabFormViewType = ref('view');
+const tabFormViewRecordId = ref(null);
+const tabFormViewCurrentPage = ref(null);
+const tabFormViewCurrentIndex = ref(null);
+const tabFormViewTotalRecords = ref(null);
+const tabFormViewTaskInfoId = ref(null);
+const tabFormViewWorkflowType = ref(null);
+
+const emits = defineEmits(['update:open']);
+
+
+watch([openTabEditModal, openTabViewModal], (newValues, oldValues) => {
+  console.log('First name or last name changed.');
+  console.log('New values:', newValues);
+  console.log('Old values:', oldValues);
+  if(newValues[0] == false && newValues[1] == false){
+    emits('update:open', false);
+  }
+});
+
+
+onMounted(() => { 
+  if(props.open == false){
+    openTabEditModal.value = false;
+    openTabViewModal.value = false;
+    return;
+  }
+  // 窗口类型
+  // Edit:编辑界面,可选项如下(create:创建数据,edit:编辑数据,editRestore:恢复数据)
+  // View:表单界面,可选项如下(view:视图数据,viewRestore:恢复数据)
+  if(props.viewType == 'create' || props.viewType == 'edit' || props.viewType == 'editRestore'){
+    openTabEditView({
+      type: props.viewType,
+      windowNo: props.curdWindowNo,
+      tabIndex: props.tabIndex,
+      modelDataId: props.modelDataId,
+      currentPage: props.currentPage,
+      currentIndex: props.currentIndex,
+      totalRecords: props.totalRecords,
+      uuid: props.uuid,
+      isRestoreData: props.isRestoreData,
+      taskInfoId: props.taskInfoId,
+      workflowType: props.workflowType,
+    });
+  }else if(props.viewType == 'view' || props.viewType == 'viewRestore'){
+    openTabFormView({
+      type: props.viewType,
+      windowNo: props.curdWindowNo,
+      tabIndex: props.tabIndex,
+      modelDataId: props.modelDataId,
+      currentPage: props.currentPage,
+      currentIndex: props.currentIndex,
+      totalRecords: props.totalRecords,
+      uuid: props.uuid,
+      isRestoreData: props.isRestoreData,
+      taskInfoId: props.taskInfoId,
+      workflowType: props.workflowType,
+    });
+  }
+});
+
+/**
+ * 打开页签视图模式
+ * @param param 信息
+ *          属性1: type: 类型,
+ *          属性1: windowNo: CURD窗口编号,
+ *          属性2: tabIndex: CURD页签编号,
+ *          属性3: modelDataId: 数据记录id,
+ *          属性4: currentPage: 当前记录所在的页码,
+ *          属性5: currentIndex: 当前记录的排序,
+ *          属性6: totalRecords: 记录的总数量,
+ *          属性7: uuid: 窗口唯一Id,
+ */
+const openTabFormView = function (param) {
+
+  console.log('openTabFormView', param);
+
+  tabFormViewType.value = param.type;
+  mCurdWindowNo.value = param.windowNo;
+  mTabIndex.value = param.tabIndex;
+  tabFormViewRecordId.value = param.modelDataId;
+  tabFormViewCurrentPage.value = param.currentPage;
+  tabFormViewCurrentIndex.value = param.currentIndex;
+  tabFormViewTotalRecords.value = param.totalRecords;
+
+  openTabEditModal.value = false;
+  openTabViewModal.value = true;
+};
+
+/**
+ * 打开页签编辑模式
+ * @param param 信息
+ *          属性1: type: 类型,
+ *          属性1: windowNo: CURD窗口编号,
+ *          属性2: tabIndex: CURD页签编号,
+ *          属性3: modelDataId: 数据记录id,
+ *          属性4: currentPage: 当前记录所在的页码,
+ *          属性5: currentIndex: 当前记录的排序,
+ *          属性6: totalRecords: 记录的总数量,
+ *          属性7: uuid: 窗口唯一Id,
+ */
+const openTabEditView = function (param) {
+  tabEditViewType.value = param.type;
+  mCurdWindowNo.value = param.windowNo;
+  mTabIndex.value = param.tabIndex;
+  tabEditViewRecordId.value = param.modelDataId;
+  tabEditViewCurrentPage.value = param.currentPage;
+  tabEditViewCurrentIndex.value = param.currentIndex;
+  tabEditViewTotalRecords.value = param.totalRecords;
+  tabEditViewIsRestoreData.value = param.isRestoreData;
+
+  openTabViewModal.value = false;
+  openTabEditModal.value = true;
+};
+
+</script>

+ 9 - 10
src/window1/tab-form-common/FormFieldDef.vue

@@ -1,16 +1,13 @@
 <template>
   <div class="btn-group">
-    <button
-      type="button"
-      class="btn btn-default dropdown-toggle"
-      aria-haspopup="true"
-      aria-expanded="false"
+    <a-button
       @click="reverseShow"
     >
-      <span class="fa fa-bars" />
-    </button>
-    <Modal v-model:show="modal">
-      <template #header>{{ $t('lang.formFieldDef.formField') }}</template>
+      <template #icon>
+        <OrderedListOutlined />
+      </template>
+    </a-button>
+    <a-modal v-model:open="modal" :title="$t('lang.formFieldDef.formField')">
       <vuedraggable v-model="formFields" class="wrapper" item-key="id" draggable=".field-column-dragable" @end="sortChaned()">
         <template #item="{element}">
           <div class="field-column-dragable">
@@ -35,7 +32,7 @@
           </div>
         </template>
       </vuedraggable>
-    </Modal>
+    </a-modal>
   </div>
 </template>
 
@@ -48,12 +45,14 @@ import Language from '../../common/Language.js';
 
 
 import vuedraggable from 'vuedraggable';
+import { OrderedListOutlined } from '@ant-design/icons-vue';
 
 export default {
 
 
   components: {
     vuedraggable,
+    OrderedListOutlined,
   },
   /**
      * 页签表单字段

+ 160 - 165
src/window1/tabFormEdit/TabFormEditModal.vue

@@ -2,28 +2,41 @@
 <template>
   <a-modal :open="open" @update:open="$emit('update:open', $event)">
     <template #title>
-      <!-- header -->
-      <div class="row" style="height: 50px;">
-        <div class="col-md-12">
-          <h3>
-            <a class="a-back">
-              {{ Language.getNameTrl($i18n.locale, window) }}
-            &nbsp;</a>/&nbsp;{{ subTitle() }}
-            <div v-show="type != 'create'" class="btn-group" role="group">
-              <button type="button" class="btn btn-default" @click="pre">
-                <span class="glyphicon glyphicon-chevron-left" aria-hidden="true" />
-              </button>
-              <button type="button" class="btn btn-default">
-                {{ currIndex }}/{{ totalCount }}
-              </button>
-              <button type="button" class="btn btn-default" @click="next">
-                <span class="glyphicon glyphicon-chevron-right" aria-hidden="true" />
-              </button>
-            </div>
-          </h3>
-        </div>
-      </div>
+      <a-page-header
+        style="padding: 0 20px 0 0;"
+        :title="Language.getNameTrl($i18n.locale, curdWindow)"
+        :sub-title="subTitle()"
+      >
+        <template #extra>
+          <template v-if="type != 'create'">
+            <a-button key="1" title="上一页" @click="pre">
+              <template #icon>
+                <CaretLeftOutlined />
+              </template>
+            </a-button>
+
+            <a-button key="3">
+              {{ currIndex }}/{{ totalCount }}
+            </a-button>
+          
+            <a-button key="2" title="下一页" @click="next">
+              <template #icon>
+                <CaretRightOutlined />
+              </template>
+            </a-button>
+          </template>
+          
+
+          
+          <a-tooltip v-if="!(curdWindow.htmlHelpUrl != null && curdWindow.htmlHelpUrl != '')" title="帮助">
+            <QuestionCircleOutlined style="font-size: 2rem;" @click="openHtmlHelp(curdWindow.htmlHelpUrl)" />
+          </a-tooltip>
+        </template>
+      </a-page-header>
     </template>
+
+
+
     <template #footer />
     <div>
       <div v-show="showSpaceRow" class="row">
@@ -31,39 +44,44 @@
           <div class="m-space-btn-group" />
         </div>
       </div>
-      <div v-show="!showApproveComment" ref="fixedButtonGroup" class="row m-row fixed-btn-group">
-        <a-float-button-group shape="square" :style="{ left: '10px', top: '10px'}">
-          <a-float-button v-if="allowCreate" :description="$t('lang.tabFormEdit.save')" @click="saveTabData">
+      <div v-show="!showApproveComment" ref="fixedButtonGroup">
+        <a-space>
+          <a-button v-if="allowCreate" @click="saveTabData">
             <template #icon>
               <SaveOutlined />
             </template>
-          </a-float-button>
+            {{ $t('lang.tabFormEdit.save') }}
+          </a-button>
 
-          <a-float-button v-if="allowCreate" :description="$t('lang.tabFormEdit.revert')" @click="cancelModel">
+          <a-button v-if="allowCreate" @click="cancelModel">
             <template #icon>
               <RotateLeftOutlined />
             </template>
-          </a-float-button>
+            {{ $t('lang.tabFormEdit.revert') }}
+          </a-button>
           
-          <a-float-button v-if="refreshFlag" :description="$t('lang.tabFormEdit.refresh')" @click="loadData">
+          <a-button v-if="refreshFlag" @click="loadData">
             <template #icon>
               <ReloadOutlined />
             </template>
-          </a-float-button>
-
-          
-          <a-float-button
-            v-if="window.htmlHelpUrl != null && window.htmlHelpUrl != ''"
-            @click="openHtmlHelp(window.htmlHelpUrl)"
+            {{ $t('lang.tabFormEdit.refresh') }}
+          </a-button>
+
+          <FormFieldDef
+            :tab-form-fields="tabFormFields" :window-no="windowNo" :tab-index="tabIndex"
+            @tab-form-field-property-changed="
+              tabFormFieldPropertyChanged($event)
+            "
+          />
+          <a-button
+            v-if="curdWindow.htmlHelpUrl != null && curdWindow.htmlHelpUrl != ''"
+            @click="openHtmlHelp(curdWindow.htmlHelpUrl)"
           >
             <template #icon>
               <SyncOutlined />
             </template>
-          </a-float-button>
-
-
-          <a-back-top :visibility-height="0" />
-        </a-float-button-group>
+          </a-button>
+        </a-space>
 
   
         <div class="col-md-12">
@@ -73,32 +91,26 @@
               :type="type" :tab-buttons="tab.tabFormView ? tab.tabFormView.tabButtons : null" @save-view="backupView"
               @model-data-changed="modelDataChanged"
             />
-            <FormFieldDef
-              :tab-form-fields="tabFormFields" :window-no="windowNo" :tab-index="tabIndex"
-              @tab-form-field-property-changed="
-                tabFormFieldPropertyChanged($event)
-              "
-            />
           </div>
         </div>
       </div>
       <div v-show="showApproveComment" ref="fixedButtonGroup" class="row m-row fixed-btn-group">
-        <a-float-button-group shape="square" :style="{ right: '94px' }">
-          <a-float-button v-if="isView == true && windowDisplayType == 'Grid'" @click="changeWindowDisplayType">
+        <a-space shape="square" :style="{ right: '94px' }">
+          <a-button v-if="isView == true && windowDisplayType == 'Grid'" @click="changeWindowDisplayType">
             <template #icon>
               <QuestionCircleOutlined />
             </template>
             {{ $t("lang.tabFormEdit.formView") }}
-          </a-float-button>
-          <a-float-button />
+          </a-button>
+          <a-button />
 
-          <a-float-button>
+          <a-button>
             <template #icon>
               <SyncOutlined />
             </template>
-          </a-float-button>
+          </a-button>
           <a-back-top :visibility-height="0" />
-        </a-float-button-group>
+        </a-space>
 
 
   
@@ -137,7 +149,7 @@
                     fieldItem.entityFieldIndex
                   " :class-name="tab.tabDataSource.className" :field="fieldItem" :model-data="modelData"
                   :window-no="windowNo" :tab-index="tabIndex" :js-url="jsUrl"
-                  :is-chinese-english="window.isChineseEnglish" :multiple-column="tab.tabFormView.multipleColumn"
+                  :is-chinese-english="curdWindow.isChineseEnglish" :multiple-column="tab.tabFormView.multipleColumn"
                   @value-changed="valueChanged($event, fieldItem)" @execute-callout="executeCallout(fieldItem)"
                 />
               </template>
@@ -189,7 +201,7 @@
                         fieldItem.entityFieldIndex
                       " :class-name="tab.tabDataSource.className" :field="fieldItem" :model-data="modelData"
                       :window-no="windowNo" :tab-index="tabIndex" :js-url="jsUrl"
-                      :is-chinese-english="window.isChineseEnglish" :multiple-column="tab.tabFormView.multipleColumn"
+                      :is-chinese-english="curdWindow.isChineseEnglish" :multiple-column="tab.tabFormView.multipleColumn"
                       @value-changed="valueChanged($event, fieldItem)" @execute-callout="executeCallout(fieldItem)"
                     />
                   </template>
@@ -210,7 +222,7 @@
               <SubTabGridEdit
                 :ref="'subTab' + subTab.tabIndex" :window-no="windowNo" :tab-index="subTab.tabIndex"
                 :fixed-button-group-height="fixedButtonGroupHeight" :tab="subTab" :parent-model-data="modelData"
-                :parent-tab="tab" :js-url="jsUrl" :is-chinese-english="window.isChineseEnglish" @save-view="backupView"
+                :parent-tab="tab" :js-url="jsUrl" :is-chinese-english="curdWindow.isChineseEnglish" @save-view="backupView"
                 @refresh-parent="refreshParent" @change-root-parent-model-data="changeRootParentModelData"
               />
             </div>
@@ -238,10 +250,10 @@
 
       <div
         v-if="
-          window != null &&
+          curdWindow != null &&
             tab != null &&
             tab.tabDataSource != null &&
-            !window.hideCreateRecordButton
+            !curdWindow.hideCreateRecordButton
         " class="row clearfix"
       >
         <AttachmentPanel
@@ -254,7 +266,7 @@
         <div class="col-md-12">
           <ApproveComment
             ref="approveComment" :workflow-type="'UserDefine'" :parent-widget="'TabFormEdit'"
-            :work-flow="window.workflow" :window-no="windowNo" :process-definition-id="processDefinitionId"
+            :work-flow="curdWindow.workflow" :window-no="windowNo" :process-definition-id="processDefinitionId"
             :show-choice-button="showChoiceButton" :process-instance-id="processInstanceId" :task-info-id="taskInfoId"
             :record-id="modelData.id" :show-tab-dto="tab" :model-data="modelData" :uuid="uuid"
             :workflow-class-name="tab.tabDataSource.className" @save-data="saveTabData"
@@ -372,7 +384,7 @@ export default {
       type: Number,
       default: null,
     },
-    // 窗口类型(create:创建数据,edit:编辑数据,restore:恢复数据)
+    // 窗口类型(create:创建数据,edit:编辑数据,editRestore:恢复数据)
     type: {
       type: String,
       default: '',
@@ -418,7 +430,7 @@ export default {
     this.Language = Language;
     return {
       recordId: '', // 记录Id
-      window: {}, // 窗口数据
+      curdWindow: {}, // 窗口数据
       tab: {}, // 父页签
       tabFormFields: [],
       modelData: {},
@@ -462,13 +474,13 @@ export default {
       var _self = this;
       var allTabReadOnly = true;
       // 如果所有的页签都是只读
-      if (_self.window != undefined && _self.window.tabs != undefined) {
+      if (_self.curdWindow != undefined && _self.curdWindow.tabs != undefined) {
         for (
-          var tabIndex = 0; tabIndex < _self.window.tabs.length; tabIndex++
+          var tabIndex = 0; tabIndex < _self.curdWindow.tabs.length; tabIndex++
         ) {
           if (
-            _self.window.tabs[tabIndex].isReadOnly == undefined ||
-            _self.window.tabs[tabIndex].isReadOnly == false
+            _self.curdWindow.tabs[tabIndex].isReadOnly == undefined ||
+            _self.curdWindow.tabs[tabIndex].isReadOnly == false
           ) {
             allTabReadOnly = false;
             break;
@@ -497,8 +509,8 @@ export default {
     showApproveComment: function () {
       // 判断是否显示审批按钮
       if (
-        this.window != undefined &&
-        this.window.hasWorkflow != undefined &&
+        this.curdWindow != undefined &&
+        this.curdWindow.hasWorkflow != undefined &&
         this.modelData != undefined &&
         this.modelData.data != undefined &&
         this.modelData.data.processInstanceId != undefined &&
@@ -517,8 +529,8 @@ export default {
          */
     showChoiceButton: function () {
       if (
-        this.window != undefined &&
-        this.window.workflow != undefined &&
+        this.curdWindow != undefined &&
+        this.curdWindow.workflow != undefined &&
         this.modelData != undefined &&
         this.modelData.data != undefined &&
         this.modelData.data.processInstanceId != undefined &&
@@ -594,8 +606,8 @@ export default {
       // _self.fixedButtonGroupHeight = fixedButtonGroup.outerHeight();
 
       // 按钮组实现悬浮
-      // $(window).scroll(function () {
-      //   var windowTop = $(window).scrollTop();
+      // $(curdWindow).scroll(function () {
+      //   var windowTop = $(curdWindow).scrollTop();
       //   if (windowTop > buttonInitTop + fixedButtonGroup.outerHeight()) {
       //     fixedButtonGroup.offset({
       //       top: windowTop,
@@ -740,7 +752,7 @@ export default {
         }
       } else if (this.type == 'create') {
         this.initCreateView();
-      } else if (this.type == 'restore') {
+      } else if (this.type == 'editRestore') {
         // 恢复视图
         this.restoreView();
       }
@@ -771,16 +783,16 @@ export default {
       _self.processInstanceId = '';
       WindowServerUtil.getWindowById(
         _self.windowNo,
-        function (window) {
-          WindowClientUtil.parseFilterSchema(window);
-          var tab = WindowClientUtil.getTab(window, _self.tabIndex);
-          WindowClientUtil.parseSubTab(window, tab);
+        function (curdWindow) {
+          WindowClientUtil.parseFilterSchema(curdWindow);
+          var tab = WindowClientUtil.getTab(curdWindow, _self.tabIndex);
+          WindowClientUtil.parseSubTab(curdWindow, tab);
           WindowClientUtil.parseFieldGroup(tab);
-          WindowClientUtil.restoreWindowTabFieldGroupsVisible(window);
+          WindowClientUtil.restoreWindowTabFieldGroupsVisible(curdWindow);
 
           _self.tabFormFields = WindowClientUtil.getDetailField(tab);
-          _self.window = window;
-          _self.jsUrl = window.jsUrl;
+          _self.curdWindow = curdWindow;
+          _self.jsUrl = curdWindow.jsUrl;
           _self.tab = tab;
           TabFormView.restoreTabFormFieldDef(
             _self.windowNo,
@@ -843,8 +855,8 @@ export default {
       } else {
         WindowServerUtil.getWindowById(
           _self.windowNo,
-          function (window) {
-            initWindowAfterLoaded(window);
+          function (curdWindow) {
+            initWindowAfterLoaded(curdWindow);
           },
           function () {
             _self.loading = false;
@@ -852,16 +864,16 @@ export default {
         );
       }
 
-      function initWindowAfterLoaded(window) {
-        WindowClientUtil.parseFilterSchema(window);
-        var tab = WindowClientUtil.getTab(window, _self.tabIndex);
-        WindowClientUtil.parseSubTab(window, tab);
+      function initWindowAfterLoaded(curdWindow) {
+        WindowClientUtil.parseFilterSchema(curdWindow);
+        var tab = WindowClientUtil.getTab(curdWindow, _self.tabIndex);
+        WindowClientUtil.parseSubTab(curdWindow, tab);
         WindowClientUtil.parseFieldGroup(tab);
-        WindowClientUtil.restoreWindowTabFieldGroupsVisible(window);
+        WindowClientUtil.restoreWindowTabFieldGroupsVisible(curdWindow);
 
         _self.tabFormFields = WindowClientUtil.getDetailField(tab);
-        _self.window = window;
-        _self.jsUrl = window.jsUrl;
+        _self.curdWindow = curdWindow;
+        _self.jsUrl = curdWindow.jsUrl;
         _self.tab = tab;
         TabFormView.restoreTabFormFieldDef(
           _self.windowNo,
@@ -869,17 +881,17 @@ export default {
           _self.tabFormFields,
         );
 
-        if (_self.window.workflow != undefined && _self.modelData.id > 0) {
-          _self.processDefinitionId = _self.window.workflow.deploymentId;
+        if (_self.curdWindow.workflow != undefined && _self.modelData.id > 0) {
+          _self.processDefinitionId = _self.curdWindow.workflow.deploymentId;
         }
         if (
-          _self.window.reportViewDto != null &&
-          _self.window.reportViewDto.reportViewItemDtos != null &&
-          _self.window.reportViewDto.reportViewItemDtos.length > 0 &&
+          _self.curdWindow.reportViewDto != null &&
+          _self.curdWindow.reportViewDto.reportViewItemDtos != null &&
+          _self.curdWindow.reportViewDto.reportViewItemDtos.length > 0 &&
           _self.workflowType == 'approve'
         ) {
           var isflag = false;
-          _self.window.reportViewDto.reportViewItemDtos.forEach(function (item) {
+          _self.curdWindow.reportViewDto.reportViewItemDtos.forEach(function (item) {
             if (item.defaultDisplayReport) {
               isflag = true;
             }
@@ -927,16 +939,16 @@ export default {
 
       WindowServerUtil.getWindowById(
         _self.windowNo,
-        function (window) {
-          WindowClientUtil.parseFilterSchema(window);
-          var tab = WindowClientUtil.getTab(window, _self.tabIndex);
-          WindowClientUtil.parseSubTab(window, tab);
+        function (curdWindow) {
+          WindowClientUtil.parseFilterSchema(curdWindow);
+          var tab = WindowClientUtil.getTab(curdWindow, _self.tabIndex);
+          WindowClientUtil.parseSubTab(curdWindow, tab);
           WindowClientUtil.parseFieldGroup(tab);
-          WindowClientUtil.restoreWindowTabFieldGroupsVisible(window);
+          WindowClientUtil.restoreWindowTabFieldGroupsVisible(curdWindow);
 
           _self.tabFormFields = WindowClientUtil.getDetailField(tab);
-          _self.window = window;
-          _self.jsUrl = window.jsUrl;
+          _self.curdWindow = curdWindow;
+          _self.jsUrl = curdWindow.jsUrl;
           _self.tab = tab;
           TabFormView.restoreTabFormFieldDef(
             _self.windowNo,
@@ -944,8 +956,8 @@ export default {
             _self.tabFormFields,
           );
 
-          if (_self.window.workflow != undefined && _self.modelData.id > 0) {
-            _self.processDefinitionId = _self.window.workflow.deploymentId;
+          if (_self.curdWindow.workflow != undefined && _self.modelData.id > 0) {
+            _self.processDefinitionId = _self.curdWindow.workflow.deploymentId;
           }
 
           _self.loading = false;
@@ -1159,15 +1171,15 @@ export default {
       }
 
       if (
-        _self.window.reportViewDto != null &&
-        _self.window.reportViewDto.reportViewItemDtos != null
+        _self.curdWindow.reportViewDto != null &&
+        _self.curdWindow.reportViewDto.reportViewItemDtos != null
       ) {
         _self.processReportResult = undefined;
         for (
-          let index = 0; index < _self.window.reportViewDto.reportViewItemDtos.length; index++
+          let index = 0; index < _self.curdWindow.reportViewDto.reportViewItemDtos.length; index++
         ) {
           let reportViewItemDto =
-            _self.window.reportViewDto.reportViewItemDtos[index];
+            _self.curdWindow.reportViewDto.reportViewItemDtos[index];
           var logic = reportViewItemDto.showLogical;
           if (logic == null || logic == '') {
             reportViewItemDto.invisible = false;
@@ -1466,6 +1478,7 @@ export default {
 
             if (_self.type == 'edit') {
               let data = {
+                type: 'view',
                 windowNo: _self.windowNo,
                 tabIndex: _self.tabIndex,
                 modelDataId: id,
@@ -1476,39 +1489,33 @@ export default {
               };
               _self.$emit('OpenTabFormView', data);
             } else if (_self.type == 'create') {
-              _self.$router.push(
-                '/desktop/window/window-read/view/' +
-                _self.windowNo +
-                '/' +
-                _self.tabIndex +
-                '/' +
-                id +
-                '?currPage=' +
-                _self.currPage +
-                '&currIndex=' +
-                1 +
-                '&totalCount=' +
-                (Number(totalCount) + 1) +
-                '&uuid=' +
-                _self.uuid,
-              );
-            } else if (_self.type == 'restore') {
-              _self.$router.push(
-                '/desktop/window/window-read/view/' +
-                _self.windowNo +
-                '/' +
-                _self.tabIndex +
-                '/' +
-                id +
-                '?currPage=' +
-                1 +
-                '&currIndex=' +
-                1 +
-                '&totalCount=' +
-                1 +
-                '&uuid=' +
-                _self.uuid,
-              );
+
+              let data = {
+                type: 'view',
+                windowNo: _self.windowNo,
+                tabIndex: _self.tabIndex,
+                modelDataId: id,
+                currentPage: _self.currPage,
+                currentIndex: 1,
+                totalRecords: (Number(totalCount) + 1),
+                uuid: _self.uuid,
+              };
+              _self.$emit('OpenTabFormView', data);
+
+
+              
+            } else if (_self.type == 'editRestore') {
+              let data = {
+                type: 'view',
+                windowNo: _self.windowNo,
+                tabIndex: _self.tabIndex,
+                modelDataId: id,
+                currentPage: 1,
+                currentIndex: 1,
+                totalRecords: 1,
+                uuid: _self.uuid,
+              };
+              _self.$emit('OpenTabFormView', data);
             }
           },
           function () {
@@ -1884,45 +1891,33 @@ export default {
       _self.cancelCommand = true;
       _self.modal3 = false;
       if (_self.recordId == null || _self.recordId == '') {
-        _self.$router.push(
-          '/desktop/window/' +
-          _self.windowNo +
-          '?currPage=' +
-          currPage +
-          '&uuid=' +
-          this.uuid,
-        );
+        _self.$emit('update:open', false);
       } else {
         // bug fixed by jack,编辑后直接取消
         // var cacheData = localStorage.getItem(_self.uuid);
         // if (cacheData != undefined && cacheData.length > 0) {
         //     cacheData = JSON.parse(cacheData);
 
-        //     var window = cacheData.window;
+        //     var curdWindow = cacheData.curdWindow;
         //     var tab = cacheData.tab;
 
-        //     if (window == undefined || tab == undefined) {
+        //     if (curdWindow == undefined || tab == undefined) {
         //         _self.$router.push('/desktop/window/' + _self.windowNo + "?currPage=" + currPage + "&uuid=" + this.uuid);
         //         return;
         //     }
         // }
 
-        _self.$router.push(
-          '/desktop/window/window-read/view/' +
-          _self.windowNo +
-          '/' +
-          _self.tabIndex +
-          '/' +
-          _self.recordId +
-          '?currPage=' +
-          currPage +
-          '&currIndex=' +
-          currIndex +
-          '&totalCount=' +
-          totalCount +
-          '&uuid=' +
-          this.uuid,
-        );
+        let data = {
+          type: 'view',
+          windowNo: _self.windowNo,
+          tabIndex: _self.tabIndex,
+          modelDataId: _self.recordId,
+          currentPage: currPage,
+          currentIndex: currIndex,
+          totalRecords: totalCount,
+          uuid: _self.uuid,
+        };
+        _self.$emit('OpenTabFormView', data);
       }
       //删除草稿数据
       _self.deleteDataRecoveryDto();

+ 102 - 98
src/window1/tabFormView/TabFormViewModal.vue

@@ -3,7 +3,7 @@
     <template #title>
       <a-page-header
         style="padding: 0 20px 0 0;"
-        :title="Language.getNameTrl($i18n.locale, window)"
+        :title="Language.getNameTrl($i18n.locale, curdWindow)"
         :sub-title="subTitle()"
       >
         <template #extra>
@@ -13,22 +13,25 @@
             </template>
           </a-button>
           
-          <a-button key="2" title="下一页" @click="next">
+          <a-button key="2">
+            {{ currIndex }}/{{ totalCount }}
+          </a-button>
+
+          <a-button key="3" title="下一页" @click="next">
             <template #icon>
               <CaretRightOutlined />
             </template>
           </a-button>
 
-          <a-button key="3" title="历史记录" @click="auditData">
+          <a-button key="4" title="历史记录" @click="auditData">
             <template #icon>
               <SmallDashOutlined />
             </template>
-            {{ currIndex }}/{{ totalCount }}
           </a-button>
 
           
-          <a-tooltip v-if="!(window.htmlHelpUrl != null && window.htmlHelpUrl != '')" title="帮助">
-            <QuestionCircleOutlined style="font-size: 2rem;" @click="openHtmlHelp(window.htmlHelpUrl)" />
+          <a-tooltip v-if="!(curdWindow.htmlHelpUrl != null && curdWindow.htmlHelpUrl != '')" title="帮助">
+            <QuestionCircleOutlined style="font-size: 2rem;" @click="openHtmlHelp(curdWindow.htmlHelpUrl)" />
           </a-tooltip>
         </template>
       </a-page-header>
@@ -76,6 +79,20 @@
       <a-button v-if="showRedrawButton" @click="abandonWorkflow">
         {{ $t("lang.tabFormView.redraw") }}
       </a-button>
+
+      <TabButton
+        :show-tab-dto="tab" :model-data="modelData" :uuid="uuid" :view-type="'Form'"
+        :tab-buttons="tab.tabFormView ? tab.tabFormView.tabButtons : null"
+        :curd-window-function-access="curdWindowFunctionAccess" @save-view="backupView"
+        @process-execute-finish="refresh" @model-data-changed="modelDataChanged"
+      />
+          
+      <FormFieldDef
+        :tab-form-fields="tabFormFields" :window-no="windowNo" :tab-index="tabIndex"
+        @tab-form-field-property-changed="
+          tabFormFieldPropertyChanged($event)
+        "
+      />
     </a-space>
 
 
@@ -88,25 +105,7 @@
           </div>
         </div>
 
-        <div ref="fixedButtonGroup" class="row m-row fixed-btn-group">
-          <div class="col-md-12">
-            <div class="btn-group">
-              <TabButton
-                :show-tab-dto="tab" :model-data="modelData" :uuid="uuid" :view-type="'Form'"
-                :tab-buttons="tab.tabFormView ? tab.tabFormView.tabButtons : null"
-                :curd-window-function-access="curdWindowFunctionAccess" @save-view="backupView"
-                @process-execute-finish="refresh" @model-data-changed="modelDataChanged"
-              />
-
-              <FormFieldDef
-                :tab-form-fields="tabFormFields" :window-no="windowNo" :tab-index="tabIndex"
-                @tab-form-field-property-changed="
-                  tabFormFieldPropertyChanged($event)
-                "
-              />
-            </div>
-          </div>
-        </div>
+        <div ref="fixedButtonGroup" />
         <img
           v-if="processInstanceId != undefined" style="
           position: absolute;
@@ -144,7 +143,7 @@
                 <TabFormFieldView
                   ref="fieldItem1" :class-name="tab.tabDataSource.className" :field="fieldItem"
                   :model-data="modelData" :multiple-column="tab.tabFormView.multipleColumn" :js-url="jsUrl"
-                  :is-chinese-english="window.isChineseEnglish" @execute-callout="executeCallout(fieldItem)"
+                  :is-chinese-english="curdWindow.isChineseEnglish" @execute-callout="executeCallout(fieldItem)"
                 />
               </template>
             </div>
@@ -196,11 +195,11 @@
                         fieldItem.entityFieldIndex
                     "
                   >
-                    {{ window.isChineseEnglish }}
+                    {{ curdWindow.isChineseEnglish }}
                     <TabFormFieldView
                       ref="fieldItem2" :class-name="tab.tabDataSource.className" :field="fieldItem"
                       :model-data="modelData" :multiple-column="tab.tabFormView.multipleColumn" :js-url="jsUrl"
-                      :is-chinese-english="window.isChineseEnglish" @execute-callout="executeCallout(fieldItem)"
+                      :is-chinese-english="curdWindow.isChineseEnglish" @execute-callout="executeCallout(fieldItem)"
                     />
                   </template>
                 </div>
@@ -223,7 +222,7 @@
                 :ref="'subTab' + subTab.tabIndex" :window-no="windowNo" :tab-index="subTab.tabIndex"
                 :fixed-button-group-height="fixedButtonGroupHeight" :is-show-edit="false" :tab="subTab"
                 :parent-model-data="modelData" :parent-tab="tab" :js-url="jsUrl"
-                :is-chinese-english="window.isChineseEnglish" @save-view="backupView"
+                :is-chinese-english="curdWindow.isChineseEnglish" @save-view="backupView"
                 @process-execute-finish="refresh"
               />
             </div>
@@ -250,18 +249,18 @@
       </div>
 
       <div v-if="showApply" class="row clearfix">
-        <div v-if="window.workflow.workflowType === 'UserDefine'" class="col-md-12">
+        <div v-if="curdWindow.workflow.workflowType === 'UserDefine'" class="col-md-12">
           <WorkflowUserDefine
-            ref="workflowUserDefine" :work-flow="window.workflow"
+            ref="workflowUserDefine" :work-flow="curdWindow.workflow"
             :process-definition-id="processDefinitionId" :model-data="modelData" @apply="apply"
           />
         </div>
-        <div v-else-if="window.workflow.workflowType === 'OTHER'" class="col-md-12">
-          <WorkflowStart :work-flow="window.workflow" :process-definition-id="processDefinitionId" @apply="apply" />
+        <div v-else-if="curdWindow.workflow.workflowType === 'OTHER'" class="col-md-12">
+          <WorkflowStart :work-flow="curdWindow.workflow" :process-definition-id="processDefinitionId" @apply="apply" />
         </div>
         <div v-else class="col-md-12">
           <WorkflowSelectUser
-            ref="workflow" :work-flow="window.workflow" :window-no="windowNo"
+            ref="workflow" :work-flow="curdWindow.workflow" :window-no="windowNo"
             :process-definition-id="processDefinitionId" :model-data="modelData" :record-id="recordId" @apply="apply"
           />
         </div>
@@ -271,7 +270,7 @@
         <div class="col-md-12">
           <ApproveComment
             ref="approveComment" :parent-widget="'TabFormView'" :workflow-type="workflowType"
-            :work-flow="window.workflow" :window-no="windowNo" :process-definition-id="processDefinitionId"
+            :work-flow="curdWindow.workflow" :window-no="windowNo" :process-definition-id="processDefinitionId"
             :show-choice-button="showChoiceButton" :process-instance-id="processInstanceId" :task-info-id="taskInfoId"
             :record-id="modelData.id" :show-tab-dto="tab" :model-data="modelData" :uuid="uuid"
             :workflow-class-name="tab.tabDataSource.className" @save-view="backupView"
@@ -289,10 +288,10 @@
 
       <div
         v-if="
-          window != null &&
+          curdWindow != null &&
             tab != null &&
             tab.tabDataSource != null &&
-            !window.hideCreateRecordButton && showAttachmentPanel == true
+            !curdWindow.hideCreateRecordButton && showAttachmentPanel == true
         "
       >
         <AttachmentPanel
@@ -436,7 +435,7 @@ export default {
       type: Number,
       default: null,
     },
-    // 窗口类型(view:视图数据,restore:恢复数据)
+    // 窗口类型(view:视图数据,viewRestore:恢复数据)
     type: {
       type: String,
       default: '',
@@ -478,7 +477,7 @@ export default {
   data: function () {
     this.Language = Language;
     return {
-      window: {}, // 窗口数据
+      curdWindow: {}, // 窗口数据
       tab: {}, // 父页签
       tabFormFields: [],
       multipeColumnFields: [],
@@ -524,11 +523,11 @@ export default {
      */
     showApply: function () {
       // 判断是否显示审批按钮
-      if (this.window == undefined) {
+      if (this.curdWindow == undefined) {
         return false;
       }
 
-      if (this.window.workflow == undefined) {
+      if (this.curdWindow.workflow == undefined) {
         return false;
       }
 
@@ -558,8 +557,8 @@ export default {
     showApproveComment: function () {
       // 判断是否显示审批按钮
       if (
-        this.window != undefined &&
-        this.window.hasWorkflow != undefined &&
+        this.curdWindow != undefined &&
+        this.curdWindow.hasWorkflow != undefined &&
         this.modelData != undefined &&
         this.modelData.data != undefined &&
         this.modelData.data.processInstanceId != undefined &&
@@ -578,8 +577,8 @@ export default {
      */
     showHistoryApproveComment: function () {
       if (
-        this.window != null &&
-        this.window.workflow != null &&
+        this.curdWindow != null &&
+        this.curdWindow.workflow != null &&
         this.modelData != null
       ) {
         return true;
@@ -593,8 +592,8 @@ export default {
          */
     showChoiceButton: function () {
       if (
-        this.window != undefined &&
-        this.window.workflow != undefined &&
+        this.curdWindow != undefined &&
+        this.curdWindow.workflow != undefined &&
         this.modelData != undefined &&
         this.modelData.data != undefined &&
         this.modelData.data.processInstanceId != undefined &&
@@ -619,9 +618,9 @@ export default {
          * 审批完成的单据,显示审批评论面板
          */
     showEditButton: function () {
-      if (this.window == undefined || this.window.tabs == undefined) {
+      if (this.curdWindow == undefined || this.curdWindow.tabs == undefined) {
         return false;
-      } else if (this.window.readOnly) {
+      } else if (this.curdWindow.readOnly) {
         return false;
       }
 
@@ -630,8 +629,8 @@ export default {
       }
 
       if (
-        this.window != undefined &&
-        this.window.workflow != undefined &&
+        this.curdWindow != undefined &&
+        this.curdWindow.workflow != undefined &&
         this.modelData != undefined &&
         this.modelData.data != undefined &&
         this.modelData.data.documentStatus != undefined &&
@@ -663,9 +662,9 @@ export default {
          * 是否显示新建按钮
          */
     showCreateButton: function () {
-      if (this.window == undefined || this.window.tabs == undefined) {
+      if (this.curdWindow == undefined || this.curdWindow.tabs == undefined) {
         return false;
-      } else if (this.window.readOnly) {
+      } else if (this.curdWindow.readOnly) {
         return false;
       }
 
@@ -691,9 +690,9 @@ export default {
          * 是否显示删除按钮
          */
     showDeleteButton: function () {
-      if (this.window == undefined || this.window.tabs == undefined) {
+      if (this.curdWindow == undefined || this.curdWindow.tabs == undefined) {
         return false;
-      } else if (this.window.readOnly) {
+      } else if (this.curdWindow.readOnly) {
         return false;
       }
 
@@ -719,9 +718,9 @@ export default {
          * 是否显示弃审按钮
          */
     showRedrawButton: function () {
-      if (this.window == undefined || this.window.tabs == undefined) {
+      if (this.curdWindow == undefined || this.curdWindow.tabs == undefined) {
         return false;
-      } else if (this.window.readOnly) {
+      } else if (this.curdWindow.readOnly) {
         return false;
       }
 
@@ -753,7 +752,7 @@ export default {
       }
 
       if (
-        _self.window.workflow != undefined &&
+        _self.curdWindow.workflow != undefined &&
         _self.processInstanceId != undefined &&
         _self.processInstanceId != ''
       ) {
@@ -767,6 +766,11 @@ export default {
   },
 
   watch: {
+    open: function(currentValue, oldValue){
+      if(currentValue === true){
+        this.initView();
+      }
+    }, 
 
     modelData: {
       deep: true,
@@ -793,8 +797,8 @@ export default {
     // _self.$nextTick(function () {
     // var fixedButtonGroup = $(_self.$refs.fixedButtonGroup);
     // _self.computerButtonGroupLeftTop();
-    // $(window).scroll(function (){
-    //     if ($(window).scrollTop() > _self.buttonGroupInitTop) {
+    // $(curdWindow).scroll(function (){
+    //     if ($(curdWindow).scrollTop() > _self.buttonGroupInitTop) {
     //         _self.showSpaceRow = true;
     //         _self.$nextTick(function (){
     //         	fixedButtonGroup.addClass('btn-group-fixed');
@@ -808,7 +812,7 @@ export default {
     //         });
     //     }
 
-    //     if ($(window).scrollTop() <= 10){
+    //     if ($(curdWindow).scrollTop() <= 10){
     // 		_self.computerButtonGroupLeftTop();
     //     }
     // });
@@ -819,8 +823,8 @@ export default {
     // _self.fixedButtonGroupHeight = fixedButtonGroup.outerHeight();
 
     // // 按钮组实现悬浮
-    // $(window).scroll(function () {
-    //   var windowTop = $(window).scrollTop();
+    // $(curdWindow).scroll(function () {
+    //   var windowTop = $(curdWindow).scrollTop();
     //   if (windowTop > buttonInitTop + fixedButtonGroup.outerHeight()) {
     //     fixedButtonGroup.offset({
     //       top: windowTop,
@@ -834,7 +838,7 @@ export default {
     // });
     // });
 
-    // $(window).resize(function () {
+    // $(curdWindow).resize(function () {
     //   _self.$nextTick(function () {
     //     _self.computerButtonGroupLeftTop();
     //   });
@@ -1055,7 +1059,7 @@ export default {
       var obj = {
         className: _self.tab.tabDataSource.className,
         tabIndex: _self.tabIndex,
-        windowNo: _self.window.no,
+        windowNo: _self.curdWindow.no,
         recordId: _self.modelData.id,
       };
       $.ajax({
@@ -1097,7 +1101,7 @@ export default {
 
       if (this.type == 'view') {
         this.initReadView();
-      } else if (this.type == 'restore') {
+      } else if (this.type == 'viewRestore') {
         // 恢复视图
         this.restoreView();
       }
@@ -1144,8 +1148,8 @@ export default {
       } else {
         WindowServerUtil.getWindowById(
           _self.windowNo,
-          function (window) {
-            initWindowAfterLoaded(window);
+          function (curdWindow) {
+            initWindowAfterLoaded(curdWindow);
             _self.uniqueByNoAccessControl();
           },
           function () {
@@ -1154,15 +1158,15 @@ export default {
         );
       }
 
-      function initWindowAfterLoaded(window) {
-        WindowClientUtil.parseFilterSchema(window);
-        var tab = WindowClientUtil.getTab(window, _self.tabIndex);
-        WindowClientUtil.parseSubTab(window, tab);
+      function initWindowAfterLoaded(curdWindow) {
+        WindowClientUtil.parseFilterSchema(curdWindow);
+        var tab = WindowClientUtil.getTab(curdWindow, _self.tabIndex);
+        WindowClientUtil.parseSubTab(curdWindow, tab);
         WindowClientUtil.parseFieldGroup(tab);
-        WindowClientUtil.restoreWindowTabFieldGroupsVisible(window);
+        WindowClientUtil.restoreWindowTabFieldGroupsVisible(curdWindow);
         _self.tabFormFields = WindowClientUtil.getDetailField(tab);
-        _self.window = window;
-        _self.jsUrl = window.jsUrl;
+        _self.curdWindow = curdWindow;
+        _self.jsUrl = curdWindow.jsUrl;
         _self.tab = tab;
         TabFormView.restoreTabFormFieldDef(
           _self.windowNo,
@@ -1171,19 +1175,19 @@ export default {
         );
         _self.loadData();
 
-        if (_self.window.workflow != undefined) {
-          _self.processDefinitionId = _self.window.workflow.deploymentId;
+        if (_self.curdWindow.workflow != undefined) {
+          _self.processDefinitionId = _self.curdWindow.workflow.deploymentId;
         }
         _self.initHeaderAndFooterApiUrl();
         _self.loadHeaderAndFooterContent(_self.recordId);
         _self.loading = false;
         if (
-          _self.window.reportViewDto != null &&
-          _self.window.reportViewDto.reportViewItemDtos != null &&
-          _self.window.reportViewDto.reportViewItemDtos.length > 0
+          _self.curdWindow.reportViewDto != null &&
+          _self.curdWindow.reportViewDto.reportViewItemDtos != null &&
+          _self.curdWindow.reportViewDto.reportViewItemDtos.length > 0
         ) {
           var isflag = false;
-          _self.window.reportViewDto.reportViewItemDtos.forEach(function (item) {
+          _self.curdWindow.reportViewDto.reportViewItemDtos.forEach(function (item) {
             if (item.defaultDisplayReport) {
               isflag = true;
             }
@@ -1208,15 +1212,15 @@ export default {
       _self.loading = true;
       WindowServerUtil.getWindowById(
         _self.windowNo,
-        function (window) {
-          WindowClientUtil.parseFilterSchema(window);
-          var tab = WindowClientUtil.getTab(window, _self.tabIndex);
-          WindowClientUtil.parseSubTab(window, tab);
+        function (curdWindow) {
+          WindowClientUtil.parseFilterSchema(curdWindow);
+          var tab = WindowClientUtil.getTab(curdWindow, _self.tabIndex);
+          WindowClientUtil.parseSubTab(curdWindow, tab);
           WindowClientUtil.parseFieldGroup(tab);
-          WindowClientUtil.restoreWindowTabFieldGroupsVisible(window);
+          WindowClientUtil.restoreWindowTabFieldGroupsVisible(curdWindow);
           _self.tabFormFields = WindowClientUtil.getDetailField(tab);
-          _self.window = window;
-          _self.jsUrl = window.jsUrl;
+          _self.curdWindow = curdWindow;
+          _self.jsUrl = curdWindow.jsUrl;
           _self.tab = tab;
           TabFormView.restoreTabFormFieldDef(
             _self.windowNo,
@@ -1269,8 +1273,8 @@ export default {
             },
           );
 
-          if (_self.window.workflow != undefined) {
-            _self.processDefinitionId = _self.window.workflow.deploymentId;
+          if (_self.curdWindow.workflow != undefined) {
+            _self.processDefinitionId = _self.curdWindow.workflow.deploymentId;
           }
           _self.loading = false;
         },
@@ -1313,7 +1317,7 @@ export default {
         if (successData.errorCode === 0) {
           this.curdWindowFunctionAccess = successData.data;
           if (this.curdWindowFunctionAccess.readOnly != null && this.curdWindowFunctionAccess.readOnly === true) {
-            this.window.readOnly = true;
+            this.curdWindow.readOnly = true;
           }
         }
       }, errorData => {
@@ -1702,7 +1706,7 @@ export default {
       var copyUsers = null;
       var userTaskDtos = null;
       let userSelectDtos = null;
-      if (this.window.workflow.workflowType === 'UserDefine') {
+      if (this.curdWindow.workflow.workflowType === 'UserDefine') {
         try {
           let param = this.$refs.workflowUserDefine.getData();
           userSelectDtos = param.userSelectDtos;
@@ -1711,7 +1715,7 @@ export default {
           Notify.error(_self.$t('lang.tabFormView.describe6'), exception.message, false);
           return;
         }
-      } else if (this.window.workflow.workflowType === 'OTHER') {
+      } else if (this.curdWindow.workflow.workflowType === 'OTHER') {
         userSelectDtos = null;
         copyUsers = null;
       } else {
@@ -1736,7 +1740,7 @@ export default {
         }
       }
 
-      var deploymentId = _self.window.workflow.deploymentId;
+      var deploymentId = _self.curdWindow.workflow.deploymentId;
       var recordId = _self.recordId;
       var windowNo = _self.windowNo;
 
@@ -2074,15 +2078,15 @@ export default {
 
 
       if (
-        _self.window.reportViewDto != null &&
-        _self.window.reportViewDto.reportViewItemDtos != null
+        _self.curdWindow.reportViewDto != null &&
+        _self.curdWindow.reportViewDto.reportViewItemDtos != null
       ) {
         _self.processReportResult = undefined;
         for (
-          let index = 0; index < _self.window.reportViewDto.reportViewItemDtos.length; index++
+          let index = 0; index < _self.curdWindow.reportViewDto.reportViewItemDtos.length; index++
         ) {
           let reportViewItemDto =
-            _self.window.reportViewDto.reportViewItemDtos[index];
+            _self.curdWindow.reportViewDto.reportViewItemDtos[index];
           var logic = reportViewItemDto.showLogical;
           if (logic == null || logic == '') {
             reportViewItemDto.invisible = false;

+ 133 - 98
src/window1/tabGridView/GridBody.vue

@@ -1,70 +1,84 @@
 <template>
-  <tr :style="{'background-color':warningColor}" :class="{'warning':isSelected}">
-    <td>{{ serialNumber }}</td>
-    <td class="text-center">
-      <input
-        v-model="isSelected"
-        autocomplete="off"
-        type="checkbox"
-        @click="clickModelData(modelData)"
-      />
+  <tr v-if="showTabGridTitleFields" height="40px" :style="{ 'background-color': warningColor }" :class="{ 'warning': isSelected }">
+    <td rowspan="2">{{ serialNumber }}</td>
+    <td rowspan="2" class="text-center">
+      <input v-model="isSelected" autocomplete="off" type="checkbox" @click="clickModelData(modelData)" />
     </td>
 
-    <td v-if="isShowEdit == undefined || isShowEdit">
+    <td v-if="isShowEdit == undefined || isShowEdit" rowspan="2">
       <template v-if="showEditButton">
-        <span
-          class="operation-delete"
-          aria-hidden="true"
-          @click="editRecord"
-        >
-          <i
-            class="fa"
-            :class="{'fa-pencil': !modelData.editMode, 'fa-check': modelData.editMode}"
-          />
+        <span class="operation-delete" aria-hidden="true" @click="editRecord">
+          <i class="fa" :class="{ 'fa-pencil': !modelData.editMode, 'fa-check': modelData.editMode }" />
         </span>
-        <span
-          class="operation-edit"
-          aria-hidden="true"
-          @click="deleteRecord"
-        >
+        <span class="operation-edit" aria-hidden="true" @click="deleteRecord">
           <i class="fa fa-remove" />
         </span>
       </template>
     </td>
 
-    <template v-for="(gridFieldItem, index) in tabGridFields" :key="'TabGridField_' + gridFieldItem.fieldName + '_' + index">
-      <td
-      
-        v-if="!modelData.editMode"
-        v-show="gridFieldItem.visible"
-      
-        @click="clickRecord"
-      >
+    <td :colspan="tabGridFields.length + 1" style="text-align: left; padding-left: 2rem;">
+      <a-space align="center">
+        <div v-for="tabGridTitleField in tabGridTitleFields" @click="clickRecord">
+          <a-space align="center">
+            <span style="font-weight: normal;">{{ Language.getDisplayNameTrl($i18n.locale, tabGridTitleField) }}</span>
+            <CellTextItem
+              v-if="!modelData.editMode" :grid-field-item="tabGridTitleField" :model-data="modelData"
+              :class-name="className" style="display: inline-block; font-weight: normal; padding-top: 3px;"
+              @execute-callout="executeCallout(tabGridTitleField)"
+            />
+            <CellItem
+              v-else :ref="'cellItem' + index" :scroll-object="scrollObject" :field-item="tabGridTitleField"
+              :model-data="modelData" :parent-model-data="parentModelData" :class-name="className" :window-no="windowNo"
+              :tab-index="tabIndex" style="display: inline-block;"
+              :class="{ 'table-cell-searchwidget': fieldUtil.isSearchType(tabGridTitleField) }"
+              @value-changed="valueChanged($event, tabGridTitleField)"
+              @execute-callout="executeCallout(tabGridTitleField)"
+            />
+          </a-space>
+        </div>
+      </a-space>
+    </td>
+  </tr>
+  <tr :style="{ 'background-color': warningColor }" :class="{ 'warning': isSelected }" height="40px">
+    <template v-if="!showTabGridTitleFields">
+      <td>{{ serialNumber }}</td>
+      <td class="text-center">
+        <input v-model="isSelected" autocomplete="off" type="checkbox" @click="clickModelData(modelData)" />
+      </td>
+
+      <td v-if="isShowEdit == undefined || isShowEdit">
+        <template v-if="showEditButton">
+          <span class="operation-delete" aria-hidden="true" @click="editRecord">
+            <i class="fa" :class="{ 'fa-pencil': !modelData.editMode, 'fa-check': modelData.editMode }" />
+          </span>
+          <span class="operation-edit" aria-hidden="true" @click="deleteRecord">
+            <i class="fa fa-remove" />
+          </span>
+        </template>
+      </td>
+    </template>
+
+
+    <template
+      v-for="(gridFieldItem, index) in tabGridFields"
+      :key="'TabGridField_' + gridFieldItem.fieldName + '_' + index"
+    >
+      <td v-if="!modelData.editMode" v-show="gridFieldItem.visible" @click="clickRecord">
         <div>
           <CellTextItem
-            :grid-field-item="gridFieldItem"
-            :model-data="modelData"
-            :class-name="className"
+            :grid-field-item="gridFieldItem" :model-data="modelData" :class-name="className"
             @execute-callout="executeCallout(gridFieldItem)"
           />
         </div>
       </td>
       <td
-        v-else
-        v-show="gridFieldItem.visible"
-        :class="{'table-cell-searchwidget' : fieldUtil.isSearchType(gridFieldItem)}"
-        @click="clickRecord"
+        v-else v-show="gridFieldItem.visible"
+        :class="{ 'table-cell-searchwidget': fieldUtil.isSearchType(gridFieldItem) }" @click="clickRecord"
       >
         <CellItem
-          :ref="'cellItem' + index"
-          :scroll-object="scrollObject"
-          :field-item="gridFieldItem"
-          :model-data="modelData"
-          :parent-model-data="parentModelData"
-          :class-name="className"
-          :window-no="windowNo"
-          :tab-index="tabIndex"
-          @value-changed="valueChanged($event, gridFieldItem)"
+          :ref="'cellItem' + index" :scroll-object="scrollObject" :field-item="gridFieldItem"
+          :model-data="modelData" :parent-model-data="parentModelData" :class-name="className" :window-no="windowNo"
+          :tab-index="tabIndex" @value-changed="valueChanged($event, gridFieldItem)"
           @execute-callout="executeCallout(gridFieldItem)"
         />
       </td>
@@ -82,16 +96,17 @@ import Common from '../../common/Common.js';
 
 import Context from '../common/Context.js';
 import JsUtil from '../../common/JsUtil.js';
+import Language from '../../common/Language.js';
 import { Notify, Uuid } from 'pc-component-v3';
 export default {
 
   components: {
-    CellItem, CellTextItem, 
+    CellItem, CellTextItem,
   },
 
-  
+
   props: {
-   
+
     windowNo: {
       type: String,
       default: null,
@@ -100,21 +115,29 @@ export default {
       type: Number,
       default: null,
     },
+    /** 表格标题字段 */
+    tabGridTitleFields: {
+      type: Array,
+      default: function () {
+        return null;
+      },
+    },
+    /** 表格字段 */
     tabGridFields: {
       type: Array,
-      default : function(){
+      default: function () {
         return null;
       },
     },
     modelData: {
       type: Object,
-      default : function(){
+      default: function () {
         return null;
       },
     },
     parentModelData: {
       type: Object,
-      default : function(){
+      default: function () {
         return null;
       },
     },
@@ -124,14 +147,14 @@ export default {
     },
     isShowEdit: {
       type: Boolean,
-      default : false,
+      default: false,
     },
     scrollObject: {
-      type: String,
+      type: Object,
       default: null,
     },
     serialNumber: {
-      type: String,
+      type: Number,
       default: null,
     },
     jsUrl: {
@@ -147,10 +170,11 @@ export default {
       tabGridFields1: this.tabGridFields,
       lastClickTime: 0,
       fieldUtil: FieldUtil,
+      Language: Language,
     };
   },
   computed: {
-    modelDataCopy: function(){
+    modelDataCopy: function () {
       return JSON.parse(JSON.stringify(this.modelData));
     },
 
@@ -165,13 +189,13 @@ export default {
     /**
          * 获取报警颜色
          */
-    warningColor:function(){
+    warningColor: function () {
       if (this.modelData.data['warningColor'] != undefined && this.modelData.data['warningColor'].displayValue.length > 0) {
         return this.modelData.data['warningColor'].displayValue[0];
       } else {
         return 'none';
       }
-           
+
     },
 
     /**
@@ -180,54 +204,65 @@ export default {
     showEditButton: function () {
       if (this.isShowEdit == undefined || this.isShowEdit) {
         if (this.modelData != undefined
-                    && this.modelData.data != undefined
-                    && this.modelData.data['documentStatus'] != undefined
-                    && this.modelData.data['documentStatus'].displayValue != undefined
-                    && (this.modelData.data['documentStatus'].displayValue[0] == 'APPROVED'
-                        || this.modelData.data['documentStatus'].displayValue[0] == 'REJECTED'
-                        || this.modelData.data['documentStatus'].displayValue[0] == 'PROCESSING')) {
+          && this.modelData.data != undefined
+          && this.modelData.data['documentStatus'] != undefined
+          && this.modelData.data['documentStatus'].displayValue != undefined
+          && (this.modelData.data['documentStatus'].displayValue[0] == 'APPROVED'
+            || this.modelData.data['documentStatus'].displayValue[0] == 'REJECTED'
+            || this.modelData.data['documentStatus'].displayValue[0] == 'PROCESSING')) {
           return false;
         }
         return true;
       }
       return false;
     },
+
+    /**
+     * 是否显示标题行
+     */
+    showTabGridTitleFields: function () {
+      if (this.tabGridTitleFields == null || this.tabGridTitleFields.length == 0) {
+        return false;
+      } else {
+        return true;
+      }
+    },
   },
   watch: {
     'parentModelData': {
       deep: true,
       handler(curVal, oldVal) {
         var _self = this;
-        for(let index = 0; index < _self.tabGridFields.length; index ++){
+        for (let index = 0; index < _self.tabGridFields.length; index++) {
           const tabGridField = _self.tabGridFields[index];
           let oldTabGridFieldString = JSON.stringify(tabGridField);
 
           const columnShowLogical = tabGridField.columnShowLogical;
-          if(columnShowLogical != null && columnShowLogical.length > 0){                    
+          if (columnShowLogical != null && columnShowLogical.length > 0) {
             let functionName = tabGridField.fieldName.replace('.', '_') + '_showLogical';
 
-            let executeFunction = function(){
+            let executeFunction = function () {
               let parentCtx = new _self.getContext(_self.parentModelData);
-              try{
+              try {
                 tabGridField.visible = _self[functionName](null, parentCtx.modelData);
-              }catch(e){
+              } catch (e) {
                 console.error('js代码 %s 执行异常 %o', columnShowLogical, e);
                 tabGridField.visible = true;
               }
             };
 
-            if(_self[functionName] == null){
+            if (_self[functionName] == null) {
               // 执行服务端的脚本
               const jsUrl = _self.jsUrl;
-              if(jsUrl == null || jsUrl == undefined){
+              if (jsUrl == null || jsUrl == undefined) {
                 Notify.error('数据字典定义异常', '【' + tabGridField.fieldName + '】列显示逻辑的JS文件不存在,请联系管理员检查数据字典是否JS文件。', false);
                 return;
               }
               let promise = JsUtil.dynamicLoadJsFunction(jsUrl, columnShowLogical);
-              promise.then(dynamicFunction => {          
+              promise.then(dynamicFunction => {
                 let targetFunction = dynamicFunction;
-          
-                if(targetFunction == null){
+
+                if (targetFunction == null) {
                   Notify.error('数据字典定义异常', '【' + tabGridField.fieldName + '】列显示逻辑定义异常,请联系管理员检查数据字典的定义。', false);
                   return;
                 }
@@ -237,11 +272,11 @@ export default {
                 executeFunction();
               }, errorData => {
                 console.error(errorData);
-              });        
-            }else{
+              });
+            } else {
               executeFunction();
             }
-          }else{
+          } else {
             tabGridField.visible = true;
           }
 
@@ -249,8 +284,8 @@ export default {
 
           // bug fixed by jack 2022-01-17
           // 只有当数据发生改变以后,才重新设置数据,解决当子表数据量很打的时候,输入卡顿的问题。
-          if(oldTabGridFieldString != newTabGridFieldString){
-            _self.tabGridFields[index]=tabGridField;
+          if (oldTabGridFieldString != newTabGridFieldString) {
+            _self.tabGridFields[index] = tabGridField;
           }
         }
         console.log(_self.tabGridFields);
@@ -263,8 +298,8 @@ export default {
     /**
          * 获取Context
          */
-    getContext : Context,
-        
+    getContext: Context,
+
     deleteRecord: function () {
       this.$emit('deleteRecord');
     },
@@ -327,7 +362,7 @@ export default {
           },
           success: function (data) {
             if (data != undefined) {
-              item.keyValues=data.keyValues;
+              item.keyValues = data.keyValues;
             }
           },
           error: function (XMLHttpRequest, textStatus, errorThrown) {
@@ -368,32 +403,32 @@ export default {
 
 <style scoped>
 .table-cell-text {
-    overflow: hidden;
-    text-overflow: ellipsis;
-    white-space: nowrap;
-    text-align: center;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  text-align: center;
 }
 
 /** 搜索框,自动提示表格, */
-.table-cell-searchwidget{
-    position: relative;
+.table-cell-searchwidget {
+  position: relative;
 }
 
 .text-center {
-    text-align: center;
+  text-align: center;
 }
 
-.warning{
-    background-color: #fcf8e3 !important;
+.warning {
+  background-color: #fcf8e3 !important;
 }
 
 .operation-delete {
-    margin-left: 10px;
-    margin-right: 5px;
+  margin-left: 10px;
+  margin-right: 5px;
 }
 
 .operation-edit {
-    margin-left: 5px;
-    margin-right: 10px;
+  margin-left: 5px;
+  margin-right: 10px;
 }
-</style>
+</style>

+ 2 - 2
src/window1/tabGridView/GridHeader.vue

@@ -61,8 +61,8 @@
             v-if="tabGridField.mandatory"
             class="require-mark"
           >*</span>
-          <font size="2">{{ Language.getDisplayNameTrl($i18n.locale, tabGridField) }}</font><br />
-          <font v-if="isChineseEnglish && $i18n.locale == 'zh-CN'" size="0.5">{{ tabGridField.displayNameEng }}</font>
+          <span size="2">{{ Language.getDisplayNameTrl($i18n.locale, tabGridField) }}</span><br />
+          <span v-if="isChineseEnglish && $i18n.locale == 'zh-CN'" size="0.5">{{ tabGridField.displayNameEng }}</span>
         </div>
       </th>
     </template>

+ 4 - 0
src/window1/tabGridView/NewTabButton.vue

@@ -179,6 +179,10 @@ const props = defineProps({
     type: String,
     default: null,
   },
+  uuid: {
+    type: String,
+    default: null,
+  },
 });
 
 const emit = defineEmits([

+ 138 - 49
src/window1/tabGridView/TabGridEdit.vue

@@ -63,7 +63,10 @@
                         1 +
                         (pagination.current_page - 1) * pagination.per_page
                       " :is-show-edit="!tab.tabDataSource.readOnly" :tab-grid-fields="tabGridFields"
-                      :model-data="modelData" height="40px" :class-name="tab.tabDataSource.className"
+                      :tab-grid-title-fields="tabGridTitleFields"
+                      :model-data="modelData" 
+                      
+                      :class-name="tab.tabDataSource.className"
                       :scroll-object="scrollObject" :js-url="jsUrl" @delete-record="deleteRecord(modelData, true)"
                       @edit-record="editRecord(modelData, index)" @click-model-data="clickModelData(modelData)"
                       @read-record="readRecord(modelData, index)"
@@ -107,6 +110,14 @@
     </Modal>
     <Loading v-if="loading" />
   </div>
+
+  
+  <component
+    :is="dynamicComponent"
+    v-if="dynamicComponentOpen" 
+    v-model:open="dynamicComponentOpen" 
+    v-bind="dynamicComponentParam"
+  />
 </template>
 
 <script>
@@ -144,7 +155,6 @@ import {
   SaveTwoTone,
   WalletTwoTone,
   EditTwoTone,
-  AppstoreTwoTone,
   CheckSquareTwoTone,
   CloseCircleTwoTone,
   IdcardTwoTone,
@@ -168,7 +178,6 @@ export default {
     DeleteTwoTone,
     WalletTwoTone,
     EditTwoTone,
-    AppstoreTwoTone,
     CheckSquareTwoTone,
     CloseCircleTwoTone,
     IdcardTwoTone,
@@ -189,7 +198,8 @@ export default {
       nowAsset: '', // 所选资产分类名称
       selectCategory: null, //所选资产分类数据
       tab: {},
-      tabGridFields: [],
+      tabGridTitleFields: [], // 表格标题字段
+      tabGridFields: [],      // 表格字段
       modelDatas: [],
       pageSizeOptions: ['20', '50', '100', '200', '1000'],
       pagination: {
@@ -233,7 +243,9 @@ export default {
       modal2: false,
 
       searchText: '', // 简单过滤条件
-
+      dynamicComponent: null,
+      dynamicComponentParam: null,
+      dynamicComponentOpen: true,
     };
   },
   computed: {
@@ -377,6 +389,17 @@ export default {
         console.log(this.modelDatas.length);
       },
     },
+    
+    /**
+     * 如果模态框关闭,那么刷新一下表格的数据
+     * @param currentValue 
+     * @param oldValue 
+     */
+    dynamicComponentOpen: function(currentValue, oldValue){
+      if(currentValue == false){
+        this.queryGridData(false);
+      }
+    },
 
     windowNo: function (curVal, oldVal) {
       var _self = this;
@@ -631,6 +654,7 @@ export default {
       _self.tabIndex = 0;
       _self.tab = window.tabs[0];
       _self.tabGridFields = WindowClientUtil.getGridField(_self.tab);
+      _self.tabGridTitleFields = WindowClientUtil.getGridTitleField(_self.tab);
       GridColumnDefUtil.restoreTabGridFieldDef(
         this.windowNo,
         this.tabIndex,
@@ -842,15 +866,31 @@ export default {
       } else {
         // 如果存在子页签,则进入到新建的界面
         if (_self.window.tabs != undefined && _self.window.tabs.length > 1) {
-          var currPage = _self.pagination.current_page;
-          this.$router.push(
-            'window-edit/create/' +
-            this.windowNo +
-            '/' +
-            this.tabIndex +
-            '?currPage=' +
-            currPage,
-          );
+          let currPage = _self.pagination.current_page;
+          let totalCount = _self.pagination.total;
+
+          _self.dynamicComponentParam = {
+            viewType: 'create',
+            curdWindowNo: this.windowNo,
+            tabIndex: this.tabIndex,
+            currentPage: currPage,
+            currentIndex: 0,
+            totalRecords: totalCount,
+            isRestoreData: true,
+            uuid: _self.uuid,
+          };
+          _self.dynamicComponent = 'CurdWindowModal';
+          _self.dynamicComponentOpen = true;
+
+        
+          // this.$router.push(
+          //   'window-edit/create/' +
+          //   this.windowNo +
+          //   '/' +
+          //   this.tabIndex +
+          //   '?currPage=' +
+          //   currPage,
+          // );
         } else {
           // 如果不存在子页签,则可以直接在当前的界面上新建数据
           // var modelData = WindowClientUtil.newModelData(_self.tab);
@@ -898,8 +938,19 @@ export default {
           false,
         );
       } else {
-        
 
+        _self.dynamicComponentParam = {
+          viewType: 'create',
+          curdWindowNo: _self.windowNo,
+          tabIndex: _self.tabIndex,
+          currentPage: currPage,
+          currentIndex: 0,
+          totalRecords: totalCount,
+          isRestoreData: true,
+          uuid: _self.uuid,
+        };
+        _self.dynamicComponent = 'CurdWindowModal';
+        _self.dynamicComponentOpen = true;
 
         // if (customerWindowUrl != undefined && customerWindowUrl != '') {
         //   this.$router.push(
@@ -964,24 +1015,41 @@ export default {
           var currPage = _self.pagination.current_page;
           var currIndex = (currPage - 1) * Common.pageSize + index + 1;
           var totalCount = _self.pagination.total;
-          this.$router.push(
-            'window-edit/edit/' +
-            this.windowNo +
-            '/' +
-            this.tabIndex +
-            '/' +
-            modelData.id +
-            '?currPage=' +
-            currPage +
-            '&currIndex=' +
-            currIndex +
-            '&totalCount=' +
-            totalCount +
-            '&uuid=' +
-            this.uuid +
-            '&isRestoreData=' +
-            _self.isRestoreData,
-          );
+
+          
+          _self.dynamicComponentParam = {
+            viewType: 'edit',
+            curdWindowNo: _self.windowNo,
+            tabIndex: _self.tabIndex,
+            modelDataId: modelData.id,
+            currentPage: currPage,
+            currentIndex: currIndex,
+            totalRecords: totalCount,
+            isRestoreData: _self.isRestoreData,
+            uuid: _self.uuid,
+          };
+          _self.dynamicComponent = 'CurdWindowModal';
+          _self.dynamicComponentOpen = true;
+
+        
+          // this.$router.push(
+          //   'window-edit/edit/' +
+          //   this.windowNo +
+          //   '/' +
+          //   this.tabIndex +
+          //   '/' +
+          //   modelData.id +
+          //   '?currPage=' +
+          //   currPage +
+          //   '&currIndex=' +
+          //   currIndex +
+          //   '&totalCount=' +
+          //   totalCount +
+          //   '&uuid=' +
+          //   this.uuid +
+          //   '&isRestoreData=' +
+          //   _self.isRestoreData,
+          // );
         } else {
           if (!modelData.editMode) {
             modelData.editMode = true;
@@ -1017,6 +1085,11 @@ export default {
 
       var customerWindowUrl = _self.tab.customerWindowUrl;
       if (customerWindowUrl != undefined && customerWindowUrl != '') {
+
+        
+
+
+
         this.$router.push(
           customerWindowUrl +
           '/view/' +
@@ -1035,22 +1108,38 @@ export default {
           this.uuid,
         );
       } else {
-        this.$router.push(
-          'window-read/view/' +
-          this.windowNo +
-          '/' +
-          this.tabIndex +
-          '/' +
-          modelData.id +
-          '?currPage=' +
-          currPage +
-          '&currIndex=' +
-          currIndex +
-          '&totalCount=' +
-          totalCount +
-          '&uuid=' +
-          this.uuid,
-        );
+
+        _self.dynamicComponentParam = {
+          viewType: 'view',
+          curdWindowNo: this.windowNo,
+          tabIndex: this.tabIndex,
+          modelDataId: modelData.id,
+          currentPage: currPage,
+          currentIndex: currIndex,
+          totalRecords: totalCount,
+          isRestoreData: false,
+          uuid: this.uuid,
+        };
+        _self.dynamicComponent = 'CurdWindowModal';
+        _self.dynamicComponentOpen = true;
+
+
+        // this.$router.push(
+        //   'window-read/view/' +
+        //   this.windowNo +
+        //   '/' +
+        //   this.tabIndex +
+        //   '/' +
+        //   modelData.id +
+        //   '?currPage=' +
+        //   currPage +
+        //   '&currIndex=' +
+        //   currIndex +
+        //   '&totalCount=' +
+        //   totalCount +
+        //   '&uuid=' +
+        //   this.uuid,
+        // );
       }
     },
 

+ 59 - 59
src/window1/tabView/TabButton.vue

@@ -1,6 +1,6 @@
 <template>
-  <div class="btn-group" role="group">
-    <template
+  <div>
+    <a-space
       v-if="
         showTabDto != undefined &&
           showTabDto.tabGridView &&
@@ -8,7 +8,7 @@
       "
     >
       <template v-for="item in tabButtons" :key="item.id">
-        <button
+        <a-button
           v-if="
             item.subMenu != true &&
               (viewType == 'Grid' ||
@@ -16,59 +16,62 @@
                 (viewType == 'Form' && item.editMode != true)) &&
               item.invisible == false
           "
-          type="button"
-          class="btn btn-default"
           @click="execute(item)"
         >
           {{ Language.getNameTrl($i18n.locale, item) }}
-        </button>
+        </a-button>
       </template>
-    </template>
-
-    <a-breadcrumb separator="|" style="color: #1890ff">
-      <a-breadcrumb-item v-if="'EditForm' != viewType" @click="exportConfirm">
-        <span class="glyphicon glyphicon-export" aria-hidden="true" />
-        <span class="tab_button">{{ $t("lang.tabButton.export") }}</span>
-      </a-breadcrumb-item>
-      <a-breadcrumb-item
+    </a-space>
+
+    <a-space>
+      <a-button v-if="'EditForm' != viewType" @click="exportConfirm">
+        <template #icon>
+          <ExportOutlined />
+        </template>
+        {{ $t("lang.tabButton.export") }}
+      </a-button>
+      <a-button
         v-if="mWindow && mWindow.dataTemplateIds != undefined"
         @click="importData"
       >
-        <span class="glyphicon glyphicon-import" aria-hidden="true" />
-        <span class="tab_button">
-          {{ $t("lang.tabButton.import") }}
-        </span>
-      </a-breadcrumb-item>
-      <a-breadcrumb-item
+        <template #icon>
+          <ImportOutlined />
+        </template>
+        {{ $t("lang.tabButton.import") }}
+      </a-button>
+      <a-button
         v-if="'Form' == viewType || 'Grid' == viewType"
         @click="notify"
       >
-        <span class="fa fa-bell" aria-hidden="true" />
-        <span class="tab_button">
-          {{ $t("lang.tabButton.notice") }}
-        </span>
-      </a-breadcrumb-item>
-      <a-breadcrumb-item
+        <template #icon>
+          <MessageOutlined />
+        </template>
+        {{ $t("lang.tabButton.notice") }}
+      </a-button>
+
+      <a-button
         v-if="'EditForm' != viewType && isOpen"
         @click="documentOpen"
       >
-        <span class="glyphicon glyphicon-folder-open" aria-hidden="true" />
-        <span class="tab_button">
-          {{ $t("lang.tabButton.open") }}
-        </span>
-      </a-breadcrumb-item>
-      <a-breadcrumb-item
+        <template #icon>
+          <FileDoneOutlined />
+        </template>
+
+        {{ $t("lang.tabButton.open") }}
+      </a-button>
+      <a-button
         v-if="'EditForm' != viewType && isClose"
         @click="documentClose"
       >
-        <span class="glyphicon glyphicon-folder-close" aria-hidden="true" />
-        <span class="tab_button">
-          {{ $t("lang.tabButton.close") }}
-        </span>
-      </a-breadcrumb-item>
+        <template #icon>
+          <FileExcelOutlined />
+        </template>
+
+        {{ $t("lang.tabButton.close") }}
+      </a-button>
 
       <template v-for="item in tabButtons" :key="item.id">
-        <a-breadcrumb-item
+        <a-button
           v-if="
             showTabDto.tabGridView &&
               item.subMenu == true &&
@@ -77,15 +80,14 @@
                 (viewType == 'Form' && item.editMode != true)) &&
               item.invisible == false
           "
-          style="color: black"
           @click="execute(item)"
         >
           {{ Language.getNameTrl($i18n.locale, item) }}
-        </a-breadcrumb-item>
+        </a-button>
       </template>
-    </a-breadcrumb>
+    </a-space>
 
-    <Modal v-model:show="modal" :full="true">
+    <a-modal v-model:open="modal" width="100%" :title="$t('lang.tabButton.executeResult')">
       <ProcessReportResultPreview
         v-if="
           processReportResult != null &&
@@ -96,33 +98,25 @@
         :pdf-only="false"
         :excel-only="false"
       />
-      <template #header>
-        {{ $t("lang.tabButton.executeResult") }}
-      </template>
-    </Modal>
+    </a-modal>
 
-    <Modal
+    <a-modal
       v-model:show="notificationModal"
-      :show-canel-button="false"
-      :show-ok-button="false"
+      :title="$t('lang.tabButton.sendNotice')"
     >
-      <template #header>
-        {{ $t("lang.tabButton.sendNotice") }}
-      </template>
       <NotificationPanel ref="notificationPanel" />
+
       <template #footer>
-        <button type="button" class="btn btn-default" @click="sendNotification">
+        <a-button @click="sendNotification">
           {{ $t("lang.tabButton.send") }}
-        </button>
-        <button
-          type="button"
-          class="btn btn-default"
+        </a-button>
+        <a-button
           @click="cancelNotification"
         >
           {{ $t("lang.tabButton.cancel") }}
-        </button>
+        </a-button>
       </template>
-    </Modal>
+    </a-modal>
 
     <Loading v-if="loading" />
   </div>
@@ -142,10 +136,16 @@ import dayjs from 'dayjs';
 
 import NotificationPanel from '../../customer/NotificationPanel.vue';
 import { IFrameUtil } from 'pc-component-v3';
+import { ExportOutlined, ImportOutlined, MessageOutlined, FileDoneOutlined, FileExcelOutlined  } from '@ant-design/icons-vue';
 
 export default {
   components: {
     NotificationPanel,
+    ExportOutlined, 
+    ImportOutlined, 
+    MessageOutlined, 
+    FileDoneOutlined, 
+    FileExcelOutlined,
   },
 
   props: {

+ 10 - 6
src/workflow/WorkflowUserDefine.vue

@@ -1,9 +1,13 @@
 <template>
-  <div class="panel panel-default">
-    <div class="panel-heading">
-      {{ $t("lang.workflowUserDefine.approve") }}
+  <div>
+    <div class="page-header">
+      <h4 style="display: inline-block">
+        {{ $t("lang.workflowUserDefine.approve") }}
+      </h4>
     </div>
-    <div class="panel-body">
+
+
+    <div>
       <div>
         <div
           v-for="userSelectDefine in userSelectDefineList"
@@ -34,9 +38,9 @@
         </div>
 
         <div style="margin-top: 10px">
-          <button type="button" class="btn btn-primary" @click="apply">
+          <a-button type="primary" @click="apply">
             {{ $t("lang.workflowUserDefine.submit") }}
-          </button>
+          </a-button>
         </div>
       </div>
     </div>

+ 34 - 8
test/window1/TabFormEditModalTest.vue

@@ -7,6 +7,12 @@
     :type="tabEditViewType"
     :model-data-id="tabEditViewRecordId"
     width="100%" 
+    :current-page="tabEditViewCurrentPage"
+    :current-index="tabEditViewCurrentIndex"
+    :total-records="tabEditViewTotalRecords"
+    :task-info-id="tabEditViewTaskInfoId"
+    :workflow-type="tabEditViewWorkflowType"
+    :mask-closable="false"
     @open-tab-form-view="openTabFormViewModal"
   />
   <TabFormViewModal
@@ -16,6 +22,12 @@
     :type="tabFormViewType"
     :model-data-id="tabFormViewRecordId"  
     width="100%"
+    :current-page="tabFormViewCurrentPage"
+    :current-index="tabFormViewCurrentIndex"
+    :total-records="tabFormViewTotalRecords"
+    :task-info-id="tabFormViewTaskInfoId"
+    :workflow-type="tabFormViewWorkflowType"
+    :mask-closable="false"
     @open-tab-edit-view="openTabEditView"
   />
 </template>
@@ -29,20 +41,24 @@ import TabFormViewModal from '../../src/window1/tabFormView/TabFormViewModal.vue
 const curdWindowNo = ref('20240910_193059');
 const tabIndex = ref(0);
 
-
-
-const openTabEditModal = ref(false);
-
-const tabEditViewType = ref('');
+const openTabEditModal = ref(true);
+const tabEditViewType = ref('create');
 const tabEditViewRecordId = ref(null);
 const tabEditViewCurrentPage = ref(null);
 const tabEditViewCurrentIndex = ref(null);
 const tabEditViewTotalRecords = ref(null);
 const tabEditViewIsRestoreData = ref(false);
+const tabEditViewTaskInfoId = ref(null);
+const tabEditViewWorkflowType = ref(null);
 
-const openTabViewModal = ref(true);
-const tabFormViewRecordId = ref(476306266914880);
+const openTabViewModal = ref(false);
 const tabFormViewType = ref('view');
+const tabFormViewRecordId = ref(null);
+const tabFormViewCurrentPage = ref(null);
+const tabFormViewCurrentIndex = ref(null);
+const tabFormViewTotalRecords = ref(null);
+const tabFormViewTaskInfoId = ref(null);
+const tabFormViewWorkflowType = ref(null);
 
 /**
  * 打开页签视图模式
@@ -56,8 +72,18 @@ const tabFormViewType = ref('view');
  *          属性6: totalRecords: 记录的总数量,
  *          属性7: uuid: 窗口唯一Id,
  */
-const openTabFormViewModal = function(param){
+const openTabFormViewModal = function(param){  
+
+  console.log('openTabFormViewModal', param);
+
+  tabFormViewType.value = param.type;
+  curdWindowNo.value = param.windowNo;
+  tabIndex.value = param.tabIndex;
   tabFormViewRecordId.value = param.modelDataId;
+  tabFormViewCurrentPage.value = param.currentPage;
+  tabFormViewCurrentIndex.value = param.currentIndex;
+  tabFormViewTotalRecords.value = param.totalRecords;
+
   openTabEditModal.value = false;
   openTabViewModal.value = true;
 };