yangzhijie 4 лет назад
Родитель
Сommit
3df89b13c0

+ 1 - 1
index.html

@@ -2,7 +2,7 @@
 <html lang="en">
   <head>
     <meta charset="utf-8">
-    <title>pc-client-component</title>
+    <title>pc-component-v3</title>
     
     <link rel="stylesheet" type="text/css" href="./bootstrap/css/bootstrap.min.css">
     <link rel="stylesheet" type="text/css" href="./bootstrap/css/bootstrap-dialog.min.css">

+ 4 - 1
package.json

@@ -12,7 +12,7 @@
     "dist": "dist"
   },
   "author": "shang hai leanwo",
-  "license": "",
+  "license": "Leanwo Business Software License",
   "devDependencies": {
     "@babel/core": "^7.17.5",
     "@babel/eslint-parser": "^7.17.0",
@@ -32,6 +32,9 @@
     "webpack-merge": "^5.8.0"
   },
   "dependencies": {
+    
+  },
+  "peerDependencies": {
     "v-tooltip": "^4.0.0-beta.17",
     "vue": "^3.2.31",
     "vue-i18n": "^9.1.9",

+ 1 - 1
packages/checkbox/index.js

@@ -1,7 +1,7 @@
 import Checkbox from './src/Checkbox.vue';
 
 Checkbox.install = function(Vue) {
-    Vue.component(Checkbox.name, Checkbox);
+  Vue.component(Checkbox.name, Checkbox);
 };
 
 export default Checkbox;

+ 15 - 15
packages/common/IFrameUtil.js

@@ -1,25 +1,25 @@
 export default {
-    /**
+  /**
      * 关闭iframe
      */
-    close: function(){
-        var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
-        parent.layer.close(index); //再执行关闭
-    },
+  close: function(){
+    var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
+    parent.layer.close(index); //再执行关闭
+  },
 
-    /**
+  /**
      * 获取CURD窗口的数据
      */
-    getCurdModelData: function(){
-        return parent.getModelData();
-    },
+  getCurdModelData: function(){
+    return parent.getModelData();
+  },
 
-    /**
+  /**
      * 设置CURD窗口的数据
      * @param {*} modelData 
      */
-    setCurdModelData: function(modelData){
-        modelData.restore = true;
-        parent.modelDataChanged(modelData);
-    }
-}
+  setCurdModelData: function(modelData){
+    modelData.restore = true;
+    parent.modelDataChanged(modelData);
+  },
+};

+ 21 - 21
packages/common/SqlApi.js

@@ -1,29 +1,29 @@
-var Common = require("./Common.js");
+var Common = require('./Common.js');
 
 export default {
 
-    /**
+  /**
      * 通过GET方式调用SQL API
      * @param no 编号
      * @param data json 数据
      * @returns 
      */
-    execute: function (no, data) {
-        return new Promise((resolve, reject) => {
-            $.ajax({
-                type: "get",
-                url: Common.getApiURL("SqlApiResource/execute/" + no),
-                data: data,
-                beforeSend: function (request) {
-                    Common.addTokenToRequest(request);
-                },
-                success: function (data) {
-                    resolve(data);
-                },
-                error: function (XMLHttpRequest, textStatus, errorThrown) {
-                    reject(XMLHttpRequest);
-                }
-            });
-        });
-    }
-}
+  execute: function (no, data) {
+    return new Promise((resolve, reject) => {
+      $.ajax({
+        type: 'get',
+        url: Common.getApiURL('SqlApiResource/execute/' + no),
+        data: data,
+        beforeSend: function (request) {
+          Common.addTokenToRequest(request);
+        },
+        success: function (data) {
+          resolve(data);
+        },
+        error: function (XMLHttpRequest, textStatus, errorThrown) {
+          reject(XMLHttpRequest);
+        },
+      });
+    });
+  },
+};

+ 99 - 99
packages/index.js

@@ -8,7 +8,7 @@ import PageSizeSelect from './page-size-select/index.js';
 import Time from './time/index.js';
 import Switches from './switches/index.js';
 import YearPicker from './year-picker/index.js';
-import VueBootstrapPagination from './vue-bootstrap-pagination/index.js'
+import VueBootstrapPagination from './vue-bootstrap-pagination/index.js';
 import VueMonthlyPicker from './vue-monthly-picker/index.js';
 import UploadWidget from './upload-widget/index.js';
 import Scanner from './scanner/index.js';
@@ -20,9 +20,9 @@ import ProcessReportResult from './process/process-report-result.js';
 import ProcessReportResultPreview from './process/process-report-result-preview.js';
 
 
-import DocGenerator from "./info/doc-generator.js";
-import InfoSearchWidget from "./info/info-search-widget.js";
-import SearchWidget from "./info/search-widget.js";
+import DocGenerator from './info/doc-generator.js';
+import InfoSearchWidget from './info/info-search-widget.js';
+import SearchWidget from './info/search-widget.js';
 
 import PrintEpc from './print/print-epc.js';
 import PrintWidget from './print/print-widget.js';
@@ -51,114 +51,114 @@ import ModalFix from './modal/src/ModalFix.js';
 import PrintUtil from './print/src/PrintUtil.js';
 
 const components = [
-    Loading,
-    Modal,
-    DateTime,
-    DateTimeV2,
-    Date,
-    Checkbox,
-    PageSizeSelect,
-    Time,
-    Switches,
-    YearPicker,
-    VueBootstrapPagination,
-    VueMonthlyPicker,
-    UploadWidget,
-    Scanner,
-    Navbar,
-    ImagePreview,
-    InfoWindow,
-    ProcessReport,
-    ProcessReportResult,
-    ProcessReportResultPreview,
-    DocGenerator,
-    InfoSearchWidget,
-    SearchWidget,
-    PrintEpc,
-    PrintWidget,
-    TreeViewNode,
-    // Pagination
+  Loading,
+  Modal,
+  DateTime,
+  DateTimeV2,
+  Date,
+  Checkbox,
+  PageSizeSelect,
+  Time,
+  Switches,
+  YearPicker,
+  VueBootstrapPagination,
+  VueMonthlyPicker,
+  UploadWidget,
+  Scanner,
+  Navbar,
+  ImagePreview,
+  InfoWindow,
+  ProcessReport,
+  ProcessReportResult,
+  ProcessReportResultPreview,
+  DocGenerator,
+  InfoSearchWidget,
+  SearchWidget,
+  PrintEpc,
+  PrintWidget,
+  TreeViewNode,
+  // Pagination
 ];
 
 
 const install = function (Vue, opts = {}) {
-    /* istanbul ignore if */
-    if (install.installed) return;
+  /* istanbul ignore if */
+  if (install.installed) return;
 
     
-    Vue.use(VueI18n);
-
-    Vue.mixin({
-        beforeCreate() {
-            var _self = this;
-            // 这里为了防止 beforeCreate 比 vue-i18n 的 beforeCreate 先执行导致 this.$i18n 为空
-            this.$nextTick(() => {
-                // 判断是否为根节点,合并国际化信息
-                //if (this.$root === this && this.$i18n) {
-                if (this.$i18n) {
-                    _self.$i18n.mergeLocaleMessage('zh-CN', langZhCn);
-                    _self.$i18n.mergeLocaleMessage('en-US', langEnUs);
-                }
-            });
-        },
-    });
-
-    // locale.use(opts.locale);
-    // locale.i18n(opts.i18n);
-
-    components.map(component => {
-        console.log("install component: " + component.name);
-        Vue.component(component.name, component);
-    });
+  Vue.use(VueI18n);
+
+  Vue.mixin({
+    beforeCreate() {
+      var _self = this;
+      // 这里为了防止 beforeCreate 比 vue-i18n 的 beforeCreate 先执行导致 this.$i18n 为空
+      this.$nextTick(() => {
+        // 判断是否为根节点,合并国际化信息
+        //if (this.$root === this && this.$i18n) {
+        if (this.$i18n) {
+          _self.$i18n.mergeLocaleMessage('zh-CN', langZhCn);
+          _self.$i18n.mergeLocaleMessage('en-US', langEnUs);
+        }
+      });
+    },
+  });
+
+  // locale.use(opts.locale);
+  // locale.i18n(opts.i18n);
+
+  components.map(component => {
+    console.log('install component: ' + component.name);
+    Vue.component(component.name, component);
+  });
 };
 
 
 /* istanbul ignore if */
 if (typeof window !== 'undefined' && window.Vue) {
-    install(window.Vue);
+  install(window.Vue);
 };
 
 
 export default {
-    version: '1.2.9',
-    // locale: locale.use,
-    // i18n: locale.i18n,
-    install,
-    Loading,
-    Modal,
-    DateTime,
-    DateTimeV2,
-    Date,
-    Checkbox,
-    PageSizeSelect,
-    Time,
-    Switches,
-    YearPicker,
-    VueBootstrapPagination,
-    VueMonthlyPicker,
-    UploadWidget,
-    Scanner,
-    Navbar,
-    ImagePreview,
-    InfoWindow,
-    DocGenerator,
-    ProcessReport,
-    ProcessReportResult,
-    ProcessReportResultPreview,
-    InfoSearchWidget,
-    SearchWidget,
-    PrintEpc,
-    PrintWidget,
-    TreeViewNode,
-    // Pagination,
-    Uuid,
-    Common,
-    SqlApi,
-    Notify,
-    IFrameUtil,
-    ModalFix,
-    PrintUtil,
-    UserStorageResource,
-    DownloadService,
-    ProcessReportResource
+  version: '1.2.9',
+  // locale: locale.use,
+  // i18n: locale.i18n,
+  install,
+  Loading,
+  Modal,
+  DateTime,
+  DateTimeV2,
+  Date,
+  Checkbox,
+  PageSizeSelect,
+  Time,
+  Switches,
+  YearPicker,
+  VueBootstrapPagination,
+  VueMonthlyPicker,
+  UploadWidget,
+  Scanner,
+  Navbar,
+  ImagePreview,
+  InfoWindow,
+  DocGenerator,
+  ProcessReport,
+  ProcessReportResult,
+  ProcessReportResultPreview,
+  InfoSearchWidget,
+  SearchWidget,
+  PrintEpc,
+  PrintWidget,
+  TreeViewNode,
+  // Pagination,
+  Uuid,
+  Common,
+  SqlApi,
+  Notify,
+  IFrameUtil,
+  ModalFix,
+  PrintUtil,
+  UserStorageResource,
+  DownloadService,
+  ProcessReportResource,
 };

+ 1 - 1
packages/info/doc-generator.js

@@ -2,7 +2,7 @@
 import DocGenerator from './src/DocGenerator.vue';
 
 DocGenerator.install = function(Vue) {
-    Vue.component(DocGenerator.name, DocGenerator);
+  Vue.component(DocGenerator.name, DocGenerator);
 };
 
 export default DocGenerator;

+ 1 - 1
packages/info/index.js

@@ -2,7 +2,7 @@
 import InfoWindow from './src/InfoWindow.vue';
 
 InfoWindow.install = function(Vue) {
-    Vue.component(InfoWindow.name, InfoWindow);
+  Vue.component(InfoWindow.name, InfoWindow);
 };
 
 export default InfoWindow;

+ 1 - 1
packages/info/info-search-widget.js

@@ -2,7 +2,7 @@
 import InfoSearchWidget from './src/InfoSearchWidget.vue';
 
 InfoSearchWidget.install = function(Vue) {
-    Vue.component(InfoSearchWidget.name, InfoSearchWidget);
+  Vue.component(InfoSearchWidget.name, InfoSearchWidget);
 };
 
 export default InfoSearchWidget;

+ 1 - 1
packages/info/search-widget.js

@@ -2,7 +2,7 @@
 import SearchWidget from './src/SearchWidget.vue';
 
 SearchWidget.install = function(Vue) {
-    Vue.component(SearchWidget.name, SearchWidget);
+  Vue.component(SearchWidget.name, SearchWidget);
 };
 
 export default SearchWidget;

+ 220 - 215
packages/info/src/DocGenerator.vue

@@ -1,288 +1,293 @@
 <template>
-    <div class="grid-container-2">
-        <div class="grid-header-2">
-            <QueryCondition ref="queryCondition"
-                            :infoFilterFields="infoFilterFields"
-                            :showButton="true"
-                            :isSearchWidget="true"
-                            @simpleSearch="simpleSearch()"
-                            @complexSearch="complexSearch()"
-                            @refreshSearch="queryInfoWindowData"
-                            @changeSearch="tabIndex = 1;">
-                <template v-slot:header>
-                    <li role="presentation"
-                        :class="{'active': tabIndex === 2}">
-                        <a @click="$refs.queryCondition.changeSearch(1); tabIndex = 2;">{{$t('lang.DocGenerator.selectedDatas')}}</a>
-                    </li>
-                </template>
-                <template v-slot:body>
-                    <div class="tab-pane"
-                        :class="{'active': tabIndex === 2}">
-                    </div>
-                </template>
-            </QueryCondition>
-        </div>
+  <div class="grid-container-2">
+    <div class="grid-header-2">
+      <QueryCondition
+        ref="queryCondition"
+        :info-filter-fields="infoFilterFields"
+        :show-button="true"
+        :is-search-widget="true"
+        @simple-search="simpleSearch()"
+        @complex-search="complexSearch()"
+        @refresh-search="queryInfoWindowData"
+        @change-search="tabIndex = 1;"
+      >
+        <template #header>
+          <li
+            role="presentation"
+            :class="{'active': tabIndex === 2}"
+          >
+            <a @click="$refs.queryCondition.changeSearch(1); tabIndex = 2;">{{ $t('lang.DocGenerator.selectedDatas') }}</a>
+          </li>
+        </template>
+        <template #body>
+          <div
+            class="tab-pane"
+            :class="{'active': tabIndex === 2}"
+          />
+        </template>
+      </QueryCondition>
+    </div>
 
-        <div class="grid-content-2">
-            <DocGeneratorGrid ref="docGeneratorGrid" 
+    <div class="grid-content-2">
+      <DocGeneratorGrid
+        v-show="tabIndex === 1" 
                 
-                v-show="tabIndex === 1"
-                :infoWindowNo="infoWindowNo"
-                :infoGridFields="infoGridFields"
-                :infoWindowData="infoWindowData"
-                :isSelectedById="isSelectedById"
-                @refreshSearch="queryInfoWindowData"
-                @selectChanged="selectChanged">
-            </DocGeneratorGrid>
-
-            <DocGeneratorSelected 
-                ref="docGeneratorSelected"
-                v-show="tabIndex === 2"
-                :infoWindowNo="infoWindowNo"
-                :infoGridFields="infoGridFields"
-                @selectChanged="queryInfoWindowData">
-            </DocGeneratorSelected>
+        ref="docGeneratorGrid"
+        :info-window-no="infoWindowNo"
+        :info-grid-fields="infoGridFields"
+        :info-window-data="infoWindowData"
+        :is-selected-by-id="isSelectedById"
+        @refresh-search="queryInfoWindowData"
+        @select-changed="selectChanged"
+      />
 
-        </div>
-        <Loading ref="loading" />
+      <DocGeneratorSelected 
+        v-show="tabIndex === 2"
+        ref="docGeneratorSelected"
+        :info-window-no="infoWindowNo"
+        :info-grid-fields="infoGridFields"
+        @select-changed="queryInfoWindowData"
+      />
     </div>
+    <Loading ref="loading" />
+  </div>
 </template>
 <script>
-var Common = require("../../common/Common.js");
-var InfoUtil = require("./InfoUtil.js");
-var Loading = require("../../loading/src/Loading.vue").default;
-var QueryCondition = require("./QueryCondition.vue").default;
-var DocGeneratorSelected = require("./DocGeneratorSelected.vue").default;
-var DocGeneratorGrid = require("./DocGeneratorGrid.vue").default;
+var Common = require('../../common/Common.js');
+var InfoUtil = require('./InfoUtil.js');
+var Loading = require('../../loading/src/Loading.vue').default;
+var QueryCondition = require('./QueryCondition.vue').default;
+var DocGeneratorSelected = require('./DocGeneratorSelected.vue').default;
+var DocGeneratorGrid = require('./DocGeneratorGrid.vue').default;
 
 export default {
-    name: "DocGenerator",
+  name: 'DocGenerator',
+
+  components: {
+    QueryCondition, Loading,  
+    DocGeneratorSelected,
+    DocGeneratorGrid,
+  },
     
-    props: ["infoWindowNo"],
+  props: ['infoWindowNo'],
 
-    data: function () {
-        return {
-            infoWindowDto: {},
-            infoFilterFields: [],   // 过滤字段
-            infoGridFields: [],     // 表格字段
-            infoWindowData: [],
-            tabIndex: 1,
-        }
-    },
+  data: function () {
+    return {
+      infoWindowDto: {},
+      infoFilterFields: [],   // 过滤字段
+      infoGridFields: [],     // 表格字段
+      infoWindowData: [],
+      tabIndex: 1,
+    };
+  },
 
-    components: {
-        QueryCondition, Loading,  
-        DocGeneratorSelected,
-        DocGeneratorGrid
+  watch: {
+    infoWindowNo: function(newValue, oldValue){
+      this.init();
     },
+  },
 
-    methods: {
+  mounted: function(){
+    this.init();
+  },
+
+  methods: {
         
-        /**
+    /**
          * 加载查询窗口的定义
          * @author YangZhiJie 20210909
          */
-        init: function () {
-            var _self = this;
-            if (_self.infoWindowNo === undefined || _self.infoWindowNo === null || _self.infoWindowNo === '') {
-                return;
-            }
-            _self.$refs.loading.show();
-            $.ajax({
-                url: Common.getApiURL('InfoWindowResource/uniqueByNo'),
-                type: 'GET',
-                dataType: 'json',
-                data: { "infoWindowNo": _self.infoWindowNo },
-                beforeSend: function (request) {
-                    Common.addTokenToRequest(request);
-                },
-                success: function (data) {
-                    _self.$refs.loading.show();
-                    _self.infoWindowDto = data;
-                    _self.$emit("showTitle", data.name);
-                    _self.$nextTick(function () {
-                        _self.initQueryPage();
-                    });
-                },
-                error: function (XMLHttpRequest, textStatus, errorThrown) {
-                    _self.$refs.loading.show();
-                    Common.processException(XMLHttpRequest, textStatus, errorThrown);
-                }
-            });
+    init: function () {
+      var _self = this;
+      if (_self.infoWindowNo === undefined || _self.infoWindowNo === null || _self.infoWindowNo === '') {
+        return;
+      }
+      _self.$refs.loading.show();
+      $.ajax({
+        url: Common.getApiURL('InfoWindowResource/uniqueByNo'),
+        type: 'GET',
+        dataType: 'json',
+        data: { 'infoWindowNo': _self.infoWindowNo },
+        beforeSend: function (request) {
+          Common.addTokenToRequest(request);
+        },
+        success: function (data) {
+          _self.$refs.loading.show();
+          _self.infoWindowDto = data;
+          _self.$emit('showTitle', data.name);
+          _self.$nextTick(function () {
+            _self.initQueryPage();
+          });
         },
+        error: function (XMLHttpRequest, textStatus, errorThrown) {
+          _self.$refs.loading.show();
+          Common.processException(XMLHttpRequest, textStatus, errorThrown);
+        },
+      });
+    },
 
-        /**
+    /**
          * 根据用户配置更新查询窗口的定义
          * @author YangZhiJie 20210909
          */
-        initQueryPage: function () {
-            var _self = this;
-            if (_self.infoWindowDto === undefined || _self.infoWindowDto === null) {
-                return;
-            }
+    initQueryPage: function () {
+      var _self = this;
+      if (_self.infoWindowDto === undefined || _self.infoWindowDto === null) {
+        return;
+      }
             
-            _self.infoWindowDto.infoGridFields.forEach(function (item) {
-                _self.$set(item, "width", 150);
-            });
+      _self.infoWindowDto.infoGridFields.forEach(function (item) {
+        _self.$set(item, 'width', 150);
+      });
 
-            _self.infoWindowDto.infoFilterFields.forEach(function (item) {
-                item.value = {
-                    "infoFilterFieldId": item.id,
-                    "value1": "",
-                    "value2": ""
-                }
-            });
+      _self.infoWindowDto.infoFilterFields.forEach(function (item) {
+        item.value = {
+          'infoFilterFieldId': item.id,
+          'value1': '',
+          'value2': '',
+        };
+      });
 
             
-            InfoUtil.restoreInfoFilterField(_self.infoWindowDto.no, _self.infoWindowDto.infoFilterFields);
-            InfoUtil.restoreInfoGridField(_self.infoWindowDto.no, _self.infoWindowDto.infoGridFields);
+      InfoUtil.restoreInfoFilterField(_self.infoWindowDto.no, _self.infoWindowDto.infoFilterFields);
+      InfoUtil.restoreInfoGridField(_self.infoWindowDto.no, _self.infoWindowDto.infoGridFields);
 
-            _self.infoFilterFields = _self.infoWindowDto.infoFilterFields;
-            _self.infoGridFields = _self.infoWindowDto.infoGridFields;
+      _self.infoFilterFields = _self.infoWindowDto.infoFilterFields;
+      _self.infoGridFields = _self.infoWindowDto.infoGridFields;
 
 
-            _self.$nextTick(function () {
-                _self.queryInfoWindowData();
-            });
-        },
+      _self.$nextTick(function () {
+        _self.queryInfoWindowData();
+      });
+    },
 
-        /**
+    /**
          * 重新开始简单查询
          * @author YangZhiJie 20210909
          */
-        simpleSearch: function () {
-            this.$refs.docGeneratorGrid.resetPagination();
-            this.queryInfoWindowDataSimple();
-        },
+    simpleSearch: function () {
+      this.$refs.docGeneratorGrid.resetPagination();
+      this.queryInfoWindowDataSimple();
+    },
 
-        /**
+    /**
          * 从新开始复杂查询
          * @author YangZhiJie 20210909
          */
-        complexSearch: function () {
-            this.$refs.docGeneratorGrid.resetPagination();
-            this.queryInfoWindowDataComplex();
-        },
+    complexSearch: function () {
+      this.$refs.docGeneratorGrid.resetPagination();
+      this.queryInfoWindowDataComplex();
+    },
 
-        /**
+    /**
          * 查询窗口数据查询
          * @author YangZhiJie 20210909
          */
-        queryInfoWindowData: function () {
-            var isSimpleSearch = this.$refs.queryCondition.isSimpleQuery();
-            if (isSimpleSearch) {
-                this.queryInfoWindowDataSimple();
-            } else {
-                this.queryInfoWindowDataComplex();
-            }
-        },
+    queryInfoWindowData: function () {
+      var isSimpleSearch = this.$refs.queryCondition.isSimpleQuery();
+      if (isSimpleSearch) {
+        this.queryInfoWindowDataSimple();
+      } else {
+        this.queryInfoWindowDataComplex();
+      }
+    },
 
-        /**
+    /**
          * 简单数据查询
          * @author YangZhiJie 20210909
          */
-        queryInfoWindowDataSimple: function () {
-            var _self = this;
+    queryInfoWindowDataSimple: function () {
+      var _self = this;
 
-            var infoQueryParam = this.$refs.docGeneratorGrid.getQueryParam();
-            infoQueryParam.infoFilterFieldValues = _self.$refs.queryCondition.getQueryCondition();            
-            _self.$refs.loading.show();
-            $.ajax({
-                url: Common.getApiURL('InfoWindowResource/queryInfoWindowDataSimple'),
-                type: "post",
-                dataType: "json",
-                beforeSend: function (request) {
-                    Common.addTokenToRequest(request);
-                },
-                contentType: "application/json",
-                data: JSON.stringify(infoQueryParam),
-                success: function (data) {
-                    _self.$refs.loading.hide();
-                    console.log(data);
-                    if (data != undefined && data.range != undefined) {
-                        _self.infoWindowData = data.dataList;
-                        _self.$refs.docGeneratorGrid.setPagination(data.totalSize, Math.ceil(data.totalSize / data.range.length));
-                    }
-                },
-                error: function (XMLHttpRequest, textStatus, errorThrown) {
-                    _self.$refs.loading.hide();
-                    Common.processException(XMLHttpRequest, textStatus, errorThrown);
-                }
-            });
+      var infoQueryParam = this.$refs.docGeneratorGrid.getQueryParam();
+      infoQueryParam.infoFilterFieldValues = _self.$refs.queryCondition.getQueryCondition();            
+      _self.$refs.loading.show();
+      $.ajax({
+        url: Common.getApiURL('InfoWindowResource/queryInfoWindowDataSimple'),
+        type: 'post',
+        dataType: 'json',
+        beforeSend: function (request) {
+          Common.addTokenToRequest(request);
+        },
+        contentType: 'application/json',
+        data: JSON.stringify(infoQueryParam),
+        success: function (data) {
+          _self.$refs.loading.hide();
+          console.log(data);
+          if (data != undefined && data.range != undefined) {
+            _self.infoWindowData = data.dataList;
+            _self.$refs.docGeneratorGrid.setPagination(data.totalSize, Math.ceil(data.totalSize / data.range.length));
+          }
         },
+        error: function (XMLHttpRequest, textStatus, errorThrown) {
+          _self.$refs.loading.hide();
+          Common.processException(XMLHttpRequest, textStatus, errorThrown);
+        },
+      });
+    },
 
-        /**
+    /**
          * 复杂数据查询
          * @author YangZhiJie 20210909
          */
-        queryInfoWindowDataComplex: function () {
-            var _self = this;
+    queryInfoWindowDataComplex: function () {
+      var _self = this;
 
-            var infoQueryParam = this.$refs.docGeneratorGrid.getQueryParam();
-            infoQueryParam.infoFilterFieldValues = _self.$refs.queryCondition.getQueryCondition();
+      var infoQueryParam = this.$refs.docGeneratorGrid.getQueryParam();
+      infoQueryParam.infoFilterFieldValues = _self.$refs.queryCondition.getQueryCondition();
 
-            _self.$refs.loading.show();
-            $.ajax({
-                url: Common.getApiURL('InfoWindowResource/queryInfoWindowDataComplex'),
-                type: "post",
-                dataType: "json",
-                beforeSend: function (request) {
-                    Common.addTokenToRequest(request);
-                },
-                contentType: "application/json",
-                data: JSON.stringify(infoQueryParam),
-                success: function (data) {
-                    _self.$refs.loading.hide();
-                    console.log(data);
-                    if (data != undefined && data.range != undefined) {
-                        _self.infoWindowData = data.dataList;
-                        _self.$refs.docGeneratorGrid.setPagination(data.totalSize, Math.ceil(data.totalSize / data.range.length));
-                    }
-                },
-                error: function (XMLHttpRequest, textStatus, errorThrown) {
-                    _self.$refs.loading.hide();
-                    Common.processException(XMLHttpRequest, textStatus, errorThrown);
-                }
-            });
+      _self.$refs.loading.show();
+      $.ajax({
+        url: Common.getApiURL('InfoWindowResource/queryInfoWindowDataComplex'),
+        type: 'post',
+        dataType: 'json',
+        beforeSend: function (request) {
+          Common.addTokenToRequest(request);
         },
+        contentType: 'application/json',
+        data: JSON.stringify(infoQueryParam),
+        success: function (data) {
+          _self.$refs.loading.hide();
+          console.log(data);
+          if (data != undefined && data.range != undefined) {
+            _self.infoWindowData = data.dataList;
+            _self.$refs.docGeneratorGrid.setPagination(data.totalSize, Math.ceil(data.totalSize / data.range.length));
+          }
+        },
+        error: function (XMLHttpRequest, textStatus, errorThrown) {
+          _self.$refs.loading.hide();
+          Common.processException(XMLHttpRequest, textStatus, errorThrown);
+        },
+      });
+    },
 
-        /**
+    /**
          * 选择的内容发生了改变
          * @author YangZhiJie 20210909
          */
-        selectChanged: function(selectDatas){
-            this.$refs.docGeneratorSelected.parseDataList(selectDatas);
-        },
+    selectChanged: function(selectDatas){
+      this.$refs.docGeneratorSelected.parseDataList(selectDatas);
+    },
 
-        /**
+    /**
          * 根据id判断数据是否被选中
          * 供外部接口调用
          * @author YangZhiJie 20210909
          */
-        isSelectedById: function(id){
-            return this.$refs.docGeneratorSelected.isSelectedById(id);
-        },
+    isSelectedById: function(id){
+      return this.$refs.docGeneratorSelected.isSelectedById(id);
+    },
 
-        /**
+    /**
          * 获取选中的数据
          * 供外部接口调用
          * @author YangZhiJie 20210909
          */
-        getSelectedData: function(){
-            return this.$refs.docGeneratorSelected.getSelectedData();
-        }
+    getSelectedData: function(){
+      return this.$refs.docGeneratorSelected.getSelectedData();
     },
-
-    mounted: function(){
-        this.init();
-    },
-
-    watch: {
-        infoWindowNo: function(newValue, oldValue){
-            this.init();
-        }
-    }
-}
+  },
+};
 </script>
 <style scoped>
 .grid-container-2 {

+ 347 - 327
packages/info/src/DocGeneratorGrid.vue

@@ -1,405 +1,425 @@
 <template>
-    <div class="flex-container-1">
-        <div class="flex-content-1 table-fix-head">
-            <table class="fixed-table table-striped table-bordered"
-                   :width="tableWidth"
-                   height="40px">
-                <thead>
-                    <tr height="40px">
-                        <th width="50px"
-                            class="fixed-cell">
-                            <input @click="selectAll($event)"
-                                   :checked="allSelected"
-                                   type="checkbox" />
-                        </th>
-
-                        <th v-for="infoGridField in infoGridFields"
-                            v-show="infoGridField.isShow"
-                            :key="infoGridField.fieldName"
-                            :width="infoGridField.width + 'px'"
-                            @dragover="ondragover($event, infoGridField)"
-                            @click="onSort(infoGridField)">
-
-                            <div class="rz-handle"
-                                 draggable='true'
-                                 :id="'infoGridFieldId_' + infoGridField.fieldName"
-                                 @dragstart="ondragstart($event, infoGridField)"
-                                 @drag="ondrag($event, infoGridField)"
-                                 @dragend="ondragend($event, infoGridField)">
-                            </div>
-
-                            <div class="td-max">
-                                {{infoGridField.name}}
-                            </div>
-                        </th>
-                    </tr>
-                </thead>
-                <tbody>
-                    <tr v-for="rowData in dataList"
-                        :key="rowData.id"
-                        height="40px">
-                        <td class="fixed-cell">
-                            <input v-model="rowData.checked"
-                                   type="checkbox"
-                                   :value="rowData.id" />
-                        </td>
-                        <td v-for="infoGridField in infoGridFields"
-                            :key="infoGridField.fieldName + '_' + rowData.id">
-                            <input v-if="infoGridField.simpleDisplayType == 'TextEditor'"
-                                   type="text"
-                                   class="form-control"
-                                   :value="getDisplayValue(rowData, infoGridField)"
-                                   @keyup="valueChange($event, rowData, infoGridField)" />
-                            <input v-if="infoGridField.simpleDisplayType == 'NumberEditor'"
-                                   type="number"
-                                   class="form-control"
-                                   :value="getDisplayValue(rowData,infoGridField)"
-                                   @keyup="valueChange($event, rowData, infoGridField)" />
-                            <span v-if="infoGridField.simpleDisplayType == null || infoGridField.simpleDisplayType == '' || infoGridField.simpleDisplayType == 'NONE'">
-                                {{ rowData.data[infoGridField.fieldName] == undefined ? "" : rowData.data[infoGridField.fieldName].displayValue[0] }}
-                            </span>
-                        </td>
-                    </tr>
-                </tbody>
-            </table>
-        </div>
-
-        <div class="flex-footer-1"
-             style="margin-top: 10px;">
-            <div class="pull-left">
-                <span>
-                    第
-                    {{(pagination.current_page-1)*pagination.per_page+1}}
-                    -
-                    {{pagination.current_page*pagination.per_page}}
-                    条,共计
-                    {{pagination.total}}
-                    条,每页
-                </span>
-                <PageSizeSelect v-on:pageSizeChanged="gridSizeSelect">
-
-                </PageSizeSelect>
-
-                <span>条</span>
-            </div>
-            <div class="pull-right">
-                <Pagination :pagination="pagination"
-                            :callback="refreshSearch"></Pagination>
-            </div>
-        </div>
+  <div class="flex-container-1">
+    <div class="flex-content-1 table-fix-head">
+      <table
+        class="fixed-table table-striped table-bordered"
+        :width="tableWidth"
+        height="40px"
+      >
+        <thead>
+          <tr height="40px">
+            <th
+              width="50px"
+              class="fixed-cell"
+            >
+              <input
+                :checked="allSelected"
+                type="checkbox"
+                @click="selectAll($event)"
+              />
+            </th>
+
+            <th
+              v-for="infoGridField in infoGridFields"
+              v-show="infoGridField.isShow"
+              :key="infoGridField.fieldName"
+              :width="infoGridField.width + 'px'"
+              @dragover="ondragover($event, infoGridField)"
+              @click="onSort(infoGridField)"
+            >
+              <div
+                :id="'infoGridFieldId_' + infoGridField.fieldName"
+                class="rz-handle"
+                draggable="true"
+                @dragstart="ondragstart($event, infoGridField)"
+                @drag="ondrag($event, infoGridField)"
+                @dragend="ondragend($event, infoGridField)"
+              />
+
+              <div class="td-max">
+                {{ infoGridField.name }}
+              </div>
+            </th>
+          </tr>
+        </thead>
+        <tbody>
+          <tr
+            v-for="rowData in dataList"
+            :key="rowData.id"
+            height="40px"
+          >
+            <td class="fixed-cell">
+              <input
+                v-model="rowData.checked"
+                type="checkbox"
+                :value="rowData.id"
+              />
+            </td>
+            <td
+              v-for="infoGridField in infoGridFields"
+              :key="infoGridField.fieldName + '_' + rowData.id"
+            >
+              <input
+                v-if="infoGridField.simpleDisplayType == 'TextEditor'"
+                type="text"
+                class="form-control"
+                :value="getDisplayValue(rowData, infoGridField)"
+                @keyup="valueChange($event, rowData, infoGridField)"
+              />
+              <input
+                v-if="infoGridField.simpleDisplayType == 'NumberEditor'"
+                type="number"
+                class="form-control"
+                :value="getDisplayValue(rowData,infoGridField)"
+                @keyup="valueChange($event, rowData, infoGridField)"
+              />
+              <span v-if="infoGridField.simpleDisplayType == null || infoGridField.simpleDisplayType == '' || infoGridField.simpleDisplayType == 'NONE'">
+                {{ rowData.data[infoGridField.fieldName] == undefined ? "" : rowData.data[infoGridField.fieldName].displayValue[0] }}
+              </span>
+            </td>
+          </tr>
+        </tbody>
+      </table>
     </div>
+
+    <div
+      class="flex-footer-1"
+      style="margin-top: 10px;"
+    >
+      <div class="pull-left">
+        <span>
+          第
+          {{ (pagination.current_page-1)*pagination.per_page+1 }}
+          -
+          {{ pagination.current_page*pagination.per_page }}
+          条,共计
+          {{ pagination.total }}
+          条,每页
+        </span>
+        <PageSizeSelect @page-size-changed="gridSizeSelect" />
+
+        <span>条</span>
+      </div>
+      <div class="pull-right">
+        <Pagination
+          :pagination="pagination"
+          :callback="refreshSearch"
+        />
+      </div>
+    </div>
+  </div>
 </template>
 
 <script>
-var Common = require("../../common/Common.js");
-var InfoUtil = require("./InfoUtil.js");
-var Pagination = require("../../vue-bootstrap-pagination/src/vue-bootstrap-pagination.vue").default;
-var PageSizeSelect = require("../../page-size-select/src/PageSizeSelect.vue").default;
+var Common = require('../../common/Common.js');
+var InfoUtil = require('./InfoUtil.js');
+var Pagination = require('../../vue-bootstrap-pagination/src/vue-bootstrap-pagination.vue').default;
+var PageSizeSelect = require('../../page-size-select/src/PageSizeSelect.vue').default;
 
 export default {
-    props: [
-        "infoWindowNo",     // 查询窗口编号
-        "infoGridFields",   // 表格字段
-        "infoWindowData",         // 渲染的数据
-        "isSelectedById",   // 方法:根据id判断数据是否被选中
-    ],
-
-    data: function () {
-        return {
-            dataList: [],
-            pagination: {
-                total: 0,
-                per_page: Common.pageSize,    // required
-                current_page: 1, // required
-                last_page: 10,    // required
-            },
-            sortStyle: '',
-            sortClause: '',
+
+  components: {
+    Pagination,
+    PageSizeSelect,
+  },
+  props: [
+    'infoWindowNo',     // 查询窗口编号
+    'infoGridFields',   // 表格字段
+    'infoWindowData',         // 渲染的数据
+    'isSelectedById',   // 方法:根据id判断数据是否被选中
+  ],
+
+  data: function () {
+    return {
+      dataList: [],
+      pagination: {
+        total: 0,
+        per_page: Common.pageSize,    // required
+        current_page: 1, // required
+        last_page: 10,    // required
+      },
+      sortStyle: '',
+      sortClause: '',
+    };
+  },
+
+  computed: {
+    /**
+         * 自动计算表格的宽度
+         * @author YangZhiJie 20210909
+         */
+    tableWidth: function () {
+      var totalWidth = 50;
+      if (this.infoGridFields !== undefined) {
+        this.infoGridFields.forEach(function (infoGridField) {
+          if (infoGridField.width !== undefined
+                        && infoGridField.width !== null
+                        && infoGridField.width !== '') {
+            totalWidth += Number(infoGridField.width);
+          }
+        });
+      }
+      return totalWidth + 'px';
+    },
+
+    /**
+         * 是否选择了全部的数据
+         * @author YangZhiJie 20210909
+         */
+    allSelected: function () {
+      var _self = this;
+      if (this.dataList === undefined || this.dataList === null || this.dataList.length == 0) {
+        return false;
+      }
+
+      for (let index = 0, length = this.dataList.length; index < length; index++) {
+        if (this.dataList[index].checked === false) {
+          return false;
         }
+      }
+
+      return true;
     },
+  },
 
-    components: {
-        Pagination,
-        PageSizeSelect,
+  watch: {
+
+    infoWindowData: function (newValue, oldValue) {
+      this.setDataList(newValue);
     },
 
-    methods: {
-        /**
+    dataList: {
+      handler: function(newValue, oldValue){
+        // 清除延迟执行
+        if(this.selectChangedTimeout !== undefined && this.selectChangedTimeout !== null){
+          window.clearTimeout(this.selectChangedTimeout);
+        }
+    
+        // 设置延迟执行
+        this.selectChangedTimeout = setTimeout(()=>{
+          console.log('selectChanged');
+          this.$emit('selectChanged', this.dataList);
+        }, 500);
+      },
+      deep: true,
+    },
+  },
+
+  methods: {
+    /**
          * 重新设置分页
          * 供外部组件调用
          * @author YangZhiJie 20210909
          */
-        resetPagination: function () {
-            this.pagination.current_page = 1;
-            this.pagination.last_page = 10;
-            this.pagination.total = 0;
-        },
+    resetPagination: function () {
+      this.pagination.current_page = 1;
+      this.pagination.last_page = 10;
+      this.pagination.total = 0;
+    },
 
-        /**
+    /**
          * 设置分页
          * @author YangZhiJie 20210909
          */
-        setPagination: function (total, lastPage) {
-            this.pagination.last_page = lastPage;
-            this.pagination.total = total;
-        },
+    setPagination: function (total, lastPage) {
+      this.pagination.last_page = lastPage;
+      this.pagination.total = total;
+    },
 
-        /**
+    /**
          * 获取查询参数
          * 供外部组件调用
          * @author YangZhiJie 20210909
          */
-        getQueryParam: function () {
-            return {
-                infoWindowNo: this.infoWindowNo,
-                start: (this.pagination.current_page - 1) * this.pagination.per_page,
-                length: this.pagination.per_page,
-                sortClause: this.sortClause,
-            }
-        },
-
-        /**
+    getQueryParam: function () {
+      return {
+        infoWindowNo: this.infoWindowNo,
+        start: (this.pagination.current_page - 1) * this.pagination.per_page,
+        length: this.pagination.per_page,
+        sortClause: this.sortClause,
+      };
+    },
+
+    /**
          * 页码数量改变
          * @author YangZhiJie 20210909
          */
-        gridSizeSelect: function (newPageSize) {
-            this.pagination.per_page = newPageSize;
-            this.pagination.current_page = 1;
-        },
+    gridSizeSelect: function (newPageSize) {
+      this.pagination.per_page = newPageSize;
+      this.pagination.current_page = 1;
+    },
 
-        /**
+    /**
          * 列开始拖动
          * @author YangZhiJie 20210909
          */
-        ondragstart: function (event, gridFieldItem) {
-            var _self = this;
-            _self.startX = event.pageX;
-            _self.startWidth = Number(gridFieldItem.width);
-            event.dataTransfer.setDragImage(event.target, 0, 20);
-            event.dataTransfer.effectAllowed = 'move';
-        },
-
-        /**
+    ondragstart: function (event, gridFieldItem) {
+      var _self = this;
+      _self.startX = event.pageX;
+      _self.startWidth = Number(gridFieldItem.width);
+      event.dataTransfer.setDragImage(event.target, 0, 20);
+      event.dataTransfer.effectAllowed = 'move';
+    },
+
+    /**
          * 列拖动
          * @author YangZhiJie 20210909
          */
-        ondrag: function (event, gridFieldItem) {
-            var _self = this;
-            gridFieldItem.width = _self.startWidth + (event.pageX - _self.startX);
-        },
+    ondrag: function (event, gridFieldItem) {
+      var _self = this;
+      gridFieldItem.width = _self.startWidth + (event.pageX - _self.startX);
+    },
 
 
-        /**
+    /**
          * 列结束拖动
          * @author YangZhiJie 20210909
          */
-        ondragend: function (event, gridFieldItem, index) {
-            var _self = this;
+    ondragend: function (event, gridFieldItem, index) {
+      var _self = this;
 
-            let newWidth = _self.startWidth + (event.pageX - _self.startX);
-            if (newWidth < 50) {
-                newWidth = 50;
-            }
-            gridFieldItem.width = newWidth;
+      let newWidth = _self.startWidth + (event.pageX - _self.startX);
+      if (newWidth < 50) {
+        newWidth = 50;
+      }
+      gridFieldItem.width = newWidth;
 
-            gridFieldItem.width = gridFieldItemClone.width;
-            InfoUtil.saveInfoGridFields(_self.infoWindowDto.no, _self.infoGridFields);
+      //gridFieldItem.width = gridFieldItemClone.width;
+      InfoUtil.saveInfoGridFields(_self.infoWindowDto.no, _self.infoGridFields);
             
-        },
+    },
 
-        ondragover: function (event, gridFieldItem) {
-            event.preventDefault()
-            event.dataTransfer.dropEffect = 'move';
-        },
+    ondragover: function (event, gridFieldItem) {
+      event.preventDefault();
+      event.dataTransfer.dropEffect = 'move';
+    },
 
-        /**
+    /**
          * 排序
          * @author YangZhiJie 20210909
          */
-        onSort: function (infoGridField) {
-            var _self = this;
-            var fieldName = null;
-            if (infoGridField.sortFieldName != undefined && infoGridField.sortFieldName != "") {
-                fieldName = infoGridField.sortFieldName;
-            } else {
-                fieldName = infoGridField.fieldName;
-            }
-            _self.sortClause = fieldName + _self.sortStyle;
-
-            this.$emit("refreshSearch");
-
-            _self.sortStyle = ((_self.sortStyle === " ASC") ? " DESC" : " ASC");
-        },
-
-        /**
+    onSort: function (infoGridField) {
+      var _self = this;
+      var fieldName = null;
+      if (infoGridField.sortFieldName != undefined && infoGridField.sortFieldName != '') {
+        fieldName = infoGridField.sortFieldName;
+      } else {
+        fieldName = infoGridField.fieldName;
+      }
+      _self.sortClause = fieldName + _self.sortStyle;
+
+      this.$emit('refreshSearch');
+
+      _self.sortStyle = ((_self.sortStyle === ' ASC') ? ' DESC' : ' ASC');
+    },
+
+    /**
          * 发送查询请求
          * @author YangZhiJie 20210909
          */
-        refreshSearch: function(){
-            this.$emit("refreshSearch");
-        },
+    refreshSearch: function(){
+      this.$emit('refreshSearch');
+    },
 
-        /**
+    /**
          * 冻结表头
          * @author YangZhiJie 20210909
          */
-        fixedTableHeader: function () {
-            let _self = this;
-            _self.$nextTick(function () {
-                var $th = $('.table-fix-head').find('thead');
-                var $fixedCell = $('.table-fix-head').find('.fixed-cell');
-                $('.table-fix-head').on('scroll', function () {
-                    $th.css('transform', 'translateY(' + this.scrollTop + 'px)');
-                    $fixedCell.css('transform', 'translateX(' + this.scrollLeft + 'px)');
-                });
-            });
-        },
-
-
-        /**
+    fixedTableHeader: function () {
+      let _self = this;
+      _self.$nextTick(function () {
+        var $th = $('.table-fix-head').find('thead');
+        var $fixedCell = $('.table-fix-head').find('.fixed-cell');
+        $('.table-fix-head').on('scroll', function () {
+          $th.css('transform', 'translateY(' + this.scrollTop + 'px)');
+          $fixedCell.css('transform', 'translateX(' + this.scrollLeft + 'px)');
+        });
+      });
+    },
+
+
+    /**
          * 表格中填写的值发生了改变
          * @author YangZhiJie 20210909
          */
-        valueChange: function (event, rowData, infoGridField) {
-            var _self = this;
-            var value = event.target.value;
-            const fieldName = infoGridField.fieldName;
-            if (rowData.data[fieldName] == undefined) {
-                var tempFieldValue = {
-                    displayValue: [value]
-                };
-                this.$set(rowData.data, fieldName, tempFieldValue);
-            } else {
-                this.$set(rowData.data[fieldName].displayValue, 0, value);
-            }
-            rowData.checked = true;
-        },
-
-        /**
+    valueChange: function (event, rowData, infoGridField) {
+      var _self = this;
+      var value = event.target.value;
+      const fieldName = infoGridField.fieldName;
+      if (rowData.data[fieldName] == undefined) {
+        var tempFieldValue = {
+          displayValue: [value],
+        };
+        this.$set(rowData.data, fieldName, tempFieldValue);
+      } else {
+        this.$set(rowData.data[fieldName].displayValue, 0, value);
+      }
+      rowData.checked = true;
+    },
+
+    /**
          * 获取显示的值
          * @author YangZhiJie 20210909
          */
-        getDisplayValue(rowData, infoGridField) {
-            let fieldValue = rowData.data[infoGridField.fieldName];
-            if (fieldValue === undefined || fieldValue === null) {
-                return "";
-            } else {
-                return fieldValue.displayValue[0];
-            }
-        },
+    getDisplayValue(rowData, infoGridField) {
+      let fieldValue = rowData.data[infoGridField.fieldName];
+      if (fieldValue === undefined || fieldValue === null) {
+        return '';
+      } else {
+        return fieldValue.displayValue[0];
+      }
+    },
 
 
-        /**
+    /**
          * 选择所有/取消选择的数据
          * @author YangZhiJie 20210909
          */
-        selectAll: function (event) {
-            var isChecked = event.currentTarget.checked;
+    selectAll: function (event) {
+      var isChecked = event.currentTarget.checked;
 
-            if (this.dataList === undefined || this.dataList === null || this.dataList.length == 0) {
-                return;
-            }
+      if (this.dataList === undefined || this.dataList === null || this.dataList.length == 0) {
+        return;
+      }
 
-            for (let index = 0, length = this.dataList.length; index < length; index++) {
-                this.dataList[index].checked = isChecked;
-            }
-        },
+      for (let index = 0, length = this.dataList.length; index < length; index++) {
+        this.dataList[index].checked = isChecked;
+      }
+    },
 
-        /**
+    /**
          * 设置dataList数据
          * @author YangZhiJie 20210908
          */
-        setDataList: function (dataList) {
-            let _self = this;
-            if (dataList === null || dataList === undefined) {
-                this.dataList.splice(0, this.dataList.length);
-                return;
-            }
-            if (!Array.isArray(dataList)) {
-                console.error("参数异常,参数不是数组类型。");
-                console.error(dataList);
-                return;
-            }
-
-            const tempDataList = JSON.parse(JSON.stringify(dataList));
-            for (let index = 0, length = tempDataList.length; index < length; index++) {
-                if(this.isSelectedById != null){
-                    tempDataList[index].checked = this.isSelectedById(tempDataList[index].id);
-                }else{
-                    tempDataList[index].checked = false;
-                }
-            }
-
-            this.dataList = tempDataList;
-
-            this.$nextTick(function(){
-                _self.fixedTableHeader();
-            });
+    setDataList: function (dataList) {
+      let _self = this;
+      if (dataList === null || dataList === undefined) {
+        this.dataList.splice(0, this.dataList.length);
+        return;
+      }
+      if (!Array.isArray(dataList)) {
+        console.error('参数异常,参数不是数组类型。');
+        console.error(dataList);
+        return;
+      }
+
+      const tempDataList = JSON.parse(JSON.stringify(dataList));
+      for (let index = 0, length = tempDataList.length; index < length; index++) {
+        if(this.isSelectedById != null){
+          tempDataList[index].checked = this.isSelectedById(tempDataList[index].id);
+        }else{
+          tempDataList[index].checked = false;
         }
-    },
+      }
 
-    computed: {
-        /**
-         * 自动计算表格的宽度
-         * @author YangZhiJie 20210909
-         */
-        tableWidth: function () {
-            var totalWidth = 50;
-            if (this.infoGridFields !== undefined) {
-                this.infoGridFields.forEach(function (infoGridField) {
-                    if (infoGridField.width !== undefined
-                        && infoGridField.width !== null
-                        && infoGridField.width !== '') {
-                        totalWidth += Number(infoGridField.width);
-                    }
-                });
-            }
-            return totalWidth + "px";
-        },
-
-        /**
-         * 是否选择了全部的数据
-         * @author YangZhiJie 20210909
-         */
-        allSelected: function () {
-            var _self = this;
-            if (this.dataList === undefined || this.dataList === null || this.dataList.length == 0) {
-                return false;
-            }
-
-            for (let index = 0, length = this.dataList.length; index < length; index++) {
-                if (this.dataList[index].checked === false) {
-                    return false;
-                }
-            }
-
-            return true;
-        },
-    },
+      this.dataList = tempDataList;
 
-    watch: {
-
-        infoWindowData: function (newValue, oldValue) {
-            this.setDataList(newValue);
-        },
-
-        dataList: {
-            handler: function(newValue, oldValue){
-                // 清除延迟执行
-                if(this.selectChangedTimeout !== undefined && this.selectChangedTimeout !== null){
-                    window.clearTimeout(this.selectChangedTimeout);
-                }
-    
-                // 设置延迟执行
-                this.selectChangedTimeout = setTimeout(()=>{
-                    console.log('selectChanged');
-                    this.$emit("selectChanged", this.dataList);
-                }, 500);
-            },
-            deep: true
-        }
-    }
-}
+      this.$nextTick(function(){
+        _self.fixedTableHeader();
+      });
+    },
+  },
+};
 </script>
 
 <style scoped>

+ 1 - 1
packages/process/index.js

@@ -2,7 +2,7 @@
 import ProcessReport from './src/ProcessReport.vue';
 
 ProcessReport.install = function(Vue) {
-    Vue.component(ProcessReport.name, ProcessReport);
+  Vue.component(ProcessReport.name, ProcessReport);
 };
 
 export default ProcessReport;

+ 1 - 1
packages/process/process-report-result-preview.js

@@ -2,7 +2,7 @@
 import ProcessReportResultPreview from './src/ProcessReportResultPreview.vue';
 
 ProcessReportResultPreview.install = function(Vue) {
-    Vue.component(ProcessReportResultPreview.name, ProcessReportResultPreview);
+  Vue.component(ProcessReportResultPreview.name, ProcessReportResultPreview);
 };
 
 export default ProcessReportResultPreview;

+ 1 - 1
packages/process/process-report-result.js

@@ -2,7 +2,7 @@
 import ProcessReportResult from './src/ProcessReportResult.vue';
 
 ProcessReportResult.install = function(Vue) {
-    Vue.component(ProcessReportResult.name, ProcessReportResult);
+  Vue.component(ProcessReportResult.name, ProcessReportResult);
 };
 
 export default ProcessReportResult;

+ 2 - 2
webpack.lib.js

@@ -10,8 +10,8 @@ module.exports = WebpackMerge.merge(baseConfig,{
   output: {
     path: path.resolve(__dirname, './dist'),
     publicPath: '/dist/',
-    filename: 'pc-client-component.js',
-    library: "pc-client-component",
+    filename: 'pc-component-v3.js',
+    library: "pc-component-v3",
     libraryTarget: "umd",
     umdNamedDefine: true
   },