(function(e){function t(t){for(var l,o,r=t[0],s=t[1],d=t[2],c=0,h=[];c<r.length;c++)o=r[c],Object.prototype.hasOwnProperty.call(n,o)&&n[o]&&h.push(n[o][0]),n[o]=0;for(l in s)Object.prototype.hasOwnProperty.call(s,l)&&(e[l]=s[l]);u&&u(t);while(h.length)h.shift()();return a.push.apply(a,d||[]),i()}function i(){for(var e,t=0;t<a.length;t++){for(var i=a[t],l=!0,o=1;o<i.length;o++){var r=i[o];0!==n[r]&&(l=!1)}l&&(a.splice(t--,1),e=s(s.s=i[0]))}return e}var l={},o={app:0},n={app:0},a=[];function r(e){return s.p+"js/"+({}[e]||e)+"."+{"chunk-0659c823":"0c26e5de","chunk-100deebe":"052667f1","chunk-178b135d":"a3f16dd8","chunk-1afb6251":"2baa2ac6","chunk-1faed30e":"bc83d8e8","chunk-21e971a1":"6df273a2","chunk-6c3c88e2":"38b629d5","chunk-6ff94f8b":"2915b958","chunk-8d10e410":"2ca279cf","chunk-23b4e563":"bf9bf6a7","chunk-2661d3c7":"c848c13a","chunk-27fe8c2e":"29b4b656","chunk-2b5b498f":"a6e2cb7e","chunk-2d009d9e":"e04a34cb","chunk-2d0a38d5":"159b4f21","chunk-2d0b61b6":"64998cae","chunk-2d0ba481":"9d4539f0","chunk-2d0db7f7":"301f19aa","chunk-2d0dd6ac":"aa73d0bc","chunk-2d0e5be0":"1f552d06","chunk-2d21061e":"b21fdb34","chunk-2d21d7c9":"2bce277d","chunk-2d222d3a":"93694a5a","chunk-2d23811f":"195cfcc1","chunk-30d65b08":"e960dffe","chunk-3c05be2f":"f12004fc","chunk-3d6fa925":"39ff89d6","chunk-413701c4":"b121cafd","chunk-4685d204":"87bc0cdc","chunk-509f465c":"58e914c8","chunk-57d95c0c":"3bcb95ac","chunk-5c6923ba":"20bc5109","chunk-71eecf85":"38411951","chunk-736dabb1":"70a3eb87","chunk-878951ee":"cbd7e130","chunk-a21cd7c6":"8a1374f4","chunk-c3be1c5a":"1c499431","chunk-e734655e":"45198561","chunk-000f2b04":"24164276"}[e]+".js"}function s(t){if(l[t])return l[t].exports;var i=l[t]={i:t,l:!1,exports:{}};return e[t].call(i.exports,i,i.exports,s),i.l=!0,i.exports}s.e=function(e){var t=[],i={"chunk-0659c823":1,"chunk-100deebe":1,"chunk-178b135d":1,"chunk-1afb6251":1,"chunk-1faed30e":1,"chunk-6c3c88e2":1,"chunk-6ff94f8b":1,"chunk-8d10e410":1,"chunk-23b4e563":1,"chunk-2661d3c7":1,"chunk-27fe8c2e":1,"chunk-2b5b498f":1,"chunk-2d009d9e":1,"chunk-30d65b08":1,"chunk-3c05be2f":1,"chunk-3d6fa925":1,"chunk-413701c4":1,"chunk-4685d204":1,"chunk-509f465c":1,"chunk-57d95c0c":1,"chunk-5c6923ba":1,"chunk-71eecf85":1,"chunk-736dabb1":1,"chunk-878951ee":1,"chunk-a21cd7c6":1,"chunk-c3be1c5a":1,"chunk-e734655e":1,"chunk-000f2b04":1};o[e]?t.push(o[e]):0!==o[e]&&i[e]&&t.push(o[e]=new Promise((function(t,i){for(var l="css/"+({}[e]||e)+"."+{"chunk-0659c823":"6b7e673c","chunk-100deebe":"364b1b02","chunk-178b135d":"6d9e758e","chunk-1afb6251":"83aa3ad3","chunk-1faed30e":"922a028a","chunk-21e971a1":"31d6cfe0","chunk-6c3c88e2":"41a5a6c5","chunk-6ff94f8b":"eb4370e8","chunk-8d10e410":"33b5d690","chunk-23b4e563":"5a94c681","chunk-2661d3c7":"83aa3ad3","chunk-27fe8c2e":"02dcb730","chunk-2b5b498f":"b8409ffb","chunk-2d009d9e":"83aa3ad3","chunk-2d0a38d5":"31d6cfe0","chunk-2d0b61b6":"31d6cfe0","chunk-2d0ba481":"31d6cfe0","chunk-2d0db7f7":"31d6cfe0","chunk-2d0dd6ac":"31d6cfe0","chunk-2d0e5be0":"31d6cfe0","chunk-2d21061e":"31d6cfe0","chunk-2d21d7c9":"31d6cfe0","chunk-2d222d3a":"31d6cfe0","chunk-2d23811f":"31d6cfe0","chunk-30d65b08":"5e7da194","chunk-3c05be2f":"8275b5b3","chunk-3d6fa925":"bc51e177","chunk-413701c4":"fb51b708","chunk-4685d204":"8733202c","chunk-509f465c":"0c0f55b3","chunk-57d95c0c":"88db29c8","chunk-5c6923ba":"b1033fb3","chunk-71eecf85":"bb63e4bf","chunk-736dabb1":"82f85478","chunk-878951ee":"bf8490b2","chunk-a21cd7c6":"6fa2fa96","chunk-c3be1c5a":"05d8446c","chunk-e734655e":"ebb7f287","chunk-000f2b04":"efe01407"}[e]+".css",n=s.p+l,a=document.getElementsByTagName("link"),r=0;r<a.length;r++){var d=a[r],c=d.getAttribute("data-href")||d.getAttribute("href");if("stylesheet"===d.rel&&(c===l||c===n))return t()}var h=document.getElementsByTagName("style");for(r=0;r<h.length;r++){d=h[r],c=d.getAttribute("data-href");if(c===l||c===n)return t()}var u=document.createElement("link");u.rel="stylesheet",u.type="text/css",u.onload=t,u.onerror=function(t){var l=t&&t.target&&t.target.src||n,a=new Error("Loading CSS chunk "+e+" failed.\n("+l+")");a.code="CSS_CHUNK_LOAD_FAILED",a.request=l,delete o[e],u.parentNode.removeChild(u),i(a)},u.href=n;var m=document.getElementsByTagName("head")[0];m.appendChild(u)})).then((function(){o[e]=0})));var l=n[e];if(0!==l)if(l)t.push(l[2]);else{var a=new Promise((function(t,i){l=n[e]=[t,i]}));t.push(l[2]=a);var d,c=document.createElement("script");c.charset="utf-8",c.timeout=120,s.nc&&c.setAttribute("nonce",s.nc),c.src=r(e);var h=new Error;d=function(t){c.onerror=c.onload=null,clearTimeout(u);var i=n[e];if(0!==i){if(i){var l=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;h.message="Loading chunk "+e+" failed.\n("+l+": "+o+")",h.name="ChunkLoadError",h.type=l,h.request=o,i[1](h)}n[e]=void 0}};var u=setTimeout((function(){d({type:"timeout",target:c})}),12e4);c.onerror=c.onload=d,document.head.appendChild(c)}return Promise.all(t)},s.m=e,s.c=l,s.d=function(e,t,i){s.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},s.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.t=function(e,t){if(1&t&&(e=s(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(s.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var l in e)s.d(i,l,function(t){return e[t]}.bind(null,l));return i},s.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return s.d(t,"a",t),t},s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},s.p="/",s.oe=function(e){throw console.error(e),e};var d=window["webpackJsonp"]=window["webpackJsonp"]||[],c=d.push.bind(d);d.push=t,d=d.slice();for(var h=0;h<d.length;h++)t(d[h]);var u=c;a.push([0,"chunk-vendors"]),i()})({0:function(e,t,i){e.exports=i("56d7")},"09bf":function(e,t,i){},"0b13":function(e,t,i){"use strict";var l=i("c1b7");const o={class:"mask"},n={class:"message"},a={key:0,class:"column-required"},r=["onClick","textContent"],s=["onClick","innerHTML"],d={key:2},c={key:3},h=["onClick"],u=["onerror","onClick","src"],m=["onClick"],p={key:2,class:"edit-el"},f=["onUpdate:modelValue","disabled"],b={key:0,class:"extra"},y=["onClick"],g=["onClick","textContent"],O=["onerror","onClick","src"],k=["onClick"],w={key:3},j=["onClick","innerHTML"],C=["onClick"],v=["onClick"],x=["onClick"],B={key:8},E={class:"block pagination",key:"pagination-01",style:{display:"flex"}},F={style:{height:"200px",display:"flex","align-items":"center"}},D={style:{"text-align":"center"}};function V(e,t,i,V,S,N){const A=Object(l["resolveComponent"])("el-table-column"),T=Object(l["resolveComponent"])("table-render"),I=Object(l["resolveComponent"])("el-date-picker"),R=Object(l["resolveComponent"])("el-time-picker"),U=Object(l["resolveComponent"])("el-switch"),P=Object(l["resolveComponent"])("el-select-v2"),$=Object(l["resolveComponent"])("el-option"),z=Object(l["resolveComponent"])("el-select"),L=Object(l["resolveComponent"])("el-input"),_=Object(l["resolveComponent"])("el-tag"),M=Object(l["resolveComponent"])("el-table"),K=Object(l["resolveComponent"])("el-pagination"),H=Object(l["resolveComponent"])("VolUpload"),q=Object(l["resolveComponent"])("el-button"),J=Object(l["resolveComponent"])("VolBox");return Object(l["openBlock"])(),Object(l["createElementBlock"])(l["Fragment"],null,[Object(l["createElementVNode"])("div",{class:Object(l["normalizeClass"])(["vol-table",[e.textInline?"text-inline":"",e.fxRight?"fx-right":"",e.isChrome?"chrome":""]])},[Object(l["withDirectives"])(Object(l["createElementVNode"])("div",o,null,512),[[l["vShow"],e.loading]]),Object(l["withDirectives"])(Object(l["createElementVNode"])("div",n,"加载中.....",512),[[l["vShow"],e.loading]]),(Object(l["openBlock"])(),Object(l["createBlock"])(M,{"show-summary":e.summary,"summary-method":e.getSummaryData,"row-key":e.rowKey,key:e.randomTableKey,lazy:"",stripe:"",load:e.loadTreeChildren,onSelect:e.userSelect,onSelectAll:e.userSelect,onSelectionChange:e.selectionChange,onRowDblclick:e.rowDbClick,onRowClick:e.rowClick,onHeaderClick:e.headerClick,"highlight-current-row":e.highlightCurrentRow,ref:"table",class:"v-table",onSortChange:e.sortChange,"tooltip-effect":"dark",height:e.realHeight,"max-height":e.realMaxHeight,data:e.url?e.rowData:e.tableData,border:"","row-class-name":e.initIndex,"cell-style":e.getCellStyle,style:{width:"100%"},"scrollbar-always-on":!0},{default:Object(l["withCtx"])(()=>[e.ck?(Object(l["openBlock"])(),Object(l["createBlock"])(A,{key:0,type:"selection",fixed:e.fixed,selectable:e.selectable,width:"55"},null,8,["fixed","selectable"])):Object(l["createCommentVNode"])("",!0),e.columnIndex?(Object(l["openBlock"])(),Object(l["createBlock"])(A,{key:1,type:"index",fixed:e.fixed,width:"55"},null,8,["fixed"])):Object(l["createCommentVNode"])("",!0),(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(e.filterColumns,(i,o)=>(Object(l["openBlock"])(),Object(l["createBlock"])(A,{prop:i.field,label:i.title,"min-width":i.width,formatter:e.formatter,fixed:i.fixed,key:i.field+o,align:i.align,sortable:!!i.sort&&"custom","show-overflow-tooltip":!0},{header:Object(l["withCtx"])(()=>[(i.require||i.required)&&i.edit?(Object(l["openBlock"])(),Object(l["createElementBlock"])("span",a,"*")):Object(l["createCommentVNode"])("",!0),Object(l["createTextVNode"])(Object(l["toDisplayString"])(i.title),1)]),default:Object(l["withCtx"])(o=>[(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(e.filterChildrenColumn(i.children),t=>(Object(l["openBlock"])(),Object(l["createBlock"])(A,{style:{border:"none"},key:t.field,"min-width":t.width,"class-name":t.class,prop:t.field,align:t.align,label:t.title},{default:Object(l["withCtx"])(o=>[i.link?(Object(l["openBlock"])(),Object(l["createElementBlock"])("a",{key:0,href:"javascript:void(0)",style:{"text-decoration":"none"},onClick:i=>e.link(o.row,t,i),textContent:Object(l["toDisplayString"])(o.row[t.field])},null,8,r)):t.formatter?(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",{key:1,onClick:e=>t.click&&t.click(o.row,t,o.$index),innerHTML:t.formatter(o.row,t,o.$index)},null,8,s)):i.bind?(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",d,Object(l["toDisplayString"])(e.formatter(o.row,t,!0)),1)):"date"==i.type?(Object(l["openBlock"])(),Object(l["createElementBlock"])("span",c,Object(l["toDisplayString"])(e.formatterDate(o.row,t)),1)):(Object(l["openBlock"])(),Object(l["createElementBlock"])(l["Fragment"],{key:4},[Object(l["createTextVNode"])(Object(l["toDisplayString"])(o.row[t.field]),1)],64))]),_:2},1032,["min-width","class-name","prop","align","label"]))),128)),i.render&&"function"==typeof i.render?(Object(l["openBlock"])(),Object(l["createBlock"])(T,{row:o.row,key:"rd-01",index:o.$index,column:i,render:i.render},null,8,["row","index","column","render"])):i.edit&&!i.readonly&&-1!=["file","img","excel"].indexOf(i.edit.type)?(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",{key:1,style:{display:"flex","align-items":"center"},onClick:t[0]||(t[0]=Object(l["withModifiers"])(()=>{},["stop"]))},[Object(l["createElementVNode"])("i",{style:{padding:"3px","margin-right":"10px",color:"#8f9293",cursor:"pointer"},onClick:t=>e.showUpload(o.row,i),class:"el-icon-upload"},null,8,h),(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(e.getFilePath(o.row[i.field],i),(t,n)=>Object(l["withDirectives"])((Object(l["openBlock"])(),Object(l["createElementBlock"])("img",{key:n,onerror:e.defaultImg,onClick:l=>e.viewImg(o.row,i,t.path,l),class:"table-img",src:t.path},null,8,u)),[[l["vShow"],"img"==i.edit.type]])),128)),(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(e.getFilePath(o.row[i.field],i),(t,o)=>Object(l["withDirectives"])((Object(l["openBlock"])(),Object(l["createElementBlock"])("a",{style:{"margin-right":"8px"},class:"t-file",key:o,onClick:i=>e.dowloadFile(t)},Object(l["toDisplayString"])(t.name),9,m)),[[l["vShow"],"img"!=i.edit.type]])),128))])):!i.edit||i.readonly||!i.edit.keep&&e.edit.rowIndex!=o.$index?(Object(l["openBlock"])(),Object(l["createElementBlock"])(l["Fragment"],{key:3},[i.link?(Object(l["openBlock"])(),Object(l["createElementBlock"])("a",{key:0,href:"javascript:void(0)",style:{"text-decoration":"none"},onClick:t=>e.link(o.row,i,t),textContent:Object(l["toDisplayString"])(o.row[i.field])},null,8,g)):"img"==i.type?(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],{key:1},Object(l["renderList"])(e.getFilePath(o.row[i.field],i),(t,n)=>(Object(l["openBlock"])(),Object(l["createElementBlock"])("img",{key:n,onerror:e.defaultImg,onClick:l=>e.viewImg(o.row,i,t.path,l),class:"table-img",src:t.path},null,8,O))),128)):"file"==i.type||"excel"==i.type?(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],{key:2},Object(l["renderList"])(e.getFilePath(o.row[i.field],i),(t,i)=>(Object(l["openBlock"])(),Object(l["createElementBlock"])("a",{style:{"margin-right":"8px"},class:"t-file",key:i,onClick:i=>e.dowloadFile(t)},Object(l["toDisplayString"])(t.name),9,k))),128)):"date"==i.type?(Object(l["openBlock"])(),Object(l["createElementBlock"])("span",w,Object(l["toDisplayString"])(e.formatterDate(o.row,i)),1)):i.formatter?(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",{key:4,onClick:t=>e.formatterClick(o.row,i,t),innerHTML:i.formatter(o.row,i)},null,8,j)):i.bind&&(i.normal||i.edit)?(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",{key:5,onClick:t=>e.formatterClick(o.row,i,t),style:Object(l["normalizeStyle"])(i.getStyle&&i.getStyle(o.row,i))},Object(l["toDisplayString"])(e.formatter(o.row,i,!0)),13,C)):i.click&&!i.bind?(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",{key:6,onClick:t=>e.formatterClick(o.row,i)},Object(l["toDisplayString"])(o.row[i.field]),9,v)):i.bind?(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",{key:7,onClick:()=>{i.click&&e.formatterClick(o.row,i)}},[e.useTag?(Object(l["openBlock"])(),Object(l["createBlock"])(_,{key:0,class:Object(l["normalizeClass"])([e.isEmptyTag(o.row,i)]),type:e.getColor(o.row,i),effect:i.effect},{default:Object(l["withCtx"])(()=>[Object(l["createTextVNode"])(Object(l["toDisplayString"])(e.formatter(o.row,i,!0)),1)]),_:2},1032,["class","type","effect"])):(Object(l["openBlock"])(),Object(l["createElementBlock"])(l["Fragment"],{key:1},[Object(l["createTextVNode"])(Object(l["toDisplayString"])(e.formatter(o.row,i,!0)),1)],64))],8,x)):(Object(l["openBlock"])(),Object(l["createElementBlock"])("span",B,Object(l["toDisplayString"])(e.formatter(o.row,i,!0)),1))],64)):(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",p,[Object(l["createElementVNode"])("div",{onClick:t[1]||(t[1]=Object(l["withModifiers"])(()=>{},["stop"])),class:"e-item"},[Object(l["createElementVNode"])("div",null,[-1!=["date","datetime"].indexOf(i.edit.type)?(Object(l["openBlock"])(),Object(l["createBlock"])(I,{key:0,clearable:"",size:"default",style:{width:"100%"},modelValue:o.row[i.field],"onUpdate:modelValue":e=>o.row[i.field]=e,onChange:e=>{i.onChange&&i.onChange(o.row,i,e)},type:i.edit.type,placeholder:i.placeholder||i.title,disabledDate:t=>e.getDateOptions(t,i),"value-format":e.getDateFormat(i),disabled:e.initColumnDisabled(o.row,i)},null,8,["modelValue","onUpdate:modelValue","onChange","type","placeholder","disabledDate","value-format","disabled"])):"time"==i.edit.type?(Object(l["openBlock"])(),Object(l["createBlock"])(R,{key:1,clearable:"",size:"default",style:{width:"100%"},modelValue:o.row[i.field],"onUpdate:modelValue":e=>o.row[i.field]=e,onChange:e=>{i.onChange&&i.onChange(o.row,i,e)},placeholder:i.placeholder||i.title,"value-format":i.format||"HH:mm:ss",disabled:e.initColumnDisabled(o.row,i)},null,8,["modelValue","onUpdate:modelValue","onChange","placeholder","value-format","disabled"])):"switch"==i.edit.type?(Object(l["openBlock"])(),Object(l["createBlock"])(U,{key:2,modelValue:o.row[i.field],"onUpdate:modelValue":e=>o.row[i.field]=e,"active-color":"#0f84ff","inactive-color":"rgb(194 194 194)",onChange:t=>{e.switchChange(t,o.row,i)},"active-value":"boolean"==typeof o.row[i.field]||("string"==typeof o.row[i.field]?"1":1),"inactive-value":"boolean"!=typeof o.row[i.field]&&("string"==typeof o.row[i.field]?"0":0),disabled:e.initColumnDisabled(o.row,i)},null,8,["modelValue","onUpdate:modelValue","onChange","active-value","inactive-value","disabled"])):-1!=["select","selectList"].indexOf(i.edit.type)?(Object(l["openBlock"])(),Object(l["createElementBlock"])(l["Fragment"],{key:3},[i.bind.data.length>=e.select2Count?(Object(l["openBlock"])(),Object(l["createBlock"])(P,{key:0,style:{width:"100%"},size:e.size,modelValue:o.row[i.field],"onUpdate:modelValue":e=>o.row[i.field]=e,filterable:"",multiple:"select"!=i.edit.type,placeholder:i.placeholder||i.title,autocomplete:i.autocomplete,options:i.bind.data,onChange:e=>i.onChange&&i.onChange(o.row,i),clearable:"",disabled:e.initColumnDisabled(o.row,i)},{default:Object(l["withCtx"])(({item:e})=>[Object(l["createTextVNode"])(Object(l["toDisplayString"])(e.label),1)]),_:2},1032,["size","modelValue","onUpdate:modelValue","multiple","placeholder","autocomplete","options","onChange","disabled"])):(Object(l["openBlock"])(),Object(l["createBlock"])(z,{key:1,size:"default",style:{width:"100%"},modelValue:o.row[i.field],"onUpdate:modelValue":e=>o.row[i.field]=e,filterable:!!(i.filter||i.bind.data.length>10),multiple:"select"==i.edit.type,placeholder:i.placeholder||i.title,autocomplete:i.autocomplete,onChange:e=>i.onChange&&i.onChange(o.row,i),clearable:"",disabled:e.initColumnDisabled(o.row,i)},{default:Object(l["withCtx"])(()=>[(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(i.bind.data,e=>Object(l["withDirectives"])((Object(l["openBlock"])(),Object(l["createBlock"])($,{key:e.key,disabled:e.disabled,label:e.value,value:e.key},{default:Object(l["withCtx"])(()=>[Object(l["createTextVNode"])(Object(l["toDisplayString"])(e.value),1)]),_:2},1032,["disabled","label","value"])),[[l["vShow"],!e.hidden]])),128))]),_:2},1032,["modelValue","onUpdate:modelValue","filterable","multiple","placeholder","autocomplete","onChange","disabled"]))],64)):"textarea"==i.edit.type?(Object(l["openBlock"])(),Object(l["createBlock"])(L,{key:4,type:"textarea",placeholder:i.placeholder||i.title,modelValue:o.row[i.field],"onUpdate:modelValue":e=>o.row[i.field]=e,disabled:e.initColumnDisabled(o.row,i)},null,8,["placeholder","modelValue","onUpdate:modelValue","disabled"])):i.summary||i.onKeyPress?(Object(l["openBlock"])(),Object(l["createBlock"])(L,{key:6,onChange:t=>e.inputKeyPress(o.row,i,t),onInput:t=>e.inputKeyPress(o.row,i,t),onKeyup:Object(l["withKeys"])(t=>e.inputKeyPress(o.row,i,t),["enter"]),size:"default",modelValue:o.row[i.field],"onUpdate:modelValue":e=>o.row[i.field]=e,placeholder:i.placeholder||i.title,disabled:e.initColumnDisabled(o.row,i)},null,8,["onChange","onInput","onKeyup","modelValue","onUpdate:modelValue","placeholder","disabled"])):Object(l["withDirectives"])((Object(l["openBlock"])(),Object(l["createElementBlock"])("input",{key:5,class:"table-input","onUpdate:modelValue":e=>o.row[i.field]=e,disabled:e.initColumnDisabled(o.row,i)},null,8,f)),[[l["vModelText"],o.row[i.field],void 0,{lazy:!0}]])]),i.extra&&e.edit.rowIndex==o.$index?(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",b,[Object(l["createElementVNode"])("a",{style:Object(l["normalizeStyle"])([i.extra.style,{"text-decoration":"none"}]),onClick:t=>e.extraClick(o.row,i)},[i.extra.icon?(Object(l["openBlock"])(),Object(l["createElementBlock"])("i",{key:0,class:Object(l["normalizeClass"])([i.extra.icon])},null,2)):Object(l["createCommentVNode"])("",!0),Object(l["createTextVNode"])(" "+Object(l["toDisplayString"])(i.extra.text),1)],12,y)])):Object(l["createCommentVNode"])("",!0)])]))]),_: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","highlight-current-row","onSortChange","height","max-height","data","row-class-name","cell-style"])),e.paginationHide?Object(l["createCommentVNode"])("",!0):(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",E,[t[4]||(t[4]=Object(l["createElementVNode"])("div",{style:{flex:"1"}},null,-1)),Object(l["createVNode"])(K,{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),Object(l["createVNode"])(J,{modelValue:e.uploadModel,"onUpdate:modelValue":t[3]||(t[3]=t=>e.uploadModel=t),title:"上传",height:228,width:500,padding:15,lazy:""},{footer:Object(l["withCtx"])(()=>[Object(l["createElementVNode"])("div",D,[Object(l["createVNode"])(q,{type:"default",size:"small",onClick:t[2]||(t[2]=t=>e.uploadModel=!1)},{default:Object(l["withCtx"])(()=>t[5]||(t[5]=[Object(l["createTextVNode"])("关闭")])),_:1}),Object(l["createVNode"])(q,{type:"primary",size:"small",onClick:e.saveUpload},{default:Object(l["withCtx"])(()=>t[6]||(t[6]=[Object(l["createTextVNode"])("保存")])),_:1},8,["onClick"])])]),default:Object(l["withCtx"])(()=>[Object(l["createElementVNode"])("div",F,[Object(l["createVNode"])(H,{style:{"text-align":"center"},autoUpload:e.currentColumn.edit.autoUpload,multiple:e.currentColumn.edit.multiple,url:e.uploadUrl,"max-file":e.currentColumn.edit.maxFile,img:"img"==e.currentColumn.edit.type,excel:"excel"==e.currentColumn.edit.type,fileTypes:e.currentColumn.edit.fileTypes?e.currentColumn.edit.fileTypes:[],fileInfo:e.fileInfo,"upload-after":e.uploadAfter},{default:Object(l["withCtx"])(()=>[Object(l["createElementVNode"])("div",null,Object(l["toDisplayString"])(e.currentColumn.message),1)]),_:1},8,["autoUpload","multiple","url","max-file","img","excel","fileTypes","fileInfo","upload-after"])])]),_:1},8,["modelValue"])],64)}i("5948");var S={name:"TableExpand",functional:!0,props:{render:Function,row:{},column:{},index:{type:Number,default:0}},render:({render:e,row:t,column:i,index:o})=>e(l["h"],{row:t,column:i,index:o})};let N;var A=Object(l["defineComponent"])({watch:{"tableData.length":{handler(e,t){this.watchRowSelectChange(e,t)}},"rowData.length":{handler(e,t){this.watchRowSelectChange(e,t)}}},components:{"table-render":S,VolUpload:Object(l["defineAsyncComponent"])(()=>i.e("chunk-4685d204").then(i.bind(null,"14cf"))),VolBox:Object(l["defineAsyncComponent"])(()=>i.e("chunk-30d65b08").then(i.bind(null,"0d63")))},props:{rowKey:{typeof:String,default:void 0},loadTreeChildren:{type:Function,default:(e,t,i)=>i([])},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,i){return!0}},endEditBefore:{type:Function,default:function(e,t,i){return!0}},endEditAfter:{type:Function,default:function(e,t,i){return!0}},ck:{type:Boolean,default:!0},columnIndex:{type:Boolean,default:!0},highlightCurrentRow:{type:Boolean,default:!0},select2Count:{type:Number,default:500},selectable:{type:Function,default:(e,t)=>!0}},data(){return{fixed:!1,clickEdit:!0,randomTableKey:1,visiblyColumns:[],key:"",realHeight:0,realMaxHeight:0,enableEdit:!1,empty:this.allowEmpty?"":"--",defaultImg:'this.src="'+i("5943")+'"',loading:!1,footer:{},total:0,formatConfig:{},colors:["","warning","success","danger","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:[],isChrome:!1,useTag:!0,currentRow:{},currentColumn:[],fileInfo:[],uploadUrl:"",uploadModel:!1}},created(){try{this.useTag=this.$global.table.useTag}catch(l){console.log(l.message)}this.realHeight=this.getHeight(),this.realMaxHeight=this.getMaxHeight(),this.fxRight=this.columns.some(e=>"right"==e.fixed),this.columns.some(e=>e.fixed&&"right"!=e.fixed)&&(this.fixed=!0);let e=[],t=[];this.summaryData.push("合计"),this.columnIndex&&this.summaryData.push(" "),this.columns.forEach((i,l)=>{i.cellStyle&&(this.cellStyleColumns[i.field]=i.cellStyle),i.hidden||(this.summaryData.push(""),this.summaryIndex[i.field]=this.summaryData.length-1),i.summary&&!this.summary&&(this.summary=!0),!i.bind||!i.bind.key||i.bind.data&&0!=i.bind.data.length||(i.bind.data||(i.bind.data=[]),i.bind.remote?this.remoteColumns.push(i):this.loadKey&&(e.push(i.bind.key),i.bind.valueTyoe=i.type,t.push(i.bind)))}),e.length>0&&this.http.post("/api/Sys_Dictionary/GetVueDictionary",e).then(e=>{e.forEach(e=>{e.data.length>this.select2Count&&e.data.forEach(e=>{e.label=e.value,e.value=e.key}),t.forEach(t=>{t.key!=e.dicNo||"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 i=this.columns.find(e=>e.isKey);i&&(this.key=i.field),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){e<t&&this.selectRows.length&&(this.selectRows=[],this.$refs.table.clearSelection())},switchChange(e,t,i){Object.keys(t).length<=1||i.onChange&&i.onChange(e,t,i)},inputKeyPress(e,t,i,l){t.onKeyPress&&t.onKeyPress(e,t,i),this.getInputSummaries(null,null,i,t)},extraClick(e,t){t.extra.click&&t.extra.click(e,t,this.url?this.rowData:this.tableData)},headerClick(e,t){this.clickEdit&&-1!=this.edit.rowIndex&&this.rowEndEdit(this.url?this.rowData[this.edit.rowIndex]:this.tableData[this.edit.rowIndex],e)&&(this.edit.rowIndex=-1)},rowDbClick(e,t,i){this.$emit("rowDbClick",{row:e,column:t,event:i})},rowClick(e,t,i){if(t&&(-1==this.edit.rowIndex&&this.$emit("rowClick",{row:e,column:t,event:i}),this.doubleEdit)){if(this.clickEdit&&-1!=this.edit.rowIndex){if(e.elementIndex==this.edit.rowIndex){let l=this.columns.find(e=>e.field==(i&&i.property||t.property));return void(!l||l.edit&&!l.readonly||this.rowEndEdit(e,i)&&(this.edit.rowIndex=-1))}this.rowEndEdit(e,i&&i.property?i:t)&&(this.edit.rowIndex=-1),-1==this.edit.rowIndex&&this.$emit("rowClick",{row:e,column:t,event:i})}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 i;i=t.base64&&-1!=e.indexOf("data")?(","+e).split(",data").filter(e=>e).map(e=>"data"+e):e.replace(/\\/g,"/").split(",");let l=[];for(let o=0;o<i.length;o++){let e=i[o];if(t.base64)l.push({name:"",path:(-1==e.indexOf("data")?"data:image/png;base64,":"")+e});else if(-1!=e.indexOf(".")){let t=e.split("/");t.length>0&&l.push({name:t[t.length-1],path:this.base.isUrl(e)?e:this.http.ipAddress+e})}}return l},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,i){t.click?(t.click(e,t,i),i.stopPropagation&&i.stopPropagation()):this.rowClick(e,t,i)},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 i=this.columns.find(e=>e.field==t.property);if(i){if(i.readonly)return;if(!i.edit||i.edit.keep&&"switch"==i.edit.type)return}if(this.enableEdit&&(N="",this.columns.filter(e=>e.bind&&e.bind.data&&e.bind.data.length).forEach(t=>{let i=e[t.field];if("string"==typeof t.bind.data[0].key)"number"==typeof i&&(e[t.field]=e[t.field]+"");else if("string"==typeof i&&i){let l=1*i;l+""===i&&(e[t.field]=l)}}),this.beginEdit(e,t,e.elementIndex)&&e.hasOwnProperty("elementIndex"))){if(this.edit.rowIndex==e.elementIndex)return;this.edit.rowIndex=e.elementIndex}},rowEndEdit(e,t,i){if(this.clickEdit&&i)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&&i)return!0;let l=this.url?this.rowData[this.edit.rowIndex]:this.tableData[this.edit.rowIndex];if(!this.endEditBefore(l,t,this.edit.rowIndex))return!1;if(-1!=this.edit.rowIndex){if(this.edit.rowIndex-1>(this.rowData||this.tableData).length)return void(this.edit.rowIndex=-1);let e=(this.url?this.rowData:this.tableData)[this.edit.rowIndex];for(let t=0;t<this.columns.length;t++){const i=this.columns[t];if(i.edit&&!this.validateRow(e,i))return}}return!!this.endEditAfter(l,t,this.edit.rowIndex)&&(this.edit.rowIndex=-1,!0)},validateRow(e,t){return this.validateColum(t,e)?(this.errorFiled="",!0):(this.errorFiled=t.field,this.$message.error(t.title+N),!1)},validateColum(e,t){if(e.hidden||e.bind)return!0;let i=t[e.field];if((e.require||e.required)&&"0"!=i&&(""===i||void 0===i))return this.errorFiled||(N="不能为空"),!1;if(!e.edit)return!0;let l=e.edit.type;if("int"==l||"decimal"==l||"number"==l){if(""==i||void 0==i)return!0;if("decimal"==l){if(!this.rule.decimal.test(i))return N="只能是数字",!1}else if(!this.rule.decimal.test(i))return N="只能是数字",!1;return void 0!=e.edit.min&&"number"===typeof e.edit.min&&i<e.edit.min?(N="不能小于"+e.edit.min,!1):!(void 0!=e.edit.max&&"number"===typeof e.edit.max&&i>e.edit.max)||(N="不能大于"+e.edit.max,!1)}if(i&&("text"==l||"string"==l)){if(void 0!=e.edit.min&&"number"===typeof e.edit.min&&i.length<e.edit.min)return N="至少"+e.edit.min+"个字符",!1;if(void 0!=e.edit.max&&"number"===typeof e.edit.max&&i.length>e.edit.max)return N="最多"+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,i=this.getSelectedIndex();if(0==i.length)return this.$Message.error("删除操作必须设置VolTable的属性index='true'");if(0==i.length);else for(let l=t.length-1;l>=0;l--)-1!=i.indexOf(l)&&t.splice(l,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,i,l){l.stopPropagation(),this.base.previewImg(i)},link(e,t,i){i.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 i=0;i<this.remoteColumns.length;i++){const l=this.remoteColumns[i];let o=l.bind.key,n=[];e.forEach(e=>{(e[l.field]||"0"==e[l.field])&&-1==n.indexOf(e[l.field])&&n.push(e[l.field])}),n.length>0&&(t[o]=n)}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))})}),this.$emit("dicInited",e)})},load(e,t){if(!this.url)return;t&&this.resetPage();let i={page:this.paginations.page,rows:this.paginations.rows,sort:this.paginations.sort,order:this.paginations.order,wheres:[]},l=!0;e&&(i=Object.assign(i,e)),this.$emit("loadBefore",i,e=>{l=e}),l&&(i.wheres&&i.wheres instanceof Array&&(i.wheres=JSON.stringify(i.wheres)),this.loading=!0,this.http.post(this.url,i).then(e=>{this.rowKey&&(this.randomTableKey++,this.rowData.splice(0)),this.loading=!1,this.$emit("loadAfter",e.rows||[],e=>{l=e},e),l&&(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.children&&t.children.length?t.children.forEach(t=>{this.getColumnSummaries(t,e)}):this.getColumnSummaries(t,e)}),this.summaryData.length>0&&""==this.summaryData[0]&&(this.summaryData[0]="合计"))},getColumnSummaries(e,t){if(!e.hidden)if(t.summary.hasOwnProperty(e.field)){let i=t.summary[e.field];i&&(i=1*(1*i).toFixed(e.numberLength||2).replace(".00","")),this.summaryData.push(i)}else this.summaryData.push("")},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]}this.$emit("selectionChange",e)},getColor(e,t){let i=e[t.field];if(t.getColor&&"function"===typeof t.getColor){let i=t.getColor(e,t);if(i)return i}if(!i&&"0"!=i)return"";if(!this.formatConfig[t.field])return this.formatConfig[t.field]=[i],this.colors[0];let l=this.formatConfig[t.field].indexOf(i);return-1!=l?this.colors[l]:this.formatConfig[t.field].length>5?"":(-1==l&&(this.formatConfig[t.field].push(i),l=this.formatConfig[t.field].length-1),this.colors[l])},formatterDate(e,t){return(e[t.field]||"").substr(0,10)},formatter(e,t,i){if(!i)return e[t.property];let l=e[t.field];if(!l&&0!=l)return l;if(t.edit&&"switch"==t.edit.type)return l?"是":"否";if(!t.bind||!t.bind.data)return e[t.field];if(t.edit&&("selectList"==t.edit.type||"treeSelect"==t.edit.type))return Array.isArray(l)?l=l.join(","):e[t.field]=l.split(","),this.getSelectFormatter(t,l);if("selectList"==t.bind.type||"checkbox"==t.bind.type||"treeSelect"==t.bind.type)return this.getSelectFormatter(t,l+"");let o=t.bind.data.filter(e=>""!==e.key&&void 0!==e.key&&e.key+""===l+"");return o&&o.length>0&&(l=o[0].label||o[0].value),l},getSelectFormatter(e,t){let i=t.split(",");for(let l=0;l<i.length;l++)(e.bind.orginData&&e.bind.orginData.length?e.bind.orginData:e.bind.data).forEach(e=>{""!==e.key&&void 0!==e.key&&e.key+""==i[l]+""&&(i[l]=e.label||e.value)});return i.join(",")},onChange(e,t,i,l){let o=e.row;l.onChange&&!l.onChange(o,t,i)||this.getInputSummaries(e,t,i,l)},getInputSummaries(e,t,i,l){if(!l.summary)return;let o=0;(this.url?this.rowData:this.tableData).forEach((e,t)=>{e.hasOwnProperty(l.field)&&!isNaN(e[l.field])&&(o+=1*e[l.field])}),o&&("avg"==l.summary&&(o/=this.rowData.length||this.tableData.length||1),o=1*(1*o).toFixed(l.numberLength||2).replace(".00","")),this.summaryData[this.summaryIndex[l.field]]=o},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"},filterChildrenColumn(e){return e?e.filter(e=>!e.hidden):[]},initColumnDisabled(e,t){return t.getDisabled&&t.getDisabled(e,t)},showUpload(e,t){this.fileInfo=(e[t.field]||"").split(",").filter(e=>e).map(e=>({path:e,name:""})),this.currentRow=e,this.currentColumn=t,void 0===this.currentColumn.edit.autoUpload&&(this.currentColumn.edit.autoUpload=!0),void 0===this.currentColumn.edit.multiple&&(this.currentColumn.edit.multiple=!1),void 0===this.currentColumn.edit.url?this.uploadUrl="api/"+(this.url||"").replace("/api","api").split("/")[1]+"/upload":this.uploadUrl=this.currentColumn.edit.url,this.uploadModel=!0},uploadAfter(e,t){return this.currentColumn.uploadAfter&&this.currentColumn.uploadAfter(e,t),!0},saveUpload(){let e=this.fileInfo.map(e=>e.path?e.path:result.data+e.name);return this.currentRow[this.currentColumn.field]=e.join(","),this.uploadModel=!1,!0}}}),T=(i("61f4"),i("bca9"),i("9c21")),I=i.n(T);const R=I()(A,[["render",V],["__scopeId","data-v-29a0847e"]]);t["a"]=R},1356:function(e,t,i){"use strict";i("9c75")},"1b3c":function(e,t,i){},"2a47":function(e,t,i){},4360:function(e,t,i){"use strict";i("5948");var l=i("8da5");const o={USER:"user"};function n(e){if(e.userInfo)return e.userInfo;let t=localStorage.getItem(o.USER);return t&&(e.userInfo=JSON.parse(t)),e.userInfo}t["a"]=Object(l["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(o.USER,JSON.stringify(t))},clearUserInfo(e){e.permission=[],e.userInfo=null,localStorage.removeItem(o.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=>()=>(n(e),e.userInfo),getUserName:e=>()=>(n(e),e.userInfo?e.userInfo.userName:"未获取到登陆信息"),getToken:e=>()=>(n(e),e.userInfo?"Bearer "+e.userInfo.token:""),isLogin:e=>()=>!!n(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,i){"use strict";i.r(t);var l=i("c1b7");function o(e,t,i,o,n,a){const r=Object(l["resolveComponent"])("router-view"),s=Object(l["resolveComponent"])("el-config-provider");return Object(l["openBlock"])(),Object(l["createElementBlock"])(l["Fragment"],null,[t[0]||(t[0]=Object(l["createElementVNode"])("div",{id:"nav"},null,-1)),Object(l["createVNode"])(s,{locale:n.locale},{default:Object(l["withCtx"])(()=>[Object(l["createVNode"])(r)]),_:1},8,["locale"])],64)}var n=i("36e6"),a=i("b9bb"),r=i.n(a),s={name:"vol_app",components:{[n["a"].name]:n["a"]},data(){return{locale:r.a}}},d=(i("1356"),i("9c21")),c=i.n(d);const h=c()(s,[["render",o]]);var u=h,m=i("1654");let p=[{path:"/Sys_Log",name:"sys_Log",component:()=>i.e("chunk-2d21061e").then(i.bind(null,"b83e"))},{path:"/Sys_User",name:"Sys_User",component:()=>i.e("chunk-2d0db7f7").then(i.bind(null,"6fb3"))},{path:"/permission",name:"permission",component:()=>i.e("chunk-3c05be2f").then(i.bind(null,"a81b"))},{path:"/Sys_Dictionary",name:"Sys_Dictionary",component:()=>i.e("chunk-2d222d3a").then(i.bind(null,"cfef"))},{path:"/Sys_Role",name:"Sys_Role",component:()=>i.e("chunk-2d0a38d5").then(i.bind(null,"0351"))},{path:"/Sys_Role1",name:"Sys_Role1",component:()=>i.e("chunk-2d21d7c9").then(i.bind(null,"d205"))},{path:"/Sys_DictionaryList",name:"Sys_DictionaryList",component:()=>i.e("chunk-2d23811f").then(i.bind(null,"fe8b"))},{path:"/deviceInfo",name:"deviceInfo",component:()=>i.e("chunk-e734655e").then(i.bind(null,"935f"))},{path:"/deviceProtocol",name:"deviceProtocol",component:()=>i.e("chunk-2d0dd6ac").then(i.bind(null,"80fd"))},{path:"/deviceProtocolDetail",name:"deviceProtocolDetail",component:()=>i.e("chunk-2d0e5be0").then(i.bind(null,"967d"))},{path:"/dispatchInfo",name:"dispatchInfo",component:()=>i.e("chunk-2d0b61b6").then(i.bind(null,"1c6d"))},{path:"/task",name:"task",component:()=>i.e("chunk-1faed30e").then(i.bind(null,"85cb"))},{path:"/Task_Hty",name:"Task_Hty",component:()=>i.e("chunk-2d0ba481").then(i.bind(null,"3718"))},{path:"/router",name:"router",component:()=>i.e("chunk-100deebe").then(i.bind(null,"0cab"))}];var f=p,b=i("4360");let y=[{path:"/404",name:"404",component:()=>i.e("chunk-2d009d9e").then(i.bind(null,"6707")),meta:{anonymous:!0}},{path:"/401",name:"401",component:()=>i.e("chunk-2661d3c7").then(i.bind(null,"bcc4"))},{path:"/coding",name:"coding",component:()=>i.e("chunk-1afb6251").then(i.bind(null,"6611"))},{path:"/message",name:"message",component:()=>i.e("chunk-413701c4").then(i.bind(null,"cd9b"))}];var g=y;let O=[{path:"/chart",name:"chart",component:()=>Promise.all([i.e("chunk-21e971a1"),i.e("chunk-6ff94f8b")]).then(i.bind(null,"44c3"))},{path:"/formChart",name:"formChart",component:()=>Promise.all([i.e("chunk-21e971a1"),i.e("chunk-8d10e410")]).then(i.bind(null,"2ac0"))},{path:"/flex",name:"flex",component:()=>i.e("chunk-a21cd7c6").then(i.bind(null,"ea54"))}];var k=O;const w=[{path:"/",name:"Index",component:()=>i.e("chunk-23b4e563").then(i.bind(null,"d504")),redirect:"/home",children:[...f,...g,...k,{path:"/home",name:"home",component:()=>i.e("chunk-878951ee").then(i.bind(null,"bb51"))},{path:"/UserInfo",name:"UserInfo",component:()=>i.e("chunk-509f465c").then(i.bind(null,"8f77"))},{path:"/sysMenu",name:"sysMenu",component:()=>i.e("chunk-5c6923ba").then(i.bind(null,"4c04"))},{path:"/coder",name:"coder",component:()=>i.e("chunk-736dabb1").then(i.bind(null,"c016"))}]},{path:"/login",name:"login",component:()=>i.e("chunk-71eecf85").then(i.bind(null,"a55b")),meta:{anonymous:!0}},{path:"/bigdata",name:"bigdata",component:()=>Promise.all([i.e("chunk-21e971a1"),i.e("chunk-6c3c88e2")]).then(i.bind(null,"3142")),meta:{keepAlive:!1}}],j=Object(m["a"])({history:Object(m["b"])(),routes:w});j.beforeEach((e,t,i)=>0==e.matched.length?i({path:"/404"}):(b["a"].dispatch("onLoading",!0),e.hasOwnProperty("meta")&&e.meta.anonymous||b["a"].getters.isLogin()||"/login"==e.path?i():void i({path:"/login",query:{redirect:Math.random()}}))),j.afterEach((e,t)=>{b["a"].dispatch("onLoading",!1)}),j.onError(e=>{try{console.log(e.message),localStorage.setItem("route_error",e.message)}catch(t){}window.location.href="/"});var C=j,v=i("5493");i("0ae6"),i("d66d"),i("5948"),i("c9d7"),i("b6b0"),i("e2d1");let x={addDays(e,t){if(!t)return e;let i=e.split(" ");e=new Date(new Date(e).setDate(new Date(e).getDate()+t));var l=e.getFullYear(),o=e.getMonth()+1;o<10&&(o="0"+o);var n=e.getDate();return n<10&&(n="0"+n),e=l+"-"+o+"-"+n,1==i.length?e:e+" "+i[1]},getDate(e){let t=new Date,i=t.getFullYear(),l=t.getMonth()+1,o=t.getDate(),n=i+"-"+(l<10?"0"+l:l)+"-"+(o<10?"0"+o:o);if(!e)return n;let a=t.getHours(),r=t.getMinutes(),s=t.getSeconds();return n+" "+(a<10?"0"+a:a)+":"+(r<10?"0"+r:r)+":"+(s<10?"0"+s:s)},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_!~*'()\\.;?:@&=+$,%#-]+)+/?)$",i=new RegExp(t,"i");return!!i.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 i="vol-preview",l=document.getElementById(i);if(!l){l=document.createElement("div"),l.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",l.appendChild(t),l.style.position="fixed",l.style.width="100%",l.style.height="100%",l.style.top=0,l.style["z-index"]=9999999;let i=document.createElement("img");return i.setAttribute("class","vol-preview-img"),i.style.position="absolute",i.style.top="50%",i.style.left="50%",i.style["max-width"]="90%",i.style["max-height"]="90%",i.style.transform="translate(-50%,-50%)",i.setAttribute("src",e),l.appendChild(i),l.addEventListener("click",(function(){this.style.display="none"})),void document.body.appendChild(l)}let o=document.body.appendChild(l).querySelector(".vol-preview-img");o.setAttribute("src",e),l.style.display="block"},dowloadFile(e,t,i,l){if(!e)return alert("此文件没有url不能下载");this.isUrl(e)||(e=l+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 i in e.header)t.setRequestHeader(i,e.header[i]);t.onload=function(){if(200==this.status){var e=this.response;callback(window.URL.createObjectURL(e))}},t.send()}},convertTree(e,t){var i=[],l=[];e.length>100&&(e=JSON.parse(JSON.stringify(e))),e.forEach(o=>{o.hidden||void 0===o.id||o.id===o.parentId||e.some(e=>o.parentId==e.id)?t&&t(o,e,!0,i):(o.isRoot=!0,t&&t(o,e,!0,i),l.push(o),E(o.id,o,e,t,i))});var o=e.filter(e=>-1==i.indexOf(e.id)&&!e.hidden);return l.push(...o),l},getTreeAllParent(e,t){var i=[];if(!(t instanceof Array))return i;t.length>100&&(t=JSON.parse(JSON.stringify(t))),t.forEach(e=>{(e.id===e.parentId||t.some(t=>t.parentId===e.id&&t.id===e.parentId))&&(e.parentId=0)});var l=t.find(t=>t.id===e);if(!l)return[];i.push(l);var o=[l.parentId];for(let a=0;a<o.length;a++){var n=t.find(e=>e.id===o[a]&&e.id!==e.parentId);if(!n)return i;o.push(n.parentId),i.unshift(n)}return i},getTreeAllChildren(e,t){var i=[];if(!(t instanceof Array))return i;t.length>100&&(t=JSON.parse(JSON.stringify(t)));var l=t.find(t=>t.id===e);if(!l)return[];i.push(l);var o=[l.id];for(let n=0;n<o.length;n++)t.forEach(e=>{e.parentId===o[n]&&e.parentId!==e.id&&(o.push(e.id),i.unshift(e))});return i},getTreeAllChildrenId(e,t){return this.getTreeAllChildren(e,t).map(e=>e.id)}};var B=x;function E(e,t,i,l,o){-1==o.indexOf(e)&&o.push(e),i.forEach(n=>{n.hidden||n.parentId!=e||(t.children||(t.children=[]),l&&l(n,t,!1),t.children.push(n),E(n.id,n,i,l,o))})}var F=i("c1fb"),D=i("575c");let V=[{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:"",class:"",value:"TaskCompleted",type:"primary",onClick:function(){}},{name:"任务取消",icon:"",class:"",value:"TaskCancel",type:"danger",onClick:function(){}},{name:"任务恢复",icon:"",class:"",value:"TaskRecovery",type:"danger",onClick:function(){}},{name:"查看完整路由",icon:"",class:"",value:"ViewAllRouter",type:"info",onClick:function(){}},{name:"路由配置",icon:"",class:"",value:"AddRouters",type:"success",onClick:function(){}},{name:"回滚到上一步",icon:"",class:"",value:"Previous",type:"danger",onClick:function(){}},{name:"跳转到下一步",icon:"",class:"",value:"Next",type:"warning",onClick:function(){}},{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-edit",class:"",plain:!0,value:"Manual",type:"primary",onClick:function(){}},{name:"导 出",icon:"el-icon-bottom",type:"success",plain:!0,value:"Export",onClick:function(){this.export()}}];var S=V;let N={getMenu(){return F["a"].get("/api/getTreeMenu")},getButtons(e,t,i,l){i&&(i="/"+i);let o=b["a"].getters.getPermission(i||e);if(!o&&(o=b["a"].getters.getPermission(e.substring(1)),!o)){if(-1!=(l||"").indexOf("/")){let e=l.split("/");l=e[e.length-1]}if(o=b["a"].getters.getPermission("/"+l),!o&&(o=(b["a"].state.permission||[]).find(e=>e.tableName==l),!o))return void A()}let n=o.permission,a=S.filter(e=>!e.value||-1!=n.indexOf(e.value));return t&&t instanceof Array&&a.push(...t),a},to401(){A()}};function A(){const e=Object(m["c"])();e.push({path:"/401"})}var T=N;const I={class:"layout-container"},R=["href"],U={style:{"text-align":"center"}},P={class:"view-container"},$={class:"grid-search"},z={key:0,class:"form-closex"},L={key:0,class:"fs-line"},_={class:"view-header"},M={class:"desc-text"},K={class:"notice"},H=["title"],q={key:0,class:"search-line"},J={class:"btn-group"},Y=["onClick"],W={class:"box-com"},G={class:"item form-item"},X={key:0,class:"grid-detail table-item item"},Q={class:"toolbar"},Z={class:"title form-text"},ee={class:"btns"},te={style:{"text-align":"center"}},ie={class:"grid-body"},le={class:"grid-container"};function oe(e,t,i,o,n,a){const r=Object(l["resolveComponent"])("custom-column"),s=Object(l["resolveComponent"])("el-button"),d=Object(l["resolveComponent"])("vol-box"),c=Object(l["resolveComponent"])("ViewGridAudit"),h=Object(l["resolveComponent"])("UploadExcel"),u=Object(l["resolveComponent"])("vol-form"),m=Object(l["resolveComponent"])("QuickSearch"),p=Object(l["resolveComponent"])("el-dropdown-item"),f=Object(l["resolveComponent"])("el-dropdown-menu"),b=Object(l["resolveComponent"])("el-dropdown"),y=Object(l["resolveComponent"])("vol-table");return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",I,[Object(l["createElementVNode"])("a",{href:e.exportHref,ref:"export"},null,8,R),Object(l["createVNode"])(d,{"on-model-close":e.closeCustomModel,modelValue:e.viewModel,"onUpdate:modelValue":t[1]||(t[1]=t=>e.viewModel=t),height:520,width:500,padding:0,lazy:!0,title:"设置"},{content:Object(l["withCtx"])(()=>[Object(l["createVNode"])(r,{"view-columns":e.viewColumns},null,8,["view-columns"])]),footer:Object(l["withCtx"])(()=>[Object(l["createElementVNode"])("div",U,[Object(l["createVNode"])(s,{type:"default",size:"small",onClick:e.closeCustomModel},{default:Object(l["withCtx"])(()=>t[8]||(t[8]=[Object(l["createElementVNode"])("i",{class:"el-icon-close"},null,-1),Object(l["createTextVNode"])("取消")])),_:1},8,["onClick"]),Object(l["createVNode"])(s,{type:"success",size:"small",onClick:t[0]||(t[0]=t=>e.initViewColumns(!0))},{default:Object(l["withCtx"])(()=>t[9]||(t[9]=[Object(l["createElementVNode"])("i",{class:"el-icon-refresh"},null,-1),Object(l["createTextVNode"])("重置")])),_:1}),Object(l["createVNode"])(s,{type:"primary",size:"small",onClick:e.saveColumnConfig},{default:Object(l["withCtx"])(()=>t[10]||(t[10]=[Object(l["createElementVNode"])("i",{class:"el-icon-check"},null,-1),Object(l["createTextVNode"])("确定")])),_:1},8,["onClick"])])]),_:1},8,["on-model-close","modelValue"]),Object(l["createVNode"])(c,{onAuditClick:e.saveAudit,option:e.table,ref:"audit"},null,8,["onAuditClick","option"]),e.upload.url?(Object(l["openBlock"])(),Object(l["createBlock"])(d,{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.boxModel?e.detailOptions.cnName:e.table.cnName)+"-导入"},{default:Object(l["withCtx"])(()=>[Object(l["createVNode"])(h,{ref:"upload_excel",onImportExcelAfter:e.importExcelAfter,importExcelBefore:e.importExcelBefore,url:e.upload.url,template:e.upload.template},null,8,["onImportExcelAfter","importExcelBefore","url","template"])]),_:1},8,["modelValue","title"])):Object(l["createCommentVNode"])("",!0),(Object(l["openBlock"])(),Object(l["createBlock"])(Object(l["resolveDynamicComponent"])(e.dynamicComponent.gridHeader),{ref:"gridHeader",onParentCall:e.parentCall},null,40,["onParentCall"])),Object(l["createElementVNode"])("div",P,[Object(l["createElementVNode"])("div",$,[Object(l["withDirectives"])(Object(l["createElementVNode"])("div",{class:Object(l["normalizeClass"])([e.fiexdSearchForm?"fiexd-search-box":"search-box"])},[Object(l["createVNode"])(u,{ref:"searchForm","load-key":!1,style:{padding:"0 15px"},"label-width":e.labelWidth,formRules:e.searchFormOptions,formFields:e.searchFormFields,select2Count:e.select2Count},{footer:Object(l["withCtx"])(()=>[e.fiexdSearchForm?Object(l["createCommentVNode"])("",!0):(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",z,[Object(l["createVNode"])(s,{size:"small",type:"primary",plain:"",onClick:e.search},{default:Object(l["withCtx"])(()=>t[11]||(t[11]=[Object(l["createElementVNode"])("i",{class:"el-icon-search"},null,-1),Object(l["createTextVNode"])("查询 ")])),_:1},8,["onClick"]),Object(l["createVNode"])(s,{size:"small",type:"success",plain:"",onClick:e.resetSearch},{default:Object(l["withCtx"])(()=>t[12]||(t[12]=[Object(l["createElementVNode"])("i",{class:"el-icon-refresh-right"},null,-1),Object(l["createTextVNode"])("重置 ")])),_:1},8,["onClick"]),Object(l["createVNode"])(s,{size:"small",plain:"",onClick:t[3]||(t[3]=t=>e.searchBoxShow=!e.searchBoxShow)},{default:Object(l["withCtx"])(()=>t[13]||(t[13]=[Object(l["createElementVNode"])("i",{class:"el-icon-switch-button"},null,-1),Object(l["createTextVNode"])("关闭 ")])),_:1})]))]),_:1},8,["label-width","formRules","formFields","select2Count"]),e.fiexdSearchForm?(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",L)):Object(l["createCommentVNode"])("",!0)],2),[[l["vShow"],e.searchBoxShow]]),Object(l["createElementVNode"])("div",_,[Object(l["createElementVNode"])("div",M,[t[14]||(t[14]=Object(l["createElementVNode"])("i",{class:"el-icon-s-grid"},null,-1)),Object(l["createElementVNode"])("span",null,Object(l["toDisplayString"])(e.table.cnName),1)]),Object(l["createElementVNode"])("div",K,[Object(l["createElementVNode"])("a",{class:"text",title:e.extend.text},Object(l["toDisplayString"])(e.extend.text),9,H)]),e.fiexdSearchForm?Object(l["createCommentVNode"])("",!0):(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",q,[e.singleSearch?(Object(l["openBlock"])(),Object(l["createBlock"])(m,{key:0,singleSearch:e.singleSearch,searchFormFields:e.searchFormFields,tiggerPress:e.quickSearchKeyPress},null,8,["singleSearch","searchFormFields","tiggerPress"])):Object(l["createCommentVNode"])("",!0)])),Object(l["createElementVNode"])("div",J,[(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(e.buttons.slice(0,e.maxBtnLength),(i,o)=>(Object(l["openBlock"])(),Object(l["createElementBlock"])(l["Fragment"],{key:o},[i.data?(Object(l["openBlock"])(),Object(l["createBlock"])(b,{key:0,size:"small","split-button":!1},{dropdown:Object(l["withCtx"])(()=>[Object(l["createVNode"])(f,null,{default:Object(l["withCtx"])(()=>[(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(i.data,(t,i)=>(Object(l["openBlock"])(),Object(l["createBlock"])(p,{key:i},{default:Object(l["withCtx"])(()=>[Object(l["createElementVNode"])("div",{onClick:i=>e.onClick(t.onClick)},[Object(l["createElementVNode"])("i",{class:Object(l["normalizeClass"])(t.icon)},null,2),Object(l["createTextVNode"])(" "+Object(l["toDisplayString"])(t.name),1)],8,Y)]),_:2},1024))),128))]),_:2},1024)]),default:Object(l["withCtx"])(()=>[Object(l["createVNode"])(s,{color:i.color,dark:!1,type:i.type,plain:i.plain},{default:Object(l["withCtx"])(()=>[Object(l["createTextVNode"])(Object(l["toDisplayString"])(i.name),1),t[15]||(t[15]=Object(l["createElementVNode"])("i",{class:"el-icon-arrow-down el-icon--right"},null,-1))]),_:2},1032,["color","type","plain"])]),_:2},1024)):Object(l["withDirectives"])((Object(l["openBlock"])(),Object(l["createBlock"])(s,{key:1,type:i.type,size:"small",color:i.color,dark:!1,class:Object(l["normalizeClass"])(i.class),plain:i.plain,onClick:t=>e.onClick(i.onClick)},{default:Object(l["withCtx"])(()=>[Object(l["createElementVNode"])("i",{class:Object(l["normalizeClass"])(i.icon)},null,2),Object(l["createTextVNode"])(" "+Object(l["toDisplayString"])(i.name),1)]),_:2},1032,["type","color","class","plain","onClick"])),[[l["vShow"],!i.hidden]])],64))),128)),e.showCustom?(Object(l["openBlock"])(),Object(l["createBlock"])(s,{key:0,type:"default",style:{padding:"0px 10px"},size:"small",plain:!0,onClick:e.showCustomModel},{default:Object(l["withCtx"])(()=>t[16]||(t[16]=[Object(l["createElementVNode"])("i",{class:"el-icon-s-grid"},null,-1)])),_:1},8,["onClick"])):Object(l["createCommentVNode"])("",!0),e.buttons.length>e.maxBtnLength?(Object(l["openBlock"])(),Object(l["createBlock"])(b,{key:1,size:"small",onClick:e.changeDropdown},{dropdown:Object(l["withCtx"])(()=>[Object(l["createVNode"])(f,null,{default:Object(l["withCtx"])(()=>[(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(e.buttons.slice(e.maxBtnLength,e.buttons.length),(t,i)=>Object(l["withDirectives"])((Object(l["openBlock"])(),Object(l["createBlock"])(p,{onClick:i=>e.changeDropdown(t.name),name:t.name,key:i},{default:Object(l["withCtx"])(()=>[Object(l["createElementVNode"])("i",{class:Object(l["normalizeClass"])(t.icon)},null,2),Object(l["createTextVNode"])(" "+Object(l["toDisplayString"])(t.name),1)]),_:2},1032,["onClick","name"])),[[l["vShow"],!t.hidden]])),128))]),_:1})]),default:Object(l["withCtx"])(()=>[Object(l["createVNode"])(s,{type:"primary",plain:"",size:"small"},{default:Object(l["withCtx"])(()=>t[17]||(t[17]=[Object(l["createTextVNode"])(" 更多"),Object(l["createElementVNode"])("i",{class:"el-icon-arrow-down el-icon--right"},null,-1)])),_:1})]),_:1},8,["onClick"])):Object(l["createCommentVNode"])("",!0)])]),e.boxInit?(Object(l["openBlock"])(),Object(l["createBlock"])(d,{key:0,modelValue:e.boxModel,"onUpdate:modelValue":t[7]||(t[7]=t=>e.boxModel=t),title:e.boxOptions.title,width:e.boxOptions.width,height:e.boxOptions.height,modal:e.boxOptions.modal,draggable:e.boxOptions.draggable,padding:0,"on-model-close":e.onGridModelClose,onFullscreen:e.fullscreen},{content:Object(l["withCtx"])(()=>[Object(l["createElementVNode"])("div",W,[(Object(l["openBlock"])(),Object(l["createBlock"])(Object(l["resolveDynamicComponent"])(e.dynamicComponent.modelHeader),{ref:"modelHeader",onParentCall:e.parentCall},null,40,["onParentCall"])),Object(l["createElementVNode"])("div",G,[Object(l["createVNode"])(u,{ref:"form",editor:e.editor,"load-key":!1,"label-width":e.boxOptions.labelWidth,formRules:e.editFormOptions,formFields:e.editFormFields,select2Count:e.select2Count},null,8,["editor","label-width","formRules","formFields","select2Count"])]),(Object(l["openBlock"])(),Object(l["createBlock"])(Object(l["resolveDynamicComponent"])(e.dynamicComponent.modelBody),{ref:"modelBody",onParentCall:e.parentCall},null,40,["onParentCall"])),e.detail.columns&&e.detail.columns.length>0?Object(l["withDirectives"])((Object(l["openBlock"])(),Object(l["createElementBlock"])("div",X,[Object(l["createElementVNode"])("div",Q,[Object(l["createElementVNode"])("div",Z,[Object(l["createElementVNode"])("span",null,[t[18]||(t[18]=Object(l["createElementVNode"])("i",{class:"el-icon-menu"},null,-1)),Object(l["createTextVNode"])(" "+Object(l["toDisplayString"])(e.detail.cnName),1)])]),Object(l["withDirectives"])(Object(l["createElementVNode"])("div",ee,[(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(e.detailOptions.buttons,(t,i)=>Object(l["withDirectives"])((Object(l["openBlock"])(),Object(l["createBlock"])(s,{key:i,plain:t.plain,onClick:i=>e.onClick(t.onClick),size:"small"},{default:Object(l["withCtx"])(()=>[Object(l["createElementVNode"])("i",{class:Object(l["normalizeClass"])(t.icon)},null,2),Object(l["createTextVNode"])(Object(l["toDisplayString"])(t.name),1)]),_:2},1032,["plain","onClick"])),[[l["vShow"],!("boolean"==typeof t.hidden&&t.hidden)]])),128))],512),[[l["vShow"],!e.isBoxAudit]])]),Object(l["createVNode"])(y,{ref:"detail",onLoadBefore:e.loadInternalDetailTableBefore,onLoadAfter:e.loadDetailTableAfter,onRowChange:e.detailRowOnChange,onRowClick:e.detailRowOnClick,url:e.detailOptions.url,"load-key":!1,index:!0,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,beginEdit:e.detailOptions.beginEdit,endEditBefore:e.detailOptions.endEditBefore,endEditAfter:e.detailOptions.endEditAfter,summary:e.detailOptions.summary,"click-edit":e.detailOptions.clickEdit,"double-edit":e.detailOptions.doubleEdit,"column-index":e.detailOptions.columnIndex,ck:e.detailOptions.ck,"text-inline":e.detailOptions.textInline,select2Count:e.select2Count,selectable:e.detailSelectable},null,8,["onLoadBefore","onLoadAfter","onRowChange","onRowClick","url","tableData","columns","pagination","height","single","defaultLoadPage","beginEdit","endEditBefore","endEditAfter","summary","click-edit","double-edit","column-index","ck","text-inline","select2Count","selectable"])],512)),[[l["vShow"],e.hasDetail]]):Object(l["createCommentVNode"])("",!0),(Object(l["openBlock"])(),Object(l["createBlock"])(Object(l["resolveDynamicComponent"])(e.dynamicComponent.modelFooter),{ref:"modelFooter",onParentCall:e.parentCall},null,40,["onParentCall"]))])]),footer:Object(l["withCtx"])(()=>[Object(l["withDirectives"])(Object(l["createElementVNode"])("div",te,[Object(l["createVNode"])(s,{size:"small",type:"primary",plain:"",onClick:t[4]||(t[4]=t=>e.onGridModelClose(!1))},{default:Object(l["withCtx"])(()=>t[19]||(t[19]=[Object(l["createElementVNode"])("i",{class:"el-icon-close"},"关闭",-1)])),_:1}),Object(l["withDirectives"])(Object(l["createVNode"])(s,{size:"small",type:"primary",onClick:t[5]||(t[5]=t=>e.auditParam.model=!0)},{default:Object(l["withCtx"])(()=>t[20]||(t[20]=[Object(l["createElementVNode"])("i",{class:"el-icon-view"},"审批",-1)])),_:1},512),[[l["vShow"],e.auditParam.showViewButton]])],512),[[l["vShow"],e.isBoxAudit]]),Object(l["withDirectives"])(Object(l["createElementVNode"])("div",null,[(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(e.boxButtons,(t,i)=>Object(l["withDirectives"])((Object(l["openBlock"])(),Object(l["createBlock"])(s,{key:i,type:t.type,size:"small",plain:t.plain,disabled:t.hasOwnProperty("disabled")&&!!t.disabled,onClick:i=>e.onClick(t.onClick)},{default:Object(l["withCtx"])(()=>[Object(l["createElementVNode"])("i",{class:Object(l["normalizeClass"])(t.icon)},Object(l["toDisplayString"])(t.name),3)]),_:2},1032,["type","plain","disabled","onClick"])),[[l["vShow"],!("boolean"==typeof t.hidden&&t.hidden)]])),128)),Object(l["createVNode"])(s,{size:"small",type:"primary",plain:"",onClick:t[6]||(t[6]=t=>e.onGridModelClose(!1))},{default:Object(l["withCtx"])(()=>t[21]||(t[21]=[Object(l["createElementVNode"])("i",{class:"el-icon-close"},"关闭",-1)])),_:1})],512),[[l["vShow"],!e.isBoxAudit]])]),_:1},8,["modelValue","title","width","height","modal","draggable","on-model-close","onFullscreen"])):Object(l["createCommentVNode"])("",!0)]),Object(l["createElementVNode"])("div",ie,[(Object(l["openBlock"])(),Object(l["createBlock"])(Object(l["resolveDynamicComponent"])(e.dynamicComponent.gridBody),{ref:"gridBody",onParentCall:e.parentCall},null,40,["onParentCall"]))]),Object(l["createElementVNode"])("div",le,[Object(l["createVNode"])(y,{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,beginEdit:e.tableBeginEdit,endEditBefore:e.tableEndEditBefore,"click-edit":!0,"column-index":e.columnIndex,"text-inline":e.textInline,ck:e.ck,select2Count:e.select2Count,selectable:e.selectable},null,8,["single","rowKey","loadTreeChildren","onLoadBefore","onLoadAfter","onRowChange","onRowClick","onRowDbClick","linkView","columns","pagination","height","max-height","url","defaultLoadPage","summary","double-edit","index","beginEdit","endEditBefore","column-index","text-inline","ck","select2Count","selectable"])])]),(Object(l["openBlock"])(),Object(l["createBlock"])(Object(l["resolveDynamicComponent"])(e.dynamicComponent.gridFooter),{ref:"gridFooter",onParentCall:e.parentCall},null,40,["onParentCall"]))])}function ne(e,t){return Object(l["openBlock"])(),Object(l["createElementBlock"])("div")}const ae={},re=c()(ae,[["render",ne]]);var se=re,de=i("0b13"),ce=i("6e5b");let he={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 ue=he;i("6ee9");let me={loadInternalDetailTableBefore(e,t){this.detailOptions.delKeys.length>0&&(this.detailOptions.delKeys=[]);let i=this.table.key;return this.currentRow&&this.currentRow.hasOwnProperty(i)&&(e.value=this.currentRow[i]),this.loadDetailTableBefore(e,t)},detailRowOnChange(e){this.detailRowChange(e)},detailRowChange(e){},detailRowOnClick({row:e,column:t,event:i}){this.detailRowClick({row:e,column:t,event:i})},detailRowClick({row:e,column:t,event:i}){},resetDetailTable(e){if(!this.detailOptions.columns||0==this.detailOptions.columns.length)return;let t=this.table.key,i={value:e?e[t]:this.currentRow[t]};this.$nextTick(()=>{this.$refs.detail&&(this.$refs.detail.reset(),this.$refs.detail.load(i))})},refreshRow(){this.resetDetailTable()},addRow(){this.$refs.detail.addRow({}),this.$refs.detail.edit.rowIndex=-1,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 i=this.detailOptions.key;e.forEach(e=>{e.hasOwnProperty(i)&&e[i]&&this.detailOptions.delKeys.push(e[i])}),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)}))},detailSelectable(e,t){return!0}};var pe=me;let fe={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},selectable(e,t){return!0}};var be=fe,ye={initViewColumns(e){e&&this.resetViewColumns(),this.orginColumnFields||(this.orginColumnFields=this.columns.map(e=>e.field)),this.viewColumns=this.columns.filter(e=>!e.hidden&&!e.render).map(e=>({field:e.field,title:e.title,show:!e.hidden})),e||this.getCacheViewColumn()},getViewCacheKey(){return"custom:column"+this.table.name},getCacheViewColumn(){try{let e=localStorage.getItem(this.getViewCacheKey());if(!e)return;if(e=JSON.parse(e),e.some(e=>!this.viewColumns.some(t=>t.field==e.field))||this.viewColumns.some(t=>!e.some(e=>e.field==t.field)))return void localStorage.removeItem(this.getViewCacheKey());let t=[],i=[];e.forEach(e=>{let l=this.viewColumns.find(t=>t.field==e.field);l&&(l.show=e.show,i.push(l));let o=this.columns.find(t=>t.field==e.field);o&&(o.hidden=!e.show,t.push(o))});let l=this.viewColumns.filter(e=>!i.some(t=>e.field==t.field));i.push(...l),this.viewColumns.splice(0),this.viewColumns.push(...i),this.sortViewColumns(t)}catch(e){console.log("设置默认自定义列异常:"+e.message)}},sortViewColumns(e){if(e.length){let t=this.columns.filter(t=>!e.some(e=>t.field==e.field));e.push(...t),this.columns.splice(0),this.columns.push(...e)}},resetViewColumns(){if(!this.orginColumnFields)return;let e=[];this.orginColumnFields.forEach(t=>{e.push(this.columns.find(e=>e.field==t))});let t=this.columns.filter(e=>!this.orginColumnFields.some(t=>e.field==t));e.push(...t),this.columns.splice(0),this.columns.push(...e)},showCustomModel(){this.viewColumns.length||this.initViewColumns(),this.viewColumnsClone=JSON.parse(JSON.stringify(this.viewColumns)),this.viewModel=!0},closeCustomModel(){this.viewModel=!1,this.checkColumnChanged()&&(this.viewColumns=JSON.parse(JSON.stringify(this.viewColumnsClone)))},checkColumnChanged(){return JSON.stringify(this.viewColumns)!=JSON.stringify(this.viewColumnsClone)},saveColumnConfig(){let e=this.viewColumns.some(e=>e.show);if(!e)return this.$message.error("至少选择一列显示");if(this.viewModel=!1,this.checkColumnChanged()){let e=[];this.viewColumns.forEach(t=>{let i=this.columns.find(e=>e.field==t.field);i&&(i.hidden=!t.show,e.push(i))}),this.sortViewColumns(e)}try{localStorage.setItem(this.getViewCacheKey(),JSON.stringify(this.viewColumns))}catch(t){console.log("获取自定义列异常:"+t.message)}}};let ge={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),t=1==this.searchFormOptions.length&&1==this.searchFormOptions[0].length;-1==e||t||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}}),t&&(this.fiexdSearchForm=!1),this.maxBtnLength+=-1==e?0:1},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 i in e)t[i]=e[i];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 i=[],l=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=!l;let o={name:"刷新",type:"info",icon:"el-icon-refresh",onClick(){this.currentAction!=this.const.ADD&&this.refreshRow()}},n=this.buttons.some(e=>{if(e.value==this.const.IMPORT)return!0});if(n&&(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)),!l)return this.editFormOptions.forEach(e=>{e.forEach(e=>{e.disabled=!0})}),this.detail.columns.forEach(e=>{e.hasOwnProperty("edit")&&(e.readonly=!0)}),this.extendBtn(i,this.extend.buttons.box),this.boxButtons.push(...i),this.detailOptions.buttons.push(o),this.detailOptions.buttons.forEach(e=>{e.hasOwnProperty("hidden")||(e.hidden=!1)}),this.extendBtn(this.detailOptions.buttons,this.extend.buttons.detail),i;this.detailOptions.edit=!0,i.push({name:"保 存",icon:"el-icon-check",type:"danger",disabled:!1,value:"save",onClick(){this.save()}}),this.detailOptions.buttons.push({name:"添加行",icon:"el-icon-plus",type:"primary",hidden:!1,plain:!0,onClick(){this.addRow()}},{type:"danger",plain:!0,name:"删除行",hidden:!1,icon:"el-icon-delete",onClick(){this.delRow()}},{type:"danger",plain:!0,name:"导入",value:"import",hidden:!1,icon:"el-icon-upload2",onClick(){this.upload.url=`${this.http.ipAddress}api/${this.detail.table}/${this.const.IMPORT}?table=1`,this.upload.template.url=`${this.http.ipAddress}api/${this.detail.table}/${this.const.DOWNLOADTEMPLATE}`,this.upload.template.fileName=this.detail.cnName,this.upload.excel=!0}},{type:"danger",plain:!0,name:"导出",value:"export",icon:"el-icon-download",hidden:!1,onClick(){this.export(!0)}}),this.detailOptions.buttons.forEach(e=>{e.hasOwnProperty("hidden")&&(e.hidden=!1)}),this.extendBtn(i,this.extend.buttons.box),this.detailOptions.buttons.push(o),this.extendBtn(this.detailOptions.buttons,this.extend.buttons.detail),this.boxButtons.push(...i)},onClick(e){e.apply(this)},changeDropdown(e,t){let i=this.buttons.filter(t=>t.name==e);i&&i.length>0&&i[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 i=this.searchFormFields[t];if(this.emptyValue(i))continue;"number"==typeof i&&(i+="");let l=this.getSearchItem(t);if("cascader"==l&&(i=i.length?i[i.length-1]+"":""),"string"!=typeof i&&-1!=["date","datetime","range"].indexOf(l))for(let o=0;o<i.length;o++)this.emptyValue(i[o])||e.wheres.push({name:t,value:(i[o]+"").trim(),displayType:(()=>-1!=["date","datetime","range"].indexOf(l)?o?"lessorequal":"thanorequal":l)()});else e.wheres.push({name:t,value:"string"==typeof i?(i+"").trim():i.join(","),displayType:l})}return e},search(){this.$refs.table.load(null,!0)},loadTableBefore(e,t){let i=this.getSearchParameters();i&&(e=Object.assign(e,i)),this.$route.query.viewflow&&this.$route.query.id&&e.wheres.push({name:this.table.key,value:this.$route.query.id});let l=this.searchBefore(e);t(l)},loadTableAfter(e,t,i){let l=this.searchAfter(e,i);t(l)},loadDetailTableBefore(e,t){if(this.currentAction==this.const.ADD)return t(!1),!1;let i=this.searchDetailBefore(e);t(i)},loadDetailTableAfter(e,t){let i=this.searchDetailAfter(e);t(i)},getSearchItem(e){let t;for(let i=0;i<this.searchFormOptions.length;i++){if(t)return t.type;const l=this.searchFormOptions[i];t=l.find(t=>t.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),this.$refs.form&&this.$refs.form.$refs.volform&&setTimeout(()=>{this.$refs.form.$refs.volform.clearValidate()},100)},getKeyValueType(e,t){try{let i=(t?"e":"s")+"_b_";e.forEach(e=>{e.forEach(e=>{if(this.keyValueType.hasOwnProperty(i+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[i+e.field]=e.type)})})}catch(i){console.log(i.message)}},resetForm(e,t){if(this.$refs[e]&&this.$refs[e].reset(),!t)return;let i,l;var o;"searchForm"==e?(i=this.searchFormFields,l="s_b_"):(i=this.editFormFields,l="e_b_"),this.keyValueType._dinit||(this.getKeyValueType(this.editFormOptions,!0),this.getKeyValueType(this.searchFormOptions,!1),this.keyValueType._dinit=!0);for(const a in i)if(t.hasOwnProperty(a)){let e=t[a],r=this.keyValueType[l+a];if("selectList"==r||"checkbox"==r||"cascader"==r||"treeSelect"==r)if("cascader"==r||"treeSelect"==r){var n=this.dicKeys.find(e=>e.fileds&&-1!=e.fileds.indexOf(a));if(n&&n.orginData&&n.orginData.length){let t="number"==typeof n.orginData[0].id;"cascader"==r?(e=t?1*e||0:e+"","cascader"==r&&(o=this.base.getTreeAllParent(e,n.orginData),o&&(e=o.map(e=>e.id)))):(null===e||void 0===e?e=[]:"string"==typeof e&&(e=e.split(",")),t?Array.isArray(e)&&(e=e.map(e=>1*e||0)):"number"==typeof e&&(e=[e+""]))}else e=[e]}else""!=e&&void 0!=e&&"string"==typeof e?e=e.split(","):"checkbox"==r&&(e=[]);else this.keyValueType.hasOwnProperty(a)&&"number"==typeof this.keyValueType[a]&&1*e==e?e*=1:null==e||void 0==e?e="":-1!=this.numberFields.indexOf(a)?e=1*e||0:e+="";e instanceof Array?(i[a]&&(i[a]=[]),i[a]=e):i[a]=e}else i[a]=i[a]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 a in this.editFormFields)if(this.uploadfiled&&this.uploadfiled.length>0&&-1!=this.uploadfiled.indexOf(a)&&this.editFormFields[a]instanceof Array){let t=this.editFormFields[a].map(e=>e.path);e[a]=t.join(",")}else if("function"==typeof this.editFormFields[a])try{e[a]=this.editFormFields[a]()}catch(n){}else void 0===this.editFormFields[a]&&this.dicKeys.some(e=>e.fileds&&-1!=e.fileds.indexOf(a))?e[a]=null:e[a]=this.editFormFields[a];for(const a in e)if(e[a]instanceof Array){var t=this.dicKeys.some(e=>"cascader"==e.type&&e.fileds&&-1!=e.fileds.indexOf(a));t&&e[a].length?e[a]=e[a][e[a].length-1]:e[a]=e[a].join(",")}let i={mainData:e,detailData:null,delKeys:null};if(this.hasDetail){i.detailData=this.$refs.detail.rowData;let e=this.detail.columns.filter(e=>"selectList"==e.type||e.edit&&"selectList"==e.edit.type).map(e=>e.field);e.length&&(i.detailData=JSON.parse(JSON.stringify(i.detailData)),i.detailData.forEach(t=>{for(let i=0;i<e.length;i++){const l=e[i];Array.isArray(t[l])&&(t[l]=t[l].join(","))}}))}this.detailOptions.delKeys.length>0&&(i.delKeys=this.detailOptions.delKeys);let l=this.currentAction==this.const.ADD;if(l){if(!this.addBefore(i)||!await this.addBeforeAsync(i))return}else if(!this.updateBefore(i)||!await this.updateBeforeAsync(i))return;let o=this.getUrl(this.currentAction);this.http.post(o,i,!0).then(e=>{if(l){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,l);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,l)})},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 i=!1;this.$confirm("确认要删除选择的数据吗?","警告",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning",center:!0}).then(()=>{if(i)return;i=!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("删除成功"),this.delAfter(e)&&this.refresh()})})},async modelOpenBeforeAsync(e){return!0},async initBox(){return this.detailOptions.buttons.forEach(e=>{"export"==e.value&&(e.hidden="Add"==this.currentAction)}),!!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.boxOptions.title=this.table.cnName+"(编辑)",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]=0)})}),this.resetEditForm(e)},async add(){this.boxOptions.title=this.table.cnName+"(新建)",this.currentAction=this.const.ADD,this.currentRow={},await this.initBox()&&(this.resetAdd(),this.setContinueAdd(!0),this.boxModel=!0,this.modelOpenProcess())},async edit(e){return this.boxOptions.title="编辑",this.currentAction=this.const.EDIT,e?e instanceof Array||(e=[e]):e=this.$refs.table.getSelected(),0==e.length?this.$error("请选择要编辑的行!"):1!=e.length?this.$error("只能选择一行数据进行编辑!"):(this.currentRow=e[0],void(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,i)=>{if(e.remote){let l=this.columns.find(t=>t.bind&&t.bind.key==e.dataKey);if(!l)return;let o=this.currentRow[e.field],n=l.bind.data.find(e=>e.key==o);e.data=[{key:o,value:n?n.value:o}],this.editFormOptions[t].splice(i,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 i=new XMLHttpRequest;i.open("GET",e,!0),i.setRequestHeader("Content-type","application/json"),i.setRequestHeader("Authorization",this.$store.getters.getToken());let l=this.$refs.export;i.responseType="blob",i.onload=function(e){if(200!=i.status)return void this.$error("下载文件出错了..");let o=i.response;l.download=t;let n=new Blob([o]);l.href=URL.createObjectURL(n),l.click()},i.send()},getFileName(e){return e?this.detail.cnName+".xlsx":this.table.cnName+".xlsx"},export(e){let t,i,l;if(e){if("Add"==this.currentAction)return;t=`api/${this.detail.table}/${this.const.EXPORT}`,l={wheres:[{name:this.table.key,value:this.editFormFields[this.table.key]}]}}else t=this.getUrl(this.const.EXPORT),i=this.getSearchParameters(),l={order:this.pagination.order,wheres:i.wheres||[]};if(!e&&!this.exportBefore(l))return;l.wheres&&"object"==typeof l.wheres&&(l.wheres=JSON.stringify(l.wheres));let o=this.http,n=this.downloadFileName||this.getFileName(e);o.post(t,l,"正在导出数据....",{responseType:"blob"}).then(e=>{const t=new Blob([e]);if("download"in document.createElement("a")){const e=document.createElement("a");e.download=n,e.style.display="none",e.href=URL.createObjectURL(t),document.body.appendChild(e),e.click(),URL.revokeObjectURL(e.href),document.body.removeChild(e)}else navigator.msSaveBlob(t,n)})},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=Object.keys(e[0]).find(e=>"auditstatus"===e.toLowerCase());if(!t)return this.$message.error("表必须包括审核字段【AuditStatus】,并且是int类型");this.$refs.audit.open(e)},saveAudit(e,t,i){let l=t.map(e=>e[this.table.key]);if(!this.auditBefore(l,t))return;let o=`${this.getUrl(this.const.AUDIT)}?auditReason=${e.reason}&auditStatus=${e.value}`;this.http.post(o,l,"审核中....").then(e=>{if(this.auditAfter(e,l)){if(!e.status)return this.$error(e.message);i&&i(e),this.$success(e.message),this.refresh()}})},viewModelCancel(){this.viewModel=!1},initFormOptions(e,t,i,l){e.forEach(e=>{e.forEach(e=>{if("number"==e.type&&(""===i[e.field]&&(i[e.field]=void 0),this.numberFields.push(e.field)),"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("cascader"!=e.type||e.hasOwnProperty("changeOnSelect")||(e.changeOnSelect=!0),e.remote)return this.remoteKeys.push(e.dataKey),e.data=[],!0;if("checkbox"!=e.type||i[e.field]instanceof Array||(i[e.field]=[]),-1==t.indexOf(e.dataKey)){t.push(e.dataKey);let i={dicNo:e.dataKey,data:[],fileds:[e.field],orginData:[]};"cascader"==e.type&&(i.type="cascader"),l&&(i["e_type"]=e.type),this.dicKeys.push(i)}else"cascader"==e.type&&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],{type:e.type})})})},initColumns(e,t,i){e&&e instanceof Array&&e.forEach(e=>{if(!e.bind||e.bind.data&&e.bind.data.length>0)return!0;let l=e.bind.key||e.bind.dicNo;if(-1!=this.remoteKeys.indexOf(l))return e.bind.remote=!0,!0;-1==this.hasKeyField.indexOf(e.field)&&this.hasKeyField.push(e.field);var o=t.filter(e=>e.dicNo==l);o&&0!=o.length||(t.push({dicNo:l,data:[]}),o=[t[t.length-1]],i.push(l)),"cascader"==o[0].type||"treeSelect"==o[0].type?e.bind={data:o[0].orginData,type:"select",key:l}:e.bind=o[0],e.bind.type=e.bind.e_type||"string"})},bindOptions(e){e.forEach(e=>{e.data.length>=(this.select2Count||500)&&(this.dicKeys.some(t=>t.dicNo==e.dicNo&&("cascader"==t.type||"treeSelect"==t.type))||e.data.forEach(e=>{e.label=e.value,e.value=e.key})),this.dicKeys.forEach(t=>{if(t.dicNo!=e.dicNo)return!0;if("cascader"==t.type||"treeSelect"==t.type){let i=JSON.parse(JSON.stringify(e.data));this.columns.forEach(t=>{t.bind&&t.bind.key==e.dicNo&&(t.bind.data=e.data)});let l=this.base.convertTree(i,(e,t,i)=>{e.inited||(e.inited=!0,e.label=e.value,e.value=e.key)});t.data.push(...l),t.orginData.push(...e.data),this.searchFormOptions.forEach(i=>{i.forEach(i=>{"cascader"==i.type&&i.dataKey==t.dicNo&&(i.data=l,i.orginData=e.data)})}),this.editFormOptions.forEach(i=>{i.forEach(i=>{"cascader"!=i.type&&"treeSelect"!=i.type||i.dataKey!=t.dicNo||(i.data=l,i.orginData=e.data)})})}else if(e.data.length>0&&!e.data[0].hasOwnProperty("key")){let i=e.data,l=new Array(i.length);for(let e=0;e<i.length;e++)l[e]={key:i["key"]+"",value:i["value"]};t.data.push(...l)}else"selectList"==t.e_type&&e.data.length>0&&"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.forEach(e=>{e.data.splice(0),e.orginData&&e.orginData.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),t.dicInited&&t.dicInited(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 i=t-270;if(this.setFiexdColumn(this.columns,i),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-36*this.editFormOptions.length-234,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 i=1;this.editFormOptions.forEach(e=>{e.length>i&&(i=e.length)});let l=.7,o=.5;o=i/10+.3,l=.1*(this.editFormOptions.length||1)+.03,l=l>.9?.9:l,t*=o,e*=l}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:i}){this.rowClick({row:e,column:t,event:i})},rowClick({row:e,column:t,event:i}){},rowOnDbClick({row:e,column:t,event:i}){this.rowDbClick({row:e,column:t,event:i})},rowDbClick({row:e,column:t,event:i}){},$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()})},tableBeginEdit(e,t,i){return this.beginEdit(e,t,i)},beginEdit(e,t,i){return!0},tableEndEditBefore(e,t,i){return this.endEditBefore(e,t,i)},endEditBefore(e,t,i){return!0},filterPermission(e,t){const i=(this.$store.state.permission||[]).find(t=>t.url=="/"+e);return i&&i.permission.some(e=>e==t)},destroyed(){},loadTreeTableChildren(e,t,i){this.loadTreeChildren.call(this,e,t,i)},loadTreeChildren(e,t,i){return i([])},importDetailAfter(e){},importExcelAfter(e){if(e.status)return this.boxModel?(e.data?e.data=JSON.parse(e.data):e.data=[],e.data.forEach(e=>{e[this.detail.key]=void 0,e[this.table.key]=void 0}),this.importDetailAfter(e),this.$refs.detail.rowData.unshift(...e.data),void(this.upload.excel=!1)):void this.importAfter(e)},onGridModelClose(e){this.isBoxAudit&&this.initFormOptionType(!1),this.isBoxAudit=!1,this.onModelClose(e)},initAuditColumn(){},getWorkFlowSteps(e){let t=this.table.url.replaceAll("/",""),i=`api/Sys_WorkFlow/getSteps?tableName=${t}&id=${e[this.table.key]}`;this.http.get(i,{},!0).then(t=>{this.workFlowSteps.splice(0),t.list&&t.list.length?(this.auditParam.showAction=t.list.some(e=>e.isCurrentUser),this.auditParam.height=511,this.auditParam.showViewButton=!0):(t.list=[],this.auditParam.showAction=!0,this.auditParam.height=240,this.auditParam.showViewButton=0==e.AuditStatus),this.auditParam.reason="",this.auditParam.status=-1,this.auditParam.value=-1,t.his&&t.his.forEach(e=>{e.auditStatus=this.getAuditStatus(e.auditStatus)}),this.auditParam.auditHis=t.his,this.workFlowSteps.push(...t.list),this.isBoxAudit=!0,this.initFormOptionType(!0),this.edit(e),this.boxOptions.title="审核"})},initFormOptionType(e){this.editFormOptions.forEach(t=>{t.forEach(t=>{e?t.readonly||(this.formFieldsType.push(t.field),t.readonly=!0):-1!=this.formFieldsType.indexOf(t.field)&&(t.readonly=!1)})})},getAuditStatus(e){let t=this.auditParam.data.find(t=>t.value==e);return t?t.text:"-"},initFlowQuery(){this.$route.query.viewflow&&this.$refs.table&&this.search()},fullscreen(e){}};ge=Object.assign(ge,pe,be,ye);var Oe=ge;const ke={EDIT:"update",ADD:"Add",VIEW:"view",PAGE:"getPageData",AUDIT:"audit",DEL:"del",EXPORT:"Export",DOWNLOAD:"DownLoadFile",DOWNLOADTEMPLATE:"DownLoadTemplate",IMPORT:"Import",UPLOAD:"Upload"};var we={components:{"vol-form":ce["a"],"vol-table":de["a"],VolBox:Object(l["defineAsyncComponent"])(()=>i.e("chunk-30d65b08").then(i.bind(null,"0d63"))),QuickSearch:Object(l["defineAsyncComponent"])(()=>i.e("chunk-178b135d").then(i.bind(null,"c214"))),Audit:Object(l["defineAsyncComponent"])(()=>i.e("chunk-2b5b498f").then(i.bind(null,"008c"))),UploadExcel:Object(l["defineAsyncComponent"])(()=>i.e("chunk-c3be1c5a").then(i.bind(null,"eec6"))),"custom-column":Object(l["defineAsyncComponent"])(()=>i.e("chunk-57d95c0c").then(i.bind(null,"18ac"))),"vol-header":Object(l["defineAsyncComponent"])(()=>i.e("chunk-0659c823").then(i.bind(null,"c5e6"))),ViewGridAudit:Object(l["defineAsyncComponent"])(()=>i.e("chunk-3d6fa925").then(i.bind(null,"e73a")))},props:{},setup(e){const t={gridHeader:se,gridBody:se,gridFooter:se,modelHeader:se,modelBody:se,modelFooter:se};if(e.extend.components)for(const o in e.extend.components)e.extend.components[o]&&(t[o]=Object(l["toRaw"])(e.extend.components[o]));const i=Object(l["shallowRef"])(t);return{dynamicComponent:i}},data(){return{isBoxAudit:!1,formFieldsType:[],workFlowSteps:[],rowKey:void 0,fiexdSearchForm:!1,_inited:!1,doubleEdit:!1,single:!1,const:ke,boxInit:!1,searchBoxShow:!1,singleSearch:{},exportHref:"",currentAction:ke.ADD,currentRow:{},closable:!1,boxModel:!1,width:700,labelWidth:100,viewModel:!1,viewColumns:[],viewColumnsClone:[],showCustom:!0,maxBtnLength:8,buttons:[],splitButtons:[],uploadfiled:[],boxButtons:[],dicKeys:[],hasKeyField:[],keyValueType:{_dinit:!1},url:"",hasDetail:!1,initActivated:!1,load:!0,activatedLoad:!1,summary:!1,remoteKeys:[],columnIndex:!0,ck:!0,continueAdd:!1,continueAddName:"保存后继续添加",detailOptions:{buttons:[],cnName:"",key:"",data:[],columns:[],edit:!0,single:!1,load:!1,delKeys:[],url:"",pagination:{total:0,size:100,sortName:""},height:0,textInline:!0,doubleEdit:!0,clickEdit:!1,currentReadonly:!1,beginEdit:(e,t,i)=>!0,endEditBefore:(e,t,i)=>!0,endEditAfter:(e,t,i)=>!0,columnIndex:!1,ck:!0},auditParam:{rows:0,model:!1,value:-1,status:-1,reason:"",height:500,showViewButton:!0,auditHis:[],showAction:!1,data:[{text:"通过",value:1},{text:"拒绝",value:2},{text:"驳回",value:3}]},upload:{excel:!1,url:"",template:{url:"",fileName:""},init:!1},height:0,tableHeight:0,tableMaxHeight:0,textInline:!0,pagination:{total:0,size:30,sortName:""},boxOptions:{title:"",saveClose:!0,labelWidth:100,height:0,width:0,summary:!1,draggable:!1,modal:!0},editor:{uploadImgUrl:"",upload:null},numberFields:[],downloadFileName:null,select2Count:500}},methods:{},activated(){this.initFlowQuery(),this.onActivated&&this.onActivated(),this._inited?this.activatedLoad&&this.refresh():this._inited=!0},mounted(){this.mounted()},unmounted(){this.destroyed()},created:function(){Object.assign(this,this.extend.methods),this.pagination.sortName=this.table.sortName||this.table.key,this.initBoxButtons(),this.initAuditColumn(),this.onInit(),this.getButtons(),this.initViewColumns(),this.initBoxHeightWidth(),this.initDicKeys(),this.onInited()},beforeUpdate:function(){},updated:function(){}};we.props=Object.assign(we.props,ue),we.methods=Object.assign(we.methods,Oe,ue.extend.methods);var je=Object(l["defineComponent"])(we);i("da20"),i("e5b2"),i("71b4");const Ce=c()(je,[["render",oe],["__scopeId","data-v-4d01a56e"]]);var ve=Ce;const xe={install:function(e){e.component("ViewGrid",ve)}};var Be=xe;const Ee=Object(l["createApp"])(u);for(const[Fe,De]of Object.entries(D))Ee.component(Fe,De);Ee.config.globalProperties.base=B,Ee.config.globalProperties.http=F["a"],Ee.config.globalProperties.$tabs={},Ee.config.globalProperties.permission=T,Ee.config.globalProperties.$global={signalR:!1,table:{useTag:!0},audit:{data:[{text:"通过",value:1},{text:"拒绝",value:3},{text:"驳回",value:4}],status:[0,2]}},window.oss={ali:{use:!1,small:"?x-oss-process=image/resize,m_lfit,w_200"}},Ee.use(b["a"]).use(v["a"],{size:"default"}).use(C).use(Be).mount("#app"),Ee.config.globalProperties.$Message=Ee.config.globalProperties.$message},5943:function(e,t,i){e.exports=i.p+"img/error.2bfbe647.png"},"5af4":function(e,t,i){},"61f4":function(e,t,i){"use strict";i("09bf")},"653a":function(e,t,i){},"6e5b":function(e,t,i){"use strict";var l=i("c1b7");const o={key:1},n={key:2},a={key:0,class:"form-imgs"},r=["src","onerror","onClick"],s=["onClick"],d={key:6,class:"v-date-range",style:{display:"flex"}},c={key:7,style:{width:"100%"}},h=["innerHTML"],u={key:14,style:{display:"flex"}},m={key:20,class:"form-extra"},p=["onClick"],f={style:{width:"100%"}};function b(e,t,i,b,y,g){const O=Object(l["resolveComponent"])("form-expand"),k=Object(l["resolveComponent"])("el-tree-select"),w=Object(l["resolveComponent"])("el-select-v2"),j=Object(l["resolveComponent"])("el-option"),C=Object(l["resolveComponent"])("el-select"),v=Object(l["resolveComponent"])("el-switch"),x=Object(l["resolveComponent"])("el-radio"),B=Object(l["resolveComponent"])("el-radio-group"),E=Object(l["resolveComponent"])("el-checkbox"),F=Object(l["resolveComponent"])("el-checkbox-group"),D=Object(l["resolveComponent"])("el-date-picker"),V=Object(l["resolveComponent"])("el-time-picker"),S=Object(l["resolveComponent"])("el-scrollbar"),N=Object(l["resolveComponent"])("vol-wang-editor"),A=Object(l["resolveComponent"])("vol-upload"),T=Object(l["resolveComponent"])("el-cascader"),I=Object(l["resolveComponent"])("el-rate"),R=Object(l["resolveComponent"])("el-input"),U=Object(l["resolveComponent"])("el-input-number"),P=Object(l["resolveComponent"])("el-form-item"),$=Object(l["resolveComponent"])("el-form");return Object(l["openBlock"])(),Object(l["createBlock"])($,{style:{display:"inline-block",width:"100%"},inline:!0,ref:"volform",onSubmit:t[0]||(t[0]=Object(l["withModifiers"])(()=>{},["prevent"])),model:e.formFields,"label-width":e.labelWidth,rules:e.rules},{default:Object(l["withCtx"])(()=>[(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(e.formRules,(i,f)=>(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",{key:f,class:"vol-form-item"},[(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(i,(i,f)=>Object(l["withDirectives"])((Object(l["openBlock"])(),Object(l["createBlock"])(P,{label:i.title?i.title+":":"",prop:i.field,key:i.field+f,style:Object(l["normalizeStyle"])({width:e.getColWidth(i)+"%"})},{default:Object(l["withCtx"])(()=>[i.render&&"function"==typeof i.render?(Object(l["openBlock"])(),Object(l["createBlock"])(O,{key:0,render:i.render,par:12},null,8,["render"])):i.readonly&&"function"==typeof e.formFields[i.field]?(Object(l["openBlock"])(),Object(l["createElementBlock"])("span",o,Object(l["toDisplayString"])(e.formFields[i.field]()),1)):e.isReadonlyImgFile(i,e.formFields)?(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",n,["img"==i.type?(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",a,[(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(e.formFields[i.field],(t,i)=>(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",{class:"img-item",key:i},[Object(l["createElementVNode"])("img",{src:e.getSrc(t.path),onerror:e.errorImg,onClick:i=>e.previewImg(t.path)},null,8,r)]))),128))])):(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],{key:1},Object(l["renderList"])(e.formFields[i.field],(t,o)=>(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",{class:"form-file-list",key:o},[Object(l["createElementVNode"])("a",{onClick:t=>e.dowloadFile(e.formFields[i.field][o])},Object(l["toDisplayString"])(t.name),9,s)]))),128))])):(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",{key:3,class:Object(l["normalizeClass"])({"form-item-extra":i.extra})},["label"==i.type?(Object(l["openBlock"])(),Object(l["createElementBlock"])("label",{key:0,style:Object(l["normalizeStyle"])(i.inputStyle),class:"readonly-input"},Object(l["toDisplayString"])(e.getText(e.formFields,i)),5)):"treeSelect"==i.type?(Object(l["openBlock"])(),Object(l["createBlock"])(k,{key:1,style:{width:"100%"},modelValue:e.formFields[i.field],"onUpdate:modelValue":t=>e.formFields[i.field]=t,data:i.data,multiple:i.multiple,"render-after-expand":!1,"show-checkbox":!1,"check-strictly":!0,"check-on-click-node":"","node-key":"key",props:{label:"label"}},{default:Object(l["withCtx"])(({data:e,node:t})=>[Object(l["createTextVNode"])(Object(l["toDisplayString"])(e.label),1)]),_:2},1032,["modelValue","onUpdate:modelValue","data","multiple"])):-1!=["select","selectList"].indexOf(i.type)?(Object(l["openBlock"])(),Object(l["createElementBlock"])(l["Fragment"],{key:2},[i.data.length>e.select2Count?Object(l["withDirectives"])((Object(l["openBlock"])(),Object(l["createBlock"])(w,{key:0,disabled:i.readonly||i.disabled,style:{width:"100%"},size:e.size,modelValue:e.formFields[i.field],"onUpdate:modelValue":t=>e.formFields[i.field]=t,filterable:"",multiple:"select"!=i.type,placeholder:i.placeholder?i.placeholder:i.title,"allow-create":i.autocomplete,options:i.data,onChange:e=>{i.onChange(e,i.data)},clearable:""},{default:Object(l["withCtx"])(({item:e})=>[Object(l["createTextVNode"])(Object(l["toDisplayString"])(e.label),1)]),_:2},1032,["disabled","size","modelValue","onUpdate:modelValue","multiple","placeholder","allow-create","options","onChange"])),[[l["vShow"],!i.hidden]]):i.remote||i.url?Object(l["withDirectives"])((Object(l["openBlock"])(),Object(l["createBlock"])(C,{key:1,disabled:i.readonly||i.disabled,style:{width:"100%"},size:e.size,modelValue:e.formFields[i.field],"onUpdate:modelValue":t=>e.formFields[i.field]=t,filterable:"",multiple:"select"!=i.type,placeholder:i.placeholder?i.placeholder:i.title,clearable:"","remote-method":t=>{e.remoteSearch(i,e.formFields,t)}},{default:Object(l["withCtx"])(()=>[(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(i.data,e=>(Object(l["openBlock"])(),Object(l["createBlock"])(j,{key:e.key,label:e.value,value:e.key},null,8,["label","value"]))),128))]),_:2},1032,["disabled","size","modelValue","onUpdate:modelValue","multiple","placeholder","remote-method"])),[[l["vShow"],!i.hidden]]):Object(l["withDirectives"])((Object(l["openBlock"])(),Object(l["createBlock"])(C,{key:2,disabled:i.readonly||i.disabled,style:{width:"100%"},size:e.size,modelValue:e.formFields[i.field],"onUpdate:modelValue":t=>e.formFields[i.field]=t,filterable:"",multiple:"select"!=i.type,placeholder:i.placeholder?i.placeholder:i.title,"allow-create":i.autocomplete,onChange:e=>{i.onChange(e,i.data)},clearable:""},{default:Object(l["withCtx"])(()=>[(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(i.data,e=>Object(l["withDirectives"])((Object(l["openBlock"])(),Object(l["createBlock"])(j,{disabled:e.disabled,key:e.key,label:e.value,value:e.key},null,8,["disabled","label","value"])),[[l["vShow"],!e.hidden]])),128))]),_:2},1032,["disabled","size","modelValue","onUpdate:modelValue","multiple","placeholder","allow-create","onChange"])),[[l["vShow"],!i.hidden]])],64)):"switch"==i.type?Object(l["withDirectives"])((Object(l["openBlock"])(),Object(l["createBlock"])(v,{key:3,modelValue:e.formFields[i.field],"onUpdate:modelValue":t=>e.formFields[i.field]=t,disabled:i.readonly||i.disabled,"active-color":"#0f84ff",onChange:i.onChange,"inactive-color":"rgb(194 194 194)","active-value":"boolean"==typeof e.formFields[i.field]||("string"==typeof e.formFields[i.field]?"1":1),"inactive-value":"boolean"!=typeof e.formFields[i.field]&&("string"==typeof e.formFields[i.field]?"0":0)},null,8,["modelValue","onUpdate:modelValue","disabled","onChange","active-value","inactive-value"])),[[l["vShow"],!i.hidden]]):"radio"==i.type?Object(l["withDirectives"])((Object(l["openBlock"])(),Object(l["createBlock"])(B,{key:4,disabled:i.readonly||i.disabled,modelValue:e.formFields[i.field],"onUpdate:modelValue":t=>e.formFields[i.field]=t,onChange:i.onChange},{default:Object(l["withCtx"])(()=>[(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(i.data,e=>(Object(l["openBlock"])(),Object(l["createBlock"])(x,{disabled:i.readonly||i.disabled,key:e.key,label:e.key},{default:Object(l["withCtx"])(()=>[Object(l["createTextVNode"])(Object(l["toDisplayString"])(e.value),1)]),_:2},1032,["disabled","label"]))),128))]),_:2},1032,["disabled","modelValue","onUpdate:modelValue","onChange"])),[[l["vShow"],!i.hidden]]):"checkbox"==i.type?Object(l["withDirectives"])((Object(l["openBlock"])(),Object(l["createBlock"])(F,{key:5,disabled:i.readonly||i.disabled,modelValue:e.formFields[i.field],"onUpdate:modelValue":t=>e.formFields[i.field]=t,onChange:i.onChange},{default:Object(l["withCtx"])(()=>[(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(i.data,e=>(Object(l["openBlock"])(),Object(l["createBlock"])(E,{key:e.key,disabled:i.readonly||i.disabled,label:e.key},{default:Object(l["withCtx"])(()=>[Object(l["createTextVNode"])(Object(l["toDisplayString"])(e.value),1)]),_:2},1032,["disabled","label"]))),128))]),_:2},1032,["disabled","modelValue","onUpdate:modelValue","onChange"])),[[l["vShow"],!i.hidden]]):-1!=["date","datetime"].indexOf(i.type)&&i.range?(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",d,[Object(l["createVNode"])(D,{size:e.size,disabled:i.readonly||i.disabled,style:{flex:"1",width:"auto"},modelValue:e.formFields[i.field][0],"onUpdate:modelValue":t=>e.formFields[i.field][0]=t,type:"date"==i.type?"date":"datetime",disabledDate:t=>e.getDateOptions(t,i),placeholder:"开始时间",onChange:t=>{e.dateRangeChange(t,i)},"value-format":e.getDateFormat(i)},null,8,["size","disabled","modelValue","onUpdate:modelValue","type","disabledDate","onChange","value-format"]),t[1]||(t[1]=Object(l["createElementVNode"])("span",{style:{margin:"0px 5px","font-size":"13px",color:"#6f6b6b"}},"至",-1)),Object(l["createVNode"])(D,{size:e.size,disabled:i.readonly||i.disabled,style:{flex:"1",width:"auto"},modelValue:e.formFields[i.field][1],"onUpdate:modelValue":t=>e.formFields[i.field][1]=t,placeholder:"结束时间",type:"date"==i.type?"date":"datetime",disabledDate:t=>e.getDateOptions(t,i),onChange:t=>{e.dateRangeChange(t,i)},"value-format":e.getDateFormat(i)},null,8,["size","disabled","modelValue","onUpdate:modelValue","type","disabledDate","onChange","value-format"])])):-1!=["date","datetime","month"].indexOf(i.type)?Object(l["withDirectives"])((Object(l["openBlock"])(),Object(l["createElementBlock"])("div",c,[Object(l["createVNode"])(D,{size:e.size,clearable:"",disabled:i.readonly||i.disabled,style:{width:"100%"},modelValue:e.formFields[i.field],"onUpdate:modelValue":t=>e.formFields[i.field]=t,onChange:i.onChange,type:i.type,placeholder:i.placeholder?i.placeholder:"请选择"+i.title,disabledDate:t=>e.getDateOptions(t,i),"value-format":e.getDateFormat(i)},null,8,["size","disabled","modelValue","onUpdate:modelValue","onChange","type","placeholder","disabledDate","value-format"])],512)),[[l["vShow"],!i.hidden]]):"time"==i.type?(Object(l["openBlock"])(),Object(l["createBlock"])(V,{key:8,size:e.size,modelValue:e.formFields[i.field],"onUpdate:modelValue":t=>e.formFields[i.field]=t,disabled:i.readonly||i.disabled,placeholder:"请选择时间","value-format":i.format||"HH:mm:ss",format:i.format,style:{width:"100%"}},null,8,["size","modelValue","onUpdate:modelValue","disabled","value-format","format"])):"editor"==i.type&&(i.readonly||i.disabled)?(Object(l["openBlock"])(),Object(l["createBlock"])(S,{key:9,style:{border:"1px solid #c7d8db","border-radius":"5px"},height:i.height||150},{default:Object(l["withCtx"])(()=>[Object(l["createElementVNode"])("div",{ref_for:!0,ref:"editor",innerHTML:e.formFields[i.field]},null,8,h)]),_:2},1032,["height"])):"editor"==i.type?(Object(l["openBlock"])(),Object(l["createBlock"])(N,{key:10,ref_for:!0,ref:"editor",url:i.url||e.editor.uploadImgUrl,upload:i.upload||e.editor.upload,modelValue:e.formFields[i.field],"onUpdate:modelValue":t=>e.formFields[i.field]=t,height:i.height||350},null,8,["url","upload","modelValue","onUpdate:modelValue","height"])):e.isFile(i,e.formFields)?Object(l["withDirectives"])((Object(l["openBlock"])(),Object(l["createBlock"])(A,{key:11,desc:i.desc,multiple:i.multiple,"max-file":i.maxFile,"max-size":i.maxSize,autoUpload:i.autoUpload,fileInfo:e.formFields[i.field],url:i.url,img:"img"==i.type||"img"==i.columnType,excel:"excel"==i.type,fileTypes:i.fileTypes?i.fileTypes:[],"upload-before":i.uploadBefore,"upload-after":i.uploadAfter,append:i.multiple,"on-change":t=>e.fileOnChange(t,i),"file-click":i.fileClick,"remove-before":i.removeBefore,downLoad:!!i.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"])),[[l["vShow"],!i.hidden]]):"cascader"==i.type?(Object(l["openBlock"])(),Object(l["createBlock"])(T,{key:12,size:e.size,clearable:"",style:{width:"100%","margin-top":"-3px"},modelValue:e.formFields[i.field],"onUpdate:modelValue":t=>e.formFields[i.field]=t,disabled:i.readonly||i.disabled,options:i.data,props:{checkStrictly:i.changeOnSelect||i.checkStrictly},onChange:i.onChange},null,8,["size","modelValue","onUpdate:modelValue","disabled","options","props","onChange"])):"rate"==i.type?(Object(l["openBlock"])(),Object(l["createBlock"])(I,{key:13,onChange:e=>{i.onChange&&i.onChange(e)},max:i.max,modelValue:e.formFields[i.field],"onUpdate:modelValue":t=>e.formFields[i.field]=t},null,8,["onChange","max","modelValue","onUpdate:modelValue"])):"range"==i.type||i.range?(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",u,[Object(l["createVNode"])(R,{size:e.size,disabled:i.readonly||i.disabled,style:{flex:"1"},modelValue:e.formFields[i.field][0],"onUpdate:modelValue":t=>e.formFields[i.field][0]=t,clearable:""},null,8,["size","disabled","modelValue","onUpdate:modelValue"]),t[2]||(t[2]=Object(l["createElementVNode"])("span",{style:{margin:"0 5px"}},"-",-1)),Object(l["createVNode"])(R,{size:e.size,disabled:i.readonly||i.disabled,style:{flex:"1"},modelValue:e.formFields[i.field][1],"onUpdate:modelValue":t=>e.formFields[i.field][1]=t,clearable:""},null,8,["size","disabled","modelValue","onUpdate:modelValue"])])):"textarea"==i.type?(Object(l["openBlock"])(),Object(l["createBlock"])(R,{key:15,size:e.size,clearable:"",ref_for:!0,ref:i.field,"input-style":i.inputStyle,disabled:i.readonly||i.disabled,modelValue:e.formFields[i.field],"onUpdate:modelValue":t=>e.formFields[i.field]=t,type:"textarea",autosize:{minRows:i.minRows||2,maxRows:i.maxRows||10},placeholder:i.placeholder?i.placeholder:i.title},null,8,["size","input-style","disabled","modelValue","onUpdate:modelValue","autosize","placeholder"])):"number"==i.type?(Object(l["openBlock"])(),Object(l["createBlock"])(U,{key:16,size:e.size,style:{width:"100%"},ref_for:!0,ref:i.field,"input-style":i.inputStyle,modelValue:e.formFields[i.field],"onUpdate:modelValue":t=>e.formFields[i.field]=t,min:i.min,disabled:i.readonly||i.disabled,max:i.max,"controls-position":"right"},null,8,["size","input-style","modelValue","onUpdate:modelValue","min","disabled","max"])):"password"==i.type?Object(l["withDirectives"])((Object(l["openBlock"])(),Object(l["createBlock"])(R,{key:17,size:e.size,clearable:"","input-style":i.inputStyle,type:"password",modelValue:e.formFields[i.field],"onUpdate:modelValue":t=>e.formFields[i.field]=t,disabled:i.readonly||i.disabled,placeholder:i.placeholder?i.placeholder:i.title},null,8,["size","input-style","modelValue","onUpdate:modelValue","disabled","placeholder"])),[[l["vShow"],!i.hidden]]):i.onKeyPress?Object(l["withDirectives"])((Object(l["openBlock"])(),Object(l["createBlock"])(R,{key:18,size:e.size,clearable:"",ref_for:!0,ref:i.field,"input-style":i.inputStyle,placeholder:i.placeholder?i.placeholder:i.title,disabled:i.readonly||i.disabled,modelValue:e.formFields[i.field],"onUpdate:modelValue":t=>e.formFields[i.field]=t,onKeypress:t=>{e.onKeyPress(t,i)},onChange:i.onKeyPress,onKeyup:Object(l["withKeys"])(i.onKeyPress,["enter"])},null,8,["size","input-style","placeholder","disabled","modelValue","onUpdate:modelValue","onKeypress","onChange","onKeyup"])),[[l["vShow"],!i.hidden]]):Object(l["withDirectives"])((Object(l["openBlock"])(),Object(l["createBlock"])(R,{key:19,size:e.size,clearable:"",ref_for:!0,ref:i.field,"input-style":i.inputStyle,placeholder:i.placeholder?i.placeholder:i.title,disabled:i.readonly||i.disabled,modelValue:e.formFields[i.field],"onUpdate:modelValue":t=>e.formFields[i.field]=t},null,8,["size","input-style","placeholder","disabled","modelValue","onUpdate:modelValue"])),[[l["vShow"],!i.hidden]]),i.extra?(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",m,[i.extra.render?(Object(l["openBlock"])(),Object(l["createBlock"])(O,{key:0,render:i.extra.render},null,8,["render"])):i.extra.click?(Object(l["openBlock"])(),Object(l["createElementBlock"])("a",{key:1,style:Object(l["normalizeStyle"])(i.extra.style),onClick:t=>i.extra.click(i,e.formFields[i.field])},[i.extra.icon?(Object(l["openBlock"])(),Object(l["createElementBlock"])("i",{key:0,class:Object(l["normalizeClass"])(i.extra.icon)},null,2)):Object(l["createCommentVNode"])("",!0),Object(l["createTextVNode"])(" "+Object(l["toDisplayString"])(i.extra.text),1)],12,p)):(Object(l["openBlock"])(),Object(l["createElementBlock"])("a",{key:2,style:Object(l["normalizeStyle"])(i.extra.style)},[i.extra.icon?(Object(l["openBlock"])(),Object(l["createElementBlock"])("i",{key:0,class:Object(l["normalizeClass"])(i.extra.icon)},null,2)):Object(l["createCommentVNode"])("",!0),Object(l["createTextVNode"])(" "+Object(l["toDisplayString"])(i.extra.text),1)],4))])):Object(l["createCommentVNode"])("",!0)],2))]),_:2},1032,["label","prop","style"])),[[l["vShow"],!i.hidden]])),128))]))),128)),Object(l["renderSlot"])(e.$slots,"default",{},void 0,!0),Object(l["createElementVNode"])("div",f,[Object(l["renderSlot"])(e.$slots,"footer",{},void 0,!0)])]),_:3},8,["model","label-width","rules"])}i("7cfc"),i("5948");var y={name:"FormExpand",functional:!0,props:{render:Function,par:{}},render:({render:e,par:t})=>e(l["h"],{par:t})};const g={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]+)?)$/},O=["text","string","mail","textarea","password"],k={int:"number",byte:"number",decimal:"number",string:"string",bool:"boolean",date:"datetime",date:"date",mail:"email"},w=Math.pow(10,3);var j=Object(l["defineComponent"])({components:{FormExpand:y,"vol-upload":Object(l["defineAsyncComponent"])(()=>i.e("chunk-4685d204").then(i.bind(null,"14cf"))),"vol-wang-editor":Object(l["defineAsyncComponent"])(()=>i.e("chunk-27fe8c2e").then(i.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:()=>({})},size:{type:String,default:"large"},select2Count:{type:Number,default:500}},computed:{rules(){let e={};return this.formRules.forEach((t,i)=>{t.forEach(t=>{e[t.field]=[this.getRule(t,this.formFields)]})}),this.$refs.volform&&setTimeout(()=>{this.$refs.volform.clearValidate()},100),e}},setup(e,t){const{appContext:i,proxy:o}=Object(l["getCurrentInstance"])(),n=Object(l["ref"])(!0),a=Object(l["ref"])(1),r=Object(l["toRefs"])([]),s=Object(l["ref"])(null),d=Object(l["toRefs"])([]);Object(l["onMounted"])(()=>{});const c=t=>{e.loadKey&&h(),e.formRules.forEach((i,l)=>{i.length>a.value&&(a.value=i.length);let o=0,n=0;if(i.forEach(e=>{e.colSize>0&&(n+=e.colSize,o++)}),o>0&&i.length-o>0){let e=(12-n)/(i.length-o);i.forEach(t=>{t.colSize||(t.colSize=e)})}i.forEach((i,o)=>{"number"==i.type&&d.push(i.field),(i.remote||i.url)&&(i.loading=!1,i.point={x:l,y:o}),m(i,t),i.dataKey&&(i.columnType="string",i.data||(i.data=[])),(i.range||"range"==i.type)&&(e.formFields[i.field]instanceof Array&&2==e.formFields[i.field].length||(e.formFields[i.field]=["",""]),r.push(i.field))})})},h=()=>{let t=[],l=[];e.formRules.forEach(e=>{e.forEach(e=>{!e.dataKey||e.data&&0!=e.data.length||e.remote||(e.data=[],l.push({key:e.dataKey,data:e.data,type:e.type}),-1==t.indexOf(e.dataKey)&&t.push(e.dataKey))})}),0!=t.length&&i.config.globalProperties.http.post("/api/Sys_Dictionary/GetVueDictionary",t).then(e=>{u(e,l),o.$emit("dicInited",e)})},u=(t,l)=>{t.forEach(t=>{t.data.length>e.select2Count&&(l.some(e=>e.key==t.dicNo&&"cascader"==e.type)||t.data.forEach(e=>{e.label=e.value,e.value=e.key})),l.forEach(l=>{if(l.key!=t.dicNo)return!0;if(l.data.length>0)return!0;if("cascader"==l.type||"treeSelect"==l.type){let o=JSON.parse(JSON.stringify(t.data)),n=i.config.globalProperties.base.convertTree(o,(e,t,i)=>{e.inited||(e.inited=!0,e.label=e.value,e.value=e.key)});e.formRules.forEach(e=>{e.forEach(e=>{e.dataKey==l.key&&(e.orginData=l.data,e.data=n)})})}else if(t.data.length>0&&!t.data[0].hasOwnProperty("key")){let e=t.data,i=new Array(e.length);for(let t=0;t<e.length;t++)i[t]={key:e["key"]+"",value:e["value"]};l.data.push(...i)}else l.data.push(...t.data)})})},m=(e,t)=>{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,i)=>!0),e.fileClick||(e.fileClick=(e,t,i)=>!0),e.onChange||(e.onChange=e=>!0),e.uploadAfter||(e.uploadAfter=(e,t)=>!0),e.uploadBefore||(e.uploadBefore=e=>!0))},p=e=>{let t=!0;return s.value.validate(l=>{if(l){if("function"===typeof e)try{e(l)}catch(o){let e="表单验证回调方法异常:"+o.message;i.config.globalProperties.$message.error(e),console.log(e)}}else i.config.globalProperties.$message.error("数据验证未通过!"),t=!1}),t};return c(!0),{remoteCall:n,span:a,rangeFields:r,numberFields:d,validate:p,volform:s}},created(){this.formRules.forEach(e=>{e.forEach(e=>{"treeSelect"==e.type&&void 0===e.multiple&&(e.multiple=!0)})})},data(){return{errorImg:'this.src="'+i("731d")+'"'}},methods:{getColWidth(e){let t=0;this.formRules.forEach((e,i)=>{let l=e.filter(e=>!e.hidden).length;l>t&&(t=l)});let i=Math.round((e.colSize||12/t)/.12*w,10)/w;return e.colSize,i.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 i=t[e.field];if(!(i instanceof Array))if(null!==i&&void 0!==i){if("string"===typeof i){if(""===i.trim())return void(t[e.field]=[]);i=i.replace(/\\/g,"/");let l=i.split(",");t[e.field]=[];for(let i=0;i<l.length;i++){let o=l[i],n=o.split("/");t[e.field].push({name:n.length>0?n[n.length-1]:o,path:o})}}}else t[e.field]=[]},dowloadFile(e){this.base.dowloadFile(e.path,e.name,{Authorization:this.$store.getters.getToken()},this.http.ipAddress)},validatorPhone(e,t,i){return e.required||t||"0"==t?g.phone.test((t||"").trim())?void i():i(new Error("请输入正确的手机号")):i()},validatorPwd(e,t,i){return e.required||t||"0"==t?(t+"").trim().length<6?i(new Error("密码长度不能小于6位")):void i():i()},convertArrayValue(e,t){let i=Array.isArray(t)?t.map(e=>e):t.split(",");for(let o=0;o<i.length;o++){var l=e.find(e=>e.key&&"0"!=e.key&&e.key+""==i[o]+"");l&&(i[o]=l.value)}return i.join(",")},getText(e,t){let i=e[t.field];if("function"===typeof i)return i(e);if("null"===i||""===i||null===i||void 0===i)return"--";if("date"==t.type)return i.replace("T"," ").split(" ")[0];if("switch"==t.type)return i?"是":"否";if(!t.data)return i;if("selectList"==t.type||"checkbox"==t.type)return this.convertArrayValue(t.data,i);var l=t.data.find(e=>e.key==i);return l?l.value:i},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,i){if(!e.remote&&!e.url)return;if(""==i||1==e.data.length&&(i==e.data[0].key||i==e.data[0].value))return;let l;l="function"===typeof e.url?e.url(i,e.dataKey,e):(e.url||"/api/Sys_Dictionary/GetSearchDictionary")+"?dicNo="+e.dataKey+"&value="+i,this.http.post(l).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],-1!=this.numberFields.indexOf(t)&&(this.formFields[t]=1*e[t]||0))},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,i,l)=>{let o=e.validator(t,i);return o?l(new Error(o+"")):l()},required:e.required,trigger:-1!=g.change.indexOf(e.type)?"change":"blur"};if(-1!=["img","excel","file"].indexOf(e.type))return{validator:(t,i,l)=>!e.required||this.isReadonly(e)||i&&i.length?l():l(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:(t,i,l)=>{if(!t.min&&!t.max)return!t.required||(i||"0"==i)&&g.decimal.test(i)?l():l(new Error("只能是数字"));if(this.isReadonly(e))return l();if("number"==t.type){if(!g.number.test(i))return t.message=t.title+"只能是整数",l(new Error(t.message))}else if(!g.decimal.test(i))return t.message=t.title+"只能是数字",l(new Error(t.message));return void 0!==t.min&&"number"===typeof t.min&&i<t.min?(t.message=t.title+"不能小于"+t.min,l(new Error(t.message))):void 0!==t.max&&"number"===typeof t.max&&i>t.max?(t.message=t.title+"不能大于"+t.max,l(new Error(t.message))):l()}};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!=O.indexOf(e.type)){let t=e.title+("mail"==e.type?"必须是一个邮箱地址":"不能为空"),i="mail"==e.type?"email":k[e.columnType],l={required:!0,message:t,trigger:"blur",type:i,validator:(t,i,l)=>this.isReadonly(e)||""!==i&&void 0!==i&&null!==i?l():l(new Error(t.message))};return"mail"==e.type?(l.validator=void 0,l):(e.min&&(l.min=e.min,l.message=e.title+"至少"+e.min+"个字符!"),e.max?[l,{max:e.max,required:!0,message:e.title+"最多"+e.max+"个字符!",trigger:"blur"}]:l)}if("radio"==e.type)return{required:e.required,message:"请选择"+e.title,trigger:"change",type:"string"};if("date"==e.type||"datetime"==e.type||"month"==e.type||"time"==e.type)return{required:!0,message:"请选择"+e.title,trigger:"change",type:e.range?"array":"string",validator:(t,i,l)=>this.isReadonly(e)?l():!i||e.range&&!i.length?l(new Error("请选择日期")):l()};if("cascader"==e.type)return{type:"array",required:!0,min:e.min||1,trigger:"change",validator:(t,i,l)=>{if(this.isReadonly(e))return l();let o=this.formFields[e.field];return o&&o.length?l():l(new Error("请选择"+e.title))}};if(-1!=["select","selectList","checkbox","cascader","treeSelect"].indexOf(e.type)){let t={type:"select"==e.type?"string":"array",required:!0,min:e.min||1,message:"请选择"+e.title,trigger:"change",validator:(t,i,l)=>this.isReadonly(e)?l():void 0==i||""===i?l(new Error(t.message)):"checkbox"!=e.type&&"selectList"!=e.type&&"treeSelect"!=e.type||i instanceof Array&&i.length?l():l(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"month"==e.type?"YYYY-MM":"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)},filterMethod(e,t){return t.label.includes(e)},getNode(e,t,i){console.log(e)}}}),C=(i("99e8"),i("9c21")),v=i.n(C);const x=v()(j,[["render",b],["__scopeId","data-v-d5317f32"]]);t["a"]=x},"71b4":function(e,t,i){"use strict";i("e0f9")},"731d":function(e,t,i){e.exports=i.p+"img/error-img.2bfbe647.png"},"99e8":function(e,t,i){"use strict";i("2a47")},"9c75":function(e,t,i){},bca9:function(e,t,i){"use strict";i("1b3c")},c1fb:function(e,t,i){"use strict";i("c9d7"),i("b6b0"),i("e2d1");var l=i("eb06"),o=i.n(l),n=i("4360"),a=i("1654"),r=i("1019"),s=i("b9e8");Object(a["c"])();let d;o.a.defaults.timeout=5e4,o.a.defaults.headers.post["Content-Type"]="application/x-www-form-urlencoded;charset=UTF-8";let c=!1;o.a.defaults.baseURL=window.webConfig.webApiProduction,o.a.defaults.baseURL.endsWith("/")||(o.a.defaults.baseURL+="/");let h=o.a.defaults.baseURL;function u(){d&&d.close(),c&&(c=!1,d&&d.close())}function m(e){e.headers?"1"==e.headers.wideseawcs_exp&&C():"1"==e.getResponseHeader("wideseawcs_exp")&&C()}o.a.interceptors.request.use(e=>e,e=>Promise.reject(e)),o.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 j();"404"==e.response.status?t="未找到请求地址":e.response.data&&e.response.data.message&&(t=e.response.data.message)}else t="服务器处理异常";return w(t),Promise.reject(e.response||{},t)});const p="Authorization";function f(e){e&&!c&&(d=s["a"].service({lock:!0,text:"Loading",customClass:"http-loading",background:"string"==typeof e?e:"正在处理.....",background:"rgba(58, 61, 63, 0.32)"}))}function b(){return n["a"].getters.getToken()}function y(e,t,i,l){return f(i),o.a.defaults.headers[p]=b(),new Promise((i,n)=>{o.a.post(e,t,l).then(e=>{i(e.data)},e=>{n(e&&e.data&&e.data.message?e.data.message:"服务器处理异常")}).catch(e=>{n(e)})})}function g(e,t,i,l){return f(i),o.a.defaults.headers[p]=b(),new Promise((t,i)=>{o.a.get(e,l).then(e=>{t(e.data)},e=>{i(e)}).catch(e=>{i(e)})})}function O(e,t,i,l,o){i=i.replace(">",">").replace("<","<"),y(e,t,l,{responseType:"blob"}).then(e=>{const t=new Blob([e]);if("download"in document.createElement("a")){const e=document.createElement("a");e.download=i,e.style.display="none",e.href=URL.createObjectURL(t),document.body.appendChild(e),e.click(),URL.revokeObjectURL(e.href),document.body.removeChild(e)}else navigator.msSaveBlob(t,i);o&&o()})}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<e.length;t++)try{new ActiveXObject(e[t]),arguments.callee.activeXString=e[t];break}catch(i){console.log(i)}return new ActiveXObject(arguments.callee.activeXString)}}function w(e,t){try{let i="string"==typeof e?JSON.parse(e):e;i.hasOwnProperty("code")&&401==i.code||i.data&&401==i.data.code?(u(),j()):t&&r["a"].error({showClose:!0,message:t,type:"error"})}catch(i){console.log(i),r["a"].error({showClose:!0,message:e,type:"error"})}}function j(){window.location.hash?window.location.href=window.location.origin+"/#/login":window.location.href=window.location.origin+"/login"}function C(){v({url:"/api/User/replaceToken",param:{},json:!0,success:function(e){if(e.status){let t=n["a"].getters.getUserInfo();t.token=e.data,n["a"].commit("setUserInfo",t)}else console.log(e.message),j()},errror:function(e){console.log(e),j()},type:"post",async:!1})}function v(e){let t=Object.assign({url:"",headers:{},param:{},json:!0,success:function(){},errror:function(){},type:"post",async:!0},e);t.url=o.a.defaults.baseURL+t.url.replace(/\/?/,""),t.headers[p]=b();var i=k();i.onreadystatechange=function(){403!=i.status&&401!=i.status?(m(i),4!=i.readyState||200!=i.status?0!=i.status&&1!=i.readyState&&t.errror(i):t.success(t.json?JSON.parse(i.responseText):i.responseText)):w(i.responseText)},i.open(t.type,t.url,t.async),i.setRequestHeader("Content-type","application/x-www-form-urlencoded");for(const o in t.headers)i.setRequestHeader(o,t.headers[o]);let l="";for(const o in t.param)l+=o+"="+t.param[o];try{i.send(l)}catch(n){j()}}v.post=function(e,t,i,l){v({url:e,param:t,success:i,error:l,type:"post"})},v.get=function(e,t,i,l){v({url:e,param:t,success:i,error:l,type:"get"})},t["a"]={post:y,get:g,download:O,ajax:v,ipAddress:h}},d66d:function(e,t,i){},da20:function(e,t,i){"use strict";i("5af4")},e0f9:function(e,t,i){},e5b2:function(e,t,i){"use strict";i("653a")}});
|