|
|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
<div class="qualityManual-container-office">
|
|
|
- <jjtOnlyOffice :option="option" />
|
|
|
+ <jjtOnlyOffice :option="option" :usersArr="usersArr" :hisArr="hisArr"/>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
@@ -11,6 +11,8 @@ import { ref, onMounted, defineEmits } from "vue";
|
|
|
import { useRouter, useRoute ,onBeforeRouteUpdate} from "vue-router";
|
|
|
import jjtOnlyOffice from "@/components/OnlyOffice/index.vue";
|
|
|
import useUserStore from "@/store/modules/user";
|
|
|
+import { users } from "@/api/biz/info";
|
|
|
+import { listVersion } from "@/api/biz/version";
|
|
|
// import ClassicEditor from '@ckeditor/ckeditor5-build-classic';
|
|
|
import {
|
|
|
listInfo,
|
|
|
@@ -52,6 +54,8 @@ export default {
|
|
|
const router = useRouter(); //注册路由
|
|
|
const route = useRoute();
|
|
|
const uid = useUserStore().uid
|
|
|
+ const usersArr = ref([])
|
|
|
+ const hisArr = ref([])
|
|
|
let option = ref({
|
|
|
key: "",
|
|
|
url: "", //在线文档地址
|
|
|
@@ -149,12 +153,40 @@ export default {
|
|
|
function edit(docId,canEdit,canCopy,history,fileId) {
|
|
|
oo(docId,canEdit,canCopy,history,fileId);
|
|
|
}
|
|
|
+ const setUsers = (docId)=>{
|
|
|
+ users(docId).then(response => {
|
|
|
+ response.data.forEach((item,index)=>{
|
|
|
+ usersArr.value.push({
|
|
|
+ email:item.deptName,
|
|
|
+ id: item.userId,
|
|
|
+ name: item.userName
|
|
|
+ })
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+ const setHis = (docId)=>{
|
|
|
+ listVersion({ pageNum: 1, pageSize: 10000, docId:docId }).then(response => {
|
|
|
+ const his=new Array();
|
|
|
+ response.rows.forEach((item,index)=>{
|
|
|
+ hisArr.value.push({
|
|
|
+ created: item.createTime,
|
|
|
+ key: item.fileId,
|
|
|
+ user: {
|
|
|
+ name: item.createBy
|
|
|
+ },
|
|
|
+ version: item.fileId
|
|
|
+ })
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
onMounted(() => {
|
|
|
let route = useRoute();
|
|
|
let canEdit = false
|
|
|
console.log('route',route.query);
|
|
|
if(route.query.clickRowId){
|
|
|
docId = route.query.clickRowId
|
|
|
+ setUsers(docId)
|
|
|
+ setHis(docId)
|
|
|
// copyRow = JSON.parse(route.query.copyRow)
|
|
|
}
|
|
|
if(route.query.fileId){
|
|
|
@@ -186,7 +218,11 @@ export default {
|
|
|
show,
|
|
|
newObj,
|
|
|
route,
|
|
|
- uid
|
|
|
+ uid,
|
|
|
+ setUsers,
|
|
|
+ setHis,
|
|
|
+ usersArr,
|
|
|
+ hisArr
|
|
|
};
|
|
|
},
|
|
|
components: {
|