chenc 3 éve
szülő
commit
6cda70b9cd

+ 3 - 3
public/index.html

@@ -5,8 +5,8 @@
   <meta charset="utf-8">
   <meta http-equiv="X-UA-Compatible" content="IE=edge">
   <meta name="viewport" content="width=device-width,initial-scale=1.0">
-  <title>Jeecg-Boot 企业级快速开发平台</title>
-  <link rel="icon" href="<%= BASE_URL %>logo.png">
+  <title>上海萃颠信息科技有限公司</title>
+  <link rel="icon" href="<%= BASE_URL %>logo-cd.png">
 <!--  <script src="https://cdnjs.cloudflare.com/ajax/libs/babel-polyfill/7.2.5/polyfill.js"></script>-->
   <style>
     html,
@@ -257,7 +257,7 @@
     <div id="loader"></div>
     <div class="loader-section section-left"></div>
     <div class="loader-section section-right"></div>
-    <div class="load_title">正在加载 Jeecg-Boot 快速开发平台,请耐心等待
+    <div class="load_title">正在加载 请耐心等待
 
     </div>
   </div>

BIN
public/logo-cd.png


+ 3 - 1
src/api/api.js

@@ -52,6 +52,7 @@ const queryPermissionRule = (params)=>getAction("/sys/permission/queryPermission
 
 // 部门管理
 const queryDepartTreeList = (params)=>getAction("/sys/sysDepart/queryTreeList",params);
+const tableList = (params)=>getAction("/actBusiness/getTableInfoList",params);
 const queryIdTree = (params)=>getAction("/sys/sysDepart/queryIdTree",params);
 const queryParentName   = (params)=>getAction("/sys/sysDepart/queryParentName",params);
 const searchByKeywords   = (params)=>getAction("/sys/sysDepart/searchBy",params);
@@ -160,7 +161,8 @@ export {
   queryTreeListForDeptRole,
   queryDeptRolePermission,
   saveDeptRolePermission,
-  queryMyDepartTreeList
+  queryMyDepartTreeList,
+  tableList
 }
 
 

BIN
src/assets/logo-cd-left.png


BIN
src/assets/logo-cd.png


BIN
src/assets/logo.png


BIN
src/assets/logo1.png


+ 1 - 1
src/components/layouts/TabLayout.vue

@@ -162,7 +162,7 @@
 
       // update-begin-author:sunjianlei date:20200120 for: 动态更改页面标题
       changeTitle(title) {
-        let projectTitle = "Jeecg-Boot 企业级快速开发平台"
+        let projectTitle = "上海萃颠信息科技有限公司"
         // 首页特殊处理
         if (this.$route.path === indexKey) {
           document.title = projectTitle

+ 3 - 3
src/components/layouts/UserLayout.vue

@@ -4,12 +4,12 @@
       <div class="top">
         <div class="header">
           <a href="/">
-            <img src="~@/assets/logo.svg" class="logo" alt="logo">
-            <span class="title">Jeecg Boot</span>
+            <img src="~@/assets/logo-cd.png" class="logo" alt="logo">
+            <span class="title">上海萃颠信息科技有限公司</span>
           </a>
         </div>
         <div class="desc">
-          Jeecg Boot 是中国最具影响力的 企业级 快速开发平台
+          <!-- Jeecg Boot 是中国最具影响力的 企业级 快速开发平台 -->
         </div>
       </div>
 

+ 6 - 2
src/components/page/GlobalHeader.vue

@@ -17,8 +17,12 @@
         :type="collapsed ? 'menu-unfold' : 'menu-fold'"
         @click="toggle"/>
 
-      <span v-if="device === 'desktop'">欢迎进入 Jeecg-Boot 企业级快速开发平台</span>
-      <span v-else>Jeecg-Boot</span>
+      <span v-if="device === 'desktop'">
+        <!-- 欢迎进入 Jeecg-Boot 企业级快速开发平台 -->
+        </span>
+      <span v-else>
+        <!-- Jeecg-Boot -->
+        </span>
 
       <user-menu :theme="theme"/>
     </div>

+ 7 - 3
src/components/tools/Logo.vue

@@ -3,11 +3,15 @@
     <router-link :to="{name:'dashboard'}">
 
       <!-- update-begin- author:sunjianlei --- date:20190814 --- for: logo颜色根据主题颜色变化 -->
-      <img v-if="navTheme === 'dark'" src="~@/assets/logo-white.png" alt="logo">
-      <img v-else src="~@/assets/logo.svg" alt="logo">
+      <!-- <img v-if="navTheme === 'dark'" src="~@/assets/logo-cd.png" alt="logo">
+      <img v-else src="~@/assets/logo-cd-left.png" alt="logo"> -->
       <!-- update-begin- author:sunjianlei --- date:20190814 --- for: logo颜色根据主题颜色变化 -->
 
-      <h1 v-if="showTitle">{{ title }}</h1>
+      <!-- <h1 v-if="showTitle">{{ title }}</h1> -->
+
+      <!-- <img v-if="showTitle" src="~@/assets/logo-cd.png" alt="logo"> -->
+      <img src="~@/assets/logo-cd-left.png" alt="logo">
+      <h1 >{{ dashboard }}</h1> 
     </router-link>
   </div>
 </template>

+ 2 - 0
src/main.js

@@ -42,7 +42,9 @@ import JDictSelectTag from './components/dict/index.js'
 import hasPermission from '@/utils/hasPermission'
 import vueBus from '@/utils/vueBus';
 import JeecgComponents from '@/components/jeecg/index'
+import KFormDesign from 'k-form-design'
 
+Vue.use(KFormDesign)
 Vue.config.productionTip = false
 Vue.use(Storage, config.storageOptions)
 Vue.use(Antd)

+ 72 - 21
src/views/activiti/ProcessModelList.vue

@@ -15,7 +15,7 @@
               <a-input placeholder="请输入搜索关键词" v-model="queryParam.lckey"></a-input>
             </a-form-item>
           </a-col>
-          <a-col :md="6" :sm="8">
+          <a-col :md="4" :sm="8">
             <a-form-item label="是否最新">
               <a-switch checkedChildren="是" unCheckedChildren="否" defaultChecked v-model="queryParam.zx"/>
             </a-form-item>
@@ -34,9 +34,10 @@
           </a-col>-->
 
           <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
-            <a-col :md="6" :sm="12" >
+            <a-col :md="8" :sm="12" >
                 <a-button type="primary"  style="left: 10px" @click="searchQuery" icon="search">查询</a-button>
                 <a-button type="primary"  @click="searchReset" icon="reload" style="margin-left: 8px;left: 10px">重置</a-button>
+                <a-button @click="editFormsOnline" style="margin-left: 8px;left: 10px;">在线编辑表单</a-button>
             </a-col>
           </span>
           <span style="float: right;overflow: hidden;" class="table-page-search-submitButtons">
@@ -91,11 +92,14 @@
           <span @click="showResource(r)" style="color: blue;cursor: pointer;">{{t}}</span>
         </template>
       </a-table-column>
-      <!-- <a-table-column title="表单路由" dataIndex="routeName" :width="200" align="center">
+      <a-table-column title="表单路由" dataIndex="routeName" :width="200" align="center">
         <template slot-scope="t,r,i">
-          <span @click="viewForm(t)" style="color: blue;cursor: pointer;"> {{getFormComponent(t).text}} </span>
+          <span @click="viewForm(r)" style="color: blue;cursor: pointer;"> 
+            <!-- {{getFormComponent(t).text}}  -->
+            预览表单
+            </span>
         </template>
-      </a-table-column> -->
+      </a-table-column>
       <a-table-column title="状态" dataIndex="status" :width="200" align="center">
         <template slot-scope="t,r,i">
           <span v-if="t==1" style="color: #00A0E9;"> 已启用 </span>
@@ -128,6 +132,7 @@
           <a href="javascript:void(0);" @click="convertToModel(r)" >转为模型</a>
           <br>
           <a href="javascript:void(0);"  @click="edit(r)">编辑</a> <a-divider type="vertical" />
+          <a href="javascript:void(0);"  @click="editFrom(r)">编辑表单</a> <a-divider type="vertical" />
           <a href="javascript:void(0);" style="color: red;" @click="remove(r)">删除</a>
 
 
@@ -255,8 +260,13 @@
       </div>
     </a-modal>
     <!--流程表单 预览-->
-    <a-modal  :title="lcModa.title" v-model="lcModa.visible" :footer="null" :maskClosable="false" width="80%">
+    <!-- <a-modal  :title="lcModa.title" v-model="lcModa.visible" :footer="null" :maskClosable="false" width="80%">
       <component :is="lcModa.formComponent" :disabled="true"></component>
+    </a-modal> -->
+    <a-modal :title="lcModa.title" v-model="lcModa.visible" :footer="null" :maskClosable="false" width="80%">
+      <component :disabled="lcModa.disabled" v-if="lcModa.visible" :is="lcModa.formComponent"
+                 :processData="lcModa.processData" :isNew = "lcModa.isNew"
+                 @close="lcModa.visible=false,lcModa.disabled = false"></component>
     </a-modal>
   </a-card>
 
@@ -340,12 +350,15 @@
           chooseDepHeader:false,
         },
         lcModa: {
-          title:'流程表单预览',
+          title:'',
+          disabled:false,
           visible:false,
-          formComponent : null
+          formComponent : null,
+          isNew : false
         },
         lcTypeF:[],
-        dataList: []
+        dataList: [],
+        allFormComponent2:[]
       }
     },
     computed:{
@@ -355,6 +368,13 @@
         return myComponent;
       },
     },
+    created(){
+      // getAction("/actBusiness/getTableInfoList").then(res=>{
+      //     this.allFormComponent2=res.result;
+      //   })
+      //获取关联表下拉数据
+      this.getTableList();
+    },
     methods: {
       initDictConfig() {
         //初始化字典 - 流程分类
@@ -469,6 +489,8 @@
       },
       /*编辑流程信息*/
       edit(row){
+        //获取关联表下拉数据
+        this.getTableList();
         this.editObj = Object.assign(this.editObj, row)
         this.editObj.visible = true;
       },
@@ -491,7 +513,7 @@
           }
         })
       },
-      change_routeName(){
+      change_routeName(event){
         this.$nextTick(()=>{
           let routeName = this.editForm.getFieldValue('routeName');
           console.log("routeName",routeName)
@@ -501,18 +523,37 @@
           console.log("this.editObj",this.editObj)
         })
       },
-      viewForm(routeName) {
-        if (!routeName) routeName = this.editObj.routeName;
-        if (!routeName) {
-          this.$message.warning(
-            "请先选择表单!"
-          );
-          return;
+      viewForm(r) {
+        // if (!routeName) routeName = this.editObj.routeName;
+        // if (!routeName) {
+        //   this.$message.warning(
+        //     "请先选择表单!"
+        //   );
+        //   return;
+        // }
+        // let formComponent = this.getFormComponent(routeName);
+        // this.lcModa.formComponent = formComponent.component;
+        // this.lcModa.title = '流程表单预览:'+formComponent.text;
+        // this.lcModa.visible = true;
+        if(r.routeName.indexOf("外部表单")!=-1){
+          alert("调用其他项目页面")
+        }else if(r.routeName.indexOf("自定义")!=-1){//自定义表单展开
+          this.lcModa.disabled = true;
+          let com={component:() => import(`@/views/activiti/form/demoForm2`)}
+          this.lcModa.formComponent = com.component;
+          this.lcModa.title = '流程表单预览';
+          this.lcModa.isNew = true;
+          this.lcModa.processData = {businessTable:r.businessTable};
+          this.lcModa.visible = true;
+        }else{//自带表单展开
+          this.lcModa.disabled = true;
+          this.lcModa.formComponent = this.getFormComponent(r.routeName).component;
+          this.lcModa.title = '流程表单预览';
+          this.lcModa.isNew = true;
+          this.lcModa.processData = r;
+          this.lcModa.visible = true;
         }
-        let formComponent = this.getFormComponent(routeName);
-        this.lcModa.formComponent = formComponent.component;
-        this.lcModa.title = '流程表单预览:'+formComponent.text;
-        this.lcModa.visible = true;
+        
       },
       convertToModel(row){
         let that = this;
@@ -667,7 +708,17 @@
       filter_categoryId(v,r) {
         // console.log(v,r)
         return r.categoryId == v;
+      },
+      editFormsOnline(){
+        //在线编辑表单
+        // window.location.href = 'http://localhost:8080/#/formDesign'
+        window.open('http://localhost:8080/#/formDesign', '_blank')
+      },
+      //编辑表单
+      editFrom(r){
+        window.open('http://localhost:8080/#/formDesign?tableName='+r.businessTable, '_blank')
       }
+      
     }
   }
 </script>

+ 44 - 14
src/views/activiti/applyList.vue

@@ -190,6 +190,7 @@
                  :processData="lcModa.processData" :isNew = "lcModa.isNew"
                  @afterSubmit="afterSub" @close="lcModa.visible=false,lcModa.disabled = false"></component>
     </a-modal>
+    <!-- <onl-cgform-auto-modal ref="modal" code="b0bea65bfce141deb0ae3fcb18982d76" /> -->
     <!--提交申请表单-->
     <a-modal title="提交申请" v-model="modalVisible" :mask-closable="false" :width="500" :footer="null">
       <div v-if="modalVisible">
@@ -523,14 +524,28 @@
           );
           return;
         }
-        isView = isView||false;
-        this.lcModa.disabled = isView;
-        this.lcModa.title = '修改流程业务信息:'+r.title;
-        if (isView) this.lcModa.title = '查看流程业务信息:'+r.title;
-        this.lcModa.formComponent = this.getFormComponent(r.routeName).component;
-        this.lcModa.processData = r;
-        this.lcModa.isNew = false;
-        this.lcModa.visible = true;
+        if(r.routeName.indexOf("外部表单")!=-1){
+          alert("调用其他项目页面")
+        }else if(r.routeName.indexOf("自定义")!=-1){
+          isView = isView||false;
+          this.lcModa.disabled = isView;
+          this.lcModa.title = '修改流程业务信息:'+r.title;
+          if (isView) this.lcModa.title = '查看流程业务信息:'+r.title;
+          let com={component:() => import(`@/views/activiti/form/demoForm2`)}
+          this.lcModa.formComponent = com.component;
+          this.lcModa.isNew = false;
+          this.lcModa.processData = r;
+          this.lcModa.visible = true;
+        }else{
+          isView = isView||false;
+          this.lcModa.disabled = isView;
+          this.lcModa.title = '修改流程业务信息:'+r.title;
+          if (isView) this.lcModa.title = '查看流程业务信息:'+r.title;
+          this.lcModa.formComponent = this.getFormComponent(r.routeName).component;
+          this.lcModa.processData = r;
+          this.lcModa.isNew = false;
+          this.lcModa.visible = true;
+        }
       },
       remove(r) {
         this.postFormAction(this.url.delByIds,{ids:r.id}).then((res)=>{
@@ -568,6 +583,7 @@
         this.modalLsVisible = true;
       },
       detail(v) {
+        // this.$refs.modal.detail("1","8a8080f079ea4ed50179ea4f6c470001")
         this.edit(v,true);
       },
       handleTableChange(pagination, filters, sorter) {
@@ -588,18 +604,32 @@
         this.getProcessList()
       },
       chooseProcess(v) {
+        // this.$refs.modal.add("1")
         if (!v.routeName) {
           this.$message.warning(
             "该流程信息未配置表单,请联系开发人员!"
           );
           return;
         }
-        this.lcModa.disabled = false;
-        this.lcModa.formComponent = this.getFormComponent(v.routeName).component;
-        this.lcModa.title = '发起流程:'+v.name;
-        this.lcModa.isNew = true;
-        this.lcModa.processData = v;
-        this.lcModa.visible = true;
+        if(v.routeName.indexOf("外部表单")!=-1){
+          alert("调用其他项目页面")
+        }else if(v.routeName.indexOf("自定义")!=-1){
+          this.lcModa.disabled = false;
+          let com={component:() => import(`@/views/activiti/form/demoForm2`)}
+          this.lcModa.formComponent = com.component;
+          this.lcModa.title = '发起流程:'+v.name;
+          this.lcModa.isNew = true;
+          this.lcModa.processData = v;
+          this.lcModa.visible = true;
+        }else{
+          this.lcModa.disabled = false;
+          this.lcModa.formComponent = this.getFormComponent(v.routeName).component;
+          this.lcModa.title = '发起流程:'+v.name;
+          this.lcModa.isNew = true;
+          this.lcModa.processData = v;
+          this.lcModa.visible = true;
+        }
+        
 
         console.log("发起",v)
       },

+ 18 - 6
src/views/activiti/doneManage.vue

@@ -213,12 +213,24 @@ export default {
         );
         return;
       }
-      this.lcModa.disabled = true;
-      this.lcModa.title = '查看流程业务信息:'+r.processName;
-      this.lcModa.formComponent = this.getFormComponent(r.routeName).component;
-      this.lcModa.processData = r;
-      this.lcModa.isNew = false;
-      this.lcModa.visible = true;
+      if(r.routeName.indexOf("外部表单")!=-1){//外部项目开发的表单
+          alert("调用其他项目页面")
+      }else if(r.routeName.indexOf("自定义")!=-1){//自定义的表单流程
+        this.lcModa.disabled = true;
+        this.lcModa.title = '查看流程业务信息:'+r.processName;
+        let com={component:() => import(`@/views/activiti/form/demoForm2`)}
+        this.lcModa.formComponent = com.component;
+        this.lcModa.isNew = false;
+        this.lcModa.processData = r;
+        this.lcModa.visible = true;
+      }else{//固定的表单
+        this.lcModa.disabled = true;
+        this.lcModa.title = '查看流程业务信息:'+r.processName;
+        this.lcModa.formComponent = this.getFormComponent(r.routeName).component;
+        this.lcModa.processData = r;
+        this.lcModa.isNew = false;
+        this.lcModa.visible = true;
+      }
     },
     history(v) {
       if (!v.procInstId) {

+ 2 - 4
src/views/activiti/form/cdLeaveForm.vue

@@ -199,12 +199,11 @@ export default {
           this.data = formData
           console.log('表单回显数据', this.data)
           this.$nextTick(() => {
-            // this.form.setFieldsValue(pick(this.data,'type'))
             console.log('表单回显数据', this.data.start_time)
-            
+            //获取图片文件集合
             this.fileList=JSON.parse(JSON.stringify(res.result.childList))
+            //格式化文件集合数据
             this.getFileList()
-            console.log(this.fileList)
             this.form.setFieldsValue({
               type: this.data.type,
               start_time: moment(this.data.start_time),
@@ -212,7 +211,6 @@ export default {
               duration: this.data.duration,
               reason: this.data.reason
             })
-            // this.form.setFieldsValue(moment(this.data.end_time,'end_time'))
           })
           this.btndisabled = false
         } else {

+ 201 - 89
src/views/activiti/form/demoForm2.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="form-main">
     <a-card :body-style="{padding: '24px 32px'}" :bordered="false">
-      <a-form @submit="handleSubmit" :form="form">
+      <!-- <a-form @submit="handleSubmit" :form="form">
         <a-form-item
           label="标题"
           :labelCol="{lg: {span: 7}, sm: {span: 7}}"
@@ -21,113 +21,225 @@
           <a-button htmlType="submit" type="primary" :disabled="disabled||btndisabled" @click="handleSubmit">保存</a-button>
           <a-button style="margin-left: 8px" :disabled="disabled" @click="close">取消</a-button>
         </a-form-item>
-      </a-form>
+      </a-form>-->
+      <k-form-build :value="jsonData" :dynamicData="dynamicData" ref="KFB" @submit="handleSubmit" />
+      <a-button
+        htmlType="submit"
+        type="primary"
+        :disabled="disabled||btndisabled"
+        @click="handleSubmit"
+      >保存</a-button>
+      <a-button style="margin-left: 8px" :disabled="disabled" @click="close">取消</a-button>
     </a-card>
   </div>
 </template>
 
 <script>
-  import pick from "lodash.pick";
+import pick from 'lodash.pick'
 
-  export default {
-    name: 'demoForm',
-    props:{
-      /*全局禁用,可表示查看*/
-      disabled:{
-        type:Boolean,
-        default:false,
-        required:false
-      },
-      /*流程数据*/
-      processData:{
-        type:Object,
-        default:()=>{return {}},
-        required:false
+export default {
+  name: 'demoForm',
+  props: {
+    /*全局禁用,可表示查看*/
+    disabled: {
+      type: Boolean,
+      default: false,
+      required: false
+    },
+    /*流程数据*/
+    processData: {
+      type: Object,
+      default: () => {
+        return {}
       },
-      /*是否新增*/
-      isNew: {type: Boolean, default: false, required: false}
+      required: false
     },
-    data () {
-      return {
-        url:{
-          getForm:'/actBusiness/getForm',
-          addApply:'/actBusiness/add',
-          editForm:'/actBusiness/editForm',
-        },
-        description: '流程表单demo,按例开发表单。需在 activitiMixin.js 中加入写好的表单',
-        // form
-        form: this.$form.createForm(this),
-        /*表单回显数据*/
-        data:{},
-        btndisabled: false
+    /*是否新增*/
+    isNew: { type: Boolean, default: false, required: false }
+  },
+  data() {
+    return {
+      jsonData: {},
+      url: {
+        getForm: '/actBusiness/getForm',
+        addApply: '/actBusiness/add',
+        editForm: '/actBusiness/editForm'
+      },
+      description: '流程表单demo,按例开发表单。需在 activitiMixin.js 中加入写好的表单',
+      // form
+      form: this.$form.createForm(this),
+      /*表单回显数据*/
+      data: {},
+      btndisabled: false,
+      ceshi_file: null,
+      dynamicData: {
+        aa: [
+          {
+            value: '1',
+            label: '男'
+          },
+          {
+            value: '2',
+            label: '女'
+          }
+        ]
       }
-    },
-    created() {
-      console.log("流程数据",this.processData)
-      if (!this.isNew){
-        this.init();
+    }
+  },
+  created() {
+    console.log('流程数据', this.processData)
+    let businessTable = ''
+    //如果没有值则在另一个属性上有值
+    if (!this.processData.businessTable) {
+      this.processData.businessTable = this.processData.tableName
+    }
+    this.getAction('/tbTableInfo/query', { businessTable: this.processData.businessTable }).then(res => {
+      this.jsonData = res.result.jsonContent
+      // this.$refs.KFB.setData({aaa:null,bbb:null,name:"123"})
+      // this.$refs.KFB.getData().then(res => {
+      //   console.log('aaa',res)
+      // })
+
+      if (!this.isNew) {
+        this.init()
       }
+    })
+  },
+  methods: {
+    /*回显数据*/
+    init() {
+      this.btndisabled = true
+      var r = this.processData
+      this.getAction(this.url.getForm, {
+        tableId: r.tableId,
+        tableName: r.tableName
+      }).then(res => {
+        if (res.success) {
+          let formData = res.result
+          formData.tableName = r.tableName
+          this.data = formData
+          console.log('表单回显数据', this.data)
+          console.log(this.data)
+          this.$refs.KFB.setData(this.data)
+          // this.$nextTick(() => {
+          //   this.$refs.KFB.form.setFieldsValue(pick(this.data, 'name'))
+
+          // })
+          this.btndisabled = false
+        } else {
+          this.$message.error(res.message)
+        }
+      })
     },
-    methods: {
-      /*回显数据*/
-      init(){
-        this.btndisabled = true;
-        var r = this.processData;
-        this.getAction(this.url.getForm,{
-          tableId:r.tableId,
-          tableName:r.tableName,
-        }).then((res)=>{
-          if (res.success){
-            let formData = res.result;
-            formData.tableName = r.tableName;
-            this.data = formData;
-            console.log("表单回显数据",this.data)
-            this.$nextTick(() => {
-              this.form.setFieldsValue(pick(this.data,'name'))
-            });
-            this.btndisabled = false;
-          }else {
-            this.$message.error(res.message)
+    // handler
+    handleSubmit(e) {
+      // 通过函数获取数据
+      this.$refs.KFB.getData()
+        .then(res => {
+          // 获取数据成功
+          let formData = JSON.parse(JSON.stringify(res))
+          console.log(formData)
+          formData.id = this.data.id
+          formData.procDefId = this.processData.id
+          formData.procDeTitle = this.processData.name
+          if (!formData.tableName) formData.tableName = this.processData.businessTable
+          formData.filedNames = _.keys(res).join(',');
+          formData.filedNames=getFiledNames(formData);//获取主表字段,排除子表标识
+          var url = this.url.addApply
+          if (!this.isNew) {
+            url = this.url.editForm
           }
-        })
-      },
-      // handler
-      handleSubmit (e) {
-        e.preventDefault()
-        this.form.validateFields((err, values) => {
-          if (!err) {
-            let formData = Object.assign(this.data||{}, values)
-            formData.procDefId = this.processData.id;
-            formData.procDeTitle = this.processData.name;
-            if (!formData.tableName)formData.tableName = this.processData.businessTable;
-            formData.filedNames = _.keys(values).join(",");
-            console.log('formData', values)
-
-            var url = this.url.addApply;
-            if (!this.isNew){
-              url = this.url.editForm;
+          //是否存在子表
+          let ischild=false;
+          //循环表单字段属性判断是否属性中包含数组对象
+          let i=0;//子表数量
+          _.keys(res).join(',').split(',').forEach(element => {
+            if (formData[element] instanceof Array) {
+              //判断是否符合子表命名规则
+              if (element.indexOf('&') != -1) {
+                let tableChildNameList = element.split('&')
+                //判断是否能拆分两个字符,子表标识和子表数据库名称
+                if (tableChildNameList.length == 2) {
+                  i++;
+                  let childName = tableChildNameList[1] //子表数据库名称
+                  if(!formData.table_name_children){
+                    //第一次拼接
+                    formData.table_name_children = childName //表名
+                  }else{//后面的表明拼接用“,”隔开
+                    formData.table_name_children = formData.table_name_children+","+childName //表名
+                  }
+                  //定义属性名和值
+                  formData["childFiledNames"+i] = _.keys(formData[element][0]).join(',') //子表字段名
+                  formData["childList"+i] = JSON.stringify(formData[element]) //子表数据
+                  ischild=true;
+                }
+              } else {
+                //如果不是子表则是上传文件,则转字符串
+                formData[element] = JSON.stringify(formData[element])
+              }
             }
-            this.btndisabled = true;
-            this.postFormAction(url,formData).then((res)=>{
-              if (res.success){
-                this.$message.success("保存成功!")
-                this.$emit('afterSubmit',formData)
-              }else {
+            // formData[element];
+          })
+          //判断需不需要存子表
+          if(ischild){
+            formData.filedNames=formData.filedNames+",table_name_children";
+          }
+
+          console.log(formData)
+          //子表数据
+
+          //调用保存接口
+          this.btndisabled = true
+          this.postFormAction(url, formData)
+            .then(res => {
+              if (res.success) {
+                this.$message.success('保存成功!')
+                this.$emit('afterSubmit', formData)
+              } else {
                 this.$message.error(res.message)
               }
-            }).finally(()=>{
-              this.btndisabled = false;
             })
-          }
+            .finally(() => {
+              this.btndisabled = false
+            })
+        })
+        .catch(err => {
+          console.log(err, '校验失败')
+        })
+    },
+    close() {
+      this.$emit('close')
+    },
+    getData() {
+      // 通过函数获取数据
+      this.$refs.KFB.getData()
+        .then(res => {
+          // 获取数据成功
+          alert(JSON.stringify(res))
+        })
+        .catch(err => {
+          console.log(err, '校验失败')
         })
-      },
-      close() {
-        this.$emit('close')
-      }
     }
   }
+}
+//获取主表字段,排除子表标识
+function getFiledNames(formData) {
+  let filedNames="";
+  let list = formData.filedNames.split(',');//获取表单属性名集合
+  list.forEach(element => {
+    if (element.indexOf('&')==-1) {//查询是否有这个字段
+      if(filedNames==""){//第一次则直接等于
+        filedNames=element;
+      }else{//后面用逗号隔开
+        filedNames=filedNames+","+element
+      }
+    }
+  })
+  return filedNames;
+}
 </script>
 <style lang="less" scoped>
-  .form-main{
-  }
+.form-main {
+}
 </style>

+ 73 - 27
src/views/activiti/mixins/activitiMixin.js

@@ -3,6 +3,7 @@ import { deleteAction, getAction,downFile } from '@/api/manage'
 import Vue from 'vue'
 import { ACCESS_TOKEN } from "@/store/mutation-types"
 import JEllipsis from '@/components/jeecg/JEllipsis'
+import {tableList} from '@/api/api'
 export const activitiMixin = {
   components: {
     JEllipsis
@@ -11,31 +12,7 @@ export const activitiMixin = {
     return {
       //token header
       tokenHeader: {'X-Access-Token': Vue.ls.get(ACCESS_TOKEN)},
-    }
-  },
-  computed:{
-    /*所有的流程表单,组件化注册,在此维护*/
-    allFormComponent:function(){
-      return [
-        // {
-        //   text:'示例表单',
-        //   routeName:'@/views/activiti/form/demoForm',
-        //   component:() => import(`@/views/activiti/form/demoForm`),
-        //   businessTable:'test_demo'
-        // },
-        // {
-        //   text:'示例表单1',
-        //   routeName:'@/views/activiti/form/demoForm1',
-        //   component:() => import(`@/views/activiti/form/demoForm1`),
-        //   businessTable:'test_demo1'
-        // },
-        // {
-        //   text:'示例表单2',
-        //   routeName:'@/views/activiti/form/demoForm2',
-        //   component:() => import(`@/views/activiti/form/demoForm2`),
-        //   businessTable:'test_demo2'
-        // },
-      {
+      tableListAll:[{
         text:'请假申请',
           routeName:'@/views/activiti/form/cdLeaveForm',
         component:() => import(`@/views/activiti/form/cdLeaveForm`),
@@ -46,14 +23,83 @@ export const activitiMixin = {
         routeName:'@/views/activiti/form/cdReimbursementForm',
         component:() => import(`@/views/activiti/form/cdReimbursementForm`),
         businessTable:'cd_reimbursement'
-      }
-      ]
+      }]
+    }
+  },
+  computed:{
+    
+    /*所有的流程表单,组件化注册,在此维护*/
+    allFormComponent:function(){
+      return this.tableListAll;
+      // return [
+      //   {
+      //     text:'示例表单1',
+      //     routeName:'@/views/activiti/form/demoForm1',
+      //     component:() => import(`@/views/activiti/form/demoForm1`),
+      //     businessTable:'test_demo1'
+      //   },
+      // {
+      //   text:'请假申请',
+      //     routeName:'@/views/activiti/form/cdLeaveForm',
+      //   component:() => import(`@/views/activiti/form/cdLeaveForm`),
+      //   businessTable:'cd_leave'
+      // },
+      // {
+      //   text:'报销申请',
+      //   routeName:'@/views/activiti/form/cdReimbursementForm',
+      //   component:() => import(`@/views/activiti/form/cdReimbursementForm`),
+      //   businessTable:'cd_reimbursement'
+      // }
+      // ]
     },
     historicDetail:function () {
       return () => import(`@/views/activiti/historicDetail`)
     }
   },
   methods:{
+    getTableList(){
+        getAction("/actBusiness/getTableInfoList").then((res)=>{
+          let tableList=[]
+          //获取其他项目表单
+          tableList=res.result
+          //获取固定表单
+          let nowTableList=[{
+            text:'请假申请',
+              routeName:'@/views/activiti/form/cdLeaveForm',
+            component:() => import(`@/views/activiti/form/cdLeaveForm`),
+            businessTable:'cd_leave'
+          },
+          {
+            text:'报销申请',
+            routeName:'@/views/activiti/form/cdReimbursementForm',
+            component:() => import(`@/views/activiti/form/cdReimbursementForm`),
+            businessTable:'cd_reimbursement'
+          },
+          {
+            text:'报销申请2',
+            routeName:'@/views/activiti/form/demoForm2',
+            component:() => import(`@/views/activiti/form/demoForm2`),
+            businessTable:'test_demo2'
+          }];
+          //把其他表单中的表数据添加到原有的下拉数据中合并
+          if(tableList!=null&&tableList.length>0){
+            tableList.forEach(element => {
+              nowTableList.push(element);
+            });
+          }
+          getAction("/tbTableInfo/list").then((ress)=>{
+            ress.result.forEach(w => {
+              nowTableList.push(w);
+            });
+          })
+          this.tableListAll=nowTableList;
+        })
+    },
+    getCustomForm(){
+      getAction("/actBusiness/getTableInfoList").then((res)=>{
+        return res.result;
+      })
+    },
     getFormComponent(routeName){
       return _.find(this.allFormComponent,{routeName:routeName})||{};
     },

+ 18 - 6
src/views/activiti/processFinishManage.vue

@@ -237,12 +237,24 @@ export default {
         );
         return;
       }
-      this.lcModa.disabled = true;
-      this.lcModa.title = '查看流程业务信息:'+r.name;
-      this.lcModa.formComponent = this.getFormComponent(r.routeName).component;
-      this.lcModa.processData = r;
-      this.lcModa.isNew = false;
-      this.lcModa.visible = true;
+      if(r.routeName.indexOf("外部表单")!=-1){//外面的表单
+          alert("调用其他项目页面")
+      }else if(r.routeName.indexOf("自定义")!=-1){//自定义的表单流程
+        this.lcModa.disabled = true;
+        this.lcModa.title = '查看流程业务信息:'+r.processName;
+        let com={component:() => import(`@/views/activiti/form/demoForm2`)}
+        this.lcModa.formComponent = com.component;
+        this.lcModa.isNew = false;
+        this.lcModa.processData = r;
+        this.lcModa.visible = true;
+      }else{//固定的表单
+        this.lcModa.disabled = true;
+        this.lcModa.title = '查看流程业务信息:'+r.name;
+        this.lcModa.formComponent = this.getFormComponent(r.routeName).component;
+        this.lcModa.processData = r;
+        this.lcModa.isNew = false;
+        this.lcModa.visible = true;
+      }
     },
     history(v) {
       if (!v.id) {

+ 18 - 6
src/views/activiti/processInsManage.vue

@@ -271,12 +271,24 @@ export default {
         );
         return;
       }
-      this.lcModa.disabled = true;
-      this.lcModa.title = '查看流程业务信息:'+r.name;
-      this.lcModa.formComponent = this.getFormComponent(r.routeName).component;
-      this.lcModa.processData = r;
-      this.lcModa.isNew = false;
-      this.lcModa.visible = true;
+      if(r.routeName.indexOf("外部表单")!=-1){//外部项目的表单
+          alert("调用其他项目页面")
+      }else if(r.routeName.indexOf("自定义")!=-1){//自定义的表单流程
+        this.lcModa.disabled = true;
+        this.lcModa.title = '查看流程业务信息:'+r.processName;
+        let com={component:() => import(`@/views/activiti/form/demoForm2`)}
+        this.lcModa.formComponent = com.component;
+        this.lcModa.isNew = false;
+        this.lcModa.processData = r;
+        this.lcModa.visible = true;
+      }else{//固定的表单
+        this.lcModa.disabled = true;
+        this.lcModa.title = '查看流程业务信息:'+r.name;
+        this.lcModa.formComponent = this.getFormComponent(r.routeName).component;
+        this.lcModa.processData = r;
+        this.lcModa.isNew = false;
+        this.lcModa.visible = true;
+      }
     },
     history(v) {
       if (!v.procInstId) {

+ 18 - 6
src/views/activiti/todoManage.vue

@@ -380,12 +380,24 @@ export default {
         );
         return;
       }
-      this.lcModa.disabled = true;
-      this.lcModa.title = '查看流程业务信息:'+r.processName;
-      this.lcModa.formComponent = this.getFormComponent(r.routeName).component;
-      this.lcModa.processData = r;
-      this.lcModa.isNew = false;
-      this.lcModa.visible = true;
+      if(r.routeName.indexOf("外部表单")!=-1){//其他项目的表单流程
+          alert("调用其他项目页面")
+      }else if(r.routeName.indexOf("自定义")!=-1){//自定义的表单流程
+        this.lcModa.disabled = true;
+        this.lcModa.title = '查看流程业务信息:'+r.processName;
+        let com={component:() => import(`@/views/activiti/form/demoForm2`)}
+        this.lcModa.formComponent = com.component;
+        this.lcModa.isNew = false;
+        this.lcModa.processData = r;
+        this.lcModa.visible = true;
+      }else{//固定的表单流程
+        this.lcModa.disabled = true;
+        this.lcModa.title = '查看流程业务信息:'+r.processName;
+        this.lcModa.formComponent = this.getFormComponent(r.routeName).component;
+        this.lcModa.processData = r;
+        this.lcModa.isNew = false;
+        this.lcModa.visible = true;
+      }
     },
     passTask(v) {
       this.modalTaskTitle = "审批通过";

+ 194 - 0
src/views/system/TestDemo1List.vue

@@ -0,0 +1,194 @@
+<template>
+  <a-card :bordered="false">
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline" @keyup.enter.native="searchQuery">
+        <a-row :gutter="24">
+
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 查询区域-END -->
+    
+    <!-- 操作按钮区域 -->
+    <div class="table-operator">
+      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
+      <a-button type="primary" icon="download" @click="handleExportXls('测试')">导出</a-button>
+      <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
+        <a-button type="primary" icon="import">导入</a-button>
+      </a-upload>
+      <a-dropdown v-if="selectedRowKeys.length > 0">
+        <a-menu slot="overlay">
+          <!-- <a-menu-item key="1" ><a-icon @click="tijiao()" type="delete"/>提交流程</a-menu-item> -->
+          <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
+        </a-menu>
+        <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
+      </a-dropdown>
+    </div>
+
+    <!-- table区域-begin -->
+    <div>
+      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
+        <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
+        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
+      </div>
+
+      <a-table
+        ref="table"
+        size="middle"
+        bordered
+        rowKey="id"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        :rowSelection="{fixed:true,selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
+        
+        @change="handleTableChange">
+
+        <template slot="htmlSlot" slot-scope="text">
+          <div v-html="text"></div>
+        </template>
+        <template slot="imgSlot" slot-scope="text">
+          <span v-if="!text" style="font-size: 12px;font-style: italic;">无此图片</span>
+          <img v-else :src="getImgView(text)" height="25px" alt="图片不存在" style="max-width:80px;font-size: 12px;font-style: italic;"/>
+        </template>
+        <template slot="fileSlot" slot-scope="text">
+          <span v-if="!text" style="font-size: 12px;font-style: italic;">无此文件</span>
+          <a-button
+            v-else
+            :ghost="true"
+            type="primary"
+            icon="download"
+            size="small"
+            @click="uploadFile(text)">
+            下载
+          </a-button>
+        </template>
+
+        <span slot="action" slot-scope="text, record">
+          <a @click="handleEdit(record)">编辑</a>
+
+          <a-divider type="vertical" />
+          <a-dropdown>
+            <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
+            <a-menu slot="overlay">
+              <a-menu-item>
+                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+                  <a>删除</a>
+                </a-popconfirm>
+              </a-menu-item>
+              <a-menu-item>
+                <a-popconfirm title="确定提交流程吗?" @confirm="() => tijiao(record.id)">
+                  <a>提交流程</a>
+                </a-popconfirm>
+              </a-menu-item>
+            </a-menu>
+          </a-dropdown>
+        </span>
+
+      </a-table>
+    </div>
+
+    <testDemo1-modal ref="modalForm" @ok="modalFormOk"></testDemo1-modal>
+  </a-card>
+</template>
+
+<script>
+
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+  import TestDemo1Modal from './modules/TestDemo1Modal'
+  import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
+
+  export default {
+    name: "TestDemo1List",
+    mixins:[JeecgListMixin],
+    components: {
+      TestDemo1Modal
+    },
+    created(){
+      // console.log(this.$route.query)
+      // let str=this.$route.path
+      // let index = str .lastIndexOf("?")
+      // let id =str .substring(index+1,str.length);
+      // console.log(id)
+      // this.$router.push({ path: '/online/cgformList/' + id })
+    },
+    data () {
+      return {
+        description: '测试管理页面',
+        // 表头
+        columns: [
+          {
+            title: '#',
+            dataIndex: '',
+            key:'rowIndex',
+            width:60,
+            align:"center",
+            customRender:function (t,r,index) {
+              return parseInt(index)+1;
+            }
+          },
+          {
+            title:'流程状态',
+            align:"center",
+            dataIndex: 'bpmStatus'
+          },
+          {
+            title:'名称',
+            align:"center",
+            dataIndex: 'name'
+          },
+          {
+            title:'姓名',
+            align:"center",
+            dataIndex: 'sax'
+          },
+          {
+            title: '操作',
+            dataIndex: 'action',
+            align:"center",
+            scopedSlots: { customRender: 'action' }
+          }
+        ],
+        url: {
+          list: "/ceshi/testDemo1/list",
+          delete: "/ceshi/testDemo1/delete",
+          deleteBatch: "/ceshi/testDemo1/deleteBatch",
+          exportXlsUrl: "/ceshi/testDemo1/exportXls",
+          importExcelUrl: "ceshi/testDemo1/importExcel",
+        },
+        dictOptions:{},
+      }
+    },
+    computed: {
+      importExcelUrl: function(){
+        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+      }
+    },
+    methods: {
+      initDictConfig(){
+      },
+      tijiao(id){
+        let formData ={}
+            formData.procDefId = "测试22:1:60007";
+            formData.procDeTitle ="测试22";
+            formData.tableName = "test_demo1";
+            formData.tableId=id;
+        this.postFormAction("/actBusiness/add",formData).then((res)=>{
+              if (res.success){
+                this.$message.success("保存成功!")
+                // this.$emit('afterSubmit',formData)
+              }else {
+                this.$message.error(res.message)
+              }
+            }).finally(()=>{
+              this.btndisabled = false;
+            })
+      }
+    }
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less';
+</style>

+ 128 - 0
src/views/system/modules/TestDemo1Modal.vue

@@ -0,0 +1,128 @@
+<template>
+  <a-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    :confirmLoading="confirmLoading"
+    @ok="handleOk"
+    @cancel="handleCancel"
+    cancelText="关闭">
+    <a-spin :spinning="confirmLoading">
+      <a-form :form="form">
+
+        <a-form-item label="流程状态" :labelCol="labelCol" :wrapperCol="wrapperCol">
+          <a-input v-decorator="[ 'bpmStatus', validatorRules.bpmStatus]" placeholder="请输入流程状态"></a-input>
+        </a-form-item>
+        <a-form-item label="名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
+          <a-input v-decorator="[ 'name', validatorRules.name]" placeholder="请输入名称"></a-input>
+        </a-form-item>
+        <a-form-item label="姓名" :labelCol="labelCol" :wrapperCol="wrapperCol">
+          <a-input v-decorator="[ 'sax', validatorRules.sax]" placeholder="请输入姓名"></a-input>
+        </a-form-item>
+
+      </a-form>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+
+  import { httpAction } from '@/api/manage'
+  import pick from 'lodash.pick'
+  import { validateDuplicateValue } from '@/utils/util'
+
+  export default {
+    name: "TestDemo1Modal",
+    components: { 
+    },
+    data () {
+      return {
+        form: this.$form.createForm(this),
+        title:"操作",
+        width:800,
+        visible: false,
+        model: {},
+        labelCol: {
+          xs: { span: 24 },
+          sm: { span: 5 },
+        },
+        wrapperCol: {
+          xs: { span: 24 },
+          sm: { span: 16 },
+        },
+        confirmLoading: false,
+        validatorRules: {
+          bpmStatus: {rules: [
+          ]},
+          name: {rules: [
+          ]},
+          sax: {rules: [
+          ]},
+        },
+        url: {
+          add: "/ceshi/testDemo1/add",
+          edit: "/ceshi/testDemo1/edit",
+        }
+      }
+    },
+    created () {
+    },
+    methods: {
+      add () {
+        this.edit({});
+      },
+      edit (record) {
+        this.form.resetFields();
+        this.model = Object.assign({}, record);
+        this.visible = true;
+        this.$nextTick(() => {
+          this.form.setFieldsValue(pick(this.model,'bpmStatus','name','sax'))
+        })
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      handleOk () {
+        const that = this;
+        // 触发表单验证
+        this.form.validateFields((err, values) => {
+          if (!err) {
+            that.confirmLoading = true;
+            let httpurl = '';
+            let method = '';
+            if(!this.model.id){
+              httpurl+=this.url.add;
+              method = 'post';
+            }else{
+              httpurl+=this.url.edit;
+               method = 'put';
+            }
+            let formData = Object.assign(this.model, values);
+            console.log("表单提交数据",formData)
+            httpAction(httpurl,formData,method).then((res)=>{
+              if(res.success){
+                that.$message.success(res.message);
+                that.$emit('ok');
+              }else{
+                that.$message.warning(res.message);
+              }
+            }).finally(() => {
+              that.confirmLoading = false;
+              that.close();
+            })
+          }
+         
+        })
+      },
+      handleCancel () {
+        this.close()
+      },
+      popupCallback(row){
+        this.form.setFieldsValue(pick(row,'bpmStatus','name','sax'))
+      },
+
+      
+    }
+  }
+</script>

+ 138 - 0
src/views/system/modules/TestDemo1Modal__Style#Drawer.vue

@@ -0,0 +1,138 @@
+<template>
+  <a-drawer
+    :title="title"
+    :width="width"
+    placement="right"
+    :closable="false"
+    @close="close"
+    :visible="visible">
+  
+    <a-spin :spinning="confirmLoading">
+      <a-form :form="form">
+
+        <a-form-item label="流程状态" :labelCol="labelCol" :wrapperCol="wrapperCol">
+          <a-input v-decorator="[ 'bpmStatus', validatorRules.bpmStatus]" placeholder="请输入流程状态"></a-input>
+        </a-form-item>
+        <a-form-item label="名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
+          <a-input v-decorator="[ 'name', validatorRules.name]" placeholder="请输入名称"></a-input>
+        </a-form-item>
+        <a-form-item label="姓名" :labelCol="labelCol" :wrapperCol="wrapperCol">
+          <a-input v-decorator="[ 'sax', validatorRules.sax]" placeholder="请输入姓名"></a-input>
+        </a-form-item>
+        
+      </a-form>
+    </a-spin>
+    <a-button type="primary" @click="handleOk">确定</a-button>
+    <a-button type="primary" @click="handleCancel">取消</a-button>
+  </a-drawer>
+</template>
+
+<script>
+
+  import { httpAction } from '@/api/manage'
+  import pick from 'lodash.pick'
+  import { validateDuplicateValue } from '@/utils/util'
+  
+  export default {
+    name: "TestDemo1Modal",
+    components: { 
+    },
+    data () {
+      return {
+        form: this.$form.createForm(this),
+        title:"操作",
+        width:800,
+        visible: false,
+        model: {},
+        labelCol: {
+          xs: { span: 24 },
+          sm: { span: 5 },
+        },
+        wrapperCol: {
+          xs: { span: 24 },
+          sm: { span: 16 },
+        },
+        confirmLoading: false,
+        validatorRules: {
+          bpmStatus: {rules: [
+          ]},
+          name: {rules: [
+          ]},
+          sax: {rules: [
+          ]},
+        },
+        url: {
+          add: "/ceshi/testDemo1/add",
+          edit: "/ceshi/testDemo1/edit",
+        }
+      }
+    },
+    created () {
+    },
+    methods: {
+      add () {
+        this.edit({});
+      },
+      edit (record) {
+        this.form.resetFields();
+        this.model = Object.assign({}, record);
+        this.visible = true;
+        this.$nextTick(() => {
+          this.form.setFieldsValue(pick(this.model,'bpmStatus','name','sax'))
+        })
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      handleOk () {
+        const that = this;
+        // 触发表单验证
+        this.form.validateFields((err, values) => {
+          if (!err) {
+            that.confirmLoading = true;
+            let httpurl = '';
+            let method = '';
+            if(!this.model.id){
+              httpurl+=this.url.add;
+              method = 'post';
+            }else{
+              httpurl+=this.url.edit;
+               method = 'put';
+            }
+            let formData = Object.assign(this.model, values);
+            console.log("表单提交数据",formData)
+            httpAction(httpurl,formData,method).then((res)=>{
+              if(res.success){
+                that.$message.success(res.message);
+                that.$emit('ok');
+              }else{
+                that.$message.warning(res.message);
+              }
+            }).finally(() => {
+              that.confirmLoading = false;
+              that.close();
+            })
+          }
+         
+        })
+      },
+      handleCancel () {
+        this.close()
+      },
+      popupCallback(row){
+        this.form.setFieldsValue(pick(row,'bpmStatus','name','sax'))
+      }
+      
+    }
+  }
+</script>
+
+<style lang="less" scoped>
+/** Button按钮间距 */
+  .ant-btn {
+    margin-left: 30px;
+    margin-bottom: 30px;
+    float: right;
+  }
+</style>

+ 2 - 2
src/views/user/Login.vue

@@ -93,12 +93,12 @@
 
       <a-form-item>
         <a-checkbox v-decorator="['rememberMe', {initialValue: true, valuePropName: 'checked'}]" >自动登陆</a-checkbox>
-        <router-link :disabled="true" :to="{ name: 'alteration'}" class="forge-password" style="float: right;">
+        <!-- <router-link :disabled="true" :to="{ name: 'alteration'}" class="forge-password" style="float: right;">
           忘记密码(暂无短信服务,不可用)
         </router-link>
        <router-link :to="{ name: 'register'}" class="forge-password" style="float: right;margin-right: 10px" >
           注册账户
-        </router-link>
+        </router-link> -->
       </a-form-item>
 
       <a-form-item style="margin-top:24px">