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
|
||||
# 是否开启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'
|
@ -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;
|
||||
|
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)
|
||||
//办理任务,直接进入办理页面
|
||||
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
|
||||
|
@ -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;//流程信息
|
||||
})
|
||||
console.log(useData)
|
||||
getNodePositionInfo({processInstanceId:useData.processInstanceId}).then((res)=>{
|
||||
console.log(res)
|
||||
if (res.success) {
|
||||
nodePositionInfo.value = res.result
|
||||
console.log(res)
|
||||
}
|
||||
})
|
||||
|
||||
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
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
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(()=>{
|
||||
|
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",
|
||||
"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-politics/health/add" |
|
||||
"/pages-process/approvalTabbar" |
|
||||
"/pages-process/taskHandle";
|
||||
"/pages-process/taskHandle" |
|
||||
"/pages-process/test";
|
||||
}
|
||||
interface RedirectToOptions extends NavigateToOptions {}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user