Browse Source

Merge branch 'master' of http://110.249.213.118:2039/yinet2020/YinetOASystemWeb into yf

 Conflicts:
	vue.config.js
yf 4 years ago
parent
commit
bfb265c4d0

+ 23 - 2
src/api/activiti/form/fw.js

@@ -5,17 +5,38 @@ import request from '@/utils/request'
 * */
 // 发文件提交
 export function  submitApply(query) {
-  console.log("11111111111"+query)
   return request({
     url: '/fw/submitapply',
     method: 'post',
     params: query
   })
 }
-// 发文办列表
+// 发文办列表
 export function  listInfo() {
   return request({
     url: '/fw/toDoFwList',
     method: 'get',
   })
 }
+
+//已办工作列表
+export function  havedInfo() {
+  return request({
+    url: '/fw/doneFwList',
+    method: 'get',
+  })
+}
+//提交待办
+export function  submitToDoItem(processInstanceId) {
+  return request({
+    url: '/fw/submitToDoItem/'+processInstanceId,
+    method: 'get',
+  })
+}
+//结束待办
+export function  deleteToDoItem(processInstanceId) {
+  return request({
+    url: '/fw/deleteToDoItem/'+processInstanceId,
+    method: 'get',
+  })
+}

+ 2 - 3
src/api/system/actwork/todo.js

@@ -2,10 +2,9 @@ import request from '@/utils/request'
 
 
 // 待办查询
-export function listInfo(query) {
+export function listInfo() {
   return request({
-    url: '/yinet/interface/findUnfinishedTask',
+    url: '/yinet/interface/toDoFwList',
     method: 'get',
-    params: query
   })
 }

+ 3 - 1
src/components/ChatLog/ChatLog.vue

@@ -36,6 +36,8 @@
 
 <script>
 
+
+
   import { formatDate } from '@/filters/filters'
   import { deepCopy } from '@/utils/utils.js'
   import { getChatlog } from '@/api/webim/index.js'
@@ -151,7 +153,7 @@
       padding: 3px 5px;
       font-size: 14px;
       background: #fff;
-      font-size: 12px;
+      /*font-size: 12px;*/
     }
     .mine {
       overflow: hidden;

+ 20 - 0
src/router/index.js

@@ -175,9 +175,29 @@ export const constantRoutes = [
         meta: { title: '公告公示' }
       }
     ]
+  },
+  {
+    path: '/actwork',
+    component: Layout,
+    hidden: true,
+    children: [
+      {
+        path: 'todo/tododetails',
+        component: (resolve) => require(['@/views/system/actwork/details/tododetails'], resolve),
+        name: 'tododetails',
+        meta: { title: '待办详情' }
+      },
+      {
+        path: 'havedone/havedetails',
+        component: (resolve) => require(['@/views/system/actwork/details/havedetails'], resolve),
+        name: 'havedetails',
+        meta: { title: '已办详情' }
+      },
+    ]
   }
 
 
+
 ]
 
 export default new Router({

+ 28 - 8
src/views/system/actwork/ActToDraft.vue

@@ -69,20 +69,40 @@
      openactform(actkey){
          let vue = this;
          this.getactkey=actkey;//动态传参到下面的页面
-         // getformkeyByactkey(actkey).then(response=>{
-         //     alert(response.msg)
-         //     this.actForm =() => import(response.msg);
-         //     // this.actForm =() => import('../actform/fawen/fwToDraft');
-         //     this.path = this.actForm;
-         // });
+         // alert(actkey)
+         getformkeyByactkey(actkey).then(response=>{
+             // alert(response.msg)
+             var path = response.msg;
+             // alert(path)
+             // alert(`@/views/${path}`)
+             // alert('src/views/' + path)
 
-       var actForm =() => import('../actform/fawen/fwToDraft');
+             // this.actForm =() => import(`@/views/${path}`);
+             // this.actForm =() => import('@/views/' + path);
+             // alert(`@/views/${path}`)
+             this.actForm =() => Promise.resolve().then(()=>require(`@/views/${path}`))
+             // this.actForm =() => import('../actform/fawen/fwToDraft');
+             // this.path = this.actForm;
+             // this.qwe(response.msg);
+         });
 
+       // var actForm =() => import('../actform/fawen/fwToDraft');
 
          this.actOpen = true
-         return vue.actForm= actForm;
+        return vue.actForm= this.actForm;
          // return vue.actForm= this.actForm;
       },
+        // qwe(pt){
+        //     // alert( '第一步'+ pt)
+        //     // const path = pt
+        //     // alert(path)
+        //
+        //     // this.actForm  =() => require([`@/views/${pt}`],this.actForm);
+        //     this.actForm =() => import('@/views/' + pt );
+        //     // alert('第二步' + this.actForm);
+        //     this.actOpen = true
+        //     // return vue.actForm= actForm;
+        // },
       //返回流程分类
       getActList(){
         processtypelist().then(response => {

+ 15 - 0
src/views/system/actwork/details/havedetails.vue

@@ -0,0 +1,15 @@
+<template>
+    <div>
+      as
+    </div>
+</template>
+
+<script>
+    export default {
+        name: "havedetails"
+    }
+</script>
+
+<style scoped>
+
+</style>

+ 109 - 0
src/views/system/actwork/details/tododetails.vue

@@ -0,0 +1,109 @@
+<template>
+<!--  待办工作详情-->
+<div class="app-container">
+  <el-form ref="form" :model="form" label-width="100px">
+    <el-form-item label="来文标题 : ">
+      <el-input v-model="form.fwtitle"></el-input>
+    </el-form-item>
+    <el-form-item label="来文单位 : ">
+      <el-input v-model="form.fwdept"></el-input>
+    </el-form-item>
+    <el-form-item label="来文日期 : ">
+      <el-input v-model="form.createtime"></el-input>
+    </el-form-item>
+    <el-form-item label="流水号 : ">
+      <el-input ></el-input>
+    </el-form-item>
+    <el-form-item label="文件字号 : ">
+      <el-input ></el-input>
+    </el-form-item>
+    <el-form-item label="紧急程度 : ">
+      <el-input></el-input>
+    </el-form-item>
+    <el-form-item label="添加附件 : ">
+      <el-upload
+        class="upload-demo"
+        action="https://jsonplaceholder.typicode.com/posts/"
+        :on-preview="handlePreview"
+        :on-remove="handleRemove"
+        :before-remove="beforeRemove"
+        multiple
+        :limit="3"
+        :on-exceed="handleExceed"
+        :file-list="fileList">
+        <el-button size="small" type="primary">点击上传</el-button>
+      </el-upload>
+    </el-form-item>
+
+    <el-form-item label="收文原件 : ">
+      <el-input ></el-input>
+    </el-form-item>
+    <el-form-item label="发文对象 : ">
+      <el-input ></el-input>
+    </el-form-item>
+    <el-form-item>
+      <el-button  type="primary" @click="submitToDo">同 意</el-button>
+      <el-button type="danger" @click="deleteToDo">拒 绝</el-button>
+    </el-form-item>
+  </el-form>
+</div>
+</template>
+
+<script>
+  import { deleteToDoItem,submitToDoItem } from "@/api/activiti/form/fw";
+    export default {
+        name: "tododetails",
+        data(){
+            return{
+                form:this.$route.query.bd,
+                actkey:this.$route.query.id,
+              // 遮罩层
+              loading: true,
+              fileList:[]
+            }
+
+        },
+        created(){
+          this.info();
+        },
+        methods:{
+            info(row){
+                console.log(this.$route.query.bd);
+                // this.form = this.$route.query.id;
+            },
+          submitToDo(){
+            this.loading = true;
+            submitToDoItem(this.form.taskid).then(response => {
+              this.msgSuccess("已同意");
+              this.loading = false;
+            })
+          },
+          //拒绝按钮
+          deleteToDo(){
+            this.$confirm('是否确认拒绝这这个申请吗?', '警告', {
+              confirmButtonText: '确定',
+              cancelButtonText: '取消',
+              type: 'warning'
+            }).then(() => {
+               deleteToDoItem(this.form.taskid).then(response => {
+                 this.msgSuccess("已拒绝");
+               })
+
+            }).catch(() => {
+            });
+
+          }
+
+        },
+        $route(n,o){
+            if(n.actkey !== o.actkey){ //监听路由参数是否变化
+                this.form = {};
+                this.info()  //methods中封装的加载数据函数
+            }
+        },
+    }
+</script>
+
+<style scoped>
+
+</style>

+ 24 - 34
src/views/system/actwork/havedone.vue

@@ -42,8 +42,8 @@
     <el-table border  :data="infoList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="#" type="index" width="130" align="center"></el-table-column>
-      <el-table-column label="名称" width="180" align="center" prop="Name" />
-      <el-table-column label="标题" align="center" prop="Theme" />
+      <el-table-column label="名称" width="180" align="center" prop="fwtitle" />
+      <el-table-column label="标题" align="center" prop="fwdept" />
       <el-table-column label="创建时间" width="180" align="center" prop="createTime" >
         <template slot-scope="scope">
           <span>{{scope.row.createTime | format('yyyy-MM-dd hh:mm')}}</span>
@@ -55,13 +55,13 @@
             size="small"
             type="text"
           >提交流程</el-button>
-          <el-dropdown style="margin-left: 15px">
+          <el-dropdown style="margin-left: 15px" @command="handleCommand">
            <span class="el-dropdown-link" style="font-size: 12px;color: #188efd;">
               更多<i class="el-icon-arrow-down el-icon--right"></i>
            </span>
-            <el-dropdown-menu slot="dropdown">
+            <el-dropdown-menu slot="dropdown" >
               <el-dropdown-item>编辑</el-dropdown-item>
-              <el-dropdown-item>详情</el-dropdown-item>
+              <el-dropdown-item command="b">详情</el-dropdown-item>
               <el-dropdown-item>删除</el-dropdown-item>
             </el-dropdown-menu>
           </el-dropdown>
@@ -80,6 +80,8 @@
 </template>
 
 <script>
+
+    import { havedInfo } from "@/api/activiti/form/fw";
   export default {
     name: 'havedone',
     data(){
@@ -96,24 +98,7 @@
         // 总条数
         total: 0,
         // 【请填写功能名称】表格数据
-        infoList: [
-          {
-            Name:'用车申请',
-            Theme:'用车申请【JEECG用户】',
-            createTime:'2020-07-23'
-          },
-          {
-            Name:'用车申请',
-            Theme:'用车申请【JEECG用户】',
-            createTime:'2020-07-23'
-          },
-          {
-            Name:'用车申请',
-            Theme:'用车申请【JEECG用户】',
-            createTime:'2020-07-23'
-          }
-
-        ],
+        infoList: [],
         // 弹出层标题
         title: "",
         // 是否显示弹出层
@@ -122,16 +107,6 @@
         queryParams: {
           pageNum: 1,
           pageSize: 10,
-          senderName: undefined,
-          senderAccount: undefined,
-          receiverName: undefined,
-          receiverAccount: undefined,
-          mailTheme: undefined,
-          mailContent: undefined,
-          status: undefined,
-          deleteTime: undefined,
-          beginTime:undefined,
-          endTime:undefined
         },
         // 表单参数
         form: {},
@@ -144,10 +119,25 @@
       this.getList();
     },
     methods: {
+
+        handleCommand(command) {
+            if(command === 'b'){
+                this.detern();
+            }
+        },
+
+        detern(row){
+            alert("1");
+            this.reset();
+            const actkey = row.actkey || this.ids
+            const form = row || this.form
+            this.$router.push({path:'/actwork/havedone/havedetails',query: {bd:form,id:actkey }})
+        },
+
       /** 查询【请填写功能名称】列表 */
       getList() {
         this.loading = true;
-        listInfo(this.queryParams).then(response => {
+          havedInfo(this.queryParams).then(response => {
           this.infoList = response.rows;
           this.total = response.total;
           this.loading = false;

+ 18 - 15
src/views/system/actwork/todo.vue

@@ -39,7 +39,6 @@
         </el-form>
       </el-col>
     </el-row>
-
     <el-table border  :data="infoList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="#" type="index" width="130" align="center"></el-table-column>
@@ -56,12 +55,13 @@
             size="small"
             type="text"
             icon="el-icon-edit"
+            @click="detern(scope.row)"
           >详情</el-button>
           <el-button
             size="small"
             type="text"
             icon="el-icon-share"
-            @click="details"
+            @click="details(scope.row)"
           >审批进度</el-button>
         </template>
       </el-table-column>
@@ -72,6 +72,8 @@
       :page.sync="queryParams.pageNum"
       :limit.sync="queryParams.pageSize"
       @pagination="getList"/>
+
+
     <el-dialog title="审批跟踪记录" :visible.sync="dialogVisible" width="1200px">
 
       <el-tabs :tab-position="tabPosition" style="min-height: 200px;">
@@ -123,8 +125,6 @@
 
         dialogVisible:false,
         tabPosition:'left',
-
-
         // 遮罩层
         loading: true,
         // 选中数组
@@ -147,16 +147,6 @@
         queryParams: {
           pageNum: 1,
           pageSize: 10,
-          senderName: undefined,
-          senderAccount: undefined,
-          receiverName: undefined,
-          receiverAccount: undefined,
-          mailTheme: undefined,
-          mailContent: undefined,
-          status: undefined,
-          deleteTime: undefined,
-          beginTime:undefined,
-          endTime:undefined
         },
         // 表单参数
         form: {},
@@ -169,6 +159,19 @@
       this.getList();
     },
     methods: {
+
+        detern(row){
+            this.reset();
+            const actkey = row.actkey || this.ids
+            const form = row || this.form
+            this.$router.push({path:'/actwork/todo/tododetails',query: {bd:form,id:actkey }})
+            // getInfo(mailGuid).then(response => {
+            //     this.form = response.data;
+            //     // this.open = true;
+            //     // this.title = "修改";
+            // });
+        },
+
       // 详情
       details(){
         this.dialogVisible = true
@@ -177,7 +180,7 @@
       getList() {
         this.loading = true;
         listInfo(this.queryParams).then(response => {
-          this.infoList = response.data;
+          this.infoList = response.rows;
           this.total = response.total;
           this.loading = false;
         });

+ 3 - 3
src/views/system/email/draftinfo.vue

@@ -335,9 +335,9 @@
       // '$route':function(newUrl,oldUrl){
       //   this.mailGuid=this.$route.query.id;
       // },
-      mailGuid: function() {
-        this.info()
-      }
+      // mailGuid: function() {
+      //   this.info()
+      // }
     }
 
   }

+ 3 - 3
src/views/system/information/index.vue

@@ -507,8 +507,8 @@
               });
             };
           }
-          // alert(imgPathArr)
-          if(imgPathArr!=''&&imgPathArr!=null+","){
+          if(imgPathArr!=''&&imgPathArr!="null"){
+
             for (var i = 0; i < imgPathArr.length; i++) {
               this.img.oldFileList.push({
                 "url": process.env.VUE_APP_BASE_API + imgPathArr[i],
@@ -529,7 +529,7 @@
             }
             if (this.imgPath!=null ){
               this.form.img=this.imgPath.substring(0, this.imgPath.length - 1);
-              //  alert(this.form.img)
+
             }
             if (this.form.id != undefined) {
               updateMes(this.form).then(response => {

+ 125 - 176
src/views/system/notify_info/tzfs.vue

@@ -1,8 +1,8 @@
 <template>
   <div class="app-container">
-    <el-row>
-      <el-form ref="elForm" :model="formData" :rules="rules" size="medium" label-width="100px"
-               label-position="left">
+    <el-form ref="elForm" :model="formData" :rules="rules" size="medium" label-width="100px"
+             label-position="left">
+      <el-row>
         <el-col :span="24">
           <el-form-item label="收件主体" prop="deptflg" >
             <el-radio-group v-model="formData.deptflg" size="medium" @change="agreeChange">
@@ -19,8 +19,9 @@
                   type="primary"
                   icon="el-icon-plus"
                   size="mini"
-                  @click="handleSelect"
-                >选择人员</el-button>
+                  @click="handleSelect">
+                  选择人员
+                </el-button>
               </template>
             </el-input>
             <el-input v-model="formData.RecvAccount" v-show="false"/>
@@ -28,33 +29,28 @@
         </el-col>
         <el-col :span="24" v-if="showdw">
           <el-form-item label="收件单位" prop="deptId">
-<!--                        <el-tree-->
-<!--                          :data="deptOptions"-->
-<!--                          show-checkbox-->
-<!--                          default-expand-all-->
-<!--                          ref="dept"-->
-<!--                          node-key="id"-->
-<!--                          empty-text="加载中,请稍后"-->
-<!--                          :props="defaultProps"-->
-<!--                        ></el-tree>-->
-            <el-input v-model="formData.RecvPerson" placeholder="请选择部门" clearable="true">
+            <el-input v-model="formData.RecvPerson" placeholder="请选择单位" clearable="true">
               <template slot="append">
                 <el-button
                   type="primary"
                   icon="el-icon-plus"
                   size="mini"
-                  @click="handleDept"
-                >选择部门</el-button>
+                  @click="handledept">
+                  选择单位
+                </el-button>
               </template>
             </el-input>
+            <el-input v-model="formData.RecvAccount" v-show="false"/>
           </el-form-item>
         </el-col>
+
         <el-col :span="24">
           <el-form-item label="通知标题" prop="Title">
             <el-input v-model="formData.Title" placeholder="请输入通知标题" clearable :style="{width: '100%'}">
             </el-input>
           </el-form-item>
         </el-col>
+
         <el-col :span="24">
           <el-form-item label="通知内容" prop="Content" style="height: 240px;">
             <Editor v-model="formData.Content" />
@@ -97,48 +93,53 @@
             <el-button @click="resetForm">重置</el-button>
           </el-form-item>
         </el-col>
-      </el-form>
-      <select-user-by-dept ref="selectUserByDept" :title="title" :open="open" :inputName="receiverName" :inputAccount="receiverAccount" append-to-body @ok="selectOK"/>
-      <el-dialog :title="title" :visible.sync="open1" width="20%" :show-close="false" append-to-body>
-        <el-form ref="form" :model="form" :rules="rules" label-width="80px">
-          <el-table
-            v-loading="loading"
-            :data="deptList"
-            row-key="deptId"
-            default-expand-all
-            :tree-props="{children: 'children', hasChildren: 'hasChildren'}" @selection-change="handleSelectionChange" >
-            <el-table-column type="selection" width="55"></el-table-column>
-            <el-table-column prop="deptName" label="部门名称" width="260"></el-table-column>
-<!--            <el-table-column label="创建时间" align="center" prop="createTime" width="200">-->
-<!--              <template slot-scope="scope">-->
-<!--                <span>{{ parseTime(scope.row.createTime) }}</span>-->
-<!--              </template>-->
-<!--            </el-table-column>-->
-          </el-table>
-        </el-form>
-        <div slot="footer" class="dialog-footer">
-          <el-button type="primary" @click="submitForm1">确 定</el-button>
-          <el-button @click="cancel">取 消</el-button>
-        </div>
-      </el-dialog>
-    </el-row>
+      </el-row>
+    </el-form>
+
+
+    <!-- 选择人员对话框 -->
+    <el-dialog :title="tctitle" :visible.sync="open" width="1000px" append-to-body>
+      <SelectRen ref="renlist"/>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="cancel">取 消</el-button>
+        <el-button type="primary" @click="submitRen">选 定</el-button>
+      </div>
+    </el-dialog>
+    <el-dialog :title="tctitle" :visible.sync="open1" 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 { listDept } from "@/api/system/dept";
 
-  import { addtzfs,uploadfj } from "@/api/system/notify_info/tzfs";
+  import SelectRen from '@/components/SelectRen';
+  import { addtzfs,uploadfj } from "@/api/system/tzgl/tzfs";
   import { treeselect } from "@/api/system/dept";
   import Treeselect from "@riophae/vue-treeselect";
   import "@riophae/vue-treeselect/dist/vue-treeselect.css";
   import Editor from '@/components/Editor';
   export default {
     components: {
-      SelectUserByDept,
-      // SelectDept,
-      Editor
+      SelectRen,
+      Treeselect,
+      Editor,
     },
     props: [],
     data() {
@@ -154,14 +155,14 @@
           deptflg:0,
           fileName:'',
           filePath:'',
-          single:true
         },
+
         rules: {
-          // deptId:[{
-          //   required:true,
-          //   message:'请选择收件单位',
-          //   trigger:'blur'
-          // }],
+          deptId:[{
+            required:true,
+            message:'请选择收件单位',
+            trigger:'blur'
+          }],
           RecvPerson:[{
             required:true,
             message:'请选择收件人',
@@ -187,11 +188,11 @@
             message: '请输入收件人',
             trigger: 'blur'
           }],
-          // SendAccount: [{
-          //   required: true,
-          //   message: '请输入收件单位',
-          //   trigger: 'blur'
-          // }],
+          SendAccount: [{
+            required: true,
+            message: '请输入收件单位',
+            trigger: 'blur'
+          }],
           ContactPerson: [{
             required: true,
             message: '请输入联系人',
@@ -210,16 +211,18 @@
         tctitle: "",
         // 是否显示弹出层
         open: false,
-        open1: false,
+        open1:false,
         filterText: '',  //人员选择器中的 筛选
+
         // 部门树选项
         deptOptions: [],
         defaultProps: {
           children: "children",
           label: "label"
         },
+
         // 部门id
-        depid: [],
+
         depname:[],
         deptflgOptions: [{
           "label": "个人",
@@ -237,102 +240,32 @@
     // watch: {},
     created() {
       this.getTreeselect();
-      this.getList();
-      this.getDicts("sys_normal_disable").then(response => {
-        this.statusOptions = response.data;
-      });
-
     },
     //mounted() {},
     methods: {
-      handleSelectionChange(selection) {
-        // this.ids = selection.map(item => item.id)
-       //  this.single = selection.length!=1
-        // this.multiple = !selection.length
-        this.depid = selection.map(item => item.deptId);
-        this.depname = selection.map(item => item.deptName);
-
-      },
-
-
-      /** 写信中的 选择人员 按钮弹窗操作 */
-      handleSelect() {
-        this.$refs.selectUserByDept.childOpen=true;
-        this.open = true;
-        this.title = "选择收件人";
-      },
-      selectOK(zh, xm) {
-        this.formData.RecvPerson = xm;
-        this.formData.RecvAccount = zh;
-        this.open=false;
-      },
-      /** 写信中的 选择部门 按钮弹窗操作 */
-      /** 查询部门列表 */
-      handleDept() {
-        this.open1=true;
-        this.title = "选择部门";
-      },
-      getList() {
-        this.loading = true;
-        listDept(this.queryParams).then(response => {
-          this.deptList = this.handleTree(response.data, "deptId");
-          this.loading = false;
-        });
-      },
-      /** 转换部门数据结构 */
-      normalizer(node) {
-        if (node.children && !node.children.length) {
-          delete node.children;
-        }
-        return {
-          id: node.deptId,
-          label: node.deptName,
-          children: node.children
-        };
-      },
-      // 字典状态字典翻译
-      statusFormat(row, column) {
-        return this.selectDictLabel(this.statusOptions, row.status);
-      },
-
-      submitForm1(){
-      //  alert("success")
-       // alert(this.depid)
-        this.formData.RecvPerson = this.depname;
-        this.open1=false;
-      },
-
       submitForm() {
         this.$refs['elForm'].validate(valid => {
-          if (valid) {
-            // TODO 提交表单
-            if (this.formData.deptflg === 1) {
-              this.formData.deptId = "";
-              // this.depid = this.getDeptAllCheckedKeys();
-             // alert(this.depid.length)
-              if (this.depid.length > 0) {
-                for (let i = 0; i < this.depid.length; i++) {
-                  this.formData.deptId += this.depid[i] + ',';
-                }
-              }else{
-                this.msgError("请选择收件单位") ;
-                return false;
-              }
-            } else {
-              if (this.formData.RecvAccount == "" || this.formData.RecvAccount == null) {
-                this.msgError("请点击“选择人员”按钮,选择收件人");
-                return false;
+          // TODO 提交表单
+          if (this.formData.deptflg === 1) {
+            this.formData.deptId = "";
+            this.depid = this.getDeptAllCheckedKeys();
+            if (this.depid.length > 0) {
+              for (let i = 0; i < this.depid.length; i++) {
+                this.formData.deptId += this.depid[i] + ',';
               }
             }
-
-            addtzfs(this.formData).then(response => {
-              if (response.code === 200) {
-                this.msgSuccess("发送成功");
-                this.open = false; this.open1 = false;
-                this.reset();
-              }
-            });
           }
+
+          addtzfs(this.formData).then(response => {
+
+            if (response.code === 200) {
+              this.msgSuccess("发送成功");
+              this.open = false;
+              this.open1 = false;
+              this.getTreeselect();
+              this.reset();
+            }
+          });
         })
       },
 
@@ -356,40 +289,55 @@
         this.depid = [];
         this.deptOptions = [];
         this.open = false;
+        this.open1 = false;
         this.fjfileList = [];
         this.fileList = [];
+        this.depname=[];
         this.resetForm();
       },
-
       resetForm() {
+
+        this.depname=[];
+        this.formData.RecvPerson=[];
+        this.formData.RecvAccount=[];
         this.$refs['elForm'].resetFields()
-      },
 
+      },
+      /** ---------------收件人---------------*/
+      handleSelect() {
+        this.open = true;
+        this.tctitle = "选择收件人";
+      },
 
+      submitRen(){
+        this.formData.RecvPerson =this.$refs.renlist.names.join(',');
+        this.formData.RecvAccount=this.$refs.renlist.accounts.join(',');
+        this.open = false;
+      },
+      watch: {
+        /** 人员选择器中的 筛选 */
+        filterText(val) {
+          this.$refs.tree.filter(val);
+        }
+      },
       /** ---------------收件人end---------------*/
       cancel() {
         this.open = false;
         this.open1 = false;
         this.filterText='';
+
+      },
+      handledept() {
+        this.open1 = true;
+        this.tctitle = "选择部门";
       },
       /** --------------查询部门下拉树结构---------------- */
       getTreeselect() {
         treeselect().then(response => {
           this.deptOptions = response.data;
+          console.log(response.data)
         });
       },
-      /**            <!--            <el-tree-->
-       <!--              :data="deptOptions"-->
-       <!--              show-checkbox-->
-       <!--              default-expand-all-->
-       <!--              ref="dept"-->
-       <!--              node-key="id"-->
-       <!--              empty-text="加载中,请稍后"-->
-       <!--              :props="defaultProps"-->
-       <!--            ></el-tree>-->*/
-      handleNodeClick(data) {
-        console.log(data);
-      },
       // 筛选节点
       filterNode(value, data) {
         if (!value) return true;
@@ -403,8 +351,6 @@
       getRoleDeptTreeselect(roleId) {
         roleDeptTreeselect(roleId).then(response => {
           this.deptOptions = response.depts;
-          // this.deptOptions = response.data;
-          console.log(response)
           this.$refs.dept.setCheckedKeys(response.checkedKeys);
         });
       },
@@ -421,9 +367,18 @@
         let checkedKeys = this.$refs.dept.getHalfCheckedKeys();
         // 半选中的部门节点
         let halfCheckedKeys = this.$refs.dept.getCheckedKeys();
+        let a= this.$refs.dept.getCheckedNodes();
+        for (let i = 0; i <a.length ; i++) {
+          this.depname.push(a[i].label)
+        }
+        console.log(this.depname)
         checkedKeys.unshift.apply(checkedKeys, halfCheckedKeys);
-        //return checkedKeys;
+        this.formData.RecvAccount =halfCheckedKeys ;
+        this.formData.RecvPerson = this.depname ;
+        this.open1=false;
+        this.depname=[];
         return halfCheckedKeys;
+
       },
       /** 根据角色ID查询部门树结构 */
       getRoleDeptTreeselect(roleId) {
@@ -432,6 +387,7 @@
           this.$refs.dept.setCheckedKeys(response.checkedKeys);
         });
       },
+
       /** ---------------查询部门下拉树结构end----------------- */
 
       /** ---------------附件----------------- */
@@ -448,7 +404,7 @@
       },
       handleSuccess(file, fileInfo) {
         console.log(fileInfo);
-        debugger;
+
         this.fileList.push({
           name: fileInfo.name,
           uuid: fileInfo.uid,
@@ -460,13 +416,8 @@
         this.fjfileList.forEach((item, index) => {
           debugger;
           console.log(item);
-          console.log(this.formData.fileName);
           if (item.uid === file.uid) {
             this.fjfileList.splice(index, 1);
-            this.fileList.splice(index, 1);
-            this.formData.fileName=this.formData.fileName.replace(""+item.name+",","");
-            this.formData.filePath=this.formData.filePath.replace(""+item.filepath+",","");
-            console.log(this.formData.fileName);
             //删除
           }
         });
@@ -474,8 +425,6 @@
       beforeRemove(file, fileList) {
         return this.$confirm(`确定移除 ${ file.name }?`);
       },
-
-      //附件上传
       fileRequest(item) {
         let uploadData = new FormData()
         uploadData.append('file',item.file)
@@ -495,7 +444,7 @@
       /** ---------------附件end----------------- */
       agreeChange(val){
         let app = this;
-        debugger;
+
         this.formData.deptflg=val;
         if(val===0)
         {
@@ -511,7 +460,7 @@
     }
   };
 </script>
-<style>
+<style >
   .el-upload__tip {
     line-height: 1.2;
   }