yrik 3 år sedan
förälder
incheckning
06b1a71552

+ 68 - 0
ruoyi-ui/src/api/system/tatementsetr.js

@@ -0,0 +1,68 @@
+import request from '@/utils/request'
+
+// 查询部门列表
+export function tistDept(query) {
+  return request({
+    url: '/boman-report/statistic/report/datas',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询部门列表(排除节点)
+export function listDeptExcludeChild(id) {
+  return request({
+    url: '/system/dept/list/exclude/' + id,
+    method: 'get'
+  })
+}
+
+// 查询部门详细
+export function getDept(id) {
+  return request({
+    url: '/system/dept/' + id,
+    method: 'get'
+  })
+}
+
+// 查询部门下拉树结构
+export function treeselect() {
+  return request({
+    url: '/system/dept/treeselect',
+    method: 'get'
+  })
+}
+
+// 根据角色ID查询部门树结构
+export function roleDeptTreeselect(roleId) {
+  return request({
+    url: '/system/dept/roleDeptTreeselect/' + roleId,
+    method: 'get'
+  })
+}
+
+// 新增部门
+export function addDeptiu(data) {
+  return request({
+    url: '/boman-report/statistic/report/saveOrUpdate',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改部门
+export function updateDept(data) {
+  return request({
+    url: '/system/dept',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除部门
+export function delDept(id) {
+  return request({
+    url: '/system/dept/' + id,
+    method: 'delete'
+  })
+}

BIN
ruoyi-ui/src/assets/images/pic_zt_jxz.png


+ 1 - 0
ruoyi-ui/src/store/modules/user.js

@@ -46,6 +46,7 @@ const user = {
         login(username, password, code, uuid).then(res => {
           let data = res.data
           setToken(data.access_token)
+		  localStorage.setItem('JmReport-Access-Token', data.access_token);
           commit('SET_TOKEN', data.access_token)
           setExpiresIn(data.expires_in)
           commit('SET_EXPIRES_IN', data.expires_in)

+ 0 - 1
ruoyi-ui/src/views/system/issue/index.vue

@@ -768,7 +768,6 @@ export default {
     // 人员选择
     changeren(){
     this.modalShow = true
-
     },
     // 上传文件
     handleChangert(file, fileList) {

+ 667 - 200
ruoyi-ui/src/views/system/tatementsetr/index.vue

@@ -1,34 +1,17 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
-      <el-form-item label="字典名称" prop="dictName">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch">
+      <el-form-item label="部门名称" prop="deptName">
         <el-input
-          v-model="queryParams.dictName"
-          placeholder="请输入字典名称"
+          v-model="queryParams.deptName"
+          placeholder="请输入部门名称"
           clearable
           size="small"
-          style="width: 240px"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="字典类型" prop="dictType">
-        <el-input
-          v-model="queryParams.dictType"
-          placeholder="请输入字典类型"
-          clearable
-          size="small"
-          style="width: 240px"
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
       <el-form-item label="状态" prop="status">
-        <el-select
-          v-model="queryParams.status"
-          placeholder="字典状态"
-          clearable
-          size="small"
-          style="width: 240px"
-        >
+        <el-select v-model="queryParams.status" placeholder="部门状态" clearable size="small">
           <el-option
             v-for="dict in statusOptions"
             :key="dict.dictValue"
@@ -37,18 +20,6 @@
           />
         </el-select>
       </el-form-item>
-      <el-form-item label="创建时间">
-        <el-date-picker
-          v-model="dateRange"
-          size="small"
-          style="width: 240px"
-          value-format="yyyy-MM-dd"
-          type="daterange"
-          range-separator="-"
-          start-placeholder="开始日期"
-          end-placeholder="结束日期"
-        ></el-date-picker>
-      </el-form-item>
       <el-form-item>
         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@@ -63,68 +34,23 @@
           icon="el-icon-plus"
           size="mini"
           @click="handleAdd"
-          v-hasPermi="['system:dict:add']"
+          v-hasPermi="['sys_dept:A']"
         >新增</el-button>
       </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="success"
-          plain
-          icon="el-icon-edit"
-          size="mini"
-          :disabled="single"
-          @click="handleUpdate"
-          v-hasPermi="['system:dict:edit']"
-        >修改</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="danger"
-          plain
-          icon="el-icon-delete"
-          size="mini"
-          :disabled="multiple"
-          @click="handleDelete"
-          v-hasPermi="['system:dict:remove']"
-        >删除</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="warning"
-          plain
-          icon="el-icon-download"
-          size="mini"
-          @click="handleExport"
-          v-hasPermi="['system:dict:export']"
-        >导出</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="danger"
-          plain
-          icon="el-icon-refresh"
-          size="mini"
-          @click="handleClearCache"
-          v-hasPermi="['system:dict:remove']"
-        >清理缓存</el-button>
-      </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
-    <el-table v-loading="loading" :data="typeList" @selection-change="handleSelectionChange">
-      <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="字典编号" align="center" prop="id" />
-      <el-table-column label="字典名称" align="center" prop="dictName" :show-overflow-tooltip="true" />
-      <el-table-column label="字典类型" align="center" :show-overflow-tooltip="true">
-        <template slot-scope="scope">
-          <router-link :to="'/dict/type/data/' + scope.row.id" class="link-type">
-            <span>{{ scope.row.dictType }}</span>
-          </router-link>
-        </template>
-      </el-table-column>
-      <el-table-column label="状态" align="center" prop="status" :formatter="statusFormat" />
-      <el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" />
-      <el-table-column label="创建时间" align="center" prop="createTime" width="180">
+    <el-table
+      v-loading="loading"
+      :data="deptList"
+      row-key="id"
+      default-expand-all
+      :tree-props="{children: 'children', hasChildren: 'hasChildren'}"
+    >
+      <el-table-column prop="deptName" label="部门名称" width="260"></el-table-column>
+      <el-table-column prop="orderNum" label="排序" width="200"></el-table-column>
+      <el-table-column prop="status" label="状态" :formatter="statusFormat" width="100"></el-table-column>
+      <el-table-column label="创建时间" align="center" prop="createTime" width="200">
         <template slot-scope="scope">
           <span>{{ parseTime(scope.row.createTime) }}</span>
         </template>
@@ -136,105 +62,253 @@
             type="text"
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
-            v-hasPermi="['system:dict:edit']"
+            v-hasPermi="['sys_dept:M']"
           >修改</el-button>
           <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-plus"
+            @click="handleAdd(scope.row)"
+            v-hasPermi="['sys_dept:A']"
+          >新增</el-button>
+          <el-button
+            v-if="scope.row.id != 0"
             size="mini"
             type="text"
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
-            v-hasPermi="['system:dict:remove']"
+            v-hasPermi="['sys_dept:D']"
           >删除</el-button>
         </template>
       </el-table-column>
     </el-table>
 
-    <pagination
-      v-show="total>0"
-      :total="total"
-      :page.sync="queryParams.pageNum"
-      :limit.sync="queryParams.pageSize"
-      @pagination="getList"
-    />
+    <!-- 添加或修改部门对话框 -->
+    <el-dialog :close-on-click-modal="false" :title="title" :visible.sync="open" width="900px" append-to-body >
+      <el-form ref="form" :model="form" :rules="rules" label-width="120px">
+        <el-row>
+          <el-col :span="24">
+            <el-form-item label="报表名称:" prop="reportName">
+              <el-input v-model="form.reportName" placeholder="请输入报表名称" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="24">
+            <el-form-item label="报表设计器:" prop="reportId">
+              <treeselect v-model="form.reportId" :options="deptOptionstwofr" :normalizer="normalizerghy" placeholder="选择报表设计器" />
+            </el-form-item>
+          </el-col>
 
-    <!-- 添加或修改参数配置对话框 -->
-    <el-dialog :close-on-click-modal="false" :title="title" :visible.sync="open" width="500px" append-to-body>
-      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
-        <el-form-item label="字典名称" prop="dictName">
-          <el-input v-model="form.dictName" placeholder="请输入字典名称" />
-        </el-form-item>
-        <el-form-item label="字典类型" prop="dictType">
-          <el-input v-model="form.dictType" placeholder="请输入字典类型" />
-        </el-form-item>
-        <el-form-item label="状态" prop="status">
-          <el-radio-group v-model="form.status">
-            <el-radio
-              v-for="dict in statusOptions"
-              :key="dict.dictValue"
-              :label="dict.dictValue"
-            >{{dict.dictLabel}}</el-radio>
-          </el-radio-group>
-        </el-form-item>
-        <el-form-item label="备注" prop="remark">
-          <el-input v-model="form.remark" type="textarea" placeholder="请输入内容"></el-input>
-        </el-form-item>
+          <el-col :span="24">
+            <el-form-item label="表格模板" prop="orderNum">
+              <el-upload
+               :disabled="false" class="upload-demo" :headers="{Authorization: 'Bearer ' + getToken()}"
+                  :action="process + '/boman-file/upload'" :on-change="handleChangert"
+                 :on-success="upImageFn" :on-error="err" :on-remove="reseImage" :file-list="configtwo" :on-preview="handlePictureCardPreview" :before-upload="befors" :multiple="false" >
+                <el-button size="small" type="primary">点击上传</el-button>
+                <div slot="tip" class="el-upload__tip" style="color: red; font-size: 14px;">只能上传xls/xlsx文件,且不超过50MB</div>
+              </el-upload>
+            </el-form-item>
+          </el-col>
+          <el-col :span="24">
+            <el-form-item label="开始时间:" prop="startTime">
+              <el-date-picker
+                    v-model="form.startTime"
+                    type="date"
+                    placeholder="选择日期">
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
+          <el-col :span="24">
+            <el-form-item label="截止时间:" prop="phone">
+              <el-date-picker
+                    v-model="form.endTime"
+                    type="date"
+                    placeholder="选择日期">
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
+          <el-col :span="24">
+            <el-form-item label="参与人员:" prop="email">
+               <!-- <treeselect v-model="form.parentId" :options="deptOptions" :normalizer="normalizer" placeholder="选择报表设计器" /> -->
+              <el-input v-model="messageReun"  :disabled="true"  >
+                  <el-button style="padding: 9px 15px; font-size: 12px; border-radius: 3px;" size="small" type="primary" slot="prepend" @click="changeren">选择人员</el-button>
+              </el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="注意事项:">
+              <el-input   type="textarea"
+  :rows="2" v-model="form.remark" placeholder="请输入注意事项" style="width: 100%;" />
+            </el-form-item>
+          </el-col>
+        </el-row>
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="submitForm">确 定</el-button>
         <el-button @click="cancel">取 消</el-button>
       </div>
     </el-dialog>
+    <!-- 分配角色数据权限对话框 -->
+    <el-dialog   :close-on-click-modal="false" title="选择人员" :visible.sync="modalShow" width="980px" append-to-body>
+      <!-- <Flowshoe  :instanceId="instanceId"></Flowshoe> -->
+      <div class="tab_bott">
+        <div class="tabBot_oje">
+          <el-tabs type="border-card" v-model="activeName" @tab-click="handleClick">
+            <!-- :setCheckedKeys='setCheckedKeys' :getCheckedKeys = "getCheckedKeys" -->
+            <el-tab-pane label="按部门" name="first">
+              <div class="head-container">
+                <el-input
+                  v-model="deptName"
+                  placeholder="请输入部门名称"
+                  clearable
+                  size="small"
+                  prefix-icon="el-icon-search"
+                  style="margin-bottom: 20px"
+                />
+              </div>
+              <div class="head-container">
+                <el-tree
+                  :data="deptOptions"
+                  :expand-on-click-node="false"
+                  :props="defaultProps"
+                  :filter-node-method="filterNode"
+                  ref="tree"
+                  default-expand-all
+                  @node-click="handleNodeClick"
+                />
+              </div>
+            </el-tab-pane>
+            <el-tab-pane label="按角色" name="second" style="height: 400px;">
+               <treeselect v-model="form.parentId" :options="deptOptionstwo" :normalizer="normalizer" :flat="true" :maxHeight="150" @select="djieskle" placeholder="点击选择角色" />
+            </el-tab-pane>
+            <el-tab-pane label="按组" name="third" style="height: 400px;">
+             <treeselect  v-model="form.parentIdty" :options="deptOptionsthre" :normalizer="normalizerty" :flat="true" @select="djieskletwo" :maxHeight="350" placeholder="点击选择组" />
+            </el-tab-pane>
+          </el-tabs>
+        </div>
+        <div class="tabBot_two">
+          <el-card class="box-card box-cardtt" shadow="always">
+              <div slot="header" class="clearfix">
+                <span>人员</span>
+               <el-button style=" float: right;  padding: 3px 10px;" type="danger" plain @click="eledelte">删除</el-button>
+               <el-button style=" float: right; padding: 3px 10px;margin-right: 20px;" type="primary" plain @click="quande">全选</el-button>
+              </div>
+              <ul class="infinite-list infinite-listty" v-infinite-scroll="load" style="overflow:auto">
+                  <li
+                    v-for="(item, index) in liseh"
+                    :class="[ quandet==true? 'infinite-list-itemty infinite-list-itemss' : item.id == idneese.id ? 'infinite-list-itemty infinite-list-itemss' : 'infinite-list-itemty']"
+                    :key="index"
+                    @click="reyantt(item)"
+                  >
+                    {{ item.nickName }}
+                  </li>
+                </ul>
+              </el-card>
+              <el-card class="box-card box-cardtt" shadow="always">
+                <div slot="header" class="clearfix">
+                  <span>已选择</span>
+                  <el-button style="float: right; padding: 3px 0" type="text" @click = 'determine'>确定</el-button>
+                </div>
+                <ul class="infinite-list infinite-listty" v-infinite-scroll="load" style="overflow:auto">
+                  <li v-for="item in lisehtwo" @click="lidele(item)" :key="item.id" class="infinite-list-item">
+                    {{ item.nickName }}
+                    <img src="../../../assets/images/dele.png" alt="" class="index_navTimeimg" />
+                  </li>
+                </ul>
+              </el-card>
+        </div>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
 <script>
-import { listType, getType, delType, addType, updateType, clearCache } from "@/api/system/dict/type";
-
+import { listDept, getDept, delDept,  updateDept, listDeptExcludeChild } from "@/api/system/dept";
+import { tistDept,addDeptiu } from "@/api/system/tatementsetr";
+import { listRoles,listIndex,   delRole, addRole,addbjectSave, updateRole, exportRole, dataScope, changeRoleStatus, buent,issdanelist,issdaneid,weiduhegw,addbjectSawen } from "@/api/system/isses";
+import { treeselect } from "@/api/system/dept";
+  import Treeselect from "@riophae/vue-treeselect";
+  import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+import {
+    getToken
+  } from "@/utils/auth";
+  import { group , getRole, getPersonnel, getMembers,delRoleses } from '@/api/system/election';
+  import { listRole } from "@/api/system/role";
 export default {
-  name: "Dict",
+  name: "Dept",
+  components: { Treeselect },
   data() {
     return {
       // 遮罩层
       loading: true,
-      // 选中数组
-      ids: [],
-      // 非单个禁用
-      single: true,
-      // 非多个禁用
-      multiple: true,
       // 显示搜索条件
       showSearch: true,
-      // 总条数
-      total: 0,
-      // 字典表格数据
-      typeList: [],
+      // 表格树数据
+      deptList: [],
+      deptOptionstwofr:[],
+      // 部门树选项
+      deptOptions: [],
+      // 角色
+      deptOptionstwo:[],
+      deptOptionsthre:[],
+      configtwo: [],
       // 弹出层标题
       title: "",
+      process: process.env.VUE_APP_BASE_API,
       // 是否显示弹出层
       open: false,
       // 状态数据字典
       statusOptions: [],
-      // 日期范围
-      dateRange: [],
+      // 部门名称
+      deptName: undefined,
       // 查询参数
       queryParams: {
-        pageNum: 1,
-        pageSize: 10,
-        dictName: undefined,
-        dictType: undefined,
+        deptName: undefined,
         status: undefined
       },
+      queryParamsjuegt:{
+       pageNo:1,
+       pageSize:1000,
+       reportType:'datainfo'
+      },
       // 表单参数
-      form: {},
+      form: {
+        personnels:[{
+           deptId: 0,
+           deptName: "",
+           userId: 0,
+            userName: ""
+        }]
+      },
+      activeName:'first',
+      modalShow:false,
       // 表单校验
       rules: {
-        dictName: [
-          { required: true, message: "字典名称不能为空", trigger: "blur" }
+        reportName: [
+          { required: true, message: "报表名称不能为空", trigger: "blur" }
         ],
-        dictType: [
-          { required: true, message: "字典类型不能为空", trigger: "blur" }
-        ]
-      }
+
+      },
+       quandet:false,
+       lisehtwo:[
+       ],
+       liseh: [
+             ],
+      idneese: {},
+      messageReun:'',
+      frowtse:{
+
+      },
+      // 单位  名称
+      mpany:{
+        ompany:[],
+        name:[]
+        },
+        config:[],
+        defaultProps: {
+          children: "children",
+          label: "label"
+        },
     };
   },
   created() {
@@ -242,17 +316,40 @@ export default {
     this.getDicts("sys_normal_disable").then(response => {
       this.statusOptions = response.data;
     });
+    this.getTreeselect()
   },
   methods: {
-    /** 查询字典类型列表 */
+    /** 查询部门列表 */
     getList() {
       this.loading = true;
-      listType(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
-          this.typeList = response.rows;
-          this.total = response.total;
-          this.loading = false;
-        }
-      );
+      tistDept().then(response => {
+        this.deptOptionstwofr = response.data.reports
+        this.loading = false;
+      });
+    },
+    /** 转换部门数据结构 */
+    /** 转换角色数据结构 */
+    normalizer(node) {
+      // if (node.children && !node.children.length) {
+      //   delete node.children;
+      // }
+      return {
+        id: node.id,
+        label: node.roleName,
+      };
+    },
+    /** 转换组数据结构 */
+    normalizerty(node) {
+      return {
+        id: node.id,
+        label: node.groupName,
+      };
+    },
+    normalizerghy(node){
+      return {
+        id: node.id,
+        label: node.name,
+      };
     },
     // 字典状态字典翻译
     statusFormat(row, column) {
@@ -266,93 +363,463 @@ export default {
     // 表单重置
     reset() {
       this.form = {
-        id: undefined,
-        dictName: undefined,
-        dictType: undefined,
-        status: "0",
-        remark: undefined
+        personnels:[{
+           deptId: 0,
+           deptName: "",
+           userId: 0,
+            userName: ""
+        }]
       };
       this.resetForm("form");
     },
     /** 搜索按钮操作 */
     handleQuery() {
-      this.queryParams.pageNum = 1;
       this.getList();
     },
     /** 重置按钮操作 */
     resetQuery() {
-      this.dateRange = [];
       this.resetForm("queryForm");
       this.handleQuery();
     },
     /** 新增按钮操作 */
-    handleAdd() {
+    handleAdd(row) {
       this.reset();
+      if (row != undefined) {
+        // this.form.parentId = row.id;
+      }
       this.open = true;
-      this.title = "添加字典类型";
-    },
-    // 多选框选中数据
-    handleSelectionChange(selection) {
-      this.ids = selection.map(item => item.id)
-      this.single = selection.length!=1
-      this.multiple = !selection.length
+      this.title = "添加部门";
+      listDept().then(response => {
+	        this.deptOptions = this.handleTree(response.data, "id");
+      });
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
       this.reset();
-      const id = row.id || this.ids
-      getType(id).then(response => {
-        this.form = response.data;
+      getDept(row.id).then(response => {
+        // this.form = response.data;
         this.open = true;
-        this.title = "修改字典类型";
+        this.title = "修改部门";
+      });
+      listDeptExcludeChild(row.id).then(response => {
+	        this.deptOptions = this.handleTree(response.data, "id");
       });
     },
     /** 提交按钮 */
     submitForm: function() {
       this.$refs["form"].validate(valid => {
-        if (valid) {
-          if (this.form.id != undefined) {
-            updateType(this.form).then(response => {
-              this.msgSuccess("修改成功");
-              this.open = false;
-              this.getList();
-            });
-          } else {
-            addType(this.form).then(response => {
-              this.msgSuccess("新增成功");
-              this.open = false;
-              this.getList();
-            });
-          }
+       console.log(this.lisehtwo)
+      if(this.lisehtwo.length == 0){
+         this.msgSuccess("请选择分发人员");
+         return false
+      }
+      for(var i = 0 ; i < this.lisehtwo.length; i++){
+        this.form.personnels[i] = {deptId:0,deptName:'',userId:0,userName:''}
+        this.form.personnels[i].userId = this.lisehtwo[i].id
+        this.form.personnels[i].userName = this.lisehtwo[i].userName
+        this.form.personnels[i].deptId  = this.lisehtwo[i].deptId
+        if(this.lisehtwo[i].dept !== undefined && this.lisehtwo[i].dept !==null){
+          this.form.personnels[i].deptName = this.lisehtwo[i].dept.deptName
+          // this.form.personnels[i].deptId  = this.lisehtwo[i].dept.deptId
+        }else{
+          this.form.personnels[i].deptName = this.lisehtwo[i].deptName
+
         }
+      }
+
+      console.log(this.form)
+          addDeptiu(this.form).then(response => {
+            this.msgSuccess("新增成功");
+            this.open = false;
+            this.getList();
+          });
+        // if (valid) {
+        //   if (this.form.id != undefined) {
+        //     updateDept(this.form).then(response => {
+        //       this.msgSuccess("修改成功");
+        //       this.open = false;
+        //       this.getList();
+        //     });
+        //   } else {
+        //     addDept(this.form).then(response => {
+        //       this.msgSuccess("新增成功");
+        //       this.open = false;
+        //       this.getList();
+        //     });
+        //   }
+        // }
       });
     },
     /** 删除按钮操作 */
     handleDelete(row) {
-      const ids = row.id || this.ids;
-      this.$confirm('是否确认删除字典编号为"' + ids + '"的数据项?', "警告", {
+      this.$confirm('是否确认删除名称为"' + row.deptName + '"的数据项?', "警告", {
           confirmButtonText: "确定",
           cancelButtonText: "取消",
           type: "warning"
         }).then(function() {
-          return delType(ids);
+          return delDept(row.id);
         }).then(() => {
           this.getList();
           this.msgSuccess("删除成功");
         })
     },
-    /** 导出按钮操作 */
-    handleExport() {
-      this.download('system/dict/type/export', {
-        ...this.queryParams
-      }, `type_${new Date().getTime()}.xlsx`)
+    // 上传文件
+    handleChangert(file, fileList) {
+      // this.fileList = []
+      const jieg = []
+      jieg.push(fileList[fileList.length - 1])
+      console.log(jieg)
+      this.fileList = jieg.slice(-3);
     },
-    /** 清理缓存按钮操作 */
-    handleClearCache() {
-      clearCache().then(response => {
-        this.msgSuccess("清理成功");
-      });
+    upImageFn(res, file) {
+      if(res.code !== 200){
+        this.msgSuccess('上传失败');
+        return false
+      }else{
+        this.msgSuccess('上传成功');
+        this.config= res.data
+        console.log(res.data)
+        console.log(res.data.name.substr(0,res.data.name.length-4))
+
+        // this.querjtgoe.message_upload = this.config
+        // console.log(this.querjtgoe.message_upload)
+        this.form.templateName = res.data.name
+        this.form.repUploadFile = JSON.stringify(this.config)
+        // this.querjtgoe.message_title = res.data.name.substr(0,res.data.name.length-4)
+        // this.querjtgoe.message_upload = JSON.stringify(this.querjtgoe.message_upload)
+      }
+      // querjtgoe.message_title
+      console.log(res)
+      // console.log(res.data.name.substr(-4))
+    },
+    err(){
+      this.msgSuccess("上传失败");
+     console.log(35)
+    },
+    reseImage(file, fileList) {
+      let urls = ""
+      this.configtwo = []
+      // if (file.response) {
+      //   urls = file.response.url
+      // } else {
+      //   urls = file.url
+      // }
+      // for (let i = this.configtwo.length - 1; i >= 0; i--) {
+      //   if (this.configtwo[i].url == urls) {
+      //     this.configtwo.splice(i, 1);
+      //   }
+      // }
+     console.log(this.configtwo)
+     // if(this.configtwo.length == 0){
+     //   this.querjtgoe.message_enclosure = undefined
+     // }else{
+     //   this.querjtgoe.message_enclosure = JSON.stringify(this.configtwo)
+     // }
+
+    },
+    getToken() {
+      return getToken()
+    },
+    // 上传前控制
+    befors(res, file){
+      console.log(res,file)
+      console.log(res.name.substr(0,res.name.length-4))
+      if(res.type !== 'application/vnd.ms-excel'  ){
+        if(res.type !== 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'){
+          this.msgSuccess('只能上传xls文件');
+          return false
+        }
+
+      }else{
+        return true
+      }
+      // return   true
+    },
+    // 图片预览
+    handlePictureCardPreview(file) {
+      console.log(file,87)
+      console.log(file.name.split('.'))
+      let hegs = file.name.split('.')
+      console.log(hegs[hegs.length - 1])
+      // if(hegs[hegs.length - 1] == 'pdf'){
+      //   this.shouewhu = true
+      // }else{
+      //   this.shouewhu = false
+      // }
+      this.dialogImageUrl = file.url;
+      this.dialogVisible = true;
+      this.imashow = true
+    },
+    // 人员选择
+    changeren(){
+    this.modalShow = true
+    },
+    handleClick(index){
+    if(index.index == 0){
+      this.getTreeselect()
+    }else if(index.index == 1){
+      this.getTreeselectjue()
+    }else if(index.index == 2){
+      this.getTreeselecu()
     }
+    },
+    /** 查询部门下拉树结构 */
+    getTreeselect() {
+      treeselect().then(response => {
+        this.deptOptions = response.data;
+      });
+    },
+    // 查询角色
+    getTreeselectjue() {
+      this.loading = true;
+      listRole(this.queryParams).then(response => {
+        this.deptOptionstwo = this.handleTree(response.rows, "id");
+        this.loading = false;
+      });
+    },
+    // 查询组
+    getTreeselecu() {
+      this.loading = true;
+      group(this.queryParams).then(response => {
+        this.deptOptionsthre = this.handleTree(response.data, "id");
+        this.loading = false;
+      });
+    },
+    // 筛选节点
+    filterNode(value, data) {
+      if (!value) return true;
+      return data.label.indexOf(value) !== -1;
+    },
+    // 节点单击事件
+    handleNodeClick(data) {
+      console.log(data);
+      // this.queryParams.deptId = data.id;
+      this.staff(data.id);
+      this.quandet = false
+      // this.getList();
+    },
+    // 点击组/角色
+      djieskle(node, instanceId) {
+        this.personnel(node.id);
+        console.log(node, instanceId);
+      },
+      djieskletwo(node, instanceId) {
+        this.members(node.id);
+        this.elezu = node.id
+        console.log(node, instanceId);
+      },
+      // 点击全部删除
+      eledelte(){
+       this.lisehtwo = []
+      },
+      // 点击全选
+      quande(){
+        var dueg = []
+        dueg = (this.dhiuw)
+       this.quandet = true
+       var that =  this
+       // dueg.push(index)
+       // this.lisehtwo = dueg
+       // this.lisehtwo.push(index);
+       // this.lisehtwo = [...new Set(this.lisehtwo)];
+       // that.positions.map(train => {
+       //   that.new_Positions.push(train.trainId);
+       // });
+       // that.resultArr = []; //去重后的数组
+       var flag;
+       for (var i in dueg) {
+         flag = true;
+         for (var j in that.lisehtwo) {
+           if (that.lisehtwo[j].id == dueg[i].id) {
+             flag = false;
+             break;
+           }
+         }
+         if (flag) {
+           that.lisehtwo.push(dueg[i]);
+         }
+       }
+      },
+      // 点击添加
+      reyantt(index) {
+        var dueg = [];
+        this.idneese = index;
+        var that =  this
+        dueg.push(index)
+        // this.lisehtwo = dueg
+        // this.lisehtwo.push(index);
+        // this.lisehtwo = [...new Set(this.lisehtwo)];
+        // that.positions.map(train => {
+        //   that.new_Positions.push(train.trainId);
+        // });
+        // that.resultArr = []; //去重后的数组
+        var flag;
+        for (var i in dueg) {
+          flag = true;
+          for (var j in that.lisehtwo) {
+            if (that.lisehtwo[j].id == dueg[i].id) {
+              flag = false;
+              break;
+            }
+          }
+          if (flag) {
+            that.lisehtwo.push(dueg[i]);
+          }
+        }
+        // for(var i = 0 ; i <this.lisehtwo.length; i++ ){
+        //   if(this.lisehtwo[i].id == index.id){
+        //     this.lisehtwo.splice(i,1)
+        //   }
+        // }
+        // })
+      },
+      // 点击确定
+      determine(){
+        var eledete = []
+       this.lisehtwo.filter(route=>{
+         eledete.push(route.id)
+       })
+       eledete  = eledete.join(',')
+       console.log(this.lisehtwo)
+       this.messageReun = '已选择' + this.lisehtwo.length +'人'
+       // this.elezu
+       this.loading = true;
+       buent(this.lisehtwo).then(response => {
+         // this.lisehtwo = response.data;
+         // this.dhiuw = response.data
+         this.mpany.ompany = response.deptNameList
+         this.mpany.name = response.nikeNameList
+         console.log( this.mpany.ompany)
+         if(response.code == 200){
+           this.msgSuccess('操作成功');
+           this.modalShow = false
+         }
+         this.loading = false;
+       });
+      },
+      load(){
+
+      },
+      // 按照部门查询人员
+      staff(index) {
+        this.loading = true;
+        var that = this;
+        getRole(index).then(response => {
+          // this.deptOptionsthre = this.handleTree(response.data, "id");
+          // this.rtuer = true
+          this.liseh = []
+          this.liseh = response.data;
+          this.dhiuw = response.data
+          this.loading = false;
+        });
+      },
+      // 按照角色查询人员
+      personnel(index) {
+        this.loading = true;
+        getPersonnel(index).then(response => {
+          // this.deptOptionsthre = this.handleTree(response.data, "id");        this.liseh = response.data;
+          this.liseh = []
+          this.liseh = response.data;
+          this.dhiuw = response.data
+          this.loading = false;
+        });
+      },
+      // 按照组查询人员
+      members(index) {
+        this.loading = true;
+        getMembers(index).then(response => {
+          // this.deptOptionsthre = this.handleTree(response.data, "id");
+          // this.liseh = response.data;
+          // response.data
+          // this.lisehtwo.push(response.data)
+          this.liseh = []
+          this.liseh = response.data;
+          this.dhiuw = response.data
+          // this.dhiuw.filter(route=>{
+          //   this.lisehtwo.push(route)
+          // })
+          this.loading = false;
+        });
+      },
   }
 };
 </script>
+<style lang="scss">
+  .infinite-list {
+    // height: 150px;
+    margin-bottom: 20px;
+    flex-wrap: wrap;
+    .infinite-list-item {
+      // flex:1!important;
+      display: flex;
+      // justify-content: space-between;
+      align-items: center;
+      text-align: center;
+      list-style: none;
+      height: 23px;
+      margin-left: 10px;
+      // line-height: 30px;
+    }
+    .infinite-list-itemss {
+      color: #1890ff;
+    }
+  }
+  .infinite-listty {
+    display: flex;
+    flex-wrap: wrap;
+    .infinite-list-itemty {
+      // flex:1;
+      display: flex;
+      // justify-content: space-between;
+      height: 23px;
+      line-height: 23px;
+      // text-align: center;
+      list-style: none;
+      margin-left: 10px;
+      // border-radius: 40px;
+      // border: 1px solid #eee;
+      // border-bottom: 1px solid #eee;
+    }
+
+  }
+  // 分发人员
+  .infinite-listopma{
+   width: 100%;
+   display: flex;
+   flex-wrap: wrap;
+   justify-content: flex-start;
+   align-items: center;
+   li{
+     list-style: none;
+     // width: 20%;
+     margin-left: 10px;
+     line-height: 23px;
+   }
+  }
+
+</style>
+<style lang="scss" scoped="">
+  .app-container{
+    padding: 0 80px !important;
+    padding-top: 20px !important;
+  }
+
+  .tab_bott {
+    display: flex;
+  }
+  .tabBot_oje {
+    width: 40%;
+  }
+  .tabBot_two {
+    width: 50%;
+    margin-left: 30px;
+  }
+  .box-cardtt{
+    margin-top: 30px;
+  }
+  .index_navTimeimg {
+    width: 10px;
+    height: 10px;
+    margin-left: 5px;
+  }
+</style>