(function(e){function t(t){for(var i,a,r=t[0],s=t[1],c=t[2],d=0,h=[];d[Object(i["createVNode"])(v,{type:"index",fixed:e.fixed,width:"55"},null,8,["fixed"]),e.ck?(Object(i["openBlock"])(),Object(i["createBlock"])(v,{key:0,type:"selection",fixed:e.fixed,width:"55"},null,8,["fixed"])):Object(i["createCommentVNode"])("",!0),(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.filterColumns,(n,a)=>(Object(i["openBlock"])(),Object(i["createBlock"])(v,{"show-overflow-tooltip":"",prop:n.field,label:n.title,"min-width":n.width,formatter:e.formatter,fixed:n.fixed,key:n.field+a,align:n.align,sortable:!!n.sort&&"custom"},{default:Object(i["withCtx"])(a=>[n.render&&"function"==typeof n.render?(Object(i["openBlock"])(),Object(i["createBlock"])(C,{row:a.row,key:"rd-01",index:a.$index,column:n,render:n.render},null,8,["row","index","column","render"])):n.edit&&!n.readonly?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",l,[n.edit.keep||e.edit.rowIndex==a.$index?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{key:0,onClick:t[0]||(t[0]=Object(i["withModifiers"])(()=>{},["stop"])),class:"e-item"},[Object(i["createElementVNode"])("div",null,[-1!=["date","datetime"].indexOf(n.edit.type)?(Object(i["openBlock"])(),Object(i["createBlock"])(B,{key:0,clearable:"",size:"small",style:{width:"100%"},modelValue:a.row[n.field],"onUpdate:modelValue":e=>a.row[n.field]=e,onChange:n.onChange,type:n.edit.type,placeholder:n.placeholder?n.placeholder:"请选择"+n.title,disabledDate:t=>e.getDateOptions(t,n),"value-format":e.getDateFormat(n)},null,8,["modelValue","onUpdate:modelValue","onChange","type","placeholder","disabledDate","value-format"])):"switch"==n.edit.type?(Object(i["openBlock"])(),Object(i["createBlock"])(D,{key:1,modelValue:a.row[n.field],"onUpdate:modelValue":e=>a.row[n.field]=e,"active-color":"#0f84ff","inactive-color":"rgb(194 194 194)",onChange:t=>{e.switchChange(t,a.row,n)},"active-value":"boolean"==typeof a.row[n.field]||1,"inactive-value":"boolean"!=typeof a.row[n.field]&&0},null,8,["modelValue","onUpdate:modelValue","onChange","active-value","inactive-value"])):-1!=["select","selectList"].indexOf(n.edit.type)?(Object(i["openBlock"])(),Object(i["createBlock"])(F,{key:2,size:"small",style:{width:"100%"},modelValue:a.row[n.field],"onUpdate:modelValue":e=>a.row[n.field]=e,filterable:!!(n.filter||n.bind.data.length>10),multiple:"select"!=n.edit.type,placeholder:n.placeholder?n.placeholder:"请选择"+n.title,autocomplete:n.autocomplete,onChange:e=>n.onChange&&n.onChange(a.row,n),clearable:""},{default:Object(i["withCtx"])(()=>[(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(n.bind.data,e=>(Object(i["openBlock"])(),Object(i["createBlock"])(E,{key:e.key,label:e.value,value:e.key},{default:Object(i["withCtx"])(()=>[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.value),1)]),_:2},1032,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","filterable","multiple","placeholder","autocomplete","onChange"])):(Object(i["openBlock"])(),Object(i["createBlock"])(S,{key:3,onChange:t=>e.inputKeyPress(a.row,n,t),onInput:t=>e.inputKeyPress(a.row,n,t),onKeyup:Object(i["withKeys"])(t=>e.inputKeyPress(a.row,n,t),["enter"]),size:"small",modelValue:a.row[n.field],"onUpdate:modelValue":e=>a.row[n.field]=e,placeholder:"请输入"+n.title},null,8,["onChange","onInput","onKeyup","modelValue","onUpdate:modelValue","placeholder"]))]),n.extra&&e.edit.rowIndex==a.$index?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",r,[Object(i["createElementVNode"])("a",{style:Object(i["normalizeStyle"])(n.extra.style),onClick:t=>e.extraClick(a.row,n)},[n.extra.icon?(Object(i["openBlock"])(),Object(i["createElementBlock"])("i",{key:0,clss:[n.extra.icon]},null,8,c)):Object(i["createCommentVNode"])("",!0),Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(n.extra.text),1)],12,s)])):Object(i["createCommentVNode"])("",!0)])):(Object(i["openBlock"])(),Object(i["createElementBlock"])(i["Fragment"],{key:1},[n.formatter?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{key:0,innerHTML:n.formatter(a.row,n)},null,8,d)):(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",h,Object(i["toDisplayString"])(e.formatter(a.row,n,!0)),1))],64))])):(Object(i["openBlock"])(),Object(i["createElementBlock"])(i["Fragment"],{key:2},[n.link?(Object(i["openBlock"])(),Object(i["createElementBlock"])("a",{key:0,href:"javascript:void(0)",onClick:t=>e.link(a.row,n,t),textContent:Object(i["toDisplayString"])(a.row[n.field])},null,8,u)):"img"==n.type?(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],{key:1},Object(i["renderList"])(e.getFilePath(a.row[n.field],n),(t,o)=>(Object(i["openBlock"])(),Object(i["createElementBlock"])("img",{key:o,onerror:e.defaultImg,onClick:i=>e.viewImg(a.row,n,t.path,i),class:"table-img",src:t.path},null,8,m))),128)):"file"==n.type||"excel"==n.type?(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],{key:2},Object(i["renderList"])(e.getFilePath(a.row[n.field],n),(t,n)=>(Object(i["openBlock"])(),Object(i["createElementBlock"])("a",{style:{"margin-right":"8px"},class:"t-file",key:n,onClick:n=>e.dowloadFile(t)},Object(i["toDisplayString"])(t.name),9,p))),128)):"date"==n.type?(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",f,Object(i["toDisplayString"])(e.formatterDate(a.row,n)),1)):n.formatter?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{key:4,onClick:t=>e.formatterClick(a.row,n,t),innerHTML:n.formatter(a.row,n)},null,8,b)):n.bind&&n.normal?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{key:5,onClick:t=>e.formatterClick(a.row,n,t),style:Object(i["normalizeStyle"])(n.getStyle&&n.getStyle(a.row,n))},Object(i["toDisplayString"])(e.formatter(a.row,n,!0)),13,y)):n.click?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{key:6,onClick:t=>e.formatterClick(a.row,n)},Object(i["toDisplayString"])(a.row[n.field]),9,g)):n.bind?(Object(i["openBlock"])(),Object(i["createBlock"])(V,{key:7,size:"small",class:Object(i["normalizeClass"])([e.isEmptyTag(a.row,n)]),type:e.getColor(a.row,n)},{default:Object(i["withCtx"])(()=>[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.formatter(a.row,n,!0)),1)]),_:2},1032,["class","type"])):(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",k,Object(i["toDisplayString"])(e.formatter(a.row,n,!0)),1))],64))]),_:2},1032,["prop","label","min-width","formatter","fixed","align","sortable"]))),128))]),_:1},8,["show-summary","summary-method","row-key","load","onSelect","onSelectAll","onSelectionChange","onRowDblclick","onRowClick","onHeaderClick","onSortChange","height","max-height","data","row-class-name","cell-style"])),e.paginationHide?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",O,[Object(i["createVNode"])(N,{key:"pagination-02",onSizeChange:e.handleSizeChange,onCurrentChange:e.handleCurrentChange,"current-page":e.paginations.page,"page-sizes":e.paginations.sizes,"page-size":e.paginations.size,layout:"total, sizes, prev, pager, next, jumper",total:e.paginations.total},null,8,["onSizeChange","onCurrentChange","current-page","page-sizes","page-size","total"])]))],2)}n("14d9");var j,x={name:"TableExpand",functional:!0,props:{render:Function,row:{},column:{},index:{type:Number,default:0}},render:({render:e,row:t,column:n,index:a})=>e(i["h"],{row:t,column:n,index:a})};let v;var C=Object(i["defineComponent"])({watch:{"tableData.length":{handler(e,t){this.watchRowSelectChange(e,t)}},"rowData.length":{handler(e,t){this.watchRowSelectChange(e,t)}}},components:{"table-render":x},props:{rowKey:{typeof:String,default:void 0},loadTreeChildren:{type:Function,default:(e,t,n)=>n([])},textInline:{type:Boolean,default:!0},tableData:{type:Array,default:()=>[]},columns:{type:Array,default:[]},height:{type:Number,default:0},maxHeight:{type:Number,default:0},linkView:{type:Function,default:function(){return 1}},pagination:{type:Object,default:function(){return{total:0,size:30,sortName:""}}},url:{type:String,default:""},paginationHide:{type:Boolean,default:!0},color:{type:Boolean,default:!0},index:{type:Boolean,default:!1},allowEmpty:{type:Boolean,default:!0},defaultLoadPage:{type:Boolean,default:!0},loadKey:{type:Boolean,default:!0},single:{type:Boolean,default:!1},doubleEdit:{type:Boolean,default:!0},beginEdit:{type:Function,default:function(e,t,n){return!0}},endEditBefore:{type:Function,default:function(e,t,n){return!0}},endEditAfter:{type:Function,default:function(e,t,n){return!0}},ck:{type:Boolean,default:!0},columnIndex:{type:Boolean,default:!0}},data(){return{fixed:!1,clickEdit:!0,randomTableKey:1,visiblyColumns:[],key:"",realHeight:0,realMaxHeight:0,enableEdit:!1,empty:this.allowEmpty?"":"--",defaultImg:'this.src="'+n("5943")+'"',loading:!1,footer:{},total:0,formatConfig:{},colors:["","warning","success","green","info"],rule:{phone:/^[1][3,4,5,6,7,8,9][0-9]{9}$/,decimal:/(^[\-0-9][0-9]*(.[0-9]+)?)$/,number:/(^[\-0-9][0-9]*([0-9]+)?)$/},columnNames:[],rowData:[],paginations:{sort:"",order:"desc",Foots:"",total:0,sizes:[30,60,100,120],size:30,Wheres:[],page:1,rows:30},errorFiled:"",edit:{columnIndex:-1,rowIndex:-1},editStatus:{},summary:!1,summaryData:[],summaryIndex:{},remoteColumns:[],cellStyleColumns:{},fxRight:!1,selectRows:[]}},created(){this.realHeight=this.getHeight(),this.realMaxHeight=this.getMaxHeight(),this.fxRight=this.columns.some(e=>"right"==e.fixed),(this.fxRight||this.columns.some(e=>e.fixed))&&(this.fixed=!0);let e=[],t=[];this.summaryData.push("合计"),this.columnIndex&&this.summaryData.push(" "),this.columns.forEach((n,i)=>{n.cellStyle&&(this.cellStyleColumns[n.field]=n.cellStyle),n.hidden||(this.summaryData.push(""),this.summaryIndex[n.field]=this.summaryData.length-1),n.summary&&!this.summary&&(this.summary=!0),!n.bind||!n.bind.key||n.bind.data&&0!=n.bind.data.length||(n.bind.data||(n.bind.data=[]),n.bind.remote?this.remoteColumns.push(n):this.loadKey&&(e.push(n.bind.key),n.bind.valueTyoe=n.type,t.push(n.bind)))}),e.length>0&&this.http.post("/api/Sys_Dictionary/GetVueDictionary",e).then(e=>{e.forEach(e=>{t.forEach(t=>{"int"!=t.valueTyoe&&"sbyte"!=t.valueTyoe||e.data.forEach(e=>{isNaN(e.key)||(e.key=~~e.key)}),t.key==e.dicNo&&t.data.push(...e.data)})})}),this.paginations.sort=this.pagination.sortName,Object.assign(this.paginations,this.pagination),this.pagination.size&&(this.paginations.rows=this.pagination.size),this.enableEdit=this.columns.some(e=>e.hasOwnProperty("edit"));let n=this.columns.find(e=>e.isKey);n&&(this.key=n.field),j=this,this.defaultLoadPage&&this.load()},computed:{filterColumns(){return this.columns.filter((e,t)=>(e.field||(e.field=e.title+t),!e.hidden))}},methods:{watchRowSelectChange(e,t){ee.field==(n&&n.property||t.property));return void(!i||i.edit&&!i.readonly||this.rowEndEdit(e,n)&&(this.edit.rowIndex=-1))}this.rowEndEdit(e,n&&n.property?n:t)&&(this.edit.rowIndex=-1)}this.rowBeginEdit(e,t)}},dowloadFile(e){this.base.dowloadFile(e.path,e.name,{Authorization:this.$store.getters.getToken()},this.http.ipAddress)},getFilePath(e,t){if(!e)return[];if(t.formatter)return t.formatter(e);let n=e.replace(/\\/g,"/").split(","),i=[];for(let a=0;a0&&i.push({name:t[t.length-1],path:this.base.isUrl(e)?e:this.http.ipAddress+e})}}return i},reset(){this.tableData&&this.tableData.length>0&&this.tableData.splice(0),this.rowData&&this.rowData.length>0&&this.rowData.splice(0),this.paginationHide||(this.paginations.page=1,this.paginations.wheres&&this.paginations.wheres.length>0&&this.paginations.wheres.splice(0)),this.errorFiled="",this.edit.columnIndex=-1,this.edit.rowIndex=-1},getHeight(){return this.height||this.maxHeight?this.maxHeight?null:this.height:null},getMaxHeight(){return(this.height||this.maxHeight)&&this.maxHeight?this.maxHeight:null},getSelectedOptions(e){return e.bind&&e.bind.data&&e.bind.data.length>0?e.bind.data:[]},formatterClick(e,t,n){t.click&&t.click(e,t,n),n.stopPropagation()},initIndex({row:e,rowIndex:t}){this.index&&(e.elementIndex=t)},toggleEdit(e){},setEditStatus(e){},beginWithButtonEdit(e){this.rowBeginEdit(e.row,this.columns[e.$index])},rowBeginEdit(e,t){if(-1!=this.edit.rowIndex)return;let n=this.columns.find(e=>e.field==t.property);if(n){if(n.readonly)return;if(!n.edit||n.edit.keep&&"switch"==n.edit.type)return}if(this.enableEdit&&(v="",this.beginEdit(e,t,e.elementIndex)&&e.hasOwnProperty("elementIndex"))){if(this.edit.rowIndex==e.elementIndex)return;this.edit.rowIndex=e.elementIndex}},rowEndEdit(e,t,n){if(this.clickEdit&&n)return!0;if(!this.enableEdit){if(!this.errorFiled){if(-1!=this.edit.rowIndex&&!this.endEditAfter(e,t,this.edit.rowIndex))return!1;this.edit.rowIndex=-1}return!0}if(!this.doubleEdit&&n)return!0;if(!this.endEditBefore(e,t,this.edit.rowIndex))return!1;if(-1!=this.edit.rowIndex){let e=(this.url?this.rowData:this.tableData)[this.edit.rowIndex];for(let t=0;te.edit.max)||(v="不能大于"+e.edit.max,!1)}if(n&&("text"==i||"string"==i)){if(void 0!=e.edit.min&&"number"===typeof e.edit.min&&n.lengthe.edit.max)return v="最多"+e.edit.max+"个字符",!1}return!0},delRow(){let e=this.getSelected();if(0==e.length)return this.$Message.error("请选择要删除的行!");let t=this.url?this.rowData:this.tableData,n=this.getSelectedIndex();if(0==n.length)return this.$Message.error("删除操作必须设置VolTable的属性index='true'");if(0==n.length);else for(let i=t.length-1;i>=0;i--)-1!=n.indexOf(i)&&t.splice(i,1);return this.edit.rowIndex=-1,e},addRow(e){e||(e={}),this.columns.forEach(t=>{e.hasOwnProperty(t.field)||(t.edit&&"switch"==t.edit.type?e[t.field]="bool"!=t.type&&0:e.hidden||(e[t.field]=void 0))}),this.url?this.rowData.push(e):this.tableData.push(e)},viewImg(e,t,n,i){i.stopPropagation(),this.base.previewImg(n)},link(e,t,n){n.stopPropagation(),this.$props.linkView(e,t)},getSelected(){return this.selectRows},getSelectedIndex(){if(!this.index)return[];let e=this.selectRows.map(e=>e.elementIndex);return e||[]},GetTableDictionary(e){if(0==this.remoteColumns.length||!e||0==e.length)return;let t={};for(let n=0;n{-1==o.indexOf(e[i.field])&&o.push(e[i.field])}),o.length>0&&(t[a]=o)}0!=t.length&&this.http.post("/api/Sys_Dictionary/GetTableDictionary",t).then(e=>{e.forEach(e=>{this.remoteColumns.forEach(t=>{t.bind.key==e.key&&(t.bind.data=Object.assign([],t.bind.data,e.data))})})})},load(e,t){if(!this.url)return;t&&this.resetPage();let n={page:this.paginations.page,rows:this.paginations.rows,sort:this.paginations.sort,order:this.paginations.order,wheres:[]},i=!0;e&&(n=Object.assign(n,e)),this.$emit("loadBefore",n,e=>{i=e}),i&&(n.wheres&&n.wheres instanceof Array&&(n.wheres=JSON.stringify(n.wheres)),this.loading=!0,this.http.post(this.url,n).then(e=>{this.rowKey&&(this.randomTableKey++,this.rowData.splice(0)),this.loading=!1,this.$emit("loadAfter",e.rows||[],e=>{i=e},e),i&&(this.GetTableDictionary(e.rows),this.rowData=e.rows||[],this.paginations.total=e.total,this.getSummaries(e))},e=>{this.loading=!1}))},getSummaries(e){this.summary&&e.summary&&(this.summaryData.splice(0),this.columnIndex&&this.summaryData.push(""),this.ck&&this.summaryData.push(""),this.columns.forEach(t=>{t.hidden||(e.summary.hasOwnProperty(t.field)?this.summaryData.push(e.summary[t.field]):this.summaryData.push(""))}),this.summaryData.length>0&&""==this.summaryData[0]&&(this.summaryData[0]="合计"))},getInputChangeSummaries(){},handleSizeChange(e){this.paginations.size=e,this.paginations.rows=e,this.load()},handleCurrentChange(e){this.paginations.page=e,this.load()},sortChange(e){this.paginations.sort=e.prop,this.paginations.order="ascending"==e.order?"asc":"desc",this.load()},resetPage(){this.paginations.page=1},selectionChange(e){if(this.selectRows=e,this.single&&(1==e.length&&this.$emit("rowChange",e[0]),e.length>1)){let t=e[e.length-1];this.$refs.table.toggleRowSelection(e[0]),this.selectRows=[t]}},getColor(e,t){let n=e[t.field];if(t.getColor&&"function"===typeof t.getColor){let n=t.getColor(e,t);if(n)return n}if(!n&&"0"!=n)return"";if(!this.formatConfig[t.field])return this.formatConfig[t.field]=[n],this.colors[0];let i=this.formatConfig[t.field].indexOf(n);return-1!=i?this.colors[i]:this.formatConfig[t.field].length>5?"":(-1==i&&(this.formatConfig[t.field].push(n),i=this.formatConfig[t.field].length-1),this.colors[i])},formatterDate(e,t){return(e[t.field]||"").substr(0,10)},formatter(e,t,n){if(!n)return e[t.property];let i=e[t.field];if(t.edit&&"switch"==t.edit.type)return i?"是":"否";if(!t.bind||!t.bind.data)return e[t.field];if(!i&&0!=i)return i;if(("selectList"==t.bind.type||"checkbox"==t.bind.type)&&"string"===typeof i&&-1!=i.indexOf(","))return this.getSelectFormatter(t,i);let a=t.bind.data.filter(e=>""!==e.key&&void 0!==e.key&&e.key+""===i+"");return a&&a.length>0&&(i=a[0].value),i},getSelectFormatter(e,t){let n=t.split(",");for(let i=0;i{""!==e.key&&void 0!==e.key&&e.key+""==n[i]+""&&(n[i]=e.value)});return n.join(",")},onChange(e,t,n,i){let a=e.row;i.onChange&&!i.onChange(a,t,n)||this.getInputSummaries(e,t,n,i)},getInputSummaries(e,t,n,i){if(!i.summary)return;let a=0,o=0;(this.url?this.rowData:this.tableData).forEach((e,t)=>{e.hasOwnProperty(i.field)&&!isNaN(e[i.field])&&(o=t,a+=1*e[i.field])}),this.summaryData[this.summaryIndex[i.field]]=a},getSummaryData({columns:e,data:t}){return this.summaryData},getCellStyle(e){if(e.column.property)return this.cellStyleColumns[e.column.property]&&this.cellStyleColumns[e.column.property](e.row,e.rowIndex,e.columnIndex)},compareDate(e,t){return!t||e.valueOf()<("number"==typeof t?t:new Date(t).valueOf())},getDateOptions(e,t){return!(!t.min&&!t.max||!e)&&(t.min&&-1==t.min.indexOf(" ")&&(t.min=t.min+" 00:00:000"),this.compareDate(e,t.min)||!this.compareDate(e,t.max))},getDateFormat(e){return"date"==e.edit.type?"YYYY-MM-DD":"YYYY-MM-DD HH:mm:ss"},userSelect(e,t){this.selectRows=e,this.single||this.$emit("rowChange",{row:t,selection:e})},isEmptyTag(e,t){return e[t.field]||"0"==e[t.field]?"":"empty-tag"}}}),B=(n("fb43"),n("6c80"),n("d959")),D=n.n(B);const E=D()(C,[["render",w],["__scopeId","data-v-14fae056"]]);t["a"]=E},1356:function(e,t,n){"use strict";n("62b0")},"3cf0":function(e,t,n){"use strict";n("be77")},"3d3c":function(e,t,n){},4360:function(e,t,n){"use strict";n("14d9");var i=n("5502");const a={USER:"user"};function o(e){if(e.userInfo)return e.userInfo;let t=localStorage.getItem(a.USER);return t&&(e.userInfo=JSON.parse(t)),e.userInfo}t["a"]=Object(i["a"])({state:{data:{},permission:[],isLoading:!1,userInfo:null},mutations:{setPermission(e,t){t&&"object"==typeof t&&(t instanceof Array?e.permission.push(...t):e.permission=t)},setUserInfo(e,t){e.userInfo=t,localStorage.setItem(a.USER,JSON.stringify(t))},clearUserInfo(e){e.permission=[],e.userInfo=null,localStorage.removeItem(a.USER)},test(e){return 113344},updateLoadingState(e,t){e.isLoading=t}},getters:{getPermission:e=>t=>t?e.permission.find(e=>e.path==t):e.permission,getUserInfo:e=>()=>(o(e),e.userInfo),getUserName:e=>()=>(o(e),e.userInfo?e.userInfo.userName:"未获取到登陆信息"),getToken:e=>()=>(o(e),e.userInfo?"Bearer "+e.userInfo.token:""),isLogin:e=>()=>!!o(e),isLoading:e=>()=>e.isLoading,data:e=>()=>e.data,getData:e=>()=>e.data},actions:{setPermission(e,t){e.commit("setPermission",t)},toDo(e){return e.Store.m},onLoading(e,t){e.commit("updateLoadingState",t)}}})},"56d7":function(e,t,n){"use strict";n.r(t);var i=n("7a23");const a=Object(i["createElementVNode"])("div",{id:"nav"},null,-1);function o(e,t,n,o,l,r){const s=Object(i["resolveComponent"])("router-view"),c=Object(i["resolveComponent"])("el-config-provider");return Object(i["openBlock"])(),Object(i["createElementBlock"])(i["Fragment"],null,[a,Object(i["createVNode"])(c,{locale:l.locale},{default:Object(i["withCtx"])(()=>[Object(i["createVNode"])(s)]),_:1},8,["locale"])],64)}var l=n("b6c4"),r=n("3ef0"),s=n.n(r),c={name:"vol_app",components:{[l["a"].name]:l["a"]},data(){return{locale:s.a}}},d=(n("1356"),n("d959")),h=n.n(d);const u=h()(c,[["render",o]]);var m=u,p=n("6605");let f=[{path:"/Sys_Log",name:"sys_Log",component:()=>n.e("chunk-2d21061e").then(n.bind(null,"b83e"))},{path:"/Sys_User",name:"Sys_User",component:()=>n.e("chunk-2d0db7f7").then(n.bind(null,"6fb3"))},{path:"/permission",name:"permission",component:()=>n.e("chunk-c77e3786").then(n.bind(null,"a81b"))},{path:"/Sys_Dictionary",name:"Sys_Dictionary",component:()=>n.e("chunk-2d222d3a").then(n.bind(null,"cfef"))},{path:"/Sys_Role",name:"Sys_Role",component:()=>n.e("chunk-2d0a38d5").then(n.bind(null,"0351"))},{path:"/Sys_Role1",name:"Sys_Role1",component:()=>n.e("chunk-2d21d7c9").then(n.bind(null,"d205"))},{path:"/PDAPermission",name:"Sys_RoleAuth",component:()=>n.e("chunk-677e913d").then(n.bind(null,"2f2e"))},{path:"/Sys_DictionaryList",name:"Sys_DictionaryList",component:()=>n.e("chunk-2d23811f").then(n.bind(null,"fe8b"))},{path:"/Dt_plcinfohead",name:"Dt_plcinfohead",component:()=>n.e("chunk-2d21681e").then(n.bind(null,"c380"))},{path:"/Dt_plcinfodetail",name:"Dt_plcinfodetail",component:()=>n.e("chunk-2d224cf0").then(n.bind(null,"e25b"))},{path:"/Dt_equipmentinfo",name:"Dt_equipmentinfo",component:()=>n.e("chunk-2d0e5987").then(n.bind(null,"94c9"))},{path:"/Dt_stationmanager",name:"Dt_stationmanager",component:()=>n.e("chunk-2d22c6c3").then(n.bind(null,"f2bc"))},{path:"/Dt_rgvtaskinfo",name:"Dt_rgvtaskinfo",component:()=>n.e("chunk-2d0df20a").then(n.bind(null,"891d"))},{path:"/Dt_rgvtaskinfo_hty",name:"Dt_rgvtaskinfo_hty",component:()=>n.e("chunk-2d219f9b").then(n.bind(null,"ba17"))},{path:"/Dt_stacktaskinfo",name:"Dt_stacktaskinfo",component:()=>n.e("chunk-2d0ae8fd").then(n.bind(null,"0b1f"))},{path:"/Dt_stacktaskinfo_hty",name:"Dt_stacktaskinfo_hty",component:()=>n.e("chunk-2d207366").then(n.bind(null,"a023"))},{path:"/Dt_wcstaskinfo",name:"Dt_wcstaskinfo",component:()=>n.e("chunk-2d22c0e8").then(n.bind(null,"f239"))},{path:"/Dt_wcstaskinfo_hty",name:"Dt_wcstaskinfo_hty",component:()=>n.e("chunk-2d237cb1").then(n.bind(null,"fd41"))},{path:"/Dt_sccurrentstate",name:"Dt_sccurrentstate",component:()=>n.e("chunk-2d0cf39d").then(n.bind(null,"638b"))},{path:"/Dt_trackloginfo",name:"Dt_trackloginfo",component:()=>n.e("chunk-2d0b2727").then(n.bind(null,"23c3"))},{path:"/Dt_dispatchmanagement",name:"Dt_dispatchmanagement",component:()=>n.e("chunk-2d0d7dcc").then(n.bind(null,"792f"))},{path:"/VV_Dispatch",name:"VV_Dispatch",component:()=>n.e("chunk-2d238502").then(n.bind(null,"ff9e"))},{path:"/TaskDispatch",name:"TaskDispatch",component:()=>n.e("chunk-2d0ccbc9").then(n.bind(null,"4ece"))},{path:"/Dt_labelingmachine",name:"Dt_labelingmachine",component:()=>n.e("chunk-2d0b5f36").then(n.bind(null,"1aa1"))},{path:"/Dt_agvtask",name:"Dt_agvtask",component:()=>n.e("chunk-2d0da935").then(n.bind(null,"6bd7"))},{path:"/Dt_agvtask_hty",name:"Dt_agvtask_hty",component:()=>n.e("chunk-2d225bf6").then(n.bind(null,"e65d"))},{path:"/Dt_CacheTask",name:"Dt_CacheTask",component:()=>n.e("chunk-2d216fc4").then(n.bind(null,"c595"))},{path:"/Bill_group_stock",name:"Bill_group_stock",component:()=>n.e("chunk-2d0e9b23").then(n.bind(null,"8f43"))},{path:"/Base_ware_location",name:"Base_ware_location",component:()=>n.e("chunk-4122ee3f").then(n.bind(null,"ef87"))},{path:"/Base_pda_location",name:"Base_pda_location",component:()=>n.e("chunk-7b9f8dfc").then(n.bind(null,"8132"))},{path:"/VV_ContainerInfo",name:"VV_ContainerInfo",component:()=>n.e("chunk-2d0dd7c1").then(n.bind(null,"821b"))},{path:"/Log",name:"Log",component:()=>n.e("chunk-5d383fb5").then(n.bind(null,"f2f9"))},{path:"/dt_materielinfo",name:"dt_materielinfo",component:()=>n.e("chunk-2d22d443").then(n.bind(null,"f784"))},{path:"/Base_routing_table",name:"Base_routing_table",component:()=>n.e("chunk-2d0c82d2").then(n.bind(null,"5485"))},{path:"/Bill_pda_groupdisk",name:"Bill_pda_groupdisk",component:()=>n.e("chunk-2d21f355").then(n.bind(null,"d99c"))},{path:"/dt_stationinfo",name:"dt_stationinfo",component:()=>n.e("chunk-2d0dd7d2").then(n.bind(null,"8235"))},{path:"/BufferRack",name:"BufferRack",component:()=>n.e("chunk-2d23774f").then(n.bind(null,"faca"))},{path:"/DevInfo",name:"DevInfo",component:()=>n.e("chunk-2d0d0b27").then(n.bind(null,"68a0"))},{path:"/InterfaceCallQuery",name:"InterfaceCallQuery",component:()=>n.e("chunk-2d2304b1").then(n.bind(null,"ec52"))}];var b=f,y=n("4360");let g=[{path:"/404",name:"404",component:()=>n.e("chunk-42df1cac").then(n.bind(null,"6707")),meta:{anonymous:!0}},{path:"/401",name:"401",component:()=>n.e("chunk-3ebc8954").then(n.bind(null,"bcc4"))},{path:"/coding",name:"coding",component:()=>n.e("chunk-8adae6ec").then(n.bind(null,"6611"))}];var k=g;let O=[{path:"/chart",name:"chart",component:()=>Promise.all([n.e("chunk-2ecfd031"),n.e("chunk-27ca016b")]).then(n.bind(null,"44c3"))},{path:"/formChart",name:"formChart",component:()=>Promise.all([n.e("chunk-2ecfd031"),n.e("chunk-88f8521a")]).then(n.bind(null,"2ac0"))},{path:"/flex",name:"flex",component:()=>n.e("chunk-262367e1").then(n.bind(null,"ea54"))}];var w=O;const j=[{path:"/",name:"Index",component:()=>n.e("chunk-fbee58cc").then(n.bind(null,"d504")),redirect:"/home",children:[...b,...k,...w,{path:"/home",name:"home",component:()=>n.e("chunk-41bc0450").then(n.bind(null,"bb51"))},{path:"/UserInfo",name:"UserInfo",component:()=>n.e("chunk-b55a5e20").then(n.bind(null,"8f77"))},{path:"/sysMenu",name:"sysMenu",component:()=>n.e("chunk-2f3a4bd0").then(n.bind(null,"4c04"))},{path:"/coder",name:"coder",component:()=>n.e("chunk-d7c0998e").then(n.bind(null,"c016"))},{path:"/formDraggable",name:"formDraggable",component:()=>Promise.all([n.e("chunk-c74d5f32"),n.e("chunk-63b78ce2")]).then(n.bind(null,"f9ee"))},{path:"/formSubmit",name:"formSubmit",component:()=>n.e("chunk-6ada0270").then(n.bind(null,"7533")),meta:{keepAlive:!1}},{path:"/formCollectionResultTree",name:"formCollectionResultTree",component:()=>n.e("chunk-3c480350").then(n.bind(null,"1e7f")),meta:{keepAlive:!1}}]},{path:"/login",name:"login",component:()=>n.e("chunk-6915bc38").then(n.bind(null,"a55b"))},{path:"/bigdata",name:"bigdata",component:()=>Promise.all([n.e("chunk-2ecfd031"),n.e("chunk-5e53817c")]).then(n.bind(null,"3142")),meta:{keepAlive:!1}}],x=Object(p["a"])({history:Object(p["b"])(),routes:j});x.beforeEach((e,t,n)=>0==e.matched.length?n({path:"/404"}):(y["a"].dispatch("onLoading",!0),e.hasOwnProperty("meta")&&e.meta.anonymous||y["a"].getters.isLogin()||"/login"==e.path?n():void n({path:"/login",query:{redirect:Math.random()}}))),x.afterEach((e,t)=>{y["a"].dispatch("onLoading",!1)}),x.onError(e=>{try{console.log(e.message),localStorage.setItem("route_error",e.message)}catch(t){}window.location.href="/"});var v=x,C=n("c3a1");n("88a7"),n("271a"),n("5494"),n("14d9");let B={isPhone(e){return/^[1][3,4,5,6,7,8,9][0-9]{9}$/.test(e)},isDecimal(e){return/(^[\-0-9][0-9]*(.[0-9]+)?)$/.test(e)},isNumber(e){return/(^[\-0-9][0-9]*([0-9]+)?)$/.test(e)},isMail(e){return/^(\w-*\.*)+@(\w-?)+(\.\w{2,})+$/.test(e)},isUrl(e){return this.checkUrl(e)},checkUrl(e){var t="^((https|http|ftp)://)?(([\\w_!~*'()\\.&=+$%-]+: )?[\\w_!~*'()\\.&=+$%-]+@)?(([0-9]{1,3}\\.){3}[0-9]{1,3}|(localhost)|([\\w_!~*'()-]+\\.)*\\w+\\.[a-zA-Z]{1,6})(:[0-9]{1,5})?((/?)|(/[\\w_!~*'()\\.;?:@&=+$,%#-]+)+/?)$",n=new RegExp(t,"i");return!!n.test(encodeURI(e))},matchUrlIp(e,t){return!(!e||!t)&&e.indexOf(t.replace("https://","").replace("http://",""))>=0},getImgSrc(e,t){return this.isUrl(e)?e:t?t+e:e},previewImg(e,t){e&&!this.isUrl(e)&&t&&("/"==e.substr(0,1)&&"/"==t.substr(t.length-1,1)&&(e=e.substr(1)),e=t+e);let n="vol-preview",i=document.getElementById(n);if(!i){i=document.createElement("div"),i.setAttribute("id","vol-preview");let t=document.createElement("div");t.style.position="absolute",t.style.width="100%",t.style.height="100%",t.style.background="black",t.style.opacity="0.6",i.appendChild(t),i.style.position="fixed",i.style.width="100%",i.style.height="100%",i.style.top=0,i.style["z-index"]=9999999;let n=document.createElement("img");return n.setAttribute("class","vol-preview-img"),n.style.position="absolute",n.style.top="50%",n.style.left="50%",n.style["max-width"]="90%",n.style["max-height"]="90%",n.style.transform="translate(-50%,-50%)",n.setAttribute("src",e),i.appendChild(n),i.addEventListener("click",(function(){this.style.display="none"})),void document.body.appendChild(i)}let a=document.body.appendChild(i).querySelector(".vol-preview-img");a.setAttribute("src",e),i.style.display="block"},dowloadFile(e,t,n,i){if(!e)return alert("此文件没有url不能下载");this.isUrl(e)||(e=i+e),window.open(e)},downloadImg(e){if(e.url&&e.callback&&"function"===typeof e.callback){if(this.isUrl(e.url)&&!this.matchUrlIp(e.url,e.backGroundUrl))return e.url;if(!this.isUrl(e.url)){if(!this.isUrl(e.backGroundUrl+e.url))return;e.url=e.backGroundUrl+e.url}var t=new XMLHttpRequest;if(t.open("get",e.url,!0),t.responseType="blob",t.setRequestHeader("Content-Type","application/json"),e.header&&"object"===typeof e.header)for(const n in e.header)t.setRequestHeader(n,e.header[n]);t.onload=function(){if(200==this.status){var e=this.response;callback(window.URL.createObjectURL(e))}},t.send()}},convertTree(e,t){var n=[],i=[];e.forEach(a=>{a.hidden||void 0===a.id||a.id===a.parentId||e.some(e=>a.parentId==e.id)?t&&t(a,e,!0,n):(a.isRoot=!0,t&&t(a,e,!0,n),i.push(a),E(a.id,a,e,t,n))});var a=e.filter(e=>-1==n.indexOf(e.id)&&!e.hidden);return i.push(...a),i},getTreeAllParent(e,t){var n=[];if(!(t instanceof Array))return n;t.forEach(e=>{(e.id===e.parentId||t.some(t=>t.parentId===e.id&&t.id===e.parentId))&&(e.parentId=0)});var i=t.find(t=>t.id===e);if(!i)return[];n.push(i);var a=[i.parentId];for(let l=0;le.id===a[l]&&e.id!==e.parentId);if(!o)return n;a.push(o.parentId),n.unshift(o)}return n}};var D=B;function E(e,t,n,i,a){-1==a.indexOf(e)&&a.push(e),n.forEach(o=>{o.hidden||o.parentId!=e||(t.children||(t.children=[]),i&&i(o,t,!1),t.children.push(o),E(o.id,o,n,i,a))})}var F=n("c1fb");n("a471");let S=[{name:"查 询",value:"Search",icon:"el-icon-search",class:"",type:"primary",onClick:function(){this.search()}},{name:"新 建",icon:"el-icon-plus",value:"Add",class:"",type:"success",onClick:function(){this.add()}},{name:"编 辑",icon:"el-icon-edit",value:"Update",class:"",type:"primary",onClick:function(){this.edit()}},{name:"删 除",icon:"el-icon-delete",class:"",value:"Delete",type:"danger",onClick:function(){this.del()}},{name:"审 核",icon:"el-icon-check",class:"",value:"Audit",plain:!0,type:"primary",onClick:function(){this.audit()}},{name:"导 入",icon:"el-icon-top",class:"",type:"success",plain:!0,value:"Import",onClick:function(){this.import()}},{name:"导 出",icon:"el-icon-bottom",type:"success",plain:!0,value:"Export",onClick:function(){this.export()}},{name:"手动取消",icon:"el-icon-edit",class:"",type:"primary",value:"CancelManually",onClick:function(){}},{name:"手动取消",icon:"el-icon-edit",class:"",type:"primary",value:"CacheManually",onClick:function(){}},{name:"修改货位状态",icon:"el-icon-edit",class:"",type:"primary",value:"ModifyLocationStatus",onClick:function(){}},{name:"删除库存信息",icon:"el-icon-edit",class:"",type:"primary",value:"DelStock",onClick:function(){}}];var V=S;let A={getMenu(){return F["a"].get("/api/getTreeMenu")},getButtons(e,t,n,i){n&&(n="/"+n);let a=y["a"].getters.getPermission(n||e);if(!a&&(a=y["a"].getters.getPermission(e.substring(1)),!a&&(a=y["a"].getters.getPermission("/"+i),!a)))return void N();let o=a.permission,l=V.filter(e=>!e.value||-1!=o.indexOf(e.value));return t&&t instanceof Array&&l.push(...t),l},to401(){N()}};function N(){const e=Object(p["c"])();e.push({path:"/401"})}var I=A;const _=e=>(Object(i["pushScopeId"])("data-v-b3f39a56"),e=e(),Object(i["popScopeId"])(),e),T={class:"layout-container"},P=["href"],R=_(()=>Object(i["createElementVNode"])("i",{class:"el-icon-check"},null,-1)),U=_(()=>Object(i["createElementVNode"])("i",{class:"el-icon-close"},null,-1)),L={class:"view-container"},$={class:"grid-search"},K={key:0,class:"form-closex"},z=_(()=>Object(i["createElementVNode"])("i",{class:"el-icon-search"},null,-1)),M=_(()=>Object(i["createElementVNode"])("i",{class:"el-icon-refresh-right"},null,-1)),H=_(()=>Object(i["createElementVNode"])("i",{class:"el-icon-switch-button"},null,-1)),q={key:0,class:"fs-line"},W={class:"view-header"},X={class:"desc-text"},Y=_(()=>Object(i["createElementVNode"])("i",{class:"el-icon-s-grid"},null,-1)),G={class:"notice"},J=["title"],Q={class:"search-line"},Z={class:"btn-group"},ee=_(()=>Object(i["createElementVNode"])("i",{class:"el-icon-arrow-down el-icon--right"},null,-1)),te={class:"box-com"},ne={class:"item form-item"},ie={key:0,class:"grid-detail table-item item"},ae={class:"toolbar"},oe={class:"title form-text"},le=_(()=>Object(i["createElementVNode"])("i",{class:"el-icon-menu"},null,-1)),re={class:"btns"},se=_(()=>Object(i["createElementVNode"])("i",{class:"el-icon-close"},"关闭",-1)),ce={class:"grid-body"},de={class:"grid-container"};function he(e,t,n,a,o,l){const r=Object(i["resolveComponent"])("Audit"),s=Object(i["resolveComponent"])("el-button"),c=Object(i["resolveComponent"])("vol-box"),d=Object(i["resolveComponent"])("UploadExcel"),h=Object(i["resolveComponent"])("vol-form"),u=Object(i["resolveComponent"])("QuickSearch"),m=Object(i["resolveComponent"])("el-dropdown-item"),p=Object(i["resolveComponent"])("el-dropdown-menu"),f=Object(i["resolveComponent"])("el-dropdown"),b=Object(i["resolveComponent"])("vol-table");return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",T,[Object(i["createElementVNode"])("a",{href:e.exportHref,ref:"export"},null,8,P),Object(i["createVNode"])(c,{modelValue:e.auditParam.model,"onUpdate:modelValue":t[1]||(t[1]=t=>e.auditParam.model=t),height:300,width:550,lazy:!0,title:e.table.cnName+"--审核"},{content:Object(i["withCtx"])(()=>[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{auditParam:e.auditParam},null,8,["auditParam"])])]),footer:Object(i["withCtx"])(()=>[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(s,{type:"primary",size:"mini",onClick:e.saveAudit},{default:Object(i["withCtx"])(()=>[R,Object(i["createTextVNode"])("审核")]),_:1},8,["onClick"]),Object(i["createVNode"])(s,{size:"mini",onClick:t[0]||(t[0]=t=>e.auditParam.model=!1)},{default:Object(i["withCtx"])(()=>[U,Object(i["createTextVNode"])("关闭")]),_:1})])]),_:1},8,["modelValue","title"]),e.upload.url?(Object(i["openBlock"])(),Object(i["createBlock"])(c,{key:0,modelValue:e.upload.excel,"onUpdate:modelValue":t[2]||(t[2]=t=>e.upload.excel=t),height:350,width:600,lazy:!0,title:e.table.cnName+"--导入"},{default:Object(i["withCtx"])(()=>[Object(i["createVNode"])(d,{ref:"upload_excel",onImportExcelAfter:e.importAfter,importExcelBefore:e.importExcelBefore,url:e.upload.url,template:e.upload.template},null,8,["onImportExcelAfter","importExcelBefore","url","template"])]),_:1},8,["modelValue","title"])):Object(i["createCommentVNode"])("",!0),(Object(i["openBlock"])(),Object(i["createBlock"])(Object(i["resolveDynamicComponent"])(e.dynamicComponent.gridHeader),{ref:"gridHeader",onParentCall:e.parentCall},null,40,["onParentCall"])),Object(i["createElementVNode"])("div",L,[Object(i["createElementVNode"])("div",$,[Object(i["withDirectives"])(Object(i["createElementVNode"])("div",{class:Object(i["normalizeClass"])([e.fiexdSearchForm?"fiexd-search-box":"search-box"])},[Object(i["createVNode"])(h,{ref:"searchForm",style:{padding:"0 15px"},"label-width":e.labelWidth,formRules:e.searchFormOptions,formFields:e.searchFormFields},{footer:Object(i["withCtx"])(()=>[e.fiexdSearchForm?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",K,[Object(i["createVNode"])(s,{size:"mini",type:"primary",plain:"",onClick:e.search},{default:Object(i["withCtx"])(()=>[z,Object(i["createTextVNode"])("查询 ")]),_:1},8,["onClick"]),Object(i["createVNode"])(s,{size:"mini",type:"success",plain:"",onClick:e.resetSearch},{default:Object(i["withCtx"])(()=>[M,Object(i["createTextVNode"])("重置 ")]),_:1},8,["onClick"]),Object(i["createVNode"])(s,{size:"mini",plain:"",onClick:t[3]||(t[3]=t=>e.searchBoxShow=!e.searchBoxShow)},{default:Object(i["withCtx"])(()=>[H,Object(i["createTextVNode"])("关闭 ")]),_:1})]))]),_:1},8,["label-width","formRules","formFields"]),e.fiexdSearchForm?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",q)):Object(i["createCommentVNode"])("",!0)],2),[[i["vShow"],e.searchBoxShow]]),Object(i["createElementVNode"])("div",W,[Object(i["createElementVNode"])("div",X,[Y,Object(i["createElementVNode"])("span",null,Object(i["toDisplayString"])(e.table.cnName),1)]),Object(i["createElementVNode"])("div",G,[Object(i["createElementVNode"])("a",{class:"text",title:e.extend.text},Object(i["toDisplayString"])(e.extend.text),9,J)]),Object(i["createElementVNode"])("div",Q,[e.singleSearch?(Object(i["openBlock"])(),Object(i["createBlock"])(u,{key:0,singleSearch:e.singleSearch,searchFormFields:e.searchFormFields,tiggerPress:e.quickSearchKeyPress},null,8,["singleSearch","searchFormFields","tiggerPress"])):Object(i["createCommentVNode"])("",!0)]),Object(i["createElementVNode"])("div",Z,[(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.splitButtons,(t,n)=>Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createBlock"])(s,{key:n,type:t.type,size:"small",class:Object(i["normalizeClass"])(t.class),plain:t.plain,onClick:n=>e.onClick(t.onClick)},{default:Object(i["withCtx"])(()=>[Object(i["createElementVNode"])("i",{class:Object(i["normalizeClass"])(t.icon)},null,2),Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(t.name),1)]),_:2},1032,["type","class","plain","onClick"])),[[i["vShow"],!t.hidden]])),128)),e.buttons.length>e.maxBtnLength?(Object(i["openBlock"])(),Object(i["createBlock"])(f,{key:0,size:"small",onClick:e.changeDropdown},{dropdown:Object(i["withCtx"])(()=>[Object(i["createVNode"])(p,null,{default:Object(i["withCtx"])(()=>[(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.buttons.slice(e.maxBtnLength,e.buttons.length),(t,n)=>Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createBlock"])(m,{onClick:n=>e.changeDropdown(t.name),name:t.name,icon:t.icon,key:n},{default:Object(i["withCtx"])(()=>[Object(i["createTextVNode"])(Object(i["toDisplayString"])(t.name),1)]),_:2},1032,["onClick","name","icon"])),[[i["vShow"],!t.hidden]])),128))]),_:1})]),default:Object(i["withCtx"])(()=>[Object(i["createVNode"])(s,{type:"primary",plain:"",size:"small"},{default:Object(i["withCtx"])(()=>[Object(i["createTextVNode"])(" 更多"),ee]),_:1})]),_:1},8,["onClick"])):Object(i["createCommentVNode"])("",!0)])]),e.boxInit?(Object(i["openBlock"])(),Object(i["createBlock"])(c,{key:0,modelValue:e.boxModel,"onUpdate:modelValue":t[5]||(t[5]=t=>e.boxModel=t),title:e.table.cnName+e.getCurrentAction(),width:e.boxOptions.width,height:e.boxOptions.height,padding:0,"on-model-close":e.onModelClose},{content:Object(i["withCtx"])(()=>[Object(i["createElementVNode"])("div",te,[(Object(i["openBlock"])(),Object(i["createBlock"])(Object(i["resolveDynamicComponent"])(e.dynamicComponent.modelHeader),{ref:"modelHeader",onParentCall:e.parentCall},null,40,["onParentCall"])),Object(i["createElementVNode"])("div",ne,[Object(i["createVNode"])(h,{ref:"form",editor:e.editor,"load-key":!1,"label-width":e.boxOptions.labelWidth,formRules:e.editFormOptions,formFields:e.editFormFields},null,8,["editor","label-width","formRules","formFields"])]),(Object(i["openBlock"])(),Object(i["createBlock"])(Object(i["resolveDynamicComponent"])(e.dynamicComponent.modelBody),{ref:"modelBody",onParentCall:e.parentCall},null,40,["onParentCall"])),e.detail.columns&&e.detail.columns.length>0?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",ie,[Object(i["createElementVNode"])("div",ae,[Object(i["createElementVNode"])("div",oe,[Object(i["createElementVNode"])("span",null,[le,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.detail.cnName),1)])]),Object(i["createElementVNode"])("div",re,[(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.detailOptions.buttons,(t,n)=>Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createBlock"])(s,{key:n,plain:t.plain,onClick:n=>e.onClick(t.onClick),size:"mini"},{default:Object(i["withCtx"])(()=>[Object(i["createElementVNode"])("i",{class:Object(i["normalizeClass"])(t.icon)},null,2),Object(i["createTextVNode"])(Object(i["toDisplayString"])(t.name),1)]),_:2},1032,["plain","onClick"])),[[i["vShow"],!("boolean"==typeof t.hidden&&t.hidden)]])),128))])]),Object(i["createVNode"])(b,{ref:"detail",onLoadBefore:e.loadInternalDetailTableBefore,onLoadAfter:e.loadDetailTableAfter,onRowChange:e.detailRowOnChange,onRowClick:e.detailRowOnClick,url:e.detailOptions.url,"load-key":!1,index:e.detailOptions.edit,tableData:e.detailOptions.data,columns:e.detailOptions.columns,pagination:e.detailOptions.pagination,height:e.detailOptions.height,single:e.detailOptions.single,"pagination-hide":!1,defaultLoadPage:e.detailOptions.load,doubleEdit:e.detailOptions.doubleEdit,beginEdit:e.detailOptions.beginEdit,endEditBefore:e.detailOptions.endEditBefore,endEditAfter:e.detailOptions.endEditAfter,summary:e.detailOptions.summary,"click-edit":e.detailOptions.clickEdit,"column-index":e.detailOptions.columnIndex,ck:e.detailOptions.ck},null,8,["onLoadBefore","onLoadAfter","onRowChange","onRowClick","url","index","tableData","columns","pagination","height","single","defaultLoadPage","doubleEdit","beginEdit","endEditBefore","endEditAfter","summary","click-edit","column-index","ck"])])):Object(i["createCommentVNode"])("",!0),(Object(i["openBlock"])(),Object(i["createBlock"])(Object(i["resolveDynamicComponent"])(e.dynamicComponent.modelFooter),{ref:"modelFooter",onParentCall:e.parentCall},null,40,["onParentCall"]))])]),footer:Object(i["withCtx"])(()=>[Object(i["createElementVNode"])("div",null,[(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.boxButtons,(t,n)=>Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createBlock"])(s,{key:n,type:t.type,size:"mini",plain:t.plain,disabled:t.hasOwnProperty("disabled")&&!!t.disabled,onClick:n=>e.onClick(t.onClick)},{default:Object(i["withCtx"])(()=>[Object(i["createElementVNode"])("i",{class:Object(i["normalizeClass"])(t.icon)},Object(i["toDisplayString"])(t.name),3)]),_:2},1032,["type","plain","disabled","onClick"])),[[i["vShow"],!("boolean"==typeof t.hidden&&t.hidden)]])),128)),Object(i["createVNode"])(s,{size:"mini",type:"primary",plain:"",onClick:t[4]||(t[4]=t=>e.onModelClose(!1))},{default:Object(i["withCtx"])(()=>[se]),_:1})])]),_:1},8,["modelValue","title","width","height","on-model-close"])):Object(i["createCommentVNode"])("",!0)]),Object(i["createElementVNode"])("div",ce,[(Object(i["openBlock"])(),Object(i["createBlock"])(Object(i["resolveDynamicComponent"])(e.dynamicComponent.gridBody),{ref:"gridBody",onParentCall:e.parentCall},null,40,["onParentCall"]))]),Object(i["createElementVNode"])("div",de,[Object(i["createVNode"])(b,{ref:"table",single:e.single,rowKey:e.rowKey,loadTreeChildren:e.loadTreeTableChildren,onLoadBefore:e.loadTableBefore,onLoadAfter:e.loadTableAfter,onRowChange:e.rowOnChange,onRowClick:e.rowOnClick,onRowDbclick:e.rowOnDbClick,tableData:[],linkView:e.linkData,columns:e.columns,pagination:e.pagination,height:e.height,"max-height":e.tableMaxHeight,"pagination-hide":!1,url:e.url,"load-key":!1,defaultLoadPage:e.load,summary:e.summary,"double-edit":e.doubleEdit,index:e.doubleEdit,endEditBefore:e.endEditBefore,"click-edit":!0,"column-index":e.columnIndex,"text-inline":e.textInline,ck:e.ck},null,8,["single","rowKey","loadTreeChildren","onLoadBefore","onLoadAfter","onRowChange","onRowClick","onRowDbclick","linkView","columns","pagination","height","max-height","url","defaultLoadPage","summary","double-edit","index","endEditBefore","column-index","text-inline","ck"])])]),(Object(i["openBlock"])(),Object(i["createBlock"])(Object(i["resolveDynamicComponent"])(e.dynamicComponent.gridFooter),{ref:"gridFooter",onParentCall:e.parentCall},null,40,["onParentCall"]))])}function ue(e,t){return Object(i["openBlock"])(),Object(i["createElementBlock"])("div")}const me={},pe=h()(me,[["render",ue]]);var fe=pe,be=n("0b13"),ye=n("6e5b");let ge={columns:{type:Array,default:()=>[]},detail:{type:Object,default:()=>({columns:[],sortName:""})},editFormFields:{type:Object,default:()=>({})},editFormOptions:{type:Array,default:()=>[]},searchFormFields:{type:Object,default:()=>({})},searchFormOptions:{type:Array,default:()=>[]},table:{type:Object,default:()=>({})},extend:{type:Object,default:()=>({})}};var ke=ge;let Oe={loadInternalDetailTableBefore(e,t){this.detailOptions.delKeys.length>0&&(this.detailOptions.delKeys=[]);let n=this.table.key;return this.currentRow&&this.currentRow.hasOwnProperty(n)&&(e.value=this.currentRow[n]),this.loadDetailTableBefore(e,t)},detailRowOnChange(e){this.detailRowChange(e)},detailRowChange(e){},detailRowOnClick({row:e,column:t,event:n}){this.detailRowClick({row:e,column:t,event:n})},detailRowClick({row:e,column:t,event:n}){},resetDetailTable(e){if(!this.detailOptions.columns||0==this.detailOptions.columns.length)return;let t=this.table.key,n={value:e?e[t]:this.currentRow[t]};this.$refs.detail&&(this.$refs.detail.reset(),this.$refs.detail.load(n))},refreshRow(){this.resetDetailTable()},addRow(){this.$refs.detail.addRow({}),this.updateDetailTableSummaryTotal()},delRow(){let e=this.$refs.detail.getSelected();if(!e||0==e.length)return this.$message.error("请选择要删除的行!");if(!this.delDetailRow(e))return!1;let t=!1;this.$confirm("确认要删除选择的数据吗?","警告",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning",center:!0}).then(()=>{if(t)return;t=!0,e=this.$refs.detail.delRow();let n=this.detailOptions.key;e.forEach(e=>{e.hasOwnProperty(n)&&e[n]&&this.detailOptions.delKeys.push(e[n])}),this.updateDetailTableSummaryTotal()})},updateDetailTableSummaryTotal(){this.$refs.detail&&(this.$refs.detail.paginations.total=this.$refs.detail.rowData.length,this.$refs.detail.summary&&this.$refs.detail.columns.forEach(e=>{e.summary&&this.$refs.detail.getInputSummaries(null,null,null,e)}))}};var we=Oe;let je={onInit(){console.log("Create执行前")},onInited(){console.log("Create执行后")},mounted(){console.log("mounted")},searchBefore(e){return!0},searchAfter(e,t){return!0},searchDetailBefore(e){return!0},searchDetailAfter(e,t){return!0},delBefore(e,t){return!0},delAfter(e){return!0},delDetailRow(e){return!0},addBefore(e){return!0},async addBeforeAsync(e){return!0},addAfter(e){return!0},updateBefore(e){return!0},async updateBeforeAsync(e){return!0},updateAfter(e){return!0},auditBefore(e,t){return!0},auditAfter(e,t){return!0},resetAddFormBefore(){return!0},resetAddFormAfter(){return!0},resetUpdateFormBefore(){return!0},resetUpdateFormAfter(){return!0},modelOpenBefore(e){},modelOpenAfter(e){},importAfter(e){this.search()},importExcelBefore(e){return!0},reloadDicSource(){this.initDicKeys()},exportBefore(e){return!0},onModelClose(e){this.boxModel=!1}};var xe=je;let ve={parentCall(e){if("function"!=typeof e)return console.log("扩展组件需要传入一个回调方法才能获取父级Vue对象");e(this)},getCurrentAction(){return this.currentReadonly?"":"--"+(this.currentAction==this.const.ADD?"新增":"编辑")},quickSearchKeyPress(e){13==e.keyCode&&""!=this.searchFormFields[this.singleSearch.field]&&this.search()},getButtons(){let e=this.buttons.findIndex(e=>"Search"==e.value);if(-1!=e&&this.buttons.splice(e+1,0,{icon:this.fiexdSearchForm?"el-icon-refresh-left":"el-icon-search",name:this.fiexdSearchForm?"重置":"高级查询",plain:!0,type:this.buttons[e].type,onClick:()=>{if(this.fiexdSearchForm)return this.resetSearch();this.searchBoxShow=!this.searchBoxShow}}),this.maxBtnLength+=-1==e?0:1,this.buttons.length<=this.maxBtnLength)return this.buttons;let t=this.buttons.slice(0,this.maxBtnLength);return t[this.maxBtnLength-1].last=!0,t},extendBtn(e,t){e&&t&&t instanceof Array&&t.forEach(t=>{e.splice(void 0==t.index?e.length:t.index,0,t)})},initBoxButtons(){let e=this.$route.path,t=this.permission.getButtons(e,null,this.extend.tableAction,this.table.name);t&&t.forEach(e=>{let t={};for(const n in e)t[n]=e[n];this.buttons.push(t)}),this.extend||(this.extend={}),this.extend.buttons||(this.extend.buttons={}),this.extend.buttons.view&&this.extendBtn(this.buttons,this.extend.buttons.view);let n=[],i=this.buttons.some(e=>{if(e.value&&(e.value.toLowerCase()==this.const.ADD.toLowerCase()||e.value.toLowerCase()==this.const.EDIT.toLowerCase()))return!0});this.currentReadonly=!i;let a={name:"刷新",type:"info",icon:"el-icon-refresh",onClick(){this.currentAction!=this.const.ADD&&this.refreshRow()}},o=this.buttons.some(e=>{if(e.value==this.const.IMPORT)return!0});if(o&&(this.upload.url=this.getUrl(this.const.IMPORT),this.upload.template.fileName=this.table.cnName,this.upload.template.url=this.http.ipAddress+this.getUrl(this.const.DOWNLOADTEMPLATE,!0)),!i)return this.editFormOptions.forEach(e=>{e.forEach(e=>{e.disabled=!0})}),this.detail.columns.forEach(e=>{e.hasOwnProperty("edit")&&(e["edit"]=!1)}),this.extendBtn(n,this.extend.buttons.box),this.boxButtons.push(...n),this.detailOptions.buttons.push(a),this.extendBtn(this.detailOptions.buttons,this.extend.buttons.detail),n;this.detailOptions.edit=!0,n.push({name:"保 存",icon:"el-icon-check",type:"danger",value:"save",onClick(){this.save()}},{name:"重 置",icon:"el-icon-refresh-right",type:"primary",onClick(){this.resetEdit()}}),this.detailOptions.buttons.push({name:"添加行",icon:"el-icon-plus",type:"primary",plain:!0,onClick(){this.addRow()}},{type:"danger",plain:!0,name:"删除行",icon:"el-icon-delete",onClick(){this.delRow()}}),this.extendBtn(n,this.extend.buttons.box),this.detailOptions.buttons.push(a),this.extendBtn(this.detailOptions.buttons,this.extend.buttons.detail),this.boxButtons.push(...n)},onClick(e){e.apply(this)},changeDropdown(e,t){let n=this.buttons.filter(t=>t.name==e);n&&n.length>0&&n[0].onClick.apply(this)},emptyValue(e){return"string"==typeof e&&""===e.trim()||(e instanceof Array&&!e.length||(null===e||void 0===e||""===e))},getSearchParameters(){this.fiexdSearchForm||(this.searchBoxShow=!1);let e={wheres:[]};for(const t in this.searchFormFields){let n=this.searchFormFields[t];if(this.emptyValue(n))continue;"number"==typeof n&&(n+="");let i=this.getSearchItem(t);if("cascader"==i&&(n=n.length?n[n.length-1]+"":""),"string"!=typeof n&&-1!=["date","datetime","range"].indexOf(i))for(let a=0;a-1!=["date","datetime","range"].indexOf(i)?a?"lessorequal":"thanorequal":i)()});else e.wheres.push({name:t,value:"string"==typeof n?(n+"").trim():n.join(","),displayType:i})}return e},search(){this.$refs.table.load(null,!0)},loadTableBefore(e,t){let n=this.getSearchParameters();n&&(e=Object.assign(e,n));let i=this.searchBefore(e);t(i)},loadTableAfter(e,t,n){let i=this.searchAfter(e,n);t(i)},loadDetailTableBefore(e,t){if(this.currentAction==this.const.ADD)return t(!1),!1;let n=this.searchDetailBefore(e);t(n)},loadDetailTableAfter(e,t){let n=this.searchDetailAfter(e);t(n)},getSearchItem(e){let t;for(let n=0;nt.field==e)}return t.type},resetSearch(){this.resetSearchForm(),this.resetSearchFormAfter&&this.resetSearchFormAfter()},resetEdit(){let e=this.currentAction!=this.const.ADD;if(!this[e?"resetUpdateFormBefore":"resetAddFormBefore"]())return;let t={};e&&(t[this.table.key]=this.editFormFields[this.table.key]),this.resetEditForm(t),this[e?"resetUpdateFormAfter":"resetAddFormAfter"]()},resetSearchForm(e){this.resetForm("searchForm",e)},resetEditForm(e){this.hasDetail&&this.$refs.detail&&this.$refs.detail.reset(),this.resetForm("form",e)},getKeyValueType(e,t){try{let n=(t?"e":"s")+"_b_";e.forEach(e=>{e.forEach(e=>{if(this.keyValueType.hasOwnProperty(n+e.field))return!0;let t;"switch"==e.type?this.keyValueType[e.field]=1:e.bind&&e.bind.data?t=e.bind.data:e.data&&(e.data instanceof Array?t=e.data:e.data.data&&e.data.data instanceof Array&&(t=e.data.data)),t&&t.length>0&&!this.keyValueType.hasOwnProperty(e.field)&&(this.keyValueType[e.field]=t[0].key,this.keyValueType[n+e.field]=e.type)})})}catch(n){console.log(n.message)}},resetForm(e,t){if(this.$refs[e]&&this.$refs[e].reset(),!t)return;let n,i;var a;"searchForm"==e?(n=this.searchFormFields,i="s_b_"):(n=this.editFormFields,i="e_b_"),this.keyValueType._dinit||(this.getKeyValueType(this.editFormOptions,!0),this.getKeyValueType(this.searchFormOptions,!1),this.keyValueType._dinit=!0);for(const l in n)if(t.hasOwnProperty(l)){let e=t[l],r=this.keyValueType[i+l];if("selectList"==r||"checkbox"==r||"cascader"==r)if("cascader"==r){var o=this.dicKeys.find(e=>e.fileds&&-1!=e.fileds.indexOf(l));o&&o.orginData&&o.orginData.length?("number"==typeof o.orginData[0].id?e=~~e:e+="",a=this.base.getTreeAllParent(e,o.orginData),a&&(e=a.map(e=>e.id))):e=[e]}else""!=e&&void 0!=e&&"string"==typeof e?e=e.split(","):"checkbox"==r&&(e=[]);else this.keyValueType.hasOwnProperty(l)&&"number"==typeof this.keyValueType[l]&&1*e==e?e*=1:null==e||void 0==e?e="":e+="";e instanceof Array?(n[l]&&(n[l]=[]),n[l]=e):n[l]=e}else n[l]=n[l]instanceof Array?[]:""},onBtnClick(e){this[e.method](e.data)},refresh(){this.search()},saveBefore(e){return!0},saveAfter(e,t){return!0},save(){this.$refs.form.validate(e=>{e&&this.saveExecute()})},async saveExecute(){let e={};for(const o in this.editFormFields)if(this.uploadfiled&&this.uploadfiled.length>0&&-1!=this.uploadfiled.indexOf(o)&&this.editFormFields[o]instanceof Array){let t=this.editFormFields[o].map(e=>e.path);e[o]=t.join(",")}else void 0===this.editFormFields[o]&&this.dicKeys.some(e=>e.fileds&&-1!=e.fileds.indexOf(o))?e[o]=null:e[o]=this.editFormFields[o];for(const o in e)if(e[o]instanceof Array){var t=this.dicKeys.some(e=>"cascader"==e.type&&e.fileds&&-1!=e.fileds.indexOf(o));t&&e[o].length?e[o]=e[o][e[o].length-1]:e[o]=e[o].join(",")}let n={mainData:e,detailData:null,delKeys:null};this.hasDetail&&(n.detailData=this.$refs.detail.rowData),this.detailOptions.delKeys.length>0&&(n.delKeys=this.detailOptions.delKeys);let i=this.currentAction==this.const.ADD;if(i){if(!this.addBefore(n)||!await this.addBeforeAsync(n))return}else if(!this.updateBefore(n)||!await this.updateBeforeAsync(n))return;let a=this.getUrl(this.currentAction);this.http.post(a,n,!0).then(e=>{if(i){if(!this.addAfter(e))return;if(this.continueAdd&&e.status)return this.$success(e.message),this.currentAction=this.const.ADD,this.currentRow={},this.resetAdd(),void this.refresh()}else if(!this.updateAfter(e))return;if(!e.status)return this.$error(e.message);if(this.$success(e.message),this.boxOptions.saveClose)return this.boxModel=!1,void this.$refs.table.load(null,i);let t;t="string"==typeof e.data&&""!=e.data?JSON.parse(e.data):e.data,this.currentAction==this.const.ADD&&(this.editFormFields[this.table.key]="",this.currentAction=this.const.EDIT,this.currentRow=t.data),this.resetEditForm(t.data),this.hasDetail&&(this.detailOptions.delKeys=[],t.list&&this.$refs.detail.rowData.push(...t.list)),this.$refs.table.load(null,i)})},del(e){if(e?e instanceof Array||(e=[e]):e=this.$refs.table.getSelected(),!e||0==e.length)return this.$error("请选择要删除的行!");let t=e.map(e=>e[this.table.key]);if(!t||0==t.length)return this.$error("没有获取要删除的行数据!");if(!this.delBefore(t,e))return;let n=!1;this.$confirm("确认要删除选择的数据吗?","警告",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning",center:!0}).then(()=>{if(n)return;n=!0;let e=this.getUrl(this.const.DEL);this.http.post(e,t,"正在删除数据....").then(e=>{if(!e.status)return this.$error(e.message);this.$success(e.message),this.delAfter(e)&&this.refresh()})})},async modelOpenBeforeAsync(e){return!0},async initBox(){return!!await this.modelOpenBeforeAsync(this.currentRow)&&(this.modelOpenBefore(this.currentRow),this.boxInit||(this.boxInit=!0,this.boxModel=!0),!0)},setEditForm(e){let t=this.$refs.table.remoteColumns;t.forEach(e=>{this.editFormOptions.forEach(t=>{t.forEach(t=>{t.field==e.field&&(t.data.data=Object.assign([],t.data,e.bind.data))})})}),this.editFormFields,this.editFormFields[this.table.key]=e[this.table.key],this.resetEditForm(e),this.currentAction=this.const.EDIT,this.boxModel=!0},async linkData(e,t){this.currentAction=this.const.EDIT,this.currentRow=e,await this.initBox()&&(this.resetDetailTable(e),this.setEditForm(e),this.setContinueAdd(!1),this.getRemoteFormDefaultKeyValue(),this.modelOpenProcess(e))},setContinueAdd(e){if(this.continueAdd){var t=this.boxButtons.find(e=>"save"==e.value);t&&(t.name=e?this.continueAddName:"保 存")}},resetAdd(){this.hasDetail&&this.$refs.detail&&this.$refs.detail.reset();let e={};this.editFormOptions.forEach(t=>{t.forEach(t=>{"switch"==t.type&&(e[t.field]=1)})}),this.resetEditForm(e)},async add(){this.currentAction=this.const.ADD,this.currentRow={},await this.initBox()&&(this.resetAdd(),this.setContinueAdd(!0),this.boxModel=!0,this.modelOpenProcess())},async edit(e){if(this.currentAction=this.const.EDIT,e?e instanceof Array||(e=[e]):e=this.$refs.table.getSelected(),0==e.length)return this.$error("请选择要编辑的行!");this.currentRow=e[0],await this.initBox()&&(this.setContinueAdd(!1),this.resetDetailTable(),this.setEditForm(e[0]),this.getRemoteFormDefaultKeyValue(),this.modelOpenProcess(e[0]))},getRemoteFormDefaultKeyValue(){this.currentAction==this.const.EDIT&&0!=this.remoteKeys.length&&this.editFormOptions.forEach((e,t)=>{e.forEach((e,n)=>{if(e.remote){let i=this.columns.find(t=>t.bind&&t.bind.key==e.dataKey);if(!i)return;let a=this.currentRow[e.field],o=i.bind.data.find(e=>e.key==a);e.data=[{key:a,value:o?o.value:a}],this.editFormOptions[t].splice(n,1,e)}})})},modelOpenProcess(e){this.$nextTick(()=>{this.modelOpenAfter(e)})},import(){this.upload.excel=!0,this.$refs.upload_excel&&this.$refs.upload_excel.reset()},download(e,t){let n=new XMLHttpRequest;n.open("GET",e,!0),n.setRequestHeader("Content-type","application/json"),n.setRequestHeader("Authorization",this.$store.getters.getToken());let i=this.$refs.export;n.responseType="blob",n.onload=function(e){if(200!=n.status)return void this.$error("下载文件出错了..");let a=n.response;i.download=t;let o=new Blob([a]);i.href=URL.createObjectURL(o),i.click()},n.send()},export(){let e=this.getUrl(this.const.EXPORT),t=this.getSearchParameters(),n={order:this.pagination.order,wheres:t.wheres||[]};if(!this.exportBefore(n))return;n.wheres&&"object"==typeof n.wheres&&(n.wheres=JSON.stringify(n.wheres));let i=this.http;i.post(e,n,"正在导出数据....").then(e=>{if(!e.status)return this.$error(e.message);let t=this.getUrl(this.const.DOWNLOAD);t="/"==t[0]?t.substring(1):t,this.download(i.ipAddress+t+"?path="+e.data,this.table.cnName+".xlsx")})},getSelectRows(){return this.$refs.table.getSelected()},getDetailSelectRows(){return this.$refs.detail?this.$refs.detail.getSelected():[]},audit(){let e=this.$refs.table.getSelected();if(0==e.length)return this.$error("请选择要审核的行!");let t=e.every(e=>e.AuditStatus>0);if(t)return this.$error("只能选择审核中的数据!");this.auditParam.rows=e.length,this.auditParam.model=!0},saveAudit(){let e=this.$refs.table.getSelected();if(-1==this.auditParam.status)return this.$error("请选择审核结果!");if(e.length!=this.auditParam.rows)return this.$error("所选数据已发生变化,请重新选择审数据!");let t=e.map(e=>e[this.table.key]);if(!this.auditBefore(t,e))return;let n=this.getUrl(this.const.AUDIT)+"?auditReason="+this.auditParam.reason+"&auditStatus="+this.auditParam.status;this.http.post(n,t,"审核中....").then(t=>{if(this.auditAfter(t,e)){if(!t.status)return this.$error(t.message);this.auditParam.rows=0,this.auditParam.status=-1,this.auditParam.reason="",this.auditParam.model=!1,this.$success(t.message),this.refresh()}})},viewModelCancel(){this.viewModel=!1},initFormOptions(e,t,n,i){e.forEach(e=>{e.forEach(e=>{if("img"!=e.type&&"excel"!=e.type&&"file"!=e.type&&"img"!=e.columnType||(e.url=this.http.ipAddress+"api"+this.table.url+"Upload",this.uploadfiled.push(e.field)),!e.dataKey)return!0;if(e.remote)return this.remoteKeys.push(e.dataKey),e.data=[],!0;if("checkbox"!=e.type||n[e.field]instanceof Array||(n[e.field]=[]),-1==t.indexOf(e.dataKey)){t.push(e.dataKey);let n={dicNo:e.dataKey,data:[],fileds:[e.field],orginData:[]};"cascader"==e.type&&(n.type="cascader"),i&&(n["e_type"]=e.type),this.dicKeys.push(n)}else"cascader"==e.type&&(e.hasOwnProperty("changeOnSelect")||(e.changeOnSelect=!0),this.dicKeys.forEach(t=>{t.dicNo==e.dataKey&&(t.type="cascader",t.fileds.push(e.field))}));"cascader"!=e.type&&Object.assign(e,this.dicKeys.filter(t=>t.dicNo==e.dataKey)[0])})})},initColumns(e,t,n){e&&e instanceof Array&&e.forEach(e=>{if(!e.bind||e.bind.data&&e.bind.data.length>0)return!0;let i=e.bind.key||e.bind.dicNo;if(-1!=this.remoteKeys.indexOf(i))return e.bind.remote=!0,!0;-1==this.hasKeyField.indexOf(e.field)&&this.hasKeyField.push(e.field);var a=t.filter(e=>e.dicNo==i);a&&0!=a.length||(t.push({dicNo:i,data:[]}),a=[t[t.length-1]],n.push(i)),"cascader"==a[0].type?e.bind={data:a[0].orginData,tyep:"select"}:e.bind=a[0],e.bind.type=e.bind.e_type||"string"})},bindOptions(e){e.forEach(e=>{this.dicKeys.forEach(t=>{if(t.dicNo!=e.dicNo)return!0;if("cascader"==t.type){let n=JSON.parse(JSON.stringify(e.data)),i=this.base.convertTree(n,(e,t,n)=>{e.inited||(e.inited=!0,e.label=e.value,e.value=e.key)});t.data.push(...i),t.orginData.push(...e.data),this.searchFormOptions.forEach(n=>{n.forEach(n=>{"cascader"==n.type&&n.dataKey==t.dicNo&&(n.data=i,n.orginData=e.data)})}),this.editFormOptions.forEach(n=>{n.forEach(n=>{"cascader"==n.type&&n.dataKey==t.dicNo&&(n.data=i,n.orginData=e.data)})})}else if(e.data.length>0&&!e.data[0].hasOwnProperty("key")){let n=e.data,i=new Array(n.length);for(let e=0;e0&&"number"==typeof e.data[0].key&&e.data.forEach(e=>{e.key=e.key+""}),t.data.push(...e.data);this.singleSearch&&this.singleSearch.dataKey&&this.singleSearch.dataKey==t.dicNo&&this.singleSearch.data.splice(0,1,...t.data)})})},getUrl(e,t){return(t?"":"/")+"api"+this.table.url+e},initDicKeys(){let e=[];if(this.dicKeys.splice(0),this.initFormOptions(this.editFormOptions,e,this.editFormFields,!0),this.initFormOptions(this.searchFormOptions,e,this.searchFormFields,!1),this.searchFormOptions.forEach(e=>{e.forEach(e=>{"date"!=e.type&&"datetime"!=e.type||(e.range=!0)})}),this.initColumns(this.columns,this.dicKeys,e),this.detailOptions&&this.detailOptions.columns&&this.initColumns(this.detailOptions.columns,this.dicKeys,e),this.searchFormOptions.length>0&&(this.singleSearch={dataKey:this.searchFormOptions[0][0].dataKey,dicNo:this.searchFormOptions[0][0].dicNo,field:this.searchFormOptions[0][0].field,title:this.searchFormOptions[0][0].title,type:this.searchFormOptions[0][0].type,data:[]}),0==e.length)return;let t=this;this.http.post("/api/Sys_Dictionary/GetVueDictionary",e).then(e=>{t.bindOptions(e)})},setFiexdColumn(e,t){},initBoxHeightWidth(){let e=document.documentElement.clientHeight;e=e<250?250:e;let t=document.documentElement.clientWidth;this.editFormOptions.some(e=>e.some(e=>"editor"==e.type))?(this.editor.uploadImgUrl=this.getUrl("upload"),this.boxOptions.height=.8*e,this.boxOptions.width=.8*t):(this.boxOptions.height&&this.boxOptions.height>.8*e&&(this.boxOptions.height=.8*e),this.boxOptions.width&&this.boxOptions.width>.8*t&&(this.boxOptions.width=.8*t));let n=t-270;if(this.setFiexdColumn(this.columns,n),this.height=this.tableHeight||e-206,this.url=this.getUrl(this.const.PAGE),this.detail.columns&&this.detail.columns.length>0)this.hasDetail=!0,t*=.8,e*=.85,this.detailOptions.height||(this.detailOptions.height=e-57*this.editFormOptions.length-205,this.detailOptions.height=this.detailOptions.height<240?240:this.detailOptions.height),this.detailOptions.columns=this.detail.columns,this.detailOptions.pagination.sortName=this.detail.sortName,this.detailOptions.cnName=this.detail.cnName,this.detailOptions.key=this.detail.key,this.detailOptions.url=this.getUrl("getDetailPage"),this.setFiexdColumn(this.detail.columns,t);else{let n=1;this.editFormOptions.forEach(e=>{e.length>n&&(n=e.length)});let i=.7,a=.5;a=n/10+.3,i=.1*(this.editFormOptions.length||1)+.03,i=i>.9?.9:i,t*=a,e*=i}this.boxOptions.height||(this.boxOptions.height=e+10),this.boxOptions.width||(this.boxOptions.width=t+30)},rowOnChange(e){this.rowChange(e)},rowChange(e){},rowOnClick({row:e,column:t,event:n}){this.rowClick({row:e,column:t,event:n})},rowClick({row:e,column:t,event:n}){},rowOnDbClick({row:e,column:t,event:n}){this.rowDbClick({row:e,column:t,event:n})},rowDbClick({row:e,column:t,event:n}){},$error(e){this.$message.error(e)},$success(e){this.$message.success(e)},setFiexdSearchForm(e){this.fiexdSearchForm=!0;let t=this.buttons.find(e=>"刷 新"==e.name);e&&(this.searchBoxShow=!0),t&&(t.name="重 置",t.onClick=function(){this.resetSearch()})},endEditBefore(e,t,n){return!0},filterPermission(e,t){const n=(this.$store.state.permission||[]).find(t=>t.url=="/"+e);return n&&n.permission.some(e=>e==t)},destroyed(){},loadTreeTableChildren(e,t,n){this.loadTreeChildren.call(this,e,t,n)},loadTreeChildren(e,t,n){return n([])},SetEquipmentStatus(){let e=this.$refs.table.getSelected();if(0==e.length)return this.$error("请选择要启用或禁用的调度任务!");e=JSON.parse(JSON.stringify(e[0]));let t={MainData:e,DetailData:null,DelKeys:null};this.http.post("/api/VV_Dispatch/SetEquipmentStatus",t,"状态设置中").then(e=>{e.status?(this.$message.success("状态设置成功"),this.refresh()):this.$message.error("状态设置失败:"+e.message)})}};ve=Object.assign(ve,we,xe);var Ce=ve;const Be={EDIT:"update",ADD:"Add",VIEW:"view",PAGE:"getPageData",AUDIT:"audit",DEL:"del",EXPORT:"Export",DOWNLOAD:"DownLoadFile",DOWNLOADTEMPLATE:"DownLoadTemplate",IMPORT:"Import",UPLOAD:"Upload"};var De={components:{"vol-form":ye["a"],"vol-table":be["a"],VolBox:Object(i["defineAsyncComponent"])(()=>n.e("chunk-09bd3e7f").then(n.bind(null,"0d63"))),QuickSearch:Object(i["defineAsyncComponent"])(()=>n.e("chunk-2d216388").then(n.bind(null,"c214"))),Audit:Object(i["defineAsyncComponent"])(()=>n.e("chunk-74ca0074").then(n.bind(null,"008c"))),UploadExcel:Object(i["defineAsyncComponent"])(()=>n.e("chunk-45c1c7f5").then(n.bind(null,"eec6")))},props:{},setup(e){const t={gridHeader:fe,gridBody:fe,gridFooter:fe,modelHeader:fe,modelBody:fe,modelFooter:fe};if(e.extend.components)for(const a in e.extend.components)e.extend.components[a]&&(t[a]=Object(i["toRaw"])(e.extend.components[a]));const n=Object(i["shallowRef"])(t);return{dynamicComponent:n}},data(){return{rowKey:void 0,fiexdSearchForm:!1,_inited:!1,doubleEdit:!1,single:!1,const:Be,boxInit:!1,searchBoxShow:!1,singleSearch:{},exportHref:"",currentAction:Be.ADD,currentRow:{},closable:!1,boxModel:!1,width:700,labelWidth:100,viewModel:!1,maxBtnLength:5,buttons:[],splitButtons:[],uploadfiled:[],boxButtons:[],dicKeys:[],hasKeyField:[],keyValueType:{_dinit:!1},url:"",hasDetail:!1,initActivated:!1,load:!0,activatedLoad:!1,summary:!1,remoteKeys:[],columnIndex:!1,ck:!0,continueAdd:!1,continueAddName:"保存后继续添加",detailOptions:{buttons:[],cnName:"",key:"",data:[],columns:[],edit:!0,single:!1,load:!0,delKeys:[],url:"",pagination:{total:0,size:100,sortName:""},height:0,doubleEdit:!0,clickEdit:!1,currentReadonly:!1,beginEdit:(e,t,n)=>!0,endEditBefore:(e,t,n)=>!0,endEditAfter:(e,t,n)=>!0,columnIndex:!1,ck:!0},auditParam:{rows:0,model:!1,status:-1,reason:"",data:[{text:"通过",status:1},{text:"拒绝",status:2}]},upload:{excel:!1,url:"",template:{url:"",fileName:""},init:!1},height:0,tableHeight:0,tableMaxHeight:0,textInline:!0,pagination:{total:0,size:30,sortName:""},boxOptions:{saveClose:!0,labelWidth:100,height:0,width:0,summary:!1},editor:{uploadImgUrl:"",upload:null}}},methods:{},activated(){this.onActivated&&this.onActivated(),this._inited?this.activatedLoad&&this.refresh():this._inited=!0},mounted(){this.mounted()},destroyed(){this.destroyed(),this.dynamicComponent=null},created:function(){Object.assign(this,this.extend.methods),this.pagination.sortName=this.table.sortName||this.table.key,this.initBoxButtons(),this.onInit(),this.initBoxHeightWidth(),this.initDicKeys(),this.onInited(),this.splitButtons=this.getButtons()},beforeUpdate:function(){},updated:function(){}};De.props=Object.assign(De.props,ke),De.methods=Object.assign(De.methods,Ce,ke.extend.methods);var Ee=Object(i["defineComponent"])(De);n("6622"),n("9d4f"),n("7ca0");const Fe=h()(Ee,[["render",he],["__scopeId","data-v-b3f39a56"]]);var Se=Fe;const Ve={install:function(e){e.component("ViewGrid",Se)}};var Ae=Ve;const Ne=Object(i["createApp"])(m);Ne.config.globalProperties.base=D,Ne.config.globalProperties.http=F["a"],Ne.config.globalProperties.$tabs={},Ne.config.globalProperties.permission=I,Ne.use(y["a"]).use(C["a"],{size:"medium"}).use(v).use(Ae).mount("#app"),Ne.config.globalProperties.$Message=Ne.config.globalProperties.$message},5943:function(e,t,n){e.exports=n.p+"img/error.7cbea5ed.png"},"62b0":function(e,t,n){},6622:function(e,t,n){"use strict";n("3d3c")},"6c80":function(e,t,n){"use strict";n("ec3d")},"6e5b":function(e,t,n){"use strict";var i=n("7a23");const a=e=>(Object(i["pushScopeId"])("data-v-49ad6c9a"),e=e(),Object(i["popScopeId"])(),e),o={key:1},l={key:2},r={key:0,class:"form-imgs"},s=["src","onerror","onClick"],c=["onClick"],d={key:0,class:"readonly-input"},h={key:5,class:"v-date-range",style:{display:"flex"}},u=a(()=>Object(i["createElementVNode"])("span",{style:{margin:"0px 5px","font-size":"13px",color:"#6f6b6b"}},"至",-1)),m={key:6,style:{width:"100%"}},p={key:11,style:{display:"flex"}},f=a(()=>Object(i["createElementVNode"])("span",{style:{margin:"0 5px"}},"-",-1)),b={key:17,class:"form-extra"},y=["onClick"],g={style:{width:"100%"}};function k(e,t,n,a,k,O){const w=Object(i["resolveComponent"])("form-expand"),j=Object(i["resolveComponent"])("el-option"),x=Object(i["resolveComponent"])("el-select"),v=Object(i["resolveComponent"])("el-switch"),C=Object(i["resolveComponent"])("el-radio"),B=Object(i["resolveComponent"])("el-radio-group"),D=Object(i["resolveComponent"])("el-checkbox"),E=Object(i["resolveComponent"])("el-checkbox-group"),F=Object(i["resolveComponent"])("el-date-picker"),S=Object(i["resolveComponent"])("el-time-picker"),V=Object(i["resolveComponent"])("vol-wang-editor"),A=Object(i["resolveComponent"])("vol-upload"),N=Object(i["resolveComponent"])("el-cascader"),I=Object(i["resolveComponent"])("el-input"),_=Object(i["resolveComponent"])("el-input-number"),T=Object(i["resolveComponent"])("el-form-item"),P=Object(i["resolveComponent"])("el-form");return Object(i["openBlock"])(),Object(i["createBlock"])(P,{style:{display:"inline-block",width:"100%"},inline:!0,ref:"volform",onSubmit:t[0]||(t[0]=Object(i["withModifiers"])(()=>{},["prevent"])),model:e.formFields,"label-width":e.labelWidth,rules:e.rules},{default:Object(i["withCtx"])(()=>[(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.formRules,(t,n)=>(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{key:n,style:{width:"100%"}},[(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(t,(t,n)=>Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createBlock"])(T,{label:t.title?t.title+":":"",prop:t.field,key:t.field+n,style:Object(i["normalizeStyle"])({width:e.getColWidth(t)+"%"})},{default:Object(i["withCtx"])(()=>[t.render&&"function"==typeof t.render?(Object(i["openBlock"])(),Object(i["createBlock"])(w,{key:0,render:t.render,par:12},null,8,["render"])):t.readonly&&"function"==typeof e.formFields[t.field]?(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",o,Object(i["toDisplayString"])(e.formFields[t.field]()),1)):e.isReadonlyImgFile(t,e.formFields)?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",l,["img"==t.type?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",r,[(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.formFields[t.field],(t,n)=>(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{class:"img-item",key:n},[Object(i["createElementVNode"])("img",{src:e.getSrc(t.path),onerror:e.errorImg,onClick:n=>e.previewImg(t.path)},null,8,s)]))),128))])):(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],{key:1},Object(i["renderList"])(e.formFields[t.field],(n,a)=>(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{class:"form-file-list",key:a},[Object(i["createElementVNode"])("a",{onClick:n=>e.dowloadFile(e.formFields[t.field][a])},Object(i["toDisplayString"])(n.name),9,c)]))),128))])):(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{key:3,class:Object(i["normalizeClass"])({"form-item-extra":t.extra})},["label"==t.type?(Object(i["openBlock"])(),Object(i["createElementBlock"])("label",d,Object(i["toDisplayString"])(e.getText(e.formFields,t)),1)):-1!=["select","selectList"].indexOf(t.type)?Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createBlock"])(x,{key:1,disabled:t.readonly||t.disabled,size:"medium",style:{width:"100%"},modelValue:e.formFields[t.field],"onUpdate:modelValue":n=>e.formFields[t.field]=n,filterable:"",multiple:"select"!=t.type,placeholder:t.placeholder?t.placeholder:"请选择"+t.title,"allow-create":t.autocomplete,onChange:t.onChange,remote:t.remote||t.url,clearable:"","remote-method":n=>{e.remoteSearch(t,e.formFields,n)}},{default:Object(i["withCtx"])(()=>[(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(t.data,e=>(Object(i["openBlock"])(),Object(i["createBlock"])(j,{key:e.key,label:e.value,value:e.key},null,8,["label","value"]))),128))]),_:2},1032,["disabled","modelValue","onUpdate:modelValue","multiple","placeholder","allow-create","onChange","remote","remote-method"])),[[i["vShow"],!t.hidden]]):"switch"==t.type?Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createBlock"])(v,{key:2,modelValue:e.formFields[t.field],"onUpdate:modelValue":n=>e.formFields[t.field]=n,disabled:t.readonly||t.disabled,"active-color":"#0f84ff",onChange:t.onChange,"inactive-color":"rgb(194 194 194)","active-value":"boolean"==typeof e.formFields[t.field]||1,"inactive-value":"boolean"!=typeof e.formFields[t.field]&&0},null,8,["modelValue","onUpdate:modelValue","disabled","onChange","active-value","inactive-value"])),[[i["vShow"],!t.hidden]]):"radio"==t.type?Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createBlock"])(B,{key:3,disabled:t.readonly||t.disabled,modelValue:e.formFields[t.field],"onUpdate:modelValue":n=>e.formFields[t.field]=n,onChange:t.onChange},{default:Object(i["withCtx"])(()=>[(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(t.data,e=>(Object(i["openBlock"])(),Object(i["createBlock"])(C,{key:e.key,label:e.key},{default:Object(i["withCtx"])(()=>[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.value),1)]),_:2},1032,["label"]))),128))]),_:2},1032,["disabled","modelValue","onUpdate:modelValue","onChange"])),[[i["vShow"],!t.hidden]]):"checkbox"==t.type?Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createBlock"])(E,{key:4,disabled:t.readonly||t.disabled,modelValue:e.formFields[t.field],"onUpdate:modelValue":n=>e.formFields[t.field]=n,onChange:t.onChange},{default:Object(i["withCtx"])(()=>[(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(t.data,e=>(Object(i["openBlock"])(),Object(i["createBlock"])(D,{key:e.key,label:e.key},{default:Object(i["withCtx"])(()=>[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.value),1)]),_:2},1032,["label"]))),128))]),_:2},1032,["disabled","modelValue","onUpdate:modelValue","onChange"])),[[i["vShow"],!t.hidden]]):-1!=["date","datetime"].indexOf(t.type)&&t.range?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",h,[Object(i["createVNode"])(F,{size:"medium",disabled:t.readonly||t.disabled,style:{flex:"1",width:"auto"},modelValue:e.formFields[t.field][0],"onUpdate:modelValue":n=>e.formFields[t.field][0]=n,type:"date"==t.type?"date":"datetime",disabledDate:n=>e.getDateOptions(n,t),placeholder:"开始时间","prefix-icon":" ",onChange:n=>{e.dateRangeChange(n,t)},"value-format":e.getDateFormat(t)},null,8,["disabled","modelValue","onUpdate:modelValue","type","disabledDate","onChange","value-format"]),u,Object(i["createVNode"])(F,{size:"medium",disabled:t.readonly||t.disabled,style:{flex:"1",width:"auto"},modelValue:e.formFields[t.field][1],"onUpdate:modelValue":n=>e.formFields[t.field][1]=n,placeholder:"结束时间",type:"date"==t.type?"date":"datetime",disabledDate:n=>e.getDateOptions(n,t),onChange:n=>{e.dateRangeChange(n,t)},"value-format":e.getDateFormat(t)},null,8,["disabled","modelValue","onUpdate:modelValue","type","disabledDate","onChange","value-format"])])):-1!=["date","datetime"].indexOf(t.type)?Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createElementBlock"])("div",m,[Object(i["createVNode"])(F,{clearable:"",disabled:t.readonly||t.disabled,style:{width:"100%"},size:"medium",modelValue:e.formFields[t.field],"onUpdate:modelValue":n=>e.formFields[t.field]=n,onChange:t.onChange,type:t.type,placeholder:t.placeholder?t.placeholder:"请选择"+t.title,disabledDate:n=>e.getDateOptions(n,t),"value-format":e.getDateFormat(t)},null,8,["disabled","modelValue","onUpdate:modelValue","onChange","type","placeholder","disabledDate","value-format"])],512)),[[i["vShow"],!t.hidden]]):"time"==t.type?(Object(i["openBlock"])(),Object(i["createBlock"])(S,{key:7,modelValue:e.formFields[t.field],"onUpdate:modelValue":n=>e.formFields[t.field]=n,placeholder:"请选择时间",format:t.format,style:{width:"100%"},size:"medium"},null,8,["modelValue","onUpdate:modelValue","format"])):"editor"==t.type?(Object(i["openBlock"])(),Object(i["createBlock"])(V,{key:8,ref_for:!0,ref:"editor",url:t.url||e.editor.uploadImgUrl,upload:t.upload||e.editor.upload,modelValue:e.formFields[t.field],"onUpdate:modelValue":n=>e.formFields[t.field]=n,height:t.height||350},null,8,["url","upload","modelValue","onUpdate:modelValue","height"])):e.isFile(t,e.formFields)?Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createBlock"])(A,{key:9,desc:t.desc,multiple:t.multiple,"max-file":t.maxFile,"max-size":t.maxSize,autoUpload:t.autoUpload,fileInfo:e.formFields[t.field],url:t.url,img:"img"==t.type||"img"==t.columnType,excel:"excel"==t.type,fileTypes:t.fileTypes?t.fileTypes:[],"upload-before":t.uploadBefore,"upload-after":t.uploadAfter,append:t.multiple,"on-change":n=>e.fileOnChange(n,t),"file-click":t.fileClick,"remove-before":t.removeBefore,downLoad:!!t.downLoad},null,8,["desc","multiple","max-file","max-size","autoUpload","fileInfo","url","img","excel","fileTypes","upload-before","upload-after","append","on-change","file-click","remove-before","downLoad"])),[[i["vShow"],!t.hidden]]):"cascader"==t.type?(Object(i["openBlock"])(),Object(i["createBlock"])(N,{key:10,clearable:"",size:"medium",style:{width:"100%"},modelValue:e.formFields[t.field],"onUpdate:modelValue":n=>e.formFields[t.field]=n,disabled:t.readonly||t.disabled,options:t.data,props:{checkStrictly:t.changeOnSelect||t.checkStrictly},onChange:t.onChange},null,8,["modelValue","onUpdate:modelValue","disabled","options","props","onChange"])):"range"==t.type||t.range?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",p,[Object(i["createVNode"])(I,{disabled:t.readonly||t.disabled,style:{flex:"1"},size:"medium",modelValue:e.formFields[t.field][0],"onUpdate:modelValue":n=>e.formFields[t.field][0]=n,clearable:""},null,8,["disabled","modelValue","onUpdate:modelValue"]),f,Object(i["createVNode"])(I,{size:"medium",disabled:t.readonly||t.disabled,style:{flex:"1"},modelValue:e.formFields[t.field][1],"onUpdate:modelValue":n=>e.formFields[t.field][1]=n,clearable:""},null,8,["disabled","modelValue","onUpdate:modelValue"])])):"textarea"==t.type?(Object(i["openBlock"])(),Object(i["createBlock"])(I,{key:12,clearable:"",disabled:t.readonly||t.disabled,modelValue:e.formFields[t.field],"onUpdate:modelValue":n=>e.formFields[t.field]=n,type:"textarea",autosize:{minRows:t.minRows||2,maxRows:t.maxRows||10},placeholder:t.placeholder?t.placeholder:"请输入"+t.title,ref_for:!0,ref:t.field},null,8,["disabled","modelValue","onUpdate:modelValue","autosize","placeholder"])):"number"==t.type?(Object(i["openBlock"])(),Object(i["createBlock"])(_,{key:13,style:{width:"100%"},modelValue:e.formFields[t.field],"onUpdate:modelValue":n=>e.formFields[t.field]=n,min:t.min,max:t.max,"controls-position":"right"},null,8,["modelValue","onUpdate:modelValue","min","max"])):"password"==t.type?Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createBlock"])(I,{key:14,clearable:"",type:"password",modelValue:e.formFields[t.field],"onUpdate:modelValue":n=>e.formFields[t.field]=n,modelModifiers:{number:!0},size:"medium",disabled:t.readonly||t.disabled,placeholder:t.placeholder?t.placeholder:"请输入"+t.title},null,8,["modelValue","onUpdate:modelValue","disabled","placeholder"])),[[i["vShow"],!t.hidden]]):t.onKeyPress?Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createBlock"])(I,{key:15,clearable:"",size:"medium",placeholder:t.placeholder?t.placeholder:"请输入"+t.title,disabled:t.readonly||t.disabled,modelValue:e.formFields[t.field],"onUpdate:modelValue":n=>e.formFields[t.field]=n,onKeypress:n=>{e.onKeyPress(n,t)},onChange:t.onKeyPress,onKeyup:Object(i["withKeys"])(t.onKeyPress,["enter"])},null,8,["placeholder","disabled","modelValue","onUpdate:modelValue","onKeypress","onChange","onKeyup"])),[[i["vShow"],!t.hidden]]):Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createBlock"])(I,{key:16,clearable:"",size:"medium",placeholder:t.placeholder?t.placeholder:"请输入"+t.title,disabled:t.readonly||t.disabled,modelValue:e.formFields[t.field],"onUpdate:modelValue":n=>e.formFields[t.field]=n},null,8,["placeholder","disabled","modelValue","onUpdate:modelValue"])),[[i["vShow"],!t.hidden]]),t.extra?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",b,[t.extra.render?(Object(i["openBlock"])(),Object(i["createBlock"])(w,{key:0,render:t.extra.render},null,8,["render"])):t.extra.click?(Object(i["openBlock"])(),Object(i["createElementBlock"])("a",{key:1,style:Object(i["normalizeStyle"])(t.extra.style),onClick:n=>t.extra.click(t,e.formFields[t.field])},[t.extra.icon?(Object(i["openBlock"])(),Object(i["createElementBlock"])("i",{key:0,class:Object(i["normalizeClass"])(t.extra.icon)},null,2)):Object(i["createCommentVNode"])("",!0),Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(t.extra.text),1)],12,y)):(Object(i["openBlock"])(),Object(i["createElementBlock"])("a",{key:2,style:Object(i["normalizeStyle"])(t.extra.style)},[t.extra.icon?(Object(i["openBlock"])(),Object(i["createElementBlock"])("i",{key:0,class:Object(i["normalizeClass"])(t.extra.icon)},null,2)):Object(i["createCommentVNode"])("",!0),Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(t.extra.text),1)],4))])):Object(i["createCommentVNode"])("",!0)],2))]),_:2},1032,["label","prop","style"])),[[i["vShow"],!t.hidden]])),128))]))),128)),Object(i["renderSlot"])(e.$slots,"default",{},void 0,!0),Object(i["createElementVNode"])("div",g,[Object(i["renderSlot"])(e.$slots,"footer",{},void 0,!0)])]),_:3},8,["model","label-width","rules"])}n("14d9"),n("d9e2");var O={name:"FormExpand",functional:!0,props:{render:Function,par:{}},render:({render:e,par:t})=>e(i["h"],{par:t})};const w={change:["checkbox","select","date","datetime","drop","radio","cascader"],phone:/^[1][3,4,5,6,7,8,9][0-9]{9}$/,decimal:/(^[\-0-9][0-9]*(.[0-9]+)?)$/,number:/(^[\-0-9][0-9]*([0-9]+)?)$/},j=["text","string","mail","textarea","password"],x={int:"number",byte:"number",decimal:"number",string:"string",bool:"boolean",date:"datetime",date:"date",mail:"email"},v=Math.pow(10,3);var C=Object(i["defineComponent"])({components:{FormExpand:O,"vol-upload":Object(i["defineAsyncComponent"])(()=>n.e("chunk-1ad6b75a").then(n.bind(null,"14cf"))),"vol-wang-editor":Object(i["defineAsyncComponent"])(()=>n.e("chunk-c74d5f32").then(n.bind(null,"0af4")))},props:{loadKey:{type:Boolean,default:!0},width:{type:Number,default:0},labelWidth:{type:Number,default:100},formRules:{type:Array,default:[]},formFields:{type:Object,default:()=>({})},editor:{type:Object,default:()=>({})}},computed:{rules(){let e={};return this.formRules.forEach((t,n)=>{t.forEach(t=>{e[t.field]=[this.getRule(t,this.formFields)]})}),e}},setup(e,t){const{appContext:n}=Object(i["getCurrentInstance"])(),a=Object(i["ref"])(!0),o=Object(i["ref"])(1),l=Object(i["ref"])([]),r=Object(i["ref"])(null);Object(i["onMounted"])(()=>{});const s=t=>{e.loadKey&&c(),e.formRules.forEach((n,i)=>{n.length>o.value&&(o.value=n.length);let a=0,r=0;if(n.forEach(e=>{e.colSize>0&&(r+=e.colSize,a++)}),a>0&&n.length-a>0){let e=(12-r)/(n.length-a);n.forEach(t=>{t.colSize||(t.colSize=e)})}n.forEach((n,a)=>{(n.remote||n.url)&&(n.loading=!1,n.point={x:i,y:a}),h(n,t),n.dataKey&&(n.columnType="string",n.data||(n.data=[])),(n.range||"range"==n.type)&&(e.formFields[n.field]instanceof Array&&2==e.formFields[n.field].length||(e.formFields[n.field]=["",""]),l.value.push(n.field))})})},c=()=>{let t=[],i=[];e.formRules.forEach(e=>{e.forEach(e=>{!e.dataKey||e.data&&0!=e.data.length||e.remote||(e.data=[],i.push({key:e.dataKey,data:e.data}),-1==t.indexOf(e.dataKey)&&t.push(e.dataKey))})}),0!=t.length&&n.config.globalProperties.http.post("/api/Sys_Dictionary/GetVueDictionary",t).then(e=>{d(e,i)})},d=(e,t)=>{e.forEach(e=>{t.forEach(t=>{if(t.key!=e.dicNo)return!0;if(t.data.length>0)return!0;if(e.data.length>0&&!e.data[0].hasOwnProperty("key")){let n=e.data,i=new Array(n.length);for(let e=0;e{t&&(["img","excel","file"].indexOf(-1!=e.type)||"img"==e.columnType)&&(e.hasOwnProperty("autoUpload")||(e.autoUpload=!0),e.hasOwnProperty("fileList")||(e.fileList=!0),e.hasOwnProperty("downLoad")||(e.downLoad=!0),e.removeBefore||(e.removeBefore=(e,t,n)=>!0),e.fileClick||(e.fileClick=(e,t,n)=>!0),e.onChange||(e.onChange=e=>!0),e.uploadAfter||(e.uploadAfter=(e,t)=>!0),e.uploadBefore||(e.uploadBefore=e=>!0))},u=e=>{let t=!0;return r.value.validate(i=>{i?"function"===typeof e&&e(i):(n.config.globalProperties.$message.error("数据验证未通过!"),t=!1)}),t};return s(!0),{remoteCall:a,span:o,rangeFields:l,validate:u,volform:r}},created(){},data(){return{errorImg:'this.src="'+n("731d")+'"'}},methods:{getColWidth(e){let t=0;this.formRules.forEach((e,n)=>{e.length>t&&(t=e.length)});let n=Math.round((e.colSize||12/t)/.12*v,10)/v;return e.colSize,n.toFixed(3)},previewImg(e){this.base.previewImg(e,this.http.ipAddress)},getSrc(e){if(e)return this.base.isUrl(e)||-1==e.indexOf(".")?e:this.http.ipAddress+e},isFile(e,t){return("img"==e.type||"img"==e.columnType||"excel"==e.type||"file"==e.type)&&(this.convertFileToArray(e,t),!0)},isReadonlyImgFile(e,t){return!(!e.disabled&&!e.readonly||!this.isFile(e,t))},convertFileToArray(e,t){e.maxFile||(e.maxFile=1);let n=t[e.field];if(!(n instanceof Array))if(null!==n&&void 0!==n){if("string"===typeof n){if(""===n.trim())return void(t[e.field]=[]);n=n.replace(/\\/g,"/");let i=n.split(",");t[e.field]=[];for(let n=0;n0?o[o.length-1]:a,path:a})}}}else t[e.field]=[]},dowloadFile(e){this.base.dowloadFile(e.path,e.name,{Authorization:this.$store.getters.getToken()},this.http.ipAddress)},validatorPhone(e,t,n){return e.required||t||"0"==t?w.phone.test((t||"").trim())?void n():n(new Error("请输入正确的手机号")):n()},validatorPwd(e,t,n){return e.required||t||"0"==t?(t+"").trim().length<6?n(new Error("密码长度不能小于6位")):void n():n()},convertArrayValue(e,t){let n=t instanceof Array?t:t.split(",");for(let a=0;ae.key&&"0"!=e.key&&e.key+""==n[a]+"");i&&(n[a]=i.value)}return n.join(",")},getText(e,t){let n=e[t.field];if("function"===typeof n)return n(e);if("null"===n||""===n||null===n||void 0===n)return"--";if("date"==t.type)return n.replace("T"," ").split(" ")[0];if("switch"==t.type)return n?"是":"否";if(!t.data)return n;if("selectList"==t.type||"checkbox"==t.type)return this.convertArrayValue(t.data,n);var i=t.data.find(e=>e.key==n);return i?i.value:n},onClear(e,t){e.data.splice(0)},onChange(e,t){e.onChange&&"function"===typeof e.onChange&&e.onChange(t,e)},onRemoteChange(e,t){void 0==t&&e.data.length>0&&(this.formFields[e.field]=e.data[0].key),this.remoteCall=!1,e.onChange&&"function"===typeof e.onChange&&e.onChange(t,e)},getData(e){return e.data},remoteSearch(e,t,n){if(""==n||1==e.data.length&&(n==e.data[0].key||n==e.data[0].value))return;let i;i="function"===typeof e.url?e.url(n,e.dataKey,e):(e.url||"/api/Sys_Dictionary/GetSearchDictionary")+"?dicNo="+e.dataKey+"&value="+n,this.http.post(i).then(t=>{e.loading=!1,e.data=t,this.formRules[e.point.x].splice(e.point.y,1,e)})},getObject(e){return"object"===typeof e?e:new Date(e)},reset(e){if(this.$refs["volform"].resetFields(),this.rangeFields.length&&this.rangeFields.forEach(e=>{this.formFields[e].splice(0),this.formFields[e]=[null,null]}),e)for(const t in this.formFields)e.hasOwnProperty(t)&&(this.formFields[t]=e[t])},fileOnChange(e,t){return this.$refs.volform.clearValidate(t.field),!t.onChange||t.onChange(e)},isReadonly(e){return e.readonly||e.disabled},getRule(e,t){if("switch"==e.type||"range"==e.type)return{required:!1};if(e.validator&&"function"===typeof e.validator)return{validator:(t,n,i)=>{let a=e.validator(t,n);return a?i(new Error(a+"")):i()},required:e.required,trigger:-1!=w.change.indexOf(e.type)?"change":"blur"};if(-1!=["img","excel","file"].indexOf(e.type))return{validator:(t,n,i)=>!e.required||this.isReadonly(e)||n&&n.length?i():i(new Error("img"==e.type?"请上传照片":"请上传文件")),required:e.required,trigger:"change"};if("number"==e.type||"number"==e.columnType||"int"==e.columnType||"decimal"==e.type)return e.required&&"number"!==typeof e.min&&(e.min=0),{required:e.required,message:e.title,title:e.title,trigger:"blur",min:e.min,max:e.max,type:e.columnType||e.type,validator:(n,i,a)=>{if(!n.min&&!n.max){if(n.required&&""==i)return t[w.field]=0,a();if(""===i||void 0===i)return a()}if(this.isReadonly(e))return a();if("number"==n.type){if(!w.number.test(i))return n.message=n.title+"只能是整数",a(new Error(n.message))}else if(!w.decimal.test(i))return n.message=n.title+"只能是数字",a(new Error(n.message));return void 0!==n.min&&"number"===typeof n.min&&in.max?(n.message=n.title+"不能大于"+n.max,a(new Error(n.message))):a()}};if("password"==e.type||"phone"==e.type)return{validator:"phone"==e.type?this.validatorPhone:this.validatorPwd,required:e.required,trigger:"blur"};if(!e.required&&"mail"!=e.type)return{required:!1};if(e.hasOwnProperty("type")||(e.type="text"),-1!=j.indexOf(e.type)){let t=e.title+("mail"==e.type?"必须是一个邮箱地址":"不能为空"),n="mail"==e.type?"email":x[e.columnType],i={required:!0,message:t,trigger:"blur",type:n,validator:(t,n,i)=>this.isReadonly(e)||""!==n&&void 0!==n&&null!==n?i():i(new Error(t.message))};return"mail"==e.type?(i.required=e.required,[i,{type:n,message:t,trigger:"blur"}]):(e.min&&(i.min=e.min,i.message=e.title+"至少"+e.min+"个字符!"),e.max?[i,{max:e.max,required:!0,message:e.title+"最多"+e.max+"个字符!",trigger:"blur"}]:i)}if("radio"==e.type)return{required:e.required,message:"请选择"+e.title,trigger:"change",type:"string"};if("date"==e.type||"datetime"==e.type||"time"==e.type)return{required:!0,message:"请选择"+e.title,trigger:"change",type:e.range?"array":"string",validator:(t,n,i)=>this.isReadonly(e)?i():!n||e.range&&!n.length?i(new Error("请选择日期")):i()};if("cascader"==e.type)return{type:"array",required:!0,min:e.min||1,trigger:"change",validator:(t,n,i)=>{if(this.isReadonly(e))return i();let a=this.formFields[e.field];return a&&a.length?i():i(new Error("请选择"+e.title))}};if(-1!=["select","selectList","checkbox","cascader"].indexOf(e.type)){let t={type:"select"==e.type?"string":"array",required:!0,min:e.min||1,message:"请选择"+e.title,trigger:"change",validator:(t,n,i)=>this.isReadonly(e)?i():void 0==n||""===n?i(new Error(t.message)):"checkbox"!=e.type&&"selectList"!=e.type||n instanceof Array&&n.length?i():i(new Error(t.message))};return t.max&&(t.nax=e.max,t.message="最多只能选择"+e.max+"项"),t}return{}},compareDate(e,t){return!t||e.valueOf()<("number"==typeof t?t:new Date(t).valueOf())},getDateOptions(e,t){return!(!t.min&&!t.max||!e)&&(t.min&&-1==t.min.indexOf(" ")&&(t.min=t.min+" 00:00:000"),this.compareDate(e,t.min)||!this.compareDate(e,t.max))},getDateFormat(e){return"date"==e.type?"YYYY-MM-DD":"YYYY-MM-DD HH:mm:ss"},dateRangeChange(e,t){e?t.onChange&&t.onChange(e):this.$emit("update:formFields")},onKeyPress(e,t){13!=e.keyCode&&t.onKeyPress(e)}}}),B=(n("3cf0"),n("d959")),D=n.n(B);const E=D()(C,[["render",k],["__scopeId","data-v-49ad6c9a"]]);t["a"]=E},"731d":function(e,t,n){e.exports=n.p+"img/error-img.7cbea5ed.png"},"7ca0":function(e,t,n){"use strict";n("9d35")},"8ccf":function(e,t,n){},"99ec":function(e,t,n){},"9d35":function(e,t,n){},"9d4f":function(e,t,n){"use strict";n("99ec")},be77:function(e,t,n){},c1fb:function(e,t,n){"use strict";var i=n("bc3a"),a=n.n(i),o=n("4360"),l=n("6605"),r=n("3ef4"),s=n("90b1");Object(l["c"])();let c;a.a.defaults.timeout=5e4,a.a.defaults.headers.post["Content-Type"]="application/x-www-form-urlencoded;charset=UTF-8";let d=!1;a.a.defaults.baseURL="http://192.168.20.250:8098/";let h=a.a.defaults.baseURL;function u(){c&&c.close(),d&&(d=!1,c&&c.close())}function m(e){e.headers?"1"==e.headers.vol_exp&&j():"1"==e.getResponseHeader("vol_exp")&&j()}a.a.interceptors.request.use(e=>e,e=>Promise.reject(e)),a.a.interceptors.response.use(e=>(u(),m(e),Promise.resolve(e)),e=>{u();let t="";if(e.response){if("401"==e.response.status&&e.response.data&&401==e.response.data.code)return localStorage.getItem("user")||r["a"].error({showClose:!0,message:"登陆已过期",type:"error"}),void w();"404"==e.response.status?t="未找到请求地址":e.response.data&&e.response.data.message&&(t=e.response.data.message)}else t="服务器处理异常";return O(t),Promise.reject(e.response||{},t)});const p="Authorization";function f(e){e&&!d&&(c=s["a"].service({target:"#loading-container",customClass:"el-loading",text:"string"==typeof e?e:"正在处理.....",spinner:"el-icon-loading",background:"rgba(58, 61, 63, 0.32)"}))}function b(){return o["a"].getters.getToken()}function y(e,t,n,i){return f(n),a.a.defaults.headers[p]=b(),new Promise((n,o)=>{a.a.post(e,t,i).then(e=>{n(e.data)},e=>{o(e&&e.data&&e.data.message?e.data.message:"服务器处理异常")}).catch(e=>{o(e)})})}function g(e,t,n,i){return f(n),a.a.defaults.headers[p]=b(),new Promise((n,o)=>{a.a.get(e,{params:t},i).then(e=>{n(e.data)},e=>{o(e)}).catch(e=>{o(e)})})}function k(){if(XMLHttpRequest)return new XMLHttpRequest;if(ActiveXObject){if("string"!=typeof arguments.callee.activeXString)for(var e=["MSXML2.XMLHttp.6.0","MSXML2.XMLHttp","MSXML2.XMLHttp.3.0"],t=0;t