1 line
31 KiB
JavaScript
1 line
31 KiB
JavaScript
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["q"],{"1f3d":function(e,t,l){"use strict";l("55ae")},"21fd":function(e,t,l){},"23f7":function(e,t,l){"use strict";var s=function(){var e=this,t=e._self._c;return t("el-popover",{ref:"nodTree",staticClass:"nodTree"},[t("el-input",{attrs:{slot:"reference",placeholder:e.placeholder,readonly:""},nativeOn:{keydown:function(t){return e.inputEvent.apply(null,arguments)}},slot:"reference",model:{value:e.label,callback:function(t){e.label=t},expression:"label"}},[t("template",{slot:"suffix"},[t("i",{class:["el-input__icon",""!=e.label?"el-icon-circle-close":"el-icon-arrow-down"],on:{click:function(t){return t.stopPropagation(),e.delModel.apply(null,arguments)}}})])],2),t("el-tree",{ref:"tree",attrs:{data:e.treeData,props:e.treeProps,"node-key":e.treeKey,"current-node-key":e.checked,"show-checkbox":e.checkbox,"check-strictly":e.checkStrictly,"default-checked-keys":e.checkeds,"default-expanded-keys":e.expanded,"highlight-current":!0},on:{check:e.setTree,"node-click":e.setTree}})],1)},i=[],a=l("b85c"),o=(l("7db0"),l("a15b"),l("14d9"),l("b0c0"),l("d3b7"),{name:"NodTree",props:{value:{required:!0},treeData:{required:!0,type:Array},treeKey:{default:"id"},treeProps:{default:function(){return{label:"name",children:"sub"}}},placeholder:{default:"请点击选择数据"},checkStrictly:{default:!1}},data:function(){return{label:"",checked:null,checkeds:[],expanded:[],checkbox:!1}},created:function(){this.init()},computed:{flatTree:function(){var e=this.$lib.flatten(this.treeData);return e}},watch:{value:{handler:function(e){this.checkbox?this.$lib.comparison(e,this.checkeds)&&(this.checkeds=e,this.$refs.tree.setCheckedKeys(e,!0)):e!=this.checked&&(this.checked=e,this.$refs.tree.setCurrentKey(e))},deep:!0},checked:function(){this.setInput()},checkeds:{handler:function(){this.setInput()},deep:!0}},methods:{init:function(){var e=this;if(null!=this.value){Array.isArray(this.value)?(this.checkbox=!0,this.checkeds=this.value):(this.checkbox=!1,this.checked=this.value);var t,l=Object(a["a"])(this.checkbox?this.checkeds:[this.checked]);try{var s=function(){var l=t.value,s=e.flatTree.find((function(e){return e.id==l}));void 0!=s&&s.hasOwnProperty("pid")&&e.expanded.push(s.pid)};for(l.s();!(t=l.n()).done;)s()}catch(i){l.e(i)}finally{l.f()}}},setInput:function(){var e,t=this,l=[],s=Object(a["a"])(this.checkbox?this.checkeds:[this.checked]);try{var i=function(){var s=e.value,i=t.flatTree.find((function(e){return e.id==s}));void 0==i||l.push(i.name)};for(s.s();!(e=s.n()).done;)i()}catch(o){s.e(o)}finally{s.f()}this.label=l.join(",")},setTree:function(e){this.checkbox?(this.checkeds=this.$refs.tree.getCheckedKeys(),this.$emit("input",this.checkeds)):(this.checked=e.id,this.$emit("input",this.checked),this.$refs["nodTree"].showPopper=!1)},delModel:function(){this.label="",this.checkbox?(this.checkeds=[],this.$refs.tree.setCheckedKeys([])):(this.checked=null,this.$refs.tree.setCurrentKey(null)),this.$emit("input",this.checkbox?[]:null),this.$refs["nodTree"].showPopper=!1},inputEvent:function(e){this.$refs["nodTree"].showPopper&&27==e.keyCode&&e.stopPropagation()}}}),r=o,n=(l("d683"),l("2877")),c=Object(n["a"])(r,s,i,!1,null,"9f20837e",null);t["a"]=c.exports},5549:function(e,t,l){"use strict";l("b0c0");var s=function(){var e=this,t=e._self._c;return t("el-dropdown",{staticClass:"nodUpload",attrs:{"split-button":"",placement:"bottom-start"}},[t("el-upload",{attrs:{action:e.action,headers:{Token:e.$store.state.token},"show-file-list":!1,"on-success":e.uploadSuccess}},[t("i",{staticClass:"text el-icon-upload"},[e._v(" 点击上传")])]),t("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[e.files.length>0?[e._l(e.files,(function(l,s){return[t("li",[t("el-row",[t("el-col",{attrs:{span:22}},[t("p",{staticClass:"file",on:{click:function(t){return e.preview(l)}}},[e._v(e._s(l.name))])]),t("el-col",{attrs:{span:2}},[t("i",{staticClass:"el-icon-delete",on:{click:function(t){return e.remove(s)}}})])],1)],1)]}))]:[t("li",{staticClass:"empty"},[e._v("暂无文件信息")])]],2)],1)},i=[],a=(l("99af")
|