Commit 0e603a0e by zhaopanyu

zpy 公文流转

parent f57ca13a
NODE_ENV='production'
VUE_APP_MODE='production'
VUE_APP_API_URL='/wx_api' //上线nginx所在地址(处理跨域问题)
VUE_APP_API_URL=/wx_api
......@@ -518,6 +518,36 @@ const routes = [
name: "readOver",
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",
......
......@@ -1389,8 +1389,11 @@ export function getTotalDay(query) {
}
// 查询我的任务
//我的任务
export function mytaskList(userId) {
return axios.get("/wx/officialflow/taskList/" + userId);
export function mytaskList(userId, state) {
const params = new URLSearchParams({
state: state,
});
return axios.get(`/wx/officialflow/taskList/${userId}?${params}`);
}
// 详情页
export function lookList(id) {
......@@ -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) {
let url = "/wx/officialflow/circulator/" + query.id;
......@@ -1446,3 +1440,39 @@ export function getTeacherList(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>
<van-nav-bar title="发起人操作" left-text="返回" left-arrow @click-left="goback" />
<!-- 接收人 -->
<div style=" margin: 0.2rem; font-family: PingFang SC;
font-weight: 700;
color: #242627;
font-size: 18px;
">
<div style="display: flex;flex-direction: row;align-items: center;justify-content: space-between;">
<div>
<span style="margin-left: 10px; height: 20px">接收人 </span>
<span style="margin-left: 10px; height: 20px;color: red;">(二者选其一)</span>
</div>
<van-button type="primary" size="mini" style="margin-top: 10px;" @click="onSubmit">确定</van-button>
</div>
<van-form>
<div style="margin-top: 10px">
<van-field v-model="state.userName" is-link readonly label="批阅人" placeholder="请选择"
@click="showPicker = true" />
<van-popup v-model:show="showPicker" round position="bottom">
<van-picker :columns="teacherNames" @cancel="showPicker = false" @confirm="onConfirm" />
</van-popup>
</div>
<div style="margin-top: 10px">
<van-field v-model="state.userIds" is-link readonly label="传阅人" placeholder="请选择" @click="goToSearch" />
</div>
</van-form>
</div>
<!-- 公文信息 -->
<div style=" margin: 0.2rem; font-family: PingFang SC;
font-weight: 700;
color: #242627;
font-size: 18px;
">
<span style="margin-left: 10px; height: 20px">公文信息</span>
<table style="border: 1px solid #e5ecf4;">
<tr style="border: 1px solid #e5ecf4;">
<td class="td-width"
style=" font-size: 15px;border: 1px solid #e5ecf4;width: 25%;background-color: #faf9f9;">发文字号</td>
<td style=" font-size: 15px;border: 1px solid #e5ecf4; " :colspan="3">{{ list && list.issuedNum ?
list.issuedNum : '' }}</td>
</tr>
<tr style="border: 1px solid #e5ecf4;">
<td class="td-width"
style=" font-size: 15px;border: 1px solid #e5ecf4;width: 25%;background-color: #faf9f9;">发文标题</td>
<td style=" font-size: 15px; border: 1px solid #e5ecf4;" :colspan="3">{{ list && list.issuedName ?
list.issuedName : '' }}</td>
</tr>
<tr style="border: 1px solid #e5ecf4;">
<td class="td-width"
style=" font-size: 15px;border: 1px solid #e5ecf4;width: 25%;background-color: #f9f9f9;background-color: #faf9f9;">
收文时间
</td>
<td style=" font-size: 15px;border: 1px solid #e5ecf4; "> {{ list && list.receiveDate ?
list.receiveDate : '' }}</td>
<td class="td-width"
style=" font-size: 15px;border: 1px solid #e5ecf4;background-color: #f9f9f9;background-color: #faf9f9; ">
办理期限</td>
<td style=" font-size: 15px;border: 1px solid #e5ecf4; ">{{ list && list.deadline ?
list.deadline : '' }}</td>
</tr>
<tr style="border: 1px solid #e5ecf4;">
<td class="td-width"
style="font-size: 15px;border: 1px solid #e5ecf4;width: 25%;background-color: #faf9f9;">紧急程度</td>
<td style=" font-size: 15px;border: 1px solid #e5ecf4;" :colspan="3">{{ urgencyText }}</td>
</tr>
<tr style="border: 1px solid #e5ecf4;">
<td class="td-spe" style=" font-size: 15px;border: 1px solid #e5ecf4;width: 25%;background-color: #faf9f9;">
简介</td>
<td style=" font-size: 15px;border: 1px solid #e5ecf4;" :colspan="3">{{ list && list.remarks ?
list.remarks : '' }}</td>
</tr>
<tr style="border: 1px solid #e5ecf4;">
<td class="td-spe" style="font-size: 15px;border: 1px solid #e5ecf4;width: 25%;background-color: #faf9f9;">
文件
</td>
<td style="font-size: 15px;border: 1px solid #e5ecf4;" :colspan="3">
<div v-if="list && list.fileList">
<div v-for="(item, index) in list.fileList " :key="index">
{{ item.fjmc }}
<van-button size="mini" type="primary" v-if="!file" @click="
downloadAttachments(index)">下载附件</van-button>
<van-button size="mini" type="success" @click="previews" v-else>预览</van-button>
</div>
</div>
</td>
</tr>
</table>
</div>
<!-- 流转信息 -->
<div style="
text-align: left;
margin: 0.2rem;
height: 20px;
font-family: PingFang SC;
font-weight: 700;
color: #242627;
font-size: 18px;
">
<span style="margin-left: 10px; height: 20px">流转信息</span>
</div>
<!-- 表格信息 -->
<div style="
/* margin-left: 0.2rem; */
text-align: center;
min-width: 3px;
height: 70px;
line-height: 70px;
background: #f5f7f7;
border: 1px solid;
border-color: #eeeeee;
display: flex;
align-items: center;
justify-content: space-around;
">
<div style="
height: 67px;
line-height: 67px;
min-width: 70px;
font-family: PingFang SC;
font-weight: 700;
color: #000000;
font-size: 15px;
border-right: 1px solid;
border-color: #eeeeee;
">
接收人
</div>
<div style="
height: 67px;
line-height: 67px;
min-width: 120px;
font-family: PingFang SC;
font-weight: 700;
color: #000000;
font-size: 15px;
border-right: 1px solid;
border-color: #eeeeee;
">
接收时间
</div>
<div style="
height: 67px;
line-height: 67px;
min-width: 120px;
font-family: PingFang SC;
font-weight: 700;
color: #000000;
font-size: 15px;
border-right: 1px solid;
border-color: #eeeeee;
">
办理时间
</div>
<div style="
height: 67px;
line-height: 67px;
min-width: 90px;
font-family: PingFang SC;
font-weight: 700;
color: #000000;
font-size: 15px;
border-right: 1px solid;
border-color: #eeeeee;
">
意见
</div>
</div>
<div v-for=" item in review " :key="item" style="
display: flex;
height: 70px;
line-height: px;
align-items: center;
justify-content: space-around;
min-width: 315px;
border: 1px solid;
border-color: #eeeeee;
">
<div style="
height: 67px;
line-height: 67px;
min-width: 70px;
font-family: PingFang SC;
text-align: center;
color: #000000;
font-size: 14px;
border-right: 1px solid;
border-color: #eeeeee;
">
{{ item.userName }}
</div>
<div style="
min-width: 120px;
font-family: PingFang SC;
color: #000000;
font-size: 14px;
text-align: center;
border-right: 1px solid;
border-color: #eeeeee;
display: flex;
align-items: center;
flex-direction: column;
">
<div style="">{{ item.receiveTime }}</div>
</div>
<div style="
height: 67px;
line-height: 67px;
min-width: 120px;
font-family: PingFang SC;
text-align: center;
color: #000000;
font-size: 14px;
border-right: 1px solid;
border-color: #eeeeee;
">
{{ item.finishTime }}
</div>
<div style="
height: 67px;
line-height: 67px;
min-width: 90px;
font-family: PingFang SC;
font-weight: 700;
color: #000000;
border-right: 1px solid;
border-color: #eeeeee;
text-align: center;
font-size: 14px;
">
{{ item.opinion }}
</div>
</div>
</template>
<script setup>
import { ref, toRefs, computed, reactive, onMounted } from "vue";
import * as dd from "dingtalk-jsapi";
import {
mytaskList,// 查询我的任务
lookList,// 详情页
offiCialflow,// 批阅人操作
offiCialflowfq,// 发起人操作
offiCialflowcy,// 传阅人操作
getSchoolLeader,//批阅人下拉框
getTeacherList,//传阅人下拉框
getRole,
previewyl,
subinitiatorList//发起人提交
} from "@/service/home";
import { useRouter, useRoute } from "vue-router";
import { createApp } from 'vue';
import { Field, CellGroup } from 'vant';
import { useStore } from "vuex";
import { Toast } from "vant";
const pyrlist = ref([]);
const result = ref('');
// const name=ref('');
const showPicker = ref(false);
const selectedTeachers = ref([]);
const onConfirm = (val) => {
console.log(val, 'val');
state.userName = val.text;
state.userId = val.value;
console.log(state.userId, 'state.userId');
showPicker.value = false;
};
const router = useRouter();
const route = useRoute();
const xzdetail = ref();
const app = createApp();
const list = ref();
const review = ref();
const jqresult = ref();
const ylresult = ref();
const store = useStore();
const fileDataObj = ref({});
const fileid = ref();
const fileList = ref([]);
const file = ref(false);
// const pyrlist = ref([]);
const cyrlist = ref([]);
const teacherNames = ref([]);
const teacherNamedg = ref([]);
const state = reactive({
userId: '',
userName: '',
userIds: [],
userNames: [],
});
const userIds = ref([]);
const userId = ref('');
const baseUrl = process.env.VUE_APP_API_URL
// 提交表单
const postForm = ref(null);
// const detail = ref({})
if (route.query.name == '发起') {
const detail = JSON.parse(decodeURIComponent(route.query.detail)); // 接收参数
localStorage.setItem('detail', JSON.stringify(detail))
}
// const state = ref({
// opinion: "", //意见
// receiveUser: "", //用户id
// });
app.use(Field);
app.use(CellGroup);
onMounted(async () => {
console.log('baseUrl', baseUrl)
})
const urgencyText = computed(() => {
switch (list.value?.urgency) {
case '0':
return '一般';
case '1':
return '紧急';
case '2':
return '特急';
default:
return '';
}
});
const initDD = () => {
const script = document.createElement('script');
script.src = 'https://g.alicdn.com/dingding/dingtalk-jsapi/3.0.27/dingtalk.open.js';
script.onload = () => {
ddConfig();
};
document.body.appendChild(script);
};
const ddConfig = async () => {
try {
let jqresult = await getRole();
console.log(jqresult, 'jqresult');
const agentId = jqresult.agentId;
const corpId = jqresult.corpId;
const timeStamp = jqresult.timeStamp;
const nonceStr = jqresult.nonceStr;
const signature = jqresult.signature;
// 使用获取到的信息配置钉钉
dd.config({
agentId: agentId,
corpId: corpId,
timeStamp: timeStamp,
nonceStr: nonceStr,
signature: signature,
jsApiList: [
'saveFileToDingTalk', 'previewFileInDingTalk'
],
});
} catch (error) {
console.error('Error:', error);
}
};
//保存到钉盘
const downloadAttachments = async (index) => {
// const url = 'http://47.105.176.202:5129/gld_api/profile/upload/2024/01/12/0112测试_20240112141435A004.doc';
const url = window.location.protocol + '//' + window.location.host + baseUrl + list.value.fileList[index].fjdz;
const fileName = list.value.fileList[index].fjmc;
// const fileName = '0112测试.doc';
console.log(url, 'url');
console.log(fileName, 'fileName');
dd.saveFileToDingTalk({
corpId: "dingaa3937ff8b7dd267f2c783f7214b6d69",
url: url, // 文件在第三方服务器地址
name: fileName,
success: async (res) => {
const fileData = res.data[0];
console.log(fileData, 'fileData');
fileDataObj.value = fileData;
console.log(fileDataObj.value, 'fileDataObj.value1');
// 把保存到钉盘返回的信息存起来
const data = {
id: list.value.fileList[index].id,
spaceId: fileDataObj.value.spaceId,
fileId: fileDataObj.value.fileId,
fileName: fileDataObj.value.fileName,
fileSize: fileDataObj.value.fileSize,
fileType: fileDataObj.value.fileType,
}
console.log('data', data);
let resultyl = await previewyl(data);
console.log(data, 'data2');
console.log(resultyl, 'resultyl');
Toast('保存成功');
file.value = true;;
},
fail: (err) => {
dd.alert({
content: JSON.stringify(err, null, 2)
});
}
});
}
//预览
const previews = async () => {
loadData();
dd.previewFileInDingTalk({
spaceId: fileDataObj.value.spaceId,
fileId: fileDataObj.value.fileId,
fileName: fileDataObj.value.fileName,
fileSize: fileDataObj.value.fileSize,
fileType: fileDataObj.value.fileType,
})
};
const pyr = async () => {
let pyrlists = await getSchoolLeader();
// console.log(pyrlists, 'pyrlists');
// pyrlist.value = pyrlists;
// teacherNames.value = pyrlist.value.map(item => item.teacherName);
teacherNames.value = pyrlists.data.map(item => {
return {
text: item.teacherName,
value: item.id
}
});
// console.log(teacherNames.value, 'teacherNames.value');
let cyrlist = await getTeacherList();
teacherNamedg.value = cyrlist.data.map(item => {
return {
text: item.teacherName,
value: item.id
}
});
console.log(cyrlist, 'cyrlist');
};
const goToSearch = () => {
router.push('/search');
};
const loadData = async () => {
console.log('localStorage.getItem', JSON.parse(localStorage.getItem('detail')));
const detail = JSON.parse(localStorage.getItem('detail'))
let result = await lookList(detail.id, {});
list.value = result.offical;
review.value = result.review;
let fileList = list.value.fileList; // 检查属性名是否正确
console.log(fileList, 'fileList');
if (route.query.name == '人员') {
const decoded = JSON.parse(decodeURIComponent(route.query.userIds))
console.log(decoded, 'decoded');
console.log('teacherName', JSON.parse(localStorage.getItem('teacherName')));
const teacherName = JSON.parse(localStorage.getItem('teacherName'))
const ids = JSON.parse(localStorage.getItem('teacherName.id'))
console.log(teacherName, 'teacherName');
console.log(ids, 'ids');
const newArr = []
teacherName.map(item => {
decoded.map(item2 => {
if (item.id == item2) {
newArr.push(item.teacherName)
}
})
})
console.log('newArr', newArr);
state.userIds = newArr.toString()
}
};
const onRefresh = () => {
finished.value = false;
loading.value = true
onLoad();
};
// console.log(loadData, 'loadData');
// const onSubmit = async (item) => {
// console.log(item);
// let result = await subinitiatorList({
// id: list.value.id,
// userId: state.userId,
// userIds: JSON.parse(decodeURIComponent(route.query.userIds))
// });
// if (result.code == 200) {
// Toast("提交成功");
// goback();
// } else {
// Toast("提交失败!");
// }
// };
const onSubmit = async (item) => {
console.log(item);
const userIds = route.query.userIds ? JSON.parse(decodeURIComponent(route.query.userIds)) : [];
const decoded = userIds.length > 0 ? userIds : [];
let params = {
id: list.value.id,
userId: userId.length === 1 ? '' : state.userId || '',
userIds: decoded.length >= 1 ? decoded : undefined
};
let result = await subinitiatorList(params);
if (result.code == 200) {
Toast("提交成功");
goback();
} else {
Toast("提交失败!");
}
};
const goback = () => {
router.push('/moveMent');
};
onMounted(async () => {
loadData();
pyr();
});
</script>
<style lang="less" scoped>
table {
border-collapse: collapse;
border: 1px solid gray;
width: 100%;
font-size: 0.28rem;
tr {
width: 100%;
.td-width {
text-align: center;
padding: 0.2225rem;
}
.td-spe {
text-align: center;
padding: 0.3525rem;
}
}
}
</style>
\ No newline at end of file
<template>
<van-nav-bar title="传阅" left-text="返回" left-arrow @click-left="goback" />
<div style="margin: 0.1rem;font-weight: 700;">
<span style="margin-left: 10px; font-size: 18px;font-family: PingFang SC;background-color: #faf9f9;">公文信息</span>
<!-- 公文信息 -->
<div style=" margin: 0.2rem; font-family: PingFang SC;
font-weight: 700;
color: #242627;
font-size: 18px;
">
<span style="margin-left: 10px; height: 20px">公文信息</span>
<table style="border: 1px solid #e5ecf4;">
<tr style="border: 1px solid #e5ecf4;">
<td class="td-width"
......@@ -30,10 +35,10 @@
</tr>
<tr style="border: 1px solid #e5ecf4;">
<td class="td-width"
style=" font-size: 15px;border: 1px solid #e5ecf4;width: 25%;background-color: #faf9f9;">紧急程度</td>
<td style=" font-size: 15px;border: 1px solid #e5ecf4;" :colspan="3">{{ list && list.urgency ?
list.urgency : '' }}</td>
style="font-size: 15px;border: 1px solid #e5ecf4;width: 25%;background-color: #faf9f9;">紧急程度</td>
<td style=" font-size: 15px;border: 1px solid #e5ecf4;" :colspan="3">{{ urgencyText }}</td>
</tr>
<tr style="border: 1px solid #e5ecf4;">
<td class="td-spe" style=" font-size: 15px;border: 1px solid #e5ecf4;width: 25%;background-color: #faf9f9;">
简介</td>
......@@ -45,7 +50,14 @@
文件
</td>
<td style="font-size: 15px;border: 1px solid #e5ecf4;" :colspan="3">
{{ list && list.fileList ? list.fileList.map(item => item.fjmc).join(', ') : '' }}
<div v-if="list && list.fileList">
<div v-for="(item, index) in list.fileList " :key="index">
{{ item.fjmc }}
<van-button size="mini" type="primary" v-if="!file" @click="
downloadAttachments(index)">下载附件</van-button>
<van-button size="mini" type="success" @click="previews" v-else>预览</van-button>
</div>
</div>
</td>
</tr>
</table>
......@@ -53,135 +65,145 @@
<!-- 流转信息 -->
<div style="
text-align: left;
margin: 0.2rem;
height: 20px;
font-family: PingFang SC;
font-weight: 700;
color: #242627;
font-size: 18px;
">
text-align: left;
margin: 0.2rem;
height: 20px;
font-family: PingFang SC;
font-weight: 700;
color: #242627;
font-size: 18px;
">
<span style="margin-left: 10px; height: 20px">流转信息</span>
</div>
<!-- 表格信息 -->
<div style="
margin-left: 0.2rem;
text-align: center;
min-width: 315px;
height: 68px;
background: #f5f7f7;
border: 1px solid;
border-color: #eeeeee;
display: flex;
align-items: center;
justify-content: space-around;
">
/* margin-left: 0.2rem; */
text-align: center;
min-width: 3px;
height: 70px;
line-height: 70px;
background: #f5f7f7;
border: 1px solid;
border-color: #eeeeee;
display: flex;
align-items: center;
justify-content: space-around;
">
<div style="
height: 67px;
line-height: 67px;
min-width: 60px;
font-family: PingFang SC;
font-weight: 700;
color: #000000;
font-size: 15px;
border-right: 1px solid;
border-color: #eeeeee;
">
height: 67px;
line-height: 67px;
min-width: 70px;
font-family: PingFang SC;
font-weight: 700;
color: #000000;
font-size: 15px;
border-right: 1px solid;
border-color: #eeeeee;
">
接收人
</div>
<div style="
height: 67px;
line-height: 67px;
min-width: 77px;
font-family: PingFang SC;
font-weight: 700;
color: #000000;
font-size: 15px;
border-right: 1px solid;
border-color: #eeeeee;
">
height: 67px;
line-height: 67px;
min-width: 120px;
font-family: PingFang SC;
font-weight: 700;
color: #000000;
font-size: 15px;
border-right: 1px solid;
border-color: #eeeeee;
">
接收时间
</div>
<div style="
height: 67px;
line-height: 67px;
min-width: 137px;
font-family: PingFang SC;
font-weight: 700;
color: #000000;
font-size: 15px;
">
height: 67px;
line-height: 67px;
min-width: 120px;
font-family: PingFang SC;
font-weight: 700;
color: #000000;
font-size: 15px;
border-right: 1px solid;
border-color: #eeeeee;
">
办理时间
</div>
<div style="
height: 67px;
line-height: 67px;
min-width: 137px;
font-family: PingFang SC;
font-weight: 700;
color: #000000;
font-size: 15px;
">
height: 67px;
line-height: 67px;
min-width: 90px;
font-family: PingFang SC;
font-weight: 700;
color: #000000;
font-size: 15px;
border-right: 1px solid;
border-color: #eeeeee;
">
意见
</div>
</div>
<div v-for="item in review" :key="item" style="
display: flex;
/* height: 70px;
line-height: 70px; */
align-items: center;
justify-content: space-around;
/* min-width: 315px; */
border: 1px solid;
border-color: #eeeeee;
">
<div v-for=" item in review " :key="item" style="
display: flex;
height: 70px;
line-height: px;
align-items: center;
justify-content: space-around;
min-width: 315px;
border: 1px solid;
border-color: #eeeeee;
">
<div style="
/* height: 67px;
line-height: 67px;
min-width: 101px; */
font-family: PingFang SC;
text-align: center;
color: #000000;
font-size: 14px;
border-right: 1px solid;
border-color: #eeeeee;
">
height: 67px;
line-height: 67px;
min-width: 70px;
font-family: PingFang SC;
text-align: center;
color: #000000;
font-size: 14px;
border-right: 1px solid;
border-color: #eeeeee;
">
{{ item.userName }}
</div>
<div style="
min-width: 77px;
font-family: PingFang SC;
color: #000000;
font-size: 14px;
text-align: center;
border-right: 1px solid;
border-color: #eeeeee;
display: flex;
align-items: center;
flex-direction: column;
">
min-width: 120px;
font-family: PingFang SC;
color: #000000;
font-size: 14px;
text-align: center;
border-right: 1px solid;
border-color: #eeeeee;
display: flex;
align-items: center;
flex-direction: column;
">
<div style="">{{ item.receiveTime }}</div>
</div>
<div style="
height: 67px;
line-height: 67px;
min-width: 137px;
font-family: PingFang SC;
text-align: center;
color: #000000;
font-size: 14px;
">
height: 67px;
line-height: 67px;
min-width: 120px;
font-family: PingFang SC;
text-align: center;
color: #000000;
font-size: 14px;
border-right: 1px solid;
border-color: #eeeeee;
">
{{ item.finishTime }}
</div>
<div style="
height: 67px;
line-height: 67px;
min-width: 137px;
font-family: PingFang SC;
color: #000000;
text-align: center;
font-size: 14px;
">
height: 67px;
line-height: 67px;
min-width: 90px;
font-family: PingFang SC;
font-weight: 700;
color: #000000;
border-right: 1px solid;
border-color: #eeeeee;
text-align: center;
font-size: 14px;
">
{{ item.opinion }}
</div>
</div>
......@@ -189,7 +211,9 @@
<script setup>
import { ref, toRefs, computed, reactive, onMounted } from "vue";
import * as dd from "dingtalk-jsapi";
import {
mytaskList,// 查询我的任务
lookList,// 详情页
......@@ -197,20 +221,31 @@ import {
offiCialflowfq,// 发起人操作
offiCialflowcy,// 传阅人操作
getSchoolLeader,//批阅人下拉框
getTeacherList//传阅人下拉框
getTeacherList,//传阅人下拉框
getRole,
previewyl
} from "@/service/home";
import { useRouter, useRoute } from "vue-router";
import { createApp } from 'vue';
import { Field, CellGroup } from 'vant';
import { useStore } from "vuex";
import { Toast } from "vant";
const router = useRouter();
const route = useRoute();
const xzdetail = ref();
const app = createApp();
const list = ref();
const review = ref();
const jqresult = ref();
const ylresult = ref();
const store = useStore();
const fileDataObj = ref({});
const fileid = ref();
const fileList = ref([]);
const file = ref(false);
const urgency = ref();
const baseUrl = process.env.VUE_APP_API_URL
// 提交表单
const postForm = ref(null);
const detail = JSON.parse(decodeURIComponent(route.query.detail)); // 接收参数
......@@ -220,31 +255,152 @@ const state = ref({
});
app.use(Field);
app.use(CellGroup);
const loadData = async () => {
let result = await lookList(detail.id, {
onMounted(async () => {
console.log('baseUrl', baseUrl)
})
// const downloadAttachments = async (index) => {
// console.log('index', index);
// const url = window.location.protocol + '//' + window.location.host + baseUrl + list.value.fileList[index].fjdz;
// console.log(url, 'url');
// dd.biz.util.openLink({
// url: 'url', // 将多个附件的URL拼接成以分号分隔的字符串
// onSuccess: function (result) { },
// onFail: function (err) { }
// });
// }
const initDD = () => {
const script = document.createElement('script');
script.src = 'https://g.alicdn.com/dingding/dingtalk-jsapi/3.0.27/dingtalk.open.js';
script.onload = () => {
ddConfig();
};
document.body.appendChild(script);
};
const ddConfig = async () => {
try {
let jqresult = await getRole();
console.log(jqresult, 'jqresult');
const agentId = jqresult.agentId;
const corpId = jqresult.corpId;
const timeStamp = jqresult.timeStamp;
const nonceStr = jqresult.nonceStr;
const signature = jqresult.signature;
// 使用获取到的信息配置钉钉
dd.config({
agentId: agentId,
corpId: corpId,
timeStamp: timeStamp,
nonceStr: nonceStr,
signature: signature,
jsApiList: [
'saveFileToDingTalk', 'previewFileInDingTalk'
],
});
} catch (error) {
console.error('Error:', error);
}
};
//保存到钉盘
const downloadAttachments = async (index) => {
// const url = 'http://47.105.176.202:5129/gld_api/profile/upload/2024/01/12/0112测试_20240112141435A004.doc';
const url = window.location.protocol + '//' + window.location.host + baseUrl + list.value.fileList[index].fjdz;
const fileName = list.value.fileList[index].fjmc;
// const fileName = '0112测试.doc';
console.log(url, 'url');
console.log(fileName, 'fileName');
dd.saveFileToDingTalk({
corpId: "dingaa3937ff8b7dd267f2c783f7214b6d69",
url: url, // 文件在第三方服务器地址
name: fileName,
success: async (res) => {
const fileData = res.data[0];
console.log(fileData, 'fileData');
fileDataObj.value = fileData;
console.log(fileDataObj.value, 'fileDataObj.value1');
// 把保存到钉盘返回的信息存起来
const data = {
id: list.value.fileList[index].id,
spaceId: fileDataObj.value.spaceId,
fileId: fileDataObj.value.fileId,
fileName: fileDataObj.value.fileName,
fileSize: fileDataObj.value.fileSize,
fileType: fileDataObj.value.fileType,
}
console.log('data', data);
let resultyl = await previewyl(data);
console.log(data, 'data2');
console.log(resultyl, 'resultyl');
Toast('保存成功');
file.value = true;;
},
fail: (err) => {
dd.alert({
content: JSON.stringify(err, null, 2)
});
}
});
}
//预览
const previews = async () => {
loadData();
dd.previewFileInDingTalk({
spaceId: fileDataObj.value.spaceId,
fileId: fileDataObj.value.fileId,
fileName: fileDataObj.value.fileName,
fileSize: fileDataObj.value.fileSize,
fileType: fileDataObj.value.fileType,
})
};
const urgencyText = computed(() => {
switch (list.value?.urgency) {
case '0':
return '一般';
case '1':
return '紧急';
case '2':
return '特急';
default:
return '';
}
});
const loadData = async () => {
let result = await lookList(detail.id, {});
list.value = result.offical;
console.log(list, 'list');
console.log(list.value.urgency, 'list.value.urgency');
console.log(list.value, 'list.value');
review.value = result.review;
console.log(review, 'review');
// list.value.urgency = list.value.urgency == '0' ? '一般' : list.value.urgency == '1' ? '紧急' : '特急';
// console.log(list.value.urgency, 'list.value.urgency');
console.log(urgencyText.value); // 输出:紧急
let fileList = list.value.fileList; // 检查属性名是否正确
console.log(fileList, 'list.value.fileList');
};
console.log(loadData, 'loadData');
onMounted(() => {
initDD();
});
const goback = async () => {
try {
const query = {
id: detail.id,
userId: store.state.userInfo.teacherId,
}; // 创建一个空的 query 对象
await offiCialflowcy(query); // 调用 offiCialflowcy 接口,并传递 query 对象
router.back();
} catch (error) {
const query = {
id: detail.id,
userId: store.state.userInfo.teacherId
};
await offiCialflowcy(query);
router.back();
}
}
};
onMounted(async () => {
loadData();
});
</script>
<style lang="less" scoped>
......
<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>
<van-nav-bar title="公文流转" left-text="返回" left-arrow @click-left="goback" />
<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 style="
font-family: PingFang SC;
font-weight: 700;
color: #000000;
font-size: 16px;
">
<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">
<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;
" />
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 == '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 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 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;
......@@ -86,10 +62,12 @@ import { Toast } from "vant";
import axios from "axios";
import { useStore } from "vuex";
import { formatDatetime } from "@/utils/time.js";
const state = reactive({
loading: false,
});
const option1 = [
{ text: "待办", value: 0 },
{ text: "已办", value: 1 },
];
const state = ref(0); // 初始值为 0,即待办页面
const receiveType = ref("");
const store = useStore();
const router = useRouter();
......@@ -98,18 +76,31 @@ const loading = ref(false);
const finished = ref(false);
const refreshing = ref(false);
const pageNum = ref(0);
const option1 = [
{ text: "全部", value: "" },
];
const change = (value) => {
console.log(value, 'value');
if (value === 0) {
// 切换到待办页面
state.value = 0;
router.push('/moveMent');
const change = async () => {
refreshing.value = true;
onRefresh();
} else if (value === 1) {
// 切换到已办页面
state.value = 1;
router.push('/done');
}
};
const goDetails = (item) => {
// 批阅
if (item.receiveType == 1) {
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: {
......@@ -117,8 +108,8 @@ const goDetails = (item) => {
},
});
}
// 传阅 查看
else if (item.receiveType == 2) {
else if ((item.receiveType == 2)) {
router.push({
path: "/InitiateAction",
query: {
......@@ -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 () => {
if (refreshing.value) {
list.value = [];
......@@ -135,34 +137,44 @@ const onLoad = async () => {
refreshing.value = false;
}
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');
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("获取信息失败!");
loading.value = false;
finished.value = true;
// state.loading = false;
loading.value = false
return;
}
loading.value = false; // 设置loading为false,表示数据加载完成
};
const onRefresh = () => {
// 清空列表数据
finished.value = false;
// 重新加载数据
// 将 loading 设置为 true,表示处于加载状态
loading.value = true;
// state.loading = true;
loading.value = true
// refreshing.value = true;
onLoad();
};
const posttactleave = async () => {
let result = await postteacherLeave();
};
onMounted(() => {
onRefresh();
});
// const goback = () => {
// router.back();
// };
const goback = () => {
router.back();
router.push({
path: "/main",
query: {},
});
};
</script>
......
......@@ -11,13 +11,17 @@
placeholder="请输入内容" />
</van-form>
</van-col>
<van-col span="4">
<van-button type="primary" @click="onSubmit" style="height: 0.8rem; border-radius: 8px;">确定</van-button>
</van-col>
</van-row>
<div style="margin: 0.1rem;font-weight: 700;">
<span style="margin-left: 10px; font-size: 18px;font-family: PingFang SC;background-color: #faf9f9;">公文信息</span>
<!-- 公文信息 -->
<div style=" margin: 0.2rem; font-family: PingFang SC;
font-weight: 700;
color: #242627;
font-size: 18px;
">
<span style="margin-left: 10px; height: 20px">公文信息</span>
<table style="border: 1px solid #e5ecf4;">
<tr style="border: 1px solid #e5ecf4;">
<td class="td-width"
......@@ -46,10 +50,10 @@
</tr>
<tr style="border: 1px solid #e5ecf4;">
<td class="td-width"
style=" font-size: 15px;border: 1px solid #e5ecf4;width: 25%;background-color: #faf9f9;">紧急程度</td>
<td style=" font-size: 15px;border: 1px solid #e5ecf4;" :colspan="3">{{ list && list.urgency ?
list.urgency : '' }}</td>
style="font-size: 15px;border: 1px solid #e5ecf4;width: 25%;background-color: #faf9f9;">紧急程度</td>
<td style=" font-size: 15px;border: 1px solid #e5ecf4;" :colspan="3">{{ urgencyText }}</td>
</tr>
<tr style="border: 1px solid #e5ecf4;">
<td class="td-spe" style=" font-size: 15px;border: 1px solid #e5ecf4;width: 25%;background-color: #faf9f9;">
简介</td>
......@@ -61,143 +65,161 @@
文件
</td>
<td style="font-size: 15px;border: 1px solid #e5ecf4;" :colspan="3">
{{ list && list.fileList ? list.fileList.map(item => item.fjmc).join(', ') : '' }}
<div v-if="list && list.fileList">
<div v-for="(item, index) in list.fileList " :key="index">
{{ item.fjmc }}
<van-button size="mini" type="primary" v-if="!file" @click="
downloadAttachments(index)">下载附件</van-button>
<van-button size="mini" type="success" @click="previews" v-else>预览</van-button>
</div>
</div>
</td>
</tr>
</table>
</div>
<!-- 流转信息 -->
<div style="
text-align: left;
margin: 0.2rem;
height: 20px;
font-family: PingFang SC;
font-weight: 700;
color: #242627;
font-size: 18px;
">
text-align: left;
margin: 0.2rem;
height: 20px;
font-family: PingFang SC;
font-weight: 700;
color: #242627;
font-size: 18px;
">
<span style="margin-left: 10px; height: 20px">流转信息</span>
</div>
<!-- 表格信息 -->
<div style="
margin-left: 0.2rem;
text-align: center;
min-width: 315px;
height: 68px;
background: #f5f7f7;
border: 1px solid;
border-color: #eeeeee;
display: flex;
align-items: center;
justify-content: space-around;
">
/* margin-left: 0.2rem; */
text-align: center;
min-width: 3px;
height: 70px;
line-height: 70px;
background: #f5f7f7;
border: 1px solid;
border-color: #eeeeee;
display: flex;
align-items: center;
justify-content: space-around;
">
<div style="
height: 67px;
line-height: 67px;
min-width: 60px;
font-family: PingFang SC;
font-weight: 700;
color: #000000;
font-size: 15px;
border-right: 1px solid;
border-color: #eeeeee;
">
height: 67px;
line-height: 67px;
min-width: 70px;
font-family: PingFang SC;
font-weight: 700;
color: #000000;
font-size: 15px;
border-right: 1px solid;
border-color: #eeeeee;
">
接收人
</div>
<div style="
height: 67px;
line-height: 67px;
min-width: 77px;
font-family: PingFang SC;
font-weight: 700;
color: #000000;
font-size: 15px;
border-right: 1px solid;
border-color: #eeeeee;
">
height: 67px;
line-height: 67px;
min-width: 120px;
font-family: PingFang SC;
font-weight: 700;
color: #000000;
font-size: 15px;
border-right: 1px solid;
border-color: #eeeeee;
">
接收时间
</div>
<div style="
height: 67px;
line-height: 67px;
min-width: 137px;
font-family: PingFang SC;
font-weight: 700;
color: #000000;
font-size: 15px;
">
height: 67px;
line-height: 67px;
min-width: 120px;
font-family: PingFang SC;
font-weight: 700;
color: #000000;
font-size: 15px;
border-right: 1px solid;
border-color: #eeeeee;
">
办理时间
</div>
<div style="
height: 67px;
line-height: 67px;
min-width: 137px;
font-family: PingFang SC;
font-weight: 700;
color: #000000;
font-size: 15px;
">
height: 67px;
line-height: 67px;
min-width: 90px;
font-family: PingFang SC;
font-weight: 700;
color: #000000;
font-size: 15px;
border-right: 1px solid;
border-color: #eeeeee;
">
意见
</div>
</div>
<div v-for="item in review" :key="item" style="
display: flex;
/* height: 70px;
line-height: 70px; */
align-items: center;
justify-content: space-around;
/* min-width: 315px; */
border: 1px solid;
border-color: #eeeeee;
">
<div v-for=" item in review " :key="item" style="
display: flex;
height: 70px;
line-height: px;
align-items: center;
justify-content: space-around;
min-width: 315px;
border: 1px solid;
border-color: #eeeeee;
">
<div style="
/* height: 67px;
line-height: 67px;
min-width: 101px; */
font-family: PingFang SC;
text-align: center;
color: #000000;
font-size: 14px;
border-right: 1px solid;
border-color: #eeeeee;
">
height: 67px;
line-height: 67px;
min-width: 70px;
font-family: PingFang SC;
text-align: center;
color: #000000;
font-size: 14px;
border-right: 1px solid;
border-color: #eeeeee;
">
{{ item.userName }}
</div>
<div style="
min-width: 77px;
font-family: PingFang SC;
color: #000000;
font-size: 14px;
text-align: center;
border-right: 1px solid;
border-color: #eeeeee;
display: flex;
align-items: center;
flex-direction: column;
">
min-width: 120px;
font-family: PingFang SC;
color: #000000;
font-size: 14px;
text-align: center;
border-right: 1px solid;
border-color: #eeeeee;
display: flex;
align-items: center;
flex-direction: column;
">
<div style="">{{ item.receiveTime }}</div>
</div>
<div style="
height: 67px;
line-height: 67px;
min-width: 137px;
font-family: PingFang SC;
text-align: center;
color: #000000;
font-size: 14px;
">
height: 67px;
line-height: 67px;
min-width: 120px;
font-family: PingFang SC;
text-align: center;
color: #000000;
font-size: 14px;
border-right: 1px solid;
border-color: #eeeeee;
">
{{ item.finishTime }}
</div>
<div style="
height: 67px;
line-height: 67px;
min-width: 137px;
font-family: PingFang SC;
color: #000000;
text-align: center;
font-size: 14px;
">
height: 67px;
line-height: 67px;
min-width: 90px;
font-family: PingFang SC;
font-weight: 700;
color: #000000;
border-right: 1px solid;
border-color: #eeeeee;
text-align: center;
font-size: 14px;
">
{{ item.opinion }}
</div>
</div>
......@@ -205,7 +227,9 @@
<script setup>
import { ref, toRefs, computed, reactive, onMounted } from "vue";
import * as dd from "dingtalk-jsapi";
import {
mytaskList,// 查询我的任务
lookList,// 详情页
......@@ -213,56 +237,188 @@ import {
offiCialflowfq,// 发起人操作
offiCialflowcy,// 传阅人操作
getSchoolLeader,//批阅人下拉框
getTeacherList//传阅人下拉框
getTeacherList,//传阅人下拉框
getRole,
previewyl
} from "@/service/home";
import { useRouter, useRoute } from "vue-router";
import { createApp } from 'vue';
import { Field, CellGroup } from 'vant';
import { useStore } from "vuex";
import { Toast } from "vant";
const router = useRouter();
const route = useRoute();
const xzdetail = ref();
const app = createApp();
const list = ref();
const review = ref();
const jqresult = ref();
const ylresult = ref();
const store = useStore();
const fileDataObj = ref({});
const fileid = ref();
const fileList = ref([]);
const file = ref(false);
const urgency = ref();
const baseUrl = process.env.VUE_APP_API_URL
// 提交表单
const postForm = ref(null);
const detail = JSON.parse(decodeURIComponent(route.query.detail)); // 接收参数
console.log(detail, 'detail');
const state = ref({
opinion: "", //意见
receiveUser: "", //用户id
});
app.use(Field);
app.use(CellGroup);
const loadData = async () => {
let result = await lookList(detail.id, {
onMounted(async () => {
console.log('baseUrl', baseUrl)
})
// const downloadAttachments = async (index) => {
// console.log('index', index);
// const url = window.location.protocol + '//' + window.location.host + baseUrl + list.value.fileList[index].fjdz;
// console.log(url, 'url');
// dd.biz.util.openLink({
// url: 'url', // 将多个附件的URL拼接成以分号分隔的字符串
// onSuccess: function (result) { },
// onFail: function (err) { }
// });
// }
const initDD = () => {
const script = document.createElement('script');
script.src = 'https://g.alicdn.com/dingding/dingtalk-jsapi/3.0.27/dingtalk.open.js';
script.onload = () => {
ddConfig();
};
document.body.appendChild(script);
};
const ddConfig = async () => {
try {
let jqresult = await getRole();
console.log(jqresult, 'jqresult');
const agentId = jqresult.agentId;
const corpId = jqresult.corpId;
const timeStamp = jqresult.timeStamp;
const nonceStr = jqresult.nonceStr;
const signature = jqresult.signature;
// 使用获取到的信息配置钉钉
dd.config({
agentId: agentId,
corpId: corpId,
timeStamp: timeStamp,
nonceStr: nonceStr,
signature: signature,
jsApiList: [
'saveFileToDingTalk', 'previewFileInDingTalk'
],
});
} catch (error) {
console.error('Error:', error);
}
};
//保存到钉盘
const downloadAttachments = async (index) => {
// const url = 'http://47.105.176.202:5129/gld_api/profile/upload/2024/01/12/0112测试_20240112141435A004.doc';
const url = window.location.protocol + '//' + window.location.host + baseUrl + list.value.fileList[index].fjdz;
const fileName = list.value.fileList[index].fjmc;
// const fileName = '0112测试.doc';
console.log(url, 'url');
console.log(fileName, 'fileName');
dd.saveFileToDingTalk({
corpId: "dingaa3937ff8b7dd267f2c783f7214b6d69",
url: url, // 文件在第三方服务器地址
name: fileName,
success: async (res) => {
const fileData = res.data[0];
console.log(fileData, 'fileData');
fileDataObj.value = fileData;
console.log(fileDataObj.value, 'fileDataObj.value1');
// 把保存到钉盘返回的信息存起来
const data = {
id: list.value.fileList[index].id,
spaceId: fileDataObj.value.spaceId,
fileId: fileDataObj.value.fileId,
fileName: fileDataObj.value.fileName,
fileSize: fileDataObj.value.fileSize,
fileType: fileDataObj.value.fileType,
}
console.log('data', data);
let resultyl = await previewyl(data);
console.log(data, 'data2');
console.log(resultyl, 'resultyl');
Toast('保存成功');
file.value = true;;
},
fail: (err) => {
dd.alert({
content: JSON.stringify(err, null, 2)
});
}
});
}
//预览
const previews = async () => {
loadData();
dd.previewFileInDingTalk({
spaceId: fileDataObj.value.spaceId,
fileId: fileDataObj.value.fileId,
fileName: fileDataObj.value.fileName,
fileSize: fileDataObj.value.fileSize,
fileType: fileDataObj.value.fileType,
})
};
const urgencyText = computed(() => {
switch (list.value?.urgency) {
case '0':
return '一般';
case '1':
return '紧急';
case '2':
return '特急';
default:
return '';
}
});
const loadData = async () => {
let result = await lookList(detail.id, {});
list.value = result.offical;
console.log(list, 'list');
console.log(list.value.urgency, 'list.value.urgency');
console.log(list.value, 'list.value');
review.value = result.review;
console.log(review, 'review');
// list.value.urgency = list.value.urgency == '0' ? '一般' : list.value.urgency == '1' ? '紧急' : '特急';
// console.log(list.value.urgency, 'list.value.urgency');
console.log(urgencyText.value); // 输出:紧急
let fileList = list.value.fileList; // 检查属性名是否正确
console.log(fileList, 'list.value.fileList');
// if (fileList) { // 确保 fileList 不为 undefined
// for (let i = 0; i < fileList.length; i++) {
// let file_id = fileList[i].id;
// let spaceId = fileList[i].spaceId;
// let fileId = fileList[i].fileId;
// let fileName = fileList[i].fileName;
// let fileSize = fileList[i].fileSize;
// let fileType = fileList[i].fileType;
// console.log(file_id, 'file_id2');
// console.log(spaceId, 'spaceId');
// console.log(fileId, 'fileId');
// console.log(fileName, 'fileName');
// console.log(fileSize, 'fileSize');
// console.log(fileType, 'fileType');
// }
// }
};
// const onSubmit = () => {
// let data = {};
// data.userId = store.state.userInfo.teacherId;
// data.opinion = state.opinion.value;
// console.log("state.opinion:", state.opinion);
// console.log("store.state.userInfo.teacherId:", store.state.userInfo.teacherId);
// postForm.validate().then((valid) => {
// loading.value = true;
// offiCialflow(data).then((response) => {
// loading.value = false;
// Toast.success("提交成功");
// goLeave();
// }).catch((error) => {
// loading.value = false;
// Toast.fail("提交失败");
// });
// }).catch((message) => { });
// };
console.log(loadData, 'loadData');
onMounted(() => {
initDD();
});
const onSubmit = async (item) => {
console.log(item);
let result = await offiCialflow({
......@@ -278,21 +434,14 @@ const onSubmit = async (item) => {
Toast("提交失败!");
}
};
const onRefresh = () => {
// 清空列表数据
finished.value = false;
// 重新加载数据
// 将 loading 设置为 true,表示处于加载状态
loading.value = true;
onLoad();
};
console.log(loadData, 'loadData');
const goback = () => {
const goback = async () => {
router.back();
};
}
onMounted(async () => {
loadData();
});
</script>
<style lang="less" scoped>
......
<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>
<template>
<van-nav-bar title="查看" left-text="返回" left-arrow @click-left="goback" />
<!-- 公文信息 -->
<div style=" margin: 0.2rem; font-family: PingFang SC;
font-weight: 700;
color: #242627;
font-size: 18px;
">
<span style="margin-left: 10px; height: 20px">公文信息</span>
<table style="border: 1px solid #e5ecf4;">
<tr style="border: 1px solid #e5ecf4;">
<td class="td-width"
style=" font-size: 15px;border: 1px solid #e5ecf4;width: 25%;background-color: #faf9f9;">发文字号</td>
<td style=" font-size: 15px;border: 1px solid #e5ecf4; " :colspan="3">{{ list && list.issuedNum ?
list.issuedNum : '' }}</td>
</tr>
<tr style="border: 1px solid #e5ecf4;">
<td class="td-width"
style=" font-size: 15px;border: 1px solid #e5ecf4;width: 25%;background-color: #faf9f9;">发文标题</td>
<td style=" font-size: 15px; border: 1px solid #e5ecf4;" :colspan="3">{{ list && list.issuedName ?
list.issuedName : '' }}</td>
</tr>
<tr style="border: 1px solid #e5ecf4;">
<td class="td-width"
style=" font-size: 15px;border: 1px solid #e5ecf4;width: 25%;background-color: #f9f9f9;background-color: #faf9f9;">
收文时间
</td>
<td style=" font-size: 15px;border: 1px solid #e5ecf4; "> {{ list && list.receiveDate ?
list.receiveDate : '' }}</td>
<td class="td-width"
style=" font-size: 15px;border: 1px solid #e5ecf4;background-color: #f9f9f9;background-color: #faf9f9; ">
办理期限</td>
<td style=" font-size: 15px;border: 1px solid #e5ecf4; ">{{ list && list.deadline ?
list.deadline : '' }}</td>
</tr>
<tr style="border: 1px solid #e5ecf4;">
<td class="td-width"
style="font-size: 15px;border: 1px solid #e5ecf4;width: 25%;background-color: #faf9f9;">紧急程度</td>
<td style=" font-size: 15px;border: 1px solid #e5ecf4;" :colspan="3">{{ urgencyText }}</td>
</tr>
<tr style="border: 1px solid #e5ecf4;">
<td class="td-spe" style=" font-size: 15px;border: 1px solid #e5ecf4;width: 25%;background-color: #faf9f9;">
简介</td>
<td style=" font-size: 15px;border: 1px solid #e5ecf4;" :colspan="3">{{ list && list.remarks ?
list.remarks : '' }}</td>
</tr>
<tr style="border: 1px solid #e5ecf4;">
<td class="td-spe" style="font-size: 15px;border: 1px solid #e5ecf4;width: 25%;background-color: #faf9f9;">
文件
</td>
<td style="font-size: 15px;border: 1px solid #e5ecf4;" :colspan="3">
<div v-if="list && list.fileList">
<div v-for="(item, index) in list.fileList " :key="index">
{{ item.fjmc }}
<van-button size="mini" type="primary" v-if="!file" @click="
downloadAttachments(index)">下载附件</van-button>
<van-button size="mini" type="success" @click="previews" v-else>预览</van-button>
</div>
</div>
</td>
</tr>
</table>
</div>
<!-- 流转信息 -->
<div style="
text-align: left;
margin: 0.2rem;
height: 20px;
font-family: PingFang SC;
font-weight: 700;
color: #242627;
font-size: 18px;
">
<span style="margin-left: 10px; height: 20px">流转信息</span>
</div>
<!-- 表格信息 -->
<div style="
/* margin-left: 0.2rem; */
text-align: center;
min-width: 3px;
height: 70px;
line-height: 70px;
background: #f5f7f7;
border: 1px solid;
border-color: #eeeeee;
display: flex;
align-items: center;
justify-content: space-around;
">
<div style="
height: 67px;
line-height: 67px;
min-width: 70px;
font-family: PingFang SC;
font-weight: 700;
color: #000000;
font-size: 15px;
border-right: 1px solid;
border-color: #eeeeee;
">
接收人
</div>
<div style="
height: 67px;
line-height: 67px;
min-width: 120px;
font-family: PingFang SC;
font-weight: 700;
color: #000000;
font-size: 15px;
border-right: 1px solid;
border-color: #eeeeee;
">
接收时间
</div>
<div style="
height: 67px;
line-height: 67px;
min-width: 120px;
font-family: PingFang SC;
font-weight: 700;
color: #000000;
font-size: 15px;
border-right: 1px solid;
border-color: #eeeeee;
">
办理时间
</div>
<div style="
height: 67px;
line-height: 67px;
min-width: 90px;
font-family: PingFang SC;
font-weight: 700;
color: #000000;
font-size: 15px;
border-right: 1px solid;
border-color: #eeeeee;
">
意见
</div>
</div>
<div v-for=" item in review " :key="item" style="
display: flex;
height: 70px;
line-height: px;
align-items: center;
justify-content: space-around;
min-width: 315px;
border: 1px solid;
border-color: #eeeeee;
">
<div style="
height: 67px;
line-height: 67px;
min-width: 70px;
font-family: PingFang SC;
text-align: center;
color: #000000;
font-size: 14px;
border-right: 1px solid;
border-color: #eeeeee;
">
{{ item.userName }}
</div>
<div style="
min-width: 120px;
font-family: PingFang SC;
color: #000000;
font-size: 14px;
text-align: center;
border-right: 1px solid;
border-color: #eeeeee;
display: flex;
align-items: center;
flex-direction: column;
">
<div style="">{{ item.receiveTime }}</div>
</div>
<div style="
height: 67px;
line-height: 67px;
min-width: 120px;
font-family: PingFang SC;
text-align: center;
color: #000000;
font-size: 14px;
border-right: 1px solid;
border-color: #eeeeee;
">
{{ item.finishTime }}
</div>
<div style="
height: 67px;
line-height: 67px;
min-width: 90px;
font-family: PingFang SC;
font-weight: 700;
color: #000000;
border-right: 1px solid;
border-color: #eeeeee;
text-align: center;
font-size: 14px;
">
{{ item.opinion }}
</div>
</div>
</template>
<script setup>
import { ref, toRefs, computed, reactive, onMounted } from "vue";
import * as dd from "dingtalk-jsapi";
import {
mytaskList,// 查询我的任务
lookList,// 详情页
offiCialflow,// 批阅人操作
offiCialflowfq,// 发起人操作
offiCialflowcy,// 传阅人操作
getSchoolLeader,//批阅人下拉框
getTeacherList,//传阅人下拉框
getRole,
previewyl
} from "@/service/home";
import { useRouter, useRoute } from "vue-router";
import { createApp } from 'vue';
import { Field, CellGroup } from 'vant';
import { useStore } from "vuex";
import { Toast } from "vant";
const router = useRouter();
const route = useRoute();
const xzdetail = ref();
const app = createApp();
const list = ref();
const review = ref();
const jqresult = ref();
const ylresult = ref();
const store = useStore();
const fileDataObj = ref({});
const fileid = ref();
const fileList = ref([]);
const file = ref(false);
const urgency = ref();
const baseUrl = process.env.VUE_APP_API_URL
// 提交表单
const postForm = ref(null);
const detail = JSON.parse(decodeURIComponent(route.query.detail)); // 接收参数
const state = ref({
opinion: "", //意见
receiveUser: "", //用户id
});
app.use(Field);
app.use(CellGroup);
onMounted(async () => {
console.log('baseUrl', baseUrl)
})
// const downloadAttachments = async (index) => {
// console.log('index', index);
// const url = window.location.protocol + '//' + window.location.host + baseUrl + list.value.fileList[index].fjdz;
// console.log(url, 'url');
// dd.biz.util.openLink({
// url: 'url', // 将多个附件的URL拼接成以分号分隔的字符串
// onSuccess: function (result) { },
// onFail: function (err) { }
// });
// }
const initDD = () => {
const script = document.createElement('script');
script.src = 'https://g.alicdn.com/dingding/dingtalk-jsapi/3.0.27/dingtalk.open.js';
script.onload = () => {
ddConfig();
};
document.body.appendChild(script);
};
const ddConfig = async () => {
try {
let jqresult = await getRole();
console.log(jqresult, 'jqresult');
const agentId = jqresult.agentId;
const corpId = jqresult.corpId;
const timeStamp = jqresult.timeStamp;
const nonceStr = jqresult.nonceStr;
const signature = jqresult.signature;
// 使用获取到的信息配置钉钉
dd.config({
agentId: agentId,
corpId: corpId,
timeStamp: timeStamp,
nonceStr: nonceStr,
signature: signature,
jsApiList: [
'saveFileToDingTalk', 'previewFileInDingTalk'
],
});
} catch (error) {
console.error('Error:', error);
}
};
//保存到钉盘
const downloadAttachments = async (index) => {
// const url = 'http://47.105.176.202:5129/gld_api/profile/upload/2024/01/12/0112测试_20240112141435A004.doc';
const url = window.location.protocol + '//' + window.location.host + baseUrl + list.value.fileList[index].fjdz;
const fileName = list.value.fileList[index].fjmc;
// const fileName = '0112测试.doc';
console.log(url, 'url');
console.log(fileName, 'fileName');
dd.saveFileToDingTalk({
corpId: "dingaa3937ff8b7dd267f2c783f7214b6d69",
url: url, // 文件在第三方服务器地址
name: fileName,
success: async (res) => {
const fileData = res.data[0];
console.log(fileData, 'fileData');
fileDataObj.value = fileData;
console.log(fileDataObj.value, 'fileDataObj.value1');
// 把保存到钉盘返回的信息存起来
const data = {
id: list.value.fileList[index].id,
spaceId: fileDataObj.value.spaceId,
fileId: fileDataObj.value.fileId,
fileName: fileDataObj.value.fileName,
fileSize: fileDataObj.value.fileSize,
fileType: fileDataObj.value.fileType,
}
console.log('data', data);
let resultyl = await previewyl(data);
console.log(data, 'data2');
console.log(resultyl, 'resultyl');
Toast('保存成功');
file.value = true;;
},
fail: (err) => {
dd.alert({
content: JSON.stringify(err, null, 2)
});
}
});
}
//预览
const previews = async () => {
loadData();
dd.previewFileInDingTalk({
spaceId: fileDataObj.value.spaceId,
fileId: fileDataObj.value.fileId,
fileName: fileDataObj.value.fileName,
fileSize: fileDataObj.value.fileSize,
fileType: fileDataObj.value.fileType,
})
};
const urgencyText = computed(() => {
switch (list.value?.urgency) {
case '0':
return '一般';
case '1':
return '紧急';
case '2':
return '特急';
default:
return '';
}
});
const loadData = async () => {
let result = await lookList(detail.id, {});
list.value = result.offical;
console.log(list.value.urgency, 'list.value.urgency');
console.log(list.value, 'list.value');
review.value = result.review;
// list.value.urgency = list.value.urgency == '0' ? '一般' : list.value.urgency == '1' ? '紧急' : '特急';
// console.log(list.value.urgency, 'list.value.urgency');
console.log(urgencyText.value); // 输出:紧急
let fileList = list.value.fileList; // 检查属性名是否正确
console.log(fileList, 'list.value.fileList');
// if (fileList) { // 确保 fileList 不为 undefined
// for (let i = 0; i < fileList.length; i++) {
// let file_id = fileList[i].id;
// let spaceId = fileList[i].spaceId;
// let fileId = fileList[i].fileId;
// let fileName = fileList[i].fileName;
// let fileSize = fileList[i].fileSize;
// let fileType = fileList[i].fileType;
// console.log(file_id, 'file_id2');
// console.log(spaceId, 'spaceId');
// console.log(fileId, 'fileId');
// console.log(fileName, 'fileName');
// console.log(fileSize, 'fileSize');
// console.log(fileType, 'fileType');
// }
// }
};
console.log(loadData, 'loadData');
onMounted(() => {
initDD();
});
const goback = async () => {
router.back();
}
onMounted(async () => {
loadData();
});
</script>
<style lang="less" scoped>
table {
border-collapse: collapse;
border: 1px solid gray;
width: 100%;
font-size: 0.28rem;
tr {
width: 100%;
.td-width {
text-align: center;
padding: 0.2225rem;
}
.td-spe {
text-align: center;
padding: 0.3525rem;
}
}
}
</style>
\ No newline at end of file
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