htui-yllkbz 1.2.34 → 1.2.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/htui.common.js +237 -32
- package/lib/htui.common.js.gz +0 -0
- package/lib/htui.umd.js +237 -32
- package/lib/htui.umd.js.gz +0 -0
- package/lib/htui.umd.min.js +1 -1
- package/lib/htui.umd.min.js.gz +0 -0
- package/package.json +3 -1
- package/src/packages/HtCountDown/index.ts +13 -0
- package/src/packages/HtCountDown/index.vue +124 -0
- package/src/packages/HtMd/index.vue +14 -4
- package/src/packages/HtTable/index.vue +12 -4
- package/src/packages/index.ts +4 -3
- package/src/packages/type.ts +3 -1
- package/src/views/About.vue +64 -10
package/lib/htui.umd.min.js
CHANGED
|
@@ -25,4 +25,4 @@ PERFORMANCE OF THIS SOFTWARE.
|
|
|
25
25
|
* (c) 2015-present Evan You
|
|
26
26
|
* @license MIT
|
|
27
27
|
*/
|
|
28
|
-
function y(e){return y="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y(e)}function x(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function C(e){return A(e)||E(e)||S()}function A(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}function E(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}function S(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function T(){return"undefined"!==typeof Reflect&&Reflect.defineMetadata&&Reflect.getOwnMetadataKeys}function j(e,t){D(e,t),Object.getOwnPropertyNames(t.prototype).forEach((function(n){D(e.prototype,t.prototype,n)})),Object.getOwnPropertyNames(t).forEach((function(n){D(e,t,n)}))}function D(e,t,n){var r=n?Reflect.getOwnMetadataKeys(t,n):Reflect.getOwnMetadataKeys(t);r.forEach((function(r){var o=n?Reflect.getOwnMetadata(r,t,n):Reflect.getOwnMetadata(r,t);n?Reflect.defineMetadata(r,o,e,n):Reflect.defineMetadata(r,o,e)}))}var I={__proto__:[]},L=I instanceof Array;function O(e){return function(t,n,r){var o="function"===typeof t?t:t.constructor;o.__decorators__||(o.__decorators__=[]),"number"!==typeof r&&(r=void 0),o.__decorators__.push((function(t){return e(t,n,r)}))}}function R(e){var t=y(e);return null==e||"object"!==t&&"function"!==t}function q(e,t){var n=t.prototype._init;t.prototype._init=function(){var t=this,n=Object.getOwnPropertyNames(e);if(e.$options.props)for(var r in e.$options.props)e.hasOwnProperty(r)||n.push(r);n.forEach((function(n){Object.defineProperty(t,n,{get:function(){return e[n]},set:function(t){e[n]=t},configurable:!0})}))};var r=new t;t.prototype._init=n;var o={};return Object.keys(r).forEach((function(e){void 0!==r[e]&&(o[e]=r[e])})),o}var F=["data","beforeCreate","created","beforeMount","mounted","beforeDestroy","destroyed","beforeUpdate","updated","activated","deactivated","render","errorCaptured","serverPrefetch"];function M(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.name=t.name||e._componentTag||e.name;var n=e.prototype;Object.getOwnPropertyNames(n).forEach((function(e){if("constructor"!==e)if(F.indexOf(e)>-1)t[e]=n[e];else{var r=Object.getOwnPropertyDescriptor(n,e);void 0!==r.value?"function"===typeof r.value?(t.methods||(t.methods={}))[e]=r.value:(t.mixins||(t.mixins=[])).push({data:function(){return x({},e,r.value)}}):(r.get||r.set)&&((t.computed||(t.computed={}))[e]={get:r.get,set:r.set})}})),(t.mixins||(t.mixins=[])).push({data:function(){return q(this,e)}});var r=e.__decorators__;r&&(r.forEach((function(e){return e(t)})),delete e.__decorators__);var o=Object.getPrototypeOf(e.prototype),i=o instanceof w.a?o.constructor:w.a,a=i.extend(t);return B(a,e,i),T()&&j(a,e),a}var P={prototype:!0,arguments:!0,callee:!0,caller:!0};function B(e,t,n){Object.getOwnPropertyNames(t).forEach((function(r){if(!P[r]){var o=Object.getOwnPropertyDescriptor(e,r);if(!o||o.configurable){var i=Object.getOwnPropertyDescriptor(t,r);if(!L){if("cid"===r)return;var a=Object.getOwnPropertyDescriptor(n,r);if(!R(i.value)&&a&&a.value===i.value)return}0,Object.defineProperty(e,r,i)}}}))}function z(e){return"function"===typeof e?M(e):function(t){return M(t,e)}}z.registerHooks=function(e){F.push.apply(F,C(e))};var N=z;var $="undefined"!==typeof Reflect&&"undefined"!==typeof Reflect.getMetadata;function U(e,t,n){if($&&!Array.isArray(e)&&"function"!==typeof e&&"undefined"===typeof e.type){var r=Reflect.getMetadata("design:type",t,n);r!==Object&&(e.type=r)}}function H(e){return void 0===e&&(e={}),function(t,n){U(e,t,n),O((function(t,n){(t.props||(t.props={}))[n]=e}))(t,n)}}function Q(e,t){void 0===t&&(t={});var n=t.deep,r=void 0!==n&&n,o=t.immediate,i=void 0!==o&&o;return O((function(t,n){"object"!==typeof t.watch&&(t.watch=Object.create(null));var o=t.watch;"object"!==typeof o[e]||Array.isArray(o[e])?"undefined"===typeof o[e]&&(o[e]=[]):o[e]=[o[e]],o[e].push({handler:n,deep:r,immediate:i})}))}var W=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{directives:[{name:"loading",rawName:"v-loading",value:e.state.loading,expression:"state.loading"}]},[n("header",[n("el-input",{staticClass:"htui-search",attrs:{placeholder:e.searchPlaceholder||"请输入关键字查询"},model:{value:e.state.filterData.Filter,callback:function(t){e.$set(e.state.filterData,"Filter",t)},expression:"state.filterData.Filter"}})],1),n("article",[n("el-table",{ref:"comTable",staticStyle:{width:"100%"},attrs:{height:e.confige.table&&e.confige.table.height?e.confige.table.height:250,"row-key":e.confige.table&&e.confige.table.rowkey?e.confige.table.rowkey:"id",data:e.dataSource,"tooltip-effect":"dark"},on:{"row-click":e.rowClick}},[n("el-table-column",{attrs:{width:"55"},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.row;return[n("el-checkbox",{attrs:{value:e.state.checkObj&&e.state.checkObj.id===r.id},nativeOn:{click:function(e){e.preventDefault()}}})]}}])}),n("el-table-column",{attrs:{label:"序号",width:"55"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s((e.state.filterData.currentPage-1)*e.state.filterData.MaxResultCount+(t.$index+1))+" ")]}}])}),e._l(e.columns,(function(t){return n("el-table-column",{key:t.key,attrs:{label:t.title,"show-overflow-tooltip":!0,prop:t.key,width:t.width||120}},[e._t(t.key,[e._v(e._s(t.key))])],2)}))],2)],1),n("footer",[n("el-row",[n("el-col",{attrs:{span:24}},[n("p",{staticStyle:{width:"90px",float:"left"}},[e._v("共"+e._s(e.dataSource.length)+"条")]),e._e()],1)],1)],1)])},V=[];n("4de4"),n("c740"),n("caad"),n("e6cf"),n("a79d"),n("2532"),n("4160"),n("e439"),n("dbb4"),n("b64b"),n("159b");function J(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function G(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function K(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?G(Object(n),!0).forEach((function(t){J(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):G(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Z=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("auth-login-form",{tag:"div",staticClass:"container-login",attrs:{"base-config":JSON.stringify(e.baseConfig)}})},X=[],Y=(n("cca6"),n("ac1f"),n("466d"),n("a78e")),ee=n.n(Y),te={Language:"zh-Hans",setLanguage:function(e){this.Language=e},loginUrl:"/oauth2/connect/token",content:"通过创新的技术与产品,提升用户价值",setContent:function(e){this.content=e},logoUrl:"/publicData/images/loginLogo.png",setLogoUrl:function(e){this.logoUrl=e},imgurl:"/publicData/images/loginBg-1.png",setImgUrl:function(e){this.imgurl=e},setLoginUrl:function(e){this.loginUrl=e},isTenantAvailable:"/oauth2/api/abp/multi-tenancy/tenants/by-name",setIsTenantAvailable:function(e){this.isTenantAvailable=e},authorization:"Authorization",token_type:"token_type",oAuthConfig:{grant_type:"password",scope:"AuthServer",client_id:"AuthServer_App",client_secret:"1q2w3e*"},setOAuthConfig:function(e){this.oAuthConfig=Object.assign(this.oAuthConfig,e)},accessTokenKey:"Abp.AuthToken",abpTenantKey:"Abp.TenantId",tenantKey:"__tenant",setTenantKey:function(e){this.tenantKey=e},ApplicationId:{key:"ApplicationId",value:""},setApplicationId:function(e){e.key&&(this.ApplicationId.key=e.key),e.value&&(this.ApplicationId.value=e.value)},userId:"userId",enc_auth_token_key:"enc_auth_token",refreshTokenKey:"refresh_token_key",loginTitle:"星环视界智能科技",setLoginTitle:function(e){this.loginTitle=e},getLoginState:function(){return!!ee.a.get(this.accessTokenKey)},currentLoginInfoUrl:"/oauth2/api/abp/application-configuration",setcurrentLoginInfoUrl:function(e){this.currentLoginInfoUrl=e},clearCookies:function(){var e=document.cookie.match(/[^ =;]+(?==)/g);if(e)for(var t=e.length;t--;)document.cookie=e[t]+"=0;path=/;expires="+new Date(0).toUTCString()},getCookie:function(e){return ee.a.get(e)},setCookie:function(e,t,n){ee.a.set(e,t,n)}},ne=te,re=function(e){f(n,e);var t=v(n);function n(){var e;return l(this,n),e=t.apply(this,arguments),e.baseConfig=ne,e}return u(n,[{key:"created",value:function(){}},{key:"mounted",value:function(){}}]),n}(w.a);re=b([N({components:{}})],re);var oe=re,ie=oe;n("019a");function ae(e,t,n,r,o,i,a,s){var l,c="function"===typeof e?e.options:e;if(t&&(c.render=t,c.staticRenderFns=n,c._compiled=!0),r&&(c.functional=!0),i&&(c._scopeId="data-v-"+i),a?(l=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"===typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),o&&o.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},c._ssrRegister=l):o&&(l=s?function(){o.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:o),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(e,t){return l.call(t),u(e,t)}}else{var p=c.beforeCreate;c.beforeCreate=p?[].concat(p,l):[l]}return{exports:e,options:c}}var se=ae(ie,Z,X,!1,null,null,null),le=(se.exports,n("bc3a")),ce=n.n(le);function ue(e){const t=(new Date).getTime().toString();let n=document.createElement("auth-alert");n.setAttribute("error",JSON.stringify(e)),n.setAttribute("response",e.response?JSON.stringify(e.response):""),n.id="my-alert"+t,document.body.appendChild(n)}let pe={baseURL:ne.baseUrl,timeout:6e4};const fe=ce.a.create(pe);fe.interceptors.request.use((function(e){if(ee.a.get(ne.accessTokenKey)){const t=ee.a.get(ne.token_type)+" "+ee.a.get(ne.accessTokenKey);e.headers[ne.authorization]=t}return ee.a.get(ne.tenantKey)&&(e.headers[ne.tenantKey]=ee.a.get(ne.tenantKey)),(ne.ApplicationId.value||ee.a.get(ne.ApplicationId.key))&&(e.headers[ne.ApplicationId.key]=ne.ApplicationId.value||ee.a.get(ne.ApplicationId.key)),e.headers["Accept-Language"]=ne.Language,e}),(function(e){return ue(e),Promise.reject(e)})),fe.interceptors.response.use((function(e){return e}),(function(e){return ue(e),console.log(e),Promise.reject(e)}));var de=fe,he=function(e){f(n,e);var t=v(n);function n(){var e;return l(this,n),e=t.apply(this,arguments),e.state={loading:!1,dataSource:[],showPage:!0,filterData:{currentPage:1,Filter:"",MaxResultCount:1e3,SkipCount:0,totalCount:0},checkObj:void 0},e}return u(n,[{key:"created",value:function(){this.getDataSource()}},{key:"rowClick",value:function(e){var t=this.state.checkObj;t&&t.id===e.id?this.state.checkObj=void 0:this.state.checkObj=e,this.$emit("callback",this.state.checkObj,"click")}},{key:"topage",value:function(e){Array.isArray(e)?this.state.dataSource=e:e.items&&e.items.length?(this.state.dataSource=e.items,this.state.filterData.totalCount=e.totalCount):this.state.dataSource=[],this.toFindData()}},{key:"clearCheck",value:function(){this.state.checkObj=void 0,this.$emit("callback",this.state.checkObj)}},{key:"toFindData",value:function(){var e=this.confige,t=e.name,n=e.value,r=this.state.dataSource,o=r.findIndex((function(e){return e[null!==t&&void 0!==t?t:"id"]===n}));r.length&&(this.state.checkObj=r[o]),this.$emit("callback",this.state.checkObj)}},{key:"handleCurrentChange",value:function(e){this.state.filterData.currentPage=e||1;var t=this.state.filterData,n=t.MaxResultCount,r=void 0===n?0:n,o=t.currentPage;this.state.filterData.SkipCount=(o-1)*r,this.getDataSource()}},{key:"handelSizeChange",value:function(e){this.state.filterData.currentPage=1,this.state.filterData.MaxResultCount=e;var t=this.state.filterData,n=t.MaxResultCount,r=void 0===n?0:n,o=t.currentPage;this.state.filterData.SkipCount=(o-1)*r,this.getDataSource()}},{key:"getDataSource",value:function(){var e=this,t=this.confige.ajax,n=t.type,r=void 0===n?"get":n,o=t.url,i=t.params,a=t.data;if(this.state.loading=!0,"get"===r){var s={params:K(K({},this.state.filterData),i)};de.get(o,K({},s)).then((function(t){e.topage(t.data)})).catch((function(){e.$notify.error("请求失败")})).finally((function(){e.state.loading=!1}))}else{var l={params:K(K({},this.state.filterData),i),data:K(K({},this.state.filterData),a)};de.post(o,K({},l)).then((function(t){e.topage(t.data)})).catch((function(){e.$notify.error("请求失败")})).finally((function(){e.state.loading=!1}))}}},{key:"dataSource",get:function(){var e=this.state,t=e.filterData,n=e.dataSource,r=t.Filter;return n.filter((function(e){return JSON.stringify(e).includes(r)}))}}]),n}(w.a);b([H()],he.prototype,"columns",void 0),b([H()],he.prototype,"searchPlaceholder",void 0),b([H()],he.prototype,"confige",void 0),b([H()],he.prototype,"visible",void 0),b([Q("confige")],he.prototype,"getDataSource",null),he=b([N],he);var ge=he,_e=ge,me=ae(_e,W,V,!1,null,"5a58ed06",null),ve=me.exports,be=(n("45f7"),function(e){f(n,e);var t=v(n);function n(){var e;return l(this,n),e=t.apply(this,arguments),e.state={config:{key:"",disabled:!1,clearable:!1,value:"",name:"",ajax:{url:"",params:{}},text:void 0},visible:!1,loading:!1,name:"",show:!1,icon:"el-icon-arrow-down",columns:[{key:"code",title:"编码"},{key:"name",title:"名称"},{key:"description",title:"描述"}]},e}return u(n,[{key:"created",value:function(){this.state.config=JSON.parse(this.config),this.columns&&(this.state.columns=this.columns)}},{key:"show",value:function(){this.state.icon="el-icon-arrow-up",this.state.show=!0}},{key:"callback",value:function(e,t){var n=this.state.config,r=n.text||"name";this.state.name=e?e[r]:void 0,this.$emit("change",e,t),t&&(this.$refs["elPopver"].doToggle(),this.state.visible=!1)}},{key:"hide",value:function(){this.state.icon="el-icon-arrow-down",this.state.visible=!0,this.state.show=!1}},{key:"blurInput",value:function(){var e=this.state.show;this.state.visible=!0,this.state.icon=e?"el-icon-arrow-up":"el-icon-arrow-down"}},{key:"focusInput",value:function(){this.state.icon="el-icon-circle-close",this.state.visible=!this.state.config.disabled}},{key:"clear",value:function(){if(!this.state.config.disabled){var e=this.$refs[this.state.config.key||"ht-table"];this.state.visible=!1,e.clearCheck()}}},{key:"watchConfig",value:function(e){this.state.config=JSON.parse(e)}}]),n}(w.a));b([H()],be.prototype,"comStyle",void 0),b([H()],be.prototype,"config",void 0),b([H()],be.prototype,"width",void 0),b([H()],be.prototype,"inputWidth",void 0),b([H()],be.prototype,"placeholder",void 0),b([H()],be.prototype,"searchPlaceholder",void 0),b([H()],be.prototype,"columns",void 0),b([Q("config")],be.prototype,"watchConfig",null),be=b([N({name:"HtSelectTable",components:{CommonTable:ve}})],be);var ke=be,we=ke,ye=ae(we,a,s,!1,null,null,null),xe=ye.exports;xe.install=function(e){e.component("HtSelectTable",xe)};var Ce=xe,Ae=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-pagination",{attrs:{background:e.background,"hide-on-single-page":e.hideOnSinglePage,disabled:!!e.disabled,small:!!e.small,"current-page":e.state.pageInfo.currentPage,"page-size":e.state.pageInfo.maxResultCount,"page-sizes":e.pageSizes||[10,20,30,40,50,100],layout:e.layout||"total, sizes, prev, pager, next, jumper",total:e.state.pageInfo.totalCount},on:{"current-change":e.handleCurrentChange,"size-change":e.handelSizeChange}})},Ee=[],Se=(n("a9e3"),function(e){f(n,e);var t=v(n);function n(){var e;return l(this,n),e=t.apply(this,arguments),e.state={loading:!1,pageInfo:{currentPage:1,maxResultCount:10,skipCount:0,totalCount:0}},e}return u(n,[{key:"created",value:function(){this.pageInfo&&this.setpageInfo(this.pageInfo)}},{key:"handleCurrentChange",value:function(e){this.state.pageInfo.currentPage=e||1;var t=this.state.pageInfo,n=t.maxResultCount,r=void 0===n?0:n,o=t.currentPage;this.state.pageInfo.skipCount=(o-1)*r,this.$emit("onchange",this.state.pageInfo)}},{key:"handelSizeChange",value:function(e){this.state.pageInfo.currentPage=1,this.state.pageInfo.maxResultCount=e,this.handleCurrentChange(1)}},{key:"setpageInfo",value:function(e){var t=e;this.state.pageInfo={currentPage:Number(t.currentPage),maxResultCount:Number(t.pageSize),skipCount:Number(t.skipCount),totalCount:Number(t.totalCount)}}}]),n}(w.a));b([H()],Se.prototype,"comStyle",void 0),b([H()],Se.prototype,"small",void 0),b([H()],Se.prototype,"pageInfo",void 0),b([H()],Se.prototype,"pageSize",void 0),b([H()],Se.prototype,"skipCount",void 0),b([H()],Se.prototype,"disabled",void 0),b([H()],Se.prototype,"background",void 0),b([H()],Se.prototype,"hideOnSinglePage",void 0),b([H()],Se.prototype,"pageSizes",void 0),b([H()],Se.prototype,"layout",void 0),b([Q("pageInfo")],Se.prototype,"setpageInfo",null),Se=b([N({name:"HtPagination"})],Se);var Te=Se,je=Te,De=ae(je,Ae,Ee,!1,null,null,null),Ie=De.exports;Ie.install=function(e){e.component("HtPagination",Ie)};var Le=Ie,Oe=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{directives:[{name:"loading",rawName:"v-loading",value:e.state.loading,expression:"state.loading"}]},[n("article",[n("el-table",{ref:"comTable",attrs:{height:e.height,"max-height":e.maxHeight,border:e.border,stripe:e.stripe,size:e.size,fit:e.fit,"show-header":e.showHeader,"empty-text":e.emptyText||"暂无数据","row-style":e.rowStyle,"row-class-name":e.rowClassName,"current-row-key":e.currentRowKey,"highlight-current-row":e.highlightCurrentRow,"row-key":e.rowKey||"id",data:e.data,"tooltip-effect":"dark"},on:{"row-click":function(t,n,r){return e.$emit("row-click",t,n,r)},"row-contextmenu":function(t,n,r){return e.$emit("row-contextmenu",t,n,r)},"row-dblclick":function(t,n,r){return e.$emit("row-dblclick",t,n,r)},"header-click":function(t,n){return e.$emit("header-click",t,n)},"header-contextmenu":function(t,n){return e.$emit("header-contextmenu",t,n)},"sort-change":function(t){var n=t.column,r=t.prop,o=t.order;return e.$emit("sort-change",{column:n,prop:r,order:o})},"filter-change":function(t){return e.$emit("filter-change",t)},"current-change":function(t,n){return e.$emit("current-change",t,n)},select:function(t,n){return e.$emit("select",t,n)},"select-all":function(t){return e.$emit("select-all",t)},"selection-change":function(t){return e.$emit("selection-change",t)},"cell-mouse-enter":function(t,n,r,o){return e.$emit("cell-mouse-enter",t,n,r,o)},"cell-mouse-leave":function(t,n,r,o){return e.$emit("cell-mouse-leave",t,n,r,o)},"cell-click":function(t,n,r,o){return e.$emit("cell-click",t,n,r,o)},"cell-dblclick":function(t,n,r,o){return e.$emit("cell-dblclick",t,n,r,o)}}},[e.checked?n("el-table-column",{attrs:{width:"55","reserve-selection":e.reserveSelection,selectable:e.selectable,type:"selection"}}):e._e(),e.hideOrder?e._e():n("el-table-column",{attrs:{label:void 0===e.keyName?"序号":e.keyName,align:"center",width:"55"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s((e.state.pageInfo.currentPage-1)*e.state.pageInfo.pageSize+(t.$index+1))+" ")]}}],null,!1,2272936552)},[n("template",{slot:"header"},[e._t("header_order")],2)],2),e._l(e.columns,(function(t){return[t.hide?e._e():n("el-table-column",{key:t.key,attrs:{label:t.title,fixed:t.fixed,align:t.align,"header-align":t.headerAlign,"column-key":t.columnKey,"class-name":t.className,prop:t.key,"show-overflow-tooltip":"common"!==t.type&&"org"!==t.type&&"userId"!==t.type&&!1!==t.showOverflowTooltip,sortable:t.sortable,"sort-method":t.sortMethod,"sort-orders":t.sortOrders,formatter:t.formatter,"sort-by":t.sortBy,"min-width":t.minWidth,width:t.width},scopedSlots:e._u([{key:"default",fn:function(r){var o=r.row,i=r.column,a=r.rowIndex;return[e._t(t.key,["org"===t.type?[e.getPropByPath(o,t.key)?n("common-org-info",{attrs:{"org-id":e.getPropByPath(o,t.key),type:"tag"}}):n("span",[e._v("--")])]:"common"===t.type?[e.getPropByPath(o,t.key)?n("common-datas-info-id",{tag:"div",attrs:{"user-id":t.commonType["userId"]?e.getPropByPath(o,t.key):"[]","department-id":t.commonType["departmentId"]?e.getPropByPath(o,t.key):"[]","role-id":t.commonType["roleId"]?e.getPropByPath(o,t.key):"[]","base-data-id":t.commonType["baseDataId"]?e.getPropByPath(o,t.key):"","base-data-value":t.commonType["baseDataValue"]?e.getPropByPath(o,t.key):"","base-data-name":t.commonType["baseDataName"]?e.getPropByPath(o,t.key):"","base-data-info":!0}}):n("span",[e._v("--")])]:"userId"===t.type?[e.getPropByPath(o,t.key)?n("common-datas-info-id",{tag:"div",attrs:{"user-id":JSON.stringify(e.getPropByPath(o,t.key)),"base-data-info":!0}}):n("span",[e._v("--")])]:"time"===t.type?[e.getPropByPath(o,t.key)?n("span",[e._v(e._s(e.getPropByPath(o,t.key).replace("T"," ").slice(0,19)))]):n("span",[e._v("--")])]:n("span",[e._v(e._s(e.getPropByPath(o,t.key)))])],{row:o,column:i,rowIndex:a})]}},{key:"header",fn:function(n){var r=n.column,o=n.$index;return[e._t("header_"+t.key,[e._v(e._s(t.title))],{column:r,$index:o})]}}],null,!0)})]}))],2)],1),e.hidePage?e._e():n("footer",[n("el-row",{attrs:{name:"footer"}},[e._t("footerLeft"),n("el-col",{attrs:{span:12}},[n("PageInfo",{attrs:{"hide-on-single-page":e.pagination&&e.pagination.hideOnSinglePage,small:e.pagination&&e.pagination.small,"page-sizes":e.pagination&&e.pagination.pageSizes,"page-info":e.state.pageInfo},on:{onchange:function(t){return e.$emit("onchange",t)}}})],1)],2)],1)])},Re=[],qe=(n("5319"),n("1276"),function(e){f(n,e);var t=v(n);function n(){var e;return l(this,n),e=t.apply(this,arguments),e.state={loading:!1,pageInfo:{currentPage:1,pageSize:10,skipCount:0,totalCount:0}},e}return u(n,[{key:"created",value:function(){this.setPageInfo(this.pageInfo)}},{key:"getPropByPath",value:function(e,t,n){var r=e;t=t.replace(/\[(\w+)\]/g,".$1"),t=t.replace(/^\./,"");for(var o=t.split("."),i=0,a=o.length;i<a-1;++i){if(!r&&!n)break;var s=o[i];if(!(s in r)){if(n)throw new Error("please transfer a valid prop path to form item!");break}r=r[s]}return r?r[o[i]]:null}},{key:"showValue",value:function(e,t){return t?t.includes(".")?"":e[t]:""}},{key:"setPageInfo",value:function(e){if(e){var t=e;this.state.pageInfo={currentPage:Number(t.currentPage),pageSize:Number(t.pageSize),skipCount:Number(t.skipCount),totalCount:Number(t.totalCount)}}}}]),n}(w.a));b([H()],qe.prototype,"columns",void 0),b([H()],qe.prototype,"data",void 0),b([H()],qe.prototype,"keyName",void 0),b([H()],qe.prototype,"hidePage",void 0),b([H()],qe.prototype,"checked",void 0),b([H()],qe.prototype,"reserveSelection",void 0),b([H()],qe.prototype,"height",void 0),b([H()],qe.prototype,"maxHeight",void 0),b([H()],qe.prototype,"rowKey",void 0),b([H()],qe.prototype,"stripe",void 0),b([H()],qe.prototype,"border",void 0),b([H()],qe.prototype,"size",void 0),b([H()],qe.prototype,"fit",void 0),b([H()],qe.prototype,"showHeader",void 0),b([H()],qe.prototype,"rowClassName",void 0),b([H()],qe.prototype,"selectable",void 0),b([H()],qe.prototype,"currentRowKey",void 0),b([H()],qe.prototype,"highlightCurrentRow",void 0),b([H()],qe.prototype,"rowStyle",void 0),b([H()],qe.prototype,"hideOrder",void 0),b([H()],qe.prototype,"pageInfo",void 0),b([H()],qe.prototype,"emptyText",void 0),b([H()],qe.prototype,"pagination",void 0),b([Q("pageInfo")],qe.prototype,"setPageInfo",null),qe=b([N({name:"HtTable",components:{PageInfo:Ie}})],qe);var Fe=qe,Me=Fe,Pe=ae(Me,Oe,Re,!1,null,"17bdc30a",null),Be=Pe.exports;Be.install=function(e){e.component("HtTable",Be)};var ze=Be,Ne=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("span",{directives:[{name:"loading",rawName:"v-loading",value:e.state.loading,expression:"state.loading"}],on:{click:e.exportExcel}},[e._t("default",[n("el-button",{attrs:{type:"primary"}},[e._v(" 导出Excel ")])],{loading:e.state.loading})],2)},$e=[];n("2b3d");w.a.config.productionTip=!1;var Ue=function(e){f(n,e);var t=v(n);function n(){var e;return l(this,n),e=t.apply(this,arguments),e.state={loading:!1},e}return u(n,[{key:"exportExcel",value:function(){var e=this;if(!1!==this.exportBefore){this.state.loading=!0;var t=this.fileName||"未知文件名.xlsx",n={responseType:"blob",params:{}};this.params&&(n=this.params),this.url&&("post"===this.method?de.post(this.url,n,{responseType:"blob"}).then((function(n){var r=n.data;if(!e.fileName){var o=n.headers["content-disposition"];if(!o)return void e.$notify.warning("暂无数据导出");t=decodeURIComponent(o.split("filename*=UTF-8")[1]).replace("''","")}var i=new Blob([r]);if("download"in document.createElement("a")){var a=document.createElement("a");a.download=t,a.style.display="none",a.href=URL.createObjectURL(i),document.body.appendChild(a),a.click(),URL.revokeObjectURL(a.href),document.body.removeChild(a)}else navigator.msSaveBlob(i,t)})).finally((function(){e.state.loading=!1})):de.get(this.url,{responseType:"blob",params:n}).then((function(n){var r=n.data;if(!e.fileName){var o=n.headers["content-disposition"];t=decodeURIComponent(o.split("filename*=UTF-8")[1]).replace("''","")}var i=new Blob([r]);if("download"in document.createElement("a")){var a=document.createElement("a");a.download=t,a.style.display="none",a.href=URL.createObjectURL(i),document.body.appendChild(a),a.click(),URL.revokeObjectURL(a.href),document.body.removeChild(a)}else navigator.msSaveBlob(i,t)})).finally((function(){e.state.loading=!1})))}}}]),n}(w.a);b([H()],Ue.prototype,"method",void 0),b([H()],Ue.prototype,"url",void 0),b([H()],Ue.prototype,"params",void 0),b([H()],Ue.prototype,"fileName",void 0),b([H()],Ue.prototype,"exportBefore",void 0),Ue=b([N],Ue);var He=Ue,Qe=He,We=ae(Qe,Ne,$e,!1,null,"23fd9fd2",null),Ve=We.exports;Ve.install=function(e){e.component("HtExport",Ve)};var Je=Ve,Ge=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"files-view"},[n("el-upload",{class:{"only-show":e.onlyShow},attrs:{action:"/files/api/filing/file/upload","on-success":e.handleSuccess,accept:e.state.accept,"before-upload":e.handelBeforeLoad,headers:e.headers,"file-list":e.state.fileData.fileList,"list-type":"picture-card",multiple:"",disabled:e.onlyShow},scopedSlots:e._u([{key:"file",fn:function(t){var r=t.file;return n("div",{attrs:{title:r.fileName}},[r.fileType&&r.fileType.includes("image")?n("img",{staticClass:"el-upload-list__item-thumbnail",attrs:{src:"/files/api/filing/file/download/"+r.fileToken,alt:r.fileName,fit:"fill"}}):n("img",{staticClass:"el-upload-list__item-thumbnail",attrs:{src:e.showIcon(r),alt:r.fileName,fit:"fill"}}),n("span",{staticClass:"el-upload-list__item-actions"},[r.fileType&&r.fileType.includes("image")?n("span",{staticClass:"el-upload-list__item-preview",on:{click:function(t){return e.handlePictureCardPreview(r)}}},[n("i",{staticClass:"el-icon-zoom-in"})]):e._e(),e.state.disabled?e._e():n("span",{staticClass:"el-upload-list__item-delete",on:{click:function(t){return e.handleDownload(r)}}},[n("i",{staticClass:"el-icon-download"})]),e.state.disabled||e.onlyShow?e._e():n("span",{staticClass:"el-upload-list__item-delete",on:{click:function(t){return e.handleRemove(r)}}},[n("i",{staticClass:"el-icon-delete"})])])])}}])},[n("i",{staticClass:"el-icon-plus",attrs:{slot:"default"},slot:"default"})]),n("el-dialog",{attrs:{visible:e.state.dialogVisible,"modal-append-to-body":!1,modal:!1,"append-to-body":!0},on:{"update:visible":function(t){return e.$set(e.state,"dialogVisible",t)}}},[n("article",{staticStyle:{height:"calc(100vh - 200px)",overflow:"auto"}},[n("img",{attrs:{src:e.state.dialogImageUrl,alt:""}})])])],1)},Ke=[];n("baa5"),n("fb6a"),n("a434");function Ze(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Xe(e){if(Array.isArray(e))return Ze(e)}n("a630");function Ye(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}function et(e,t){if(e){if("string"===typeof e)return Ze(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ze(e,t):void 0}}function tt(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function nt(e){return Xe(e)||Ye(e)||et(e)||tt()}var rt=n("fd57"),ot=n.n(rt),it=n("cb77"),at=n.n(it),st=n("5a7d"),lt=n.n(st),ct=n("b902"),ut=n.n(ct),pt=n("1683"),ft=n.n(pt),dt=n("35ba"),ht=n.n(dt),gt=n("8a0c"),_t=n.n(gt),mt=function(e){f(n,e);var t=v(n);function n(){var e;return l(this,n),e=t.apply(this,arguments),e.state={loading:!1,accept:".png, .jpg, .jpeg,.mp4,.pdf,.doc,.docx,.txt,.ppt,.pptx,.xls,.xlsx,.gif",fileData:{file:void 0,fileList:[]},dialogImageUrl:"",dialogVisible:!1,disabled:!1},e}return u(n,[{key:"created",value:function(){this.tokens&&(this.state.fileData.fileList=nt(this.tokens)),this.accept&&(this.state.accept=this.accept)}},{key:"showIcon",value:function(e,t){var n=e.fileName||"",r=e.fileType,o=_t.a;return(null===n||void 0===n?void 0:n.lastIndexOf(".docx"))>-1&&(o=lt.a),(null===n||void 0===n?void 0:n.lastIndexOf(".pptx"))>-1&&(o=ft.a),r?(r.includes("video")&&(o=ot.a),r.includes("doc")&&(o=lt.a),(r.includes("excel")||r.includes("sheet"))&&(o=ht.a),r.includes("pdf")&&(o=at.a),r.includes("text")&&(o=ut.a),r.includes("ppt")&&(o=ft.a),o):o}},{key:"handleSuccess",value:function(e,t,n){var r=this;n.forEach((function(e){if(e.url){var n,o={fileName:e.name,fileSize:e.size,fileToken:null===(n=e.response)||void 0===n?void 0:n.fileToken,fileType:e.raw.type,id:e.uid.toString()};r.state.fileData.fileList.push(K({},o)),e.uid==t.uid&&(r.state.fileData.file=K({},o))}})),this.$emit("change",this.state.fileData)}},{key:"handleRemove",value:function(e){var t=this.state.fileData.fileList.findIndex((function(t){return t.id==e.id}));t>=0&&(this.state.fileData.file=K({},e),this.state.fileData.fileList.splice(t,1),this.$emit("change",this.state.fileData))}},{key:"handlePictureCardPreview",value:function(e){this.state.dialogImageUrl="/files/api/filing/file/download/".concat(e.fileToken),this.state.dialogVisible=!0}},{key:"handelBeforeLoad",value:function(e){var t=e.name.lastIndexOf("."),n=e.name.slice(t+1),r=["mp4","avi","pdf","doc","docx","txt","ppt","pptx","png","gif","jpg","xls","xlsx"];return!!r.includes(n)||(this.$notify.warning("上传格式不正确"),!1)}},{key:"handleDownload",value:function(e){var t="/files/api/filing/file/download/".concat(e.fileToken),n=document.createElement("a");n.href=t,n.download="".concat(e.fileName),n.click(),window.URL.revokeObjectURL(t)}},{key:"onToken",value:function(){this.state.fileData.fileList=nt(this.tokens)}},{key:"headers",get:function(){return{_tenant:ne.getCookie("__tenant"),Authorization:"Bearer"+ne.getCookie("Abp.AuthToken")}}}]),n}(w.a);b([H({default:!1})],mt.prototype,"onlyShow",void 0),b([H()],mt.prototype,"tokens",void 0),b([H()],mt.prototype,"accept",void 0),b([Q("tokens")],mt.prototype,"onToken",null),mt=b([N],mt);var vt=mt,bt=vt,kt=(n("6344"),ae(bt,Ge,Ke,!1,null,null,null)),wt=kt.exports;wt.install=function(e){e.component("HtUpload",wt)};var yt=wt,xt=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("mavon-editor",{ref:"md",attrs:{subfield:e.subfield,default_open:"{}",placeholder:e.placeholder,editable:!e.disabled},on:{save:e.save,imgAdd:e.addImg,change:e.change},model:{value:e.value,callback:function(t){e.value=t},expression:"value"}})},Ct=[],At=n("b2d8"),Et=n.n(At);n("64e1");w.a.use(Et.a);var St=function(e){f(n,e);var t=v(n);function n(){var e;return l(this,n),e=t.apply(this,arguments),e.state={loading:!1},e}return u(n,[{key:"addImg",value:function(e,t){var n=this;if(this.changImg)this.$emit("callBackImg",e,t);else{var r=new FormData;r.append("file",t),de({url:"/files/api/filing/file/upload",method:"post",data:r,headers:{"Content-Type":"multipart/form-data"}}).then((function(t){200===t.status&&n.$refs.md.$img2Url(e,"/files/api/filing/file/download/".concat(t.data.fileToken))}))}}},{key:"change",value:function(e,t){this.$emit("input",e),this.$emit("change",e,t)}},{key:"save",value:function(e,t){this.$emit("save",e,t)}}]),n}(w.a);b([H()],St.prototype,"changImg",void 0),b([H()],St.prototype,"disabled",void 0),b([H()],St.prototype,"value",void 0),b([H()],St.prototype,"placeholder",void 0),b([H()],St.prototype,"subfield",void 0),St=b([N],St);var Tt=St,jt=Tt,Dt=ae(jt,xt,Ct,!1,null,"4db830f2",null),It=Dt.exports;It.install=function(e){e.component("HtMd",It)};var Lt=It,Ot=[Ce,Le,ze,Je,yt,Lt],Rt=function e(t){e.installed||Ot.map((function(e,n){return t.component(e.options.name||e.name,e)}))};"undefined"!==typeof window&&window.Vue&&Rt(window.Vue);var qt={install:Rt,HtSelectTable:Ce,HtPagination:Le,HtTable:ze,HtExport:Je,HtUpload:yt,HtMd:Lt};t["default"]=qt},fb6a:function(e,t,n){"use strict";var r=n("23e7"),o=n("861d"),i=n("e8b5"),a=n("23cb"),s=n("50c4"),l=n("fc6a"),c=n("8418"),u=n("b622"),p=n("1dde"),f=n("ae40"),d=p("slice"),h=f("slice",{ACCESSORS:!0,0:0,1:2}),g=u("species"),_=[].slice,m=Math.max;r({target:"Array",proto:!0,forced:!d||!h},{slice:function(e,t){var n,r,u,p=l(this),f=s(p.length),d=a(e,f),h=a(void 0===t?f:t,f);if(i(p)&&(n=p.constructor,"function"!=typeof n||n!==Array&&!i(n.prototype)?o(n)&&(n=n[g],null===n&&(n=void 0)):n=void 0,n===Array||void 0===n))return _.call(p,d,h);for(r=new(void 0===n?Array:n)(m(h-d,0)),u=0;d<h;d++,u++)d in p&&c(r,u,p[d]);return r.length=u,r}})},fc6a:function(e,t,n){var r=n("44ad"),o=n("1d80");e.exports=function(e){return r(o(e))}},fd57:function(e,t,n){e.exports=n.p+"img/vedio.8638f032.png"},fdbc:function(e,t){e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},fdbf:function(e,t,n){var r=n("4930");e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},fea9:function(e,t,n){var r=n("da84");e.exports=r.Promise}})}));
|
|
28
|
+
function y(e){return y="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y(e)}function x(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function C(e){return A(e)||E(e)||S()}function A(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}function E(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}function S(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function T(){return"undefined"!==typeof Reflect&&Reflect.defineMetadata&&Reflect.getOwnMetadataKeys}function j(e,t){D(e,t),Object.getOwnPropertyNames(t.prototype).forEach((function(n){D(e.prototype,t.prototype,n)})),Object.getOwnPropertyNames(t).forEach((function(n){D(e,t,n)}))}function D(e,t,n){var r=n?Reflect.getOwnMetadataKeys(t,n):Reflect.getOwnMetadataKeys(t);r.forEach((function(r){var o=n?Reflect.getOwnMetadata(r,t,n):Reflect.getOwnMetadata(r,t);n?Reflect.defineMetadata(r,o,e,n):Reflect.defineMetadata(r,o,e)}))}var I={__proto__:[]},L=I instanceof Array;function O(e){return function(t,n,r){var o="function"===typeof t?t:t.constructor;o.__decorators__||(o.__decorators__=[]),"number"!==typeof r&&(r=void 0),o.__decorators__.push((function(t){return e(t,n,r)}))}}function R(e){var t=y(e);return null==e||"object"!==t&&"function"!==t}function q(e,t){var n=t.prototype._init;t.prototype._init=function(){var t=this,n=Object.getOwnPropertyNames(e);if(e.$options.props)for(var r in e.$options.props)e.hasOwnProperty(r)||n.push(r);n.forEach((function(n){Object.defineProperty(t,n,{get:function(){return e[n]},set:function(t){e[n]=t},configurable:!0})}))};var r=new t;t.prototype._init=n;var o={};return Object.keys(r).forEach((function(e){void 0!==r[e]&&(o[e]=r[e])})),o}var F=["data","beforeCreate","created","beforeMount","mounted","beforeDestroy","destroyed","beforeUpdate","updated","activated","deactivated","render","errorCaptured","serverPrefetch"];function M(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.name=t.name||e._componentTag||e.name;var n=e.prototype;Object.getOwnPropertyNames(n).forEach((function(e){if("constructor"!==e)if(F.indexOf(e)>-1)t[e]=n[e];else{var r=Object.getOwnPropertyDescriptor(n,e);void 0!==r.value?"function"===typeof r.value?(t.methods||(t.methods={}))[e]=r.value:(t.mixins||(t.mixins=[])).push({data:function(){return x({},e,r.value)}}):(r.get||r.set)&&((t.computed||(t.computed={}))[e]={get:r.get,set:r.set})}})),(t.mixins||(t.mixins=[])).push({data:function(){return q(this,e)}});var r=e.__decorators__;r&&(r.forEach((function(e){return e(t)})),delete e.__decorators__);var o=Object.getPrototypeOf(e.prototype),i=o instanceof w.a?o.constructor:w.a,a=i.extend(t);return B(a,e,i),T()&&j(a,e),a}var P={prototype:!0,arguments:!0,callee:!0,caller:!0};function B(e,t,n){Object.getOwnPropertyNames(t).forEach((function(r){if(!P[r]){var o=Object.getOwnPropertyDescriptor(e,r);if(!o||o.configurable){var i=Object.getOwnPropertyDescriptor(t,r);if(!L){if("cid"===r)return;var a=Object.getOwnPropertyDescriptor(n,r);if(!R(i.value)&&a&&a.value===i.value)return}0,Object.defineProperty(e,r,i)}}}))}function z(e){return"function"===typeof e?M(e):function(t){return M(t,e)}}z.registerHooks=function(e){F.push.apply(F,C(e))};var N=z;var $="undefined"!==typeof Reflect&&"undefined"!==typeof Reflect.getMetadata;function U(e,t,n){if($&&!Array.isArray(e)&&"function"!==typeof e&&"undefined"===typeof e.type){var r=Reflect.getMetadata("design:type",t,n);r!==Object&&(e.type=r)}}function H(e){return void 0===e&&(e={}),function(t,n){U(e,t,n),O((function(t,n){(t.props||(t.props={}))[n]=e}))(t,n)}}function Q(e,t){void 0===t&&(t={});var n=t.deep,r=void 0!==n&&n,o=t.immediate,i=void 0!==o&&o;return O((function(t,n){"object"!==typeof t.watch&&(t.watch=Object.create(null));var o=t.watch;"object"!==typeof o[e]||Array.isArray(o[e])?"undefined"===typeof o[e]&&(o[e]=[]):o[e]=[o[e]],o[e].push({handler:n,deep:r,immediate:i})}))}var W=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{directives:[{name:"loading",rawName:"v-loading",value:e.state.loading,expression:"state.loading"}]},[n("header",[n("el-input",{staticClass:"htui-search",attrs:{placeholder:e.searchPlaceholder||"请输入关键字查询"},model:{value:e.state.filterData.Filter,callback:function(t){e.$set(e.state.filterData,"Filter",t)},expression:"state.filterData.Filter"}})],1),n("article",[n("el-table",{ref:"comTable",staticStyle:{width:"100%"},attrs:{height:e.confige.table&&e.confige.table.height?e.confige.table.height:250,"row-key":e.confige.table&&e.confige.table.rowkey?e.confige.table.rowkey:"id",data:e.dataSource,"tooltip-effect":"dark"},on:{"row-click":e.rowClick}},[n("el-table-column",{attrs:{width:"55"},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.row;return[n("el-checkbox",{attrs:{value:e.state.checkObj&&e.state.checkObj.id===r.id},nativeOn:{click:function(e){e.preventDefault()}}})]}}])}),n("el-table-column",{attrs:{label:"序号",width:"55"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s((e.state.filterData.currentPage-1)*e.state.filterData.MaxResultCount+(t.$index+1))+" ")]}}])}),e._l(e.columns,(function(t){return n("el-table-column",{key:t.key,attrs:{label:t.title,"show-overflow-tooltip":!0,prop:t.key,width:t.width||120}},[e._t(t.key,[e._v(e._s(t.key))])],2)}))],2)],1),n("footer",[n("el-row",[n("el-col",{attrs:{span:24}},[n("p",{staticStyle:{width:"90px",float:"left"}},[e._v("共"+e._s(e.dataSource.length)+"条")]),e._e()],1)],1)],1)])},V=[];n("4de4"),n("c740"),n("caad"),n("e6cf"),n("a79d"),n("2532"),n("4160"),n("e439"),n("dbb4"),n("b64b"),n("159b");function J(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function G(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function K(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?G(Object(n),!0).forEach((function(t){J(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):G(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Z=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("auth-login-form",{tag:"div",staticClass:"container-login",attrs:{"base-config":JSON.stringify(e.baseConfig)}})},X=[],Y=(n("cca6"),n("ac1f"),n("466d"),n("a78e")),ee=n.n(Y),te={Language:"zh-Hans",setLanguage:function(e){this.Language=e},loginUrl:"/oauth2/connect/token",content:"通过创新的技术与产品,提升用户价值",setContent:function(e){this.content=e},logoUrl:"/publicData/images/loginLogo.png",setLogoUrl:function(e){this.logoUrl=e},imgurl:"/publicData/images/loginBg-1.png",setImgUrl:function(e){this.imgurl=e},setLoginUrl:function(e){this.loginUrl=e},isTenantAvailable:"/oauth2/api/abp/multi-tenancy/tenants/by-name",setIsTenantAvailable:function(e){this.isTenantAvailable=e},authorization:"Authorization",token_type:"token_type",oAuthConfig:{grant_type:"password",scope:"AuthServer",client_id:"AuthServer_App",client_secret:"1q2w3e*"},setOAuthConfig:function(e){this.oAuthConfig=Object.assign(this.oAuthConfig,e)},accessTokenKey:"Abp.AuthToken",abpTenantKey:"Abp.TenantId",tenantKey:"__tenant",setTenantKey:function(e){this.tenantKey=e},ApplicationId:{key:"ApplicationId",value:""},setApplicationId:function(e){e.key&&(this.ApplicationId.key=e.key),e.value&&(this.ApplicationId.value=e.value)},userId:"userId",enc_auth_token_key:"enc_auth_token",refreshTokenKey:"refresh_token_key",loginTitle:"星环视界智能科技",setLoginTitle:function(e){this.loginTitle=e},getLoginState:function(){return!!ee.a.get(this.accessTokenKey)},currentLoginInfoUrl:"/oauth2/api/abp/application-configuration",setcurrentLoginInfoUrl:function(e){this.currentLoginInfoUrl=e},clearCookies:function(){var e=document.cookie.match(/[^ =;]+(?==)/g);if(e)for(var t=e.length;t--;)document.cookie=e[t]+"=0;path=/;expires="+new Date(0).toUTCString()},getCookie:function(e){return ee.a.get(e)},setCookie:function(e,t,n){ee.a.set(e,t,n)}},ne=te,re=function(e){f(n,e);var t=v(n);function n(){var e;return l(this,n),e=t.apply(this,arguments),e.baseConfig=ne,e}return u(n,[{key:"created",value:function(){}},{key:"mounted",value:function(){}}]),n}(w.a);re=b([N({components:{}})],re);var oe=re,ie=oe;n("019a");function ae(e,t,n,r,o,i,a,s){var l,c="function"===typeof e?e.options:e;if(t&&(c.render=t,c.staticRenderFns=n,c._compiled=!0),r&&(c.functional=!0),i&&(c._scopeId="data-v-"+i),a?(l=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"===typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),o&&o.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},c._ssrRegister=l):o&&(l=s?function(){o.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:o),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(e,t){return l.call(t),u(e,t)}}else{var p=c.beforeCreate;c.beforeCreate=p?[].concat(p,l):[l]}return{exports:e,options:c}}var se=ae(ie,Z,X,!1,null,null,null),le=(se.exports,n("bc3a")),ce=n.n(le);function ue(e){const t=(new Date).getTime().toString();let n=document.createElement("auth-alert");n.setAttribute("error",JSON.stringify(e)),n.setAttribute("response",e.response?JSON.stringify(e.response):""),n.id="my-alert"+t,document.body.appendChild(n)}let pe={baseURL:ne.baseUrl,timeout:6e4};const fe=ce.a.create(pe);fe.interceptors.request.use((function(e){if(ee.a.get(ne.accessTokenKey)){const t=ee.a.get(ne.token_type)+" "+ee.a.get(ne.accessTokenKey);e.headers[ne.authorization]=t}return ee.a.get(ne.tenantKey)&&(e.headers[ne.tenantKey]=ee.a.get(ne.tenantKey)),(ne.ApplicationId.value||ee.a.get(ne.ApplicationId.key))&&(e.headers[ne.ApplicationId.key]=ne.ApplicationId.value||ee.a.get(ne.ApplicationId.key)),e.headers["Accept-Language"]=ne.Language,e}),(function(e){return ue(e),Promise.reject(e)})),fe.interceptors.response.use((function(e){return e}),(function(e){return ue(e),console.log(e),Promise.reject(e)}));var de=fe,he=function(e){f(n,e);var t=v(n);function n(){var e;return l(this,n),e=t.apply(this,arguments),e.state={loading:!1,dataSource:[],showPage:!0,filterData:{currentPage:1,Filter:"",MaxResultCount:1e3,SkipCount:0,totalCount:0},checkObj:void 0},e}return u(n,[{key:"created",value:function(){this.getDataSource()}},{key:"rowClick",value:function(e){var t=this.state.checkObj;t&&t.id===e.id?this.state.checkObj=void 0:this.state.checkObj=e,this.$emit("callback",this.state.checkObj,"click")}},{key:"topage",value:function(e){Array.isArray(e)?this.state.dataSource=e:e.items&&e.items.length?(this.state.dataSource=e.items,this.state.filterData.totalCount=e.totalCount):this.state.dataSource=[],this.toFindData()}},{key:"clearCheck",value:function(){this.state.checkObj=void 0,this.$emit("callback",this.state.checkObj)}},{key:"toFindData",value:function(){var e=this.confige,t=e.name,n=e.value,r=this.state.dataSource,o=r.findIndex((function(e){return e[null!==t&&void 0!==t?t:"id"]===n}));r.length&&(this.state.checkObj=r[o]),this.$emit("callback",this.state.checkObj)}},{key:"handleCurrentChange",value:function(e){this.state.filterData.currentPage=e||1;var t=this.state.filterData,n=t.MaxResultCount,r=void 0===n?0:n,o=t.currentPage;this.state.filterData.SkipCount=(o-1)*r,this.getDataSource()}},{key:"handelSizeChange",value:function(e){this.state.filterData.currentPage=1,this.state.filterData.MaxResultCount=e;var t=this.state.filterData,n=t.MaxResultCount,r=void 0===n?0:n,o=t.currentPage;this.state.filterData.SkipCount=(o-1)*r,this.getDataSource()}},{key:"getDataSource",value:function(){var e=this,t=this.confige.ajax,n=t.type,r=void 0===n?"get":n,o=t.url,i=t.params,a=t.data;if(this.state.loading=!0,"get"===r){var s={params:K(K({},this.state.filterData),i)};de.get(o,K({},s)).then((function(t){e.topage(t.data)})).catch((function(){e.$notify.error("请求失败")})).finally((function(){e.state.loading=!1}))}else{var l={params:K(K({},this.state.filterData),i),data:K(K({},this.state.filterData),a)};de.post(o,K({},l)).then((function(t){e.topage(t.data)})).catch((function(){e.$notify.error("请求失败")})).finally((function(){e.state.loading=!1}))}}},{key:"dataSource",get:function(){var e=this.state,t=e.filterData,n=e.dataSource,r=t.Filter;return n.filter((function(e){return JSON.stringify(e).includes(r)}))}}]),n}(w.a);b([H()],he.prototype,"columns",void 0),b([H()],he.prototype,"searchPlaceholder",void 0),b([H()],he.prototype,"confige",void 0),b([H()],he.prototype,"visible",void 0),b([Q("confige")],he.prototype,"getDataSource",null),he=b([N],he);var ge=he,_e=ge,me=ae(_e,W,V,!1,null,"5a58ed06",null),ve=me.exports,be=(n("45f7"),function(e){f(n,e);var t=v(n);function n(){var e;return l(this,n),e=t.apply(this,arguments),e.state={config:{key:"",disabled:!1,clearable:!1,value:"",name:"",ajax:{url:"",params:{}},text:void 0},visible:!1,loading:!1,name:"",show:!1,icon:"el-icon-arrow-down",columns:[{key:"code",title:"编码"},{key:"name",title:"名称"},{key:"description",title:"描述"}]},e}return u(n,[{key:"created",value:function(){this.state.config=JSON.parse(this.config),this.columns&&(this.state.columns=this.columns)}},{key:"show",value:function(){this.state.icon="el-icon-arrow-up",this.state.show=!0}},{key:"callback",value:function(e,t){var n=this.state.config,r=n.text||"name";this.state.name=e?e[r]:void 0,this.$emit("change",e,t),t&&(this.$refs["elPopver"].doToggle(),this.state.visible=!1)}},{key:"hide",value:function(){this.state.icon="el-icon-arrow-down",this.state.visible=!0,this.state.show=!1}},{key:"blurInput",value:function(){var e=this.state.show;this.state.visible=!0,this.state.icon=e?"el-icon-arrow-up":"el-icon-arrow-down"}},{key:"focusInput",value:function(){this.state.icon="el-icon-circle-close",this.state.visible=!this.state.config.disabled}},{key:"clear",value:function(){if(!this.state.config.disabled){var e=this.$refs[this.state.config.key||"ht-table"];this.state.visible=!1,e.clearCheck()}}},{key:"watchConfig",value:function(e){this.state.config=JSON.parse(e)}}]),n}(w.a));b([H()],be.prototype,"comStyle",void 0),b([H()],be.prototype,"config",void 0),b([H()],be.prototype,"width",void 0),b([H()],be.prototype,"inputWidth",void 0),b([H()],be.prototype,"placeholder",void 0),b([H()],be.prototype,"searchPlaceholder",void 0),b([H()],be.prototype,"columns",void 0),b([Q("config")],be.prototype,"watchConfig",null),be=b([N({name:"HtSelectTable",components:{CommonTable:ve}})],be);var ke=be,we=ke,ye=ae(we,a,s,!1,null,null,null),xe=ye.exports;xe.install=function(e){e.component("HtSelectTable",xe)};var Ce=xe,Ae=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-pagination",{attrs:{background:e.background,"hide-on-single-page":e.hideOnSinglePage,disabled:!!e.disabled,small:!!e.small,"current-page":e.state.pageInfo.currentPage,"page-size":e.state.pageInfo.maxResultCount,"page-sizes":e.pageSizes||[10,20,30,40,50,100],layout:e.layout||"total, sizes, prev, pager, next, jumper",total:e.state.pageInfo.totalCount},on:{"current-change":e.handleCurrentChange,"size-change":e.handelSizeChange}})},Ee=[],Se=(n("a9e3"),function(e){f(n,e);var t=v(n);function n(){var e;return l(this,n),e=t.apply(this,arguments),e.state={loading:!1,pageInfo:{currentPage:1,maxResultCount:10,skipCount:0,totalCount:0}},e}return u(n,[{key:"created",value:function(){this.pageInfo&&this.setpageInfo(this.pageInfo)}},{key:"handleCurrentChange",value:function(e){this.state.pageInfo.currentPage=e||1;var t=this.state.pageInfo,n=t.maxResultCount,r=void 0===n?0:n,o=t.currentPage;this.state.pageInfo.skipCount=(o-1)*r,this.$emit("onchange",this.state.pageInfo)}},{key:"handelSizeChange",value:function(e){this.state.pageInfo.currentPage=1,this.state.pageInfo.maxResultCount=e,this.handleCurrentChange(1)}},{key:"setpageInfo",value:function(e){var t=e;this.state.pageInfo={currentPage:Number(t.currentPage),maxResultCount:Number(t.pageSize),skipCount:Number(t.skipCount),totalCount:Number(t.totalCount)}}}]),n}(w.a));b([H()],Se.prototype,"comStyle",void 0),b([H()],Se.prototype,"small",void 0),b([H()],Se.prototype,"pageInfo",void 0),b([H()],Se.prototype,"pageSize",void 0),b([H()],Se.prototype,"skipCount",void 0),b([H()],Se.prototype,"disabled",void 0),b([H()],Se.prototype,"background",void 0),b([H()],Se.prototype,"hideOnSinglePage",void 0),b([H()],Se.prototype,"pageSizes",void 0),b([H()],Se.prototype,"layout",void 0),b([Q("pageInfo")],Se.prototype,"setpageInfo",null),Se=b([N({name:"HtPagination"})],Se);var Te=Se,je=Te,De=ae(je,Ae,Ee,!1,null,null,null),Ie=De.exports;Ie.install=function(e){e.component("HtPagination",Ie)};var Le=Ie,Oe=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{directives:[{name:"loading",rawName:"v-loading",value:e.state.loading,expression:"state.loading"}]},[n("article",[n("el-table",{ref:"comTable",attrs:{height:e.height,"max-height":e.maxHeight,border:e.border,stripe:e.stripe,size:e.size,fit:e.fit,"show-header":e.showHeader,"empty-text":e.emptyText||"暂无数据","row-style":e.rowStyle,"row-class-name":e.rowClassName,"current-row-key":e.currentRowKey,"highlight-current-row":e.highlightCurrentRow,"row-key":e.rowKey||"id",data:e.data,"tooltip-effect":"dark"},on:{"row-click":function(t,n,r){return e.$emit("row-click",t,n,r)},"row-contextmenu":function(t,n,r){return e.$emit("row-contextmenu",t,n,r)},"row-dblclick":function(t,n,r){return e.$emit("row-dblclick",t,n,r)},"header-click":function(t,n){return e.$emit("header-click",t,n)},"header-contextmenu":function(t,n){return e.$emit("header-contextmenu",t,n)},"sort-change":function(t){var n=t.column,r=t.prop,o=t.order;return e.$emit("sort-change",{column:n,prop:r,order:o})},"filter-change":function(t){return e.$emit("filter-change",t)},"current-change":function(t,n){return e.$emit("current-change",t,n)},select:function(t,n){return e.$emit("select",t,n)},"select-all":function(t){return e.$emit("select-all",t)},"selection-change":function(t){return e.$emit("selection-change",t)},"cell-mouse-enter":function(t,n,r,o){return e.$emit("cell-mouse-enter",t,n,r,o)},"cell-mouse-leave":function(t,n,r,o){return e.$emit("cell-mouse-leave",t,n,r,o)},"cell-click":function(t,n,r,o){return e.$emit("cell-click",t,n,r,o)},"cell-dblclick":function(t,n,r,o){return e.$emit("cell-dblclick",t,n,r,o)}}},[e.checked?n("el-table-column",{attrs:{width:"55","reserve-selection":e.reserveSelection,selectable:e.selectable,type:"selection"}}):e._e(),e.hideOrder?e._e():n("el-table-column",{attrs:{label:void 0===e.keyName?"序号":e.keyName,align:"center",width:"55"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s((e.state.pageInfo.currentPage-1)*e.state.pageInfo.pageSize+(t.$index+1))+" ")]}}],null,!1,2272936552)},[n("template",{slot:"header"},[e._t("header_order")],2)],2),e._l(e.columns,(function(t){return[t.hide?e._e():n("el-table-column",{key:t.key,attrs:{label:t.title,fixed:t.fixed,align:t.align,"header-align":t.headerAlign,"column-key":t.columnKey,"class-name":t.className,prop:t.key,"show-overflow-tooltip":"common"!==t.type&&"org"!==t.type&&"userId"!==t.type&&!1!==t.showOverflowTooltip,sortable:t.sortable,"sort-method":t.sortMethod,"sort-orders":t.sortOrders,formatter:t.formatter,"sort-by":t.sortBy,"min-width":t.minWidth,width:t.width},scopedSlots:e._u([{key:"default",fn:function(r){var o=r.row,i=r.column,a=r.rowIndex;return[e._t(t.key,["org"===t.type?[e.getPropByPath(o,t.key)?n("common-org-info",{attrs:{"org-id":e.getPropByPath(o,t.key),type:"tag"}}):n("span",[e._v("--")])]:"common"===t.type?[e.getPropByPath(o,t.key)?n("common-datas-info-id",{tag:"div",attrs:{"user-id":t.commonType["userId"]?e.getPropByPath(o,t.key):"[]","department-id":t.commonType["departmentId"]?e.getPropByPath(o,t.key):"[]","role-id":t.commonType["roleId"]?e.getPropByPath(o,t.key):"[]","base-data-id":t.commonType["baseDataId"]?e.getPropByPath(o,t.key):"","base-data-value":t.commonType["baseDataValue"]?e.getPropByPath(o,t.key):"","base-data-name":t.commonType["baseDataName"]?e.getPropByPath(o,t.key):"","base-data-info":!0}}):n("span",[e._v("--")])]:"userId"===t.type?[e.getPropByPath(o,t.key)?n("common-datas-info-id",{tag:"div",attrs:{"user-id":JSON.stringify(e.getPropByPath(o,t.key)),"base-data-info":!0}}):n("span",[e._v("--")])]:"time"===t.type?[e.getPropByPath(o,t.key)?n("div",{staticClass:"ht-column-cell"},[t.spread?[n("p",{staticStyle:{color:"var(--primary)",margin:"0",padding:"0"}},[e._v(e._s(e.getPropByPath(o,t.key).slice(11,19)))]),n("p",{staticStyle:{margin:"0",padding:"0"}},[e._v(e._s(e.getPropByPath(o,t.key).replace("T"," ").slice(0,10)))])]:n("span",[e._v(" "+e._s(e.getPropByPath(o,t.key).replace("T"," ").slice(0,19)))])],2):n("span",[e._v("--")])]:n("span",[e._v(e._s(e.getPropByPath(o,t.key)))])],{row:o,column:i,rowIndex:a})]}},{key:"header",fn:function(n){var r=n.column,o=n.$index;return[e._t("header_"+t.key,[e._v(e._s(t.title))],{column:r,$index:o})]}}],null,!0)})]}))],2)],1),e.hidePage?e._e():n("footer",[n("el-row",{attrs:{name:"footer"}},[e._t("footerLeft"),n("el-col",{attrs:{span:12}},[n("PageInfo",{attrs:{"hide-on-single-page":e.pagination&&e.pagination.hideOnSinglePage,small:e.pagination&&e.pagination.small,"page-sizes":e.pagination&&e.pagination.pageSizes,"page-info":e.state.pageInfo},on:{onchange:function(t){return e.$emit("onchange",t)}}})],1)],2)],1)])},Re=[],qe=(n("5319"),n("1276"),function(e){f(n,e);var t=v(n);function n(){var e;return l(this,n),e=t.apply(this,arguments),e.state={loading:!1,pageInfo:{currentPage:1,pageSize:10,skipCount:0,totalCount:0}},e}return u(n,[{key:"created",value:function(){this.setPageInfo(this.pageInfo)}},{key:"getPropByPath",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=e;t=t.replace(/\[(\w+)\]/g,".$1"),t=t.replace(/^\./,"");for(var o=t.split("."),i=0,a=o.length;i<a-1;++i){if(!r&&!n)break;var s=o[i];if(!(s in r)){if(n)throw new Error("table中".concat(t,"字段发生错误,请检查"));break}r=r[s]}return r?r[o[i]]:null}},{key:"showValue",value:function(e,t){return t?t.includes(".")?"":e[t]:""}},{key:"setPageInfo",value:function(e){if(e){var t=e;this.state.pageInfo={currentPage:Number(t.currentPage),pageSize:Number(t.pageSize),skipCount:Number(t.skipCount),totalCount:Number(t.totalCount)}}}}]),n}(w.a));b([H()],qe.prototype,"columns",void 0),b([H()],qe.prototype,"data",void 0),b([H()],qe.prototype,"keyName",void 0),b([H()],qe.prototype,"hidePage",void 0),b([H()],qe.prototype,"checked",void 0),b([H()],qe.prototype,"reserveSelection",void 0),b([H()],qe.prototype,"height",void 0),b([H()],qe.prototype,"maxHeight",void 0),b([H()],qe.prototype,"rowKey",void 0),b([H()],qe.prototype,"stripe",void 0),b([H()],qe.prototype,"border",void 0),b([H()],qe.prototype,"size",void 0),b([H()],qe.prototype,"fit",void 0),b([H()],qe.prototype,"showHeader",void 0),b([H()],qe.prototype,"rowClassName",void 0),b([H()],qe.prototype,"selectable",void 0),b([H()],qe.prototype,"currentRowKey",void 0),b([H()],qe.prototype,"highlightCurrentRow",void 0),b([H()],qe.prototype,"rowStyle",void 0),b([H()],qe.prototype,"hideOrder",void 0),b([H()],qe.prototype,"pageInfo",void 0),b([H()],qe.prototype,"emptyText",void 0),b([H()],qe.prototype,"pagination",void 0),b([Q("pageInfo")],qe.prototype,"setPageInfo",null),qe=b([N({name:"HtTable",components:{PageInfo:Ie}})],qe);var Fe=qe,Me=Fe,Pe=ae(Me,Oe,Re,!1,null,"03466226",null),Be=Pe.exports;Be.install=function(e){e.component("HtTable",Be)};var ze=Be,Ne=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("span",{directives:[{name:"loading",rawName:"v-loading",value:e.state.loading,expression:"state.loading"}],on:{click:e.exportExcel}},[e._t("default",[n("el-button",{attrs:{type:"primary"}},[e._v(" 导出Excel ")])],{loading:e.state.loading})],2)},$e=[];n("2b3d");w.a.config.productionTip=!1;var Ue=function(e){f(n,e);var t=v(n);function n(){var e;return l(this,n),e=t.apply(this,arguments),e.state={loading:!1},e}return u(n,[{key:"exportExcel",value:function(){var e=this;if(!1!==this.exportBefore){this.state.loading=!0;var t=this.fileName||"未知文件名.xlsx",n={responseType:"blob",params:{}};this.params&&(n=this.params),this.url&&("post"===this.method?de.post(this.url,n,{responseType:"blob"}).then((function(n){var r=n.data;if(!e.fileName){var o=n.headers["content-disposition"];if(!o)return void e.$notify.warning("暂无数据导出");t=decodeURIComponent(o.split("filename*=UTF-8")[1]).replace("''","")}var i=new Blob([r]);if("download"in document.createElement("a")){var a=document.createElement("a");a.download=t,a.style.display="none",a.href=URL.createObjectURL(i),document.body.appendChild(a),a.click(),URL.revokeObjectURL(a.href),document.body.removeChild(a)}else navigator.msSaveBlob(i,t)})).finally((function(){e.state.loading=!1})):de.get(this.url,{responseType:"blob",params:n}).then((function(n){var r=n.data;if(!e.fileName){var o=n.headers["content-disposition"];t=decodeURIComponent(o.split("filename*=UTF-8")[1]).replace("''","")}var i=new Blob([r]);if("download"in document.createElement("a")){var a=document.createElement("a");a.download=t,a.style.display="none",a.href=URL.createObjectURL(i),document.body.appendChild(a),a.click(),URL.revokeObjectURL(a.href),document.body.removeChild(a)}else navigator.msSaveBlob(i,t)})).finally((function(){e.state.loading=!1})))}}}]),n}(w.a);b([H()],Ue.prototype,"method",void 0),b([H()],Ue.prototype,"url",void 0),b([H()],Ue.prototype,"params",void 0),b([H()],Ue.prototype,"fileName",void 0),b([H()],Ue.prototype,"exportBefore",void 0),Ue=b([N],Ue);var He=Ue,Qe=He,We=ae(Qe,Ne,$e,!1,null,"23fd9fd2",null),Ve=We.exports;Ve.install=function(e){e.component("HtExport",Ve)};var Je=Ve,Ge=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"files-view"},[n("el-upload",{class:{"only-show":e.onlyShow},attrs:{action:"/files/api/filing/file/upload","on-success":e.handleSuccess,accept:e.state.accept,"before-upload":e.handelBeforeLoad,headers:e.headers,"file-list":e.state.fileData.fileList,"list-type":"picture-card",multiple:"",disabled:e.onlyShow},scopedSlots:e._u([{key:"file",fn:function(t){var r=t.file;return n("div",{attrs:{title:r.fileName}},[r.fileType&&r.fileType.includes("image")?n("img",{staticClass:"el-upload-list__item-thumbnail",attrs:{src:"/files/api/filing/file/download/"+r.fileToken,alt:r.fileName,fit:"fill"}}):n("img",{staticClass:"el-upload-list__item-thumbnail",attrs:{src:e.showIcon(r),alt:r.fileName,fit:"fill"}}),n("span",{staticClass:"el-upload-list__item-actions"},[r.fileType&&r.fileType.includes("image")?n("span",{staticClass:"el-upload-list__item-preview",on:{click:function(t){return e.handlePictureCardPreview(r)}}},[n("i",{staticClass:"el-icon-zoom-in"})]):e._e(),e.state.disabled?e._e():n("span",{staticClass:"el-upload-list__item-delete",on:{click:function(t){return e.handleDownload(r)}}},[n("i",{staticClass:"el-icon-download"})]),e.state.disabled||e.onlyShow?e._e():n("span",{staticClass:"el-upload-list__item-delete",on:{click:function(t){return e.handleRemove(r)}}},[n("i",{staticClass:"el-icon-delete"})])])])}}])},[n("i",{staticClass:"el-icon-plus",attrs:{slot:"default"},slot:"default"})]),n("el-dialog",{attrs:{visible:e.state.dialogVisible,"modal-append-to-body":!1,modal:!1,"append-to-body":!0},on:{"update:visible":function(t){return e.$set(e.state,"dialogVisible",t)}}},[n("article",{staticStyle:{height:"calc(100vh - 200px)",overflow:"auto"}},[n("img",{attrs:{src:e.state.dialogImageUrl,alt:""}})])])],1)},Ke=[];n("baa5"),n("fb6a"),n("a434");function Ze(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Xe(e){if(Array.isArray(e))return Ze(e)}n("a630");function Ye(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}function et(e,t){if(e){if("string"===typeof e)return Ze(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ze(e,t):void 0}}function tt(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function nt(e){return Xe(e)||Ye(e)||et(e)||tt()}var rt=n("fd57"),ot=n.n(rt),it=n("cb77"),at=n.n(it),st=n("5a7d"),lt=n.n(st),ct=n("b902"),ut=n.n(ct),pt=n("1683"),ft=n.n(pt),dt=n("35ba"),ht=n.n(dt),gt=n("8a0c"),_t=n.n(gt),mt=function(e){f(n,e);var t=v(n);function n(){var e;return l(this,n),e=t.apply(this,arguments),e.state={loading:!1,accept:".png, .jpg, .jpeg,.mp4,.pdf,.doc,.docx,.txt,.ppt,.pptx,.xls,.xlsx,.gif",fileData:{file:void 0,fileList:[]},dialogImageUrl:"",dialogVisible:!1,disabled:!1},e}return u(n,[{key:"created",value:function(){this.tokens&&(this.state.fileData.fileList=nt(this.tokens)),this.accept&&(this.state.accept=this.accept)}},{key:"showIcon",value:function(e,t){var n=e.fileName||"",r=e.fileType,o=_t.a;return(null===n||void 0===n?void 0:n.lastIndexOf(".docx"))>-1&&(o=lt.a),(null===n||void 0===n?void 0:n.lastIndexOf(".pptx"))>-1&&(o=ft.a),r?(r.includes("video")&&(o=ot.a),r.includes("doc")&&(o=lt.a),(r.includes("excel")||r.includes("sheet"))&&(o=ht.a),r.includes("pdf")&&(o=at.a),r.includes("text")&&(o=ut.a),r.includes("ppt")&&(o=ft.a),o):o}},{key:"handleSuccess",value:function(e,t,n){var r=this;n.forEach((function(e){if(e.url){var n,o={fileName:e.name,fileSize:e.size,fileToken:null===(n=e.response)||void 0===n?void 0:n.fileToken,fileType:e.raw.type,id:e.uid.toString()};r.state.fileData.fileList.push(K({},o)),e.uid==t.uid&&(r.state.fileData.file=K({},o))}})),this.$emit("change",this.state.fileData)}},{key:"handleRemove",value:function(e){var t=this.state.fileData.fileList.findIndex((function(t){return t.id==e.id}));t>=0&&(this.state.fileData.file=K({},e),this.state.fileData.fileList.splice(t,1),this.$emit("change",this.state.fileData))}},{key:"handlePictureCardPreview",value:function(e){this.state.dialogImageUrl="/files/api/filing/file/download/".concat(e.fileToken),this.state.dialogVisible=!0}},{key:"handelBeforeLoad",value:function(e){var t=e.name.lastIndexOf("."),n=e.name.slice(t+1),r=["mp4","avi","pdf","doc","docx","txt","ppt","pptx","png","gif","jpg","xls","xlsx"];return!!r.includes(n)||(this.$notify.warning("上传格式不正确"),!1)}},{key:"handleDownload",value:function(e){var t="/files/api/filing/file/download/".concat(e.fileToken),n=document.createElement("a");n.href=t,n.download="".concat(e.fileName),n.click(),window.URL.revokeObjectURL(t)}},{key:"onToken",value:function(){this.state.fileData.fileList=nt(this.tokens)}},{key:"headers",get:function(){return{_tenant:ne.getCookie("__tenant"),Authorization:"Bearer"+ne.getCookie("Abp.AuthToken")}}}]),n}(w.a);b([H({default:!1})],mt.prototype,"onlyShow",void 0),b([H()],mt.prototype,"tokens",void 0),b([H()],mt.prototype,"accept",void 0),b([Q("tokens")],mt.prototype,"onToken",null),mt=b([N],mt);var vt=mt,bt=vt,kt=(n("6344"),ae(bt,Ge,Ke,!1,null,null,null)),wt=kt.exports;wt.install=function(e){e.component("HtUpload",wt)};var yt=wt,xt=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("mavon-editor",{ref:"md",attrs:{subfield:e.subfield,default_open:"{}",placeholder:e.placeholder,editable:!e.disabled},on:{save:e.save,imgAdd:e.addImg,change:e.change},model:{value:e.state.content,callback:function(t){e.$set(e.state,"content",t)},expression:"state.content"}})},Ct=[],At=n("b2d8"),Et=n.n(At);n("64e1");w.a.use(Et.a);var St=function(e){f(n,e);var t=v(n);function n(){var e;return l(this,n),e=t.apply(this,arguments),e.state={loading:!1,content:""},e}return u(n,[{key:"created",value:function(){this.state.content=this.value}},{key:"addImg",value:function(e,t){var n=this;if(this.changImg)this.$emit("callBackImg",e,t);else{var r=new FormData;r.append("file",t),de({url:"/files/api/filing/file/upload",method:"post",data:r,headers:{"Content-Type":"multipart/form-data"}}).then((function(t){200===t.status&&n.$refs.md.$img2Url(e,"/files/api/filing/file/download/".concat(t.data.fileToken))}))}}},{key:"change",value:function(e,t){this.$emit("input",e),this.$emit("change",e,t)}},{key:"save",value:function(e,t){this.$emit("save",e,t)}},{key:"onContent",value:function(e){this.state.content=e}}]),n}(w.a);b([H()],St.prototype,"changImg",void 0),b([H()],St.prototype,"disabled",void 0),b([H()],St.prototype,"value",void 0),b([H()],St.prototype,"placeholder",void 0),b([H()],St.prototype,"subfield",void 0),b([Q("value",{deep:!0})],St.prototype,"onContent",null),St=b([N],St);var Tt=St,jt=Tt,Dt=ae(jt,xt,Ct,!1,null,"1bb3f330",null),It=Dt.exports;It.install=function(e){e.component("HtMd",It)};var Lt=It,Ot=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("span",[e._t("default",[n("span",[e._v(e._s(e.dateLess()))])],{time:parseInt(e.state.count.toString()),timeStr:e.dateLess()})],2)])},Rt=[],qt=function(e){f(n,e);var t=v(n);function n(){var e;return l(this,n),e=t.apply(this,arguments),e.state={loading:!1,count:0},e.timer=void 0,e}return u(n,[{key:"created",value:function(){if(this.times&&(this.state.count=this.times),this.date){var e=(new Date(this.date).getTime()-(new Date).getTime())/1e3;this.state.count=e>0?e:0}}},{key:"getTimer",value:function(){var e=this;this.timer=setInterval((function(){e.state.count--,0===e.state.count&&clearInterval(e.timer)}),1e3)}},{key:"dateLess",value:function(){var e=this.state.count;if(!e)return"--";var t=parseInt((e/86400).toString()),n=e-24*t*60*60,r=parseInt((n/3600).toString()),o=e-24*t*60*60-60*r*60,i=parseInt((o/60).toString()),a=parseInt((e-24*t*60*60-60*r*60-60*i).toString());function s(e){return e>9?e:"0"+e}return t?t+"天"+s(r)+"小时"+s(i)+"分"+s(a)+"秒":r?s(r)+"小时"+s(i)+"分"+s(a)+"秒":i?s(i)+"分"+s(a)+"秒":s(a)+"秒"}},{key:"onStart",value:function(e){if(!1!==e){if(this.date){var t=(new Date(this.date).getTime()-(new Date).getTime())/1e3;this.state.count=t>0?t:0}if(!this.date&&!this.times)return void this.$notify.error("请先传入完成的参数");this.getTimer()}else clearInterval(this.timer)}}]),n}(w.a);b([H()],qt.prototype,"date",void 0),b([H()],qt.prototype,"times",void 0),b([H()],qt.prototype,"start",void 0),b([Q("start",{deep:!0,immediate:!0})],qt.prototype,"onStart",null),qt=b([N],qt);var Ft=qt,Mt=Ft,Pt=ae(Mt,Ot,Rt,!1,null,"46487bac",null),Bt=Pt.exports;Bt.install=function(e){e.component("HtCountDown",Bt)};var zt=Bt,Nt=[Ce,Le,ze,Je,yt,Lt,zt],$t=function e(t){e.installed||Nt.map((function(e,n){return t.component(e.options.name||e.name,e)}))};"undefined"!==typeof window&&window.Vue&&$t(window.Vue);var Ut={install:$t,HtSelectTable:Ce,HtPagination:Le,HtTable:ze,HtExport:Je,HtUpload:yt,HtMd:Lt,HtCountDown:zt};t["default"]=Ut},fb6a:function(e,t,n){"use strict";var r=n("23e7"),o=n("861d"),i=n("e8b5"),a=n("23cb"),s=n("50c4"),l=n("fc6a"),c=n("8418"),u=n("b622"),p=n("1dde"),f=n("ae40"),d=p("slice"),h=f("slice",{ACCESSORS:!0,0:0,1:2}),g=u("species"),_=[].slice,m=Math.max;r({target:"Array",proto:!0,forced:!d||!h},{slice:function(e,t){var n,r,u,p=l(this),f=s(p.length),d=a(e,f),h=a(void 0===t?f:t,f);if(i(p)&&(n=p.constructor,"function"!=typeof n||n!==Array&&!i(n.prototype)?o(n)&&(n=n[g],null===n&&(n=void 0)):n=void 0,n===Array||void 0===n))return _.call(p,d,h);for(r=new(void 0===n?Array:n)(m(h-d,0)),u=0;d<h;d++,u++)d in p&&c(r,u,p[d]);return r.length=u,r}})},fc6a:function(e,t,n){var r=n("44ad"),o=n("1d80");e.exports=function(e){return r(o(e))}},fd57:function(e,t,n){e.exports=n.p+"img/vedio.8638f032.png"},fdbc:function(e,t){e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},fdbf:function(e,t,n){var r=n("4930");e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},fea9:function(e,t,n){var r=n("da84");e.exports=r.Promise}})}));
|
package/lib/htui.umd.min.js.gz
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "htui-yllkbz",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.38",
|
|
4
4
|
"typings": "types/index.d.ts",
|
|
5
5
|
"main": "lib/htui.common.js",
|
|
6
6
|
"style": "lib/htui.css",
|
|
@@ -22,7 +22,9 @@
|
|
|
22
22
|
"axios": "^0.21.0",
|
|
23
23
|
"core-js": "^3.6.5",
|
|
24
24
|
"element-ui": "^2.14.1",
|
|
25
|
+
"htui-yllkbz": "^1.2.35",
|
|
25
26
|
"mavon-editor": "^2.10.4",
|
|
27
|
+
"moment": "^2.29.1",
|
|
26
28
|
"vue": "^2.6.11",
|
|
27
29
|
"vue-class-component": "^7.2.3",
|
|
28
30
|
"vue-kst-auth": "^2.1.15",
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @Descripttion简易版的倒计时
|
|
3
|
+
* @version:
|
|
4
|
+
* @Author: hutao
|
|
5
|
+
* @Date: 2021-11-15 15:00:57
|
|
6
|
+
* @LastEditors: hutao
|
|
7
|
+
* @LastEditTime: 2021-12-26 11:20:45
|
|
8
|
+
*/
|
|
9
|
+
import HtCountDown from "./index.vue";
|
|
10
|
+
(HtCountDown as any).install = function (Vue: any) {
|
|
11
|
+
Vue.component("HtCountDown", HtCountDown);
|
|
12
|
+
};
|
|
13
|
+
export default HtCountDown;
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @Descripttion:倒计时
|
|
3
|
+
* @version:
|
|
4
|
+
* @Author: hutao
|
|
5
|
+
* @Date: 2021-12-21 16:24:07
|
|
6
|
+
* @LastEditors: hutao
|
|
7
|
+
* @LastEditTime: 2021-12-26 11:41:28
|
|
8
|
+
-->
|
|
9
|
+
<template>
|
|
10
|
+
<div>
|
|
11
|
+
<span>
|
|
12
|
+
<slot :time="parseInt(state.count.toString())"
|
|
13
|
+
:timeStr="dateLess()">
|
|
14
|
+
<span>{{dateLess()}}</span>
|
|
15
|
+
</slot>
|
|
16
|
+
</span>
|
|
17
|
+
</div>
|
|
18
|
+
</template>
|
|
19
|
+
<script lang='ts'>
|
|
20
|
+
import { Component, Prop, Vue, Watch } from "vue-property-decorator";
|
|
21
|
+
interface State {
|
|
22
|
+
/** 数据状态 */
|
|
23
|
+
loading: boolean;
|
|
24
|
+
/** 差额 */
|
|
25
|
+
count: number;
|
|
26
|
+
}
|
|
27
|
+
@Component
|
|
28
|
+
export default class HtCountDown extends Vue {
|
|
29
|
+
/** 倒计时具体日期 2022-01-01 */
|
|
30
|
+
@Prop() date!: string;
|
|
31
|
+
/** 倒计时多少秒 250秒*/
|
|
32
|
+
@Prop() times!: number;
|
|
33
|
+
/** 是否启动 */
|
|
34
|
+
@Prop() start?: boolean;
|
|
35
|
+
|
|
36
|
+
/** 数据 */
|
|
37
|
+
state: State = {
|
|
38
|
+
loading: false,
|
|
39
|
+
count: 0,
|
|
40
|
+
};
|
|
41
|
+
timer: any = undefined;
|
|
42
|
+
created() {
|
|
43
|
+
/** 如果是传入的秒数 */
|
|
44
|
+
if (this.times) {
|
|
45
|
+
this.state.count = this.times;
|
|
46
|
+
}
|
|
47
|
+
/** 如果传入的是哪一天 */
|
|
48
|
+
if (this.date) {
|
|
49
|
+
const sec = (new Date(this.date).getTime() - new Date().getTime()) / 1000;
|
|
50
|
+
this.state.count = sec > 0 ? sec : 0;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
/** 时间倒计时开始 */
|
|
54
|
+
getTimer() {
|
|
55
|
+
this.timer = setInterval(() => {
|
|
56
|
+
this.state.count--;
|
|
57
|
+
if (this.state.count === 0) {
|
|
58
|
+
clearInterval(this.timer);
|
|
59
|
+
}
|
|
60
|
+
}, 1000);
|
|
61
|
+
}
|
|
62
|
+
dateLess() {
|
|
63
|
+
const total: number = this.state.count;
|
|
64
|
+
if (!total) {
|
|
65
|
+
return "--";
|
|
66
|
+
}
|
|
67
|
+
const day: number = parseInt((total / (24 * 60 * 60)).toString()); //计算整数天数
|
|
68
|
+
const afterDay: number = total - day * 24 * 60 * 60; //取得算出天数后剩余的秒数
|
|
69
|
+
const hour: number = parseInt((afterDay / (60 * 60)).toString()); //计算整数小时数
|
|
70
|
+
const afterHour = total - day * 24 * 60 * 60 - hour * 60 * 60; //取得算出小时数后剩余的秒数
|
|
71
|
+
const min: number = parseInt((afterHour / 60).toString()); //计算整数分
|
|
72
|
+
const afterMin: number = parseInt(
|
|
73
|
+
(total - day * 24 * 60 * 60 - hour * 60 * 60 - min * 60).toString()
|
|
74
|
+
); //取得算出分后剩余的秒数
|
|
75
|
+
function buwei(t: number) {
|
|
76
|
+
return t > 9 ? t : "0" + t;
|
|
77
|
+
}
|
|
78
|
+
if (!day) {
|
|
79
|
+
if (!hour) {
|
|
80
|
+
if (min) {
|
|
81
|
+
return buwei(min) + "分" + buwei(afterMin) + "秒";
|
|
82
|
+
} else {
|
|
83
|
+
return buwei(afterMin) + "秒";
|
|
84
|
+
}
|
|
85
|
+
} else {
|
|
86
|
+
return (
|
|
87
|
+
buwei(hour) + "小时" + buwei(min) + "分" + buwei(afterMin) + "秒"
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
} else {
|
|
91
|
+
return (
|
|
92
|
+
day +
|
|
93
|
+
"天" +
|
|
94
|
+
buwei(hour) +
|
|
95
|
+
"小时" +
|
|
96
|
+
buwei(min) +
|
|
97
|
+
"分" +
|
|
98
|
+
buwei(afterMin) +
|
|
99
|
+
"秒"
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
/** 监听是否启动倒计时 针对传入是秒的不用重新计算,时间的要进行重新计算*/
|
|
104
|
+
@Watch("start", { deep: true, immediate: true })
|
|
105
|
+
onStart(val?: boolean) {
|
|
106
|
+
if (val !== false) {
|
|
107
|
+
/** 如果传入的是哪一天 */
|
|
108
|
+
if (this.date) {
|
|
109
|
+
const sec =
|
|
110
|
+
(new Date(this.date).getTime() - new Date().getTime()) / 1000;
|
|
111
|
+
this.state.count = sec > 0 ? sec : 0;
|
|
112
|
+
}
|
|
113
|
+
if (!this.date && !this.times) {
|
|
114
|
+
this.$notify.error("请先传入完成的参数");
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
this.getTimer();
|
|
118
|
+
} else {
|
|
119
|
+
clearInterval(this.timer);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
</script>
|
|
124
|
+
<style lang='scss' scoped></style>
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
* @Author: hutao
|
|
5
5
|
* @Date: 2021-12-21 16:24:07
|
|
6
6
|
* @LastEditors: hutao
|
|
7
|
-
* @LastEditTime: 2021-12-
|
|
7
|
+
* @LastEditTime: 2021-12-22 09:58:44
|
|
8
8
|
-->
|
|
9
9
|
<template>
|
|
10
|
-
<mavon-editor v-model="
|
|
10
|
+
<mavon-editor v-model="state.content"
|
|
11
11
|
:subfield="subfield"
|
|
12
12
|
default_open="{}"
|
|
13
13
|
ref="md"
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
@change="change" />
|
|
19
19
|
</template>
|
|
20
20
|
<script lang='ts'>
|
|
21
|
-
import { Component, Prop, Vue } from "vue-property-decorator";
|
|
21
|
+
import { Component, Prop, Vue, Watch } from "vue-property-decorator";
|
|
22
22
|
import mavonEditor from "mavon-editor";
|
|
23
23
|
import "mavon-editor/dist/css/index.css";
|
|
24
24
|
import { _axios } from "vue-kst-auth";
|
|
@@ -26,6 +26,7 @@ Vue.use(mavonEditor);
|
|
|
26
26
|
interface State {
|
|
27
27
|
/** 数据状态 */
|
|
28
28
|
loading: boolean;
|
|
29
|
+
content: string;
|
|
29
30
|
}
|
|
30
31
|
@Component
|
|
31
32
|
export default class HtMd extends Vue {
|
|
@@ -38,12 +39,16 @@ export default class HtMd extends Vue {
|
|
|
38
39
|
/** placeholder */
|
|
39
40
|
@Prop() placeholder!: string;
|
|
40
41
|
/** 是否隐藏右侧预览界面 */
|
|
41
|
-
@Prop() subfield!:
|
|
42
|
+
@Prop() subfield!: boolean;
|
|
42
43
|
/** 数据 */
|
|
43
44
|
state: State = {
|
|
44
45
|
loading: false,
|
|
46
|
+
content: "",
|
|
45
47
|
};
|
|
46
48
|
/** 生命周期 */
|
|
49
|
+
created() {
|
|
50
|
+
this.state.content = this.value;
|
|
51
|
+
}
|
|
47
52
|
/** 方法 */
|
|
48
53
|
/** 添加图片 */
|
|
49
54
|
addImg(e: number, f: File) {
|
|
@@ -73,6 +78,7 @@ export default class HtMd extends Vue {
|
|
|
73
78
|
/** 实时改变 */
|
|
74
79
|
change(e: string, text: string) {
|
|
75
80
|
this.$emit("input", e);
|
|
81
|
+
|
|
76
82
|
this.$emit("change", e, text);
|
|
77
83
|
|
|
78
84
|
//
|
|
@@ -83,6 +89,10 @@ export default class HtMd extends Vue {
|
|
|
83
89
|
}
|
|
84
90
|
|
|
85
91
|
/** 监听 */
|
|
92
|
+
@Watch("value", { deep: true })
|
|
93
|
+
onContent(val: string) {
|
|
94
|
+
this.state.content = val;
|
|
95
|
+
}
|
|
86
96
|
/** 计算属性 */
|
|
87
97
|
}
|
|
88
98
|
</script>
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @Author: hutao
|
|
6
6
|
* @Date: 2021-11-11 11:23:24
|
|
7
7
|
* @LastEditors: hutao
|
|
8
|
-
* @LastEditTime: 2021-12-14
|
|
8
|
+
* @LastEditTime: 2021-12-23 14:58:42
|
|
9
9
|
-->
|
|
10
10
|
<template>
|
|
11
11
|
<div v-loading="state.loading">
|
|
@@ -110,7 +110,14 @@
|
|
|
110
110
|
</template>
|
|
111
111
|
<!-- 处理时间 -->
|
|
112
112
|
<template v-else-if="item.type==='time'">
|
|
113
|
-
<
|
|
113
|
+
<div v-if='getPropByPath(row,item.key)'
|
|
114
|
+
class="ht-column-cell">
|
|
115
|
+
<span v-if="!item.spread"> {{getPropByPath(row,item.key).replace('T', ' ').slice(0,19)}}</span>
|
|
116
|
+
<template v-else>
|
|
117
|
+
<p style="color:var(--primary);margin:0;padding:0">{{getPropByPath(row,item.key).slice(11,19)}}</p>
|
|
118
|
+
<p style="margin:0;padding:0">{{getPropByPath(row,item.key).replace('T', ' ').slice(0,10)}}</p>
|
|
119
|
+
</template>
|
|
120
|
+
</div>
|
|
114
121
|
<span v-else>--</span>
|
|
115
122
|
</template>
|
|
116
123
|
<!-- 其他 -->
|
|
@@ -206,7 +213,8 @@ export default class HtTable extends Vue {
|
|
|
206
213
|
created() {
|
|
207
214
|
this.setPageInfo(this.pageInfo);
|
|
208
215
|
}
|
|
209
|
-
|
|
216
|
+
/** 处理table里面根据字段获取对应的值 */
|
|
217
|
+
getPropByPath(obj: any, path: string, strict = true) {
|
|
210
218
|
let tempObj = obj;
|
|
211
219
|
path = path.replace(/\[(\w+)\]/g, ".$1");
|
|
212
220
|
path = path.replace(/^\./, "");
|
|
@@ -220,7 +228,7 @@ export default class HtTable extends Vue {
|
|
|
220
228
|
tempObj = tempObj[key];
|
|
221
229
|
} else {
|
|
222
230
|
if (strict) {
|
|
223
|
-
throw new Error(
|
|
231
|
+
throw new Error(`table中${path}字段发生错误,请检查`);
|
|
224
232
|
}
|
|
225
233
|
break;
|
|
226
234
|
}
|
package/src/packages/index.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @Author: hutao
|
|
5
5
|
* @Date: 2021-10-21 10:08:41
|
|
6
6
|
* @LastEditors: hutao
|
|
7
|
-
* @LastEditTime: 2021-12-
|
|
7
|
+
* @LastEditTime: 2021-12-26 11:20:23
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
// 导入组件
|
|
@@ -17,9 +17,10 @@ import HtTable from './HtTable/index'
|
|
|
17
17
|
import HtExport from './HtExport/index'
|
|
18
18
|
import HtUpload from './HtUpload/index'
|
|
19
19
|
import HtMd from './HtMd/index'
|
|
20
|
+
import HtCountDown from './HtCountDown/index'
|
|
20
21
|
|
|
21
22
|
// 存储组件列表
|
|
22
|
-
const components = [HtSelectTable, HtPagination, HtTable, HtExport, HtUpload, HtMd]
|
|
23
|
+
const components = [HtSelectTable, HtPagination, HtTable, HtExport, HtUpload, HtMd, HtCountDown]
|
|
23
24
|
// 定义 install 方法,接收 Vue 作为参数。如果使用 use 注册插件,则所有的组件都将被注册
|
|
24
25
|
const install = function (Vue: any) {
|
|
25
26
|
// 判断是否安装
|
|
@@ -35,6 +36,6 @@ export default {
|
|
|
35
36
|
// 导出的对象必须具有 install,才能被 Vue.use() 方法安装
|
|
36
37
|
install,
|
|
37
38
|
// 以下是具体的组件列表
|
|
38
|
-
HtSelectTable, HtPagination, HtTable, HtExport, HtUpload, HtMd
|
|
39
|
+
HtSelectTable, HtPagination, HtTable, HtExport, HtUpload, HtMd, HtCountDown
|
|
39
40
|
}
|
|
40
41
|
|
package/src/packages/type.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @Author: hutao
|
|
5
5
|
* @Date: 2021-10-25 17:05:17
|
|
6
6
|
* @LastEditors: hutao
|
|
7
|
-
* @LastEditTime: 2021-12-
|
|
7
|
+
* @LastEditTime: 2021-12-23 11:33:43
|
|
8
8
|
*/
|
|
9
9
|
/** 初始的默认条数 */
|
|
10
10
|
export const defalutPageSize = 10
|
|
@@ -66,6 +66,8 @@ export interface Column {
|
|
|
66
66
|
headerSlot?: boolean;
|
|
67
67
|
/** 是否隐藏当前列 */
|
|
68
68
|
hide?: boolean;
|
|
69
|
+
/** 时间是否跨行展示 */
|
|
70
|
+
spread?: boolean;
|
|
69
71
|
/** 通过type展示相应的数据 用户id|部门id|时间格式化*/
|
|
70
72
|
type?: 'userId' | 'org' | 'time' | 'common',
|
|
71
73
|
/** 只有当type='common'时候有效 数据类型个ca common里面的一样但不包括时间 时间使用time */
|
package/src/views/About.vue
CHANGED
|
@@ -4,14 +4,21 @@
|
|
|
4
4
|
* @Author: hutao
|
|
5
5
|
* @Date: 2021-11-15 14:41:40
|
|
6
6
|
* @LastEditors: hutao
|
|
7
|
-
* @LastEditTime: 2021-12-
|
|
7
|
+
* @LastEditTime: 2021-12-26 11:39:37
|
|
8
8
|
-->
|
|
9
9
|
<template>
|
|
10
10
|
<div>
|
|
11
|
+
<el-tag type="">
|
|
12
|
+
<ht-count-down :times="250"
|
|
13
|
+
:start="!state.start">
|
|
14
|
+
<template slot-scope="{timeStr}">
|
|
15
|
+
{{timeStr}}
|
|
16
|
+
</template>
|
|
17
|
+
</ht-count-down>
|
|
18
|
+
</el-tag>
|
|
11
19
|
|
|
12
|
-
<
|
|
13
|
-
|
|
14
|
-
placeholder="请输入"></HtMd>
|
|
20
|
+
<ht-md v-model="state.content"
|
|
21
|
+
:subfield="true"></ht-md>
|
|
15
22
|
<HtTable :data="state.data"
|
|
16
23
|
@onchange="test"
|
|
17
24
|
:height="200"
|
|
@@ -43,30 +50,71 @@
|
|
|
43
50
|
<script lang='ts'>
|
|
44
51
|
import { Component, Vue } from "vue-property-decorator";
|
|
45
52
|
import HtTable from "@/packages/HtTable/index.vue";
|
|
46
|
-
import
|
|
53
|
+
import HtCountDown from "@/packages/HtCountDown/index.vue";
|
|
54
|
+
import HtUi from "htui-yllkbz";
|
|
55
|
+
import "htui-yllkbz/lib/htui.css";
|
|
56
|
+
Vue.use(HtUi);
|
|
47
57
|
interface State {
|
|
48
58
|
/** 数据状态 */
|
|
49
59
|
loading: boolean;
|
|
50
60
|
columns: any;
|
|
51
61
|
data: any;
|
|
52
62
|
content: string;
|
|
63
|
+
start: boolean;
|
|
53
64
|
}
|
|
54
65
|
@Component({
|
|
55
66
|
components: {
|
|
56
67
|
HtTable,
|
|
57
|
-
|
|
68
|
+
HtCountDown,
|
|
58
69
|
},
|
|
59
70
|
})
|
|
60
71
|
export default class Index extends Vue {
|
|
61
72
|
/** 数据 */
|
|
62
73
|
state: State = {
|
|
63
74
|
loading: false,
|
|
75
|
+
start: false,
|
|
64
76
|
content: "",
|
|
65
77
|
data: [
|
|
66
|
-
{
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
78
|
+
{
|
|
79
|
+
name: "胡涛",
|
|
80
|
+
age: 12,
|
|
81
|
+
sex: 0,
|
|
82
|
+
id: 1,
|
|
83
|
+
test: { title: "测试" },
|
|
84
|
+
time: "2022-01-20T00:00:00+08:00",
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
name: "胡涛",
|
|
88
|
+
age: 12,
|
|
89
|
+
sex: 1,
|
|
90
|
+
id: 2,
|
|
91
|
+
test: { title: "测试" },
|
|
92
|
+
time: "2022-01-20T00:00:00+08:00",
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
name: "胡涛",
|
|
96
|
+
age: 12,
|
|
97
|
+
sex: 1,
|
|
98
|
+
id: 3,
|
|
99
|
+
test: { title: "测试" },
|
|
100
|
+
time: "2022-01-20T00:00:00+08:00",
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
name: "胡涛",
|
|
104
|
+
age: 12,
|
|
105
|
+
sex: 0,
|
|
106
|
+
id: 4,
|
|
107
|
+
test: { title: "测试" },
|
|
108
|
+
time: "2022-01-20T00:00:00+08:00",
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
name: "胡涛",
|
|
112
|
+
age: 12,
|
|
113
|
+
sex: 0,
|
|
114
|
+
id: 41,
|
|
115
|
+
test: { title: "测试" },
|
|
116
|
+
time: "2022-01-20T00:00:00+08:00",
|
|
117
|
+
},
|
|
70
118
|
],
|
|
71
119
|
columns: [
|
|
72
120
|
{
|
|
@@ -82,6 +130,12 @@ export default class Index extends Vue {
|
|
|
82
130
|
title: "age",
|
|
83
131
|
key: "age",
|
|
84
132
|
},
|
|
133
|
+
{
|
|
134
|
+
title: "time",
|
|
135
|
+
type: "time",
|
|
136
|
+
spread: true,
|
|
137
|
+
key: "time",
|
|
138
|
+
},
|
|
85
139
|
{
|
|
86
140
|
title: "性别",
|
|
87
141
|
key: "sex",
|