Parcourir la source

Merge branch 'xqx' of yinet2020/YinetOASystemWeb into master

许乾星 il y a 4 ans
Parent
commit
a8b1cc7cbe

+ 9 - 0
src/api/activiti/form/fw.js

@@ -57,3 +57,12 @@ export function  getFormData(key) {
     method: 'get',
   })
 }
+
+
+//获取详情数据
+export function  getFile(url) {
+  return request({
+    url: url,
+    method: 'get',
+  })
+}

+ 12 - 0
src/router/index.js

@@ -193,6 +193,18 @@ export const constantRoutes = [
         name: 'havedetails',
         meta: { title: '已办详情' }
       },
+      {
+        path: 'fw/iweboffice',
+        component: (resolve) => require(['@/views/system/actform/fawen/iWebOffice'], resolve),
+        name: 'iweboffice',
+        meta: { title: '正文显示' }
+      },
+      {
+        path: '',
+        component: (resolve) => require(['@/views/system/actform/fawen/write1'], resolve),
+        name: 'iweboffice',
+        meta: { title: '正文显示' }
+      },
     ]
   }
 

+ 195 - 0
src/views/system/actform/fawen/iWebOffice.vue

@@ -0,0 +1,195 @@
+<template>
+  <div style="width:100%;height:700px;">
+    <div id="office"></div>
+    <input style="color:Red;" type=button value="打开本地文档(有窗口)" @click="OnUnLoad(),openlocal()">
+    <input style="color:Red;" type=button value="保存文档到服务器" @click="SaveDocument()">
+  </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() {
+      console.log(webOfficeTpl);
+      this.$nextTick(() => {
+        this.initWebOffice();
+        this.webOfficeObj = new WebOffice2015();
+        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();
+        try {
+          this.webOfficeObj.ServerUrl = "http://localhost/dev-api";
+           // this.webOfficeObj.RecordID = "web";  //RecordID:本文档记录编号
+          this.webOfficeObj.setObj(document.getElementById('WebOffice'));
+          this.webOfficeObj.UserName = this.fileData.user;
+          this.webOfficeObj.FileName = this.fileData.filePath;
+          this.webOfficeObj.getResultJson = {};
+          this.webOfficeObj.SaveServlet = "/common/upload";
+          this.webOfficeObj.FileType = "."+this.fileData.filePath.split(".")[ this.fileData.filePath.split(".").length-1]; //FileType:文档类型  .doc  .xls
+          this.webOfficeObj.ShowWindow = false; //显示/隐藏进度条
+          this.webOfficeObj.EditType = "1"; //设置加载文档类型 0 锁定文档,1无痕迹模式,2带痕迹模式
+          this.webOfficeObj.ShowMenu = 1;
+          this.webOfficeObj.ShowToolBar = 0;
+          this.webOfficeObj.SetCaption(this.webOfficeObj.UserName + "正在编辑文档"); // 设置控件标题栏标题文本信息
+          //参数顺序依次为:控件标题栏颜色、自定义菜单开始颜色、自定义工具栏按钮开始颜色、自定义工具栏按钮结束颜色、
+          //自定义工具栏按钮边框颜色、自定义工具栏开始颜色、控件标题栏文本颜色(默认值为:0x000000)
+          if (!this.webOfficeObj.WebSetSkin(0xdbdbdb, 0xeaeaea, 0xeaeaea, 0xdbdbdb, 0xdbdbdb, 0xdbdbdb, 0x000000)) {
+            alert(this.webOfficeObj.Status);
+          }    //设置控件皮肤
+          if (this.webOfficeObj.WebOpen()) {
+              alert(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设置的扩展名来创建对应的空白文档
+        } catch (e) {
+          console.log("catch");
+          console.log(e.description);
+        }
+      },
+      //服务端Servlet方式打开文档
+      LoadServlet() {
+        this.webOfficeObj = new WebOffice2015();
+        try {
+          this.webOfficeObj.ServerUrl = "http://localhost/dev-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 = "http://localhost/dev-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);
+          }    //设置控件皮肤		//设置控件皮肤
+          alert("1")
+          if (this.webOfficeObj.WebOpen2("/profile/doc/web.docx"))  // 文件在服务器上的相对路径 FileName
+          {
+            this.StatusMsg(this.webOfficeObj.Status);
+          }
+        } catch (e) {
+          this.StatusMsg(e.description);
+        }
+      },
+      //设置页面中的状态值
+      StatusMsg(mValue) {
+        try {
+          alert(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);
+    }
+  },
+      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;
+    }
+  },
+      //烟枪灰皮肤
+       SetGraySkin(){
+    //参数顺序依次为:控件标题栏颜色、自定义菜单开始颜色、自定义工具栏按钮开始颜色、自定义工具栏按钮结束颜色、
+    //自定义工具栏按钮边框颜色、自定义工具栏开始颜色、控件标题栏文本颜色(默认值为:0x000000)
+    if (!this.webOfficeObj.WebSetSkin(0xdbdbdb, 0xeaeaea, 0xeaeaea, 0xdbdbdb, 0xdbdbdb, 0xdbdbdb, 0x000000))
+      this.webOfficeObj.Alert(this.webOfficeObj.Status);
+  }
+
+  }
+  }
+</script>
+
+<style lang="less">
+
+</style>

+ 255 - 246
src/views/system/actform/fawen/write1.vue

@@ -5,6 +5,7 @@
         <tr>
           <td colspan="2"><p class="title">发文起草</p></td>
         </tr>
+
         <!--<tr>
           <td>
             <el-form-item label="机关待字" prop="senderName">
@@ -47,31 +48,58 @@
         <tr>
           <td colspan="2">
             <el-form-item label="标题:" prop="fwtitle">
-              <el-input v-model="form.fwtitle"  type="text" placeholder=""/>
+              <el-input v-model="form.fwtitle" type="text" placeholder=""/>
             </el-form-item>
           </td>
         </tr>
         <tr>
           <td colspan="2">
             <el-form-item label="部门:" prop="fwdept">
-              <el-input v-model="form.fwdept"  type="text" placeholder=""/>
+              <!--              <el-input v-model="form.fwdept"  type="text" placeholder=""/>-->
+              <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 placeholder="请选择" :disabled="true">
-                <el-button slot="append">选择</el-button>
+            <el-form-item label="主送:" :disabled="true">
+              <el-input v-model="form.avtiveSend" placeholder="请选择主送人" prop="avtiveSend" :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 placeholder="请选择" :disabled="true">
-                <el-button slot="append">选择</el-button>
+            <el-form-item label=" 抄送:" :disabled="true">
+              <el-input v-model="form.copyTo" placeholder="请选择抄送人" prop="copyTo" :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>
@@ -80,11 +108,17 @@
           <td colspan="2">
             <el-form-item label="上传附件:" prop="accessory">
               <el-upload
-                class="upload-demo"
-                action="https://jsonplaceholder.typicode.com/posts/"
-
-                :file-list="fileList3">
-                <el-button size="small" type="primary">点击上传</el-button>
+                ref="upload"
+                :limit="1"
+                accept=".jpg, .png"
+                :action="upload.url"
+                :headers="upload.headers"
+                :file-list="upload.fileList"
+                :on-progress="handleFileUploadProgress"
+                :on-success="handleFileSuccess"
+                :auto-upload="false">
+                <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
+                <el-button style="margin-left: 10px;" size="small" type="success" :loading="upload.isUploading" @click="submitUpload">上传</el-button>
                 <div slot="tip" class="el-upload__tip">只能上传文件,且不超过500kb</div>
               </el-upload>
             </el-form-item>
@@ -93,252 +127,93 @@
         <tr>
           <td colspan="2">
             <el-form-item label="正文:" prop="content">
-              <el-upload
-                class="upload-demo"
-                action="https://jsonplaceholder.typicode.com/posts/"
-                :file-list="fileList3">
-                <el-button size="small" type="primary">点击上传</el-button>
-                <div slot="tip" class="el-upload__tip">只能上传文件,且不超过500kb</div>
-              </el-upload>
+              <el-button size="small" type="primary" @click="openIweboffice">打开正文</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="mailTheme">
-              <el-input v-model="form.actkey" type="textarea" placeholder="" />
+              <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">
+    <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>
+    <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="cancel" append-to-body
+               width="1500px"
+               top="10" height="300px">
+      <!-- 动态引入组件-->
+      <i-web-office @func="getcontent" :fileData="fileData"></i-web-office>
+    </el-dialog>
+
+    <select-user-by-dept ref="selectUserByDept" :title="title" :open="Renopen" @ok="selectOK"/>
+
+    <el-dialog :title="tctitle" :visible.sync="deptOpen" width="20%" 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="cancel">取 消</el-button>
+      </div>
+
+    </el-dialog>
 
   </div>
 </template>
 
 <script>
   import SelectUserByDept from "@/components/SelectRen/selectUserByDept";
-  import {submitApply,getFormData,deleteToDoItem,submitToDoItem } from "@/api/activiti/form/fw";
+  import iWebOffice from "./iWebOffice";
+  import SelectRen from '@/components/SelectRen';
+  import {treeselect} from "@/api/system/dept";
+  import {submitApply, getFormData, deleteToDoItem, submitToDoItem} from "@/api/activiti/form/fw";
+  import Treeselect from "@riophae/vue-treeselect";
+  import {getToken} from "@/utils/auth";
+
   export default {
 
-    components: {SelectUserByDept},
-    props:{
-      data:'',
-      actOpen:false,
+    components: {
+      SelectUserByDept, iWebOffice, SelectRen,
+      Treeselect,
+    },
+
+    props: {
+      data: '',
+      actOpen: false,
     },
     data() {
       return {
-        receiverName: "",
-        receiverAccount: "",
-        options: [{//部门选择级别
-          label: '一级',
-          children: [{
-            label: '2-1',
-            children: [{
-              label: '3-1'
-            }, {
-              label: '3-2'
-            }, {
-              label: '3-3'
-            }]
-          },
-            {
-              value: 'daohang',
-              label: '2-2',
-              children: [{
-                label: '3-1'
-              }, {
-                label: '3-2'
-              }]
-            }]
-        },
-          {
-            label: '一级2',
-            children: [{
-              label: '22-1',
-              children: [{
-                label: '33-1'
-              }, {
-                label: '33-2'
-              }, {
-                label: '33-3'
-              }, {
-                label: '33-4utton'
-              }]
-            },
-              {
-                value: 'form',
-                label: 'Form',
-                children: [{
-                  value: 'radio',
-                  label: 'Radio 单选框'
-                }, {
-                  value: 'checkbox',
-                  label: 'Checkbox 多选框'
-                }, {
-                  value: 'input',
-                  label: 'Input 输入框'
-                }, {
-                  value: 'input-number',
-                  label: 'InputNumber 计数器'
-                }, {
-                  value: 'select',
-                  label: 'Select 选择器'
-                }, {
-                  value: 'cascader',
-                  label: 'Cascader 级联选择器'
-                }, {
-                  value: 'switch',
-                  label: 'Switch 开关'
-                }, {
-                  value: 'slider',
-                  label: 'Slider 滑块'
-                }, {
-                  value: 'time-picker',
-                  label: 'TimePicker 时间选择器'
-                }, {
-                  value: 'date-picker',
-                  label: 'DatePicker 日期选择器'
-                }, {
-                  value: 'datetime-picker',
-                  label: 'DateTimePicker 日期时间选择器'
-                }, {
-                  value: 'upload',
-                  label: 'Upload 上传'
-                }, {
-                  value: 'rate',
-                  label: 'Rate 评分'
-                }, {
-                  value: 'form',
-                  label: 'Form 表单'
-                }]
-              }, {
-                value: 'data',
-                label: 'Data',
-                children: [{
-                  value: 'table',
-                  label: 'Table 表格'
-                }, {
-                  value: 'tag',
-                  label: 'Tag 标签'
-                }, {
-                  value: 'progress',
-                  label: 'Progress 进度条'
-                }, {
-                  value: 'tree',
-                  label: 'Tree 树形控件'
-                }, {
-                  value: 'pagination',
-                  label: 'Pagination 分页'
-                }, {
-                  value: 'badge',
-                  label: 'Badge 标记'
-                }]
-              }, {
-                value: 'notice',
-                label: 'Notice',
-                children: [{
-                  value: 'alert',
-                  label: 'Alert 警告'
-                }, {
-                  value: 'loading',
-                  label: 'Loading 加载'
-                }, {
-                  value: 'message',
-                  label: 'Message 消息提示'
-                }, {
-                  value: 'message-box',
-                  label: 'MessageBox 弹框'
-                }, {
-                  value: 'notification',
-                  label: 'Notification 通知'
-                }]
-              }, {
-                value: 'navigation',
-                label: 'Navigation',
-                children: [{
-                  value: 'menu',
-                  label: 'NavMenu 导航菜单'
-                }, {
-                  value: 'tabs',
-                  label: 'Tabs 标签页'
-                }, {
-                  value: 'breadcrumb',
-                  label: 'Breadcrumb 面包屑'
-                }, {
-                  value: 'dropdown',
-                  label: 'Dropdown 下拉菜单'
-                }, {
-                  value: 'steps',
-                  label: 'Steps 步骤条'
-                }]
-              }, {
-                value: 'others',
-                label: 'Others',
-                children: [{
-                  value: 'dialog',
-                  label: 'Dialog 对话框'
-                }, {
-                  value: 'tooltip',
-                  label: 'Tooltip 文字提示'
-                }, {
-                  value: 'popover',
-                  label: 'Popover 弹出框'
-                }, {
-                  value: 'card',
-                  label: 'Card 卡片'
-                }, {
-                  value: 'carousel',
-                  label: 'Carousel 走马灯'
-                }, {
-                  value: 'collapse',
-                  label: 'Collapse 折叠面板'
-                }]
-              }]
-          }, {
-            value: 'ziyuan',
-            label: '资源',
-            children: [{
-              value: 'axure',
-              label: 'Axure Components'
-            }, {
-              value: 'sketch',
-              label: 'Sketch Templates'
-            }, {
-              value: 'jiaohu',
-              label: '组件交互文档'
-            }]
-          }],
+        Renopen: false,
+        receiverName: [],
+        contentOpen: false,
+        receiverAccount: [],
         dialogTableVisible: false,
-        gridData: [{//选择人员
-          date: '2016-05-02',
-          name: '王小虎',
-          address: '上海市普陀区金沙江路 1518 弄'
-        }, {
-          date: '2016-05-04',
-          name: '王小虎',
-          address: '上海市普陀区金沙江路 1518 弄'
-        }, {
-          date: '2016-05-01',
-          name: '王小虎',
-          address: '上海市普陀区金沙江路 1518 弄'
-        }, {
-          date: '2016-05-03',
-          name: '王小虎',
-          address: '上海市普陀区金沙江路 1518 弄'
-        }],
-        fileList3:[],
+        //正文的文件地址
+        fileData: {
+          filePath: '/profile/doc/inche.doc',
+          user: 'xxx',
+        },
+        fileList3: [],
         // 选中数组
         ids: [],
         // 非单个禁用
@@ -363,53 +238,186 @@
         },
         // 表单参数
         form: {
-          actkey:'',
+          actkey: '',
+          content: '',
+          fwdept:'',
+          ponderance: '',
+          securityClass: '',
+          copyTo: '',
+          accessory: '',
+          avtiveSend: '',
         },  // 表单参数
         flg: '',
         // 表单校验
         rules: {},
         // 判断是否为提交,还是添加
-        open3: false  ,
+        open3: false,
         // 判断是否为提交,还是添加
-        open4: false
+        open4: false,
+        // 部门
+        deptOpen: false,
+        // 部门树选项
+        deptOptions: [],
+        defaultProps: {
+          children: "children",
+          label: "label"
+        },
+        // 部门id
+        depid: [],
+        depname: [],
+        deptflgOptions: [{
+          "label": "单位",
+          "value": 1
+        }],
+        // 上传参数
+        upload: {
+          // 是否禁用上传
+          isUploading: false,
+          // 设置上传的请求头部
+          headers: {Authorization: "Bearer " + getToken()},
+          // 上传的地址
+          url: process.env.VUE_APP_BASE_API + "/common/upload",
+          // 上传的文件列表
+          fileList: []
+        },
       };
     },
     created() {
 
       this.flg = this.data.flg;
       this.form.actkey = this.data.getactkey;
-      if(this.flg==undefined){
-        this.open3=true;
-      }else if(this.flg=='1'){
+      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.open4 = true;
+      } else {
         this.form = this.data;
         this.getDetails();
       }
     },
     methods: {
+
+      /** 写 选择人员 按钮弹窗操作 */
+      handleSelect(type) {
+        this.$refs.selectUserByDept.childOpen = true;
+        this.Renopen = true;
+        if (type == 0) {
+          this.title = "选择主送人";
+        } else {
+          this.title = "选择抄送人";
+        }
+
+      }, /** 写 选择人员 按钮弹窗操作 */
+      handleSelectDept() {
+        this.deptOpen = true;
+      },
+
+      /** --------------查询部门下拉树结构---------------- */
+      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;
+        this.form.fwdept = this.depname[0];
+        this.deptOpen = false;
+        this.depname = [];
+        this.depid = [];
+        return halfCheckedKeys;
+
+      },
+      selectOK(zh, xm) {
+        // this.form.avtiveSend = zh;
+        if (this.title == "选择主送人") {
+          this.form.avtiveSend = xm;
+        } else {
+          this.form.copyTo = xm;
+        }
+        this.Renopen = false;
+      },
+
+
+
+
+      //返回正文
+      getcontent(data) {
+        this.form.content = data;
+        this.contentOpen = false;
+      },
+
+      // 文件提交处理
+      submitUpload() {
+        this.$refs.upload.submit();
+      },
+      // 文件上传中处理
+      handleFileUploadProgress(event, file, fileList) {
+        this.upload.isUploading = true;
+      },
+    // 文件上传成功处理
+      handleFileSuccess(response, file, fileList) {
+        this.upload.isUploading = false;
+        this.form.assign = response.fileName;
+        this.msgSuccess(response.msg);
+      },
+
+
+      //获取详细信息,修改用到
       getDetails() {
         getFormData(this.form.formId).then(response => {
           this.form = response.data;
+          this.fileData.filePath = this.form.content;
+          this.fileData.user = this.form.user;
+          this.upload.fileList = [{ name: this.form.accessory, url: process.env.VUE_APP_BASE_API+this.form.accessory }];
         });
       },
-      selectOK(zh, xm) {
-        this.receiverAccount = zh;
-        this.receiverName=xm;
-        this.open=false;
-      },
       openda() {
         this.open1 = false;
       },
-      /** 查询【请填写功能名称】列表 */
+
+      //打开weboffice 页面添加正文
+      openIweboffice() {
+        // this.$router.push({path:'/actwork/fw/iweboffice'})
+        this.contentOpen = true;
+      },
+
+
 
       // 取消按钮
       cancel() {
         this.$emit('getList');
+        this.contentOpen = false;
         this.open = false;
         this.reset();
+
       },
       // 表单重置
       reset() {
@@ -440,6 +448,7 @@
         this.open = true;
         this.title = "公文发文";
       },
+
       /** 修改按钮操作 */
       handleUpdate(row) {
         this.reset();
@@ -462,7 +471,7 @@
       /** 提交按钮 */
       submitForm: function (flg) {
         this.$refs["form"].validate(valid => {
-          this.$set(this.form,"sendFlg",flg)
+          this.$set(this.form, "sendFlg", flg)
           if (valid) {
             if (this.form.id != undefined) {
               updateInfo(this.form).then(response => {
@@ -485,7 +494,7 @@
           }
         });
       },
-      submitToDo(){
+      submitToDo() {
         this.loading = true;
         submitToDoItem(this.form.taskid).then(response => {
           this.msgSuccess("提交成功");
@@ -493,7 +502,7 @@
         })
       },
       //拒绝按钮
-      deleteToDo(){
+      deleteToDo() {
         this.$confirm('是否确认拒绝这这个申请吗?', '警告', {
           confirmButtonText: '确定',
           cancelButtonText: '取消',

+ 0 - 5
src/views/system/actwork/ActToDraft.vue

@@ -23,10 +23,6 @@
       <!-- 动态引入组件-->
       <component :is="actForm" :data="detail" @transferUser="getUser"></component>
 
-      <!--        <span slot="footer" class="dialog-footer">-->
-      <!--    <el-button @click="actOpen = false">取 消</el-button>-->
-      <!--    <el-button type="primary" @click="actOpen = false">确 定</el-button>-->
-      <!--  </span>-->
     </el-dialog>
   </div>
 </template>
@@ -68,7 +64,6 @@
 
       //通过流程key查询启动的表单fromkey
       openactform(actkey) {
-
         let vue = this
         this.detail.getactkey = actkey//动态传参到下面的页面
         getStartFormKey(actkey).then(response => {

+ 0 - 2
src/views/system/notify_info/tzfs.vue

@@ -115,8 +115,6 @@
         empty-text="加载中,请稍后"
         :props="defaultProps"
       ></el-tree>
-
-
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="getDeptAllCheckedKeys">确 定</el-button>
         <el-button @click="cancel">取 消</el-button>

Fichier diff supprimé car celui-ci est trop grand
+ 3856 - 0
static/iweboffice/WebOffice.js


Fichier diff supprimé car celui-ci est trop grand
+ 295 - 0
static/iweboffice/iWebOffice2015.js