Explorar o código

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

YangZhiJie hai 1 ano
pai
achega
c939d07ac9

+ 1 - 1
src/client/OrganizationEditPanel.vue

@@ -18,7 +18,7 @@
       option-filter-prop="label"
       style="width: 50%; margin-left: 16px"
       placeholder="请选择公司"
-      :options="companies.map((item) => ({ value: item.id, label: item.name }))"
+      :options="companies.map((item) => ({ value: item.roomId, label: item.roomName }))"
       @change="getClientId"
     />
     <a-button type="primary" style="margin-left: 8px" @click="editClient">

+ 12 - 0
src/resource/dictionary/FieldUtil.js

@@ -423,5 +423,17 @@ export default {
     }
     return s.join(dec);
   },
+  /**
+   * 是否操作列
+   */
+  isGridButtonEditor:function(field){
+    if (field.displayType == undefined) {
+      return false;
+    }
+    if (field.displayType == 'GridButtonEditor') {
+      return true;
+    }
+    return false;
+  },
 
 };

+ 450 - 112
src/window1/tabGridView/CellTextItem.vue

@@ -1,43 +1,36 @@
 <template>
   <div class="table-cell-text">
-    <div
-      v-if="!fieldUtil.isManyToManySetType(gridFieldItem) 
-        && !fieldUtil.isImageType(gridFieldItem) 
-        && !fieldUtil.isImageListType(gridFieldItem) 
-        && !fieldUtil.isVideoType(gridFieldItem) 
-        && !fieldUtil.isFileType(gridFieldItem) 
-        && !fieldUtil.isEnumMultiType(gridFieldItem)
-        && !fieldUtil.isEnumListType(gridFieldItem)
-        && !fieldUtil.isTextAreaType(gridFieldItem)
-        && !fieldUtil.isRichTextAreaEditor(gridFieldItem)
-        && !fieldUtil.isCustomerRender(gridFieldItem)"
-    >
+    <div v-if="!fieldUtil.isManyToManySetType(gridFieldItem)
+      && !fieldUtil.isImageType(gridFieldItem)
+      && !fieldUtil.isImageListType(gridFieldItem)
+      && !fieldUtil.isVideoType(gridFieldItem)
+      && !fieldUtil.isFileType(gridFieldItem)
+      && !fieldUtil.isEnumMultiType(gridFieldItem)
+      && !fieldUtil.isEnumListType(gridFieldItem)
+      && !fieldUtil.isTextAreaType(gridFieldItem)
+      && !fieldUtil.isRichTextAreaEditor(gridFieldItem)
+      && !fieldUtil.isCustomerRender(gridFieldItem)">
       {{ displayValue(modelData) }}
     </div>
 
-    <p
-      v-else-if="fieldUtil.isRichTextAreaEditor(gridFieldItem)"
-    >
+    <p v-else-if="fieldUtil.isRichTextAreaEditor(gridFieldItem)">
       {{ displayValue(modelData) }}
     </p>
 
-    <div
-      v-else-if="fieldUtil.isTextAreaType(gridFieldItem)"
-      class="table-cell-text-line"
-    >
+    <div v-else-if="fieldUtil.isTextAreaType(gridFieldItem)" class="table-cell-text-line">
       {{ displayValue(modelData) }}
     </div>
 
     <div v-else-if="fieldUtil.isEnumListType(gridFieldItem)">
-      {{ getEnmuValue() === "编辑中" ? $t("lang.TabFormFieldView.editing"):
-        getEnmuValue() === "审批中" ? $t("lang.TabFormFieldView.pendingApproval"):
-        getEnmuValue() === "审批通过" ? $t("lang.TabFormFieldView.approved"):
-        getEnmuValue() === "审批不通过" ? $t("lang.TabFormFieldView.rejected"):
-        getEnmuValue() === "单据已撤回" ? $t("lang.TabFormFieldView.withdraw"):
-        getEnmuValue() === "转移" ? $t("lang.TabFormFieldView.transfer"):
-        getEnmuValue() === "报废" ? $t("lang.TabFormFieldView.disposal"):
-        getEnmuValue() === "全盘" ? $t("lang.TabFormFieldView.overall"):
-        getEnmuValue() === "抽盘" ? $t("lang.TabFormFieldView.randomInventory"):getEnmuValue()
+      {{ getEnmuValue() === "编辑中" ? $t("lang.TabFormFieldView.editing") :
+        getEnmuValue() === "审批中" ? $t("lang.TabFormFieldView.pendingApproval") :
+          getEnmuValue() === "审批通过" ? $t("lang.TabFormFieldView.approved") :
+            getEnmuValue() === "审批不通过" ? $t("lang.TabFormFieldView.rejected") :
+              getEnmuValue() === "单据已撤回" ? $t("lang.TabFormFieldView.withdraw") :
+                getEnmuValue() === "转移" ? $t("lang.TabFormFieldView.transfer") :
+                  getEnmuValue() === "报废" ? $t("lang.TabFormFieldView.disposal") :
+                    getEnmuValue() === "全盘" ? $t("lang.TabFormFieldView.overall") :
+                      getEnmuValue() === "抽盘" ? $t("lang.TabFormFieldView.randomInventory") : getEnmuValue()
       }}
     </div>
 
@@ -46,70 +39,89 @@
     </div>
 
     <div v-else-if="fieldUtil.isManyToManySetType(gridFieldItem)">
-      <span
-        v-for="item, index in getManyToManyValues()"
-        :key="index"
-        class="selected-tag"
-      >
+      <span v-for="item, index in getManyToManyValues()" :key="index" class="selected-tag">
         {{ item }}
       </span>
     </div>
 
-    <AuthImage
-      v-else-if="fieldUtil.isImageType(gridFieldItem)"
-      :auth-src="imageUrl"
-      class="cell-image"
-    />
+    <AuthImage v-else-if="fieldUtil.isImageType(gridFieldItem)" :auth-src="imageUrl" class="cell-image" />
 
     <span v-else-if="fieldUtil.isImageListType(gridFieldItem)">
-      <AuthImage
-        v-for="singleImageName in imageUrls"
-        :key="singleImageName"
-        :auth-src="singleImageName"
-        class="cell-image-list"
-      />
+      <AuthImage v-for="singleImageName in imageUrls" :key="singleImageName" :auth-src="singleImageName"
+        class="cell-image-list" />
     </span>
 
-    <VideoListCell
-      v-else-if="fieldUtil.isVideoType(gridFieldItem)"
-      :field="gridFieldItem"
-      :field-value="fieldValue"
-      :class-name="className"
-      :readonly="true"
-    />
-
-    <ButtonCell
-      v-else-if="fieldUtil.isButtonType(gridFieldItem)"
-      :field="gridFieldItem"
-      :field-value="fieldValue"
-      :readonly="readOnly"
-      @execute-callout="executeCallout"
-    />
-
-    <div
-      v-else-if="fieldUtil.isFileType(gridFieldItem)"
-      style="padding: 0px 10px"
-    >
-      <FileListWidget
-        :field="gridFieldItem"
-        :field-value="fieldValue"
-        :class-name="className"
-        :readonly="true"
-      />
+    <VideoListCell v-else-if="fieldUtil.isVideoType(gridFieldItem)" :field="gridFieldItem" :field-value="fieldValue"
+      :class-name="className" :readonly="true" />
+
+    <ButtonCell v-else-if="fieldUtil.isButtonType(gridFieldItem)" :field="gridFieldItem" :field-value="fieldValue"
+      :readonly="readOnly" @execute-callout="executeCallout" />
+
+    <div v-else-if="fieldUtil.isFileType(gridFieldItem)" style="padding: 0px 10px">
+      <FileListWidget :field="gridFieldItem" :field-value="fieldValue" :class-name="className" :readonly="true" />
     </div>
 
-    
-    <component 
-      :is="customerComponentName"
-      v-else-if="fieldUtil.isCustomerRender(gridFieldItem)"
-      :field="gridFieldItem"
-      :field-value="fieldValue"
-      :class-name="className"
-    />
+
+    <component :is="customerComponentName" v-else-if="fieldUtil.isCustomerRender(gridFieldItem)" :field="gridFieldItem"
+      :field-value="fieldValue" :class-name="className" />
+    <div v-if="fieldUtil.isGridButtonEditor(gridFieldItem)">
+      <template v-for="(tabGridButtonItem, index) in gridFieldItem.tabGridButtonDtos" :key="tabGridButtonItem.name">
+        <template v-if="visible[index]">
+          <a-button
+            v-if="tabGridButtonItem.action === 'CREATE' || tabGridButtonItem.action === 'SAVE' || tabGridButtonItem.action === 'RUN' || tabGridButtonItem.action === 'EXPORT' || tabGridButtonItem.action === 'NOTICE' || tabGridButtonItem.action === 'REFRESH'"
+            type="link" @click="buttonClick">{{ tabGridButtonItem.name }}</a-button>
+          <a-button v-if="tabGridButtonItem.action === 'DELETE'" type="link" danger @click="deleteRecord">{{
+            tabGridButtonItem.name }}</a-button>
+          <a-button v-if="tabGridButtonItem.action === 'EDIT'" type="link" @click="editRecord">{{ tabGridButtonItem.name
+            }}</a-button>
+          <a-button v-if="tabGridButtonItem.action === 'SEE'" type="link" @click="readRecord">{{ tabGridButtonItem.name
+            }}</a-button>
+          <a-button v-if="tabGridButtonItem.action === 'RUN_PROCESS_REPORT'" type="link"
+            @click="execute(tabGridButtonItem)">{{ tabGridButtonItem.name }}</a-button>
+          <a-button v-if="tabGridButtonItem.action === 'OPEN_CUSTOMER_WINDOW'" type="link"
+            @click="execute(tabGridButtonItem)">{{ tabGridButtonItem.name }}</a-button>
+          <a-button v-if="tabGridButtonItem.action === 'OPEN_HTML_WINDOW'" type="link"
+            @click="execute(tabGridButtonItem)">{{ tabGridButtonItem.name }}</a-button>
+          <a-button v-if="tabGridButtonItem.action === 'OPEN_REMOTE_COMPONENT_MODULE_IN_MODAL'" type="link"
+            @click="openRemoteComponentModule(tabGridButtonItem)">{{ tabGridButtonItem.name }}</a-button>
+        </template>
+      </template>
+    </div>
   </div>
+  <Modal v-model:show="modal" :full="true">
+    <ProcessReportResultPreview v-if="
+      processReportResult != null &&
+      (processReportResult.reportResults != null ||
+        processReportResult.processResult != null)
+    " :process-report-result="processReportResult" :pdf-only="false" :excel-only="false" />
+    <template #header>
+      {{ $t("lang.tabButton.executeResult") }}
+    </template>
+  </Modal>
+  <Modal v-model:show="titleModal" :show-canel-button="false" :show-ok-button="false">
+    <template #header>
+      {{ tabButtonModel.tipsTitle }}
+    </template>
+    {{ tabButtonModel.tipsContent }}
+    <template #footer>
+      <button type="button" class="btn btn-default" @click="titleModalClose">
+        {{ $t("lang.tabButton.cancel") }}
+      </button>
+      <button type="primary" class="btn btn-default" @click="executeProcess">
+        确认
+      </button>
+    </template>
+  </Modal>
+  <component :is="modal1Component" v-model:open="modal1Open" :model-data="modelData" @refresh-data="refreshDatas" />
 </template>
 
 <script>
+import {
+  ref,
+  defineAsyncComponent,
+} from 'vue';
+import { Notify, Uuid, CssUtil } from 'pc-component-v3';
+import { Spin as ASpin, Empty as AEmpty } from 'ant-design-vue';
 import FieldUtil from '../../resource/dictionary/FieldUtil.js';
 import Common from '../../common/Common.js';
 
@@ -120,6 +132,12 @@ import AuthImage from '../../widget/AuthImage.vue';
 import { Spin as ASpin, Empty as AEmpty } from 'ant-design-vue';
 import { CssUtil } from 'pc-component-v3';
 import { defineAsyncComponent } from 'vue';
+import CustomerWindowResource from '../../api/dic/CustomerWindowResource.js';
+import HtmlWindowResource from '../../api/dic/HtmlWindowResource.js';
+import ProcessReportResource from '../../api/dic/ProcessReportResource.js';
+import JsUtil from '../../common/JsUtil.js';
+import Context from '../common/Context.js';
+
 
 export default {
 
@@ -127,27 +145,46 @@ export default {
     VideoListCell, FileListWidget, ButtonCell, AuthImage,
   },
 
-  
+
   props: {
     gridFieldItem: {
       type: Object,
-      default : function(){
+      default: function () {
         return null;
       },
     },
     modelData: {
       type: Object,
-      default : function(){
-        return null;
+      default: function () {
+        return {};
       },
     },
     className: {
       type: String,
       default: null,
     },
-    
+    simpleFilterParams: {
+      type: String,
+      default: null,
+    },
+    complexFilterParams: {
+      type: Array,
+      default: () => {
+        return [];
+      },
+    },
+    modelDatas: {
+      type: Array,
+      default: () => {
+        return [];
+      },
+    },
+    jsUrl: {
+      type: String,
+      default: null,
+    },
   },
-  emits: ['executeCallout'], 
+  emits: ['executeCallout', 'deleteRecord', 'refreshDatas', 'editRecord', 'readRecord'],
 
 
   data: function () {
@@ -155,6 +192,14 @@ export default {
     return {
       fieldUtil: FieldUtil,
       customerComponentName: null,
+      modal1Open: false,
+      modal1Component: null,
+      processReportResult: {},
+      modal: false,
+      titleModal: false,
+      tabButtonModel: {},
+      tabGridButtonDtos: [],
+      visible: [],
     };
   },
 
@@ -223,8 +268,104 @@ export default {
       return this.gridFieldItem.readOnly;
     },
   },
+  watch: {
+    modelData: {
+      deep: true,
+      immediate: true,
+      handler(curVal, oldVal) {
+        console.log('cellTextItem监听');
+        // this.cellTextItemTabGridButtonShowLogical();
+      },
+    },
+
+    'gridFieldItem.tabGridButtonDtos': {
 
+      immediate: true,
+      handler(curVal, oldVal) {
+        const _self = this;
+        this.visible.splice(0, this.visible.length);
+        if (curVal != null) {
+          curVal.forEach(item => {
+            _self.visible.push(false);
+          });
+        }
+      },
+    },
+  },
+  mounted: function () {
+    this.cellTextItemTabGridButtonShowLogical();
+  },
   methods: {
+    /**
+         * 获取Context
+         */
+    getContext: Context,
+
+    /**
+     * 操作列设置显示逻辑
+     */
+    cellTextItemTabGridButtonShowLogical: function () {
+      var _self = this;
+      console.log('cellTextItemTabGridButtonShowLogical');
+      if (_self.gridFieldItem.tabGridButtonDtos != null &&
+        _self.gridFieldItem.tabGridButtonDtos != undefined && _self.gridFieldItem.tabGridButtonDtos.length > 0
+      ) {
+        for (let index = 0; index < _self.gridFieldItem.tabGridButtonDtos.length; index++) {
+          const tabGridButtonItem = _self.gridFieldItem.tabGridButtonDtos[index];
+          let oldTabGridButtonString = JSON.stringify(tabGridButtonItem);
+          const showLogical = tabGridButtonItem.showLogical;
+          if (showLogical != null && showLogical.length > 0) {
+            let functionName = tabGridButtonItem.showLogical.replace('.', '_') + '_showLogical';
+
+            let executeFunction = function () {
+              let ctx = new _self.getContext(_self.modelData);
+              try {
+                _self.visible[index] = _self[functionName](ctx);
+              } catch (e) {
+                console.error('js代码 %s 执行异常 %o', showLogical, e);
+                _self.visible[index] = true;
+              }
+            };
+
+            if (_self[functionName] == null) {
+              // 执行服务端的脚本
+              const jsUrl = _self.jsUrl;
+              if (jsUrl == null || jsUrl == undefined) {
+                Notify.error('数据字典定义异常', '【' + tabGridButtonItem.name + '】列显示逻辑的JS文件不存在,请联系管理员检查数据字典是否JS文件。', false);
+                return;
+              }
+              let promise = JsUtil.dynamicLoadJsFunction(jsUrl, showLogical);
+              promise.then(dynamicFunction => {
+                let targetFunction = dynamicFunction;
+
+                if (targetFunction == null) {
+                  Notify.error('数据字典定义异常', '【' + tabGridButtonItem.name + '】列显示逻辑定义异常,请联系管理员检查数据字典的定义。', false);
+                  return;
+                }
+
+                _self[functionName] = targetFunction;
+
+                executeFunction();
+              }, errorData => {
+                console.error(errorData);
+              });
+            } else {
+              executeFunction();
+            }
+          } else {
+            _self.visible[index] = true;
+          }
+
+          let newTabGridButtonString = JSON.stringify(tabGridButtonItem);
+
+          // bug fixed by jack 2022-01-17
+          // 只有当数据发生改变以后,才重新设置数据,解决当子表数据量很打的时候,输入卡顿的问题。
+          if (oldTabGridButtonString != newTabGridButtonString) {
+            _self.gridFieldItem.tabGridButtonDtos[index] = tabGridButtonItem;
+          }
+        }
+      }
+    },
 
     /**
          * 执行Callout
@@ -322,16 +463,32 @@ export default {
       }
     },
 
-    
+
+    buttonClick: function () {
+      Notify.error('提示', '暂不支持该组件', false);
+    },
+    deleteRecord: function () {
+      this.$emit('deleteRecord');
+    },
+    refreshDatas: function () {
+      this.$emit('refreshDatas');
+    },
+    // 改变表格行元素的编辑状态
+    editRecord: function () {
+      this.$emit('editRecord');
+    },
+    readRecord: function () {
+      this.$emit('readRecord');
+    },
     /**
-     * 远程加载ES VUE组件模块。
+     * 远程加载ES VUE组件模块,并在模态框中打开
      * @param jsUrl js路径
      * @param cssUrl css路径
      */
-    renderRemoteComponentModule: async function () {
-      const _self = this;
-      let jsUrl = this.gridFieldItem.remoteComponentModuleJsUrl;
-      let cssUrl = this.gridFieldItem.remoteComponentModuleCssUrl;
+    openRemoteComponentModule: function (tabButton) {
+      var _self = this;
+      let jsUrl = tabButton.remoteComponentModuleJsUrl;
+      let cssUrl = tabButton.remoteComponentModuleCssUrl;
 
       // 显示模态框
       // 异步的加载js组件
@@ -367,47 +524,228 @@ export default {
         console.log(_self.customerComponentName);
       }
     },
-    
+
+    /**
+     * 远程加载ES VUE组件模块。
+     * @param jsUrl js路径
+     * @param cssUrl css路径
+     */
+    renderRemoteComponentModule: async function () {
+      const _self = this;
+      let jsUrl = this.gridFieldItem.remoteComponentModuleJsUrl;
+      let cssUrl = this.gridFieldItem.remoteComponentModuleCssUrl;
+      _self.modal1Component = testAsyncRemoteComponent;
+      _self.modal1Open = true;
+      console.log(_self.modal1Component);
+    }
   },
-};
+  //跳转或执行流程
+  execute: function (tabButton) {
+    var _self = this;
+    _self.tabButtonModel = tabButton;
+    if (tabButton.customerWindowNo != undefined && tabButton.customerWindowNo != '') {
+      CustomerWindowResource.uniqueByNo(tabButton.customerWindowNo).then(
+        successData => {
+          tabButton.customerWindowRouteUrl = successData.routeUrl;
+          if (tabButton.customerWindowNo == '20221101_151823') {
+            localStorage.setItem('AssetInstance_ComplexFilterParams', JSON.stringify(_self.complexFilterParams));
+            localStorage.setItem('AssetInstance_SimpleFilterParams', _self.simpleFilterParams);
+          }
+          //跳转到tabButton.routeUrl
+          _self.switchFormRoute(tabButton);
+        },
+        errorData => {
+          Common.processException(errorData);
+        },
+      );
+    } else if (
+      tabButton.processReportNo != undefined &&
+      tabButton.processReportNo != ''
+    ) {
+      // 判断流程报表是否有参数
+      // 如果有参数则直接跳转到流程和报表的界面。
+      if (tabButton.routerRedirect == undefined || tabButton.routerRedirect == false) {
+        if (tabButton.tipsTitle == undefined || tabButton.tipsTitle.length == 0) {
+          _self.executeProcess();
+        } else {
+          _self.titleModal = true;
+        }
+      } else {
+        this.$router.push({
+          path: '/desktop/process-report/' + tabButton.processReportNo,
+        });
+      }
+    } else if (tabButton.htmlWindowNo != undefined) {
+      HtmlWindowResource.uniqueByNo(tabButton.htmlWindowNo).then(
+        htmlWindowDto => {
+          if (htmlWindowDto != undefined) {
+            var htmlWindowUrl = htmlWindowDto.htmlFileName;
+            var autoCloseInterval = htmlWindowDto.autoCloseInterval;
+            var regExp = new RegExp('[{].*?[}]', 'g');
+            var result = htmlWindowUrl.match(regExp);
+            if (htmlWindowUrl != undefined && htmlWindowUrl != '') {
+              for (var index = 0, len = result.length; index < len; index++) {
+                var tempResult = result[index];
+                console.log('{' + tempResult + '}匹配');
+                if (tempResult == '{URL}') {
+                  htmlWindowUrl = htmlWindowUrl.replace(
+                    '{URL}',
+                    Common.getHostPageBaseURL(),
+                  );
+                } else if (tempResult == '{RecordIds}') {
+                  var recordId = _self.modelData.id;
+                  htmlWindowUrl = htmlWindowUrl.replace('{RecordIds}', recordId);
+                } else if (tempResult == '{Token}') {
+                  htmlWindowUrl = htmlWindowUrl.replace('{Token}', Common.getToken());
+                } else {
+                  if (_self.selectedModelDatas.length == 0) {
+                    Notify.error(_self.$t('lang.Notify.error'), _self.$t('lang.tabButton.describe3'), true);
+                    return;
+                  } else if (_self.selectedModelDatas.length > 1) {
+                    Notify.error(_self.$t('lang.Notify.error'), _self.$t('lang.tabButton.describe2'), true);
+                    return;
+                  }
+                  var tempResult1 = tempResult.replace('{', '').replace('}', '');
+                  htmlWindowUrl = htmlWindowUrl.replace(
+                    tempResult,
+                    _self.getFirstSelectModelDataFieldValue(tempResult1),
+                  );
+                }
+              }
+
+              var openWindow = window.open(htmlWindowUrl);
+
+              // 自动关闭
+              if (autoCloseInterval != undefined) {
+                setTimeout(function () {
+                  openWindow.close();
+                  openWindow = undefined;
+                }, autoCloseInterval * 1000);
+              }
+            }
+          }
+        },
+        errorData => {
+          Common.processException(errorData);
+        },
+      );
+    }
+  },
+  // 切换到Form表单的路由
+  switchFormRoute: function (tabButton) {
+    const _self = this;
+    var routeDate = {
+      path: tabButton.customerWindowRouteUrl,
+      params: {
+        modelData: this.modelData,
+      },
+    };
+    // 请勿修改,会影响生单的功能
+    var uuid = _self.uuid;
+    if (uuid != undefined) {
+      routeDate.path = routeDate.path + '/' + uuid;
+    }
+
+    const frameUrl = Common.getRedirectUrl(
+      '#' + routeDate.path,
+    );
+
+    // 供子页面iframe调用,修改modelData,(举例:生单界面修改参数)。
+    // window.modelDataChanged = this.modelDataChanged;
+
+    // window.getModelData = this.getModelData;
+    let modelData = JSON.stringify(this.modelData);
+    console.log(modelData);
+    localStorage.setItem(_self.uuid + '#GenerateDocumentTool', modelData);
+
+    var iWidth = 1280;//弹出窗口的宽度;
+    var iHeight = 720; //弹出窗口的高度;
+    var iTop = (window.screen.availHeight - 30 - iHeight) / 2;//获得窗口的垂直位置;
+    var iLeft = (window.screen.availWidth - 10 - iWidth) / 2; //获得窗口的水平位置;
+    window.open(frameUrl, '_blank', 'height=' + iHeight + ',innerHeight=' + iHeight + ',width=' + iWidth + ',innerWidth=' + iWidth + ',top=' + iTop + ',left=' + iLeft + ',toolbar=no,menubar=no,scrollbars=auto,resizeable=no,location=no,status=no');
+    // window.open(frameUrl);
+  },
+  // 执行流程
+  executeProcess: function () {
+    var _self = this;
+    var ids = [_self.modelData.id];
+    ProcessReportResource.runProcessByIds(_self.tabButtonModel.processReportNo, ids).then(
+      successData => {
+        _self.modal = true;
+        _self.processReportResult = successData;
+
+        if (
+          _self.processReportResult.reportResults != undefined &&
+          _self.processReportResult.reportResults.length > 0
+        ) {
+          _self.processReportResult.reportResults.forEach(function (item, index) {
+            if (item.reportDefinitionType !== 'ExcelReport') {
+              item.previewIndex = 1;
+            } else {
+              item.previewIndex = 2;
+            }
+            if (index == 0) {
+              item.showPreview = true;
+            } else {
+              item.showPreview = false;
+            }
+          });
+        }
+        _self.titleModal = false;
+      },
+      errorData => {
+        _self.titleModal = false;
+        Common.processException(errorData);
+      },
+    );
+    _self.refreshDatas();
+    // }
+  },
+  //关闭表头按钮提示框
+  titleModalClose: function () {
+    var _self = this;
+    _self.titleModal = false;
+  },
+}
+
 
 </script>
 <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-text-line {
-    word-break: break-all;
-    white-space: pre-line;
-    max-height: 4em;
+  word-break: break-all;
+  white-space: pre-line;
+  max-height: 4em;
 }
 
 .required-mark {
-    color: red;
+  color: red;
 }
 
 .cell-image {
-    width: 80px;
-    height: 80px;
+  width: 80px;
+  height: 80px;
 }
 
 .cell-image-list {
-    width: 40px;
-    height: 40px;
-    margin-right: 5px;
+  width: 40px;
+  height: 40px;
+  margin-right: 5px;
 }
 
 .selected-tag {
-    color: #333;
-    background-color: #f0f0f0;
-    border: 1px solid #ccc;
-    border-radius: 4px;
-    height: 26px;
-    margin: 4px 4px 0px 0px;
-    padding: 6px 0.25em;
+  color: #333;
+  background-color: #f0f0f0;
+  border: 1px solid #ccc;
+  border-radius: 4px;
+  height: 26px;
+  margin: 4px 4px 0px 0px;
+  padding: 6px 0.25em;
 }
 </style>

+ 20 - 249
src/window1/tabGridView/GridBody.vue

@@ -64,24 +64,15 @@
       :key="'TabGridField_' + gridFieldItem.fieldName + '_' + index"
     >
       <td v-if="!modelData.editMode" v-show="gridFieldItem.visible" @click="clickRecord">
-        <div v-if="gridFieldItem.displayType === 'GridButtonEditor'">
-          <template
-            v-for="tabGridButtonItem in gridFieldItem.tabGridButtonDtos" :key="tabGridButtonItem.name"
-          >
-            <a-button v-if="tabGridButtonItem.action === 'CREATE' || tabGridButtonItem.action === 'SAVE' || tabGridButtonItem.action === 'RUN' || tabGridButtonItem.action === 'EXPORT' || tabGridButtonItem.action === 'NOTICE' || tabGridButtonItem.action === 'REFRESH'" type="link" @click="buttonClick">{{ tabGridButtonItem.name }}</a-button>
-            <a-button v-if="tabGridButtonItem.action === 'DELETE'" type="link" danger @click="deleteRecord">{{ tabGridButtonItem.name }}</a-button>
-            <a-button v-if="tabGridButtonItem.action === 'EDIT'" type="link" @click="editRecord">{{ tabGridButtonItem.name }}</a-button>           
-            <a-button v-if="tabGridButtonItem.action === 'SEE'" type="link" @click="readRecord">{{ tabGridButtonItem.name }}</a-button>
-            <a-button v-if="tabGridButtonItem.action === 'RUN_PROCESS_REPORT'" type="link" @click="execute(tabGridButtonItem)">{{ tabGridButtonItem.name }}</a-button>
-            <a-button v-if="tabGridButtonItem.action === 'OPEN_CUSTOMER_WINDOW'" type="link" @click="execute(tabGridButtonItem)">{{ tabGridButtonItem.name }}</a-button>
-            <a-button v-if="tabGridButtonItem.action === 'OPEN_HTML_WINDOW'" type="link" @click="execute(tabGridButtonItem)">{{ tabGridButtonItem.name }}</a-button>
-            <a-button v-if="tabGridButtonItem.action === 'OPEN_REMOTE_COMPONENT_MODULE_IN_MODAL'" type="link" @click="openRemoteComponentModule(tabGridButtonItem)">{{ tabGridButtonItem.name }}</a-button>
-          </template>          
-        </div>
-        <div v-else>
+        <div>
           <CellTextItem
+            ref="cellTextItem"
             :grid-field-item="gridFieldItem" :model-data="modelData" :class-name="className"
-            @execute-callout="executeCallout(gridFieldItem)"
+            :simple-filter-params="simpleFilterParams" :complex-filter-params="complexFilterParams"
+            :model-datas="modelDatas" :js-url="jsUrl"
+            @execute-callout="executeCallout(gridFieldItem)" @delete-record="deleteRecord" @refresh-datas="refreshDatas"
+            @edit-record="editRecord"
+            @read-record="readRecord"
           />
         </div>
       </td>
@@ -93,7 +84,7 @@
           :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)"
+          @execute-callout="executeCallout(gridFieldItem)"          
         />
       </td>
     </template>
@@ -131,28 +122,20 @@
       </button>
     </template>
   </Modal>
-  <component :is="modal1Component" v-model:open="modal1Open" />
-  <component :is="modal1Component" v-model:open="modal1Open" :model-data="modelData" />
 </template>
 
 <script>
-import {
-  ref,
-  defineAsyncComponent,
-} from 'vue';
+
 import WindowClientUtil from '../../resource/dictionary/WindowClientUtil.js';
 import FieldUtil from '../../resource/dictionary/FieldUtil.js';
 import CellItem from './CellItem.vue';
 import CellTextItem from './CellTextItem.vue';
 import Common from '../../common/Common.js';
-import CustomerWindowResource from '../../api/dic/CustomerWindowResource.js';
-import HtmlWindowResource from '../../api/dic/HtmlWindowResource.js';
-import ProcessReportResource from '../../api/dic/ProcessReportResource.js';
 import Context from '../common/Context.js';
 import JsUtil from '../../common/JsUtil.js';
 import Language from '../../common/Language.js';
-import { Notify, Uuid , CssUtil} from 'pc-component-v3';
-import { Spin as ASpin, Empty as AEmpty } from 'ant-design-vue';
+import { Notify} from 'pc-component-v3';
+
 export default {
 
   components: {
@@ -226,6 +209,12 @@ export default {
         return [];
       },
     },
+    modelDatas: {
+      type: Array,
+      default: () => {
+        return [];
+      },
+    },
   },
   emits: ['deleteRecord', 'editRecord', 'readRecord', 'clickModelData', 'executeCallout', 'valueChanged', 'refreshDatas'],
 
@@ -236,8 +225,6 @@ export default {
       lastClickTime: 0,
       fieldUtil: FieldUtil,
       Language: Language,
-      modal1Open: false,
-      modal1Component: null,
       processReportResult: {},
       modal: false,
       titleModal: false,
@@ -382,11 +369,6 @@ export default {
       Notify.error('提示', '暂不支持该组件', false);
     },
 
-    closeModal: function(){
-      var _self = this;
-      _self.modal1Open.value = false;
-    },
-
     // 改变表格行元素的编辑状态
     editRecord: function () {
       this.$emit('editRecord');
@@ -473,175 +455,13 @@ export default {
       }
       this.lastClickTime = now;
     },
-
     /**
      * 执行Callout
      */
     executeCallout: function (gridFieldItem) {
       this.$emit('executeCallout', gridFieldItem);
     },
-    //跳转或执行流程
-    execute: function (tabButton) {
-      var _self = this;
-      _self.tabButtonModel = tabButton;
-      if (tabButton.customerWindowNo != undefined && tabButton.customerWindowNo != '') {
-        CustomerWindowResource.uniqueByNo(tabButton.customerWindowNo).then(
-          successData => {
-            tabButton.customerWindowRouteUrl = successData.routeUrl;
-            if(tabButton.customerWindowNo == '20221101_151823'){
-              localStorage.setItem('AssetInstance_ComplexFilterParams',JSON.stringify(_self.complexFilterParams));
-              localStorage.setItem('AssetInstance_SimpleFilterParams', _self.simpleFilterParams);
-            }
-            //跳转到tabButton.routeUrl
-            _self.switchFormRoute(tabButton);
-          },
-          errorData => {
-            Common.processException(errorData);
-          },
-        );
-      } else if (
-        tabButton.processReportNo != undefined &&
-        tabButton.processReportNo != ''
-      ) {
-        // 判断流程报表是否有参数
-        // 如果有参数则直接跳转到流程和报表的界面。
-        if (tabButton.routerRedirect == undefined || tabButton.routerRedirect == false) {
-          if(tabButton.tipsTitle == undefined || tabButton.tipsTitle.length == 0){
-            _self.executeProcess();
-          }else{
-            _self.titleModal = true;
-          }
-        } else {
-          this.$router.push({
-            path: '/desktop/process-report/' + tabButton.processReportNo,
-          });
-        }
-      } else if (tabButton.htmlWindowNo != undefined) {
-        HtmlWindowResource.uniqueByNo(tabButton.htmlWindowNo).then(
-          htmlWindowDto => {
-            if (htmlWindowDto != undefined) {
-              var htmlWindowUrl = htmlWindowDto.htmlFileName;
-              var autoCloseInterval = htmlWindowDto.autoCloseInterval;
-              var regExp = new RegExp('[{].*?[}]', 'g');
-              var result = htmlWindowUrl.match(regExp);
-              if (htmlWindowUrl != undefined && htmlWindowUrl != '') {
-                for (var index = 0, len = result.length; index < len; index++) {
-                  var tempResult = result[index];
-                  console.log('{' + tempResult + '}匹配');
-                  if (tempResult == '{URL}') {
-                    htmlWindowUrl = htmlWindowUrl.replace(
-                      '{URL}',
-                      Common.getHostPageBaseURL(),
-                    );
-                  } else if (tempResult == '{RecordIds}') {
-                    var recordId = _self.modelData.id;
-                    htmlWindowUrl = htmlWindowUrl.replace('{RecordIds}', recordId);
-                  } else if (tempResult == '{Token}') {
-                    htmlWindowUrl = htmlWindowUrl.replace('{Token}', Common.getToken());
-                  } else {
-                    if (_self.selectedModelDatas.length == 0) {
-                      Notify.error(_self.$t('lang.Notify.error'), _self.$t('lang.tabButton.describe3'), true);
-                      return;
-                    } else if (_self.selectedModelDatas.length > 1) {
-                      Notify.error(_self.$t('lang.Notify.error'), _self.$t('lang.tabButton.describe2'), true);
-                      return;
-                    }
-                    var tempResult1 = tempResult.replace('{', '').replace('}', '');
-                    htmlWindowUrl = htmlWindowUrl.replace(
-                      tempResult,
-                      _self.getFirstSelectModelDataFieldValue(tempResult1),
-                    );
-                  }
-                }
-
-                var openWindow = window.open(htmlWindowUrl);
-
-                // 自动关闭
-                if (autoCloseInterval != undefined) {
-                  setTimeout(function () {
-                    openWindow.close();
-                    openWindow = undefined;
-                  }, autoCloseInterval * 1000);
-                }
-              }
-            }
-          },
-          errorData => {
-            Common.processException(errorData);
-          },
-        );
-      }      
-    },
-    // 切换到Form表单的路由
-    switchFormRoute: function (tabButton) {
-      const _self = this;
-      var routeDate = {
-        path: tabButton.customerWindowRouteUrl,
-        params: {
-          modelData: this.modelData,
-        },
-      };
-      // 请勿修改,会影响生单的功能
-      var uuid = _self.uuid;
-      if (uuid != undefined) {
-        routeDate.path = routeDate.path + '/' + uuid;
-      }
-
-      const frameUrl = Common.getRedirectUrl(
-        '#' + routeDate.path,
-      );
-
-      // 供子页面iframe调用,修改modelData,(举例:生单界面修改参数)。
-      // window.modelDataChanged = this.modelDataChanged;
-
-      // window.getModelData = this.getModelData;
-      let modelData = JSON.stringify(this.modelData);
-      console.log(modelData);
-      localStorage.setItem(_self.uuid + '#GenerateDocumentTool', modelData);
-
-      var iWidth = 1280;//弹出窗口的宽度;
-      var iHeight = 720; //弹出窗口的高度;
-      var iTop = (window.screen.availHeight-30-iHeight)/2;//获得窗口的垂直位置;
-      var iLeft = (window.screen.availWidth-10-iWidth)/2; //获得窗口的水平位置;
-      window.open(frameUrl,'_blank','height='+iHeight+',innerHeight='+iHeight+',width='+iWidth+',innerWidth='+iWidth+',top='+iTop+',left='+iLeft+',toolbar=no,menubar=no,scrollbars=auto,resizeable=no,location=no,status=no');
-      // window.open(frameUrl);
-    },
-    // 执行流程
-    executeProcess: function () {
-      var _self = this;
-      var ids = [_self.modelData.id];
-      ProcessReportResource.runProcessByIds(_self.tabButtonModel.processReportNo, ids).then(
-        successData => {
-          _self.modal = true;
-          _self.processReportResult = successData;
-
-          if (
-            _self.processReportResult.reportResults != undefined &&
-            _self.processReportResult.reportResults.length > 0
-          ) {
-            _self.processReportResult.reportResults.forEach(function (item, index) {
-              if(item.reportDefinitionType!=='ExcelReport'){
-                item.previewIndex=1;
-              }else{
-                item.previewIndex=2;
-              }
-              if (index == 0) {
-                item.showPreview=true;
-              } else {
-                item.showPreview=false;
-              }
-            });
-          }
-          _self.titleModal = false;
-        },
-        errorData => {
-          _self.titleModal = false;
-          Common.processException(errorData);
-        },
-      );
-      _self.refreshDatas();
-      // }
-    },
+    
     /**
      * 获取字符串的哈希值
      * @param input
@@ -657,57 +477,8 @@ export default {
         hash = hash & hash; // 确保返回值是一个32位有符号整数
       }
       return Math.abs(hash).toString();
-    },
-    /**
-     * 远程加载ES VUE组件模块,并在模态框中打开。
-     * @param jsUrl js路径
-     * @param cssUrl css路径
-     */
-    openRemoteComponentModule: function (tabButton) {
-      var _self = this;
-      let jsUrl = tabButton.remoteComponentModuleJsUrl;
-      let cssUrl = tabButton.remoteComponentModuleCssUrl;
-
-      // 显示模态框
-      // 异步的加载js组件
-      //let jsUrl = './static/client-eam-module-v3/dist/AssetCheckCreate.js';
-      //let cssUrl = './static/client-eam-module-v3/dist/AssetCheckCreate.css';
-
-      if (cssUrl != null && cssUrl.length > 0) {
-        let cssUrlHash = _self.getHash(cssUrl);
-        CssUtil.dynamicLoadCss(cssUrl, cssUrlHash);
-      }
-      // webpackIgnore:设置为 true 时,禁用动态导入解析。
-      // const testAsyncRemoteComponent  = await import(/* webpackIgnore: true */ jsUrl);
-
-      // console.log(testAsyncRemoteComponent);
-      if (jsUrl != null && jsUrl.length > 0) {
-        const testAsyncRemoteComponent = defineAsyncComponent({
-          // 加载函数
-          loader: () => {
-            return import(/* webpackIgnore: true */ jsUrl);
-          },
-          // 加载异步组件时使用的组件
-          loadingComponent: ASpin,
-          // 展示加载组件前的延迟时间,默认为 200ms
-          delay: 200,
-          // 加载失败后展示的组件
-          errorComponent: AEmpty,
-          // 如果提供了一个 timeout 时间限制,并超时了
-          // 也会显示这里配置的报错组件,默认值是:Infinity
-          timeout: 10000,
-        });
-
-        _self.modal1Component = testAsyncRemoteComponent;
-        _self.modal1Open = true;
-        console.log(_self.modal1Component);
-      }
-    },
-    //关闭表头按钮提示框
-    titleModalClose: function (){
-      var _self = this;
-      _self.titleModal = false;
-    },
+    },    
+    
   },
 };
 </script>

+ 104 - 54
src/window1/tabGridView/NewTabButton.vue

@@ -169,26 +169,12 @@
     </template>
   </Modal>
 
-  <Modal
-    v-model:show="titleModal"
-    :show-canel-button="false"
-    :show-ok-button="false"
-  >
-    <template #header>
-      {{ tabButtonModel.tipsTitle }}
-    </template>
-    {{ tabButtonModel.tipsContent }}
-    <template #footer>      
-      <button type="button" class="btn btn-default" @click="titleModalClose">
-        {{ $t("lang.tabButton.cancel") }}
-      </button>
-      <button type="primary" class="btn btn-default" @click="executeProcess">
-        确认
-      </button>
-    </template>
-  </Modal>
-
-  <component :is="modal1Component" v-model:open="modal1Open" />
+  <component
+    :is="modal1Component"
+    v-model:open="modal1Open"
+    :model-data="selectDatas"
+    @refresh-data="refresh"
+  />
 </template>
 
 <script setup>
@@ -200,6 +186,7 @@ import {
   getCurrentInstance,
   defineAsyncComponent,
   h,
+  onMounted,
 } from 'vue';
 import Common from '../../common/Common';
 import DownloadService from '../../resource/file/DownloadService.js';
@@ -248,6 +235,12 @@ const props = defineProps({
       return null;
     },
   },
+  selectModelDatas: {
+    type: Array,
+    default: function () {
+      return null;
+    },
+  },
   showTabDto: {
     type: Object,
     default: function () {
@@ -281,6 +274,7 @@ const emit = defineEmits([
   'judgeIsHaveButtons',
 ]);
 
+const selectDatas = ref([]);
 const tabButtons = ref([]);
 const leftTabButton = ref([]);
 const rightTabButton = ref([]);
@@ -310,9 +304,15 @@ const deleteData = () => {
 const refresh = () => {
   emit('refreshDatas', false);
 };
-const closeModal = () => {
-  modal1Open.value = false;
-};
+
+watch(
+  () => props.selectModelDatas,
+  newV => {
+    selectDatas.value = newV;
+  },
+  { immediate: true, deep: true },
+);
+
 /**
  * 导出确认
  */
@@ -604,13 +604,22 @@ const openRemoteComponentModule = async function (tabButton) {
 //跳转或执行流程
 const execute = async function (tabButton) {
   tabButtonModel.value = tabButton;
-  if (tabButton.customerWindowNo != undefined && tabButton.customerWindowNo != '') {
+  if (
+    tabButton.customerWindowNo != undefined &&
+    tabButton.customerWindowNo != ''
+  ) {
     CustomerWindowResource.uniqueByNo(tabButton.customerWindowNo).then(
       successData => {
         tabButton.customerWindowRouteUrl = successData.routeUrl;
-        if(tabButton.customerWindowNo == '20221101_151823'){
-          localStorage.setItem('AssetInstance_ComplexFilterParams',JSON.stringify(props.complexFilterParams));
-          localStorage.setItem('AssetInstance_SimpleFilterParams', props.simpleFilterParams);
+        if (tabButton.customerWindowNo == '20221101_151823') {
+          localStorage.setItem(
+            'AssetInstance_ComplexFilterParams',
+            JSON.stringify(props.complexFilterParams),
+          );
+          localStorage.setItem(
+            'AssetInstance_SimpleFilterParams',
+            props.simpleFilterParams,
+          );
         }
         //跳转到tabButton.routeUrl
         if (props.viewType == 'Form' || props.viewType == 'EditForm') {
@@ -625,15 +634,18 @@ const execute = async function (tabButton) {
     );
   } else if (
     tabButton.processReportNo != undefined &&
-        tabButton.processReportNo != ''
-  ) {        
+    tabButton.processReportNo != ''
+  ) {
     // 判断流程报表是否有参数
     // 如果有参数则直接跳转到流程和报表的界面。
-    if (tabButton.routerRedirect == undefined || tabButton.routerRedirect == false) {
-      titleModal.value = true;      
-      if(tabButton.tipsTitle == undefined || tabButton.tipsTitle.length == 0){
+    if (
+      tabButton.routerRedirect == undefined ||
+      tabButton.routerRedirect == false
+    ) {
+      titleModal.value = true;
+      if (tabButton.tipsTitle == undefined || tabButton.tipsTitle.length == 0) {
         executeProcess();
-      }else{
+      } else {
         titleModal.value = true;
       }
     } else {
@@ -671,22 +683,43 @@ const execute = async function (tabButton) {
                   if (recordIds != null && recordIds.length > 0) {
                     recordIds = recordIds.substring(0, recordIds.length - 1);
                   } else {
-                    Notify.error(proxy.$t('lang.Notify.error'), proxy.$t('lang.tabButton.describe3'), true);
+                    Notify.error(
+                      proxy.$t('lang.Notify.error'),
+                      proxy.$t('lang.tabButton.describe3'),
+                      true,
+                    );
                     return;
                   }
-                  htmlWindowUrl = htmlWindowUrl.replace('{RecordIds}', recordIds);
+                  htmlWindowUrl = htmlWindowUrl.replace(
+                    '{RecordIds}',
+                    recordIds,
+                  );
                 } else {
                   var recordId = props.modelData.id;
-                  htmlWindowUrl = htmlWindowUrl.replace('{RecordIds}', recordId);
+                  htmlWindowUrl = htmlWindowUrl.replace(
+                    '{RecordIds}',
+                    recordId,
+                  );
                 }
               } else if (tempResult == '{Token}') {
-                htmlWindowUrl = htmlWindowUrl.replace('{Token}', Common.getToken());
+                htmlWindowUrl = htmlWindowUrl.replace(
+                  '{Token}',
+                  Common.getToken(),
+                );
               } else {
                 if (props.selectedModelDatas.length == 0) {
-                  Notify.error(proxy.$t('lang.Notify.error'), proxy.$t('lang.tabButton.describe3'), true);
+                  Notify.error(
+                    proxy.$t('lang.Notify.error'),
+                    proxy.$t('lang.tabButton.describe3'),
+                    true,
+                  );
                   return;
                 } else if (props.selectedModelDatas.length > 1) {
-                  Notify.error(proxy.$t('lang.Notify.error'), proxy.$t('lang.tabButton.describe2'), true);
+                  Notify.error(
+                    proxy.$t('lang.Notify.error'),
+                    proxy.$t('lang.tabButton.describe2'),
+                    true,
+                  );
                   return;
                 }
                 var tempResult1 = tempResult.replace('{', '').replace('}', '');
@@ -737,9 +770,7 @@ const switchFormRoute = async function (tabButton) {
     routeDate.path = routeDate.path + '/' + uuid;
   }
 
-  const frameUrl = Common.getRedirectUrl(
-    '#' + routeDate.path,
-  );
+  const frameUrl = Common.getRedirectUrl('#' + routeDate.path);
 
   // 供子页面iframe调用,修改modelData,(举例:生单界面修改参数)。
   // window.modelDataChanged = modelDataChanged;
@@ -749,11 +780,27 @@ const switchFormRoute = async function (tabButton) {
   // console.log(modelData1);
   // localStorage.setItem(props.uuid + '#GenerateDocumentTool', modelData1);
 
-  var iWidth = 1280;//弹出窗口的宽度;
+  var iWidth = 1280; //弹出窗口的宽度;
   var iHeight = 720; //弹出窗口的高度;
-  var iTop = (window.screen.availHeight-30-iHeight)/2;//获得窗口的垂直位置;
-  var iLeft = (window.screen.availWidth-10-iWidth)/2; //获得窗口的水平位置;
-  window.open(frameUrl,'_blank','height='+iHeight+',innerHeight='+iHeight+',width='+iWidth+',innerWidth='+iWidth+',top='+iTop+',left='+iLeft+',toolbar=no,menubar=no,scrollbars=auto,resizeable=no,location=no,status=no');
+  var iTop = (window.screen.availHeight - 30 - iHeight) / 2; //获得窗口的垂直位置;
+  var iLeft = (window.screen.availWidth - 10 - iWidth) / 2; //获得窗口的水平位置;
+  window.open(
+    frameUrl,
+    '_blank',
+    'height=' +
+      iHeight +
+      ',innerHeight=' +
+      iHeight +
+      ',width=' +
+      iWidth +
+      ',innerWidth=' +
+      iWidth +
+      ',top=' +
+      iTop +
+      ',left=' +
+      iLeft +
+      ',toolbar=no,menubar=no,scrollbars=auto,resizeable=no,location=no,status=no',
+  );
   // window.open(frameUrl);
 };
 // 执行流程
@@ -770,7 +817,10 @@ const executeProcess = async function () {
   }
   // props.loading=true;
 
-  ProcessReportResource.runProcessByIds(tabButtonModel.value.processReportNo, ids).then(
+  ProcessReportResource.runProcessByIds(
+    tabButtonModel.value.processReportNo,
+    ids,
+  ).then(
     successData => {
       modal.value = true;
       // _self.loading=false;
@@ -781,15 +831,15 @@ const executeProcess = async function () {
         processReportResult.value.reportResults.length > 0
       ) {
         processReportResult.value.reportResults.forEach(function (item, index) {
-          if(item.reportDefinitionType!=='ExcelReport'){
-            item.previewIndex=1;
-          }else{
-            item.previewIndex=2;
+          if (item.reportDefinitionType !== 'ExcelReport') {
+            item.previewIndex = 1;
+          } else {
+            item.previewIndex = 2;
           }
           if (index == 0) {
-            item.showPreview=true;
+            item.showPreview = true;
           } else {
-            item.showPreview=false;
+            item.showPreview = false;
           }
         });
       }
@@ -803,7 +853,7 @@ const executeProcess = async function () {
   // }
 };
 //关闭表头按钮提示框
-const titleModalClose = async function (){
+const titleModalClose = async function () {
   titleModal.value = false;
 };
 </script>

+ 23 - 6
src/window1/tabGridView/TabGridEdit.vue

@@ -43,6 +43,7 @@
           :window="window" :now-tab="nowTab" :simple-filter-params="searchText"
           :complex-filter-params="complexFilterParams" :uuid="uuid" :show-tab-dto="tab" :model-datas="modelDatas"
           :view-type="'Grid'" :curd-window-function-access="curdWindowFunctionAccess"
+          :select-model-datas="selectModelDatas"
           @create-record-in-window-edit="createRecordInWindowEdit" @delete-records="deleteRecords"
           @refresh-datas="refreshDatas" @judge-is-have-buttons="judgeIsHaveButtons"
         />
@@ -76,10 +77,11 @@
                       :simple-filter-params="searchText"
                       :complex-filter-params="complexFilterParams"
                       :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)" @refresh-datas="refreshDatas"
-                      @value-changed="valueChanged($event, modelData, index)" @execute-callout="
+                      :scroll-object="scrollObject" :js-url="jsUrl" :model-datas="modelDatas"
+                      @delete-record="deleteRecord(modelData, true)" @edit-record="editRecord(modelData, index)"
+                      @click-model-data="clickModelData(modelData)" @read-record="readRecord(modelData, index)"
+                      @refresh-datas="refreshDatas" @value-changed="valueChanged($event, modelData, index)"
+                      @execute-callout="
                         executeCallout($event, modelData, index)
                       "
                     />
@@ -261,6 +263,7 @@ export default {
       dynamicComponent: null,
       dynamicComponentParam: null,
       dynamicComponentOpen: true,
+      selectModelDatas:[],
     };
   },
   computed: {
@@ -509,10 +512,12 @@ export default {
 
   beforeMount: function () { },
 
-  mounted: function () { },
+  mounted: function () { 
+
+  },
 
   methods: {
-    getContext: Context,
+    getContext: Context,    
 
     // 获取当前tab为哪个阶段
     getNowTab: function (tab) {
@@ -1192,6 +1197,8 @@ export default {
     // 刷新数据
     refreshDatas: function (flag) {
       this.queryGridData(flag);
+      // 刷新时传给远程模态框组件的值设为空数组
+      this.selectModelDatas = [];
     },
 
     // 删除选择的数据
@@ -1423,6 +1430,16 @@ export default {
         });
       }
       modelData.select = !currentStatus;
+
+      if (modelData.select === true) {
+        this.selectModelDatas.push(modelData);
+      } else {
+        this.selectModelDatas.forEach((item,index) =>{
+          if(item.id=== modelData.id) {
+            this.selectModelDatas.splice(index,1);
+          }
+        });
+      }
     },
 
     /**