sr 4 年 前
コミット
8d6670aae3

+ 3 - 1
ruoyi-ui/package.json

@@ -77,7 +77,9 @@
     "sass-loader": "10.1.0",
     "script-ext-html-webpack-plugin": "2.1.5",
     "svg-sprite-loader": "5.1.1",
-    "vue-template-compiler": "2.6.12"
+    "vue-template-compiler": "2.6.12",
+    "less": "^4.1.1",
+    "less-loader": "^4.1.0"
   },
   "engines": {
     "node": ">=8.9",

+ 10 - 0
ruoyi-ui/src/api/modeler.js

@@ -10,6 +10,16 @@ export const getTabList = (data) => {
     data
   })
 }
+export const delRemove = (data) => {
+  return request({
+    headers: {
+      'accountName': 'guest'
+    },
+    url: '/jflow/p/cs/module/remove',
+    method: 'post',
+    data
+  })
+}
 export const getColumnList = (data) => {
   return request({
     headers: {

+ 5 - 2
ruoyi-ui/src/components/FlowChartComponent/index.vue

@@ -1,8 +1,8 @@
 <template>
   <div class="FlowChartComponent">
-    <!-- <Alert show-icon closable v-if="currentSteps === 1">双击空白区域即可直接新增一个中间节点,双击节点可编辑</Alert> -->
+    <Alert show-icon closable v-if="currentSteps === 1">双击空白区域即可直接新增一个中间节点,双击节点可编辑</Alert>
     <div class="chartContent">
-      <div id="paletteDiv"></div>
+      <div id="paletteDiv" v-show="currentSteps === 1"></div>
       <div id="goChart" v-show="currentSteps === 1">
       </div>
       <div id="showChart" v-show="currentSteps === 2">
@@ -104,6 +104,7 @@ export default {
   },
   methods:{
     init () {
+      console.log(333333)
         if(!Array.isArray(this.data.nodeMsg)){
             let nodeMsg = []
             Object.keys(this.data.nodeMsg).map(item => {
@@ -123,6 +124,7 @@ export default {
 
         this.dataProcessing()
         if(this.currentSteps === 1){
+          console.log(1111)
           // 流程图设计器
           if(!this.myDesigner){
             this.myDesigner= new FlowDesinger('goChart',{
@@ -138,6 +140,7 @@ export default {
           this.myDesigner.displayFlow(JSON.parse(JSON.stringify(this.data.guiStyle)));// 在设计面板中显示流程图
           this.data.myDisplay = this.myDesigner.diagram
         }else{
+          console.log(2222)
           if(this.myDisplay){
             this.myDisplay.loadFlow(JSON.parse(JSON.stringify(this.data.guiStyle)))
           }else{

+ 23 - 14
ruoyi-ui/src/components/listModalComponent/index.vue

@@ -40,6 +40,7 @@ import {
     setPublish,
     setUnpublish,
     setCopy,
+    delRemove
   } from '@/api/modeler.js'
 export default {
   name:'listModalComponent',
@@ -109,22 +110,30 @@ export default {
     releaseProcess () {  //发布流程
       this.$refs.poptip.handleClose()
       setPublish({id:this.items.id}).then((res) => {
+        if(res.resultCode === 0){
         if(typeof this.items.event.queryLists === 'function'){
           this.items.event.queryLists()
         }
+        }else{
+          this.$Modal.fcWarning({
+            title:'警告',
+            content:res.resultMsg,
+            mask:true
+          })
+        }
       })
     },
     editingProcess () { //编辑流程
       this.$refs.poptip.handleClose()
-      this.changeKeepAliveArray(['TemplateManagementLists'])
+      // this.changeKeepAliveArray(['modeler'])
       this.$router.push({ path: `/tool/activiti/TemplateManagementNew/${this.items.id}` })
-      this.currentChange({
-        path:'/TemplateManagementLists'
-      });
+      // this.currentChange({
+      //   path:'/tool/activiti/modeler'
+      // });
     },
     deleteProcess () {  //删除流程
       this.$refs.poptip.handleClose()
-      this.$network.post('/p/cs/module/remove', {id:this.items.id}).then((res) => {
+      delRemove({id:this.items.id}).then((res) => {
         if(typeof this.items.event.queryLists === 'function'){
           this.items.event.queryLists()
         }
@@ -142,11 +151,11 @@ export default {
       this.$refs.poptip.handleClose()
       setCopy({id:this.items.id}).then((res) => {
         if(res.resultCode === 0){
-          this.changeKeepAliveArray(['TemplateManagementLists'])
-          this.$router.push({ path: `/TemplateManagementNew/${res.data.data.id}` })
-          this.currentChange({
-            path:'/TemplateManagementLists'
-          });
+          // this.changeKeepAliveArray(['modeler'])
+          this.$router.push({ path: `/tool/activiti/TemplateManagementNew/${res.data.id}` })
+          // this.currentChange({
+          //   path:'/tool/activiti/modeler'
+          // });
         }else{
           this.$Modal.fcError({
             title:'错误',
@@ -159,11 +168,11 @@ export default {
     },
     previewProcess () { //预览流程
       this.$refs.poptip.handleClose()
-      this.changeKeepAliveArray(['TemplateManagementLists'])
+      // this.changeKeepAliveArray(['modeler'])
       this.$router.push({ path: `/tool/activiti/TemplateManagementNew/${this.items.id}/1` })
-      this.currentChange({
-        path:'/TemplateManagementLists'
-      });
+      // this.currentChange({
+      //   path:'/tool/activiti/modeler'
+      // });
     },
 
     ckeckModal () {  //选择流程

+ 1 - 0
ruoyi-ui/src/main.js

@@ -33,6 +33,7 @@ import DynamicForm from "@/components/DynamicForm"
 import DynamicForms from "@/components/DynamicForms"
 import MemoranDum from "@/components/MemoranDum"
 import 'burgeon-ui/dist/styles/burgeon-ui.css';
+import 'burgeon-ui/dist/styles/bjIconfonts/iconfont.css';
 import BigPicture from "@/components/BigPicture";
 Vue.component('BigPicture', BigPicture)
 import BurgeonUi from 'burgeon-ui';

+ 1 - 1
ruoyi-ui/src/settings.js

@@ -1,6 +1,6 @@
 module.exports = {
   title: '潜山市云数据中心',
-  urls: `http://192.168.101.10:8090`,
+  urls: `http://192.168.101.10:7090`,
 
   /**
    * 侧边栏主题 深色主题theme-dark,浅色主题theme-light

+ 4 - 1
ruoyi-ui/src/store/modules/settings.js

@@ -9,6 +9,7 @@ const state = {
   showSettings: showSettings,
   tagsView: tagsView,
   fixedHeader: fixedHeader,
+  keepAliveArray:['TemplateManagementLists'],//控制kepp-alive组件
   sidebarLogo: sidebarLogo
 }
 
@@ -17,6 +18,9 @@ const mutations = {
     if (state.hasOwnProperty(key)) {
       state[key] = value
     }
+  },
+  changeKeepAliveArray(state,data) {
+    state.keepAliveArray = data
   }
 }
 
@@ -32,4 +36,3 @@ export default {
   mutations,
   actions
 }
-

+ 0 - 435
ruoyi-ui/src/views/activiti/TemplateManagementLists/index.vue

@@ -1,435 +0,0 @@
-<template>
-  <div class="TemplateManagementLists">
-    <div class="listContent">
-      <p class="title">模版管理</p>
-      <p class="buttonLists">
-        <Button type="primary" @click="searchData.page = 1;queryLists()">查询</Button>
-        <Button type="fcdefault" :disabled="listsStatus === 1" @click="addTemplate">新建模板</Button>
-        <Button type="fcdefault" v-if="listsStatus === 0" @click="templateMigration">模版迁移</Button>
-        <Button type="fcdefault" v-if="listsStatus === 1" @click="removeMigration">取消迁移</Button>
-        <Button type="fcdefault" v-if="listsStatus === 1" @click="perform">执行</Button>
-        <Button type="fcdefault" v-if="listsStatus === 1" @click="performAll">执行全部</Button>
-      </p>
-      <Alert show-icon closable v-if="listsStatus === 1">依次单击模板可进行多选模板</Alert>
-      <FormItemComponent
-        class="form"
-        :formItemLists="formLists"
-        :buttonType="false"
-        @formChange="formChange"
-      ></FormItemComponent>
-
-      <StandardTable
-        class="table"
-        :currentPage="searchData.page"
-        :pageSize="searchData.pageSize"
-        :pageSizeOpts="[20,40,60,80]"
-        :total="total"
-        :showTable="false"
-        :standardTableEvent="standardTableEvent"
-      >
-      </StandardTable>
-
-      <div class="list">
-        <FormItemComponent
-          class="listsForm"
-          :formItemLists="listsConfig"
-          :buttonType="false"
-          :readonly="listsStatus === 1"
-        ></FormItemComponent>
-
-        <div  class="noData" v-if="listsConfig.length == 0" >
-          <span>
-            暂无模版
-          </span>
-        </div>
-      </div>
-    </div>
-
-    <!-- 模版迁移弹窗 -->
-    <Modal
-      v-model="migrationModel"
-      title="模版迁移"
-      mask
-      :width="440"
-      :mask-closable="false"
-      >
-      <div class="migrationModelContent">
-        <p>
-          <Input v-model="serverUrl"  placeholder="请输入目标服务器地址" style="width: 320px" />
-        </p>
-      </div>
-
-      <p slot="footer">
-        <Button :loading="performloading" @click="migrationModel = false">取消</Button>
-        <Button :loading="performloading" type="primary" @click="performConfirm">确定</Button>
-      </p>
-    </Modal>
-  </div>
-</template>
-<script>
-import FormItemComponent from '@/components/FormItemComponent';
-import ItemComponent from '@/components/ItemComponent';
-import StandardTable from '@/components/StandardTable';
-import listModalComponent from '@/components/listModalComponent'
-// import router from '../config/router.config'
-import {  mapMutations,mapState } from 'vuex';
-export default {
-  name:'TemplateManagementLists',
-  components:{FormItemComponent,StandardTable},
-  data () {
-    return {
-      // 状态  0为搜索状态,1为模版迁移状态
-      listsStatus:0,
-      //表单配置
-      formLists:[
-        {
-          row:1,
-          col:1,
-          component:ItemComponent,
-          item:{
-            type:'input',
-            title:'模型名称',
-            filed:'name',
-            event:{
-              'keydown': (event) => {
-                if(event.keyCode === 13){
-                  this.searchData.page = 1
-                  this.queryLists()
-                }
-              }
-            }
-          }
-        },
-        {
-          row:1,
-          col:1,
-          component:ItemComponent,
-          item:{
-            type:'select',
-            title:'模版状态',
-            filed:'status',
-            options: [
-              { value: 1, label: '已发布'},
-              { value: 0, label: '未发布'},
-              { value: 2, label: '已停用'}
-            ],
-            props:{
-              multiple: true,
-              multipleType: true
-            },
-            value:[0,1]
-          }
-        },
-        {
-          row:1,
-          col:1,
-          component:ItemComponent,
-          item:{
-            type:'DatePicker',
-            title:'创建时间',
-            filed:'createTime',
-            value:[]
-          }
-        }
-      ],
-      //查询条件
-      searchData:{
-        page:1,
-        pageSize:20,
-        createTime:[],
-        status: [0,1]
-      },
-
-      //分页数据
-      total:0,
-      standardTableEvent:{
-        'on-change':(page) => {
-          this.searchData.page = page
-          this.queryLists()
-        },
-        'on-page-size-change':(pageSize) => {
-          this.searchData.page = 1
-          this.searchData.pageSize = pageSize
-          this.queryLists()
-        }
-      },
-      listsConfig:[  //列表数据
-      ],
-
-      // 迁移数据
-      selectModal:[],  //选中的迁移模版
-      migrationModel:false, //控制模版迁移弹窗
-      serverUrl:null,  //目标服务地址
-      migrationType:null,  //0为执行  1为执行全部
-      performloading:false
-
-    }
-  },
-  computed:{
-    ...mapState({
-      currentMenu:(state) =>{
-        return  state.currentMenu
-      }
-    })
-  },
-  watch:{
-    listsStatus () {
-      if(this.listsStatus === 0){
-        this.selectModal = []
-      }
-    }
-  },
-  methods:{
-    ...mapMutations(['currentChange','changeKeepAliveArray']),
-    formChange (data) {  //表单数据修改时,修改searchData数据
-      if(data.status){
-        this.formLists[0].item.value = data.name
-        this.formLists[1].item.value = data.status
-        this.formLists[2].item.value = data.createTime
-        // this.formLists = this.formLists.concat([])
-      }
-      this.searchData = Object.assign({},this.searchData,data)
-      if(Object.prototype.toString.call(this.searchData.status) === '[object Array]' && this.searchData.status.length === 0){
-        delete this.searchData.searchStatus
-        delete this.searchData.status
-      }
-
-      // this.queryLists()
-    },
-    queryLists () {  //查询列表
-      if(this.searchData.status && this.searchData.status.indexOf('bSelect-all') >= 0){
-        this.searchData.searchStatus = []
-      }else{
-        this.searchData.searchStatus = this.searchData.status
-      }
-
-      if(this.searchData.createTime && this.searchData.createTime[0] && this.searchData.createTime[1]){
-        this.searchData.startTime = new Date(this.searchData.createTime[0]).format('yyyy-MM-dd hh:mm')
-        this.searchData.endTime = new Date(this.searchData.createTime[1]).format('yyyy-MM-dd hh:mm')
-      }else{
-        this.searchData.startTime = ''
-        this.searchData.endTime = ''
-      }
-
-      let obj = Object.assign({},this.searchData)
-      delete obj.createTime
-      delete obj.status
-      this.$network.post('/p/cs/module/search', obj).then((res) => {
-        if(res.data.resultCode !== 0){
-          return
-        }
-        let data = res.data.data
-        this.total = data.total
-
-        this.listsConfig = data.records.reduce((arr,item) => {
-          let items = {
-            event:{
-              queryLists:() => {
-                this.queryLists()
-              }
-            }
-          }
-          items = Object.assign(items,item)
-          arr.push({
-            row:1,
-            col:1,
-            component:listModalComponent,
-            item:items
-          })
-          return arr
-        },[])
-      });
-    },
-    addTemplate () {  //新建模版
-      this.changeKeepAliveArray(['TemplateManagementLists'])
-      // router.push({ path: '/TemplateManagementNew/-1' })
-      this.currentChange({
-        path:'/TemplateManagementLists'
-      });
-    },
-    templateMigration () { //模版迁移
-      this.listsStatus = 1
-    },
-    removeMigration () {  //取消迁移
-      this.listsStatus = 0
-    },
-    modalClick (event) {  //模版点击
-      let value = event.detail.value
-      let items = event.detail.items
-      if(value){
-        this.selectModal.push(items.id)
-      }else{
-        this.selectModal.splice(this.selectModal.findIndex(item => item === items.id), 1)
-      }
-    },
-    perform () {  //执行迁移
-      if(this.selectModal.length === 0){
-        this.$Modal.fcWarning({
-          title:'警告',
-          content:'请选择需要迁移的模版!',
-          mask:true
-        })
-        return
-      }
-      this.migrationType = 0
-      this.serverUrl = null
-      this.migrationModel = true
-
-    },
-    performAll () {  //迁移全部
-      this.migrationType = 1
-      this.serverUrl = null
-      this.migrationModel = true
-    },
-    performConfirm () {  //模版迁移确认
-      let obj = {}
-      if(!(this.serverUrl.startsWith('http://') || this.serverUrl.startsWith('https://'))){
-        this.$Modal.fcWarning({
-          title:'警告',
-          content:'目标服务器地址必须以http://或者https://开头',
-          mask:true
-        })
-        return
-      }
-      this.performloading = true
-      if(this.migrationType === 0){  //执行选中模版
-        obj = {
-          moduleIds:this.selectModal.join(',')
-        }
-      }else{  //执行所有模版
-        if(this.searchData.createTime && this.searchData.createTime[0] && this.searchData.createTime[1]){
-          this.searchData.startTime = new Date(this.searchData.createTime[0]).format('yyyy-MM-dd hh:mm')
-          this.searchData.endTime = new Date(this.searchData.createTime[1]).format('yyyy-MM-dd hh:mm')
-        }else{
-          this.searchData.startTime = ''
-          this.searchData.endTime = ''
-        }
-
-        obj = Object.assign({},this.searchData)
-      }
-
-      obj.url = this.serverUrl
-      this.$network.post('/p/cs/module/migrate', obj)
-        .then((res) => {
-          if(res.data.resultCode === 0){
-            this.$Modal.fcSuccess({
-              title:'成功',
-              content:res.data.resultMsg,
-              onOk: () => {
-                this.queryLists()
-                this.listsStatus = 0
-                this.migrationModel = false
-                this.performloading = false
-              }
-            })
-
-          }else{
-            this.performloading = false
-          }
-
-        })
-    }
-  },
-  created () {
-    //判断首页跳转状态,修改查询条件
-    let status = Number(this.$route.query.status)
-    if(status){
-      this.searchData.status = [status]
-      this.formLists[1].item.value = [status]
-      this.formLists = this.formLists.concat([])
-    }
-    this.queryLists()
-  },
-  mounted () {
-    // 监听modal的点击事件
-    window.addEventListener('modalClick',this.modalClick)
-  },
-  beforeDestroy () {
-    window.removeEventListener('modalClick', this.modalClick);
-  },
-  activated () {
-    this.queryLists()
-  }
-}
-</script>
-<style lang="less" >
-.TemplateManagementLists{
-  display: flex;
-  flex-direction: column;
-  .listContent{
-    background: white;
-    flex: 1;
-    padding: 16px;
-    display: flex;
-    flex-direction: column;
-    overflow: hidden;
-
-    .title{
-      font-size:18px;
-      font-family:PingFangSC-Medium;
-      font-weight:500;
-      color:rgba(81,90,110,1);
-      line-height:24px;
-      margin-bottom: 16px;
-    }
-
-    .buttonLists{
-      margin-bottom: 10px;
-      >button{
-        width: 90px;
-        margin-right: 10px;
-      }
-    }
-    .form{
-      margin-bottom: 16px;
-    }
-
-    .list{
-      flex: 1;
-      margin-right: -16px;
-      overflow: auto;
-      position: relative;
-      .listsForm{
-        border: none;
-        padding: 0;
-        margin-left: 5px;
-        margin-top: 5px;
-
-        .FormItemComponent-item{
-          margin-right: 16px;
-          margin-bottom: 20px;
-        }
-      }
-
-      .noData{
-        position: absolute;
-        top: 50%;
-        left: 50%;
-        width: 280px;
-        height: 292px;
-        margin-top: -146px;
-        margin-left: -140px;
-        background-image: url('~@/assets/images/nodata.png');
-        background-size: cover;
-
-        >span{
-          position: absolute;
-          bottom: 40px;
-          left: 20px;
-          display: inline-block;
-          width: 240px;
-          height: 40px;
-          text-align: center;
-        }
-      }
-    }
-
-  }
-}
-
-.migrationModelContent{
-  height: 115px;
-  padding: 30px 44px 17px 44px;
-  box-sizing: border-box;
-}
-</style>

+ 21 - 9
ruoyi-ui/src/views/activiti/TemplateManagementNew/index.vue

@@ -186,7 +186,6 @@ export default {
         if(val === 0 ){
           Vue.component(componentName,ParameterConfiguration)
         }else if(val === 1){
-          console.log(componentName,91111111111)
           Vue.component(componentName,FlowChartComponent)
         }else if(val === 2){
           Vue.component(componentName,FlowSuccess)
@@ -200,7 +199,6 @@ export default {
     getModuleInfo (id) {
       getLoad({id:id}).then((res) => {
         if(res.resultCode === 0){
-          console.log(res.data,999911111)
           res.data.businessType = [{
             ID:res.data.businessType,
             Label:res.data.businessTypeName,
@@ -225,6 +223,12 @@ export default {
             }
 
           })
+        }else{
+          this.$Modal.fcWarning({
+            title:'警告',
+            content:res.resultMsg,
+            mask:true
+          })
         }
       });
     },
@@ -335,7 +339,7 @@ export default {
           removePath: this.data.removePath
         }
         getCommit(jsonObject).then(res => {
-            if(res.data.resultCode === 0){
+            if(res.resultCode === 0){
               // this.data = {
               //   guiStyle:{
               //     "class": "go.GraphLinksModel",
@@ -347,13 +351,20 @@ export default {
               // }
               if(!flag){
                 window.flag = true
-                this.$router.push('/TemplateManagementLists')
+                this.$router.push('/tool/activiti/modeler')
                 this.currentChange({
-                  path:'/TemplateManagementLists'
+                  path:'/tool/activiti/modeler'
                 });
               }
 
               resolve(res)
+            }else{
+              this.$Modal.fcError({
+                title:'错误',
+                content:res.resultMsg,
+                onOk: () => {
+                }
+              })
             }
 
         })
@@ -450,18 +461,18 @@ export default {
       this.data = Object.assign(this.data,data)
     },
     close () {
-      this.$router.push('/TemplateManagementLists')
+      this.$router.push('/tool/activiti/modeler')
       this.currentChange({
-        path:'/TemplateManagementLists'
+        path:'/tool/activiti/modeler'
       });
     },
     confirmAndPublish () {  //保存并发布
       this.confirm(true).then(res => {
         getPublish({id:res.data.data.id}).then((response) => {
           if(response.data.resultCode === 0){
-            this.$router.push('/TemplateManagementLists')
+            this.$router.push('/tool/activiti/modeler')
             this.currentChange({
-              path:'/TemplateManagementLists'
+              path:'/tool/activiti/modeler'
             });
           }
         })
@@ -473,6 +484,7 @@ export default {
     this.currentComponent = `component_${this.currentSteps}`
     if(this.$route.params.flag === '1'){
       this.readOnly = true
+      this.currentSteps = 1
       this.noFreshFlag = true
       this.getModuleInfo(this.$route.params.id)
       return

+ 2 - 2
ruoyi-ui/src/views/activiti/modeler/index.vue

@@ -257,10 +257,10 @@ export default {
       });
     },
     addTemplate () {  //新建模版
-      this.changeKeepAliveArray(['TemplateManagementLists'])
+      this.changeKeepAliveArray(['modeler'])
       this.$router.push({ path: '/tool/activiti/TemplateManagementNew/-1' })
       this.currentChange({
-        path:'/TemplateManagementLists'
+        path:'/tool/activiti/modeler'
       });
     },
     templateMigration () { //模版迁移

+ 4 - 4
ruoyi-ui/src/views/system/user/index.vue

@@ -273,9 +273,9 @@
               <el-select v-model="form.postIds" multiple placeholder="请选择">
                 <el-option
                   v-for="item in postOptions"
-                  :key="item.postId"
+                  :key="item.id"
                   :label="item.postName"
-                  :value="item.postId"
+                  :value="item.id"
                   :disabled="item.status == 1"
                 ></el-option>
               </el-select>
@@ -286,9 +286,9 @@
               <el-select v-model="form.roleIds" multiple placeholder="请选择">
                 <el-option
                   v-for="item in roleOptions"
-                  :key="item.roleId"
+                  :key="item.id"
                   :label="item.roleName"
-                  :value="item.roleId"
+                  :value="item.id"
                   :disabled="item.status == 1"
                 ></el-option>
               </el-select>