瀏覽代碼

Merge branch 'lrh' of yinet2020/YinetOASystemWeb into master

吕瑞涵 4 年之前
父節點
當前提交
149fad90e6
共有 2 個文件被更改,包括 117 次插入99 次删除
  1. 3 3
      src/views/activiti/modeler/index.vue
  2. 114 96
      src/views/system/process/index.vue

+ 3 - 3
src/views/activiti/modeler/index.vue

@@ -173,12 +173,12 @@
       /** 新增按钮操作 */
       handleAdd() {
         this.reset()
-        this.src = '/prod-api/modeler/create?r=' + Math.random()
+        this.src = 'http://192.168.1.20:8081/modeler/create?r=' + Math.random()
         this.editOpen = true
       },
       /** 编辑按钮操作 */
       handleUpdate(row) {
-        this.src = '/prod-api/modeler/activiti/index?modelId=' + row.id
+        this.src = 'http://192.168.1.20:8081/modeler/activiti/index?modelId=' + row.id
         document.getElementById('activiti_main').contentWindow.location.reload()
         this.editOpen = true
       },
@@ -199,7 +199,7 @@
       },
       /** 导出按钮操作 */
       handleExport(row) {
-        window.location.href = process.env.VUE_APP_BASE_API + '/activiti/modeler/export?modelId=' + row.id
+        window.location.href = 'http://192.168.1.20:8081/activiti/modeler/export?modelId=' + row.id
       },
       /** 删除按钮操作 */
       handleDelete(row, index) {

+ 114 - 96
src/views/system/process/index.vue

@@ -2,11 +2,13 @@
   <div class="hello">
     <div class="box">
       <el-container>
-        <el-aside width="180px"  >
-          <div class="title">流程分类</div>
+        <el-aside width="180px">
+          <div class="title" style="font-size: 20px">流程分类</div>
           <div class="left">
             <ul>
-              <li style="cursor:pointer"   @click="changeCategroy(item.id)" v-for="item in processList"><i class="el-icon-s-order"></i>{{item.categoryName}}</li>
+              <li style="cursor:pointer" @click="changeCategroy(item.id)" v-for="item in processList"><i
+                class="el-icon-s-order"></i>{{item.categoryName}}
+              </li>
             </ul>
           </div>
         </el-aside>
@@ -24,20 +26,20 @@
               </el-form-item>
               <el-form-item>
                 <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
-                <el-button type="primary" icon="el-icon-plus" size="mini"  @click="handleAdd()">新建流程</el-button>
-                <el-button type="primary" icon="el-icon-plus"  size="mini" @click="handleUpload()">导入模型</el-button>
+                <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd()">新建流程</el-button>
+                <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleUpload()">导入模型</el-button>
               </el-form-item>
             </el-form>
-          <!--  <el-row class="der">
-              <el-button @click="handleQuery()">刷新</el-button>
-              <el-button type="primary" @click="handleAdd()">添加模型</el-button>
-              <el-button type="primary" @click="handleUpload()">导入模型(BPMN)</el-button>
-              &lt;!&ndash;              <el-button>查看流程图</el-button>&ndash;&gt;
-              &lt;!&ndash;              <el-button>查看流程(XML)</el-button>&ndash;&gt;
-              &lt;!&ndash;              <el-button>查看流程(JSON)</el-button>&ndash;&gt;
-              &lt;!&ndash;              <el-button>导出流程(BPMN)</el-button>&ndash;&gt;
-              &lt;!&ndash;              <el-button>导入流程(BPMN)</el-button>&ndash;&gt;
-            </el-row>-->
+            <!--  <el-row class="der">
+                <el-button @click="handleQuery()">刷新</el-button>
+                <el-button type="primary" @click="handleAdd()">添加模型</el-button>
+                <el-button type="primary" @click="handleUpload()">导入模型(BPMN)</el-button>
+                &lt;!&ndash;              <el-button>查看流程图</el-button>&ndash;&gt;
+                &lt;!&ndash;              <el-button>查看流程(XML)</el-button>&ndash;&gt;
+                &lt;!&ndash;              <el-button>查看流程(JSON)</el-button>&ndash;&gt;
+                &lt;!&ndash;              <el-button>导出流程(BPMN)</el-button>&ndash;&gt;
+                &lt;!&ndash;              <el-button>导入流程(BPMN)</el-button>&ndash;&gt;
+              </el-row>-->
             <el-table
               border
               v-loading="loading"
@@ -48,29 +50,29 @@
                   <span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
                 </template>
               </el-table-column>
-              <el-table-column label="部署版本" align="center" prop="activitiDeployStatus" >
+              <el-table-column label="部署版本" align="center" prop="activitiDeployStatus">
                 <template slot-scope="scope">
-                 <span   v-if="scope.row.processDefinition!=null">
+                 <span v-if="scope.row.processDefinition!=null">
                     {{ scope.row.processDefinition.id}}
                   </span>
                 </template>
               </el-table-column>
               <el-table-column label="流程名称" width="150" align="center" prop="activitiName"/>
               <el-table-column label="流程分类" width="150" align="center" prop="activitiDeployId"/>
-            <!--  <el-table-column label="流程定义" align="center" prop="resourceName" width="180">
-                <template slot-scope="scope">
-                  <el-link target="_blank" type="success" @click="viewFlowXML(scope.row)">
-                    查看流程(XML)
-                  </el-link>
-                </template>
-              </el-table-column>
-              <el-table-column label="流程图" align="center" prop="diagramResourceName" width="180">
-                <template slot-scope="scope">
-                  <el-link target="_blank" type="primary" @click="viewFlowChat(scope.row)">
-                    查看流程图
-                  </el-link>
-                </template>
-              </el-table-column>-->
+              <!--  <el-table-column label="流程定义" align="center" prop="resourceName" width="180">
+                  <template slot-scope="scope">
+                    <el-link target="_blank" type="success" @click="viewFlowXML(scope.row)">
+                      查看流程(XML)
+                    </el-link>
+                  </template>
+                </el-table-column>
+                <el-table-column label="流程图" align="center" prop="diagramResourceName" width="180">
+                  <template slot-scope="scope">
+                    <el-link target="_blank" type="primary" @click="viewFlowChat(scope.row)">
+                      查看流程图
+                    </el-link>
+                  </template>
+                </el-table-column>-->
               <el-table-column label="部署状态" align="center" prop="activitiDeployStatus" width="150">
                 <template slot-scope="scope">
                   <el-tag
@@ -94,11 +96,11 @@
                   <span>{{ parseTimeT(scope.row.activitiCreateTime) }}</span>
                 </template>
               </el-table-column>
-            <!--  <el-table-column label="最后更新时间" align="center" prop="activitiUpdateTime" width="180">
-                <template slot-scope="scope">
-                  <span>{{ parseTimeT(scope.row.activitiUpdateTime) }}</span>
-                </template>
-              </el-table-column>-->
+              <!--  <el-table-column label="最后更新时间" align="center" prop="activitiUpdateTime" width="180">
+                  <template slot-scope="scope">
+                    <span>{{ parseTimeT(scope.row.activitiUpdateTime) }}</span>
+                  </template>
+                </el-table-column>-->
 
               <el-table-column label="操作" align="center" width="200" class-name="small-padding fixed-width">
                 <template slot-scope="scope">
@@ -191,30 +193,30 @@
         <el-tab-pane>
           <span slot="label"><i class="el-icon-date"></i> 业务关联</span>
           <el-button type="primary" icon="el-icon-plus" @click="addDatAassociation">新增</el-button>
-        <br/>
-          <el-table border :data="DataAssociation" >
+          <br/>
+          <el-table border :data="DataAssociation">
             <el-table-column label="序号" type="index" width="130" align="center">
 
             </el-table-column>
             <el-table-column label="表名/自定义表单编号" width="180" align="center" prop="tablename"/>
             <el-table-column label="业务标题表达式" align="center" prop="titleexp"/>
-            <el-table-column label="操作" width="180" align="center" >
+            <el-table-column label="操作" width="180" align="center">
               <template slot-scope="scope">
-           <!--   <el-button
-                size="mini"
-                type="text"
-                icon="el-icon-edit"
-                @click="data_association(scope.row.activitiKey)"
-              >编辑
-              </el-button>-->
-              <el-button
-                size="mini"
-                type="text"
-                icon="el-icon-delete"
-                @click="handleDeleteAss(scope.row.id)"
-                v-hasPermi="['system:menu:remove']"
-              >删除
-              </el-button>
+                <!--   <el-button
+                     size="mini"
+                     type="text"
+                     icon="el-icon-edit"
+                     @click="data_association(scope.row.activitiKey)"
+                   >编辑
+                   </el-button>-->
+                <el-button
+                  size="mini"
+                  type="text"
+                  icon="el-icon-delete"
+                  @click="handleDeleteAss(scope.row.id)"
+                  v-hasPermi="['system:menu:remove']"
+                >删除
+                </el-button>
               </template>
             </el-table-column>
           </el-table>
@@ -240,13 +242,13 @@
           <el-input v-model="formadd.titleexp"></el-input>
 
         </el-form-item>
-        <el-form-item  >
+        <el-form-item>
           <p style="color: red;">参考:XXXX【${busname}】-XXXX【${name}】;其中${}表达式取流程变量的值</p>
         </el-form-item>
 
         <el-form-item>
           <el-button type="primary" @click="SubmitAcc('formadd')">确 定</el-button>
-          <el-button @click="closeAddform" >关 闭</el-button>
+          <el-button @click="closeAddform">关 闭</el-button>
         </el-form-item>
       </el-form>
     </el-dialog>
@@ -276,9 +278,9 @@
     data() {
       return {
         formadd: {
-          actkey:'',
-          tablename:'',
-          titleexp:''
+          actkey: '',
+          tablename: '',
+          titleexp: ''
         },
         rules: {
           tablename: [
@@ -286,12 +288,12 @@
           ],
           titleexp: [
             { required: true, message: '请输入标题表达式', trigger: 'blur' }
-          ],
+          ]
         },
         baseUrl: process.env.VUE_APP_BASE_API,
         processList: [],
         dialogVisible: false,
-        dialogaddVisible:false,
+        dialogaddVisible: false,
         // 遮罩层
         loading: true,
         // 总条数
@@ -321,12 +323,12 @@
           // 设置上传的请求头部
           headers: { Authorization: 'Bearer ' + getToken() },
           // 上传的地址
-          url: undefined,
+          url: undefined
 
         },
-        actkey:'',
+        actkey: '',
         //业务关联数据
-        DataAssociation:[]
+        DataAssociation: []
       }
     },
     methods: {
@@ -361,12 +363,12 @@
       },
       /** 新增按钮操作 */
       handleAdd() {
-        this.src = process.env.VUE_APP_BASE_API + '/modeler/create?f=' + this.queryParams.activitiCategory + '&r=' + Math.random()
+        this.src = 'http://192.168.1.20:8081/modeler/create?f=' + this.queryParams.activitiCategory + '&r=' + Math.random()
         this.editOpen = true
       },
       /** 编辑按钮操作 */
       handleUpdate(row) {
-        this.src = process.env.VUE_APP_BASE_API + '/modeler/activiti/index?modelId=' + row.activitiId
+        this.src = 'http://192.168.1.20:8081/modules/WorkFlow/Activiti/index.html?modelId=' + row.activitiId
         this.editOpen = true
       },
       /** 部署按钮操作 */
@@ -466,22 +468,22 @@
         this.getList()
       },
       //单击业务关联
-      data_association(actkeyvalue){
-        this.dialogVisible = false;
+      data_association(actkeyvalue) {
+        this.dialogVisible = false
         getListDataAssociation(actkeyvalue).then(response => {
-        this.DataAssociation=response.rows;
-          this.dialogVisible = true;
-        });
-        this.actkey=actkeyvalue;
+          this.DataAssociation = response.rows
+          this.dialogVisible = true
+        })
+        this.actkey = actkeyvalue
       },
       // 取消按钮
       cancel() {
         this.dialogVisible = false
       },
       //弹出新增关联按钮
-      addDatAassociation(){
-        this.formadd.actkey=this.actkey;
-        this.dialogaddVisible=true;
+      addDatAassociation() {
+        this.formadd.actkey = this.actkey
+        this.dialogaddVisible = true
       },
       //提交数据
       SubmitAcc(formName) {
@@ -489,24 +491,24 @@
           if (valid) {
             addDataAssociation(this.formadd).then(response => {
               this.msgSuccess('新增成功')
-              this.dialogaddVisible=false;
-              this.data_association(this.actkey);
-            });
+              this.dialogaddVisible = false
+              this.data_association(this.actkey)
+            })
 
           } else {
-            console.log('error submit!!');
-            return false;
+            console.log('error submit!!')
+            return false
           }
-        });
+        })
       },
 
-      handleDeleteAss(id){
+      handleDeleteAss(id) {
         this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
           confirmButtonText: '确定',
           cancelButtonText: '取消',
           type: 'warning'
         }).then(() => {
-          return  removeDataAssociation(id);
+          return removeDataAssociation(id)
         }).then(() => {
           this.data_association(this.actkey)
           this.msgSuccess('删除成功')
@@ -514,14 +516,14 @@
           this.$message({
             type: 'info',
             message: '已取消删除'
-          });
-        });
-       /* removeDataAssociation(id).then(response => {
-          this.msgSuccess('删除成功');
-        })*/
+          })
+        })
+        /* removeDataAssociation(id).then(response => {
+           this.msgSuccess('删除成功');
+         })*/
       },
-      closeAddform(){
-      this.dialogaddVisible=false;
+      closeAddform() {
+        this.dialogaddVisible = false
       }
     }
   }
@@ -529,7 +531,10 @@
 
 <!-- Add "scoped" attribute to limit CSS to this component only -->
 <style scoped>
-  .el-aside{background: #fff;}
+  .el-aside {
+    background: #fff;
+  }
+
   h3 {
     margin: 40px 0 0;
   }
@@ -610,7 +615,12 @@
     border-bottom: 1px solid #e9e9e9;
     border-top: none;
   }
-.bgfff{background:#fff;padding:10px;}
+
+  .bgfff {
+    background: #fff;
+    padding: 10px;
+  }
+
   .dead {
     width: 100%;
     height: 500px;
@@ -618,9 +628,11 @@
     border-top: 1px solid #e9e9e9;
     border-bottom: 1px solid #e9e9e9;
   }
-  .left ul li[data-v-74afc76c]{
+
+  .left ul li[data-v-74afc76c] {
     padding-left: 20px;
   }
+
   .der {
     float: left;
     margin-bottom: 10px;
@@ -629,15 +641,21 @@
   .der .el-button {
     margin-bottom: 10px;
   }
-  .right{margin-left:10px;}
+
+  .right {
+    margin-left: 10px;
+  }
+
   .ddt {
     margin: 0 20px;
   }
-  .el-icon-s-order{
-    color:#bbbbbb;
+
+  .el-icon-s-order {
+    color: #bbbbbb;
     font-size: 22px;
     line-height: 1.2;
   }
+
   .el-form-item {
     margin-bottom: 10px !important;
   }