1.修改模块
This commit is contained in:
parent
40ff07d8c4
commit
8d34d11250
4
env/.env.development
vendored
4
env/.env.development
vendored
@ -4,5 +4,5 @@ NODE_ENV = 'development'
|
|||||||
VITE_DELETE_CONSOLE = false
|
VITE_DELETE_CONSOLE = false
|
||||||
# 是否开启sourcemap
|
# 是否开启sourcemap
|
||||||
VITE_SHOW_SOURCEMAP = true
|
VITE_SHOW_SOURCEMAP = true
|
||||||
VITE_SERVER_BASEURL = 'http://10.75.15.247:8080/jeecg-boot'
|
#VITE_SERVER_BASEURL = 'http://10.75.15.247:8080/jeecg-boot'
|
||||||
#VITE_SERVER_BASEURL = 'https://36.112.48.190/jeecg-boot'
|
VITE_SERVER_BASEURL = 'https://36.112.48.190/jeecg-boot'
|
@ -17,14 +17,19 @@
|
|||||||
>
|
>
|
||||||
<template #top>
|
<template #top>
|
||||||
<wd-search
|
<wd-search
|
||||||
|
style="background-color: #fff;"
|
||||||
hide-cancel
|
hide-cancel
|
||||||
:placeholder="search.placeholder"
|
:placeholder="search.placeholder"
|
||||||
v-model="search.keyword"
|
v-model="search.keyword"
|
||||||
@search="handleSearch"
|
@search="handleSearch"
|
||||||
@clear="handleClear"
|
@clear="handleClear"
|
||||||
/>
|
>
|
||||||
|
<template #prefix>
|
||||||
|
<view style="background-color: #fff;font-size: 15px;">姓名:</view>
|
||||||
|
</template>
|
||||||
|
</wd-search>
|
||||||
<!-- 添加部门选择 by 闵 -->
|
<!-- 添加部门选择 by 闵 -->
|
||||||
<view style="background-color: red;">
|
<view>
|
||||||
<SelectDept label="部门:" @change="bmChange" rowKey="orgCode" :multiple="false" v-model="dept"></SelectDept>
|
<SelectDept label="部门:" @change="bmChange" rowKey="orgCode" :multiple="false" v-model="dept"></SelectDept>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@ -215,7 +220,7 @@ const queryList = (pageNo, pageSize) => {
|
|||||||
pararms[search.field] = `*${search.keyword}*`
|
pararms[search.field] = `*${search.keyword}*`
|
||||||
}
|
}
|
||||||
if(dept.value){
|
if(dept.value){
|
||||||
pararms['orgCode'] = dept.value
|
pararms['orgCode'] = dept.value+'*'
|
||||||
}
|
}
|
||||||
http
|
http
|
||||||
.get(`${api.userlist}`, pararms)
|
.get(`${api.userlist}`, pararms)
|
||||||
@ -266,6 +271,13 @@ init()
|
|||||||
:deep(.wd-radio-group) {
|
:deep(.wd-radio-group) {
|
||||||
--wot-radio-bg: tranparent;
|
--wot-radio-bg: tranparent;
|
||||||
}
|
}
|
||||||
|
:deep(.wd-search__cover){
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
:deep(.wd-search__block){
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
.list {
|
.list {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
66
src/pages-process/components/DynamicLink.vue
Normal file
66
src/pages-process/components/DynamicLink.vue
Normal 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>
|
@ -143,7 +143,10 @@
|
|||||||
console.log(11)
|
console.log(11)
|
||||||
//办理任务,直接进入办理页面
|
//办理任务,直接进入办理页面
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:`/pages-process/taskHandle?data=${JSON.stringify(item)}`
|
url:`/pages-process/taskHandle`,
|
||||||
|
success:(res) =>{
|
||||||
|
res.eventChannel.emit('taskData',JSON.stringify(item))
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
message
|
message
|
||||||
|
@ -11,9 +11,11 @@
|
|||||||
<PageLayout nav-title="流程办理">
|
<PageLayout nav-title="流程办理">
|
||||||
<wd-tabs v-model="tab" color="#39b54a" autoLineWidth>
|
<wd-tabs v-model="tab" color="#39b54a" autoLineWidth>
|
||||||
<wd-tab title="单据">
|
<wd-tab title="单据">
|
||||||
|
<DynamicLink ref="linkRef" :path="path" :formData="formData" ></DynamicLink>
|
||||||
</wd-tab>
|
</wd-tab>
|
||||||
<wd-tab title="任务处理">
|
<wd-tab title="任务处理">
|
||||||
<view class="content">内容2</view>
|
<view class="content">内容2</view>
|
||||||
|
|
||||||
</wd-tab>
|
</wd-tab>
|
||||||
<wd-tab title="流程图">
|
<wd-tab title="流程图">
|
||||||
<view class="container">
|
<view class="container">
|
||||||
@ -72,6 +74,11 @@
|
|||||||
} from '@/utils/index'
|
} from '@/utils/index'
|
||||||
import { json } from 'stream/consumers';
|
import { json } from 'stream/consumers';
|
||||||
import qs from 'qs';
|
import qs from 'qs';
|
||||||
|
import { getCurrentInstance } from 'vue'
|
||||||
|
import DynamicLink from './components/DynamicLink.vue'
|
||||||
|
|
||||||
|
const { proxy } = getCurrentInstance()
|
||||||
|
|
||||||
|
|
||||||
const formData = ref({})
|
const formData = ref({})
|
||||||
const nodePositionInfo = ref({})
|
const nodePositionInfo = ref({})
|
||||||
@ -93,48 +100,52 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
onLoad((options) => {
|
onLoad((options) => {
|
||||||
let useData = JSON.parse(options.data);
|
const eventChannel = proxy.getOpenerEventChannel();
|
||||||
console.log(123)
|
eventChannel.on('taskData',(params)=>{
|
||||||
getProcessNodeInfo({taskId:useData.id}).then(res=>{
|
let useData = JSON.parse(params);
|
||||||
console.log(res)
|
console.log(123)
|
||||||
if(res.success){
|
getProcessNodeInfo({taskId:useData.id}).then(res=>{
|
||||||
let data = {
|
console.log(res)
|
||||||
dataId:res.result.dataId,
|
if(res.success){
|
||||||
taskId:useData.id,
|
let data = {
|
||||||
taskDefKey:useData.taskId,
|
dataId:res.result.dataId,
|
||||||
procInsId:useData.processInstanceId,
|
taskId:useData.id,
|
||||||
tableName:res.result.tableName,
|
taskDefKey:useData.taskId,
|
||||||
permissionList:res.result.permissionList,
|
procInsId:useData.processInstanceId,
|
||||||
vars:res.result.records
|
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;//流程信息
|
})
|
||||||
|
console.log(useData)
|
||||||
let tempFormUrl = res.result.formUrlMobile;
|
getNodePositionInfo({processInstanceId:useData.processInstanceId}).then((res)=>{
|
||||||
|
console.log(res)
|
||||||
path.value = tempFormUrl; //url路径
|
if (res.success) {
|
||||||
}
|
nodePositionInfo.value = res.result
|
||||||
})
|
console.log(res)
|
||||||
console.log(useData)
|
}
|
||||||
getNodePositionInfo({processInstanceId:useData.processInstanceId}).then((res)=>{
|
})
|
||||||
console.log(res)
|
|
||||||
if (res.success) {
|
getHisInfo({processInstanceId:useData.processInstanceId}).then((res)=>{
|
||||||
nodePositionInfo.value = res.result
|
console.log(res)
|
||||||
console.log(res)
|
if (res.success) {
|
||||||
}
|
console.log(res)
|
||||||
})
|
dataSource.value = res.result.records
|
||||||
|
//查找最后一个,结束时间
|
||||||
getHisInfo({processInstanceId:useData.processInstanceId}).then((res)=>{
|
completedNum.value = res.result.records.length
|
||||||
console.log(res)
|
res.result.records.forEach((item,index)=>{
|
||||||
if (res.success) {
|
if(item.endTime) completedNum.value = index+1
|
||||||
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(()=>{
|
const imgPath = computed(()=>{
|
||||||
|
18
src/pages-process/test.vue
Normal file
18
src/pages-process/test.vue
Normal 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>
|
@ -390,6 +390,10 @@
|
|||||||
"navigationStyle": "custom",
|
"navigationStyle": "custom",
|
||||||
"navigationBarTitleText": "任务处理"
|
"navigationBarTitleText": "任务处理"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "test",
|
||||||
|
"type": "page"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
3
src/types/uni-pages.d.ts
vendored
3
src/types/uni-pages.d.ts
vendored
@ -36,7 +36,8 @@ interface NavigateToOptions {
|
|||||||
"/pages-integrated/duty/index" |
|
"/pages-integrated/duty/index" |
|
||||||
"/pages-politics/health/add" |
|
"/pages-politics/health/add" |
|
||||||
"/pages-process/approvalTabbar" |
|
"/pages-process/approvalTabbar" |
|
||||||
"/pages-process/taskHandle";
|
"/pages-process/taskHandle" |
|
||||||
|
"/pages-process/test";
|
||||||
}
|
}
|
||||||
interface RedirectToOptions extends NavigateToOptions {}
|
interface RedirectToOptions extends NavigateToOptions {}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user