1.修改模块

This commit is contained in:
lagos 2025-05-23 09:48:28 +08:00
parent 40ff07d8c4
commit 8d34d11250
8 changed files with 162 additions and 47 deletions

View File

@ -4,5 +4,5 @@ NODE_ENV = 'development'
VITE_DELETE_CONSOLE = false
# 是否开启sourcemap
VITE_SHOW_SOURCEMAP = true
VITE_SERVER_BASEURL = 'http://10.75.15.247:8080/jeecg-boot'
#VITE_SERVER_BASEURL = 'https://36.112.48.190/jeecg-boot'
#VITE_SERVER_BASEURL = 'http://10.75.15.247:8080/jeecg-boot'
VITE_SERVER_BASEURL = 'https://36.112.48.190/jeecg-boot'

View File

@ -17,14 +17,19 @@
>
<template #top>
<wd-search
style="background-color: #fff;"
hide-cancel
:placeholder="search.placeholder"
v-model="search.keyword"
@search="handleSearch"
@clear="handleClear"
/>
>
<template #prefix>
<view style="background-color: #fff;font-size: 15px;">姓名</view>
</template>
</wd-search>
<!-- 添加部门选择 by -->
<view style="background-color: red;">
<view>
<SelectDept label="部门:" @change="bmChange" rowKey="orgCode" :multiple="false" v-model="dept"></SelectDept>
</view>
</template>
@ -215,7 +220,7 @@ const queryList = (pageNo, pageSize) => {
pararms[search.field] = `*${search.keyword}*`
}
if(dept.value){
pararms['orgCode'] = dept.value
pararms['orgCode'] = dept.value+'*'
}
http
.get(`${api.userlist}`, pararms)
@ -266,6 +271,13 @@ init()
:deep(.wd-radio-group) {
--wot-radio-bg: tranparent;
}
:deep(.wd-search__cover){
background-color: #fff;
}
:deep(.wd-search__block){
background-color: #fff;
}
.list {
display: flex;
align-items: center;

View File

@ -0,0 +1,66 @@
<!-- component标签可以变换组件 -->
<template>
<component :is="compUrl" :formData="formData" :history="history" :activeKey="activeKey" v-if="compUrl" @getStampSuc="getStampSuccess"></component>
</template>
<script setup lang="ts">
import { ref, reactive, onMounted,computed, watch, nextTick } from 'vue';
const compName = ref('');
const compUrl = ref(null);
defineOptions({
name: 'DynamicLink',
options: {
styleIsolation: 'shared',
},
})
const props = defineProps({
path: {
type: String,
default: ""
},
history: {
type: String,
default: ""
},
activeKey: {
type: String,
default: ""
},
formData: {
type: Object,
default: () => {},
}
})
// option
watch(() => props.path, (newVal) => {
console.log(newVal)
// if(newVal) compName.value = newVal;
if(newVal) compName.value = 'pages-process/test';
compUrl.value = defineAsyncComponent(() => import(`@/${compName.value}.vue`));
}, {
deep: true,
// #ifdef MP-WEIXIN
immediate: true
// #endif
});
const comp = reactive({
component:compUrl.value
})
const getStampSuccess=(val)=>{
// this.$emit('getStampSuc', val)
// //<component>使vuex
// //
// this.$store.commit("cache/setEsignTags", {
// esignTag: val
// });
}
</script>
<style lang="scss" scoped>
</style>

View File

@ -143,7 +143,10 @@
console.log(11)
//
uni.navigateTo({
url:`/pages-process/taskHandle?data=${JSON.stringify(item)}`
url:`/pages-process/taskHandle`,
success:(res) =>{
res.eventChannel.emit('taskData',JSON.stringify(item))
}
})
}else{
message

View File

@ -11,9 +11,11 @@
<PageLayout nav-title="流程办理">
<wd-tabs v-model="tab" color="#39b54a" autoLineWidth>
<wd-tab title="单据">
<DynamicLink ref="linkRef" :path="path" :formData="formData" ></DynamicLink>
</wd-tab>
<wd-tab title="任务处理">
<view class="content">内容2</view>
</wd-tab>
<wd-tab title="流程图">
<view class="container">
@ -72,6 +74,11 @@
} from '@/utils/index'
import { json } from 'stream/consumers';
import qs from 'qs';
import { getCurrentInstance } from 'vue'
import DynamicLink from './components/DynamicLink.vue'
const { proxy } = getCurrentInstance()
const formData = ref({})
const nodePositionInfo = ref({})
@ -93,48 +100,52 @@
}
onLoad((options) => {
let useData = JSON.parse(options.data);
console.log(123)
getProcessNodeInfo({taskId:useData.id}).then(res=>{
console.log(res)
if(res.success){
let data = {
dataId:res.result.dataId,
taskId:useData.id,
taskDefKey:useData.taskId,
procInsId:useData.processInstanceId,
tableName:res.result.tableName,
permissionList:res.result.permissionList,
vars:res.result.records
const eventChannel = proxy.getOpenerEventChannel();
eventChannel.on('taskData',(params)=>{
let useData = JSON.parse(params);
console.log(123)
getProcessNodeInfo({taskId:useData.id}).then(res=>{
console.log(res)
if(res.success){
let data = {
dataId:res.result.dataId,
taskId:useData.id,
taskDefKey:useData.taskId,
procInsId:useData.processInstanceId,
tableName:res.result.tableName,
permissionList:res.result.permissionList,
vars:res.result.records
}
formData.value = data;//
let tempFormUrl = res.result.formUrlMobile;
path.value = tempFormUrl; //url
}
formData.value = data;//
let tempFormUrl = res.result.formUrlMobile;
path.value = tempFormUrl; //url
}
})
console.log(useData)
getNodePositionInfo({processInstanceId:useData.processInstanceId}).then((res)=>{
console.log(res)
if (res.success) {
nodePositionInfo.value = res.result
console.log(res)
}
})
getHisInfo({processInstanceId:useData.processInstanceId}).then((res)=>{
console.log(res)
if (res.success) {
console.log(res)
dataSource.value = res.result.records
//
completedNum.value = res.result.records.length
res.result.records.forEach((item,index)=>{
if(item.endTime) completedNum.value = index+1
})
}
})
console.log(useData)
getNodePositionInfo({processInstanceId:useData.processInstanceId}).then((res)=>{
console.log(res)
if (res.success) {
nodePositionInfo.value = res.result
console.log(res)
}
})
getHisInfo({processInstanceId:useData.processInstanceId}).then((res)=>{
console.log(res)
if (res.success) {
console.log(res)
dataSource.value = res.result.records
//
completedNum.value = res.result.records.length
res.result.records.forEach((item,index)=>{
if(item.endTime) completedNum.value = index+1
})
}
})
})
})
const imgPath = computed(()=>{

View File

@ -0,0 +1,18 @@
<template>
<view>
<text>test</text>
</view>
</template>
<script setup lang="ts">
defineOptions({
name: 'DynamicLink',
options: {
styleIsolation: 'shared',
},
})
</script>
<style lang="scss" scoped>
</style>

View File

@ -390,6 +390,10 @@
"navigationStyle": "custom",
"navigationBarTitleText": "任务处理"
}
},
{
"path": "test",
"type": "page"
}
]
}

View File

@ -36,7 +36,8 @@ interface NavigateToOptions {
"/pages-integrated/duty/index" |
"/pages-politics/health/add" |
"/pages-process/approvalTabbar" |
"/pages-process/taskHandle";
"/pages-process/taskHandle" |
"/pages-process/test";
}
interface RedirectToOptions extends NavigateToOptions {}