index-3a9eeb83.js 15 KB

1
  1. import{b as A,A as M,_ as ae,d as L,u as le,a as re,q as oe,L as ie,R as se,M as G,E as ce,m as D}from"./index-3887ab05.js";import{u as E}from"./vue-router-d228e26b.js";import{m as i,a as S,o as H,W as y,X as o,Y as h,Z as s,F as N,a6 as B,$ as p,E as U,a0 as $,a2 as g,c as ue,u as v,a5 as F,P as de,N as T,a7 as fe}from"./vue-74beb2f3.js";import{u as pe}from"./index-ef7c0bcc.js";var me={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.7c6 6 9.4 14.1 9.4 22.6V928c0 17.7-14.3 32-32 32H192c-17.7 0-32-14.3-32-32V96c0-17.7 14.3-32 32-32h424.7c8.5 0 16.7 3.4 22.7 9.4l215.2 215.3zM790.2 326L602 137.8V326h188.2zM633.22 637.26c-15.18-.5-31.32.67-49.65 2.96-24.3-14.99-40.66-35.58-52.28-65.83l1.07-4.38 1.24-5.18c4.3-18.13 6.61-31.36 7.3-44.7.52-10.07-.04-19.36-1.83-27.97-3.3-18.59-16.45-29.46-33.02-30.13-15.45-.63-29.65 8-33.28 21.37-5.91 21.62-2.45 50.07 10.08 98.59-15.96 38.05-37.05 82.66-51.2 107.54-18.89 9.74-33.6 18.6-45.96 28.42-16.3 12.97-26.48 26.3-29.28 40.3-1.36 6.49.69 14.97 5.36 21.92 5.3 7.88 13.28 13 22.85 13.74 24.15 1.87 53.83-23.03 86.6-79.26 3.29-1.1 6.77-2.26 11.02-3.7l11.9-4.02c7.53-2.54 12.99-4.36 18.39-6.11 23.4-7.62 41.1-12.43 57.2-15.17 27.98 14.98 60.32 24.8 82.1 24.8 17.98 0 30.13-9.32 34.52-23.99 3.85-12.88.8-27.82-7.48-36.08-8.56-8.41-24.3-12.43-45.65-13.12zM385.23 765.68v-.36l.13-.34a54.86 54.86 0 015.6-10.76c4.28-6.58 10.17-13.5 17.47-20.87 3.92-3.95 8-7.8 12.79-12.12 1.07-.96 7.91-7.05 9.19-8.25l11.17-10.4-8.12 12.93c-12.32 19.64-23.46 33.78-33 43-3.51 3.4-6.6 5.9-9.1 7.51a16.43 16.43 0 01-2.61 1.42c-.41.17-.77.27-1.13.3a2.2 2.2 0 01-1.12-.15 2.07 2.07 0 01-1.27-1.91zM511.17 547.4l-2.26 4-1.4-4.38c-3.1-9.83-5.38-24.64-6.01-38-.72-15.2.49-24.32 5.29-24.32 6.74 0 9.83 10.8 10.07 27.05.22 14.28-2.03 29.14-5.7 35.65zm-5.81 58.46l1.53-4.05 2.09 3.8c11.69 21.24 26.86 38.96 43.54 51.31l3.6 2.66-4.39.9c-16.33 3.38-31.54 8.46-52.34 16.85 2.17-.88-21.62 8.86-27.64 11.17l-5.25 2.01 2.8-4.88c12.35-21.5 23.76-47.32 36.05-79.77zm157.62 76.26c-7.86 3.1-24.78.33-54.57-12.39l-7.56-3.22 8.2-.6c23.3-1.73 39.8-.45 49.42 3.07 4.1 1.5 6.83 3.39 8.04 5.55a4.64 4.64 0 01-1.36 6.31 6.7 6.7 0 01-2.17 1.28z"}}]},name:"file-pdf",theme:"filled"};const ve=me;function J(a){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},l=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(l=l.concat(Object.getOwnPropertySymbols(e).filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),l.forEach(function(n){ye(a,n,e[n])})}return a}function ye(a,t,e){return t in a?Object.defineProperty(a,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):a[t]=e,a}var I=function(t,e){var l=J({},t,e.attrs);return i(A,J({},l,{icon:ve}),null)};I.displayName="FilePdfFilled";I.inheritAttrs=!1;const be=I;var _e={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.7c6 6 9.4 14.1 9.4 22.6V928c0 17.7-14.3 32-32 32H192c-17.7 0-32-14.3-32-32V96c0-17.7 14.3-32 32-32h424.7c8.5 0 16.7 3.4 22.7 9.4l215.2 215.3zM790.2 326L602 137.8V326h188.2zM320 482a8 8 0 00-8 8v48a8 8 0 008 8h384a8 8 0 008-8v-48a8 8 0 00-8-8H320zm0 136a8 8 0 00-8 8v48a8 8 0 008 8h184a8 8 0 008-8v-48a8 8 0 00-8-8H320z"}}]},name:"file-text",theme:"filled"};const ge=_e;function Q(a){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},l=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(l=l.concat(Object.getOwnPropertySymbols(e).filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),l.forEach(function(n){he(a,n,e[n])})}return a}function he(a,t,e){return t in a?Object.defineProperty(a,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):a[t]=e,a}var W=function(t,e){var l=Q({},t,e.attrs);return i(A,Q({},l,{icon:ge}),null)};W.displayName="FileTextFilled";W.inheritAttrs=!1;const we=W;var xe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.7c6 6 9.4 14.1 9.4 22.6V928c0 17.7-14.3 32-32 32H192c-17.7 0-32-14.3-32-32V96c0-17.7 14.3-32 32-32h424.7c8.5 0 16.7 3.4 22.7 9.4l215.2 215.3zM790.2 326L602 137.8V326h188.2zM402 549c0 5.4 4.4 9.5 9.8 9.5h32.4c5.4 0 9.8-4.2 9.8-9.4 0-28.2 25.8-51.6 58-51.6s58 23.4 58 51.5c0 25.3-21 47.2-49.3 50.9-19.3 2.8-34.5 20.3-34.7 40.1v32c0 5.5 4.5 10 10 10h32c5.5 0 10-4.5 10-10v-12.2c0-6 4-11.5 9.7-13.3 44.6-14.4 75-54 74.3-98.9-.8-55.5-49.2-100.8-108.5-101.6-61.4-.7-111.5 45.6-111.5 103zm110 227a32 32 0 100-64 32 32 0 000 64z"}}]},name:"file-unknown",theme:"filled"};const Fe=xe;function K(a){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},l=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(l=l.concat(Object.getOwnPropertySymbols(e).filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),l.forEach(function(n){ke(a,n,e[n])})}return a}function ke(a,t,e){return t in a?Object.defineProperty(a,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):a[t]=e,a}var X=function(t,e){var l=K({},t,e.attrs);return i(A,K({},l,{icon:Fe}),null)};X.displayName="FileUnknownFilled";X.inheritAttrs=!1;const Oe=X;var Pe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.7c6 6 9.4 14.1 9.4 22.6V928c0 17.7-14.3 32-32 32H192c-17.7 0-32-14.3-32-32V96c0-17.7 14.3-32 32-32h424.7c8.5 0 16.7 3.4 22.7 9.4l215.2 215.3zM790.2 326L602 137.8V326h188.2zM512 566.1l52.81 197a12 12 0 0011.6 8.9h31.77a12 12 0 0011.6-8.88l74.37-276a12 12 0 00.4-3.12 12 12 0 00-12-12h-35.57a12 12 0 00-11.7 9.31l-45.78 199.1-49.76-199.32A12 12 0 00528.1 472h-32.2a12 12 0 00-11.64 9.1L434.6 680.01 388.5 481.3a12 12 0 00-11.68-9.29h-35.39a12 12 0 00-3.11.41 12 12 0 00-8.47 14.7l74.17 276A12 12 0 00415.6 772h31.99a12 12 0 0011.59-8.9l52.81-197z"}}]},name:"file-word",theme:"filled"};const Se=Pe;function ee(a){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},l=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(l=l.concat(Object.getOwnPropertySymbols(e).filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),l.forEach(function(n){$e(a,n,e[n])})}return a}function $e(a,t,e){return t in a?Object.defineProperty(a,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):a[t]=e,a}var Y=function(t,e){var l=ee({},t,e.attrs);return i(A,ee({},l,{icon:Se}),null)};Y.displayName="FileWordFilled";Y.inheritAttrs=!1;const Re=Y;var qe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm144.1 454.9L437.7 677.8a8.02 8.02 0 01-12.7-6.5V353.7a8 8 0 0112.7-6.5L656.1 506a7.9 7.9 0 010 12.9z"}}]},name:"play-circle",theme:"filled"};const ze=qe;function te(a){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},l=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(l=l.concat(Object.getOwnPropertySymbols(e).filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),l.forEach(function(n){je(a,n,e[n])})}return a}function je(a,t,e){return t in a?Object.defineProperty(a,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):a[t]=e,a}var Z=function(t,e){var l=te({},t,e.attrs);return i(A,te({},l,{icon:ze}),null)};Z.displayName="PlayCircleFilled";Z.inheritAttrs=!1;const Ce=Z,Te={key:0},Me={key:1},Ae={style:{color:"#999"}},Ve={__name:"log",props:{ownertable:String,keyid:String},setup(a){const t=a,e=E(),l=S([]),n=async()=>{const w=await M.requested({id:20221114125401,content:{pageNumber:1,pageSize:20,ownertable:t.ownertable,ownerid:e.currentRoute.value.query.id}});l.value=w.data};return H(()=>{n()}),(w,R)=>{const b=y("a-empty"),z=y("a-timeline-item"),_=y("a-timeline");return o(),h("div",null,[l.value.length===0?(o(),h("div",Te,[i(b)])):(o(),h("div",Me,[i(_,null,{default:s(()=>[(o(!0),h(N,null,B(l.value,(x,j)=>(o(),p(z,{key:j},{default:s(()=>[U($(x.actionby)+" - "+$(x.action)+" - "+$(x.remarks),1),g("p",Ae,$(x.actiondate),1)]),_:2},1024))),128))]),_:1})]))])}}};const De={class:""},Le={style:{"margin-top":"10px"}},Ne={class:"image-panel panel"},Be=["onClick"],Ue=["href"],Ee=["onClick"],He=["src"],Ie=["src"],We={__name:"files",props:["ownertable","data"],setup(a){const t=a,e=S(!1),l=S(!1),n=S(""),w=(r,f)=>{switch(n.value=r.url,f){case"office":e.value=!0;break;case"pdf":e.value=!0;break;case"视频":l.value=!0;break}},R=r=>{e.value=!1},b=r=>{const f=r.url.match(/\.(jpg|jpeg|png|gif|svg)$/i)!==null,C=r.url.match(/\.(mp4|avi|mkv|flv|mov)$/i)!==null,O=r.url.match(/\.(txt|md|csv|xml)$/i)!==null,P=r.url.match(/\.(doc|docx|xls|xlsx|ppt|pptx)$/i)!==null,q=r.url.match(/\.(pdf)$/i)!==null;return f?"图片":C?"视频":O?"文本":P?"office":q?"pdf":"其他"},z=[{title:"附件名称",dataIndex:"document",key:"document"},{title:"上传时间",dataIndex:"createdate",key:"createdate"},{title:"操作",dataIndex:"op",key:"op"}],_=ue(()=>{const r=t.data.filter(f=>{if(f.label=="状态")return f});return!r[0]||r[0].value=="新建"||r[0].value=="下架"}),x=E(),j=x.currentRoute.value.query.id,V=r=>{console.log(r),m()},u=S([]),m=async()=>{const r=await M.requested({classname:"system.attachment.Attachment",method:"queryFileLink",content:{ownertable:t.ownertable,ownerid:x.currentRoute.value.query.id,usetype:"default"}});u.value=r.data},k=async r=>{const f=await M.requested({classname:"system.attachment.Attachment",method:"deleteFileLink",content:{linksids:[r.linksid]}});L.message(f,"删除成功",()=>{m()})};return H(()=>{m()}),(r,f)=>{const C=y("a-image"),O=y("a-space"),P=y("a-table"),q=y("a-modal");return o(),h("div",De,[v(_)?(o(),p(pe,{key:0,bindData:{ownerid:v(j),ownertable:t.ownertable,usetype:"default"},text:"点击上传",onUploadSuccess:V},null,8,["bindData"])):F("",!0),g("div",Le,[i(P,{dataSource:u.value,columns:z},{bodyCell:s(({column:c,record:d})=>[c.key==="document"?(o(),p(O,{key:0,size:[10,10]},{default:s(()=>[g("div",Ne,[b(d)=="图片"?(o(),p(C,{key:0,width:80,height:80,src:d.url},null,8,["src"])):b(d)=="视频"?(o(),p(v(Ce),{key:1,style:{"font-size":"30px"}})):b(d)=="文本"?(o(),p(v(we),{key:2,style:{"font-size":"30px"}})):b(d)=="office"?(o(),p(v(Re),{key:3,style:{"font-size":"30px"}})):b(d)=="pdf"?(o(),p(v(be),{key:4,style:{"font-size":"30px"}})):(o(),p(v(Oe),{key:5,style:{"font-size":"30px"}}))]),g("span",null,$(d.document),1)]),_:2},1024)):F("",!0),c.key==="op"?(o(),p(O,{key:1,size:[10,10]},{default:s(()=>[b(d)!=="图片"&&b(d)!=="其他"?(o(),h("a",{key:0,target:"_blank",onClick:ne=>w(d,b(d))},"预览",8,Be)):F("",!0),g("a",{href:d.url,target:"_blank"},"下载",8,Ue),v(_)?(o(),h("a",{key:1,type:"link",onClick:ne=>k(d)},"删除",8,Ee)):F("",!0)]),_:2},1024)):F("",!0)]),_:1},8,["dataSource"])]),i(q,{open:e.value,"onUpdate:open":f[0]||(f[0]=c=>e.value=c),title:"预览",onOk:R,width:900},{default:s(()=>[g("iframe",{src:`https://view.officeapps.live.com/op/view.aspx?src=${encodeURIComponent(n.value)}`,frameborder:"0",style:{height:"100vh",width:"100%"}},null,8,He)]),_:1},8,["open"]),i(q,{open:l.value,"onUpdate:open":f[1]||(f[1]=c=>l.value=c),title:"预览",onOk:R,width:900},{default:s(()=>[g("video",{src:n.value,style:{width:"100%"},controls:""},null,8,Ie)]),_:1},8,["open"])])}}},Xe=ae(We,[["__scopeId","data-v-722f1332"]]);const Ye={class:"flex-between"},Ze={class:"flex-align-center"},Ge={key:0},Je={__name:"index",props:{headData:Array,tabs:Array,ownertable:String,title:String,delParam:Object,disable:Boolean,notabs:Boolean},emits:["changeTab"],setup(a,{emit:t}){const e=a,l=le(),n=E();re();const w=S(0),R=()=>{l.delRoute(n.currentRoute.value.name,n.currentRoute.value.name),n.replace({name:n.currentRoute.value.meta.name})},b=()=>{G.confirm({title:"删除",content:"确认删除当前数据吗",icon:i(ce),async onOk(){const u=await M.post(e.delParam);L.message(u,"删除成功",()=>{let m=n.currentRoute.value.name;l.delRoute(m,m),R()})},okText:"确定",cancelText:"取消",onCancel(){G.destroyAll()}})},z=u=>{w.value=u,t("changeTab",u)},_=S(null),x=()=>{let u=n.currentRoute.value.query.rowindex,m=n.currentRoute.value.query.listqueryid;u>=1?(_.value!==null&&clearTimeout(_.value),_.value=setTimeout(()=>{V(0,m)},0)):D.warn("已经是第一条了!")},j=()=>{let u=n.currentRoute.value.query.listqueryid;_.value!==null&&clearTimeout(_.value),_.value=setTimeout(()=>{V(1,u)},0)},V=async(u,m)=>{const k=D.loading({content:"正在查询数据,请稍等..",duration:0,key:1}),r=await M.requested({classname:"system.tools",method:"querylistdatabyrowindex",content:{uniqueid:n.currentRoute.value.query.id,rowindex:n.currentRoute.value.query.rowindex,forward:u,listqueryid:m,fieldname:n.currentRoute.value.query.fieldName?n.currentRoute.value.query.fieldName:""}});r.data.data?(k(),n.replace({path:n.currentRoute.value.path,query:{id:r.data.data,rowindex:r.data.rowindex,listqueryid:m,fieldName:n.currentRoute.value.query.fieldName}})):D.warn("已经是最后一条了!")};return de(()=>{(!e.tabs||e.tabs.length==0)&&(w.value="log")}),H(()=>{}),(u,m)=>{const k=y("a-button"),r=y("a-space"),f=y("a-descriptions-item"),C=y("a-descriptions"),O=y("a-card"),P=y("a-tab-pane"),q=y("a-tabs");return o(),h("div",null,[i(O,{class:"mt-10",style:{borderRadius:"0 0 5px 5px"},bodyStyle:{padding:"20px"},headStyle:{padding:"0 10px"},bordered:!1},{title:s(()=>[g("div",Ye,[i(r,null,{default:s(()=>[i(k,{shape:"circle",onClick:R},{default:s(()=>[i(v(oe))]),_:1}),g("div",null,[U($(a.title)+" ",1),T(u.$slots,"titleRight",{},void 0,!0)])]),_:3}),g("div",Ze,[i(r,null,{default:s(()=>[T(u.$slots,"operation",{},void 0,!0),a.delParam&&v(L).hasPermission("delete")?(o(),p(k,{key:0,type:"primary",disabled:a.disable,onClick:b,danger:""},{default:s(()=>[U("删除")]),_:1},8,["disabled"])):F("",!0),v(n).currentRoute.value.query.listqueryid?(o(),p(k,{key:1,onClick:x},{icon:s(()=>[i(v(ie))]),_:1})):F("",!0),v(n).currentRoute.value.query.listqueryid?(o(),p(k,{key:2,onClick:j},{icon:s(()=>[i(v(se))]),_:1})):F("",!0)]),_:3})])])]),default:s(()=>[i(C,{column:6,colon:!1,labelStyle:{display:"block",lineHeight:"25px",color:"#666",width:"80px",textAlignLast:"justify"},contentStyle:{marginRight:"20px",background:"#f1f2f3",color:"#333",padding:"0px 5px",lineHeight:"25px",borderRadius:"3px"},size:"small"},{default:s(()=>[(o(!0),h(N,null,B(e.headData,c=>(o(),p(f,{span:c.span?c.span:1,key:c.index,label:c.label},{default:s(()=>[g("span",{style:fe(c.style?c.style():"")},$(typeof c.value=="object"?c.value.join(","):c.value),5)]),_:2},1032,["span","label"]))),128))]),_:1}),T(u.$slots,"customContent",{},void 0,!0)]),_:3}),T(u.$slots,"customMid",{},void 0,!0),i(O,{class:"mt-10",style:{borderRadius:"5px"},bodyStyle:{padding:"0 20px 20px 20px"},bordered:!1},{default:s(()=>[e.notabs?F("",!0):(o(),h("div",Ge,[i(q,{activeKey:w.value,"onUpdate:activeKey":m[0]||(m[0]=c=>w.value=c),onChange:z},{default:s(()=>[(o(!0),h(N,null,B(e.tabs,(c,d)=>(o(),p(P,{key:d,tab:c},{default:s(()=>[T(u.$slots,"tab"+d,{},void 0,!0)]),_:2},1032,["tab"]))),128)),i(P,{key:"file",tab:"附件"},{default:s(()=>[i(Xe,{ownertable:a.ownertable,data:e.headData},null,8,["ownertable","data"])]),_:1}),i(P,{key:"log",tab:"操作记录"},{default:s(()=>[i(Ve,{ownertable:a.ownertable},null,8,["ownertable"])]),_:1})]),_:3},8,["activeKey"])]))]),_:3})])}}},at=ae(Je,[["__scopeId","data-v-1bcf9c7b"]]);export{at as d};