You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

11 lines
6.1 KiB

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/mix-tree/mix-tree"],{"0900":function(t,e,i){"use strict";(function(t){function i(t){return r(t)||c(t)||s(t)||n()}function n(){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 s(t,e){if(t){if("string"===typeof t)return a(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?a(t,e):void 0}}function c(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}function r(t){if(Array.isArray(t))return a(t)}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o={props:{list:{type:Array,default:function(){return[]}},params:{type:Object,default:function(){return{}}},fliter:{type:String},multiple:{type:Boolean,default:function(){return!1}},limit:{type:Number,default:function(){return 99}},unChecked:{type:String,default:function(){return""}}},data:function(){return{treeList:[],treeParams:{defaultIcon:"../../static/img/defaultIcon.png",currentIcon:"../../static/img/currentIcon.png",lastIcon:"",border:!1},bSearch:"",aSearch:"",colonData:"",checkedRund:"../../static/img/btn_pre.png",uncheckRund:"../../static/img/btn_per_un.png",idsList:[],cloneData:[],nameList:[]}},watch:{list:function(t){console.log("重置了列表"),this.treeList=[],this.treeParams=Object.assign(this.treeParams,this.params),this.renderTreeList(t),this.$forceUpdate()},fliter:function(t,e){var i=this;if(console.log(t,"组件获得搜索操作的值"),t){console.log("执行"),this.cloneData.forEach((function(t){i.idsList.includes(t.id)&&(t.checked=!0)})),this.treeList=this.cloneData;var n=JSON.parse(JSON.stringify(this.treeList));this.treeList=[],n.forEach((function(e){e.name.includes(t)&&(e.show=!0,e.showChild=!0,i.treeList.push(e))})),this.$forceUpdate()}else console.log("还原操作"),this.cloneData.forEach((function(t){i.idsList.includes(t.id)&&(t.checked=!0)})),this.treeList=this.cloneData},unChecked:function(t){console.log(t,"当前的name是否为空值"),t&&""!=t&&(console.log(t,"当前触发不能选中的值"),this.changeChecked(t))}},methods:{changeChecked:function(t){var e=this;this.treeList.forEach((function(i){i.name==t&&(i.checked=!1,console.log(i.name,t,"名称",e.nameList.indexOf(t)),console.log(e.nameList,"看下是否纯在删除行为",t),-1!==e.nameList.indexOf(t)&&e.nameList.splice(e.nameList.indexOf(t),1),-1!==e.idsList.indexOf(i.id)&&e.idsList.splice(e.idsList.indexOf(i.id),1),console.log(e.nameList,"看下是否纯在删除行为"))})),this.$emit("checkedRund",this.nameList,this.idsList),this.$emit("delstr","")},renderTreeList:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];e.forEach((function(e){if(t.treeList.push({id:e.id,name:e.name,parentId:s,rank:n,showChild:!1,show:0===n,account:!!e.account&&e.account,checked:!!t.checkedIDS&&t.checkedIDS.map((function(t){return t===e.id}))}),Array.isArray(e.children)&&e.children.length>0){var c=i(s);c.push(e.id),t.renderTreeList(e.children,n+1,c)}else t.treeList[t.treeList.length-1].lastRank=!0})),this.cloneData=JSON.parse(JSON.stringify(this.treeList))},treeItemTap:function(t){var e=this.treeList,i=t.id;!0!==t.lastRank?(t.showChild=!t.showChild,e.forEach((function(e){if(!1===t.showChild){if(!e.parentId.includes(i))return;!0!==e.lastRank&&(e.showChild=!1),e.show=!1}else e.parentId[e.parentId.length-1]===i&&(e.show=!0)}))):this.$emit("treeItemClick",t)},changeRund:function(e){var i=this;if(this.multiple)if(console.log("触发多选",this.unChecked),this.idsList.includes(e.id))e.checked=!1,this.idsList.splice(this.idsList.indexOf(e.id),1),this.nameList.splice(thi
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
'components/mix-tree/mix-tree-create-component',
{
'components/mix-tree/mix-tree-create-component':(function(module, exports, __webpack_require__){
__webpack_require__('543d')['createComponent'](__webpack_require__("0fb7"))
})
},
[['components/mix-tree/mix-tree-create-component']]
]);