fix: BUG修改

This commit is contained in:
kun 2024-06-02 20:15:25 +08:00
parent 262d4b98e4
commit 1a51ca4876
27 changed files with 241 additions and 92 deletions

View File

@ -1,12 +1,13 @@
//基础请求地址,需要根据自己的需求切换
// 开发环境
// export const BASE_URL = "http://42.180.188.17:9809" // 鞍钢正式环境
// export const BASE_URL = "http://42.180.188.17:19098" // 鞍钢线上测试环境
export const BASE_URL = "http://42.180.188.17:19098" // 鞍钢线上测试环境
// export const BASE_URL = "http://47.93.215.234:9809" // 鞍钢正式环境(弃用)
// export const BASE_URL = "http://47.93.215.234:19098" // 鞍钢线上测试环境(弃用)
// export const BASE_URL = "http://47.93.215.234:19097"
// export const BASE_URL = "http://jxj.zhgdyun.com:61212" // 洁远程
// export const BASE_URL = "http://182.90.224.237:35557"
export const BASE_URL = "http://192.168.34.155:19111"
// export const BASE_URL = "http://192.168.34.155:19111"
// export const BASE_URL = "http://192.168.34.221:9111"
// axios.defaults.baseURL ='http://192.168.34.221:9111/' //郭圣雄本地
//export const BASE_URL = "http://192.168.8.100:10000"

View File

@ -13,8 +13,7 @@
</lsj-upload>
<view class="w-file-list" :key="fileList.length">
<!-- @click="openFile(i)" -->
<view v-for="(file, i) in fileList" class="w-file" :key="`file_${i}_${file.type}`">
<view v-for="(file, i) in fileList" class="w-file" :key="`file_${i}_${file.type}`" @click="downFile(i)">
<image :src="getFileImgByType(file.name)" mode="aspectFit"></image>
<text class="w-file-name">{{file.name}}</text>
<uni-tag :text="getSize(file.size)" size="mini" inverted></uni-tag>
@ -24,20 +23,48 @@
</view>
</view>
</view>
<view class="fixed" :class="{show:showIframe}" v-if="showDisplay" @click="showDisplay=false">
<view class="iframeMain" @click.stop="showDisplay=true">
<video v-if="getType(iframeUrl) == 'video'" class="iframe" :src="iframeUrl"></video>
<image v-else-if="getType(iframeUrl) == 'image'" class="iframe" :src="iframeUrl" mode="aspectFill">
</image>
</view>
</view>
</view>
</template>
<script setup>
import { ref, computed, nextTick, onMounted } from 'vue'
import { BASE_URL } from '@/api/request.js'
import { delFile } from '@/api/resource.js'
import { onUnload } from "@dcloudio/uni-app";
import { getFileImgByType, saveFileTemp, removeFileTemp, openLocalFile } from '@/utils/tool.js';
const emits = defineEmits(['update:modelValue','resize'])
defineExpose({show})
import {
ref,
computed,
nextTick,
onMounted
} from 'vue'
import {
BASE_URL
} from '@/api/request.js'
import {
delFile
} from '@/api/resource.js'
import {
onUnload
} from "@dcloudio/uni-app";
import {
getFileImgByType,
saveFileTemp,
removeFileTemp,
openLocalFile,
isVideoLink,
isImageLink
} from '@/utils/tool.js';
const emits = defineEmits(['update:modelValue', 'resize'])
defineExpose({
show
})
const showDisplay = ref(false)
const showIframe = ref(false)
const iframeUrl = ref("")
const props = defineProps({
formProps: {
type: Object,
@ -127,9 +154,11 @@
const fileList = ref([])
const fileMap = ref()
fileMap.value = new Map()
function resizeCollapse(){
function resizeCollapse() {
setTimeout(() => emits('resize'), 800)
}
function fileChange(file) {
if (file instanceof Map) {
fileList.value = []
@ -183,11 +212,38 @@
}
}
}
function openFile(i) {
function getType(url){
if(isImageLink(url)){
return "image"
}else if(isVideoLink(url)){
return "video"
}else{
return ''
}
}
function downFile(i) {
if (!props.readonly) {
//
return;
}
const file = _value.value[i]
// const fileExtension = file.name.slice(file.name.lastIndexOf('.') + 1);
// //
// const imageExtensions = ['jpg', 'jpeg', 'png', 'gif', 'webp', 'bmp'];
// //
// const videoTypes = ['mp4', 'webm', 'ogg'];
//
if (isVideoLink(`${BASE_URL}/image/${file.id}`) || isImageLink(`${BASE_URL}/image/${file.id}`)) {
//
showDisplay.value = true;
showIframe.value = true;
iframeUrl.value = `${BASE_URL}/image/${file.id}`;
} else {
window.open(`${BASE_URL}/image/${file.id}`)
}
// openLocalFile(file.name, `${options.url}/${file.id}?name=${file.name}`)
openLocalFile(file.name, `${BASE_URL}/image/${file.id}?name=${file.name}`)
// openLocalFile(file.name, `${BASE_URL}/image/${file.id}`)
}
function getSize(size) {
@ -275,4 +331,33 @@
}
}
}
.fixed {
position: fixed;
z-index: 9999;
left: 0;
top: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, .3);
display: none;
&.show {
display: initial;
}
}
.iframeMain {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
width: 650rpx;
font-size: 0;
.iframe {
width: 100%;
height: 500rpx;
}
}
</style>

View File

@ -1 +1 @@
import{_ as e,p as a,r as t,q as s,t as l,u as r,v as o,a as n,c,w as u,x as i,i as d,y as v,z as m,A as p,d as f,B as g,C as _,D as h,F as y,E as w,G as k,S as x,k as I,e as b,H as C,J as T,K as N,L as S,M as U,N as z,$ as P,P as j,Q as D,f as F}from"./index-CIhubZBJ.js";import{_ as L}from"./uni-segmented-control.vteaoDyS.js";import{_ as $}from"./noData.BO1MxwPV.js";import{t as M}from"./task.BQDbF1Tm.js";import{g as A,a as E}from"./ProcessUtil.Cpq6blAo.js";const H=e({__name:"ProcessSelect",setup(e){const H=a((()=>{const e=["待我处理","已处理的","我发起的","抄送我的"];return e[G.value]+=`-${Q.value.total}`,e})),q=a((()=>w().windowHeight-40)),B=t({current:0,old:0}),G=t(0),J=t("more"),K=t({pageSize:10,pageNo:1,code:""}),Q=t({pages:1,size:10,total:0,records:[]});function R(e){switch(G.value){case 0:return{text:"待处理",type:"warning"};case 1:return E(e);case 2:case 3:return A(e.result)}}function O(e){G.value=e.currentIndex,K.value.pageNo=1,W(),B.value.current=B.value.old,k((()=>{B.value.current=0}))}function V(e){B.value.old=e.detail.scrollTop}function W(){J.value="loading",function(){switch(G.value){case 0:return M.getUserTodoList(K.value);case 1:return M.getIdoList(K.value);case 2:return M.getUserSubmittedList(K.value);case 3:return M.getCcMeList(K.value)}}().then((e=>{i(),Q.value.total=e.data.total,1===K.value.pageNo&&(Q.value.records.length=0),Q.value.records.push(...e.data.records),J.value=K.value.pageNo*K.value.pageSize<Q.value.total?"more":"noMore"})).catch((e=>{i()}))}function X(){K.value.pageNo++,W()}return s((e=>{K.value.code=e.processCode,W()})),l((()=>{W()})),(e,a)=>{const t=r(o("uni-segmented-control"),L),s=d,l=F,i=r(o("uni-tag"),v),w=r(o("uni-icons"),m),k=r(o("uni-load-more"),p),M=x,A=I;return n(),c(s,{class:"content"},{default:u((()=>[f(s,{class:"nav-type"},{default:u((()=>[f(t,{current:G.value,values:H.value,onClickItem:O,styleType:"text",activeColor:"#4C87F3"},null,8,["current","values"])])),_:1}),f(s,{class:"datas"},{default:u((()=>[Q.value.records.length>0?(n(),c(M,{key:0,class:"scrool-more","refresher-threshold":0,onScrolltolower:X,"scroll-top":B.value.current,onScroll:V,enablePullDownRefresh:"",onScrolltoupper:()=>{},"show-scrollbar":!0,style:g({height:q.value+"px"}),"scroll-y":"true","scroll-with-animation":"true"},{default:u((()=>[(n(!0),_(y,null,h(Q.value.records,((e,a)=>(n(),c(s,{class:"process-item",key:e.instanceId+a,onClick:a=>function(e){D({url:`/pages/instance/instancePreview?instanceId=${e.instanceId}&nodeId=${e.nodeId}`})}(e)},{default:u((()=>[f(s,null,{default:u((()=>[f(l,null,{default:u((()=>[b(C((e.owner||e.staterUser).name)+"提交的 "+C(e.processDefName),1)])),_:2},1024),f(i,{class:"process-item-status",circle:"true",text:R(e).text,type:R(e).type,inverted:""},null,8,["text","type"])])),_:2},1024),f(s,{class:"form-content"},{default:u((()=>[(n(!0),_(y,null,h(e.formAbstracts||[],(e=>(n(),c(s,{key:e.id},{default:u((()=>[f(l,{style:{color:"#b5b5b5"}},{default:u((()=>[b(C(e.name)+": ",1)])),_:2},1024),f(l,{class:"over-tip"},{default:u((()=>[b(C(T(N)(e)),1)])),_:2},1024)])),_:2},1024)))),128))])),_:2},1024),f(s,{class:"process-item-footer"},{default:u((()=>[f(S,{name:(e.owner||e.staterUser).name,src:T(U)((e.owner||e.staterUser).avatar),size:30},null,8,["name","src"]),f(l,null,{default:u((()=>[b("在 "+C((e.createTime||e.startTime).substring(0,16))+" 提交 ",1)])),_:2},1024),f(s,{onClick:z((a=>function(e){P("selectProcess",{id:e.instanceId,name:e.processDefName,startUser:e.owner||e.staterUser,createTime:e.createTime||e.startTime}),setTimeout((()=>j()),100)}(e)),["stop"])},{default:u((()=>[f(w,{color:"#5976EF",type:"checkbox",size:"18"}),f(l,null,{default:u((()=>[b("选择")])),_:1})])),_:2},1032,["onClick"])])),_:2},1024)])),_:2},1032,["onClick"])))),128)),f(k,{status:J.value,mode:"scaleToFill",showIcon:!1},null,8,["status"])])),_:1},8,["scroll-top","style"])):(n(),c(A,{key:1,class:"nodata",src:$,mode:"aspectFit"}))])),_:1})])),_:1})}}},[["__scopeId","data-v-e8df9f42"]]);export{H as default};
import{_ as e,p as a,r as t,q as s,t as l,u as r,v as o,a as n,c,w as u,x as i,i as d,y as v,z as m,A as p,d as f,B as g,C as _,D as h,F as y,E as w,G as k,S as x,k as I,e as b,H as C,J as T,K as N,L as S,M as U,N as z,$ as P,P as j,Q as D,f as F}from"./index-CwZylv7V.js";import{_ as L}from"./uni-segmented-control.Dv6Jr3eE.js";import{_ as $}from"./noData.BO1MxwPV.js";import{t as M}from"./task.SdQo-veG.js";import{g as A,a as E}from"./ProcessUtil.Cpq6blAo.js";const H=e({__name:"ProcessSelect",setup(e){const H=a((()=>{const e=["待我处理","已处理的","我发起的","抄送我的"];return e[G.value]+=`-${Q.value.total}`,e})),q=a((()=>w().windowHeight-40)),B=t({current:0,old:0}),G=t(0),J=t("more"),K=t({pageSize:10,pageNo:1,code:""}),Q=t({pages:1,size:10,total:0,records:[]});function R(e){switch(G.value){case 0:return{text:"待处理",type:"warning"};case 1:return E(e);case 2:case 3:return A(e.result)}}function O(e){G.value=e.currentIndex,K.value.pageNo=1,W(),B.value.current=B.value.old,k((()=>{B.value.current=0}))}function V(e){B.value.old=e.detail.scrollTop}function W(){J.value="loading",function(){switch(G.value){case 0:return M.getUserTodoList(K.value);case 1:return M.getIdoList(K.value);case 2:return M.getUserSubmittedList(K.value);case 3:return M.getCcMeList(K.value)}}().then((e=>{i(),Q.value.total=e.data.total,1===K.value.pageNo&&(Q.value.records.length=0),Q.value.records.push(...e.data.records),J.value=K.value.pageNo*K.value.pageSize<Q.value.total?"more":"noMore"})).catch((e=>{i()}))}function X(){K.value.pageNo++,W()}return s((e=>{K.value.code=e.processCode,W()})),l((()=>{W()})),(e,a)=>{const t=r(o("uni-segmented-control"),L),s=d,l=F,i=r(o("uni-tag"),v),w=r(o("uni-icons"),m),k=r(o("uni-load-more"),p),M=x,A=I;return n(),c(s,{class:"content"},{default:u((()=>[f(s,{class:"nav-type"},{default:u((()=>[f(t,{current:G.value,values:H.value,onClickItem:O,styleType:"text",activeColor:"#4C87F3"},null,8,["current","values"])])),_:1}),f(s,{class:"datas"},{default:u((()=>[Q.value.records.length>0?(n(),c(M,{key:0,class:"scrool-more","refresher-threshold":0,onScrolltolower:X,"scroll-top":B.value.current,onScroll:V,enablePullDownRefresh:"",onScrolltoupper:()=>{},"show-scrollbar":!0,style:g({height:q.value+"px"}),"scroll-y":"true","scroll-with-animation":"true"},{default:u((()=>[(n(!0),_(y,null,h(Q.value.records,((e,a)=>(n(),c(s,{class:"process-item",key:e.instanceId+a,onClick:a=>function(e){D({url:`/pages/instance/instancePreview?instanceId=${e.instanceId}&nodeId=${e.nodeId}`})}(e)},{default:u((()=>[f(s,null,{default:u((()=>[f(l,null,{default:u((()=>[b(C((e.owner||e.staterUser).name)+"提交的 "+C(e.processDefName),1)])),_:2},1024),f(i,{class:"process-item-status",circle:"true",text:R(e).text,type:R(e).type,inverted:""},null,8,["text","type"])])),_:2},1024),f(s,{class:"form-content"},{default:u((()=>[(n(!0),_(y,null,h(e.formAbstracts||[],(e=>(n(),c(s,{key:e.id},{default:u((()=>[f(l,{style:{color:"#b5b5b5"}},{default:u((()=>[b(C(e.name)+": ",1)])),_:2},1024),f(l,{class:"over-tip"},{default:u((()=>[b(C(T(N)(e)),1)])),_:2},1024)])),_:2},1024)))),128))])),_:2},1024),f(s,{class:"process-item-footer"},{default:u((()=>[f(S,{name:(e.owner||e.staterUser).name,src:T(U)((e.owner||e.staterUser).avatar),size:30},null,8,["name","src"]),f(l,null,{default:u((()=>[b("在 "+C((e.createTime||e.startTime).substring(0,16))+" 提交 ",1)])),_:2},1024),f(s,{onClick:z((a=>function(e){P("selectProcess",{id:e.instanceId,name:e.processDefName,startUser:e.owner||e.staterUser,createTime:e.createTime||e.startTime}),setTimeout((()=>j()),100)}(e)),["stop"])},{default:u((()=>[f(w,{color:"#5976EF",type:"checkbox",size:"18"}),f(l,null,{default:u((()=>[b("选择")])),_:1})])),_:2},1032,["onClick"])])),_:2},1024)])),_:2},1032,["onClick"])))),128)),f(k,{status:J.value,mode:"scaleToFill",showIcon:!1},null,8,["status"])])),_:1},8,["scroll-top","style"])):(n(),c(A,{key:1,class:"nodata",src:$,mode:"aspectFit"}))])),_:1})])),_:1})}}},[["__scopeId","data-v-e8df9f42"]]);export{H as default};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
import{ay as t}from"./index-CIhubZBJ.js";function e(e,o=!1){return t({url:`wflow/model/${o?"sub/":""}group/list`,data:e})}function o(e,o){return t({url:"wflow/model/list/byUser",data:e,header:o})}function r(e){return t({url:`wflow/model/detail/${e}`,data:"GET"})}function n(){return t({url:"wflow/process/instance/count",method:"GET"})}function u(e){return t({url:"xmgl/baseModule/getModuleAndMenuList",method:"POST",data:e})}export{o as a,n as b,e as c,r as d,u as g};
import{aA as t}from"./index-CwZylv7V.js";function e(e,o=!1){return t({url:`wflow/model/${o?"sub/":""}group/list`,data:e})}function o(e,o){return t({url:"wflow/model/list/byUser",data:e,header:o})}function r(e){return t({url:`wflow/model/detail/${e}`,data:"GET"})}function n(){return t({url:"wflow/process/instance/count",method:"GET"})}function u(e){return t({url:"xmgl/baseModule/getModuleAndMenuList",method:"POST",data:e})}export{o as a,n as b,e as c,r as d,u as g};

View File

@ -1 +1 @@
import{_ as e,r as a,p as t,u as l,y as s,v as n,z as u,a4 as r,a5 as i,a6 as o,a as d,c,w as p,d as v,L as h,J as y,M as m,e as f,H as g,C as x,D as _,F as w,a7 as k,a8 as b,f as C,i as z,o as E,a9 as T,W as A,aa as N,ab as F,B as I,a1 as B,ac as D,ad as P,S as U,ae as V,E as $,k as j,af as H,b as J,ag as L}from"./index-CIhubZBJ.js";const O=e({__name:"UserCard",props:["userId"],setup(e,{expose:E}){const T=a({}),A=a(),N=t((()=>0===(T.value.depts||[]).length?"未设置部门":T.value.depts.join("、")));function F(){A.value.close()}return E({show:function(e){k(e).then((e=>{T.value=e.data,A.value.open("center")}))},hide:F}),(e,a)=>{const t=C,k=l(n("uni-tag"),s),E=z,I=l(n("uni-icons"),u),B=l(n("uni-list-item"),r),D=l(n("uni-list"),i),P=l(n("uni-popup"),o);return d(),c(P,{ref_key:"userCardPopup",ref:A,type:"center"},{default:p((()=>[v(E,{class:"w-user-card"},{default:p((()=>[v(h,{class:"w-avatar",src:y(m)(T.value.avatar),name:T.value.username,size:55,showName:!1},null,8,["src","name"]),v(E,null,{default:p((()=>[v(t,{style:{"margin-right":"10px"}},{default:p((()=>[f(g(T.value.username),1)])),_:1}),(d(!0),x(w,null,_(T.value.roles||[],((e,a)=>(d(),c(k,{type:"warning",size:"mini",text:e,inverted:"",key:`r${a}`},null,8,["text"])))),128))])),_:1}),v(I,{class:"w-xicon",type:"closeempty",color:"#A2A2A2",size:20,onClick:F}),v(D,{class:"w-user-info"},{default:p((()=>[v(B,{title:"所属部门",rightText:N.value,"show-extra-icon":"","extra-icon":{type:"home"}},null,8,["rightText"]),v(B,{title:"入职时间",rightText:T.value.entryDate,"show-extra-icon":"","extra-icon":{type:"calendar"}},null,8,["rightText"]),v(B,{title:"性别",rightText:T.value.sex?"男":"女","show-extra-icon":"","extra-icon":{type:"staff"}},null,8,["rightText"]),v(B,{title:"电话",onClick:a[0]||(a[0]=e=>{b({phoneNumber:"18866668888"})}),"show-extra-icon":"",rightText:"18866668888",clickable:"","show-arrow":"","extra-icon":{type:"phone"}})])),_:1})])),_:1})])),_:1},512)}}},[["__scopeId","data-v-2d341368"]]),S=e({__name:"contacts",setup(e){const u=a(),o=a(0),k=a(""),b=a([]),S=a([]),M=a([{name:"组织",id:0}]),W=t((()=>$().windowHeight-105));a(!1);const q=t((()=>""!==k.value.trim()?b.value:S.value));function G(){const e=JSON.parse(A("loginUser"));N({deptId:o.value+"P"+e.sn,type:"user"}).then((e=>{S.value=e.data,loadOrgPath()})).catch((e=>{}))}return E((()=>G())),T((()=>(u.value.hide(),M.value.length>1&&(M.value.length--,o.value=M.value[M.value.length-1].id,G(),!0)))),F(k,(()=>{""!==k.value.trim()&&(b.value.length=0,L({userName:k.value.trim()}).then((e=>{b.value=e.data})).catch((e=>{})))})),(e,a)=>{const t=l(n("uni-search-bar"),B),b=z,E=l(n("uni-breadcrumb-item"),D),T=l(n("uni-breadcrumb"),P),A=U,N=j,F=C,$=l(n("uni-tag"),s),L=l(n("uni-list-item"),r),K=l(n("uni-list"),i);return d(),x(w,null,[v(b,{style:{padding:"0 0 16rpx 0","background-color":"white"}},{default:p((()=>[v(b,{class:"search"},{default:p((()=>[v(t,{modelValue:k.value,"onUpdate:modelValue":a[0]||(a[0]=e=>k.value=e),bgColor:"#EEEEEE",radius:"5",placeholder:"搜索人员",clearButton:"auto",cancelButton:"none"},null,8,["modelValue"])])),_:1}),v(b,{style:{padding:"6rpx 16rpx"}},{default:p((()=>[v(A,{"scroll-x":""},{default:p((()=>[v(T,{separator:">"},{default:p((()=>[(d(!0),x(w,null,_(M.value,((e,a)=>(d(),c(E,{key:a,onClick:t=>{return l=e.id,s=a,o.value=l,M.value.length=s+1,void G();var l,s}},{default:p((()=>[v(b,{style:I({color:a+1===M.value.length?"#989996":"#1E90FD","font-size":"32rpx"})},{default:p((()=>[f(g(e.name),1)])),_:2},1032,["style"])])),_:2},1032,["onClick"])))),128))])),_:1})])),_:1})])),_:1})])),_:1}),S.value.length>0?(d(),c(A,{key:0,class:"w-org-list","scroll-y":"",style:I({height:W.value+"px"})},{default:p((()=>[v(K,null,{default:p((()=>[(d(!0),x(w,null,_(q.value,((e,a)=>(d(),c(L,{clickable:"",showArrow:"dept"===e.type,key:`${e.type}_${e.id}`,class:"w-org-item",onClick:a=>function(e){"dept"===e.type?(o.value=e.id,M.value.push({name:e.name,id:e.id}),G()):"user"===e.type&&u.value.show(e.id)}(e)},{header:p((()=>[v(b,{class:"w-org-avatar"},{default:p((()=>["user"===e.type?(d(),c(h,{key:0,name:e.name,src:y(m)(e.avatar),showName:!1},null,8,["name","src"])):(d(),c(N,{key:1,"lazy-load":"",mode:"aspectFit",src:H}))])),_:2},1024)])),body:p((()=>[v(b,{style:{display:"flex","align-items":"center"}},{default:p((()=>[v(F,{style:{"font-size":"32rpx"}},{default:p((()=>[f(g(e.name),1)])),_:2},1024),e.isLeader?(d(),c(b,{key:0,style:{display:"flex","align-items":"center","margin-left":"16rpx"}},{default:p((()=>[v($,{type:"warning",size:"mini",text:"部门负责人",inverted:""})])),_:1})):J("",!0)])),_:2},1024)])),_:2},1032,["showArrow","onClick"])))),128))])),_:1})])),_:1},8,["style"])):(d(),c(b,{key:1,style:{width:"100%"}},{default:p((()=>[v(N,{mode:"aspectFit",style:{width:"100%"},src:V})])),_:1})),v(O,{ref_key:"userCard",ref:u},null,512)],64)}}},[["__scopeId","data-v-858f167b"]]);export{S as default};
import{_ as e,r as a,p as t,u as l,y as s,v as n,z as u,a6 as r,a7 as i,a8 as o,a as d,c,w as p,d as h,L as v,J as y,M as m,e as f,H as g,C as x,D as _,F as w,a9 as k,aa as b,f as C,i as z,o as E,ab as T,W as A,ac as N,ad as F,B as I,a3 as B,ae as D,af as P,S as U,ag as V,E as $,k as j,ah as H,b as J,ai as L}from"./index-CwZylv7V.js";const O=e({__name:"UserCard",props:["userId"],setup(e,{expose:E}){const T=a({}),A=a(),N=t((()=>0===(T.value.depts||[]).length?"未设置部门":T.value.depts.join("、")));function F(){A.value.close()}return E({show:function(e){k(e).then((e=>{T.value=e.data,A.value.open("center")}))},hide:F}),(e,a)=>{const t=C,k=l(n("uni-tag"),s),E=z,I=l(n("uni-icons"),u),B=l(n("uni-list-item"),r),D=l(n("uni-list"),i),P=l(n("uni-popup"),o);return d(),c(P,{ref_key:"userCardPopup",ref:A,type:"center"},{default:p((()=>[h(E,{class:"w-user-card"},{default:p((()=>[h(v,{class:"w-avatar",src:y(m)(T.value.avatar),name:T.value.username,size:55,showName:!1},null,8,["src","name"]),h(E,null,{default:p((()=>[h(t,{style:{"margin-right":"10px"}},{default:p((()=>[f(g(T.value.username),1)])),_:1}),(d(!0),x(w,null,_(T.value.roles||[],((e,a)=>(d(),c(k,{type:"warning",size:"mini",text:e,inverted:"",key:`r${a}`},null,8,["text"])))),128))])),_:1}),h(I,{class:"w-xicon",type:"closeempty",color:"#A2A2A2",size:20,onClick:F}),h(D,{class:"w-user-info"},{default:p((()=>[h(B,{title:"所属部门",rightText:N.value,"show-extra-icon":"","extra-icon":{type:"home"}},null,8,["rightText"]),h(B,{title:"入职时间",rightText:T.value.entryDate,"show-extra-icon":"","extra-icon":{type:"calendar"}},null,8,["rightText"]),h(B,{title:"性别",rightText:T.value.sex?"男":"女","show-extra-icon":"","extra-icon":{type:"staff"}},null,8,["rightText"]),h(B,{title:"电话",onClick:a[0]||(a[0]=e=>{b({phoneNumber:"18866668888"})}),"show-extra-icon":"",rightText:"18866668888",clickable:"","show-arrow":"","extra-icon":{type:"phone"}})])),_:1})])),_:1})])),_:1},512)}}},[["__scopeId","data-v-2d341368"]]),S=e({__name:"contacts",setup(e){const u=a(),o=a(0),k=a(""),b=a([]),S=a([]),M=a([{name:"组织",id:0}]),W=t((()=>$().windowHeight-105));a(!1);const q=t((()=>""!==k.value.trim()?b.value:S.value));function G(){const e=JSON.parse(A("loginUser"));N({deptId:o.value+"P"+e.sn,type:"user"}).then((e=>{S.value=e.data,loadOrgPath()})).catch((e=>{}))}return E((()=>G())),T((()=>(u.value.hide(),M.value.length>1&&(M.value.length--,o.value=M.value[M.value.length-1].id,G(),!0)))),F(k,(()=>{""!==k.value.trim()&&(b.value.length=0,L({userName:k.value.trim()}).then((e=>{b.value=e.data})).catch((e=>{})))})),(e,a)=>{const t=l(n("uni-search-bar"),B),b=z,E=l(n("uni-breadcrumb-item"),D),T=l(n("uni-breadcrumb"),P),A=U,N=j,F=C,$=l(n("uni-tag"),s),L=l(n("uni-list-item"),r),K=l(n("uni-list"),i);return d(),x(w,null,[h(b,{style:{padding:"0 0 16rpx 0","background-color":"white"}},{default:p((()=>[h(b,{class:"search"},{default:p((()=>[h(t,{modelValue:k.value,"onUpdate:modelValue":a[0]||(a[0]=e=>k.value=e),bgColor:"#EEEEEE",radius:"5",placeholder:"搜索人员",clearButton:"auto",cancelButton:"none"},null,8,["modelValue"])])),_:1}),h(b,{style:{padding:"6rpx 16rpx"}},{default:p((()=>[h(A,{"scroll-x":""},{default:p((()=>[h(T,{separator:">"},{default:p((()=>[(d(!0),x(w,null,_(M.value,((e,a)=>(d(),c(E,{key:a,onClick:t=>{return l=e.id,s=a,o.value=l,M.value.length=s+1,void G();var l,s}},{default:p((()=>[h(b,{style:I({color:a+1===M.value.length?"#989996":"#1E90FD","font-size":"32rpx"})},{default:p((()=>[f(g(e.name),1)])),_:2},1032,["style"])])),_:2},1032,["onClick"])))),128))])),_:1})])),_:1})])),_:1})])),_:1}),S.value.length>0?(d(),c(A,{key:0,class:"w-org-list","scroll-y":"",style:I({height:W.value+"px"})},{default:p((()=>[h(K,null,{default:p((()=>[(d(!0),x(w,null,_(q.value,((e,a)=>(d(),c(L,{clickable:"",showArrow:"dept"===e.type,key:`${e.type}_${e.id}`,class:"w-org-item",onClick:a=>function(e){"dept"===e.type?(o.value=e.id,M.value.push({name:e.name,id:e.id}),G()):"user"===e.type&&u.value.show(e.id)}(e)},{header:p((()=>[h(b,{class:"w-org-avatar"},{default:p((()=>["user"===e.type?(d(),c(v,{key:0,name:e.name,src:y(m)(e.avatar),showName:!1},null,8,["name","src"])):(d(),c(N,{key:1,"lazy-load":"",mode:"aspectFit",src:H}))])),_:2},1024)])),body:p((()=>[h(b,{style:{display:"flex","align-items":"center"}},{default:p((()=>[h(F,{style:{"font-size":"32rpx"}},{default:p((()=>[f(g(e.name),1)])),_:2},1024),e.isLeader?(d(),c(b,{key:0,style:{display:"flex","align-items":"center","margin-left":"16rpx"}},{default:p((()=>[h($,{type:"warning",size:"mini",text:"部门负责人",inverted:""})])),_:1})):J("",!0)])),_:2},1024)])),_:2},1032,["showArrow","onClick"])))),128))])),_:1})])),_:1},8,["style"])):(d(),c(b,{key:1,style:{width:"100%"}},{default:p((()=>[h(N,{mode:"aspectFit",style:{width:"100%"},src:V})])),_:1})),h(O,{ref_key:"userCard",ref:u},null,512)],64)}}},[["__scopeId","data-v-858f167b"]]);export{S as default};

View File

@ -0,0 +1 @@
import{_ as e,r as a,p as s,aB as t,aM as l,u,v as n,a as r,c as i,w as o,aN as d,aK as m,aL as c,z as f,i as p,d as v,av as g,e as _,b as h,aO as w,aP as y,s as V,P as R,aQ as b,j as k}from"./index-CwZylv7V.js";const q=e({__name:"UserAgent",setup(e){const q=a({timeRange:[],effective:!1,user:[]}),z=a(!1),M=a();s({get:()=>q.value.user?[q.value.user]:[],set(e){q.value.user=e[0]}});const P={timeRange:{rules:[{errorMessage:"请选择代理时间段",required:!0}]},user:{rules:[{errorMessage:"请选择代理人",required:!0}]}};function U(){w({title:"提示",content:"您是否要取消该代理人设置",success:function(e){e.confirm&&y().then((e=>{V({icon:"none",title:"取消成功"}),R()}))}})}function j(){M.value.validate().then((e=>{b({timeRange:q.value.timeRange,user:q.value.user[0]}).then((e=>{V({icon:"none",title:"设置代理人成功"}),R()})).catch((e=>{V({icon:"none",title:"设置失败:"+e.msg})}))})).catch((e=>{V({icon:"none",title:"请完成设置"})}))}return t((()=>{l().then((e=>{e.data&&(q.value={...e.data,user:e.data.user?[e.data.user]:[]},z.value=!0)}))})),(e,a)=>{const s=u(n("uni-datetime-picker"),d),t=u(n("uni-forms-item"),m),l=u(n("uni-forms"),c),w=u(n("uni-icons"),f),y=k,V=p;return r(),i(V,{class:"w-user-angent"},{default:o((()=>[v(l,{ref_key:"wflowForm",ref:M,rules:P,modelValue:q.value,"label-position":"top","label-width":"200"},{default:o((()=>[v(t,{name:"timeRange",required:!0,label:"代理时间段"},{default:o((()=>[v(s,{modelValue:q.value.timeRange,"onUpdate:modelValue":a[0]||(a[0]=e=>q.value.timeRange=e),type:"datetimerange",rangeSeparator:"至"},null,8,["modelValue"])])),_:1}),v(t,{name:"user",required:!0,label:"代理人"},{default:o((()=>[v(g,{class:"w-user",modelValue:q.value.user,"onUpdate:modelValue":a[1]||(a[1]=e=>q.value.user=e),formProps:{multiple:!1,placeholder:"请选择代理人"},position:"right"},null,8,["modelValue"])])),_:1})])),_:1},8,["modelValue"]),z.value?(r(),i(y,{key:0,type:"warn",plain:"",size:"mini",onClick:U},{default:o((()=>[v(w,{type:"refreshempty",color:"#E64340",size:"13"}),_(" 取消代理人 ")])),_:1})):h("",!0),v(y,{type:"primary",size:"mini",class:"w-button",onClick:j},{default:o((()=>[_("提交")])),_:1})])),_:1})}}},[["__scopeId","data-v-5fc00c84"]]);export{q as default};

View File

@ -1 +0,0 @@
import{_ as e,r as a,p as s,az as t,aK as l,u,v as n,a as r,c as i,w as o,aL as d,aI as m,aJ as c,z as f,i as p,d as v,at as g,e as _,b as h,aM as w,aN as y,s as V,P as R,aO as b,j as k}from"./index-CIhubZBJ.js";const z=e({__name:"UserAgent",setup(e){const z=a({timeRange:[],effective:!1,user:[]}),q=a(!1),M=a();s({get:()=>z.value.user?[z.value.user]:[],set(e){z.value.user=e[0]}});const U={timeRange:{rules:[{errorMessage:"请选择代理时间段",required:!0}]},user:{rules:[{errorMessage:"请选择代理人",required:!0}]}};function j(){w({title:"提示",content:"您是否要取消该代理人设置",success:function(e){e.confirm&&y().then((e=>{V({icon:"none",title:"取消成功"}),R()}))}})}function x(){M.value.validate().then((e=>{b({timeRange:z.value.timeRange,user:z.value.user[0]}).then((e=>{V({icon:"none",title:"设置代理人成功"}),R()})).catch((e=>{V({icon:"none",title:"设置失败:"+e.msg})}))})).catch((e=>{V({icon:"none",title:"请完成设置"})}))}return t((()=>{l().then((e=>{e.data&&(z.value={...e.data,user:e.data.user?[e.data.user]:[]},q.value=!0)}))})),(e,a)=>{const s=u(n("uni-datetime-picker"),d),t=u(n("uni-forms-item"),m),l=u(n("uni-forms"),c),w=u(n("uni-icons"),f),y=k,V=p;return r(),i(V,{class:"w-user-angent"},{default:o((()=>[v(l,{ref_key:"wflowForm",ref:M,rules:U,modelValue:z.value,"label-position":"top","label-width":"200"},{default:o((()=>[v(t,{name:"timeRange",required:!0,label:"代理时间段"},{default:o((()=>[v(s,{modelValue:z.value.timeRange,"onUpdate:modelValue":a[0]||(a[0]=e=>z.value.timeRange=e),type:"datetimerange",rangeSeparator:"至"},null,8,["modelValue"])])),_:1}),v(t,{name:"user",required:!0,label:"代理人"},{default:o((()=>[v(g,{class:"w-user",modelValue:z.value.user,"onUpdate:modelValue":a[1]||(a[1]=e=>z.value.user=e),formProps:{multiple:!1,placeholder:"请选择代理人"},position:"right"},null,8,["modelValue"])])),_:1})])),_:1},8,["modelValue"]),q.value?(r(),i(y,{key:0,type:"warn",plain:"",size:"mini",onClick:j},{default:o((()=>[v(w,{type:"refreshempty",color:"#E64340",size:"13"}),_(" 取消代理人 ")])),_:1})):h("",!0),v(y,{type:"primary",size:"mini",class:"w-button",onClick:x},{default:o((()=>[_("提交")])),_:1})])),_:1})}}},[["__scopeId","data-v-5fc00c84"]]);export{z as default};

View File

@ -1 +1 @@
import{_ as a,r as e,W as s,p as t,ah as l,a7 as u,u as n,v as i,a as r,C as c,d as o,w as m,F as d,ai as f,Q as g,i as _,y as p,a4 as w,a5 as v,j as y,L as b,J as h,M as k,e as x,H as j,D as A,f as C,c as $}from"./index-CIhubZBJ.js";const z=a({__name:"my",setup(a){const z=e({}),D=JSON.parse(s("loginUser")),I=t((()=>0===(z.value.depts||[]).length?"未设置部门":z.value.depts.join("、"))),J=t((()=>{const a=z.value.userAgent;return a?`${a.user.name}${a.effective?"代理中":"代理未生效"}`:"未设置"}));function N(){f(),g({url:"/pages/login/login"})}function U(){g({url:"/pages/my/UserAgent"})}return l((()=>{u(D.userId).then((a=>{z.value=a.data})).catch((a=>{}))})),(a,e)=>{const s=_,t=n(i("uni-tag"),p),l=C,u=n(i("uni-list-item"),w),f=n(i("uni-list"),v),g=y;return r(),c(d,null,[o(s,{class:"w-user-info"},{default:m((()=>[o(b,{name:z.value.username,src:h(k)(z.value.avatar),size:70,showName:!1},null,8,["name","src"]),o(s,{class:"w-user-name"},{default:m((()=>[x(j(z.value.username),1)])),_:1}),(r(!0),c(d,null,A(z.value.roles||[],((a,e)=>(r(),$(t,{class:"w-user-role",type:"warning",size:"mini",text:a,inverted:"",key:`r${e}`},null,8,["text"])))),128))])),_:1}),o(f,{class:"w-user-items"},{default:m((()=>[o(u,{thumb:"/static/image/dept.png",clickable:""},{body:m((()=>[o(l,{class:"w-items-t"},{default:m((()=>[x("所属部门")])),_:1})])),footer:m((()=>[o(l,{class:"w-items-f"},{default:m((()=>[x(j(I.value),1)])),_:1})])),_:1}),o(u,{thumb:"/static/image/entry.png",clickable:""},{body:m((()=>[o(l,{class:"w-items-t"},{default:m((()=>[x("入职时间")])),_:1})])),footer:m((()=>[o(l,{class:"w-items-f"},{default:m((()=>[x(j(z.value.entryDate),1)])),_:1})])),_:1}),o(u,{thumb:"/static/image/agent.png",clickable:"",showArrow:"",onClick:U},{body:m((()=>[o(l,{class:"w-items-t"},{default:m((()=>[x("设置代理人")])),_:1})])),footer:m((()=>[o(l,{class:"w-items-f"},{default:m((()=>[x(j(J.value),1)])),_:1})])),_:1})])),_:1}),o(g,{class:"w-user-logout",onClick:N,plain:"true",type:"warn"},{default:m((()=>[x("退出/切换 账号")])),_:1})],64)}}},[["__scopeId","data-v-8001d8ec"]]);export{z as default};
import{_ as a,r as e,W as s,p as t,aj as l,a9 as u,u as n,v as i,a as r,C as c,d as o,w as m,F as d,ak as f,Q as g,i as _,y as p,a6 as w,a7 as v,j as y,L as b,J as h,M as k,e as j,H as x,D as A,f as C,c as $}from"./index-CwZylv7V.js";const z=a({__name:"my",setup(a){const z=e({}),D=JSON.parse(s("loginUser")),I=t((()=>0===(z.value.depts||[]).length?"未设置部门":z.value.depts.join("、"))),J=t((()=>{const a=z.value.userAgent;return a?`${a.user.name}${a.effective?"代理中":"代理未生效"}`:"未设置"}));function N(){f(),g({url:"/pages/login/login"})}function U(){g({url:"/pages/my/UserAgent"})}return l((()=>{u(D.userId).then((a=>{z.value=a.data})).catch((a=>{}))})),(a,e)=>{const s=_,t=n(i("uni-tag"),p),l=C,u=n(i("uni-list-item"),w),f=n(i("uni-list"),v),g=y;return r(),c(d,null,[o(s,{class:"w-user-info"},{default:m((()=>[o(b,{name:z.value.username,src:h(k)(z.value.avatar),size:70,showName:!1},null,8,["name","src"]),o(s,{class:"w-user-name"},{default:m((()=>[j(x(z.value.username),1)])),_:1}),(r(!0),c(d,null,A(z.value.roles||[],((a,e)=>(r(),$(t,{class:"w-user-role",type:"warning",size:"mini",text:a,inverted:"",key:`r${e}`},null,8,["text"])))),128))])),_:1}),o(f,{class:"w-user-items"},{default:m((()=>[o(u,{thumb:"/static/image/dept.png",clickable:""},{body:m((()=>[o(l,{class:"w-items-t"},{default:m((()=>[j("所属部门")])),_:1})])),footer:m((()=>[o(l,{class:"w-items-f"},{default:m((()=>[j(x(I.value),1)])),_:1})])),_:1}),o(u,{thumb:"/static/image/entry.png",clickable:""},{body:m((()=>[o(l,{class:"w-items-t"},{default:m((()=>[j("入职时间")])),_:1})])),footer:m((()=>[o(l,{class:"w-items-f"},{default:m((()=>[j(x(z.value.entryDate),1)])),_:1})])),_:1}),o(u,{thumb:"/static/image/agent.png",clickable:"",showArrow:"",onClick:U},{body:m((()=>[o(l,{class:"w-items-t"},{default:m((()=>[j("设置代理人")])),_:1})])),footer:m((()=>[o(l,{class:"w-items-f"},{default:m((()=>[j(x(J.value),1)])),_:1})])),_:1})])),_:1}),o(g,{class:"w-user-logout",onClick:N,plain:"true",type:"warn"},{default:m((()=>[j("退出/切换 账号")])),_:1})],64)}}},[["__scopeId","data-v-8001d8ec"]]);export{z as default};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
import{_ as e,p as a,r as t,q as s,R as l,T as r,U as n,V as o,t as u,u as c,v as i,J as d,a as v,c as p,w as f,b as m,W as g,G as h,x as y,i as _,y as w,A as x,d as k,C as I,D as S,F as N,B as b,E as C,X as T,e as U,H as j,K as O,L as J,M as L,Q as z,f as D,S as F,k as M,Y as P}from"./index-CIhubZBJ.js";import{_ as $}from"./uni-segmented-control.vteaoDyS.js";import{_ as A}from"./noData.BO1MxwPV.js";import{t as H}from"./task.BQDbF1Tm.js";import{g as R}from"./model.CkGfCOHy.js";import{g as q,a as B}from"./ProcessUtil.Cpq6blAo.js";const E=e({__name:"workspace",setup(e){const E=a((()=>{const e=["待我处理","已处理的","我发起的","抄送我的"];let a=JSON.parse(JSON.stringify(Z.value));return a=a.filter((a=>e.includes(a))),a[Q.value]=(a[Q.value]||"")+`-${Y.value.total||0}`,a})),G=a((()=>C().windowHeight-40)),K=t({current:0,old:0}),Q=t(0),V=t("more"),W=t({pageSize:10,pageNo:1,code:""}),X=t([[],[],[],[]]),Y=t({pages:1,size:10,total:0,records:[]});let Z=t([]),ee=t(!0);function ae(e){let a=E.value[Q.value];switch(a.indexOf("-")>=0&&(a=a.split("-")[0]),a){case"待我处理":return{text:"待处理",type:"warning"};case"已处理的":return B(e);case"我发起的":case"抄送我的":return q(e.result)}}function te(e){Q.value=e.currentIndex,W.value.pageNo=1,re(),K.value.current=K.value.old,h((()=>{K.value.current=0}))}function se(e){K.value.old=e.detail.scrollTop}function le(e){te({currentIndex:e.target.current||e.detail.current})}function re(){V.value="loading";try{(function(){let e=E.value[Q.value];switch(console.log(E.value,Q.value),e.indexOf("-")>=0&&(e=e.split("-")[0]),e){case"待我处理":return H.getUserTodoList(W.value);case"已处理的":return H.getIdoList(W.value);case"我发起的":return H.getUserSubmittedList(W.value);case"抄送我的":return H.getCcMeList(W.value)}})().then((e=>{y(),Y.value.total=e.data.total,1===W.value.pageNo&&(X.value[Q.value].length=0),X.value[Q.value].push(...e.data.records),V.value=W.value.pageNo*W.value.pageSize<Y.value.total?"more":"noMore"})).catch((e=>{y()}))}catch(e){console.log(e)}}function ne(){W.value.pageNo++,re()}return t(!1),s((e=>{l(),re(),function(){let e=JSON.parse(g("loginUser"));R({projectSn:e.sn,moduleType:7,userId:e.userId}).then((e=>{let a=e.data.result.menuList;Z.value=a.map((e=>e.name));let t=JSON.parse(JSON.stringify(Z.value));const s=["待我处理","已处理的","我发起的","抄送我的"];t=t.filter((e=>s.includes(e))),Z.value=t,X.value.length=t.length,ee.value=!1,console.log(Z.value),re()}))}()})),r("to:workspace",(e=>{te({currentIndex:e})})),n((()=>o("to:workspace"))),u((()=>{re()})),(e,a)=>{const t=c(i("uni-segmented-control"),$),s=_,l=D,r=c(i("uni-tag"),w),n=c(i("uni-load-more"),x),o=F,u=M,g=P,h=T;return d(Z).length>0?(v(),p(s,{key:0,class:"content"},{default:f((()=>[k(s,{class:"nav-type"},{default:f((()=>[k(t,{current:Q.value,values:E.value,onClickItem:te,styleType:"text",activeColor:"#4C87F3"},null,8,["current","values"])])),_:1}),k(h,{current:Q.value,duration:300,onChange:le,style:b({height:G.value+"px"})},{default:f((()=>[(v(!0),I(N,null,S(X.value,((e,a)=>(v(),p(g,{class:"datas",key:a},{default:f((()=>[e.length>0?(v(),p(o,{key:0,class:"scrool-more","refresher-threshold":0,onScrolltolower:ne,"scroll-top":K.value.current,onScroll:se,enablePullDownRefresh:"",onScrolltoupper:()=>{},"show-scrollbar":!0,style:b({height:G.value+"px"}),"scroll-y":"true","scroll-with-animation":"true"},{default:f((()=>[(v(!0),I(N,null,S(e,((e,a)=>(v(),p(s,{class:"process-item",key:e.instanceId+a,onClick:a=>function(e){z({url:`/pages/instance/instancePreview?instanceId=${e.instanceId}&nodeId=${0===Q.value?e.nodeId:null}`})}(e)},{default:f((()=>[k(s,null,{default:f((()=>[k(l,null,{default:f((()=>[U(j((e.owner||e.staterUser||{}).name)+"提交的 "+j(e.processDefName),1)])),_:2},1024),k(r,{class:"process-item-status",circle:"true",text:ae(e).text,type:ae(e).type,inverted:""},null,8,["text","type"])])),_:2},1024),k(s,{class:"form-content"},{default:f((()=>[(v(!0),I(N,null,S(e.formAbstracts||[],(e=>(v(),p(s,{key:e.id,class:"form-content-it"},{default:f((()=>[k(l,{style:{color:"#b5b5b5"}},{default:f((()=>[U(j(e.name)+": ",1)])),_:2},1024),k(l,{class:"over-tip"},{default:f((()=>[U(j(d(O)(e)),1)])),_:2},1024)])),_:2},1024)))),128))])),_:2},1024),k(s,{class:"process-item-footer"},{default:f((()=>[k(J,{name:(e.owner||e.staterUser).name,src:d(L)((e.owner||e.staterUser).avatar),size:30},null,8,["name","src"]),k(l,null,{default:f((()=>[U("在 "+j(e.createTime||e.startTime)+" 提交 ",1)])),_:2},1024)])),_:2},1024)])),_:2},1032,["onClick"])))),128)),k(n,{status:V.value,mode:"scaleToFill",showIcon:!1},null,8,["status"])])),_:2},1032,["scroll-top","style"])):(v(),p(u,{key:1,class:"nodata",src:A,mode:"widthFix"}))])),_:2},1024)))),128))])),_:1},8,["current","style"])])),_:1})):m("",!0)}}},[["__scopeId","data-v-0a4c3672"]]);export{E as default};

View File

@ -1 +1 @@
import{ay as t}from"./index-CIhubZBJ.js";function e(e,o){return t({url:`wflow/process/progress/${e}/${o}`,method:"get"})}function o(e){return t({url:"wflow/process/task/handler",method:"post",data:e})}function s(e,o){return t({url:"wflow/process/task/recall/nodes",method:"get",data:{instanceId:e,taskId:o}})}function r(e){return t({url:`wflow/process/task/settings/${e}`,method:"get"})}const a={getUserTodoList:function(e){return t({url:"wflow/process/task/todoList",method:"get",data:e})},getUserSubmittedList:function(e){return t({url:"wflow/process/mySubmitted",method:"get",data:e})},getSubmittedList:function(e){return t({url:"wflow/process/submittedList",method:"get",data:e})},getFormAndProcessProgress:e,approvalTask:o,getInstanceFormData:function(e){return t({url:`wflow/process/form/data/by/${e}`,method:"get"})},getEnableRecallNodes:s,getIdoList:function(e){return t({url:"wflow/process/task/idoList",method:"get",data:e})},getCcMeList:function(e){return t({url:"wflow/process/ccMe",method:"get",data:e})},getTaskNodeSettings:r};export{r as a,s as b,o as c,e as g,a as t};
import{aA as t}from"./index-CwZylv7V.js";function e(e,o){return t({url:`wflow/process/progress/${e}/${o}`,method:"get"})}function o(e){return t({url:"wflow/process/task/handler",method:"post",data:e})}function s(e,o){return t({url:"wflow/process/task/recall/nodes",method:"get",data:{instanceId:e,taskId:o}})}function r(e){return t({url:`wflow/process/task/settings/${e}`,method:"get"})}const a={getUserTodoList:function(e){return t({url:"wflow/process/task/todoList",method:"get",data:e})},getUserSubmittedList:function(e){return t({url:"wflow/process/mySubmitted",method:"get",data:e})},getSubmittedList:function(e){return t({url:"wflow/process/submittedList",method:"get",data:e})},getFormAndProcessProgress:e,approvalTask:o,getInstanceFormData:function(e){return t({url:`wflow/process/form/data/by/${e}`,method:"get"})},getEnableRecallNodes:s,getIdoList:function(e){return t({url:"wflow/process/task/idoList",method:"get",data:e})},getCcMeList:function(e){return t({url:"wflow/process/ccMe",method:"get",data:e})},getTaskNodeSettings:r};export{r as a,s as b,o as c,e as g,a as t};

View File

@ -1 +1 @@
import{_ as t,a as e,c as n,w as s,C as r,F as l,D as o,a0 as a,B as c,d,e as u,H as y,f as i,i as m}from"./index-CIhubZBJ.js";const x=t({name:"UniSegmentedControl",emits:["clickItem"],props:{current:{type:Number,default:0},values:{type:Array,default:()=>[]},activeColor:{type:String,default:"#2979FF"},styleType:{type:String,default:"button"}},data:()=>({currentIndex:0}),watch:{current(t){t!==this.currentIndex&&(this.currentIndex=t)}},created(){this.currentIndex=this.current},methods:{_onClick(t){this.currentIndex!==t&&(this.currentIndex=t,this.$emit("clickItem",{currentIndex:t}))}}},[["render",function(t,x,_,p,b,f){const g=i,C=m;return e(),n(C,{class:a([["text"===_.styleType?"segmented-control--text":"segmented-control--button"],"segmented-control"]),style:c({borderColor:"text"===_.styleType?"":_.activeColor})},{default:s((()=>[(e(!0),r(l,null,o(_.values,((t,r)=>(e(),n(C,{class:a([["text"===_.styleType?"":"segmented-control__item--button",r===b.currentIndex&&"button"===_.styleType?"segmented-control__item--button--active":"",0===r&&"button"===_.styleType?"segmented-control__item--button--first":"",r===_.values.length-1&&"button"===_.styleType?"segmented-control__item--button--last":""],"segmented-control__item"]),key:r,style:c({backgroundColor:r===b.currentIndex&&"button"===_.styleType?_.activeColor:"",borderColor:r===b.currentIndex&&"text"===_.styleType||"button"===_.styleType?_.activeColor:"transparent"}),onClick:t=>f._onClick(r)},{default:s((()=>[d(C,null,{default:s((()=>[d(g,{style:c({color:r===b.currentIndex?"text"===_.styleType?_.activeColor:"#fff":"text"===_.styleType?"#000":_.activeColor}),class:a(["segmented-control__text","text"===_.styleType&&r===b.currentIndex?"segmented-control__item--text":""])},{default:s((()=>[u(y(t),1)])),_:2},1032,["style","class"])])),_:2},1024)])),_:2},1032,["class","style","onClick"])))),128))])),_:1},8,["class","style"])}],["__scopeId","data-v-bda4a78b"]]);export{x as _};
import{_ as t,a as e,c as n,w as s,C as r,F as l,D as o,a2 as a,B as c,d,e as u,H as y,f as i,i as m}from"./index-CwZylv7V.js";const x=t({name:"UniSegmentedControl",emits:["clickItem"],props:{current:{type:Number,default:0},values:{type:Array,default:()=>[]},activeColor:{type:String,default:"#2979FF"},styleType:{type:String,default:"button"}},data:()=>({currentIndex:0}),watch:{current(t){t!==this.currentIndex&&(this.currentIndex=t)}},created(){this.currentIndex=this.current},methods:{_onClick(t){this.currentIndex!==t&&(this.currentIndex=t,this.$emit("clickItem",{currentIndex:t}))}}},[["render",function(t,x,_,p,b,f){const g=i,C=m;return e(),n(C,{class:a([["text"===_.styleType?"segmented-control--text":"segmented-control--button"],"segmented-control"]),style:c({borderColor:"text"===_.styleType?"":_.activeColor})},{default:s((()=>[(e(!0),r(l,null,o(_.values,((t,r)=>(e(),n(C,{class:a([["text"===_.styleType?"":"segmented-control__item--button",r===b.currentIndex&&"button"===_.styleType?"segmented-control__item--button--active":"",0===r&&"button"===_.styleType?"segmented-control__item--button--first":"",r===_.values.length-1&&"button"===_.styleType?"segmented-control__item--button--last":""],"segmented-control__item"]),key:r,style:c({backgroundColor:r===b.currentIndex&&"button"===_.styleType?_.activeColor:"",borderColor:r===b.currentIndex&&"text"===_.styleType||"button"===_.styleType?_.activeColor:"transparent"}),onClick:t=>f._onClick(r)},{default:s((()=>[d(C,null,{default:s((()=>[d(g,{style:c({color:r===b.currentIndex?"text"===_.styleType?_.activeColor:"#fff":"text"===_.styleType?"#000":_.activeColor}),class:a(["segmented-control__text","text"===_.styleType&&r===b.currentIndex?"segmented-control__item--text":""])},{default:s((()=>[u(y(t),1)])),_:2},1032,["style","class"])])),_:2},1024)])),_:2},1032,["class","style","onClick"])))),128))])),_:1},8,["class","style"])}],["__scopeId","data-v-bda4a78b"]]);export{x as _};

View File

@ -1 +0,0 @@
uni-page-body[data-v-0a4c3672]{background-color:#f4f5f7}body[data-v-0a4c3672]{background-color:#f4f5f7}.nullText[data-v-0a4c3672]{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);font-size:.875rem}.nav-type[data-v-0a4c3672]{background-color:#fff}.datas[data-v-0a4c3672]{position:relative}.datas .nodata[data-v-0a4c3672]{width:100%;height:auto;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%)}.datas .process-item[data-v-0a4c3672]{margin:1rem;border-radius:.40625rem;background-color:#fff;padding:.8125rem 1rem;position:relative}.datas .process-item .uni-tag[data-v-0a4c3672]{font-weight:400}.datas .process-item .process-item-status[data-v-0a4c3672]{position:absolute;right:1rem}.datas .process-item .form-content[data-v-0a4c3672]{font-size:.8125rem;color:#8b8b8b;margin:.5rem}.datas .process-item .form-content .form-content-it[data-v-0a4c3672]{overflow-x:hidden;display:flex;flex-wrap:wrap}.datas .process-item .form-content .form-content-it .over-tip[data-v-0a4c3672]{margin-left:5px}.datas .process-item .process-item-footer[data-v-0a4c3672]{display:flex;align-items:center;justify-content:space-between}.datas .process-item .process-item-footer>uni-text[data-v-0a4c3672]:last-child{font-size:.6875rem;color:#8b8b8b}.logo[data-v-0a4c3672]{height:6.25rem;width:6.25rem;margin-top:6.25rem;margin-left:auto;margin-right:auto;margin-bottom:1.5625rem}.text-area[data-v-0a4c3672]{display:flex;justify-content:center}.title[data-v-0a4c3672]{font-size:1.125rem;color:#8f8f94}

View File

@ -0,0 +1 @@
uni-page-body[data-v-e7bf2704]{background-color:#f4f5f7}body[data-v-e7bf2704]{background-color:#f4f5f7}.nullText[data-v-e7bf2704]{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);font-size:.875rem}.nav-type[data-v-e7bf2704]{width:100%;height:2.25rem;background-color:#fff}.nav-type[data-v-e7bf2704] .segmented-control{width:100%;display:flex;align-items:center;justify-content:space-between}.nav-type[data-v-e7bf2704] .segmented-control .segmented-control__item{width:-webkit-max-content;width:max-content;flex:none}.nav-type[data-v-e7bf2704] .segmented-control .segmented-control__item:not(:last-child){margin-right:1.5625rem}.datas[data-v-e7bf2704]{position:relative}.datas .nodata[data-v-e7bf2704]{width:100%;height:auto;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%)}.datas .process-item[data-v-e7bf2704]{margin:1rem;border-radius:.40625rem;background-color:#fff;padding:.8125rem 1rem;position:relative}.datas .process-item .uni-tag[data-v-e7bf2704]{font-weight:400}.datas .process-item .process-item-status[data-v-e7bf2704]{position:absolute;right:1rem}.datas .process-item .form-content[data-v-e7bf2704]{font-size:.8125rem;color:#8b8b8b;margin:.5rem}.datas .process-item .form-content .form-content-it[data-v-e7bf2704]{overflow-x:hidden;display:flex;flex-wrap:wrap}.datas .process-item .form-content .form-content-it .over-tip[data-v-e7bf2704]{margin-left:5px}.datas .process-item .process-item-footer[data-v-e7bf2704]{display:flex;align-items:center;justify-content:space-between}.datas .process-item .process-item-footer>uni-text[data-v-e7bf2704]:last-child{font-size:.6875rem;color:#8b8b8b}.logo[data-v-e7bf2704]{height:6.25rem;width:6.25rem;margin-top:6.25rem;margin-left:auto;margin-right:auto;margin-bottom:1.5625rem}.text-area[data-v-e7bf2704]{display:flex;justify-content:center}.title[data-v-e7bf2704]{font-size:1.125rem;color:#8f8f94}

View File

@ -14,8 +14,8 @@
<title>wflow-pro工作流</title>
<!--preload-links-->
<!--app-context-->
<script type="module" crossorigin src="/assets/index-CIhubZBJ.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-XmV5Exy6.css">
<script type="module" crossorigin src="/assets/index-CwZylv7V.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-B46nMw-9.css">
</head>
<body>
<div id="app"><!--app-html--></div>

View File

@ -81,7 +81,7 @@ if (uni.restoreGlobal) {
} else if (res.statusCode === 401)
;
else if (res.statusCode === 500) {
formatAppLog("log", "at api/request.js:66", res);
formatAppLog("log", "at api/request.js:67", res);
uni.showToast({
icon: "none",
title: "系统异常:" + res.data
@ -94,7 +94,7 @@ if (uni.restoreGlobal) {
}
},
fail: (err) => {
formatAppLog("log", "at api/request.js:80", err);
formatAppLog("log", "at api/request.js:81", err);
uni.showToast({
title: "网络异常,请检查网络",
duration: 2e3,
@ -3331,6 +3331,37 @@ if (uni.restoreGlobal) {
delete fileObj[name2];
uni.setStorageSync("localFile", fileObj);
}
function openLocalFile(name2, path) {
formatAppLog("log", "at utils/tool.js:102", path, 666);
uni.downloadFile({
url: path,
header: {
//大家在这里传自定义的token这里默认wflow的
Authorization: "Bearer " + uni.getStorageSync("wflow-token"),
TenantId: JSON.parse(uni.getStorageSync("loginUser")).sn
},
success: function(res) {
uni.showToast({
icon: "none",
title: "文件下载成功"
});
let filePath = uni.getSystemInfoSync().platform === "ios" ? res.tempFilePath : escape(res.tempFilePath);
uni.saveFile({
tempFilePath: filePath,
//临时路径
success: function(res2) {
uni.showToast({
icon: "none",
mask: true,
title: "保存在:" + res2.savedFilePath,
//保存路径
duration: 2e3
});
}
});
}
});
}
function getFormValText(obj) {
switch (obj.type) {
case "DeptPicker":
@ -4516,7 +4547,7 @@ if (uni.restoreGlobal) {
return request({
url: `wflow/process/ccMe`,
method: "get",
params
data: params
});
}
function getFormAndProcessProgress(instanceId, nodeId) {
@ -4730,8 +4761,6 @@ if (uni.restoreGlobal) {
setTimeout(() => uni.navigateBack(), 100);
}
function getDataRequest() {
formatAppLog("log", "at components/form/sub/ProcessSelect.vue:120", JSON.stringify(params.value), 987654321);
formatAppLog("log", "at components/form/sub/ProcessSelect.vue:121", current.value, 987654321);
switch (current.value) {
case 0:
return taskApi.getUserTodoList(params.value);
@ -4763,7 +4792,6 @@ if (uni.restoreGlobal) {
});
}
onLoad((v2) => {
formatAppLog("log", "at components/form/sub/ProcessSelect.vue:156", JSON.stringify(v2), 123456789);
params.value.code = v2.processCode;
getDataList();
});
@ -5008,7 +5036,7 @@ if (uni.restoreGlobal) {
autoList.value = arr;
pageData.value.length = arr.length;
loading.value = false;
formatAppLog("log", "at pages/workspace/workspace.vue:178", autoList.value);
formatAppLog("log", "at pages/workspace/workspace.vue:182", autoList.value);
getDataList();
});
}
@ -5035,7 +5063,7 @@ if (uni.restoreGlobal) {
}
function getDataRequest() {
let navs = tabs.value[current.value];
formatAppLog("log", "at pages/workspace/workspace.vue:210", tabs.value, current.value);
formatAppLog("log", "at pages/workspace/workspace.vue:214", tabs.value, current.value);
if (navs.indexOf("-") >= 0) {
navs = navs.split("-")[0];
}
@ -5055,6 +5083,7 @@ if (uni.restoreGlobal) {
try {
getDataRequest().then((rsp) => {
uni.stopPullDownRefresh();
formatAppLog("log", "at pages/workspace/workspace.vue:235", JSON.stringify(rsp.data), 888999);
datas.value.total = rsp.data.total;
if (params.value.pageNo === 1) {
pageData.value[current.value].length = 0;
@ -5065,7 +5094,7 @@ if (uni.restoreGlobal) {
uni.stopPullDownRefresh();
});
} catch (e2) {
formatAppLog("log", "at pages/workspace/workspace.vue:244", e2);
formatAppLog("log", "at pages/workspace/workspace.vue:249", e2);
}
}
function showInstance(item) {
@ -5105,13 +5134,21 @@ if (uni.restoreGlobal) {
class: "content"
}, [
vue.createElementVNode("view", { class: "nav-type" }, [
vue.createVNode(_component_uni_segmented_control, {
current: current.value,
values: tabs.value,
onClickItem: switchItem,
styleType: "text",
activeColor: "#4C87F3"
}, null, 8, ["current", "values"])
vue.createElementVNode("movable-area", { style: { "width": "100%", "height": "100%", "overflow": "hidden" } }, [
vue.createElementVNode("movable-view", {
direction: "horizontal",
style: { "min-width": "100%", "width": "100%", "height": "100%" }
}, [
vue.createVNode(_component_uni_segmented_control, {
current: current.value,
values: tabs.value,
onClickItem: switchItem,
styleType: "text",
activeColor: "#4C87F3"
}, null, 8, ["current", "values"])
])
]),
vue.createCommentVNode(' <uni-segmented-control :current="current" :values="tabs" @clickItem="switchItem" styleType="text"\r\n activeColor="#4C87F3"></uni-segmented-control> ')
]),
vue.createElementVNode("swiper", {
current: current.value,
@ -12797,6 +12834,13 @@ ${i3}
}
}
}
function openFile(i2) {
if (!props2.readonly) {
return;
}
const file = _value.value[i2];
openLocalFile(file.name, `${BASE_URL}/image/${file.id}?name=${file.name}`);
}
function getSize(size) {
if (size > 1048576) {
return (size / 1048576).toFixed(1) + "MB";
@ -12807,13 +12851,13 @@ ${i3}
}
}
function deleteFile(i2, file) {
formatAppLog("log", "at components/form/FileUpload.vue:204", i2, file);
formatAppLog("log", "at components/form/FileUpload.vue:208", i2, file);
uni.showModal({
title: "提示",
content: "您确认要删除该文件吗,删除后需要重新上传,确认删除?",
success: function(res) {
if (res.confirm) {
formatAppLog("log", "at components/form/FileUpload.vue:210", _value.value[i2]);
formatAppLog("log", "at components/form/FileUpload.vue:214", _value.value[i2]);
delFile(_value.value[i2].id).then(() => {
_value.value.splice(i2, 1);
emits2("update:modelValue", _value);
@ -12892,7 +12936,8 @@ ${i3}
vue.renderList(fileList.value, (file, i2) => {
return vue.openBlock(), vue.createElementBlock("view", {
class: "w-file",
key: `file_${i2}_${file.type}`
key: `file_${i2}_${file.type}`,
onClick: ($event) => openFile(i2)
}, [
vue.createElementVNode("image", {
src: vue.unref(getFileImgByType)(file.name),
@ -12929,7 +12974,7 @@ ${i3}
color: "#ce8d8e"
})
], 8, ["onClick"])) : vue.createCommentVNode("v-if", true)
]);
], 8, ["onClick"]);
}),
128
/* KEYED_FRAGMENT */
@ -34831,8 +34876,10 @@ ${i3}
formatAppLog("log", "at App.vue:9", arg.token);
if (arg.token) {
uni.setStorageSync("wflow-token", arg.token);
localStorage.setItem("wflow-token", arg.token);
uni.setStorageSync("loginUser", JSON.stringify(arg.loginUser));
uni.setStorageSync("projectSn", arg.loginUser.sn);
localStorage.setItem("projectSn", arg.loginUser.sn);
if (arg.page) {
uni.reLaunch({
url: arg.page
@ -34847,10 +34894,10 @@ ${i3}
};
},
onShow: function() {
formatAppLog("log", "at App.vue:29", "App Show");
formatAppLog("log", "at App.vue:31", "App Show");
},
onHide: function() {
formatAppLog("log", "at App.vue:32", "App Hide");
formatAppLog("log", "at App.vue:34", "App Hide");
}
};
const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "E:/jxjadminMobile/mobile-workflow/App.vue"]]);

View File

@ -952,8 +952,24 @@ body[data-v-245b3c15] {
font-size: 0.875rem;
}
.nav-type[data-v-245b3c15] {
width: 100%;
height: 2.25rem;
background-color: white;
}
.nav-type[data-v-245b3c15] .segmented-control {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
}
.nav-type[data-v-245b3c15] .segmented-control .segmented-control__item {
width: -webkit-max-content;
width: max-content;
flex: none;
}
.nav-type[data-v-245b3c15] .segmented-control .segmented-control__item:not(:last-child) {
margin-right: 1.5625rem;
}
.datas[data-v-245b3c15] {
position: relative;
}

View File

@ -1,8 +1,10 @@
import { BASE_URL } from '@/api/request.js'
import {
BASE_URL
} from '@/api/request.js'
//获取文件访问路径
export function getRes(url) {
if(url){
if (url) {
const reg = /^(http:|https:).*/gi
return reg.test(url) ? url : BASE_URL + '/image/' + url
} else {
@ -96,10 +98,8 @@ export function removeFileTemp(name) {
uni.setStorageSync('localFile', fileObj)
// #endif
}
//下载并打开文件
export function openLocalFile(name, path) {
console.log(path,666)
//除h5外其他端先看本地有没有没有就下载到本地再打开有就直接打开
// #ifdef H5
window.open(path)
@ -141,7 +141,7 @@ export function openLocalFile(name, path) {
title: '保存在:' + res.savedFilePath, //保存路径
duration: 2000,
});
//保存好再打开文件
// 保存好再打开文件
setTimeout(() => {
uni.openDocument({
filePath: res.savedFilePath,
@ -200,13 +200,13 @@ function isEm(val) {
}
export function isVideoLink(url) {
const videoExtensions = ['mp4', 'webm', 'ogg', 'mov', 'avi', 'flv', 'wmv'];
const extension = url.split('.').pop().toLowerCase();
return videoExtensions.includes(extension);
const videoExtensions = ['mp4', 'webm', 'ogg', 'mov', 'avi', 'flv', 'wmv'];
const extension = url.split('.').pop().toLowerCase();
return videoExtensions.includes(extension);
}
export function isImageLink(url) {
// 正则表达式匹配常见的图片文件扩展名
const imageExtensionsRegex = /\.(jpg|jpeg|png|gif|webp)$/i;
return imageExtensionsRegex.test(url);
// 正则表达式匹配常见的图片文件扩展名
const imageExtensionsRegex = /\.(jpg|jpeg|png|gif|webp)$/i;
return imageExtensionsRegex.test(url);
}