bri-components 1.2.44 → 1.2.45
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
webpackJsonpbri_components([3],{406:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(414),o=n(436),s=n(0)(i.a,o.a,!1,null,null,null);e.default=s.exports},414:function(t,e,n){"use strict";var i=n(1),o=n.n(i),s=n(425),r=n.n(s);e.a={name:"DshCrossTable",props:{data:{type:Array,default:function(){return[]}},columns:{type:Array,default:function(){return[]}},propsObj:{type:Object,default:function(){return{}}},operationList:{type:Array,default:function(){return[]}},noDataText:{type:String,default:"暂无内容..."},changedFields:{type:Array,default:function(){return[]}}},data:function(){return{selections:[],allChecked:!1,selectionList:[],rowWidth:0,colWidth:0,titleWidth:200,showTable:!1,currentPage:1,pagesize:10,pagesizeOpts:[50,30,20,15,10],showTotal:!0,total:0,pageHeightScreen:[5,10,15]}},computed:{selfPropsObj:function(){return o()({showCheck:!0,showIndex:!0,showAction:!0},this.propsObj)},columnList:function(){return this.columns.filter(function(t){return"operation"!==t.type})},operationCol:function(){var t=this;return{title:"操作",_name:"操作",type:"expend",width:150,renderBodyCell:function(e,n){return t.operationList.length<3?n("dsh-buttons",{props:{list:t.operationList},on:{click:function(n){t.$dshEmit(n,e.row,e.row)}}}):n("div",{style:{display:"flex",justifyContent:"center"}},[n("dsh-buttons",{style:{display:"inline-block"},props:{list:t.operationList.slice(0,2)},on:{click:function(n){t.$dshEmit(n,e.row,e.row)}}}),n("dsh-dropdown",{props:{dropdownObj:{icon:"ios-more",size:22,color:"#E9ECF4",showDropdownItemIcon:!1},list:t.operationList.slice(2)},on:{click:function(n){t.$dshEmit(n,e.row,e.row)}}},[n("dsh-buttons",{props:{list:[{name:"更多>>",type:"more",btnType:"text",size:"small"}]}})])])}}},renderTableBoxStyle:function(){var t="";return this.tableExpend?t+="padding-bottom:38px;":t+="padding-bottom:0px;",this.tableSelection&&this.tableIndex?t+="padding-top:77px":this.tableSelection||this.tableIndex?t+="padding-top:39px":t+="padding-top:0px",t},selectIds:{get:function(){return this.selections.map(function(t){return t._id})},set:function(t){this.selections=this.data.filter(function(e){return t.includes(e._id)})}},isSelectAll:{get:function(){return this.data.length>0&&this.selectIds.length===this.data.length},set:function(t){this.selections=t?this.data:[]}}},created:function(){},mounted:function(){this.init()},methods:{init:function(){this.initTableData()},initTableData:function(){var t=this;this.$nextTick(function(){t.initTableWidth()})},initTableWidth:function(){var t=this;r()().listenTo(document.getElementById("DshCrossTable-right"),function(e){var n=t.$refs["DshCrossTable-right"].clientWidth,i=n/240,o=t.data.length;i>=o?(t.rowWidth=n,t.colWidth=(n-10)/o):t.rowWidth=240*o,t.showTable=!0})},tableScroll:function(t){var e=document.getElementsByClassName("DshCrossTable-left")[0],n=document.getElementsByClassName("DshCrossTable-left-body")[0],i=document.getElementsByClassName("DshCrossTable-right-header")[0]||{},o=document.getElementsByClassName("DshCrossTable-right-footer")[0]||{};n.scrollTop=t.srcElement.scrollTop,this.selfPropsObj.showCheck&&this.selfPropsObj.showIndex&&(0!==t.srcElement.scrollTop?(i.style.boxShadow="0px 0px 5px 0px #dddddd",o.style.boxShadow="0px 0px 5px 0px #dddddd"):i.style.boxShadow=o.style.boxShadow="none"),i.scrollLeft=o.scrollLeft=t.srcElement.scrollLeft,0!==t.srcElement.scrollLeft?e.style.boxShadow="0px 0px 3px 0px #dddddd":e.style.boxShadow="none"},clickRow:function(t){this.$emit("clickRow",t)},clickRowCheckbox:function(t){this.curRow=t,this.curRow.bool=!this.selectIds.includes(t._id)},selectAll:function(t){this.$emit("selectAll",this.selectIds,this.selections,t),this.changeSelect()},select:function(t){this.$emit("select",this.selectIds,this.selections,this.curRow,this.curRow.bool),this.changeSelect()},changeSelect:function(){this.$emit("selectChange",this.selectIds,this.selections)}},watch:{data:function(t,e){this.init()}}}},415:function(t,e,n){"use strict";(t.exports={}).forEach=function(t,e){for(var n=0;n<t.length;n++){var i=e(t[n]);if(i)return i}}},416:function(t,e,n){"use strict";var i=t.exports={};i.isIE=function(t){return!!function(){var t=navigator.userAgent.toLowerCase();return-1!==t.indexOf("msie")||-1!==t.indexOf("trident")||-1!==t.indexOf(" edge/")}()&&(!t||t===function(){var t=3,e=document.createElement("div"),n=e.getElementsByTagName("i");do{e.innerHTML="\x3c!--[if gt IE "+ ++t+"]><i></i><![endif]--\x3e"}while(n[0]);return t>4?t:void 0}())},i.isLegacyOpera=function(){return!!window.opera}},425:function(t,e,n){"use strict";var i=n(415).forEach,o=n(426),s=n(427),r=n(428),l=n(429),a=n(430),c=n(416),d=n(431),u=n(433),h=n(434),f=n(435);function p(t){return Array.isArray(t)||void 0!==t.length}function b(t){if(Array.isArray(t))return t;var e=[];return i(t,function(t){e.push(t)}),e}function g(t){return t&&1===t.nodeType}function m(t,e,n){var i=t[e];return void 0!==i&&null!==i||void 0===n?i:n}t.exports=function(t){var e;if((t=t||{}).idHandler)e={get:function(e){return t.idHandler.get(e,!0)},set:t.idHandler.set};else{var n=r(),v=l({idGenerator:n,stateHandler:u});e=v}var y=t.reporter;y||(y=a(!1===y));var w=m(t,"batchProcessor",d({reporter:y})),x={};x.callOnAdd=!!m(t,"callOnAdd",!0),x.debug=!!m(t,"debug",!1);var C,k=s(e),T=o({stateHandler:u}),_=m(t,"strategy","object"),S=m(t,"important",!1),E={reporter:y,batchProcessor:w,stateHandler:u,idHandler:e,important:S};if("scroll"===_&&(c.isLegacyOpera()?(y.warn("Scroll strategy is not supported on legacy Opera. Changing to object strategy."),_="object"):c.isIE(9)&&(y.warn("Scroll strategy is not supported on IE9. Changing to object strategy."),_="object")),"scroll"===_)C=f(E);else{if("object"!==_)throw new Error("Invalid strategy name: "+_);C=h(E)}var D={};return{listenTo:function(t,n,o){function s(t){var e=k.get(t);i(e,function(e){e(t)})}function r(t,e,n){k.add(e,n),t&&n(e)}if(o||(o=n,n=t,t={}),!n)throw new Error("At least one element required.");if(!o)throw new Error("Listener required.");if(g(n))n=[n];else{if(!p(n))return y.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");n=b(n)}var l=0,a=m(t,"callOnAdd",x.callOnAdd),c=m(t,"onReady",function(){}),d=m(t,"debug",x.debug);i(n,function(t){u.getState(t)||(u.initState(t),e.set(t));var h=e.get(t);if(d&&y.log("Attaching listener to element",h,t),!T.isDetectable(t))return d&&y.log(h,"Not detectable."),T.isBusy(t)?(d&&y.log(h,"System busy making it detectable"),r(a,t,o),D[h]=D[h]||[],void D[h].push(function(){++l===n.length&&c()})):(d&&y.log(h,"Making detectable..."),T.markBusy(t,!0),C.makeDetectable({debug:d,important:S},t,function(t){if(d&&y.log(h,"onElementDetectable"),u.getState(t)){T.markAsDetectable(t),T.markBusy(t,!1),C.addListener(t,s),r(a,t,o);var e=u.getState(t);if(e&&e.startSize){var f=t.offsetWidth,p=t.offsetHeight;e.startSize.width===f&&e.startSize.height===p||s(t)}D[h]&&i(D[h],function(t){t()})}else d&&y.log(h,"Element uninstalled before being detectable.");delete D[h],++l===n.length&&c()}));d&&y.log(h,"Already detecable, adding listener."),r(a,t,o),l++}),l===n.length&&c()},removeListener:k.removeListener,removeAllListeners:k.removeAllListeners,uninstall:function(t){if(!t)return y.error("At least one element is required.");if(g(t))t=[t];else{if(!p(t))return y.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");t=b(t)}i(t,function(t){k.removeAllListeners(t),C.uninstall(t),u.cleanState(t)})},initDocument:function(t){C.initDocument&&C.initDocument(t)}}}},426:function(t,e,n){"use strict";t.exports=function(t){var e=t.stateHandler.getState;return{isDetectable:function(t){var n=e(t);return n&&!!n.isDetectable},markAsDetectable:function(t){e(t).isDetectable=!0},isBusy:function(t){return!!e(t).busy},markBusy:function(t,n){e(t).busy=!!n}}}},427:function(t,e,n){"use strict";t.exports=function(t){var e={};function n(n){var i=t.get(n);return void 0===i?[]:e[i]||[]}return{get:n,add:function(n,i){var o=t.get(n);e[o]||(e[o]=[]),e[o].push(i)},removeListener:function(t,e){for(var i=n(t),o=0,s=i.length;o<s;++o)if(i[o]===e){i.splice(o,1);break}},removeAllListeners:function(t){var e=n(t);e&&(e.length=0)}}}},428:function(t,e,n){"use strict";t.exports=function(){var t=1;return{generate:function(){return t++}}}},429:function(t,e,n){"use strict";t.exports=function(t){var e=t.idGenerator,n=t.stateHandler.getState;return{get:function(t){var e=n(t);return e&&void 0!==e.id?e.id:null},set:function(t){var i=n(t);if(!i)throw new Error("setId required the element to have a resize detection state.");var o=e.generate();return i.id=o,o}}}},430:function(t,e,n){"use strict";t.exports=function(t){function e(){}var n={log:e,warn:e,error:e};if(!t&&window.console){var i=function(t,e){t[e]=function(){var t=console[e];if(t.apply)t.apply(console,arguments);else for(var n=0;n<arguments.length;n++)t(arguments[n])}};i(n,"log"),i(n,"warn"),i(n,"error")}return n}},431:function(t,e,n){"use strict";var i=n(432);function o(){var t={},e=0,n=0,i=0;return{add:function(o,s){s||(s=o,o=0),o>n?n=o:o<i&&(i=o),t[o]||(t[o]=[]),t[o].push(s),e++},process:function(){for(var e=i;e<=n;e++)for(var o=t[e],s=0;s<o.length;s++)(0,o[s])()},size:function(){return e}}}t.exports=function(t){var e=(t=t||{}).reporter,n=i.getOption(t,"async",!0),s=i.getOption(t,"auto",!0);s&&!n&&(e&&e.warn("Invalid options combination. auto=true and async=false is invalid. Setting async=true."),n=!0);var r,l=o(),a=!1;function c(){for(a=!0;l.size();){var t=l;l=o(),t.process()}a=!1}function d(){r=function(t){return function(t){return setTimeout(t,0)}(t)}(c)}return{add:function(t,e){!a&&s&&n&&0===l.size()&&d(),l.add(t,e)},force:function(t){a||(void 0===t&&(t=n),r&&(function(t){clearTimeout(t)}(r),r=null),t?d():c())}}}},432:function(t,e,n){"use strict";(t.exports={}).getOption=function(t,e,n){var i=t[e];if((void 0===i||null===i)&&void 0!==n)return n;return i}},433:function(t,e,n){"use strict";var i="_erd";function o(t){return t[i]}t.exports={initState:function(t){return t[i]={},o(t)},getState:o,cleanState:function(t){delete t[i]}}},434:function(t,e,n){"use strict";var i=n(416);t.exports=function(t){var e=(t=t||{}).reporter,n=t.batchProcessor,o=t.stateHandler.getState;if(!e)throw new Error("Missing required dependency: reporter.");function s(e){var n=t.important?" !important; ":"; ";return(e.join(n)+n).trim()}function r(t){return o(t).object}return{makeDetectable:function(t,r,l){l||(l=r,r=t,t=null),(t=t||{}).debug,i.isIE(8)?l(r):function(r,l){var a=s(["display: block","position: absolute","top: 0","left: 0","width: 100%","height: 100%","border: none","padding: 0","margin: 0","opacity: 0","z-index: -1000","pointer-events: none"]),c=!1,d=window.getComputedStyle(r),u=r.offsetWidth,h=r.offsetHeight;function f(){function n(){if("static"===d.position){r.style.setProperty("position","relative",t.important?"important":"");var n=function(e,n,i,o){var s=i[o];"auto"!==s&&"0"!==function(t){return t.replace(/[^-\d\.]/g,"")}(s)&&(e.warn("An element that is positioned static has style."+o+"="+s+" which is ignored due to the static positioning. The element will need to be positioned relative, so the style."+o+" will be set to 0. Element: ",n),n.style.setProperty(o,"0",t.important?"important":""))};n(e,r,d,"top"),n(e,r,d,"right"),n(e,r,d,"bottom"),n(e,r,d,"left")}}""!==d.position&&(n(),c=!0);var s=document.createElement("object");s.style.cssText=a,s.tabIndex=-1,s.type="text/html",s.setAttribute("aria-hidden","true"),s.onload=function(){c||n(),function t(e,n){if(!e.contentDocument){var i=o(e);return i.checkForObjectDocumentTimeoutId&&window.clearTimeout(i.checkForObjectDocumentTimeoutId),void(i.checkForObjectDocumentTimeoutId=setTimeout(function(){i.checkForObjectDocumentTimeoutId=0,t(e,n)},100))}n(e.contentDocument)}(this,function(t){l(r)})},i.isIE()||(s.data="about:blank"),o(r)&&(r.appendChild(s),o(r).object=s,i.isIE()&&(s.data="about:blank"))}o(r).startSize={width:u,height:h},n?n.add(f):f()}(r,l)},addListener:function(t,e){function n(){e(t)}if(i.isIE(8))o(t).object={proxy:n},t.attachEvent("onresize",n);else{var s=r(t);if(!s)throw new Error("Element is not detectable by this strategy.");s.contentDocument.defaultView.addEventListener("resize",n)}},uninstall:function(t){if(o(t)){var e=r(t);e&&(i.isIE(8)?t.detachEvent("onresize",e.proxy):t.removeChild(e),o(t).checkForObjectDocumentTimeoutId&&window.clearTimeout(o(t).checkForObjectDocumentTimeoutId),delete o(t).object)}}}}},435:function(t,e,n){"use strict";var i=n(415).forEach;t.exports=function(t){var e=(t=t||{}).reporter,n=t.batchProcessor,o=t.stateHandler.getState,s=(t.stateHandler.hasState,t.idHandler);if(!n)throw new Error("Missing required dependency: batchProcessor");if(!e)throw new Error("Missing required dependency: reporter.");var r=function(){var t=document.createElement("div");t.style.cssText=d(["position: absolute","width: 1000px","height: 1000px","visibility: hidden","margin: 0","padding: 0"]);var e=document.createElement("div");e.style.cssText=d(["position: absolute","width: 500px","height: 500px","overflow: scroll","visibility: none","top: -1500px","left: -1500px","visibility: hidden","margin: 0","padding: 0"]),e.appendChild(t),document.body.insertBefore(e,document.body.firstChild);var n=500-e.clientWidth,i=500-e.clientHeight;return document.body.removeChild(e),{width:n,height:i}}(),l="erd_scroll_detection_scrollbar_style",a="erd_scroll_detection_container";function c(t){!function(t,e,n){if(!t.getElementById(e)){var i=n+"_animation",o=n+"_animation_active",s="/* Created by the element-resize-detector library. */\n";s+="."+n+" > div::-webkit-scrollbar { "+d(["display: none"])+" }\n\n",s+="."+o+" { "+d(["-webkit-animation-duration: 0.1s","animation-duration: 0.1s","-webkit-animation-name: "+i,"animation-name: "+i])+" }\n",s+="@-webkit-keyframes "+i+" { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }\n",function(n,i){i=i||function(e){t.head.appendChild(e)};var o=t.createElement("style");o.innerHTML=n,o.id=e,i(o)}(s+="@keyframes "+i+" { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }")}}(t,l,a)}function d(e){var n=t.important?" !important; ":"; ";return(e.join(n)+n).trim()}function u(t,n,i){if(t.addEventListener)t.addEventListener(n,i);else{if(!t.attachEvent)return e.error("[scroll] Don't know how to add event listeners.");t.attachEvent("on"+n,i)}}function h(t,n,i){if(t.removeEventListener)t.removeEventListener(n,i);else{if(!t.detachEvent)return e.error("[scroll] Don't know how to remove event listeners.");t.detachEvent("on"+n,i)}}function f(t){return o(t).container.childNodes[0].childNodes[0].childNodes[0]}function p(t){return o(t).container.childNodes[0].childNodes[0].childNodes[1]}return c(window.document),{makeDetectable:function(t,l,c){function h(){if(t.debug){var n=Array.prototype.slice.call(arguments);if(n.unshift(s.get(l),"Scroll: "),e.log.apply)e.log.apply(null,n);else for(var i=0;i<n.length;i++)e.log(n[i])}}function b(t){var e=o(t).container.childNodes[0],n=window.getComputedStyle(e);return!n.width||-1===n.width.indexOf("px")}function g(){var t=window.getComputedStyle(l),e={};return e.position=t.position,e.width=l.offsetWidth,e.height=l.offsetHeight,e.top=t.top,e.right=t.right,e.bottom=t.bottom,e.left=t.left,e.widthCSS=t.width,e.heightCSS=t.height,e}function m(){if(h("storeStyle invoked."),o(l)){var t=g();o(l).style=t}else h("Aborting because element has been uninstalled")}function v(t,e,n){o(t).lastWidth=e,o(t).lastHeight=n}function y(){return 2*r.width+1}function w(){return 2*r.height+1}function x(t){return t+10+y()}function C(t){return t+10+w()}function k(t,e,n){var i=f(t),o=p(t),s=x(e),r=C(n),l=function(t){return 2*t+y()}(e),a=function(t){return 2*t+w()}(n);i.scrollLeft=s,i.scrollTop=r,o.scrollLeft=l,o.scrollTop=a}function T(){var t=o(l).container;if(!t){(t=document.createElement("div")).className=a,t.style.cssText=d(["visibility: hidden","display: inline","width: 0px","height: 0px","z-index: -1","overflow: hidden","margin: 0","padding: 0"]),o(l).container=t,function(t){t.className+=" "+a+"_animation_active"}(t),l.appendChild(t);var e=function(){o(l).onRendered&&o(l).onRendered()};u(t,"animationstart",e),o(l).onAnimationStart=e}return t}function _(){if(h("Injecting elements"),o(l)){!function(){var n=o(l).style;if("static"===n.position){l.style.setProperty("position","relative",t.important?"important":"");var i=function(t,e,n,i){var o=n[i];"auto"!==o&&"0"!==function(t){return t.replace(/[^-\d\.]/g,"")}(o)&&(t.warn("An element that is positioned static has style."+i+"="+o+" which is ignored due to the static positioning. The element will need to be positioned relative, so the style."+i+" will be set to 0. Element: ",e),e.style[i]=0)};i(e,l,n,"top"),i(e,l,n,"right"),i(e,l,n,"bottom"),i(e,l,n,"left")}}();var n=o(l).container;n||(n=T());var i=r.width,s=r.height,c=d(["position: absolute","flex: none","overflow: hidden","z-index: -1","visibility: hidden","width: 100%","height: 100%","left: 0px","top: 0px"]),f=d(["position: absolute","flex: none","overflow: hidden","z-index: -1","visibility: hidden"].concat(function(t,e,n,i){return t=t?t+"px":"0",e=e?e+"px":"0",n=n?n+"px":"0",["left: "+t,"top: "+e,"right: "+(i=i?i+"px":"0"),"bottom: "+n]}(-(1+i),-(1+s),-s,-i))),p=d(["position: absolute","flex: none","overflow: scroll","z-index: -1","visibility: hidden","width: 100%","height: 100%"]),b=d(["position: absolute","flex: none","overflow: scroll","z-index: -1","visibility: hidden","width: 100%","height: 100%"]),g=d(["position: absolute","left: 0","top: 0"]),m=d(["position: absolute","width: 200%","height: 200%"]),v=document.createElement("div"),y=document.createElement("div"),w=document.createElement("div"),x=document.createElement("div"),C=document.createElement("div"),k=document.createElement("div");v.dir="ltr",v.style.cssText=c,v.className=a,y.className=a,y.style.cssText=f,w.style.cssText=p,x.style.cssText=g,C.style.cssText=b,k.style.cssText=m,w.appendChild(x),C.appendChild(k),y.appendChild(w),y.appendChild(C),v.appendChild(y),n.appendChild(v),u(w,"scroll",_),u(C,"scroll",S),o(l).onExpandScroll=_,o(l).onShrinkScroll=S}else h("Aborting because element has been uninstalled");function _(){o(l).onExpand&&o(l).onExpand()}function S(){o(l).onShrink&&o(l).onShrink()}}function S(){function r(e,n,i){var o=function(t){return f(t).childNodes[0]}(e),s=x(n),r=C(i);o.style.setProperty("width",s+"px",t.important?"important":""),o.style.setProperty("height",r+"px",t.important?"important":"")}function a(i){var a=l.offsetWidth,d=l.offsetHeight,u=a!==o(l).lastWidth||d!==o(l).lastHeight;h("Storing current size",a,d),v(l,a,d),n.add(0,function(){if(u)if(o(l))if(c()){if(t.debug){var n=l.offsetWidth,i=l.offsetHeight;n===a&&i===d||e.warn(s.get(l),"Scroll: Size changed before updating detector elements.")}r(l,a,d)}else h("Aborting because element container has not been initialized");else h("Aborting because element has been uninstalled")}),n.add(1,function(){o(l)?c()?k(l,a,d):h("Aborting because element container has not been initialized"):h("Aborting because element has been uninstalled")}),u&&i&&n.add(2,function(){o(l)?c()?i():h("Aborting because element container has not been initialized"):h("Aborting because element has been uninstalled")})}function c(){return!!o(l).container}function d(){h("notifyListenersIfNeeded invoked");var t=o(l);return void 0===o(l).lastNotifiedWidth&&t.lastWidth===t.startSize.width&&t.lastHeight===t.startSize.height?h("Not notifying: Size is the same as the start size, and there has been no notification yet."):t.lastWidth===t.lastNotifiedWidth&&t.lastHeight===t.lastNotifiedHeight?h("Not notifying: Size already notified"):(h("Current size not notified, notifying..."),t.lastNotifiedWidth=t.lastWidth,t.lastNotifiedHeight=t.lastHeight,void i(o(l).listeners,function(t){t(l)}))}function u(){h("Scroll detected."),b(l)?h("Scroll event fired while unrendered. Ignoring..."):a(d)}if(h("registerListenersAndPositionElements invoked."),o(l)){o(l).onRendered=function(){if(h("startanimation triggered."),b(l))h("Ignoring since element is still unrendered...");else{h("Element rendered.");var t=f(l),e=p(l);0!==t.scrollLeft&&0!==t.scrollTop&&0!==e.scrollLeft&&0!==e.scrollTop||(h("Scrollbars out of sync. Updating detector elements..."),a(d))}},o(l).onExpand=u,o(l).onShrink=u;var g=o(l).style;r(l,g.width,g.height)}else h("Aborting because element has been uninstalled")}function E(){if(h("finalizeDomMutation invoked."),o(l)){var t=o(l).style;v(l,t.width,t.height),k(l,t.width,t.height)}else h("Aborting because element has been uninstalled")}function D(){c(l)}function A(){h("Installing..."),o(l).listeners=[],function(){var t=g();o(l).startSize={width:t.width,height:t.height},h("Element start size",o(l).startSize)}(),n.add(0,m),n.add(1,_),n.add(2,S),n.add(3,E),n.add(4,D)}c||(c=l,l=t,t=null),t=t||{},h("Making detectable..."),function(t){return!function(t){var e=t.getRootNode&&t.getRootNode().contains(t);return t===t.ownerDocument.body||t.ownerDocument.body.contains(t)||e}(t)||null===window.getComputedStyle(t)}(l)?(h("Element is detached"),T(),h("Waiting until element is attached..."),o(l).onRendered=function(){h("Element is now attached"),A()}):A()},addListener:function(t,e){if(!o(t).listeners.push)throw new Error("Cannot add listener to an element that is not detectable.");o(t).listeners.push(e)},uninstall:function(t){var e=o(t);e&&(e.onExpandScroll&&h(f(t),"scroll",e.onExpandScroll),e.onShrinkScroll&&h(p(t),"scroll",e.onShrinkScroll),e.onAnimationStart&&h(e.container,"animationstart",e.onAnimationStart),e.container&&t.removeChild(e.container))},initDocument:c}}},436:function(t,e,n){"use strict";var i={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"DshCrossTable"},[n("div",{staticClass:"DshCrossTable-left",style:t.renderTableBoxStyle},[t.selfPropsObj.showCheck&&t.selfPropsObj.showIndex?n("div",{staticClass:"DshCrossTable-left-header"},[n("table",{attrs:{cellspacing:"0",cellpadding:"0"}},[t.selfPropsObj.showCheck?n("tr",{staticClass:"DshCrossTable-row"},[n("td",{staticClass:"DshCrossTable-col DshCrossTable-col-checkbox",style:{background:"#f4f4f4"}},[n("Checkbox",{on:{"on-change":t.selectAll},model:{value:t.isSelectAll,callback:function(e){t.isSelectAll=e},expression:"isSelectAll"}})],1)]):t._e(),t._v(" "),t.selfPropsObj.showIndex?n("tr",{staticClass:"DshCrossTable-row"},[n("td",{staticClass:"DshCrossTable-col DshCrossTable-col-index",style:{background:"#f4f4f4"}},[n("div",{staticClass:"td-content"},[t._v("序号")])])]):t._e()])]):t._e(),t._v(" "),n("div",{staticClass:"DshCrossTable-left-body"},[n("div",{style:{height:"10000px"}},[n("table",{attrs:{cellspacing:"0",cellpadding:"0"}},[t._l(t.columnList.filter(function(t){return!0===t.isHead}),function(e){return n("tr",{key:e._key},[n("td",{staticClass:"DshCrossTable-col DshCrossTable-col-content",style:{background:"#f4f4f4",textAlign:"center",fontWeight:500}},[n("bri-tooltip",{attrs:{transfer:"",content:e.title}},[n("div",{staticClass:"td-content dsh-ellipsis"},[t._v("\n "+t._s(e.title)+"\n ")])])],1)])}),t._v(" "),t._l(t.columnList.filter(function(t){return!t.isHead}),function(e){return n("tr",{key:e._key},[n("td",{staticClass:"DshCrossTable-col DshCrossTable-col-content",style:{background:"#F7F9FD"}},[n("bri-tooltip",{attrs:{transfer:"",content:e.title}},[n("div",{staticClass:"td-content dsh-ellipsis"},[t._t("col",function(){return[t.changedFields.includes(e._key)?n("div",{staticClass:"crossTable-col"},[n("span",{staticClass:"crossTable-col-title"},[t._v(t._s(e.title))]),t._v(" "),n("span",{staticClass:"crossTable-col-sign"},[t._v("变更")])]):[t._v("\n "+t._s(e.title)+"\n ")]]},{col:e})],2)])],1)])})],2)])]),t._v(" "),t.operationCol&&t.selfPropsObj.showAction?n("div",{staticClass:"DshCrossTable-left-footer"},[n("table",{attrs:{cellspacing:"0",cellpadding:"0"}},[n("tr",{staticClass:"DshCrossTable-row"},[n("td",{staticClass:"DshCrossTable-col DshCrossTable-col-operation",style:{background:"#f4f4f4"}},[n("div",{staticClass:"td-content"},[t._v("操作")])])])])]):t._e()]),t._v(" "),n("div",{ref:"DshCrossTable-right",staticClass:"DshCrossTable-right",style:t.renderTableBoxStyle,attrs:{id:"DshCrossTable-right"}},[t.selfPropsObj.showCheck&&t.selfPropsObj.showIndex?n("div",{staticClass:"DshCrossTable-right-header"},[n("table",{style:{width:t.rowWidth+10+"px"},attrs:{cellspacing:"0",cellpadding:"0"}},[t.selfPropsObj.showCheck?n("tr",{staticClass:"DshCrossTable-row"},[n("CheckboxGroup",{staticStyle:{height:"40px"},on:{"on-change":t.select},model:{value:t.selectIds,callback:function(e){t.selectIds=e},expression:"selectIds"}},t._l(t.data,function(e,i){return n("td",{key:e._id,staticClass:"DshCrossTable-td-checkbox",style:{background:"#f4f4f4",textAlign:"center"}},[n("Checkbox",{staticClass:"td-content",staticStyle:{display:"inline-block",width:"100%"},attrs:{label:e._id},nativeOn:{click:function(n){return t.clickRowCheckbox(e,i)}}},[t._v(t._s(""))])],1)}),0)],1):t._e(),t._v(" "),t.selfPropsObj.showIndex?n("tr",t._l(t.data,function(e,i){return n("td",{key:e._id,staticClass:"DshCrossTable-td-index",style:{background:"#f4f4f4",textAlign:"center"},on:{click:function(n){return t.clickRow(e,i)}}},[n("div",{staticClass:"td-content"},[t._v(t._s(i+1))])])}),0):t._e()])]):t._e(),t._v(" "),t.showTable?n("div",{staticClass:"DshCrossTable-right-body",on:{scroll:function(e){return t.tableScroll(e)}}},[t.data.length?n("table",{style:{width:t.rowWidth+"px"},attrs:{cellspacing:"0",cellpadding:"0"}},[t._l(t.columnList.filter(function(t){return!0===t.isHead}),function(e){return n("tr",{key:e._key},t._l(t.data,function(i){return n("td",{key:i._id,staticClass:"DshCrossTable-td-content",style:{width:t.colWidth?t.colWidth+"px":"200px",background:"#f4f4f4",textAlign:"center",fontWeight:500}},[n("div",{staticClass:"td-content"},[t._v("\n "+t._s(i[e._key])+"\n ")])])}),0)}),t._v(" "),t._l(t.columnList.filter(function(t){return!t.isHead}),function(e,i){return n("tr",{key:e._key},t._l(t.data,function(o,s){return n("td",{key:o._id,staticClass:"DshCrossTable-td-content",style:{width:t.colWidth?t.colWidth+"px":"200px",background:t.changedFields.includes(e._key)&&2===t.data.length&&1===s?"#FFECED":s%2==0?"":"#F7F9FD",color:t.changedFields.includes(e._key)&&2===t.data.length&&1===s?"red":void 0},on:{click:function(e){return t.clickRow(o,s)}}},[e.renderBodyCell?n("div",{staticClass:"td-content"},[n("dsh-list-render",{attrs:{row:o,index:s,render:e.renderBodyCell}})],1):e.formatter?n("div",{staticClass:"td-content",domProps:{innerHTML:t._s(e.formatter(o,i,0,e._key))}}):n("div",{staticClass:"td-content"},[t._v(t._s(o[e._key]))])])}),0)})],2):n("div",{staticClass:"dsh-subtip"},[t._v(t._s(t.noDataText))])]):t._e(),t._v(" "),t.operationCol&&t.selfPropsObj.showAction?n("div",{staticClass:"DshCrossTable-right-footer"},[n("table",{style:{width:t.rowWidth+10+"px"},attrs:{cellspacing:"0",cellpadding:"0"}},[n("tr",{staticClass:"DshCrossTable-row"},t._l(t.data,function(e,i){return n("td",{key:e._id,staticClass:"DshCrossTable-td-operation",style:{background:"#f4f4f4"}},[n("div",{staticClass:"td-content"},[n("dsh-list-render",{attrs:{row:e,index:i,render:t.operationCol.renderBodyCell}})],1)])}),0)])]):t._e()])])},staticRenderFns:[]};e.a=i}});
|
|
1
|
+
webpackJsonpbri_components([3],{406:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(414),o=n(436),s=n(0)(i.a,o.a,!1,null,null,null);e.default=s.exports},414:function(t,e,n){"use strict";var i=n(1),o=n.n(i),s=n(425),r=n.n(s);e.a={name:"DshCrossTable",props:{data:{type:Array,default:function(){return[]}},columns:{type:Array,default:function(){return[]}},propsObj:{type:Object,default:function(){return{}}},operationList:{type:Array,default:function(){return[]}},noDataText:{type:String,default:"暂无内容..."},changedFields:{type:Array,default:function(){return[]}}},data:function(){return{selections:[],allChecked:!1,selectionList:[],rowWidth:0,colWidth:0,titleWidth:200,showTable:!1,currentPage:1,pagesize:10,pagesizeOpts:[50,30,20,15,10],showTotal:!0,total:0,pageHeightScreen:[5,10,15]}},computed:{selfPropsObj:function(){return o()({showCheck:!0,showIndex:!0,showAction:!0},this.propsObj)},columnList:function(){return this.columns.filter(function(t){return"operation"!==t.type})},operationCol:function(){var t=this;return{title:"操作",_name:"操作",type:"expend",width:150,renderBodyCell:function(e,n){return t.operationList.length<3?n("dsh-buttons",{props:{list:t.operationList},on:{click:function(n){t.$dshEmit(n,e.row,e.row)}}}):n("div",{style:{display:"flex",justifyContent:"center"}},[n("dsh-buttons",{style:{display:"inline-block"},props:{list:t.operationList.slice(0,2)},on:{click:function(n){t.$dshEmit(n,e.row,e.row)}}}),n("dsh-dropdown",{props:{dropdownObj:{icon:"ios-more",size:22,color:"#E9ECF4",showDropdownItemIcon:!1},list:t.operationList.slice(2)},on:{click:function(n){t.$dshEmit(n,e.row,e.row)}}},[n("dsh-buttons",{props:{list:[{name:"更多>>",type:"more",btnType:"text",size:"small"}]}})])])}}},renderTableBoxStyle:function(){var t="";return this.tableExpend?t+="padding-bottom:38px;":t+="padding-bottom:0px;",this.tableSelection&&this.tableIndex?t+="padding-top:77px":this.tableSelection||this.tableIndex?t+="padding-top:39px":t+="padding-top:0px",t},selectIds:{get:function(){return this.selections.map(function(t){return t._id})},set:function(t){this.selections=this.data.filter(function(e){return t.includes(e._id)})}},isSelectAll:{get:function(){return this.data.length>0&&this.selectIds.length===this.data.length},set:function(t){this.selections=t?this.data:[]}}},created:function(){},mounted:function(){this.init()},methods:{init:function(){this.initTableData()},initTableData:function(){var t=this;this.$nextTick(function(){t.initTableWidth()})},initTableWidth:function(){var t=this;r()().listenTo(document.getElementById("DshCrossTable-right"),function(e){var n=t.$refs["DshCrossTable-right"].clientWidth,i=n/240,o=t.data.length;i>=o?(t.rowWidth=n,t.colWidth=(n-10)/o):t.rowWidth=240*o,t.showTable=!0})},tableScroll:function(t){var e=document.getElementsByClassName("DshCrossTable-left")[0],n=document.getElementsByClassName("DshCrossTable-left-body")[0],i=document.getElementsByClassName("DshCrossTable-right-header")[0]||{},o=document.getElementsByClassName("DshCrossTable-right-footer")[0]||{};n.scrollTop=t.srcElement.scrollTop,this.selfPropsObj.showCheck&&this.selfPropsObj.showIndex&&(0!==t.srcElement.scrollTop?(i.style.boxShadow="0px 0px 5px 0px #dddddd",o.style.boxShadow="0px 0px 5px 0px #dddddd"):i.style.boxShadow=o.style.boxShadow="none"),i.scrollLeft=o.scrollLeft=t.srcElement.scrollLeft,0!==t.srcElement.scrollLeft?e.style.boxShadow="0px 0px 3px 0px #dddddd":e.style.boxShadow="none"},clickRow:function(t){this.$emit("clickRow",t)},clickRowCheckbox:function(t){this.curRow=t,this.curRow.bool=!this.selectIds.includes(t._id)},selectAll:function(t){this.$emit("selectAll",this.selectIds,this.selections,t),this.changeSelect()},select:function(t){this.$emit("select",this.selectIds,this.selections,this.curRow,this.curRow.bool),this.changeSelect()},changeSelect:function(){this.$emit("selectChange",this.selectIds,this.selections)}},watch:{data:function(t,e){this.init()}}}},415:function(t,e,n){"use strict";(t.exports={}).forEach=function(t,e){for(var n=0;n<t.length;n++){var i=e(t[n]);if(i)return i}}},416:function(t,e,n){"use strict";var i=t.exports={};i.isIE=function(t){return!!function(){var t=navigator.userAgent.toLowerCase();return-1!==t.indexOf("msie")||-1!==t.indexOf("trident")||-1!==t.indexOf(" edge/")}()&&(!t||t===function(){var t=3,e=document.createElement("div"),n=e.getElementsByTagName("i");do{e.innerHTML="\x3c!--[if gt IE "+ ++t+"]><i></i><![endif]--\x3e"}while(n[0]);return t>4?t:void 0}())},i.isLegacyOpera=function(){return!!window.opera}},425:function(t,e,n){"use strict";var i=n(415).forEach,o=n(426),s=n(427),r=n(428),l=n(429),a=n(430),c=n(416),d=n(431),u=n(433),h=n(434),f=n(435);function p(t){return Array.isArray(t)||void 0!==t.length}function b(t){if(Array.isArray(t))return t;var e=[];return i(t,function(t){e.push(t)}),e}function g(t){return t&&1===t.nodeType}function m(t,e,n){var i=t[e];return void 0!==i&&null!==i||void 0===n?i:n}t.exports=function(t){var e;if((t=t||{}).idHandler)e={get:function(e){return t.idHandler.get(e,!0)},set:t.idHandler.set};else{var n=r(),v=l({idGenerator:n,stateHandler:u});e=v}var y=t.reporter;y||(y=a(!1===y));var w=m(t,"batchProcessor",d({reporter:y})),x={};x.callOnAdd=!!m(t,"callOnAdd",!0),x.debug=!!m(t,"debug",!1);var C,k=s(e),T=o({stateHandler:u}),_=m(t,"strategy","object"),S=m(t,"important",!1),E={reporter:y,batchProcessor:w,stateHandler:u,idHandler:e,important:S};if("scroll"===_&&(c.isLegacyOpera()?(y.warn("Scroll strategy is not supported on legacy Opera. Changing to object strategy."),_="object"):c.isIE(9)&&(y.warn("Scroll strategy is not supported on IE9. Changing to object strategy."),_="object")),"scroll"===_)C=f(E);else{if("object"!==_)throw new Error("Invalid strategy name: "+_);C=h(E)}var D={};return{listenTo:function(t,n,o){function s(t){var e=k.get(t);i(e,function(e){e(t)})}function r(t,e,n){k.add(e,n),t&&n(e)}if(o||(o=n,n=t,t={}),!n)throw new Error("At least one element required.");if(!o)throw new Error("Listener required.");if(g(n))n=[n];else{if(!p(n))return y.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");n=b(n)}var l=0,a=m(t,"callOnAdd",x.callOnAdd),c=m(t,"onReady",function(){}),d=m(t,"debug",x.debug);i(n,function(t){u.getState(t)||(u.initState(t),e.set(t));var h=e.get(t);if(d&&y.log("Attaching listener to element",h,t),!T.isDetectable(t))return d&&y.log(h,"Not detectable."),T.isBusy(t)?(d&&y.log(h,"System busy making it detectable"),r(a,t,o),D[h]=D[h]||[],void D[h].push(function(){++l===n.length&&c()})):(d&&y.log(h,"Making detectable..."),T.markBusy(t,!0),C.makeDetectable({debug:d,important:S},t,function(t){if(d&&y.log(h,"onElementDetectable"),u.getState(t)){T.markAsDetectable(t),T.markBusy(t,!1),C.addListener(t,s),r(a,t,o);var e=u.getState(t);if(e&&e.startSize){var f=t.offsetWidth,p=t.offsetHeight;e.startSize.width===f&&e.startSize.height===p||s(t)}D[h]&&i(D[h],function(t){t()})}else d&&y.log(h,"Element uninstalled before being detectable.");delete D[h],++l===n.length&&c()}));d&&y.log(h,"Already detecable, adding listener."),r(a,t,o),l++}),l===n.length&&c()},removeListener:k.removeListener,removeAllListeners:k.removeAllListeners,uninstall:function(t){if(!t)return y.error("At least one element is required.");if(g(t))t=[t];else{if(!p(t))return y.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");t=b(t)}i(t,function(t){k.removeAllListeners(t),C.uninstall(t),u.cleanState(t)})},initDocument:function(t){C.initDocument&&C.initDocument(t)}}}},426:function(t,e,n){"use strict";t.exports=function(t){var e=t.stateHandler.getState;return{isDetectable:function(t){var n=e(t);return n&&!!n.isDetectable},markAsDetectable:function(t){e(t).isDetectable=!0},isBusy:function(t){return!!e(t).busy},markBusy:function(t,n){e(t).busy=!!n}}}},427:function(t,e,n){"use strict";t.exports=function(t){var e={};function n(n){var i=t.get(n);return void 0===i?[]:e[i]||[]}return{get:n,add:function(n,i){var o=t.get(n);e[o]||(e[o]=[]),e[o].push(i)},removeListener:function(t,e){for(var i=n(t),o=0,s=i.length;o<s;++o)if(i[o]===e){i.splice(o,1);break}},removeAllListeners:function(t){var e=n(t);e&&(e.length=0)}}}},428:function(t,e,n){"use strict";t.exports=function(){var t=1;return{generate:function(){return t++}}}},429:function(t,e,n){"use strict";t.exports=function(t){var e=t.idGenerator,n=t.stateHandler.getState;return{get:function(t){var e=n(t);return e&&void 0!==e.id?e.id:null},set:function(t){var i=n(t);if(!i)throw new Error("setId required the element to have a resize detection state.");var o=e.generate();return i.id=o,o}}}},430:function(t,e,n){"use strict";t.exports=function(t){function e(){}var n={log:e,warn:e,error:e};if(!t&&window.console){var i=function(t,e){t[e]=function(){var t=console[e];if(t.apply)t.apply(console,arguments);else for(var n=0;n<arguments.length;n++)t(arguments[n])}};i(n,"log"),i(n,"warn"),i(n,"error")}return n}},431:function(t,e,n){"use strict";var i=n(432);function o(){var t={},e=0,n=0,i=0;return{add:function(o,s){s||(s=o,o=0),o>n?n=o:o<i&&(i=o),t[o]||(t[o]=[]),t[o].push(s),e++},process:function(){for(var e=i;e<=n;e++)for(var o=t[e],s=0;s<o.length;s++)(0,o[s])()},size:function(){return e}}}t.exports=function(t){var e=(t=t||{}).reporter,n=i.getOption(t,"async",!0),s=i.getOption(t,"auto",!0);s&&!n&&(e&&e.warn("Invalid options combination. auto=true and async=false is invalid. Setting async=true."),n=!0);var r,l=o(),a=!1;function c(){for(a=!0;l.size();){var t=l;l=o(),t.process()}a=!1}function d(){r=function(t){return function(t){return setTimeout(t,0)}(t)}(c)}return{add:function(t,e){!a&&s&&n&&0===l.size()&&d(),l.add(t,e)},force:function(t){a||(void 0===t&&(t=n),r&&(function(t){clearTimeout(t)}(r),r=null),t?d():c())}}}},432:function(t,e,n){"use strict";(t.exports={}).getOption=function(t,e,n){var i=t[e];if((void 0===i||null===i)&&void 0!==n)return n;return i}},433:function(t,e,n){"use strict";var i="_erd";function o(t){return t[i]}t.exports={initState:function(t){return t[i]={},o(t)},getState:o,cleanState:function(t){delete t[i]}}},434:function(t,e,n){"use strict";var i=n(416);t.exports=function(t){var e=(t=t||{}).reporter,n=t.batchProcessor,o=t.stateHandler.getState;if(!e)throw new Error("Missing required dependency: reporter.");function s(e){var n=t.important?" !important; ":"; ";return(e.join(n)+n).trim()}function r(t){return o(t).object}return{makeDetectable:function(t,r,l){l||(l=r,r=t,t=null),(t=t||{}).debug,i.isIE(8)?l(r):function(r,l){var a=s(["display: block","position: absolute","top: 0","left: 0","width: 100%","height: 100%","border: none","padding: 0","margin: 0","opacity: 0","z-index: -1000","pointer-events: none"]),c=!1,d=window.getComputedStyle(r),u=r.offsetWidth,h=r.offsetHeight;function f(){function n(){if("static"===d.position){r.style.setProperty("position","relative",t.important?"important":"");var n=function(e,n,i,o){var s=i[o];"auto"!==s&&"0"!==function(t){return t.replace(/[^-\d\.]/g,"")}(s)&&(e.warn("An element that is positioned static has style."+o+"="+s+" which is ignored due to the static positioning. The element will need to be positioned relative, so the style."+o+" will be set to 0. Element: ",n),n.style.setProperty(o,"0",t.important?"important":""))};n(e,r,d,"top"),n(e,r,d,"right"),n(e,r,d,"bottom"),n(e,r,d,"left")}}""!==d.position&&(n(),c=!0);var s=document.createElement("object");s.style.cssText=a,s.tabIndex=-1,s.type="text/html",s.setAttribute("aria-hidden","true"),s.onload=function(){c||n(),function t(e,n){if(!e.contentDocument){var i=o(e);return i.checkForObjectDocumentTimeoutId&&window.clearTimeout(i.checkForObjectDocumentTimeoutId),void(i.checkForObjectDocumentTimeoutId=setTimeout(function(){i.checkForObjectDocumentTimeoutId=0,t(e,n)},100))}n(e.contentDocument)}(this,function(t){l(r)})},i.isIE()||(s.data="about:blank"),o(r)&&(r.appendChild(s),o(r).object=s,i.isIE()&&(s.data="about:blank"))}o(r).startSize={width:u,height:h},n?n.add(f):f()}(r,l)},addListener:function(t,e){function n(){e(t)}if(i.isIE(8))o(t).object={proxy:n},t.attachEvent("onresize",n);else{var s=r(t);if(!s)throw new Error("Element is not detectable by this strategy.");s.contentDocument.defaultView.addEventListener("resize",n)}},uninstall:function(t){if(o(t)){var e=r(t);e&&(i.isIE(8)?t.detachEvent("onresize",e.proxy):t.removeChild(e),o(t).checkForObjectDocumentTimeoutId&&window.clearTimeout(o(t).checkForObjectDocumentTimeoutId),delete o(t).object)}}}}},435:function(t,e,n){"use strict";var i=n(415).forEach;t.exports=function(t){var e=(t=t||{}).reporter,n=t.batchProcessor,o=t.stateHandler.getState,s=(t.stateHandler.hasState,t.idHandler);if(!n)throw new Error("Missing required dependency: batchProcessor");if(!e)throw new Error("Missing required dependency: reporter.");var r=function(){var t=document.createElement("div");t.style.cssText=d(["position: absolute","width: 1000px","height: 1000px","visibility: hidden","margin: 0","padding: 0"]);var e=document.createElement("div");e.style.cssText=d(["position: absolute","width: 500px","height: 500px","overflow: scroll","visibility: none","top: -1500px","left: -1500px","visibility: hidden","margin: 0","padding: 0"]),e.appendChild(t),document.body.insertBefore(e,document.body.firstChild);var n=500-e.clientWidth,i=500-e.clientHeight;return document.body.removeChild(e),{width:n,height:i}}(),l="erd_scroll_detection_scrollbar_style",a="erd_scroll_detection_container";function c(t){!function(t,e,n){if(!t.getElementById(e)){var i=n+"_animation",o=n+"_animation_active",s="/* Created by the element-resize-detector library. */\n";s+="."+n+" > div::-webkit-scrollbar { "+d(["display: none"])+" }\n\n",s+="."+o+" { "+d(["-webkit-animation-duration: 0.1s","animation-duration: 0.1s","-webkit-animation-name: "+i,"animation-name: "+i])+" }\n",s+="@-webkit-keyframes "+i+" { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }\n",function(n,i){i=i||function(e){t.head.appendChild(e)};var o=t.createElement("style");o.innerHTML=n,o.id=e,i(o)}(s+="@keyframes "+i+" { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }")}}(t,l,a)}function d(e){var n=t.important?" !important; ":"; ";return(e.join(n)+n).trim()}function u(t,n,i){if(t.addEventListener)t.addEventListener(n,i);else{if(!t.attachEvent)return e.error("[scroll] Don't know how to add event listeners.");t.attachEvent("on"+n,i)}}function h(t,n,i){if(t.removeEventListener)t.removeEventListener(n,i);else{if(!t.detachEvent)return e.error("[scroll] Don't know how to remove event listeners.");t.detachEvent("on"+n,i)}}function f(t){return o(t).container.childNodes[0].childNodes[0].childNodes[0]}function p(t){return o(t).container.childNodes[0].childNodes[0].childNodes[1]}return c(window.document),{makeDetectable:function(t,l,c){function h(){if(t.debug){var n=Array.prototype.slice.call(arguments);if(n.unshift(s.get(l),"Scroll: "),e.log.apply)e.log.apply(null,n);else for(var i=0;i<n.length;i++)e.log(n[i])}}function b(t){var e=o(t).container.childNodes[0],n=window.getComputedStyle(e);return!n.width||-1===n.width.indexOf("px")}function g(){var t=window.getComputedStyle(l),e={};return e.position=t.position,e.width=l.offsetWidth,e.height=l.offsetHeight,e.top=t.top,e.right=t.right,e.bottom=t.bottom,e.left=t.left,e.widthCSS=t.width,e.heightCSS=t.height,e}function m(){if(h("storeStyle invoked."),o(l)){var t=g();o(l).style=t}else h("Aborting because element has been uninstalled")}function v(t,e,n){o(t).lastWidth=e,o(t).lastHeight=n}function y(){return 2*r.width+1}function w(){return 2*r.height+1}function x(t){return t+10+y()}function C(t){return t+10+w()}function k(t,e,n){var i=f(t),o=p(t),s=x(e),r=C(n),l=function(t){return 2*t+y()}(e),a=function(t){return 2*t+w()}(n);i.scrollLeft=s,i.scrollTop=r,o.scrollLeft=l,o.scrollTop=a}function T(){var t=o(l).container;if(!t){(t=document.createElement("div")).className=a,t.style.cssText=d(["visibility: hidden","display: inline","width: 0px","height: 0px","z-index: -1","overflow: hidden","margin: 0","padding: 0"]),o(l).container=t,function(t){t.className+=" "+a+"_animation_active"}(t),l.appendChild(t);var e=function(){o(l).onRendered&&o(l).onRendered()};u(t,"animationstart",e),o(l).onAnimationStart=e}return t}function _(){if(h("Injecting elements"),o(l)){!function(){var n=o(l).style;if("static"===n.position){l.style.setProperty("position","relative",t.important?"important":"");var i=function(t,e,n,i){var o=n[i];"auto"!==o&&"0"!==function(t){return t.replace(/[^-\d\.]/g,"")}(o)&&(t.warn("An element that is positioned static has style."+i+"="+o+" which is ignored due to the static positioning. The element will need to be positioned relative, so the style."+i+" will be set to 0. Element: ",e),e.style[i]=0)};i(e,l,n,"top"),i(e,l,n,"right"),i(e,l,n,"bottom"),i(e,l,n,"left")}}();var n=o(l).container;n||(n=T());var i=r.width,s=r.height,c=d(["position: absolute","flex: none","overflow: hidden","z-index: -1","visibility: hidden","width: 100%","height: 100%","left: 0px","top: 0px"]),f=d(["position: absolute","flex: none","overflow: hidden","z-index: -1","visibility: hidden"].concat(function(t,e,n,i){return t=t?t+"px":"0",e=e?e+"px":"0",n=n?n+"px":"0",["left: "+t,"top: "+e,"right: "+(i=i?i+"px":"0"),"bottom: "+n]}(-(1+i),-(1+s),-s,-i))),p=d(["position: absolute","flex: none","overflow: scroll","z-index: -1","visibility: hidden","width: 100%","height: 100%"]),b=d(["position: absolute","flex: none","overflow: scroll","z-index: -1","visibility: hidden","width: 100%","height: 100%"]),g=d(["position: absolute","left: 0","top: 0"]),m=d(["position: absolute","width: 200%","height: 200%"]),v=document.createElement("div"),y=document.createElement("div"),w=document.createElement("div"),x=document.createElement("div"),C=document.createElement("div"),k=document.createElement("div");v.dir="ltr",v.style.cssText=c,v.className=a,y.className=a,y.style.cssText=f,w.style.cssText=p,x.style.cssText=g,C.style.cssText=b,k.style.cssText=m,w.appendChild(x),C.appendChild(k),y.appendChild(w),y.appendChild(C),v.appendChild(y),n.appendChild(v),u(w,"scroll",_),u(C,"scroll",S),o(l).onExpandScroll=_,o(l).onShrinkScroll=S}else h("Aborting because element has been uninstalled");function _(){var t=o(l);t&&t.onExpand?t.onExpand():h("Aborting expand scroll handler: element has been uninstalled")}function S(){var t=o(l);t&&t.onShrink?t.onShrink():h("Aborting shrink scroll handler: element has been uninstalled")}}function S(){function r(e,n,i){var o=function(t){return f(t).childNodes[0]}(e),s=x(n),r=C(i);o.style.setProperty("width",s+"px",t.important?"important":""),o.style.setProperty("height",r+"px",t.important?"important":"")}function a(i){var a=l.offsetWidth,d=l.offsetHeight,u=a!==o(l).lastWidth||d!==o(l).lastHeight;h("Storing current size",a,d),v(l,a,d),n.add(0,function(){if(u)if(o(l))if(c()){if(t.debug){var n=l.offsetWidth,i=l.offsetHeight;n===a&&i===d||e.warn(s.get(l),"Scroll: Size changed before updating detector elements.")}r(l,a,d)}else h("Aborting because element container has not been initialized");else h("Aborting because element has been uninstalled")}),n.add(1,function(){o(l)?c()?k(l,a,d):h("Aborting because element container has not been initialized"):h("Aborting because element has been uninstalled")}),u&&i&&n.add(2,function(){o(l)?c()?i():h("Aborting because element container has not been initialized"):h("Aborting because element has been uninstalled")})}function c(){return!!o(l).container}function d(){h("notifyListenersIfNeeded invoked");var t=o(l);return void 0===o(l).lastNotifiedWidth&&t.lastWidth===t.startSize.width&&t.lastHeight===t.startSize.height?h("Not notifying: Size is the same as the start size, and there has been no notification yet."):t.lastWidth===t.lastNotifiedWidth&&t.lastHeight===t.lastNotifiedHeight?h("Not notifying: Size already notified"):(h("Current size not notified, notifying..."),t.lastNotifiedWidth=t.lastWidth,t.lastNotifiedHeight=t.lastHeight,void i(o(l).listeners,function(t){t(l)}))}function u(){h("Scroll detected."),b(l)?h("Scroll event fired while unrendered. Ignoring..."):a(d)}if(h("registerListenersAndPositionElements invoked."),o(l)){o(l).onRendered=function(){if(h("startanimation triggered."),b(l))h("Ignoring since element is still unrendered...");else{h("Element rendered.");var t=f(l),e=p(l);0!==t.scrollLeft&&0!==t.scrollTop&&0!==e.scrollLeft&&0!==e.scrollTop||(h("Scrollbars out of sync. Updating detector elements..."),a(d))}},o(l).onExpand=u,o(l).onShrink=u;var g=o(l).style;r(l,g.width,g.height)}else h("Aborting because element has been uninstalled")}function E(){if(h("finalizeDomMutation invoked."),o(l)){var t=o(l).style;v(l,t.width,t.height),k(l,t.width,t.height)}else h("Aborting because element has been uninstalled")}function D(){c(l)}function A(){h("Installing..."),o(l).listeners=[],function(){var t=g();o(l).startSize={width:t.width,height:t.height},h("Element start size",o(l).startSize)}(),n.add(0,m),n.add(1,_),n.add(2,S),n.add(3,E),n.add(4,D)}c||(c=l,l=t,t=null),t=t||{},h("Making detectable..."),function(t){return!function(t){var e=t.getRootNode&&t.getRootNode().contains(t);return t===t.ownerDocument.body||t.ownerDocument.body.contains(t)||e}(t)||null===window.getComputedStyle(t)}(l)?(h("Element is detached"),T(),h("Waiting until element is attached..."),o(l).onRendered=function(){h("Element is now attached"),A()}):A()},addListener:function(t,e){if(!o(t).listeners.push)throw new Error("Cannot add listener to an element that is not detectable.");o(t).listeners.push(e)},uninstall:function(t){var e=o(t);e&&(e.onExpandScroll&&h(f(t),"scroll",e.onExpandScroll),e.onShrinkScroll&&h(p(t),"scroll",e.onShrinkScroll),e.onAnimationStart&&h(e.container,"animationstart",e.onAnimationStart),e.container&&t.removeChild(e.container))},initDocument:c}}},436:function(t,e,n){"use strict";var i={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"DshCrossTable"},[n("div",{staticClass:"DshCrossTable-left",style:t.renderTableBoxStyle},[t.selfPropsObj.showCheck&&t.selfPropsObj.showIndex?n("div",{staticClass:"DshCrossTable-left-header"},[n("table",{attrs:{cellspacing:"0",cellpadding:"0"}},[t.selfPropsObj.showCheck?n("tr",{staticClass:"DshCrossTable-row"},[n("td",{staticClass:"DshCrossTable-col DshCrossTable-col-checkbox",style:{background:"#f4f4f4"}},[n("Checkbox",{on:{"on-change":t.selectAll},model:{value:t.isSelectAll,callback:function(e){t.isSelectAll=e},expression:"isSelectAll"}})],1)]):t._e(),t._v(" "),t.selfPropsObj.showIndex?n("tr",{staticClass:"DshCrossTable-row"},[n("td",{staticClass:"DshCrossTable-col DshCrossTable-col-index",style:{background:"#f4f4f4"}},[n("div",{staticClass:"td-content"},[t._v("序号")])])]):t._e()])]):t._e(),t._v(" "),n("div",{staticClass:"DshCrossTable-left-body"},[n("div",{style:{height:"10000px"}},[n("table",{attrs:{cellspacing:"0",cellpadding:"0"}},[t._l(t.columnList.filter(function(t){return!0===t.isHead}),function(e){return n("tr",{key:e._key},[n("td",{staticClass:"DshCrossTable-col DshCrossTable-col-content",style:{background:"#f4f4f4",textAlign:"center",fontWeight:500}},[n("bri-tooltip",{attrs:{transfer:"",content:e.title}},[n("div",{staticClass:"td-content dsh-ellipsis"},[t._v("\n "+t._s(e.title)+"\n ")])])],1)])}),t._v(" "),t._l(t.columnList.filter(function(t){return!t.isHead}),function(e){return n("tr",{key:e._key},[n("td",{staticClass:"DshCrossTable-col DshCrossTable-col-content",style:{background:"#F7F9FD"}},[n("bri-tooltip",{attrs:{transfer:"",content:e.title}},[n("div",{staticClass:"td-content dsh-ellipsis"},[t._t("col",function(){return[t.changedFields.includes(e._key)?n("div",{staticClass:"crossTable-col"},[n("span",{staticClass:"crossTable-col-title"},[t._v(t._s(e.title))]),t._v(" "),n("span",{staticClass:"crossTable-col-sign"},[t._v("变更")])]):[t._v("\n "+t._s(e.title)+"\n ")]]},{col:e})],2)])],1)])})],2)])]),t._v(" "),t.operationCol&&t.selfPropsObj.showAction?n("div",{staticClass:"DshCrossTable-left-footer"},[n("table",{attrs:{cellspacing:"0",cellpadding:"0"}},[n("tr",{staticClass:"DshCrossTable-row"},[n("td",{staticClass:"DshCrossTable-col DshCrossTable-col-operation",style:{background:"#f4f4f4"}},[n("div",{staticClass:"td-content"},[t._v("操作")])])])])]):t._e()]),t._v(" "),n("div",{ref:"DshCrossTable-right",staticClass:"DshCrossTable-right",style:t.renderTableBoxStyle,attrs:{id:"DshCrossTable-right"}},[t.selfPropsObj.showCheck&&t.selfPropsObj.showIndex?n("div",{staticClass:"DshCrossTable-right-header"},[n("table",{style:{width:t.rowWidth+10+"px"},attrs:{cellspacing:"0",cellpadding:"0"}},[t.selfPropsObj.showCheck?n("tr",{staticClass:"DshCrossTable-row"},[n("CheckboxGroup",{staticStyle:{height:"40px"},on:{"on-change":t.select},model:{value:t.selectIds,callback:function(e){t.selectIds=e},expression:"selectIds"}},t._l(t.data,function(e,i){return n("td",{key:e._id,staticClass:"DshCrossTable-td-checkbox",style:{background:"#f4f4f4",textAlign:"center"}},[n("Checkbox",{staticClass:"td-content",staticStyle:{display:"inline-block",width:"100%"},attrs:{label:e._id},nativeOn:{click:function(n){return t.clickRowCheckbox(e,i)}}},[t._v(t._s(""))])],1)}),0)],1):t._e(),t._v(" "),t.selfPropsObj.showIndex?n("tr",t._l(t.data,function(e,i){return n("td",{key:e._id,staticClass:"DshCrossTable-td-index",style:{background:"#f4f4f4",textAlign:"center"},on:{click:function(n){return t.clickRow(e,i)}}},[n("div",{staticClass:"td-content"},[t._v(t._s(i+1))])])}),0):t._e()])]):t._e(),t._v(" "),t.showTable?n("div",{staticClass:"DshCrossTable-right-body",on:{scroll:function(e){return t.tableScroll(e)}}},[t.data.length?n("table",{style:{width:t.rowWidth+"px"},attrs:{cellspacing:"0",cellpadding:"0"}},[t._l(t.columnList.filter(function(t){return!0===t.isHead}),function(e){return n("tr",{key:e._key},t._l(t.data,function(i){return n("td",{key:i._id,staticClass:"DshCrossTable-td-content",style:{width:t.colWidth?t.colWidth+"px":"200px",background:"#f4f4f4",textAlign:"center",fontWeight:500}},[n("div",{staticClass:"td-content"},[t._v("\n "+t._s(i[e._key])+"\n ")])])}),0)}),t._v(" "),t._l(t.columnList.filter(function(t){return!t.isHead}),function(e,i){return n("tr",{key:e._key},t._l(t.data,function(o,s){return n("td",{key:o._id,staticClass:"DshCrossTable-td-content",style:{width:t.colWidth?t.colWidth+"px":"200px",background:t.changedFields.includes(e._key)&&2===t.data.length&&1===s?"#FFECED":s%2==0?"":"#F7F9FD",color:t.changedFields.includes(e._key)&&2===t.data.length&&1===s?"red":void 0},on:{click:function(e){return t.clickRow(o,s)}}},[e.renderBodyCell?n("div",{staticClass:"td-content"},[n("dsh-list-render",{attrs:{row:o,index:s,render:e.renderBodyCell}})],1):e.formatter?n("div",{staticClass:"td-content",domProps:{innerHTML:t._s(e.formatter(o,i,0,e._key))}}):n("div",{staticClass:"td-content"},[t._v(t._s(o[e._key]))])])}),0)})],2):n("div",{staticClass:"dsh-subtip"},[t._v(t._s(t.noDataText))])]):t._e(),t._v(" "),t.operationCol&&t.selfPropsObj.showAction?n("div",{staticClass:"DshCrossTable-right-footer"},[n("table",{style:{width:t.rowWidth+10+"px"},attrs:{cellspacing:"0",cellpadding:"0"}},[n("tr",{staticClass:"DshCrossTable-row"},t._l(t.data,function(e,i){return n("td",{key:e._id,staticClass:"DshCrossTable-td-operation",style:{background:"#f4f4f4"}},[n("div",{staticClass:"td-content"},[n("dsh-list-render",{attrs:{row:e,index:i,render:t.operationCol.renderBodyCell}})],1)])}),0)])]):t._e()])])},staticRenderFns:[]};e.a=i}});
|