htui-yllkbz 1.3.14 → 1.3.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/htui.umd.js CHANGED
@@ -12321,8 +12321,8 @@ PageInfo.install = function (Vue) {
12321
12321
  };
12322
12322
 
12323
12323
  /* harmony default export */ var packages_PageInfo = (PageInfo);
12324
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"48d53131-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/HtTable/index.vue?vue&type=template&id=fb8c90a6&scoped=true&
12325
- var HtTablevue_type_template_id_fb8c90a6_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{directives:[{name:"loading",rawName:"v-loading",value:(_vm.state.loading),expression:"state.loading"}],staticStyle:{"background":"#fff"}},[_c('article',[_c('el-table',{ref:"comTable",attrs:{"height":_vm.height,"max-height":_vm.maxHeight,"border":_vm.border,"stripe":_vm.stripe!==undefined?_vm.stripe:true,"size":_vm.size||'small',"fit":_vm.fit,"header-row-style":_vm.headerRowStyle||{'background':'var(--primary-92)'},"header-row-class-name":_vm.headerRowClassName,"header-cell-class-name":_vm.headerCellClassName,"header-cell-style":_vm.headerCellStyle,"show-header":_vm.showHeader,"empty-text":_vm.emptyText||'暂无数据',"row-style":_vm.rowStyle,"row-class-name":_vm.rowClassName,"current-row-key":_vm.currentRowKey,"highlight-current-row":_vm.highlightCurrentRow,"row-key":_vm.rowKey||'id',"data":_vm.data,"tooltip-effect":"dark"},on:{"row-click":function (row, column, event){ return _vm.$emit('row-click',row, column, event); },"row-contextmenu":function (row, column, event){ return _vm.$emit('row-contextmenu',row, column, event); },"row-dblclick":function (row, column, event){ return _vm.$emit('row-dblclick',row, column, event); },"header-click":function ( column, event){ return _vm.$emit('header-click', column, event); },"header-contextmenu":function ( column, event){ return _vm.$emit('header-contextmenu', column, event); },"sort-change":function (ref){
12324
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"48d53131-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/HtTable/index.vue?vue&type=template&id=5eb1d6b8&scoped=true&
12325
+ var HtTablevue_type_template_id_5eb1d6b8_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{directives:[{name:"loading",rawName:"v-loading",value:(_vm.state.loading),expression:"state.loading"}],staticStyle:{"background":"#fff"}},[_c('article',[_c('el-table',{ref:"comTable",attrs:{"height":_vm.height,"max-height":_vm.maxHeight,"border":_vm.border,"stripe":_vm.stripe!==undefined?_vm.stripe:true,"size":_vm.size||'small',"fit":_vm.fit,"header-row-style":_vm.headerRowStyle||{'background':'var(--primary-92)'},"header-row-class-name":_vm.headerRowClassName,"header-cell-class-name":_vm.headerCellClassName,"header-cell-style":_vm.headerCellStyle,"show-header":_vm.showHeader,"empty-text":_vm.emptyText||'暂无数据',"row-style":_vm.rowStyle,"row-class-name":_vm.rowClassName,"current-row-key":_vm.currentRowKey,"highlight-current-row":_vm.highlightCurrentRow,"row-key":_vm.rowKey||'id',"data":_vm.data,"tooltip-effect":"dark"},on:{"row-click":function (row, column, event){ return _vm.$emit('row-click',row, column, event); },"row-contextmenu":function (row, column, event){ return _vm.$emit('row-contextmenu',row, column, event); },"row-dblclick":function (row, column, event){ return _vm.$emit('row-dblclick',row, column, event); },"header-click":function ( column, event){ return _vm.$emit('header-click', column, event); },"header-contextmenu":function ( column, event){ return _vm.$emit('header-contextmenu', column, event); },"sort-change":function (ref){
12326
12326
  var column = ref.column;
12327
12327
  var prop = ref.prop;
12328
12328
  var order = ref.order;
@@ -12343,10 +12343,10 @@ return [_vm._t('header_'+item.key,[_vm._v(_vm._s(item.title))],{"column":column,
12343
12343
  var node = ref.node;
12344
12344
  var data = ref.data;
12345
12345
  return _c('span',{staticClass:"custom-tree-node"},[_vm._t('header_'+data.key,[_vm._v(_vm._s(data.title)),_c('span',{staticStyle:{"color":"#C0C4CC"}},[_vm._v(_vm._s(data.property?("(" + (data.property) + ")"):''))])],{"column":data})],2)}}],null,true)})],1)],1),_c('span',{attrs:{"slot":"footer"},slot:"footer"},[_c('el-button',{attrs:{"type":"primary"},on:{"click":_vm.confirmSortAndshow}},[_vm._v("确定")]),_c('el-button',{on:{"click":function($event){_vm.state.visibleFilter=false}}},[_vm._v("取消")]),_c('el-button',{on:{"click":_vm.resetColumn}},[_vm._v("重置")])],1)]),_c('el-dialog',{attrs:{"visible":_vm.state.visibleFile,"title":"附件查看","append-to-body":true,"close-on-click-modal":true,"width":"400px","center":true},on:{"update:visible":function($event){return _vm.$set(_vm.state, "visibleFile", $event)}}},[_c('p',{staticStyle:{"font-weight":"700","font-size":"18px","float":"left","margin":"0"},attrs:{"slot":"title"},slot:"title"},[_vm._v("附件查看")]),_c('div',{staticStyle:{"overflow":"hidden","height":"calc(30vh)"}},[_c('el-scrollbar',{staticStyle:{"height":"calc(100% + 17px)"}},[_c('HtUploadFiles',{attrs:{"disabled":true},model:{value:(_vm.state.files),callback:function ($$v) {_vm.$set(_vm.state, "files", $$v)},expression:"state.files"}})],1)],1)])],1)}
12346
- var HtTablevue_type_template_id_fb8c90a6_scoped_true_staticRenderFns = []
12346
+ var HtTablevue_type_template_id_5eb1d6b8_scoped_true_staticRenderFns = []
12347
12347
 
12348
12348
 
12349
- // CONCATENATED MODULE: ./src/packages/HtTable/index.vue?vue&type=template&id=fb8c90a6&scoped=true&
12349
+ // CONCATENATED MODULE: ./src/packages/HtTable/index.vue?vue&type=template&id=5eb1d6b8&scoped=true&
12350
12350
 
12351
12351
  // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.concat.js
12352
12352
  var es_array_concat = __webpack_require__("99af");
@@ -12704,13 +12704,23 @@ var HtUploadFiles_component = normalizeComponent(
12704
12704
  )
12705
12705
 
12706
12706
  /* harmony default export */ var packages_HtUploadFiles = (HtUploadFiles_component.exports);
12707
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/ts-loader??ref--14-3!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/HtTable/index.vue?vue&type=script&lang=ts&
12707
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"48d53131-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/HtShowBaseData/index.vue?vue&type=template&id=3e20df09&scoped=true&
12708
+ var HtShowBaseDatavue_type_template_id_3e20df09_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"show-common-item"},[(_vm.timeStr)?[_c('span',[_vm._v(" "+_vm._s(_vm.timeFormat)+" ")])]:_vm._e(),(_vm.departmentId)?_vm._l((_vm.departmentData),function(item){return _c('span',{key:item,staticClass:"item"},[_vm._v(" "+_vm._s(_vm.getorgById(item).displayName || _vm.empty)+" ")])}):_vm._e(),(_vm.userId)?_vm._l((_vm.userData),function(item){return _c('span',{key:item.id,staticClass:"item"},[_vm._v(" "+_vm._s(item.value || _vm.empty)+" ")])}):_vm._e(),(_vm.roleId)?_vm._l((_vm.roleData),function(item){return _c('span',{key:item.id,staticClass:"item"},[_vm._v(" "+_vm._s(item.name || _vm.empty)+" ")])}):_vm._e(),(_vm.baseDataId)?[(_vm.baseDataItem[_vm.baseDataId])?_c('span',{staticClass:"item"},[_vm._v(" "+_vm._s(_vm.state.text)+" ")]):_c('span',[_vm._v(" "+_vm._s(_vm.empty))])]:_vm._e(),(_vm.baseDataValue)?[(_vm.baseDataItem[_vm.baseDataValue])?_c('span',{staticClass:"item"},[_vm._v(" "+_vm._s(_vm.baseDataItem[_vm.baseDataValue].name || _vm.empty)+" "),(_vm.baseDataInfo&&!_vm.hideCode)?_c('span',[_vm._v(" ("+_vm._s(_vm.baseDataItem[_vm.baseDataValue].value || _vm.empty)+") ")]):_vm._e()]):_c('span',[_vm._v(" "+_vm._s(_vm.empty))])]:_vm._e(),(_vm.baseDataName)?[(_vm.baseDataItem[_vm.baseDataName])?_c('span',{staticClass:"item"},[_vm._v(" "+_vm._s(_vm.baseDataItem[_vm.baseDataName].name || _vm.empty)+" "),(_vm.baseDataInfo&&!_vm.hideCode)?_c('span',[_vm._v(" ("+_vm._s(_vm.baseDataItem[_vm.baseDataName].value || _vm.empty)+") ")]):_vm._e()]):_c('span',[_vm._v(" "+_vm._s(_vm.empty))])]:_vm._e()],2)}
12709
+ var HtShowBaseDatavue_type_template_id_3e20df09_scoped_true_staticRenderFns = []
12708
12710
 
12709
12711
 
12712
+ // CONCATENATED MODULE: ./src/packages/HtShowBaseData/index.vue?vue&type=template&id=3e20df09&scoped=true&
12710
12713
 
12714
+ // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.find.js
12715
+ var es_array_find = __webpack_require__("7db0");
12711
12716
 
12717
+ // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.slice.js
12718
+ var es_array_slice = __webpack_require__("fb6a");
12712
12719
 
12720
+ // EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.starts-with.js
12721
+ var es_string_starts_with = __webpack_require__("2ca0");
12713
12722
 
12723
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/ts-loader??ref--14-3!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/HtShowBaseData/index.vue?vue&type=script&lang=ts&
12714
12724
 
12715
12725
 
12716
12726
 
@@ -12726,198 +12736,516 @@ var HtUploadFiles_component = normalizeComponent(
12726
12736
 
12727
12737
 
12728
12738
 
12729
- var HtTablevue_type_script_lang_ts_HtTable = /*#__PURE__*/function (_Vue) {
12730
- _inherits(HtTable, _Vue);
12731
12739
 
12732
- var _super = _createSuper(HtTable);
12733
12740
 
12734
- function HtTable() {
12741
+
12742
+
12743
+
12744
+
12745
+ var HtShowBaseDatavue_type_script_lang_ts_CommonDatas = /*#__PURE__*/function (_Vue) {
12746
+ _inherits(CommonDatas, _Vue);
12747
+
12748
+ var _super = _createSuper(CommonDatas);
12749
+
12750
+ function CommonDatas() {
12735
12751
  var _this;
12736
12752
 
12737
- _classCallCheck(this, HtTable);
12753
+ _classCallCheck(this, CommonDatas);
12738
12754
 
12739
12755
  _this = _super.apply(this, arguments);
12756
+ /** 人员 */
12757
+
12758
+ /** 数据 */
12759
+
12740
12760
  _this.state = {
12741
- loading: false,
12742
- files: undefined,
12743
- pageInfo: {
12744
- currentPage: 1,
12745
- pageSize: 10,
12746
- skipCount: 0,
12747
- totalCount: 0
12761
+ text: "",
12762
+ resData: {
12763
+ baseData: {
12764
+ items: []
12765
+ },
12766
+ dictionaryCategory: {
12767
+ items: []
12768
+ },
12769
+ dictionaryData: [],
12770
+ severityLevel: [],
12771
+ organizationUnit: [],
12772
+ organizationUsersTree: [],
12773
+ users: {
12774
+ items: []
12775
+ },
12776
+ SessionState: "",
12777
+ userInOrganiza: [],
12778
+ organizationUsers: {},
12779
+ roleList: []
12748
12780
  },
12749
- showColumns: [],
12750
- allColumns: [],
12751
- currentColumn: undefined,
12752
- visibleFilter: false,
12753
- visibleFile: false,
12754
- showColumnKeys: [],
12755
- checkedColumnKeys: []
12781
+ baseDataItem: {}
12756
12782
  };
12757
12783
  return _this;
12758
12784
  }
12785
+ /** 生命周期 */
12759
12786
 
12760
- _createClass(HtTable, [{
12787
+
12788
+ _createClass(CommonDatas, [{
12761
12789
  key: "created",
12762
12790
  value: function created() {
12763
- this.setPageInfo(this.pageInfo); //this.setColumns(this.columns);
12791
+ if (!accountConst.getLoginState()) {
12792
+ return;
12793
+ }
12764
12794
 
12765
- if (this.uuId) {
12766
- //通过uuid获取缓存起来的header显示信息
12767
- //-todo
12768
- //---columns 要改变
12769
- //---showColumnKeys 要改变
12770
- //---排列顺序要改变 todo
12771
- var allColumns = window.localStorage.getItem("table_" + this.uuId);
12795
+ var data = window.localStorage.getItem("commonDatas");
12772
12796
 
12773
- if (allColumns) {
12774
- this.state.allColumns = JSON.parse(allColumns);
12775
- this.state.showColumns = JSON.parse(allColumns);
12776
- this.getShowKeys(this.state.allColumns);
12777
- } else {
12778
- if (this.configShow) {
12779
- this.columns.forEach(function (item) {
12780
- return item.checked = !!item.deafaultShow;
12781
- });
12782
- this.creatInitColumnKey(this.columns);
12783
- } else {
12784
- this.creatInitColumnKey(this.columns || []);
12785
- }
12786
- }
12787
- } else {
12788
- if (this.configShow) {
12789
- this.columns.forEach(function (item) {
12790
- return item.checked = !!item.deafaultShow;
12791
- });
12792
- this.creatInitColumnKey(this.columns);
12793
- } else {
12794
- this.creatInitColumnKey(this.columns || []);
12795
- }
12797
+ if (data) {
12798
+ this.state.resData = Object.assign(this.state.resData, JSON.parse(data));
12796
12799
  }
12797
12800
 
12798
- console.log("this.columns", this.columns);
12801
+ var _this$state$resData$b = this.state.resData.baseData.items,
12802
+ items = _this$state$resData$b === void 0 ? [] : _this$state$resData$b;
12803
+ this.getBaseDataItem(items);
12804
+ this.setText();
12799
12805
  }
12800
- }, {
12801
- key: "resetColumn",
12802
- value: function resetColumn() {
12803
- if (this.configShow) {
12804
- this.columns.forEach(function (item) {
12805
- item.checked = !!item.deafaultShow;
12806
- });
12807
- this.creatInitColumnKey(this.columns);
12808
- } else {
12809
- this.creatInitColumnKey(this.columns || []);
12810
- }
12811
-
12812
- this.state.visibleFilter = false;
12806
+ /** 方法 */
12813
12807
 
12814
- if (this.uuId) {
12815
- window.localStorage.setItem("table_" + this.uuId, JSON.stringify(this.columns || []));
12816
- }
12817
- }
12818
- /** 获取展示的keys值 */
12808
+ /** 根据id获取用户部门 */
12819
12809
 
12820
12810
  }, {
12821
- key: "getShowKeys",
12822
- value: function getShowKeys(data) {
12823
- var arr = [];
12824
- data.forEach(function (item) {
12825
- if (item.checked) {
12826
- arr.push(item.key);
12827
- }
12828
- });
12829
- this.state.showColumnKeys = arr;
12811
+ key: "getorgById",
12812
+ value: function getorgById(id) {
12813
+ return this.state.resData.organizationUnit.find(function (val) {
12814
+ return val.id == id;
12815
+ }) || {};
12830
12816
  }
12831
- /** 初始化columns */
12817
+ /** 递归处理基础数据 */
12832
12818
 
12833
12819
  }, {
12834
- key: "creatInitColumnKey",
12835
- value: function creatInitColumnKey(columns) {
12820
+ key: "getBaseDataItem",
12821
+ value: function getBaseDataItem(list) {
12836
12822
  var _this2 = this;
12837
12823
 
12838
- this.state.allColumns = columns;
12839
- this.state.showColumns = columns;
12840
- this.state.allColumns.forEach(function (item) {
12841
- item.checked = item.checked === false ? false : true;
12842
- });
12843
- this.$nextTick(function () {
12844
- _this2.$refs.comTable.doLayout(); // el-table加ref="comTable"
12824
+ // const list = this.state.resData.baseData.items || []
12825
+ list.forEach(function (item) {
12826
+ _this2.state.baseDataItem[item.id || ""] = item;
12827
+ _this2.state.baseDataItem[item.value || ""] = item;
12828
+ _this2.state.baseDataItem[item.name || ""] = item;
12845
12829
 
12830
+ if (item.children) {
12831
+ _this2.getBaseDataItem(item.children);
12832
+ }
12846
12833
  });
12847
- this.getShowKeys(this.state.allColumns);
12848
12834
  }
12849
- /** 展示附件信息 */
12835
+ /** 获取节点相关的所有父节点信息--只针对基础数据 */
12850
12836
 
12851
12837
  }, {
12852
- key: "showFiles",
12853
- value: function showFiles() {
12854
- var val = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
12855
- this.state.files = val;
12856
- this.state.visibleFile = true;
12857
- }
12858
- }, {
12859
- key: "handleDragStart",
12860
- value: function handleDragStart(node) {
12861
- this.state.currentColumn = node.data;
12862
- }
12863
- }, {
12864
- key: "handleDragEnter",
12865
- value: function handleDragEnter() {// console.log("tree drag enter: ", dropNode.label);
12866
- }
12867
- }, {
12868
- key: "handleDragLeave",
12869
- value: function handleDragLeave() {//console.log("tree drag leave: ", dropNode.label);
12870
- }
12871
- }, {
12872
- key: "handleDragOver",
12873
- value: function handleDragOver() {// console.log("tree drag over: ", dropNode.label);
12874
- }
12875
- }, {
12876
- key: "handleDragEnd",
12877
- value: function handleDragEnd(draggingNode, dropNode, dropType) {
12878
- var _this3 = this;
12838
+ key: "setAllLevel",
12839
+ value: function setAllLevel(id) {
12840
+ var baseDataItem = this.state.baseDataItem;
12841
+ var hideCode = this.hideCode;
12842
+ var text = "";
12879
12843
 
12880
- var _this$state = this.state,
12881
- showColumns = _this$state.showColumns,
12882
- currentColumn = _this$state.currentColumn,
12883
- checkedColumnKeys = _this$state.checkedColumnKeys; // if ((dropType === "before" || dropType === "after") && currentColumn) {
12884
- // const data = showColumns.filter(
12885
- // (item) => item.key !== currentColumn?.key
12886
- // );
12887
- // const index = data.findIndex((item) => item.key === dropNode.data.key);
12888
- // dropType === "before"
12889
- // ? data.splice(index, 0, currentColumn)
12890
- // : data.splice(index + 1, 0, currentColumn);
12844
+ if (baseDataItem[id]) {
12845
+ if (hideCode) {
12846
+ text = "".concat(baseDataItem[id].name || "");
12847
+ } else {
12848
+ text = "".concat(baseDataItem[id].name || "", "(").concat(baseDataItem[id].value, ")");
12849
+ }
12891
12850
 
12892
- if (currentColumn && checkedColumnKeys.includes(currentColumn.key)) {
12893
- setTimeout(function () {
12894
- _this3.$refs.tree.setChecked(currentColumn, true);
12895
- }, 0);
12851
+ if (baseDataItem[id].parentId && this.showAllLevel) {
12852
+ var tempText = this.setAllLevel(baseDataItem[id]["parentId"]);
12853
+ text = "".concat(tempText, "/").concat(text);
12854
+ }
12896
12855
  }
12856
+
12857
+ return text;
12897
12858
  }
12898
12859
  }, {
12899
- key: "handleDrop",
12900
- value: function handleDrop() {// console.log("tree drop: ", dropNode, dropType);
12860
+ key: "setText",
12861
+ value: function setText() {
12862
+ if (this.baseDataId) {
12863
+ var tempText = this.setAllLevel(this.baseDataId);
12864
+ this.state.text = tempText;
12865
+ }
12901
12866
  }
12902
- /** 节点是否被插入 */
12867
+ /** 计算属性 */
12903
12868
 
12904
- }, {
12905
- key: "allowDrop",
12906
- value: function allowDrop(draggingNode, dropNode, type) {
12907
- return type !== "inner";
12908
- }
12909
- /** 节点是否允许拖动 */
12869
+ /** 基础数据 */
12910
12870
 
12911
12871
  }, {
12912
- key: "allowDrag",
12913
- value: function allowDrag(draggingNode) {
12914
- return !draggingNode.data.disabled;
12872
+ key: "baseDataItem",
12873
+ get: function get() {
12874
+ return this.state.baseDataItem || {};
12915
12875
  }
12916
- /** 处理table里面根据字段获取对应的值 */
12876
+ /** 获取严重等级 */
12917
12877
 
12918
12878
  }, {
12919
- key: "getPropByPath",
12920
- value: function getPropByPath(obj, path) {
12879
+ key: "SeverityLevel",
12880
+ get: function get() {
12881
+ return this.state.resData.severityLevel || [];
12882
+ }
12883
+ /** 获取用户数据 */
12884
+
12885
+ }, {
12886
+ key: "userDataList",
12887
+ get: function get() {
12888
+ return this.state.resData.users.items || [];
12889
+ }
12890
+ /** 根据id获取用户数据 */
12891
+
12892
+ }, {
12893
+ key: "userData",
12894
+ get: function get() {
12895
+ if (!this.userId) {
12896
+ return [];
12897
+ }
12898
+
12899
+ if (this.state.resData.users.items) {
12900
+ var ids = JSON.parse(this.userId);
12901
+ var data = this.state.resData.users.items.filter(function (val) {
12902
+ return ids.includes(val.id);
12903
+ });
12904
+ return data;
12905
+ } else {
12906
+ return [];
12907
+ }
12908
+ }
12909
+ /** 根据id获取角色数据 */
12910
+
12911
+ }, {
12912
+ key: "roleData",
12913
+ get: function get() {
12914
+ if (!this.roleId) {
12915
+ return [];
12916
+ }
12917
+
12918
+ if (this.state.resData.roleList) {
12919
+ var ids = JSON.parse(this.roleId);
12920
+ var data = this.state.resData.roleList.filter(function (val) {
12921
+ return ids.includes(val.id || "");
12922
+ });
12923
+ return data;
12924
+ } else {
12925
+ return [];
12926
+ }
12927
+ }
12928
+ /** 根据id获取部门数据 */
12929
+
12930
+ }, {
12931
+ key: "departmentData",
12932
+ get: function get() {
12933
+ if (!this.departmentId) {
12934
+ return [];
12935
+ }
12936
+
12937
+ var ids = JSON.parse(this.departmentId);
12938
+ return ids;
12939
+ }
12940
+ /** 时间格式 */
12941
+
12942
+ }, {
12943
+ key: "timeFormat",
12944
+ get: function get() {
12945
+ if (this.timeStr && this.timeStr.startsWith("0")) {
12946
+ return this.empty;
12947
+ } else {
12948
+ var _this$timeStr;
12949
+
12950
+ return ((_this$timeStr = this.timeStr) === null || _this$timeStr === void 0 ? void 0 : _this$timeStr.replace(/T/, " ").slice(0, 19)) || this.empty;
12951
+ }
12952
+ }
12953
+ }]);
12954
+
12955
+ return CommonDatas;
12956
+ }(external_commonjs_vue_commonjs2_vue_root_Vue_default.a);
12957
+
12958
+ __decorate([Prop({
12959
+ default: ""
12960
+ })], HtShowBaseDatavue_type_script_lang_ts_CommonDatas.prototype, "empty", void 0);
12961
+
12962
+ __decorate([Prop()], HtShowBaseDatavue_type_script_lang_ts_CommonDatas.prototype, "userId", void 0);
12963
+
12964
+ __decorate([Prop()], HtShowBaseDatavue_type_script_lang_ts_CommonDatas.prototype, "showAllLevel", void 0);
12965
+
12966
+ __decorate([Prop()], HtShowBaseDatavue_type_script_lang_ts_CommonDatas.prototype, "hideCode", void 0);
12967
+
12968
+ __decorate([Prop()], HtShowBaseDatavue_type_script_lang_ts_CommonDatas.prototype, "roleId", void 0);
12969
+
12970
+ __decorate([Prop()], HtShowBaseDatavue_type_script_lang_ts_CommonDatas.prototype, "departmentId", void 0);
12971
+
12972
+ __decorate([Prop()], HtShowBaseDatavue_type_script_lang_ts_CommonDatas.prototype, "severityValue", void 0);
12973
+
12974
+ __decorate([Prop()], HtShowBaseDatavue_type_script_lang_ts_CommonDatas.prototype, "timeStr", void 0);
12975
+
12976
+ __decorate([Prop()], HtShowBaseDatavue_type_script_lang_ts_CommonDatas.prototype, "baseDataId", void 0);
12977
+
12978
+ __decorate([Prop()], HtShowBaseDatavue_type_script_lang_ts_CommonDatas.prototype, "baseDataValue", void 0);
12979
+
12980
+ __decorate([Prop()], HtShowBaseDatavue_type_script_lang_ts_CommonDatas.prototype, "baseDataName", void 0);
12981
+
12982
+ __decorate([Prop({
12983
+ default: false
12984
+ })], HtShowBaseDatavue_type_script_lang_ts_CommonDatas.prototype, "baseDataInfo", void 0);
12985
+
12986
+ __decorate([Watch("baseDataItem")], HtShowBaseDatavue_type_script_lang_ts_CommonDatas.prototype, "setText", null);
12987
+
12988
+ HtShowBaseDatavue_type_script_lang_ts_CommonDatas = __decorate([vue_class_component_esm({
12989
+ name: "HtShowBaseData"
12990
+ })], HtShowBaseDatavue_type_script_lang_ts_CommonDatas);
12991
+ /* harmony default export */ var HtShowBaseDatavue_type_script_lang_ts_ = (HtShowBaseDatavue_type_script_lang_ts_CommonDatas);
12992
+ // CONCATENATED MODULE: ./src/packages/HtShowBaseData/index.vue?vue&type=script&lang=ts&
12993
+ /* harmony default export */ var packages_HtShowBaseDatavue_type_script_lang_ts_ = (HtShowBaseDatavue_type_script_lang_ts_);
12994
+ // EXTERNAL MODULE: ./src/packages/HtShowBaseData/index.vue?vue&type=style&index=0&id=3e20df09&lang=scss&scoped=true&
12995
+ var HtShowBaseDatavue_type_style_index_0_id_3e20df09_lang_scss_scoped_true_ = __webpack_require__("d55d");
12996
+
12997
+ // CONCATENATED MODULE: ./src/packages/HtShowBaseData/index.vue
12998
+
12999
+
13000
+
13001
+
13002
+
13003
+
13004
+ /* normalize component */
13005
+
13006
+ var HtShowBaseData_component = normalizeComponent(
13007
+ packages_HtShowBaseDatavue_type_script_lang_ts_,
13008
+ HtShowBaseDatavue_type_template_id_3e20df09_scoped_true_render,
13009
+ HtShowBaseDatavue_type_template_id_3e20df09_scoped_true_staticRenderFns,
13010
+ false,
13011
+ null,
13012
+ "3e20df09",
13013
+ null
13014
+
13015
+ )
13016
+
13017
+ /* harmony default export */ var HtShowBaseData = (HtShowBaseData_component.exports);
13018
+ // CONCATENATED MODULE: ./src/packages/HtShowBaseData/index.ts
13019
+ /*
13020
+ * @Descripttion: 基础数据展示组件
13021
+ * @version:
13022
+ * @Author: hutao
13023
+ * @Date: 2022-04-12 17:34:51
13024
+ * @LastEditors: hutao
13025
+ * @LastEditTime: 2022-04-12 17:43:38
13026
+ */
13027
+
13028
+
13029
+ HtShowBaseData.install = function (Vue) {
13030
+ Vue.component("HtShowBaseData", HtShowBaseData);
13031
+ };
13032
+
13033
+ /* harmony default export */ var packages_HtShowBaseData = (HtShowBaseData);
13034
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/ts-loader??ref--14-3!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/HtTable/index.vue?vue&type=script&lang=ts&
13035
+
13036
+
13037
+
13038
+
13039
+
13040
+
13041
+
13042
+
13043
+
13044
+
13045
+
13046
+
13047
+
13048
+
13049
+
13050
+
13051
+
13052
+
13053
+
13054
+
13055
+
13056
+
13057
+ var HtTablevue_type_script_lang_ts_HtTable = /*#__PURE__*/function (_Vue) {
13058
+ _inherits(HtTable, _Vue);
13059
+
13060
+ var _super = _createSuper(HtTable);
13061
+
13062
+ function HtTable() {
13063
+ var _this;
13064
+
13065
+ _classCallCheck(this, HtTable);
13066
+
13067
+ _this = _super.apply(this, arguments);
13068
+ _this.state = {
13069
+ loading: false,
13070
+ files: undefined,
13071
+ pageInfo: {
13072
+ currentPage: 1,
13073
+ pageSize: 10,
13074
+ skipCount: 0,
13075
+ totalCount: 0
13076
+ },
13077
+ showColumns: [],
13078
+ allColumns: [],
13079
+ currentColumn: undefined,
13080
+ visibleFilter: false,
13081
+ visibleFile: false,
13082
+ showColumnKeys: [],
13083
+ checkedColumnKeys: []
13084
+ };
13085
+ return _this;
13086
+ }
13087
+
13088
+ _createClass(HtTable, [{
13089
+ key: "created",
13090
+ value: function created() {
13091
+ this.setPageInfo(this.pageInfo); //this.setColumns(this.columns);
13092
+
13093
+ if (this.uuId) {
13094
+ //通过uuid获取缓存起来的header显示信息
13095
+ //-todo
13096
+ //---columns 要改变
13097
+ //---showColumnKeys 要改变
13098
+ //---排列顺序要改变 todo
13099
+ var allColumns = window.localStorage.getItem("table_" + this.uuId);
13100
+
13101
+ if (allColumns) {
13102
+ this.state.allColumns = JSON.parse(allColumns);
13103
+ this.state.showColumns = JSON.parse(allColumns);
13104
+ this.getShowKeys(this.state.allColumns);
13105
+ } else {
13106
+ if (this.configShow) {
13107
+ this.columns.forEach(function (item) {
13108
+ return item.checked = !!item.deafaultShow;
13109
+ });
13110
+ this.creatInitColumnKey(this.columns);
13111
+ } else {
13112
+ this.creatInitColumnKey(this.columns || []);
13113
+ }
13114
+ }
13115
+ } else {
13116
+ if (this.configShow) {
13117
+ this.columns.forEach(function (item) {
13118
+ return item.checked = !!item.deafaultShow;
13119
+ });
13120
+ this.creatInitColumnKey(this.columns);
13121
+ } else {
13122
+ this.creatInitColumnKey(this.columns || []);
13123
+ }
13124
+ }
13125
+
13126
+ console.log("this.columns", this.columns);
13127
+ }
13128
+ }, {
13129
+ key: "resetColumn",
13130
+ value: function resetColumn() {
13131
+ if (this.configShow) {
13132
+ this.columns.forEach(function (item) {
13133
+ item.checked = !!item.deafaultShow;
13134
+ });
13135
+ this.creatInitColumnKey(this.columns);
13136
+ } else {
13137
+ this.creatInitColumnKey(this.columns || []);
13138
+ }
13139
+
13140
+ this.state.visibleFilter = false;
13141
+
13142
+ if (this.uuId) {
13143
+ window.localStorage.setItem("table_" + this.uuId, JSON.stringify(this.columns || []));
13144
+ }
13145
+ }
13146
+ /** 获取展示的keys值 */
13147
+
13148
+ }, {
13149
+ key: "getShowKeys",
13150
+ value: function getShowKeys(data) {
13151
+ var arr = [];
13152
+ data.forEach(function (item) {
13153
+ if (item.checked) {
13154
+ arr.push(item.key);
13155
+ }
13156
+ });
13157
+ this.state.showColumnKeys = arr;
13158
+ }
13159
+ /** 初始化columns */
13160
+
13161
+ }, {
13162
+ key: "creatInitColumnKey",
13163
+ value: function creatInitColumnKey(columns) {
13164
+ var _this2 = this;
13165
+
13166
+ this.state.allColumns = columns;
13167
+ this.state.showColumns = columns;
13168
+ this.state.allColumns.forEach(function (item) {
13169
+ item.checked = item.checked === false ? false : true;
13170
+ });
13171
+ this.$nextTick(function () {
13172
+ _this2.$refs.comTable.doLayout(); // el-table加ref="comTable"
13173
+
13174
+ });
13175
+ this.getShowKeys(this.state.allColumns);
13176
+ }
13177
+ /** 展示附件信息 */
13178
+
13179
+ }, {
13180
+ key: "showFiles",
13181
+ value: function showFiles() {
13182
+ var val = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
13183
+ this.state.files = val;
13184
+ this.state.visibleFile = true;
13185
+ }
13186
+ }, {
13187
+ key: "handleDragStart",
13188
+ value: function handleDragStart(node) {
13189
+ this.state.currentColumn = node.data;
13190
+ }
13191
+ }, {
13192
+ key: "handleDragEnter",
13193
+ value: function handleDragEnter() {// console.log("tree drag enter: ", dropNode.label);
13194
+ }
13195
+ }, {
13196
+ key: "handleDragLeave",
13197
+ value: function handleDragLeave() {//console.log("tree drag leave: ", dropNode.label);
13198
+ }
13199
+ }, {
13200
+ key: "handleDragOver",
13201
+ value: function handleDragOver() {// console.log("tree drag over: ", dropNode.label);
13202
+ }
13203
+ }, {
13204
+ key: "handleDragEnd",
13205
+ value: function handleDragEnd(draggingNode, dropNode, dropType) {
13206
+ var _this3 = this;
13207
+
13208
+ var _this$state = this.state,
13209
+ showColumns = _this$state.showColumns,
13210
+ currentColumn = _this$state.currentColumn,
13211
+ checkedColumnKeys = _this$state.checkedColumnKeys; // if ((dropType === "before" || dropType === "after") && currentColumn) {
13212
+ // const data = showColumns.filter(
13213
+ // (item) => item.key !== currentColumn?.key
13214
+ // );
13215
+ // const index = data.findIndex((item) => item.key === dropNode.data.key);
13216
+ // dropType === "before"
13217
+ // ? data.splice(index, 0, currentColumn)
13218
+ // : data.splice(index + 1, 0, currentColumn);
13219
+
13220
+ if (currentColumn && checkedColumnKeys.includes(currentColumn.key)) {
13221
+ setTimeout(function () {
13222
+ _this3.$refs.tree.setChecked(currentColumn, true);
13223
+ }, 0);
13224
+ }
13225
+ }
13226
+ }, {
13227
+ key: "handleDrop",
13228
+ value: function handleDrop() {// console.log("tree drop: ", dropNode, dropType);
13229
+ }
13230
+ /** 节点是否被插入 */
13231
+
13232
+ }, {
13233
+ key: "allowDrop",
13234
+ value: function allowDrop(draggingNode, dropNode, type) {
13235
+ return type !== "inner";
13236
+ }
13237
+ /** 节点是否允许拖动 */
13238
+
13239
+ }, {
13240
+ key: "allowDrag",
13241
+ value: function allowDrag(draggingNode) {
13242
+ return !draggingNode.data.disabled;
13243
+ }
13244
+ /** 处理table里面根据字段获取对应的值 */
13245
+
13246
+ }, {
13247
+ key: "getPropByPath",
13248
+ value: function getPropByPath(obj, path) {
12921
13249
  var strict = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
12922
13250
  var tempObj = obj;
12923
13251
  path = path.replace(/\[(\w+)\]/g, ".$1");
@@ -13183,7 +13511,8 @@ HtTablevue_type_script_lang_ts_HtTable = __decorate([vue_class_component_esm({
13183
13511
  name: "HtTable",
13184
13512
  components: {
13185
13513
  PageInfo: PageInfo,
13186
- HtUploadFiles: packages_HtUploadFiles
13514
+ HtUploadFiles: packages_HtUploadFiles,
13515
+ HtShowBaseData: packages_HtShowBaseData
13187
13516
  }
13188
13517
  })], HtTablevue_type_script_lang_ts_HtTable);
13189
13518
  /* harmony default export */ var HtTablevue_type_script_lang_ts_ = (HtTablevue_type_script_lang_ts_HtTable);
@@ -13199,11 +13528,11 @@ HtTablevue_type_script_lang_ts_HtTable = __decorate([vue_class_component_esm({
13199
13528
 
13200
13529
  var HtTable_component = normalizeComponent(
13201
13530
  packages_HtTablevue_type_script_lang_ts_,
13202
- HtTablevue_type_template_id_fb8c90a6_scoped_true_render,
13203
- HtTablevue_type_template_id_fb8c90a6_scoped_true_staticRenderFns,
13531
+ HtTablevue_type_template_id_5eb1d6b8_scoped_true_render,
13532
+ HtTablevue_type_template_id_5eb1d6b8_scoped_true_staticRenderFns,
13204
13533
  false,
13205
13534
  null,
13206
- "fb8c90a6",
13535
+ "5eb1d6b8",
13207
13536
  null
13208
13537
 
13209
13538
  )
@@ -13446,9 +13775,6 @@ var HtUploadvue_type_template_id_65ce7fe2_staticRenderFns = []
13446
13775
  // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.last-index-of.js
13447
13776
  var es_array_last_index_of = __webpack_require__("baa5");
13448
13777
 
13449
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.slice.js
13450
- var es_array_slice = __webpack_require__("fb6a");
13451
-
13452
13778
  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
13453
13779
  function _arrayLikeToArray(arr, len) {
13454
13780
  if (len == null || len > arr.length) len = arr.length;
@@ -13873,296 +14199,55 @@ var HtMdvue_type_script_lang_ts_HtMd = /*#__PURE__*/function (_Vue) {
13873
14199
  if (res.status === 200) {
13874
14200
  _this2.$refs.md.$img2Url(e, "/files/api/filing/file/download/".concat(res.data.fileToken));
13875
14201
  }
13876
- }); //
13877
-
13878
- }
13879
- /** 实时改变 */
13880
-
13881
- }, {
13882
- key: "change",
13883
- value: function change(e, text) {
13884
- this.$emit("input", e);
13885
- this.$emit("change", e, text); //
13886
- }
13887
- /** 保存数据 */
13888
-
13889
- }, {
13890
- key: "save",
13891
- value: function save(e, text) {
13892
- this.$emit("save", e, text);
13893
- }
13894
- /** 监听 */
13895
-
13896
- }, {
13897
- key: "onContent",
13898
- value: function onContent(val) {
13899
- this.state.content = val;
13900
- }
13901
- }]);
13902
-
13903
- return HtMd;
13904
- }(external_commonjs_vue_commonjs2_vue_root_Vue_default.a);
13905
-
13906
- __decorate([Prop()], HtMdvue_type_script_lang_ts_HtMd.prototype, "changImg", void 0);
13907
-
13908
- __decorate([Prop()], HtMdvue_type_script_lang_ts_HtMd.prototype, "disabled", void 0);
13909
-
13910
- __decorate([Prop()], HtMdvue_type_script_lang_ts_HtMd.prototype, "value", void 0);
13911
-
13912
- __decorate([Prop()], HtMdvue_type_script_lang_ts_HtMd.prototype, "placeholder", void 0);
13913
-
13914
- __decorate([Prop()], HtMdvue_type_script_lang_ts_HtMd.prototype, "subfield", void 0);
13915
-
13916
- __decorate([Watch("value", {
13917
- deep: true
13918
- })], HtMdvue_type_script_lang_ts_HtMd.prototype, "onContent", null);
13919
-
13920
- HtMdvue_type_script_lang_ts_HtMd = __decorate([vue_class_component_esm], HtMdvue_type_script_lang_ts_HtMd);
13921
- /* harmony default export */ var HtMdvue_type_script_lang_ts_ = (HtMdvue_type_script_lang_ts_HtMd);
13922
- // CONCATENATED MODULE: ./src/packages/HtMd/index.vue?vue&type=script&lang=ts&
13923
- /* harmony default export */ var packages_HtMdvue_type_script_lang_ts_ = (HtMdvue_type_script_lang_ts_);
13924
- // CONCATENATED MODULE: ./src/packages/HtMd/index.vue
13925
-
13926
-
13927
-
13928
-
13929
-
13930
- /* normalize component */
13931
-
13932
- var HtMd_component = normalizeComponent(
13933
- packages_HtMdvue_type_script_lang_ts_,
13934
- HtMdvue_type_template_id_1bb3f330_scoped_true_render,
13935
- HtMdvue_type_template_id_1bb3f330_scoped_true_staticRenderFns,
13936
- false,
13937
- null,
13938
- "1bb3f330",
13939
- null
13940
-
13941
- )
13942
-
13943
- /* harmony default export */ var packages_HtMd = (HtMd_component.exports);
13944
- // CONCATENATED MODULE: ./src/packages/HtMd/index.ts
13945
- /*
13946
- * @Descripttion:markdown 编辑器
13947
- * @version:
13948
- * @Author: hutao
13949
- * @Date: 2021-11-15 15:00:57
13950
- * @LastEditors: hutao
13951
- * @LastEditTime: 2021-12-21 16:24:26
13952
- */
13953
-
13954
-
13955
- packages_HtMd.install = function (Vue) {
13956
- Vue.component("HtMd", packages_HtMd);
13957
- };
13958
-
13959
- /* harmony default export */ var src_packages_HtMd = (packages_HtMd);
13960
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"48d53131-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/HtCountDown/index.vue?vue&type=template&id=6d5cd250&scoped=true&
13961
- var HtCountDownvue_type_template_id_6d5cd250_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('span',[_vm._t("default",[_c('span',[_vm._v(_vm._s(_vm.dateLess()))])],{"time":parseInt(_vm.state.count.toString()),"timeStr":_vm.dateLess()})],2)])}
13962
- var HtCountDownvue_type_template_id_6d5cd250_scoped_true_staticRenderFns = []
13963
-
13964
-
13965
- // CONCATENATED MODULE: ./src/packages/HtCountDown/index.vue?vue&type=template&id=6d5cd250&scoped=true&
13966
-
13967
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es.number.to-fixed.js
13968
- var es_number_to_fixed = __webpack_require__("b680");
13969
-
13970
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/ts-loader??ref--14-3!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/HtCountDown/index.vue?vue&type=script&lang=ts&
13971
-
13972
-
13973
-
13974
-
13975
-
13976
-
13977
-
13978
-
13979
-
13980
-
13981
- var HtCountDownvue_type_script_lang_ts_HtCountDown = /*#__PURE__*/function (_Vue) {
13982
- _inherits(HtCountDown, _Vue);
13983
-
13984
- var _super = _createSuper(HtCountDown);
13985
-
13986
- function HtCountDown() {
13987
- var _this;
13988
-
13989
- _classCallCheck(this, HtCountDown);
13990
-
13991
- _this = _super.apply(this, arguments);
13992
- /** 数据 */
13993
-
13994
- _this.state = {
13995
- loading: false,
13996
- count: 0
13997
- };
13998
- _this.timer = undefined;
13999
- return _this;
14000
- }
14001
-
14002
- _createClass(HtCountDown, [{
14003
- key: "created",
14004
- value: function created() {
14005
- /** 如果是传入的秒数 */
14006
- if (!this.stopwatch) {
14007
- if (this.times) {
14008
- this.state.count = this.times;
14009
- }
14010
- /** 如果传入的是哪一天 */
14011
-
14012
-
14013
- if (this.date) {
14014
- var sec = (new Date(this.date).getTime() - new Date().getTime()) / 1000;
14015
- this.state.count = sec > 0 ? sec : 0;
14016
- }
14017
- } else {
14018
- //如果是秒表则启动秒表计时:
14019
- this.startStopWatch(true);
14020
- }
14021
- }
14022
- /** 秒表 */
14023
-
14024
- }, {
14025
- key: "startStopWatch",
14026
- value: function startStopWatch(reset) {
14027
- var _this2 = this;
14028
-
14029
- if (reset) {
14030
- this.state.count = 0;
14031
- }
14032
-
14033
- this.timer = setInterval(function () {
14034
- _this2.state.count = parseFloat((_this2.state.count + _this2.getFrequency / 1000).toFixed(5));
14035
- }, this.getFrequency);
14036
- }
14037
- /** 重置 */
14038
-
14039
- }, {
14040
- key: "reset",
14041
- value: function reset() {
14042
- if (this.times) {
14043
- clearInterval(this.timer);
14044
- this.state.count = this.times;
14045
- this.getTimer();
14046
- }
14047
-
14048
- if (this.stopwatch) {
14049
- clearInterval(this.timer);
14050
- this.startStopWatch(true);
14051
- } //
14052
-
14053
- }
14054
- /** 时间倒计时开始 */
14055
-
14056
- }, {
14057
- key: "getTimer",
14058
- value: function getTimer() {
14059
- var _this3 = this;
14060
-
14061
- this.timer = setInterval(function () {
14062
- _this3.state.count--;
14063
-
14064
- if (_this3.state.count === 0) {
14065
- clearInterval(_this3.timer);
14066
- }
14067
- }, this.getFrequency);
14068
- }
14069
- }, {
14070
- key: "dateLess",
14071
- value: function dateLess() {
14072
- var total = this.state.count;
14073
-
14074
- if (this.stopwatch) {
14075
- return total;
14076
- }
14077
-
14078
- if (!total) {
14079
- return "--";
14080
- }
14081
-
14082
- var day = parseInt((total / (24 * 60 * 60)).toString()); //计算整数天数
14083
-
14084
- var afterDay = total - day * 24 * 60 * 60; //取得算出天数后剩余的秒数
14085
-
14086
- var hour = parseInt((afterDay / (60 * 60)).toString()); //计算整数小时数
14087
-
14088
- var afterHour = total - day * 24 * 60 * 60 - hour * 60 * 60; //取得算出小时数后剩余的秒数
14089
-
14090
- var min = parseInt((afterHour / 60).toString()); //计算整数分
14091
-
14092
- var afterMin = parseInt((total - day * 24 * 60 * 60 - hour * 60 * 60 - min * 60).toString()); //取得算出分后剩余的秒数
14093
-
14094
- function buwei(t) {
14095
- return t > 9 ? t : "0" + t;
14096
- }
14097
-
14098
- if (!day) {
14099
- if (!hour) {
14100
- if (min) {
14101
- return buwei(min) + "分" + buwei(afterMin) + "秒";
14102
- } else {
14103
- return buwei(afterMin) + "秒";
14104
- }
14105
- } else {
14106
- return buwei(hour) + "小时" + buwei(min) + "分" + buwei(afterMin) + "秒";
14107
- }
14108
- } else {
14109
- return day + "天" + buwei(hour) + "小时" + buwei(min) + "分" + buwei(afterMin) + "秒";
14110
- }
14202
+ }); //
14203
+
14111
14204
  }
14112
- /** 监听是否启动倒计时 针对传入是秒的不用重新计算,时间的要进行重新计算*/
14205
+ /** 实时改变 */
14113
14206
 
14114
14207
  }, {
14115
- key: "onStart",
14116
- value: function onStart(val) {
14117
- if (val !== false) {
14118
- /** 如果传入的是哪一天 */
14119
- if (this.date) {
14120
- var sec = (new Date(this.date).getTime() - new Date().getTime()) / 1000;
14121
- this.state.count = sec > 0 ? sec : 0;
14122
- }
14208
+ key: "change",
14209
+ value: function change(e, text) {
14210
+ this.$emit("input", e);
14211
+ this.$emit("change", e, text); //
14212
+ }
14213
+ /** 保存数据 */
14123
14214
 
14124
- if (this.stopwatch) {
14125
- this.startStopWatch(false);
14126
- } else if (!this.date && !this.times) {
14127
- this.$notify.error("请先传入完成的参数");
14128
- return;
14129
- } else {
14130
- this.getTimer();
14131
- }
14132
- } else {
14133
- clearInterval(this.timer);
14134
- }
14215
+ }, {
14216
+ key: "save",
14217
+ value: function save(e, text) {
14218
+ this.$emit("save", e, text);
14135
14219
  }
14220
+ /** 监听 */
14221
+
14136
14222
  }, {
14137
- key: "getFrequency",
14138
- get: function get() {
14139
- return this.frequency || 1000;
14223
+ key: "onContent",
14224
+ value: function onContent(val) {
14225
+ this.state.content = val;
14140
14226
  }
14141
14227
  }]);
14142
14228
 
14143
- return HtCountDown;
14229
+ return HtMd;
14144
14230
  }(external_commonjs_vue_commonjs2_vue_root_Vue_default.a);
14145
14231
 
14146
- __decorate([Prop()], HtCountDownvue_type_script_lang_ts_HtCountDown.prototype, "date", void 0);
14232
+ __decorate([Prop()], HtMdvue_type_script_lang_ts_HtMd.prototype, "changImg", void 0);
14147
14233
 
14148
- __decorate([Prop()], HtCountDownvue_type_script_lang_ts_HtCountDown.prototype, "times", void 0);
14234
+ __decorate([Prop()], HtMdvue_type_script_lang_ts_HtMd.prototype, "disabled", void 0);
14149
14235
 
14150
- __decorate([Prop()], HtCountDownvue_type_script_lang_ts_HtCountDown.prototype, "start", void 0);
14236
+ __decorate([Prop()], HtMdvue_type_script_lang_ts_HtMd.prototype, "value", void 0);
14151
14237
 
14152
- __decorate([Prop()], HtCountDownvue_type_script_lang_ts_HtCountDown.prototype, "stopwatch", void 0);
14238
+ __decorate([Prop()], HtMdvue_type_script_lang_ts_HtMd.prototype, "placeholder", void 0);
14153
14239
 
14154
- __decorate([Prop()], HtCountDownvue_type_script_lang_ts_HtCountDown.prototype, "frequency", void 0);
14240
+ __decorate([Prop()], HtMdvue_type_script_lang_ts_HtMd.prototype, "subfield", void 0);
14155
14241
 
14156
- __decorate([Watch("start", {
14157
- deep: true,
14158
- immediate: true
14159
- })], HtCountDownvue_type_script_lang_ts_HtCountDown.prototype, "onStart", null);
14242
+ __decorate([Watch("value", {
14243
+ deep: true
14244
+ })], HtMdvue_type_script_lang_ts_HtMd.prototype, "onContent", null);
14160
14245
 
14161
- HtCountDownvue_type_script_lang_ts_HtCountDown = __decorate([vue_class_component_esm], HtCountDownvue_type_script_lang_ts_HtCountDown);
14162
- /* harmony default export */ var HtCountDownvue_type_script_lang_ts_ = (HtCountDownvue_type_script_lang_ts_HtCountDown);
14163
- // CONCATENATED MODULE: ./src/packages/HtCountDown/index.vue?vue&type=script&lang=ts&
14164
- /* harmony default export */ var packages_HtCountDownvue_type_script_lang_ts_ = (HtCountDownvue_type_script_lang_ts_);
14165
- // CONCATENATED MODULE: ./src/packages/HtCountDown/index.vue
14246
+ HtMdvue_type_script_lang_ts_HtMd = __decorate([vue_class_component_esm], HtMdvue_type_script_lang_ts_HtMd);
14247
+ /* harmony default export */ var HtMdvue_type_script_lang_ts_ = (HtMdvue_type_script_lang_ts_HtMd);
14248
+ // CONCATENATED MODULE: ./src/packages/HtMd/index.vue?vue&type=script&lang=ts&
14249
+ /* harmony default export */ var packages_HtMdvue_type_script_lang_ts_ = (HtMdvue_type_script_lang_ts_);
14250
+ // CONCATENATED MODULE: ./src/packages/HtMd/index.vue
14166
14251
 
14167
14252
 
14168
14253
 
@@ -14170,82 +14255,45 @@ HtCountDownvue_type_script_lang_ts_HtCountDown = __decorate([vue_class_component
14170
14255
 
14171
14256
  /* normalize component */
14172
14257
 
14173
- var HtCountDown_component = normalizeComponent(
14174
- packages_HtCountDownvue_type_script_lang_ts_,
14175
- HtCountDownvue_type_template_id_6d5cd250_scoped_true_render,
14176
- HtCountDownvue_type_template_id_6d5cd250_scoped_true_staticRenderFns,
14258
+ var HtMd_component = normalizeComponent(
14259
+ packages_HtMdvue_type_script_lang_ts_,
14260
+ HtMdvue_type_template_id_1bb3f330_scoped_true_render,
14261
+ HtMdvue_type_template_id_1bb3f330_scoped_true_staticRenderFns,
14177
14262
  false,
14178
14263
  null,
14179
- "6d5cd250",
14264
+ "1bb3f330",
14180
14265
  null
14181
14266
 
14182
14267
  )
14183
14268
 
14184
- /* harmony default export */ var packages_HtCountDown = (HtCountDown_component.exports);
14185
- // CONCATENATED MODULE: ./src/packages/HtCountDown/index.ts
14186
- /*
14187
- * @Descripttion简易版的倒计时
14188
- * @version:
14189
- * @Author: hutao
14190
- * @Date: 2021-11-15 15:00:57
14191
- * @LastEditors: hutao
14192
- * @LastEditTime: 2021-12-26 11:20:45
14193
- */
14194
-
14195
-
14196
- packages_HtCountDown.install = function (Vue) {
14197
- Vue.component("HtCountDown", packages_HtCountDown);
14198
- };
14199
-
14200
- /* harmony default export */ var src_packages_HtCountDown = (packages_HtCountDown);
14201
- // CONCATENATED MODULE: ./src/packages/HtUploadFiles/index.ts
14269
+ /* harmony default export */ var packages_HtMd = (HtMd_component.exports);
14270
+ // CONCATENATED MODULE: ./src/packages/HtMd/index.ts
14202
14271
  /*
14203
- * @Descripttion:
14272
+ * @Descripttion:markdown 编辑器
14204
14273
  * @version:
14205
14274
  * @Author: hutao
14206
14275
  * @Date: 2021-11-15 15:00:57
14207
14276
  * @LastEditors: hutao
14208
- * @LastEditTime: 2022-02-11 14:26:45
14277
+ * @LastEditTime: 2021-12-21 16:24:26
14209
14278
  */
14210
14279
 
14211
14280
 
14212
- packages_HtUploadFiles.install = function (Vue) {
14213
- Vue.component("HtUploadFiles", packages_HtUploadFiles);
14281
+ packages_HtMd.install = function (Vue) {
14282
+ Vue.component("HtMd", packages_HtMd);
14214
14283
  };
14215
14284
 
14216
- /* harmony default export */ var src_packages_HtUploadFiles = (packages_HtUploadFiles);
14217
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"48d53131-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/HtSelectBaseData/index.vue?vue&type=template&id=135372f1&scoped=true&
14218
- var HtSelectBaseDatavue_type_template_id_135372f1_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[(!_vm.readonly)?[(!_vm.dataTypeId)?_c('el-select',{staticStyle:{"width":"100%"},attrs:{"value":"","disabled":_vm.disabled,"placeholder":"请选择"}}):_c("common-datas-info",{tag:"div",attrs:{"disabled":_vm.disabled,"com-style":"background:#fff","config-json":_vm.configJson},on:{"change":_vm.getCommonData}})]:_c('div',[(this.value)?_c('HtShowBaseData',{staticStyle:{"font-size":"12px"},attrs:{"hide-code":_vm.hideCode,"base-data-id":this.value,"base-data-info":true,"com-style":"font-size:12px"}}):_vm._e()],1)],2)}
14219
- var HtSelectBaseDatavue_type_template_id_135372f1_scoped_true_staticRenderFns = []
14220
-
14221
-
14222
- // CONCATENATED MODULE: ./src/packages/HtSelectBaseData/index.vue?vue&type=template&id=135372f1&scoped=true&
14223
-
14224
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"48d53131-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/HtShowBaseData/index.vue?vue&type=template&id=3e20df09&scoped=true&
14225
- var HtShowBaseDatavue_type_template_id_3e20df09_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"show-common-item"},[(_vm.timeStr)?[_c('span',[_vm._v(" "+_vm._s(_vm.timeFormat)+" ")])]:_vm._e(),(_vm.departmentId)?_vm._l((_vm.departmentData),function(item){return _c('span',{key:item,staticClass:"item"},[_vm._v(" "+_vm._s(_vm.getorgById(item).displayName || _vm.empty)+" ")])}):_vm._e(),(_vm.userId)?_vm._l((_vm.userData),function(item){return _c('span',{key:item.id,staticClass:"item"},[_vm._v(" "+_vm._s(item.value || _vm.empty)+" ")])}):_vm._e(),(_vm.roleId)?_vm._l((_vm.roleData),function(item){return _c('span',{key:item.id,staticClass:"item"},[_vm._v(" "+_vm._s(item.name || _vm.empty)+" ")])}):_vm._e(),(_vm.baseDataId)?[(_vm.baseDataItem[_vm.baseDataId])?_c('span',{staticClass:"item"},[_vm._v(" "+_vm._s(_vm.state.text)+" ")]):_c('span',[_vm._v(" "+_vm._s(_vm.empty))])]:_vm._e(),(_vm.baseDataValue)?[(_vm.baseDataItem[_vm.baseDataValue])?_c('span',{staticClass:"item"},[_vm._v(" "+_vm._s(_vm.baseDataItem[_vm.baseDataValue].name || _vm.empty)+" "),(_vm.baseDataInfo&&!_vm.hideCode)?_c('span',[_vm._v(" ("+_vm._s(_vm.baseDataItem[_vm.baseDataValue].value || _vm.empty)+") ")]):_vm._e()]):_c('span',[_vm._v(" "+_vm._s(_vm.empty))])]:_vm._e(),(_vm.baseDataName)?[(_vm.baseDataItem[_vm.baseDataName])?_c('span',{staticClass:"item"},[_vm._v(" "+_vm._s(_vm.baseDataItem[_vm.baseDataName].name || _vm.empty)+" "),(_vm.baseDataInfo&&!_vm.hideCode)?_c('span',[_vm._v(" ("+_vm._s(_vm.baseDataItem[_vm.baseDataName].value || _vm.empty)+") ")]):_vm._e()]):_c('span',[_vm._v(" "+_vm._s(_vm.empty))])]:_vm._e()],2)}
14226
- var HtShowBaseDatavue_type_template_id_3e20df09_scoped_true_staticRenderFns = []
14227
-
14228
-
14229
- // CONCATENATED MODULE: ./src/packages/HtShowBaseData/index.vue?vue&type=template&id=3e20df09&scoped=true&
14230
-
14231
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.find.js
14232
- var es_array_find = __webpack_require__("7db0");
14233
-
14234
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.starts-with.js
14235
- var es_string_starts_with = __webpack_require__("2ca0");
14236
-
14237
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/ts-loader??ref--14-3!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/HtShowBaseData/index.vue?vue&type=script&lang=ts&
14238
-
14239
-
14240
-
14241
-
14242
-
14243
-
14244
-
14285
+ /* harmony default export */ var src_packages_HtMd = (packages_HtMd);
14286
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"48d53131-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/HtCountDown/index.vue?vue&type=template&id=6d5cd250&scoped=true&
14287
+ var HtCountDownvue_type_template_id_6d5cd250_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('span',[_vm._t("default",[_c('span',[_vm._v(_vm._s(_vm.dateLess()))])],{"time":parseInt(_vm.state.count.toString()),"timeStr":_vm.dateLess()})],2)])}
14288
+ var HtCountDownvue_type_template_id_6d5cd250_scoped_true_staticRenderFns = []
14245
14289
 
14246
14290
 
14291
+ // CONCATENATED MODULE: ./src/packages/HtCountDown/index.vue?vue&type=template&id=6d5cd250&scoped=true&
14247
14292
 
14293
+ // EXTERNAL MODULE: ./node_modules/core-js/modules/es.number.to-fixed.js
14294
+ var es_number_to_fixed = __webpack_require__("b680");
14248
14295
 
14296
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/ts-loader??ref--14-3!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/HtCountDown/index.vue?vue&type=script&lang=ts&
14249
14297
 
14250
14298
 
14251
14299
 
@@ -14256,260 +14304,191 @@ var es_string_starts_with = __webpack_require__("2ca0");
14256
14304
 
14257
14305
 
14258
14306
 
14259
- var HtShowBaseDatavue_type_script_lang_ts_CommonDatas = /*#__PURE__*/function (_Vue) {
14260
- _inherits(CommonDatas, _Vue);
14307
+ var HtCountDownvue_type_script_lang_ts_HtCountDown = /*#__PURE__*/function (_Vue) {
14308
+ _inherits(HtCountDown, _Vue);
14261
14309
 
14262
- var _super = _createSuper(CommonDatas);
14310
+ var _super = _createSuper(HtCountDown);
14263
14311
 
14264
- function CommonDatas() {
14312
+ function HtCountDown() {
14265
14313
  var _this;
14266
14314
 
14267
- _classCallCheck(this, CommonDatas);
14315
+ _classCallCheck(this, HtCountDown);
14268
14316
 
14269
14317
  _this = _super.apply(this, arguments);
14270
- /** 人员 */
14271
-
14272
14318
  /** 数据 */
14273
14319
 
14274
14320
  _this.state = {
14275
- text: "",
14276
- resData: {
14277
- baseData: {
14278
- items: []
14279
- },
14280
- dictionaryCategory: {
14281
- items: []
14282
- },
14283
- dictionaryData: [],
14284
- severityLevel: [],
14285
- organizationUnit: [],
14286
- organizationUsersTree: [],
14287
- users: {
14288
- items: []
14289
- },
14290
- SessionState: "",
14291
- userInOrganiza: [],
14292
- organizationUsers: {},
14293
- roleList: []
14294
- },
14295
- baseDataItem: {}
14321
+ loading: false,
14322
+ count: 0
14296
14323
  };
14324
+ _this.timer = undefined;
14297
14325
  return _this;
14298
14326
  }
14299
- /** 生命周期 */
14300
-
14301
14327
 
14302
- _createClass(CommonDatas, [{
14328
+ _createClass(HtCountDown, [{
14303
14329
  key: "created",
14304
14330
  value: function created() {
14305
- if (!accountConst.getLoginState()) {
14306
- return;
14307
- }
14331
+ /** 如果是传入的秒数 */
14332
+ if (!this.stopwatch) {
14333
+ if (this.times) {
14334
+ this.state.count = this.times;
14335
+ }
14336
+ /** 如果传入的是哪一天 */
14308
14337
 
14309
- var data = window.localStorage.getItem("commonDatas");
14310
14338
 
14311
- if (data) {
14312
- this.state.resData = Object.assign(this.state.resData, JSON.parse(data));
14339
+ if (this.date) {
14340
+ var sec = (new Date(this.date).getTime() - new Date().getTime()) / 1000;
14341
+ this.state.count = sec > 0 ? sec : 0;
14342
+ }
14343
+ } else {
14344
+ //如果是秒表则启动秒表计时:
14345
+ this.startStopWatch(true);
14313
14346
  }
14314
-
14315
- var _this$state$resData$b = this.state.resData.baseData.items,
14316
- items = _this$state$resData$b === void 0 ? [] : _this$state$resData$b;
14317
- this.getBaseDataItem(items);
14318
- this.setText();
14319
- }
14320
- /** 方法 */
14321
-
14322
- /** 根据id获取用户部门 */
14323
-
14324
- }, {
14325
- key: "getorgById",
14326
- value: function getorgById(id) {
14327
- return this.state.resData.organizationUnit.find(function (val) {
14328
- return val.id == id;
14329
- }) || {};
14330
14347
  }
14331
- /** 递归处理基础数据 */
14348
+ /** 秒表 */
14332
14349
 
14333
14350
  }, {
14334
- key: "getBaseDataItem",
14335
- value: function getBaseDataItem(list) {
14351
+ key: "startStopWatch",
14352
+ value: function startStopWatch(reset) {
14336
14353
  var _this2 = this;
14337
14354
 
14338
- // const list = this.state.resData.baseData.items || []
14339
- list.forEach(function (item) {
14340
- _this2.state.baseDataItem[item.id || ""] = item;
14341
- _this2.state.baseDataItem[item.value || ""] = item;
14342
- _this2.state.baseDataItem[item.name || ""] = item;
14343
-
14344
- if (item.children) {
14345
- _this2.getBaseDataItem(item.children);
14346
- }
14347
- });
14348
- }
14349
- /** 获取节点相关的所有父节点信息--只针对基础数据 */
14350
-
14351
- }, {
14352
- key: "setAllLevel",
14353
- value: function setAllLevel(id) {
14354
- var baseDataItem = this.state.baseDataItem;
14355
- var hideCode = this.hideCode;
14356
- var text = "";
14357
-
14358
- if (baseDataItem[id]) {
14359
- if (hideCode) {
14360
- text = "".concat(baseDataItem[id].name || "");
14361
- } else {
14362
- text = "".concat(baseDataItem[id].name || "", "(").concat(baseDataItem[id].value, ")");
14363
- }
14364
-
14365
- if (baseDataItem[id].parentId && this.showAllLevel) {
14366
- var tempText = this.setAllLevel(baseDataItem[id]["parentId"]);
14367
- text = "".concat(tempText, "/").concat(text);
14368
- }
14355
+ if (reset) {
14356
+ this.state.count = 0;
14369
14357
  }
14370
14358
 
14371
- return text;
14359
+ this.timer = setInterval(function () {
14360
+ _this2.state.count = parseFloat((_this2.state.count + _this2.getFrequency / 1000).toFixed(5));
14361
+ }, this.getFrequency);
14372
14362
  }
14363
+ /** 重置 */
14364
+
14373
14365
  }, {
14374
- key: "setText",
14375
- value: function setText() {
14376
- if (this.baseDataId) {
14377
- var tempText = this.setAllLevel(this.baseDataId);
14378
- this.state.text = tempText;
14366
+ key: "reset",
14367
+ value: function reset() {
14368
+ if (this.times) {
14369
+ clearInterval(this.timer);
14370
+ this.state.count = this.times;
14371
+ this.getTimer();
14379
14372
  }
14380
- }
14381
- /** 计算属性 */
14382
14373
 
14383
- /** 基础数据 */
14374
+ if (this.stopwatch) {
14375
+ clearInterval(this.timer);
14376
+ this.startStopWatch(true);
14377
+ } //
14384
14378
 
14385
- }, {
14386
- key: "baseDataItem",
14387
- get: function get() {
14388
- return this.state.baseDataItem || {};
14389
14379
  }
14390
- /** 获取严重等级 */
14380
+ /** 时间倒计时开始 */
14391
14381
 
14392
14382
  }, {
14393
- key: "SeverityLevel",
14394
- get: function get() {
14395
- return this.state.resData.severityLevel || [];
14396
- }
14397
- /** 获取用户数据 */
14383
+ key: "getTimer",
14384
+ value: function getTimer() {
14385
+ var _this3 = this;
14398
14386
 
14399
- }, {
14400
- key: "userDataList",
14401
- get: function get() {
14402
- return this.state.resData.users.items || [];
14403
- }
14404
- /** 根据id获取用户数据 */
14387
+ this.timer = setInterval(function () {
14388
+ _this3.state.count--;
14405
14389
 
14390
+ if (_this3.state.count === 0) {
14391
+ clearInterval(_this3.timer);
14392
+ }
14393
+ }, this.getFrequency);
14394
+ }
14406
14395
  }, {
14407
- key: "userData",
14408
- get: function get() {
14409
- if (!this.userId) {
14410
- return [];
14396
+ key: "dateLess",
14397
+ value: function dateLess() {
14398
+ var total = this.state.count;
14399
+
14400
+ if (this.stopwatch) {
14401
+ return total;
14411
14402
  }
14412
14403
 
14413
- if (this.state.resData.users.items) {
14414
- var ids = JSON.parse(this.userId);
14415
- var data = this.state.resData.users.items.filter(function (val) {
14416
- return ids.includes(val.id);
14417
- });
14418
- return data;
14419
- } else {
14420
- return [];
14404
+ if (!total) {
14405
+ return "--";
14421
14406
  }
14422
- }
14423
- /** 根据id获取角色数据 */
14424
14407
 
14425
- }, {
14426
- key: "roleData",
14427
- get: function get() {
14428
- if (!this.roleId) {
14429
- return [];
14408
+ var day = parseInt((total / (24 * 60 * 60)).toString()); //计算整数天数
14409
+
14410
+ var afterDay = total - day * 24 * 60 * 60; //取得算出天数后剩余的秒数
14411
+
14412
+ var hour = parseInt((afterDay / (60 * 60)).toString()); //计算整数小时数
14413
+
14414
+ var afterHour = total - day * 24 * 60 * 60 - hour * 60 * 60; //取得算出小时数后剩余的秒数
14415
+
14416
+ var min = parseInt((afterHour / 60).toString()); //计算整数分
14417
+
14418
+ var afterMin = parseInt((total - day * 24 * 60 * 60 - hour * 60 * 60 - min * 60).toString()); //取得算出分后剩余的秒数
14419
+
14420
+ function buwei(t) {
14421
+ return t > 9 ? t : "0" + t;
14430
14422
  }
14431
14423
 
14432
- if (this.state.resData.roleList) {
14433
- var ids = JSON.parse(this.roleId);
14434
- var data = this.state.resData.roleList.filter(function (val) {
14435
- return ids.includes(val.id || "");
14436
- });
14437
- return data;
14424
+ if (!day) {
14425
+ if (!hour) {
14426
+ if (min) {
14427
+ return buwei(min) + "" + buwei(afterMin) + "秒";
14428
+ } else {
14429
+ return buwei(afterMin) + "秒";
14430
+ }
14431
+ } else {
14432
+ return buwei(hour) + "小时" + buwei(min) + "分" + buwei(afterMin) + "秒";
14433
+ }
14438
14434
  } else {
14439
- return [];
14435
+ return day + "天" + buwei(hour) + "小时" + buwei(min) + "分" + buwei(afterMin) + "秒";
14440
14436
  }
14441
14437
  }
14442
- /** 根据id获取部门数据 */
14438
+ /** 监听是否启动倒计时 针对传入是秒的不用重新计算,时间的要进行重新计算*/
14443
14439
 
14444
14440
  }, {
14445
- key: "departmentData",
14446
- get: function get() {
14447
- if (!this.departmentId) {
14448
- return [];
14449
- }
14441
+ key: "onStart",
14442
+ value: function onStart(val) {
14443
+ if (val !== false) {
14444
+ /** 如果传入的是哪一天 */
14445
+ if (this.date) {
14446
+ var sec = (new Date(this.date).getTime() - new Date().getTime()) / 1000;
14447
+ this.state.count = sec > 0 ? sec : 0;
14448
+ }
14450
14449
 
14451
- var ids = JSON.parse(this.departmentId);
14452
- return ids;
14450
+ if (this.stopwatch) {
14451
+ this.startStopWatch(false);
14452
+ } else if (!this.date && !this.times) {
14453
+ this.$notify.error("请先传入完成的参数");
14454
+ return;
14455
+ } else {
14456
+ this.getTimer();
14457
+ }
14458
+ } else {
14459
+ clearInterval(this.timer);
14460
+ }
14453
14461
  }
14454
- /** 时间格式 */
14455
-
14456
14462
  }, {
14457
- key: "timeFormat",
14463
+ key: "getFrequency",
14458
14464
  get: function get() {
14459
- if (this.timeStr && this.timeStr.startsWith("0")) {
14460
- return this.empty;
14461
- } else {
14462
- var _this$timeStr;
14463
-
14464
- return ((_this$timeStr = this.timeStr) === null || _this$timeStr === void 0 ? void 0 : _this$timeStr.replace(/T/, " ").slice(0, 19)) || this.empty;
14465
- }
14465
+ return this.frequency || 1000;
14466
14466
  }
14467
14467
  }]);
14468
14468
 
14469
- return CommonDatas;
14469
+ return HtCountDown;
14470
14470
  }(external_commonjs_vue_commonjs2_vue_root_Vue_default.a);
14471
14471
 
14472
- __decorate([Prop({
14473
- default: ""
14474
- })], HtShowBaseDatavue_type_script_lang_ts_CommonDatas.prototype, "empty", void 0);
14475
-
14476
- __decorate([Prop()], HtShowBaseDatavue_type_script_lang_ts_CommonDatas.prototype, "userId", void 0);
14477
-
14478
- __decorate([Prop()], HtShowBaseDatavue_type_script_lang_ts_CommonDatas.prototype, "showAllLevel", void 0);
14479
-
14480
- __decorate([Prop()], HtShowBaseDatavue_type_script_lang_ts_CommonDatas.prototype, "hideCode", void 0);
14481
-
14482
- __decorate([Prop()], HtShowBaseDatavue_type_script_lang_ts_CommonDatas.prototype, "roleId", void 0);
14483
-
14484
- __decorate([Prop()], HtShowBaseDatavue_type_script_lang_ts_CommonDatas.prototype, "departmentId", void 0);
14485
-
14486
- __decorate([Prop()], HtShowBaseDatavue_type_script_lang_ts_CommonDatas.prototype, "severityValue", void 0);
14487
-
14488
- __decorate([Prop()], HtShowBaseDatavue_type_script_lang_ts_CommonDatas.prototype, "timeStr", void 0);
14489
-
14490
- __decorate([Prop()], HtShowBaseDatavue_type_script_lang_ts_CommonDatas.prototype, "baseDataId", void 0);
14491
-
14492
- __decorate([Prop()], HtShowBaseDatavue_type_script_lang_ts_CommonDatas.prototype, "baseDataValue", void 0);
14472
+ __decorate([Prop()], HtCountDownvue_type_script_lang_ts_HtCountDown.prototype, "date", void 0);
14493
14473
 
14494
- __decorate([Prop()], HtShowBaseDatavue_type_script_lang_ts_CommonDatas.prototype, "baseDataName", void 0);
14474
+ __decorate([Prop()], HtCountDownvue_type_script_lang_ts_HtCountDown.prototype, "times", void 0);
14495
14475
 
14496
- __decorate([Prop({
14497
- default: false
14498
- })], HtShowBaseDatavue_type_script_lang_ts_CommonDatas.prototype, "baseDataInfo", void 0);
14476
+ __decorate([Prop()], HtCountDownvue_type_script_lang_ts_HtCountDown.prototype, "start", void 0);
14499
14477
 
14500
- __decorate([Watch("baseDataItem")], HtShowBaseDatavue_type_script_lang_ts_CommonDatas.prototype, "setText", null);
14478
+ __decorate([Prop()], HtCountDownvue_type_script_lang_ts_HtCountDown.prototype, "stopwatch", void 0);
14501
14479
 
14502
- HtShowBaseDatavue_type_script_lang_ts_CommonDatas = __decorate([vue_class_component_esm({
14503
- name: "HtShowBaseData"
14504
- })], HtShowBaseDatavue_type_script_lang_ts_CommonDatas);
14505
- /* harmony default export */ var HtShowBaseDatavue_type_script_lang_ts_ = (HtShowBaseDatavue_type_script_lang_ts_CommonDatas);
14506
- // CONCATENATED MODULE: ./src/packages/HtShowBaseData/index.vue?vue&type=script&lang=ts&
14507
- /* harmony default export */ var packages_HtShowBaseDatavue_type_script_lang_ts_ = (HtShowBaseDatavue_type_script_lang_ts_);
14508
- // EXTERNAL MODULE: ./src/packages/HtShowBaseData/index.vue?vue&type=style&index=0&id=3e20df09&lang=scss&scoped=true&
14509
- var HtShowBaseDatavue_type_style_index_0_id_3e20df09_lang_scss_scoped_true_ = __webpack_require__("d55d");
14480
+ __decorate([Prop()], HtCountDownvue_type_script_lang_ts_HtCountDown.prototype, "frequency", void 0);
14510
14481
 
14511
- // CONCATENATED MODULE: ./src/packages/HtShowBaseData/index.vue
14482
+ __decorate([Watch("start", {
14483
+ deep: true,
14484
+ immediate: true
14485
+ })], HtCountDownvue_type_script_lang_ts_HtCountDown.prototype, "onStart", null);
14512
14486
 
14487
+ HtCountDownvue_type_script_lang_ts_HtCountDown = __decorate([vue_class_component_esm], HtCountDownvue_type_script_lang_ts_HtCountDown);
14488
+ /* harmony default export */ var HtCountDownvue_type_script_lang_ts_ = (HtCountDownvue_type_script_lang_ts_HtCountDown);
14489
+ // CONCATENATED MODULE: ./src/packages/HtCountDown/index.vue?vue&type=script&lang=ts&
14490
+ /* harmony default export */ var packages_HtCountDownvue_type_script_lang_ts_ = (HtCountDownvue_type_script_lang_ts_);
14491
+ // CONCATENATED MODULE: ./src/packages/HtCountDown/index.vue
14513
14492
 
14514
14493
 
14515
14494
 
@@ -14517,34 +14496,57 @@ var HtShowBaseDatavue_type_style_index_0_id_3e20df09_lang_scss_scoped_true_ = __
14517
14496
 
14518
14497
  /* normalize component */
14519
14498
 
14520
- var HtShowBaseData_component = normalizeComponent(
14521
- packages_HtShowBaseDatavue_type_script_lang_ts_,
14522
- HtShowBaseDatavue_type_template_id_3e20df09_scoped_true_render,
14523
- HtShowBaseDatavue_type_template_id_3e20df09_scoped_true_staticRenderFns,
14499
+ var HtCountDown_component = normalizeComponent(
14500
+ packages_HtCountDownvue_type_script_lang_ts_,
14501
+ HtCountDownvue_type_template_id_6d5cd250_scoped_true_render,
14502
+ HtCountDownvue_type_template_id_6d5cd250_scoped_true_staticRenderFns,
14524
14503
  false,
14525
14504
  null,
14526
- "3e20df09",
14505
+ "6d5cd250",
14527
14506
  null
14528
14507
 
14529
14508
  )
14530
14509
 
14531
- /* harmony default export */ var HtShowBaseData = (HtShowBaseData_component.exports);
14532
- // CONCATENATED MODULE: ./src/packages/HtShowBaseData/index.ts
14510
+ /* harmony default export */ var packages_HtCountDown = (HtCountDown_component.exports);
14511
+ // CONCATENATED MODULE: ./src/packages/HtCountDown/index.ts
14533
14512
  /*
14534
- * @Descripttion: 基础数据展示组件
14513
+ * @Descripttion简易版的倒计时
14535
14514
  * @version:
14536
14515
  * @Author: hutao
14537
- * @Date: 2022-04-12 17:34:51
14516
+ * @Date: 2021-11-15 15:00:57
14538
14517
  * @LastEditors: hutao
14539
- * @LastEditTime: 2022-04-12 17:43:38
14518
+ * @LastEditTime: 2021-12-26 11:20:45
14540
14519
  */
14541
14520
 
14542
14521
 
14543
- HtShowBaseData.install = function (Vue) {
14544
- Vue.component("HtShowBaseData", HtShowBaseData);
14522
+ packages_HtCountDown.install = function (Vue) {
14523
+ Vue.component("HtCountDown", packages_HtCountDown);
14545
14524
  };
14546
14525
 
14547
- /* harmony default export */ var packages_HtShowBaseData = (HtShowBaseData);
14526
+ /* harmony default export */ var src_packages_HtCountDown = (packages_HtCountDown);
14527
+ // CONCATENATED MODULE: ./src/packages/HtUploadFiles/index.ts
14528
+ /*
14529
+ * @Descripttion:
14530
+ * @version:
14531
+ * @Author: hutao
14532
+ * @Date: 2021-11-15 15:00:57
14533
+ * @LastEditors: hutao
14534
+ * @LastEditTime: 2022-02-11 14:26:45
14535
+ */
14536
+
14537
+
14538
+ packages_HtUploadFiles.install = function (Vue) {
14539
+ Vue.component("HtUploadFiles", packages_HtUploadFiles);
14540
+ };
14541
+
14542
+ /* harmony default export */ var src_packages_HtUploadFiles = (packages_HtUploadFiles);
14543
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"48d53131-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/HtSelectBaseData/index.vue?vue&type=template&id=135372f1&scoped=true&
14544
+ var HtSelectBaseDatavue_type_template_id_135372f1_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[(!_vm.readonly)?[(!_vm.dataTypeId)?_c('el-select',{staticStyle:{"width":"100%"},attrs:{"value":"","disabled":_vm.disabled,"placeholder":"请选择"}}):_c("common-datas-info",{tag:"div",attrs:{"disabled":_vm.disabled,"com-style":"background:#fff","config-json":_vm.configJson},on:{"change":_vm.getCommonData}})]:_c('div',[(this.value)?_c('HtShowBaseData',{staticStyle:{"font-size":"12px"},attrs:{"hide-code":_vm.hideCode,"base-data-id":this.value,"base-data-info":true,"com-style":"font-size:12px"}}):_vm._e()],1)],2)}
14545
+ var HtSelectBaseDatavue_type_template_id_135372f1_scoped_true_staticRenderFns = []
14546
+
14547
+
14548
+ // CONCATENATED MODULE: ./src/packages/HtSelectBaseData/index.vue?vue&type=template&id=135372f1&scoped=true&
14549
+
14548
14550
  // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/ts-loader??ref--14-3!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/HtSelectBaseData/index.vue?vue&type=script&lang=ts&
14549
14551
 
14550
14552