ui-process-h5 0.1.23 → 0.1.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/{index.js → design.js} +3 -3
- package/lib/design.umd.cjs +1 -0
- package/lib/style.css +1 -1
- package/package.json +5 -5
- package/packages/components/process/src/index.vue +8 -1
- package/lib/index.umd.cjs +0 -1
- package/packages/components/utils/request/api.ts +0 -11
- package/packages/components/utils/request/cache.d.ts +0 -52
- package/packages/components/utils/request/cache.js +0 -99
- package/packages/components/utils/request/request.ts +0 -61
|
@@ -487,7 +487,7 @@ const Be = N({
|
|
|
487
487
|
}
|
|
488
488
|
}
|
|
489
489
|
});
|
|
490
|
-
const C = (e) => (W("data-v-
|
|
490
|
+
const C = (e) => (W("data-v-b82b096a"), e = e(), z(), e), Se = { class: "process-warp" }, Le = {
|
|
491
491
|
key: 0,
|
|
492
492
|
class: "process-main"
|
|
493
493
|
}, Ie = { class: "process-ml-item border" }, Ae = /* @__PURE__ */ C(() => /* @__PURE__ */ t("div", { class: "process-mli-name" }, "流程状态", -1)), Ne = { class: "process-mli-value" }, we = { class: "process-ml-item border" }, Ee = /* @__PURE__ */ C(() => /* @__PURE__ */ t("div", { class: "process-mli-name" }, "流程发起时间", -1)), Ue = { class: "process-mli-value" }, Fe = {
|
|
@@ -555,7 +555,7 @@ function Ye(e, s, f, i, c, d) {
|
|
|
555
555
|
b < 3 ? (n(), G(y, {
|
|
556
556
|
key: 0,
|
|
557
557
|
onClick: e.handleTest,
|
|
558
|
-
type: l.btnProps.type
|
|
558
|
+
type: l.btnProps.type.toString()
|
|
559
559
|
}, {
|
|
560
560
|
default: P(() => [
|
|
561
561
|
q(v(l.name), 1)
|
|
@@ -578,7 +578,7 @@ function Ye(e, s, f, i, c, d) {
|
|
|
578
578
|
}, 8, ["cancel", "comfig"])
|
|
579
579
|
], 64);
|
|
580
580
|
}
|
|
581
|
-
const I = /* @__PURE__ */ w(Be, [["render", Ye], ["__scopeId", "data-v-
|
|
581
|
+
const I = /* @__PURE__ */ w(Be, [["render", Ye], ["__scopeId", "data-v-b82b096a"]]);
|
|
582
582
|
I.install = function(e) {
|
|
583
583
|
return e.component(I.name, I), e;
|
|
584
584
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(_=typeof globalThis<"u"?globalThis:_||self,e(_.Design={},_.Vue))})(this,function(_,e){"use strict";const V=e.defineComponent({name:"TopTab",props:{tapList:{type:Array,default:()=>[]},selfTapList:{type:Array,default:()=>[]}},setup(t){const o=e.ref("http://59.53.91.231:8088/portal/r/w?sid=6f714ec1-7570-4525-ac51-b092402d8295&cmd=CLIENT_BPM_FORM_TRACK_OPEN&processInstId=1f6e7196-e1ea-428e-b295-aa23a54a2402&supportCanvas=true&formInfo="),p=e.ref([{actionName:"提交",activityName:"部门负责人",createDate:"2023-04-20 14:47:35",createUser:"18ccbf63229f0c79f39940ae284c111e",createUserName:"朱鸿飞",customUniqueId:"",departmentName:"测试部",id:"88df38c8-9756-4b4a-a9b0-dcb0ec1b57d5",metaAnnexList:null,msg:"同意",positionName:"测试部119147",processInstId:"1f6e7196-e1ea-428e-b295-aa23a54a2402",taskInstId:"38bbef1c-efbb-456d-bd79-08ed9d96b4b3"}]),r=e.ref(""),c=e.ref([{label:"基本信息",key:"a",type:"default",slot:"default"},{label:"流程图",key:"b",type:"default",slot:"tab2"},{label:"审批记录",key:"c",type:"default",slot:"tab3"}]),i=e.ref([{label:"基本信息",key:"a",type:"default",slot:"default"},{label:"流程图",key:"b",type:"default",slot:"tab2"},{label:"审批记录",key:"c",type:"default",slot:"tab3"}]),s=e.ref(),f=(n,m)=>{n!==r.value&&(r.value=n,d(m))},d=n=>{if(s.value.length){let m=document.getElementsByClassName("bottom-line")[0],l;if(m.offsetWidth<s.value[n].offsetWidth-10){let u=(s.value[n].offsetWidth-m.offsetWidth-10)/2;l=`${s.value[n].offsetLeft+u}px`}else if(m.offsetWidth>s.value[n].offsetWidth-10){let u=(m.offsetWidth-s.value[n].offsetWidth+10)/2;l=`${s.value[n].offsetLeft-u}px`}else l=`${s.value[n].offsetLeft}px`;m.style.transition=".3s",m.style.transform=`translateX(${l})`}};return e.watch(()=>t.selfTapList,(n,m)=>{n.length&&(i.value=[].concat(n),r.value=i.value[0].key)},{immediate:!0,deep:!0}),e.watch(()=>t.tapList,(n,m)=>{t.selfTapList.length||(i.value=[].concat(c.value),n.length>0&&n.forEach((l,u)=>{l.sort&&l.sort>1?i.value.splice(l.sort-1,0,l):l.sort==1?i.value.unshift(l):i.value.push(l)}),r.value=i.value[0].key)},{immediate:!0,deep:!0}),e.onMounted(()=>{d(0)}),{isTapList:i,active:r,handleActive:f,label:s,taskCommentList:p,trackUrl:o}}}),Ee="",B=(t,o)=>{const p=t.__vccOpts||t;for(const[r,c]of o)p[r]=c;return p},h=t=>(e.pushScopeId("data-v-baad7ff1"),t=t(),e.popScopeId(),t),$={class:"tops-tab"},T={class:"tops-tab-header"},L=["onClick"],I={key:0,class:"bottom-line"},A={class:"tops-tab-body"},D=["src"],F={key:1,class:"textnone"},w={class:"seal-list__item--option"},P=h(()=>e.createElementVNode("span",null,"节点名称",-1)),U={class:"seal-list__item--option"},j=h(()=>e.createElementVNode("span",null,"审批人",-1)),M={class:"seal-list__item--option"},q=h(()=>e.createElementVNode("span",null,"审批操作",-1)),z={class:"seal-list__item--option"},O=h(()=>e.createElementVNode("span",null,"审批意见",-1)),W=["innerHTML"],H={class:"seal-list__item--option"},R=h(()=>e.createElementVNode("span",null,"审批时间",-1)),Y={key:0,class:"seal-list__item--attch"},G=[h(()=>e.createElementVNode("span",null,"查看附件",-1))],K={key:1,class:"textnone"};function X(t,o,p,r,c,i){return e.openBlock(),e.createElementBlock("div",$,[e.createElementVNode("div",T,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.isTapList,(s,f)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["tops-tab-header-items",[s.key===t.active?"active":""]]),onClick:d=>t.handleActive(s.key,f),ref_for:!0,ref:"label"},e.toDisplayString(s.label),11,L))),256)),t.isTapList.length?(e.openBlock(),e.createElementBlock("div",I)):e.createCommentVNode("",!0)]),e.createElementVNode("div",A,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.isTapList,s=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:s.key,style:{height:"calc(100% - 45px)"}},[s.key==="a"&&s.type==="default"?e.renderSlot(t.$slots,"default",{key:0},void 0,!0):e.createCommentVNode("",!0),s.key==="b"&&s.type==="default"?e.renderSlot(t.$slots,s.slot,{key:1},()=>[t.trackUrl?(e.openBlock(),e.createElementBlock("iframe",{key:0,src:t.trackUrl,style:{width:"100%","min-height":"500px",border:"none"},scrolling:"no",frameborder:"0"},null,8,D)):(e.openBlock(),e.createElementBlock("div",F," 暂无流程图 "))],!0):e.createCommentVNode("",!0),s.key==="c"&&s.type==="default"?e.renderSlot(t.$slots,s.slot,{key:2},()=>{var f;return[((f=t.taskCommentList)==null?void 0:f.length)>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.taskCommentList,(d,n)=>(e.openBlock(),e.createElementBlock("div",{key:d.id,class:"seal-list__item"},[e.createElementVNode("div",null,[e.createElementVNode("div",w,[P,e.createElementVNode("span",null,e.toDisplayString(d.activityName),1)]),e.createElementVNode("div",U,[j,e.createElementVNode("span",null,e.toDisplayString(d.createUserName),1)]),e.createElementVNode("div",M,[q,e.createElementVNode("span",null,e.toDisplayString(d.actionName),1)]),e.createElementVNode("div",z,[O,e.createElementVNode("span",{innerHTML:d.msg},null,8,W)]),e.createElementVNode("div",H,[R,e.createElementVNode("span",null,e.toDisplayString(d.createDate),1)]),d.metaAnnexList&&d.metaAnnexList.length?(e.openBlock(),e.createElementBlock("div",Y,G)):e.createCommentVNode("",!0)])]))),128)):(e.openBlock(),e.createElementBlock("div",K,"暂无数据"))]},!0):e.createCommentVNode("",!0),s.type=="slot"?e.renderSlot(t.$slots,s.slot,{key:3},void 0,!0):e.createCommentVNode("",!0)])),[[e.vShow,t.active===s.key]])),128))])])}const y=B(V,[["render",X],["__scopeId","data-v-baad7ff1"]]);y.install=function(t){return t.component(y.name,y),t};const J=e.defineComponent({name:"TopPopup",props:{titleText:{default:"top-popup",type:String},cancelText:{default:"取消",type:String},comfigText:{default:"确定",type:String},comfig:{default:null,type:Function},cancel:{default:null,type:Function},isMask:{require:!1,default:!0,type:Boolean},isMaskClose:{require:!1,default:!0,type:Boolean}},setup(t){const o=e.ref(!1),p=()=>{o.value=!0},r=()=>{typeof t.cancel=="function"&&t.cancel(),i()},c=()=>{typeof t.comfig=="function"&&t.comfig()},i=()=>{o.value=!1};return e.onMounted(()=>{document.querySelector("body")}),{handleOpen:p,handleCancel:r,handleComfig:c,handleClose:i,show:o}}}),Se="",Q={class:"top-popup-header"},Z={class:"header-title"},x={class:"top-popup-body"};function v(t,o,p,r,c,i){return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:"top-popup",style:e.normalizeStyle(t.show?"transform: translateY(0)":"transform: translateY(100%)")},[e.createElementVNode("div",Q,[e.createElementVNode("div",{class:"header-cancel",onClick:o[0]||(o[0]=(...s)=>t.handleCancel&&t.handleCancel(...s))},e.toDisplayString(t.cancelText),1),e.createElementVNode("div",Z,e.toDisplayString(t.titleText),1),e.createElementVNode("div",{class:"header-comfig",onClick:o[1]||(o[1]=(...s)=>t.handleComfig&&t.handleComfig(...s))},e.toDisplayString(t.comfigText),1)]),e.createElementVNode("div",x,[e.renderSlot(t.$slots,"default",{},void 0,!0)])],4),t.show&&t.isMask?(e.openBlock(),e.createElementBlock("div",{key:0,class:"top-popup-mask",onClick:o[2]||(o[2]=s=>t.isMaskClose&&t.handleClose())})):e.createCommentVNode("",!0)],64)}const k=B(J,[["render",v],["__scopeId","data-v-474e328a"]]);k.install=function(t){return console.log("TopPopup.install",t),t.mount(k),t.component(k.name,k),t};const Ve="",ee=e.defineComponent({name:"TopButton",props:{type:{default:"default",type:String}},setup(t){const o=e.ref({textColor:"#fff",bckColor:"3c9cff"});switch(t.type){case"primary":o.value.textColor="#fff",o.value.bckColor="#3c9cff";break;case"danger":o.value.textColor="rgb(255, 96, 96)",o.value.bckColor="rgb(255, 230, 230)";break;case"default":o.value.textColor="rgb(51, 51, 51)",o.value.bckColor="rgb(241, 241, 241)";break}return{style:o}}});function te(t,o,p,r,c,i){return e.openBlock(),e.createElementBlock("div",{class:"top-button",style:e.normalizeStyle(`background-color:${t.style.bckColor};color:${t.style.textColor}`)},[e.renderSlot(t.$slots,"default",{},void 0,!0)],4)}const N=B(ee,[["render",te],["__scopeId","data-v-156a54e6"]]);N.install=function(t){return t.component(N.name,N),t};const oe=e.defineComponent({name:"TopProcess",components:{TopTab:y,TopPopup:k,TopButton:N},props:{tapList:{require:!1,default:()=>[],type:Array},processId:{require:!0,default:"",type:String},processDefId:{require:!0,default:"",type:String},taskId:{require:!0,default:"",type:String},isAdditional:{require:!1,default:!1,type:Boolean},isView:{default:!1,type:Boolean}},setup(t){const o=e.ref({}),p=e.ref(),r=e.ref([{taskId:"ecd82a93-4a62-42a7-b7bd-df38d2f1609a",taskState:1,nodeId:"obj_026aac284c1a4303854f978b674be4b9",customUniqueId:"",nodeName:"部门负责人"}]),c=e.ref({id:"obj_026aac284c1a4303854f978b674be4b9",name:"部门负责人",no:"1",buttons:[],ccTaskButtonLabel:"",ccTaskButtonAnnex:null,completeButtonLabel:"同意",completeButtonAnnex:null,delegateTaskButtonLabel:"转办",delegateTaskButtonAnnex:null,printFormButtonLabel:"",supplyUnusualTransferButtonLabel:"",readingOfficeLabel:"",readingOfficeButtonAnnex:null,jointlySignLabel:"",jointlySignButtonAnnex:null,counterSignLabel:"加签",counterSignButtonAnnex:null,coordinationLabel:"",coordinationButtonAnnex:null,otherButtonAnnexList:null,humanPerformer:{id:"obj_2bd3494ae5c54309b7f2ea452921790b",name:"任意指定",resourceAssignmentExpressionModel:{formalExpression:""}},commentModels:[{actionName:"提交",isDefault:!0},{actionName:"作废",isDefault:!1}],routeTxt:{departmentIds:null,companyIds:null,teamList:null,routeType:"DynamicUsers"},loopCardinality:1,isHistoryRoute:!1,participantList:null,historyRoute:!1});e.watch(()=>t.processId,(l,u)=>{l&&(o.value={status:"审批中",createUid:"18ccbf63229f0c79f39940ae284c111e",createTopUserId:"128ec9c9b7f26135272596fe01c57690",createTime:"2023-04-20 15:01:48",currUserName:"朱鸿飞",allUserNames:["朱鸿飞"],userNodeGroup:{分管领导:["朱鸿飞"]},appId:"com.awspaas.user.apps.top.study.project",statusCode:"1",statusName:"审批中",bizStatusName:"审批中",taskState:1})},{immediate:!0,deep:!0}),console.log("asd",r.value[0].taskState);const i=e.computed(()=>{var C,S;let l=[],u=r.value&&r.value[0]&&r.value[0].taskState!=4;if(u&&!t.isView&&c.value.completeButtonLabel){let a={};a.name=c.value.completeButtonLabel,a.btnProps={type:"primary"},l.push(a)}if(u&&!t.isView&&o.value.currUserName){let a={};a.name="拒绝",a.btnProps={type:"danger"},l.push(a)}if(u&&!t.isView&&c.value.buttons&&c.value.buttons.length&&c.value.buttons.forEach(a=>{if(a.label==="退回"){let E={};E.name=a.label,E.btnProps={type:"danger"},l.push(E)}}),u&&!t.isView&&c.value.delegateTaskButtonLabel){let a={};a.name=c.value.delegateTaskButtonLabel,a.btnProps={type:"default"},l.push(a)}if(t.processId&&o.value.createTopUserId==t.userId&&((C=r.value[0])==null?void 0:C.taskState)!=2&&o.value.status!=="已驳回"&&o.value.status!=="已撤销"){let a={};a.name="催办",a.btnProps={type:"default"},l.push(a)}if(t.processId&&o.value.createTopUserId==t.userId&&((S=r.value[0])==null?void 0:S.taskState)!=2&&o.value.status!=="已驳回"&&o.value.status!=="已撤销"){let a={};a.name="撤销",a.btnProps={type:"default"},l.push(a)}if(u&&!t.isView&&c.value.counterSignLabel){let a={};a.name=c.value.counterSignLabel,a.btnProps={type:"primary"},l.push(a)}return l}),s=e.computed(()=>i.value.length>3?i.value.slice(3):[]),f=()=>{console.log("handleCancel")},d=()=>{console.log("handleComfig","确定按钮"),p.value.handleClose()},n=e.computed(()=>"calc(100vh - 205px)");return{processStatus:o,processCardHeight:n,handleTest:()=>{p.value.handleOpen()},TopPopup1:p,handleCancel:f,handleComfig:d,operBtn:i,actionBtn:s}},methods:{getColor(t){return t=="审核中"?"#FFA52D":t=="已驳回"?"#F14B4C":t=="已撤销"?"#CECECE":t=="已完成"?"#6DC743":"#1389FF"}}}),$e="",b=t=>(e.pushScopeId("data-v-b82b096a"),t=t(),e.popScopeId(),t),se={class:"process-warp"},ae={key:0,class:"process-main"},ne={class:"process-ml-item border"},le=b(()=>e.createElementVNode("div",{class:"process-mli-name"},"流程状态",-1)),re={class:"process-mli-value"},ce={class:"process-ml-item border"},ie=b(()=>e.createElementVNode("div",{class:"process-mli-name"},"流程发起时间",-1)),de={class:"process-mli-value"},pe={key:0,class:"process-ml-item"},me=b(()=>e.createElementVNode("div",{class:"process-mli-name"},"审批节点",-1)),ue={class:"process-mli-value"},fe={class:"process-mliv-jd"},_e={key:1,class:"process-foot"},he={class:"footBtnRow"},ye={class:"process-btn"},be={key:1,class:"elips"},ke=[b(()=>e.createElementVNode("div",{class:"circle"},null,-1)),b(()=>e.createElementVNode("div",{class:"circle"},null,-1)),b(()=>e.createElementVNode("div",{class:"circle"},null,-1))];function ge(t,o,p,r,c,i){const s=e.resolveComponent("TopTab"),f=e.resolveComponent("TopButton"),d=e.resolveComponent("TopPopup");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",se,[t.processStatus.status?(e.openBlock(),e.createElementBlock("div",ae,[e.createElementVNode("div",ne,[le,e.createElementVNode("div",re,[t.processStatus.status||t.processStatus.bizStatusName?(e.openBlock(),e.createElementBlock("div",{key:0,class:"process-mliv-dd",style:e.normalizeStyle({background:t.getColor(t.processStatus.status)})},e.toDisplayString(t.processStatus.bizStatusName?t.processStatus.bizStatusName:t.processStatus.status),5)):e.createCommentVNode("",!0)])]),e.createElementVNode("div",ce,[ie,e.createElementVNode("div",de,[e.createElementVNode("span",null,e.toDisplayString(t.processStatus.createTime),1)])]),t.processStatus.allUserNames&&t.processStatus.allUserNames.length?(e.openBlock(),e.createElementBlock("div",pe,[me,e.createElementVNode("div",ue,[e.createElementVNode("span",fe,e.toDisplayString(`${t.processStatus.taskState==4?t.processStatus.currUserName:t.processStatus.allUserNames.toString()}审批中`),1)])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"process-card",style:e.normalizeStyle({height:t.processCardHeight})},[e.createVNode(s,{tapList:t.tapList},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default",{},void 0,!0)]),_:3},8,["tapList"])],4),t.isAdditional?(e.openBlock(),e.createElementBlock("div",_e,[e.createElementVNode("div",he,[e.renderSlot(t.$slots,"btn",{},void 0,!0)])])):e.createCommentVNode("",!0),e.createElementVNode("div",ye,[t.processStatus.status!="已完成"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.operBtn,(n,m)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:n.name},[m<3?(e.openBlock(),e.createBlock(f,{key:0,onClick:t.handleTest,type:n.btnProps.type.toString()},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.name),1)]),_:2},1032,["onClick","type"])):e.createCommentVNode("",!0)],64))),128)):e.createCommentVNode("",!0),t.operBtn.length>3?(e.openBlock(),e.createElementBlock("div",be,ke)):e.createCommentVNode("",!0)])]),e.createVNode(d,{ref:"TopPopup1",cancel:t.handleCancel,comfig:t.handleComfig},{default:e.withCtx(()=>[e.createTextVNode(" csaasd1 ")]),_:1},8,["cancel","comfig"])],64)}const g=B(oe,[["render",ge],["__scopeId","data-v-b82b096a"]]);g.install=function(t){return t.component(g.name,g),t};const Be=[y,g],Ne={install:function(t){Be.forEach(o=>{t.use(o)})}};_.TopProcess=g,_.TopTab=y,_.default=Ne,Object.defineProperties(_,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/lib/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.tops-tab[data-v-baad7ff1]{height:100%}.tops-tab-header[data-v-baad7ff1]{display:flex;width:100%;height:45px;font-size:14px;color:#333;padding:10px 17px;font-weight:500;box-sizing:border-box;overflow-x:auto;white-space:nowrap;flex-wrap:nowrap;flex-shrink:0;-ms-overflow-style:none;position:relative;background-color:#fff}.tops-tab-header[data-v-baad7ff1]:after{content:"";position:absolute;width:100%;height:1px;background-color:#f2f2f2;left:0;bottom:0;z-index:10}.tops-tab-header[data-v-baad7ff1]::-webkit-scrollbar{display:none}.tops-tab-header-items[data-v-baad7ff1]{white-space:nowrap;padding-right:10px;box-sizing:border-box;display:inline-block;height:100%;text-align:center;margin-right:32px;font-weight:400;font-size:15px;text-align:left;color:#333;display:flex;align-items:center}.tops-tab-header-items[data-v-baad7ff1]:last-child{padding-right:0;margin-right:0}.tops-tab-header .active[data-v-baad7ff1]{position:relative;color:#1389ff;font-family:PingFang SC Bold;font-weight:700;font-size:15px;text-align:left}.tops-tab-header .bottom-line[data-v-baad7ff1]{width:30px;height:3px;border-radius:1.5px;background-color:#1389ff;position:absolute;bottom:1px;left:0;z-index:12}.tops-tab-body[data-v-baad7ff1]{height:100%}.seal-list__item[data-v-baad7ff1]{padding:6px 10px 0;margin:10px 10px 0;background-color:#fff;border-radius:10px;box-sizing:border-box}.seal-list__item[data-v-baad7ff1]:last-child{margin-bottom:70px}.seal-list__item .seal-list__item--header[data-v-baad7ff1]{margin-bottom:6px;display:flex;align-items:center}.seal-list__item .seal-list__item--header span[data-v-baad7ff1]:first-of-type{font-size:15px;margin-right:6px;font-weight:700}.seal-list__item .seal-list__item--option[data-v-baad7ff1]{display:flex;justify-content:space-between;align-items:center;font-size:14px;padding:10px 0;color:#333}.seal-list__item .seal-list__item--option span[data-v-baad7ff1]:last-child{max-width:144px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:#888}.seal-list__item .seal-list__item--attch[data-v-baad7ff1]{font-size:14px;padding:10px 0;color:#333;text-align:right;color:#1389ff}.seal-list__item .seal-list__item--actions[data-v-baad7ff1]{margin-top:12px;position:relative;display:flex;justify-content:space-around;align-items:center}.seal-list__item .seal-list__item--actions[data-v-baad7ff1] :before{content:"";top:0;width:100%;transform:scaleY(.5);transform-origin:top;border-top:1px #e8e8e8 solid;position:absolute}.seal-list__item .seal-list__item--actions .van-button[data-v-baad7ff1]{width:50%}.seal-list__item .seal-list__item--actions .van-button[data-v-baad7ff1] :after{content:"";height:60%;border-left:1px #e8e8e8 solid;position:absolute;left:100%;top:50%;transform:translate(-50%,-50%) scaleX(.5);transform-origin:left}.seal-list__item .seal-list__item--actions .van-button[data-v-baad7ff1]:last-child :after{content:none}.top-popup[data-v-474e328a]{width:100%;height:80vh;position:fixed;left:0;background-color:#fff;z-index:199;border-radius:20px 20px 0 0;padding:0 10px;box-sizing:border-box;transition:all .5s ease;bottom:0}.top-popup-mask[data-v-474e328a]{position:fixed;width:100vw;height:100vh;background-color:#000;opacity:.7;top:0;left:0;z-index:99}.top-popup-header[data-v-474e328a]{display:flex;justify-content:space-between;align-items:center;padding:10px 0}.top-popup-header .header-cancel[data-v-474e328a],.top-popup-header .header-comfig[data-v-474e328a]{color:#1389ff}.fade-enter-active[data-v-474e328a],.fade-leave-active[data-v-474e328a]{transition:all .5s ease}.fade-enter[data-v-474e328a],.fade-leave-to[data-v-474e328a]{bottom:-100%}.fade-enter-to[data-v-474e328a],.fade-leave[data-v-474e328a]{bottom:0d}.top-button[data-v-156a54e6]{width:100%;border-radius:20px;height:36px;background-color:#3c9cff;color:#fff;font-size:14px;justify-content:center;display:flex;align-items:center}.process-warp[data-v-
|
|
1
|
+
.tops-tab[data-v-baad7ff1]{height:100%}.tops-tab-header[data-v-baad7ff1]{display:flex;width:100%;height:45px;font-size:14px;color:#333;padding:10px 17px;font-weight:500;box-sizing:border-box;overflow-x:auto;white-space:nowrap;flex-wrap:nowrap;flex-shrink:0;-ms-overflow-style:none;position:relative;background-color:#fff}.tops-tab-header[data-v-baad7ff1]:after{content:"";position:absolute;width:100%;height:1px;background-color:#f2f2f2;left:0;bottom:0;z-index:10}.tops-tab-header[data-v-baad7ff1]::-webkit-scrollbar{display:none}.tops-tab-header-items[data-v-baad7ff1]{white-space:nowrap;padding-right:10px;box-sizing:border-box;display:inline-block;height:100%;text-align:center;margin-right:32px;font-weight:400;font-size:15px;text-align:left;color:#333;display:flex;align-items:center}.tops-tab-header-items[data-v-baad7ff1]:last-child{padding-right:0;margin-right:0}.tops-tab-header .active[data-v-baad7ff1]{position:relative;color:#1389ff;font-family:PingFang SC Bold;font-weight:700;font-size:15px;text-align:left}.tops-tab-header .bottom-line[data-v-baad7ff1]{width:30px;height:3px;border-radius:1.5px;background-color:#1389ff;position:absolute;bottom:1px;left:0;z-index:12}.tops-tab-body[data-v-baad7ff1]{height:100%}.seal-list__item[data-v-baad7ff1]{padding:6px 10px 0;margin:10px 10px 0;background-color:#fff;border-radius:10px;box-sizing:border-box}.seal-list__item[data-v-baad7ff1]:last-child{margin-bottom:70px}.seal-list__item .seal-list__item--header[data-v-baad7ff1]{margin-bottom:6px;display:flex;align-items:center}.seal-list__item .seal-list__item--header span[data-v-baad7ff1]:first-of-type{font-size:15px;margin-right:6px;font-weight:700}.seal-list__item .seal-list__item--option[data-v-baad7ff1]{display:flex;justify-content:space-between;align-items:center;font-size:14px;padding:10px 0;color:#333}.seal-list__item .seal-list__item--option span[data-v-baad7ff1]:last-child{max-width:144px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:#888}.seal-list__item .seal-list__item--attch[data-v-baad7ff1]{font-size:14px;padding:10px 0;color:#333;text-align:right;color:#1389ff}.seal-list__item .seal-list__item--actions[data-v-baad7ff1]{margin-top:12px;position:relative;display:flex;justify-content:space-around;align-items:center}.seal-list__item .seal-list__item--actions[data-v-baad7ff1] :before{content:"";top:0;width:100%;transform:scaleY(.5);transform-origin:top;border-top:1px #e8e8e8 solid;position:absolute}.seal-list__item .seal-list__item--actions .van-button[data-v-baad7ff1]{width:50%}.seal-list__item .seal-list__item--actions .van-button[data-v-baad7ff1] :after{content:"";height:60%;border-left:1px #e8e8e8 solid;position:absolute;left:100%;top:50%;transform:translate(-50%,-50%) scaleX(.5);transform-origin:left}.seal-list__item .seal-list__item--actions .van-button[data-v-baad7ff1]:last-child :after{content:none}.top-popup[data-v-474e328a]{width:100%;height:80vh;position:fixed;left:0;background-color:#fff;z-index:199;border-radius:20px 20px 0 0;padding:0 10px;box-sizing:border-box;transition:all .5s ease;bottom:0}.top-popup-mask[data-v-474e328a]{position:fixed;width:100vw;height:100vh;background-color:#000;opacity:.7;top:0;left:0;z-index:99}.top-popup-header[data-v-474e328a]{display:flex;justify-content:space-between;align-items:center;padding:10px 0}.top-popup-header .header-cancel[data-v-474e328a],.top-popup-header .header-comfig[data-v-474e328a]{color:#1389ff}.fade-enter-active[data-v-474e328a],.fade-leave-active[data-v-474e328a]{transition:all .5s ease}.fade-enter[data-v-474e328a],.fade-leave-to[data-v-474e328a]{bottom:-100%}.fade-enter-to[data-v-474e328a],.fade-leave[data-v-474e328a]{bottom:0d}.top-button[data-v-156a54e6]{width:100%;border-radius:20px;height:36px;background-color:#3c9cff;color:#fff;font-size:14px;justify-content:center;display:flex;align-items:center}.process-warp[data-v-b82b096a]{overflow:hidden;height:100vh;width:100%;position:relative;background-color:#f3f3f7}.process-main[data-v-b82b096a]{display:flex;justify-content:space-between;flex-direction:column;align-items:center;padding:0 17px;background:#fff;margin:0 0 10px}.process-main .border[data-v-b82b096a]{border-bottom:#e8e8e8 1px solid}.process-main .process-ml-item[data-v-b82b096a]{display:flex;align-items:center;font-size:15px;font-weight:400;width:100%;justify-content:space-between;height:44px}.process-main .process-ml-item .process-mli-name[data-v-b82b096a]{color:#333}.process-main .process-ml-item .process-mli-value[data-v-b82b096a]{color:#888}.process-main .process-ml-item .process-mli-value .process-mliv-dd[data-v-b82b096a]{height:26px;min-width:30px;padding:0 12px;border-radius:20px;background:#1389ff;color:#fff;display:flex;align-items:center;justify-content:center;font-size:12px}.process-main .process-ml-item .process-mli-value .process-mliv-jd[data-v-b82b096a]{color:#1389ff}.process-btn[data-v-b82b096a]{display:flex;min-height:60px;padding-top:5px;background:#fff;border-top:1px solid #dddddf9e;box-sizing:border-box;justify-content:center;align-items:center;flex-direction:row-reverse}.process-btn .top-button[data-v-b82b096a],.process-btn .elips[data-v-b82b096a]{margin:0 5px}.elips[data-v-b82b096a]{min-width:60px;height:100%;background-color:#fff;display:flex;justify-content:center;align-items:center}.elips .circle[data-v-b82b096a]{width:6px;height:6px;margin:0 2px;background-color:#333;border-radius:50%}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "ui-process-h5",
|
|
3
3
|
"private": false,
|
|
4
4
|
"description": "流程组件",
|
|
5
|
-
"version": "0.1.
|
|
5
|
+
"version": "0.1.26",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"dev": "vite",
|
|
@@ -18,12 +18,12 @@
|
|
|
18
18
|
"publicConfig": {
|
|
19
19
|
"registry": "http://registry.npmjs.org/"
|
|
20
20
|
},
|
|
21
|
-
"main": "./lib/
|
|
22
|
-
"module": "./lib/
|
|
21
|
+
"main": "./lib/design.umd.js",
|
|
22
|
+
"module": "./lib/design.mjs",
|
|
23
23
|
"exports": {
|
|
24
24
|
".": {
|
|
25
|
-
"import": "./lib/
|
|
26
|
-
"require": "./lib/
|
|
25
|
+
"import": "./lib/design.mjs",
|
|
26
|
+
"require": "./lib/design.umd.js"
|
|
27
27
|
},
|
|
28
28
|
"./lib/style.css": "./lib/style.css"
|
|
29
29
|
},
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
<TopButton
|
|
62
62
|
v-if="index < 3"
|
|
63
63
|
@click="handleTest"
|
|
64
|
-
:type="item.btnProps.type"
|
|
64
|
+
:type="item.btnProps.type.toString()"
|
|
65
65
|
>
|
|
66
66
|
{{ item.name }}
|
|
67
67
|
</TopButton>
|
|
@@ -87,6 +87,7 @@ import { defineComponent, ref, watch, computed } from "vue-demi";
|
|
|
87
87
|
import TopTab from "../../tab";
|
|
88
88
|
import TopPopup from "../../popup";
|
|
89
89
|
import TopButton from "../../button";
|
|
90
|
+
// import { getProcessStatus } from "../../utils/request/api";
|
|
90
91
|
|
|
91
92
|
export default defineComponent({
|
|
92
93
|
name: "TopProcess",
|
|
@@ -201,6 +202,12 @@ export default defineComponent({
|
|
|
201
202
|
}
|
|
202
203
|
);
|
|
203
204
|
|
|
205
|
+
/* getProcessStatus({
|
|
206
|
+
processInstId: "4ac28800-7056-483b-8d38-a4932daf055b",
|
|
207
|
+
}).then((res) => {
|
|
208
|
+
console.log("res", res);
|
|
209
|
+
}); */
|
|
210
|
+
|
|
204
211
|
console.log("asd", taskNode.value[0].taskState);
|
|
205
212
|
/* copmuted */
|
|
206
213
|
// 按钮对象
|
package/lib/index.umd.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(_,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(_=typeof globalThis<"u"?globalThis:_||self,e(_.Index={},_.Vue))})(this,function(_,e){"use strict";const V=e.defineComponent({name:"TopTab",props:{tapList:{type:Array,default:()=>[]},selfTapList:{type:Array,default:()=>[]}},setup(t){const o=e.ref("http://59.53.91.231:8088/portal/r/w?sid=6f714ec1-7570-4525-ac51-b092402d8295&cmd=CLIENT_BPM_FORM_TRACK_OPEN&processInstId=1f6e7196-e1ea-428e-b295-aa23a54a2402&supportCanvas=true&formInfo="),p=e.ref([{actionName:"提交",activityName:"部门负责人",createDate:"2023-04-20 14:47:35",createUser:"18ccbf63229f0c79f39940ae284c111e",createUserName:"朱鸿飞",customUniqueId:"",departmentName:"测试部",id:"88df38c8-9756-4b4a-a9b0-dcb0ec1b57d5",metaAnnexList:null,msg:"同意",positionName:"测试部119147",processInstId:"1f6e7196-e1ea-428e-b295-aa23a54a2402",taskInstId:"38bbef1c-efbb-456d-bd79-08ed9d96b4b3"}]),r=e.ref(""),c=e.ref([{label:"基本信息",key:"a",type:"default",slot:"default"},{label:"流程图",key:"b",type:"default",slot:"tab2"},{label:"审批记录",key:"c",type:"default",slot:"tab3"}]),i=e.ref([{label:"基本信息",key:"a",type:"default",slot:"default"},{label:"流程图",key:"b",type:"default",slot:"tab2"},{label:"审批记录",key:"c",type:"default",slot:"tab3"}]),s=e.ref(),f=(a,m)=>{a!==r.value&&(r.value=a,d(m))},d=a=>{if(s.value.length){let m=document.getElementsByClassName("bottom-line")[0],l;if(m.offsetWidth<s.value[a].offsetWidth-10){let u=(s.value[a].offsetWidth-m.offsetWidth-10)/2;l=`${s.value[a].offsetLeft+u}px`}else if(m.offsetWidth>s.value[a].offsetWidth-10){let u=(m.offsetWidth-s.value[a].offsetWidth+10)/2;l=`${s.value[a].offsetLeft-u}px`}else l=`${s.value[a].offsetLeft}px`;m.style.transition=".3s",m.style.transform=`translateX(${l})`}};return e.watch(()=>t.selfTapList,(a,m)=>{a.length&&(i.value=[].concat(a),r.value=i.value[0].key)},{immediate:!0,deep:!0}),e.watch(()=>t.tapList,(a,m)=>{t.selfTapList.length||(i.value=[].concat(c.value),a.length>0&&a.forEach((l,u)=>{l.sort&&l.sort>1?i.value.splice(l.sort-1,0,l):l.sort==1?i.value.unshift(l):i.value.push(l)}),r.value=i.value[0].key)},{immediate:!0,deep:!0}),e.onMounted(()=>{d(0)}),{isTapList:i,active:r,handleActive:f,label:s,taskCommentList:p,trackUrl:o}}}),Ee="",B=(t,o)=>{const p=t.__vccOpts||t;for(const[r,c]of o)p[r]=c;return p},h=t=>(e.pushScopeId("data-v-baad7ff1"),t=t(),e.popScopeId(),t),$={class:"tops-tab"},T={class:"tops-tab-header"},L=["onClick"],I={key:0,class:"bottom-line"},A={class:"tops-tab-body"},D=["src"],F={key:1,class:"textnone"},w={class:"seal-list__item--option"},P=h(()=>e.createElementVNode("span",null,"节点名称",-1)),U={class:"seal-list__item--option"},j=h(()=>e.createElementVNode("span",null,"审批人",-1)),M={class:"seal-list__item--option"},q=h(()=>e.createElementVNode("span",null,"审批操作",-1)),z={class:"seal-list__item--option"},O=h(()=>e.createElementVNode("span",null,"审批意见",-1)),W=["innerHTML"],H={class:"seal-list__item--option"},R=h(()=>e.createElementVNode("span",null,"审批时间",-1)),Y={key:0,class:"seal-list__item--attch"},G=[h(()=>e.createElementVNode("span",null,"查看附件",-1))],K={key:1,class:"textnone"};function X(t,o,p,r,c,i){return e.openBlock(),e.createElementBlock("div",$,[e.createElementVNode("div",T,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.isTapList,(s,f)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["tops-tab-header-items",[s.key===t.active?"active":""]]),onClick:d=>t.handleActive(s.key,f),ref_for:!0,ref:"label"},e.toDisplayString(s.label),11,L))),256)),t.isTapList.length?(e.openBlock(),e.createElementBlock("div",I)):e.createCommentVNode("",!0)]),e.createElementVNode("div",A,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.isTapList,s=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:s.key,style:{height:"calc(100% - 45px)"}},[s.key==="a"&&s.type==="default"?e.renderSlot(t.$slots,"default",{key:0},void 0,!0):e.createCommentVNode("",!0),s.key==="b"&&s.type==="default"?e.renderSlot(t.$slots,s.slot,{key:1},()=>[t.trackUrl?(e.openBlock(),e.createElementBlock("iframe",{key:0,src:t.trackUrl,style:{width:"100%","min-height":"500px",border:"none"},scrolling:"no",frameborder:"0"},null,8,D)):(e.openBlock(),e.createElementBlock("div",F," 暂无流程图 "))],!0):e.createCommentVNode("",!0),s.key==="c"&&s.type==="default"?e.renderSlot(t.$slots,s.slot,{key:2},()=>{var f;return[((f=t.taskCommentList)==null?void 0:f.length)>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.taskCommentList,(d,a)=>(e.openBlock(),e.createElementBlock("div",{key:d.id,class:"seal-list__item"},[e.createElementVNode("div",null,[e.createElementVNode("div",w,[P,e.createElementVNode("span",null,e.toDisplayString(d.activityName),1)]),e.createElementVNode("div",U,[j,e.createElementVNode("span",null,e.toDisplayString(d.createUserName),1)]),e.createElementVNode("div",M,[q,e.createElementVNode("span",null,e.toDisplayString(d.actionName),1)]),e.createElementVNode("div",z,[O,e.createElementVNode("span",{innerHTML:d.msg},null,8,W)]),e.createElementVNode("div",H,[R,e.createElementVNode("span",null,e.toDisplayString(d.createDate),1)]),d.metaAnnexList&&d.metaAnnexList.length?(e.openBlock(),e.createElementBlock("div",Y,G)):e.createCommentVNode("",!0)])]))),128)):(e.openBlock(),e.createElementBlock("div",K,"暂无数据"))]},!0):e.createCommentVNode("",!0),s.type=="slot"?e.renderSlot(t.$slots,s.slot,{key:3},void 0,!0):e.createCommentVNode("",!0)])),[[e.vShow,t.active===s.key]])),128))])])}const b=B(V,[["render",X],["__scopeId","data-v-baad7ff1"]]);b.install=function(t){return t.component(b.name,b),t};const J=e.defineComponent({name:"TopPopup",props:{titleText:{default:"top-popup",type:String},cancelText:{default:"取消",type:String},comfigText:{default:"确定",type:String},comfig:{default:null,type:Function},cancel:{default:null,type:Function},isMask:{require:!1,default:!0,type:Boolean},isMaskClose:{require:!1,default:!0,type:Boolean}},setup(t){const o=e.ref(!1),p=()=>{o.value=!0},r=()=>{typeof t.cancel=="function"&&t.cancel(),i()},c=()=>{typeof t.comfig=="function"&&t.comfig()},i=()=>{o.value=!1};return e.onMounted(()=>{document.querySelector("body")}),{handleOpen:p,handleCancel:r,handleComfig:c,handleClose:i,show:o}}}),Se="",Q={class:"top-popup-header"},Z={class:"header-title"},x={class:"top-popup-body"};function v(t,o,p,r,c,i){return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:"top-popup",style:e.normalizeStyle(t.show?"transform: translateY(0)":"transform: translateY(100%)")},[e.createElementVNode("div",Q,[e.createElementVNode("div",{class:"header-cancel",onClick:o[0]||(o[0]=(...s)=>t.handleCancel&&t.handleCancel(...s))},e.toDisplayString(t.cancelText),1),e.createElementVNode("div",Z,e.toDisplayString(t.titleText),1),e.createElementVNode("div",{class:"header-comfig",onClick:o[1]||(o[1]=(...s)=>t.handleComfig&&t.handleComfig(...s))},e.toDisplayString(t.comfigText),1)]),e.createElementVNode("div",x,[e.renderSlot(t.$slots,"default",{},void 0,!0)])],4),t.show&&t.isMask?(e.openBlock(),e.createElementBlock("div",{key:0,class:"top-popup-mask",onClick:o[2]||(o[2]=s=>t.isMaskClose&&t.handleClose())})):e.createCommentVNode("",!0)],64)}const k=B(J,[["render",v],["__scopeId","data-v-474e328a"]]);k.install=function(t){return console.log("TopPopup.install",t),t.mount(k),t.component(k.name,k),t};const Ve="",ee=e.defineComponent({name:"TopButton",props:{type:{default:"default",type:String}},setup(t){const o=e.ref({textColor:"#fff",bckColor:"3c9cff"});switch(t.type){case"primary":o.value.textColor="#fff",o.value.bckColor="#3c9cff";break;case"danger":o.value.textColor="rgb(255, 96, 96)",o.value.bckColor="rgb(255, 230, 230)";break;case"default":o.value.textColor="rgb(51, 51, 51)",o.value.bckColor="rgb(241, 241, 241)";break}return{style:o}}});function te(t,o,p,r,c,i){return e.openBlock(),e.createElementBlock("div",{class:"top-button",style:e.normalizeStyle(`background-color:${t.style.bckColor};color:${t.style.textColor}`)},[e.renderSlot(t.$slots,"default",{},void 0,!0)],4)}const N=B(ee,[["render",te],["__scopeId","data-v-156a54e6"]]);N.install=function(t){return t.component(N.name,N),t};const oe=e.defineComponent({name:"TopProcess",components:{TopTab:b,TopPopup:k,TopButton:N},props:{tapList:{require:!1,default:()=>[],type:Array},processId:{require:!0,default:"",type:String},processDefId:{require:!0,default:"",type:String},taskId:{require:!0,default:"",type:String},isAdditional:{require:!1,default:!1,type:Boolean},isView:{default:!1,type:Boolean}},setup(t){const o=e.ref({}),p=e.ref(),r=e.ref([{taskId:"ecd82a93-4a62-42a7-b7bd-df38d2f1609a",taskState:1,nodeId:"obj_026aac284c1a4303854f978b674be4b9",customUniqueId:"",nodeName:"部门负责人"}]),c=e.ref({id:"obj_026aac284c1a4303854f978b674be4b9",name:"部门负责人",no:"1",buttons:[],ccTaskButtonLabel:"",ccTaskButtonAnnex:null,completeButtonLabel:"同意",completeButtonAnnex:null,delegateTaskButtonLabel:"转办",delegateTaskButtonAnnex:null,printFormButtonLabel:"",supplyUnusualTransferButtonLabel:"",readingOfficeLabel:"",readingOfficeButtonAnnex:null,jointlySignLabel:"",jointlySignButtonAnnex:null,counterSignLabel:"加签",counterSignButtonAnnex:null,coordinationLabel:"",coordinationButtonAnnex:null,otherButtonAnnexList:null,humanPerformer:{id:"obj_2bd3494ae5c54309b7f2ea452921790b",name:"任意指定",resourceAssignmentExpressionModel:{formalExpression:""}},commentModels:[{actionName:"提交",isDefault:!0},{actionName:"作废",isDefault:!1}],routeTxt:{departmentIds:null,companyIds:null,teamList:null,routeType:"DynamicUsers"},loopCardinality:1,isHistoryRoute:!1,participantList:null,historyRoute:!1});e.watch(()=>t.processId,(l,u)=>{l&&(o.value={status:"审批中",createUid:"18ccbf63229f0c79f39940ae284c111e",createTopUserId:"128ec9c9b7f26135272596fe01c57690",createTime:"2023-04-20 15:01:48",currUserName:"朱鸿飞",allUserNames:["朱鸿飞"],userNodeGroup:{分管领导:["朱鸿飞"]},appId:"com.awspaas.user.apps.top.study.project",statusCode:"1",statusName:"审批中",bizStatusName:"审批中",taskState:1})},{immediate:!0,deep:!0}),console.log("asd",r.value[0].taskState);const i=e.computed(()=>{var C,S;let l=[],u=r.value&&r.value[0]&&r.value[0].taskState!=4;if(u&&!t.isView&&c.value.completeButtonLabel){let n={};n.name=c.value.completeButtonLabel,n.btnProps={type:"primary"},l.push(n)}if(u&&!t.isView&&o.value.currUserName){let n={};n.name="拒绝",n.btnProps={type:"danger"},l.push(n)}if(u&&!t.isView&&c.value.buttons&&c.value.buttons.length&&c.value.buttons.forEach(n=>{if(n.label==="退回"){let E={};E.name=n.label,E.btnProps={type:"danger"},l.push(E)}}),u&&!t.isView&&c.value.delegateTaskButtonLabel){let n={};n.name=c.value.delegateTaskButtonLabel,n.btnProps={type:"default"},l.push(n)}if(t.processId&&o.value.createTopUserId==t.userId&&((C=r.value[0])==null?void 0:C.taskState)!=2&&o.value.status!=="已驳回"&&o.value.status!=="已撤销"){let n={};n.name="催办",n.btnProps={type:"default"},l.push(n)}if(t.processId&&o.value.createTopUserId==t.userId&&((S=r.value[0])==null?void 0:S.taskState)!=2&&o.value.status!=="已驳回"&&o.value.status!=="已撤销"){let n={};n.name="撤销",n.btnProps={type:"default"},l.push(n)}if(u&&!t.isView&&c.value.counterSignLabel){let n={};n.name=c.value.counterSignLabel,n.btnProps={type:"primary"},l.push(n)}return l}),s=e.computed(()=>i.value.length>3?i.value.slice(3):[]),f=()=>{console.log("handleCancel")},d=()=>{console.log("handleComfig","确定按钮"),p.value.handleClose()},a=e.computed(()=>"calc(100vh - 205px)");return{processStatus:o,processCardHeight:a,handleTest:()=>{p.value.handleOpen()},TopPopup1:p,handleCancel:f,handleComfig:d,operBtn:i,actionBtn:s}},methods:{getColor(t){return t=="审核中"?"#FFA52D":t=="已驳回"?"#F14B4C":t=="已撤销"?"#CECECE":t=="已完成"?"#6DC743":"#1389FF"}}}),$e="",y=t=>(e.pushScopeId("data-v-41bcbb23"),t=t(),e.popScopeId(),t),se={class:"process-warp"},ne={key:0,class:"process-main"},ae={class:"process-ml-item border"},le=y(()=>e.createElementVNode("div",{class:"process-mli-name"},"流程状态",-1)),re={class:"process-mli-value"},ce={class:"process-ml-item border"},ie=y(()=>e.createElementVNode("div",{class:"process-mli-name"},"流程发起时间",-1)),de={class:"process-mli-value"},pe={key:0,class:"process-ml-item"},me=y(()=>e.createElementVNode("div",{class:"process-mli-name"},"审批节点",-1)),ue={class:"process-mli-value"},fe={class:"process-mliv-jd"},_e={key:1,class:"process-foot"},he={class:"footBtnRow"},be={class:"process-btn"},ye={key:1,class:"elips"},ke=[y(()=>e.createElementVNode("div",{class:"circle"},null,-1)),y(()=>e.createElementVNode("div",{class:"circle"},null,-1)),y(()=>e.createElementVNode("div",{class:"circle"},null,-1))];function ge(t,o,p,r,c,i){const s=e.resolveComponent("TopTab"),f=e.resolveComponent("TopButton"),d=e.resolveComponent("TopPopup");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",se,[t.processStatus.status?(e.openBlock(),e.createElementBlock("div",ne,[e.createElementVNode("div",ae,[le,e.createElementVNode("div",re,[t.processStatus.status||t.processStatus.bizStatusName?(e.openBlock(),e.createElementBlock("div",{key:0,class:"process-mliv-dd",style:e.normalizeStyle({background:t.getColor(t.processStatus.status)})},e.toDisplayString(t.processStatus.bizStatusName?t.processStatus.bizStatusName:t.processStatus.status),5)):e.createCommentVNode("",!0)])]),e.createElementVNode("div",ce,[ie,e.createElementVNode("div",de,[e.createElementVNode("span",null,e.toDisplayString(t.processStatus.createTime),1)])]),t.processStatus.allUserNames&&t.processStatus.allUserNames.length?(e.openBlock(),e.createElementBlock("div",pe,[me,e.createElementVNode("div",ue,[e.createElementVNode("span",fe,e.toDisplayString(`${t.processStatus.taskState==4?t.processStatus.currUserName:t.processStatus.allUserNames.toString()}审批中`),1)])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"process-card",style:e.normalizeStyle({height:t.processCardHeight})},[e.createVNode(s,{tapList:t.tapList},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default",{},void 0,!0)]),_:3},8,["tapList"])],4),t.isAdditional?(e.openBlock(),e.createElementBlock("div",_e,[e.createElementVNode("div",he,[e.renderSlot(t.$slots,"btn",{},void 0,!0)])])):e.createCommentVNode("",!0),e.createElementVNode("div",be,[t.processStatus.status!="已完成"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.operBtn,(a,m)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:a.name},[m<3?(e.openBlock(),e.createBlock(f,{key:0,onClick:t.handleTest,type:a.btnProps.type},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.name),1)]),_:2},1032,["onClick","type"])):e.createCommentVNode("",!0)],64))),128)):e.createCommentVNode("",!0),t.operBtn.length>3?(e.openBlock(),e.createElementBlock("div",ye,ke)):e.createCommentVNode("",!0)])]),e.createVNode(d,{ref:"TopPopup1",cancel:t.handleCancel,comfig:t.handleComfig},{default:e.withCtx(()=>[e.createTextVNode(" csaasd1 ")]),_:1},8,["cancel","comfig"])],64)}const g=B(oe,[["render",ge],["__scopeId","data-v-41bcbb23"]]);g.install=function(t){return t.component(g.name,g),t};const Be=[b,g],Ne={install:function(t){Be.forEach(o=>{t.use(o)})}};_.TopProcess=g,_.TopTab=b,_.default=Ne,Object.defineProperties(_,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
export const ACCESS_TOKEN :string
|
|
3
|
-
export const SUBJECTID :string
|
|
4
|
-
export const TASK_JSON :string
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* 设置cookie
|
|
8
|
-
* @param key
|
|
9
|
-
* @param value
|
|
10
|
-
* @param options
|
|
11
|
-
* @returns {*}
|
|
12
|
-
*/
|
|
13
|
-
export function saveCookie(key: string, value: string, options: any): void
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* 获取cookie
|
|
17
|
-
* @param key cookie的key
|
|
18
|
-
* @param defaultValue
|
|
19
|
-
* @returns {*}
|
|
20
|
-
*/
|
|
21
|
-
export function loadCookie(key: string, defaultValue: string): string
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* 删除cookie
|
|
26
|
-
* @param key
|
|
27
|
-
* @returns {string}
|
|
28
|
-
*/
|
|
29
|
-
export function removeCookie (key: string): string
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* 设置本地存储
|
|
34
|
-
* @param key
|
|
35
|
-
* @param value
|
|
36
|
-
* @returns {*}
|
|
37
|
-
*/
|
|
38
|
-
export function saveStorage (key: string, value: string) : string
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* 获取本地存储
|
|
42
|
-
* @param key
|
|
43
|
-
* @param defaultValue
|
|
44
|
-
* @returns {*}
|
|
45
|
-
*/
|
|
46
|
-
export function loadStorage (key: string, defaultValue: string) : string
|
|
47
|
-
/**
|
|
48
|
-
* 删除本地存储
|
|
49
|
-
* @param key
|
|
50
|
-
* @returns {string}
|
|
51
|
-
*/
|
|
52
|
-
export function removeStorage (key: string) : string
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import Cookies from 'js-cookie'
|
|
2
|
-
import storage from 'good-storage'
|
|
3
|
-
|
|
4
|
-
export const ACCESS_TOKEN = 'Access_Token'// accessToken String
|
|
5
|
-
export const SUBJECTID = 'SUBJECTID'// accessToken String
|
|
6
|
-
export const TASK_JSON = "TASK_JSON"
|
|
7
|
-
/**
|
|
8
|
-
* 设置cookie
|
|
9
|
-
* @param key
|
|
10
|
-
* @param value
|
|
11
|
-
* @param options
|
|
12
|
-
* @returns {*}
|
|
13
|
-
*/
|
|
14
|
-
export function saveCookie(key, value, options) {
|
|
15
|
-
Cookies.set(key, value, options)
|
|
16
|
-
return value
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* 获取cookie
|
|
21
|
-
* @param key
|
|
22
|
-
* @param defaultValue
|
|
23
|
-
* @returns {*}
|
|
24
|
-
*/
|
|
25
|
-
export function loadCookie(key, defaultValue) {
|
|
26
|
-
return Cookies.get(key) || defaultValue
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* 删除cookie
|
|
31
|
-
* @param key
|
|
32
|
-
* @returns {string}
|
|
33
|
-
*/
|
|
34
|
-
export function removeCookie(key) {
|
|
35
|
-
Cookies.remove(key)
|
|
36
|
-
return ''
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* 设置本地存储
|
|
41
|
-
* @param key
|
|
42
|
-
* @param value
|
|
43
|
-
* @returns {*}
|
|
44
|
-
*/
|
|
45
|
-
export function saveStorage(key, value) {
|
|
46
|
-
storage.set(key, value)
|
|
47
|
-
return value
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* 获取本地存储
|
|
52
|
-
* @param key
|
|
53
|
-
* @param defaultValue
|
|
54
|
-
* @returns {*}
|
|
55
|
-
*/
|
|
56
|
-
export function loadStorage(key, defaultValue) {
|
|
57
|
-
return storage.get(key, defaultValue)
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* 删除本地存储
|
|
62
|
-
* @param key
|
|
63
|
-
* @returns {string}
|
|
64
|
-
*/
|
|
65
|
-
export function removeStorage(key) {
|
|
66
|
-
storage.remove(key)
|
|
67
|
-
return ''
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* 保存会话存储
|
|
72
|
-
* @param key
|
|
73
|
-
* @param value
|
|
74
|
-
* @returns {*}
|
|
75
|
-
*/
|
|
76
|
-
export function saveSessionStorage(key, value) {
|
|
77
|
-
storage.session.set(key, value)
|
|
78
|
-
return value
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* 获取会话存储
|
|
83
|
-
* @param key
|
|
84
|
-
* @param defaultValue
|
|
85
|
-
* @returns {*}
|
|
86
|
-
*/
|
|
87
|
-
export function loadSessionStorage(key, defaultValue) {
|
|
88
|
-
return storage.session.get(key, defaultValue)
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* 删除会话存储
|
|
93
|
-
* @param key
|
|
94
|
-
* @returns {string}
|
|
95
|
-
*/
|
|
96
|
-
export function removeSessionStorage(key) {
|
|
97
|
-
storage.session.remove(key)
|
|
98
|
-
return ''
|
|
99
|
-
}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import axios, {
|
|
2
|
-
AxiosRequestConfig,
|
|
3
|
-
AxiosResponse,
|
|
4
|
-
AxiosError,
|
|
5
|
-
InternalAxiosRequestConfig,
|
|
6
|
-
} from "axios";
|
|
7
|
-
import { ACCESS_TOKEN, loadStorage } from "./cache";
|
|
8
|
-
|
|
9
|
-
const host = process.env.VUE_APP_BASE_URL;
|
|
10
|
-
// const host = "http://59.53.91.231:2100";
|
|
11
|
-
|
|
12
|
-
axios.defaults.headers["Content-Type"] = "application/json;charset=utf-8";
|
|
13
|
-
|
|
14
|
-
const opts = {
|
|
15
|
-
baseURL: host,
|
|
16
|
-
timeout: 999999999,
|
|
17
|
-
errorTip: true,
|
|
18
|
-
transformResponse: [
|
|
19
|
-
function (data: any, headers: any) {
|
|
20
|
-
if (typeof data === "string") {
|
|
21
|
-
try {
|
|
22
|
-
data = JSON.parse(data);
|
|
23
|
-
} catch (e) {}
|
|
24
|
-
}
|
|
25
|
-
return data;
|
|
26
|
-
},
|
|
27
|
-
],
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
const service = axios.create(opts);
|
|
31
|
-
|
|
32
|
-
service.interceptors.request.use((config)=> {
|
|
33
|
-
const isToken = (config.headers || {}).isToken === false;
|
|
34
|
-
if (loadStorage("token", "") && !isToken) {
|
|
35
|
-
config.headers["Authorization"] = "Bearer " + loadStorage("token", ""); // 让每个请求携带自定义token 请根据实际情况自行修改 15c572f2-1fff-4ef2-94dc-728fc8d6fe14
|
|
36
|
-
}
|
|
37
|
-
/* config.headers["Authorization"] =
|
|
38
|
-
"Bearer " + "15c572f2-1fff-4ef2-94dc-728fc8d6fe14"; */
|
|
39
|
-
return config;
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
service.interceptors.response.use((response) => {
|
|
43
|
-
if (Object.prototype.toString.call(response.data) === "[object Blob]") {
|
|
44
|
-
return response;
|
|
45
|
-
}
|
|
46
|
-
const { data, config } = response;
|
|
47
|
-
const { code, success } = data;
|
|
48
|
-
const message = response.data.msg;
|
|
49
|
-
// 增加失败判断
|
|
50
|
-
data.fail = code !== 200 && success !== true;
|
|
51
|
-
if (code === 401) {
|
|
52
|
-
console.log("登录状态已过期");
|
|
53
|
-
return data;
|
|
54
|
-
} else if (code !== 200) {
|
|
55
|
-
console.log("错误");
|
|
56
|
-
return data;
|
|
57
|
-
}
|
|
58
|
-
return data;
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
export default service;
|