赵冬冬 пре 4 година
родитељ
комит
bfb38632ae

+ 59 - 0
src/api/activiti/leave.js

@@ -0,0 +1,59 @@
+import request from '@/utils/request'
+//下拉列表
+export function select() {
+  return request({
+    url: '/definition/select',
+    method: 'get',
+  })
+}
+
+// 新增
+export function add(data) {
+  return request({
+    url: '/leave',
+    method: 'put',
+    data: data
+  })
+}
+
+// 分页查询
+export function list(query) {
+  return request({
+    url: '/leave/list',
+    method: 'get',
+    params: query
+  })
+}
+// 查看
+export function get(id) {
+  return request({
+    url: '/leave/'+id,
+    method: 'get',
+  })
+}
+
+// 编辑
+export function update(data) {
+  return request({
+    url: '/leave',
+    method: 'post',
+    data: data
+  })
+}
+
+// 删除
+export function delTitle(data) {
+  return request({
+    url: '/leave',
+    method: 'delete',
+    data: data
+  })
+}
+
+// 编辑
+export function submitApply(id) {
+  return request({
+    url: '/leave/submitApply/'+id,
+    method: 'post',
+  })
+}

+ 76 - 0
src/api/activiti/leaveNew.js

@@ -0,0 +1,76 @@
+import request from '@/utils/request'
+
+//下拉列表
+export function getForm(key) {
+  return request({
+    url: '/leaveNew/processKey/' + key,
+    method: 'get'
+  })
+}
+
+//审核流程表单
+export function showForms(instanceId) {
+  return request({
+    url: '/leaveNew/showForms/' + instanceId,
+    method: 'get'
+  })
+}
+//下拉列表
+export function select() {
+  return request({
+    url: '/definition/select',
+    method: 'get'
+  })
+}
+
+// 新增
+export function add(data) {
+  return request({
+    url: '/leaveNew',
+    method: 'put',
+    data: data
+  })
+}
+
+// 分页查询
+export function list(query) {
+  return request({
+    url: '/leaveNew/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查看
+export function get(id) {
+  return request({
+    url: '/leaveNew/' + id,
+    method: 'get'
+  })
+}
+
+// 编辑
+export function update(data) {
+  return request({
+    url: '/leaveNew',
+    method: 'post',
+    data: data
+  })
+}
+
+// 删除
+export function delTitle(data) {
+  return request({
+    url: '/leaveNew',
+    method: 'delete',
+    data: data
+  })
+}
+
+// 编辑
+export function submitApply(id) {
+  return request({
+    url: '/leaveNew/submitApply/' + id,
+    method: 'post'
+  })
+}

+ 29 - 0
src/api/activiti/model.js

@@ -0,0 +1,29 @@
+import request from '@/utils/request'
+// 分页查询
+export function list(query) {
+  return request({
+    url: '/model/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 编辑
+export function update(data) {
+  return request({
+    url: '/model',
+    method: 'post',
+    data: data
+  })
+}
+
+// 删除
+export function delTitle(data) {
+  return request({
+    url: '/model',
+    method: 'delete',
+    data: data
+  })
+}
+
+

+ 37 - 0
src/api/activiti/pending.js

@@ -0,0 +1,37 @@
+import request from '@/utils/request'
+
+
+// 分页查询
+export function list(query) {
+  return request({
+    url: '/leave/taskList',
+    method: 'get',
+    params: query
+  })
+}
+// 查看
+export function get(id) {
+  return request({
+    url: '/leave/'+id,
+    method: 'get',
+  })
+}
+
+
+// 删除
+export function delTitle(data) {
+  return request({
+    url: '/leave',
+    method: 'delete',
+    data: data
+  })
+}
+
+// 编辑
+export function submitApply(data) {
+  return request({
+    url: '/leave/taskComplete',
+    method: 'post',
+    data: data
+  })
+}

+ 33 - 0
src/api/activiti/pendingNew.js

@@ -0,0 +1,33 @@
+import request from '@/utils/request'
+
+
+// 分页查询
+export function list(query) {
+  return request({
+    url: '/leaveNew/taskList',
+    method: 'get',
+    params: query
+  })
+}
+//审核流程表单
+export function showForms(instanceId) {
+  return request({
+    url: '/leaveNew/showForms/' + instanceId,
+    method: 'get'
+  })
+}
+// 查看
+export function get(modelKey,formKey,modelVersion) {
+  return request({
+    url: '/leaveNew/taskFormData?modelKey='+modelKey+"&formKey="+formKey+"&modelVersion="+modelVersion,
+    method: 'get',
+  })
+}
+// 提交
+export function add(data) {
+  return request({
+    url: '/leaveNew/taskCommit',
+    method: 'post',
+    data:data
+  })
+}

+ 23 - 0
src/api/activiti/processed.js

@@ -0,0 +1,23 @@
+import request from '@/utils/request'
+
+
+// 分页查询
+export function list(query) {
+  return request({
+    url: '/leave/taskDoneList',
+    method: 'get',
+    params: query
+  })
+}
+// 查看
+export function get(id) {
+  return request({
+    url: '/leave/'+id,
+    method: 'get',
+  })
+}
+
+
+
+
+

+ 31 - 0
src/api/activiti/processedNew.js

@@ -0,0 +1,31 @@
+import request from '@/utils/request'
+
+//审核流程表单
+export function showForms(instanceId) {
+  return request({
+    url: '/leaveNew/showForms/' + instanceId,
+    method: 'get'
+  })
+}
+// 分页查询
+export function list(query) {
+  return request({
+    url: '/leaveNew/taskDoneList',
+    method: 'get',
+    params: query
+  })
+}
+
+// 删除
+export function delTitle(data) {
+  return request({
+    url: '/leaveNew',
+    method: 'delete',
+    data: data
+  })
+}
+
+
+
+
+

+ 73 - 0
src/api/blog/blog.js

@@ -0,0 +1,73 @@
+import request from '@/utils/request'
+
+// 查询角色列表
+export function list(query) {
+  return request({
+    url: '/blog/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 用户头像上传
+export function uploadTitleImg(data) {
+  return request({
+    url: '/blog/titleImg/',
+    method: 'post',
+    data: data
+  })
+}
+
+// 用户头像上传
+export function add(data) {
+  return request({
+    url: '/blog',
+    method: 'post',
+    data: data
+  })
+}
+// 根据字典类型查询字典数据信息
+export function getType(dictType) {
+  return request({
+    url: '/blog/dictType/' + dictType,
+    method: 'get'
+  })
+}
+// 查看文章
+export function get(id) {
+  return request({
+    url: '/blog/' + id,
+    method: 'get'
+  })
+}
+
+// 更新文章
+export function update(data) {
+  return request({
+    url: '/blog',
+    method: 'put',
+    data: data
+  })
+}
+
+// 发布或者取消
+export function status(bId, status) {
+  const data = {
+    bId,
+    status
+  };
+  return request({
+    url: '/blog/status',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除文章
+export function delTitle(data) {
+  return request({
+    url: '/blog',
+    method: 'delete',
+    data: data
+  })
+}

+ 21 - 0
src/components/RuoYi/index.vue

@@ -0,0 +1,21 @@
+<template>
+  <div>
+    <svg-icon icon-class="download" @click="handleDownload"/>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'RuoYi',
+  data() {
+    return {
+      url: 'https://gitee.com/y_project/RuoYi-Vue'
+    }
+  },
+  methods: {
+    handleDownload() {
+      window.open(this.url)
+    }
+  }
+}
+</script>

+ 64 - 0
src/views/activiti/formDemo/index.vue

@@ -0,0 +1,64 @@
+<template>
+  <el-card
+    header="ele-form-image-uploader 演示"
+    shadow="never"
+    style="max-width: 1250px;margin: 20px auto;"
+  >
+    <ele-form
+      :form-data="formData"
+      :form-desc="formDesc"
+      :request-fn="handleRequest"
+      @request-success="handleSuccess"></ele-form>
+  </el-card>
+</template>
+
+<script>
+  export default {
+    data () {
+      return {
+        formData: {
+          avatar:'http://172.16.90.8:8080/profile/upload/2019/12/31/2497b2d6975bfbfd9a7d25784b67ed4c.jpg'
+        },
+        formDesc: {
+          avatar: {
+            label: '头像',
+            type: 'image-uploader',
+            attrs: {
+              disable : true,
+              fileSize: 3,
+              responseFn (response, file) {
+                return response.url
+              },
+            }
+          },
+          covers: {
+            label: '封面',
+            type: 'image-uploader',
+            attrs: {
+              drag: true, // 多张
+              responseFn (response, file) {
+                return response.url
+              }
+            }
+          }
+        }
+      }
+    },
+    methods: {
+      handleRequest (data) {
+        console.log(data)
+        return Promise.resolve()
+      },
+      handleSuccess () {
+        this.$message.success('提交成功')
+      }
+    },
+    mounted () {}
+  }
+</script>
+
+<style scoped>
+  body {
+    background-color: #f0f2f5;
+  }
+</style>

+ 68 - 0
src/views/activiti/formDemo/indexCopy.vue

@@ -0,0 +1,68 @@
+<template>
+  <el-card
+    header="ele-form-image-uploader 演示"
+    shadow="never"
+    style="max-width: 1250px;margin: 20px auto;"
+  >
+    <ele-form
+      :form-data="formObj.formData"
+      :form-desc="formObj.formDesc"
+      :request-fn="handleRequest"
+      @request-success="handleSuccess">
+    </ele-form>
+  </el-card>
+</template>
+
+<script>
+  export default {
+    data() {
+      return {
+        formObj: {
+          formData: {},
+          formDesc: {
+            avatar: {
+              label: '图片',
+              type: 'image-uploader',
+              disabled:true,
+              attrs: {
+                multiple: {
+                  default: true
+                },
+              }
+            },
+            fileDemo: {
+              label: '附件上传',
+              type: 'upload-file', // 只需要在这里指定为 upload-file 即可
+              attrs: {
+                // 上传地址
+                action: 'http://172.16.90.8:81/dev-api/common/uploadac',
+                //是删除
+                isCanDelete: true
+              }
+            }
+          }
+        }
+
+      }
+    },
+    methods: {
+      handleRequest(data) {
+        console.log(data)
+        this.formObj.formData = data
+        console.log(JSON.stringify(this.formObj))
+        return Promise.resolve()
+      },
+      handleSuccess() {
+        this.$message.success('提交成功')
+      }
+    },
+    mounted() {
+    }
+  }
+</script>
+
+<style scoped>
+  body {
+    background-color: #f0f2f5;
+  }
+</style>

+ 31 - 0
src/views/activiti/formDemo/indexDemo.vue

@@ -0,0 +1,31 @@
+<template>
+  <el-upload
+    class="upload-demo"
+    action="https://jsonplaceholder.typicode.com/posts/"
+    :on-change="handleChange"
+    :file-list="fileList">
+    <el-button size="small" type="primary" :disabled="true">点击上传</el-button>
+    <div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div>
+  </el-upload>
+</template>
+
+<script>
+  export default {
+    data() {
+      return {
+        fileList: [{
+          name: 'food.jpeg',
+          url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'
+        }, {
+          name: 'food2.jpeg',
+          url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'
+        }]
+      };
+    },
+    methods: {
+      handleChange(file, fileList) {
+        this.fileList = fileList.slice(-3);
+      }
+    }
+  }
+</script>

+ 66 - 0
src/views/activiti/formDemo/indexFile.vue

@@ -0,0 +1,66 @@
+<template>
+  <el-upload
+    class="avatar-uploader"
+    action="https://jsonplaceholder.typicode.com/posts/"
+    :show-file-list="false"
+    :on-success="handleAvatarSuccess"
+    :before-upload="beforeAvatarUpload" :disabled="true">
+    <img v-if="imageUrl" :src="imageUrl" class="avatar">
+    <i v-else class="el-icon-plus avatar-uploader-icon" ></i>
+  </el-upload>
+</template>
+
+
+<style scoped>
+  .avatar-uploader .el-upload {
+    border: 1px dashed #d9d9d9;
+    border-radius: 6px;
+    cursor: pointer;
+    position: relative;
+    overflow: hidden;
+  }
+  .avatar-uploader .el-upload:hover {
+    border-color: #409EFF;
+  }
+  .avatar-uploader-icon {
+    font-size: 28px;
+    color: #8c939d;
+    width: 178px;
+    height: 178px;
+    line-height: 178px;
+    text-align: center;
+  }
+  .avatar {
+    width: 178px;
+    height: 178px;
+    display: block;
+  }
+</style>
+
+<script>
+  export default {
+    data() {
+      return {
+        imageUrl: 'http://172.16.90.8:8080/profile/upload/2019/12/31/df6a9d554fb784d4c83e1579b856c207.jpg',
+      };
+    },
+    methods: {
+      handleAvatarSuccess(res, file) {
+        this.imageUrl = URL.createObjectURL(file.raw);
+      },
+      beforeAvatarUpload(file) {
+        const isJPG = file.type === 'image/jpeg';
+        const isLt2M = file.size / 1024 / 1024 < 2;
+
+        if (!isJPG) {
+          this.$message.error('上传头像图片只能是 JPG 格式!');
+        }
+        if (!isLt2M) {
+          this.$message.error('上传头像图片大小不能超过 2MB!');
+        }
+        return isJPG && isLt2M;
+      },
+
+    }
+  }
+</script>

+ 21 - 0
src/views/activiti/formEdit/index.vue

@@ -0,0 +1,21 @@
+<template>
+  <div class="app-container">
+    <iframe  src="http://localhost:8082/" frameborder="0" width="100%"
+             height="100%" ></iframe>
+  </div>
+</template>
+
+<script>
+  export default {
+
+  }
+</script>
+
+<style scoped>
+  .app-container{
+    height:1000px;
+  }
+</style>
+
+
+

+ 21 - 0
src/views/activiti/model/index.vue

@@ -0,0 +1,21 @@
+<template>
+  <div class="app-container">
+    <iframe  src="http://localhost:8081" frameborder="0" width="100%"
+             height="100%" ></iframe>
+  </div>
+</template>
+
+<script>
+  export default {
+
+  }
+</script>
+
+<style scoped>
+  .app-container{
+    height:1000px;
+  }
+</style>
+
+
+

+ 529 - 0
src/views/blog/blog/index.vue

@@ -0,0 +1,529 @@
+<template>
+  <div class="app-container">
+
+    <el-form :inline="true">
+
+      <el-form-item label="标题">
+        <el-input
+          v-model="queryParams.title"
+          placeholder="请输入标题"
+          clearable
+          size="small"
+          style="width: 240px"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="是否发布">
+        <el-select v-model="queryParams.status" clearable placeholder="选择下拉" size="small">
+          <el-option
+            v-for="item in status"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value">
+          </el-option>
+        </el-select>
+      </el-form-item>
+
+      <el-form-item label="分类">
+        <el-select v-model="queryParams.type" clearable placeholder="选择下拉" size="small">
+          <el-option
+            v-for="dict in options"
+            :key="dict.dictValue"
+            :label="dict.dictLabel"
+            :value="dict.dictValue"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button type="info" icon="el-icon-refresh-right" size="mini" @click="reList">清空</el-button>
+        <el-button type="success" icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['blog:blog:add']">新增      </el-button>
+
+        <el-button type="danger" icon="el-icon-delete" size="mini" @click="deleteTi" v-hasPermi="['blog:blog:remove']">删除        </el-button>
+
+
+
+      </el-form-item>
+    </el-form>
+    <el-table v-loading="loading" ref="multipleTable" :data="tableData" @selection-change="handleSelectionChange">
+      <el-table-column
+        type="selection"
+        width="55">
+      </el-table-column>
+      <el-table-column label="序号" type="index" align="center">
+        <template slot-scope="scope">
+          <span>{{ (queryParams.pageNum-1) * queryParams.pageSize + (scope.$index + 1) }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="标题" prop="title"/>
+      <el-table-column label="标题图片">
+        <template slot-scope="scope">
+          <el-image :src="scope.row.titleImg" :preview-src-list="srcList"
+                    style="width: 100px; height: 50px"/>
+        </template>
+      </el-table-column>
+
+      <el-table-column label="作者" prop="user" :show-overflow-tooltip="true"/>
+      <el-table-column label="分类" prop="type"/>
+      <el-table-column label="标签" prop="label">
+        <template slot-scope="scope">
+          <el-tag
+            v-for="item in scope.row.label"
+            :key="item"
+            type="success"
+            effect="dark">
+            {{ item }}
+          </el-tag>
+        </template>
+      </el-table-column>
+
+      <el-table-column label="创建时间" prop="createTime"/>
+      <el-table-column label="发布">
+        <template slot-scope="scope">
+          <el-switch v-model="scope.row.status"
+                     :inactive-value="0"
+                     :active-value="1"
+                     inactive-color="#ff4949"
+                     active-color="#13ce66" @change="handleStatusChange(scope.row)" v-hasPermi="['blog:blog:push']"/>
+        </template>
+      </el-table-column>
+      <el-table-column label="操作" align="center">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)" v-hasPermi="['blog:blog:edit']"
+          >修改
+          </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 :title="title" :visible.sync="open" width="1000px">
+      <el-form ref="form" :model="form" :rules="rules" :label-position="labelPosition" label-width="80px">
+        <el-form-item label="图片">
+          <el-upload
+            class="avatar-uploader"
+            :action="action"
+            :show-file-list="false"
+            :on-success="handleAvatarSuccess"
+            :before-upload="beforeAvatarUpload">
+            <img v-if="imageUrl" :src="imageUrl" class="avatar">
+            <i v-else class="el-icon-plus avatar-uploader-icon"></i>
+          </el-upload>
+        </el-form-item>
+        <el-form-item label="标题" prop="title">
+          <el-input v-model="form.title" placeholder="标题"/>
+        </el-form-item>
+        <el-form-item label="分类" prop="type">
+          <el-select v-model="form.type">
+            <el-option
+              v-for="dict in options"
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="dict.dictValue"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="标签" prop="label">
+          <el-tag
+            :key="tag"
+            v-for="tag in dynamicTags"
+            closable
+            :disable-transitions="false"
+            @close="handleClose(tag)">
+            {{tag}}
+          </el-tag>
+          <el-input
+            class="input-new-tag"
+            v-if="inputVisible"
+            v-model="inputValue"
+            ref="saveTagInput"
+            size="small"
+            @keyup.enter.native="handleInputConfirm"
+            @blur="handleInputConfirm"
+          >
+          </el-input>
+          <el-button v-else class="button-new-tag" size="small" @click="showInput">+ New Tag</el-button>
+        </el-form-item>
+
+        <el-form-item label="作者" prop="user">
+          <el-input v-model="form.user" placeholder="作者"/>
+        </el-form-item>
+
+        <el-form-item label="是否发布">
+          <el-switch v-model="form.status"
+                     :inactive-value="0"
+                     :active-value="1"
+                     inactive-color="#ff4949"
+                     active-color="#13ce66"/>
+        </el-form-item>
+
+        <el-form-item label="内容">
+          <Editor v-model="form.content"/>
+        </el-form-item>
+      </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>
+  </div>
+</template>
+<style scoped>
+  /*图片上传样式*/
+  .avatar-uploader .el-upload {
+    border: 1px dashed #d9d9d9;
+    border-radius: 6px;
+    cursor: pointer;
+    position: relative;
+    overflow: hidden;
+    display: inline-block;
+  }
+
+  .avatar-uploader .el-upload:hover {
+    border-color: #409EFF;
+  }
+
+  .avatar-uploader-icon {
+    font-size: 28px;
+    color: #8c939d;
+    width: 178px;
+    height: 178px;
+    line-height: 178px;
+    text-align: center;
+  }
+
+  .avatar {
+    width: 178px;
+    height: 178px;
+    display: block;
+  }
+
+  /*标签样式*/
+  .el-tag + .el-tag {
+    margin-left: 10px;
+  }
+
+  .button-new-tag {
+    margin-left: 10px;
+    height: 32px;
+    line-height: 30px;
+    padding-top: 0;
+    padding-bottom: 0;
+  }
+
+  .input-new-tag {
+    width: 90px;
+    margin-left: 10px;
+    vertical-align: bottom;
+  }
+</style>
+<script>
+  import { list, add, get, getType, update, status, delTitle } from '@/api/blog/blog'
+  import Editor from '@/components/Editor'
+
+  export default {
+    //富文本编辑器
+    components: {
+      Editor
+    },
+    data: function() {
+      return {
+        /*标签data*/
+        dynamicTags: [],
+        inputVisible: false,
+        inputValue: '',
+        action: process.env.VUE_APP_BASE_API + '/blog/titleImg',
+        status: [{
+          value: '0',
+          label: ' 取消'
+        }, {
+          value: '1',
+          label: ' 发布'
+        }],
+        labelPosition: 'right',
+
+        imageUrl: '',
+        // 查询参数
+        queryParams: {
+          pageNum: 1,
+          pageSize: 10,
+          title: undefined,
+          status: undefined,
+          type: undefined
+        },
+        // 分页参数
+        total: 0,
+        pageNum: 1,
+        pageSize: 10,
+        tableData: [],
+        // 表单参数
+        // 弹出层标题
+        title: '',
+        // 是否显示弹出层
+        open: false,
+        // 分类下拉
+        options: [],
+        rules: {
+          title: [
+            { required: true, message: '请输入活动标题', trigger: 'blur' },
+            { min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
+          ],
+          type: [
+            { required: true, message: '请选择分类', trigger: 'blur' }
+          ],
+          label: [
+            { required: true, message: '请添加最少一个标签', trigger: 'blur' }
+          ],
+          user: [
+            { required: true, message: '请输入作者', trigger: 'blur' }
+          ]
+
+        },
+        // 文件
+        form: {},
+
+        srcList: [
+          'https://fuss10.elemecdn.com/8/27/f01c15bb73e1ef3793e64e6b7bbccjpeg.jpeg',
+          'https://fuss10.elemecdn.com/1/8e/aeffeb4de74e2fde4bd74fc7b4486jpeg.jpeg'
+        ],
+        multipleSelection: []
+
+      }
+    },
+
+    // 初始化方法
+    created() {
+      //表格初始化
+      this.getList()
+      //表单初始化
+      this.reset()
+      //下拉初始化
+      getType('system').then(response => {
+        this.options = response.data
+      })
+    },
+    methods: {
+
+      handleSelectionChange(val) {
+        this.multipleSelection = []
+        for (let i = 0; i < val.length; i++) {
+          this.multipleSelection[i] = val[i].bId
+        }
+      },
+      // 发布或取消文章
+      handleStatusChange(row) {
+        let text = row.status === 1 ? '发布' : '取消'
+        try {
+          status(row.bId, row.status)
+        } catch (e) {
+          this.msgError(e)
+        }
+        this.msgSuccess(text + '成功')
+      },
+      deleteTi() {
+        this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
+          confirmButtonText: '确定 ',
+          cancelButtonText: '取消 ',
+          type: 'warning',
+          center: true
+        }).then(() => {
+          let ids = this.multipleSelection
+          if (ids.length === 0) {
+            this.msgError('你没有选择文章')
+            return
+          }
+          delTitle(ids)
+          this.msgSuccess('成功')
+          this.reIds()
+          this.getList()
+        }).catch(() => {
+          this.msgSuccess('已取消删除')
+        })
+      }
+      ,
+      reIds() {
+        this.multipleSelection = []
+      }
+      ,
+      /** 查询角色列表 */
+      getList() {
+        this.loading = true
+        list(this.addDateRange(this.queryParams)).then(
+          response => {
+            this.tableData = response.rows
+            let tableData = this.tableData
+            for (let i = 0; i < tableData.length; i++) {
+              let imgSrc = process.env.VUE_APP_BASE_URL + tableData[i].titleImg
+              tableData[i].titleImg = imgSrc
+              this.srcList[i] = imgSrc
+              tableData[i].label = tableData[i].label.split(',')
+            }
+            this.total = response.total
+            this.loading = false
+          }
+        )
+      }
+      ,
+      /** 搜索按钮操作 */
+      handleQuery() {
+        this.queryParams.pageNum = 1
+        this.getList()
+      }
+      ,
+      reList() {
+        this.queryParams = {
+          pageNum: 1,
+          pageSize: 10,
+          title: undefined,
+          status: undefined,
+          type: undefined
+        }
+        this.getList()
+      }
+      ,
+      // 重置表单新增使用
+      reset() {
+        this.imageUrl = undefined
+        this.form = {
+          bId: undefined,
+          title: undefined,
+          titleImg: undefined,
+          type: undefined,
+          user: undefined,
+          label: undefined,
+          content: undefined,
+          status: 0
+        }
+        this.resetForm('form')
+      }
+      ,
+      /**
+       * 头像上传
+       * */
+      handleAvatarSuccess(res, file) {
+        this.imageUrl = URL.createObjectURL(file.raw)
+        let msg = res.msg
+        let code = res.code
+        if (code === 200) {
+          this.form.titleImg = res.imgUrl
+          this.msgSuccess('新增成功')
+        } else {
+          this.msgError(msg)
+        }
+
+      }
+      ,
+      beforeAvatarUpload(file) {
+        const isJPG = file.type === 'image/jpeg'
+        const isLt2M = file.size / 1024 / 1024 < 2
+
+        if (!isJPG) {
+          this.$message.error('上传头像图片只能是 JPG 格式!')
+        }
+        if (isLt2M) {
+        } else {
+          this.$message.error('上传头像图片大小不能超过 2MB!')
+        }
+        return isJPG && isLt2M
+      },
+      handleAdd() {
+        this.reset()
+        this.open = true
+        this.title = '添加文章'
+      }
+      ,
+      /**
+       * 关闭按钮
+       */
+      cancel() {
+        this.open = false
+        this.reset()
+      }
+      ,
+      /** 修改按钮操作 */
+      handleUpdate(row) {
+        this.reset()
+        get(row.bId).then(response => {
+          this.form = response.data
+          let titleImg = process.env.VUE_APP_BASE_URL + this.form.titleImg
+          this.imageUrl = titleImg
+          this.dynamicTags = this.form.label.split(',')
+          this.open = true
+          this.title = '修改文章'
+        })
+      }
+      ,
+      /** 提交按钮 */
+      submitForm() {
+        this.$refs['form'].validate(valid => {
+          if (valid) {
+            if (this.form.bId !== undefined) {
+              update(this.form).then(response => {
+                if (response.code === 200) {
+                  this.msgSuccess('修改成功')
+                  this.open = false
+                  this.getList()
+                } else {
+                  this.msgError(response.msg)
+                }
+              })
+            } else {
+              add(this.form).then(response => {
+                if (response.code === 200) {
+                  this.msgSuccess('新增成功')
+                  this.open = false
+                  this.getList()
+                } else {
+                  this.msgError(response.msg)
+                }
+              })
+            }
+          }
+        })
+      },
+      handleClose(tag) {
+        this.dynamicTags.splice(this.dynamicTags.indexOf(tag), 1)
+        this.form.label = this.dynamicTags.join(',')
+
+      },
+
+      showInput() {
+
+        this.inputVisible = true
+        this.$nextTick(_ => {
+          this.$refs.saveTagInput.$refs.input.focus()
+        })
+      },
+
+      handleInputConfirm() {
+        let inputValue = this.inputValue
+        let dynamicTags = this.dynamicTags
+        for (const obj of dynamicTags) {
+          if (obj === inputValue) {
+            this.msgError('已添加过该标签!')
+            return
+          }
+        }
+        if (inputValue) {
+          this.dynamicTags.push(inputValue)
+          this.form.label = this.dynamicTags.join(',')
+        }
+        this.inputVisible = false
+        this.inputValue = ''
+      }
+    }
+
+  }
+</script>

+ 15 - 0
src/views/login/auth-redirect.vue

@@ -0,0 +1,15 @@
+<script>
+export default {
+  name: 'AuthRedirect',
+  created() {
+    const hash = window.location.search.slice(1)
+    if (window.localStorage) {
+      window.localStorage.setItem('x-admin-oauth-code', hash)
+      window.close()
+    }
+  },
+  render: function(h) {
+    return h() // avoid warning message
+  }
+}
+</script>

+ 72 - 0
src/views/login/components/SocialSignin.vue

@@ -0,0 +1,72 @@
+<template>
+  <div class="social-signup-container">
+    <div class="sign-btn" @click="wechatHandleClick('wechat')">
+      <span class="wx-svg-container"><svg-icon icon-class="wechat" class="icon" /></span>
+      WeChat
+    </div>
+    <div class="sign-btn" @click="tencentHandleClick('tencent')">
+      <span class="qq-svg-container"><svg-icon icon-class="qq" class="icon" /></span>
+      QQ
+    </div>
+  </div>
+</template>
+
+<script>
+// import openWindow from '@/utils/open-window'
+
+export default {
+  name: 'SocialSignin',
+  methods: {
+    wechatHandleClick(thirdpart) {
+      alert('ok')
+      // this.$store.commit('SET_AUTH_TYPE', thirdpart)
+      // const appid = 'xxxxx'
+      // const redirect_uri = encodeURIComponent('xxx/redirect?redirect=' + window.location.origin + '/auth-redirect')
+      // const url = 'https://open.weixin.qq.com/connect/qrconnect?appid=' + appid + '&redirect_uri=' + redirect_uri + '&response_type=code&scope=snsapi_login#wechat_redirect'
+      // openWindow(url, thirdpart, 540, 540)
+    },
+    tencentHandleClick(thirdpart) {
+      alert('ok')
+      // this.$store.commit('SET_AUTH_TYPE', thirdpart)
+      // const client_id = 'xxxxx'
+      // const redirect_uri = encodeURIComponent('xxx/redirect?redirect=' + window.location.origin + '/auth-redirect')
+      // const url = 'https://graph.qq.com/oauth2.0/authorize?response_type=code&client_id=' + client_id + '&redirect_uri=' + redirect_uri
+      // openWindow(url, thirdpart, 540, 540)
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+  .social-signup-container {
+    margin: 20px 0;
+    .sign-btn {
+      display: inline-block;
+      cursor: pointer;
+    }
+    .icon {
+      color: #fff;
+      font-size: 24px;
+      margin-top: 8px;
+    }
+    .wx-svg-container,
+    .qq-svg-container {
+      display: inline-block;
+      width: 40px;
+      height: 40px;
+      line-height: 40px;
+      text-align: center;
+      padding-top: 1px;
+      border-radius: 4px;
+      margin-bottom: 20px;
+      margin-right: 5px;
+    }
+    .wx-svg-container {
+      background-color: #24da70;
+    }
+    .qq-svg-container {
+      background-color: #6BA2D6;
+      margin-left: 50px;
+    }
+  }
+</style>

+ 392 - 0
src/views/oa/leaveNew/index.vue

@@ -0,0 +1,392 @@
+<template xmlns="http://www.w3.org/1999/html">
+  <div class="app-container">
+    <el-form :inline="true">
+      <el-form-item label="标题">
+        <el-input
+          v-model="queryParams.title"
+          placeholder="请输入标题"
+          clearable
+          size="small"
+          style="width: 240px"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button type="info" icon="el-icon-refresh-right" size="mini" @click="reList">清空</el-button>
+        <el-button type="success" icon="el-icon-plus" size="mini" @click="dialogVisible = true">新增</el-button>
+      </el-form-item>
+    </el-form>
+    <el-table v-loading="loading" ref="multipleTable" :data="tableData" @selection-change="handleSelectionChange">
+      <el-table-column
+        type="selection"
+        width="55">
+      </el-table-column>
+      <el-table-column label="序号" type="index" align="center">
+        <template slot-scope="scope">
+          <span>{{ (queryParams.pageNum-1) * queryParams.pageSize + (scope.$index + 1) }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="模型key" prop="modelKey"/>
+      <el-table-column label="表单名称" prop="fName"/>
+      <el-table-column label="创建时间" prop="createTime"/>
+      <el-table-column label="操作" align="center">
+        <template slot-scope="scope">
+          <template v-if="scope.row.instanceId==null">
+            <el-button
+              size="mini" type="success"
+              @click="handleSumbit(scope.$index, scope.row)">提交流程
+            </el-button>
+            <el-button
+              size="mini" type="primary"
+              @click="handleUpdate(scope.$index, scope.row)">编辑
+            </el-button>
+            <el-button
+              size="mini"
+              type="danger"
+              @click="handleDelete(scope.$index, scope.row)">删除
+            </el-button>
+          </template>
+          <template v-else>
+            <el-button
+              size="mini" type="success"
+              @click="showForms(scope.$index, scope.row)">查看
+            </el-button>
+            <el-button
+              size="mini" type="warning"
+              @click="showImage(scope.$index, scope.row)">进度查看
+            </el-button>
+          </template>
+        </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
+      title="选择流程模型"
+      :visible.sync="dialogVisible"
+      width="350px"
+    >
+      <template>
+        <el-select v-model="processKey" placeholder="请选择">
+          <el-option
+            v-for="item in leaveSelect"
+            :key="item.value"
+            :label="item.text"
+            :value="item.value">
+          </el-option>
+        </el-select>
+      </template>
+      <el-button type="success" icon="el-icon-plus" size="mini" @click="handleAdd">下一步</el-button>
+    </el-dialog>
+    <!-- 添加或修改角色配置对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="1000px">
+      <template>
+        <ele-form
+          :isShowSubmitBtn=true
+          :isShowBackBtn=false
+          :isShowResetBtn=true
+          :rules="formObj.rules"
+          :form-desc="formObj.formDesc"
+          :form-data="formObj.formData"
+          :request-fn="handleRequest"
+          @request-success="handleRequestSuccess"
+        ></ele-form>
+      </template>
+    </el-dialog>
+    <!--查看审核流程表单-->
+    <el-dialog :title="forms.title" :visible.sync="forms.open" width="1000px">
+      <!--历史表单组件-->
+      <addEnterprise  ref="addEnterprise"/>
+    </el-dialog>
+    <!--显示流程图标签-->
+      <el-dialog :title="activitiImg.title" :visible.sync="activitiImg.open" width="1000px">
+        <el-image :src="activitiImg.src"></el-image>
+      </el-dialog>
+  </div>
+</template>
+
+<script>
+  import { select, add, list, get, getForm, update, delTitle, submitApply, } from '@/api/activiti/leaveNew.js';
+  //流程历史表单组件
+  import  addEnterprise from "@/views/activiti/formsActiviti/index.vue";
+
+  export default {
+   components:{
+      addEnterprise
+   },
+    data: function() {
+      return {
+        instanceId:'',
+        dialogVisible: false,
+        //表格数据
+        // 查询参数
+        queryParams: {
+          pageNum: 1,
+          pageSize: 10
+        },
+        // 分页参数
+        total: 0,
+        pageNum: 1,
+        pageSize: 10,
+        tableData: [],
+        //删除id
+        multipleSelection: [],
+        // 表单参数
+        // 弹出层标题
+        title: '',
+        // 是否显示弹出层
+        open: false,
+        processKey: '',
+        //部署文件下拉
+        leaveSelect: [],
+        // 表单数据
+        formEntity: {
+          fId: {},
+          modelKey: {},
+          modulId: {},
+          fName: {},
+          instanceId: {},
+          fKey: {},
+          fVersion: {},
+          applyUser: {},
+          jsonData: {}
+        },
+        //动态表单数据
+        formObj: {
+          // 表单数据
+          formData: {},
+          formDesc: {},
+          rules: {}
+        },
+        forms: {
+          title: '查看审核流程',
+          open: false,
+          data: []
+        },
+        activitiImg: {
+          title: '查看审核流程图',
+          open: false,
+          src: ''
+        }
+      }
+    },
+
+    // 初始化方法
+    created() {
+      //表格初始化
+      this.getList()
+      //下拉框初始化
+      this.select()
+    },
+    methods: {
+      handleSelectionChange(val) {
+        this.multipleSelection = []
+        for (let i = 0; i < val.length; i++) {
+          this.multipleSelection[i] = val[i].id
+        }
+      },
+      //部署文件下啦方法
+      select() {
+        select().then(
+          response => {
+            console.log(response)
+            this.leaveSelect = response.data
+          }
+        )
+      },
+      /** 查询角色列表 */
+      getList() {
+        this.loading = true
+        list(this.addDateRange(this.queryParams)).then(
+          response => {
+            this.tableData = response.rows
+            this.total = response.total
+            this.loading = false
+          }
+        )
+      }
+      ,
+      deleteTi() {
+        this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
+          confirmButtonText: '确定 ',
+          cancelButtonText: '取消 ',
+          type: 'warning',
+          center: true
+        }).then(() => {
+          let ids = this.multipleSelection
+          if (ids.length === 0) {
+            this.msgError('你没有选择文章')
+            return
+          }
+          delTitle(ids)
+          this.msgSuccess('成功')
+          this.reIds()
+          this.reList()
+        }).catch(() => {
+          this.msgSuccess('已取消删除')
+        })
+      }
+      ,
+      reIds() {
+        this.multipleSelection = []
+      }
+      ,
+      /** 搜索按钮操作 */
+      handleQuery() {
+        this.queryParams.pageNum = 1
+        this.getList()
+      }
+      ,
+      reList() {
+        this.queryParams = {
+          pageNum: 1,
+          pageSize: 10
+        }
+        this.getList()
+      },
+      // 重置表单新增使用
+      reset() {
+        this.formObj.formDesc = {}
+        this.formObj.rules = {}
+        this.formObj.formData = {}
+        this.resetForm('form')
+      },
+      //表单
+      handleAdd() {
+        dialogVisible: false
+        this.reset()
+        getForm(this.processKey).then(
+          response => {
+            this.formEntity = response.data
+            this.formEntity.fId = undefined
+            let jsonData = response.data.jsonData
+            let parse = JSON.parse(jsonData)
+            this.formObj.formDesc = parse.formDesc
+            this.formObj.rules = parse.rules
+            let formData = parse.formData
+            if (null != formData) {
+              this.formObj.formData = parse.formData
+            }
+            this.open = true
+            this.title = '添加文章'
+          }
+        )
+
+      },
+      /*
+      打开编辑表单窗口
+      * */
+      handleUpdate(index, row) {
+        dialogVisible: false
+        this.reset()
+        get(row.fId).then(
+          response => {
+            this.formEntity = response.data
+            let jsonData = response.data.jsonData
+            let parse = JSON.parse(jsonData)
+            this.formObj.formDesc = parse.formDesc
+            this.formObj.rules = parse.rules
+            let formData = parse.formData
+            if (null != formData) {
+              this.formObj.formData = parse.formData
+            }
+            this.open = true
+            this.title = '修改'
+          }
+        )
+      },
+      /*删除数据*/
+      handleDelete(index, row) {
+        var ids = []
+        ids[0] = row.fId
+        delTitle(ids).then(response => {
+          if (response.code === 200) {
+            this.msgSuccess('成功')
+            this.open = false
+            this.getList()
+          } else {
+            this.msgError(response.msg)
+          }
+        })
+      },
+      /*
+      *显示流程表单
+      * */
+      showForms(index, row) {
+        this.forms.open = true
+        this.forms.title = '查看审核流程'
+        this.$nextTick(()=>{
+          this.$refs.addEnterprise.showForms(row.instanceId)
+        })
+      },
+
+      showImage(index, row) {
+        let instanceId = row.instanceId
+        let modelKey = row.modelKey
+        let version = row.modelVersion
+        instanceId = process.env.VUE_APP_BASE_URL + '/leaveNew/read-resource?processDefinitionKey=' + modelKey +'&version=' +version+ '&processInstanceId=' + instanceId+ '&t='+Math.random()
+        this.activitiImg.open = true
+        this.activitiImg.src = instanceId
+      },
+      /**
+       * 新增或跟新表单数据
+       */
+      handleRequest(data) {
+        this.dialogVisible = false
+        this.formObj.formData = data
+        let s = JSON.stringify(this.formObj)
+        this.formEntity.jsonData = s
+        if (this.formEntity.fId === undefined) {
+          add(this.formEntity).then(response => {
+            if (response.code === 200) {
+              this.getList()
+            } else {
+              this.msgError(response.msg)
+            }
+          })
+        } else {
+          update(this.formEntity).then(response => {
+            if (response.code === 200) {
+              this.msgSuccess(response.msg)
+              this.getList()
+            } else {
+              this.msgError(response.msg)
+            }
+          })
+        }
+        return Promise.resolve()
+      },
+      handleRequestSuccess() {
+        this.$message.success('发送成功')
+        this.getList()
+        this.open = false
+      },
+      /**
+       * 提交审核信息
+       * @param index
+       * @param row
+       */
+      handleSumbit(index, row) {
+        console.log(index, row)
+        submitApply(row.fId).then(response => {
+          if (response.code === 200) {
+            this.msgSuccess(response.msg)
+            this.getList()
+          } else {
+            this.msgError(response.msg)
+          }
+        })
+      },
+    }
+  }
+</script>

+ 233 - 0
src/views/oa/pendingNew/index.vue

@@ -0,0 +1,233 @@
+<template>
+  <div class="app-container">
+    <el-form :inline="true">
+      <el-form-item label="标题">
+        <el-input
+          v-model="queryParams.title"
+          placeholder="请输入标题"
+          clearable
+          size="small"
+          style="width: 240px"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button type="info" icon="el-icon-refresh-right" size="mini" @click="reList">清空</el-button>
+      </el-form-item>
+    </el-form>
+    <el-table ref="multipleTable" v-loading="loading" :data="tableData">
+      <el-table-column label="序号" type="index" align="center">
+        <template slot-scope="scope">
+          <span>{{ (queryParams.pageNum-1) * queryParams.pageSize + (scope.$index + 1) }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="任务id" prop="taskId"/>
+      <el-table-column label="任务名称" prop="taskName"/>
+      <el-table-column label="外置表单" prop="formKey"/>
+      <el-table-column label="流程id" prop="instanceId"/>
+      <el-table-column label="操作" align="center">
+        <template slot-scope="scope">
+          <el-button type="success"
+                     size="mini"
+                     @click="openForm(scope.$index, scope.row)">审批
+          </el-button>
+          <el-button
+            size="mini" type="warning"
+            @click="showImage(scope.$index, scope.row)">进度查看
+          </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 :title="title" :visible.sync="open" width="1000px">
+      <!--历史表单组件-->
+      <addEnterprise  ref="addEnterprise"/>
+      <el-divider content-position="left">审核</el-divider>
+      <template>
+        <ele-form
+          :isShowSubmitBtn=true
+          :isShowBackBtn=false
+          :isShowResetBtn=true
+          :rules="formObj.rules"
+          :form-desc="formObj.formDesc"
+          :form-data="formObj.formData"
+          :request-fn="handleRequest"
+          @request-success="handleRequestSuccess"
+        ></ele-form>
+      </template>
+    </el-dialog>
+    <el-dialog :title="activitiImg.title" :visible.sync="activitiImg.open" width="1000px">
+      <el-image :src="activitiImg.src"></el-image>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  import { list,get,add } from '@/api/activiti/pendingNew.js'
+  //流程历史表单组件
+  import  addEnterprise from "@/views/activiti/formsActiviti/index.vue";
+  export default {
+    components:{
+      addEnterprise
+    },
+    // 数据模型
+    data: function() {
+      return {
+        instanceId:'',
+        // 表格数据
+        // 查询参数
+        queryParams: {
+          pageNum: 1,
+          pageSize: 10
+        },
+        // 分页参数
+        total: 0,
+        pageNum: 1,
+        pageSize: 10,
+        tableData: [],
+        // 弹出层标题
+        title: '',
+        // 是否显示弹出层
+        open: false,
+        //
+        taskCommitForm:{
+          taskId:undefined,
+          myFormDataActiviti:{}
+        },
+        // 表单数据
+        formEntity: {
+          fId: {},
+          modelKey: {},
+          modulId: {},
+          fName: {},
+          instanceId: {},
+          fKey: {},
+          fVersion: {},
+          applyUser: {},
+          jsonData: {}
+        },
+        forms:{
+          title:'查看审核流程',
+          open:false,
+          data:[]
+        },
+        // 动态表单数据
+        formObj: {
+          // 表单数据
+          formData: {},
+          formDesc: {},
+          rules: {}
+        },
+        activitiImg:{
+          title:'查看审核流程图',
+          open:false,
+          src:"",
+        }
+      }
+    },
+    // 初始化方法
+    created() {
+      // 表格初始化
+      this.getList()
+    },
+    // 定义方法
+    methods: {
+      // 搜索按钮操作
+      handleQuery() {
+        this.queryParams.pageNum = 1
+        this.getList()
+      },
+      reList() {
+        this.queryParams = {
+          pageNum: 1,
+          pageSize: 10
+        }
+        this.getList()
+      },
+      // 获取列表数据
+      getList() {
+        this.loading = true
+        list(this.addDateRange(this.queryParams)).then(
+          response => {
+            if (response.code === 200) {
+              this.tableData = response.rows
+              this.total = response.total
+              this.loading = false
+            }else{
+              this.msgError(response.msg)
+            }
+
+          }
+        )
+      },
+
+      openForm(index, row) {
+        get(row.modelKey,row.formKey,row.modelVersion).then(
+          response => {
+            this.taskCommitForm.taskId = row.taskId
+            this.formEntity = response.data
+            this.formEntity.fId = undefined
+            this.formEntity.instanceId=row.instanceId;
+            let jsonData = response.data.jsonData
+            let parse = JSON.parse(jsonData)
+            this.formObj.formDesc = parse.formDesc
+            this.formObj.rules = parse.rules
+            let formData = parse.formData
+            if (null != formData) {
+              this.formObj.formData = parse.formData
+            }
+            this.open = true
+            this.title = '审批'
+            this.$nextTick(()=>{
+              this.$refs.addEnterprise.showForms(row.instanceId)
+            })
+          }
+        )
+
+      },/*
+      *显示流程图
+      * */
+      showImage(index, row) {
+        let instanceId = row.instanceId
+        let modelKey = row.modelKey
+        let version = row.modelVersion
+        instanceId = process.env.VUE_APP_BASE_URL + '/leaveNew/read-resource?processDefinitionKey=' + modelKey +'&version=' +version+ '&processInstanceId=' + instanceId+ '&t='+Math.random()
+        this.activitiImg.open = true
+        this.activitiImg.src = instanceId
+      },
+      handleRequest(data) {
+        this.formObj.formData = data
+        let s = JSON.stringify(this.formObj)
+        this.formEntity.jsonData = s
+        this.taskCommitForm.myFormDataActiviti = this.formEntity
+        console.log(this.taskCommitForm);
+        add(this.taskCommitForm).then(response => {
+          if (response.code === 200) {
+            this.msgSuccess(response.msg)
+            this.getList()
+          } else {
+            this.msgError(response.msg)
+          }
+        })
+        return Promise.resolve()
+      },
+      handleRequestSuccess() {
+        this.$message.success('发送成功')
+        this.getList()
+        this.open = false
+      },
+    }
+  }
+</script>
+<style scoped>
+</style>

+ 245 - 0
src/views/oa/processedNew/index.vue

@@ -0,0 +1,245 @@
+<template>
+  <div class="app-container">
+
+    <el-form :inline="true">
+
+      <el-form-item label="标题">
+        <el-input
+          v-model="queryParams.title"
+          placeholder="请输入标题"
+          clearable
+          size="small"
+          style="width: 240px"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button type="info" icon="el-icon-refresh-right" size="mini" @click="reList">清空</el-button>
+      </el-form-item>
+    </el-form>
+    <el-table v-loading="loading" ref="multipleTable" :data="tableData" @selection-change="handleSelectionChange">
+      <el-table-column
+        type="selection"
+        width="55">
+      </el-table-column>
+      <el-table-column label="序号" type="index" align="center">
+        <template slot-scope="scope">
+          <span>{{ (queryParams.pageNum-1) * queryParams.pageSize + (scope.$index + 1) }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="模型key" prop="modelKey"/>
+      <el-table-column label="表单名称" prop="fName"/>
+      <el-table-column label="创建时间" prop="createTime"/>
+      <el-table-column label="操作" align="center">
+          <template slot-scope="scope">
+            <el-button
+              size="mini" type="success"
+              @click="showForms(scope.$index, scope.row)">查看
+            </el-button>
+            <el-button
+              size="mini" type="warning"
+              @click="showImage(scope.$index, scope.row)">进度查看
+            </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 :title="forms.title" :visible.sync="forms.open" width="1000px" >
+      <!--历史表单组件-->
+      <addEnterprise  ref="addEnterprise"/>
+    </el-dialog>
+    <el-dialog :title="activitiImg.title" :visible.sync="activitiImg.open" width="1000px">
+      <el-image :src="activitiImg.src"></el-image>
+    </el-dialog>
+
+  </div>
+</template>
+
+<script>
+  import { list ,delTitle } from '@/api/activiti/processedNew.js';
+  //流程历史表单组件
+  import  addEnterprise from "@/views/activiti/formsActiviti/index.vue";
+
+  export default {
+    //注册组件
+    components:{
+      addEnterprise
+    },
+    data: function() {
+      return {
+        instanceId:'',
+        dialogVisible: false,
+        //表格数据
+        // 查询参数
+        queryParams: {
+          pageNum: 1,
+          pageSize: 10
+        },
+        // 分页参数
+        total: 0,
+        pageNum: 1,
+        pageSize: 10,
+        tableData: [],
+        //删除id
+        multipleSelection: [],
+        // 表单参数
+        // 弹出层标题
+        title: '',
+        // 是否显示弹出层
+        open: false,
+        processKey: '',
+        //部署文件下拉
+        leaveSelect: [],
+        // 表单数据
+        formEntity: {
+          fId: {},
+          modelKey: {},
+          modulId: {},
+          fName: {},
+          instanceId: {},
+          fKey: {},
+          fVersion: {},
+          applyUser: {},
+          jsonData: {}
+        },
+        //动态表单数据
+        formObj: {
+          // 表单数据
+          formData: {},
+          formDesc: {},
+          rules: {}
+        },
+        forms:{
+          title:'查看审核流程',
+          open:false,
+          data:[]
+        },
+        activitiImg:{
+          title:'查看审核流程图',
+          open:false,
+          src:"",
+        }
+      }
+    },
+
+    // 初始化方法
+    created() {
+      //表格初始化
+      this.getList()
+
+    },
+    methods: {
+      handleSelectionChange(val) {
+        this.multipleSelection = []
+        for (let i = 0; i < val.length; i++) {
+          this.multipleSelection[i] = val[i].id
+        }
+      },
+
+      /** 查询角色列表 */
+      getList() {
+        this.loading = true
+        list(this.addDateRange(this.queryParams)).then(
+          response => {
+            this.tableData = response.rows
+            this.total = response.total
+            this.loading = false
+          }
+        )
+      }
+      ,
+      deleteTi() {
+        this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
+          confirmButtonText: '确定 ',
+          cancelButtonText: '取消 ',
+          type: 'warning',
+          center: true
+        }).then(() => {
+          let ids = this.multipleSelection
+          if (ids.length === 0) {
+            this.msgError('你没有选择文章')
+            return
+          }
+          delTitle(ids)
+          this.msgSuccess('成功')
+          this.reIds()
+          this.reList()
+        }).catch(() => {
+          this.msgSuccess('已取消删除')
+        })
+      }
+      ,
+      reIds() {
+        this.multipleSelection = []
+      }
+      ,
+      /** 搜索按钮操作 */
+      handleQuery() {
+        this.queryParams.pageNum = 1
+        this.getList()
+      }
+      ,
+      reList() {
+        this.queryParams = {
+          pageNum: 1,
+          pageSize: 10
+        }
+        this.getList()
+      },
+      /*
+      *显示流程表单
+      * */
+      showForms(index, row){
+        this.forms.open = false
+        this.forms.open = true
+        this.forms.title = '查看审核流程'
+        this.$nextTick(()=>{
+          this.$refs.addEnterprise.showForms(row.instanceId)
+        })
+      },
+      showImage(index, row) {
+        let instanceId = row.instanceId
+        let modelKey = row.modelKey
+        let version = row.modelVersion
+        instanceId = process.env.VUE_APP_BASE_URL + '/leaveNew/read-resource?processDefinitionKey=' + modelKey +'&version=' +version+ '&processInstanceId=' + instanceId+ '&t='+Math.random()
+        this.activitiImg.open = true
+        this.activitiImg.src = instanceId
+      },
+      /**
+       * 新增或跟新表单数据
+       */
+      handleRequest(data) {
+        return Promise.resolve()
+      },
+      handleRequestSuccess() {
+        this.$message.success('发送成功')
+        this.getList()
+        this.open = false
+      },
+    }
+  }
+</script>
+<style scoped>
+  .activiti-image-class {
+    width: auto;
+  }
+  .el-upload-list--picture-card .el-upload-list__item-actions span+span {
+    margin-left: 0;
+  }
+  .el-upload-list__item-actions .el-icon-delete{
+    display: none;
+    width:0;
+    height:0
+  }
+</style>