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