liuqihao67 il y a 1 an
Parent
commit
4c8a6140ca

+ 157 - 0
itdmWeb/src/views/activiti/ActivitiCommonModel.vue

@@ -0,0 +1,157 @@
+<template>
+  <div>
+    <a-row>
+      <a-col :span="3" :offset="1" v-for="list in dataSource">
+        <a-card :title="list.Name" style="min-width: 220px;height: 200px">
+          <div style="display: flex;margin-top: 80px">
+            <a-button type="primary" style="width: 60%" @click="flowImg(list.Id)">
+              查看流程
+            </a-button>
+            <!--            <a-button style="width: 60%;margin-left: 10px" @click="startflow(list.Id)">-->
+            <!--              发起流程-->
+            <!--            </a-button>-->
+            <a-popconfirm
+              title="确定要发起流程?"
+              ok-text="确定"
+              cancel-text="取消"
+              @confirm="startflow(list.Id)"
+              @cancel="cancel(list.Key)"
+            >
+              <a-button style="width: 60%;margin-left: 10px">
+                发起流程
+              </a-button>
+            </a-popconfirm>
+          </div>
+        </a-card>
+      </a-col>
+    </a-row>
+    <a-modal
+      title="流程图"
+      :visible="visible"
+      :confirm-loading="confirmLoading"
+      @ok="handleOk"
+      @cancel="handleCancel"
+    >
+      <img :src="imgsrc" alt="">
+    </a-modal>
+
+    <basic-form ref="BasicForm"></basic-form>
+    <basic-form1 ref="BasicForm1"></basic-form1>
+  </div>
+
+</template>
+
+<script>
+import {getAction, deleteAction, httpActionBlob} from '@/api/manage'
+import { mixinDevice } from '@/utils/mixin'
+import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+import ActivitiFileModel from './ActivitiFileModel'
+import { getModelList } from '@/api/activiti/activiti'
+import BasicForm from "@views/examples/form/BasicForm";
+import BasicForm1 from "@views/examples/form/BasicForm1";
+export default {
+  name: 'ActivitiCommonModel',
+  mixins: [JeecgListMixin, mixinDevice],
+  components: {
+    BasicForm1,
+    BasicForm
+  },
+  data() {
+    return {
+      comName:'BasicForm',
+      url: {
+        list: 'service/act/rep/actRepList',//常用流程列表
+        getPic: "service/act/showResourceForProc",//查看流程图 72502
+        sflow: 'service/act/beforeStartProc',//发起流程
+        rs: 'service/act/startProc'
+      },
+      dataSource: [],
+      ModalText: 'Content of the modal',
+      visible: false,
+      confirmLoading: false,
+      imgsrc: '',
+    }
+  },
+  created() {
+    this.getDataList();
+  },
+  methods: {
+    cancel(key){
+      this.loading = true;
+      let p = {};
+      p.procKey = key;
+      p.businessKey = '1';
+      getModelList(this.url.rs, p).then(res => {
+        //console.log('查询数据', res);
+        this.loading = false;
+      })
+    },
+    startflow(id){
+      this.loading = true;
+      let p = {};
+      p.pdid = id;
+      getModelList(this.url.sflow, p).then(res => {
+        console.log('查询数据;返回的表单路径', res.result);
+        this.loading = false;
+        if(res.result==="BasicForm"){
+          this.$refs.BasicForm.visible= true;
+        }else if(res.result==="BasicForm1"){
+          this.$refs.BasicForm1.visible= true;
+        }else{
+          this.$refs.BasicForm.visible= true;
+        }
+      })
+    },
+    flowImg(id){
+      this.visible = true;
+      this.loading = true;
+
+      let method = "GET";
+      let p = {};
+      p.pdid = id;
+      httpActionBlob(this.url.getPic + "?pdid=" + id,null, method).then((res)=>{
+        console.log(res)
+        let currentMimeType = "image/png";
+        let blob = new Blob([res], {
+          type: currentMimeType,
+        });
+        this.imgsrc = window.URL.createObjectURL(blob)
+
+
+      }).finally(() => {
+
+      })
+    },
+    handleOk(e) {
+      this.ModalText = 'The modal will be closed after two seconds';
+      this.confirmLoading = true;
+      setTimeout(() => {
+        this.visible = false;
+        this.confirmLoading = false;
+      }, 2000);
+    },
+    handleCancel(e) {
+      console.log('Clicked cancel button');
+      this.visible = false;
+    },
+    // 查询
+    getDataList() {
+      this.loading = true;
+      getModelList(this.url.list).then(res => {
+        //console.log('查询数据', res);
+        this.dataSource = res.result;
+        this.loading = false;
+      })
+    },
+  }
+}
+</script>
+
+<style lang="less" scoped>
+/deep/.ant-card-body {
+  padding: 12px;
+}
+/deep/.ant-modal {
+  width: 70% !important;
+}
+</style>

+ 264 - 0
itdmWeb/src/views/activiti/ActivitiDaibanList.vue

@@ -0,0 +1,264 @@
+<template>
+  <div>
+    <a-card>
+      <div class="table-page-search-wrapper">
+        <a-form layout="inline" @keyup.enter.native="searchQuery">
+          <a-row :gutter="24">
+            <a-col :xl="6" :lg="7" :md="8" :sm="24">
+              <a-form-model-item prop="key" label="流程KEY">
+                <a-input v-model="queryParam.key" allowClear placeholder="请输入流程KEY" ></a-input>
+              </a-form-model-item>
+            </a-col>
+            <a-col :xl="6" :lg="7" :md="8" :sm="24">
+              <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+                <a-button @click="searchQuery" type="primary" icon="search" style="margin-right: 8px">查询</a-button>
+              </span>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+
+      <a-table
+        :columns="columns"
+        :dataSource="dataSource"
+        rowKey="id"
+        :loading="loading"
+        class="j-table-force-nowrap"
+        :pagination="ipagination"
+        @change="handleTableChange"
+      >
+
+        <span slot="action" slot-scope="text, record">
+
+          <a @click="handleDetail1(record)">查看流程进度</a>
+           <a-divider type="vertical"/>
+          <a @click="handleBanli(record)">办理</a>
+
+        </span>
+        <a-divider type="vertical" />
+      </a-table>
+
+      <activiti-file-model ref="ativitiFileModel" ></activiti-file-model>
+      <pic-form1 ref="picForm" @ok="modalFormOk" ></pic-form1>
+    </a-card>
+  </div>
+
+</template>
+
+<script>
+
+import {getAction, deleteAction, banli, postAction} from '@/api/manage'
+  import { mixinDevice } from '@/utils/mixin'
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+  import ActivitiFileModel from './ActivitiFileModel'
+  import { getModelList } from '@/api/activiti/activiti'
+  import {filterObj} from "@/utils/util";
+  import PicForm1 from "@views/activiti/PicForm1";
+
+  export default {
+    name: 'ActivitiDaibanList',
+    mixins: [JeecgListMixin, mixinDevice],
+    components: {
+      PicForm1,
+      ActivitiFileModel
+    },
+    data() {
+      return {
+        columns: [
+          {
+            title: '序号',
+            dataIndex: '',
+            key: 'rowIndex',
+            width: 60,
+            align: 'center',
+            customRender: function (t, r, index) {
+              return parseInt(index) + 1
+            }
+          }, {
+            dataIndex: 'taskName',
+            title: '任务名称',
+            align: 'center'
+          }, {
+            dataIndex: 'processInstanceId',
+            title: '流程实例编号',
+            align: 'center'
+          }, {
+            dataIndex: 'executionId',
+            title: '执行实例编号',
+            align: 'center'
+          }, {
+            dataIndex: 'businessKey',
+            title: '业务号',
+            align: 'center'
+          }, {
+            title: '流程名称',
+            dataIndex: 'processName',
+            align: 'center',
+             scopedSlots: { customRender: 'suspensionState' }
+          },
+          {
+            title: '发起人',
+            dataIndex: 'starter',
+            align: 'center'
+          },
+          {
+            title: '办理人',
+            dataIndex: 'assignee',
+            align: 'center'
+          },
+          {
+            title: '任务创建时间',
+            dataIndex: 'createTime',
+            align: 'center'
+          },
+          {
+            title: '流程启动时间',
+            dataIndex: 'startTime',
+            align: 'center'
+          },
+          {
+            title: '操作',
+            dataIndex: 'action',
+            width: '150px',
+            align: 'center',
+            scopedSlots: { customRender: 'action' }
+          }],
+        url: {
+          list: '/service/act/mylist',
+          delete: '/act/reprocdef/deleteByDeploymentId',
+          convertToModel: '/act/reprocdef/convertToModel',
+          updateHandle: '/act/reprocdef/update',
+          banli: '/service/completeTask',
+        },
+        queryParam: {
+          category: '',
+          key: '',
+          name: ''
+        }
+       }
+    },
+   created() {
+     // this.getDataList()
+   },
+   methods: {
+     handleDetail1:function(record){
+       this.$refs.picForm.edit(record);
+       this.$refs.picForm.title="流程";
+       this.$refs.picForm.disableSubmit = true;
+     },
+     handleBanli:function (record){
+       banli(this.url.banli+"/"+record.taskId).then(res => {
+         console.log('转为模型', res)
+         if (res.code == 0) {
+           this.$message.success(res.msg);
+         } else {
+           this.$message.warning(res.msg);
+         }
+       })
+     },
+     // 删除
+     actDelete(deploymentId) {
+        deleteAction(this.url.delete, { deploymentId: deploymentId }).then(res => {
+            if (res.success) {
+              this.$message.success(res.message)
+              this.searchQuery()
+            } else {
+              this.$message.warning(res.message)
+            }
+        })
+     },
+     // 转为模型
+     convertToModel(id) {
+       getAction(this.url.convertToModel, { id: id }).then(res => {
+         console.log('转为模型', res)
+        if (res.success) {
+          this.$message.success('操作成功,流程编号:' + res.result.deploymentId)
+           this.searchQuery()
+        } else {
+          this.$message.warning('操作失败,流程编号:' + res.result.deploymentId)
+        }
+       })
+     },
+     // 挂起和激活
+     updateHandle(id, state) {
+       getAction(this.url.updateHandle, { id: id, state: state }).then(res => {
+         console.log('挂起和激活', res)
+         if (res.success) {
+           this.$message.success(res.message)
+            this.searchQuery()
+         } else {
+           this.$message.warning(res.message)
+         }
+       })
+     },
+
+     searchQuery() {
+       this.selectedRowKeys = [];
+       this.selectionRows = [];
+       this.loadData(1);
+     },
+     loadData(arg) {
+       if(!this.url.list){
+         this.$message.error("请设置url.list属性!")
+         return
+       }
+       //加载数据 若传入参数1则加载第一页的内容
+       if (arg === 1) {
+         this.ipagination.current = 1;
+       }
+       var params = this.getQueryParams();//查询条件
+       this.loading = true;
+       getAction(this.url.list, params).then((res) => {
+         if (res.success) {
+           //update-begin---author:zhangyafei    Date:20201118  for:适配不分页的数据列表------------
+           this.dataSource = res.result.records||res.result;
+           this.totalOrderPrice = res.message
+           if(res.result.total)
+           {
+             this.ipagination.total = res.result.total;
+           }else{
+             this.ipagination.total = 0;
+           }
+           //update-end---author:zhangyafei    Date:20201118  for:适配不分页的数据列表------------
+         }else{
+           this.$message.warning(res.message)
+         }
+       }).finally(() => {
+         this.loading = false
+       })
+     },
+      // 查询
+      getDataList() {
+       this.loading = true
+        let params = this.queryParam
+        getModelList(this.url.list, params).then(res => {
+          console.log('查询数据', res)
+          this.dataSource = res.result.records
+          this.total = res.result.total
+          this.ipagination.total = res.result.total
+          this.loading = false
+        })
+      },
+     openModeler() {
+          this.$refs.ativitiFileModel.openModel()
+       },
+
+      deployProcess(id) {
+        getAction(this.url.deploy, { id: id }).then(res => {
+          if (res.success) {
+            this.$message.success(res.message)
+             this.searchQuery()
+          } else {
+            this.$message.error(res.message)
+          }
+        })
+      }
+    }
+   }
+</script>
+
+<style lang="less" scoped>
+ .table-operator .ant-btn {
+        margin: 3px 8px 4px 0;
+    }
+</style>

+ 280 - 0
itdmWeb/src/views/activiti/ActivitiHisList.vue

@@ -0,0 +1,280 @@
+<template>
+  <div>
+    <a-card>
+      <div class="table-page-search-wrapper">
+        <a-form layout="inline" @keyup.enter.native="searchQuery">
+          <a-row :gutter="24">
+            <a-col :xl="6" :lg="7" :md="8" :sm="24">
+              <a-form-model-item prop="key" label="流程实例编号">
+                <a-input v-model="queryParam.processInstanceId" allowClear placeholder="请输入流程实例编号" ></a-input>
+              </a-form-model-item>
+            </a-col>
+            <a-col :xl="6" :lg="7" :md="8" :sm="24">
+              <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+                <a-button @click="searchQuery" type="primary" icon="search" style="margin-right: 8px">查询</a-button>
+              </span>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+
+      <a-table
+        :columns="columns"
+        :dataSource="dataSource"
+        rowKey="id"
+        :loading="loading"
+        class="j-table-force-nowrap"
+        :pagination="ipagination"
+        @change="handleTableChange"
+      >
+
+        <span slot="action" slot-scope="text, record">
+
+          <a @click="handleDetail1(record)">查看流程进度</a>
+
+        </span>
+        <a-divider type="vertical" />
+      </a-table>
+
+      <activiti-file-model ref="ativitiFileModel" ></activiti-file-model>
+      <pic-form1 ref="picForm" @ok="modalFormOk" ></pic-form1>
+    </a-card>
+  </div>
+
+</template>
+
+<script>
+
+import {getAction, deleteAction, banli, postAction} from '@/api/manage'
+  import { mixinDevice } from '@/utils/mixin'
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+  import ActivitiFileModel from './ActivitiFileModel'
+  import { getModelList } from '@/api/activiti/activiti'
+  import {filterObj} from "@/utils/util";
+  import store from '@/store/'
+  import PicForm1 from "@views/activiti/PicForm1";
+
+  export default {
+    name: 'ActivitiHisList',
+    mixins: [JeecgListMixin, mixinDevice],
+    components: {
+      PicForm1,
+      ActivitiFileModel
+    },
+    data() {
+      return {
+        columns: [
+          {
+            title: '序号',
+            dataIndex: '',
+            key: 'rowIndex',
+            width: 60,
+            align: 'center',
+            customRender: function (t, r, index) {
+              return parseInt(index) + 1
+            }
+          }, {
+            dataIndex: 'name',
+            title: '任务名称',
+            align: 'center'
+          },
+          {
+            dataIndex: 'processInstanceId',
+            title: '流程实例编号',
+            align: 'center'
+          },
+          // {
+          //   dataIndex: 'executionId',
+          //   title: '执行实例编号',
+          //   align: 'center'
+          // },
+          {
+            dataIndex: 'businessKey',
+            title: '业务号',
+            align: 'center'
+          },
+          {
+            title: '开始时间',
+            dataIndex: 'startTime',
+            align: 'center'
+          },
+          {
+            title: '结束时间',
+            dataIndex: 'endTime',
+            align: 'center'
+          },
+          {
+            title: '当前步骤',
+            dataIndex: 'currentTask',
+            align: 'center'
+          },
+          {
+            title: '当前步骤审批人id',
+            dataIndex: 'assignee',
+            align: 'center'
+          },
+          {
+            title: '是否结束',
+            dataIndex: 'ended',
+            align: 'center',
+            customRender:function (text) {
+              if(text){
+                return "是";
+              }else{
+                return "否";
+              }
+            }
+          },
+          {
+            title: '发起人id',
+            dataIndex: 'startUserId',
+            align: 'center'
+          },
+          {
+            title: '操作',
+            dataIndex: 'action',
+            width: '150px',
+            align: 'center',
+            scopedSlots: { customRender: 'action' }
+          }],
+        url: {
+          list: '/service/listHistoryProcess',
+          delete: '/act/reprocdef/deleteByDeploymentId',
+          convertToModel: '/act/reprocdef/convertToModel',
+          updateHandle: '/act/reprocdef/update',
+          banli: '/service/completeTask',
+        },
+        queryParam: {
+          category: '',
+          key: '',
+          name: ''
+        }
+       }
+    },
+   created() {
+     console.log("----------------------")
+     console.log(store.getters.userInfo)
+     // this.getDataList()
+   },
+   methods: {
+     handleDetail1:function(record){
+       this.$refs.picForm.edit(record);
+       this.$refs.picForm.title="流程";
+       this.$refs.picForm.disableSubmit = true;
+     },
+     handleBanli:function (record){
+       banli(this.url.banli+"/"+record.taskId).then(res => {
+         console.log('转为模型', res)
+         if (res.code == 0) {
+           this.$message.success(res.msg);
+         } else {
+           this.$message.warning(res.msg);
+         }
+       })
+     },
+     // 删除
+     actDelete(deploymentId) {
+        deleteAction(this.url.delete, { deploymentId: deploymentId }).then(res => {
+            if (res.success) {
+              this.$message.success(res.message)
+              this.searchQuery()
+            } else {
+              this.$message.warning(res.message)
+            }
+        })
+     },
+     // 转为模型
+     convertToModel(id) {
+       getAction(this.url.convertToModel, { id: id }).then(res => {
+         console.log('转为模型', res)
+        if (res.success) {
+          this.$message.success('操作成功,流程编号:' + res.result.deploymentId)
+           this.searchQuery()
+        } else {
+          this.$message.warning('操作失败,流程编号:' + res.result.deploymentId)
+        }
+       })
+     },
+     // 挂起和激活
+     updateHandle(id, state) {
+       getAction(this.url.updateHandle, { id: id, state: state }).then(res => {
+         console.log('挂起和激活', res)
+         if (res.success) {
+           this.$message.success(res.message)
+            this.searchQuery()
+         } else {
+           this.$message.warning(res.message)
+         }
+       })
+     },
+
+     searchQuery() {
+       this.selectedRowKeys = [];
+       this.selectionRows = [];
+       this.loadData(1);
+     },
+     loadData(arg) {
+       if(!this.url.list){
+         this.$message.error("请设置url.list属性!")
+         return
+       }
+       //加载数据 若传入参数1则加载第一页的内容
+       if (arg === 1) {
+         this.ipagination.current = 1;
+       }
+       var params = this.getQueryParams();//查询条件
+       this.loading = true;
+       getAction(this.url.list, params).then((res) => {
+         if (res.success) {
+           //update-begin---author:zhangyafei    Date:20201118  for:适配不分页的数据列表------------
+           this.dataSource = res.result.records||res.result;
+           this.totalOrderPrice = res.message
+           if(res.result.total)
+           {
+             this.ipagination.total = res.result.total;
+           }else{
+             this.ipagination.total = 0;
+           }
+           //update-end---author:zhangyafei    Date:20201118  for:适配不分页的数据列表------------
+         }else{
+           this.$message.warning(res.message)
+         }
+       }).finally(() => {
+         this.loading = false
+       })
+     },
+      // 查询
+      getDataList() {
+       this.loading = true
+        let params = this.queryParam
+        getModelList(this.url.list, params).then(res => {
+          console.log('查询数据', res)
+          this.dataSource = res.result.records
+          this.total = res.result.total
+          this.ipagination.total = res.result.total
+          this.loading = false
+        })
+      },
+     openModeler() {
+          this.$refs.ativitiFileModel.openModel()
+       },
+
+      deployProcess(id) {
+        getAction(this.url.deploy, { id: id }).then(res => {
+          if (res.success) {
+            this.$message.success(res.message)
+             this.searchQuery()
+          } else {
+            this.$message.error(res.message)
+          }
+        })
+      }
+    }
+   }
+</script>
+
+<style lang="less" scoped>
+ .table-operator .ant-btn {
+        margin: 3px 8px 4px 0;
+    }
+</style>

+ 14 - 1
itdmWeb/src/views/activiti/ActivitiList.vue

@@ -39,6 +39,8 @@
         <span slot="action" slot-scope="text, record">
           <a href="javascript:;" @click="openModeler(record)">流程</a>
           <a-divider type="vertical"/>
+          <a href="javascript:;" @click="handleDetail1(record)">查看流程</a>
+          <br>
           <a-dropdown>
             <a class="ant-dropdown-link">
               更多 <a-icon type="down"/>
@@ -66,6 +68,8 @@
 
       <activiti-model-modal ref="modalForm" @ok="modalFormOk" @getModels="getModels"></activiti-model-modal>
       <activiti-model ref="activitiModel" @ok="modalFormOk" ></activiti-model>
+      <pic-form ref="picForm" @ok="modalFormOk" ></pic-form>
+      <pic-modal ref="picModel" @ok="modalFormOk" ></pic-modal>
     </a-card>
   </div>
 
@@ -79,11 +83,15 @@
   import ActivitiModelModal from './ActivitiModelModal'
   import { getModelList } from '@/api/activiti/activiti'
   import ActivitiModel from './ActivitiModel'
+  import PicModal from "@views/activiti/PicModel";
+  import PicForm from "@views/activiti/PicForm";
 
   export default {
     name: 'ActivitiList',
     mixins: [JeecgListMixin, mixinDevice],
     components: {
+      PicForm,
+      PicModal,
       ActivitiModelModal, ActivitiModel
     },
     data() {
@@ -160,7 +168,12 @@
      },
      openModeler(row) {
           this.$refs.activitiModel.openModel(row)
-       },
+     },
+     handleDetail1:function(record){
+       this.$refs.picForm.edit(record);
+       this.$refs.picForm.title="流程";
+       this.$refs.picForm.disableSubmit = true;
+     },
       // 查询
       getModels() {
         let param = this.q

+ 13 - 0
itdmWeb/src/views/activiti/CustomForm.vue

@@ -0,0 +1,13 @@
+<template>
+
+</template>
+
+<script>
+export default {
+  name: "CustomForm"
+}
+</script>
+
+<style scoped>
+
+</style>

+ 119 - 0
itdmWeb/src/views/activiti/PicForm.vue

@@ -0,0 +1,119 @@
+<template>
+
+  <a-modal
+    :title="title"
+    :width="1600"
+    :height="1600"
+    :visible="visible"
+    :confirmLoading="confirmLoading"
+    @cancel="handleCancel"
+    cancelText="关闭"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    switchFullscreen
+  >
+    <a-spin :spinning="confirmLoading" style="text-align: center;">
+        <img :src="imgsrc"  max-width="1600" max-height="1600"/>
+    </a-spin>
+  </a-modal>
+</template>
+<script>
+import {httpAction, httpActionBlob, postAction} from '@/api/manage'
+
+export default {
+  name: 'PicForm',
+  components: { },
+  data() {
+    return {
+      imgsrc:'',
+      title: '新增',
+      visible: false,
+      dataForm: {},
+      confirmLoading: false,
+      disaform: false,
+      disableSubmit: false,
+      dataRule: {
+        name: [{ required: true, message: '请输入模型名称!' }],
+        key: [{ required: true, message: '请输入模型key!' }]
+      },
+      url:{
+        getPic:"/service/act/showResource"
+      }
+    }
+  },
+  computed: {
+
+  },
+  created() {
+  },
+  mounted() {
+
+  },
+  methods: {
+
+    add () {
+      this.visible = true
+    },
+    edit (record) {
+      var that = this;
+      var pid = record.id;
+      var httpurl = this.url.getPic;
+      var method = "GET";
+      var paramer11 = {};
+      paramer11.pdid = pid;
+      httpActionBlob(httpurl+"?pdid="+pid,null,method).then((res)=>{
+        console.log(res)
+        // // that.imgsrc = res;
+        // // this.imgsrc = window.URL.createObjectURL(res);
+        // that.imgsrc = "data:image/png;base64,"+res;
+        // console.log(123)
+        // console.log(that.imgsrc)
+        let currentMimeType = "image/png";
+        let blob = new Blob([res], {
+          type: currentMimeType,
+        });
+        that.imgsrc = window.URL.createObjectURL(blob)
+
+
+      }).finally(() => {
+
+      })
+
+      this.visible = true
+      // this.dataForm = Object.assign({}, record)
+    },
+    close () {
+      this.$emit('close')
+      this.visible = false
+    },
+    // 确定
+    handleOk() {
+      console.log('确定', this.dataForm)
+      this.$refs.dataForm.validate(valid => {
+        if (valid) {
+          let url = 'act/remodel/save'
+          postAction(url, this.dataForm).then(res => {
+            console.log('res', res)
+            if (res.success) {
+              this.$message.success(res.message)
+            } else {
+              this.$message.error(res.message)
+            }
+            this.visible = false
+            this.$emit('getModels')
+          })
+        } else {
+          return false
+        }
+      })
+    },
+    // 关闭
+    handleCancel() {
+      this.close()
+    }
+
+  }
+}
+</script>
+
+<style>
+</style>

+ 117 - 0
itdmWeb/src/views/activiti/PicForm1.vue

@@ -0,0 +1,117 @@
+<template>
+
+  <a-modal
+    :title="title"
+    :width="1600"
+    :height="1600"
+    :visible="visible"
+    :confirmLoading="confirmLoading"
+    @cancel="handleCancel"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    cancelText="关闭"
+    switchFullscreen
+  >
+    <a-spin :spinning="confirmLoading" style="text-align: center;">
+        <img :src="imgsrc"  max-width="1600" max-height="1600"/>
+    </a-spin>
+  </a-modal>
+</template>
+<script>
+import {httpAction, httpActionBlob, postAction} from '@/api/manage'
+
+export default {
+  name: 'PicForm1',
+  components: { },
+  data() {
+    return {
+      imgsrc:'',
+      title: '新增',
+      visible: false,
+      dataForm: {},
+      confirmLoading: false,
+      disaform: false,
+      disableSubmit: false,
+      dataRule: {
+        name: [{ required: true, message: '请输入模型名称!' }],
+        key: [{ required: true, message: '请输入模型key!' }]
+      },
+      url:{
+        getPic:"/service/traceProcess"
+      }
+    }
+  },
+  computed: {
+
+  },
+  created() {
+  },
+  mounted() {
+
+  },
+  methods: {
+
+    add () {
+      this.visible = true
+    },
+    edit (record) {
+      var that = this;
+      var processInstanceId = record.processInstanceId;
+      var httpurl = this.url.getPic;
+      var method = "GET";
+      httpActionBlob(httpurl+"/"+processInstanceId,null,method).then((res)=>{
+        console.log(res)
+        // // that.imgsrc = res;
+        // // this.imgsrc = window.URL.createObjectURL(res);
+        // that.imgsrc = "data:image/png;base64,"+res;
+        // console.log(123)
+        // console.log(that.imgsrc)
+        let currentMimeType = "image/png";
+        let blob = new Blob([res], {
+          type: currentMimeType,
+        });
+        that.imgsrc = window.URL.createObjectURL(blob)
+
+
+      }).finally(() => {
+
+      })
+
+      this.visible = true
+      // this.dataForm = Object.assign({}, record)
+    },
+    close () {
+      this.$emit('close')
+      this.visible = false
+    },
+    // 确定
+    handleOk() {
+      console.log('确定', this.dataForm)
+      this.$refs.dataForm.validate(valid => {
+        if (valid) {
+          let url = 'act/remodel/save'
+          postAction(url, this.dataForm).then(res => {
+            console.log('res', res)
+            if (res.success) {
+              this.$message.success(res.message)
+            } else {
+              this.$message.error(res.message)
+            }
+            this.visible = false
+            this.$emit('getModels')
+          })
+        } else {
+          return false
+        }
+      })
+    },
+    // 关闭
+    handleCancel() {
+      this.close()
+    }
+
+  }
+}
+</script>
+
+<style>
+</style>

+ 88 - 0
itdmWeb/src/views/activiti/PicModel.vue

@@ -0,0 +1,88 @@
+<template>
+  <a-modal
+    :title="title"
+    :width="1300"
+    :visible="visible"
+    @cancel="onCancel"
+    :confirmLoading="confirmLoading"
+    :footer="null"
+    switchFullscreen
+  >
+    <div style="height:100%;">
+      <iframe
+        id="iframe"
+        :src="modelerUrl"
+        frameborder="0"
+        width="100%"
+        height="1650px"
+        scrolling="auto"
+      />
+
+    </div>
+  </a-modal>
+</template>
+
+<script>
+import { getToken } from '@/utils/auth'
+import { ACCESS_TOKEN, TENANT_ID } from '@/store/mutation-types'
+import Vue from 'vue'
+
+export default {
+  name: 'PicModel',
+  components: {},
+  data() {
+    return {
+      id: '',
+      modelerLoading: true,
+      title: '流程设计',
+      visible: false,
+      models: {},
+      confirmLoading: false,
+      modelerUrl: ''
+
+    }
+  },
+  computed: {
+    token() {
+      return this.$store.getters.token
+    },
+    apiUrl() {
+      let apiBaseUrl = process.env.VUE_APP_API_BASE_URL
+      return apiBaseUrl // 后台部署的api服务
+    }
+  },
+  created() {
+  },
+  mounted() {
+    // 传递值
+    window.getMyVue = this
+    window.getMyVue.tenantId = Vue.ls.get(TENANT_ID)
+  },
+  methods: {
+    onCancel() {
+      this.visible = false
+      this.$emit('ok')
+    },
+    openModel(row) {
+      console.log('window.getMyVue.tenantId ', window.getMyVue)
+      this.visible = true
+      this.modelerId = row.id
+      this.models = row
+      this.modelerUrl = `/static/modeler.html?modelId=` + row.id
+    }
+
+  }
+}
+// 关闭流程设计弹窗
+top.modelClose = function () {
+  window.getMyVue.visible = false
+  // this.$emit('ok')
+}
+</script>
+
+<style>
+
+.ant-modal-body{
+  padding:20;
+}
+</style>

+ 151 - 116
itdmWeb/src/views/examples/form/BasicForm.vue

@@ -1,138 +1,173 @@
 <template>
-  <a-card :body-style="{padding: '24px 32px'}" :bordered="false">
-    <a-form @submit="handleSubmit" :form="form">
-      <a-form-item
-        label="标题"
-        :labelCol="{lg: {span: 7}, sm: {span: 7}}"
-        :wrapperCol="{lg: {span: 10}, sm: {span: 17} }">
-        <a-input
-          v-decorator="[
+  <a-modal
+    title="流程图"
+    :visible="visible"
+    :confirm-loading="confirmLoading"
+    @ok="handleOk"
+    @cancel="handleCancel"
+  >
+    <a-card :body-style="{padding: '24px 32px'}" :bordered="false">
+      <a-form @submit="handleSubmit" :form="form">
+        <a-form-item
+          label="标题"
+          :labelCol="{lg: {span: 7}, sm: {span: 7}}"
+          :wrapperCol="{lg: {span: 10}, sm: {span: 17} }">
+          <a-input
+            v-decorator="[
             'name',
             {rules: [{ required: true, message: '请输入标题' }]}
           ]"
-          name="name"
-          placeholder="给目标起个名字" />
-      </a-form-item>
-      <a-form-item
-        label="起止日期"
-        :labelCol="{lg: {span: 7}, sm: {span: 7}}"
-        :wrapperCol="{lg: {span: 10}, sm: {span: 17} }">
-        <a-range-picker
-          name="buildTime"
-          style="width: 100%"
-          v-decorator="[
+            name="name"
+            placeholder="给目标起个名字"/>
+        </a-form-item>
+        <a-form-item
+          label="起止日期"
+          :labelCol="{lg: {span: 7}, sm: {span: 7}}"
+          :wrapperCol="{lg: {span: 10}, sm: {span: 17} }">
+          <a-range-picker
+            name="buildTime"
+            style="width: 100%"
+            v-decorator="[
             'buildTime',
             {rules: [{ required: true, message: '请选择起止日期' }]}
-          ]" />
-      </a-form-item>
-      <a-form-item
-        label="目标描述"
-        :labelCol="{lg: {span: 7}, sm: {span: 7}}"
-        :wrapperCol="{lg: {span: 10}, sm: {span: 17} }">
-        <a-textarea
-          rows="4"
-          placeholder="请输入你阶段性工作目标"
-          v-decorator="[
+          ]"/>
+        </a-form-item>
+        <a-form-item
+          label="目标描述"
+          :labelCol="{lg: {span: 7}, sm: {span: 7}}"
+          :wrapperCol="{lg: {span: 10}, sm: {span: 17} }">
+          <a-textarea
+            rows="4"
+            placeholder="请输入你阶段性工作目标"
+            v-decorator="[
             'description',
             {rules: [{ required: true, message: '请输入目标描述' }]}
-          ]" />
-      </a-form-item>
-      <a-form-item
-        label="衡量标准"
-        :labelCol="{lg: {span: 7}, sm: {span: 7}}"
-        :wrapperCol="{lg: {span: 10}, sm: {span: 17} }">
-        <a-textarea
-          rows="4"
-          placeholder="请输入衡量标准"
-          v-decorator="[
+          ]"/>
+        </a-form-item>
+        <a-form-item
+          label="衡量标准"
+          :labelCol="{lg: {span: 7}, sm: {span: 7}}"
+          :wrapperCol="{lg: {span: 10}, sm: {span: 17} }">
+          <a-textarea
+            rows="4"
+            placeholder="请输入衡量标准"
+            v-decorator="[
             'type',
             {rules: [{ required: true, message: '请输入衡量标准' }]}
-          ]" />
-      </a-form-item>
-      <a-form-item
-        label="客户"
-        :labelCol="{lg: {span: 7}, sm: {span: 7}}"
-        :wrapperCol="{lg: {span: 10}, sm: {span: 17} }">
-        <a-input 
-          placeholder="请描述你服务的客户,内部客户直接 @姓名/工号"
-          v-decorator="[
+          ]"/>
+        </a-form-item>
+        <a-form-item
+          label="客户"
+          :labelCol="{lg: {span: 7}, sm: {span: 7}}"
+          :wrapperCol="{lg: {span: 10}, sm: {span: 17} }">
+          <a-input
+            placeholder="请描述你服务的客户,内部客户直接 @姓名/工号"
+            v-decorator="[
             'customer',
             {rules: [{ required: true, message: '请描述你服务的客户' }]}
-          ]" />
-      </a-form-item>
-      <a-form-item
-        label="邀评人"
-        :labelCol="{lg: {span: 7}, sm: {span: 7}}"
-        :wrapperCol="{lg: {span: 10}, sm: {span: 17} }"
-        :required="false"
-      >
-        <a-input placeholder="请直接 @姓名/工号,最多可邀请 5 人" />
-      </a-form-item>
-      <a-form-item
-        label="权重"
-        :labelCol="{lg: {span: 7}, sm: {span: 7}}"
-        :wrapperCol="{lg: {span: 10}, sm: {span: 17} }"
-        :required="false"
-      >
-        <a-input-number :min="0" :max="100" />
-        <span> %</span>
-      </a-form-item>
-      <a-form-item
-        label="目标公开"
-        :labelCol="{lg: {span: 7}, sm: {span: 7}}"
-        :wrapperCol="{lg: {span: 10}, sm: {span: 17} }"
-        :required="false"
-        help="客户、邀评人默认被分享"
-      >
-        <a-radio-group v-model="value">
-          <a-radio :value="1">公开</a-radio>
-          <a-radio :value="2">部分公开</a-radio>
-          <a-radio :value="3">不公开</a-radio>
-        </a-radio-group>
-        <a-form-item>
-          <a-select mode="multiple" v-if="value === 2">
-            <a-select-option value="4">同事一</a-select-option>
-            <a-select-option value="5">同事二</a-select-option>
-            <a-select-option value="6">同事三</a-select-option>
-          </a-select>
+          ]"/>
+        </a-form-item>
+        <a-form-item
+          label="邀评人"
+          :labelCol="{lg: {span: 7}, sm: {span: 7}}"
+          :wrapperCol="{lg: {span: 10}, sm: {span: 17} }"
+          :required="false"
+        >
+          <a-input placeholder="请直接 @姓名/工号,最多可邀请 5 人"/>
+        </a-form-item>
+        <a-form-item
+          label="权重"
+          :labelCol="{lg: {span: 7}, sm: {span: 7}}"
+          :wrapperCol="{lg: {span: 10}, sm: {span: 17} }"
+          :required="false"
+        >
+          <a-input-number :min="0" :max="100"/>
+          <span> %</span>
+        </a-form-item>
+        <a-form-item
+          label="目标公开"
+          :labelCol="{lg: {span: 7}, sm: {span: 7}}"
+          :wrapperCol="{lg: {span: 10}, sm: {span: 17} }"
+          :required="false"
+          help="客户、邀评人默认被分享"
+        >
+          <a-radio-group v-model="value">
+            <a-radio :value="1">公开</a-radio>
+            <a-radio :value="2">部分公开</a-radio>
+            <a-radio :value="3">不公开</a-radio>
+          </a-radio-group>
+          <a-form-item>
+            <a-select mode="multiple" v-if="value === 2">
+              <a-select-option value="4">同事一</a-select-option>
+              <a-select-option value="5">同事二</a-select-option>
+              <a-select-option value="6">同事三</a-select-option>
+            </a-select>
+          </a-form-item>
         </a-form-item>
-      </a-form-item>
-      <a-form-item
-        :wrapperCol="{ span: 24 }"
-        style="text-align: center"
-      >
-        <a-button htmlType="submit" type="primary">提交</a-button>
-        <a-button style="margin-left: 8px">保存</a-button>
-      </a-form-item>
-    </a-form>
-  </a-card>
+        <a-form-item
+          :wrapperCol="{ span: 24 }"
+          style="text-align: center"
+        >
+          <a-button htmlType="submit" type="primary">提交</a-button>
+          <a-button style="margin-left: 8px">保存</a-button>
+        </a-form-item>
+      </a-form>
+    </a-card>
+  </a-modal>
 </template>
 
 <script>
-  export default {
-    name: 'BaseForm',
-    data () {
-      return {
-        description: '表单页用于向用户收集或验证信息,基础表单常见于数据项较少的表单场景。',
-        value: 1,
-
-        // form
-        form: this.$form.createForm(this),
+export default {
+  name: 'BaseForm',
+  data() {
+    return {
+      description: '表单页用于向用户收集或验证信息,基础表单常见于数据项较少的表单场景。',
+      value: 1,
 
+      // form
+      form: this.$form.createForm(this),
+      ModalText: 'Content of the modal',
+      visible: false,
+      confirmLoading: false,
+      url: {
+        commit: 'xiaoetong/saveForm'
       }
+    }
+  },
+  methods: {
+    handleOk(e) {
+      this.ModalText = 'The modal will be closed after two seconds'
+      this.confirmLoading = true
+      setTimeout(() => {
+        this.visible = false
+        this.confirmLoading = false
+      }, 2000)
     },
-    methods: {
-
-      // handler
-      handleSubmit (e) {
-        e.preventDefault()
-        this.form.validateFields((err, values) => {
-          if (!err) {
-            // eslint-disable-next-line no-console
-            console.log('Received values of form: ', values)
-          }
-        })
-      }
+    handleCancel(e) {
+      console.log('Clicked cancel button')
+      this.visible = false
+    },
+    // handler
+    handleSubmit(e) {
+      e.preventDefault()
+      this.form.validateFields((err, values) => {
+        if (!err) {
+          // eslint-disable-next-line no-console
+          console.log('Received values of form: ', values)
+          this.loading = true
+          let p = {}
+          p.name = values.name
+          p.description = values.description
+          p.type = values.type
+          p.start = values.buildTime[0]
+          p.end = values.buildTime[1]
+          getModelList(this.url.commit, p).then(res => {
+            //console.log('查询数据', res);
+            this.loading = false
+          })
+        }
+      })
     }
   }
+}
 </script>

+ 97 - 0
itdmWeb/src/views/examples/form/BasicForm1.vue

@@ -0,0 +1,97 @@
+<template>
+  <a-modal
+    title="流程图123"
+    :visible="visible"
+    :confirm-loading="confirmLoading"
+    @ok="handleOk"
+    @cancel="handleCancel"
+  >
+    <a-card :body-style="{padding: '24px 32px'}" :bordered="false">
+      <a-form @submit="handleSubmit" :form="form">
+        <a-form-item
+          label="标题2"
+          :labelCol="{lg: {span: 7}, sm: {span: 7}}"
+          :wrapperCol="{lg: {span: 10}, sm: {span: 17} }">
+          <a-input
+            v-decorator="[
+            'name',
+            {rules: [{ required: true, message: '请输入标题' }]}
+          ]"
+            name="name"
+            placeholder="给目标起个名字" />
+        </a-form-item>
+
+        <a-form-item
+          :wrapperCol="{ span: 24 }"
+          style="text-align: center"
+        >
+          <a-button htmlType="submit" type="primary">提交</a-button>
+          <a-button style="margin-left: 8px">保存</a-button>
+        </a-form-item>
+      </a-form>
+    </a-card>
+  </a-modal>
+
+</template>
+
+<script>
+  import { getModelList } from '@/api/activiti/activiti'
+  export default {
+    name: 'BaseForm1',
+    data () {
+      return {
+        description: '表单页用于向用户收集或验证信息,基础表单常见于数据项较少的表单场景。',
+        value: 1,
+
+        // form
+        form: this.$form.createForm(this),
+        ModalText: 'Content of the modal',
+        visible: false,
+        confirmLoading: false,
+        url: {
+          commit: 'xiaoetong/saveForm'
+        }
+      }
+    },
+    methods: {
+      handleOk(e) {
+        this.ModalText = 'The modal will be closed after two seconds';
+        this.confirmLoading = true;
+        setTimeout(() => {
+          this.visible = false;
+          this.confirmLoading = false;
+        }, 2000);
+      },
+      handleCancel(e) {
+        console.log('Clicked cancel button');
+        this.visible = false;
+      },
+      // handler
+      handleSubmit (e) {
+        e.preventDefault()
+        this.form.validateFields((err, values) => {
+          if (!err) {
+            // eslint-disable-next-line no-console
+            //console.log('Received values of form: ', values)
+             this.loading = true;
+            let p = {};
+            p.name = values.name;
+            p.description = values.description;
+            p.type = values.type;
+            p.start = values.buildTime[0];
+            p.end = values.buildTime[1];
+            getModelList(this.url.commit, p).then(res => {
+              //console.log('查询数据', res);
+              this.loading = false;
+            })
+          }
+        })
+      }
+    }
+  }
+</script>
+<style lang="less" scoped>
+/deep/.ant-modal {
+  width: 40% !important;
+}
+</style>