Commit 0e603a0e by zhaopanyu

zpy 公文流转

parent f57ca13a
NODE_ENV='production' NODE_ENV='production'
VUE_APP_MODE='production' VUE_APP_MODE='production'
VUE_APP_API_URL='/wx_api' //上线nginx所在地址(处理跨域问题) VUE_APP_API_URL=/wx_api
...@@ -518,6 +518,36 @@ const routes = [ ...@@ -518,6 +518,36 @@ const routes = [
name: "readOver", name: "readOver",
component: () => import("../views/teacher/moveMent/readOver.vue"), component: () => import("../views/teacher/moveMent/readOver.vue"),
}, },
//发起
{
path: "/Initiate",
name: "Initiate",
component: () => import("../views/teacher/moveMent/Initiate.vue"),
},
//传阅人搜索
{
path: "/search",
name: "search",
component: () => import("../views/teacher/moveMent/search.vue"),
},
//查看
{
path: "/view",
name: "view",
component: () => import("../views/teacher/moveMent/view.vue"),
},
//待办
{
path: "/backlog",
name: "backlog",
component: () => import("../views/teacher/moveMent/backlog.vue"),
},
//已办
{
path: "/done",
name: "done",
component: () => import("../views/teacher/moveMent/done.vue"),
},
//我的领用 //我的领用
{ {
path: "/myUse", path: "/myUse",
......
...@@ -1389,8 +1389,11 @@ export function getTotalDay(query) { ...@@ -1389,8 +1389,11 @@ export function getTotalDay(query) {
} }
// 查询我的任务 // 查询我的任务
//我的任务 //我的任务
export function mytaskList(userId) { export function mytaskList(userId, state) {
return axios.get("/wx/officialflow/taskList/" + userId); const params = new URLSearchParams({
state: state,
});
return axios.get(`/wx/officialflow/taskList/${userId}?${params}`);
} }
// 详情页 // 详情页
export function lookList(id) { export function lookList(id) {
...@@ -1411,15 +1414,6 @@ export function offiCialflow(query) { ...@@ -1411,15 +1414,6 @@ export function offiCialflow(query) {
}); });
} }
// 发起人操作
export function offiCialflowfq(query) {
let url = "/wx/officialflow/initiator";
return axios({
url: url,
method: "put",
data: query,
});
}
// 传阅人操作 // 传阅人操作
export function offiCialflowcy(query) { export function offiCialflowcy(query) {
let url = "/wx/officialflow/circulator/" + query.id; let url = "/wx/officialflow/circulator/" + query.id;
...@@ -1446,3 +1440,39 @@ export function getTeacherList(query) { ...@@ -1446,3 +1440,39 @@ export function getTeacherList(query) {
params: query, params: query,
}); });
} }
//
export function download(query) {
let url = "/wx/file/addRole";
return axios({
url: url,
method: "get",
params: query,
});
}
//鉴权
export function getRole(data) {
let url = "/wx/jsapi/jq";
return axios({
url: url,
method: "get",
data,
});
}
//预览
export function previewyl(data) {
let url = "/wx/officialflow/updateFile";
return axios({
url: url,
method: "put",
data,
});
}
export function subinitiatorList(query) {
let url = "/wx/officialflow/initiator/" + query.id;
return axios({
url: url,
method: "put",
data: query,
});
}
<template>
<h2>待办</h2>
<van-nav-bar title="公文流转" left-text="返回" left-arrow @click-left="goback" />
<van-pull-refresh v-model="refreshing" @refresh="onRefresh">
<van-dropdown-menu active-color="#1989fa">
<van-dropdown-item @change="change" v-model="state" :options="option1" />
</van-dropdown-menu>
<van-list v-model:loading="loading" :finished="finished" finished-text="没有更多了" @load="onLoad">
<div class="c_main_list" v-for="item in list" :key="item" style="padding: 18px 12px 15px 17px">
<div style="font-family: PingFang SC; font-weight: 700; color: #000000; font-size: 16px;">
{{ item.issuedNum }}
</div>
<div style="font-size: 12px; margin: 10px -10px 10px -10px;">
<van-cell-group inset>
<van-field v-model="item.issuedName" rows="4" autosize type="textarea" readonly placeholder="申请内容"
style="background-color: #f5f7f7; font-family: PingFang SC; color: #6f787d; font-size: 14px;" />
</van-cell-group>
</div>
<div style="display: flex; align-items: center; justify-content: flex-end; margin-top: 23px;">
<div v-if="item.receiveType == '0'" @click="goDetails(item)" class="flex_center"
style="width: 64px; height: 32px; border: 1px solid; background: #ffb134; border-radius: 3px;
font-family: PingFang SC; font-weight: 700; color: #ffffff; font-size: 14px; text-align: center; margin-left: 10px;">
发起
</div>
<div v-if="item.receiveType == '1'" @click="goDetails(item)" class="flex_center"
style="width: 64px; height: 32px; border: 1px solid; background: #ff7a6a; border-radius: 3px;
font-family: PingFang SC; font-weight: 700; color: #ffffff; font-size: 14px; text-align: center; margin-left: 10px;">
批阅
</div>
<div v-if="item.receiveType == '2'" class="flex_center" @click="goDetails(item)"
style="width: 64px; height: 32px; background: #6aadff; border-radius: 3px;
font-family: PingFang SC; font-weight: 700; color: #ffffff; font-size: 14px; text-align: center; margin-left: 10px;">
传阅
</div>
</div>
</div>
</van-list>
</van-pull-refresh>
<div class="box" style="
margin: 5px 6px 0 6px;
background-color: #ffffff;
height: 180px;
padding: 10px 10px 10px 10px;
"></div>
</template>
<script setup>
import { ref, toRefs, computed, reactive, onMounted } from "vue";
import { useRouter } from "vue-router";
import {
mytaskList,// 查询我的任务
lookList,// 详情页
offiCialflow,// 批阅人操作
offiCialflowfq,// 发起人操作
offiCialflowcy,// 传阅人操作
getSchoolLeader,//批阅人下拉框
getTeacherList//传阅人下拉框
} from "@/service/home";
import { Toast } from "vant";
import axios from "axios";
import { useStore } from "vuex";
import { formatDatetime } from "@/utils/time.js";
const option1 = [
{ text: "待办", value: 0 },
{ text: "已办", value: 1 },
];
const receiveType = ref("");
const store = useStore();
const router = useRouter();
const list = ref([]);
const loading = ref(false);
const finished = ref(false);
const refreshing = ref(false);
const pageNum = ref(0);
const state = ref("");
const change = async () => {
refreshing.value = true;
onRefresh();
};
const goDetails = (item) => {
if ((item.receiveType == 0)) {
router.push({
path: "/Initiate",
query: {
detail: encodeURIComponent(JSON.stringify(item)),
name: '发起'
},
});
}
// 批阅
else if ((item.receiveType == 1)) {
router.push({
path: "/readOver",
query: {
detail: encodeURIComponent(JSON.stringify(item)),
},
});
}
else if ((item.receiveType == 2)) {
router.push({
path: "/InitiateAction",
query: {
detail: encodeURIComponent(JSON.stringify(item)),
},
});
}
};
const onLoad = async () => {
if (refreshing.value) {
list.value = [];
pageNum.value = 0;
refreshing.value = false;
}
pageNum.value += 1;
let result = await mytaskList(store.state.userInfo.teacherId, state.value,);
console.log(result, 'result');
if (result.code == 200) {
list.value.push(...result.data);
// state.loading = false;
loading.value = false
console.log(loading, 'loading');
// console.log('list.value.length', list.value.length);
// console.log('result.total', result.total);
list.value.length === result.total && (finished.value = true);
} else {
Toast("获取信息失败!");
finished.value = true;
// state.loading = false;
loading.value = false
return;
}
};
const onRefresh = () => {
finished.value = false;
// state.loading = true;
loading.value = true
// refreshing.value = true;
onLoad();
};
onMounted(() => {
state.value = 0;
onRefresh();
});
const goback = () => {
router.back();
};
</script>
<style lang="less" scoped>
.main_search_1 {
width: 100%;
flex: 1;
height: 15vw;
display: inline-block;
vertical-align: top;
margin: 0 0 -2px 0;
}
</style>
<template>
<van-nav-bar title="公文流转" left-text="返回" left-arrow @click-left="goback" />
<van-pull-refresh v-model="refreshing" @refresh="onRefresh">
<van-dropdown-menu active-color="#1989fa">
<van-dropdown-item @change="change" v-model="state" :options="option1" />
</van-dropdown-menu>
<van-list v-model:loading="loading" :finished="finished" finished-text="没有更多了" @load="onLoad">
<div class="c_main_list" v-for="item in list" :key="item" style="padding: 18px 12px 15px 17px">
<div style="font-family: PingFang SC; font-weight: 700; color: #000000; font-size: 16px;">
{{ item.issuedNum }}
</div>
<div style="font-size: 12px; margin: 10px -10px 10px -10px;">
<van-cell-group inset>
<van-field v-model="item.issuedName" rows="4" autosize type="textarea" readonly placeholder="申请内容"
style="background-color: #f5f7f7; font-family: PingFang SC; color: #6f787d; font-size: 14px;" />
</van-cell-group>
</div>
<div style="display: flex; align-items: center; justify-content: flex-end; margin-top: 23px;">
<div class="flex_center" @click="goDetails(item)"
style="width: 64px; height: 32px; background: #6aadff; border-radius: 3px;
font-family: PingFang SC; font-weight: 700; color: #ffffff; font-size: 14px; text-align: center; margin-left: 10px;">
查看
</div>
</div>
</div>
</van-list>
</van-pull-refresh>
<div class="box" style="
margin: 5px 6px 0 6px;
background-color: #ffffff;
height: 180px;
padding: 10px 10px 10px 10px;
"></div>
</template>
<script setup>
import { ref, toRefs, computed, reactive, onMounted } from "vue";
import { useRouter } from "vue-router";
import {
mytaskList,// 查询我的任务
lookList,// 详情页
offiCialflow,// 批阅人操作
offiCialflowfq,// 发起人操作
offiCialflowcy,// 传阅人操作
getSchoolLeader,//批阅人下拉框
getTeacherList//传阅人下拉框
} from "@/service/home";
import { Toast } from "vant";
import axios from "axios";
import { useStore } from "vuex";
import { formatDatetime } from "@/utils/time.js";
const option1 = [
{ text: "待办", value: 0 },
{ text: "已办", value: 1 },
];
const receiveType = ref("");
const store = useStore();
const router = useRouter();
const list = ref([]);
const loading = ref(false);
const finished = ref(false);
const refreshing = ref(false);
const pageNum = ref(0);
const state = ref("");
const change = (value) => {
console.log(value, 'value');
if (value === 0) {
// 切换到待办页面
state.value = 0;
router.push('/moveMent');
} else if (value === 1) {
// 切换到已办页面
state.value = 1;
router.push('/done');
}
};
const goDetails = (item) => {
if ((item.receiveType == 0 || item.receiveType == 1 || item.receiveType == 2)) {
router.push({
path: "/view",
query: {
detail: encodeURIComponent(JSON.stringify(item)),
name: '查看'
},
});
}
};
const onLoad = async () => {
if (refreshing.value) {
list.value = [];
pageNum.value = 0;
refreshing.value = false;
}
pageNum.value += 1;
let result = await mytaskList(store.state.userInfo.teacherId, state.value,);
console.log(result, 'result');
if (result.code == 200) {
list.value.push(...result.data);
// state.loading = false;
loading.value = false
console.log(loading, 'loading');
// console.log('list.value.length', list.value.length);
// console.log('result.total', result.total);
list.value.length === result.total && (finished.value = true);
} else {
Toast("获取信息失败!");
finished.value = true;
// state.loading = false;
loading.value = false
return;
}
};
const onRefresh = () => {
finished.value = false;
// state.loading = true;
loading.value = true
// refreshing.value = true;
onLoad();
};
onMounted(() => {
state.value = 1;
onRefresh();
});
const goback = () => {
router.back();
};
</script>
<template> <template>
<van-nav-bar title="公文流转" left-text="返回" left-arrow @click-left="goback" /> <van-nav-bar title="公文流转" left-text="返回" left-arrow @click-left="goback" />
<van-pull-refresh v-model="refreshing" @refresh="onRefresh"> <van-pull-refresh v-model="refreshing" @refresh="onRefresh">
<van-list v-model:loading="state.loading" :finished="finished" :finished-text="loadingText" @load="onLoad"> <van-dropdown-menu active-color="#1989fa">
<van-dropdown-item @change="change" v-model="state" :options="option1" />
</van-dropdown-menu>
<van-list v-model:loading="loading" :finished="finished" finished-text="没有更多了" @load="onLoad">
<div class="c_main_list" v-for="item in list" :key="item" style="padding: 18px 12px 15px 17px"> <div class="c_main_list" v-for="item in list" :key="item" style="padding: 18px 12px 15px 17px">
<div style=" <div style="font-family: PingFang SC; font-weight: 700; color: #000000; font-size: 16px;">
font-family: PingFang SC;
font-weight: 700;
color: #000000;
font-size: 16px;
">
{{ item.issuedNum }} {{ item.issuedNum }}
</div> </div>
<div style="font-size: 12px; margin: 10px -10px 10px -10px"> <div style="font-size: 12px; margin: 10px -10px 10px -10px;">
<van-cell-group inset> <van-cell-group inset>
<van-field v-model="item.issuedName" rows="4" autosize type="textarea" readonly placeholder="申请内容" <van-field v-model="item.issuedName" rows="4" autosize type="textarea" readonly placeholder="申请内容"
style=" style="background-color: #f5f7f7; font-family: PingFang SC; color: #6f787d; font-size: 14px;" />
background-color: #f5f7f7;
font-family: PingFang SC;
color: #6f787d;
font-size: 14px;
" />
</van-cell-group> </van-cell-group>
</div> </div>
<div style=" <div style="display: flex; align-items: center; justify-content: flex-end; margin-top: 23px;">
display: flex; <div v-if="item.receiveType == '0'" @click="goDetails(item)" class="flex_center"
align-items: center; style="width: 64px; height: 32px; border: 1px solid; background: #ffb134; border-radius: 3px;
justify-content: flex-end; font-family: PingFang SC; font-weight: 700; color: #ffffff; font-size: 14px; text-align: center; margin-left: 10px;">
margin-top: 23px; 发起
"> </div>
<div v-if="item.receiveType == '1'" @click="goDetails(item)" class="flex_center" style=" <div v-if="item.receiveType == '1'" @click="goDetails(item)" class="flex_center"
width: 64px; style="width: 64px; height: 32px; border: 1px solid; background: #ff7a6a; border-radius: 3px;
height: 32px; font-family: PingFang SC; font-weight: 700; color: #ffffff; font-size: 14px; text-align: center; margin-left: 10px;">
border: 1px solid;
background: #ff7a6a;
border-radius: 3px;
font-family: PingFang SC;
font-weight: 700;
color: #ffffff;
font-size: 14px;
text-align: center;
margin-left: 10px;
">
批阅 批阅
</div> </div>
<div v-if="item.receiveType == '2'" class="flex_center" @click="goDetails(item)" style=" <div v-if="item.receiveType == '2'" class="flex_center" @click="goDetails(item)"
width: 64px; style="width: 64px; height: 32px; background: #6aadff; border-radius: 3px;
height: 32px; font-family: PingFang SC; font-weight: 700; color: #ffffff; font-size: 14px; text-align: center; margin-left: 10px;">
background: #6aadff;
border-radius: 3px;
font-family: PingFang SC;
font-weight: 700;
color: #ffffff;
font-size: 14px;
text-align: center;
margin-left: 10px;
">
传阅 传阅
</div> </div>
</div> </div>
</div> </div>
</van-list> </van-list>
</van-pull-refresh> </van-pull-refresh>
<div class="box" style=" <div class="box" style="
margin: 5px 6px 0 6px; margin: 5px 6px 0 6px;
...@@ -86,10 +62,12 @@ import { Toast } from "vant"; ...@@ -86,10 +62,12 @@ import { Toast } from "vant";
import axios from "axios"; import axios from "axios";
import { useStore } from "vuex"; import { useStore } from "vuex";
import { formatDatetime } from "@/utils/time.js"; import { formatDatetime } from "@/utils/time.js";
const state = reactive({ const option1 = [
loading: false, { text: "待办", value: 0 },
}); { text: "已办", value: 1 },
];
const state = ref(0); // 初始值为 0,即待办页面
const receiveType = ref(""); const receiveType = ref("");
const store = useStore(); const store = useStore();
const router = useRouter(); const router = useRouter();
...@@ -98,18 +76,31 @@ const loading = ref(false); ...@@ -98,18 +76,31 @@ const loading = ref(false);
const finished = ref(false); const finished = ref(false);
const refreshing = ref(false); const refreshing = ref(false);
const pageNum = ref(0); const pageNum = ref(0);
const option1 = [ const change = (value) => {
{ text: "全部", value: "" }, console.log(value, 'value');
if (value === 0) {
]; // 切换到待办页面
state.value = 0;
router.push('/moveMent');
const change = async () => { } else if (value === 1) {
refreshing.value = true; // 切换到已办页面
onRefresh(); state.value = 1;
router.push('/done');
}
}; };
const goDetails = (item) => { const goDetails = (item) => {
// 批阅 if ((item.receiveType == 0)) {
if (item.receiveType == 1) { router.push({
path: "/Initiate",
query: {
detail: encodeURIComponent(JSON.stringify(item)),
name: '发起'
},
});
}
// 批阅
else if ((item.receiveType == 1)) {
router.push({ router.push({
path: "/readOver", path: "/readOver",
query: { query: {
...@@ -117,8 +108,8 @@ const goDetails = (item) => { ...@@ -117,8 +108,8 @@ const goDetails = (item) => {
}, },
}); });
} }
// 传阅 查看
else if (item.receiveType == 2) { else if ((item.receiveType == 2)) {
router.push({ router.push({
path: "/InitiateAction", path: "/InitiateAction",
query: { query: {
...@@ -126,8 +117,19 @@ const goDetails = (item) => { ...@@ -126,8 +117,19 @@ const goDetails = (item) => {
}, },
}); });
} }
// 查看
else if ((item.receiveType == 2)) {
router.push({
path: "/view",
query: {
detail: encodeURIComponent(JSON.stringify(item)),
},
});
}
}; };
const onLoad = async () => { const onLoad = async () => {
if (refreshing.value) { if (refreshing.value) {
list.value = []; list.value = [];
...@@ -135,34 +137,44 @@ const onLoad = async () => { ...@@ -135,34 +137,44 @@ const onLoad = async () => {
refreshing.value = false; refreshing.value = false;
} }
pageNum.value += 1; pageNum.value += 1;
let result = await mytaskList(store.state.userInfo.teacherId); let result = await mytaskList(store.state.userInfo.teacherId, state.value,);
console.log(result, 'result'); console.log(result, 'result');
if (result.code == 200) { if (result.code == 200) {
list.value.push(...result.data); list.value.push(...result.data);
// state.loading = false;
loading.value = false
console.log(loading, 'loading');
// console.log('list.value.length', list.value.length);
// console.log('result.total', result.total);
list.value.length === result.total && (finished.value = true); list.value.length === result.total && (finished.value = true);
} else { } else {
Toast("获取信息失败!"); Toast("获取信息失败!");
loading.value = false; finished.value = true;
// state.loading = false;
loading.value = false
return; return;
} }
loading.value = false; // 设置loading为false,表示数据加载完成
}; };
const onRefresh = () => { const onRefresh = () => {
// 清空列表数据
finished.value = false; finished.value = false;
// 重新加载数据 // state.loading = true;
// 将 loading 设置为 true,表示处于加载状态 loading.value = true
loading.value = true; // refreshing.value = true;
onLoad(); onLoad();
}; };
const posttactleave = async () => { onMounted(() => {
let result = await postteacherLeave(); onRefresh();
}; });
// const goback = () => {
// router.back();
// };
const goback = () => { const goback = () => {
router.back(); router.push({
path: "/main",
query: {},
});
}; };
</script> </script>
......
<template>
<van-nav-bar title="传阅人信息" left-text="返回" left-arrow @click-left="goback"></van-nav-bar>
<div>
<!-- 搜索框 -->
<form action="/">
<van-search v-model="searchValue" show-action placeholder="传阅人" @search="onSearch" @cancel="onCancel" />
</form>
<!--列表 -->
<van-pull-refresh :model="refreshing" @update:modelValue="onRefresh">
<van-checkbox-group :model="selectedTeachers" @update:modelValue="selectedTeachers = $event">
<van-list :loading="loading" :finished="finished" finished-text="没有更多了" @load="onLoad">
<van-checkbox-group v-model="selectedTeachers">
<van-checkbox v-for="(item, index) in list" :key="index" :name="item.id" :label="item">
<div style="padding: 0 0.1rem;">
<div style="font-size: 0.42667rem;">
<span>{{ item.teacherName }}</span>
</div>
</div>
</van-checkbox>
</van-checkbox-group>
</van-list>
<!-- 确定按钮 -->
<van-button type="primary" style="position: fixed; bottom: 20px; right: 20px;"
v-if="selectedTeachers.length" @click="onConfirm">
确定
</van-button>
</van-checkbox-group>
</van-pull-refresh>
</div>
</template>
<script setup>
import { getClassCompleteDetail } from '@/service/laboratoryManagement'
import {
mytaskList,// 查询我的任务
lookList,// 详情页
offiCialflow,// 批阅人操作
offiCialflowfq,// 发起人操作
offiCialflowcy,// 传阅人操作
getSchoolLeader,//批阅人下拉框
getTeacherList,//传阅人下拉框
getRole,
previewyl,
subinitiatorList//发起人提交
} from "@/service/home";
import { reactive, onMounted, toRefs, ref } from "vue";
import { useStore } from "vuex";
import { useRouter, useRoute } from "vue-router";
import { formatDate } from "@/utils/time";
import { Toast } from "vant";
const store = useStore();
const router = useRouter();
const route = useRoute()
//列表数据
const list = ref([]);
const loading = ref(false);
const finished = ref(false);
const refreshing = ref(false);
const searchValue = ref('');
const selectedTeachers = ref([]);
const userIds = ref([]);
//列表加载事件
const onLoad = async () => {
if (refreshing.value) {
list.value = [];
refreshing.value = false;
}
const params = {
teacherName: searchValue.value
}
let result = await getTeacherList(params)
console.log('result', result)
if (result.code == 200) {
loading.value = false;
list.value = result.data
finished.value = true
localStorage.setItem('teacherName', JSON.stringify(result.data))
} else {
Toast("获取信息失败!");
finished.value = true;
loading.value = false;
return;
}
}
//下拉刷新
const onRefresh = () => {
//// 清空列表数据
finished.value = false;
// 重新加载数据
// 将 loading 设置为 true,表示处于加载状态
loading.value = true;
onLoad()
};
//搜索
const onSearch = (val) => {
onLoad()
};
//取消
const onCancel = () => {
onLoad()
};
//返回上一页
const goback = () => {
router.go(-1);
};
// 点击确定按钮
const onConfirm = () => {
console.log("selectedTeachers.value:", selectedTeachers.value);
if (selectedTeachers.value.length != 0) {
// userIds.value = selectedTeachers.value;
// console.log("userIds.value:", userIds.value);
router.push({
path: '/Initiate',
query: {
userIds: encodeURIComponent(JSON.stringify(selectedTeachers.value)),
name: '人员'
},
});
} // console.error("selectedTeachers.value 未定义或为 null。");
};
</script>
<style scoped>
.van-checkbox {
margin: 0.8rem 0.5rem;
}
.right {
margin-top: 10px;
margin-right: 15px;
font-size: 14px;
background: #4ea0fc;
color: #FFFFFF;
height: 25px;
line-height: 25px;
text-align: center;
width: 60px;
border-radius: 8px;
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment