wxd 1 yıl önce
ebeveyn
işleme
7223dc23a8

+ 9 - 4
index.html

@@ -1,3 +1,5 @@
+<!-- @format -->
+
 <!DOCTYPE html>
 <html>
   <head>
@@ -212,10 +214,13 @@
         <div class="load_title">正在加载系统资源,请耐心等待</div>
       </div>
     </div>
-    <script
-      type="text/javascript"
-      src="./static/webOffice/WebOffice.js"
-    ></script>
+    <script>
+      this.globalThis || (this.globalThis = this);
+    </script>
+    <script type="module">
+      import "core-js/features/array/flat-map";
+      import "core-js/features/array/flat";
+    </script>
     <script type="module" src="/src/main.js"></script>
   </body>
 </html>

+ 4 - 1
package.json

@@ -19,10 +19,12 @@
     "@vueup/vue-quill": "^1.0.0-beta.11",
     "@vueuse/core": "9.5.0",
     "axios": "0.27.2",
-    "echarts": "5.4.0",
+    "core-js": "^3.32.2",
+    "echarts": "^5.4.0",
     "element-plus": "2.2.27",
     "file-saver": "2.0.5",
     "fuse.js": "6.6.2",
+    "jquery": "^3.7.1",
     "js-cookie": "3.0.1",
     "jsencrypt": "3.3.1",
     "nprogress": "0.2.0",
@@ -36,6 +38,7 @@
     "wangeditor": "^4.7.15"
   },
   "devDependencies": {
+    "@vitejs/plugin-legacy": "^4.1.1",
     "@vitejs/plugin-vue": "3.1.0",
     "@vue/compiler-sfc": "^3.2.45",
     "sass": "1.56.1",

+ 7 - 5
src/App.vue

@@ -1,15 +1,17 @@
+<!-- @format -->
+
 <template>
   <router-view />
 </template>
 
 <script setup>
-import useSettingsStore from '@/store/modules/settings'
-import { handleThemeStyle } from '@/utils/theme'
+import useSettingsStore from "@/store/modules/settings";
+import { handleThemeStyle } from "@/utils/theme";
 
 onMounted(() => {
   nextTick(() => {
     // 初始化主题样式
-    handleThemeStyle(useSettingsStore().theme)
-  })
-})
+    handleThemeStyle(useSettingsStore().theme);
+  });
+});
 </script>

+ 7 - 0
src/api/office/index.js

@@ -0,0 +1,7 @@
+/** @format */
+
+import request from "@/utils/request";
+
+export function appOffice(params) {
+  return request({ ...params });
+}

+ 11 - 0
src/api/office/received.js

@@ -0,0 +1,11 @@
+/** @format */
+
+import request from "@/utils/request";
+
+export function saveReceived(data) {
+  return request({
+    url: "/jflow/startReceive",
+    method: "post",
+    data,
+  });
+}

+ 15 - 13
src/directive/common/copyText.js

@@ -1,7 +1,9 @@
 /**
-* v-copyText 复制文本内容
-* Copyright (c) 2022 ruoyi
-*/
+ * v-copyText 复制文本内容
+ * Copyright (c) 2022 ruoyi
+ *
+ * @format
+ */
 
 export default {
   beforeMount(el, { value, arg }) {
@@ -18,22 +20,22 @@ export default {
       el.addEventListener("click", handler);
       el.$destroyCopy = () => el.removeEventListener("click", handler);
     }
-  }
-}
+  },
+};
 
 function copyTextToClipboard(input, { target = document.body } = {}) {
-  const element = document.createElement('textarea');
+  const element = document.createElement("textarea");
   const previouslyFocusedElement = document.activeElement;
 
   element.value = input;
 
   // Prevent keyboard from showing on mobile
-  element.setAttribute('readonly', '');
+  element.setAttribute("readonly", "");
 
-  element.style.contain = 'strict';
-  element.style.position = 'absolute';
-  element.style.left = '-9999px';
-  element.style.fontSize = '12pt'; // Prevent zooming on iOS
+  element.style.contain = "strict";
+  element.style.position = "absolute";
+  element.style.left = "-9999px";
+  element.style.fontSize = "12pt"; // Prevent zooming on iOS
 
   const selection = document.getSelection();
   const originalRange = selection.rangeCount > 0 && selection.getRangeAt(0);
@@ -47,8 +49,8 @@ function copyTextToClipboard(input, { target = document.body } = {}) {
 
   let isSuccess = false;
   try {
-    isSuccess = document.execCommand('copy');
-  } catch { }
+    isSuccess = document.execCommand("copy");
+  } catch (e) {}
 
   element.remove();
 

+ 4 - 0
src/main.js

@@ -1,3 +1,5 @@
+/** @format */
+
 import { createApp } from "vue";
 import { QuillEditor } from "@vueup/vue-quill";
 import "@vueup/vue-quill/dist/vue-quill.snow.css";
@@ -51,6 +53,8 @@ import TreeSelect from "@/components/TreeSelect";
 // 字典标签组件
 import DictTag from "@/components/DictTag";
 
+// main.js
+
 const app = createApp(App);
 app.component("QuillEditor", QuillEditor);
 // 全局方法挂载

+ 52 - 40
src/permission.js

@@ -1,63 +1,75 @@
-import router from './router'
-import { ElMessage } from 'element-plus'
-import NProgress from 'nprogress'
-import 'nprogress/nprogress.css'
-import { getToken } from '@/utils/auth'
-import { isHttp } from '@/utils/validate'
-import { isRelogin } from '@/utils/request'
-import useUserStore from '@/store/modules/user'
-import useSettingsStore from '@/store/modules/settings'
-import usePermissionStore from '@/store/modules/permission'
+/** @format */
+
+import router from "./router";
+import { ElMessage } from "element-plus";
+import NProgress from "nprogress";
+import "nprogress/nprogress.css";
+import { getToken } from "@/utils/auth";
+import { isHttp } from "@/utils/validate";
+import { isRelogin } from "@/utils/request";
+import useUserStore from "@/store/modules/user";
+import useSettingsStore from "@/store/modules/settings";
+import usePermissionStore from "@/store/modules/permission";
 
 NProgress.configure({ showSpinner: false });
 
-const whiteList = ['/login', '/register'];
+const whiteList = ["/login", "/register"];
 
 router.beforeEach((to, from, next) => {
-  NProgress.start()
+  NProgress.start();
+  if (to.path == "/iWebOfficeConsle") {
+    next();
+  }
   if (getToken()) {
-    to.meta.title && useSettingsStore().setTitle(to.meta.title)
+    to.meta.title && useSettingsStore().setTitle(to.meta.title);
     /* has token*/
-    if (to.path === '/login') {
-      next({ path: '/' })
-      NProgress.done()
+    if (to.path === "/login") {
+      next({ path: "/" });
+      NProgress.done();
     } else {
       if (useUserStore().roles.length === 0) {
-        isRelogin.show = true
+        isRelogin.show = true;
         // 判断当前用户是否已拉取完user_info信息
-        useUserStore().getInfo().then(() => {
-          isRelogin.show = false
-          usePermissionStore().generateRoutes().then(accessRoutes => {
-            // 根据roles权限生成可访问的路由表
-            accessRoutes.forEach(route => {
-              if (!isHttp(route.path)) {
-                router.addRoute(route) // 动态添加可访问路由表
-              }
-            })
-            next({ ...to, replace: true }) // hack方法 确保addRoutes已完成
-          })
-        }).catch(err => {
-          useUserStore().logOut().then(() => {
-            ElMessage.error(err)
-            next({ path: '/' })
+        useUserStore()
+          .getInfo()
+          .then(() => {
+            isRelogin.show = false;
+            usePermissionStore()
+              .generateRoutes()
+              .then((accessRoutes) => {
+                // 根据roles权限生成可访问的路由表
+                accessRoutes.forEach((route) => {
+                  if (!isHttp(route.path)) {
+                    router.addRoute(route); // 动态添加可访问路由表
+                  }
+                });
+                next({ ...to, replace: true }); // hack方法 确保addRoutes已完成
+              });
           })
-        })
+          .catch((err) => {
+            useUserStore()
+              .logOut()
+              .then(() => {
+                ElMessage.error(err);
+                next({ path: "/" });
+              });
+          });
       } else {
-        next()
+        next();
       }
     }
   } else {
     // 没有token
     if (whiteList.indexOf(to.path) !== -1) {
       // 在免登录白名单,直接进入
-      next()
+      next();
     } else {
-      next(`/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页
-      NProgress.done()
+      next(`/login?redirect=${to.fullPath}`); // 否则全部重定向到登录页
+      NProgress.done();
     }
   }
-})
+});
 
 router.afterEach(() => {
-  NProgress.done()
-})
+  NProgress.done();
+});

Dosya farkı çok büyük olduğundan ihmal edildi
+ 199 - 0
src/plugins/iWebOffice2015.js


+ 545 - 0
src/plugins/my.js

@@ -0,0 +1,545 @@
+/** @format */
+
+var WebOffice;
+var obj;
+
+/* 初始化对象 */
+export function setObj(object) {
+  obj = object;
+  WebOffice = obj.FuncExtModule;
+}
+
+//作用:退出iWebOffice
+function UnLoad() {
+  //WebOffice.Alert("关闭进程");
+  try {
+    var ret = WebOffice.WebClose();
+  } catch (e) {
+    //alert(e.description);
+  }
+}
+
+export function GetUrlbasePath() {
+  //获取当前网址,如: http://localhost:8080/ems/Pages/Basic/Person.jsp
+  var curWwwPath = window.document.location.href;
+  //获取主机地址之后的目录,如: /ems/Pages/Basic/Person.jsp
+  var pathName = window.document.location.pathname;
+  var pos = curWwwPath.indexOf(pathName);
+  //获取主机地址,如: http://localhost:8080
+  var localhostPath = curWwwPath.substring(0, pos);
+  //获取带"/"的项目名,如:/ems
+  var projectName = pathName.substring(0, pathName.substr(1).indexOf("/") + 1);
+  //获取项目的basePath   http://localhost:8080/ems/
+  var basePath = localhostPath + projectName + "/";
+  console.log("basePath" + basePath);
+  return basePath;
+}
+
+//打开在线文档
+export function WebOpenFile() {
+  var urlPath = GetUrlbasePath() + "/Document/sample.doc";
+  console.log("urlPath:" + urlPath);
+  var szTempPath = obj.FileSystem.GetTempPath();
+  console.log("szTempPath:" + szTempPath);
+  var szFileName = szTempPath + "sample.doc";
+  console.log("szFileName:" + szFileName);
+  //先删除文件
+  obj.FileSystem.DeleteFile(szFileName);
+  //下载到本地
+  WebOffice.WebDownLoadFile(urlPath, szFileName);
+  //打开本地文件
+  WebOffice.WebOpenLocalFile(szFileName);
+}
+
+//清稿套红
+function clearRevisionAndtaohong() {
+  var urlPath = GetUrlbasePath() + "/Document/Template1.doc";
+  var szTempPath = obj.FileSystem.GetTempPath();
+  var szFileName = szTempPath + "123.doc";
+  var szTemplateName = szTempPath + "Template1.doc";
+
+  console.log(szFileName);
+  console.log(szTemplateName);
+  //先删除源文件
+  obj.FileSystem.DeleteFile(szFileName);
+  //保存正文清理文档痕迹
+  WebOffice.ClearRevisions();
+  //保存当前打开的正文到本地
+  WebOffice.WebSaveLocalFile(szFileName);
+  //先删除源文件
+  obj.FileSystem.DeleteFile(szTemplateName);
+  //下载到模板文件到本地
+  WebOffice.WebDownLoadFile(urlPath, szTemplateName);
+
+  //打开模板文件
+  WebOffice.WebOpenLocalFile(szTemplateName);
+  obj.Activate(true);
+  if (obj.ActiveDocument.Bookmarks.Exists("Content")) {
+    //this.obj.ActiveDocument.Bookmarks(Position).Range.Select(); //测试
+    setTimeout(
+      obj.ActiveDocument.Application.Selection.GoTo(-1, 0, 0, "Content"),
+      200
+    );
+    console.log("<VBAInsertFile> 跳转到书签指定位置。。。 ");
+  }
+  obj.Activate(true);
+  console.log("<VBAInsertFile> 激活当前对象。。。 ");
+  obj.ActiveDocument.Application.Selection.InsertFile(
+    szFileName,
+    "",
+    false,
+    false,
+    false
+  );
+  console.log("<VBAInsertFile> 插入。。。 " + szFileName + "...成功");
+  console.log("开始填充书签");
+  WebOffice.WebSetBookmarks("book1", "此处测试填充书签1");
+  WebOffice.WebSetBookmarks("book2", "此处测试填充书签2");
+  WebOffice.WebSetBookmarks("book3", "此处测试填充书签3");
+  console.log("结束填充书签");
+}
+
+//创建新文档
+function createDocument() {
+  WebOffice.FileType = ".doc"; //激活文档,防止调用控件接口没有文档对象
+  WebOffice.CreateFile();
+}
+
+//打开本地文档(弹窗)
+function openLocalFile() {
+  WebOffice.FileType = ".doc"; //激活文档,防止调用控件接口没有文档对象
+  WebOffice.WebOpenLocal();
+}
+
+//保存本地文档(弹窗)
+function saveLocalFile() {
+  WebOffice.WebSaveLocal();
+}
+
+//保护文档
+function protectDocument() {
+  WebOffice.WebSetProtect(true, "123456");
+}
+
+//解除保护
+function unProtectDocument() {
+  WebOffice.WebSetProtect(false, "123456");
+}
+
+//允许拷贝
+function enableCopy() {
+  WebOffice.CopyType = 1;
+}
+
+//禁止拷贝
+function disableCopy() {
+  WebOffice.CopyType = 0;
+}
+
+//打印文档
+function printDocument() {
+  WebOffice.WebOpenPrint();
+}
+
+//获取当前文档大小
+function getCurFileSize() {
+  var size = WebOffice.WebLocalFileSize();
+  alert("当前文档大小:" + size + "byte");
+}
+
+//文档是否修改
+function documentIsModify() {
+  if (WebOffice.Modify) {
+    alert("文档已修改");
+  } else {
+    alert("文档未修改");
+  }
+}
+
+//文档是否为空白文档
+function documentIsEmpty() {
+  if (
+    WebOffice.WebObject.Application.ActiveDocument.Characters.Count > 1 ||
+    WebOffice.WebObject.Application.ActiveDocument.Shapes.Count >= 1
+  ) {
+    alert("当前文档不是空白文档");
+  } else {
+    alert("当前文档是空白文档");
+  }
+}
+
+//显示痕迹
+function ShowRevision() {
+  WebOffice.WebShow(true);
+}
+
+//隐藏痕迹
+function HideRevision() {
+  WebOffice.WebShow(false);
+}
+
+//清理痕迹
+function ClearRevision() {
+  WebOffice.ClearRevisions();
+}
+
+//获取doc文件夹下的文件的绝对路径
+function rel2Abs(path) {
+  var _path = path;
+  var locationStr = window.location.href.toString();
+
+  var relative;
+  while ((relative = _path.substring(0, _path.indexOf("/")))) {
+    if (relative === ".") {
+      // 遇到. path去掉最前面的./
+      // 遇到.当前路径去掉/后面内容
+      _path = _path.substring(_path.indexOf("/") + 1, _path.length);
+      locationStr = locationStr.substring(0, locationStr.lastIndexOf("/"));
+      locationStr = locationStr.substring(0, locationStr.lastIndexOf("/") + 1);
+    } else if (relative === "..") {
+      // 遇到.. path去掉最前面的../
+      // 遇到.. 当前路径去掉/xxx,然后再去掉/后面的内容
+      _path = _path.substring(_path.indexOf("/") + 1, _path.length);
+      locationStr = locationStr.substring(0, locationStr.lastIndexOf("/"));
+      locationStr = locationStr.substring(0, locationStr.lastIndexOf("/") + 1);
+    } else {
+      break;
+    }
+  }
+  var index1 = locationStr.indexOf("%");
+  if (index1 > 0) {
+    //将获取的地址中的编码转成中文
+    var index2 = locationStr.lastIndexOf("%");
+    var cc = locationStr.substring(index1, index2 + 3);
+    var bb = decodeURIComponent(cc);
+    locationStr = locationStr.replace(cc, bb);
+  }
+  var result = locationStr + _path;
+  result = result.substring(7); //去掉地址中的file://
+  path = result;
+  return result;
+}
+
+//插入一个书签
+function insertBookmark() {
+  var BMarksName = "test";
+  var BMarksValue = "测试新增书签";
+  if (
+    !WebOffice.WebObject.Application.ActiveDocument.BookMarks.Exists(BMarksName)
+  ) {
+    //判断是否存在该书签
+    var BMVLength = BMarksValue.length;
+    WebOffice.WebObject.Application.Selection.TypeText(BMarksValue); //插入内容
+    WebOffice.WebObject.Application.Selection.MoveLeft(
+      (Unit = 1),
+      (Count = BMVLength)
+    );
+    var StartR = WebOffice.WebObject.Application.Selection.Start;
+    var EndR = WebOffice.WebObject.Application.Selection.Start + BMVLength;
+    WebOffice.WebObject.Application.ActiveDocument.Range(
+      (Start = StartR),
+      (End = EndR)
+    ).Select();
+    WebOffice.WebObject.Application.ActiveDocument.Bookmarks.Add(BMarksName); //添加书签
+  }
+}
+
+//设置书签内容
+function setBookmarkValue() {
+  WebOffice.WebSetBookMarks("test", "测试设置书签");
+  return;
+  /*var BMarksName = "test";
+	var BMarksValue = "测试设置书签";
+    try {
+			if (WebOffice.WebObject.Application.ActiveDocument.BookMarks.Exists(BMarksName)) {// 判断是否存在该书签
+				var vRange = WebOffice.WebObject.Application.ActiveDocument.Bookmarks.Item(BMarksName).Range;
+				vRange.text = BMarksValue;
+				WebOffice.WebObject.Application.ActiveDocument.Bookmarks.Add(BMarksName, vRange);
+			}
+		} catch (e) {
+			this.Status = "名称为<" + BMarksName + ">的书签在文档中不存在";
+			return false;
+		}*/
+}
+
+//隐藏书签
+function hideBookmark() {
+  var Bookmarks = WebOffice.WebObject.Application.ActiveDocument.BookMarks;
+  var bookname = "test";
+  if (Bookmarks.Exists(bookname)) {
+    var range = Bookmarks.Item(bookname).Range;
+    range.Select();
+    range.Select();
+    WebOffice.WebObject.Application.Selection.Font.Hidden = true;
+  }
+}
+
+//显示书签
+function showBookmark() {
+  var Bookmarks = WebOffice.WebObject.Application.ActiveDocument.BookMarks;
+  var bookname = "test";
+  if (Bookmarks.Exists(bookname)) {
+    var range = Bookmarks.Item(bookname).Range;
+    range.Select();
+    WebOffice.WebObject.Application.Selection.Font.Hidden = false;
+  }
+}
+
+//锁定书签
+function protectBookmark() {
+  var Bookmarks = WebOffice.WebObject.Application.ActiveDocument.BookMarks;
+  var bookname = "test";
+  if (Bookmarks.Exists(bookname)) {
+    var range = Bookmarks.Item(bookname).Range;
+    range.Select();
+    var cc;
+    cc = WebOffice.WebObject.Application.ActiveDocument.ContentControls.Add(
+      1,
+      range
+    );
+    cc.Type = 1;
+    cc.Title = "wuhui";
+    cc.LockContents = true;
+    cc.LockContentControl = true;
+  }
+}
+//显示书签
+function unProtectBookmark() {
+  var ControlCount =
+    WebOffice.WebObject.Application.ActiveDocument.ContentControls.Count;
+  for (var i = ControlCount; i >= 1; i--) {
+    if (
+      WebOffice.WebObject.Application.ActiveDocument.ContentControls.Item(i)
+        .Title == "wuhui"
+    ) {
+      WebOffice.WebObject.Application.ActiveDocument.ContentControls.Item(
+        i
+      ).LockContentControl = false;
+      WebOffice.WebObject.Application.ActiveDocument.ContentControls.Item(
+        i
+      ).Delete();
+    }
+  }
+}
+
+//定位书签
+function locateBookmark() {
+  var bookname = "test";
+  if (
+    WebOffice.WebObject.Application.ActiveDocument.Bookmarks.Exists(bookname)
+  ) {
+    WebOffice.WebObject.Application.ActiveDocument.Bookmarks.Item(
+      bookname
+    ).Select();
+  } else {
+    alert("书签不存在!");
+  }
+}
+
+//获取书签内容
+function getBookmarkValue() {
+  var bookmarkvalue = WebOffice.WebGetBookMarks("test");
+  alert("书签内容:" + bookmarkvalue);
+  /*var bookmarkvalue;
+	var Bookmarks = WebOffice.WebObject.Application.ActiveDocument.BookMarks;
+	var bookname = "test";
+	if(Bookmarks.Exists(bookname))
+	{
+		var range = Bookmarks.Item(bookname).Range;
+		bookmarkvalue = range.Text;
+		alert("书签内容:" + bookmarkvalue);
+	}*/
+}
+
+//书签插入文档内容
+function insertFile() {
+  var Bookmarks = WebOffice.WebObject.Application.ActiveDocument.Bookmarks;
+  var bookname = "test";
+  if (Bookmarks.Exists(bookname)) {
+    var range = Bookmarks.Item(bookname).Range;
+    var filePath = rel2Abs("./doc/001.doc");
+    range.InsertFile(filePath);
+  }
+}
+
+//书签插入图片
+function insertPicture() {
+  var Bookmarks = WebOffice.WebObject.Application.ActiveDocument.Bookmarks;
+  var bookname = "test";
+  if (Bookmarks.Exists(bookname)) {
+    WebOffice.WebObject.Application.ActiveDocument.Bookmarks.Item(
+      bookname
+    ).Select();
+    var filePath = rel2Abs("./doc/001.jpg");
+    WebOffice.insertPicture(filePath);
+  }
+}
+
+//删除指定书签
+function deleteBookmark() {
+  var bookmarks = WebOffice.WebObject.Application.ActiveDocument.Bookmarks;
+  if (bookmarks.Exists("test")) {
+    var bookname = bookmarks.Item("test");
+    bookname.Delete();
+  }
+}
+
+//判断书签是否存在
+function bookmarkIsExists() {
+  var bookmarks = WebOffice.WebObject.Application.ActiveDocument.Bookmarks;
+  if (bookmarks.Exists("test")) {
+    alert("书签存在");
+  } else {
+    alert("书签不存在");
+  }
+}
+
+//高亮显示书签内容
+function highlightBookmark() {
+  var Bookmarks = WebOffice.WebObject.Application.ActiveDocument.Bookmarks;
+  var bookname = "test";
+  if (Bookmarks.Exists(bookname)) {
+    var range = Bookmarks.Item(bookname).Range;
+    range.HighlightColorIndex = 7;
+  }
+}
+
+//设置书签内容中部分文字的格式
+function setBookmarkFormat() {
+  var Bookmarks = WebOffice.WebObject.Application.ActiveDocument.Bookmarks;
+  var bookname = "test";
+  var strText = "测试";
+  if (Bookmarks.Exists(bookname)) {
+    var range = Bookmarks.Item(bookname).Range;
+    range.Select();
+    if (
+      WebOffice.WebObject.Application.Selection.Find.Execute(
+        strText,
+        false,
+        false,
+        false,
+        false,
+        false,
+        true,
+        0,
+        false,
+        "",
+        false
+      )
+    ) {
+      WebOffice.WebObject.Application.Selection.Range.Font.Name = "黑体";
+      WebOffice.WebObject.Application.Selection.Range.Font.Size = 28;
+      WebOffice.WebObject.Application.Selection.Range.Font.Color = 255;
+    }
+  }
+}
+
+//设置表格底纹
+function setTableTexture() {
+  var filePath = GetUrlbasePath() + "samples/iWebOfficeApp_VUE/src/doc/5.doc"; //rel2Abs("./doc/5.doc");
+  console.log("filePath" + filePath);
+  var localfile = "d:\\123test.doc";
+  WebOffice.WebDownLoadFile(filePath, localfile);
+  WebOffice.WebOpenLocalFile(localfile);
+  WebOffice.WebObject.Application.Selection.Tables.Item(1).Shading.Texture = 0;
+  WebOffice.WebObject.Application.Selection.Tables.Item(
+    1
+  ).Shading.ForegroundPatternColor = -16777216;
+  WebOffice.WebObject.Application.Selection.Tables.Item(
+    1
+  ).Shading.BackgroundPatternColor = 255;
+}
+
+//设置表格单元格底纹
+function setTableUnitTexture() {
+  var filePath = GetUrlbasePath() + "samples/iWebOfficeApp_VUE/src/doc/2.doc"; //rel2Abs("./doc/5.doc");
+  console.log("filePath" + filePath);
+  var localfile = "d:\\234test.doc";
+  WebOffice.WebDownLoadFile(filePath, localfile);
+  WebOffice.WebOpenLocalFile(localfile);
+  var mytable = WebOffice.WebObject.Application.ActiveDocument.Tables.Item(1);
+  mytable.Cell(1, 1).Select(); //选中单元格
+  WebOffice.WebObject.Application.Selection.Cells.Shading.Texture = 0;
+  WebOffice.WebObject.Application.Selection.Cells.Shading.ForegroundPatternColor =
+    -16777216;
+  WebOffice.WebObject.Application.Selection.Cells.Shading.BackgroundPatternColor = 255;
+}
+
+//拆分表格
+function splitCell() {
+  var filePath = GetUrlbasePath() + "samples/iWebOfficeApp_VUE/src/doc/5.doc"; //rel2Abs("./doc/5.doc");
+  console.log("filePath" + filePath);
+  var localfile = "d:\\345test.doc";
+  WebOffice.WebDownLoadFile(filePath, localfile);
+  WebOffice.WebOpenLocalFile(localfile);
+  var mytable = WebOffice.WebObject.Application.ActiveDocument.Tables.Item(1);
+  mytable.Cell(1, 1).Select();
+  WebOffice.WebObject.Application.Selection.Cells.Split(1, 2, false);
+}
+
+//合并列
+function mergeRow() {
+  var filePath =
+    GetUrlbasePath() + "samples/iWebOfficeApp_VUE/src/doc/mergerow.doc"; //rel2Abs("./doc/5.doc");
+  console.log("filePath" + filePath);
+  var localfile = "d:\\456test.doc";
+  WebOffice.WebDownLoadFile(filePath, localfile);
+  WebOffice.WebOpenLocalFile(localfile);
+  var fptableMerge =
+    WebOffice.WebObject.Application.ActiveDocument.Tables.Item(1);
+  WebOffice.WebObject.Application.ActiveDocument.Range(
+    fptableMerge.Cell(3, 2).Range.Start,
+    fptableMerge.Cell(6, 3).Range.End
+  ).Select();
+  WebOffice.WebObject.Application.Selection.Cells.Merge();
+}
+//删除表格
+function deleteCell() {
+  var filePath =
+    GetUrlbasePath() + "samples/iWebOfficeApp_VUE/src/doc/deletetable.doc"; //rel2Abs("./doc/5.doc");
+  console.log("filePath" + filePath);
+  var localfile = "d:\\567test.doc";
+  WebOffice.WebDownLoadFile(filePath, localfile);
+  WebOffice.WebOpenLocalFile(localfile);
+  var mytable = WebOffice.WebObject.Application.ActiveDocument.Tables.Item(1);
+  mytable.Cell(1, 32).Delete();
+  mytable.Cell(2, 32).Delete();
+  mytable.Cell(3, 32).Delete();
+  mytable.Cell(4, 33).Delete();
+  mytable.Cell(5, 33).Delete();
+  mytable.Cell(6, 33).Delete();
+  mytable.Cell(7, 33).Delete();
+  mytable.Cell(8, 33).Delete();
+}
+
+//关闭控件
+function OnUnLoad() {
+  WebOffice.WebClose();
+}
+
+function FlushCodeInfo(tips, code) {
+  console.log(tips);
+  console.log(code);
+  document.getElementById("shuoming").innerText = tips;
+  document.getElementById("daima").innerText = code;
+  // flush code style
+  // layui.code({
+  //     title: 'JavaScript'
+  //     , about: false      //剔除关于
+  // });
+}
+
+// function CreateFunction(tips, func, args) {
+//     return function() {
+//         FlushCodeInfo(tips, func.toString());
+//     }
+// }
+
+//var _CreateFile = new CreateFunction("创建新文档", CreateFile, []);
+
+function callAlert(tip, functionName) {
+  //根据函数名得到函数类型
+  var func = eval(functionName);
+  //alert(func);
+  FlushCodeInfo(tip, func);
+}

+ 20 - 8
src/router/index.js

@@ -1,4 +1,10 @@
-import { createWebHistory, createRouter } from "vue-router";
+/** @format */
+
+import {
+  createWebHistory,
+  createRouter,
+  createWebHashHistory,
+} from "vue-router";
 /* Layout */
 import Layout from "@/layout";
 
@@ -48,13 +54,13 @@ export const constantRoutes = [
     component: () => import("@/views/register"),
     hidden: true,
   },
-  {
-    path: "/isComing",
-    component: () =>
-      import("@/views/official/applyoffcial/management/isComing"),
-    hidden: true,
-    meta: { title: "收文起草" },
-  },
+  // {
+  //   path: "/isComing",
+  //   component: () =>
+  //     import("@/views/official/applyoffcial/management/isComing"),
+  //   hidden: true,
+  //   meta: { title: "收文起草" },
+  // },
   {
     path: "/:pathMatch(.*)*",
     component: () => import("@/views/error/404"),
@@ -65,6 +71,7 @@ export const constantRoutes = [
     component: () => import("@/views/error/401"),
     hidden: true,
   },
+
   {
     path: "",
     component: Layout,
@@ -92,6 +99,11 @@ export const constantRoutes = [
       },
     ],
   },
+  {
+    path: "/Received",
+    component: () => import("@/views/official/components/Received"),
+    hidden: true,
+  },
 ];
 
 // 动态路由,基于用户权限动态去加载

+ 0 - 102
src/views/dashboard/BarChart.vue

@@ -1,102 +0,0 @@
-<template>
-  <div :class="className" :style="{height:height,width:width}" />
-</template>
-
-<script>
-import echarts from 'echarts'
-require('echarts/theme/macarons') // echarts theme
-import resize from './mixins/resize'
-
-const animationDuration = 6000
-
-export default {
-  mixins: [resize],
-  props: {
-    className: {
-      type: String,
-      default: 'chart'
-    },
-    width: {
-      type: String,
-      default: '100%'
-    },
-    height: {
-      type: String,
-      default: '300px'
-    }
-  },
-  data() {
-    return {
-      chart: null
-    }
-  },
-  mounted() {
-    this.$nextTick(() => {
-      this.initChart()
-    })
-  },
-  beforeDestroy() {
-    if (!this.chart) {
-      return
-    }
-    this.chart.dispose()
-    this.chart = null
-  },
-  methods: {
-    initChart() {
-      this.chart = echarts.init(this.$el, 'macarons')
-
-      this.chart.setOption({
-        tooltip: {
-          trigger: 'axis',
-          axisPointer: { // 坐标轴指示器,坐标轴触发有效
-            type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
-          }
-        },
-        grid: {
-          top: 10,
-          left: '2%',
-          right: '2%',
-          bottom: '3%',
-          containLabel: true
-        },
-        xAxis: [{
-          type: 'category',
-          data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
-          axisTick: {
-            alignWithLabel: true
-          }
-        }],
-        yAxis: [{
-          type: 'value',
-          axisTick: {
-            show: false
-          }
-        }],
-        series: [{
-          name: 'pageA',
-          type: 'bar',
-          stack: 'vistors',
-          barWidth: '60%',
-          data: [79, 52, 200, 334, 390, 330, 220],
-          animationDuration
-        }, {
-          name: 'pageB',
-          type: 'bar',
-          stack: 'vistors',
-          barWidth: '60%',
-          data: [80, 52, 200, 334, 390, 330, 220],
-          animationDuration
-        }, {
-          name: 'pageC',
-          type: 'bar',
-          stack: 'vistors',
-          barWidth: '60%',
-          data: [30, 52, 200, 334, 390, 330, 220],
-          animationDuration
-        }]
-      })
-    }
-  }
-}
-</script>

+ 0 - 135
src/views/dashboard/LineChart.vue

@@ -1,135 +0,0 @@
-<template>
-  <div :class="className" :style="{height:height,width:width}" />
-</template>
-
-<script>
-import echarts from 'echarts'
-require('echarts/theme/macarons') // echarts theme
-import resize from './mixins/resize'
-
-export default {
-  mixins: [resize],
-  props: {
-    className: {
-      type: String,
-      default: 'chart'
-    },
-    width: {
-      type: String,
-      default: '100%'
-    },
-    height: {
-      type: String,
-      default: '350px'
-    },
-    autoResize: {
-      type: Boolean,
-      default: true
-    },
-    chartData: {
-      type: Object,
-      required: true
-    }
-  },
-  data() {
-    return {
-      chart: null
-    }
-  },
-  watch: {
-    chartData: {
-      deep: true,
-      handler(val) {
-        this.setOptions(val)
-      }
-    }
-  },
-  mounted() {
-    this.$nextTick(() => {
-      this.initChart()
-    })
-  },
-  beforeDestroy() {
-    if (!this.chart) {
-      return
-    }
-    this.chart.dispose()
-    this.chart = null
-  },
-  methods: {
-    initChart() {
-      this.chart = echarts.init(this.$el, 'macarons')
-      this.setOptions(this.chartData)
-    },
-    setOptions({ expectedData, actualData } = {}) {
-      this.chart.setOption({
-        xAxis: {
-          data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
-          boundaryGap: false,
-          axisTick: {
-            show: false
-          }
-        },
-        grid: {
-          left: 10,
-          right: 10,
-          bottom: 20,
-          top: 30,
-          containLabel: true
-        },
-        tooltip: {
-          trigger: 'axis',
-          axisPointer: {
-            type: 'cross'
-          },
-          padding: [5, 10]
-        },
-        yAxis: {
-          axisTick: {
-            show: false
-          }
-        },
-        legend: {
-          data: ['expected', 'actual']
-        },
-        series: [{
-          name: 'expected', itemStyle: {
-            normal: {
-              color: '#FF005A',
-              lineStyle: {
-                color: '#FF005A',
-                width: 2
-              }
-            }
-          },
-          smooth: true,
-          type: 'line',
-          data: expectedData,
-          animationDuration: 2800,
-          animationEasing: 'cubicInOut'
-        },
-        {
-          name: 'actual',
-          smooth: true,
-          type: 'line',
-          itemStyle: {
-            normal: {
-              color: '#3888fa',
-              lineStyle: {
-                color: '#3888fa',
-                width: 2
-              },
-              areaStyle: {
-                color: '#f3f8ff'
-              }
-            }
-          },
-          data: actualData,
-          animationDuration: 2800,
-          animationEasing: 'quadraticOut'
-        }]
-      })
-    }
-  }
-}
-</script>

+ 0 - 181
src/views/dashboard/PanelGroup.vue

@@ -1,181 +0,0 @@
-<template>
-  <el-row :gutter="40" class="panel-group">
-    <el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
-      <div class="card-panel" @click="handleSetLineChartData('newVisitis')">
-        <div class="card-panel-icon-wrapper icon-people">
-          <svg-icon icon-class="peoples" class-name="card-panel-icon" />
-        </div>
-        <div class="card-panel-description">
-          <div class="card-panel-text">
-            访客
-          </div>
-          <count-to :start-val="0" :end-val="102400" :duration="2600" class="card-panel-num" />
-        </div>
-      </div>
-    </el-col>
-    <el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
-      <div class="card-panel" @click="handleSetLineChartData('messages')">
-        <div class="card-panel-icon-wrapper icon-message">
-          <svg-icon icon-class="message" class-name="card-panel-icon" />
-        </div>
-        <div class="card-panel-description">
-          <div class="card-panel-text">
-            消息
-          </div>
-          <count-to :start-val="0" :end-val="81212" :duration="3000" class="card-panel-num" />
-        </div>
-      </div>
-    </el-col>
-    <el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
-      <div class="card-panel" @click="handleSetLineChartData('purchases')">
-        <div class="card-panel-icon-wrapper icon-money">
-          <svg-icon icon-class="money" class-name="card-panel-icon" />
-        </div>
-        <div class="card-panel-description">
-          <div class="card-panel-text">
-            金额
-          </div>
-          <count-to :start-val="0" :end-val="9280" :duration="3200" class="card-panel-num" />
-        </div>
-      </div>
-    </el-col>
-    <el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
-      <div class="card-panel" @click="handleSetLineChartData('shoppings')">
-        <div class="card-panel-icon-wrapper icon-shopping">
-          <svg-icon icon-class="shopping" class-name="card-panel-icon" />
-        </div>
-        <div class="card-panel-description">
-          <div class="card-panel-text">
-            订单
-          </div>
-          <count-to :start-val="0" :end-val="13600" :duration="3600" class="card-panel-num" />
-        </div>
-      </div>
-    </el-col>
-  </el-row>
-</template>
-
-<script>
-import CountTo from 'vue-count-to'
-
-export default {
-  components: {
-    CountTo
-  },
-  methods: {
-    handleSetLineChartData(type) {
-      this.$emit('handleSetLineChartData', type)
-    }
-  }
-}
-</script>
-
-<style lang="scss" scoped>
-.panel-group {
-  margin-top: 18px;
-
-  .card-panel-col {
-    margin-bottom: 32px;
-  }
-
-  .card-panel {
-    height: 108px;
-    cursor: pointer;
-    font-size: 12px;
-    position: relative;
-    overflow: hidden;
-    color: #666;
-    background: #fff;
-    box-shadow: 4px 4px 40px rgba(0, 0, 0, .05);
-    border-color: rgba(0, 0, 0, .05);
-
-    &:hover {
-      .card-panel-icon-wrapper {
-        color: #fff;
-      }
-
-      .icon-people {
-        background: #40c9c6;
-      }
-
-      .icon-message {
-        background: #36a3f7;
-      }
-
-      .icon-money {
-        background: #f4516c;
-      }
-
-      .icon-shopping {
-        background: #34bfa3
-      }
-    }
-
-    .icon-people {
-      color: #40c9c6;
-    }
-
-    .icon-message {
-      color: #36a3f7;
-    }
-
-    .icon-money {
-      color: #f4516c;
-    }
-
-    .icon-shopping {
-      color: #34bfa3
-    }
-
-    .card-panel-icon-wrapper {
-      float: left;
-      margin: 14px 0 0 14px;
-      padding: 16px;
-      transition: all 0.38s ease-out;
-      border-radius: 6px;
-    }
-
-    .card-panel-icon {
-      float: left;
-      font-size: 48px;
-    }
-
-    .card-panel-description {
-      float: right;
-      font-weight: bold;
-      margin: 26px;
-      margin-left: 0px;
-
-      .card-panel-text {
-        line-height: 18px;
-        color: rgba(0, 0, 0, 0.45);
-        font-size: 16px;
-        margin-bottom: 12px;
-      }
-
-      .card-panel-num {
-        font-size: 20px;
-      }
-    }
-  }
-}
-
-@media (max-width:550px) {
-  .card-panel-description {
-    display: none;
-  }
-
-  .card-panel-icon-wrapper {
-    float: none !important;
-    width: 100%;
-    height: 100%;
-    margin: 0 !important;
-
-    .svg-icon {
-      display: block;
-      margin: 14px auto !important;
-      float: none !important;
-    }
-  }
-}
-</style>

+ 0 - 79
src/views/dashboard/PieChart.vue

@@ -1,79 +0,0 @@
-<template>
-  <div :class="className" :style="{height:height,width:width}" />
-</template>
-
-<script>
-import echarts from 'echarts'
-require('echarts/theme/macarons') // echarts theme
-import resize from './mixins/resize'
-
-export default {
-  mixins: [resize],
-  props: {
-    className: {
-      type: String,
-      default: 'chart'
-    },
-    width: {
-      type: String,
-      default: '100%'
-    },
-    height: {
-      type: String,
-      default: '300px'
-    }
-  },
-  data() {
-    return {
-      chart: null
-    }
-  },
-  mounted() {
-    this.$nextTick(() => {
-      this.initChart()
-    })
-  },
-  beforeDestroy() {
-    if (!this.chart) {
-      return
-    }
-    this.chart.dispose()
-    this.chart = null
-  },
-  methods: {
-    initChart() {
-      this.chart = echarts.init(this.$el, 'macarons')
-
-      this.chart.setOption({
-        tooltip: {
-          trigger: 'item',
-          formatter: '{a} <br/>{b} : {c} ({d}%)'
-        },
-        legend: {
-          left: 'center',
-          bottom: '10',
-          data: ['Industries', 'Technology', 'Forex', 'Gold', 'Forecasts']
-        },
-        series: [
-          {
-            name: 'WEEKLY WRITE ARTICLES',
-            type: 'pie',
-            roseType: 'radius',
-            radius: [15, 95],
-            center: ['50%', '38%'],
-            data: [
-              { value: 320, name: 'Industries' },
-              { value: 240, name: 'Technology' },
-              { value: 149, name: 'Forex' },
-              { value: 100, name: 'Gold' },
-              { value: 59, name: 'Forecasts' }
-            ],
-            animationEasing: 'cubicInOut',
-            animationDuration: 2600
-          }
-        ]
-      })
-    }
-  }
-}
-</script>

+ 0 - 116
src/views/dashboard/RaddarChart.vue

@@ -1,116 +0,0 @@
-<template>
-  <div :class="className" :style="{height:height,width:width}" />
-</template>
-
-<script>
-import echarts from 'echarts'
-require('echarts/theme/macarons') // echarts theme
-import resize from './mixins/resize'
-
-const animationDuration = 3000
-
-export default {
-  mixins: [resize],
-  props: {
-    className: {
-      type: String,
-      default: 'chart'
-    },
-    width: {
-      type: String,
-      default: '100%'
-    },
-    height: {
-      type: String,
-      default: '300px'
-    }
-  },
-  data() {
-    return {
-      chart: null
-    }
-  },
-  mounted() {
-    this.$nextTick(() => {
-      this.initChart()
-    })
-  },
-  beforeDestroy() {
-    if (!this.chart) {
-      return
-    }
-    this.chart.dispose()
-    this.chart = null
-  },
-  methods: {
-    initChart() {
-      this.chart = echarts.init(this.$el, 'macarons')
-
-      this.chart.setOption({
-        tooltip: {
-          trigger: 'axis',
-          axisPointer: { // 坐标轴指示器,坐标轴触发有效
-            type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
-          }
-        },
-        radar: {
-          radius: '66%',
-          center: ['50%', '42%'],
-          splitNumber: 8,
-          splitArea: {
-            areaStyle: {
-              color: 'rgba(127,95,132,.3)',
-              opacity: 1,
-              shadowBlur: 45,
-              shadowColor: 'rgba(0,0,0,.5)',
-              shadowOffsetX: 0,
-              shadowOffsetY: 15
-            }
-          },
-          indicator: [
-            { name: 'Sales', max: 10000 },
-            { name: 'Administration', max: 20000 },
-            { name: 'Information Techology', max: 20000 },
-            { name: 'Customer Support', max: 20000 },
-            { name: 'Development', max: 20000 },
-            { name: 'Marketing', max: 20000 }
-          ]
-        },
-        legend: {
-          left: 'center',
-          bottom: '10',
-          data: ['Allocated Budget', 'Expected Spending', 'Actual Spending']
-        },
-        series: [{
-          type: 'radar',
-          symbolSize: 0,
-          areaStyle: {
-            normal: {
-              shadowBlur: 13,
-              shadowColor: 'rgba(0,0,0,.2)',
-              shadowOffsetX: 0,
-              shadowOffsetY: 10,
-              opacity: 1
-            }
-          },
-          data: [
-            {
-              value: [5000, 7000, 12000, 11000, 15000, 14000],
-              name: 'Allocated Budget'
-            },
-            {
-              value: [4000, 9000, 15000, 15000, 13000, 11000],
-              name: 'Expected Spending'
-            },
-            {
-              value: [5500, 11000, 12000, 15000, 12000, 12000],
-              name: 'Actual Spending'
-            }
-          ],
-          animationDuration: animationDuration
-        }]
-      })
-    }
-  }
-}
-</script>

+ 0 - 56
src/views/dashboard/mixins/resize.js

@@ -1,56 +0,0 @@
-import { debounce } from '@/utils'
-
-export default {
-  data() {
-    return {
-      $_sidebarElm: null,
-      $_resizeHandler: null
-    }
-  },
-  mounted() {
-    this.initListener()
-  },
-  activated() {
-    if (!this.$_resizeHandler) {
-      // avoid duplication init
-      this.initListener()
-    }
-
-    // when keep-alive chart activated, auto resize
-    this.resize()
-  },
-  beforeDestroy() {
-    this.destroyListener()
-  },
-  deactivated() {
-    this.destroyListener()
-  },
-  methods: {
-    // use $_ for mixins properties
-    // https://vuejs.org/v2/style-guide/index.html#Private-property-names-essential
-    $_sidebarResizeHandler(e) {
-      if (e.propertyName === 'width') {
-        this.$_resizeHandler()
-      }
-    },
-    initListener() {
-      this.$_resizeHandler = debounce(() => {
-        this.resize()
-      }, 100)
-      window.addEventListener('resize', this.$_resizeHandler)
-
-      this.$_sidebarElm = document.getElementsByClassName('sidebar-container')[0]
-      this.$_sidebarElm && this.$_sidebarElm.addEventListener('transitionend', this.$_sidebarResizeHandler)
-    },
-    destroyListener() {
-      window.removeEventListener('resize', this.$_resizeHandler)
-      this.$_resizeHandler = null
-
-      this.$_sidebarElm && this.$_sidebarElm.removeEventListener('transitionend', this.$_sidebarResizeHandler)
-    },
-    resize() {
-      const { chart } = this
-      chart && chart.resize()
-    }
-  }
-}

+ 0 - 301
src/views/iWebOffice/iWebOffice.vue

@@ -1,301 +0,0 @@
-<template>
-
-  <div>
-    <el-button type="success" value="保存文档到服务器" @click="SaveDocument()">保存文档到服务器</el-button>
-    <el-button type="primary" value="打开本地文档(有窗口)" @click="OnUnLoad(),openlocal()">打开本地文档(有窗口)</el-button>
-    <el-button type="info" value="锁定文档" @click="WebSetProtect(true, '123456')">锁定文档</el-button>
-    <el-button type="warning" value="解锁文档" @click="WebSetProtect(false, '123456')">解锁文档</el-button>
-    <el-button type="danger" value="添加区域保护" @click="WebAreaProtect()">添加区域保护</el-button>
-    <el-button type="info" style="background:#6E30B4;" value="解除区域保护" @click="WebAreaUnProtect()">解除区域保护</el-button>
-    <el-button type="info" style="background:#303133" value="禁止拷贝" @click="WebEnableCopy()">禁止拷贝</el-button>
-    <el-button type="info" style="background:#19868E" value="允许拷贝" @click="WebEnableCopy()">允许拷贝</el-button>
-    <div style="width:100%;height:700px; bottom:20px;">
-      <div id="office"></div>
-    </div>
-  </div>
-</template>
-<script>
-  import Vue from 'vue/dist/vue.js'
-  import webOfficeTpl from '../../../../../static/iweboffice/iWebOffice2015.js'
-  import { WebOffice2015 } from '../../../../../static/iweboffice/WebOffice.js'
-  import { getToken } from '@/utils/auth'
-
-  export default {
-    props: {
-      fileData: {}
-    },
-    data() {
-      return {
-        webOffice: null,
-        webOfficeObj: null,
-        headers: 'Bearer ' + getToken(),
-        saveResult: ''
-      }
-    },
-    beforeCreate() {
-
-    },
-    mounted() {
-
-      this.$nextTick(() => {
-        this.initWebOffice()
-        this.initWebOfficeObject()
-      })
-    },
-    created() {
-
-    },
-    beforeDestroy() {
-
-    },
-    methods: {
-      openlocal() {
-        this.webOfficeObj.WebOpenLocal()
-      },
-      OnUnLoad() {
-        this.webOfficeObj.WebClose()
-      },
-      initWebOffice() {
-        this.webOffice = new Vue({
-          template: webOfficeTpl
-        }).$mount('#office')
-
-      },
-      initWebOfficeObject() {
-        this.webOfficeObj = new WebOffice2015()
-        this.webOfficeObj.setObj(document.getElementById('WebOffice'))
-        try {
-          setTimeout(() => {
-            this.webOfficeObj.ServerUrl = 'http://' + document.location.hostname + process.env.VUE_APP_BASE_API
-            // this.webOfficeObj.RecordID = "web";  //RecordID:本文档记录编号
-            this.webOfficeObj.UserName = this.fileData.user
-            this.webOfficeObj.FileName = this.fileData.filePath
-            this.webOfficeObj.getResultJson = {}
-            this.webOfficeObj.SaveServlet = '/content/upload'
-            this.webOfficeObj.FileType = '.' + this.fileData.filePath.split('.')[this.fileData.filePath.split('.').length - 1] //FileType:文档类型  .doc  .xls
-            this.webOfficeObj.ShowWindow = false //显示/隐藏进度条
-            this.webOfficeObj.EditType = this.fileData.EditType //设置加载文档类型 0 锁定文档,1无痕迹模式,2带痕迹模式
-            this.webOfficeObj.ShowMenu = 0
-            this.webOfficeObj.ShowToolBar = 0
-            this.webOfficeObj.SetCaption(this.webOfficeObj.UserName + '正在编辑文档') // 设置控件标题栏标题文本信息
-            //参数顺序依次为:控件标题栏颜色、自定义菜单开始颜色、自定义工具栏按钮开始颜色、自定义工具栏按钮结束颜色、
-            //自定义工具栏按钮边框颜色、自定义工具栏开始颜色、控件标题栏文本颜色(默认值为:0x000000)
-
-            if (!this.webOfficeObj.WebSetSkin(0xdbdbdb,
-              0xeaeaea,
-              0xeaeaea,
-              0xdbdbdb,
-              0xdbdbdb,
-              0xdbdbdb,
-              0x000000)) {
-              // alert("插件皮肤发生错误,请新打开!");
-              this.msgError('插件加载失败,请新打开!')
-
-              // this.msgSuccess(this.webOfficeObj.Status);
-            }    //设置控件皮肤
-            if (this.webOfficeObj.WebOpen()) {
-              this.msgSuccess(this.webOfficeObj.Status)
-            }
-            // if (this.webOfficeObj.WebOpen2(this.webOfficeObj.FileName)) {
-            //     alert(webOfficeObj.Status);
-            // }
-            this.webOfficeObj.AppendMenu('1', '打开本地文件(&L)')
-            this.webOfficeObj.AppendMenu('2', '保存本地文件(&S)')
-            this.webOfficeObj.AppendMenu('3', '-')
-            this.webOfficeObj.AppendMenu('4', '打印预览(&C)')
-            this.webOfficeObj.AppendMenu('5', '退出打印预览(&E)')
-            this.webOfficeObj.AddCustomMenu()
-            this.webOfficeObj.HookEnabled()
-            // this.webOfficeObj.CreateFile() // 根据FileType设置的扩展名来创建对应的空白文档
-          }, 2000)
-        } catch (e) {
-          console.log('catch')
-          console.log(e.description)
-        }
-      },
-      closeWindow() {
-        top.window.opener = top
-        top.window.open('', '_self', '')
-        top.window.close()
-      },
-
-      //设置页面中的状态值
-      StatusMsg(mValue) {
-        try {
-          this.msgSuccess(mValue)
-        } catch (e) {
-          return false
-        }
-      },
-
-      //保存文档
-      SaveDocument(d) {
-        // this.$emit('func', d)
-        if (this.webOfficeObj.WebSave(this.headers)) {    //交互OfficeServer的OPTION="SAVEFILE"
-          this.$emit('func', this.webOfficeObj.getResultJson.fileName)
-          this.webOfficeObj.FileName = this.webOfficeObj.getResultJson.fileName
-          this.webOfficeObj.WebClose()
-          // window.close();
-
-        } else {
-          this.webOfficeObj.Alert(this.webOfficeObj.Status)
-          this.StatusMsg(this.webOfficeObj.Status)
-        }
-      },
-      //锁定/解锁文档
-      closeOffice(Boolean, PassWord) {
-        this.webOfficeObj.WebClose()
-        this.msgSuccess('关闭插件')
-      },
-      //锁定/解锁文档
-      WebSetProtect(Boolean, PassWord) {
-        this.webOfficeObj.WebSetProtect(Boolean, PassWord)
-        this.msgSuccess(this.webOfficeObj.Status)
-      },
-
-      //允许/禁止拷贝文档
-      WebEnableCopy(Boolean) {
-        this.webOfficeObj.WebEnableCopy(Boolean)
-        this.msgSuccess(this.webOfficeObj.Status)
-      },
-
-      //添加区域保护
-      WebAreaProtect() {
-        //如果非ie浏览器调用HidePlugin隐藏插件避免窗体被遮挡
-        this.webOfficeObj.HidePlugin(0)
-        var mText = window.prompt('文档里需要先设置保护的书签,示例文档默认添加了KingGrid的书签,请输入书签名称', 'KingGrid', '')
-        if (mText != null) {
-          this.webOfficeObj.WebAreaProtect(mText)
-        }
-
-        this.webOfficeObj.HidePlugin(1)
-      },
-      //取消区域保护
-      WebAreaUnProtect() {
-        //如果非ie浏览器调用HidePlugin隐藏插件避免窗体被遮挡
-        this.webOfficeObj.HidePlugin(0)
-        var mText = window.prompt('需要和保护的书签对应,示例文档默认添加了KingGrid的书签,请输入书签名称', 'KingGrid', '')
-        //显示HidePlugin隐藏的插件
-        if (mText != null) {
-          this.webOfficeObj.WebAreaUnprotect(mText)
-        }
-
-        this.webOfficeObj.HidePlugin(1)
-      },
-      OnCommand(ID, Caption, bCancel) {
-        switch (ID) {
-          case 1:
-            WebOpenLocal()
-            break//打开本地文件
-          case 2:
-            this.webOfficeObj.WebSaveLocal()
-            break//另存本地文件
-          case 4:
-            this.webOfficeObj.PrintPreview()
-            break//启用
-          case 5:
-            this.webOfficeObj.PrintPreviewExit()
-            this.webOfficeObj.ShowField()
-            break//启用
-          case 17:
-            this.webOfficeObj.SaveEnabled(true)
-            this.StatusMsg('启用保存')
-            break//启用保存
-          case 18:
-            this.webOfficeObj.SaveEnabled(false)
-            this.StatusMsg('关闭保存')
-            break//关闭保存
-          case 19:
-            this.webOfficeObj.PrintEnabled(true)
-            this.StatusMsg('启用打印')
-            break//启用打印
-          case 20:
-            this.webOfficeObj.PrintEnabled(false)
-            this.StatusMsg('关闭打印')
-            break//关闭打印
-          case 301:
-            this.webOfficeObj.HandWriting('255', '4')
-            this.StatusMsg('手写签批')
-            break//手写签批
-          case 302:
-            this.webOfficeObj.StopHandWriting()
-            this.StatusMsg('停止手写签批')
-            break//停止手写签批
-          case 303:
-            this.webOfficeObj.TextWriting()
-            this.StatusMsg('文字签名')
-            break//文字签名
-          case 304:
-            this.webOfficeObj.ShapeWriting()
-            this.StatusMsg('图形签批')
-            break//图形签批
-          case 305:
-            this.webOfficeObj.RemoveLastWriting()
-            this.StatusMsg('取消上一次签批')
-            break//取消上一次签批
-          case 306:
-            this.webOfficeObj.ShowWritingUser(false, this.webOfficeObj.UserName)
-            this.StatusMsg('显示签批用户')
-            break//显示签批用户
-          default:
-
-            return
-        }
-      },
-      //服务端Servlet方式打开文档
-      LoadServlet() {
-        this.webOfficeObj = new WebOffice2015()
-        try {
-          this.webOfficeObj.ServerUrl = process.env.VUE_APP_BASE_API               // 用来保存文件的Server
-          var downloadLink = 'profile/doc/web.docx'
-          this.webOfficeObj.ShowMenu = 1
-          this.webOfficeObj.ShowToolBar = 0
-          this.SetGraySkin()			//设置控件皮肤
-          if (this.webOfficeObj.WebOpen3(downloadLink))  // 文件在服务器上的相对路径 FileName
-          {
-            this.StatusMsg(this.webOfficeObj.Status)
-          }
-        } catch (e) {
-          this.StatusMsg(e.description)
-        }
-      },
-      //URL地址打开文档
-      LoadURL() {
-
-        try {
-          this.webOfficeObj.ServerUrl = process.env.VUE_APP_BASE_API //服务器地址
-          this.webOfficeObj.ShowMenu = 1
-          this.webOfficeObj.ShowToolBar = 0
-          this.webOfficeObj.UserName = 'xqx'
-          this.webOfficeObj.FileName = 'web.docx'
-          this.webOfficeObj.FileType = '.docx' //FileType:文档类型  .doc  .xls
-          this.webOfficeObj.ShowWindow = true //显示/隐藏进度条
-          this.webOfficeObj.EditType = '1' //设置加载文档类型 0 锁定文档,1无痕迹模式,2带痕迹模式
-          this.webOfficeObj.setObj(document.getElementById('WebOffice'))
-          if (!this.webOfficeObj.WebSetSkin(0xdbdbdb, 0xeaeaea, 0xeaeaea, 0xdbdbdb, 0xdbdbdb, 0xdbdbdb, 0x000000)) {
-            alert(this.webOfficeObj.Status)
-          }    //设置控件皮肤		//设置控件皮肤
-          if (this.webOfficeObj.WebOpen2('/profile/doc/web.docx'))  // 文件在服务器上的相对路径 FileName
-          {
-            this.StatusMsg(this.webOfficeObj.Status)
-          }
-        } catch (e) {
-          this.StatusMsg(e.description)
-        }
-      },
-      //烟枪灰皮肤
-      SetGraySkin() {
-        //参数顺序依次为:控件标题栏颜色、自定义菜单开始颜色、自定义工具栏按钮开始颜色、自定义工具栏按钮结束颜色、
-        //自定义工具栏按钮边框颜色、自定义工具栏开始颜色、控件标题栏文本颜色(默认值为:0x000000)
-        if (!this.webOfficeObj.WebSetSkin(0xdbdbdb, 0xeaeaea, 0xeaeaea, 0xdbdbdb, 0xdbdbdb, 0xdbdbdb, 0x000000)) {
-          this.webOfficeObj.Alert(this.webOfficeObj.Status)
-        }
-      }
-
-    }
-  }
-</script>
-
-<style lang="less">
-
-</style>

+ 0 - 687
src/views/iWebOffice/write1.vue

@@ -1,687 +0,0 @@
-<template>
-  <div class="app-container">
-    <el-form ref="form" :model="form" :rules="rules" label-width="130px" border>
-      <table width="100%" border="1">
-        <tr>
-          <td colspan="2"><p class="title">发文起草</p></td>
-        </tr>
-
-        <!--<tr>
-          <td>
-            <el-form-item label="机关待字" prop="senderName">
-              <el-select v-model="form.officeNumber" placeholder="请选择">
-                <el-option label="001" value=""></el-option>
-                <el-option label="002" value=""></el-option>
-              </el-select>
-            </el-form-item>
-          </td>
-          <td>
-            <el-form-item label="文号" prop="number">
-            <el-input v-model="form.number" placeholder="请输入发件人-账号" />
-          </el-form-item>
-          </td>
-        </tr>-->
-        <tr>
-          <td>
-            <el-form-item label="缓急" prop="ponderance">
-              <el-select v-model="form.ponderance" placeholder="请选择">
-                <el-option label="一般" value="4"></el-option>
-                <el-option label="平急" value="3"></el-option>
-                <el-option label="加急" value="2"></el-option>
-                <el-option label="特急" value="1"></el-option>
-                <el-option label="特提" value="0"></el-option>
-              </el-select>
-            </el-form-item>
-          </td>
-          <td>
-            <el-form-item label="密级" prop="securityClass">
-              <el-select v-model="form.securityClass" placeholder="请选择">
-                <el-option label="一般" value="3"></el-option>
-                <el-option label="秘密" value="2"></el-option>
-                <el-option label="机密" value="1"></el-option>
-                <el-option label="绝密" value="0"></el-option>
-              </el-select>
-            </el-form-item>
-          </td>
-        </tr>
-
-        <tr>
-          <td colspan="2">
-            <el-form-item label="标题:" prop="fwtitle">
-              <el-input v-model="form.fwtitle" type="text" placeholder=""/>
-            </el-form-item>
-          </td>
-        </tr>
-
-        <!--园林局样式-->
-        <tr>
-          <td colspan="2">
-            <el-form-item label="发文字号:" prop="fwtitle">
-              <el-input v-model="form.referenceNumber" type="text" placeholder=""/>
-            </el-form-item>
-          </td>
-        </tr>
-        <!--<tr>
-          <td colspan="2">
-            <el-form-item label="部门:" prop="fwdept">
-              &lt;!&ndash;              <el-input v-model="form.fwdept"  type="text" placeholder=""/>&ndash;&gt;
-              <el-input title="选择发文部门" v-model="form.fwdept" placeholder="请选择发文部门" prop="avtiveSend" :disabled="true">
-                <template slot="append">
-                  <el-button
-                    type="primary"
-                    icon="el-icon-plus"
-                    size="mini"
-                    @click="handleSelectDept">
-                    选择发文部门
-                  </el-button>
-                </template>
-              </el-input>
-            </el-form-item>
-          </td>
-        </tr>
-        <tr>
-          <td colspan="2">
-            <el-form-item label="主送:" :disabled="true" prop="avtiveSend">
-              <el-input v-model="form.avtiveSend" placeholder="请选择主送人"  :disabled="true">
-                <template slot="append">
-                  <el-button
-                    type="primary"
-                    icon="el-icon-plus"
-                    size="mini"
-                    @click="handleSelect(0)">
-                    选择主送部门
-                  </el-button>
-                </template>
-              </el-input>
-            </el-form-item>
-          </td>
-        </tr>
-        <tr>
-          <td colspan="2">
-            <el-form-item label=" 抄送:" :disabled="true"  prop="copyTo" >
-              <el-input v-model="form.copyTo" placeholder="请选择抄送人":disabled="true">
-                <template slot="append">
-                  <el-button
-                    type="primary"
-                    icon="el-icon-plus"
-                    size="mini"
-                    @click="handleSelect(1)">
-                    选择抄送部门
-                  </el-button>
-                </template>
-              </el-input>
-            </el-form-item>
-          </td>
-        </tr>-->
-        <tr>
-          <td colspan="2">
-            <el-form-item label="上传附件:" prop="accessory">
-              <el-upload
-
-                :action="upload.url"
-                :headers="upload.headers"
-                :file-list="upload.oldFileList"
-                multiple
-                :show-file-list="true"
-                :on-progress="handleFileUploadProgress"
-                :on-preview="handlePreview"
-                :http-request="submitUpload"
-                :on-remove="handleRemove"
-                :before-remove="beforeRemove"
-              >
-                <el-button slot="trigger" size="small" :loading="upload.isUploading" type="primary">上传文件</el-button>
-                <!--                <el-button style="margin-left: 10px;" size="small" type="success" :loading="upload.isUploading" @click="submitUpload">上传文件</el-button>-->
-              </el-upload>
-              <ul v-show="!!upload.oldFileList.length" class="old-file-list"></ul>
-            </el-form-item>
-          </td>
-        </tr>
-        <tr>
-          <td colspan="2">
-            <el-form-item label="正文:" prop="content">
-              <el-button size="small" type="primary" @click="openIweboffice"
-                         v-loading.fullscreen.lock="fullscreenLoading">读取正文
-              </el-button>
-              <!--              <el-input v-model="form.content" type="primary" placeholder=""/>-->
-            </el-form-item>
-          </td>
-        </tr>
-        <tr v-show="false">
-          <td>
-            <el-form-item label="actkey:" prop="actkey">
-              <el-input v-model="form.actkey" type="textarea" placeholder=""/>
-            </el-form-item>
-          </td>
-
-        </tr>
-      </table>
-    </el-form>
-    <div slot="footer" class="dialog-footer" v-show="open3">
-      <el-button type="primary" @click="submitForm(1)">提交</el-button>
-      <!--      <el-button type="primary" @click="submitForm(0)">保存草稿</el-button>-->
-      <el-button @click="cancel">取 消</el-button>
-    </div>
-    <div slot="footer" class="dialog-footer" v-show="open4">
-      <el-button type="primary" @click="submitToDo()">同意</el-button>
-      <el-button type="primary" @click="deleteToDo()">拒绝</el-button>
-      <el-button @click="cancel">取 消</el-button>
-    </div>
-    <el-dialog id="content" title="正文修改"
-               :visible.sync="contentOpen"
-               :before-close="cancel1" append-to-body
-               width="80%"
-               top="10"
-
-               height="900px">
-      <!-- 动态引入组件-->
-      <i-web-office :key="timer" v-if="contentOpen" ref="ioffice" @func="getcontent"
-                    :fileData="fileData"></i-web-office>
-      <span slot="footer" class="dialog-footer">
-        <el-button @click="contentOpen = false">取 消</el-button>
-      </span>
-    </el-dialog>
-
-    <!--    <select-user-by-dept ref="selectUserByDept" :title="title" :open="Renopen" @ok="selectOK"/>-->
-
-    <el-dialog :title="title" :visible.sync="deptOpen" width="40%" append-to-body style="size: 30px">
-      <el-tree
-        :data="deptOptions"
-        show-checkbox
-        default-expand-all
-        ref="dept"
-        node-key="id"
-        empty-text="加载中,请稍后"
-        :props="defaultProps"
-      ></el-tree>
-      <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="getDeptAllCheckedKeys">确 定</el-button>
-        <el-button @click="cancelDept">取 消</el-button>
-      </div>
-    </el-dialog>
-
-  </div>
-</template>
-
-<script>
-  import SelectUserByDept from '@/components/SelectRen/selectUserByDept'
-  import iWebOffice from './iWebOffice'
-  import SelectRen from '@/components/SelectRen'
-  import { treeselect } from '@/api/system/dept'
-  import {
-    submitApply,
-    getFormData,
-    deleteToDoItem,
-    submitToDoItem,
-    updateInfo,
-    uploadFujian
-  } from '@/api/activiti/form/fw'
-  import Treeselect from '@riophae/vue-treeselect'
-  import { getToken } from '@/utils/auth'
-
-  export default {
-
-    components: {
-      SelectUserByDept, iWebOffice, SelectRen,
-      Treeselect
-    },
-
-    props: {
-      data: '',
-      actOpen: false
-    },
-    data() {
-      return {
-        Renopen: false,
-        receiverName: [],
-        timer: '',
-        contentOpen: false,
-        receiverAccount: [],
-        dialogTableVisible: false,
-        fullscreenLoading: false,
-        //正文的文件地址
-        fileData: {
-          filePath: '/profile/doc/NewCreate.doc',
-          user: 'xxx',
-          EditType: '1'
-        },
-        fileList3: [],
-        // 选中数组
-        ids: [],
-        // 非单个禁用
-        single: true,
-        // 非多个禁用
-        multiple: true,
-        // 总条数
-        total: 0,
-        // 【请填写功能名称】表格数据
-        infoList: [],
-        // 弹出层标题
-        title: '',
-        // 是否显示弹出层
-        open: false,
-        open1: false,
-        // 查询参数
-        queryParams: {
-          pageNum: 1,
-          pageSize: 10,
-          status: undefined,
-          deleteTime: undefined
-        },
-        // 表单参数
-        form: {
-          actkey: '',
-          content: '',
-          fwdept: '',
-          ponderance: '',
-          securityClass: '',
-          referenceNumber: '',
-          copyTo: '',
-          accessory: '',
-          avtiveSend: ''
-        },  // 表单参数
-        flg: '',
-        // 表单校验
-        rules: {
-          fwtitle: [
-            { required: true, message: '标题题不能为空', trigger: 'blur' }
-          ],
-          referenceNumber: [
-            { required: true, message: '发文字号不能为空', trigger: 'blur' }
-          ],
-          /* fwdept: [
-             { required: true, message: "请选择发文部门", trigger: "blur" }
-           ],
-           copyTo: [
-             { required: true, message: "请选择抄送部门", trigger: "blur" }
-           ],
-           avtiveSend: [
-             { required: true, message: "请选择主送部门", trigger: "blur" }
-           ],*/
-          ponderance: [
-            { required: true, message: '请选择缓急程度', trigger: 'blur' }
-          ],
-          securityClass: [
-            { required: true, message: '请选择密级等级', trigger: 'blur' }
-          ]
-        },
-        // 判断是否为提交,还是添加
-        open3: false,
-        // 判断是否为提交,还是添加
-        open4: false,
-        // 部门
-        deptOpen: false,
-        // 部门树选项
-        deptOptions: [],
-        defaultProps: {
-          children: 'children',
-          label: 'label'
-        },
-        // 部门id
-        depid: [],
-        depname: [],
-        deptflgOptions: [{
-          'label': '单位',
-          'value': 1
-        }],
-        loading: true,
-        // 上传参数
-        upload: {
-          // 是否禁用上传
-          isUploading: false,
-          // 设置上传的请求头部
-          headers: { Authorization: 'Bearer ' + getToken() },
-          // 上传的地址
-          url: process.env.VUE_APP_BASE_API + '/common/upload',
-          // 上传的文件列表
-          fileList: [],
-          oldFileList: []
-        }
-      }
-    },
-    created() {
-      //flg 为流程状态,undefined:创建新的流程 1:打开代办中的流程, eles为查看流程详情
-      this.flg = this.data.flg
-      //为 启动流程时的key值
-      this.form.actkey = this.data.getactkey
-      //加载部门树表
-      this.getTreeselect()
-      if (this.flg == undefined) {
-        this.open3 = true
-      } else if (this.flg == '1') {
-        this.form = this.data
-        this.getDetails()
-        this.open4 = true
-      } else {
-        this.form = this.data
-        this.getDetails()
-      }
-    },
-    methods: {
-
-      /** 写 选择人员 按钮弹窗操作 */
-      handleSelect(type) {
-        this.deptOpen = true
-        if (type == 0) {
-          this.title = '主送部门'
-        } else {
-          this.title = '抄送部门'
-        }
-
-      }, /** 写 选择人员 按钮弹窗操作 */
-      handleSelectDept() {
-        this.deptOpen = true
-        this.title = '发文部门'
-      },
-      //重新关闭office
-      closeoffice() {
-        this.$refs.ioffice.closeOffice()
-      },
-      /** --------------查询部门下拉树结构---------------- */
-      getTreeselect() {
-        treeselect().then(response => {
-          this.deptOptions = response.data
-          var a = this.deptOptions
-          for (let i = 0; i < a.length; i++) {
-            console.log(this.deptOptions[i].children[0].id)
-            console.log(a[i].id)
-          }
-
-        })
-      },
-      // 所有部门节点数据
-      getDeptAllCheckedKeys() {
-        // 目前被选中的部门节点
-        let checkedKeys = this.$refs.dept.getHalfCheckedKeys()
-        // 半选中的部门节点
-        let halfCheckedKeys = this.$refs.dept.getCheckedKeys()
-        let a = this.$refs.dept.getCheckedNodes()
-        var q = this.deptOptions
-        let e = ''
-        for (let w = 0; w < q.length; w++) {
-          e += q[w].children[w].id
-        }
-        for (let i = 0; i < a.length; i++) {
-          if (a[i].id != 100 && a[i].id != e) {
-            this.depname.push(a[i].label)
-            this.depid.push(a[i].id)
-          }
-        }
-        console.log(a)
-        checkedKeys.unshift.apply(checkedKeys, halfCheckedKeys)
-        // this.form.fwdept =this.depid;
-
-        if (this.title == '主送部门') {
-          this.form.avtiveSend = this.depname.toString()
-        } else if (this.title == '抄送部门') {
-          this.form.copyTo = this.depname.toString()
-
-        } else {
-          this.form.fwdept = this.depname.toString()
-        }
-        this.deptOpen = false
-        this.depname = []
-        this.depid = []
-        return halfCheckedKeys
-
-      },
-
-      //返回正文
-      getcontent(data) {
-        this.contentOpen = false
-        this.form.content = data
-        this.fileData.filePath = data
-      },
-
-      // 文件提交处理
-      submitUpload(item) {
-        let uploadData = new FormData()
-        uploadData.append('file', item.file)
-        uploadFujian(uploadData).then(response => {
-          if (response.code === 200) {
-            this.upload.fileList.push(response.fileName)
-            this.form.accessory = this.upload.fileList.toString()
-            this.upload.oldFileList.push({
-              name: response.fileName.substring(response.fileName.lastIndexOf('/') + 1, response.fileName.length),
-              url: response.url
-            })
-            this.msgSuccess('上传成功')
-            this.upload.isUploading = false
-          }
-        })
-      },
-      // 文件上传中处理
-      handleFileUploadProgress(event, file, fileList) {
-        this.upload.isUploading = true
-      },
-
-      handlePreview(file) {
-        // 预览,一些文件因为格式问题无法预览。推荐使用a标签,src为文件的下载地址,点击即可下载,参照录音
-        window.open(file.url)
-      },
-      beforeRemove(file, fileList) {
-        return this.$confirm(`确定移除 ${file.name}?`)
-      },
-      handleRemove(file) {
-        // 移除
-        this.upload.oldFileList.forEach((item, index) => {
-          if (item.uid === file.uid) {
-            this.mail.oldFileList.splice(index, 1)
-            //删除
-          }
-        })
-      },
-
-      //获取详细信息,修改用到
-      getDetails() {
-        getFormData(this.form.formId).then(response => {
-          this.form = response.data
-          this.fileData.filePath = this.form.content == '' ? '/profile/doc/NewCreate.doc' : this.form.content
-          this.fileData.user = this.form.user
-          if (response.data.accessory != '') {
-            var files = response.data.accessory.split(',')
-            for (var i = 0; i < files.length; i++) {
-              var fiellist = {
-                'name': files[i].substring(files[i].lastIndexOf('/') + 1, files[i].length),
-                'url': process.env.VUE_APP_BASE_API + files[i]
-              }
-              this.upload.oldFileList.push(fiellist)
-            }
-          }
-
-        })
-      },
-      openda() {
-        this.open1 = false
-      },
-
-      //打开weboffice 页面添加正文
-      openIweboffice() {
-        // this.$router.push({path:'/actwork/fw/iweboffice'})
-        this.timer = new Date().getTime()
-        this.contentOpen = true
-      },
-
-      // 取消按钮
-      cancel() {
-        this.$emit('getList')
-        this.open = false
-        this.reset()
-
-      },
-      cancel1() {
-        this.contentOpen = false
-      },
-      // 表单重置
-      reset() {
-        this.form = {
-          everyone: undefined
-        }
-        this.resetForm('form')
-      },
-      /** 搜索按钮操作 */
-      handleQuery() {
-        this.queryParams.pageNum = 1
-        // this.getList();
-      },
-      /** 重置按钮操作 */
-      resetQuery() {
-        this.resetForm('queryForm')
-        this.handleQuery()
-      },
-      // 多选框选中数据
-      handleSelectionChange(selection) {
-        this.ids = selection.map(item => item.id)
-        this.single = selection.length != 1
-        this.multiple = !selection.length
-      },
-      /** 新增按钮操作 */
-      handleAdd() {
-        this.reset()
-        this.open = true
-        this.title = '公文发文'
-      },
-      //关闭部门窗口
-      cancelDept() {
-        this.deptOpen = false
-      },
-
-      /** 修改按钮操作 */
-      handleUpdate(row) {
-        this.reset()
-        const id = row.id || this.ids
-        getInfo(id).then(response => {
-          this.form = response.data
-          this.open = true
-          this.title = '公文发文'
-        })
-      },
-      handleUpdate1(row) {
-        this.reset()
-        const id = row.id || this.ids
-        getInfo(id).then(response => {
-          this.form = response.data
-          this.open1 = true
-          this.title = '公文发文'
-        })
-      },
-      /** 提交按钮 */
-      submitForm: function(flg) {
-        this.$refs['form'].validate(valid => {
-          this.$set(this.form, 'sendFlg', flg)
-          if (valid) {
-            if (this.form.id != undefined) {
-              updateInfo(this.form).then(response => {
-                if (response.code === 200) {
-                  this.msgSuccess('修改成功')
-                  // this.getList();
-                }
-              })
-            } else {
-              submitApply(this.form).then(response => {
-                console.log(response.code)
-                if (response.code === 200) {
-                  console.log(response.code)
-                  this.msgSuccess('提交成功')
-                  // this.open = false;
-                  this.$emit('transferUser', this.open)
-                }
-              })
-            }
-          }
-        })
-      },
-      submitToDo() {
-        updateInfo(this.form).then(response => {
-          submitToDoItem(this.form.taskid).then(response1 => {
-            this.msgSuccess('提交成功')
-            console.log(response1.code)
-            this.$emit('getList')
-          })
-        })
-      },
-      //拒绝按钮
-      deleteToDo() {
-        this.$confirm('是否确认拒绝这这个申请吗?', '警告', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          deleteToDoItem(this.form.taskid).then(response => {
-            this.msgSuccess('拒绝成功')
-            this.$emit('getList')
-          })
-
-        }).catch(() => {
-        })
-
-      },
-      /** 删除按钮操作 */
-      handleDelete(row) {
-        const ids = row.id || this.ids
-        this.$confirm('是否确认删除这一封邮件?', '警告', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(function() {
-          return delInfo(ids)
-        }).then(() => {
-          // this.getList();
-          this.msgSuccess('删除成功')
-        }).catch(function() {
-        })
-      },
-      /** 导出按钮操作 */
-      handleExport() {
-        const queryParams = this.queryParams
-        this.$confirm('是否确认导出所有【请填写功能名称】数据项?', '警告', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(function() {
-          return exportInfo(queryParams)
-        }).then(response => {
-          this.download(response.msg)
-        }).catch(function() {
-        })
-      }
-    }
-  }
-</script>
-
-<style lang="less" scoped>
-  .apple {
-    width: 150px;
-    overflow: hidden;
-    white-space: nowrap;
-    text-overflow: ellipsis;
-  }
-
-  .title {
-    font-size: 30px;
-    text-align: center;
-    margin-top: 30px;
-  }
-
-  .bottom10 {
-    margin-bottom: 20px;
-  }
-
-  .el-dialog__title {
-    text-align: center;
-    font-weight: bold;
-  }
-
-  table {
-    border-collapse: collapse;
-  }
-
-  .el-form-item {
-    margin-bottom: 10px !important;
-    margin-top: 10px;
-  }
-
-  .dialog-footer {
-    text-align: center;
-    margin-top: 20px;
-  }
-</style>

+ 2 - 3
src/views/index.vue

@@ -1,3 +1,5 @@
+<!-- @format -->
+
 <template>
   <div
     class="background-container"
@@ -247,7 +249,6 @@
     </div>
   </div>
 </template>
-
 <script>
 import newCenter from "./home/newCenter.vue";
 import govenmentOpen from "./home/govenmentOpen.vue";
@@ -273,10 +274,8 @@ import url14 from "../assets/img/ad3.png";
 import url15 from "../assets/img/ad4.png";
 import url16 from "../assets/img/banner1.jpg";
 import url17 from "../assets/img/banner2.jpg";
-
 export default {
   name: "YinetoaIndex",
-
   data() {
     return {
       imageArray: [url17, url16],

+ 3 - 0
src/views/leave/leave/index.vue

@@ -1,3 +1,5 @@
+<!-- @format -->
+
 <template>
   <div class="app-container">
     <el-form
@@ -401,6 +403,7 @@ export default {
         }
       });
     },
+
     /** 删除按钮操作 */
     handleDelete(row) {
       const ids = row.id || this.ids;

+ 0 - 130
src/views/official/applyoffcial/document.vue

@@ -1,130 +0,0 @@
-<template>
-  <div style="background-color: white; padding: 20px 40px">
-    <div style="font-weight: 700; font-size: 23px">公文管理</div>
-    <div
-      style="
-        display: flex;
-        justify-content: space-between;
-        width: 1100px;
-        margin: 100px auto;
-      "
-    >
-      <el-button>发文</el-button>
-      <el-button @click="dialogVisible = true">收文</el-button>
-      <el-dialog
-        v-model="dialogVisible"
-        title="Tips"
-        width="80%"
-        style="height: 820px"
-        :before-close="handleClose"
-      >
-        1111
-        <div style="width: 100px; height: 100px">
-          <div id="office"></div>
-        </div>
-        <template #footer>
-          <span class="dialog-footer">
-            <el-button @click="dialogVisible = false">Cancel</el-button>
-            <el-button type="primary" @click="dialogVisible = false">
-              Confirm
-            </el-button>
-          </span>
-        </template>
-      </el-dialog>
-      <el-button>其他处室发文</el-button>
-    </div>
-  </div>
-</template>
-<script lang="ts" setup>
-import { ref, nextTick, onMounted, createApp } from "vue";
-import webOfficeTpl from "../../../../static/webOffice/iWebOffice2015.js";
-import { ElMessageBox } from "element-plus";
-const webOffice = ref(null);
-const webOfficeObj = ref<WebOfficeObj | null>(null);
-const dialogVisible = ref(false);
-interface WebOfficeObj {
-  setObj(element: HTMLElement): void;
-  UserName: string;
-  FileName: string;
-  FileType: string;
-  ShowWindow: boolean;
-  EditType: string;
-  ShowMenu: number;
-  ShowToolBar: number;
-  SetCaption(text: string): void;
-  WebSetSkin(...colors: number[]): boolean;
-  WebOpen(): void;
-  AppendMenu(id: string, text: string): void;
-  AddCustomMenu(): void;
-  HookEnabled(): void;
-  CreateFile(): void;
-  Status: any;
-}
-onMounted(() => {
-  console.log(webOfficeTpl);
-  nextTick(() => {
-    initWebOffice();
-    initWebOfficeObject();
-  });
-});
-function initWebOffice() {
-  webOffice.value = createApp({
-    template: webOfficeTpl,
-  }).mount("#office");
-}
-function initWebOfficeObject() {
-  webOfficeObj.value = new WebOffice2015();
-  webOfficeObj.value.setObj(document.getElementById("office"));
-  try {
-    webOfficeObj.value.UserName = "XXX";
-    webOfficeObj.value.FileName = "Mytemplate.doc";
-    webOfficeObj.value.FileType = ".doc"; //FileType:文档类型  .doc  .xls
-    webOfficeObj.value.ShowWindow = false; //显示/隐藏进度条
-    webOfficeObj.value.EditType = "1"; //设置加载文档类型 0 锁定文档,1无痕迹模式,2带痕迹模式
-    webOfficeObj.value.ShowMenu = 1;
-    webOfficeObj.value.ShowToolBar = 0;
-    webOfficeObj.value.SetCaption(webOfficeObj.value.UserName + "正在编辑文档"); // 设置控件标题栏标题文本信息
-    //参数顺序依次为:控件标题栏颜色、自定义菜单开始颜色、自定义工具栏按钮开始颜色、自定义工具栏按钮结束颜色、
-    //自定义工具栏按钮边框颜色、自定义工具栏开始颜色、控件标题栏文本颜色(默认值为:0x000000)
-    if (
-      !webOfficeObj.value.WebSetSkin(
-        0xdbdbdb,
-        0xeaeaea,
-        0xeaeaea,
-        0xdbdbdb,
-        0xdbdbdb,
-        0xdbdbdb,
-        0x000000
-      )
-    ) {
-      alert(webOfficeObj.value.Status);
-    } //设置控件皮肤
-    if (webOfficeObj.value.WebOpen()) {
-      // StatusMsg(WebOfficeObj.Status);
-    }
-    webOfficeObj.value.AppendMenu("1", "打开本地文件(&L)");
-    webOfficeObj.value.AppendMenu("2", "保存本地文件(&S)");
-    webOfficeObj.value.AppendMenu("3", "-");
-    webOfficeObj.value.AppendMenu("4", "打印预览(&C)");
-    webOfficeObj.value.AppendMenu("5", "退出打印预览(&E)");
-    webOfficeObj.value.AddCustomMenu();
-    webOfficeObj.value.HookEnabled();
-    webOfficeObj.value.CreateFile(); // 根据FileType设置的扩展名来创建对应的空白文档
-  } catch (e) {
-    console.log("catch");
-    console.log(e.description);
-  }
-}
-
-const handleClose = (done: () => void) => {
-  ElMessageBox.confirm("Are you sure to close this dialog?")
-    .then(() => {
-      done();
-    })
-    .catch(() => {
-      // catch error
-    });
-};
-</script>
-
-<style lang="scss" scoped></style>

+ 0 - 19
src/views/official/applyoffcial/management/isComing.vue

@@ -1,19 +0,0 @@
-<template>
-  <div></div>
-</template>
-
-<script>
-export default {
-  name: "YinetoaIsComing",
-
-  data() {
-    return {};
-  },
-
-  mounted() {},
-
-  methods: {},
-};
-</script>
-
-<style lang="scss" scoped></style>

+ 199 - 0
src/views/official/components/Received.vue

@@ -0,0 +1,199 @@
+<!-- @format -->
+
+<template>
+  <div
+    class="app-container"
+    v-loading="loadingWebLoad"
+    :element-loading-text="loadingWebLoadText"
+  >
+    <el-row :gutter="10">
+      <el-col :span="20">
+        <div class="iWebOfficeDom" ref="iWebOfficeDom"></div
+      ></el-col>
+      <el-col :span="4">
+        <el-form
+          ref="receivedFormRef"
+          label-width="90px"
+          :rules="rules"
+          :model="receivedParams"
+        >
+          <el-form-item label="来文标题:" prop="title">
+            <el-input
+              v-model="receivedParams.title"
+              placeholder="请输入来文标题"
+            ></el-input>
+          </el-form-item>
+          <el-form-item label="来文单位:" prop="sender">
+            <el-input
+              v-model="receivedParams.sender"
+              placeholder="请输入来文单位"
+            ></el-input>
+          </el-form-item>
+          <el-form-item label="来文日期:" prop="sendTime">
+            <el-date-picker
+              format="YYYY-MM-DD"
+              value-format="YYYY-MM-DD"
+              v-model="receivedParams.sendTime"
+              type="date"
+              placeholder="请输入来文日期"
+              size="defalut"
+            />
+          </el-form-item>
+          <el-form-item label="流水号: " prop="serial">
+            <el-input
+              v-model="receivedParams.serial"
+              placeholder="请输入流水号"
+            ></el-input>
+          </el-form-item>
+          <el-form-item label="文件字号:" prop="documentNum">
+            <el-input
+              v-model="receivedParams.documentNum"
+              placeholder="请输入文件字号"
+            ></el-input>
+          </el-form-item>
+          <el-form-item label="紧急程度:">
+            <el-input
+              v-model="receivedParams.emergencyDegree"
+              placeholder="请输入紧急程度"
+            ></el-input>
+          </el-form-item>
+          <el-form-item label="添加附件:">
+            <el-upload
+              v-model:file-list="receivedParams.yOffcialReceiveFileList"
+              action="https://run.mocky.io/v3/9d059bf9-4660-45f2-925d-ce80ad6c4d15"
+              multiple
+              :on-preview="handlePreview"
+              :on-remove="handleRemove"
+              :limit="3"
+            >
+              <el-button type="primary">点击上传附件</el-button>
+            </el-upload>
+          </el-form-item>
+          <el-form-item label="收文原件:">
+            <el-upload
+              v-model:file-list="receivedParams.receiveFileId"
+              :action="`${baseUrl}/system/file/fileupload`"
+              multiple
+              :on-preview="handlePreview"
+              :on-remove="handleRemove"
+              :limit="3"
+            >
+              <el-button type="primary">点击上传原件</el-button>
+            </el-upload>
+          </el-form-item>
+
+          <el-form-item>
+            <el-button @click="onSubmit(receivedFormRef)">提交</el-button>
+          </el-form-item>
+        </el-form>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script setup>
+import { ref, reactive, onMounted } from "vue";
+import { LoadStr } from "@/plugins/iWebOffice2015";
+import { getRequest } from "../hookFunction";
+import { setObj, WebOpenFile } from "@/plugins/my.js";
+import { saveReceived } from "@/api/office/received";
+const WebOfficeStr = LoadStr();
+const iWebOfficeDom = ref(null); //获取他的dom
+const loadingWebLoad = ref(false);
+const receivedFormRef = ref(false);
+const loadingWebLoadText = ref("");
+const baseUrl = ref(import.meta.env.VITE_APP_BASE_API);
+console.log(baseUrl);
+const receivedParams = reactive({
+  title: null, //来文标题
+  sender: null, //单位
+  sendTime: null, //时间
+  serial: null, //流水号
+  documentNum: null, //字号
+  emergencyDegree: null, //紧急程度
+  sendDownFileId: null,
+  receiveFileId: [], //收文原件
+  yOffcialReceiveFileList: [], //附件信息
+});
+const rules = reactive({
+  title: [
+    {
+      required: true,
+      message: "来文标题不能为空",
+      trigger: "blur",
+    },
+  ],
+  sender: [
+    {
+      required: true,
+      message: "来文时间不能为空",
+      trigger: "blur",
+    },
+  ],
+  sendTime: [
+    {
+      required: true,
+      message: "来文单位不能为空",
+      trigger: "blur",
+    },
+  ],
+  serial: [
+    {
+      required: true,
+      message: "流水号不能为空",
+      trigger: "blur",
+    },
+  ],
+  documentNum: [
+    {
+      required: true,
+      message: "字号不能为空",
+      trigger: "blur",
+    },
+  ],
+});
+let requestParams = getRequest(); //获取当前url地址
+let WebOffice;
+const onSubmit = (formEl) => {
+  if (!formEl) return;
+  formEl.validate(async (valid, fields) => {
+    if (valid) {
+      loadingWebLoadText.value = "正在提交中";
+      loadingWebLoad.value = true;
+      let { code } = await saveReceived(receivedParams);
+      if (code == 200) {
+        loadingWebLoad.value = false;
+      }
+    }
+  });
+};
+const handlePreview = () => {};
+const handleRemove = () => {};
+function Load() {
+  //chrome浏览器,HookEnabled设置为true,用于控件中和本地excel表格的焦点互相切换
+  let FuncExt = WebOffice.FuncExtModule; //获取iWebOffice2015扩展接口对象
+  setObj(WebOffice);
+  FuncExt.ShowToolBar = 1;
+  WebOpenFile();
+  loadingWebLoad.value = false;
+  //FuncExt.EditType="1,1"; //可以编辑,不显示痕迹,可以有批注
+}
+function OnReady() {
+  //获取iWebOffice2015控件对象,WebOffice.FuncExtModule是iWebOffice2015控件扩展接口对象
+  WebOffice = document.getElementById("WebOffice2015");
+  setTimeout(function () {
+    Load();
+  }, 10); //需要做一个延时,iWebOffice2015才能获取FuncExtModule扩展接口对象
+}
+onMounted(() => {
+  loadingWebLoad.value = true;
+  iWebOfficeDom.value.innerHTML = WebOfficeStr;
+  OnReady();
+});
+</script>
+
+<style lang="scss" scoped>
+.iWebOfficeDom {
+  height: 950px;
+}
+</style>

+ 59 - 0
src/views/official/hookFunction.js

@@ -0,0 +1,59 @@
+/** @format */
+
+export function getRequest() {
+  var urlStr = location.href;
+  if (typeof urlStr == "undefined") {
+    var url = decodeURI(location.search); //获取url中"?"符后的字符串
+  } else {
+    var url = "?" + urlStr.split("?")[1];
+  }
+  var theRequest = new Object();
+  if (url.indexOf("?") != -1) {
+    var str = url.substr(1);
+    let strs = str.split("&");
+    for (var i = 0; i < strs.length; i++) {
+      theRequest[strs[i].split("=")[0]] = decodeURIComponent(
+        strs[i].split("=")[1]
+      );
+    }
+  }
+  return theRequest;
+} //获取url地址
+
+//获取通讯ID号
+export function kg_uuid(len, radix) {
+  var chars =
+    "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");
+  var uuid = [],
+    i;
+  radix = radix || chars.length;
+  if (len) {
+    for (i = 0; i < len; i++) uuid[i] = chars[0 | (Math.random() * radix)];
+  } else {
+    var r;
+    uuid[8] = uuid[13] = uuid[18] = uuid[23] = "-";
+    uuid[14] = "4";
+    for (i = 0; i < 36; i++) {
+      if (!uuid[i]) {
+        r = 0 | (Math.random() * 16);
+        uuid[i] = chars[i == 19 ? (r & 0x3) | 0x8 : r];
+      }
+    }
+  }
+  return uuid.join("");
+}
+
+export function GetUrlbasePath() {
+  //获取当前网址,如: http://localhost:8080/ems/Pages/Basic/Person.jsp
+  var curWwwPath = window.document.location.href;
+  //获取主机地址之后的目录,如: /ems/Pages/Basic/Person.jsp
+  var pathName = window.document.location.pathname;
+  var pos = curWwwPath.indexOf(pathName);
+  //获取主机地址,如: http://localhost:8080
+  var localhostPath = curWwwPath.substring(0, pos);
+  //获取带"/"的项目名,如:/ems
+  var projectName = pathName.substring(0, pathName.substr(1).indexOf("/") + 1);
+  //获取项目的basePath   http://localhost:8080/ems/
+  var basePath = localhostPath + projectName + "/";
+  return basePath;
+}

+ 75 - 0
src/views/official/index.vue

@@ -0,0 +1,75 @@
+<!-- @format -->
+
+<template>
+  <div class="app-container">
+    <el-row
+      justify="space-evenly"
+      v-loading="loadingOpenApp"
+      element-loading-text="正在打开收文视窗"
+    >
+      <el-col :span="6">
+        <el-button @click="handlePostApp()">发文</el-button>
+      </el-col>
+      <el-col :span="6">
+        <el-button @click="handleOpenAppReceived()">收文</el-button>
+      </el-col>
+      <el-col :span="6">
+        <el-button @click="handleOtherApp()"> 其他处室发文</el-button>
+      </el-col>
+    </el-row>
+  </div>
+  <Received />
+  <!-- <el-dialog
+    v-model="messageVisible"
+    title="Tips"
+    width="1400px"
+    :before-close="handleClose"
+  >
+   
+    <template #footer>
+      <span class="dialog-footer">
+        <el-button @click="messageVisible = false">Cancel</el-button>
+        <el-button type="primary" @click="dialogVisible = false"> </el-button>
+      </span>
+    </template>
+  </el-dialog> -->
+</template>
+
+<script setup>
+import { ref, onMounted } from "vue";
+import { kg_uuid, GetUrlbasePath } from "./hookFunction";
+import { getToken, getJToken } from "@/utils/auth";
+var uuid = kg_uuid(16, 32);
+var targetuuid = kg_uuid(16, 32);
+
+const loadingOpenApp = ref(false);
+//打开收文弹窗浏览器
+const handleOpenAppReceived = () => {
+  loadingOpenApp.value = true;
+  let webUrl = "http://192.168.1.216:81/Received";
+  let urlString =
+    "http://127.0.0.1:9588/StartApp?" +
+    "&id=" +
+    uuid +
+    "&targetid=" +
+    targetuuid +
+    "&showMode=3" +
+    "&cookie=Admin-Token=" +
+    getToken() +
+    ";J-Token=" +
+    getJToken() +
+    "&weburl=" +
+    encodeURIComponent(webUrl);
+  fetch(urlString, {
+    method: "get",
+  }).then((res) => {
+    loadingOpenApp.value = false;
+  });
+};
+//打开发文弹窗浏览器
+const handlePostApp = () => {};
+//打开其他处室发文弹窗
+const handleOtherApp = () => {};
+</script>
+
+<style lang="scss"></style>

+ 13 - 5
vite.config.js

@@ -1,7 +1,9 @@
+/** @format */
+
 import { defineConfig, loadEnv } from "vite";
 import path from "path";
 import createVitePlugins from "./vite/plugins";
-
+import legacy from "@vitejs/plugin-legacy";
 // https://vitejs.dev/config/
 export default defineConfig(({ mode, command }) => {
   const env = loadEnv(mode, process.cwd());
@@ -10,8 +12,14 @@ export default defineConfig(({ mode, command }) => {
     // 部署生产环境和开发环境下的URL。
     // 默认情况下,vite 会假设你的应用是被部署在一个域名的根路径上
     // 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。
-    base: VITE_APP_ENV === "production" ? "/" : "/",
-    plugins: createVitePlugins(env, command === "build"),
+    base: VITE_APP_ENV === "production" ? "./" : "./",
+    plugins: [
+      createVitePlugins(env, command === "build"),
+      legacy({
+        targets: ["chrome 64"], //需要兼容的目标列表,可以设置多个
+        modernPolyfills: true,
+      }),
+    ],
     resolve: {
       // https://cn.vitejs.dev/config/#resolve-alias
       alias: {
@@ -25,13 +33,13 @@ export default defineConfig(({ mode, command }) => {
     },
     // vite 相关配置
     server: {
-      port: 80,
+      port: 81,
       host: true,
       open: true,
       proxy: {
         // https://cn.vitejs.dev/config/#server-proxy
         "/dev-api": {
-          target: "http://192.168.1.59:8080",
+          target: "http://192.168.1.52:8080",
           changeOrigin: true,
           rewrite: (p) => p.replace(/^\/dev-api/, ""),
         },