chenc 2 years ago
parent
commit
1b262e77ad

+ 5 - 1
src/api/api.js

@@ -139,6 +139,9 @@ const getListByCreateBy = (params)=>getAction("/system/bottomMenu/getListByCreat
 //{bottomMenuList:[]}
 const addBatch = (params) => postAction('/system/bottomMenu/addBatch', params)
 
+//项目管理接口
+const projectManagementQueryById = (params) => getAction('/projectManagement/projectManageArchives/queryById', params)
+
 
 export {
   // imgView,
@@ -206,7 +209,8 @@ export {
   scheduleDelete,
   getUserPermissionByTokenBottom,
   getListByCreateBy,
-  addBatch
+  addBatch,
+  projectManagementQueryById
 }
 
 

+ 8 - 0
src/api/login.js

@@ -20,6 +20,14 @@ export function login(parameter) {
   })
 }
 
+export function automaticLogin(parameter) {
+  return axios({
+    url: '/sys/automaticLogin',
+    method: 'post',
+    data: parameter
+  })
+}
+
 export function phoneLogin(parameter) {
   return axios({
     url: '/sys/phoneLogin',

+ 8 - 0
src/config/router.config.js

@@ -363,5 +363,13 @@ export const constantRouterMap = [
     path: '/404',
     component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/404')
   },
+  {//////////////项目管理整合
+    path: '/commencementSchedule',
+    component: () => import(/* webpackChunkName: "fail" */ '../views/activiti/commencementSchedule.vue')
+  },
+  {//////////////自动登录
+    path: '/automaticLogin',
+    component: () => import(/* webpackChunkName: "fail" */ '../views/user/AutomaticLogin.vue')
+  },
 
 ]

+ 1 - 1
src/permission.js

@@ -9,7 +9,7 @@ import { generateIndexRouter } from "@/utils/util"
 
 NProgress.configure({ showSpinner: false }) // NProgress Configuration
 
-const whiteList = ['/user/login', '/user/register', '/user/register-result','/user/alteration'] // no redirect whitelist
+const whiteList = ['/user/login', '/user/register', '/user/register-result','/user/alteration','/activiti/commencementSchedule','/automaticLogin'] // no redirect whitelist
 
 router.beforeEach((to, from, next) => {
   NProgress.start() // start progress bar

+ 24 - 1
src/store/modules/user.js

@@ -1,5 +1,5 @@
 import Vue from 'vue'
-import { login, logout, phoneLogin } from "@/api/login"
+import { automaticLogin,login, logout, phoneLogin } from "@/api/login"
 import { ACCESS_TOKEN, USER_NAME,USER_INFO,USER_AUTH,SYS_BUTTON_AUTH } from "@/store/mutation-types"
 import { welcome } from "@/utils/util"
 import { queryPermissionsByUser } from '@/api/api'
@@ -84,6 +84,29 @@ const user = {
         })
       })
     },
+    // 登录
+    automaticLogin({ commit }, userInfo) {
+      return new Promise((resolve, reject) => {
+        automaticLogin(userInfo).then(response => {
+          if(response.code =='200'){
+            const result = response.result
+            const userInfo = result.userInfo
+            Vue.ls.set(ACCESS_TOKEN, result.token, 7 * 24 * 60 * 60 * 1000)
+            Vue.ls.set(USER_NAME, userInfo.username, 7 * 24 * 60 * 60 * 1000)
+            Vue.ls.set(USER_INFO, userInfo, 7 * 24 * 60 * 60 * 1000)
+            commit('SET_TOKEN', result.token)
+            commit('SET_INFO', userInfo)
+            commit('SET_NAME', { username: userInfo.username,realname: userInfo.realname, welcome: welcome() })
+            commit('SET_AVATAR', userInfo.avatar)
+            resolve(response)
+          }else{
+            reject(response)
+          }
+        }).catch(error => {
+          reject(error)
+        })
+      })
+    },
     //手机号登录
     PhoneLogin({ commit }, userInfo) {
       return new Promise((resolve, reject) => {

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

@@ -322,6 +322,8 @@
         <a-button type="primary" :disabled="submitLoading" @click="handelSubmitCancel">提交</a-button>
       </div>
     </a-modal>
+    <!-- 项目管理整合 打开合同页面 -->
+  <my-iframe ref="MyIframe" ></my-iframe>
   </a-card>
 </template>
 
@@ -335,16 +337,20 @@ import pick from 'lodash.pick'
 import JTreeSelect from '@/components/jeecg/JTreeSelect'
 import { initDictOptions, filterDictText } from '@/components/dict/JDictSelectUtil'
 import historicDetail from '@/views/activiti/historicDetail'
+import MyIframe from '../../share/modal/MyIframe'
+import {getEditorJumpUrl,getProjctManageUrl}from '../../../url.config'
 export default {
   name: 'applyList',
   mixins: [activitiMixin, JeecgListMixin],
   components: {
     JEllipsis,
     JTreeSelect,
-    historicDetail
+    historicDetail,
+    MyIframe
   },
   data() {
     return {
+      editorJumpUrl:'',
       description: '我的申请',
       dictOptions: [],
       url: {
@@ -605,8 +611,13 @@ export default {
         this.$message.warning('该流程信息未配置表单,请联系开发人员!')
         return
       }
-      if (r.routeName.indexOf('外部表单') != -1) {
-        alert('调用其他项目页面')
+      if (r.routeName.indexOf('外部表单') != -1||r.tableName.indexOf('外部表单') != -1) {
+        //其他项目的表单流程
+        var id = r.tableId //项目管理合同数据id
+        //打开MyIframe弹框
+        this.$refs.MyIframe.editorVisible = true
+        //并传入地址参数
+        this.$refs.MyIframe.editorJumpUrlMy = getProjctManageUrl()+'/contract-process-view?id=' + id
       } else if (r.routeName.indexOf('自定义') != -1) {
         isView = isView || false
         this.lcModa.disabled = isView

+ 134 - 0
src/views/activiti/commencementSchedule.vue

@@ -0,0 +1,134 @@
+
+<template>
+  <!-- 与项目管理整合 -->
+  <div>
+    <!--流程表单-->
+    <component
+      :disabled="lcModa.disabled"
+      v-if="lcModa.visible"
+      :is="lcModa.formComponent"
+      :processData="lcModa.processData"
+      :fromObject="lcModa.fromObject"
+      :isNew="lcModa.isNew"
+      @afterSubmit="afterSub"
+      @close=";(lcModa.visible = false), (lcModa.disabled = false)"
+    ></component>
+  </div>
+</template>
+
+<script>
+import {projectManagementQueryById } from '@api/api.js'
+
+export default {
+  name: 'commencementSchedule',
+  data() {
+    return {
+      url: {
+        getProcessDataList: '/activiti_process/listData'
+      },
+      lcModa: {
+        title: '',
+        disabled: false,
+        visible: false,
+        formComponent: null,
+        isNew: false,
+        fromObject:{}
+      },
+      proArchivesId:""
+    }
+  },
+  mounted() {
+    
+    
+    // alert()
+    // alert(window.location.href)
+    // alert(window.location.href)
+    this.proArchivesId=this.GetQueryString("id",window.location.href)
+    //获取url的参数
+    if(this.proArchivesId){//根据当前页面的地址获取参数是否为空
+      //根据项目管理的项目id获取项目相关信息
+       this.projectQueryById();
+    }else{
+      this.$message.error("未接收到项目信息");
+    }
+    // alert(this.proId)
+  },
+  methods: {
+    GetQueryString(name,url) {
+      return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(url) || [, ""])[1].replace(/\+/g, '%20')) || null
+    },
+    //根据项目id获取项目管理项目信息
+    projectQueryById(){
+      projectManagementQueryById({id:this.proArchivesId}).then(res=>{
+        //赋值到变量传入动态表单
+        this.lcModa.fromObject=res.result
+        this.getProcessList()
+      })
+    },
+    getProcessList() {
+      //   this.addApplyLoading = true
+      this.postFormAction(this.url.getProcessDataList, { status: 1, roles: true }).then(res => {
+        this.activeKeyAll = []
+        if (res.success) {
+          var result = res.result || []
+          result.forEach(element => {
+            if (element.id == '项目开工表:1:102512') {
+              this.chooseProcess(element)
+            }
+          })
+          // if (result.length > 0) {
+          //   let searchProcessKey = this.searchProcessKey
+          //   if (searchProcessKey) {
+          //     //过滤条件
+          //     result = _.filter(result, function(o) {
+          //       return o.name.indexOf(searchProcessKey) > -1
+          //     })
+          //   }
+          //   this.processDataMap = _.groupBy(result, 'categoryId')
+          //   for (const categoryId in this.processDataMap) {
+          //     this.activeKeyAll.push(categoryId)
+          //   }
+          //   this.activeKey = this.activeKeyAll
+          // }
+          // this.processModalVisible = true
+        } else {
+          this.$message.warning(res.message)
+        }
+      })
+      // .finally(() => (this.addApplyLoading = false))
+    },
+    chooseProcess(v) {
+      console.log(v)
+      // this.$refs.modal.add("1")
+      if (!v.routeName) {
+        this.$message.warning('该流程信息未配置表单,请联系开发人员!')
+        return
+      }
+      if (v.routeName.indexOf('外部表单') != -1) {
+        alert('调用其他项目页面')
+      } else if (v.routeName.indexOf('自定义') != -1) {
+        this.lcModa.disabled = false
+        let com = { component: () => import(`@/views/activiti/form/commencementSchedule`) }
+        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)
+    },
+    afterSub(formData) {
+      this.lcModa.visible = false
+      this.loadData()
+    }
+  }
+}
+</script>

+ 15 - 2
src/views/activiti/doneManage.vue

@@ -141,15 +141,23 @@
         @close=";(lcModa.visible = false), (lcModa.disabled = false)"
       ></component>
     </a-modal>
+    
+    <!-- 项目管理整合 打开合同页面 -->
+  <my-iframe ref="MyIframe" ></my-iframe>
   </div>
 </template>
 
 <script>
 import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 import { activitiMixin } from '@/views/activiti/mixins/activitiMixin'
+import MyIframe from '../../share/modal/MyIframe'
+import {getEditorJumpUrl,getProjctManageUrl}from '../../../url.config'
 export default {
   name: 'done-manage',
   mixins: [activitiMixin, JeecgListMixin],
+  components:{
+    MyIframe
+  },
   data() {
     return {
       openSearch: true,
@@ -233,9 +241,14 @@ export default {
         this.$message.warning('该流程信息未配置表单,请联系开发人员!')
         return
       }
-      if (r.routeName.indexOf('外部表单') != -1) {
+      if (r.routeName.indexOf('外部表单') != -1||r.tableName.indexOf('外部表单') != -1) {
         //外部项目开发的表单
-        alert('调用其他项目页面')
+        //其他项目的表单流程
+        var id = r.tableId //项目管理合同数据id
+        //打开MyIframe弹框
+        this.$refs.MyIframe.editorVisible = true
+        //并传入地址参数
+        this.$refs.MyIframe.editorJumpUrlMy = getProjctManageUrl()+'/contract-process-view?id=' + id
       } else if (r.routeName.indexOf('自定义') != -1) {
         //自定义的表单流程
         this.lcModa.disabled = true

+ 970 - 0
src/views/activiti/form/commencementSchedule.vue

@@ -0,0 +1,970 @@
+<template>
+  <div class="form-main">
+    <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 :disabled="disabled"
+                   v-decorator="[
+            'name',
+            {rules: [{ required: true, message: '请输入标题' }]}
+          ]"
+                   name="name"
+                   placeholder="给目标起个名字" />
+        </a-form-item>
+        <a-form-item v-if="!disabled"
+                     :wrapperCol="{ span: 24 }"
+                     style="text-align: center"
+        >
+          <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-spin :spinning="spinningData.spinning">
+      <k-form-build
+        :value="jsonData"
+        @change="handleChange"
+        :dynamicData="dynamicData"
+        ref="KFB"
+        @submit="handleSubmit"
+      />
+      <div style="text-align:center">
+        <a-button
+          htmlType="submit"
+          type="primary"
+          :disabled="disabled || btndisabled"
+          @click="handleSubmit"
+        >保存</a-button
+        >
+        <todoManageOperation
+          v-if="processData.operationType && processData.operationType == '1'"
+          :processData="processData"
+          :todoManageOperationObject="todoManageOperationObject"
+          :disabled="disabled"
+          :btndisabled="btndisabled"
+          @refreshToDo="refreshToDo"
+          @handleSubmit2="handleSubmit2"
+        ></todoManageOperation>
+        <a-button style="margin-left: 8px;" :disabled="disabled || disabled2" @click="close">取消</a-button>
+      </div>
+      </a-spin>
+    </a-card>
+  </div>
+</template>
+
+<script>
+import pick from 'lodash.pick'
+import todoManageOperation from '../operation/todoManageOperation'
+import { postAction, postFormDataAction } from '@/api/manage'
+export default {
+    name: 'DemoFoCommencementSchedulerm',
+    props: {
+    /* 全局禁用,可表示查看 */
+        disabled: {
+            type: Boolean,
+            default: false,
+            required: false
+        },
+        /* 流程数据 */
+        processData: {
+            type: Object,
+            default: () => {
+                return {}
+            },
+            required: false
+        },
+        //表单初始值
+        fromObject:{
+            type: Object,
+            default: () => {
+                return {}
+            },
+            required: false
+        },
+        /* 是否新增 */
+        isNew: { type: Boolean, default: false, required: false }
+    },
+    components: {
+        todoManageOperation
+    },
+    data () {
+        return {
+            spinningData:{
+                spinning:false
+            },
+            isSJ: false,
+            todoManageOperationObject: {
+                isSave: false,
+                formData: {},
+                jsonData: {}
+            },
+            disabled2: false, // 用来取决于表单时不同流程节点填写不同表单信息使用
+            jsonData: {}, // 前台任意改变的json
+            jsonDataSave: {}, // 保存到数据库的json
+            url: {
+                getForm: '/actBusiness/getForm',
+                addApply: '/actBusiness/add',
+                editForm: '/actBusiness/editForm',
+                leaveType: '/sys/dict/getDictItems'
+            },
+            description: '流程表单demo,按例开发表单。需在 activitiMixin.js 中加入写好的表单',
+            // form
+            form: this.$form.createForm(this),
+            /* 表单回显数据 */
+            data: {},
+            btndisabled: false,
+            ceshi_file: null,
+            dynamicData: {
+                jsonData: {},
+                typeData: [], // 请假类型下拉数据
+                reimbursementTypeList: [], // 报销类型下拉数据
+                invoiceTypeList: [], // 发票类型下拉数据
+                add: this.add
+            },
+            itemModelNameList: [] // 子表字段名
+        }
+    },
+    watch: {
+    // 'dynamicData.jsonData'(){
+    //   console.log("发生改变了")
+    // },
+        dynamicData: {
+            handler (newName, oldName) {
+                console.log('obj.a changed')
+                console.log(newName)
+                console.log(oldName)
+            },
+            immediate: true,
+            deep: true
+        }
+    },
+    created () {
+        this.spinningData.spinning=true;
+        window.deleteRow = this.deleteRow
+        console.log('流程数据', this.processData)
+        // 加载一些下拉选择数据等
+        // this.getDataList()
+        let businessTable = ''
+        // 如果没有值则在另一个属性上有值
+        if (!this.processData.businessTable) {
+            this.processData.businessTable = this.processData.tableName
+        }
+        this.getAction('/tbTableInfo/query', {
+            businessTable: this.processData.businessTable,
+            taskNodeId: this.processData.key,
+            tableId: this.processData.tableId,
+            type: '1'
+        }).then(res => {
+            var jsonString = JSON.stringify(res.result.jsonContent)
+            var index = 1
+
+            var dynamicKeyValueList = []
+            for (var index = 1; index !== -1;) {
+                // 动态字符位置
+                index = jsonString.indexOf('"dynamicKey"', index)
+                if (index !== -1) {
+                    // 从指定字符的周后一个字符后开始找(")
+                    var ihStart = jsonString.indexOf('"', index + 12)
+                    // 再从 (") 后面位置还是找下一个 (")
+                    var ihEnd = jsonString.indexOf('"', ihStart + 1)
+                    // 获取引号之间的字符
+                    var dynamicKeyValue = jsonString.substring(ihStart + 1, ihEnd)
+                    // 如果动态表示不为空则获取
+                    if (dynamicKeyValue != '') {
+                        dynamicKeyValueList.push(dynamicKeyValue)
+                    }
+                    index = ihEnd + 1
+                }
+            }
+            console.log(dynamicKeyValueList)
+            if (dynamicKeyValueList.length > 0) {
+                // 获取数据字典数据源
+                postAction('/sys/dict/getDictItems/getDictList', dynamicKeyValueList).then(dictData => {
+                    if (dictData.success) {
+                        this.dynamicData = dictData.result.dicList
+                        // 获取用户下拉数据
+                        this.getAction('/sys/user/list2', { pageSize: 20000 }).then(userData => {
+                            if (res.success) {
+                                userData.result.records.forEach(user => {
+                                    user.label = user.realname
+                                    user.value = user.username
+                                })
+                                // 存到动态数据源中
+                                this.dynamicData.userList = userData.result.records
+                                this.dynamicData.add = this.add // 新增按钮
+                                // 获取json
+                                
+                                this.jsonData = res.result.jsonContent
+                                this.jsonDataSave = JSON.parse(JSON.stringify(res.result.jsonContent))
+                                
+                                // 获取申请人信息
+                                this.getApplicant()
+                                // 如果是手机端子表初始化子表model
+                                // this.listUpdateModel()
+                                // alert(1)
+                                
+
+                                if (!this.isNew) {
+                                    this.init()
+                                }else{//新增初始化数据
+                                   var a=1
+                                   var KFB=this.$refs.KFB//表单组件
+                                   var fo=this.fromObject//项目信息
+                                   var spinningData=this.spinningData//加载变量
+                                   var sales_manager="";//销售经理
+                                   //根据名称匹配销售经理
+                                   this.dynamicData.userList.forEach(element => {
+                                       if(element.realname==fo.saleManager){
+                                           sales_manager=element.username
+                                       }
+                                   });
+
+                                   //隔一段时间等json加载完后再把项目管理的值附上
+                                    const timer= setInterval(function(){
+                                        a=a+1
+                                        if(a>1){
+                                            KFB.setData({
+                                                project_name: fo.proName,
+                                                contract_amount_total:fo.totalPrice,
+                                                full_name_customer:fo.cusName,
+                                                customer_address:fo.address,
+                                                customer_contact_person_and_title:fo.contacts,
+                                                sales_manager:sales_manager
+                                            })
+                                            // console.log("from",project_manager)
+                                            //关闭加载
+                                            spinningData.spinning=false
+                                            clearInterval(timer)
+                                        }
+                                    },2000)
+                                    // console.log("fffffffffff",this.formObject)
+                                    
+                                    
+                                }
+                            } else {
+                                this.$message.error(userData.message)
+                            }
+                        })
+                    } else {
+                        this.$message.error(dictData.message)
+                    }
+                })
+            } else {
+                // 获取json
+                this.jsonData = res.result.jsonContent
+                // 获取申请人信息
+                this.getApplicant()
+                // 如果是手机端子表初始化子表model
+                this.listUpdateModel()
+                this.$refs.KFB.setData({
+                                    project_name: "123"
+                                })
+                // window.jsonData=this.jsonData;
+                if (!this.isNew) {
+                    this.init()
+                }else{
+                    //关闭加载
+                    this.spinningData.spinning=false
+                }
+            }
+
+            // 后台检测到流程节点有关联表单且前台处于我的待办界面打开表单详情
+            if (res.result.isSave && this.processData.isSuspended != undefined) {
+                this.disabled = false
+                this.btndisabled = false
+            }
+        })
+        
+    },
+    methods: {
+    // 根据字典名字获取数据源
+        getDataListByName (name) {
+            this.getAction(this.url.leaveType + '/' + name).then(res => {
+                if (res.success) {
+                    this.dynamicData[name] = res.result
+                    console.log(111)
+                } else {
+                    this.$message.error(res.message)
+                }
+            })
+        },
+        // 获取获取下拉数据等
+        getDataList () {
+            // 获取请假类型下拉数据
+            this.getAction(this.url.leaveType + '/leave_type').then(res => {
+                if (res.success) {
+                    this.dynamicData.typeData = res.result
+                } else {
+                    this.$message.error(res.message)
+                }
+            })
+            // 获取报销类型下拉数据
+            this.getAction(this.url.leaveType + '/reimbursement_type').then(res => {
+                if (res.success) {
+                    this.dynamicData.reimbursementTypeList = res.result
+                } else {
+                    this.$message.error(res.message)
+                }
+            })
+            // 获取发票类型下拉数据
+            this.getAction(this.url.leaveType + '/invoice_type').then(res => {
+                if (res.success) {
+                    this.dynamicData.invoiceTypeList = res.result
+                } else {
+                    this.$message.error(res.message)
+                }
+            })
+        },
+        /* 回显数据 */
+        init () {
+            this.btndisabled = true
+            var r = this.processData
+            this.getAction(this.url.getForm, {
+                tableId: r.tableId,
+                tableName: r.tableName
+            }).then(res => {
+                // 第一次调接口根据子表数据渲染子表前台效果
+                // 只有手机端才执行
+                if (this.isSJ) {
+                    _.keys(res.result).forEach((e, i) => {
+                        if (e.indexOf('child&') != -1) {
+                            if (i > 0) {
+                                this.add()
+                            }
+                        }
+                    })
+                }
+                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
+                        // 如果表单是手机端的子表则
+                        if (this.isSJ) {
+                            var formModelList = _.keys(this.data)
+                                .join(',')
+                                .split(',')
+                            var itemList = []
+                            formModelList.forEach(element => {
+                                if (element.indexOf('child&') != -1) {
+                                    itemList = JSON.parse(JSON.stringify(this.data[element]))
+                                    delete this.data[element]
+                                }
+                            })
+                            // 子表字段名
+                            // 子表数据model和值组装
+                            itemList.forEach((item, index) => {
+                                this.itemModelNameList.forEach(itemModelName => {
+                                    this.data[itemModelName + '@' + (index + 1)] = item[itemModelName]
+                                })
+                            })
+                        }
+                        // 赋值
+                        this.$refs.KFB.setData(this.data)
+                        this.btndisabled = false
+                    } else {
+                        this.$message.error(res.message)
+                    }
+                })
+            })
+            //关闭加载
+            this.spinningData.spinning=false
+        },
+        // 获取申请人信息
+        getApplicant () {
+            console.log('aa', this.$refs.KFB.form.getFieldValue('project_name'))
+            // if (this.$refs.KFB.form.getFieldValue('applicant')) {
+            //   alert(1)
+            //   this.$refs.KFB.setData({
+            //     applicant: this.$store.getters.userInfo.username
+            //   })
+            // }
+        },
+        // 表单字段数值发生改变事件
+        handleChange (value, key) {
+            // 数据变化时触发
+            // 如果开始时间发生变化
+            if (key == 'start_time') {
+                // 判断结束时间是否存在
+                if (this.$refs.KFB.form.getFieldValue('end_time')) {
+                    // 获取时间差
+                    let duration = startEndFun(value, this.$refs.KFB.form.getFieldValue('end_time'))
+                    if (duration) {
+                        // 使用k-form-design组件的form属性修改表单数据
+                        this.$refs.KFB.setData({
+                            duration: duration
+                        })
+                    }
+                }
+            }
+            // 如果结束时间发生变化
+            if (key == 'end_time') {
+                // 判断结束时间是否存在
+                if (this.$refs.KFB.form.getFieldValue('start_time')) {
+                    // 获取时间差
+                    let duration = startEndFun(this.$refs.KFB.form.getFieldValue('start_time'), value)
+                    if (duration) {
+                        // 使用k-form-design组件的form属性修改表单数据
+                        this.$refs.KFB.setData({
+                            duration: duration
+                        })
+                    }
+                }
+            }
+        },
+        // handler
+        handleSubmit (e) {
+            // return new Promise((resolve)=>{
+            // 通过函数获取数据
+               
+            return;
+            this.$refs.KFB.getData()
+                .then(res => {
+                    // 处理手机端子表数据
+                    if (this.isSJ) {
+                        this.itemData(res)
+                    }
+                    // 清除为空的表单数据
+                    _.keys(res).forEach(r => {
+                        if (!res[r]) {
+                            delete res[r]
+                        }
+                    })
+                    // 获取数据成功
+                    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
+                    }
+                    // 是否存在子表
+                    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])
+                                }
+                            }
+                            // formData[element];
+                        })
+                    // 判断需不需要存子表
+                    if (ischild) {
+                        formData.filedNames = formData.filedNames + ',table_name_children'
+                    }
+
+                    console.log(formData)
+                    // 子表数据
+                    // 调用保存接口
+                    this.btndisabled = true
+                    this.todoManageOperationObject.formData = formData
+                    this.todoManageOperationObject.url = url
+                    // formData.jsonContent=JSON.stringify(this.jsonData).toString()
+                    // 获取是否部门负责人
+                    formData.filedNames = formData.filedNames + ',is_leaders'
+                    formData.is_leaders = this.$store.getters.userInfo.identity
+                    // 清除子表规则的属性
+                    _.keys(formData).forEach(r => {
+                        if (r.indexOf('child&') != -1) {
+                            delete formData[r]
+                        }
+                    })
+                    // 如果手机端子表得则需要修改json
+                    // var jsonPamats = JSON.parse(JSON.stringify(this.jsonData))
+                    var jsonPamats = JSON.parse(JSON.stringify(this.jsonDataSave))
+                    if (!this.isSJ && this.isNew) {
+                        jsonPamats = null
+                    }
+                    this.todoManageOperationObject.jsonData = jsonPamats
+                    // 非我的待办节点打卡表单界面
+                    postFormDataAction(url, formData, { jsonContent: jsonPamats })
+                        .then(res => {
+                            if (res.success) {
+                                this.todoManageOperationObject.isSave = true
+                                this.$message.success('保存成功!')
+                                console.log('123')
+                                this.$emit('afterSubmit', formData)
+                                this.$emit('close')
+                                // resolve(true);
+                            } else {
+                                this.$message.error(res.message)
+                                // resolve(false);
+                            }
+                        })
+                        .finally(() => {
+                            this.btndisabled = false
+                            // resolve(false);
+                        })
+                })
+                .catch(err => {
+                    console.log(err, '校验失败')
+                    // resolve(false);
+                })
+            // })
+        },
+        // 我的待办点击通过保存专用
+        handleSubmit2 (e) {
+            // return new Promise((resolve)=>{
+            // 通过函数获取数据
+            this.$refs.KFB.getData()
+                .then(res => {
+                    // 处理手机端子表数据
+                    if (this.isSJ) {
+                        this.itemData(res)
+                    }
+                    // 清除为空的表单数据
+                    _.keys(res).forEach(r => {
+                        if (!res[r]) {
+                            delete res[r]
+                        }
+                    })
+                    // 获取数据成功
+                    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
+                    // formData.jsonContent=JSON.stringify(this.jsonData)
+                    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
+                    }
+                    // 是否存在子表
+                    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])
+                                }
+                            }
+                            // formData[element];
+                        })
+                    // 判断需不需要存子表
+                    if (ischild) {
+                        formData.filedNames = formData.filedNames + ',table_name_children'
+                    }
+
+                    console.log(formData)
+                    // 子表数据
+                    // 调用保存接口
+                    this.btndisabled = true
+                    this.todoManageOperationObject.formData = formData
+                    this.todoManageOperationObject.url = url
+                    // 获取是否部门负责人
+                    formData.filedNames = formData.filedNames + ',is_leaders'
+                    formData.is_leaders = this.$store.getters.userInfo.identity
+                    // 清除子表规则的属性
+                    _.keys(formData).forEach(r => {
+                        if (r.indexOf('child&') != -1) {
+                            delete formData[r]
+                        }
+                    })
+                    // 如果手机端子表得则需要修改json
+                    // var jsonPamats = JSON.parse(JSON.stringify(this.jsonData))
+                    var jsonPamats = JSON.parse(JSON.stringify(this.jsonDataSave))
+                    if (!this.isSJ && this.isNew) {
+                        jsonPamats = null
+                    }
+                    this.todoManageOperationObject.jsonData = jsonPamats
+                })
+                .catch(err => {
+                    console.log(err, '校验失败')
+                    // resolve(false);
+                })
+            // })
+        },
+        close () {
+            this.$emit('close')
+        },
+        getData () {
+            // 通过函数获取数据
+            this.$refs.KFB.getData()
+                .then(res => {
+                    // 获取数据成功
+                    alert(JSON.stringify(res))
+                })
+                .catch(err => {
+                    console.log(err, '校验失败')
+                })
+        },
+        // 刷新待办列表
+        refreshToDo () {
+            this.close()
+            this.$emit('getDataList')
+        },
+        itemData (res) {
+            var childName = '' // 子表规则名称
+            var itemIndex = 0
+            this.jsonData.list.forEach((element, index) => {
+                if (element.label.indexOf('child&') != -1) {
+                    childName = element.label // 获取规则名
+                    itemIndex = itemIndex + 1
+                }
+            })
+            var itemList = [] // 封装子表数据
+            for (var i = 1; i <= itemIndex; i++) {
+                var itemObject = {} // 子表对象
+                this.itemModelNameList.forEach(name => {
+                    // 获取子表得值和封装对象
+                    itemObject[name] = res[name + '@' + i]
+                    delete res[name + '@' + i]
+                })
+                itemList.push(itemObject)
+            }
+            res[childName] = itemList // 完成子表数据封装
+            console.log(res)
+        },
+        deleteRow (idIndex) {
+            // 删除
+            this.jsonData.list.splice(idIndex, 1)
+            // 删除掉得json之后 重新处理model 和value
+            let childIndex = 0
+            this.jsonData.list.forEach((element, index) => {
+                if (element.label.indexOf('child&') != -1) {
+                    childIndex = childIndex + 1
+                    // 只有当前删除的对象json的后面对象json才进行修改
+                    if (index >= idIndex) {
+                        // 修改删除按钮的index
+                        element.columns[0].list[1].options.defaultValue =
+              '<a href="javascript:void(0);" \n onclick="deleteRow(' + childIndex + ')">删除</a>'
+                        // 修改model
+                        updateModel(element, childIndex)
+                        // 需要调整的子表值
+                        var updateModelObject = {}
+                        // 修改value
+                        this.$refs.KFB.getData().then(res => {
+                            // 根据原始字段名拼接带规则的
+                            this.itemModelNameList.forEach(modelName => {
+                                updateModelObject[modelName + '@' + childIndex] = res[modelName + '@' + (childIndex + 1)]
+                            })
+                            this.$refs.KFB.setData(updateModelObject)
+                        })
+                    }
+                }
+            })
+            console.log(JSON.stringify(this.jsonData.list))
+        },
+        add () {
+            let childLable = '' // 子表json标题
+            let childValue = {} // 新增子表json
+            let isReturn = false
+            let childIndex = 0
+            var itemList = []
+            this.jsonData.list.forEach((element, index) => {
+                if (element.label.indexOf('child&') != -1) {
+                    childValue = JSON.parse(JSON.stringify(element))
+                    childLable = element.label
+                    // 处理删除按钮
+                    childIndex = childIndex + 1
+                    // element.columns[0].list[1].options.dynamicFun = 'delete' + childIndex
+                    console.log(element.columns[0].list[1].options)
+                    element.columns[0].list[1].options.defaultValue =
+            '<a href="javascript:void(0);" \n onclick="deleteRow(' + childIndex + ')">删除</a>'
+                    updateModel(childValue, childIndex)
+                }
+
+                if (!isReturn && childLable != '' && element.label != childLable) {
+                    isReturn = true
+                    // 处理删除按钮
+                    childIndex = childIndex + 1
+                    // childValue.columns[0].list[1].options.dynamicFun = 'delete' + childIndex
+                    childValue.columns[0].list[1].options.defaultValue =
+            '<a href="javascript:void(0);" \n onclick="deleteRow(' + childIndex + ')">删除</a>'
+                    updateModel(childValue, childIndex)
+                    // this.jsonData.list.splice(index, 0, childValue)
+                    itemList.push(childValue)
+                }
+                itemList.push(element)
+            })
+            this.jsonData.list = itemList
+            console.log(JSON.stringify(this.jsonData.list))
+        },
+        // 把整个子表json的model进行规则修改
+        async listUpdateModel () {
+            let modelIndex = 0 // 子表model自增
+            // 循环整个json的表单
+            this.jsonData.list.forEach((element, index) => {
+                // 找到为子表的json
+                if (element.label.indexOf('child&') != -1) {
+                    this.isSJ = true
+                    // 获取子表原始得model字段名
+                    if (modelIndex == 0) {
+                        var i = 1
+                        var itemString = JSON.stringify(element)
+                        var itemModelNameList = [] // 储存子表字段名
+                        for (var i = 1; i !== -1;) {
+                            // 动态字符位置
+                            i = itemString.indexOf('"model"', i)
+                            if (i !== -1) {
+                                // 从指定字符的周后一个字符后开始找(")
+                                var ihStart = itemString.indexOf('"', i + 7)
+                                // 再从 (") 后面位置还是找下一个 (")
+                                var ihEnd = itemString.indexOf('"', ihStart + 1)
+                                // 获取引号之间的字符
+                                var model = itemString.substring(ihStart + 1, ihEnd)
+                                // 如果动态表示不为空则获取
+                                if (model != '') {
+                                    if (model.indexOf('@') != -1) {
+                                        model = model.substring(0, model.length - 2)
+                                    }
+                                    itemModelNameList.push(model)
+                                }
+                                i = ihEnd + 1
+                            }
+                        }
+                        this.itemModelNameList = itemModelNameList
+                    }
+                    modelIndex = modelIndex + 1
+                    // 修改model
+                    updateModel(element, modelIndex)
+                }
+            })
+        }
+    }
+}
+
+// 获取主表字段,排除子表标识
+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
+}
+
+// 根据开始时间 结束时间计算天数
+function startEndFun (start, end) {
+    let startTime = new Date(start)
+    let endTime = new Date(end)
+    if (startTime >= endTime) return 0
+    // 1,分钟取整
+    startTime = carryTime(startTime)
+    endTime = carryTime(endTime)
+    // 2,计算总天数
+    var totalTime = 0 // 工时,天数
+    if (startTime.getDay() == 6 || startTime.getDay() == 0) {
+        totalTime = endTime.getDate() - startTime.getDate()
+    } else {
+        totalTime = Math.floor((endTime - startTime) / (3600 * 1000) / 24)
+    }
+    // 3,拿初始值赋值给一个临时变量
+    var tempStartTime = new Date()
+    tempStartTime.setTime(startTime.getTime())
+    // 4,计算出总天数
+    while (tempStartTime.getDate() < endTime.getDate()) {
+        if (tempStartTime.getDay() == 6 || tempStartTime.getDay() == 0) {
+            // 周六或者周日减去
+            totalTime--
+        }
+        tempStartTime.setDate(tempStartTime.getDate() + 1)
+    }
+
+    // 5,计算出总小时数
+    var temp = 0 // 工时,小时
+    do {
+        if (startTime.getDay() == 6 || startTime.getDay() == 0) {
+            // 周六周日
+            startTime.setDate(startTime.getDate() + 1)
+            //* ********周六周日直接跳过,初始化为早晨9点
+            startTime.setHours(9)
+            startTime.setMinutes(0)
+            continue
+        }
+
+        if (endTime.getDay() == 6 || endTime.getDay() == 0) {
+            // 周六周日
+            endTime.setDate(endTime.getDate() + 1)
+            //* ********周六周日直接跳过,初始化为早晨9点
+            endTime.setHours(9)
+            endTime.setMinutes(0)
+            continue
+        }
+
+        let tempMinutes = startTime.getHours() * 60 + startTime.getMinutes()
+        // 上午9点到12点半,算工时
+        if (tempMinutes >= 9 * 60 && tempMinutes < 12 * 60) {
+            temp += 0.05
+        }
+        // 上午14点到18点半,算工时
+        if (tempMinutes >= 13 * 60 && tempMinutes < 18 * 60) {
+            temp += 0.05
+        }
+        startTime.setTime(startTime.getTime() + 0.5 * 3600 * 1000) // 每次增加半个小时
+    } while (startTime.getHours() * 60 + startTime.getMinutes() != endTime.getHours() * 60 + endTime.getMinutes())
+    {
+        totalTime += Math.floor(temp / 0.8)
+        totalTime += temp % 0.8
+        totalTime = Math.round(totalTime * 100) / 100
+    }
+    var days = Math.floor(totalTime)
+    var hours = Math.round((totalTime - days) * 100) / 10
+    console.log(days + '天', hours + '小时')
+
+    return days * 8 + hours
+
+    // if (start && end) {
+    //   let startTime = new Date(start) // 开始时间
+    //   let endTime = new Date(end) // 结束时间
+    //   let usedTime = endTime - startTime // 相差的毫秒数
+    //   let days = (usedTime / 1000 / 60 / 60).toFixed(2) // 计算出天数
+    //   return days
+    // } else {
+    //   return null
+    // }
+}
+
+// 格式化时间
+function formatDate (date, fmt) {
+    if (/(y+)/.test(fmt)) {
+        fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length))
+    }
+    let o = {
+        'M+': date.getMonth() + 1,
+        'd+': date.getDate(),
+        'h+': date.getHours(),
+        'm+': date.getMinutes(),
+        's+': date.getSeconds()
+    }
+    for (let k in o) {
+        if (new RegExp(`(${k})`).test(fmt)) {
+            let str = o[k] + ''
+            fmt = fmt.replace(RegExp.$1, RegExp.$1.length === 1 ? str : padLeftZero(str))
+        }
+    }
+    return fmt
+}
+
+function padLeftZero (str) {
+    return ('00' + str).substr(str.length)
+}
+
+/*
+ * 0-15分不算工时
+ * 15-45算半个小时
+ * 45-60算一个小时
+ * */
+function carryTime (date) {
+    if (date.getMinutes() > 0 && date.getMinutes() < 15) {
+        date.setMinutes(0)
+    }
+    if (date.getMinutes() >= 15 && date.getMinutes() < 30) {
+        date.setMinutes(30)
+    }
+    if (date.getMinutes() > 30 && date.getMinutes() < 45) {
+        date.setMinutes(30)
+    }
+    if (date.getMinutes() >= 45) {
+        date.setHours(date.getHours() + 1)
+        date.setMinutes(0)
+    }
+    return date
+}
+
+// function
+
+/**
+ * 修改model绑定值
+ */
+function updateModel (object, childIndex) {
+    let keyString = _.keys(object).join(',')
+    if (keyString.indexOf('model') != -1) {
+    // 如果没有修改过则直接修改
+        if (object['model'].indexOf('@') == -1) {
+            object['model'] = object['model'] + '@' + childIndex
+        } else {
+            // 修改过则截取修改前的再进行修改
+            var m = object['model'].substring(0, object['model'].length - 2)
+            object['model'] = m + '@' + childIndex
+        }
+    }
+    // 递归
+    _.keys(object)
+        .join(',')
+        .split(',')
+        .forEach(l => {
+            if (object[l] instanceof Array) {
+                object[l].forEach(element => {
+                    updateModel(element, childIndex)
+                })
+            }
+        })
+}
+</script>
+<style lang="less" scoped>
+.form-main {
+}
+</style>

+ 15 - 2
src/views/activiti/processFinishManage.vue

@@ -145,6 +145,9 @@
                  :processData="lcModa.processData" :isNew = "lcModa.isNew"
                  @close="lcModa.visible=false,lcModa.disabled = false"></component>
     </a-modal>
+    
+    <!-- 项目管理整合 打开合同页面 -->
+  <my-iframe ref="MyIframe" ></my-iframe>
   </div>
 </template>
 
@@ -152,9 +155,14 @@
 
 import {activitiMixin} from "./mixins/activitiMixin";
 import {JeecgListMixin} from "../../mixins/JeecgListMixin";
+import MyIframe from '../../share/modal/MyIframe'
+import {getEditorJumpUrl,getProjctManageUrl}from '../../../url.config'
 export default {
   mixins:[JeecgListMixin,activitiMixin],
   name: "process-finish-manage",
+  components:{
+    MyIframe
+  },
   data() {
     return {
       modalLsVisible: false,
@@ -237,8 +245,13 @@ export default {
         );
         return;
       }
-      if(r.routeName.indexOf("外部表单")!=-1){//外面的表单
-          alert("调用其他项目页面")
+      if(r.routeName.indexOf("外部表单")!=-1||r.tableName.indexOf('外部表单') != -1){//外面的表单
+          //其他项目的表单流程
+        var id = r.tableId //项目管理合同数据id
+        //打开MyIframe弹框
+        this.$refs.MyIframe.editorVisible = true
+        //并传入地址参数
+        this.$refs.MyIframe.editorJumpUrlMy = getProjctManageUrl()+'/contract-process-view?id=' + id
       }else if(r.routeName.indexOf("自定义")!=-1){//自定义的表单流程
         this.lcModa.disabled = true;
         this.lcModa.title = '查看流程业务信息:'+r.name;

+ 15 - 2
src/views/activiti/processInsManage.vue

@@ -140,15 +140,23 @@
                  :processData="lcModa.processData" :isNew = "lcModa.isNew"
                  @close="lcModa.visible=false,lcModa.disabled = false"></component>
     </a-modal>
+    
+    <!-- 项目管理整合 打开合同页面 -->
+  <my-iframe ref="MyIframe" ></my-iframe>
   </div>
 </template>
 
 <script>
 import {activitiMixin} from "./mixins/activitiMixin";
 import {JeecgListMixin} from "../../mixins/JeecgListMixin";
+import MyIframe from '../../share/modal/MyIframe'
+import {getEditorJumpUrl,getProjctManageUrl}from '../../../url.config'
 export default {
   mixins:[activitiMixin,JeecgListMixin],
   name: "process-ins-manage",
+  components:{
+    MyIframe
+  },
   data() {
     return {
       openSearch: true,
@@ -271,8 +279,13 @@ export default {
         );
         return;
       }
-      if(r.routeName.indexOf("外部表单")!=-1){//外部项目的表单
-          alert("调用其他项目页面")
+      if(r.routeName.indexOf("外部表单")!=-1||r.tableName.indexOf('外部表单') != -1){//外部项目的表单
+          //其他项目的表单流程
+        var id = r.tableId //项目管理合同数据id
+        //打开MyIframe弹框
+        this.$refs.MyIframe.editorVisible = true
+        //并传入地址参数
+        this.$refs.MyIframe.editorJumpUrlMy = getProjctManageUrl()+'/contract-process-view?id=' + id
       }else if(r.routeName.indexOf("自定义")!=-1){//自定义的表单流程
         this.lcModa.disabled = true;
         this.lcModa.title = '查看流程业务信息:'+r.name;

+ 3 - 2
src/views/activiti/todoManage.vue

@@ -207,6 +207,7 @@ import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 import { activitiMixin } from '@/views/activiti/mixins/activitiMixin'
 import JSelectUserByDep from '@/components/jeecgbiz/JSelectUserByDep'
 import MyIframe from '../../share/modal/MyIframe'
+import {getEditorJumpUrl,getProjctManageUrl}from '../../../url.config'
 export default {
   name: 'todo-manage',
   mixins: [activitiMixin, JeecgListMixin],
@@ -414,13 +415,13 @@ export default {
         return
       }
       r.operationType = '1' //代办
-      if (r.routeName.indexOf('外部表单') != -1) {
+      if (r.routeName.indexOf('外部表单') != -1||r.tableName.indexOf('外部表单') != -1) {
         //其他项目的表单流程
         var id = r.tableId //项目管理合同数据id
         //打开MyIframe弹框
         this.$refs.MyIframe.editorVisible = true
         //并传入地址参数
-        this.$refs.MyIframe.editorJumpUrlMy = 'http://localhost:4200/#/contract-process-view?id=' + id
+        this.$refs.MyIframe.editorJumpUrlMy = getProjctManageUrl()+'/contract-process-view?id=' + id
       } else if (r.routeName.indexOf('自定义') != -1) {
         //自定义的表单流程
         this.lcModa.disabled = true

+ 24 - 3
src/views/dashboard/Analysis.vue

@@ -1,6 +1,5 @@
 <template>
   <div>
-    
     <index-oa ></index-oa>
     <my-to-do></my-to-do>
     <!-- <index-chart v-if="indexStyle==1"></index-chart>
@@ -14,6 +13,18 @@
         <a-radio :value="3">任务表格</a-radio>
       </a-radio-group>
     </div> -->
+    
+    <!-- /////////////////////--整合项目管理 -->
+     <iframe
+     style="display:none"
+        :src="editorJumpUrlMy"
+        width="100%"
+        height="800"
+        frameborder="0"
+        scrolling="auto"
+        id="iframename"
+        name="iframename"
+      ></iframe>
   </div>
 </template>
 <script>
@@ -22,6 +33,7 @@ import IndexTask from './IndexTask'
 import IndexBdc from './IndexBdc'
 import IndexOa from './IndexOa'
 import MyToDo from './MyToDo'
+import AutomaticLogonIframe from '../../share/modal/automaticLogonIframe'
 
 
 export default {
@@ -31,14 +43,23 @@ export default {
     IndexTask,
     IndexBdc,
     IndexOa,
-    MyToDo
+    MyToDo,
+    AutomaticLogonIframe
   },
   data() {
     return {
-      indexStyle: 1
+      indexStyle: 1,
+      editorJumpUrlMy:''
     }
   },
   created() {
+    /////////////////////--整合项目管理
+    var username = this.$store.getters.userInfo.username //用户名
+    //打开MyIframe弹框
+      // this.$refs.MyIframe.editorVisible=true;
+    //并传入地址参数
+    this.editorJumpUrlMy = 'http://localhost:4200/#/automatic-logon-list?username=' + username
+    
     let flag = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)
       console.log(flag)
   },

+ 637 - 0
src/views/user/AutomaticLogin.vue

@@ -0,0 +1,637 @@
+<template>
+  <div class="main">
+    <a-form :form="form" class="user-layout-login" ref="formLogin" id="formLogin">
+      <h6>欢迎登录</h6>
+      <a-tabs
+        :activeKey="customActiveKey"
+        :tabBarStyle="{ textAlign: 'center', borderBottom: 'unset' }"
+        @change="handleTabClick"
+      >
+        <!-- 账户名 -->
+        <a-tab-pane key="tab1" tab="账号密码登录">
+          <a-form-item>
+            <a-input
+              size="large"
+              v-decorator="['username', validatorRules.username, { validator: this.handleUsernameOrEmail }]"
+              type="text"
+              placeholder="请输入帐户名"
+            >
+              <!--  / admin-->
+              <a-icon slot="prefix" type="user" :style="{ color: 'rgba(0,0,0,.25)' }" />
+            </a-input>
+          </a-form-item>
+
+          <a-form-item>
+            <a-input
+              v-decorator="['password', validatorRules.password]"
+              size="large"
+              type="password"
+              autocomplete="false"
+              placeholder="密码 "
+            >
+              <!-- / 123456 -->
+              <a-icon slot="prefix" type="lock" :style="{ color: 'rgba(0,0,0,.25)' }" />
+            </a-input>
+          </a-form-item>
+
+          <!-- 滑块验证-->
+          <a-row :gutter="0" id="sliderBox">
+            <!--换滑块-->
+            <!--<a-col :span="16">
+              <a-form-item>
+                <a-input
+                  v-decorator="['inputCode',validatorRules.inputCode]"
+                  size="large"
+                  type="text"
+                  @change="inputCodeChange"
+                  placeholder="请输入验证码">
+                  <a-icon slot="prefix" type="smile" :style="{ color: 'rgba(0,0,0,.25)' }"/>
+                </a-input>
+              </a-form-item>
+            </a-col>
+            <a-col :span="8" style="text-align: right">
+              <img v-if="requestCodeSuccess" style="margin-top: 2px;" :src="randCodeImage" @click="handleChangeCheckCode"/>
+              <img v-else style="margin-top: 2px;" src="../../assets/checkcode.png" @click="handleChangeCheckCode"/>
+              &lt;!&ndash;<j-graphic-code @success="generateCode" ref="jgraphicCodeRef" style="float: right" remote></j-graphic-code>&ndash;&gt;
+            </a-col>-->
+
+            <!-- <a-col :span="24">
+              <j-slider @onSuccess="sliderSuccess"></j-slider>
+              <span style="color: red;">{{slideredMsg}}</span>
+            </a-col> -->
+          </a-row>
+        </a-tab-pane>
+
+        <!--todo 暂无短信服务-->
+        <!--<a-tab-pane key="tab2" tab="手机号登陆">
+          <a-form-item>
+            <a-input
+              v-decorator="['mobile',validatorRules.mobile]"
+              size="large"
+              type="text"
+              placeholder="手机号">
+              <a-icon slot="prefix" type="mobile" :style="{ color: 'rgba(0,0,0,.25)' }"/>
+            </a-input>
+          </a-form-item>
+
+          <a-row :gutter="16">
+            <a-col class="gutter-row" :span="16">
+              <a-form-item>
+                <a-input
+                  v-decorator="['captcha',validatorRules.captcha]"
+                  size="large"
+                  type="text"
+                  placeholder="请输入验证码">
+                  <a-icon slot="prefix" type="mail" :style="{ color: 'rgba(0,0,0,.25)' }"/>
+                </a-input>
+              </a-form-item>
+            </a-col>
+            <a-col class="gutter-row" :span="8">
+              <a-button
+                class="getCaptcha"
+                tabindex="-1"
+                :disabled="state.smsSendBtn"
+                @click.stop.prevent="getCaptcha"
+                v-text="!state.smsSendBtn && '获取验证码' || (state.time+' s')"></a-button>
+            </a-col>
+          </a-row>
+        </a-tab-pane>-->
+      </a-tabs>
+
+      <!-- 自动登录 -->
+      <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>
+       <router-link :to="{ name: 'register'}" class="forge-password" style="float: right;margin-right: 10px" >
+          注册账户
+        </router-link> -->
+      </a-form-item>
+
+      <!-- 确定 -->
+      <a-form-item style="margin-top:24px">
+        <a-button
+          size="large"
+          type="primary"
+          htmlType="submit"
+          class="login-button"
+          :loading="loginBtn"
+          @click.stop.prevent="handleSubmit"
+          :disabled="loginBtn"
+        >确定
+        </a-button>
+      </a-form-item>
+
+      <!---------------------------------------------------------------
+        <div class="user-login-other">
+          <span>其他登陆方式</span>
+          <a><a-icon class="item-icon" type="alipay-circle"></a-icon></a>
+          <a><a-icon class="item-icon" type="taobao-circle"></a-icon></a>
+          <a><a-icon class="item-icon" type="weibo-circle"></a-icon></a>
+          <router-link class="register" :to="{ name: 'register' }">
+            注册账户
+          </router-link>
+      </div>
+      ---------------------------------------------------------------->
+    </a-form>
+
+    <two-step-captcha
+      v-if="requiredTwoStepCaptcha"
+      :visible="stepCaptchaVisible"
+      @success="stepCaptchaSuccess"
+      @cancel="stepCaptchaCancel"
+    ></two-step-captcha>
+
+    <a-modal title="登录公司选择" :width="450" :visible="departVisible" :closable="false" :maskClosable="false">
+      <template slot="footer">
+        <a-button type="primary" @click="departOk">确认</a-button>
+      </template>
+
+      <a-form>
+        <!-- <a-form-item
+          :labelCol="{span:4}"
+          :wrapperCol="{span:20}"
+          style="margin-bottom:10px"
+          :validate-status="validate_status">
+          <a-tooltip placement="topLeft" >
+            <template slot="title">
+              <span>您隶属于多部门,请选择登录部门</span>
+            </template>
+            <a-avatar style="backgroundColor:#87d068" icon="gold" />
+          </a-tooltip>
+          <a-select @change="departChange" :class="{'valid-error':validate_status=='error'}" placeholder="请选择登录部门" style="margin-left:10px;width: 80%">
+            <a-icon slot="suffixIcon" type="gold" />
+            <a-select-option
+              v-for="d in departList"
+              :key="d.id"
+              :value="d.orgCode">
+              {{ d.departName }}
+            </a-select-option>
+          </a-select>
+        </a-form-item> -->
+        <a-form-item
+          :labelCol="{ span: 4 }"
+          :wrapperCol="{ span: 20 }"
+          style="margin-bottom:10px"
+          :validate-status="validate_status"
+        >
+          <a-tooltip placement="topLeft">
+            <template slot="title">
+              <span>您隶属于多公司,请选择登录公司</span>
+            </template>
+            <a-avatar style="backgroundColor:#87d068" icon="gold" />
+          </a-tooltip>
+          <a-select
+            @change="departChange"
+            :class="{ 'valid-error': validate_status == 'error' }"
+            placeholder="请选择登录公司"
+            style="margin-left:10px;width: 80%"
+          >
+            <a-icon slot="suffixIcon" type="gold" />
+            <a-select-option v-for="d in orgList" :key="d.id" :value="d.id">
+              {{ d.departName }}
+            </a-select-option>
+          </a-select>
+        </a-form-item>
+      </a-form>
+    </a-modal>
+  </div>
+</template>
+
+<script>
+// import md5 from "md5"
+import api from '@/api'
+import TwoStepCaptcha from '@/components/tools/TwoStepCaptcha'
+import { mapActions } from 'vuex'
+import { timeFix } from '@/utils/util'
+import Vue from 'vue'
+import { ACCESS_TOKEN, ENCRYPTED_STRING, USER_INFO } from '@/store/mutation-types'
+import JGraphicCode from '@/components/jeecg/JGraphicCode'
+import { putAction, postAction, getAction } from '@/api/manage'
+import { encryption, getEncryptedString } from '@/utils/encryption/aesEncrypt'
+import store from '@/store/'
+
+import JSlider from '@/components/jeecg/JSlider'
+
+export default {
+    components: {
+        TwoStepCaptcha,
+        JSlider,
+        JGraphicCode
+    },
+    data () {
+        return {
+            username:"",
+            customActiveKey: 'tab1',
+            loginBtn: false,
+            // login type: 0 email, 1 username, 2 telephone
+            loginType: 0,
+            requiredTwoStepCaptcha: false,
+            stepCaptchaVisible: false,
+            form: this.$form.createForm(this),
+            encryptedString: {
+                key: '',
+                iv: ''
+            },
+            state: {
+                time: 60,
+                smsSendBtn: false
+            },
+            validatorRules: {
+                username: { rules: [{ required: true, message: '请输入用户名!' }, { validator: this.handleUsernameOrEmail }] },
+                password: { rules: [{ required: true, message: '请输入密码!', validator: 'click' }] },
+                mobile: { rules: [{ validator: this.validateMobile }] },
+                captcha: { rule: [{ required: true, message: '请输入验证码!' }] },
+                inputCode: { rules: [{ required: true, message: '请输入验证码!' }] }
+            },
+            verifiedCode: '',
+            inputCodeContent: '',
+            inputCodeNull: true,
+
+            departList: [],
+            departVisible: false,
+            departSelected: '',
+            currentUsername: '',
+            validate_status: '',
+            currdatetime: '',
+            randCodeImage: '',
+            requestCodeSuccess: false,
+            slidered: false,
+            slideredMsg: '',
+            orgList: []
+        }
+    },
+    created () {
+        this.currdatetime = new Date().getTime()
+        Vue.ls.remove(ACCESS_TOKEN)
+        this.getRouterData()
+        this.handleChangeCheckCode()
+        //项目管理整合 自动登录
+        //获取用户名
+        this.username=this.GetQueryString("username",window.location.href)
+        //获取url的参数
+        if(this.username){//根据当前页面的地址获取参数是否为空
+        //根据项目管理的项目id获取项目相关信息
+        this.handleSubmit({username:this.username})
+        }else{
+        this.$message.error("未接收到项目信息");
+        }
+        
+    // update-begin- --- author:scott ------ date:20190805 ---- for:密码加密逻辑暂时注释掉,有点问题
+    // this.getEncrypte();
+    // update-end- --- author:scott ------ date:20190805 ---- for:密码加密逻辑暂时注释掉,有点问题
+    },
+    methods: {
+        GetQueryString(name,url) {
+            return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(url) || [, ""])[1].replace(/\+/g, '%20')) || null
+        },
+        ...mapActions(['automaticLogin','Login', 'Logout', 'PhoneLogin']),
+        // handler
+        handleUsernameOrEmail (rule, value, callback) {
+            const regex = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((\.[a-zA-Z0-9_-]{2,3}){1,2})$/
+            if (regex.test(value)) {
+                this.loginType = 0
+            } else {
+                this.loginType = 1
+            }
+            callback()
+        },
+        handleTabClick (key) {
+            this.customActiveKey = key
+            // this.form.resetFields()
+        },
+        handleSubmit (param) {
+            let that = this
+            that.slidered = true
+            // if (!that.slidered){
+            //   this.slideredMsg = '请拖动滑块!';
+            // }
+            let loginParams = param
+            that.loginBtn = true
+            // 使用账户密码登陆
+            if (that.customActiveKey === 'tab1') {
+                that.form.validateFields(
+                    ['username', 'password', /* 'inputCode', */ 'rememberMe'],
+                    { force: true },
+                    (err, values) => {
+                        if (!err) {
+                            // loginParams.username = values.username
+                            // update-begin- --- author:scott ------ date:20190805 ---- for:密码加密逻辑暂时注释掉,有点问题
+                            // loginParams.password = md5(values.password)
+                            // loginParams.password = encryption(values.password,that.encryptedString.key,that.encryptedString.iv)
+                            // loginParams.password = values.password
+                            loginParams.remember_me = values.rememberMe
+                            // update-begin- --- author:scott ------ date:20190805 ---- for:密码加密逻辑暂时注释掉,有点问题
+                            loginParams.captcha = that.inputCodeContent
+                            loginParams.slidered = that.slidered
+                            loginParams.checkKey = that.currdatetime
+                            console.log('登录参数', loginParams)
+                            that
+                                .automaticLogin(loginParams)
+                                .then(res => {
+                                    this.departConfirm(res)
+                                })
+                                .catch(err => {
+                                    that.requestFailed(err)
+                                })
+                        } else {
+                            that.loginBtn = false
+                        }
+                    }
+                )
+                // 使用手机号登陆
+            } else {
+                that.form.validateFields(['mobile', 'captcha', 'rememberMe'], { force: true }, (err, values) => {
+                    if (!err) {
+                        loginParams.mobile = values.mobile
+                        loginParams.captcha = values.captcha
+                        loginParams.remember_me = values.rememberMe
+                        that
+                            .PhoneLogin(loginParams)
+                            .then(res => {
+                                console.log(res.result)
+                                this.departConfirm(res)
+                            })
+                            .catch(err => {
+                                that.requestFailed(err)
+                            })
+                    }
+                })
+            }
+        },
+        getCaptcha (e) {
+            e.preventDefault()
+            let that = this
+            this.form.validateFields(['mobile'], { force: true }, (err, values) => {
+                if (!values.mobile) {
+                    that.cmsFailed('请输入手机号')
+                } else if (!err) {
+                    this.state.smsSendBtn = true
+                    let interval = window.setInterval(() => {
+                        if (that.state.time-- <= 0) {
+                            that.state.time = 60
+                            that.state.smsSendBtn = false
+                            window.clearInterval(interval)
+                        }
+                    }, 1000)
+
+                    const hide = this.$message.loading('验证码发送中..', 0)
+                    let smsParams = {}
+                    smsParams.mobile = values.mobile
+                    smsParams.smsmode = '0'
+                    postAction('/sys/sms', smsParams)
+                        .then(res => {
+                            if (!res.success) {
+                                setTimeout(hide, 0)
+                                this.cmsFailed(res.message)
+                            }
+                            console.log(res)
+                            setTimeout(hide, 500)
+                        })
+                        .catch(err => {
+                            setTimeout(hide, 1)
+                            clearInterval(interval)
+                            that.state.time = 60
+                            that.state.smsSendBtn = false
+                            this.requestFailed(err)
+                        })
+                }
+            })
+        },
+        stepCaptchaSuccess () {
+            this.loginSuccess()
+        },
+        stepCaptchaCancel () {
+            this.Logout().then(() => {
+                this.loginBtn = false
+                this.stepCaptchaVisible = false
+            })
+        },
+        handleChangeCheckCode () {
+            this.currdatetime = new Date().getTime()
+            getAction(`/sys/randomImage/${this.currdatetime}`)
+                .then(res => {
+                    if (res.success) {
+                        this.randCodeImage = res.result
+                        this.requestCodeSuccess = true
+                    } else {
+                        this.$message.error(res.message)
+                        this.requestCodeSuccess = false
+                    }
+                })
+                .catch(() => {
+                    this.requestCodeSuccess = false
+                })
+        },
+        loginSuccess () {
+            // update-begin- author:sunjianlei --- date:20190812 --- for: 登录成功后不解除禁用按钮,防止多次点击
+            // this.loginBtn = false
+            // update-end- author:sunjianlei --- date:20190812 --- for: 登录成功后不解除禁用按钮,防止多次点击
+            this.$router.push({ name: 'dashboard' })
+            this.$notification.success({
+                message: '欢迎',
+                description: `${timeFix()},欢迎回来`
+            })
+        },
+        cmsFailed (err) {
+            this.$notification['error']({
+                message: '登录失败',
+                description: err,
+                duration: 4
+            })
+        },
+        requestFailed (err) {
+            this.$notification['error']({
+                message: '登录失败',
+                description: ((err.response || {}).data || {}).message || err.message || '请求出现错误,请稍后再试',
+                duration: 4
+            })
+            this.loginBtn = false
+        },
+        validateMobile (rule, value, callback) {
+            if (!value || new RegExp(/^1([38][0-9]|4[579]|5[0-3,5-9]|6[6]|7[0135678]|9[89])\d{8}$/).test(value)) {
+                callback()
+            } else {
+                callback('您的手机号码格式不正确!')
+            }
+        },
+        validateInputCode (rule, value, callback) {
+            if (!value || this.verifiedCode == this.inputCodeContent) {
+                callback()
+            } else {
+                callback('您输入的验证码不正确!')
+            }
+        },
+        generateCode (value) {
+            this.verifiedCode = value.toLowerCase()
+        },
+        inputCodeChange (e) {
+            this.inputCodeContent = e.target.value
+        },
+        departConfirm (res) {
+            if (res.success) {
+                console.log('用户信息', res)
+                let multi_depart = res.result.multi_depart
+                // 0:无部门 1:一个部门 2:多个部门
+                if (multi_depart == 0) {
+                    this.loginSuccess()
+                    this.$notification.warn({
+                        message: '提示',
+                        // description: `您尚未归属部门,请确认账号信息`,
+                        description: `您尚未归属公司,请确认账号信息`,
+                        duration: 3
+                    })
+                } else if (multi_depart == 2) {
+                    this.departVisible = true
+                    this.currentUsername = this.form.getFieldValue('username')
+                    this.departList = res.result.departs
+                    this.orgList = res.result.orgList
+                } else {
+                    console.log('登录')
+                    const userInfo = res.result.userInfo
+                    Vue.ls.set(USER_INFO, userInfo, 7 * 24 * 60 * 60 * 1000)
+                    store.commit('SET_INFO', userInfo)
+                    this.loginSuccess()
+                }
+            } else {
+                this.requestFailed(res)
+                this.Logout()
+            }
+        },
+        departOk () {
+            if (!this.departSelected) {
+                this.validate_status = 'error'
+                return false
+            }
+            let obj = {
+                orgCode: this.departSelected,
+                username: this.form.getFieldValue('username')
+            }
+            putAction('/sys/selectDepart', obj).then(res => {
+                if (res.success) {
+                    const userInfo = res.result.userInfo
+                    Vue.ls.set(USER_INFO, userInfo, 7 * 24 * 60 * 60 * 1000)
+                    store.commit('SET_INFO', userInfo)
+                    // console.log("---切换组织机构---userInfo-------",store.getters.userInfo.orgCode);
+                    this.departClear()
+                    this.loginSuccess()
+                } else {
+                    this.requestFailed(res)
+                    this.Logout().then(() => {
+                        this.departClear()
+                    })
+                }
+            })
+        },
+        departClear () {
+            this.departList = []
+            this.departSelected = ''
+            this.currentUsername = ''
+            this.departVisible = false
+            this.validate_status = ''
+            this.orgList = []
+        },
+        departChange (value) {
+            this.validate_status = 'success'
+            this.departSelected = value
+        },
+        getRouterData () {
+            this.$nextTick(() => {
+                if (this.$route.params.username) {
+                    this.form.setFieldsValue({
+                        username: this.$route.params.username
+                    })
+                }
+            })
+        },
+        // 获取密码加密规则
+        getEncrypte () {
+            var encryptedString = Vue.ls.get(ENCRYPTED_STRING)
+            if (encryptedString == null) {
+                getEncryptedString().then(data => {
+                    this.encryptedString = data
+                })
+            } else {
+                this.encryptedString = encryptedString
+            }
+        } /* 滑块验证 */,
+        sliderSuccess () {
+            this.slidered = true
+            this.slideredMsg = ''
+        }
+    }
+}
+</script>
+
+<style lang="less" scoped>
+#formLogin {
+  // 欢迎登录
+  h6 {
+    text-align: center;
+    font-size: 30px;
+    font-family: 'Microsoft YaHei';
+    color: #00a0e9;
+    font-weight: 700;
+  }
+  .login-button {
+    width: 100%;
+    background: linear-gradient(-90deg, #67eafd 0%, #3ea4fd 100%);
+    border-radius: 8px;
+    border: none;
+    font-size: 22px;
+    font-weight: 700;
+  }
+  #sliderBox {
+    margin-bottom: 20px;
+  }
+  // label {
+  //   font-size: 14px;
+  // }
+
+  // .getCaptcha {
+  //   display: block;
+  //   width: 100%;
+  //   height: 40px;
+  // }
+
+  // .forge-password {
+  //   font-size: 14px;
+  // }
+
+  // button.login-button {
+  //   padding: 0 15px;
+  //   font-size: 16px;
+  //   height: 40px;
+  //   width: 100%;
+  // }
+
+  // .user-login-other {
+  //   text-align: left;
+  //   margin-top: 24px;
+  //   line-height: 22px;
+
+  //   .item-icon {
+  //     font-size: 24px;
+  //     color: rgba(0,0,0,.2);
+  //     margin-left: 16px;
+  //     vertical-align: middle;
+  //     cursor: pointer;
+  //     transition: color .3s;
+
+  //     &:hover {
+  //       color: #1890ff;
+  //     }
+  //   }
+
+  //   .register {
+  //     float: right;
+  //   }
+  // }
+}
+</style>
+<style>
+/* .valid-error .ant-select-selection__placeholder{
+    color: #f5222d;
+  } */
+</style>

+ 11 - 3
url.config.js

@@ -1,5 +1,13 @@
 export function getEditorJumpUrl () {
-    let url = 'http://localhost:8080'
-    // let url ="http://106.15.206.14:8089";//测试服务器
+    // let url = 'http://localhost:8080'
+    let url ="http://106.15.206.14:8089";//测试服务器
+    // let url ="http://192.168.1.158:8089";//森宇服务器
+    // let url ="http://192.168.1.157:8089";//森宇服务器
     return url
-  }
+  }
+
+export function getProjctManageUrl(){
+    // let url="http://localhost:4200/#";
+    let url="http://106.15.206.14:8085/#";
+    return url;
+}

+ 45 - 2
vue.config.js

@@ -86,8 +86,51 @@ module.exports = {
   //       }
   //     }, */
   //     '/jeecg-boot': {
-  //       target: 'http://127.0.0.1:8090', // 请求本地 需要jeecg-boot后台项目
-  //       // target: 'http://106.15.206.14:8087', // 测试环境
+  //       // target: 'http://127.0.0.1:8090', // 请求本地 需要jeecg-boot后台项目
+  //       target: 'http://106.15.206.14:8087', // 测试环境
+  //       // ws: false,
+  //       changeOrigin: true
+  //     }
+  //   }
+  // },
+  // devServer: {
+  //   assetsSubDirectory:'static',
+  //   assetsPublicPath:'./',
+  //   port: 3000,
+  //   proxy: {
+  //     /* '/api': {
+  //       target: 'https://mock.ihx.me/mock/5baf3052f7da7e07e04a5116/antd-pro', //mock API接口系统
+  //       ws: false,
+  //       changeOrigin: true,
+  //       pathRewrite: {
+  //         '/jeecg-boot': ''  //默认所有请求都加了jeecg-boot前缀,需要去掉
+  //       }
+  //     }, */
+  //     '/jeecg-boot': {
+  //       // target: 'http://127.0.0.1:8090', // 请求本地 需要jeecg-boot后台项目
+  //       target: 'http://192.168.1.158:8087', // 测试环境
+  //       // ws: false,
+  //       changeOrigin: true
+  //     }
+  //   }
+  // },
+
+  // devServer: {
+  //   assetsSubDirectory:'static',
+  //   assetsPublicPath:'./',
+  //   port: 3000,
+  //   proxy: {
+  //     /* '/api': {
+  //       target: 'https://mock.ihx.me/mock/5baf3052f7da7e07e04a5116/antd-pro', //mock API接口系统
+  //       ws: false,
+  //       changeOrigin: true,
+  //       pathRewrite: {
+  //         '/jeecg-boot': ''  //默认所有请求都加了jeecg-boot前缀,需要去掉
+  //       }
+  //     }, */
+  //     '/jeecg-boot': {
+  //       // target: 'http://127.0.0.1:8090', // 请求本地 需要jeecg-boot后台项目
+  //       target: 'http://192.168.1.157:8087', // 测试环境
   //       // ws: false,
   //       changeOrigin: true
   //     }