hbte-saas-ui 1.6.9 → 1.7.0

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.
@@ -58186,12 +58186,12 @@ module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {
58186
58186
  // ESM COMPAT FLAG
58187
58187
  __webpack_require__.r(__webpack_exports__);
58188
58188
 
58189
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"1415947d-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/upload/src/main.vue?vue&type=template&id=5a2b1b66&
58190
- var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{key:_vm.key,staticClass:"hb-upload"},[_c('div',{directives:[{name:"layout-flex",rawName:"v-layout-flex",value:({ gutter: 20, maxWidth: 280 }),expression:"{ gutter: 20, maxWidth: 280 }"}],staticClass:"hb-upload-wrapper"},[_vm._l((_vm.list),function(item,index){return _c('div',{key:index,staticClass:"unit-item-wrapper"},[_c('div',{staticClass:"file unit-item",on:{"click":function($event){return _vm.viewFile(item)}}},[_c('HbSvg',{attrs:{"iconClass":_vm._f("fileIcon")(true,_vm.getSuffix(item.fileName)),"fontSize":"44px"}}),_c('div',{staticClass:"right"},[_c('div',{staticClass:"title"},[_vm._v(" "+_vm._s(item.fileName)+" ")]),_c('div',{staticClass:"info"},[_c('div',{staticClass:"time"},[_vm._v(_vm._s(item.createTime))]),_c('div',{staticClass:"icon"},[(item.fileType != '2')?_c('i',{staticClass:"icon-main-xiazai mr20",on:{"click":function($event){$event.stopPropagation();return _vm.downloadFile(item)}}}):_vm._e(),(_vm.editAble)?_c('i',{staticClass:"icon-main-shanchu",on:{"click":function($event){$event.stopPropagation();return _vm.remove(index, item.fileName)}}}):_vm._e()])])])],1),_vm._t("default",null,{"fileData":item})],2)}),(_vm.editAble)?_c('div',{staticClass:"upload unit-item"},[_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.netDisc),expression:"netDisc"}],staticClass:"netdisc",on:{"click":_vm.openNetDisc}},[_vm._v(" 选择网盘地址 ")]),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.link),expression:"link"}],staticClass:"link",on:{"click":_vm.openLink}},[_vm._v("自定义链接")]),_c('div',{staticClass:"local-file",on:{"click":_vm.openFile}},[_c('i',{staticClass:"el-icon-plus"}),_vm._v(" 上传附件 "),_c('input',{ref:"input",staticClass:"hidden",attrs:{"type":"file","multiple":""},on:{"change":_vm.chooseFile}})])]):_vm._e()],2),_c('NetDisc',{ref:"netDisc",on:{"submit":_vm.addNet}}),_c('CustomLink',{ref:"customLink",on:{"submit":_vm.addLink}})],1)}
58189
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"1415947d-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/upload/src/main.vue?vue&type=template&id=dd80c924&
58190
+ var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{key:_vm.key,staticClass:"hb-upload"},[_c('div',{directives:[{name:"layout-flex",rawName:"v-layout-flex",value:({ gutter: 20, maxWidth: 280 }),expression:"{ gutter: 20, maxWidth: 280 }"}],staticClass:"hb-upload-wrapper"},[_vm._l((_vm.list),function(item,index){return _c('div',{key:index,staticClass:"unit-item-wrapper"},[_c('div',{staticClass:"file unit-item",on:{"click":function($event){return _vm.viewFile(item)}}},[_c('HbSvg',{attrs:{"iconClass":_vm._f("fileIcon")(true,_vm.getSuffix(item.fileName)),"fontSize":"44px"}}),_c('div',{staticClass:"right"},[_c('div',{staticClass:"title"},[_vm._v(" "+_vm._s(item.fileName)+" ")]),_c('div',{staticClass:"info"},[_c('div',{staticClass:"time"},[_vm._v(_vm._s(item.createTime))]),_c('div',{staticClass:"icon"},[(_vm.showCover)?_c('i',{staticClass:"icon-main-huanyuan mr10",on:{"click":function($event){$event.stopPropagation();return _vm.openCover(index)}}}):_vm._e(),(_vm.showDownLoad(item))?_c('i',{staticClass:"icon-main-xiazai mr10",on:{"click":function($event){$event.stopPropagation();return _vm.downloadFile(item)}}}):_vm._e(),(_vm.showRemove)?_c('i',{staticClass:"icon-main-shanchu",on:{"click":function($event){$event.stopPropagation();return _vm.remove(index, item.fileName)}}}):_vm._e()])])])],1),_vm._t("default",null,{"fileData":item})],2)}),(_vm.editAble)?_c('div',{staticClass:"upload unit-item"},[_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.netDisc),expression:"netDisc"}],staticClass:"netdisc",on:{"click":_vm.openNetDisc}},[_vm._v(" 选择网盘地址 ")]),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.link),expression:"link"}],staticClass:"link",on:{"click":_vm.openLink}},[_vm._v("自定义链接")]),_c('div',{staticClass:"local-file",on:{"click":_vm.openFile}},[_c('i',{staticClass:"el-icon-plus"}),_vm._v(" 上传附件 "),_c('input',{ref:"input",staticClass:"hidden",attrs:{"type":"file","multiple":""},on:{"change":_vm.chooseFile}})])]):_vm._e(),_c('input',{ref:"coverInput",staticClass:"hidden",attrs:{"type":"file"},on:{"change":function (ev) { return _vm.coverFile(ev); }}})],2),_c('NetDisc',{ref:"netDisc",on:{"submit":_vm.addNet}}),_c('CustomLink',{ref:"customLink",on:{"submit":_vm.addLink}})],1)}
58191
58191
  var staticRenderFns = []
58192
58192
 
58193
58193
 
58194
- // CONCATENATED MODULE: ./packages/upload/src/main.vue?vue&type=template&id=5a2b1b66&
58194
+ // CONCATENATED MODULE: ./packages/upload/src/main.vue?vue&type=template&id=dd80c924&
58195
58195
 
58196
58196
  // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.iterator.js
58197
58197
  var es_array_iterator = __webpack_require__("e260");
@@ -58211,18 +58211,18 @@ var web_url = __webpack_require__("2b3d");
58211
58211
  // EXTERNAL MODULE: ./node_modules/core-js/modules/web.url-search-params.js
58212
58212
  var web_url_search_params = __webpack_require__("9861");
58213
58213
 
58214
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.from.js
58215
- var es_array_from = __webpack_require__("a630");
58216
-
58217
- // EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom-collections.for-each.js
58218
- var web_dom_collections_for_each = __webpack_require__("159b");
58219
-
58220
58214
  // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.map.js
58221
58215
  var es_array_map = __webpack_require__("d81d");
58222
58216
 
58223
58217
  // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.splice.js
58224
58218
  var es_array_splice = __webpack_require__("a434");
58225
58219
 
58220
+ // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.from.js
58221
+ var es_array_from = __webpack_require__("a630");
58222
+
58223
+ // EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom-collections.for-each.js
58224
+ var web_dom_collections_for_each = __webpack_require__("159b");
58225
+
58226
58226
  // EXTERNAL MODULE: ./node_modules/core-js/modules/es.regexp.exec.js
58227
58227
  var es_regexp_exec = __webpack_require__("ac1f");
58228
58228
 
@@ -58663,6 +58663,17 @@ var CustomLink_component = Object(componentNormalizer["a" /* default */])(
58663
58663
  //
58664
58664
  //
58665
58665
  //
58666
+ //
58667
+ //
58668
+ //
58669
+ //
58670
+ //
58671
+ //
58672
+ //
58673
+ //
58674
+ //
58675
+ //
58676
+ //
58666
58677
 
58667
58678
 
58668
58679
  /* harmony default export */ var mainvue_type_script_lang_js_ = ({
@@ -58670,7 +58681,9 @@ var CustomLink_component = Object(componentNormalizer["a" /* default */])(
58670
58681
  componentName: "HbUpload",
58671
58682
  data: function data() {
58672
58683
  return {
58673
- key: Math.random()
58684
+ key: Math.random(),
58685
+ coverIndex: 0 // 要覆盖的文件索引
58686
+
58674
58687
  };
58675
58688
  },
58676
58689
  props: {
@@ -58691,6 +58704,10 @@ var CustomLink_component = Object(componentNormalizer["a" /* default */])(
58691
58704
  link: {
58692
58705
  type: Boolean,
58693
58706
  default: true
58707
+ },
58708
+ oprationAuth: {
58709
+ type: Object,
58710
+ default: function _default() {}
58694
58711
  }
58695
58712
  },
58696
58713
  methods: {
@@ -58719,6 +58736,42 @@ var CustomLink_component = Object(componentNormalizer["a" /* default */])(
58719
58736
 
58720
58737
  window.URL.revokeObjectURL(item.downUrl); // 释放掉blob对象
58721
58738
  },
58739
+ openCover: function openCover(index) {
58740
+ this.coverIndex = index;
58741
+ this.$refs.coverInput.click();
58742
+ },
58743
+ coverFile: function coverFile(ev) {
58744
+ var _this = this;
58745
+
58746
+ console.log(ev.target.files[0]);
58747
+ var files = new FormData();
58748
+ files.append("files[0]", ev.target.files[0]);
58749
+ this.$http.post("/sysFiles/uploads", files).then(function (res) {
58750
+ _this.$message.success("上传成功"); //处理返回的数据
58751
+
58752
+
58753
+ var coverList = res.map(function (item) {
58754
+ return {
58755
+ fileName: item.fileName,
58756
+ fileType: "1",
58757
+ fileUrl: item.fileUrl,
58758
+ downUrl: item.downUrl,
58759
+ onlineUrl: item.onlineUrl,
58760
+ fileSize: item.fileSize
58761
+ };
58762
+ });
58763
+
58764
+ var coverOriginData = _this.$lodash.cloneDeep(_this.list[_this.coverIndex]);
58765
+
58766
+ _this.list.splice(_this.coverIndex, 1, coverList[0]);
58767
+
58768
+ _this.$emit("coverSuccess", {
58769
+ index: _this.coverIndex,
58770
+ fileList: _this.list,
58771
+ coverOriginData: coverOriginData
58772
+ });
58773
+ });
58774
+ },
58722
58775
  openNetDisc: function openNetDisc() {
58723
58776
  this.$refs.netDisc.open();
58724
58777
  },
@@ -58729,7 +58782,7 @@ var CustomLink_component = Object(componentNormalizer["a" /* default */])(
58729
58782
  this.$refs.input.click();
58730
58783
  },
58731
58784
  chooseFile: function chooseFile(ev) {
58732
- var _this = this;
58785
+ var _this2 = this;
58733
58786
 
58734
58787
  var fileList = Array.from(ev.target.files);
58735
58788
  console.log(ev);
@@ -58738,7 +58791,7 @@ var CustomLink_component = Object(componentNormalizer["a" /* default */])(
58738
58791
  files.append("files[".concat(index, "]"), item);
58739
58792
  });
58740
58793
  this.$http.post("/sysFiles/uploads", files).then(function (res) {
58741
- _this.$message.success("上传成功"); //处理返回的数据
58794
+ _this2.$message.success("上传成功"); //处理返回的数据
58742
58795
 
58743
58796
 
58744
58797
  var addList = res.map(function (item) {
@@ -58752,25 +58805,42 @@ var CustomLink_component = Object(componentNormalizer["a" /* default */])(
58752
58805
  };
58753
58806
  });
58754
58807
  addList.forEach(function (item) {
58755
- _this.list.push(item);
58808
+ _this2.list.push(item);
58809
+ });
58810
+
58811
+ _this2.$emit("uploadSuccess", {
58812
+ fileList: _this2.list,
58813
+ addData: _this2.$lodash.cloneDeep(addList)
58756
58814
  });
58757
58815
  });
58758
58816
  },
58759
58817
  addLink: function addLink(data) {
58760
58818
  this.list.push(data);
58819
+ this.$emit("addLinkSuccess", {
58820
+ fileList: this.list
58821
+ });
58761
58822
  },
58762
58823
  addNet: function addNet(arr) {
58763
- var _this2 = this;
58824
+ var _this3 = this;
58764
58825
 
58765
58826
  arr.forEach(function (item) {
58766
- _this2.list.push(item);
58827
+ _this3.list.push(item);
58828
+ });
58829
+ this.$emit("addNetSuccess", {
58830
+ fileList: this.list,
58831
+ addData: arr
58767
58832
  });
58768
58833
  },
58769
58834
  remove: function remove(index, fileName) {
58770
- var _this3 = this;
58835
+ var _this4 = this;
58771
58836
 
58772
58837
  this.$confirm("\u8BF7\u786E\u8BA4\u662F\u5426\u5220\u9664\u9644\u4EF6:".concat(fileName), "提示").then(function () {
58773
- _this3.list.splice(index, 1);
58838
+ _this4.list.splice(index, 1);
58839
+
58840
+ _this4.$emit("removeSuccess", {
58841
+ fileList: _this4.list,
58842
+ index: index
58843
+ });
58774
58844
  }).catch(function () {});
58775
58845
  },
58776
58846
  rerendering: function rerendering() {
@@ -58789,6 +58859,23 @@ var CustomLink_component = Object(componentNormalizer["a" /* default */])(
58789
58859
  return "." + arr.pop();
58790
58860
  }
58791
58861
  };
58862
+ },
58863
+ showCover: function showCover() {
58864
+ var _this$oprationAuth;
58865
+
58866
+ return (_this$oprationAuth = this.oprationAuth) === null || _this$oprationAuth === void 0 ? void 0 : _this$oprationAuth.cover;
58867
+ },
58868
+ showDownLoad: function showDownLoad() {
58869
+ var _this5 = this;
58870
+
58871
+ return function (item) {
58872
+ if (_this5.oprationAuth) return _this5.oprationAuth.download;
58873
+ return item.fileType != "2";
58874
+ };
58875
+ },
58876
+ showRemove: function showRemove() {
58877
+ if (this.oprationAuth) return this.oprationAuth.remove && this.editAble;
58878
+ return this.editAble;
58792
58879
  }
58793
58880
  },
58794
58881
  filters: {
@@ -58195,12 +58195,12 @@ module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {
58195
58195
  // ESM COMPAT FLAG
58196
58196
  __webpack_require__.r(__webpack_exports__);
58197
58197
 
58198
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"1415947d-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/upload/src/main.vue?vue&type=template&id=5a2b1b66&
58199
- var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{key:_vm.key,staticClass:"hb-upload"},[_c('div',{directives:[{name:"layout-flex",rawName:"v-layout-flex",value:({ gutter: 20, maxWidth: 280 }),expression:"{ gutter: 20, maxWidth: 280 }"}],staticClass:"hb-upload-wrapper"},[_vm._l((_vm.list),function(item,index){return _c('div',{key:index,staticClass:"unit-item-wrapper"},[_c('div',{staticClass:"file unit-item",on:{"click":function($event){return _vm.viewFile(item)}}},[_c('HbSvg',{attrs:{"iconClass":_vm._f("fileIcon")(true,_vm.getSuffix(item.fileName)),"fontSize":"44px"}}),_c('div',{staticClass:"right"},[_c('div',{staticClass:"title"},[_vm._v(" "+_vm._s(item.fileName)+" ")]),_c('div',{staticClass:"info"},[_c('div',{staticClass:"time"},[_vm._v(_vm._s(item.createTime))]),_c('div',{staticClass:"icon"},[(item.fileType != '2')?_c('i',{staticClass:"icon-main-xiazai mr20",on:{"click":function($event){$event.stopPropagation();return _vm.downloadFile(item)}}}):_vm._e(),(_vm.editAble)?_c('i',{staticClass:"icon-main-shanchu",on:{"click":function($event){$event.stopPropagation();return _vm.remove(index, item.fileName)}}}):_vm._e()])])])],1),_vm._t("default",null,{"fileData":item})],2)}),(_vm.editAble)?_c('div',{staticClass:"upload unit-item"},[_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.netDisc),expression:"netDisc"}],staticClass:"netdisc",on:{"click":_vm.openNetDisc}},[_vm._v(" 选择网盘地址 ")]),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.link),expression:"link"}],staticClass:"link",on:{"click":_vm.openLink}},[_vm._v("自定义链接")]),_c('div',{staticClass:"local-file",on:{"click":_vm.openFile}},[_c('i',{staticClass:"el-icon-plus"}),_vm._v(" 上传附件 "),_c('input',{ref:"input",staticClass:"hidden",attrs:{"type":"file","multiple":""},on:{"change":_vm.chooseFile}})])]):_vm._e()],2),_c('NetDisc',{ref:"netDisc",on:{"submit":_vm.addNet}}),_c('CustomLink',{ref:"customLink",on:{"submit":_vm.addLink}})],1)}
58198
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"1415947d-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/upload/src/main.vue?vue&type=template&id=dd80c924&
58199
+ var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{key:_vm.key,staticClass:"hb-upload"},[_c('div',{directives:[{name:"layout-flex",rawName:"v-layout-flex",value:({ gutter: 20, maxWidth: 280 }),expression:"{ gutter: 20, maxWidth: 280 }"}],staticClass:"hb-upload-wrapper"},[_vm._l((_vm.list),function(item,index){return _c('div',{key:index,staticClass:"unit-item-wrapper"},[_c('div',{staticClass:"file unit-item",on:{"click":function($event){return _vm.viewFile(item)}}},[_c('HbSvg',{attrs:{"iconClass":_vm._f("fileIcon")(true,_vm.getSuffix(item.fileName)),"fontSize":"44px"}}),_c('div',{staticClass:"right"},[_c('div',{staticClass:"title"},[_vm._v(" "+_vm._s(item.fileName)+" ")]),_c('div',{staticClass:"info"},[_c('div',{staticClass:"time"},[_vm._v(_vm._s(item.createTime))]),_c('div',{staticClass:"icon"},[(_vm.showCover)?_c('i',{staticClass:"icon-main-huanyuan mr10",on:{"click":function($event){$event.stopPropagation();return _vm.openCover(index)}}}):_vm._e(),(_vm.showDownLoad(item))?_c('i',{staticClass:"icon-main-xiazai mr10",on:{"click":function($event){$event.stopPropagation();return _vm.downloadFile(item)}}}):_vm._e(),(_vm.showRemove)?_c('i',{staticClass:"icon-main-shanchu",on:{"click":function($event){$event.stopPropagation();return _vm.remove(index, item.fileName)}}}):_vm._e()])])])],1),_vm._t("default",null,{"fileData":item})],2)}),(_vm.editAble)?_c('div',{staticClass:"upload unit-item"},[_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.netDisc),expression:"netDisc"}],staticClass:"netdisc",on:{"click":_vm.openNetDisc}},[_vm._v(" 选择网盘地址 ")]),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.link),expression:"link"}],staticClass:"link",on:{"click":_vm.openLink}},[_vm._v("自定义链接")]),_c('div',{staticClass:"local-file",on:{"click":_vm.openFile}},[_c('i',{staticClass:"el-icon-plus"}),_vm._v(" 上传附件 "),_c('input',{ref:"input",staticClass:"hidden",attrs:{"type":"file","multiple":""},on:{"change":_vm.chooseFile}})])]):_vm._e(),_c('input',{ref:"coverInput",staticClass:"hidden",attrs:{"type":"file"},on:{"change":function (ev) { return _vm.coverFile(ev); }}})],2),_c('NetDisc',{ref:"netDisc",on:{"submit":_vm.addNet}}),_c('CustomLink',{ref:"customLink",on:{"submit":_vm.addLink}})],1)}
58200
58200
  var staticRenderFns = []
58201
58201
 
58202
58202
 
58203
- // CONCATENATED MODULE: ./packages/upload/src/main.vue?vue&type=template&id=5a2b1b66&
58203
+ // CONCATENATED MODULE: ./packages/upload/src/main.vue?vue&type=template&id=dd80c924&
58204
58204
 
58205
58205
  // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.iterator.js
58206
58206
  var es_array_iterator = __webpack_require__("e260");
@@ -58220,18 +58220,18 @@ var web_url = __webpack_require__("2b3d");
58220
58220
  // EXTERNAL MODULE: ./node_modules/core-js/modules/web.url-search-params.js
58221
58221
  var web_url_search_params = __webpack_require__("9861");
58222
58222
 
58223
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.from.js
58224
- var es_array_from = __webpack_require__("a630");
58225
-
58226
- // EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom-collections.for-each.js
58227
- var web_dom_collections_for_each = __webpack_require__("159b");
58228
-
58229
58223
  // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.map.js
58230
58224
  var es_array_map = __webpack_require__("d81d");
58231
58225
 
58232
58226
  // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.splice.js
58233
58227
  var es_array_splice = __webpack_require__("a434");
58234
58228
 
58229
+ // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.from.js
58230
+ var es_array_from = __webpack_require__("a630");
58231
+
58232
+ // EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom-collections.for-each.js
58233
+ var web_dom_collections_for_each = __webpack_require__("159b");
58234
+
58235
58235
  // EXTERNAL MODULE: ./node_modules/core-js/modules/es.regexp.exec.js
58236
58236
  var es_regexp_exec = __webpack_require__("ac1f");
58237
58237
 
@@ -58672,6 +58672,17 @@ var CustomLink_component = Object(componentNormalizer["a" /* default */])(
58672
58672
  //
58673
58673
  //
58674
58674
  //
58675
+ //
58676
+ //
58677
+ //
58678
+ //
58679
+ //
58680
+ //
58681
+ //
58682
+ //
58683
+ //
58684
+ //
58685
+ //
58675
58686
 
58676
58687
 
58677
58688
  /* harmony default export */ var mainvue_type_script_lang_js_ = ({
@@ -58679,7 +58690,9 @@ var CustomLink_component = Object(componentNormalizer["a" /* default */])(
58679
58690
  componentName: "HbUpload",
58680
58691
  data: function data() {
58681
58692
  return {
58682
- key: Math.random()
58693
+ key: Math.random(),
58694
+ coverIndex: 0 // 要覆盖的文件索引
58695
+
58683
58696
  };
58684
58697
  },
58685
58698
  props: {
@@ -58700,6 +58713,10 @@ var CustomLink_component = Object(componentNormalizer["a" /* default */])(
58700
58713
  link: {
58701
58714
  type: Boolean,
58702
58715
  default: true
58716
+ },
58717
+ oprationAuth: {
58718
+ type: Object,
58719
+ default: function _default() {}
58703
58720
  }
58704
58721
  },
58705
58722
  methods: {
@@ -58728,6 +58745,42 @@ var CustomLink_component = Object(componentNormalizer["a" /* default */])(
58728
58745
 
58729
58746
  window.URL.revokeObjectURL(item.downUrl); // 释放掉blob对象
58730
58747
  },
58748
+ openCover: function openCover(index) {
58749
+ this.coverIndex = index;
58750
+ this.$refs.coverInput.click();
58751
+ },
58752
+ coverFile: function coverFile(ev) {
58753
+ var _this = this;
58754
+
58755
+ console.log(ev.target.files[0]);
58756
+ var files = new FormData();
58757
+ files.append("files[0]", ev.target.files[0]);
58758
+ this.$http.post("/sysFiles/uploads", files).then(function (res) {
58759
+ _this.$message.success("上传成功"); //处理返回的数据
58760
+
58761
+
58762
+ var coverList = res.map(function (item) {
58763
+ return {
58764
+ fileName: item.fileName,
58765
+ fileType: "1",
58766
+ fileUrl: item.fileUrl,
58767
+ downUrl: item.downUrl,
58768
+ onlineUrl: item.onlineUrl,
58769
+ fileSize: item.fileSize
58770
+ };
58771
+ });
58772
+
58773
+ var coverOriginData = _this.$lodash.cloneDeep(_this.list[_this.coverIndex]);
58774
+
58775
+ _this.list.splice(_this.coverIndex, 1, coverList[0]);
58776
+
58777
+ _this.$emit("coverSuccess", {
58778
+ index: _this.coverIndex,
58779
+ fileList: _this.list,
58780
+ coverOriginData: coverOriginData
58781
+ });
58782
+ });
58783
+ },
58731
58784
  openNetDisc: function openNetDisc() {
58732
58785
  this.$refs.netDisc.open();
58733
58786
  },
@@ -58738,7 +58791,7 @@ var CustomLink_component = Object(componentNormalizer["a" /* default */])(
58738
58791
  this.$refs.input.click();
58739
58792
  },
58740
58793
  chooseFile: function chooseFile(ev) {
58741
- var _this = this;
58794
+ var _this2 = this;
58742
58795
 
58743
58796
  var fileList = Array.from(ev.target.files);
58744
58797
  console.log(ev);
@@ -58747,7 +58800,7 @@ var CustomLink_component = Object(componentNormalizer["a" /* default */])(
58747
58800
  files.append("files[".concat(index, "]"), item);
58748
58801
  });
58749
58802
  this.$http.post("/sysFiles/uploads", files).then(function (res) {
58750
- _this.$message.success("上传成功"); //处理返回的数据
58803
+ _this2.$message.success("上传成功"); //处理返回的数据
58751
58804
 
58752
58805
 
58753
58806
  var addList = res.map(function (item) {
@@ -58761,25 +58814,42 @@ var CustomLink_component = Object(componentNormalizer["a" /* default */])(
58761
58814
  };
58762
58815
  });
58763
58816
  addList.forEach(function (item) {
58764
- _this.list.push(item);
58817
+ _this2.list.push(item);
58818
+ });
58819
+
58820
+ _this2.$emit("uploadSuccess", {
58821
+ fileList: _this2.list,
58822
+ addData: _this2.$lodash.cloneDeep(addList)
58765
58823
  });
58766
58824
  });
58767
58825
  },
58768
58826
  addLink: function addLink(data) {
58769
58827
  this.list.push(data);
58828
+ this.$emit("addLinkSuccess", {
58829
+ fileList: this.list
58830
+ });
58770
58831
  },
58771
58832
  addNet: function addNet(arr) {
58772
- var _this2 = this;
58833
+ var _this3 = this;
58773
58834
 
58774
58835
  arr.forEach(function (item) {
58775
- _this2.list.push(item);
58836
+ _this3.list.push(item);
58837
+ });
58838
+ this.$emit("addNetSuccess", {
58839
+ fileList: this.list,
58840
+ addData: arr
58776
58841
  });
58777
58842
  },
58778
58843
  remove: function remove(index, fileName) {
58779
- var _this3 = this;
58844
+ var _this4 = this;
58780
58845
 
58781
58846
  this.$confirm("\u8BF7\u786E\u8BA4\u662F\u5426\u5220\u9664\u9644\u4EF6:".concat(fileName), "提示").then(function () {
58782
- _this3.list.splice(index, 1);
58847
+ _this4.list.splice(index, 1);
58848
+
58849
+ _this4.$emit("removeSuccess", {
58850
+ fileList: _this4.list,
58851
+ index: index
58852
+ });
58783
58853
  }).catch(function () {});
58784
58854
  },
58785
58855
  rerendering: function rerendering() {
@@ -58798,6 +58868,23 @@ var CustomLink_component = Object(componentNormalizer["a" /* default */])(
58798
58868
  return "." + arr.pop();
58799
58869
  }
58800
58870
  };
58871
+ },
58872
+ showCover: function showCover() {
58873
+ var _this$oprationAuth;
58874
+
58875
+ return (_this$oprationAuth = this.oprationAuth) === null || _this$oprationAuth === void 0 ? void 0 : _this$oprationAuth.cover;
58876
+ },
58877
+ showDownLoad: function showDownLoad() {
58878
+ var _this5 = this;
58879
+
58880
+ return function (item) {
58881
+ if (_this5.oprationAuth) return _this5.oprationAuth.download;
58882
+ return item.fileType != "2";
58883
+ };
58884
+ },
58885
+ showRemove: function showRemove() {
58886
+ if (this.oprationAuth) return this.oprationAuth.remove && this.editAble;
58887
+ return this.editAble;
58801
58888
  }
58802
58889
  },
58803
58890
  filters: {
@@ -262,7 +262,7 @@ var t="pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut".split("_");function n
262
262
  //! moment.js locale configuration
263
263
  var t={1:"༡",2:"༢",3:"༣",4:"༤",5:"༥",6:"༦",7:"༧",8:"༨",9:"༩",0:"༠"},n={"༡":"1","༢":"2","༣":"3","༤":"4","༥":"5","༦":"6","༧":"7","༨":"8","༩":"9","༠":"0"},r=e.defineLocale("bo",{months:"ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ".split("_"),monthsShort:"ཟླ་1_ཟླ་2_ཟླ་3_ཟླ་4_ཟླ་5_ཟླ་6_ཟླ་7_ཟླ་8_ཟླ་9_ཟླ་10_ཟླ་11_ཟླ་12".split("_"),monthsShortRegex:/^(ཟླ་\d{1,2})/,monthsParseExact:!0,weekdays:"གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་".split("_"),weekdaysShort:"ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་".split("_"),weekdaysMin:"ཉི_ཟླ_མིག_ལྷག_ཕུར_སངས_སྤེན".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[དི་རིང] LT",nextDay:"[སང་ཉིན] LT",nextWeek:"[བདུན་ཕྲག་རྗེས་མ], LT",lastDay:"[ཁ་སང] LT",lastWeek:"[བདུན་ཕྲག་མཐའ་མ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ལ་",past:"%s སྔན་ལ",s:"ལམ་སང",ss:"%d སྐར་ཆ།",m:"སྐར་མ་གཅིག",mm:"%d སྐར་མ",h:"ཆུ་ཚོད་གཅིག",hh:"%d ཆུ་ཚོད",d:"ཉིན་གཅིག",dd:"%d ཉིན་",M:"ཟླ་བ་གཅིག",MM:"%d ཟླ་བ",y:"ལོ་གཅིག",yy:"%d ལོ"},preparse:function(e){return e.replace(/[༡༢༣༤༥༦༧༨༩༠]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/,meridiemHour:function(e,t){return 12===e&&(e=0),"མཚན་མོ"===t&&e>=4||"ཉིན་གུང"===t&&e<5||"དགོང་དག"===t?e+12:e},meridiem:function(e,t,n){return e<4?"མཚན་མོ":e<10?"ཞོགས་ཀས":e<17?"ཉིན་གུང":e<20?"དགོང་དག":"མཚན་མོ"},week:{dow:0,doy:6}});return r}))},d28b:function(e,t,n){var r=n("746f");r("iterator")},d2bb:function(e,t,n){var r=n("e330"),a=n("825a"),i=n("3bbe");e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{e=r(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set),e(n,[]),t=n instanceof Array}catch(o){}return function(n,r){return a(n),i(r),t?e(n,r):n.__proto__=r,n}}():void 0)},d2d4:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
264
264
  //! moment.js locale configuration
265
- var t=e.defineLocale("pt-br",{months:"janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"),monthsShort:"jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"),weekdays:"domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado".split("_"),weekdaysShort:"dom_seg_ter_qua_qui_sex_sáb".split("_"),weekdaysMin:"do_2ª_3ª_4ª_5ª_6ª_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY [às] HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY [às] HH:mm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"há %s",s:"poucos segundos",ss:"%d segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",invalidDate:"Data inválida"});return t}))},d2ee:function(e,t,n){"use strict";n.r(t);var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{key:e.key,staticClass:"hb-upload"},[n("div",{directives:[{name:"layout-flex",rawName:"v-layout-flex",value:{gutter:20,maxWidth:280},expression:"{ gutter: 20, maxWidth: 280 }"}],staticClass:"hb-upload-wrapper"},[e._l(e.list,(function(t,r){return n("div",{key:r,staticClass:"unit-item-wrapper"},[n("div",{staticClass:"file unit-item",on:{click:function(n){return e.viewFile(t)}}},[n("HbSvg",{attrs:{iconClass:e._f("fileIcon")(!0,e.getSuffix(t.fileName)),fontSize:"44px"}}),n("div",{staticClass:"right"},[n("div",{staticClass:"title"},[e._v(" "+e._s(t.fileName)+" ")]),n("div",{staticClass:"info"},[n("div",{staticClass:"time"},[e._v(e._s(t.createTime))]),n("div",{staticClass:"icon"},["2"!=t.fileType?n("i",{staticClass:"icon-main-xiazai mr20",on:{click:function(n){return n.stopPropagation(),e.downloadFile(t)}}}):e._e(),e.editAble?n("i",{staticClass:"icon-main-shanchu",on:{click:function(n){return n.stopPropagation(),e.remove(r,t.fileName)}}}):e._e()])])])],1),e._t("default",null,{fileData:t})],2)})),e.editAble?n("div",{staticClass:"upload unit-item"},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.netDisc,expression:"netDisc"}],staticClass:"netdisc",on:{click:e.openNetDisc}},[e._v(" 选择网盘地址 ")]),n("div",{directives:[{name:"show",rawName:"v-show",value:e.link,expression:"link"}],staticClass:"link",on:{click:e.openLink}},[e._v("自定义链接")]),n("div",{staticClass:"local-file",on:{click:e.openFile}},[n("i",{staticClass:"el-icon-plus"}),e._v(" 上传附件 "),n("input",{ref:"input",staticClass:"hidden",attrs:{type:"file",multiple:""},on:{change:e.chooseFile}})])]):e._e()],2),n("NetDisc",{ref:"netDisc",on:{submit:e.addNet}}),n("CustomLink",{ref:"customLink",on:{submit:e.addLink}})],1)},a=[],i=(n("e260"),n("d3b7"),n("3ca3"),n("ddb0"),n("2b3d"),n("9861"),n("a630"),n("159b"),n("d81d"),n("a434"),n("ac1f"),n("1276"),n("7db0"),n("caad"),n("2532"),function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("hb-dialog",{ref:"dialog",attrs:{title:"选择网盘地址",width:"700px",top:"0","append-to-body":!0,"destroy-on-close":!0},on:{submit:e.submit,closed:e.clear}},[n("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"wrapper",attrs:{slot:"normal"},slot:"normal"},[n("div",{staticClass:"top"},[n("el-select",{attrs:{clearable:!1},on:{change:e.discChange},model:{value:e.disc,callback:function(t){e.disc=t},expression:"disc"}},[n("el-option",{attrs:{label:"企业网盘",value:1}}),n("el-option",{attrs:{label:"我的收藏",value:2}})],1),n("el-input",{staticClass:"search-ipt ml10",attrs:{"prefix-icon":"el-icon-search",size:"mini",placeholder:"输入文件名查找",clearable:""},nativeOn:{keypress:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.init(0)}},model:{value:e.searchValue,callback:function(t){e.searchValue=t},expression:"searchValue"}},[n("template",{slot:"append"},[n("span",{staticClass:"append-text",on:{click:function(t){return e.init(0)}}},[e._v("搜索")])])],2)],1),1===e.disc?n("el-breadcrumb",{staticClass:"custom-breadcrumb mb15",attrs:{"separator-class":"el-icon-arrow-right"}},e._l(e.breadList,(function(t,r){return n("el-breadcrumb-item",{key:r,nativeOn:{click:function(n){return e.init(t.id,r===e.breadList.length-1)}}},[n("el-link",{attrs:{type:r!==e.breadList.length-1?"primary":"",underline:!1}},[e._v(" "+e._s(t.name)+" ")])],1)})),1):e._e(),n("div",{staticClass:"tree-wrapper"},[n("ul",e._l(e.treeList,(function(t){return n("li",{key:t.id,on:{click:function(n){return e.init(t.id,"1"===t.fileType)}}},[n("div",{staticClass:"flex"},[n("HbSvg",{staticClass:"mr10",attrs:{iconClass:e._f("filterFileIcon")(!0,e.getSuffix(t.fileName))}}),n("div",{staticClass:"title",attrs:{title:t.fileName}},[e._v(" "+e._s(t.fileName)+" ")])],1),"1"===t.fileType?n("div",{staticClass:"check-box",class:{selected:e.selected.some((function(e){return e.fileUrl===t.id}))},on:{click:function(n){return n.stopPropagation(),e.choose(t)}}}):e._e()])})),0)])],1)])}),o=[],s=n("2909"),u=(n("c740"),n("e6cf"),n("a79d"),{data:function(){return{disc:1,parentId:0,breadList:[],treeList:[],selected:[],loading:!0,searchValue:void 0}},methods:{clear:function(){this.parentId=0,this.breadList=[],this.treeList=[],this.selected=[],this.loading=!0},open:function(){this.$refs.dialog.open(),this.init(this.parentId)},choose:function(e){var t=this.selected.findIndex((function(t){return t.fileUrl===e.id}));-1===t?this.selected.push({fileName:e.fileName,fileUrl:e.id,fileType:"3",downUrl:e.downloadUrl,onlineUrl:e.onlineUrl}):this.selected.splice(t,1)},getBreadList:function(){var e=this;this.$http.get("/ndAuth/bread/".concat(this.parentId),{baseURL:"/platform"}).then((function(t){e.breadList=t})).finally((function(){e.loading=!1}))},getTreeList:function(){var e=this;this.$http.post("/ndRecord/recordByUser",{pSingle:this.parentId,fileName:this.searchValue},{baseURL:"/platform"}).then((function(t){e.treeList=t.record})).finally((function(){e.loading=!1}))},getCollectList:function(){var e=this;this.loading=!0,this.$http.get("/ndCollect/collectList").then((function(t){e.treeList=t})).finally((function(){e.loading=!1}))},init:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t||(this.loading=!0,this.selected=[],this.parentId=e,this.getBreadList(),this.getTreeList())},submit:function(){this.selected.length&&this.$emit("submit",Object(s["a"])(this.selected)),this.$refs.dialog.close()},discChange:function(e){1!==e?this.getCollectList():this.init(this.parentId)}},computed:{getSuffix:function(){return function(e){if(!e)return"";var t=e.split(".");return 1===t.length?"":"."+t.pop()}}}}),l=u,d=(n("dad1"),n("2877")),c=Object(d["a"])(l,i,o,!1,null,null,null),f=c.exports,h=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("hb-dialog",{ref:"dialog",attrs:{width:"480px",title:"添加自定义链接",formData:e.formData,rules:e.rules,"append-to-body":!0,"destroy-on-close":!0},on:{submit:e.submit,closed:e.clear},scopedSlots:e._u([{key:"form",fn:function(){return[n("el-form-item",{attrs:{label:"文件名",prop:"fileName"}},[n("el-input",{attrs:{maxlength:"50"},model:{value:e.formData.fileName,callback:function(t){e.$set(e.formData,"fileName",t)},expression:"formData.fileName"}})],1),n("el-form-item",{attrs:{label:"链接",prop:"fileUrl"}},[n("el-input",{attrs:{maxlength:"200"},model:{value:e.formData.fileUrl,callback:function(t){e.$set(e.formData,"fileUrl",t)},expression:"formData.fileUrl"}})],1)]},proxy:!0}])})},m=[],_=n("5530"),p={data:function(){return{formData:{fileName:"",fileType:2,fileUrl:""},rules:{fileName:[{required:!0,message:"请输入文件名",trigger:"change"}],fileUrl:[{required:!0,message:"请输入链接",trigger:"change"}]}}},methods:{open:function(){this.$refs.dialog.open(),this.$refs.dialog.clearValidate()},submit:function(){this.formData.fileUrl,this.$emit("submit",Object(_["a"])({},this.formData)),this.$refs.dialog.close()},clear:function(){this.formData={fileName:"",fileType:"2",fileUrl:""}}}},v=p,y=Object(d["a"])(v,h,m,!1,null,null,null),g=y.exports,b={name:"HbUpload",componentName:"HbUpload",data:function(){return{key:Math.random()}},props:{list:{type:Array,default:function(){return[]}},editAble:{type:Boolean,default:!0},netDisc:{type:Boolean,default:!0},link:{type:Boolean,default:!0}},methods:{viewFile:function(e){e.onlineUrl?window.open(e.onlineUrl):this.$message.error("没有此网盘文件的预览权限!")},downloadFile:function(e){if(e.downUrl){var t=document.createElement("a");t.href=e.downUrl,t.download=e.fileName,document.body.appendChild(t),t.click(),document.body.removeChild(t),window.URL.revokeObjectURL(e.downUrl)}else this.$message.error("没有此网盘文件的下载权限!")},openNetDisc:function(){this.$refs.netDisc.open()},openLink:function(){this.$refs.customLink.open()},openFile:function(){this.$refs.input.click()},chooseFile:function(e){var t=this,n=Array.from(e.target.files);console.log(e);var r=new FormData;n.forEach((function(e,t){r.append("files[".concat(t,"]"),e)})),this.$http.post("/sysFiles/uploads",r).then((function(e){t.$message.success("上传成功");var n=e.map((function(e){return{fileName:e.fileName,fileType:"1",fileUrl:e.fileUrl,downUrl:e.downUrl,onlineUrl:e.onlineUrl,fileSize:e.fileSize}}));n.forEach((function(e){t.list.push(e)}))}))},addLink:function(e){this.list.push(e)},addNet:function(e){var t=this;e.forEach((function(e){t.list.push(e)}))},remove:function(e,t){var n=this;this.$confirm("请确认是否删除附件:".concat(t),"提示").then((function(){n.list.splice(e,1)})).catch((function(){}))},rerendering:function(){this.key=Math.random()}},computed:{getSuffix:function(){return function(e){if(!e)return"";var t=e.split(".");return 1===t.length?"":"."+t.pop()}}},filters:{fileIcon:function(e,t){var n;if(!e)return"icon-color-wenjianjia";var r=t.toLowerCase(),a=[{suffix:[".jpg",".jpeg",".png",".gif"],icon:"icon-color-JPG"},{suffix:[".doc",".docx"],icon:"icon-color-wendang"},{suffix:[".xls",".xlsx"],icon:"icon-color-excel"},{suffix:".pdf",icon:"icon-color-pdf"},{suffix:".txt",icon:"icon-color-txt"}],i=null===(n=a.find((function(e){return"string"===typeof e.suffix?e.suffix===r:e.suffix.includes(r)})))||void 0===n?void 0:n.icon;return i||"icon-color-qita1"}},components:{NetDisc:f,CustomLink:g}},M=b,L=(n("3f11"),Object(d["a"])(M,r,a,!1,null,null,null));t["default"]=L.exports},d39b:function(e,t,n){var r={"./adv-query/index.js":"c0e6","./area-select/index.js":"0d11","./authority/index.js":"a02c","./avatar-list/index.js":"0c82","./custom-query/index.js":"ea31","./dialog/index.js":"ebe0","./edit-area/index.js":"1fd6","./excel/index.js":"ed0e","./export-dialog/index.js":"84d3","./filter-drop/index.js":"87f1","./float-footer/index.js":"2da0","./form-active/index.js":"09fe","./fragment/index.js":"9d7e","./full-table/index.js":"316c","./image-viewer/index.js":"fa01","./input/index.js":"0876","./nav-menu/index.js":"333e","./organize-dialog/index.js":"e862","./pagination/index.js":"2bd9","./query-form/index.js":"53f0","./select-vague/index.js":"ffd5","./svg/index.js":"bc8e","./table-filter/index.js":"008a","./table/index.js":"4fde","./tool-group/index.js":"bf30","./top-bar/index.js":"da15","./upload/index.js":"23b3"};function a(e){var t=i(e);return n(t)}function i(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}a.keys=function(){return Object.keys(r)},a.resolve=i,e.exports=a,a.id="d39b"},d3b7:function(e,t,n){var r=n("00ee"),a=n("6eeb"),i=n("b041");r||a(Object.prototype,"toString",i,{unsafe:!0})},d3da:function(e,t,n){"use strict";n.r(t);var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"hb-filterdrop",class:e.disabledFilter?"hb-filterdrop--disabled":""},[n("el-dropdown",{ref:"dropdown",attrs:{trigger:"click",placement:e.placement,indeterminate:!0,"hide-on-click":!1},on:{"visible-change":e.visibleEvent}},[n("span",{staticClass:"changeData"},[e._t("dropdown")],2),n("el-dropdown-menu",{staticClass:"hb-filterdrop__dropdown-selectMenu",attrs:{slot:"dropdown"},slot:"dropdown"},[n("DragAble",{staticClass:"hb-filterdrop__main-darggable",attrs:{"infinite-scroll-immediate":"false","infinite-scroll-disabled":"false"},model:{value:e.checkList,callback:function(t){e.checkList=t},expression:"checkList"}},[e._l(e.checkList,(function(t,r){return[void 0===t.currentSelect||t.fixed?e._e():n("div",{key:r,staticClass:"hb-filterdrop__darggable-selectItem"},[n("el-checkbox",{staticClass:"hb-filterdrop__custom-drop-checkbox",attrs:{disabled:t.disabled},model:{value:t.currentSelect,callback:function(n){e.$set(t,"currentSelect",n)},expression:"item.currentSelect"}}),n("span",[e._v(e._s(t.label))])],1)]}))],2),n("div",{staticClass:"hb-filterdrop__custom-dropdown-btn"},[n("el-button",{attrs:{loading:e.loading,type:"primary"},on:{click:e.save}},[e._v("保存")]),n("el-button",{on:{click:e.close}},[e._v("取消")])],1)],1)],1),e.showColumnsWidth?n("div",{staticClass:"hb-filterdrop__save-width icon-hb-shuaxin",on:{click:function(t){return e.saveWidth(!0)}}},[n("span",[e._v("还原列宽")])]):e._e(),e.showColumnsWidth?n("div",{staticClass:"hb-filterdrop__save-width icon-hb-liekuanbaocun",on:{click:function(t){return e.saveWidth(!1)}}},[n("span",[e._v("保存列宽")])]):e._e(),e.disabledFilter?n("div",{staticClass:"hb-filterdrop__cover"}):e._e()],1)},a=[],i=(n("d81d"),n("b76a")),o=n.n(i),s={name:"HbFilterdrop",componentName:"HbFilterdrop",inheritAttrs:!1,data:function(){return{checkList:[],loading:!1}},props:{showColumnsWidth:{type:Boolean,default:!1},columns:{type:Array,default:function(){return[]}},placement:{type:String,default:"bottom-end"},disabledFilter:{type:Boolean,default:!1}},methods:{save:function(){this.loading=!0,this.$emit("columnsChange",this.checkList,this)},saveWidth:function(e){this.$emit("columnsWidthChange",e)},filterColumns:function(e){return e.map((function(e){return{prop:e.prop,currentSelect:e.currentSelect}}))},close:function(){this.$refs.dropdown.hide(),this.checkList=this.$lodash.cloneDeep(this.columns)},onOpen:function(){this.checkList=this.$lodash.cloneDeep(this.columns)},visibleEvent:function(e){e&&this.onOpen()}},components:{DragAble:o.a}},u=s,l=n("2877"),d=Object(l["a"])(u,r,a,!1,null,null,null);t["default"]=d.exports},d44e:function(e,t,n){var r=n("9bf2").f,a=n("1a2d"),i=n("b622"),o=i("toStringTag");e.exports=function(e,t,n){e&&!n&&(e=e.prototype),e&&!a(e,o)&&r(e,o,{configurable:!0,value:t})}},d4c3:function(e,t,n){var r=n("342f"),a=n("da84");e.exports=/ipad|iphone|ipod/i.test(r)&&void 0!==a.Pebble},d546:function(e,t,n){"use strict";n.r(t);var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"hb-excel",style:{flex:e.flex?1:"none"}},[n("el-table",e._g(e._b({directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],key:e.key,ref:"table",attrs:{data:e.tableData,border:!0,height:e.height,"cell-class-name":e.isRequire,"tooltip-effect":"light"},on:{select:e.selectData,"select-all":e.selectData,"cell-click":e.cellClick}},"el-table",e.$attrs,!1),e.$listeners),[e.serial?n("el-table-column",{attrs:{label:"序号",type:"index",align:"center",width:"32",fixed:"left",resizable:!1,"class-name":"hb-table-index"}}):e._e(),e.select?n("el-table-column",{attrs:{type:"selection",align:"center",width:"20",selectable:e.selectable,resizable:!1,fixed:"left"}}):e._e(),e._l(e.columns,(function(t){return[t.slot?n("el-table-column",{key:t.prop,attrs:{prop:t.prop,label:t.label,width:t.minWidth>0?void 0:t.width,"min-width":t.minWidth,fixed:t.fixed,align:t.align||"left",resizable:!1!==t.resizable,sortable:t.sortable},scopedSlots:e._u([{key:"header",fn:function(t){return[e._t(t.column.property+"Header",(function(){return[e._v(" "+e._s(t.column.label)+" ")]}))]}},{key:"default",fn:function(r){var a=r.row;return[e._t(t.prop,null,{column:t,row:a}),a.$editers&&a.$editers.includes(t.prop)?n("HbFormActive",e._b({attrs:{row:a,prop:t.prop,column:t,originValue:a[t.prop],rules:e.rules},on:{changed:e.changed,update:e.update}},"HbFormActive",t.activeConfig,!1)):e._e()]}}],null,!0)}):n("el-table-column",{key:t.prop,attrs:{prop:t.prop,label:t.label,width:t.minWidth>0?void 0:t.width,"min-width":t.minWidth,fixed:t.fixed,align:t.align||"left",resizable:!1!==t.resizable,sortable:t.sortable},scopedSlots:e._u([{key:"default",fn:function(r){var a=r.row;return[e._v(" "+e._s(t.formatter?t.formatter(a):a[t.prop])+" "),a.$editers&&a.$editers.includes(t.prop)?n("HbFormActive",e._b({attrs:{row:a,prop:t.prop,column:t,originValue:a[t.prop],rules:e.rules},on:{changed:e.changed,update:e.update}},"HbFormActive",t.activeConfig,!1)):e._e()]}}],null,!0)})]})),e.showBlankColumn&&e.customBlankColumn?n("el-table-column",{key:"layoutColumn",attrs:{"min-width":"1px",resizable:!1}}):e._e(),e.isAdd?n("div",{staticClass:"add-btn",attrs:{slot:"append"},slot:"append"},[n("el-button",{attrs:{loading:e.addLoading,size:"mini",type:"primary"},on:{click:e.addRequest}},[e._v("提交")]),n("el-button",{attrs:{size:"mini",plain:""},on:{click:e.cancel}},[e._v("取消")])],1):e._e()],2),e.paging?n("div",{staticClass:"hb-fulltable__footer"},[n("hb-pagination",{attrs:{showFilter:e.showFilter,pageData:e.pageData,pageSizes:e.pageSizes},on:{pageSizeChange:e.handlePageSizeChange,pageNumChange:e.handlePageNumChange}})],1):e._e()],1)},a=[],i=(n("d3b7"),n("e6cf"),n("159b"),n("caad"),n("2532"),n("7db0"),{defPaging:!0,defPageData:{pageSize:50,pageNum:1,total:0},defPageSizes:[50,100,300,500,1e3],defShowFilter:!1}),o={name:"HbExcel",componentName:"HbExcel",data:function(){return{isAdd:!1,addLoading:!1,loading:!1,key:0,selectedData:[],activeCell:null,addData:{$editers:[],$add:!0,$editerComponents:[]},tipOnce:!1}},props:{tableData:{type:Array,default:function(){return[]}},columns:{type:Array,default:function(){return[]}},serial:{type:Boolean,default:function(){return!0}},select:{type:Boolean,default:function(){return!1}},height:{type:String,default:function(){return"auto"}},selectable:{type:Function,default:function(){return function(){return!1}}},customBlankColumn:{type:Boolean,default:!0},flex:{type:Boolean,default:!1},requestFn:{type:Function,default:function(){return function(){return Promise.resolve()}}},paging:{type:Boolean,default:function(){return i.defPaging}},pageData:{type:Object,default:function(){return i.defPageData}},pageSizes:{type:Array,default:function(){return i.defPageSizes}},showFilter:{type:Boolean,default:function(){return i.defShowFilter}},rules:{type:Object,default:function(){return{}}},auth:{type:Boolean,default:!0}},methods:{addRequest:function(){var e=this;this.addLoading=!0,this.$set(this.addData,"$validate",!0),this.columns.forEach((function(t){t.activeConfig&&!e.addData.$editers.includes(t.prop)&&e.addData.$editers.push(t.prop)})),this.$nextTick((function(){var t=e.addData.$editerComponents.some((function(e){return e.message}));t?(e.$message.error("数据校验不通过,请检查"),e.addLoading=!1):e.$emit("addRequest",e.addData,e.addCallBack)}))},cancel:function(){this.isAdd=this.addLoading=!1,this.tableData.pop(),this.addData={$editers:[],$add:!0,$editerComponents:[]}},addCallBack:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.addLoading=!1,e&&(this.isAdd=!1,delete this.addData.$editers,delete this.addData.$add,delete this.addData.$editerComponents,this.tableData[this.tableData.length-1]=this.$lodash.cloneDeep(this.addData),this.addData={$editers:[],$add:!0,$editerComponents:[]})},add:function(){var e=this;this.loading?this.$message.error("请等待数据加载完成后再执行新增操作"):this.isAdd?this.$message.info("当前正在执行新增操作"):(this.isAdd=!0,this.columns.forEach((function(t){var n;t.activeConfig&&(t.activeConfig.default?e.$set(e.addData,t.prop,e.$lodash.cloneDeep(t.activeConfig.default)):t.activeConfig.multiple||null!==(n=t.activeConfig.props)&&void 0!==n&&n.multiple?e.$set(e.addData,t.prop,[]):e.$set(e.addData,t.prop,""))})),this.tableData.push(this.addData),this.$nextTick((function(){var t=e.$refs.table.bodyWrapper.scrollHeight;e.$refs.table.bodyWrapper.scrollTop=t})))},cellClick:function(e,t,n){var r;if(this.auth){if(this.isAdd&&!e.$add)return!this.tipOnce&&this.$message.warning("请先完成新增操作"),void(this.tipOnce=!0);this.activeCell&&n!==this.activeCell&&(this.activeCell.classList.toggle("hb-excel-active"),this.activeCell.editer&&this.activeCell.editer.quit()),n!==this.activeCell&&(this.activeCell=n,this.activeCell.classList.toggle("hb-excel-active")),this.columns.find((function(e){return e.prop===t.property})).activeConfig&&(null!==(r=e.$editers)&&void 0!==r&&r.includes(t.property)||(!e.$editers&&this.$set(e,"$editers",[]),e.$editers.push(t.property)))}else this.$message.warning("您没有编辑权限")},isRequire:function(e){var t=e.row,n=e.column;if(t.$add){var r=this.rules[n.property];if(r&&r.some((function(e){return e.required})))return"is-required"}return""},openLoading:function(){this.loading=!0},closeLoading:function(){this.loading=!1},selectData:function(e){this.selectedData=e,this.$emit("selectData",this.selectedData)},update:function(e){this.$emit("update",e)},changed:function(e,t){this.$emit("changed",e,t)},handlePageSizeChange:function(e){this.$emit("pageSizeChange",e)},handlePageNumChange:function(e){this.$emit("pageNumChange",e)},doLayout:function(){this.$refs.table.doLayout()}},computed:{showBlankColumn:function(){return!this.columns.some((function(e){return e.currentSelect&&e.minWidth}))}},watch:{columns:{handler:function(){this.key=(new Date).getTime()}}}},s=o,u=n("2877"),l=Object(u["a"])(s,r,a,!1,null,null,null);t["default"]=l.exports},d5de:function(e,t,n){"use strict";n.r(t);var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.editType&&e.visible?n("div",{ref:"wrapper",staticClass:"hb-form-active"},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.requestError,expression:"requestError"}],staticClass:"request-error",attrs:{title:"提交失败"}}),n("el-form",{ref:"form",attrs:{"show-message":!1,model:e.row,rules:e.rules},nativeOn:{submit:function(e){e.preventDefault()}}},[n("el-form-item",{attrs:{prop:e.prop}},["input"===e.editType?[n("el-input",e._g(e._b({ref:"editer",staticStyle:{width:"100%"},attrs:{clearable:e.clearable,size:e.size,rows:"1",autosize:{minRows:1},resize:"none"},on:{blur:e.submit,input:function(t){return e.validate(!0,t)}},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.submit.apply(null,arguments)}},model:{value:e.row[e.prop],callback:function(t){e.$set(e.row,e.prop,t)},expression:"row[prop]"}},"el-input",e.$attrs,!1),e.$listeners))]:"select"===e.editType?[n("hb-select-vague",e._g(e._b({ref:"editer",staticStyle:{width:"100%"},attrs:{"collapse-tags":"",clearable:e.clearable,filterable:e.filterable,size:e.size},on:{"visible-change":e.selectSubmit,"select-click":e.selectClick,change:e.selectChange},model:{value:e.row[e.prop],callback:function(t){e.$set(e.row,e.prop,t)},expression:"row[prop]"}},"hb-select-vague",e.$attrs,!1),e.$listeners))]:"date-picker"===e.editType?[n("el-date-picker",e._g(e._b({ref:"editer",staticStyle:{width:"100%"},attrs:{"value-format":e.valueFormat,clearable:e.clearable,size:e.size},on:{blur:e.submit,change:function(t){return e.validate(!0,t)}},model:{value:e.row[e.prop],callback:function(t){e.$set(e.row,e.prop,t)},expression:"row[prop]"}},"el-date-picker",e.$attrs,!1),e.$listeners))]:"cascader"===e.editType?[n("el-cascader",e._g(e._b({ref:"cascader",staticStyle:{width:"100%"},attrs:{showAllLevels:e.showAllLevels,clearable:e.clearable,filterable:e.filterable,size:e.size},on:{focus:e.selectClick,"visible-change":e.selectSubmit,change:e.cascaderChange},model:{value:e.row[e.prop],callback:function(t){e.$set(e.row,e.prop,t)},expression:"row[prop]"}},"el-cascader",e.$attrs,!1),e.$listeners))]:e._e(),n("div",{directives:[{name:"show",rawName:"v-show",value:e.message,expression:"message"}],staticClass:"validate-error"},[n("el-tooltip",{attrs:{effect:"dark",content:e.message,placement:"top-start"}},[n("i",{staticClass:"el-icon-warning"})])],1),n("i",{directives:[{name:"show",rawName:"v-show",value:e.loading,expression:"loading"}],staticClass:"el-icon-loading"}),n("i",{directives:[{name:"show",rawName:"v-show",value:!e.loading&&!e.message&&!e.row.$add,expression:"!loading && !message && !row.$add"}],staticClass:"el-icon-success",attrs:{title:"提交"},on:{click:e.submit}})],2)],1)],1):e._e()},a=[],i=(n("4de4"),n("d3b7"),n("a15b"),n("d81d"),n("e9c4"),n("c740"),n("a434"),n("caad"),n("2532"),n("a630"),n("3ca3"),{name:"HbFormActive",componentName:"HbFormActive",data:function(){return{visible:!0,cell:null,message:"",requestError:!1,loading:!1}},props:{editType:{type:String},rules:{type:Object,default:function(){return{}}},column:{type:Object,required:!0},row:{type:Object,required:!0},prop:{type:String,required:!0},originValue:{required:!0},clearable:{type:Boolean,default:!0},filterable:{type:Boolean,default:!0},showAllLevels:{type:Boolean,default:!0},size:{type:String,default:"mini"}},methods:{selectChange:function(){this.$emit("changed",this.row,this.prop),this.validate(!0)},cascaderChange:function(){var e=this;if(this.$refs.cascader){this.$emit("changed",this.row,this.prop),this.validate(!0);var t=this.$refs.cascader.getCheckedNodes();t=t.filter((function(e){return e}));var n=t.map((function(t){return e.$attrs.joinPath?t.pathLabels.join(e.$attrs.joinPathPoint||"/"):t.label})).join(",");this.row[this.$attrs.translation]=n}},selectSubmit:function(e){var t=this;this.$nextTick((function(){if(!e){if(!t.$refs.cascader)return;t.$emit("changed",t.row,t.prop),t.validate(!0);var n=t.$refs.cascader.getCheckedNodes();n=n.filter((function(e){return e}));var r=n.map((function(e){return t.$attrs.joinPath?e.pathLabels.join(t.$attrs.joinPathPoint||"/"):e.label})).join(",");t.row[t.$attrs.translation]=r,t.submit()}}))},selectClick:function(){this.cell.click()},submit:function(){if(!this.row.$add)return JSON.stringify(this.row[this.prop])===JSON.stringify(this.$refs.form.originValue)?(this.$message.info("数据无变化"),void this.quit(!0)):void this.validate()},validate:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.$refs.form.validate((function(n,r){if(n)e.message="",t||(e.loading=!0,e.$emit("update",e));else if(!n)return e.message=r[e.prop][0].message,!1}))},successFull:function(){var e=this;this.$message.success("操作成功"),this.loading=!1,this.requestError=!1;var t=this.row.$editers.findIndex((function(t){return t===e.prop}));this.row.$editers.splice(t,1)},failed:function(){this.loading=!1,this.requestError=!0},quit:function(e){var t=this;if(!this.isError||e){var n=this.row.$editers.findIndex((function(e){return e===t.prop}));this.row.$editers.splice(n,1)}},change:function(e){console.log("change",e)},input:function(){console.log("input")},blur:function(){console.log("blur")},keyup:function(){console.log("keyup")},removeTag:function(){console.log("removeTag")},clear:function(){console.log("clear")},focus:function(){console.log("focus")}},computed:{valueFormat:function(){var e={date:"yyyy-MM-dd",month:"yyyy-MM",year:"yyyy"},t=this.$attrs.type||"year";return e[t]},isError:function(){return this.loading||this.message||this.requestError}},beforeDestroy:function(){this.cell.editer=null},destroyed:function(){console.log("销毁")},mounted:function(){var e;(this.$refs.form.originValue=this.originValue,this.cell=this.$refs.wrapper.parentNode.parentNode,Array.from(this.cell.classList).includes("is-hidden"))?this.visible=!1:(this.cell.editer=this,this.cascaderChange(),this.validate(!0),this.row.$add&&(this.row.$editerComponents.push(this),!this.row.$validate&&(null===(e=this.$refs.editer)||void 0===e||e.focus())))}}),o=i,s=n("2877"),u=Object(s["a"])(o,r,a,!1,null,null,null);t["default"]=u.exports},d69a:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
265
+ var t=e.defineLocale("pt-br",{months:"janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"),monthsShort:"jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"),weekdays:"domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado".split("_"),weekdaysShort:"dom_seg_ter_qua_qui_sex_sáb".split("_"),weekdaysMin:"do_2ª_3ª_4ª_5ª_6ª_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY [às] HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY [às] HH:mm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"há %s",s:"poucos segundos",ss:"%d segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",invalidDate:"Data inválida"});return t}))},d2ee:function(e,t,n){"use strict";n.r(t);var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{key:e.key,staticClass:"hb-upload"},[n("div",{directives:[{name:"layout-flex",rawName:"v-layout-flex",value:{gutter:20,maxWidth:280},expression:"{ gutter: 20, maxWidth: 280 }"}],staticClass:"hb-upload-wrapper"},[e._l(e.list,(function(t,r){return n("div",{key:r,staticClass:"unit-item-wrapper"},[n("div",{staticClass:"file unit-item",on:{click:function(n){return e.viewFile(t)}}},[n("HbSvg",{attrs:{iconClass:e._f("fileIcon")(!0,e.getSuffix(t.fileName)),fontSize:"44px"}}),n("div",{staticClass:"right"},[n("div",{staticClass:"title"},[e._v(" "+e._s(t.fileName)+" ")]),n("div",{staticClass:"info"},[n("div",{staticClass:"time"},[e._v(e._s(t.createTime))]),n("div",{staticClass:"icon"},[e.showCover?n("i",{staticClass:"icon-main-huanyuan mr10",on:{click:function(t){return t.stopPropagation(),e.openCover(r)}}}):e._e(),e.showDownLoad(t)?n("i",{staticClass:"icon-main-xiazai mr10",on:{click:function(n){return n.stopPropagation(),e.downloadFile(t)}}}):e._e(),e.showRemove?n("i",{staticClass:"icon-main-shanchu",on:{click:function(n){return n.stopPropagation(),e.remove(r,t.fileName)}}}):e._e()])])])],1),e._t("default",null,{fileData:t})],2)})),e.editAble?n("div",{staticClass:"upload unit-item"},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.netDisc,expression:"netDisc"}],staticClass:"netdisc",on:{click:e.openNetDisc}},[e._v(" 选择网盘地址 ")]),n("div",{directives:[{name:"show",rawName:"v-show",value:e.link,expression:"link"}],staticClass:"link",on:{click:e.openLink}},[e._v("自定义链接")]),n("div",{staticClass:"local-file",on:{click:e.openFile}},[n("i",{staticClass:"el-icon-plus"}),e._v(" 上传附件 "),n("input",{ref:"input",staticClass:"hidden",attrs:{type:"file",multiple:""},on:{change:e.chooseFile}})])]):e._e(),n("input",{ref:"coverInput",staticClass:"hidden",attrs:{type:"file"},on:{change:function(t){return e.coverFile(t)}}})],2),n("NetDisc",{ref:"netDisc",on:{submit:e.addNet}}),n("CustomLink",{ref:"customLink",on:{submit:e.addLink}})],1)},a=[],i=(n("e260"),n("d3b7"),n("3ca3"),n("ddb0"),n("2b3d"),n("9861"),n("d81d"),n("a434"),n("a630"),n("159b"),n("ac1f"),n("1276"),n("7db0"),n("caad"),n("2532"),function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("hb-dialog",{ref:"dialog",attrs:{title:"选择网盘地址",width:"700px",top:"0","append-to-body":!0,"destroy-on-close":!0},on:{submit:e.submit,closed:e.clear}},[n("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"wrapper",attrs:{slot:"normal"},slot:"normal"},[n("div",{staticClass:"top"},[n("el-select",{attrs:{clearable:!1},on:{change:e.discChange},model:{value:e.disc,callback:function(t){e.disc=t},expression:"disc"}},[n("el-option",{attrs:{label:"企业网盘",value:1}}),n("el-option",{attrs:{label:"我的收藏",value:2}})],1),n("el-input",{staticClass:"search-ipt ml10",attrs:{"prefix-icon":"el-icon-search",size:"mini",placeholder:"输入文件名查找",clearable:""},nativeOn:{keypress:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.init(0)}},model:{value:e.searchValue,callback:function(t){e.searchValue=t},expression:"searchValue"}},[n("template",{slot:"append"},[n("span",{staticClass:"append-text",on:{click:function(t){return e.init(0)}}},[e._v("搜索")])])],2)],1),1===e.disc?n("el-breadcrumb",{staticClass:"custom-breadcrumb mb15",attrs:{"separator-class":"el-icon-arrow-right"}},e._l(e.breadList,(function(t,r){return n("el-breadcrumb-item",{key:r,nativeOn:{click:function(n){return e.init(t.id,r===e.breadList.length-1)}}},[n("el-link",{attrs:{type:r!==e.breadList.length-1?"primary":"",underline:!1}},[e._v(" "+e._s(t.name)+" ")])],1)})),1):e._e(),n("div",{staticClass:"tree-wrapper"},[n("ul",e._l(e.treeList,(function(t){return n("li",{key:t.id,on:{click:function(n){return e.init(t.id,"1"===t.fileType)}}},[n("div",{staticClass:"flex"},[n("HbSvg",{staticClass:"mr10",attrs:{iconClass:e._f("filterFileIcon")(!0,e.getSuffix(t.fileName))}}),n("div",{staticClass:"title",attrs:{title:t.fileName}},[e._v(" "+e._s(t.fileName)+" ")])],1),"1"===t.fileType?n("div",{staticClass:"check-box",class:{selected:e.selected.some((function(e){return e.fileUrl===t.id}))},on:{click:function(n){return n.stopPropagation(),e.choose(t)}}}):e._e()])})),0)])],1)])}),o=[],s=n("2909"),u=(n("c740"),n("e6cf"),n("a79d"),{data:function(){return{disc:1,parentId:0,breadList:[],treeList:[],selected:[],loading:!0,searchValue:void 0}},methods:{clear:function(){this.parentId=0,this.breadList=[],this.treeList=[],this.selected=[],this.loading=!0},open:function(){this.$refs.dialog.open(),this.init(this.parentId)},choose:function(e){var t=this.selected.findIndex((function(t){return t.fileUrl===e.id}));-1===t?this.selected.push({fileName:e.fileName,fileUrl:e.id,fileType:"3",downUrl:e.downloadUrl,onlineUrl:e.onlineUrl}):this.selected.splice(t,1)},getBreadList:function(){var e=this;this.$http.get("/ndAuth/bread/".concat(this.parentId),{baseURL:"/platform"}).then((function(t){e.breadList=t})).finally((function(){e.loading=!1}))},getTreeList:function(){var e=this;this.$http.post("/ndRecord/recordByUser",{pSingle:this.parentId,fileName:this.searchValue},{baseURL:"/platform"}).then((function(t){e.treeList=t.record})).finally((function(){e.loading=!1}))},getCollectList:function(){var e=this;this.loading=!0,this.$http.get("/ndCollect/collectList").then((function(t){e.treeList=t})).finally((function(){e.loading=!1}))},init:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t||(this.loading=!0,this.selected=[],this.parentId=e,this.getBreadList(),this.getTreeList())},submit:function(){this.selected.length&&this.$emit("submit",Object(s["a"])(this.selected)),this.$refs.dialog.close()},discChange:function(e){1!==e?this.getCollectList():this.init(this.parentId)}},computed:{getSuffix:function(){return function(e){if(!e)return"";var t=e.split(".");return 1===t.length?"":"."+t.pop()}}}}),l=u,d=(n("dad1"),n("2877")),c=Object(d["a"])(l,i,o,!1,null,null,null),f=c.exports,h=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("hb-dialog",{ref:"dialog",attrs:{width:"480px",title:"添加自定义链接",formData:e.formData,rules:e.rules,"append-to-body":!0,"destroy-on-close":!0},on:{submit:e.submit,closed:e.clear},scopedSlots:e._u([{key:"form",fn:function(){return[n("el-form-item",{attrs:{label:"文件名",prop:"fileName"}},[n("el-input",{attrs:{maxlength:"50"},model:{value:e.formData.fileName,callback:function(t){e.$set(e.formData,"fileName",t)},expression:"formData.fileName"}})],1),n("el-form-item",{attrs:{label:"链接",prop:"fileUrl"}},[n("el-input",{attrs:{maxlength:"200"},model:{value:e.formData.fileUrl,callback:function(t){e.$set(e.formData,"fileUrl",t)},expression:"formData.fileUrl"}})],1)]},proxy:!0}])})},m=[],_=n("5530"),p={data:function(){return{formData:{fileName:"",fileType:2,fileUrl:""},rules:{fileName:[{required:!0,message:"请输入文件名",trigger:"change"}],fileUrl:[{required:!0,message:"请输入链接",trigger:"change"}]}}},methods:{open:function(){this.$refs.dialog.open(),this.$refs.dialog.clearValidate()},submit:function(){this.formData.fileUrl,this.$emit("submit",Object(_["a"])({},this.formData)),this.$refs.dialog.close()},clear:function(){this.formData={fileName:"",fileType:"2",fileUrl:""}}}},v=p,y=Object(d["a"])(v,h,m,!1,null,null,null),g=y.exports,b={name:"HbUpload",componentName:"HbUpload",data:function(){return{key:Math.random(),coverIndex:0}},props:{list:{type:Array,default:function(){return[]}},editAble:{type:Boolean,default:!0},netDisc:{type:Boolean,default:!0},link:{type:Boolean,default:!0},oprationAuth:{type:Object,default:function(){}}},methods:{viewFile:function(e){e.onlineUrl?window.open(e.onlineUrl):this.$message.error("没有此网盘文件的预览权限!")},downloadFile:function(e){if(e.downUrl){var t=document.createElement("a");t.href=e.downUrl,t.download=e.fileName,document.body.appendChild(t),t.click(),document.body.removeChild(t),window.URL.revokeObjectURL(e.downUrl)}else this.$message.error("没有此网盘文件的下载权限!")},openCover:function(e){this.coverIndex=e,this.$refs.coverInput.click()},coverFile:function(e){var t=this;console.log(e.target.files[0]);var n=new FormData;n.append("files[0]",e.target.files[0]),this.$http.post("/sysFiles/uploads",n).then((function(e){t.$message.success("上传成功");var n=e.map((function(e){return{fileName:e.fileName,fileType:"1",fileUrl:e.fileUrl,downUrl:e.downUrl,onlineUrl:e.onlineUrl,fileSize:e.fileSize}})),r=t.$lodash.cloneDeep(t.list[t.coverIndex]);t.list.splice(t.coverIndex,1,n[0]),t.$emit("coverSuccess",{index:t.coverIndex,fileList:t.list,coverOriginData:r})}))},openNetDisc:function(){this.$refs.netDisc.open()},openLink:function(){this.$refs.customLink.open()},openFile:function(){this.$refs.input.click()},chooseFile:function(e){var t=this,n=Array.from(e.target.files);console.log(e);var r=new FormData;n.forEach((function(e,t){r.append("files[".concat(t,"]"),e)})),this.$http.post("/sysFiles/uploads",r).then((function(e){t.$message.success("上传成功");var n=e.map((function(e){return{fileName:e.fileName,fileType:"1",fileUrl:e.fileUrl,downUrl:e.downUrl,onlineUrl:e.onlineUrl,fileSize:e.fileSize}}));n.forEach((function(e){t.list.push(e)})),t.$emit("uploadSuccess",{fileList:t.list,addData:t.$lodash.cloneDeep(n)})}))},addLink:function(e){this.list.push(e),this.$emit("addLinkSuccess",{fileList:this.list})},addNet:function(e){var t=this;e.forEach((function(e){t.list.push(e)})),this.$emit("addNetSuccess",{fileList:this.list,addData:e})},remove:function(e,t){var n=this;this.$confirm("请确认是否删除附件:".concat(t),"提示").then((function(){n.list.splice(e,1),n.$emit("removeSuccess",{fileList:n.list,index:e})})).catch((function(){}))},rerendering:function(){this.key=Math.random()}},computed:{getSuffix:function(){return function(e){if(!e)return"";var t=e.split(".");return 1===t.length?"":"."+t.pop()}},showCover:function(){var e;return null===(e=this.oprationAuth)||void 0===e?void 0:e.cover},showDownLoad:function(){var e=this;return function(t){return e.oprationAuth?e.oprationAuth.download:"2"!=t.fileType}},showRemove:function(){return this.oprationAuth?this.oprationAuth.remove&&this.editAble:this.editAble}},filters:{fileIcon:function(e,t){var n;if(!e)return"icon-color-wenjianjia";var r=t.toLowerCase(),a=[{suffix:[".jpg",".jpeg",".png",".gif"],icon:"icon-color-JPG"},{suffix:[".doc",".docx"],icon:"icon-color-wendang"},{suffix:[".xls",".xlsx"],icon:"icon-color-excel"},{suffix:".pdf",icon:"icon-color-pdf"},{suffix:".txt",icon:"icon-color-txt"}],i=null===(n=a.find((function(e){return"string"===typeof e.suffix?e.suffix===r:e.suffix.includes(r)})))||void 0===n?void 0:n.icon;return i||"icon-color-qita1"}},components:{NetDisc:f,CustomLink:g}},M=b,L=(n("3f11"),Object(d["a"])(M,r,a,!1,null,null,null));t["default"]=L.exports},d39b:function(e,t,n){var r={"./adv-query/index.js":"c0e6","./area-select/index.js":"0d11","./authority/index.js":"a02c","./avatar-list/index.js":"0c82","./custom-query/index.js":"ea31","./dialog/index.js":"ebe0","./edit-area/index.js":"1fd6","./excel/index.js":"ed0e","./export-dialog/index.js":"84d3","./filter-drop/index.js":"87f1","./float-footer/index.js":"2da0","./form-active/index.js":"09fe","./fragment/index.js":"9d7e","./full-table/index.js":"316c","./image-viewer/index.js":"fa01","./input/index.js":"0876","./nav-menu/index.js":"333e","./organize-dialog/index.js":"e862","./pagination/index.js":"2bd9","./query-form/index.js":"53f0","./select-vague/index.js":"ffd5","./svg/index.js":"bc8e","./table-filter/index.js":"008a","./table/index.js":"4fde","./tool-group/index.js":"bf30","./top-bar/index.js":"da15","./upload/index.js":"23b3"};function a(e){var t=i(e);return n(t)}function i(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}a.keys=function(){return Object.keys(r)},a.resolve=i,e.exports=a,a.id="d39b"},d3b7:function(e,t,n){var r=n("00ee"),a=n("6eeb"),i=n("b041");r||a(Object.prototype,"toString",i,{unsafe:!0})},d3da:function(e,t,n){"use strict";n.r(t);var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"hb-filterdrop",class:e.disabledFilter?"hb-filterdrop--disabled":""},[n("el-dropdown",{ref:"dropdown",attrs:{trigger:"click",placement:e.placement,indeterminate:!0,"hide-on-click":!1},on:{"visible-change":e.visibleEvent}},[n("span",{staticClass:"changeData"},[e._t("dropdown")],2),n("el-dropdown-menu",{staticClass:"hb-filterdrop__dropdown-selectMenu",attrs:{slot:"dropdown"},slot:"dropdown"},[n("DragAble",{staticClass:"hb-filterdrop__main-darggable",attrs:{"infinite-scroll-immediate":"false","infinite-scroll-disabled":"false"},model:{value:e.checkList,callback:function(t){e.checkList=t},expression:"checkList"}},[e._l(e.checkList,(function(t,r){return[void 0===t.currentSelect||t.fixed?e._e():n("div",{key:r,staticClass:"hb-filterdrop__darggable-selectItem"},[n("el-checkbox",{staticClass:"hb-filterdrop__custom-drop-checkbox",attrs:{disabled:t.disabled},model:{value:t.currentSelect,callback:function(n){e.$set(t,"currentSelect",n)},expression:"item.currentSelect"}}),n("span",[e._v(e._s(t.label))])],1)]}))],2),n("div",{staticClass:"hb-filterdrop__custom-dropdown-btn"},[n("el-button",{attrs:{loading:e.loading,type:"primary"},on:{click:e.save}},[e._v("保存")]),n("el-button",{on:{click:e.close}},[e._v("取消")])],1)],1)],1),e.showColumnsWidth?n("div",{staticClass:"hb-filterdrop__save-width icon-hb-shuaxin",on:{click:function(t){return e.saveWidth(!0)}}},[n("span",[e._v("还原列宽")])]):e._e(),e.showColumnsWidth?n("div",{staticClass:"hb-filterdrop__save-width icon-hb-liekuanbaocun",on:{click:function(t){return e.saveWidth(!1)}}},[n("span",[e._v("保存列宽")])]):e._e(),e.disabledFilter?n("div",{staticClass:"hb-filterdrop__cover"}):e._e()],1)},a=[],i=(n("d81d"),n("b76a")),o=n.n(i),s={name:"HbFilterdrop",componentName:"HbFilterdrop",inheritAttrs:!1,data:function(){return{checkList:[],loading:!1}},props:{showColumnsWidth:{type:Boolean,default:!1},columns:{type:Array,default:function(){return[]}},placement:{type:String,default:"bottom-end"},disabledFilter:{type:Boolean,default:!1}},methods:{save:function(){this.loading=!0,this.$emit("columnsChange",this.checkList,this)},saveWidth:function(e){this.$emit("columnsWidthChange",e)},filterColumns:function(e){return e.map((function(e){return{prop:e.prop,currentSelect:e.currentSelect}}))},close:function(){this.$refs.dropdown.hide(),this.checkList=this.$lodash.cloneDeep(this.columns)},onOpen:function(){this.checkList=this.$lodash.cloneDeep(this.columns)},visibleEvent:function(e){e&&this.onOpen()}},components:{DragAble:o.a}},u=s,l=n("2877"),d=Object(l["a"])(u,r,a,!1,null,null,null);t["default"]=d.exports},d44e:function(e,t,n){var r=n("9bf2").f,a=n("1a2d"),i=n("b622"),o=i("toStringTag");e.exports=function(e,t,n){e&&!n&&(e=e.prototype),e&&!a(e,o)&&r(e,o,{configurable:!0,value:t})}},d4c3:function(e,t,n){var r=n("342f"),a=n("da84");e.exports=/ipad|iphone|ipod/i.test(r)&&void 0!==a.Pebble},d546:function(e,t,n){"use strict";n.r(t);var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"hb-excel",style:{flex:e.flex?1:"none"}},[n("el-table",e._g(e._b({directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],key:e.key,ref:"table",attrs:{data:e.tableData,border:!0,height:e.height,"cell-class-name":e.isRequire,"tooltip-effect":"light"},on:{select:e.selectData,"select-all":e.selectData,"cell-click":e.cellClick}},"el-table",e.$attrs,!1),e.$listeners),[e.serial?n("el-table-column",{attrs:{label:"序号",type:"index",align:"center",width:"32",fixed:"left",resizable:!1,"class-name":"hb-table-index"}}):e._e(),e.select?n("el-table-column",{attrs:{type:"selection",align:"center",width:"20",selectable:e.selectable,resizable:!1,fixed:"left"}}):e._e(),e._l(e.columns,(function(t){return[t.slot?n("el-table-column",{key:t.prop,attrs:{prop:t.prop,label:t.label,width:t.minWidth>0?void 0:t.width,"min-width":t.minWidth,fixed:t.fixed,align:t.align||"left",resizable:!1!==t.resizable,sortable:t.sortable},scopedSlots:e._u([{key:"header",fn:function(t){return[e._t(t.column.property+"Header",(function(){return[e._v(" "+e._s(t.column.label)+" ")]}))]}},{key:"default",fn:function(r){var a=r.row;return[e._t(t.prop,null,{column:t,row:a}),a.$editers&&a.$editers.includes(t.prop)?n("HbFormActive",e._b({attrs:{row:a,prop:t.prop,column:t,originValue:a[t.prop],rules:e.rules},on:{changed:e.changed,update:e.update}},"HbFormActive",t.activeConfig,!1)):e._e()]}}],null,!0)}):n("el-table-column",{key:t.prop,attrs:{prop:t.prop,label:t.label,width:t.minWidth>0?void 0:t.width,"min-width":t.minWidth,fixed:t.fixed,align:t.align||"left",resizable:!1!==t.resizable,sortable:t.sortable},scopedSlots:e._u([{key:"default",fn:function(r){var a=r.row;return[e._v(" "+e._s(t.formatter?t.formatter(a):a[t.prop])+" "),a.$editers&&a.$editers.includes(t.prop)?n("HbFormActive",e._b({attrs:{row:a,prop:t.prop,column:t,originValue:a[t.prop],rules:e.rules},on:{changed:e.changed,update:e.update}},"HbFormActive",t.activeConfig,!1)):e._e()]}}],null,!0)})]})),e.showBlankColumn&&e.customBlankColumn?n("el-table-column",{key:"layoutColumn",attrs:{"min-width":"1px",resizable:!1}}):e._e(),e.isAdd?n("div",{staticClass:"add-btn",attrs:{slot:"append"},slot:"append"},[n("el-button",{attrs:{loading:e.addLoading,size:"mini",type:"primary"},on:{click:e.addRequest}},[e._v("提交")]),n("el-button",{attrs:{size:"mini",plain:""},on:{click:e.cancel}},[e._v("取消")])],1):e._e()],2),e.paging?n("div",{staticClass:"hb-fulltable__footer"},[n("hb-pagination",{attrs:{showFilter:e.showFilter,pageData:e.pageData,pageSizes:e.pageSizes},on:{pageSizeChange:e.handlePageSizeChange,pageNumChange:e.handlePageNumChange}})],1):e._e()],1)},a=[],i=(n("d3b7"),n("e6cf"),n("159b"),n("caad"),n("2532"),n("7db0"),{defPaging:!0,defPageData:{pageSize:50,pageNum:1,total:0},defPageSizes:[50,100,300,500,1e3],defShowFilter:!1}),o={name:"HbExcel",componentName:"HbExcel",data:function(){return{isAdd:!1,addLoading:!1,loading:!1,key:0,selectedData:[],activeCell:null,addData:{$editers:[],$add:!0,$editerComponents:[]},tipOnce:!1}},props:{tableData:{type:Array,default:function(){return[]}},columns:{type:Array,default:function(){return[]}},serial:{type:Boolean,default:function(){return!0}},select:{type:Boolean,default:function(){return!1}},height:{type:String,default:function(){return"auto"}},selectable:{type:Function,default:function(){return function(){return!1}}},customBlankColumn:{type:Boolean,default:!0},flex:{type:Boolean,default:!1},requestFn:{type:Function,default:function(){return function(){return Promise.resolve()}}},paging:{type:Boolean,default:function(){return i.defPaging}},pageData:{type:Object,default:function(){return i.defPageData}},pageSizes:{type:Array,default:function(){return i.defPageSizes}},showFilter:{type:Boolean,default:function(){return i.defShowFilter}},rules:{type:Object,default:function(){return{}}},auth:{type:Boolean,default:!0}},methods:{addRequest:function(){var e=this;this.addLoading=!0,this.$set(this.addData,"$validate",!0),this.columns.forEach((function(t){t.activeConfig&&!e.addData.$editers.includes(t.prop)&&e.addData.$editers.push(t.prop)})),this.$nextTick((function(){var t=e.addData.$editerComponents.some((function(e){return e.message}));t?(e.$message.error("数据校验不通过,请检查"),e.addLoading=!1):e.$emit("addRequest",e.addData,e.addCallBack)}))},cancel:function(){this.isAdd=this.addLoading=!1,this.tableData.pop(),this.addData={$editers:[],$add:!0,$editerComponents:[]}},addCallBack:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.addLoading=!1,e&&(this.isAdd=!1,delete this.addData.$editers,delete this.addData.$add,delete this.addData.$editerComponents,this.tableData[this.tableData.length-1]=this.$lodash.cloneDeep(this.addData),this.addData={$editers:[],$add:!0,$editerComponents:[]})},add:function(){var e=this;this.loading?this.$message.error("请等待数据加载完成后再执行新增操作"):this.isAdd?this.$message.info("当前正在执行新增操作"):(this.isAdd=!0,this.columns.forEach((function(t){var n;t.activeConfig&&(t.activeConfig.default?e.$set(e.addData,t.prop,e.$lodash.cloneDeep(t.activeConfig.default)):t.activeConfig.multiple||null!==(n=t.activeConfig.props)&&void 0!==n&&n.multiple?e.$set(e.addData,t.prop,[]):e.$set(e.addData,t.prop,""))})),this.tableData.push(this.addData),this.$nextTick((function(){var t=e.$refs.table.bodyWrapper.scrollHeight;e.$refs.table.bodyWrapper.scrollTop=t})))},cellClick:function(e,t,n){var r;if(this.auth){if(this.isAdd&&!e.$add)return!this.tipOnce&&this.$message.warning("请先完成新增操作"),void(this.tipOnce=!0);this.activeCell&&n!==this.activeCell&&(this.activeCell.classList.toggle("hb-excel-active"),this.activeCell.editer&&this.activeCell.editer.quit()),n!==this.activeCell&&(this.activeCell=n,this.activeCell.classList.toggle("hb-excel-active")),this.columns.find((function(e){return e.prop===t.property})).activeConfig&&(null!==(r=e.$editers)&&void 0!==r&&r.includes(t.property)||(!e.$editers&&this.$set(e,"$editers",[]),e.$editers.push(t.property)))}else this.$message.warning("您没有编辑权限")},isRequire:function(e){var t=e.row,n=e.column;if(t.$add){var r=this.rules[n.property];if(r&&r.some((function(e){return e.required})))return"is-required"}return""},openLoading:function(){this.loading=!0},closeLoading:function(){this.loading=!1},selectData:function(e){this.selectedData=e,this.$emit("selectData",this.selectedData)},update:function(e){this.$emit("update",e)},changed:function(e,t){this.$emit("changed",e,t)},handlePageSizeChange:function(e){this.$emit("pageSizeChange",e)},handlePageNumChange:function(e){this.$emit("pageNumChange",e)},doLayout:function(){this.$refs.table.doLayout()}},computed:{showBlankColumn:function(){return!this.columns.some((function(e){return e.currentSelect&&e.minWidth}))}},watch:{columns:{handler:function(){this.key=(new Date).getTime()}}}},s=o,u=n("2877"),l=Object(u["a"])(s,r,a,!1,null,null,null);t["default"]=l.exports},d5de:function(e,t,n){"use strict";n.r(t);var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.editType&&e.visible?n("div",{ref:"wrapper",staticClass:"hb-form-active"},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.requestError,expression:"requestError"}],staticClass:"request-error",attrs:{title:"提交失败"}}),n("el-form",{ref:"form",attrs:{"show-message":!1,model:e.row,rules:e.rules},nativeOn:{submit:function(e){e.preventDefault()}}},[n("el-form-item",{attrs:{prop:e.prop}},["input"===e.editType?[n("el-input",e._g(e._b({ref:"editer",staticStyle:{width:"100%"},attrs:{clearable:e.clearable,size:e.size,rows:"1",autosize:{minRows:1},resize:"none"},on:{blur:e.submit,input:function(t){return e.validate(!0,t)}},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.submit.apply(null,arguments)}},model:{value:e.row[e.prop],callback:function(t){e.$set(e.row,e.prop,t)},expression:"row[prop]"}},"el-input",e.$attrs,!1),e.$listeners))]:"select"===e.editType?[n("hb-select-vague",e._g(e._b({ref:"editer",staticStyle:{width:"100%"},attrs:{"collapse-tags":"",clearable:e.clearable,filterable:e.filterable,size:e.size},on:{"visible-change":e.selectSubmit,"select-click":e.selectClick,change:e.selectChange},model:{value:e.row[e.prop],callback:function(t){e.$set(e.row,e.prop,t)},expression:"row[prop]"}},"hb-select-vague",e.$attrs,!1),e.$listeners))]:"date-picker"===e.editType?[n("el-date-picker",e._g(e._b({ref:"editer",staticStyle:{width:"100%"},attrs:{"value-format":e.valueFormat,clearable:e.clearable,size:e.size},on:{blur:e.submit,change:function(t){return e.validate(!0,t)}},model:{value:e.row[e.prop],callback:function(t){e.$set(e.row,e.prop,t)},expression:"row[prop]"}},"el-date-picker",e.$attrs,!1),e.$listeners))]:"cascader"===e.editType?[n("el-cascader",e._g(e._b({ref:"cascader",staticStyle:{width:"100%"},attrs:{showAllLevels:e.showAllLevels,clearable:e.clearable,filterable:e.filterable,size:e.size},on:{focus:e.selectClick,"visible-change":e.selectSubmit,change:e.cascaderChange},model:{value:e.row[e.prop],callback:function(t){e.$set(e.row,e.prop,t)},expression:"row[prop]"}},"el-cascader",e.$attrs,!1),e.$listeners))]:e._e(),n("div",{directives:[{name:"show",rawName:"v-show",value:e.message,expression:"message"}],staticClass:"validate-error"},[n("el-tooltip",{attrs:{effect:"dark",content:e.message,placement:"top-start"}},[n("i",{staticClass:"el-icon-warning"})])],1),n("i",{directives:[{name:"show",rawName:"v-show",value:e.loading,expression:"loading"}],staticClass:"el-icon-loading"}),n("i",{directives:[{name:"show",rawName:"v-show",value:!e.loading&&!e.message&&!e.row.$add,expression:"!loading && !message && !row.$add"}],staticClass:"el-icon-success",attrs:{title:"提交"},on:{click:e.submit}})],2)],1)],1):e._e()},a=[],i=(n("4de4"),n("d3b7"),n("a15b"),n("d81d"),n("e9c4"),n("c740"),n("a434"),n("caad"),n("2532"),n("a630"),n("3ca3"),{name:"HbFormActive",componentName:"HbFormActive",data:function(){return{visible:!0,cell:null,message:"",requestError:!1,loading:!1}},props:{editType:{type:String},rules:{type:Object,default:function(){return{}}},column:{type:Object,required:!0},row:{type:Object,required:!0},prop:{type:String,required:!0},originValue:{required:!0},clearable:{type:Boolean,default:!0},filterable:{type:Boolean,default:!0},showAllLevels:{type:Boolean,default:!0},size:{type:String,default:"mini"}},methods:{selectChange:function(){this.$emit("changed",this.row,this.prop),this.validate(!0)},cascaderChange:function(){var e=this;if(this.$refs.cascader){this.$emit("changed",this.row,this.prop),this.validate(!0);var t=this.$refs.cascader.getCheckedNodes();t=t.filter((function(e){return e}));var n=t.map((function(t){return e.$attrs.joinPath?t.pathLabels.join(e.$attrs.joinPathPoint||"/"):t.label})).join(",");this.row[this.$attrs.translation]=n}},selectSubmit:function(e){var t=this;this.$nextTick((function(){if(!e){if(!t.$refs.cascader)return;t.$emit("changed",t.row,t.prop),t.validate(!0);var n=t.$refs.cascader.getCheckedNodes();n=n.filter((function(e){return e}));var r=n.map((function(e){return t.$attrs.joinPath?e.pathLabels.join(t.$attrs.joinPathPoint||"/"):e.label})).join(",");t.row[t.$attrs.translation]=r,t.submit()}}))},selectClick:function(){this.cell.click()},submit:function(){if(!this.row.$add)return JSON.stringify(this.row[this.prop])===JSON.stringify(this.$refs.form.originValue)?(this.$message.info("数据无变化"),void this.quit(!0)):void this.validate()},validate:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.$refs.form.validate((function(n,r){if(n)e.message="",t||(e.loading=!0,e.$emit("update",e));else if(!n)return e.message=r[e.prop][0].message,!1}))},successFull:function(){var e=this;this.$message.success("操作成功"),this.loading=!1,this.requestError=!1;var t=this.row.$editers.findIndex((function(t){return t===e.prop}));this.row.$editers.splice(t,1)},failed:function(){this.loading=!1,this.requestError=!0},quit:function(e){var t=this;if(!this.isError||e){var n=this.row.$editers.findIndex((function(e){return e===t.prop}));this.row.$editers.splice(n,1)}},change:function(e){console.log("change",e)},input:function(){console.log("input")},blur:function(){console.log("blur")},keyup:function(){console.log("keyup")},removeTag:function(){console.log("removeTag")},clear:function(){console.log("clear")},focus:function(){console.log("focus")}},computed:{valueFormat:function(){var e={date:"yyyy-MM-dd",month:"yyyy-MM",year:"yyyy"},t=this.$attrs.type||"year";return e[t]},isError:function(){return this.loading||this.message||this.requestError}},beforeDestroy:function(){this.cell.editer=null},destroyed:function(){console.log("销毁")},mounted:function(){var e;(this.$refs.form.originValue=this.originValue,this.cell=this.$refs.wrapper.parentNode.parentNode,Array.from(this.cell.classList).includes("is-hidden"))?this.visible=!1:(this.cell.editer=this,this.cascaderChange(),this.validate(!0),this.row.$add&&(this.row.$editerComponents.push(this),!this.row.$validate&&(null===(e=this.$refs.editer)||void 0===e||e.focus())))}}),o=i,s=n("2877"),u=Object(s["a"])(o,r,a,!1,null,null,null);t["default"]=u.exports},d69a:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
266
266
  //! moment.js locale configuration
267
267
  var t=e.defineLocale("fil",{months:"Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre".split("_"),monthsShort:"Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis".split("_"),weekdays:"Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado".split("_"),weekdaysShort:"Lin_Lun_Mar_Miy_Huw_Biy_Sab".split("_"),weekdaysMin:"Li_Lu_Ma_Mi_Hu_Bi_Sab".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"MM/D/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY HH:mm",LLLL:"dddd, MMMM DD, YYYY HH:mm"},calendar:{sameDay:"LT [ngayong araw]",nextDay:"[Bukas ng] LT",nextWeek:"LT [sa susunod na] dddd",lastDay:"LT [kahapon]",lastWeek:"LT [noong nakaraang] dddd",sameElse:"L"},relativeTime:{future:"sa loob ng %s",past:"%s ang nakalipas",s:"ilang segundo",ss:"%d segundo",m:"isang minuto",mm:"%d minuto",h:"isang oras",hh:"%d oras",d:"isang araw",dd:"%d araw",M:"isang buwan",MM:"%d buwan",y:"isang taon",yy:"%d taon"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}});return t}))},d6b6:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
268
268
  //! moment.js locale configuration
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hbte-saas-ui",
3
- "version": "1.6.9",
3
+ "version": "1.7.0",
4
4
  "main": "./lib/hbte-ui.umd.min.js",
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",