1 |
- import{b as M,A as T,d as L,u as le,p as re,L as oe,R as ie,M as Z,E as se,m as D}from"./index-b7094f12.js";import{u as U}from"./vue-router-e2815956.js";import{m as i,a as S,o as E,W as v,X as r,Y as g,Z as s,F as N,a5 as B,a2 as p,E as te,a4 as $,$ as h,c as ce,u as y,a3 as F,P as ue,N as V,a6 as de}from"./vue-7f5e2b1b.js";import{u as fe}from"./index-4e8da4ac.js";/* empty css */import{_ as ae}from"./_plugin-vue_export-helper-c27b6911.js";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.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 me=pe;function G(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 H=function(t,e){var l=G({},t,e.attrs);return i(M,G({},l,{icon:me}),null)};H.displayName="FilePdfFilled";H.inheritAttrs=!1;const ve=H;var be={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 _e=be;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){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 I=function(t,e){var l=J({},t,e.attrs);return i(M,J({},l,{icon:_e}),null)};I.displayName="FileTextFilled";I.inheritAttrs=!1;const ge=I;var we={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 xe=we;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){Fe(a,n,e[n])})}return a}function Fe(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(M,Q({},l,{icon:xe}),null)};W.displayName="FileUnknownFilled";W.inheritAttrs=!1;const ke=W;var Oe={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 Pe=Oe;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){Se(a,n,e[n])})}return a}function Se(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(M,K({},l,{icon:Pe}),null)};X.displayName="FileWordFilled";X.inheritAttrs=!1;const $e=X;var ze={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 Re=ze;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){qe(a,n,e[n])})}return a}function qe(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(M,ee({},l,{icon:Re}),null)};Y.displayName="PlayCircleFilled";Y.inheritAttrs=!1;const je=Y,Ce={key:0},Te={key:1},Me={style:{color:"#999"}},Ae={__name:"log",props:{ownertable:String,keyid:String},setup(a){const t=a,e=U(),l=S([]),n=async()=>{const w=await T.requested({id:20221114125401,content:{pageNumber:1,pageSize:20,ownertable:t.ownertable,ownerid:e.currentRoute.value.query.id}});l.value=w.data};return E(()=>{n()}),(w,z)=>{const b=v("a-empty"),q=v("a-timeline-item"),_=v("a-timeline");return r(),g("div",null,[l.value.length===0?(r(),g("div",Ce,[i(b)])):(r(),g("div",Te,[i(_,null,{default:s(()=>[(r(!0),g(N,null,B(l.value,(x,j)=>(r(),p(q,{key:j},{default:s(()=>[te($(x.actionby)+" - "+$(x.action)+" - "+$(x.remarks),1),h("p",Me,$(x.actiondate),1)]),_:2},1024))),128))]),_:1})]))])}}},Ve={class:""},De={style:{"margin-top":"10px"}},Le={class:"image-panel panel"},Ne=["onClick"],Be=["href"],Ue=["onClick"],Ee=["src"],He=["src"],Ie={__name:"files",props:["ownertable","data"],setup(a){const t=a,e=S(!1),l=S(!1),n=S(""),w=(o,f)=>{switch(n.value=o.url,f){case"office":e.value=!0;break;case"pdf":e.value=!0;break;case"视频":l.value=!0;break}},z=o=>{e.value=!1},b=o=>{const f=o.url.match(/\.(jpg|jpeg|png|gif|svg)$/i)!==null,C=o.url.match(/\.(mp4|avi|mkv|flv|mov)$/i)!==null,O=o.url.match(/\.(txt|md|csv|xml)$/i)!==null,P=o.url.match(/\.(doc|docx|xls|xlsx|ppt|pptx)$/i)!==null,R=o.url.match(/\.(pdf)$/i)!==null;return f?"图片":C?"视频":O?"文本":P?"office":R?"pdf":"其他"},q=[{title:"附件名称",dataIndex:"document",key:"document"},{title:"上传时间",dataIndex:"createdate",key:"createdate"},{title:"操作",dataIndex:"op",key:"op"}],_=ce(()=>{const o=t.data.filter(f=>{if(f.label=="状态")return f});return o[0].value=="新建"||o[0].value=="下架"}),x=U(),j=x.currentRoute.value.query.id,A=o=>{console.log(o),m()},u=S([]),m=async()=>{const o=await T.requested({classname:"system.attachment.Attachment",method:"queryFileLink",content:{ownertable:t.ownertable,ownerid:x.currentRoute.value.query.id,usetype:"default"}});u.value=o.data},k=async o=>{const f=await T.requested({classname:"system.attachment.Attachment",method:"deleteFileLink",content:{linksids:[o.linksid]}});L.message(f,"删除成功",()=>{m()})};return E(()=>{m()}),(o,f)=>{const C=v("a-image"),O=v("a-space"),P=v("a-table"),R=v("a-modal");return r(),g("div",Ve,[y(_)?(r(),p(fe,{key:0,bindData:{ownerid:y(j),ownertable:t.ownertable,usetype:"default"},text:"点击上传",onUploadSuccess:A},null,8,["bindData"])):F("",!0),h("div",De,[i(P,{dataSource:u.value,columns:q},{bodyCell:s(({column:c,record:d})=>[c.key==="document"?(r(),p(O,{key:0,size:[10,10]},{default:s(()=>[h("div",Le,[b(d)=="图片"?(r(),p(C,{key:0,width:80,height:80,src:d.url},null,8,["src"])):b(d)=="视频"?(r(),p(y(je),{key:1,style:{"font-size":"30px"}})):b(d)=="文本"?(r(),p(y(ge),{key:2,style:{"font-size":"30px"}})):b(d)=="office"?(r(),p(y($e),{key:3,style:{"font-size":"30px"}})):b(d)=="pdf"?(r(),p(y(ve),{key:4,style:{"font-size":"30px"}})):(r(),p(y(ke),{key:5,style:{"font-size":"30px"}}))]),h("span",null,$(d.document),1)]),_:2},1024)):F("",!0),c.key==="op"?(r(),p(O,{key:1,size:[10,10]},{default:s(()=>[b(d)!=="图片"&&b(d)!=="其他"?(r(),g("a",{key:0,target:"_blank",onClick:ne=>w(d,b(d))},"预览",8,Ne)):F("",!0),h("a",{href:d.url,target:"_blank"},"下载",8,Be),y(_)?(r(),g("a",{key:1,type:"link",onClick:ne=>k(d)},"删除",8,Ue)):F("",!0)]),_:2},1024)):F("",!0)]),_:1},8,["dataSource"])]),i(R,{open:e.value,"onUpdate:open":f[0]||(f[0]=c=>e.value=c),title:"预览",onOk:z,width:900},{default:s(()=>[h("iframe",{src:`https://view.officeapps.live.com/op/view.aspx?src=${encodeURIComponent(n.value)}`,frameborder:"0",style:{height:"100vh",width:"100%"}},null,8,Ee)]),_:1},8,["open"]),i(R,{open:l.value,"onUpdate:open":f[1]||(f[1]=c=>l.value=c),title:"预览",onOk:z,width:900},{default:s(()=>[h("video",{src:n.value,style:{width:"100%"},controls:""},null,8,He)]),_:1},8,["open"])])}}},We=ae(Ie,[["__scopeId","data-v-846932ce"]]),Xe={class:"flex-between"},Ye={class:"flex-align-center"},Ze={key:0},Ge={__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=U(),w=S(0),z=()=>{l.delRoute(n.currentRoute.value.name,n.currentRoute.value.name),n.replace({name:n.currentRoute.value.meta.name})},b=()=>{Z.confirm({title:"删除",content:"确认删除当前数据吗",icon:i(se),async onOk(){const u=await T.post(e.delParam);L.message(u,"删除成功",()=>{let m=n.currentRoute.value.name;l.delRoute(m,m),z()})},okText:"确定",cancelText:"取消",onCancel(){Z.destroyAll()}})},q=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(()=>{A(0,m)},0)):D.warn("已经是第一条了!")},j=()=>{let u=n.currentRoute.value.query.listqueryid;_.value!==null&&clearTimeout(_.value),_.value=setTimeout(()=>{A(1,u)},0)},A=async(u,m)=>{const k=D.loading({content:"正在查询数据,请稍等..",duration:0,key:1}),o=await T.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:""}});o.data.data?(k(),n.replace({path:n.currentRoute.value.path,query:{id:o.data.data,rowindex:o.data.rowindex,listqueryid:m,fieldName:n.currentRoute.value.query.fieldName}})):D.warn("已经是最后一条了!")};return ue(()=>{(!e.tabs||e.tabs.length==0)&&(w.value="log")}),E(()=>{}),(u,m)=>{const k=v("a-button"),o=v("a-space"),f=v("a-descriptions-item"),C=v("a-descriptions"),O=v("a-card"),P=v("a-tab-pane"),R=v("a-tabs");return r(),g("div",null,[i(O,{class:"mt-10",style:{borderRadius:"0 0 5px 5px"},bodyStyle:{padding:"20px"},headStyle:{padding:"0 10px"},bordered:!1},{title:s(()=>[h("div",Xe,[i(o,null,{default:s(()=>[i(k,{shape:"circle",onClick:z},{default:s(()=>[i(y(re))]),_:1}),h("span",null,$(a.title),1)]),_:1}),h("div",Ye,[i(o,null,{default:s(()=>[V(u.$slots,"operation",{},void 0,!0),a.delParam&&y(L).hasPermission("delete")?(r(),p(k,{key:0,type:"primary",disabled:a.disable,onClick:b,danger:""},{default:s(()=>[te("删除")]),_:1},8,["disabled"])):F("",!0),y(n).currentRoute.value.query.listqueryid?(r(),p(k,{key:1,onClick:x},{icon:s(()=>[i(y(oe))]),_:1})):F("",!0),y(n).currentRoute.value.query.listqueryid?(r(),p(k,{key:2,onClick:j},{icon:s(()=>[i(y(ie))]),_: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(()=>[(r(!0),g(N,null,B(e.headData,c=>(r(),p(f,{span:c.span?c.span:1,key:c.index,label:c.label},{default:s(()=>[h("span",{style:de(c.style?c.style():"")},$(typeof c.value=="object"?c.value.join(","):c.value),5)]),_:2},1032,["span","label"]))),128))]),_:1}),V(u.$slots,"customContent",{},void 0,!0)]),_:3}),V(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):(r(),g("div",Ze,[i(R,{activeKey:w.value,"onUpdate:activeKey":m[0]||(m[0]=c=>w.value=c),onChange:q},{default:s(()=>[(r(!0),g(N,null,B(e.tabs,(c,d)=>(r(),p(P,{key:d,tab:c},{default:s(()=>[V(u.$slots,"tab"+d,{},void 0,!0)]),_:2},1032,["tab"]))),128)),i(P,{key:"file",tab:"附件"},{default:s(()=>[i(We,{ownertable:a.ownertable,data:e.headData},null,8,["ownertable","data"])]),_:1}),i(P,{key:"log",tab:"操作记录"},{default:s(()=>[i(Ae,{ownertable:a.ownertable},null,8,["ownertable"])]),_:1})]),_:3},8,["activeKey"])]))]),_:3})])}}},nt=ae(Ge,[["__scopeId","data-v-8fa2257d"]]);export{nt as d};
|