|
@@ -1,17 +1,19 @@
|
|
<template>
|
|
<template>
|
|
<div>
|
|
<div>
|
|
- <el-button>新建</el-button>
|
|
|
|
- <fromList :list="firstTable" />
|
|
|
|
- </div>
|
|
|
|
|
|
+ <el-button>新建</el-button>
|
|
|
|
+ <fromList :list="firstTable" @clickDemand="clickDemand" />
|
|
|
|
+ <div>
|
|
|
|
+ <!-- <myUpload @uploadBack="uploadBack" :fileInfo="fileInfo" :fileList="fileInfo.fileList">
|
|
|
|
+ </myUpload> -->
|
|
|
|
+ <el-dialog :modal="false" title="提示" :visible.sync="officeStatus" style="height:100% ;" width="100%" height="100%" center>
|
|
|
|
+ <div id="DocEditor" v-if="officeStatus">
|
|
|
|
+ <onlyoffice-editor editorId="DocEditor" :src="src" :config="config" @ready="onReady" />
|
|
|
|
+ </div>
|
|
|
|
+ </el-dialog>
|
|
|
|
|
|
- <!-- <div>
|
|
|
|
- <myUpload @uploadBack="uploadBack" :fileInfo="fileInfo" :fileList="fileInfo.fileList">
|
|
|
|
- </myUpload>
|
|
|
|
- <div id="DocEditor">
|
|
|
|
- <onlyoffice-editor editorId="DocEditor" :src="src" :config="config" @ready="onReady" />
|
|
|
|
- </div>
|
|
|
|
|
|
|
|
- </div> -->
|
|
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
@@ -29,44 +31,31 @@ export default {
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
- src: 'http://192.168.2.221:7778/web-apps/apps/api/documents/api.js',
|
|
|
|
- config: {
|
|
|
|
- documentType: 'cell',
|
|
|
|
- document: {
|
|
|
|
- fileType: "xlsx",
|
|
|
|
- key: "e07e63993f3aaa920cbed74d8fc15794",
|
|
|
|
- title: "后评估模板.xlsx",
|
|
|
|
- url: "http://192.168.2.124:7779/api/file/download?id=e07e63993f3aaa920cbed74d8fc15794"
|
|
|
|
- },
|
|
|
|
- editorConfig: {
|
|
|
|
- user: {
|
|
|
|
- id: "78e1e841",
|
|
|
|
- name: "范岩"
|
|
|
|
- },
|
|
|
|
- callbackUrl: "http://192.168.2.124:7779/api/online/callback?type=callback&fileName=安装mysql-udf-http.docx&userIdfanyan&userName=范岩"
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
|
|
+ officeStatus: false,
|
|
|
|
+ src: '',
|
|
|
|
+ config: {},
|
|
fileInfo: {
|
|
fileInfo: {
|
|
limit: 10,
|
|
limit: 10,
|
|
url: '/aps/api/file/upload',
|
|
url: '/aps/api/file/upload',
|
|
fileList: []
|
|
fileList: []
|
|
},
|
|
},
|
|
firstTable: {
|
|
firstTable: {
|
|
|
|
+ height: '400',
|
|
name: "first",
|
|
name: "first",
|
|
titledata: [
|
|
titledata: [
|
|
{
|
|
{
|
|
label: "名称",
|
|
label: "名称",
|
|
- prop: "proposerTime",
|
|
|
|
|
|
+ prop: "fileName",
|
|
width: 400,
|
|
width: 400,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- label: "所有者",
|
|
|
|
- prop: "predealman",
|
|
|
|
|
|
+ label: "文件Id",
|
|
|
|
+ prop: "id",
|
|
width: 400,
|
|
width: 400,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- label: "最近查看",
|
|
|
|
- prop: "taskName",
|
|
|
|
|
|
+ label: "未确定字段",
|
|
|
|
+ prop: "fileSize",
|
|
width: 400,
|
|
width: 400,
|
|
},
|
|
},
|
|
], //表格头
|
|
], //表格头
|
|
@@ -77,7 +66,7 @@ export default {
|
|
pageSize: 10, // 每页数量
|
|
pageSize: 10, // 每页数量
|
|
pageNum: 1, // 页码
|
|
pageNum: 1, // 页码
|
|
},
|
|
},
|
|
- isSelection: true, // 表格有多选时设置
|
|
|
|
|
|
+ isSelection: false, // 表格有多选时设置
|
|
isOperation: false, // 表格有操作列时设置
|
|
isOperation: false, // 表格有操作列时设置
|
|
isIndex: false, // 列表序号
|
|
isIndex: false, // 列表序号
|
|
operation: {
|
|
operation: {
|
|
@@ -97,37 +86,63 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
- this.getList()
|
|
|
|
|
|
+ // this.getListEdit()
|
|
this.getLists()
|
|
this.getLists()
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- getList() {
|
|
|
|
|
|
+ //点击工单状态跳转需求流程显示页面
|
|
|
|
+ clickDemand(e, res) {
|
|
|
|
+ if (e == '名称') {
|
|
|
|
+ this.getListEdit(res)
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ getListEdit(e) {
|
|
this.$http({
|
|
this.$http({
|
|
- url: "/aps/api/restfile/edit",
|
|
|
|
|
|
+ url: "/office/restfile/edit",
|
|
method: "post",
|
|
method: "post",
|
|
|
|
+ type:'office',
|
|
headers: {
|
|
headers: {
|
|
"Content-Type": "application/json",
|
|
"Content-Type": "application/json",
|
|
},
|
|
},
|
|
data: {
|
|
data: {
|
|
- id: '647f6c6cff4d05f18d1fbcc89769d5fb',
|
|
|
|
|
|
+ id: e.id,
|
|
edit: true,
|
|
edit: true,
|
|
- userId: 'fanyan',
|
|
|
|
- userName: '范岩'
|
|
|
|
|
|
+ userId: JSON.parse(window.sessionStorage.userInfo).loginNo,
|
|
|
|
+ userName: JSON.parse(window.sessionStorage.userInfo).loginName
|
|
},
|
|
},
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
- console.log(res);
|
|
|
|
- let url = 'http://192.168.2.124:7779/api/online/callback?type=callback&fileName=%E5%AE%89%E8%A3%85mysql-udf-http.docx&userIdfanyan&userName=%E8%8C%83%E5%B2%A9'
|
|
|
|
- let urls = decodeURIComponent(url)
|
|
|
|
- // console.log(123);
|
|
|
|
- console.log(urls);
|
|
|
|
- // this.config.document.url = urls;
|
|
|
|
|
|
+ // console.log('[ res ] >', res)
|
|
|
|
+ let { docType, fileType, id, fileName, downloadUrl, userId, userName, configCallback, api } = res.data.body
|
|
|
|
+ this.src = api;
|
|
|
|
+ let config = {
|
|
|
|
+ documentType: docType,
|
|
|
|
+ height:'100%',
|
|
|
|
+ width:'100%',
|
|
|
|
+ document: {
|
|
|
|
+ fileType: fileType,
|
|
|
|
+ key: id,
|
|
|
|
+ title: fileName,
|
|
|
|
+ url: downloadUrl
|
|
|
|
+ },
|
|
|
|
+ editorConfig: {
|
|
|
|
+ user: {
|
|
|
|
+ id: userId,
|
|
|
|
+ name: userName
|
|
|
|
+ },
|
|
|
|
+ callbackUrl: decodeURIComponent(configCallback)
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ this.config = config;
|
|
|
|
+ this.officeStatus = true;
|
|
|
|
|
|
});
|
|
});
|
|
},
|
|
},
|
|
getLists() {
|
|
getLists() {
|
|
this.$http({
|
|
this.$http({
|
|
- url: "/aps/api/restfile/list",
|
|
|
|
|
|
+ url: "/office/restfile/list",
|
|
method: "post",
|
|
method: "post",
|
|
|
|
+ type:'office',
|
|
headers: {
|
|
headers: {
|
|
"Content-Type": "application/json",
|
|
"Content-Type": "application/json",
|
|
},
|
|
},
|
|
@@ -135,7 +150,7 @@ export default {
|
|
|
|
|
|
},
|
|
},
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
- console.log(res);
|
|
|
|
|
|
+ this.firstTable.data = res.data.body;
|
|
|
|
|
|
});
|
|
});
|
|
},
|
|
},
|
|
@@ -149,4 +164,15 @@ export default {
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
|
|
|
|
-<style lang="scss" scoped></style>
|
|
|
|
|
|
+<style lang="scss" scoped>
|
|
|
|
+::v-deep .el-dialog--center{
|
|
|
|
+ height: 100%;
|
|
|
|
+ margin-top: 10px !important;
|
|
|
|
+}
|
|
|
|
+::v-deep .el-dialog__body{
|
|
|
|
+ height: 100%;
|
|
|
|
+}
|
|
|
|
+#DocEditor{
|
|
|
|
+ height: 100%;
|
|
|
|
+}
|
|
|
|
+</style>
|