9 Commits 2f8643f6f0 ... 1bc674ed8b

Author SHA1 Message Date
  lilinfeng 1bc674ed8b Merge branch 'test' 2 months ago
  lilinfeng 0fb83617b9 提交 2 months ago
  lilinfeng d8b572c7bb 提交 2 months ago
  lilinfeng 9a14f58739 菜单管理及用户活跃度静态页面 2 months ago
  lilinfeng d91484b8eb 调整 2 months ago
  lilinfeng 46b9cd4c55 调整 2 months ago
  lilinfeng 64590abf17 提交 2 months ago
  lilinfeng 57a7d79ec4 近期修改提交 2 months ago
  lilinfeng c2bc474539 提交 3 months ago
40 changed files with 5973 additions and 247 deletions
  1. 9 4
      .env.production
  2. 2 2
      package.json
  3. 18 0
      src/api/governmentCloud/officialAccount/userActivityLevel/userActivityLevel.js
  4. 38 0
      src/api/governmentCloud/questionnaireInvestigation/questionnaireInvestigation.js
  5. 7 1
      src/components/Generator/index/DraggableItem.vue
  6. 2 0
      src/components/Generator/index/Home.vue
  7. 3 0
      src/components/Generator/index/RightComponents/CGroup.vue
  8. 4 0
      src/components/Generator/index/RightComponents/CMember.vue
  9. 50 4
      src/components/Jnpf/UserSelect/index.vue
  10. 6 0
      src/main.js
  11. 10 4
      src/store/modules/user.js
  12. 12 4
      src/utils/apiUrl.js
  13. 711 0
      src/views/governmentCloud/mdm/mdmuser/Detail.vue
  14. 0 0
      src/views/governmentCloud/mdm/mdmuser/columnList.js
  15. 499 0
      src/views/governmentCloud/mdm/mdmuser/form.vue
  16. 590 0
      src/views/governmentCloud/mdm/mdmuser/index.vue
  17. 0 0
      src/views/governmentCloud/mdm/mdmuser/superQueryJson.js
  18. 306 0
      src/views/governmentCloud/mdm/mdmuserdetail/Detail.vue
  19. 0 0
      src/views/governmentCloud/mdm/mdmuserdetail/columnList.js
  20. 719 0
      src/views/governmentCloud/mdm/mdmuserdetail/form.vue
  21. 672 0
      src/views/governmentCloud/mdm/mdmuserdetail/index.vue
  22. 0 0
      src/views/governmentCloud/mdm/mdmuserdetail/superQueryJson.js
  23. 119 0
      src/views/governmentCloud/officialAccount/menuManagement/index.vue
  24. 104 0
      src/views/governmentCloud/officialAccount/mpActivityApi/Detail.vue
  25. 0 0
      src/views/governmentCloud/officialAccount/mpActivityApi/columnList.js
  26. 413 0
      src/views/governmentCloud/officialAccount/mpActivityApi/form.vue
  27. 509 0
      src/views/governmentCloud/officialAccount/mpActivityApi/index.vue
  28. 0 0
      src/views/governmentCloud/officialAccount/mpActivityApi/superQueryJson.js
  29. 241 0
      src/views/governmentCloud/officialAccount/userActivityLevel/index.vue
  30. 1 1
      src/views/governmentCloud/processConfiguration/Allocation.vue
  31. 6 7
      src/views/governmentCloud/processConfiguration/Form.vue
  32. 28 3
      src/views/governmentCloud/processConfiguration/index.vue
  33. 108 52
      src/views/governmentCloud/questionnaireInvestigation/IssuedForm.vue
  34. 247 43
      src/views/governmentCloud/questionnaireInvestigation/Statistics.vue
  35. 103 21
      src/views/governmentCloud/questionnaireInvestigation/index.vue
  36. 172 0
      src/views/governmentCloud/questionnaireInvestigation/titleDetails.vue
  37. 3 1
      src/views/login/index.vue
  38. 158 98
      src/views/permission/user/ResetPassword.vue
  39. 82 0
      src/views/permission/user/TagForm.vue
  40. 21 2
      src/views/permission/user/index.vue

+ 9 - 4
.env.production

@@ -2,11 +2,16 @@
 ENV = 'production'
 
 
-# 测试
-# VUE_APP_BASE_API = 'http://192.168.103.104:58080' 
+ #测试地址
+# VUE_APP_BASE_API = 'http://192.168.103.104:58080'
+VUE_APP_BASE_API = 'https://test.api.shidaiyun.net:8888'
 
 
-# 正式
-VUE_APP_BASE_API =  "https://api.shidaiyun.net"  
 
 
+#双活地址
+# VUE_APP_BASE_API = 'http://28.168.123.222:58080' 
+
+
+#正式地址
+# VUE_APP_BASE_API =  "https://api.shidaiyun.net" 

+ 2 - 2
package.json

@@ -47,7 +47,7 @@
     "dayjs": "^1.8.29",
     "driver.js": "0.9.5",
     "dropzone": "5.5.1",
-    "echarts": "^5.4.0",
+    "echarts": "^5.5.1",
     "echarts-stat": "^1.1.1",
     "element-resize-detector": "^1.2.1",
     "element-ui": "2.15.5",
@@ -133,4 +133,4 @@
     "> 1%",
     "last 2 versions"
   ]
-}
+}

+ 18 - 0
src/api/governmentCloud/officialAccount/userActivityLevel/userActivityLevel.js

@@ -0,0 +1,18 @@
+import request from "@/utils/request";
+
+// 获取活跃度图表信息
+export const activity = (data) => {
+  return request({
+    url: `/api/jnpf/MpActivityApi/activity`,
+    method: "POST",
+    data: data
+  });
+};
+
+// 获取公众号用户列表
+export const getUserList = () => {
+  return request({
+    url: `/api/jnpf/MpActivityApi/userList`,
+    method: "GET",
+  });
+};

+ 38 - 0
src/api/governmentCloud/questionnaireInvestigation/questionnaireInvestigation.js

@@ -18,6 +18,15 @@ export const addBaseQUestionnaire = data => {
   });
 };
 
+// 删除问卷
+export const deleteQuestionnaire = data => {
+  return request({
+    url: `/api/BaseQuestionnaire/BaseQuestionnaire/delete`,
+    method: "POST",
+    data
+  });
+};
+
 
 // 下发问卷
 export const IssuedQuestionnaire = data => {
@@ -37,3 +46,32 @@ export const getQuestionnaireDetail = id => {
   });
 };
 
+
+// 获取之前下发过的人员
+export const getQuestionnaireUser = id => {
+  return request({
+    url: `/api/BaseQuestionnaire/BaseQuestionnaire/user?id=${id}`,
+    method: "GET",
+    data: null
+  });
+};
+
+
+// 获取问卷统计
+export const getQuestionnaireStats = (data) => {
+  return request({
+    url: `/api/BaseQuestionnaire/BaseQuestionnaire/stats`,
+    method: "POST",
+    data: data
+  });
+};
+
+// 查询统计详情
+export const getStatsDetail = (data) => {
+  return request({
+    url: `/api/BaseQuestionnaire/BaseQuestionnaire/stats/detail`,
+    method: "POST",
+    data: data
+  });
+};
+

+ 7 - 1
src/components/Generator/index/DraggableItem.vue

@@ -97,8 +97,14 @@ const layouts = {
                 style={element.style} clearable={element.clearable} filterable={element.filterable} key={config.renderKey}></JnpfCascader>
             : <render key={config.renderKey} conf={element} onInput={event => { this.$set(config, 'defaultValue', event) }} />
 
+
+        // 不展示不提交的自定义组件
         if (!element.__config__.isDisplay && element.__config__.jnpfKey.includes('custom')) {
-            return
+            return (
+                <el-col span={config.span} class={className}
+                    nativeOnClick={event => { activeItem(element); event.stopPropagation() }}>
+                </el-col>
+            )
         }
 
         return (

+ 2 - 0
src/components/Generator/index/Home.vue

@@ -743,6 +743,8 @@ export default {
             console.log('tableEnd')
 
             console.log(obj)
+
+            console.log(this.activeItem)
             if (obj.from == obj.to) return
             if (obj.to.className.indexOf('table-wrapper') < 0) {
                 this.$set(this.activeItem.__config__, 'isSubTable', false)

+ 3 - 0
src/components/Generator/index/RightComponents/CGroup.vue

@@ -73,6 +73,9 @@
             <jnpf-select v-model="activeData.__config__.defaultValue" placeholder="请选择默认值"
                 :options="activeData.options" :props="activeData.props" clearable />
         </el-form-item>
+        <el-form-item label="是否多选">
+            <el-switch v-model="activeData.multiple"></el-switch>
+        </el-form-item>
         <el-divider />
         <div>
             <el-dialog :visible.sync="dicVisible" append-to-body

+ 4 - 0
src/components/Generator/index/RightComponents/CMember.vue

@@ -119,6 +119,10 @@
                     </el-option>
                 </el-select>
             </el-form-item>
+
+            <el-form-item label="是否多选">
+                <el-switch v-model="activeData.multiple"></el-switch>
+            </el-form-item>
             <el-divider />
         </template>
 

+ 50 - 4
src/components/Jnpf/UserSelect/index.vue

@@ -262,7 +262,17 @@ export default {
             type: Array,
             default: () => []
         },
+        filterIds: {
+            type: Array,
+            default: () => []
+        },
         size: String,
+        filterType: {
+            type: String,
+            default: '1'
+            //1 不查看filterIds中的用户
+            //2 仅查看filterIds中的用户
+        }
     },
     data() {
         return {
@@ -556,15 +566,34 @@ export default {
         },
         getAllList() {
             this.loading = true
+
+            if (this.filterIds) {
+                this.pagination.pageSize = 100
+            }
+
             if (this.pagination.keyword) this.nodeId = '0'
             getImUserSelector(this.nodeId, this.pagination).then(res => {
+                this.pagination.pageSize = 20
+                let newData = []
+                //根据filterIds过滤掉res.data.list中id在filterIds中存在的数据
+                if (this.filterIds && this.filterIds.length) {
+                    if (this.filterType == '1') {
+                        newData = res.data.list.filter(item => !this.filterIds.includes(item.id))
+                    } else if (this.filterType == '2') {
+                        newData = res.data.list.filter(item => (this.filterIds.includes(item.id) || item.hasChildren))
+                    }
+
+                } else {
+                    newData = res.data.list
+                }
+
                 if (this.pagination.keyword) {
-                    if (res.data.list.length < this.pagination.pageSize) {
+                    if (newData.length < this.pagination.pageSize) {
                         this.finish = true
                     }
-                    this.treeData = [...this.treeData, ...res.data.list]
+                    this.treeData = [...this.treeData, ...newData]
                 } else {
-                    this.treeData = res.data.list
+                    this.treeData = newData
                 }
                 this.loading = false
                 if (!this.pagination.keyword && this.treeData.length && this.nodeId == '0') {
@@ -579,8 +608,25 @@ export default {
                 return resolve(this.treeData)
             }
             this.nodeId = node.data.id
+
+
+            console.log('filterIds')
+            console.log(this.filterIds)
+
             getImUserSelector(this.nodeId).then(res => {
-                resolve(res.data.list)
+
+                let newData = []
+                //根据filterIds过滤掉res.data.list中id在filterIds中存在的数据
+                if (this.filterIds && this.filterIds.length) {
+                    if (this.filterType == '1') {
+                        newData = res.data.list.filter(item => !this.filterIds.includes(item.id))
+                    } else if (this.filterType == '2') {
+                        newData = res.data.list.filter(item => (this.filterIds.includes(item.id) || item.hasChildren))
+                    }
+                } else {
+                    newData = res.data.list
+                }
+                resolve(newData)
             })
         },
         handleNodeClick(data) {

+ 6 - 0
src/main.js

@@ -22,6 +22,12 @@ import { message } from './utils/message';
 
 import * as filters from './filters' // global filters
 
+
+//引入echarts
+import * as echarts from 'echarts'
+Vue.prototype.$echarts = echarts
+
+
 // 自定义按钮权限指令
 import permission from "@/directive/permission";
 Vue.use(permission)

+ 10 - 4
src/store/modules/user.js

@@ -113,10 +113,16 @@ const actions = {
         timestamp,
         grant_type: 'password'
       })).then(response => {
-        const { data } = response
-        dispatch('setToken', data).then(() => {
-          resolve(data)
-        })
+
+        if (response.code == 200) {
+          const { data } = response
+          dispatch('setToken', data).then(() => {
+            resolve(data)
+          })
+        } else {
+          reject(response)
+        }
+
       }).catch(error => {
         reject(error)
       })

+ 12 - 4
src/utils/apiUrl.js

@@ -1,13 +1,21 @@
 module.exports = {
   // 开发环境接口配置
-  // APIURl: "http://localhost:30000"
+  // APIURl: "http://10.0.0.112:30000",
   // APIURl: "http://10.21.12.137:30000",
   // APIURl: "http://192.168.103.104:58080",
   APIURl: "https://test.api.shidaiyun.net",
   // APIURl: "https://api.shidaiyun.net",
-  minioPath: process.env.NODE_ENV === 'development' ? 'https://oss.shidaiyun.net/' : 'http://192.168.103.105:18000/'
-  // minioPath: 'https://oss.shidaiyun.net/'
-};
+  // APIURl: "http://10.21.12.250:30000",
+
+
 
 
+  //测试
+  // minioPath: process.env.NODE_ENV === 'development' ? 'https://oss.shidaiyun.net/' : 'http://192.168.103.105:18000/'
 
+  //双活  
+  minioPath: process.env.NODE_ENV === 'development' ? 'https://oss.shidaiyun.net/' : 'http://28.168.105.206:9000/'
+
+  //正式
+  // minioPath: 'https://oss.shidaiyun.net/'
+};

+ 711 - 0
src/views/governmentCloud/mdm/mdmuser/Detail.vue

@@ -0,0 +1,711 @@
+<template>
+    <transition name="el-zoom-in-center">
+        <div class="JNPF-common-layout">
+            <div class="JNPF-common-layout-center">
+                <div class="JNPF-preview-main flow-form-main">
+                    <!-- <div class="JNPF-common-page-header">
+                        <el-page-header @back="goBack" :content="title" />
+                  
+                    </div> -->
+                    <el-row class="JNPF-common-search-box" :gutter="16">
+                        <el-form @submit.native.prevent>
+                            <el-col :span="6">
+                                <el-form-item label="姓名">
+                                    <el-input v-model="query.name" placeholder="请输入" clearable>
+                                    </el-input>
+                                </el-form-item>
+                            </el-col>
+                            <el-col :span="6">
+                                <el-form-item label="联系电话">
+                                    <el-input v-model="query.mobile" placeholder="请输入" clearable>
+                                    </el-input>
+                                </el-form-item>
+                            </el-col>
+                            <template v-if="showAll">
+                                <el-col :span="6">
+                                    <el-form-item label="人员编码">
+                                        <el-input v-model="query.code" placeholder="请输入" clearable>
+                                        </el-input>
+                                    </el-form-item>
+                                </el-col>
+                                <el-col :span="6">
+                                    <el-form-item label="响应状态">
+                                        <JnpfSelect v-model="query.resStatus" placeholder="请选择"
+                                            clearable :options="resStatusOptions"
+                                            :props="resStatusProps" multiple>
+                                        </JnpfSelect>
+                                    </el-form-item>
+                                </el-col>
+                                <el-col :span="6">
+                                    <el-form-item label="响应数据版本">
+                                        <el-input v-model="query.resVersion" placeholder="请输入"
+                                            clearable>
+                                        </el-input>
+                                    </el-form-item>
+                                </el-col>
+                            </template>
+                            <el-col :span="6">
+                                <el-form-item>
+                                    <el-button type="primary" icon="el-icon-search"
+                                        @click="search()">查询</el-button>
+                                    <el-button icon="el-icon-refresh-right"
+                                        @click="reset()">重置</el-button>
+                                    <el-button type="text" icon="el-icon-arrow-down"
+                                        @click="showAll=true" v-if="!showAll">
+                                        展开
+                                    </el-button>
+                                    <el-button type="text" icon="el-icon-arrow-up"
+                                        @click="showAll=false" v-else>
+                                        收起
+                                    </el-button>
+                                </el-form-item>
+                            </el-col>
+                        </el-form>
+                        <div class="options">
+                            <el-button @click="goBack()">{{$t('common.cancelButton')}}</el-button>
+                        </div>
+                    </el-row>
+                    <div class="JNPF-common-layout-main JNPF-flex-main">
+                        <div class="JNPF-common-head">
+                            <div>
+                            </div>
+                            <div class="JNPF-common-head-right">
+                                <!-- <el-tooltip content="高级查询" placement="top" v-if="true">
+                                <el-link icon="icon-ym icon-ym-filter JNPF-common-head-icon"
+                                    :underline="false" @click="openSuperQuery()" />
+                            </el-tooltip> -->
+                                <el-tooltip effect="dark" :content="$t('common.refresh')"
+                                    placement="top">
+                                    <el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon"
+                                        :underline="false" @click="initData()" />
+                                </el-tooltip>
+                            </div>
+                        </div>
+                        <JNPF-table v-loading="listLoading" :data="list"
+                            @sort-change='handleTableSort'
+                            :header-cell-class-name="handleHeaderClass" :has-c="hasBatchBtn"
+                            :span-method="arraySpanMethod">
+                            <el-table-column prop="batchId" label="批次ID" align="left"
+                                show-overflow-tooltip>
+                                <template slot-scope="scope">
+                                    <JnpfInput v-model="scope.row.batchId" detailed showOverflow />
+                                </template>
+                            </el-table-column>
+                            <el-table-column prop="code" label="人员编码" align="left"
+                                show-overflow-tooltip>
+                                <template slot-scope="scope">
+                                    <JnpfInput v-model="scope.row.code" detailed showOverflow />
+                                </template>
+                            </el-table-column>
+                            <el-table-column prop="name" label="姓名" align="left"
+                                show-overflow-tooltip>
+                                <template slot-scope="scope">
+                                    <JnpfInput v-model="scope.row.name" detailed showOverflow />
+                                </template>
+                            </el-table-column>
+                            <el-table-column prop="namePinyin" label="账户" align="left"
+                                show-overflow-tooltip>
+                                <template slot-scope="scope">
+                                    <JnpfInput v-model="scope.row.namePinyin" detailed
+                                        showOverflow />
+                                </template>
+                            </el-table-column>
+                            <el-table-column prop="personnelType" label="人员类型" align="left"
+                                show-overflow-tooltip>
+                            </el-table-column>
+                            <el-table-column prop="gender" label="性别" align="left"
+                                show-overflow-tooltip>
+                            </el-table-column>
+                            <el-table-column prop="mobile" label="联系电话" align="left"
+                                show-overflow-tooltip>
+                                <template slot-scope="scope">
+                                    <JnpfInput v-model="scope.row.mobile" detailed showOverflow />
+                                </template>
+                            </el-table-column>
+                            <el-table-column prop="email" label="邮箱" align="left"
+                                show-overflow-tooltip>
+                                <template slot-scope="scope">
+                                    <JnpfInput v-model="scope.row.email" detailed showOverflow />
+                                </template>
+                            </el-table-column>
+                            <el-table-column prop="jobStatus" label="岗位状态" align="left"
+                                show-overflow-tooltip>
+                            </el-table-column>
+                            <el-table-column prop="personStatus" label="人员状态" align="left"
+                                show-overflow-tooltip>
+                            </el-table-column>
+                            <el-table-column prop="unionid" label="微信unionid" align="left"
+                                width="100" show-overflow-tooltip>
+                                <template slot-scope="scope">
+                                    <JnpfInput v-model="scope.row.unionid" detailed showOverflow />
+                                </template>
+                            </el-table-column>
+                            <el-table-column prop="organizationCode" label="所属组织编码" align="left"
+                                width="100" show-overflow-tooltip>
+                                <template slot-scope="scope">
+                                    <JnpfInput v-model="scope.row.organizationCode" detailed
+                                        showOverflow />
+                                </template>
+                            </el-table-column>
+                            <el-table-column prop="organizationName" label="所属组织名称" align="left"
+                                width="100" show-overflow-tooltip>
+                                <template slot-scope="scope">
+                                    <JnpfInput v-model="scope.row.organizationName" detailed
+                                        showOverflow />
+                                </template>
+                            </el-table-column>
+                            <el-table-column prop="departmentCode" label="部门编码" align="left"
+                                show-overflow-tooltip>
+                                <template slot-scope="scope">
+                                    <JnpfInput v-model="scope.row.departmentCode" detailed
+                                        showOverflow />
+                                </template>
+                            </el-table-column>
+                            <el-table-column prop="departmentName" label="部门名称" align="left"
+                                show-overflow-tooltip>
+                                <template slot-scope="scope">
+                                    <JnpfInput v-model="scope.row.departmentName" detailed
+                                        showOverflow />
+                                </template>
+                            </el-table-column>
+                            <el-table-column prop="itsmUserId" label="Itsm用户id" align="left"
+                                show-overflow-tooltip>
+                                <template slot-scope="scope">
+                                    <JnpfInput v-model="scope.row.itsmUserId" detailed
+                                        showOverflow />
+                                </template>
+                            </el-table-column>
+                            <el-table-column prop="itsmUserName" label="itsm用户姓名" align="left"
+                                width="100" show-overflow-tooltip>
+                                <template slot-scope="scope">
+                                    <JnpfInput v-model="scope.row.itsmUserName" detailed
+                                        showOverflow />
+                                </template>
+                            </el-table-column>
+                            <el-table-column prop="itsmUserAlias" label="itsm用户别名" align="left"
+                                width="100" show-overflow-tooltip>
+                                <template slot-scope="scope">
+                                    <JnpfInput v-model="scope.row.itsmUserAlias" detailed
+                                        showOverflow />
+                                </template>
+                            </el-table-column>
+                            <el-table-column prop="enterpriseWechat" label="企微账号" align="left"
+                                show-overflow-tooltip>
+                                <template slot-scope="scope">
+                                    <JnpfInput v-model="scope.row.enterpriseWechat" detailed
+                                        showOverflow />
+                                </template>
+                            </el-table-column>
+                            <el-table-column prop="resCode" label="响应数据编码" align="left" width="100"
+                                show-overflow-tooltip>
+                                <template slot-scope="scope">
+                                    <JnpfInput v-model="scope.row.resCode" detailed showOverflow />
+                                </template>
+                            </el-table-column>
+                            <el-table-column prop="resStatus" label="响应状态" align="left"
+                                show-overflow-tooltip>
+                            </el-table-column>
+                            <el-table-column prop="resMessage" label="响应数据描述" align="left"
+                                width="100" show-overflow-tooltip>
+                                <template slot-scope="scope">
+                                    <JnpfInput v-model="scope.row.resMessage" detailed
+                                        showOverflow />
+                                </template>
+                            </el-table-column>
+                            <el-table-column prop="resVersion" label="响应数据版本" align="left"
+                                width="100" show-overflow-tooltip>
+                                <template slot-scope="scope">
+                                    <JnpfInput v-model="scope.row.resVersion" detailed
+                                        showOverflow />
+                                </template>
+                            </el-table-column>
+                        </JNPF-table>
+                        <pagination :total="total" :page.sync="listQuery.currentPage"
+                            :limit.sync="listQuery.pageSize" @pagination="initData" />
+                    </div>
+                </div>
+            </div>
+            <JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" />
+            <ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" />
+
+            <ImportBox v-if="uploadBoxVisible" ref="UploadBox" @refresh="initData" />
+            <ToFormDetail v-if="toFormDetailVisible" ref="toFormDetail"
+                @close="toFormDetailVisible = false" />
+            <SuperQuery v-if="superQueryVisible" ref="SuperQuery" :columnOptions="superQueryJson"
+                @superQuery="superQuery" />
+        </div>
+    </transition>
+</template>
+<script>
+import request from '@/utils/request'
+import { mapGetters } from "vuex";
+import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
+import JNPFForm from '../mdmuserdetail/form'
+import ExportBox from '@/components/ExportBox'
+import ToFormDetail from '@/views/basic/dynamicModel/list/detail'
+import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
+import { getConfigData } from '@/api/onlineDev/visualDev'
+import { getDefaultCurrentValueUserIdAsync } from '@/api/permission/user'
+import { getDefaultCurrentValueDepartmentIdAsync } from '@/api/permission/organize'
+import columnList from './columnList'
+import { thousandsFormat } from "@/components/Generator/utils/index"
+import SuperQuery from '@/components/SuperQuery'
+import superQueryJson from './superQueryJson'
+import { noGroupList } from '@/components/Generator/generator/comConfig'
+
+export default {
+    components: {
+        JNPFForm,
+        ExportBox, ToFormDetail, SuperQuery
+    },
+    data() {
+        return {
+            visible: false,
+            keyword: '',
+            expandsTree: true,
+            refreshTree: true,
+            toFormDetailVisible: false,
+            hasBatchBtn: false,
+            expandObj: {},
+            columnOptions: [],
+            mergeList: [],
+            exportList: [],
+            columnList,
+
+            showAll: false,
+            superQueryVisible: false,
+            superQueryJson,
+            uploadBoxVisible: false,
+            query: {
+                batchId: undefined,
+                name: undefined,
+                mobile: undefined,
+                code: undefined,
+                resStatus: undefined,
+                resVersion: undefined,
+            },
+            defListQuery: {
+                sort: 'desc',
+                sidx: '',
+            },
+            //排序默认值
+            defaultSortConfig: [],
+            treeProps: {
+                children: 'children',
+                label: 'fullName',
+                value: 'id',
+                isLeaf: 'isLeaf'
+            },
+            list: [],
+            listLoading: true,
+            multipleSelection: [],
+            total: 0,
+            queryData: {},
+            listQuery: {
+                superQueryJson: '',
+                currentPage: 1,
+                pageSize: 20,
+                sort: "",
+                sidx: "",
+            },
+            //多列排序
+            ordersList: [],
+            formVisible: false,
+            flowVisible: false,
+            flowListVisible: false,
+            flowList: [],
+            exportBoxVisible: false,
+            personnelTypeOptions: [],
+            personnelTypeProps: { "label": "fullName", "value": "enCode" },
+            genderOptions: [],
+            genderProps: { "label": "fullName", "value": "enCode" },
+            jobStatusOptions: [],
+            jobStatusProps: { "label": "fullName", "value": "enCode" },
+            personStatusOptions: [],
+            personStatusProps: { "label": "fullName", "value": "enCode" },
+            resStatusOptions: [],
+            resStatusProps: { "label": "fullName", "value": "enCode" },
+            interfaceRes: {
+            },
+            //掩码配置
+            maskConfig: {
+                batchId: { "prefixType": 1, "useUnrealMask": false, "maskType": 1, "unrealMaskLength": 1, "prefixLimit": 0, "suffixLimit": 0, "filler": "*", "prefixSpecifyChar": "", "suffixType": 1, "ignoreChar": "", "suffixSpecifyChar": "" },
+                code: { "prefixType": 1, "useUnrealMask": false, "maskType": 1, "unrealMaskLength": 1, "prefixLimit": 0, "suffixLimit": 0, "filler": "*", "prefixSpecifyChar": "", "suffixType": 1, "ignoreChar": "", "suffixSpecifyChar": "" },
+                name: { "prefixType": 1, "useUnrealMask": false, "maskType": 1, "unrealMaskLength": 1, "prefixLimit": 0, "suffixLimit": 0, "filler": "*", "prefixSpecifyChar": "", "suffixType": 1, "ignoreChar": "", "suffixSpecifyChar": "" },
+                namePinyin: { "prefixType": 1, "useUnrealMask": false, "maskType": 1, "unrealMaskLength": 1, "prefixLimit": 0, "suffixLimit": 0, "filler": "*", "prefixSpecifyChar": "", "suffixType": 1, "ignoreChar": "", "suffixSpecifyChar": "" },
+                mobile: { "prefixType": 1, "useUnrealMask": false, "maskType": 1, "unrealMaskLength": 1, "prefixLimit": 0, "suffixLimit": 0, "filler": "*", "prefixSpecifyChar": "", "suffixType": 1, "ignoreChar": "", "suffixSpecifyChar": "" },
+                email: { "prefixType": 1, "useUnrealMask": false, "maskType": 1, "unrealMaskLength": 1, "prefixLimit": 0, "suffixLimit": 0, "filler": "*", "prefixSpecifyChar": "", "suffixType": 1, "ignoreChar": "", "suffixSpecifyChar": "" },
+                unionid: { "prefixType": 1, "useUnrealMask": false, "maskType": 1, "unrealMaskLength": 1, "prefixLimit": 0, "suffixLimit": 0, "filler": "*", "prefixSpecifyChar": "", "suffixType": 1, "ignoreChar": "", "suffixSpecifyChar": "" },
+                organizationCode: { "prefixType": 1, "useUnrealMask": false, "maskType": 1, "unrealMaskLength": 1, "prefixLimit": 0, "suffixLimit": 0, "filler": "*", "prefixSpecifyChar": "", "suffixType": 1, "ignoreChar": "", "suffixSpecifyChar": "" },
+                organizationName: { "prefixType": 1, "useUnrealMask": false, "maskType": 1, "unrealMaskLength": 1, "prefixLimit": 0, "suffixLimit": 0, "filler": "*", "prefixSpecifyChar": "", "suffixType": 1, "ignoreChar": "", "suffixSpecifyChar": "" },
+                departmentCode: { "prefixType": 1, "useUnrealMask": false, "maskType": 1, "unrealMaskLength": 1, "prefixLimit": 0, "suffixLimit": 0, "filler": "*", "prefixSpecifyChar": "", "suffixType": 1, "ignoreChar": "", "suffixSpecifyChar": "" },
+                departmentName: { "prefixType": 1, "useUnrealMask": false, "maskType": 1, "unrealMaskLength": 1, "prefixLimit": 0, "suffixLimit": 0, "filler": "*", "prefixSpecifyChar": "", "suffixType": 1, "ignoreChar": "", "suffixSpecifyChar": "" },
+                itsmUserId: { "prefixType": 1, "useUnrealMask": false, "maskType": 1, "unrealMaskLength": 1, "prefixLimit": 0, "suffixLimit": 0, "filler": "*", "prefixSpecifyChar": "", "suffixType": 1, "ignoreChar": "", "suffixSpecifyChar": "" },
+                itsmUserName: { "prefixType": 1, "useUnrealMask": false, "maskType": 1, "unrealMaskLength": 1, "prefixLimit": 0, "suffixLimit": 0, "filler": "*", "prefixSpecifyChar": "", "suffixType": 1, "ignoreChar": "", "suffixSpecifyChar": "" },
+                itsmUserAlias: { "prefixType": 1, "useUnrealMask": false, "maskType": 1, "unrealMaskLength": 1, "prefixLimit": 0, "suffixLimit": 0, "filler": "*", "prefixSpecifyChar": "", "suffixType": 1, "ignoreChar": "", "suffixSpecifyChar": "" },
+                enterpriseWechat: { "prefixType": 1, "useUnrealMask": false, "maskType": 1, "unrealMaskLength": 1, "prefixLimit": 0, "suffixLimit": 0, "filler": "*", "prefixSpecifyChar": "", "suffixType": 1, "ignoreChar": "", "suffixSpecifyChar": "" },
+                resCode: { "prefixType": 1, "useUnrealMask": false, "maskType": 1, "unrealMaskLength": 1, "prefixLimit": 0, "suffixLimit": 0, "filler": "*", "prefixSpecifyChar": "", "suffixType": 1, "ignoreChar": "", "suffixSpecifyChar": "" },
+                resMessage: { "prefixType": 1, "useUnrealMask": false, "maskType": 1, "unrealMaskLength": 1, "prefixLimit": 0, "suffixLimit": 0, "filler": "*", "prefixSpecifyChar": "", "suffixType": 1, "ignoreChar": "", "suffixSpecifyChar": "" },
+                resVersion: { "prefixType": 1, "useUnrealMask": false, "maskType": 1, "unrealMaskLength": 1, "prefixLimit": 0, "suffixLimit": 0, "filler": "*", "prefixSpecifyChar": "", "suffixType": 1, "ignoreChar": "", "suffixSpecifyChar": "" },
+            },
+        }
+    },
+    computed: {
+        ...mapGetters(['userInfo']),
+        menuId() {
+            return this.$route.meta.modelId || ''
+        }
+    },
+    created() {
+        this.getColumnList(),
+            this.initSearchDataAndListData()
+        this.getresStatusOptions();
+        this.queryData = JSON.parse(JSON.stringify(this.query))
+        this.getHasBatchBtn();
+        //排序默认值
+        this.setDefaultQuery(this.defaultSortConfig);
+    },
+    methods: {
+        getHasBatchBtn() {
+            let btnsList = []
+            this.hasBatchBtn = btnsList.some(o => ['batchRemove', 'batchPrint', 'download'].includes(o))
+        },
+        goBack() {
+            this.$emit('refresh')
+        },
+        treeRefresh() {
+            this.keyword = ''
+            this.treeActiveId = ''
+            this.leftTreeActiveInfo = {}
+            this.$refs.treeBox.setCurrentKey(null)
+            this.getTreeView()
+        },
+
+        toDetail(defaultValue, modelId) {
+            if (!defaultValue) return
+            getConfigData(modelId).then(res => {
+                if (!res.data || !res.data.formData) return
+                let formData = JSON.parse(res.data.formData)
+                formData.popupType = 'general'
+                this.toFormDetailVisible = true
+                this.$nextTick(() => {
+                    this.$refs.toFormDetail.init(formData, modelId, defaultValue)
+                })
+            })
+        },
+        toggleTreeExpand(expands) {
+            this.refreshTree = false
+            this.expandsTree = expands
+            this.$nextTick(() => {
+                this.refreshTree = true
+                this.$nextTick(() => {
+                    this.$refs.treeBox.setCurrentKey(null)
+                })
+            })
+        },
+        filterNode(value, data) {
+            if (!value) return true;
+            return data[this.treeProps.label].indexOf(value) !== -1;
+        },
+        loadNode(node, resolve) {
+            const nodeData = node.data
+            const config = {
+                treeInterfaceId: "",
+                treeTemplateJson: []
+            }
+            if (config.treeInterfaceId) {
+                //这里是为了拿到参数中关联的字段的值,后端自行拿
+                if (config.treeTemplateJson && config.treeTemplateJson.length) {
+                    for (let i = 0; i < config.treeTemplateJson.length; i++) {
+                        const element = config.treeTemplateJson[i];
+                        element.defaultValue = nodeData[element.relationField] || ''
+                    }
+                }
+                //参数
+                let query = {
+                    paramList: config.treeTemplateJson || [],
+                }
+                //接口
+                getDataInterfaceRes(config.treeInterfaceId, query).then(res => {
+                    let data = res.data
+                    if (Array.isArray(data)) {
+                        resolve(data);
+                    } else {
+                        resolve([]);
+                    }
+                })
+            }
+        },
+        getColumnList() {
+            // 没有开启权限
+            this.columnOptions = this.transformColumnList(this.columnList)
+        },
+        transformColumnList(columnList) {
+            let list = []
+            for (let i = 0; i < columnList.length; i++) {
+                const e = columnList[i];
+                if (!e.prop.includes('-')) {
+                    list.push(e)
+                } else {
+                    let prop = e.prop.split('-')[0]
+                    let label = e.label.split('-')[0]
+                    let vModel = e.prop.split('-')[1]
+                    let newItem = {
+                        align: "center",
+                        jnpfKey: "table",
+                        prop,
+                        label,
+                        children: []
+                    }
+                    e.vModel = vModel
+                    if (!this.expandObj.hasOwnProperty(`${prop}Expand`)) this.$set(this.expandObj, `${prop}Expand`, false)
+                    if (!list.some(o => o.prop === prop)) list.push(newItem)
+                    for (let i = 0; i < list.length; i++) {
+                        if (list[i].prop === prop) {
+                            list[i].children.push(e)
+                            break
+                        }
+                    }
+                }
+            }
+            this.getMergeList(list)
+            this.getExportList(list)
+            return list
+        },
+        arraySpanMethod({ column }) {
+            for (let i = 0; i < this.mergeList.length; i++) {
+                if (column.property == this.mergeList[i].prop) {
+                    return [this.mergeList[i].rowspan, this.mergeList[i].colspan]
+                }
+            }
+        },
+        getMergeList(list) {
+            let newList = JSON.parse(JSON.stringify(list))
+            newList.forEach(item => {
+                if (item.children && item.children.length) {
+                    let child = {
+                        prop: item.prop + '-child-first'
+                    }
+                    item.children.unshift(child)
+                }
+            })
+            newList.forEach(item => {
+                if (item.children && item.children.length) {
+                    item.children.forEach((child, index) => {
+                        if (index == 0) {
+                            this.mergeList.push({
+                                prop: child.prop,
+                                rowspan: 1,
+                                colspan: item.children.length
+                            })
+                        } else {
+                            this.mergeList.push({
+                                prop: child.prop,
+                                rowspan: 0,
+                                colspan: 0
+                            })
+                        }
+                    })
+                } else {
+                    this.mergeList.push({
+                        prop: item.prop,
+                        rowspan: 1,
+                        colspan: 1
+                    })
+                }
+            })
+        },
+        getExportList(list) {
+            let exportList = []
+            for (let i = 0; i < list.length; i++) {
+                if (list[i].jnpfKey === 'table') {
+                    for (let j = 0; j < list[i].children.length; j++) {
+                        exportList.push(list[i].children[j])
+                    }
+                } else {
+                    exportList.push(list[i])
+                }
+            }
+            this.exportList = exportList.filter(o => !noGroupList.includes(o.__config__.jnpfKey))
+        },
+        getresStatusOptions() {
+            getDictionaryDataSelector('607214598059202629').then(res => {
+                this.resStatusOptions = res.data.list
+            })
+        },
+
+        sortChange({ column, prop, order }) {
+            this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
+            this.listQuery.sidx = !order ? '' : prop
+            this.initData()
+        },
+        async initSearchDataAndListData() {
+            await this.initSearchData()
+            this.initData()
+        },
+        //初始化查询的默认数据
+        async initSearchData() {
+        },
+        init(id) {
+            this.query.batchId = id
+            this.initData()
+        },
+        initData() {
+            // this.queryData = JSON.parse(JSON.stringify(this.query))导致重置失效
+            this.listLoading = true;
+            let _query = {
+                ...this.listQuery,
+                ...this.query,
+                ...this.defListQuery,
+                keyword: this.keyword,
+                dataType: 0,
+                menuId: this.menuId,
+                moduleId: '607243845716940933',
+                type: 1,
+            };
+            request({
+                url: `/api/jnpf/MdmUserDetail/getList`,
+                method: 'post',
+                data: _query
+            }).then(res => {
+                var _list = [];
+                for (let i = 0; i < res.data.list.length; i++) {
+                    let _data = res.data.list[i];
+                    _list.push(_data)
+                }
+                this.list = _list.map(o => ({
+                    ...o,
+                    ...this.expandObj,
+                }))
+                this.total = res.data.pagination.total
+                this.listLoading = false
+                this.visible = true
+            })
+        },
+        handleDel(id) {
+            this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
+                type: 'warning'
+            }).then(() => {
+                request({
+                    url: `/api/jnpf/MdmUserDetail/${id}`,
+                    method: 'DELETE'
+                }).then(res => {
+                    this.$message({
+                        type: 'success',
+                        message: res.msg,
+                        onClose: () => {
+                            this.initData()
+                        }
+                    });
+                })
+            }).catch(() => {
+            });
+        },
+        handelUpload() {
+            this.uploadBoxVisible = true
+            this.$nextTick(() => {
+                this.$refs.UploadBox.init("", "jnpf/MdmUserDetail", 0, this.flowList)
+            })
+        },
+        openSuperQuery() {
+            this.superQueryVisible = true
+            this.$nextTick(() => {
+                this.$refs.SuperQuery.init()
+            })
+        },
+        superQuery(queryJson) {
+            this.listQuery.superQueryJson = queryJson
+            this.listQuery.currentPage = 1
+            this.initData()
+        },
+        addOrUpdateHandle(row, isDetail) {
+            let id = row ? row.id : ""
+            this.formVisible = true
+            if (!this.treeActiveId) {
+                this.leftTreeActiveInfo = {}
+            }
+            this.$nextTick(() => {
+                this.$refs.JNPFForm.init(id, isDetail, this.list, this.leftTreeActiveInfo)
+            })
+        },
+        exportData() {
+            this.exportBoxVisible = true
+            this.$nextTick(() => {
+                this.$refs.ExportBox.init(this.exportList, this.multipleSelection)
+            })
+        },
+        download(data) {
+            let query = { ...data, ...this.listQuery, ...this.query, menuId: this.menuId }
+            request({
+                url: `/api/jnpf/MdmUserDetail/Actions/Export`,
+                method: 'post',
+                data: query
+            }).then(res => {
+                if (!res.data.url) return
+                this.jnpf.downloadFile(res.data.url)
+                this.$refs.ExportBox.visible = false
+                this.exportBoxVisible = false
+            })
+        },
+        search() {
+            this.listQuery.currentPage = 1
+            this.listQuery.pageSize = 20
+            this.initData()
+        },
+        refresh(isrRefresh) {
+            this.formVisible = false
+            if (isrRefresh) this.reset()
+        },
+        reset() {
+            this.query = JSON.parse(JSON.stringify(this.queryData))
+            this.search()
+        },
+        colseFlow(isrRefresh) {
+            this.flowVisible = false
+            if (isrRefresh) this.reset()
+        },
+
+        //以下排序相关方法
+        setDefaultQuery(defaultSortList) {
+            const defaultSortConfig = (defaultSortList || []).map(o =>
+                (o.sort === 'desc' ? '-' : '') + o.field);
+            this.defListQuery.sidx = defaultSortConfig.join(',')
+        },
+        handleHeaderClass({ column }) {
+            column.order = column.multiOrder
+        },
+        handleTableSort({ column }) {
+            if (column.sortable !== 'custom') return
+            column.multiOrder = column.multiOrder === 'descending' ? 'ascending' : column.multiOrder ? '' : 'descending';
+            this.handleOrderChange(column.property, column.multiOrder)
+        },
+        handleOrderChange(orderColumn, orderState) {
+            let index = this.ordersList.findIndex(e => e.field === orderColumn);
+            let sort = orderState === 'ascending' ? 'asc' : orderState === 'descending' ? 'desc' : '';
+            if (index > -1) {
+                this.ordersList[index].sort = orderState;
+            } else {
+                this.ordersList.push({ field: orderColumn, sort });
+            }
+            this.ordersList = this.ordersList.filter(e => e.sort);
+            this.ordersList.length ? this.setDefaultQuery(this.ordersList) : this.setDefaultQuery(this.defaultSortConfig)
+            this.initData()
+        },
+        //以上排序相关方法
+    }
+}
+</script>
+
+<style scoped lang="scss">
+::v-deep .el-dialog__body {
+    padding: 20px;
+}
+.tableContainer {
+    flex: 1;
+}
+.JNPF-common-search-box {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+}
+</style>

File diff suppressed because it is too large
+ 0 - 0
src/views/governmentCloud/mdm/mdmuser/columnList.js


+ 499 - 0
src/views/governmentCloud/mdm/mdmuser/form.vue

@@ -0,0 +1,499 @@
+
+
+
+    <template>
+        <el-dialog :title="!dataForm.id ? '新建' :'编辑'"
+                   :close-on-click-modal="false" append-to-body
+                   :visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll
+                   width="600px">
+        <el-row :gutter="15" class="">
+    <el-form ref="formRef" :model="dataForm" :rules="dataRule" size="small" label-width="150px" label-position="right" >
+    <template v-if="!loading">
+        <!-- 具体表单 -->
+
+        <el-col :span="24" >
+        <jnpf-form-tip-item
+ label="创建时间"              align="left"
+ prop="createTime" >
+        <JnpfDatePicker   v-model="dataForm.createTime" @change="changeData('createTime',-1)" 
+ :startTime="dateTime(false,1,1,'','')"  :endTime="dateTime(false,1,1,'','')"  placeholder="请选择"  clearable  :style='{"width":"100%"}' type="datetime"  format="yyyy-MM-dd HH:mm:ss" >
+    </JnpfDatePicker>
+    </jnpf-form-tip-item>
+        </el-col>
+        <el-col :span="24" >
+        <jnpf-form-tip-item
+ label="模块"              align="left"
+ prop="module" >
+        <JnpfSelect   v-model="dataForm.module" @change="changeData('module',-1)" 
+ placeholder="请选择"  clearable  :style='{"width":"100%"}' :options="moduleOptions" :props="moduleProps" >
+    </JnpfSelect>
+    </jnpf-form-tip-item>
+        </el-col>
+        <el-col :span="24" >
+        <jnpf-form-tip-item
+ label="类型"              align="left"
+ prop="type" >
+        <JnpfSelect   v-model="dataForm.type" @change="changeData('type',-1)" 
+ placeholder="请选择"  clearable  :style='{"width":"100%"}' :options="typeOptions" :props="typeProps" >
+    </JnpfSelect>
+    </jnpf-form-tip-item>
+        </el-col>
+
+        <el-col :span="24" >
+        <jnpf-form-tip-item
+ label="请求时间"              align="left"
+ prop="reqTime" >
+        <JnpfDatePicker   v-model="dataForm.reqTime" @change="changeData('reqTime',-1)" 
+ :startTime="dateTime(false,1,1,'','')"  :endTime="dateTime(false,1,1,'','')"  placeholder="请选择"  clearable  :style='{"width":"100%"}' type="datetime"  format="yyyy-MM-dd HH:mm:ss" >
+    </JnpfDatePicker>
+    </jnpf-form-tip-item>
+        </el-col>
+
+        <el-col :span="24" >
+        <jnpf-form-tip-item
+ label="响应时间"              align="left"
+ prop="resTime" >
+        <JnpfDatePicker   v-model="dataForm.resTime" @change="changeData('resTime',-1)" 
+ :startTime="dateTime(false,1,1,'','')"  :endTime="dateTime(false,1,1,'','')"  placeholder="请选择"  clearable  :style='{"width":"100%"}' type="datetime"  format="yyyy-MM-dd HH:mm:ss" >
+    </JnpfDatePicker>
+    </jnpf-form-tip-item>
+        </el-col>
+        <el-col :span="24" >
+        <jnpf-form-tip-item
+ label="时间间隔(ms)"              align="left"
+ prop="timeInterval" >
+        <JnpfInputNumber   v-model="dataForm.timeInterval" @change="changeData('timeInterval',-1)" 
+ placeholder="数字文本"  :step="1"  :controls="false" >
+    </JnpfInputNumber>
+    </jnpf-form-tip-item>
+        </el-col>
+        <el-col :span="24" >
+        <jnpf-form-tip-item
+ label="状态"              align="left"
+ prop="status" >
+        <JnpfSelect   v-model="dataForm.status" @change="changeData('status',-1)" 
+ placeholder="请选择"  clearable  :style='{"width":"100%"}' :options="statusOptions" :props="statusProps" >
+    </JnpfSelect>
+    </jnpf-form-tip-item>
+        </el-col>
+        <!-- 表单结束 -->
+    </template>
+    </el-form>
+    <SelectDialog v-if="selectDialogVisible" :config="currTableConf" :formData="dataForm"
+                  ref="selectDialog" @select="addForSelect" @close="closeForSelect"/>
+    </el-row>
+    <span slot="footer" class="dialog-footer">
+                    <div class="upAndDown-button" v-if="dataForm.id">
+                <el-button @click="prev" :disabled='prevDis'>
+                  {{'上一条'}}
+                </el-button>
+                <el-button @click="next" :disabled='nextDis'>
+                  {{'下一条'}}
+                </el-button>
+              </div>
+                <el-button type="primary" @click="dataFormSubmit(2)" :loading="continueBtnLoading">
+            {{!dataForm.id ?'确定并新增':'确定并继续'}}</el-button>
+              <el-button @click="visible = false"> 取 消</el-button>
+              <el-button type="primary" @click="dataFormSubmit()" :loading="btnLoading"> 确 定</el-button>
+        </span>
+    </el-dialog>
+    </template>
+
+
+<script>
+    import request from '@/utils/request'
+    import {mapGetters} from "vuex";
+    import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
+    import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
+    import { getDefaultCurrentValueUserId } from '@/api/permission/user'
+    import { getDefaultCurrentValueDepartmentId } from '@/api/permission/organize'
+    import { getDateDay, getLaterData, getBeforeData, getBeforeTime, getLaterTime } from '@/components/Generator/utils/index.js'
+    import { thousandsFormat } from "@/components/Generator/utils/index"
+    import SelectDialog from '@/components/SelectDialog'
+
+    export default {
+        components: { SelectDialog },
+        props: [],
+        data() {
+        return {
+            dataFormSubmitType: 0,
+            continueBtnLoading: false,
+            index: 0,
+            prevDis: false,
+            nextDis: false,
+            allList: [],
+            visible: false,
+            loading: false,
+            btnLoading: false,
+            formRef: 'formRef',
+            setting:{},
+            eventType: '',
+            userBoxVisible:false,
+            selectDialogVisible: false,
+            currTableConf:{},
+            dataValueAll:{},
+            addTableConf:{
+            },
+            //可选范围默认值
+            ableAll:{
+            },
+            tableRows:{
+        },
+            Vmodel:"",
+            currVmodel:"",
+            dataForm: {
+                                    createTime : undefined,
+                                    module : undefined,
+                                    type : undefined,
+                                reqTime : undefined,
+                                resTime : undefined,
+                                timeInterval : undefined,
+                                    status : undefined,
+            },
+            tableRequiredData: {},
+            dataRule:
+            {
+            },
+                    moduleOptions:[],
+                            moduleProps:{"label":"fullName","value":"enCode"  },
+                    typeOptions:[],
+                            typeProps:{"label":"fullName","value":"enCode"  },
+                    statusOptions:[],
+                            statusProps:{"label":"fullName","value":"enCode"  },
+            childIndex:-1,
+            isEdit:false,
+            interfaceRes: {
+                        createTime:[] ,
+                        module:[] ,
+                        type:[] ,
+                        reqTime:[] ,
+                        resTime:[] ,
+                        timeInterval:[] ,
+                        status:[] ,
+        },
+            //掩码配置
+            maskConfig: {
+                },
+            //定位属性
+            locationScope: {
+                },
+            }
+        },
+        computed: {
+            ...mapGetters(['userInfo']),
+
+
+        },
+        watch: {},
+        created() {
+            this.dataAll()
+            this.initDefaultData()
+            this.dataValueAll = JSON.parse(JSON.stringify(this.dataForm))
+        },
+        mounted() {},
+        methods: {
+            prev() {
+                this.index--
+                if (this.index === 0) {
+                    this.prevDis = true
+                }
+                this.nextDis = false
+                for (let index = 0; index < this.allList.length; index++) {
+                    const element = this.allList[index];
+                    if (this.index == index) {
+                        this.getInfo(element.id)
+                    }
+                }
+            },
+            next() {
+                this.index++
+                if (this.index === this.allList.length - 1) {
+                    this.nextDis = true
+                }
+                this.prevDis = false
+                for (let index = 0; index < this.allList.length; index++) {
+                    const element = this.allList[index];
+                    if (this.index == index) {
+                        this.getInfo(element.id)
+                    }
+                }
+            },
+            getInfo(id) {
+                request({
+                    url: '/api/jnpf/MdmUser/'+ id,
+                    method: 'get'
+                }).then(res => {
+                    this.dataInfo(res.data)
+                });
+            },
+            goBack() {
+                this.visible = false
+                this.$emit('refreshDataList', true)
+            },
+            changeData(model, index) {
+                this.isEdit = false
+                this.childIndex = index
+                let modelAll = model.split("-");
+                let faceMode = "";
+                for (let i = 0; i < modelAll.length; i++) {
+                    faceMode += modelAll[i];
+                }
+                for (let key in this.interfaceRes) {
+                    if (key != faceMode) {
+                        let faceReList = this.interfaceRes[key]
+                        for (let i = 0; i < faceReList.length; i++) {
+                            if (faceReList[i].relationField == model) {
+                                let options = 'get' + key + 'Options';
+                                if(this[options]){
+                                    this[options]()
+                                }
+                                this.changeData(key, index)
+                            }
+                        }
+                    }
+                }
+            },
+            changeDataFormData(type, data, model,index,defaultValue,edit) {
+                if(!edit) {
+                    if (type == 2) {
+                        for (let i = 0; i < this.dataForm[data].length; i++) {
+                            if (index == -1) {
+                                this.dataForm[data][i][model] = defaultValue
+                            } else if (index == i) {
+                                this.dataForm[data][i][model] = defaultValue
+                            }
+                        }
+                    } else {
+                        this.dataForm[data] = defaultValue
+                    }
+                }
+            },
+            dataAll(){
+                        this.getmoduleOptions();
+                        this.gettypeOptions();
+                        this.getstatusOptions();
+            },
+                    getmoduleOptions() {
+                    getDictionaryDataSelector('607211514000054341').then(res => {
+                        this.moduleOptions = res.data.list
+                    })
+                },
+                    gettypeOptions() {
+                    getDictionaryDataSelector('607211842762184773').then(res => {
+                        this.typeOptions = res.data.list
+                    })
+                },
+                    getstatusOptions() {
+                    getDictionaryDataSelector('607214598059202629').then(res => {
+                        this.statusOptions = res.data.list
+                    })
+                },
+            clearData(){
+                this.dataForm = JSON.parse(JSON.stringify(this.dataValueAll))
+            },
+            init(id,isDetail,allList,leftTreeActiveInfo) {
+                this.prevDis = false
+                this.nextDis = false
+                this.allList = allList || []
+                if (allList.length) {
+                    this.index = this.allList.findIndex(item => item.id === id)
+                    if (this.index == 0) {
+                        this.prevDis = true
+                    }
+                    if (this.index == this.allList.length - 1) {
+                        this.nextDis = true
+                    }
+                } else {
+                    this.prevDis = true
+                    this.nextDis = true
+                }
+                this.dataForm.id = id || 0;
+                this.visible = true;
+                this.$nextTick(() => {
+                    if(this.dataForm.id){
+                        this.loading = true
+                        request({
+                            url: '/api/jnpf/MdmUser/'+this.dataForm.id,
+                            method: 'get'
+                        }).then(res => {
+                            this.dataInfo(res.data)
+                            this.loading = false
+                        });
+                    }else{
+                        this.clearData()
+                        this.initDefaultData()
+                        this.dataForm = { ...this.dataForm, ...leftTreeActiveInfo }
+                    }
+                });
+                this.$store.commit('generator/UPDATE_RELATION_DATA', {})
+            },
+            //初始化默认数据
+            initDefaultData() {
+            this.dataForm.createTime = new Date().getTime()
+
+            },
+            // 表单提交
+            dataFormSubmit(type) {
+                this.dataFormSubmitType = type ? type : 0
+                this.$refs['formRef'].validate((valid) => {
+                    if (valid) {
+                        this.request()
+                    }
+                })
+            },
+            request() {
+                let _data =this.dataList()
+                if (this.dataFormSubmitType == 2) {
+                    this.continueBtnLoading = true
+                } else {
+                    this.btnLoading = true
+                }
+                if (!this.dataForm.id) {
+                    request({
+                        url: '/api/jnpf/MdmUser',
+                        method: 'post',
+                        data: _data
+                    }).then((res) => {
+                        this.$message({
+                            message: res.msg,
+                            type: 'success',
+                            duration: 1000,
+                            onClose: () => {
+                                if (this.dataFormSubmitType == 2) {
+                                    this.$nextTick(() => {
+                                        this.clearData()
+                                        this.initDefaultData()
+                                    })
+                                    this.continueBtnLoading = false
+                                    return
+                                }
+                                this.visible = false
+                                this.btnLoading = false
+                                this.$emit('refresh', true)
+                            }
+                        })
+                    }).catch(()=>{
+                        this.btnLoading = false
+                        this.continueBtnLoading = false
+                    })
+                }else{
+                    request({
+                        url: '/api/jnpf/MdmUser/'+this.dataForm.id,
+                        method: 'PUT',
+                        data: _data
+                    }).then((res) => {
+                        this.$message({
+                            message: res.msg,
+                            type: 'success',
+                            duration: 1000,
+                            onClose: () => {
+                                if (this.dataFormSubmitType == 2) return this.continueBtnLoading = false
+                                this.visible = false
+                                this.btnLoading = false
+                                this.$emit('refresh', true)
+                            }
+                        })
+                    }).catch(()=>{
+                        this.btnLoading = false
+                        this.continueBtnLoading = false
+                    })
+                }
+            },
+            openSelectDialog(key,value) {
+                this.currTableConf=this.addTableConf[key + value]
+                this.currVmodel=key
+                this.selectDialogVisible = true
+                this.$nextTick(() => {
+                    this.$refs.selectDialog.init()
+                })
+            },
+            addForSelect(data) {
+                this.closeForSelect()
+                for (let i = 0; i < data.length; i++) {
+                    let t = data[i]
+                    if(this['get'+this.currVmodel]){
+                        this['get'+this.currVmodel](t,true)
+                    }
+                }
+            },
+            closeForSelect() {
+                this.selectDialogVisible = false
+            },
+            dateTime(timeRule, timeType, timeTarget, timeValueData, dataValue) {
+                let timeDataValue = null;
+                let timeValue = Number(timeValueData)
+                if (timeRule) {
+                    if (timeType == 1) {
+                        timeDataValue = timeValue
+                    } else if (timeType == 2) {
+                        timeDataValue = dataValue
+                    } else if (timeType == 3) {
+                        timeDataValue = new Date().getTime()
+                    } else if (timeType == 4) {
+                        let previousDate = '';
+                        if (timeTarget == 1 || timeTarget == 2) {
+                            previousDate = getDateDay(timeTarget, timeType, timeValue)
+                            timeDataValue = new Date(previousDate).getTime()
+                        } else if (timeTarget == 3) {
+                            previousDate = getBeforeData(timeValue)
+                            timeDataValue = new Date(previousDate).getTime()
+                        } else {
+                            timeDataValue = getBeforeTime(timeTarget, timeValue).getTime()
+                        }
+                    } else if (timeType == 5) {
+                        let previousDate = '';
+                        if (timeTarget == 1 || timeTarget == 2) {
+                            previousDate = getDateDay(timeTarget, timeType, timeValue)
+                            timeDataValue = new Date(previousDate).getTime()
+                        } else if (timeTarget == 3) {
+                            previousDate = getLaterData(timeValue)
+                            timeDataValue = new Date(previousDate).getTime()
+                        } else {
+                            timeDataValue = getLaterTime(timeTarget, timeValue).getTime()
+                        }
+                    }
+                }
+                return timeDataValue;
+            },
+            time(timeRule, timeType, timeTarget, timeValue, formatType, dataValue) {
+                let format = formatType == 'HH:mm' ? 'HH:mm:00' : formatType
+                let timeDataValue = null
+                if (timeRule) {
+                    if (timeType == 1) {
+                        timeDataValue = timeValue || '00:00:00'
+                        if (timeDataValue.split(':').length == 3) {
+                            timeDataValue = timeDataValue
+                        } else {
+                            timeDataValue = timeDataValue + ':00'
+                        }
+                    } else if (timeType == 2) {
+                        timeDataValue = dataValue
+                    } else if (timeType == 3) {
+                        timeDataValue = this.jnpf.toDate(new Date(), format)
+                    } else if (timeType == 4) {
+                        let previousDate = '';
+                        previousDate = getBeforeTime(timeTarget, timeValue)
+                        timeDataValue = this.jnpf.toDate(previousDate, format)
+                    } else if (timeType == 5) {
+                        let previousDate = '';
+                        previousDate = getLaterTime(timeTarget, timeValue)
+                        timeDataValue = this.jnpf.toDate(previousDate, format)
+                    }
+                }
+                return timeDataValue;
+            },
+            dataList(){
+                var _data = this.dataForm;
+                return _data;
+            },
+            dataInfo(dataAll){
+                let _dataAll =dataAll
+                this.dataForm = _dataAll
+                this.isEdit = true
+                this.dataAll()
+                this.childIndex=-1
+            },
+        },
+    }
+
+</script>

+ 590 - 0
src/views/governmentCloud/mdm/mdmuser/index.vue

@@ -0,0 +1,590 @@
+<template>
+    <div class="JNPF-common-layout">
+        <div class="JNPF-common-layout-center">
+            <el-row class="JNPF-common-search-box" :gutter="16">
+                <el-form @submit.native.prevent>
+                    <el-col :span="6">
+                        <el-form-item label="创建时间">
+                            <JnpfDateRangePicker v-model="query.createTime"
+                                format="yyyy-MM-dd HH:mm:ss" startPlaceholder="开始日期"
+                                endPlaceholder="结束日期">
+                            </JnpfDateRangePicker>
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="6">
+                        <el-form-item label="模块">
+                            <JnpfSelect v-model="query.module" placeholder="请选择" clearable
+                                :options="moduleOptions" :props="moduleProps" multiple>
+                            </JnpfSelect>
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="6">
+                        <el-form-item label="类型">
+                            <JnpfSelect v-model="query.type" placeholder="请选择" clearable
+                                :options="typeOptions" :props="typeProps" multiple>
+                            </JnpfSelect>
+                        </el-form-item>
+                    </el-col>
+                    <template v-if="showAll">
+                        <el-col :span="6">
+                            <el-form-item label="时间间隔(ms)">
+                                <num-range v-model="query.timeInterval"></num-range>
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="6">
+                            <el-form-item label="状态">
+                                <JnpfSelect v-model="query.status" placeholder="请选择" clearable
+                                    :options="statusOptions" :props="statusProps" multiple>
+                                </JnpfSelect>
+                            </el-form-item>
+                        </el-col>
+                    </template>
+                    <el-col :span="6">
+                        <el-form-item>
+                            <el-button type="primary" icon="el-icon-search"
+                                @click="search()">查询</el-button>
+                            <el-button icon="el-icon-refresh-right" @click="reset()">重置</el-button>
+                            <el-button type="text" icon="el-icon-arrow-down" @click="showAll=true"
+                                v-if="!showAll">
+                                展开
+                            </el-button>
+                            <el-button type="text" icon="el-icon-arrow-up" @click="showAll=false"
+                                v-else>
+                                收起
+                            </el-button>
+                        </el-form-item>
+                    </el-col>
+                </el-form>
+            </el-row>
+            <div class="JNPF-common-layout-main JNPF-flex-main">
+                <div class="JNPF-common-head">
+                    <div>
+                        <el-button type="primary" icon="el-icon-refresh"
+                            @click="initialization()">初始化
+                        </el-button>
+
+                    </div>
+                    <div class="JNPF-common-head-right">
+                        <el-tooltip content="高级查询" placement="top" v-if="true">
+                            <el-link icon="icon-ym icon-ym-filter JNPF-common-head-icon"
+                                :underline="false" @click="openSuperQuery()" />
+                        </el-tooltip>
+                        <el-tooltip effect="dark" :content="$t('common.refresh')" placement="top">
+                            <el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon"
+                                :underline="false" @click="initData()" />
+                        </el-tooltip>
+                    </div>
+                </div>
+                <JNPF-table v-loading="listLoading" :data="list" @sort-change='handleTableSort'
+                    :header-cell-class-name="handleHeaderClass" :has-c="hasBatchBtn"
+                    :span-method="arraySpanMethod">
+                    <el-table-column prop="createTime" label="创建时间" align="left"
+                        show-overflow-tooltip>
+                    </el-table-column>
+                    <el-table-column prop="module" label="模块" align="left" show-overflow-tooltip>
+                    </el-table-column>
+                    <el-table-column prop="type" label="类型" align="left" show-overflow-tooltip>
+                    </el-table-column>
+                    <el-table-column prop="reqTime" label="请求时间" align="left" show-overflow-tooltip>
+                    </el-table-column>
+                    <el-table-column prop="resTime" label="响应时间" align="left" show-overflow-tooltip>
+                    </el-table-column>
+                    <el-table-column prop="timeInterval" label="时间间隔(ms)" align="left"
+                        show-overflow-tooltip>
+                        <template slot-scope="scope">
+                            <JnpfNumber v-model="scope.row.timeInterval" :thousands="false" />
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="status" label="状态" align="left" show-overflow-tooltip>
+                    </el-table-column>
+                    <el-table-column label="操作" fixed="right" width="50">
+                        <template slot-scope="scope">
+                            <el-button type="text" @click="goDetail(scope.row.id)">详情
+                            </el-button>
+                        </template>
+                    </el-table-column>
+                </JNPF-table>
+                <pagination :total="total" :page.sync="listQuery.currentPage"
+                    :limit.sync="listQuery.pageSize" @pagination="initData" />
+            </div>
+        </div>
+        <JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" />
+        <ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" />
+
+        <ImportBox v-if="uploadBoxVisible" ref="UploadBox" @refresh="initData" />
+        <Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false" />
+        <ToFormDetail v-if="toFormDetailVisible" ref="toFormDetail"
+            @close="toFormDetailVisible = false" />
+        <SuperQuery v-if="superQueryVisible" ref="SuperQuery" :columnOptions="superQueryJson"
+            @superQuery="superQuery" />
+    </div>
+</template>
+
+<script>
+import request from '@/utils/request'
+import { mapGetters } from "vuex";
+import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
+import JNPFForm from './form'
+import Detail from './Detail'
+import ExportBox from '@/components/ExportBox'
+import ToFormDetail from '@/views/basic/dynamicModel/list/detail'
+import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
+import { getConfigData } from '@/api/onlineDev/visualDev'
+import { getDefaultCurrentValueUserIdAsync } from '@/api/permission/user'
+import { getDefaultCurrentValueDepartmentIdAsync } from '@/api/permission/organize'
+import columnList from './columnList'
+import { thousandsFormat } from "@/components/Generator/utils/index"
+import SuperQuery from '@/components/SuperQuery'
+import superQueryJson from './superQueryJson'
+import { noGroupList } from '@/components/Generator/generator/comConfig'
+
+export default {
+    components: {
+        JNPFForm,
+        Detail,
+        ExportBox, ToFormDetail, SuperQuery
+    },
+    data() {
+        return {
+
+            keyword: '',
+            expandsTree: true,
+            refreshTree: true,
+            toFormDetailVisible: false,
+            hasBatchBtn: false,
+            expandObj: {},
+            columnOptions: [],
+            mergeList: [],
+            exportList: [],
+            columnList,
+
+            showAll: false,
+            superQueryVisible: false,
+            superQueryJson,
+            uploadBoxVisible: false,
+            detailVisible: false,
+            query: {
+                createTime: undefined,
+                module: undefined,
+                type: undefined,
+                timeInterval: undefined,
+                status: undefined,
+            },
+            defListQuery: {
+                sort: 'desc',
+                sidx: '',
+            },
+            //排序默认值
+            defaultSortConfig: [],
+            treeProps: {
+                children: 'children',
+                label: 'fullName',
+                value: 'id',
+                isLeaf: 'isLeaf'
+            },
+            list: [],
+            listLoading: true,
+            multipleSelection: [],
+            total: 0,
+            queryData: {},
+            listQuery: {
+                superQueryJson: '',
+                currentPage: 1,
+                pageSize: 20,
+                sort: "",
+                sidx: "",
+            },
+            //多列排序
+            ordersList: [],
+            formVisible: false,
+            flowVisible: false,
+            flowListVisible: false,
+            flowList: [],
+            exportBoxVisible: false,
+            moduleOptions: [],
+            moduleProps: { "label": "fullName", "value": "enCode" },
+            typeOptions: [],
+            typeProps: { "label": "fullName", "value": "enCode" },
+            statusOptions: [],
+            statusProps: { "label": "fullName", "value": "enCode" },
+            interfaceRes: {
+            },
+            //掩码配置
+            maskConfig: {
+            },
+        }
+    },
+    computed: {
+        ...mapGetters(['userInfo']),
+        menuId() {
+            return this.$route.meta.modelId || ''
+        }
+    },
+    created() {
+        this.getColumnList(),
+            this.initSearchDataAndListData()
+        this.getmoduleOptions();
+        this.gettypeOptions();
+        this.getstatusOptions();
+        this.queryData = JSON.parse(JSON.stringify(this.query))
+        this.getHasBatchBtn();
+        //排序默认值
+        this.setDefaultQuery(this.defaultSortConfig);
+    },
+    methods: {
+        getHasBatchBtn() {
+            let btnsList = []
+            this.hasBatchBtn = btnsList.some(o => ['batchRemove', 'batchPrint', 'download'].includes(o))
+        },
+
+        treeRefresh() {
+            this.keyword = ''
+            this.treeActiveId = ''
+            this.leftTreeActiveInfo = {}
+            this.$refs.treeBox.setCurrentKey(null)
+            this.getTreeView()
+        },
+
+        toDetail(defaultValue, modelId) {
+            if (!defaultValue) return
+            getConfigData(modelId).then(res => {
+                if (!res.data || !res.data.formData) return
+                let formData = JSON.parse(res.data.formData)
+                formData.popupType = 'general'
+                this.toFormDetailVisible = true
+                this.$nextTick(() => {
+                    this.$refs.toFormDetail.init(formData, modelId, defaultValue)
+                })
+            })
+        },
+        toggleTreeExpand(expands) {
+            this.refreshTree = false
+            this.expandsTree = expands
+            this.$nextTick(() => {
+                this.refreshTree = true
+                this.$nextTick(() => {
+                    this.$refs.treeBox.setCurrentKey(null)
+                })
+            })
+        },
+        filterNode(value, data) {
+            if (!value) return true;
+            return data[this.treeProps.label].indexOf(value) !== -1;
+        },
+        loadNode(node, resolve) {
+            const nodeData = node.data
+            const config = {
+                treeInterfaceId: "",
+                treeTemplateJson: []
+            }
+            if (config.treeInterfaceId) {
+                //这里是为了拿到参数中关联的字段的值,后端自行拿
+                if (config.treeTemplateJson && config.treeTemplateJson.length) {
+                    for (let i = 0; i < config.treeTemplateJson.length; i++) {
+                        const element = config.treeTemplateJson[i];
+                        element.defaultValue = nodeData[element.relationField] || ''
+                    }
+                }
+                //参数
+                let query = {
+                    paramList: config.treeTemplateJson || [],
+                }
+                //接口
+                getDataInterfaceRes(config.treeInterfaceId, query).then(res => {
+                    let data = res.data
+                    if (Array.isArray(data)) {
+                        resolve(data);
+                    } else {
+                        resolve([]);
+                    }
+                })
+            }
+        },
+        getColumnList() {
+            // 没有开启权限
+            this.columnOptions = this.transformColumnList(this.columnList)
+        },
+
+        //初始化
+        initialization() {
+            this.listLoading = true
+
+            request({
+                url: `/api/jnpf/MdmUser/init`,
+                method: 'post',
+                data: null
+            }).then(res => {
+                if (res.code == 200) {
+                    this.$message.success(res.msg)
+                    this.initData()
+                } else {
+                    this.$message.error(res.msg)
+                    this.listLoading = false
+
+                }
+            })
+        },
+        transformColumnList(columnList) {
+            let list = []
+            for (let i = 0; i < columnList.length; i++) {
+                const e = columnList[i];
+                if (!e.prop.includes('-')) {
+                    list.push(e)
+                } else {
+                    let prop = e.prop.split('-')[0]
+                    let label = e.label.split('-')[0]
+                    let vModel = e.prop.split('-')[1]
+                    let newItem = {
+                        align: "center",
+                        jnpfKey: "table",
+                        prop,
+                        label,
+                        children: []
+                    }
+                    e.vModel = vModel
+                    if (!this.expandObj.hasOwnProperty(`${prop}Expand`)) this.$set(this.expandObj, `${prop}Expand`, false)
+                    if (!list.some(o => o.prop === prop)) list.push(newItem)
+                    for (let i = 0; i < list.length; i++) {
+                        if (list[i].prop === prop) {
+                            list[i].children.push(e)
+                            break
+                        }
+                    }
+                }
+            }
+            this.getMergeList(list)
+            this.getExportList(list)
+            return list
+        },
+        arraySpanMethod({ column }) {
+            for (let i = 0; i < this.mergeList.length; i++) {
+                if (column.property == this.mergeList[i].prop) {
+                    return [this.mergeList[i].rowspan, this.mergeList[i].colspan]
+                }
+            }
+        },
+        getMergeList(list) {
+            let newList = JSON.parse(JSON.stringify(list))
+            newList.forEach(item => {
+                if (item.children && item.children.length) {
+                    let child = {
+                        prop: item.prop + '-child-first'
+                    }
+                    item.children.unshift(child)
+                }
+            })
+            newList.forEach(item => {
+                if (item.children && item.children.length) {
+                    item.children.forEach((child, index) => {
+                        if (index == 0) {
+                            this.mergeList.push({
+                                prop: child.prop,
+                                rowspan: 1,
+                                colspan: item.children.length
+                            })
+                        } else {
+                            this.mergeList.push({
+                                prop: child.prop,
+                                rowspan: 0,
+                                colspan: 0
+                            })
+                        }
+                    })
+                } else {
+                    this.mergeList.push({
+                        prop: item.prop,
+                        rowspan: 1,
+                        colspan: 1
+                    })
+                }
+            })
+        },
+        getExportList(list) {
+            let exportList = []
+            for (let i = 0; i < list.length; i++) {
+                if (list[i].jnpfKey === 'table') {
+                    for (let j = 0; j < list[i].children.length; j++) {
+                        exportList.push(list[i].children[j])
+                    }
+                } else {
+                    exportList.push(list[i])
+                }
+            }
+            this.exportList = exportList.filter(o => !noGroupList.includes(o.__config__.jnpfKey))
+        },
+        getmoduleOptions() {
+            getDictionaryDataSelector('607211514000054341').then(res => {
+                this.moduleOptions = res.data.list
+            })
+        },
+        gettypeOptions() {
+            getDictionaryDataSelector('607211842762184773').then(res => {
+                this.typeOptions = res.data.list
+            })
+        },
+        getstatusOptions() {
+            getDictionaryDataSelector('607214598059202629').then(res => {
+                this.statusOptions = res.data.list
+            })
+        },
+        goDetail(id) {
+            this.detailVisible = true
+            this.$nextTick(() => {
+                this.$refs.Detail.init(id)
+            })
+        },
+        sortChange({ column, prop, order }) {
+            this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
+            this.listQuery.sidx = !order ? '' : prop
+            this.initData()
+        },
+        async initSearchDataAndListData() {
+            await this.initSearchData()
+            this.initData()
+        },
+        //初始化查询的默认数据
+        async initSearchData() {
+        },
+        initData() {
+            // this.queryData = JSON.parse(JSON.stringify(this.query))导致重置失效
+            this.listLoading = true;
+            let _query = {
+                ...this.listQuery,
+                ...this.query,
+                ...this.defListQuery,
+                keyword: this.keyword,
+                dataType: 0,
+                menuId: this.menuId,
+                moduleId: '607236760644098117',
+            };
+            request({
+                url: `/api/jnpf/MdmUser/getList`,
+                method: 'post',
+                data: _query
+            }).then(res => {
+                var _list = [];
+                for (let i = 0; i < res.data.list.length; i++) {
+                    let _data = res.data.list[i];
+                    _list.push(_data)
+                }
+                this.list = _list.map(o => ({
+                    ...o,
+                    ...this.expandObj,
+                }))
+                this.total = res.data.pagination.total
+                this.listLoading = false
+            })
+        },
+        handleDel(id) {
+            this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
+                type: 'warning'
+            }).then(() => {
+                request({
+                    url: `/api/jnpf/MdmUser/${id}`,
+                    method: 'DELETE'
+                }).then(res => {
+                    this.$message({
+                        type: 'success',
+                        message: res.msg,
+                        onClose: () => {
+                            this.initData()
+                        }
+                    });
+                })
+            }).catch(() => {
+            });
+        },
+        handelUpload() {
+            this.uploadBoxVisible = true
+            this.$nextTick(() => {
+                this.$refs.UploadBox.init("", "jnpf/MdmUser", 0, this.flowList)
+            })
+        },
+        openSuperQuery() {
+            this.superQueryVisible = true
+            this.$nextTick(() => {
+                this.$refs.SuperQuery.init()
+            })
+        },
+        superQuery(queryJson) {
+            this.listQuery.superQueryJson = queryJson
+            this.listQuery.currentPage = 1
+            this.initData()
+        },
+        addOrUpdateHandle(row, isDetail) {
+            let id = row ? row.id : ""
+            this.formVisible = true
+            if (!this.treeActiveId) {
+                this.leftTreeActiveInfo = {}
+            }
+            this.$nextTick(() => {
+                this.$refs.JNPFForm.init(id, isDetail, this.list, this.leftTreeActiveInfo)
+            })
+        },
+        exportData() {
+            this.exportBoxVisible = true
+            this.$nextTick(() => {
+                this.$refs.ExportBox.init(this.exportList, this.multipleSelection)
+            })
+        },
+        download(data) {
+            let query = { ...data, ...this.listQuery, ...this.query, menuId: this.menuId }
+            request({
+                url: `/api/jnpf/MdmUser/Actions/Export`,
+                method: 'post',
+                data: query
+            }).then(res => {
+                if (!res.data.url) return
+                this.jnpf.downloadFile(res.data.url)
+                this.$refs.ExportBox.visible = false
+                this.exportBoxVisible = false
+            })
+        },
+        search() {
+            this.listQuery.currentPage = 1
+            this.listQuery.pageSize = 20
+            this.initData()
+        },
+        refresh(isrRefresh) {
+            this.formVisible = false
+            if (isrRefresh) this.reset()
+        },
+        reset() {
+            this.query = JSON.parse(JSON.stringify(this.queryData))
+            this.search()
+        },
+        colseFlow(isrRefresh) {
+            this.flowVisible = false
+            if (isrRefresh) this.reset()
+        },
+
+        //以下排序相关方法
+        setDefaultQuery(defaultSortList) {
+            const defaultSortConfig = (defaultSortList || []).map(o =>
+                (o.sort === 'desc' ? '-' : '') + o.field);
+            this.defListQuery.sidx = defaultSortConfig.join(',')
+        },
+        handleHeaderClass({ column }) {
+            column.order = column.multiOrder
+        },
+        handleTableSort({ column }) {
+            if (column.sortable !== 'custom') return
+            column.multiOrder = column.multiOrder === 'descending' ? 'ascending' : column.multiOrder ? '' : 'descending';
+            this.handleOrderChange(column.property, column.multiOrder)
+        },
+        handleOrderChange(orderColumn, orderState) {
+            let index = this.ordersList.findIndex(e => e.field === orderColumn);
+            let sort = orderState === 'ascending' ? 'asc' : orderState === 'descending' ? 'desc' : '';
+            if (index > -1) {
+                this.ordersList[index].sort = orderState;
+            } else {
+                this.ordersList.push({ field: orderColumn, sort });
+            }
+            this.ordersList = this.ordersList.filter(e => e.sort);
+            this.ordersList.length ? this.setDefaultQuery(this.ordersList) : this.setDefaultQuery(this.defaultSortConfig)
+            this.initData()
+        },
+        //以上排序相关方法
+    }
+}
+</script>

File diff suppressed because it is too large
+ 0 - 0
src/views/governmentCloud/mdm/mdmuser/superQueryJson.js


+ 306 - 0
src/views/governmentCloud/mdm/mdmuserdetail/Detail.vue

@@ -0,0 +1,306 @@
+<template>
+<el-dialog title="详情"
+           :close-on-click-modal="false" append-to-body
+           :visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll
+           width="600px">
+<el-row :gutter="15" class="">
+<el-form ref="formRef" :model="dataForm" size="small" label-width="150px" label-position="right" >
+    <template v-if="!loading">
+            <el-col :span="24"  >
+                <jnpf-form-tip-item  label="批次ID"  
+ prop="batchId"  >
+                    <JnpfInput    v-model="dataForm.batchId"
+ placeholder="请输入"  disabled
+ detailed  clearable  :style='{"width":"100%"}' :maskConfig = "maskConfig.batchId">
+                </JnpfInput>
+                </jnpf-form-tip-item>
+            </el-col>
+            <el-col :span="24"  >
+                <jnpf-form-tip-item  label="人员编码"  
+ prop="code"  >
+                    <JnpfInput    v-model="dataForm.code"
+ placeholder="请输入"  disabled
+ detailed  clearable  :style='{"width":"100%"}' :maskConfig = "maskConfig.code">
+                </JnpfInput>
+                </jnpf-form-tip-item>
+            </el-col>
+            <el-col :span="24"  >
+                <jnpf-form-tip-item  label="姓名"  
+ prop="name"  >
+                    <JnpfInput    v-model="dataForm.name"
+ placeholder="请输入"  disabled
+ detailed  clearable  :style='{"width":"100%"}' :maskConfig = "maskConfig.name">
+                </JnpfInput>
+                </jnpf-form-tip-item>
+            </el-col>
+            <el-col :span="24"  >
+                <jnpf-form-tip-item  label="账户"  
+ prop="namePinyin"  >
+                    <JnpfInput    v-model="dataForm.namePinyin"
+ placeholder="请输入"  disabled
+ detailed  clearable  :style='{"width":"100%"}' :maskConfig = "maskConfig.namePinyin">
+                </JnpfInput>
+                </jnpf-form-tip-item>
+            </el-col>
+            <el-col :span="24"  >
+                <jnpf-form-tip-item  label="人员类型"  
+ prop="personnelType"  >
+                        <p>{{dataForm.personnelType}}</p>
+                </jnpf-form-tip-item>
+            </el-col>
+            <el-col :span="24"  >
+                <jnpf-form-tip-item  label="性别"  
+ prop="gender"  >
+                        <p>{{dataForm.gender}}</p>
+                </jnpf-form-tip-item>
+            </el-col>
+            <el-col :span="24"  >
+                <jnpf-form-tip-item  label="联系电话"  
+ prop="mobile"  >
+                    <JnpfInput    v-model="dataForm.mobile"
+ placeholder="请输入"  :maxlength="11"  disabled
+ detailed  clearable  :style='{"width":"100%"}' :maskConfig = "maskConfig.mobile">
+                </JnpfInput>
+                </jnpf-form-tip-item>
+            </el-col>
+            <el-col :span="24"  >
+                <jnpf-form-tip-item  label="邮箱"  
+ prop="email"  >
+                    <JnpfInput    v-model="dataForm.email"
+ placeholder="请输入"  disabled
+ detailed  clearable  :style='{"width":"100%"}' :maskConfig = "maskConfig.email">
+                </JnpfInput>
+                </jnpf-form-tip-item>
+            </el-col>
+            <el-col :span="24"  >
+                <jnpf-form-tip-item  label="岗位状态"  
+ prop="jobStatus"  >
+                        <p>{{dataForm.jobStatus}}</p>
+                </jnpf-form-tip-item>
+            </el-col>
+            <el-col :span="24"  >
+                <jnpf-form-tip-item  label="人员状态"  
+ prop="personStatus"  >
+                        <p>{{dataForm.personStatus}}</p>
+                </jnpf-form-tip-item>
+            </el-col>
+            <el-col :span="24"  >
+                <jnpf-form-tip-item  label="微信unionid"  
+ prop="unionid"  >
+                    <JnpfInput    v-model="dataForm.unionid"
+ placeholder="请输入"  disabled
+ detailed  clearable  :style='{"width":"100%"}' :maskConfig = "maskConfig.unionid">
+                </JnpfInput>
+                </jnpf-form-tip-item>
+            </el-col>
+            <el-col :span="24"  >
+                <jnpf-form-tip-item  label="所属组织编码"  
+ prop="organizationCode"  >
+                    <JnpfInput    v-model="dataForm.organizationCode"
+ placeholder="请输入"  disabled
+ detailed  clearable  :style='{"width":"100%"}' :maskConfig = "maskConfig.organizationCode">
+                </JnpfInput>
+                </jnpf-form-tip-item>
+            </el-col>
+            <el-col :span="24"  >
+                <jnpf-form-tip-item  label="所属组织名称"  
+ prop="organizationName"  >
+                    <JnpfInput    v-model="dataForm.organizationName"
+ placeholder="请输入"  disabled
+ detailed  clearable  :style='{"width":"100%"}' :maskConfig = "maskConfig.organizationName">
+                </JnpfInput>
+                </jnpf-form-tip-item>
+            </el-col>
+            <el-col :span="24"  >
+                <jnpf-form-tip-item  label="部门编码"  
+ prop="departmentCode"  >
+                    <JnpfInput    v-model="dataForm.departmentCode"
+ placeholder="请输入"  disabled
+ detailed  clearable  :style='{"width":"100%"}' :maskConfig = "maskConfig.departmentCode">
+                </JnpfInput>
+                </jnpf-form-tip-item>
+            </el-col>
+            <el-col :span="24"  >
+                <jnpf-form-tip-item  label="部门名称"  
+ prop="departmentName"  >
+                    <JnpfInput    v-model="dataForm.departmentName"
+ placeholder="请输入"  disabled
+ detailed  clearable  :style='{"width":"100%"}' :maskConfig = "maskConfig.departmentName">
+                </JnpfInput>
+                </jnpf-form-tip-item>
+            </el-col>
+            <el-col :span="24"  >
+                <jnpf-form-tip-item  label="Itsm用户id"  
+ prop="itsmUserId"  >
+                    <JnpfInput    v-model="dataForm.itsmUserId"
+ placeholder="请输入"  disabled
+ detailed  clearable  :style='{"width":"100%"}' :maskConfig = "maskConfig.itsmUserId">
+                </JnpfInput>
+                </jnpf-form-tip-item>
+            </el-col>
+            <el-col :span="24"  >
+                <jnpf-form-tip-item  label="itsm用户姓名"  
+ prop="itsmUserName"  >
+                    <JnpfInput    v-model="dataForm.itsmUserName"
+ placeholder="请输入"  disabled
+ detailed  clearable  :style='{"width":"100%"}' :maskConfig = "maskConfig.itsmUserName">
+                </JnpfInput>
+                </jnpf-form-tip-item>
+            </el-col>
+            <el-col :span="24"  >
+                <jnpf-form-tip-item  label="itsm用户别名"  
+ prop="itsmUserAlias"  >
+                    <JnpfInput    v-model="dataForm.itsmUserAlias"
+ placeholder="请输入"  disabled
+ detailed  clearable  :style='{"width":"100%"}' :maskConfig = "maskConfig.itsmUserAlias">
+                </JnpfInput>
+                </jnpf-form-tip-item>
+            </el-col>
+            <el-col :span="24"  >
+                <jnpf-form-tip-item  label="企微账号"  
+ prop="enterpriseWechat"  >
+                    <JnpfInput    v-model="dataForm.enterpriseWechat"
+ placeholder="请输入"  disabled
+ detailed  clearable  :style='{"width":"100%"}' :maskConfig = "maskConfig.enterpriseWechat">
+                </JnpfInput>
+                </jnpf-form-tip-item>
+            </el-col>
+            <el-col :span="24"  >
+                <jnpf-form-tip-item  label="响应数据编码"  
+ prop="resCode"  >
+                    <JnpfInput    v-model="dataForm.resCode"
+ placeholder="请输入"  disabled
+ detailed  clearable  :style='{"width":"100%"}' :maskConfig = "maskConfig.resCode">
+                </JnpfInput>
+                </jnpf-form-tip-item>
+            </el-col>
+            <el-col :span="24"  >
+                <jnpf-form-tip-item  label="响应状态"  
+ prop="resStatus"  >
+                        <p>{{dataForm.resStatus}}</p>
+                </jnpf-form-tip-item>
+            </el-col>
+            <el-col :span="24"  >
+                <jnpf-form-tip-item  label="响应数据描述"  
+ prop="resMessage"  >
+                    <JnpfInput    v-model="dataForm.resMessage"
+ placeholder="请输入"  disabled
+ detailed  clearable  :style='{"width":"100%"}' :maskConfig = "maskConfig.resMessage">
+                </JnpfInput>
+                </jnpf-form-tip-item>
+            </el-col>
+            <el-col :span="24"  >
+                <jnpf-form-tip-item  label="响应数据版本"  
+ prop="resVersion"  >
+                    <JnpfInput    v-model="dataForm.resVersion"
+ placeholder="请输入"  disabled
+ detailed  clearable  :style='{"width":"100%"}' :maskConfig = "maskConfig.resVersion">
+                </JnpfInput>
+                </jnpf-form-tip-item>
+            </el-col>
+    </template>
+</el-form>
+    </el-row>
+    <span slot="footer" class="dialog-footer">
+        <el-button @click="visible = false"> 取 消</el-button>
+    </span>
+    <Detail v-if="detailVisible" ref="Detail" @close="detailVisible = false" />
+    </el-dialog>
+</template>
+<script>
+    import request from '@/utils/request'
+
+    import { getConfigData } from '@/api/onlineDev/visualDev'
+    import jnpf from '@/utils/jnpf'
+    import Detail from '@/views/basic/dynamicModel/list/detail'
+    import { thousandsFormat } from "@/components/Generator/utils/index"
+    export default {
+        components: { Detail},
+        props: [],
+        data() {
+            return {
+                visible: false,
+                detailVisible: false,
+                loading: false,
+
+                //掩码配置
+                maskConfig: {
+                            batchId: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
+                            code: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
+                            name: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
+                            namePinyin: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
+                            mobile: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
+                            email: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
+                            unionid: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
+                            organizationCode: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
+                            organizationName: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
+                            departmentCode: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
+                            departmentName: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
+                            itsmUserId: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
+                            itsmUserName: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
+                            itsmUserAlias: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
+                            enterpriseWechat: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
+                            resCode: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
+                            resMessage: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
+                            resVersion: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
+                },
+                //定位属性
+                locationScope: {
+                },
+
+            dataForm: {
+
+            },
+                        personnelTypeProps:{"label":"fullName","value":"enCode"  },
+                        genderProps:{"label":"fullName","value":"enCode"  },
+                        jobStatusProps:{"label":"fullName","value":"enCode"  },
+                        personStatusProps:{"label":"fullName","value":"enCode"  },
+                        resStatusProps:{"label":"fullName","value":"enCode"  },
+
+        }
+        },
+        computed: {},
+        watch: {},
+        created() {
+
+        },
+        mounted() {},
+        methods: {
+            toDetail(defaultValue, modelId) {
+                if (!defaultValue) return
+                getConfigData(modelId).then(res => {
+                    if (!res.data || !res.data.formData) return
+                    let formData = JSON.parse(res.data.formData)
+                    formData.popupType = 'general'
+                    this.detailVisible = true
+                    this.$nextTick(() => {
+                        this.$refs.Detail.init(formData, modelId, defaultValue)
+                    })
+                })
+            },
+            dataInfo(dataAll){
+                let _dataAll =dataAll
+                this.dataForm = _dataAll
+            },
+
+            init(id) {
+                this.dataForm.id = id || 0;
+                this.visible = true;
+                this.$nextTick(() => {
+                    if(this.dataForm.id){
+                        this.loading = true
+                        request({
+                            url: '/api/jnpf/MdmUserDetail/detail/'+this.dataForm.id,
+                            method: 'get'
+                        }).then(res => {
+                            this.dataInfo(res.data)
+                            this.loading = false
+                        })
+                    }
+
+                })
+            },
+        },
+    }
+
+</script>

File diff suppressed because it is too large
+ 0 - 0
src/views/governmentCloud/mdm/mdmuserdetail/columnList.js


+ 719 - 0
src/views/governmentCloud/mdm/mdmuserdetail/form.vue

@@ -0,0 +1,719 @@
+
+
+
+    <template>
+        <el-dialog :title="!dataForm.id ? '新建' :'编辑'"
+                   :close-on-click-modal="false" append-to-body
+                   :visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll
+                   width="600px">
+        <el-row :gutter="15" class="">
+    <el-form ref="formRef" :model="dataForm" :rules="dataRule" size="small" label-width="150px" label-position="right" >
+    <template v-if="!loading">
+        <!-- 具体表单 -->
+        <el-col :span="24" >
+        <jnpf-form-tip-item
+ label="批次ID"              align="left"
+ prop="batchId" >
+        <JnpfInput   v-model="dataForm.batchId" @change="changeData('batchId',-1)" 
+ placeholder="请输入"  clearable  :style='{"width":"100%"}' :maskConfig = "maskConfig.batchId">
+    </JnpfInput>
+    </jnpf-form-tip-item>
+        </el-col>
+        <el-col :span="24" >
+        <jnpf-form-tip-item
+ label="人员编码"              align="left"
+ prop="code" >
+        <JnpfInput   v-model="dataForm.code" @change="changeData('code',-1)" 
+ placeholder="请输入"  clearable  :style='{"width":"100%"}' :maskConfig = "maskConfig.code">
+    </JnpfInput>
+    </jnpf-form-tip-item>
+        </el-col>
+        <el-col :span="24" >
+        <jnpf-form-tip-item
+ label="姓名"              align="left"
+ prop="name" >
+        <JnpfInput   v-model="dataForm.name" @change="changeData('name',-1)" 
+ placeholder="请输入"  clearable  :style='{"width":"100%"}' :maskConfig = "maskConfig.name">
+    </JnpfInput>
+    </jnpf-form-tip-item>
+        </el-col>
+        <el-col :span="24" >
+        <jnpf-form-tip-item
+ label="账户"              align="left"
+ prop="namePinyin" >
+        <JnpfInput   v-model="dataForm.namePinyin" @change="changeData('namePinyin',-1)" 
+ placeholder="请输入"  clearable  :style='{"width":"100%"}' :maskConfig = "maskConfig.namePinyin">
+    </JnpfInput>
+    </jnpf-form-tip-item>
+        </el-col>
+        <el-col :span="24" >
+        <jnpf-form-tip-item
+ label="人员类型"              align="left"
+ prop="personnelType" >
+        <JnpfSelect   v-model="dataForm.personnelType" @change="changeData('personnelType',-1)" 
+ placeholder="请选择"  clearable  :style='{"width":"100%"}' :options="personnelTypeOptions" :props="personnelTypeProps" >
+    </JnpfSelect>
+    </jnpf-form-tip-item>
+        </el-col>
+        <el-col :span="24" >
+        <jnpf-form-tip-item
+ label="性别"              align="left"
+ prop="gender" >
+        <JnpfSelect   v-model="dataForm.gender" @change="changeData('gender',-1)" 
+ placeholder="请选择"  clearable  :style='{"width":"100%"}' :options="genderOptions" :props="genderProps" >
+    </JnpfSelect>
+    </jnpf-form-tip-item>
+        </el-col>
+        <el-col :span="24" >
+        <jnpf-form-tip-item
+ label="联系电话"              align="left"
+ prop="mobile" >
+        <JnpfInput   v-model="dataForm.mobile" @change="changeData('mobile',-1)" 
+ placeholder="请输入"  :maxlength="11"  clearable  :style='{"width":"100%"}' :maskConfig = "maskConfig.mobile">
+    </JnpfInput>
+    </jnpf-form-tip-item>
+        </el-col>
+        <el-col :span="24" >
+        <jnpf-form-tip-item
+ label="邮箱"              align="left"
+ prop="email" >
+        <JnpfInput   v-model="dataForm.email" @change="changeData('email',-1)" 
+ placeholder="请输入"  clearable  :style='{"width":"100%"}' :maskConfig = "maskConfig.email">
+    </JnpfInput>
+    </jnpf-form-tip-item>
+        </el-col>
+        <el-col :span="24" >
+        <jnpf-form-tip-item
+ label="岗位状态"              align="left"
+ prop="jobStatus" >
+        <JnpfSelect   v-model="dataForm.jobStatus" @change="changeData('jobStatus',-1)" 
+ placeholder="请选择"  clearable  :style='{"width":"100%"}' :options="jobStatusOptions" :props="jobStatusProps" >
+    </JnpfSelect>
+    </jnpf-form-tip-item>
+        </el-col>
+        <el-col :span="24" >
+        <jnpf-form-tip-item
+ label="人员状态"              align="left"
+ prop="personStatus" >
+        <JnpfSelect   v-model="dataForm.personStatus" @change="changeData('personStatus',-1)" 
+ placeholder="请选择"  clearable  :style='{"width":"100%"}' :options="personStatusOptions" :props="personStatusProps" >
+    </JnpfSelect>
+    </jnpf-form-tip-item>
+        </el-col>
+        <el-col :span="24" >
+        <jnpf-form-tip-item
+ label="微信unionid"              align="left"
+ prop="unionid" >
+        <JnpfInput   v-model="dataForm.unionid" @change="changeData('unionid',-1)" 
+ placeholder="请输入"  clearable  :style='{"width":"100%"}' :maskConfig = "maskConfig.unionid">
+    </JnpfInput>
+    </jnpf-form-tip-item>
+        </el-col>
+        <el-col :span="24" >
+        <jnpf-form-tip-item
+ label="所属组织编码"              align="left"
+ prop="organizationCode" >
+        <JnpfInput   v-model="dataForm.organizationCode" @change="changeData('organizationCode',-1)" 
+ placeholder="请输入"  clearable  :style='{"width":"100%"}' :maskConfig = "maskConfig.organizationCode">
+    </JnpfInput>
+    </jnpf-form-tip-item>
+        </el-col>
+        <el-col :span="24" >
+        <jnpf-form-tip-item
+ label="所属组织名称"              align="left"
+ prop="organizationName" >
+        <JnpfInput   v-model="dataForm.organizationName" @change="changeData('organizationName',-1)" 
+ placeholder="请输入"  clearable  :style='{"width":"100%"}' :maskConfig = "maskConfig.organizationName">
+    </JnpfInput>
+    </jnpf-form-tip-item>
+        </el-col>
+        <el-col :span="24" >
+        <jnpf-form-tip-item
+ label="部门编码"              align="left"
+ prop="departmentCode" >
+        <JnpfInput   v-model="dataForm.departmentCode" @change="changeData('departmentCode',-1)" 
+ placeholder="请输入"  clearable  :style='{"width":"100%"}' :maskConfig = "maskConfig.departmentCode">
+    </JnpfInput>
+    </jnpf-form-tip-item>
+        </el-col>
+        <el-col :span="24" >
+        <jnpf-form-tip-item
+ label="部门名称"              align="left"
+ prop="departmentName" >
+        <JnpfInput   v-model="dataForm.departmentName" @change="changeData('departmentName',-1)" 
+ placeholder="请输入"  clearable  :style='{"width":"100%"}' :maskConfig = "maskConfig.departmentName">
+    </JnpfInput>
+    </jnpf-form-tip-item>
+        </el-col>
+        <el-col :span="24" >
+        <jnpf-form-tip-item
+ label="Itsm用户id"              align="left"
+ prop="itsmUserId" >
+        <JnpfInput   v-model="dataForm.itsmUserId" @change="changeData('itsmUserId',-1)" 
+ placeholder="请输入"  clearable  :style='{"width":"100%"}' :maskConfig = "maskConfig.itsmUserId">
+    </JnpfInput>
+    </jnpf-form-tip-item>
+        </el-col>
+        <el-col :span="24" >
+        <jnpf-form-tip-item
+ label="itsm用户姓名"              align="left"
+ prop="itsmUserName" >
+        <JnpfInput   v-model="dataForm.itsmUserName" @change="changeData('itsmUserName',-1)" 
+ placeholder="请输入"  clearable  :style='{"width":"100%"}' :maskConfig = "maskConfig.itsmUserName">
+    </JnpfInput>
+    </jnpf-form-tip-item>
+        </el-col>
+        <el-col :span="24" >
+        <jnpf-form-tip-item
+ label="itsm用户别名"              align="left"
+ prop="itsmUserAlias" >
+        <JnpfInput   v-model="dataForm.itsmUserAlias" @change="changeData('itsmUserAlias',-1)" 
+ placeholder="请输入"  clearable  :style='{"width":"100%"}' :maskConfig = "maskConfig.itsmUserAlias">
+    </JnpfInput>
+    </jnpf-form-tip-item>
+        </el-col>
+        <el-col :span="24" >
+        <jnpf-form-tip-item
+ label="企微账号"              align="left"
+ prop="enterpriseWechat" >
+        <JnpfInput   v-model="dataForm.enterpriseWechat" @change="changeData('enterpriseWechat',-1)" 
+ placeholder="请输入"  clearable  :style='{"width":"100%"}' :maskConfig = "maskConfig.enterpriseWechat">
+    </JnpfInput>
+    </jnpf-form-tip-item>
+        </el-col>
+        <el-col :span="24" >
+        <jnpf-form-tip-item
+ label="响应数据编码"              align="left"
+ prop="resCode" >
+        <JnpfInput   v-model="dataForm.resCode" @change="changeData('resCode',-1)" 
+ placeholder="请输入"  clearable  :style='{"width":"100%"}' :maskConfig = "maskConfig.resCode">
+    </JnpfInput>
+    </jnpf-form-tip-item>
+        </el-col>
+        <el-col :span="24" >
+        <jnpf-form-tip-item
+ label="响应状态"              align="left"
+ prop="resStatus" >
+        <JnpfSelect   v-model="dataForm.resStatus" @change="changeData('resStatus',-1)" 
+ placeholder="请选择"  clearable  :style='{"width":"100%"}' :options="resStatusOptions" :props="resStatusProps" >
+    </JnpfSelect>
+    </jnpf-form-tip-item>
+        </el-col>
+        <el-col :span="24" >
+        <jnpf-form-tip-item
+ label="响应数据描述"              align="left"
+ prop="resMessage" >
+        <JnpfInput   v-model="dataForm.resMessage" @change="changeData('resMessage',-1)" 
+ placeholder="请输入"  clearable  :style='{"width":"100%"}' :maskConfig = "maskConfig.resMessage">
+    </JnpfInput>
+    </jnpf-form-tip-item>
+        </el-col>
+        <el-col :span="24" >
+        <jnpf-form-tip-item
+ label="响应数据版本"              align="left"
+ prop="resVersion" >
+        <JnpfInput   v-model="dataForm.resVersion" @change="changeData('resVersion',-1)" 
+ placeholder="请输入"  clearable  :style='{"width":"100%"}' :maskConfig = "maskConfig.resVersion">
+    </JnpfInput>
+    </jnpf-form-tip-item>
+        </el-col>
+        <!-- 表单结束 -->
+    </template>
+    </el-form>
+    <SelectDialog v-if="selectDialogVisible" :config="currTableConf" :formData="dataForm"
+                  ref="selectDialog" @select="addForSelect" @close="closeForSelect"/>
+    </el-row>
+    <span slot="footer" class="dialog-footer">
+                    <div class="upAndDown-button" v-if="dataForm.id">
+                <el-button @click="prev" :disabled='prevDis'>
+                  {{'上一条'}}
+                </el-button>
+                <el-button @click="next" :disabled='nextDis'>
+                  {{'下一条'}}
+                </el-button>
+              </div>
+                <el-button type="primary" @click="dataFormSubmit(2)" :loading="continueBtnLoading">
+            {{!dataForm.id ?'确定并新增':'确定并继续'}}</el-button>
+              <el-button @click="visible = false"> 取 消</el-button>
+              <el-button type="primary" @click="dataFormSubmit()" :loading="btnLoading"> 确 定</el-button>
+        </span>
+    </el-dialog>
+    </template>
+
+
+<script>
+    import request from '@/utils/request'
+    import {mapGetters} from "vuex";
+    import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
+    import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
+    import { getDefaultCurrentValueUserId } from '@/api/permission/user'
+    import { getDefaultCurrentValueDepartmentId } from '@/api/permission/organize'
+    import { getDateDay, getLaterData, getBeforeData, getBeforeTime, getLaterTime } from '@/components/Generator/utils/index.js'
+    import { thousandsFormat } from "@/components/Generator/utils/index"
+    import SelectDialog from '@/components/SelectDialog'
+
+    export default {
+        components: { SelectDialog },
+        props: [],
+        data() {
+        return {
+            dataFormSubmitType: 0,
+            continueBtnLoading: false,
+            index: 0,
+            prevDis: false,
+            nextDis: false,
+            allList: [],
+            visible: false,
+            loading: false,
+            btnLoading: false,
+            formRef: 'formRef',
+            setting:{},
+            eventType: '',
+            userBoxVisible:false,
+            selectDialogVisible: false,
+            currTableConf:{},
+            dataValueAll:{},
+            addTableConf:{
+            },
+            //可选范围默认值
+            ableAll:{
+            },
+            tableRows:{
+        },
+            Vmodel:"",
+            currVmodel:"",
+            dataForm: {
+                                batchId : undefined,
+                                code : undefined,
+                                name : undefined,
+                                namePinyin : undefined,
+                                    personnelType : '0',
+                                    gender : undefined,
+                                mobile : undefined,
+                                email : undefined,
+                                    jobStatus : '1',
+                                    personStatus : '1',
+                                unionid : undefined,
+                                organizationCode : undefined,
+                                organizationName : undefined,
+                                departmentCode : undefined,
+                                departmentName : undefined,
+                                itsmUserId : undefined,
+                                itsmUserName : undefined,
+                                itsmUserAlias : undefined,
+                                enterpriseWechat : undefined,
+                                resCode : undefined,
+                                    resStatus : undefined,
+                                resMessage : undefined,
+                                resVersion : undefined,
+            },
+            tableRequiredData: {},
+            dataRule:
+            {
+                            mobile: [
+                                    {
+                                        pattern: /^1[3456789]\d{9}$/,
+                                        message: '请输入正确的手机号码',
+                                        trigger: 'blur'
+                                    },
+                        ],
+                            email: [
+                                    {
+                                        pattern: /^[a-z0-9]+([._\-]*[a-z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$/,
+                                        message: '请输入正确的邮箱',
+                                        trigger: 'blur'
+                                    },
+                        ],
+            },
+                    personnelTypeOptions:[],
+                            personnelTypeProps:{"label":"fullName","value":"enCode"  },
+                    genderOptions:[],
+                            genderProps:{"label":"fullName","value":"enCode"  },
+                    jobStatusOptions:[],
+                            jobStatusProps:{"label":"fullName","value":"enCode"  },
+                    personStatusOptions:[],
+                            personStatusProps:{"label":"fullName","value":"enCode"  },
+                    resStatusOptions:[],
+                            resStatusProps:{"label":"fullName","value":"enCode"  },
+            childIndex:-1,
+            isEdit:false,
+            interfaceRes: {
+                        batchId:[] ,
+                        code:[] ,
+                        name:[] ,
+                        namePinyin:[] ,
+                        personnelType:[] ,
+                        gender:[] ,
+                        mobile:[] ,
+                        email:[] ,
+                        jobStatus:[] ,
+                        personStatus:[] ,
+                        unionid:[] ,
+                        organizationCode:[] ,
+                        organizationName:[] ,
+                        departmentCode:[] ,
+                        departmentName:[] ,
+                        itsmUserId:[] ,
+                        itsmUserName:[] ,
+                        itsmUserAlias:[] ,
+                        enterpriseWechat:[] ,
+                        resCode:[] ,
+                        resStatus:[] ,
+                        resMessage:[] ,
+                        resVersion:[] ,
+        },
+            //掩码配置
+            maskConfig: {
+                            batchId: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
+                            code: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
+                            name: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
+                            namePinyin: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
+                            mobile: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
+                            email: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
+                            unionid: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
+                            organizationCode: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
+                            organizationName: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
+                            departmentCode: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
+                            departmentName: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
+                            itsmUserId: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
+                            itsmUserName: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
+                            itsmUserAlias: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
+                            enterpriseWechat: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
+                            resCode: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
+                            resMessage: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
+                            resVersion: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
+                },
+            //定位属性
+            locationScope: {
+                },
+            }
+        },
+        computed: {
+            ...mapGetters(['userInfo']),
+
+
+        },
+        watch: {},
+        created() {
+            this.dataAll()
+            this.initDefaultData()
+            this.dataValueAll = JSON.parse(JSON.stringify(this.dataForm))
+        },
+        mounted() {},
+        methods: {
+            prev() {
+                this.index--
+                if (this.index === 0) {
+                    this.prevDis = true
+                }
+                this.nextDis = false
+                for (let index = 0; index < this.allList.length; index++) {
+                    const element = this.allList[index];
+                    if (this.index == index) {
+                        this.getInfo(element.id)
+                    }
+                }
+            },
+            next() {
+                this.index++
+                if (this.index === this.allList.length - 1) {
+                    this.nextDis = true
+                }
+                this.prevDis = false
+                for (let index = 0; index < this.allList.length; index++) {
+                    const element = this.allList[index];
+                    if (this.index == index) {
+                        this.getInfo(element.id)
+                    }
+                }
+            },
+            getInfo(id) {
+                request({
+                    url: '/api/jnpf/MdmUserDetail/'+ id,
+                    method: 'get'
+                }).then(res => {
+                    this.dataInfo(res.data)
+                });
+            },
+            goBack() {
+                this.visible = false
+                this.$emit('refreshDataList', true)
+            },
+            changeData(model, index) {
+                this.isEdit = false
+                this.childIndex = index
+                let modelAll = model.split("-");
+                let faceMode = "";
+                for (let i = 0; i < modelAll.length; i++) {
+                    faceMode += modelAll[i];
+                }
+                for (let key in this.interfaceRes) {
+                    if (key != faceMode) {
+                        let faceReList = this.interfaceRes[key]
+                        for (let i = 0; i < faceReList.length; i++) {
+                            if (faceReList[i].relationField == model) {
+                                let options = 'get' + key + 'Options';
+                                if(this[options]){
+                                    this[options]()
+                                }
+                                this.changeData(key, index)
+                            }
+                        }
+                    }
+                }
+            },
+            changeDataFormData(type, data, model,index,defaultValue,edit) {
+                if(!edit) {
+                    if (type == 2) {
+                        for (let i = 0; i < this.dataForm[data].length; i++) {
+                            if (index == -1) {
+                                this.dataForm[data][i][model] = defaultValue
+                            } else if (index == i) {
+                                this.dataForm[data][i][model] = defaultValue
+                            }
+                        }
+                    } else {
+                        this.dataForm[data] = defaultValue
+                    }
+                }
+            },
+            dataAll(){
+                        this.getpersonnelTypeOptions();
+                        this.getgenderOptions();
+                        this.getjobStatusOptions();
+                        this.getpersonStatusOptions();
+                        this.getresStatusOptions();
+            },
+                    getpersonnelTypeOptions() {
+                    getDictionaryDataSelector('607212063659399237').then(res => {
+                        this.personnelTypeOptions = res.data.list
+                    })
+                },
+                    getgenderOptions() {
+                    getDictionaryDataSelector('607213122666633285').then(res => {
+                        this.genderOptions = res.data.list
+                    })
+                },
+                    getjobStatusOptions() {
+                    getDictionaryDataSelector('607213299192305733').then(res => {
+                        this.jobStatusOptions = res.data.list
+                    })
+                },
+                    getpersonStatusOptions() {
+                    getDictionaryDataSelector('607213463801960517').then(res => {
+                        this.personStatusOptions = res.data.list
+                    })
+                },
+                    getresStatusOptions() {
+                    getDictionaryDataSelector('607214598059202629').then(res => {
+                        this.resStatusOptions = res.data.list
+                    })
+                },
+            clearData(){
+                this.dataForm = JSON.parse(JSON.stringify(this.dataValueAll))
+            },
+            init(id,isDetail,allList,leftTreeActiveInfo) {
+                this.prevDis = false
+                this.nextDis = false
+                this.allList = allList || []
+                if (allList.length) {
+                    this.index = this.allList.findIndex(item => item.id === id)
+                    if (this.index == 0) {
+                        this.prevDis = true
+                    }
+                    if (this.index == this.allList.length - 1) {
+                        this.nextDis = true
+                    }
+                } else {
+                    this.prevDis = true
+                    this.nextDis = true
+                }
+                this.dataForm.id = id || 0;
+                this.visible = true;
+                this.$nextTick(() => {
+                    if(this.dataForm.id){
+                        this.loading = true
+                        request({
+                            url: '/api/jnpf/MdmUserDetail/'+this.dataForm.id,
+                            method: 'get'
+                        }).then(res => {
+                            this.dataInfo(res.data)
+                            this.loading = false
+                        });
+                    }else{
+                        this.clearData()
+                        this.initDefaultData()
+                        this.dataForm = { ...this.dataForm, ...leftTreeActiveInfo }
+                    }
+                });
+                this.$store.commit('generator/UPDATE_RELATION_DATA', {})
+            },
+            //初始化默认数据
+            initDefaultData() {
+
+            },
+            // 表单提交
+            dataFormSubmit(type) {
+                this.dataFormSubmitType = type ? type : 0
+                this.$refs['formRef'].validate((valid) => {
+                    if (valid) {
+                        this.request()
+                    }
+                })
+            },
+            request() {
+                let _data =this.dataList()
+                if (this.dataFormSubmitType == 2) {
+                    this.continueBtnLoading = true
+                } else {
+                    this.btnLoading = true
+                }
+                if (!this.dataForm.id) {
+                    request({
+                        url: '/api/jnpf/MdmUserDetail',
+                        method: 'post',
+                        data: _data
+                    }).then((res) => {
+                        this.$message({
+                            message: res.msg,
+                            type: 'success',
+                            duration: 1000,
+                            onClose: () => {
+                                if (this.dataFormSubmitType == 2) {
+                                    this.$nextTick(() => {
+                                        this.clearData()
+                                        this.initDefaultData()
+                                    })
+                                    this.continueBtnLoading = false
+                                    return
+                                }
+                                this.visible = false
+                                this.btnLoading = false
+                                this.$emit('refresh', true)
+                            }
+                        })
+                    }).catch(()=>{
+                        this.btnLoading = false
+                        this.continueBtnLoading = false
+                    })
+                }else{
+                    request({
+                        url: '/api/jnpf/MdmUserDetail/'+this.dataForm.id,
+                        method: 'PUT',
+                        data: _data
+                    }).then((res) => {
+                        this.$message({
+                            message: res.msg,
+                            type: 'success',
+                            duration: 1000,
+                            onClose: () => {
+                                if (this.dataFormSubmitType == 2) return this.continueBtnLoading = false
+                                this.visible = false
+                                this.btnLoading = false
+                                this.$emit('refresh', true)
+                            }
+                        })
+                    }).catch(()=>{
+                        this.btnLoading = false
+                        this.continueBtnLoading = false
+                    })
+                }
+            },
+            openSelectDialog(key,value) {
+                this.currTableConf=this.addTableConf[key + value]
+                this.currVmodel=key
+                this.selectDialogVisible = true
+                this.$nextTick(() => {
+                    this.$refs.selectDialog.init()
+                })
+            },
+            addForSelect(data) {
+                this.closeForSelect()
+                for (let i = 0; i < data.length; i++) {
+                    let t = data[i]
+                    if(this['get'+this.currVmodel]){
+                        this['get'+this.currVmodel](t,true)
+                    }
+                }
+            },
+            closeForSelect() {
+                this.selectDialogVisible = false
+            },
+            dateTime(timeRule, timeType, timeTarget, timeValueData, dataValue) {
+                let timeDataValue = null;
+                let timeValue = Number(timeValueData)
+                if (timeRule) {
+                    if (timeType == 1) {
+                        timeDataValue = timeValue
+                    } else if (timeType == 2) {
+                        timeDataValue = dataValue
+                    } else if (timeType == 3) {
+                        timeDataValue = new Date().getTime()
+                    } else if (timeType == 4) {
+                        let previousDate = '';
+                        if (timeTarget == 1 || timeTarget == 2) {
+                            previousDate = getDateDay(timeTarget, timeType, timeValue)
+                            timeDataValue = new Date(previousDate).getTime()
+                        } else if (timeTarget == 3) {
+                            previousDate = getBeforeData(timeValue)
+                            timeDataValue = new Date(previousDate).getTime()
+                        } else {
+                            timeDataValue = getBeforeTime(timeTarget, timeValue).getTime()
+                        }
+                    } else if (timeType == 5) {
+                        let previousDate = '';
+                        if (timeTarget == 1 || timeTarget == 2) {
+                            previousDate = getDateDay(timeTarget, timeType, timeValue)
+                            timeDataValue = new Date(previousDate).getTime()
+                        } else if (timeTarget == 3) {
+                            previousDate = getLaterData(timeValue)
+                            timeDataValue = new Date(previousDate).getTime()
+                        } else {
+                            timeDataValue = getLaterTime(timeTarget, timeValue).getTime()
+                        }
+                    }
+                }
+                return timeDataValue;
+            },
+            time(timeRule, timeType, timeTarget, timeValue, formatType, dataValue) {
+                let format = formatType == 'HH:mm' ? 'HH:mm:00' : formatType
+                let timeDataValue = null
+                if (timeRule) {
+                    if (timeType == 1) {
+                        timeDataValue = timeValue || '00:00:00'
+                        if (timeDataValue.split(':').length == 3) {
+                            timeDataValue = timeDataValue
+                        } else {
+                            timeDataValue = timeDataValue + ':00'
+                        }
+                    } else if (timeType == 2) {
+                        timeDataValue = dataValue
+                    } else if (timeType == 3) {
+                        timeDataValue = this.jnpf.toDate(new Date(), format)
+                    } else if (timeType == 4) {
+                        let previousDate = '';
+                        previousDate = getBeforeTime(timeTarget, timeValue)
+                        timeDataValue = this.jnpf.toDate(previousDate, format)
+                    } else if (timeType == 5) {
+                        let previousDate = '';
+                        previousDate = getLaterTime(timeTarget, timeValue)
+                        timeDataValue = this.jnpf.toDate(previousDate, format)
+                    }
+                }
+                return timeDataValue;
+            },
+            dataList(){
+                var _data = this.dataForm;
+                return _data;
+            },
+            dataInfo(dataAll){
+                let _dataAll =dataAll
+                this.dataForm = _dataAll
+                this.isEdit = true
+                this.dataAll()
+                this.childIndex=-1
+            },
+        },
+    }
+
+</script>

+ 672 - 0
src/views/governmentCloud/mdm/mdmuserdetail/index.vue

@@ -0,0 +1,672 @@
+<template>
+    <div class="JNPF-common-layout">
+        <div class="JNPF-common-layout-center">
+            <el-row class="JNPF-common-search-box" :gutter="16">
+                <el-form @submit.native.prevent>
+                    <el-col :span="6">
+                        <el-form-item label="批次ID">
+                            <el-input v-model="query.batchId" placeholder="请输入" clearable>
+                            </el-input>
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="6">
+                        <el-form-item label="姓名">
+                            <el-input v-model="query.name" placeholder="请输入" clearable> </el-input>
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="6">
+                        <el-form-item label="联系电话">
+                            <el-input v-model="query.mobile" placeholder="请输入" clearable>
+                            </el-input>
+                        </el-form-item>
+                    </el-col>
+                    <template v-if="showAll">
+                        <el-col :span="6">
+                            <el-form-item label="人员编码">
+                                <el-input v-model="query.code" placeholder="请输入" clearable>
+                                </el-input>
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="6">
+                            <el-form-item label="响应状态">
+                                <JnpfSelect v-model="query.resStatus" placeholder="请选择" clearable
+                                    :options="resStatusOptions" :props="resStatusProps" multiple>
+                                </JnpfSelect>
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="6">
+                            <el-form-item label="响应数据版本">
+                                <el-input v-model="query.resVersion" placeholder="请输入" clearable>
+                                </el-input>
+                            </el-form-item>
+                        </el-col>
+                    </template>
+                    <el-col :span="6">
+                        <el-form-item>
+                            <el-button type="primary" icon="el-icon-search"
+                                @click="search()">查询</el-button>
+                            <el-button icon="el-icon-refresh-right" @click="reset()">重置</el-button>
+                            <el-button type="text" icon="el-icon-arrow-down" @click="showAll=true"
+                                v-if="!showAll">
+                                展开
+                            </el-button>
+                            <el-button type="text" icon="el-icon-arrow-up" @click="showAll=false"
+                                v-else>
+                                收起
+                            </el-button>
+                        </el-form-item>
+                    </el-col>
+                </el-form>
+            </el-row>
+            <div class="JNPF-common-layout-main JNPF-flex-main">
+                <div class="JNPF-common-head">
+                    <div>
+                    </div>
+                    <div class="JNPF-common-head-right">
+                        <el-tooltip content="高级查询" placement="top" v-if="true">
+                            <el-link icon="icon-ym icon-ym-filter JNPF-common-head-icon"
+                                :underline="false" @click="openSuperQuery()" />
+                        </el-tooltip>
+                        <el-tooltip effect="dark" :content="$t('common.refresh')" placement="top">
+                            <el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon"
+                                :underline="false" @click="initData()" />
+                        </el-tooltip>
+                    </div>
+                </div>
+                <JNPF-table v-loading="listLoading" :data="list" @sort-change='handleTableSort'
+                    :header-cell-class-name="handleHeaderClass" :has-c="hasBatchBtn"
+                    :span-method="arraySpanMethod">
+                    <el-table-column prop="batchId" label="批次ID" align="left" show-overflow-tooltip>
+                        <template slot-scope="scope">
+                            <JnpfInput v-model="scope.row.batchId" detailed showOverflow />
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="code" label="人员编码" align="left" show-overflow-tooltip>
+                        <template slot-scope="scope">
+                            <JnpfInput v-model="scope.row.code" detailed showOverflow />
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="name" label="姓名" align="left" show-overflow-tooltip>
+                        <template slot-scope="scope">
+                            <JnpfInput v-model="scope.row.name" detailed showOverflow />
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="namePinyin" label="账户" align="left"
+                        show-overflow-tooltip>
+                        <template slot-scope="scope">
+                            <JnpfInput v-model="scope.row.namePinyin" detailed showOverflow />
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="personnelType" label="人员类型" align="left"
+                        show-overflow-tooltip>
+                    </el-table-column>
+                    <el-table-column prop="gender" label="性别" align="left" show-overflow-tooltip>
+                    </el-table-column>
+                    <el-table-column prop="mobile" label="联系电话" align="left" show-overflow-tooltip>
+                        <template slot-scope="scope">
+                            <JnpfInput v-model="scope.row.mobile" detailed showOverflow />
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="email" label="邮箱" align="left" show-overflow-tooltip>
+                        <template slot-scope="scope">
+                            <JnpfInput v-model="scope.row.email" detailed showOverflow />
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="jobStatus" label="岗位状态" align="left"
+                        show-overflow-tooltip>
+                    </el-table-column>
+                    <el-table-column prop="personStatus" label="人员状态" align="left"
+                        show-overflow-tooltip>
+                    </el-table-column>
+                    <el-table-column prop="unionid" label="微信unionid" align="left"
+                        show-overflow-tooltip>
+                        <template slot-scope="scope">
+                            <JnpfInput v-model="scope.row.unionid" detailed showOverflow />
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="organizationCode" label="所属组织编码" align="left"
+                        show-overflow-tooltip>
+                        <template slot-scope="scope">
+                            <JnpfInput v-model="scope.row.organizationCode" detailed showOverflow />
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="organizationName" label="所属组织名称" align="left"
+                        show-overflow-tooltip>
+                        <template slot-scope="scope">
+                            <JnpfInput v-model="scope.row.organizationName" detailed showOverflow />
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="departmentCode" label="部门编码" align="left"
+                        show-overflow-tooltip>
+                        <template slot-scope="scope">
+                            <JnpfInput v-model="scope.row.departmentCode" detailed showOverflow />
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="departmentName" label="部门名称" align="left"
+                        show-overflow-tooltip>
+                        <template slot-scope="scope">
+                            <JnpfInput v-model="scope.row.departmentName" detailed showOverflow />
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="itsmUserId" label="Itsm用户id" align="left"
+                        show-overflow-tooltip>
+                        <template slot-scope="scope">
+                            <JnpfInput v-model="scope.row.itsmUserId" detailed showOverflow />
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="itsmUserName" label="itsm用户姓名" align="left"
+                        show-overflow-tooltip>
+                        <template slot-scope="scope">
+                            <JnpfInput v-model="scope.row.itsmUserName" detailed showOverflow />
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="itsmUserAlias" label="itsm用户别名" align="left"
+                        show-overflow-tooltip>
+                        <template slot-scope="scope">
+                            <JnpfInput v-model="scope.row.itsmUserAlias" detailed showOverflow />
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="enterpriseWechat" label="企微账号" align="left"
+                        show-overflow-tooltip>
+                        <template slot-scope="scope">
+                            <JnpfInput v-model="scope.row.enterpriseWechat" detailed showOverflow />
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="resCode" label="响应数据编码" align="left"
+                        show-overflow-tooltip>
+                        <template slot-scope="scope">
+                            <JnpfInput v-model="scope.row.resCode" detailed showOverflow />
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="resStatus" label="响应状态" align="left"
+                        show-overflow-tooltip>
+                    </el-table-column>
+                    <el-table-column prop="resMessage" label="响应数据描述" align="left"
+                        show-overflow-tooltip>
+                        <template slot-scope="scope">
+                            <JnpfInput v-model="scope.row.resMessage" detailed showOverflow />
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="resVersion" label="响应数据版本" align="left"
+                        show-overflow-tooltip>
+                        <template slot-scope="scope">
+                            <JnpfInput v-model="scope.row.resVersion" detailed showOverflow />
+                        </template>
+                    </el-table-column>
+                </JNPF-table>
+                <pagination :total="total" :page.sync="listQuery.currentPage"
+                    :limit.sync="listQuery.pageSize" @pagination="initData" />
+            </div>
+        </div>
+        <JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" />
+        <ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" />
+
+        <ImportBox v-if="uploadBoxVisible" ref="UploadBox" @refresh="initData" />
+        <Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false" />
+        <ToFormDetail v-if="toFormDetailVisible" ref="toFormDetail"
+            @close="toFormDetailVisible = false" />
+        <SuperQuery v-if="superQueryVisible" ref="SuperQuery" :columnOptions="superQueryJson"
+            @superQuery="superQuery" />
+    </div>
+</template>
+
+<script>
+import request from '@/utils/request'
+import { mapGetters } from "vuex";
+import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
+import JNPFForm from './form'
+import Detail from './Detail'
+import ExportBox from '@/components/ExportBox'
+import ToFormDetail from '@/views/basic/dynamicModel/list/detail'
+import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
+import { getConfigData } from '@/api/onlineDev/visualDev'
+import { getDefaultCurrentValueUserIdAsync } from '@/api/permission/user'
+import { getDefaultCurrentValueDepartmentIdAsync } from '@/api/permission/organize'
+import columnList from './columnList'
+import { thousandsFormat } from "@/components/Generator/utils/index"
+import SuperQuery from '@/components/SuperQuery'
+import superQueryJson from './superQueryJson'
+import { noGroupList } from '@/components/Generator/generator/comConfig'
+
+export default {
+    components: {
+        JNPFForm,
+        Detail,
+        ExportBox, ToFormDetail, SuperQuery
+    },
+    data() {
+        return {
+
+            keyword: '',
+            expandsTree: true,
+            refreshTree: true,
+            toFormDetailVisible: false,
+            hasBatchBtn: false,
+            expandObj: {},
+            columnOptions: [],
+            mergeList: [],
+            exportList: [],
+            columnList,
+
+            showAll: false,
+            superQueryVisible: false,
+            superQueryJson,
+            uploadBoxVisible: false,
+            detailVisible: false,
+            query: {
+                batchId: undefined,
+                name: undefined,
+                mobile: undefined,
+                code: undefined,
+                resStatus: undefined,
+                resVersion: undefined,
+            },
+            defListQuery: {
+                sort: 'desc',
+                sidx: '',
+            },
+            //排序默认值
+            defaultSortConfig: [],
+            treeProps: {
+                children: 'children',
+                label: 'fullName',
+                value: 'id',
+                isLeaf: 'isLeaf'
+            },
+            list: [],
+            listLoading: true,
+            multipleSelection: [],
+            total: 0,
+            queryData: {},
+            listQuery: {
+                superQueryJson: '',
+                currentPage: 1,
+                pageSize: 20,
+                sort: "",
+                sidx: "",
+            },
+            //多列排序
+            ordersList: [],
+            formVisible: false,
+            flowVisible: false,
+            flowListVisible: false,
+            flowList: [],
+            exportBoxVisible: false,
+            personnelTypeOptions: [],
+            personnelTypeProps: { "label": "fullName", "value": "enCode" },
+            genderOptions: [],
+            genderProps: { "label": "fullName", "value": "enCode" },
+            jobStatusOptions: [],
+            jobStatusProps: { "label": "fullName", "value": "enCode" },
+            personStatusOptions: [],
+            personStatusProps: { "label": "fullName", "value": "enCode" },
+            resStatusOptions: [],
+            resStatusProps: { "label": "fullName", "value": "enCode" },
+            interfaceRes: {
+            },
+            //掩码配置
+            maskConfig: {
+                batchId: { "prefixType": 1, "useUnrealMask": false, "maskType": 1, "unrealMaskLength": 1, "prefixLimit": 0, "suffixLimit": 0, "filler": "*", "prefixSpecifyChar": "", "suffixType": 1, "ignoreChar": "", "suffixSpecifyChar": "" },
+                code: { "prefixType": 1, "useUnrealMask": false, "maskType": 1, "unrealMaskLength": 1, "prefixLimit": 0, "suffixLimit": 0, "filler": "*", "prefixSpecifyChar": "", "suffixType": 1, "ignoreChar": "", "suffixSpecifyChar": "" },
+                name: { "prefixType": 1, "useUnrealMask": false, "maskType": 1, "unrealMaskLength": 1, "prefixLimit": 0, "suffixLimit": 0, "filler": "*", "prefixSpecifyChar": "", "suffixType": 1, "ignoreChar": "", "suffixSpecifyChar": "" },
+                namePinyin: { "prefixType": 1, "useUnrealMask": false, "maskType": 1, "unrealMaskLength": 1, "prefixLimit": 0, "suffixLimit": 0, "filler": "*", "prefixSpecifyChar": "", "suffixType": 1, "ignoreChar": "", "suffixSpecifyChar": "" },
+                mobile: { "prefixType": 1, "useUnrealMask": false, "maskType": 1, "unrealMaskLength": 1, "prefixLimit": 0, "suffixLimit": 0, "filler": "*", "prefixSpecifyChar": "", "suffixType": 1, "ignoreChar": "", "suffixSpecifyChar": "" },
+                email: { "prefixType": 1, "useUnrealMask": false, "maskType": 1, "unrealMaskLength": 1, "prefixLimit": 0, "suffixLimit": 0, "filler": "*", "prefixSpecifyChar": "", "suffixType": 1, "ignoreChar": "", "suffixSpecifyChar": "" },
+                unionid: { "prefixType": 1, "useUnrealMask": false, "maskType": 1, "unrealMaskLength": 1, "prefixLimit": 0, "suffixLimit": 0, "filler": "*", "prefixSpecifyChar": "", "suffixType": 1, "ignoreChar": "", "suffixSpecifyChar": "" },
+                organizationCode: { "prefixType": 1, "useUnrealMask": false, "maskType": 1, "unrealMaskLength": 1, "prefixLimit": 0, "suffixLimit": 0, "filler": "*", "prefixSpecifyChar": "", "suffixType": 1, "ignoreChar": "", "suffixSpecifyChar": "" },
+                organizationName: { "prefixType": 1, "useUnrealMask": false, "maskType": 1, "unrealMaskLength": 1, "prefixLimit": 0, "suffixLimit": 0, "filler": "*", "prefixSpecifyChar": "", "suffixType": 1, "ignoreChar": "", "suffixSpecifyChar": "" },
+                departmentCode: { "prefixType": 1, "useUnrealMask": false, "maskType": 1, "unrealMaskLength": 1, "prefixLimit": 0, "suffixLimit": 0, "filler": "*", "prefixSpecifyChar": "", "suffixType": 1, "ignoreChar": "", "suffixSpecifyChar": "" },
+                departmentName: { "prefixType": 1, "useUnrealMask": false, "maskType": 1, "unrealMaskLength": 1, "prefixLimit": 0, "suffixLimit": 0, "filler": "*", "prefixSpecifyChar": "", "suffixType": 1, "ignoreChar": "", "suffixSpecifyChar": "" },
+                itsmUserId: { "prefixType": 1, "useUnrealMask": false, "maskType": 1, "unrealMaskLength": 1, "prefixLimit": 0, "suffixLimit": 0, "filler": "*", "prefixSpecifyChar": "", "suffixType": 1, "ignoreChar": "", "suffixSpecifyChar": "" },
+                itsmUserName: { "prefixType": 1, "useUnrealMask": false, "maskType": 1, "unrealMaskLength": 1, "prefixLimit": 0, "suffixLimit": 0, "filler": "*", "prefixSpecifyChar": "", "suffixType": 1, "ignoreChar": "", "suffixSpecifyChar": "" },
+                itsmUserAlias: { "prefixType": 1, "useUnrealMask": false, "maskType": 1, "unrealMaskLength": 1, "prefixLimit": 0, "suffixLimit": 0, "filler": "*", "prefixSpecifyChar": "", "suffixType": 1, "ignoreChar": "", "suffixSpecifyChar": "" },
+                enterpriseWechat: { "prefixType": 1, "useUnrealMask": false, "maskType": 1, "unrealMaskLength": 1, "prefixLimit": 0, "suffixLimit": 0, "filler": "*", "prefixSpecifyChar": "", "suffixType": 1, "ignoreChar": "", "suffixSpecifyChar": "" },
+                resCode: { "prefixType": 1, "useUnrealMask": false, "maskType": 1, "unrealMaskLength": 1, "prefixLimit": 0, "suffixLimit": 0, "filler": "*", "prefixSpecifyChar": "", "suffixType": 1, "ignoreChar": "", "suffixSpecifyChar": "" },
+                resMessage: { "prefixType": 1, "useUnrealMask": false, "maskType": 1, "unrealMaskLength": 1, "prefixLimit": 0, "suffixLimit": 0, "filler": "*", "prefixSpecifyChar": "", "suffixType": 1, "ignoreChar": "", "suffixSpecifyChar": "" },
+                resVersion: { "prefixType": 1, "useUnrealMask": false, "maskType": 1, "unrealMaskLength": 1, "prefixLimit": 0, "suffixLimit": 0, "filler": "*", "prefixSpecifyChar": "", "suffixType": 1, "ignoreChar": "", "suffixSpecifyChar": "" },
+            },
+        }
+    },
+    computed: {
+        ...mapGetters(['userInfo']),
+        menuId() {
+            return this.$route.meta.modelId || ''
+        }
+    },
+    created() {
+        this.getColumnList(),
+            this.initSearchDataAndListData()
+        this.getresStatusOptions();
+        this.queryData = JSON.parse(JSON.stringify(this.query))
+        this.getHasBatchBtn();
+        //排序默认值
+        this.setDefaultQuery(this.defaultSortConfig);
+    },
+    methods: {
+        getHasBatchBtn() {
+            let btnsList = []
+            this.hasBatchBtn = btnsList.some(o => ['batchRemove', 'batchPrint', 'download'].includes(o))
+        },
+
+        treeRefresh() {
+            this.keyword = ''
+            this.treeActiveId = ''
+            this.leftTreeActiveInfo = {}
+            this.$refs.treeBox.setCurrentKey(null)
+            this.getTreeView()
+        },
+
+        toDetail(defaultValue, modelId) {
+            if (!defaultValue) return
+            getConfigData(modelId).then(res => {
+                if (!res.data || !res.data.formData) return
+                let formData = JSON.parse(res.data.formData)
+                formData.popupType = 'general'
+                this.toFormDetailVisible = true
+                this.$nextTick(() => {
+                    this.$refs.toFormDetail.init(formData, modelId, defaultValue)
+                })
+            })
+        },
+        toggleTreeExpand(expands) {
+            this.refreshTree = false
+            this.expandsTree = expands
+            this.$nextTick(() => {
+                this.refreshTree = true
+                this.$nextTick(() => {
+                    this.$refs.treeBox.setCurrentKey(null)
+                })
+            })
+        },
+        filterNode(value, data) {
+            if (!value) return true;
+            return data[this.treeProps.label].indexOf(value) !== -1;
+        },
+        loadNode(node, resolve) {
+            const nodeData = node.data
+            const config = {
+                treeInterfaceId: "",
+                treeTemplateJson: []
+            }
+            if (config.treeInterfaceId) {
+                //这里是为了拿到参数中关联的字段的值,后端自行拿
+                if (config.treeTemplateJson && config.treeTemplateJson.length) {
+                    for (let i = 0; i < config.treeTemplateJson.length; i++) {
+                        const element = config.treeTemplateJson[i];
+                        element.defaultValue = nodeData[element.relationField] || ''
+                    }
+                }
+                //参数
+                let query = {
+                    paramList: config.treeTemplateJson || [],
+                }
+                //接口
+                getDataInterfaceRes(config.treeInterfaceId, query).then(res => {
+                    let data = res.data
+                    if (Array.isArray(data)) {
+                        resolve(data);
+                    } else {
+                        resolve([]);
+                    }
+                })
+            }
+        },
+        getColumnList() {
+            // 没有开启权限
+            this.columnOptions = this.transformColumnList(this.columnList)
+        },
+        transformColumnList(columnList) {
+            let list = []
+            for (let i = 0; i < columnList.length; i++) {
+                const e = columnList[i];
+                if (!e.prop.includes('-')) {
+                    list.push(e)
+                } else {
+                    let prop = e.prop.split('-')[0]
+                    let label = e.label.split('-')[0]
+                    let vModel = e.prop.split('-')[1]
+                    let newItem = {
+                        align: "center",
+                        jnpfKey: "table",
+                        prop,
+                        label,
+                        children: []
+                    }
+                    e.vModel = vModel
+                    if (!this.expandObj.hasOwnProperty(`${prop}Expand`)) this.$set(this.expandObj, `${prop}Expand`, false)
+                    if (!list.some(o => o.prop === prop)) list.push(newItem)
+                    for (let i = 0; i < list.length; i++) {
+                        if (list[i].prop === prop) {
+                            list[i].children.push(e)
+                            break
+                        }
+                    }
+                }
+            }
+            this.getMergeList(list)
+            this.getExportList(list)
+            return list
+        },
+        arraySpanMethod({ column }) {
+            for (let i = 0; i < this.mergeList.length; i++) {
+                if (column.property == this.mergeList[i].prop) {
+                    return [this.mergeList[i].rowspan, this.mergeList[i].colspan]
+                }
+            }
+        },
+        getMergeList(list) {
+            let newList = JSON.parse(JSON.stringify(list))
+            newList.forEach(item => {
+                if (item.children && item.children.length) {
+                    let child = {
+                        prop: item.prop + '-child-first'
+                    }
+                    item.children.unshift(child)
+                }
+            })
+            newList.forEach(item => {
+                if (item.children && item.children.length) {
+                    item.children.forEach((child, index) => {
+                        if (index == 0) {
+                            this.mergeList.push({
+                                prop: child.prop,
+                                rowspan: 1,
+                                colspan: item.children.length
+                            })
+                        } else {
+                            this.mergeList.push({
+                                prop: child.prop,
+                                rowspan: 0,
+                                colspan: 0
+                            })
+                        }
+                    })
+                } else {
+                    this.mergeList.push({
+                        prop: item.prop,
+                        rowspan: 1,
+                        colspan: 1
+                    })
+                }
+            })
+        },
+        getExportList(list) {
+            let exportList = []
+            for (let i = 0; i < list.length; i++) {
+                if (list[i].jnpfKey === 'table') {
+                    for (let j = 0; j < list[i].children.length; j++) {
+                        exportList.push(list[i].children[j])
+                    }
+                } else {
+                    exportList.push(list[i])
+                }
+            }
+            this.exportList = exportList.filter(o => !noGroupList.includes(o.__config__.jnpfKey))
+        },
+        getresStatusOptions() {
+            getDictionaryDataSelector('607214598059202629').then(res => {
+                this.resStatusOptions = res.data.list
+            })
+        },
+        goDetail(id) {
+            this.detailVisible = true
+            this.$nextTick(() => {
+                this.$refs.Detail.init(id)
+            })
+        },
+        sortChange({ column, prop, order }) {
+            this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
+            this.listQuery.sidx = !order ? '' : prop
+            this.initData()
+        },
+        async initSearchDataAndListData() {
+            await this.initSearchData()
+            this.initData()
+        },
+        //初始化查询的默认数据
+        async initSearchData() {
+        },
+        initData() {
+            // this.queryData = JSON.parse(JSON.stringify(this.query))导致重置失效
+            this.listLoading = true;
+            let _query = {
+                ...this.listQuery,
+                ...this.query,
+                ...this.defListQuery,
+                keyword: this.keyword,
+                dataType: 0,
+                menuId: this.menuId,
+                moduleId: '607243845716940933',
+                type: 1,
+            };
+            request({
+                url: `/api/jnpf/MdmUserDetail/getList`,
+                method: 'post',
+                data: _query
+            }).then(res => {
+                var _list = [];
+                for (let i = 0; i < res.data.list.length; i++) {
+                    let _data = res.data.list[i];
+                    _list.push(_data)
+                }
+                this.list = _list.map(o => ({
+                    ...o,
+                    ...this.expandObj,
+                }))
+                this.total = res.data.pagination.total
+                this.listLoading = false
+            })
+        },
+        handleDel(id) {
+            this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
+                type: 'warning'
+            }).then(() => {
+                request({
+                    url: `/api/jnpf/MdmUserDetail/${id}`,
+                    method: 'DELETE'
+                }).then(res => {
+                    this.$message({
+                        type: 'success',
+                        message: res.msg,
+                        onClose: () => {
+                            this.initData()
+                        }
+                    });
+                })
+            }).catch(() => {
+            });
+        },
+        handelUpload() {
+            this.uploadBoxVisible = true
+            this.$nextTick(() => {
+                this.$refs.UploadBox.init("", "jnpf/MdmUserDetail", 0, this.flowList)
+            })
+        },
+        openSuperQuery() {
+            this.superQueryVisible = true
+            this.$nextTick(() => {
+                this.$refs.SuperQuery.init()
+            })
+        },
+        superQuery(queryJson) {
+            this.listQuery.superQueryJson = queryJson
+            this.listQuery.currentPage = 1
+            this.initData()
+        },
+        addOrUpdateHandle(row, isDetail) {
+            let id = row ? row.id : ""
+            this.formVisible = true
+            if (!this.treeActiveId) {
+                this.leftTreeActiveInfo = {}
+            }
+            this.$nextTick(() => {
+                this.$refs.JNPFForm.init(id, isDetail, this.list, this.leftTreeActiveInfo)
+            })
+        },
+        exportData() {
+            this.exportBoxVisible = true
+            this.$nextTick(() => {
+                this.$refs.ExportBox.init(this.exportList, this.multipleSelection)
+            })
+        },
+        download(data) {
+            let query = { ...data, ...this.listQuery, ...this.query, menuId: this.menuId }
+            request({
+                url: `/api/jnpf/MdmUserDetail/Actions/Export`,
+                method: 'post',
+                data: query
+            }).then(res => {
+                if (!res.data.url) return
+                this.jnpf.downloadFile(res.data.url)
+                this.$refs.ExportBox.visible = false
+                this.exportBoxVisible = false
+            })
+        },
+        search() {
+            this.listQuery.currentPage = 1
+            this.listQuery.pageSize = 20
+            this.initData()
+        },
+        refresh(isrRefresh) {
+            this.formVisible = false
+            if (isrRefresh) this.reset()
+        },
+        reset() {
+            this.query = JSON.parse(JSON.stringify(this.queryData))
+            this.search()
+        },
+        colseFlow(isrRefresh) {
+            this.flowVisible = false
+            if (isrRefresh) this.reset()
+        },
+
+        //以下排序相关方法
+        setDefaultQuery(defaultSortList) {
+            const defaultSortConfig = (defaultSortList || []).map(o =>
+                (o.sort === 'desc' ? '-' : '') + o.field);
+            this.defListQuery.sidx = defaultSortConfig.join(',')
+        },
+        handleHeaderClass({ column }) {
+            column.order = column.multiOrder
+        },
+        handleTableSort({ column }) {
+            if (column.sortable !== 'custom') return
+            column.multiOrder = column.multiOrder === 'descending' ? 'ascending' : column.multiOrder ? '' : 'descending';
+            this.handleOrderChange(column.property, column.multiOrder)
+        },
+        handleOrderChange(orderColumn, orderState) {
+            let index = this.ordersList.findIndex(e => e.field === orderColumn);
+            let sort = orderState === 'ascending' ? 'asc' : orderState === 'descending' ? 'desc' : '';
+            if (index > -1) {
+                this.ordersList[index].sort = orderState;
+            } else {
+                this.ordersList.push({ field: orderColumn, sort });
+            }
+            this.ordersList = this.ordersList.filter(e => e.sort);
+            this.ordersList.length ? this.setDefaultQuery(this.ordersList) : this.setDefaultQuery(this.defaultSortConfig)
+            this.initData()
+        },
+        //以上排序相关方法
+    }
+}
+</script>

File diff suppressed because it is too large
+ 0 - 0
src/views/governmentCloud/mdm/mdmuserdetail/superQueryJson.js


+ 119 - 0
src/views/governmentCloud/officialAccount/menuManagement/index.vue

@@ -0,0 +1,119 @@
+<template>
+    <div class="JNPF-common-layout">
+        <div class="JNPF-common-layout-center  JNPF-flex-main">
+            <div class="JNPF-common-layout-main JNPF-flex-main">
+                <div class="JNPF-common-head">
+                    <el-button type="primary" icon="el-icon-plus" @click="addMenu">
+                        新增
+                    </el-button>
+                    <div class="JNPF-common-head-right">
+                        <el-tooltip effect="dark" content="展开" placement="top">
+                            <el-link v-show="!expands" type="text"
+                                icon="icon-ym icon-ym-btn-expand JNPF-common-head-icon"
+                                :underline="false" @click="toggleExpand()" />
+                        </el-tooltip>
+                        <el-tooltip effect="dark" content="折叠" placement="top">
+                            <el-link v-show="expands" type="text"
+                                icon="icon-ym icon-ym-btn-collapse JNPF-common-head-icon"
+                                :underline="false" @click="toggleExpand()" />
+                        </el-tooltip>
+                        <el-tooltip effect="dark" :content="$t('common.refresh')" placement="top">
+                            <el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon"
+                                :underline="false" @click="initData()" />
+                        </el-tooltip>
+                    </div>
+                </div>
+                <JNPF-table v-loading="listLoading" :data="treeList" row-key="id"
+                    v-if="refreshTable" :default-expand-all="expands"
+                    :tree-props="{ children: 'children', hasChildren: '' }">
+                    <el-table-column prop="label" label="名称"> </el-table-column>
+                    <el-table-column prop="level" label="类型" align="center">
+                        <template slot-scope="scope">
+                            <span v-if="scope.row.level == 1">厅局</span>
+                            <span v-else-if="scope.row.level == 2">项目</span>
+                            <span v-else-if="scope.row.level == 3">系统</span>
+                        </template>
+                    </el-table-column>
+                </JNPF-table>
+            </div>
+        </div>
+    </div>
+</template>
+
+<script>
+import {
+    findTreeList,
+    syncOrganizeProjectSystemDict
+} from "@/api/governmentCloud/dictionaryOfProjectSystemsForDepartmentsAndBureaus/dictionaryOfProjectSystemsForDepartmentsAndBureaus";
+export default {
+    name: "menuManagement",
+    components: {},
+    data() {
+        return {
+            listQuery: {
+                keyword: ""
+            },
+            treeList: [],
+            rawData: [],
+            expands: true,
+            refreshTable: true,
+            btnLoading: false,
+            listLoading: true,
+            formVisible: false,
+            depFormVisible: false,
+            checkUserFormVisible: false
+        };
+    },
+    created() {
+        this.initData();
+    },
+    methods: {
+        initData() {
+            this.loading = true;
+            this.listLoading = true;
+            findTreeList(this.listQuery)
+                .then(res => {
+                    this.rawData = res.data;
+                    this.treeList = res.data;
+                    if (this.treeList.length > 0) this.setTableIndex(this.treeList);
+                    this.listLoading = false;
+                    this.btnLoading = false;
+                })
+                .catch(() => {
+                    this.listLoading = false;
+                    this.btnLoading = false;
+                });
+        },
+        addMenu() {
+
+        },
+        // 树形列表index层级,实现方法(可复制直接调用)
+        setTableIndex(arr, index) {
+            arr.forEach((item, key) => {
+                item.index = key + 1;
+                if (index) {
+                    item.index = index + 1;
+                }
+                if (item.children) {
+                    this.setTableIndex(item.children, item.index);
+                }
+            });
+        },
+        toggleExpand() {
+            this.refreshTable = false;
+            this.expands = !this.expands;
+            this.$nextTick(() => {
+                this.refreshTable = true;
+            });
+        }
+    }
+};
+</script>
+<style lang="scss" scoped>
+.table-icon {
+    vertical-align: bottom;
+    font-size: 16px;
+    margin-right: 6px;
+    line-height: 23px;
+}
+</style>

+ 104 - 0
src/views/governmentCloud/officialAccount/mpActivityApi/Detail.vue

@@ -0,0 +1,104 @@
+<template>
+    <el-dialog title="详情" :close-on-click-modal="false" append-to-body :visible.sync="visible"
+        class="JNPF-dialog JNPF-dialog_center" lock-scroll width="600px">
+        <el-row :gutter="15" class="">
+            <el-form ref="formRef" :model="dataForm" size="small" label-width="100px"
+                label-position="right">
+                <template v-if="!loading">
+                    <el-col :span="24">
+                        <jnpf-form-tip-item label="名称" prop="name">
+                            <JnpfInput v-model="dataForm.name" placeholder="请输入" disabled detailed
+                                clearable :style='{"width":"100%"}' :maskConfig="maskConfig.name">
+                            </JnpfInput>
+                        </jnpf-form-tip-item>
+                    </el-col>
+                    <el-col :span="24">
+                        <jnpf-form-tip-item label="API" prop="api">
+                            <JnpfInput v-model="dataForm.api" placeholder="请输入" disabled detailed
+                                clearable :style='{"width":"100%"}' :maskConfig="maskConfig.api">
+                            </JnpfInput>
+                        </jnpf-form-tip-item>
+                    </el-col>
+                </template>
+            </el-form>
+        </el-row>
+        <span slot="footer" class="dialog-footer">
+            <el-button @click="visible = false"> 取 消</el-button>
+        </span>
+        <Detail v-if="detailVisible" ref="Detail" @close="detailVisible = false" />
+    </el-dialog>
+</template>
+<script>
+import request from '@/utils/request'
+
+import { getConfigData } from '@/api/onlineDev/visualDev'
+import jnpf from '@/utils/jnpf'
+import Detail from '@/views/basic/dynamicModel/list/detail'
+import { thousandsFormat } from "@/components/Generator/utils/index"
+export default {
+    components: { Detail },
+    props: [],
+    data() {
+        return {
+            visible: false,
+            detailVisible: false,
+            loading: false,
+
+            //掩码配置
+            maskConfig: {
+                name: { "prefixType": 1, "useUnrealMask": false, "maskType": 1, "unrealMaskLength": 1, "prefixLimit": 0, "suffixLimit": 0, "filler": "*", "prefixSpecifyChar": "", "suffixType": 1, "ignoreChar": "", "suffixSpecifyChar": "" },
+                api: { "prefixType": 1, "useUnrealMask": false, "maskType": 1, "unrealMaskLength": 1, "prefixLimit": 0, "suffixLimit": 0, "filler": "*", "prefixSpecifyChar": "", "suffixType": 1, "ignoreChar": "", "suffixSpecifyChar": "" },
+            },
+            //定位属性
+            locationScope: {
+            },
+
+            dataForm: {
+
+            },
+
+        }
+    },
+    computed: {},
+    watch: {},
+    created() {
+
+    },
+    mounted() { },
+    methods: {
+        toDetail(defaultValue, modelId) {
+            if (!defaultValue) return
+            getConfigData(modelId).then(res => {
+                if (!res.data || !res.data.formData) return
+                let formData = JSON.parse(res.data.formData)
+                formData.popupType = 'general'
+                this.detailVisible = true
+                this.$nextTick(() => {
+                    this.$refs.Detail.init(formData, modelId, defaultValue)
+                })
+            })
+        },
+        dataInfo(dataAll) {
+            let _dataAll = dataAll
+            this.dataForm = _dataAll
+        },
+        init(id) {
+            this.dataForm.id = id || 0;
+            this.visible = true;
+            this.$nextTick(() => {
+                if (this.dataForm.id) {
+                    this.loading = true
+                    request({
+                        url: '/api/jnpf/MpActivityApi/detail/' + this.dataForm.id,
+                        method: 'get'
+                    }).then(res => {
+                        this.dataInfo(res.data)
+                        this.loading = false
+                    })
+                }
+            })
+        },
+    },
+}
+
+</script>

File diff suppressed because it is too large
+ 0 - 0
src/views/governmentCloud/officialAccount/mpActivityApi/columnList.js


+ 413 - 0
src/views/governmentCloud/officialAccount/mpActivityApi/form.vue

@@ -0,0 +1,413 @@
+<template>
+    <el-dialog :title="!dataForm.id ? '新建' :'编辑'" :close-on-click-modal="false" append-to-body
+        :visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll width="600px">
+        <el-row :gutter="15" class="">
+            <el-form ref="formRef" :model="dataForm" :rules="dataRule" size="small"
+                label-width="100px" label-position="right">
+                <template v-if="!loading">
+                    <!-- 具体表单 -->
+                    <el-col :span="24">
+                        <jnpf-form-tip-item label="名称" align="left" prop="name">
+                            <JnpfInput v-model="dataForm.name" @change="changeData('name',-1)"
+                                placeholder="请输入" clearable :style='{"width":"100%"}'
+                                :maskConfig="maskConfig.name">
+                            </JnpfInput>
+                        </jnpf-form-tip-item>
+                    </el-col>
+                    <el-col :span="24">
+                        <jnpf-form-tip-item label="API" align="left" prop="api">
+                            <JnpfInput v-model="dataForm.api" @change="changeData('api',-1)"
+                                placeholder="请输入" clearable :style='{"width":"100%"}'
+                                :maskConfig="maskConfig.api">
+                            </JnpfInput>
+                        </jnpf-form-tip-item>
+                    </el-col>
+                    <!-- 表单结束 -->
+                </template>
+            </el-form>
+            <SelectDialog v-if="selectDialogVisible" :config="currTableConf" :formData="dataForm"
+                ref="selectDialog" @select="addForSelect" @close="closeForSelect" />
+        </el-row>
+        <span slot="footer" class="dialog-footer">
+            <div class="upAndDown-button" v-if="dataForm.id">
+                <el-button @click="prev" :disabled='prevDis'>
+                    {{'上一条'}}
+                </el-button>
+                <el-button @click="next" :disabled='nextDis'>
+                    {{'下一条'}}
+                </el-button>
+            </div>
+            <el-button type="primary" @click="dataFormSubmit(2)" :loading="continueBtnLoading">
+                {{!dataForm.id ?'确定并新增':'确定并继续'}}</el-button>
+            <el-button @click="visible = false"> 取 消</el-button>
+            <el-button type="primary" @click="dataFormSubmit()" :loading="btnLoading"> 确
+                定</el-button>
+        </span>
+    </el-dialog>
+</template>
+
+
+<script>
+import request from '@/utils/request'
+import { mapGetters } from "vuex";
+import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
+import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
+import { getDefaultCurrentValueUserId } from '@/api/permission/user'
+import { getDefaultCurrentValueDepartmentId } from '@/api/permission/organize'
+import { getDateDay, getLaterData, getBeforeData, getBeforeTime, getLaterTime } from '@/components/Generator/utils/index.js'
+import { thousandsFormat } from "@/components/Generator/utils/index"
+import SelectDialog from '@/components/SelectDialog'
+
+export default {
+    components: { SelectDialog },
+    props: [],
+    data() {
+        return {
+            dataFormSubmitType: 0,
+            continueBtnLoading: false,
+            index: 0,
+            prevDis: false,
+            nextDis: false,
+            allList: [],
+            visible: false,
+            loading: false,
+            btnLoading: false,
+            formRef: 'formRef',
+            setting: {},
+            eventType: '',
+            userBoxVisible: false,
+            selectDialogVisible: false,
+            currTableConf: {},
+            dataValueAll: {},
+            addTableConf: {
+            },
+            //可选范围默认值
+            ableAll: {
+            },
+            tableRows: {
+            },
+            Vmodel: "",
+            currVmodel: "",
+            dataForm: {
+                name: undefined,
+                api: undefined,
+            },
+            tableRequiredData: {},
+            dataRule:
+            {
+            },
+            childIndex: -1,
+            isEdit: false,
+            interfaceRes: {
+                name: [],
+                api: [],
+            },
+            //掩码配置
+            maskConfig: {
+                name: { "prefixType": 1, "useUnrealMask": false, "maskType": 1, "unrealMaskLength": 1, "prefixLimit": 0, "suffixLimit": 0, "filler": "*", "prefixSpecifyChar": "", "suffixType": 1, "ignoreChar": "", "suffixSpecifyChar": "" },
+                api: { "prefixType": 1, "useUnrealMask": false, "maskType": 1, "unrealMaskLength": 1, "prefixLimit": 0, "suffixLimit": 0, "filler": "*", "prefixSpecifyChar": "", "suffixType": 1, "ignoreChar": "", "suffixSpecifyChar": "" },
+            },
+            //定位属性
+            locationScope: {
+            },
+        }
+    },
+    computed: {
+        ...mapGetters(['userInfo']),
+
+
+    },
+    watch: {},
+    created() {
+        this.dataAll()
+        this.initDefaultData()
+        this.dataValueAll = JSON.parse(JSON.stringify(this.dataForm))
+    },
+    mounted() { },
+    methods: {
+        prev() {
+            this.index--
+            if (this.index === 0) {
+                this.prevDis = true
+            }
+            this.nextDis = false
+            for (let index = 0; index < this.allList.length; index++) {
+                const element = this.allList[index];
+                if (this.index == index) {
+                    this.getInfo(element.id)
+                }
+            }
+        },
+        next() {
+            this.index++
+            if (this.index === this.allList.length - 1) {
+                this.nextDis = true
+            }
+            this.prevDis = false
+            for (let index = 0; index < this.allList.length; index++) {
+                const element = this.allList[index];
+                if (this.index == index) {
+                    this.getInfo(element.id)
+                }
+            }
+        },
+        getInfo(id) {
+            request({
+                url: '/api/jnpf/MpActivityApi/' + id,
+                method: 'get'
+            }).then(res => {
+                this.dataInfo(res.data)
+            });
+        },
+        goBack() {
+            this.visible = false
+            this.$emit('refreshDataList', true)
+        },
+        changeData(model, index) {
+            this.isEdit = false
+            this.childIndex = index
+            let modelAll = model.split("-");
+            let faceMode = "";
+            for (let i = 0; i < modelAll.length; i++) {
+                faceMode += modelAll[i];
+            }
+            for (let key in this.interfaceRes) {
+                if (key != faceMode) {
+                    let faceReList = this.interfaceRes[key]
+                    for (let i = 0; i < faceReList.length; i++) {
+                        if (faceReList[i].relationField == model) {
+                            let options = 'get' + key + 'Options';
+                            if (this[options]) {
+                                this[options]()
+                            }
+                            this.changeData(key, index)
+                        }
+                    }
+                }
+            }
+        },
+        changeDataFormData(type, data, model, index, defaultValue, edit) {
+            if (!edit) {
+                if (type == 2) {
+                    for (let i = 0; i < this.dataForm[data].length; i++) {
+                        if (index == -1) {
+                            this.dataForm[data][i][model] = defaultValue
+                        } else if (index == i) {
+                            this.dataForm[data][i][model] = defaultValue
+                        }
+                    }
+                } else {
+                    this.dataForm[data] = defaultValue
+                }
+            }
+        },
+        dataAll() {
+        },
+        clearData() {
+            this.dataForm = JSON.parse(JSON.stringify(this.dataValueAll))
+        },
+        init(id, isDetail, allList, leftTreeActiveInfo) {
+            this.prevDis = false
+            this.nextDis = false
+            this.allList = allList || []
+            if (allList.length) {
+                this.index = this.allList.findIndex(item => item.id === id)
+                if (this.index == 0) {
+                    this.prevDis = true
+                }
+                if (this.index == this.allList.length - 1) {
+                    this.nextDis = true
+                }
+            } else {
+                this.prevDis = true
+                this.nextDis = true
+            }
+            this.dataForm.id = id || 0;
+            this.visible = true;
+            this.$nextTick(() => {
+                if (this.dataForm.id) {
+                    this.loading = true
+                    request({
+                        url: '/api/jnpf/MpActivityApi/' + this.dataForm.id,
+                        method: 'get'
+                    }).then(res => {
+                        this.dataInfo(res.data)
+                        this.loading = false
+                    });
+                } else {
+                    this.clearData()
+                    this.initDefaultData()
+                    this.dataForm = { ...this.dataForm, ...leftTreeActiveInfo }
+                }
+            });
+            this.$store.commit('generator/UPDATE_RELATION_DATA', {})
+        },
+        //初始化默认数据
+        initDefaultData() {
+
+        },
+        // 表单提交
+        dataFormSubmit(type) {
+            this.dataFormSubmitType = type ? type : 0
+            this.$refs['formRef'].validate((valid) => {
+                if (valid) {
+                    this.request()
+                }
+            })
+        },
+        request() {
+            let _data = this.dataList()
+            if (this.dataFormSubmitType == 2) {
+                this.continueBtnLoading = true
+            } else {
+                this.btnLoading = true
+            }
+            if (!this.dataForm.id) {
+                request({
+                    url: '/api/jnpf/MpActivityApi',
+                    method: 'post',
+                    data: _data
+                }).then((res) => {
+                    this.$message({
+                        message: res.msg,
+                        type: 'success',
+                        duration: 1000,
+                        onClose: () => {
+                            if (this.dataFormSubmitType == 2) {
+                                this.$nextTick(() => {
+                                    this.clearData()
+                                    this.initDefaultData()
+                                })
+                                this.continueBtnLoading = false
+                                return
+                            }
+                            this.visible = false
+                            this.btnLoading = false
+                            this.$emit('refresh', true)
+                        }
+                    })
+                }).catch(() => {
+                    this.btnLoading = false
+                    this.continueBtnLoading = false
+                })
+            } else {
+                request({
+                    url: '/api/jnpf/MpActivityApi/' + this.dataForm.id,
+                    method: 'PUT',
+                    data: _data
+                }).then((res) => {
+                    this.$message({
+                        message: res.msg,
+                        type: 'success',
+                        duration: 1000,
+                        onClose: () => {
+                            if (this.dataFormSubmitType == 2) return this.continueBtnLoading = false
+                            this.visible = false
+                            this.btnLoading = false
+                            this.$emit('refresh', true)
+                        }
+                    })
+                }).catch(() => {
+                    this.btnLoading = false
+                    this.continueBtnLoading = false
+                })
+            }
+        },
+        openSelectDialog(key, value) {
+            this.currTableConf = this.addTableConf[key + value]
+            this.currVmodel = key
+            this.selectDialogVisible = true
+            this.$nextTick(() => {
+                this.$refs.selectDialog.init()
+            })
+        },
+        addForSelect(data) {
+            this.closeForSelect()
+            for (let i = 0; i < data.length; i++) {
+                let t = data[i]
+                if (this['get' + this.currVmodel]) {
+                    this['get' + this.currVmodel](t, true)
+                }
+            }
+        },
+        closeForSelect() {
+            this.selectDialogVisible = false
+        },
+        dateTime(timeRule, timeType, timeTarget, timeValueData, dataValue) {
+            let timeDataValue = null;
+            let timeValue = Number(timeValueData)
+            if (timeRule) {
+                if (timeType == 1) {
+                    timeDataValue = timeValue
+                } else if (timeType == 2) {
+                    timeDataValue = dataValue
+                } else if (timeType == 3) {
+                    timeDataValue = new Date().getTime()
+                } else if (timeType == 4) {
+                    let previousDate = '';
+                    if (timeTarget == 1 || timeTarget == 2) {
+                        previousDate = getDateDay(timeTarget, timeType, timeValue)
+                        timeDataValue = new Date(previousDate).getTime()
+                    } else if (timeTarget == 3) {
+                        previousDate = getBeforeData(timeValue)
+                        timeDataValue = new Date(previousDate).getTime()
+                    } else {
+                        timeDataValue = getBeforeTime(timeTarget, timeValue).getTime()
+                    }
+                } else if (timeType == 5) {
+                    let previousDate = '';
+                    if (timeTarget == 1 || timeTarget == 2) {
+                        previousDate = getDateDay(timeTarget, timeType, timeValue)
+                        timeDataValue = new Date(previousDate).getTime()
+                    } else if (timeTarget == 3) {
+                        previousDate = getLaterData(timeValue)
+                        timeDataValue = new Date(previousDate).getTime()
+                    } else {
+                        timeDataValue = getLaterTime(timeTarget, timeValue).getTime()
+                    }
+                }
+            }
+            return timeDataValue;
+        },
+        time(timeRule, timeType, timeTarget, timeValue, formatType, dataValue) {
+            let format = formatType == 'HH:mm' ? 'HH:mm:00' : formatType
+            let timeDataValue = null
+            if (timeRule) {
+                if (timeType == 1) {
+                    timeDataValue = timeValue || '00:00:00'
+                    if (timeDataValue.split(':').length == 3) {
+                        timeDataValue = timeDataValue
+                    } else {
+                        timeDataValue = timeDataValue + ':00'
+                    }
+                } else if (timeType == 2) {
+                    timeDataValue = dataValue
+                } else if (timeType == 3) {
+                    timeDataValue = this.jnpf.toDate(new Date(), format)
+                } else if (timeType == 4) {
+                    let previousDate = '';
+                    previousDate = getBeforeTime(timeTarget, timeValue)
+                    timeDataValue = this.jnpf.toDate(previousDate, format)
+                } else if (timeType == 5) {
+                    let previousDate = '';
+                    previousDate = getLaterTime(timeTarget, timeValue)
+                    timeDataValue = this.jnpf.toDate(previousDate, format)
+                }
+            }
+            return timeDataValue;
+        },
+        dataList() {
+            var _data = this.dataForm;
+            return _data;
+        },
+        dataInfo(dataAll) {
+            let _dataAll = dataAll
+            this.dataForm = _dataAll
+            this.isEdit = true
+            this.dataAll()
+            this.childIndex = -1
+        },
+    },
+}
+
+</script>

+ 509 - 0
src/views/governmentCloud/officialAccount/mpActivityApi/index.vue

@@ -0,0 +1,509 @@
+<template>
+    <div class="JNPF-common-layout">
+        <div class="JNPF-common-layout-center">
+            <el-row class="JNPF-common-search-box" :gutter="16">
+                <el-form @submit.native.prevent>
+                    <el-col :span="6">
+                        <el-form-item label="名称">
+                            <el-input v-model="query.name" placeholder="请输入" clearable> </el-input>
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="6">
+                        <el-form-item label="API">
+                            <el-input v-model="query.api" placeholder="请输入" clearable> </el-input>
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="6">
+                        <el-form-item>
+                            <el-button type="primary" icon="el-icon-search"
+                                @click="search()">查询</el-button>
+                            <el-button icon="el-icon-refresh-right" @click="reset()">重置</el-button>
+                        </el-form-item>
+                    </el-col>
+                </el-form>
+            </el-row>
+            <div class="JNPF-common-layout-main JNPF-flex-main">
+                <div class="JNPF-common-head">
+                    <div>
+                        <el-button type="primary" icon="icon-ym icon-ym-btn-add"
+                            @click="addOrUpdateHandle()">新增
+                        </el-button>
+                    </div>
+                    <div class="JNPF-common-head-right">
+                        <el-tooltip content="高级查询" placement="top" v-if="true">
+                            <el-link icon="icon-ym icon-ym-filter JNPF-common-head-icon"
+                                :underline="false" @click="openSuperQuery()" />
+                        </el-tooltip>
+                        <el-tooltip effect="dark" :content="$t('common.refresh')" placement="top">
+                            <el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon"
+                                :underline="false" @click="initData()" />
+                        </el-tooltip>
+                    </div>
+                </div>
+                <JNPF-table v-loading="listLoading" :data="list" @sort-change='handleTableSort'
+                    :header-cell-class-name="handleHeaderClass" :has-c="hasBatchBtn"
+                    @selection-change="handleSelectionChange" :span-method="arraySpanMethod">
+                    <el-table-column prop="name" label="名称" align="left" show-overflow-tooltip>
+                        <template slot-scope="scope">
+                            <JnpfInput v-model="scope.row.name" detailed showOverflow />
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="api" label="API" align="left" show-overflow-tooltip>
+                        <template slot-scope="scope">
+                            <JnpfInput v-model="scope.row.api" detailed showOverflow />
+                        </template>
+                    </el-table-column>
+                    <el-table-column label="操作" fixed="right" width="150">
+                        <template slot-scope="scope">
+                            <el-button type="text" @click="addOrUpdateHandle(scope.row)">编辑
+                            </el-button>
+                            <el-button type="text" class="JNPF-table-delBtn"
+                                @click="handleDel(scope.row.id)">删除
+                            </el-button>
+                            <el-button type="text" @click="goDetail(scope.row.id)">详情
+                            </el-button>
+                        </template>
+                    </el-table-column>
+                </JNPF-table>
+                <pagination :total="total" :page.sync="listQuery.currentPage"
+                    :limit.sync="listQuery.pageSize" @pagination="initData" />
+            </div>
+        </div>
+        <JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" />
+        <ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" />
+
+        <ImportBox v-if="uploadBoxVisible" ref="UploadBox" @refresh="initData" />
+        <Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false" />
+        <ToFormDetail v-if="toFormDetailVisible" ref="toFormDetail"
+            @close="toFormDetailVisible = false" />
+        <SuperQuery v-if="superQueryVisible" ref="SuperQuery" :columnOptions="superQueryJson"
+            @superQuery="superQuery" />
+    </div>
+</template>
+
+<script>
+import request from '@/utils/request'
+import { mapGetters } from "vuex";
+import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
+import JNPFForm from './form'
+import Detail from './Detail'
+import ExportBox from '@/components/ExportBox'
+import ToFormDetail from '@/views/basic/dynamicModel/list/detail'
+import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
+import { getConfigData } from '@/api/onlineDev/visualDev'
+import { getDefaultCurrentValueUserIdAsync } from '@/api/permission/user'
+import { getDefaultCurrentValueDepartmentIdAsync } from '@/api/permission/organize'
+import columnList from './columnList'
+import { thousandsFormat } from "@/components/Generator/utils/index"
+import SuperQuery from '@/components/SuperQuery'
+import superQueryJson from './superQueryJson'
+import { noGroupList } from '@/components/Generator/generator/comConfig'
+
+export default {
+    components: {
+        JNPFForm,
+        Detail,
+        ExportBox, ToFormDetail, SuperQuery
+    },
+    data() {
+        return {
+            keyword: '',
+            expandsTree: true,
+            refreshTree: true,
+            toFormDetailVisible: false,
+            hasBatchBtn: false,
+            expandObj: {},
+            columnOptions: [],
+            mergeList: [],
+            exportList: [],
+            columnList,
+
+            superQueryVisible: false,
+            superQueryJson,
+            uploadBoxVisible: false,
+            detailVisible: false,
+            query: {
+                name: undefined,
+                api: undefined,
+            },
+            defListQuery: {
+                sort: 'desc',
+                sidx: '',
+            },
+            //排序默认值
+            defaultSortConfig: [],
+            treeProps: {
+                children: 'children',
+                label: 'fullName',
+                value: 'id',
+                isLeaf: 'isLeaf'
+            },
+            list: [],
+            listLoading: true,
+            multipleSelection: [],
+            total: 0,
+            queryData: {},
+            listQuery: {
+                superQueryJson: '',
+                currentPage: 1,
+                pageSize: 20,
+                sort: "",
+                sidx: "",
+            },
+            //多列排序
+            ordersList: [],
+            formVisible: false,
+            flowVisible: false,
+            flowListVisible: false,
+            flowList: [],
+            exportBoxVisible: false,
+            interfaceRes: {
+            },
+            //掩码配置
+            maskConfig: {
+                name: { "prefixType": 1, "useUnrealMask": false, "maskType": 1, "unrealMaskLength": 1, "prefixLimit": 0, "suffixLimit": 0, "filler": "*", "prefixSpecifyChar": "", "suffixType": 1, "ignoreChar": "", "suffixSpecifyChar": "" },
+                api: { "prefixType": 1, "useUnrealMask": false, "maskType": 1, "unrealMaskLength": 1, "prefixLimit": 0, "suffixLimit": 0, "filler": "*", "prefixSpecifyChar": "", "suffixType": 1, "ignoreChar": "", "suffixSpecifyChar": "" },
+            },
+        }
+    },
+    computed: {
+        ...mapGetters(['userInfo']),
+        menuId() {
+            return this.$route.meta.modelId || ''
+        }
+    },
+    created() {
+        this.getColumnList(),
+            this.initSearchDataAndListData()
+        this.queryData = JSON.parse(JSON.stringify(this.query))
+        this.getHasBatchBtn();
+        //排序默认值
+        this.setDefaultQuery(this.defaultSortConfig);
+    },
+    methods: {
+        getHasBatchBtn() {
+            let btnsList = []
+            this.hasBatchBtn = btnsList.some(o => ['batchRemove', 'batchPrint', 'download'].includes(o))
+        },
+
+        treeRefresh() {
+            this.keyword = ''
+            this.treeActiveId = ''
+            this.leftTreeActiveInfo = {}
+            this.$refs.treeBox.setCurrentKey(null)
+            this.getTreeView()
+        },
+
+        toDetail(defaultValue, modelId) {
+            if (!defaultValue) return
+            getConfigData(modelId).then(res => {
+                if (!res.data || !res.data.formData) return
+                let formData = JSON.parse(res.data.formData)
+                formData.popupType = 'general'
+                this.toFormDetailVisible = true
+                this.$nextTick(() => {
+                    this.$refs.toFormDetail.init(formData, modelId, defaultValue)
+                })
+            })
+        },
+        toggleTreeExpand(expands) {
+            this.refreshTree = false
+            this.expandsTree = expands
+            this.$nextTick(() => {
+                this.refreshTree = true
+                this.$nextTick(() => {
+                    this.$refs.treeBox.setCurrentKey(null)
+                })
+            })
+        },
+        filterNode(value, data) {
+            if (!value) return true;
+            return data[this.treeProps.label].indexOf(value) !== -1;
+        },
+        loadNode(node, resolve) {
+            const nodeData = node.data
+            const config = {
+                treeInterfaceId: "",
+                treeTemplateJson: []
+            }
+            if (config.treeInterfaceId) {
+                //这里是为了拿到参数中关联的字段的值,后端自行拿
+                if (config.treeTemplateJson && config.treeTemplateJson.length) {
+                    for (let i = 0; i < config.treeTemplateJson.length; i++) {
+                        const element = config.treeTemplateJson[i];
+                        element.defaultValue = nodeData[element.relationField] || ''
+                    }
+                }
+                //参数
+                let query = {
+                    paramList: config.treeTemplateJson || [],
+                }
+                //接口
+                getDataInterfaceRes(config.treeInterfaceId, query).then(res => {
+                    let data = res.data
+                    if (Array.isArray(data)) {
+                        resolve(data);
+                    } else {
+                        resolve([]);
+                    }
+                })
+            }
+        },
+        getColumnList() {
+            // 没有开启权限
+            this.columnOptions = this.transformColumnList(this.columnList)
+        },
+        transformColumnList(columnList) {
+            let list = []
+            for (let i = 0; i < columnList.length; i++) {
+                const e = columnList[i];
+                if (!e.prop.includes('-')) {
+                    list.push(e)
+                } else {
+                    let prop = e.prop.split('-')[0]
+                    let label = e.label.split('-')[0]
+                    let vModel = e.prop.split('-')[1]
+                    let newItem = {
+                        align: "center",
+                        jnpfKey: "table",
+                        prop,
+                        label,
+                        children: []
+                    }
+                    e.vModel = vModel
+                    if (!this.expandObj.hasOwnProperty(`${prop}Expand`)) this.$set(this.expandObj, `${prop}Expand`, false)
+                    if (!list.some(o => o.prop === prop)) list.push(newItem)
+                    for (let i = 0; i < list.length; i++) {
+                        if (list[i].prop === prop) {
+                            list[i].children.push(e)
+                            break
+                        }
+                    }
+                }
+            }
+            this.getMergeList(list)
+            this.getExportList(list)
+            return list
+        },
+        arraySpanMethod({ column }) {
+            for (let i = 0; i < this.mergeList.length; i++) {
+                if (column.property == this.mergeList[i].prop) {
+                    return [this.mergeList[i].rowspan, this.mergeList[i].colspan]
+                }
+            }
+        },
+        getMergeList(list) {
+            let newList = JSON.parse(JSON.stringify(list))
+            newList.forEach(item => {
+                if (item.children && item.children.length) {
+                    let child = {
+                        prop: item.prop + '-child-first'
+                    }
+                    item.children.unshift(child)
+                }
+            })
+            newList.forEach(item => {
+                if (item.children && item.children.length) {
+                    item.children.forEach((child, index) => {
+                        if (index == 0) {
+                            this.mergeList.push({
+                                prop: child.prop,
+                                rowspan: 1,
+                                colspan: item.children.length
+                            })
+                        } else {
+                            this.mergeList.push({
+                                prop: child.prop,
+                                rowspan: 0,
+                                colspan: 0
+                            })
+                        }
+                    })
+                } else {
+                    this.mergeList.push({
+                        prop: item.prop,
+                        rowspan: 1,
+                        colspan: 1
+                    })
+                }
+            })
+        },
+        getExportList(list) {
+            let exportList = []
+            for (let i = 0; i < list.length; i++) {
+                if (list[i].jnpfKey === 'table') {
+                    for (let j = 0; j < list[i].children.length; j++) {
+                        exportList.push(list[i].children[j])
+                    }
+                } else {
+                    exportList.push(list[i])
+                }
+            }
+            this.exportList = exportList.filter(o => !noGroupList.includes(o.__config__.jnpfKey))
+        },
+        goDetail(id) {
+            this.detailVisible = true
+            this.$nextTick(() => {
+                this.$refs.Detail.init(id)
+            })
+        },
+        sortChange({ column, prop, order }) {
+            this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
+            this.listQuery.sidx = !order ? '' : prop
+            this.initData()
+        },
+        async initSearchDataAndListData() {
+            await this.initSearchData()
+            this.initData()
+        },
+        //初始化查询的默认数据
+        async initSearchData() {
+        },
+        initData() {
+            // this.queryData = JSON.parse(JSON.stringify(this.query))导致重置失效
+            this.listLoading = true;
+            let _query = {
+                ...this.listQuery,
+                ...this.query,
+                ...this.defListQuery,
+                keyword: this.keyword,
+                dataType: 0,
+                menuId: this.menuId,
+                moduleId: '606844141636163205',
+                type: 1,
+            };
+            request({
+                url: `/api/jnpf/MpActivityApi/getList`,
+                method: 'post',
+                data: _query
+            }).then(res => {
+                if (res.code == 200) {
+                    var _list = [];
+                    for (let i = 0; i < res.data.list.length; i++) {
+                        let _data = res.data.list[i];
+                        _list.push(_data)
+                    }
+                    this.list = _list.map(o => ({
+                        ...o,
+                        ...this.expandObj,
+                    }))
+                    this.total = res.data.pagination.total
+                    this.listLoading = false
+                } else {
+                    this.$message.error(res.msg)
+                }
+            })
+        },
+        handleDel(id) {
+            this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
+                type: 'warning'
+            }).then(() => {
+                request({
+                    url: `/api/jnpf/MpActivityApi/${id}`,
+                    method: 'DELETE'
+                }).then(res => {
+                    this.$message({
+                        type: 'success',
+                        message: res.msg,
+                        onClose: () => {
+                            this.initData()
+                        }
+                    });
+                })
+            }).catch(() => {
+            });
+        },
+        handelUpload() {
+            this.uploadBoxVisible = true
+            this.$nextTick(() => {
+                this.$refs.UploadBox.init("", "jnpf/MpActivityApi", 0, this.flowList)
+            })
+        },
+        openSuperQuery() {
+            this.superQueryVisible = true
+            this.$nextTick(() => {
+                this.$refs.SuperQuery.init()
+            })
+        },
+        superQuery(queryJson) {
+            this.listQuery.superQueryJson = queryJson
+            this.listQuery.currentPage = 1
+            this.initData()
+        },
+        addOrUpdateHandle(row, isDetail) {
+            let id = row ? row.id : ""
+            this.formVisible = true
+            if (!this.treeActiveId) {
+                this.leftTreeActiveInfo = {}
+            }
+            this.$nextTick(() => {
+                this.$refs.JNPFForm.init(id, isDetail, this.list, this.leftTreeActiveInfo)
+            })
+        },
+        exportData() {
+            this.exportBoxVisible = true
+            this.$nextTick(() => {
+                this.$refs.ExportBox.init(this.exportList, this.multipleSelection)
+            })
+        },
+        download(data) {
+            let query = { ...data, ...this.listQuery, ...this.query, menuId: this.menuId }
+            request({
+                url: `/api/jnpf/MpActivityApi/Actions/Export`,
+                method: 'post',
+                data: query
+            }).then(res => {
+                if (!res.data.url) return
+                this.jnpf.downloadFile(res.data.url)
+                this.$refs.ExportBox.visible = false
+                this.exportBoxVisible = false
+            })
+        },
+        search() {
+            this.listQuery.currentPage = 1
+            this.listQuery.pageSize = 20
+            this.initData()
+        },
+        refresh(isrRefresh) {
+            this.formVisible = false
+            if (isrRefresh) this.reset()
+        },
+        reset() {
+            this.query = JSON.parse(JSON.stringify(this.queryData))
+            this.search()
+        },
+        colseFlow(isrRefresh) {
+            this.flowVisible = false
+            if (isrRefresh) this.reset()
+        },
+
+        //以下排序相关方法
+        setDefaultQuery(defaultSortList) {
+            const defaultSortConfig = (defaultSortList || []).map(o =>
+                (o.sort === 'desc' ? '-' : '') + o.field);
+            this.defListQuery.sidx = defaultSortConfig.join(',')
+        },
+        handleHeaderClass({ column }) {
+            column.order = column.multiOrder
+        },
+        handleTableSort({ column }) {
+            if (column.sortable !== 'custom') return
+            column.multiOrder = column.multiOrder === 'descending' ? 'ascending' : column.multiOrder ? '' : 'descending';
+            this.handleOrderChange(column.property, column.multiOrder)
+        },
+        handleOrderChange(orderColumn, orderState) {
+            let index = this.ordersList.findIndex(e => e.field === orderColumn);
+            let sort = orderState === 'ascending' ? 'asc' : orderState === 'descending' ? 'desc' : '';
+            if (index > -1) {
+                this.ordersList[index].sort = orderState;
+            } else {
+                this.ordersList.push({ field: orderColumn, sort });
+            }
+            this.ordersList = this.ordersList.filter(e => e.sort);
+            this.ordersList.length ? this.setDefaultQuery(this.ordersList) : this.setDefaultQuery(this.defaultSortConfig)
+            this.initData()
+        },
+        //以上排序相关方法
+    }
+}
+</script>

File diff suppressed because it is too large
+ 0 - 0
src/views/governmentCloud/officialAccount/mpActivityApi/superQueryJson.js


+ 241 - 0
src/views/governmentCloud/officialAccount/userActivityLevel/index.vue

@@ -0,0 +1,241 @@
+<template>
+    <div class="JNPF-common-layout">
+        <div class="JNPF-common-layout-center">
+            <div class="JNPF-common-layout-main">
+                <div class="search-button">
+                    <el-button type="primary" @click="search()">查询</el-button>
+                </div>
+                <div class="form">
+                    <div class="form-item">
+                        <div class="item-title">数据时间</div>
+                        <div class="item-content">
+                            <div class="content-item"
+                                :class="timeNum == item.value ? 'active-content-item' : ''"
+                                v-for="(item,index) in timeList" :key="index"
+                                @click="timeNum = item.value">
+                                {{ item.label }}</div>
+
+                            <el-date-picker style="margin-left: 20px;" v-if="timeNum == 1"
+                                v-model="query.timeRange" type="daterange" range-separator="至"
+                                start-placeholder="开始日期" end-placeholder="结束日期"
+                                value-format="yyyy-MM-dd">
+                            </el-date-picker>
+                            <el-date-picker style="margin-left: 20px;" v-if="timeNum == 2"
+                                v-model="query.timeRange" type="monthrange" range-separator="至"
+                                start-placeholder="开始月份" end-placeholder="结束月份"
+                                value-format="yyyy-MM-dd" @change="(value) => changeMonth(value)">
+                            </el-date-picker>
+                        </div>
+                    </div>
+                    <div class="form-item">
+                        <div class="item-title">用户选择</div>
+                        <div class="item-content">
+                            <div class="content-item"
+                                :class="peopleNum == item.value ? 'active-content-item' : ''"
+                                v-for="(item,index) in peopleList" :key="index"
+                                @click="peopleNum = item.value">
+                                {{ item.label }}</div>
+                            <JnpfUserSelect style="margin-left: 20px;" v-if="peopleNum == 1"
+                                v-model="query.user" placeholder="请选择用户"
+                                :filterIds="hasIssuedUsersList" :filterType="'2'" />
+                        </div>
+                    </div>
+                </div>
+                <div class="chart" v-loading="loading" element-loading-text="加载中">
+                    <div v-if="chartData" id="echarts1" style="width: 100%;height: 100%;"></div>
+                    <el-empty style="height: 100%;" v-else description="暂无数据"></el-empty>
+                </div>
+            </div>
+        </div>
+    </div>
+</template>
+
+
+
+<script>
+
+import {
+    activity, getUserList
+} from "@/api/governmentCloud/officialAccount/userActivityLevel/userActivityLevel";
+export default {
+    data() {
+        return {
+            timeNum: '1',
+            timeList: [
+                {
+                    value: '1',
+                    label: '按日查询',
+                },
+                {
+                    value: '2',
+                    label: '按月查询',
+                }
+            ],
+            peopleNum: 0,
+            peopleList: [
+                {
+                    value: 0,
+                    label: '全部用户',
+                },
+                {
+                    value: 1,
+                    label: '单个用户',
+                }
+            ],
+            query: {
+                user: '',
+                timeRange: ''
+            },
+            chartData: null,
+            loading: false,
+            hasIssuedUsersList: []
+        }
+    },
+    watch: {
+        timeNum() {
+            this.query.timeRange = ''
+        },
+        chartData(newValue, oldValue) {
+            if (newValue) {
+                this.$nextTick(() => {
+                    this.initEchart1()
+                })
+            }
+        }
+    },
+    mounted() {
+        getUserList().then(res => {
+            console.log(res)
+            if (res.code == 200) {
+                res.data.forEach(item => {
+                    this.hasIssuedUsersList.push(item.id)
+                })
+                console.log(this.hasIssuedUsersList)
+            } else { }
+        })
+    },
+    methods: {
+        changeMonth(value) {
+            //查询当前月份月初到月末
+            let myDate = new Date(value[1]);
+            let month = myDate.getMonth() + 1;
+            month = month < 10 ? "0" + month : month;   //格式化月份,补0
+            let dayEnd = new Date(myDate.getFullYear(), month, 0).getDate(); //获取当月一共有多少天
+            value[1] = value[1].split('-')[0] + '-' + value[1].split('-')[1] + '-' + dayEnd
+            this.query.timeRange = [value[0], value[1]]
+        },
+        search() {
+            let str = null
+            if (!this.query.timeRange) {
+                str = '请选择时间'
+            } else if (this.peopleNum == 1 && !this.query.user) {
+                str = '请选择用户'
+            }
+            if (!str) {
+                let params = {
+                    type: this.timeNum,
+                    startDate: this.query.timeRange[0],
+                    endDate: this.query.timeRange[1],
+                    userId: this.peopleNum == 0 ? '' : this.query.user
+                }
+                this.chartData = null
+                this.loading = true
+                activity(params).then(res => {
+                    if (res.code == 200) {
+                        this.chartData = res.data
+                        this.loading = false
+                    } else {
+                        this.$message({ message: res.msg, type: 'error', duration: 1000 })
+                        this.chartData = null
+                        this.loading = false
+                    }
+
+                })
+            } else {
+                this.$message({ message: str, type: 'error', duration: 1000 })
+
+            }
+        },
+        initEchart1() {
+            var chartDom = document.getElementById('echarts1');
+            var myChart = this.$echarts.init(chartDom);
+
+
+            let xData = this.chartData.xlist
+            let data = this.chartData.ylist
+            var option = {
+                xAxis: {
+                    type: 'category',
+                    data: xData
+                },
+                yAxis: {
+                    type: 'value'
+                },
+                tooltip: {
+                    trigger: 'axis'
+                },
+                grid: {
+                    left: '2%',
+                    right: '2%',
+                    bottom: '2%',
+                    containLabel: true
+                },
+                series: [
+                    {
+                        data: data,
+                        type: 'line',
+                        name: '活跃指数'
+                    }
+                ]
+            };
+            myChart.setOption(option);
+        }
+    },
+
+}
+</script>
+
+<style lang="scss" scoped>
+.JNPF-common-layout-main {
+    display: flex;
+    flex-direction: column;
+    .search-button {
+        position: absolute;
+        right: 20px;
+        top: 10px;
+    }
+    .form {
+        width: 100%;
+        padding: 10px 20px;
+        .form-item {
+            font-size: 16px;
+            display: flex;
+            align-items: center;
+            margin-bottom: 20px;
+            .item-title {
+                color: #b1b2b3;
+            }
+            .item-content {
+                margin-left: 30px;
+                display: flex;
+                align-items: center;
+                .content-item {
+                    padding: 10px 30px;
+                    cursor: pointer;
+                    border-radius: 20px;
+                    margin-right: 10px;
+                    text-wrap: nowrap;
+                }
+                .active-content-item {
+                    background-color: #d4e8fb;
+                    color: #409eff;
+                }
+            }
+        }
+    }
+    .chart {
+        height: auto;
+        flex: 1;
+    }
+}
+</style>

+ 1 - 1
src/views/governmentCloud/processConfiguration/Allocation.vue

@@ -4,7 +4,7 @@
         <div class="main">
             <div class="top">
                 <div class="top-title" v-if="visible">
-                    <div style="opacity: 0.5;">ITSM流程接入配置</div> /
+                    <div style="opacity: 0.5;">流程接入配置</div> /
                     <div>表单配置管理</div> /
                     <div style="font-size: 20px;font-weight: bold;"> {{orderDetail.itsmProName}}
                     </div>

+ 6 - 7
src/views/governmentCloud/processConfiguration/Form.vue

@@ -5,7 +5,7 @@
                 <div class="JNPF-common-page-header">
                     <el-page-header @back="goBack" content="" />
                     <div class="header-title">
-                        <div style="opacity: 0.5;">ITSM流程接入配置</div> /
+                        <div style="opacity: 0.5;">流程接入配置</div> /
                         <div>流程信息配置</div> /
                         <div style="font-size: 20px;font-weight: bold;"> {{order.itsmProName}}
                         </div>
@@ -204,15 +204,15 @@
                             </el-col>
 
                         </el-row>
-                        <div class="JNPF-common-layout-main JNPF-flex-main basic-table">
+                        <div class="JNPF-common-layout-main JNPF-flex-main basic-table"
+                            style="overflow-y: auto;">
                             <el-row class="JNPF-common-search-box basic-information" :gutter="16"
                                 style="margin-bottom: 10px;padding-top: 0px;">
-                                <el-col :gutter="16" :span="12" style="height: 100%;">
+                                <el-col :gutter="16" :span="12">
                                     <div class="title">
                                         小程序表单信息
                                     </div>
-                                    <el-table :data="tableData1" :loding="listLoading1"
-                                        height="220px">
+                                    <el-table :data="tableData1" :loding="listLoading1">
                                         <el-table-column prop="index" type="index" width="50"
                                             label="序号" align="center" />
                                         <el-table-column align="center" prop="itsmFieldName"
@@ -228,8 +228,7 @@
                                     <div class="title">
                                         企微表单信息
                                     </div>
-                                    <el-table :data="tableData2" :loding="listLoading2"
-                                        height="220px">
+                                    <el-table :data="tableData2" :loding="listLoading2">
                                         <el-table-column prop="index" type="index" width="50"
                                             label="序号" align="center" />
                                         <el-table-column align="center" prop="itsmFieldName"

+ 28 - 3
src/views/governmentCloud/processConfiguration/index.vue

@@ -128,6 +128,23 @@
                         <el-button type="primary" @click="formSubmit()">确 定</el-button>
                     </span>
                 </el-dialog>
+                <el-dialog title="同步流程" :visible.sync="synchronousFormVisible" width="30%"
+                    :before-close="()=>{synchronousFormVisible = false}">
+                    <el-form @submit.native.prevent>
+                        <el-form-item label="流程名称">
+                            <el-select v-model="form.itsmProName" filterable remote reserve-keyword
+                                placeholder="请输入流程名称(全名)" :remote-method="getProcessList">
+                                <el-option v-for="item in processList" :key="item.id"
+                                    :label="item.processName" :value="item.processName">
+                                </el-option>
+                            </el-select>
+                        </el-form-item>
+                    </el-form>
+                    <span slot="footer" class="dialog-footer">
+                        <el-button @click="synchronousFormVisible = false">取 消</el-button>
+                        <el-button type="primary" @click="synchronousFormSubmit()">确 定</el-button>
+                    </span>
+                </el-dialog>
             </div>
         </div>
         <Form v-if="formVisible" ref="Form" @close="closeForm" />
@@ -150,6 +167,7 @@ export default {
             listLoading: false,
             // organizeIdTree: [],
             addFormVisible: false,
+            synchronousFormVisible: false,
             listQuery: {
                 menuId: "581767763807176197", // 581767763807176197
                 dataType: "0",
@@ -164,7 +182,8 @@ export default {
                 itsmProName: '',
             },
             form: {
-                itsmProName: ''
+                itsmProName: '',
+                version: null
             },
             total: 0,
             formVisible: false,
@@ -257,10 +276,15 @@ export default {
         },
         synchronous(item) {
             console.log(item)
+            this.form.itsmProName = item.itsmProName
+            this.form.version = item.version
+            this.synchronousFormVisible = true
+        },
+        synchronousFormSubmit() {
             let params = {
-                name: item.itsmProName,
+                name: this.form.itsmProName,
                 isFirst: false,
-                baseVersion: item.version
+                baseVersion: this.form.version
             }
             synchronizedProcessByName(params).then(res => {
                 if (res.code == 200) {
@@ -269,6 +293,7 @@ export default {
                         type: "success",
                         duration: 1500
                     });
+                    this.addFormVisible = false
                     this.getList();
                 } else {
                     this.$message({

+ 108 - 52
src/views/governmentCloud/questionnaireInvestigation/IssuedForm.vue

@@ -1,41 +1,57 @@
 <template>
-    <el-dialog :title="'下发'" :close-on-click-modal="false" append-to-body :visible.sync="visible"
-        class="JNPF-dialog JNPF-dialog_center" lock-scroll width="1000px">
+    <el-dialog :title="row.status == 1 ?'下发':'补发'" :close-on-click-modal="false" append-to-body
+        :visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll width="1000px">
         <el-row :gutter="15" class="">
             <el-form ref="formRef" :model="dataForm" :rules="dataRule" size="small"
                 label-width="140px" label-position="right">
                 <template v-if="!loading">
                     <!-- 具体表单 -->
-                    <el-col :span="24">
-                        <jnpf-form-tip-item label="是否匿名" align="left" prop="anonymity">
-                            <el-switch v-model="dataForm.anonymity"></el-switch>
-                        </jnpf-form-tip-item>
-                    </el-col>
-                    <el-col :span="24">
-                        <jnpf-form-tip-item label="是否延迟下发" align="left" prop="delay">
-                            <el-switch v-model="delay"></el-switch>
-                        </jnpf-form-tip-item>
-                    </el-col>
-                    <el-col :span="24" v-if="delay">
-                        <jnpf-form-tip-item label="开始时间" align="left" prop="startTime">
-                            <el-date-picker v-model="dataForm.startTime" type="datetime"
-                                placeholder="选择开始时间" default-time="12:00:00"
-                                value-format="timestamp">
-                            </el-date-picker>
-                        </jnpf-form-tip-item>
-                    </el-col>
-                    <el-col :span="24">
-                        <jnpf-form-tip-item label="结束时间" align="left" prop="endTime">
-                            <el-date-picker v-model="dataForm.endTime" type="datetime"
-                                placeholder="选择结束时间" default-time="12:00:00"
-                                value-format="timestamp">
-                            </el-date-picker>
-                        </jnpf-form-tip-item>
-                    </el-col>
+                    <template v-if="row.status == 1">
+                        <el-col :span="24">
+                            <jnpf-form-tip-item label="是否匿名" align="left" prop="anonymity">
+                                <el-switch v-model="dataForm.anonymity"></el-switch>
+                            </jnpf-form-tip-item>
+                        </el-col>
+                        <el-col :span="24">
+                            <jnpf-form-tip-item label="是否延迟下发" align="left" prop="delay">
+                                <el-switch v-model="delay"></el-switch>
+                            </jnpf-form-tip-item>
+                        </el-col>
+                        <el-col :span="24" v-if="delay">
+                            <jnpf-form-tip-item label="开始时间" align="left" prop="startTime">
+                                <el-date-picker v-model="dataForm.startTime" type="datetime"
+                                    placeholder="选择开始时间" default-time="12:00:00"
+                                    value-format="timestamp">
+                                </el-date-picker>
+                            </jnpf-form-tip-item>
+                        </el-col>
+                        <el-col :span="24">
+                            <jnpf-form-tip-item label="结束时间" align="left" prop="endTime">
+                                <el-date-picker v-model="dataForm.endTime" type="datetime"
+                                    placeholder="选择结束时间" default-time="12:00:00"
+                                    value-format="timestamp">
+                                </el-date-picker>
+                            </jnpf-form-tip-item>
+                        </el-col>
+                    </template>
+                    <template v-else>
+                        <el-col :span="24">
+                            <jnpf-form-tip-item label="开始时间" align="left">
+                                {{getDate(row.startTime)}}
+                            </jnpf-form-tip-item>
+                        </el-col>
+                        <el-col :span="24">
+                            <jnpf-form-tip-item label="结束事件" align="left">
+                                {{getDate(row.endTime)}}
+                            </jnpf-form-tip-item>
+                        </el-col>
+                    </template>
+
                     <el-col :span="24">
                         <jnpf-form-tip-item label="人员" align="left" prop="userIds">
                             <JnpfUserSelect v-model="dataForm.userIds" class="item"
-                                placeholder="请选择人员" clearable :ableIds="ableIds" :multiple="true" />
+                                placeholder="请选择人员" clearable :ableIds="ableIds" :multiple="true"
+                                :filterIds="hasIssuedUsersList" />
                         </jnpf-form-tip-item>
                     </el-col>
 
@@ -56,8 +72,10 @@
 <script>
 import request from '@/utils/request'
 import { mapGetters } from "vuex";
+import dayjs from 'dayjs'
+
 import {
-    IssuedQuestionnaire
+    IssuedQuestionnaire, getQuestionnaireUser
 } from "@/api/governmentCloud/questionnaireInvestigation/questionnaireInvestigation";
 
 
@@ -118,7 +136,9 @@ export default {
                 value: 'id',             // ID字段名
                 label: 'name',       // 显示名称
                 children: 'children',    // 子级字段名
-            }
+            },
+            hasIssuedUsersList: [],
+            row: null
         }
     },
     computed: {
@@ -133,19 +153,32 @@ export default {
     },
     mounted() { },
     methods: {
+        getDate(time) {
+            let str = time ? dayjs(time).format('YYYY-MM-DD HH:mm:ss') : '无数据'
+            return str
+        },
         dataAll() {
         },
         clearData() {
             this.dataForm = JSON.parse(JSON.stringify(this.dataValueAll))
         },
-        init(id) {
+        init(row) {
             this.loading = true
             this.clearData()
-            if (id) {
-                this.dataForm.questionnaireId = id
+
+            this.row = row
+
+            if (row.id) {
+                this.dataForm.questionnaireId = row.id
             }
-            this.loading = false
-            this.visible = true;
+
+
+            getQuestionnaireUser(row.id).then(res => {
+                this.hasIssuedUsersList = res.data
+                this.loading = false
+                this.visible = true;
+            })
+
         },
 
         // 表单提交
@@ -157,25 +190,48 @@ export default {
             })
         },
         request() {
-            let _data = this.dataList()
+            let _data = null
+            if (this.row.status == 1) {
+                _data = this.dataList()
 
-            if (!this.delay) {
-                delete _data.startTime
+                if (!this.delay) {
+                    delete _data.startTime
+                }
+                this.btnLoading = true
+            } else {
+                console.log(this.row)
+                _data = {
+                    anonymity: this.row.anonymity,
+                    endTime: this.row.endTime,
+                    userIds: this.dataList().userIds,
+                    questionnaireId: this.row.id
+                }
             }
-            this.btnLoading = true
+
             IssuedQuestionnaire(_data).then((res) => {
-                this.$message({
-                    message: '下发成功',
-                    type: 'success',
-                    duration: 1000,
-                    onClose: () => {
-                        this.visible = false
-                        this.btnLoading = false
-                        this.clearData()
-                        this.$emit('close')
-
-                    }
-                })
+                if (res.code == 200) {
+                    this.$message({
+                        message: '下发成功',
+                        type: 'success',
+                        duration: 1000,
+                        onClose: () => {
+                            this.visible = false
+                            this.btnLoading = false
+                            this.clearData()
+                            this.$emit('close')
+
+                        }
+                    })
+                } else {
+                    this.$message({
+                        message: res.msg,
+                        type: 'warning',
+                        duration: 1000,
+                    })
+                    this.btnLoading = false
+
+                }
+
             }).catch(() => {
                 this.btnLoading = false
                 this.continueBtnLoading = false

+ 247 - 43
src/views/governmentCloud/questionnaireInvestigation/Statistics.vue

@@ -3,21 +3,22 @@
         :show-close="false" :modal="false">
 
         <div class="JNPF-common-layout">
-            <div class="JNPF-common-layout-center">
+            <div class="JNPF-common-layout-center" v-if="visible">
                 <div class="top">
-                    <div class="top-title" v-if="visible">
+                    <div class="top-title">
                         <div style="opacity: 0.5;">问卷统计</div> /
                         <div style="font-size: 20px;font-weight: bold;margin-right: 30px;">
-                            {{questionnaire.name}}
+                            {{questionnaire.topic}}
                         </div>
-                        <el-tag style="margin-right: 20px;">匿名</el-tag>
+                        <el-tag style="margin-right: 20px;"
+                            v-if="questionnaire.anonymity">匿名</el-tag>
                         <div>
                             <span>下发数量:</span>
-                            <span>100</span>
+                            <span>{{ questionnaire.pushCount }}</span>
                         </div>
                         <div>
                             <span>收回数量:</span>
-                            <span>100</span>
+                            <span>{{ questionnaire.retractCount }}</span>
                         </div>
                         <div>
                             <span>结束倒计时:</span>
@@ -30,39 +31,96 @@
                         </el-button>
                     </div>
                 </div>
+                <el-row class="JNPF-common-search-box" :gutter="16">
+                    <el-form @submit.native.prevent>
+                        <el-col :span="6">
+                            <el-form-item label="题目标题">
+                                <el-input v-model="query.title" placeholder="请输入问卷标题" clearable>
+                                </el-input>
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="6">
+                            <el-form-item>
+                                <el-button type="primary" icon="el-icon-search"
+                                    @click="getList()">查询</el-button>
+                                <el-button icon="el-icon-refresh-right"
+                                    @click="reset()">重置</el-button>
+                            </el-form-item>
+                        </el-col>
+                    </el-form>
+                </el-row>
                 <div class="JNPF-common-layout-main JNPF-flex-main">
-                    <JNPF-table v-loading="listLoading" :data="tableData">
-                        <el-table-column prop="num" label="题号" align="left" show-overflow-tooltip>
+                    <JNPF-table v-loading="listLoading" :data="tableData" :hasNO="false">
+                        <el-table-column prop="questionNumber" label="题号" align="center" width="100"
+                            show-overflow-tooltip>
                         </el-table-column>
                         <el-table-column prop="title" label="题目" align="left" show-overflow-tooltip>
                         </el-table-column>
-                        <el-table-column prop="" label="题目类型" align="left" show-overflow-tooltip>
+                        <el-table-column prop="" label="题目类型" align="center" show-overflow-tooltip>
+                            <template slot-scope="scope">
+                                <el-tag type="primary"
+                                    v-if="scope.row.code.split('_')[0] =='TEXTAREA'">
+                                    {{ getQuestionType(scope.row.code.split('_')[0]) }}</el-tag>
+                                <el-tag type="warning"
+                                    v-else-if="scope.row.code.split('_')[0] =='RADIO'">
+                                    {{ getQuestionType(scope.row.code.split('_')[0]) }}</el-tag>
+                                <el-tag type="success"
+                                    v-else-if="scope.row.code.split('_')[0] =='CHECKBOX'">
+                                    {{ getQuestionType(scope.row.code.split('_')[0]) }}</el-tag>
+                            </template>
                         </el-table-column>
                         <el-table-column prop="" label="选项" align="left" show-overflow-tooltip>
+                            <template slot-scope="scope">
+                                <span v-if="!scope.row.questionnaireOption.length">--</span>
+                                <template v-else>
+                                    <div v-for="(item,index) in scope.row.questionnaireOption"
+                                        :key="index">{{  item.optionContent}}
+                                    </div>
+                                </template>
+                            </template>
                         </el-table-column>
-                        <el-table-column prop="" label="各选项数量" align="left" show-overflow-tooltip>
+                        <el-table-column prop="" label="各选项数量" align="center" show-overflow-tooltip>
+                            <template slot-scope="scope">
+                                <span v-if="!scope.row.questionnaireOption.length">--</span>
+                                <template v-else>
+                                    <div v-for="(item,index) in scope.row.questionnaireOption"
+                                        :key="index">
+                                        {{  item.questionnaireOptionSubCount}}</div>
+                                </template>
+                            </template>
                         </el-table-column>
-                        <el-table-column prop="" label="百分比" align="left" show-overflow-tooltip>
+                        <el-table-column prop="" label="百分比" align="center" show-overflow-tooltip>
+                            <template slot-scope="scope">
+                                <span v-if="!scope.row.questionnaireOption.length">--</span>
+                                <template v-else>
+                                    <div v-for="(item,index) in scope.row.questionnaireOption"
+                                        :key="index">
+                                        {{  item.percentage}}</div>
+                                </template>
+                            </template>
                         </el-table-column>
                         <el-table-column label="操作" fixed="right" width="150">
                             <template slot-scope="scope">
-                                <el-button type="text" @click="openChart(scope.row)">预览
+                                <el-button type="text" v-if="scope.row.questionnaireOption.length"
+                                    @click="openChart(scope.row)">预览
                                 </el-button>
-                                <el-button type="text" @click="openStatistics(scope.row.id)">详情
+                                <el-button type="text" @click="openAnswerList(scope.row)">详情
                                 </el-button>
                             </template>
                         </el-table-column>
                     </JNPF-table>
-                    <pagination :total="total" :page.sync="query.currentPage"
-                        :limit.sync="query.pageSize" @pagination="getList" />
+                    <pagination :total="total" :page.sync="query.current" :limit.sync="query.szie"
+                        @pagination="getList" />
                 </div>
             </div>
         </div>
         <div class="dialogChart">
-            <el-dialog title="收货地址" :visible.sync="dialogChartVisible" :modal="false">
-                <div class="" style="height: 300px"></div>
+            <el-dialog title="题目预览" :visible.sync="dialogChartVisible" :modal="false">
+                <div id="basic_dashboard" style="width: 100%;height: 400px;"></div>
             </el-dialog>
         </div>
+        <titleDetails v-if="titleDetailsVisible" ref="titleDetails" @close="closeTitleDetails" />
+
     </el-dialog>
 </template>
 
@@ -70,44 +128,150 @@
 
 import mixin from '@/mixins/generator/form'
 import dayjs from 'dayjs'
+import titleDetails from './titleDetails.vue'
+
 
 import {
-    getSuggestionsList
-} from "@/api/governmentCloud/suggestions/suggestions";
-import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
+    getQuestionnaireStats
+} from "@/api/governmentCloud/questionnaireInvestigation/questionnaireInvestigation";
 
 
 export default {
     mixins: [mixin],
-    components: {},
+    components: { titleDetails },
     data() {
         return {
             visible: false,
             showContent: false,
-            questionnaire: {
-                name: '默认问卷'
-            },
             countSecond: null,
-            endDate: 1725089581000,
+            endDate: null,
             listLoading: false,
-            tableData: [{
-                title: '123',
-                num: 1
-            }],
+            tableData: [],
             total: 0,
             query: {
-                currentPage: 1,
-                pageSize: 20,
-                dataType: "0"
+                current: 1,
+                size: 20,
+                dataType: "0",
+                sidx: "-createTime",
+                title: null
             },
-            dialogChartVisible: false
+            titleDetailsVisible: false,
+            dialogChartVisible: false,
+            questionnaire: null,
         }
     },
     async created() {
-
-
     },
     methods: {
+        openAnswerList(item) {
+            this.titleDetailsVisible = true
+            this.$nextTick(() => {
+                this.$refs.titleDetails.init(item, this.questionnaire.id)
+            })
+        },
+        closeTitleDetails() {
+            this.titleDetailsVisible = false
+        },
+        basic_dashboard_type(item) {
+            var chartDom = document.getElementById('basic_dashboard');
+            var myChart = this.$echarts.init(chartDom);
+
+            // 组装选项数据
+            let data = []
+            item.questionnaireOption.forEach(element => {
+                data.push(
+                    { value: element.questionnaireOptionSubCount, name: element.optionContent },
+                )
+            });
+
+
+            var option = {
+                title: {
+                    text: item.title,
+                    subtext: '选项比例',
+                    left: 'center'
+                },
+                tooltip: {
+                    trigger: 'item'
+                },
+                legend: {
+                    orient: 'horizontal',
+                    right: 'center',
+                    bottom: '5%'
+                },
+                series: [
+                    {
+                        name: '题目预览',
+                        type: 'pie',
+                        radius: '50%',
+                        data: data,
+                        emphasis: {
+                            itemStyle: {
+                                shadowBlur: 10,
+                                shadowOffsetX: 0,
+                                shadowColor: 'rgba(0, 0, 0, 0.5)'
+                            }
+                        }
+                    }
+                ]
+            };
+            myChart.setOption(option);
+        },
+        basic_dashboard_type2(item) {
+            var chartDom = document.getElementById('basic_dashboard');
+            var myChart = this.$echarts.init(chartDom);
+
+            let xData = item.questionnaireOption.map(element => {
+                return element.optionContent
+            })
+            let yData = item.questionnaireOption.map(element => {
+                return element.questionnaireOptionSubCount
+            })
+
+            var option = {
+                title: {
+                    text: item.title,
+                    subtext: '选项比例',
+                    left: 'center'
+                },
+                tooltip: {
+                    trigger: 'item'
+                },
+                legend: {
+                    orient: 'horizontal',
+                    right: 'center',
+                    bottom: '5%'
+                },
+                xAxis: {
+                    type: 'category',
+                    data: xData
+                },
+                yAxis: {
+                    type: 'value'
+                },
+                series: [
+                    {
+                        data: yData,
+                        type: 'bar',
+                        barWidth: '30',
+                        itemStyle: {
+                            // 可以在此设置柱子的样式
+                        }
+                    }
+                ]
+            };
+            myChart.setOption(option);
+        },
+        reset() {
+            this.query = {
+                current: 1,
+                size: 20,
+                dataType: "0",
+                sidx: "-createTime",
+                title: null
+            }
+            this.getList()
+        },
         getDate(time) {
             let str = time ? dayjs(time).format('YYYY-MM-DD HH:mm:ss') : '无数据'
             return str
@@ -119,6 +283,7 @@ export default {
             let end = Number(endDate);
             //let endDate = new Date(this.assistActivityEndTime); // this.assistActivityEndTime需要倒计时的日期
             let leftTime = end - now; // 倒计时时间差
+
             // 定义变量 d,h,m,s保存倒计时的时间
             if (leftTime >= 0) {
                 // 天
@@ -141,7 +306,7 @@ export default {
                 this.min = "00";
                 this.second = "00";
                 this.countSecond = this.hour + ':' + this.min + ':' + this.second
-
+                this.countSecond = '已结束'
             }
             // 等于0的时候不调用
             if (
@@ -159,23 +324,62 @@ export default {
                 setTimeout(this.countTime, 1000);
             }
         },
-        async init(id) {
-            this.visible = true
+        getQuestionType(type) {
+            console.log(type)
+            let str = ''
+            if (type == 'TEXTAREA') {
+                str = '多行输入'
+            } else if (type == 'RADIO') {
+                str = '单选'
+            } else if (type == 'CHECKBOX') {
+                str = '多选'
+            }
+            return str
+        },
+        async init(questionnaire) {
+            this.questionnaire = questionnaire
+            console.log(this.questionnaire)
             this.getList()
-            this.countTime()
         },
         //返回列表页面
         closeDialog() {
             this.$emit("close");
         },
         getList() {
+            let params = {
+                ...this.query,
+                id: this.questionnaire.id
+            }
             this.listLoading = true;
-            setTimeout(() => {
-                this.listLoading = false
-            }, 1000)
+            getQuestionnaireStats(params).then(res => {
+                console.log(res)
+                if (res.code == 200) {
+                    this.tableData = res.data.questionnaireTopic
+
+                    console.log(this.tableData)
+
+                    this.questionnaire.retractCount = res.data.retractCount
+                    this.questionnaire.pushCount = res.data.pushCount
+                    this.total = res.data.total
+                    this.endDate = res.data.endTime
+                    this.listLoading = false
+                    this.visible = true
+
+                    this.countTime()
+
+                } else {
+                    this.listLoading = false
+                }
+            })
+
         },
-        openChart() {
+        openChart(questionnaire) {
             this.dialogChartVisible = true
+            console.log(questionnaire)
+            this.$nextTick(() => {
+                if (questionnaire.type == "RADIO") this.basic_dashboard_type(questionnaire)
+                if (questionnaire.type == "CHECKBOX") this.basic_dashboard_type2(questionnaire)
+            })
         }
     },
 }

+ 103 - 21
src/views/governmentCloud/questionnaireInvestigation/index.vue

@@ -5,17 +5,17 @@
                 <el-form @submit.native.prevent>
                     <el-col :span="6">
                         <el-form-item label="问卷标题">
-                            <el-input v-model="query.title" placeholder="请输入问卷标题" clearable>
+                            <el-input v-model="query.topic" placeholder="请输入问卷标题" clearable>
                             </el-input>
                         </el-form-item>
                     </el-col>
-                    <!-- <el-col :span="6">
+                    <el-col :span="6">
                         <el-form-item label="状态">
-                            <JnpfSelect v-model="query.method" placeholder="请选择" clearable
-                                :options="methodOptions" :props="methodProps" multiple>
+                            <JnpfSelect v-model="query.status" placeholder="请选择问卷状态" clearable
+                                :options="typeList" :props="methodProps">
                             </JnpfSelect>
                         </el-form-item>
-                    </el-col> -->
+                    </el-col>
                     <el-col :span="6">
                         <el-form-item>
                             <el-button type="primary" icon="el-icon-search"
@@ -31,6 +31,9 @@
                         <el-button type="primary" icon="icon-ym icon-ym-btn-add"
                             @click="openAllocation()">新增
                         </el-button>
+                        <el-button type="danger" icon="icon-ym el-icon-delete"
+                            @click="deleteQuestion()">删除
+                        </el-button>
                     </div>
                     <div class="JNPF-common-head-right">
                         <el-tooltip effect="dark" :content="$t('common.refresh')" placement="top">
@@ -39,7 +42,10 @@
                         </el-tooltip>
                     </div>
                 </div>
-                <JNPF-table v-loading="listLoading" :data="tableData">
+                <JNPF-table v-loading="listLoading" :data="tableData"
+                    @selection-change="handleSelectionChange">
+                    <el-table-column type="selection" width="55" align="center">
+                    </el-table-column>
                     <el-table-column prop="topic" label="问卷标题" align="left" show-overflow-tooltip>
                     </el-table-column>
                     <el-table-column prop="createBy" label="创建人" align="left" show-overflow-tooltip>
@@ -65,18 +71,35 @@
                         </template>
                     </el-table-column>
                     <el-table-column prop="status" label="状态" align="left" show-overflow-tooltip>
+                        <template slot-scope="scope" sortable>
+                            <span></span>
+                            <el-tag v-if="scope.row.status === '1'"
+                                type="info">{{ getTypeLabel(scope.row.status) }}</el-tag>
+                            <el-tag v-else-if="scope.row.status == '2'"
+                                type="warning">{{ getTypeLabel(scope.row.status) }}</el-tag>
+                            <el-tag v-else-if="scope.row.status === '3'"
+                                type="success">{{ getTypeLabel(scope.row.status) }}</el-tag>
+                            <el-tag v-else-if="scope.row.status === '4'"
+                                type="danger">{{ getTypeLabel(scope.row.status) }}</el-tag>
+                        </template>
                     </el-table-column>
                     <el-table-column label="操作" fixed="right" width="200">
                         <template slot-scope="scope">
                             <el-button type="text" @click="openAllocation(scope.row.id)">编辑
                             </el-button>
-                            <el-button type="text" style="color: #f56c6c;"
-                                @click="deleteQuestionnaire(scope.row.id)">删除
+                            <el-button type="text" style="color: #e6a23c;"
+                                @click="openIssuedForm(scope.row)"
+                                v-if="scope.row.status === '1'">下发
                             </el-button>
+
                             <el-button type="text" style="color: #e6a23c;"
-                                @click="openIssuedForm(scope.row.id)">下发
+                                @click="openIssuedForm(scope.row)"
+                                v-if="( scope.row.endTime - 600000)  > nowTime  && scope.row.status !== '1'">补发
                             </el-button>
-                            <el-button type="text" @click="openStatistics(scope.row.id)">统计
+
+                            <el-button type="text"
+                                v-if="scope.row.status === '3' || scope.row.status === '4'"
+                                @click="openStatistics(scope.row)">统计
                             </el-button>
                         </template>
                     </el-table-column>
@@ -98,7 +121,7 @@ import dayjs from 'dayjs'
 import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
 
 import {
-    getQuestionnaireList
+    getQuestionnaireList, deleteQuestionnaire
 } from "@/api/governmentCloud/questionnaireInvestigation/questionnaireInvestigation";
 import Allocation from './Allocation'
 import Statistics from './Statistics'
@@ -116,7 +139,9 @@ export default {
                 currentPage: 1,
                 pageSize: 10,
                 dataType: "0",
-                title: "",
+                topic: "",
+                sidx: "-createTime",
+                status: null
             },
             selectProps: { "label": "fullName", "value": "enCode" },
             total: 0,
@@ -128,17 +153,77 @@ export default {
             statusList: [],
             allocationVisible: false,
             statisticsVisible: false,
-            issuedFormVisible: false
+            issuedFormVisible: false,
+            selectedData: [],
+            timer: null,
+            nowTime: null,
+            methodProps: { "label": "fullName", "value": "enCode" },
         }
     },
     async created() {
+        this.nowTime = new Date().getTime();
+        this.timer = setInterval(() => {
+            //dayjs获取当前时间时间戳
+            this.nowTime = new Date().getTime();
+        }, 1000);
+        await this.getQuestionType()
         this.getList()
     },
+    beforeDestroy() {
+        //清除定时器
+        clearInterval(this.timer);
+    },
     methods: {
-        openStatistics(id) {
+        reset() {
+            this.query = {
+                currentPage: 1,
+                pageSize: 10,
+                dataType: "0",
+                title: "",
+                sidx: "-createTime",
+                status: null
+            }
+            this.getList()
+        },
+        getQuestionType() {
+            return new Promise((resolve, reject) => {
+                getDictionaryDataSelector('603485116668316293').then(res => {
+                    this.typeList = res.data.list
+
+                    console.log(this.typeList)
+                    resolve(true)
+                })
+            })
+        },
+        getTypeLabel(value) {
+            let item = this.typeList.find(item => {
+                return item.enCode == value
+            })
+            return item ? item.fullName : value
+        },
+        handleSelectionChange(val) {
+            this.selectedData = val;
+        },
+        deleteQuestion() {
+            console.log(this.selectedData)
+            let ids = []
+            this.selectedData.forEach(item => {
+                ids.push(item.id)
+            })
+            console.log(ids)
+            deleteQuestionnaire(ids).then(res => {
+                if (res.code === 200) {
+                    this.$message.success(res.msg)
+                    this.getList()
+                } else {
+                    this.$message.warning(res.msg)
+                }
+            })
+        },
+        openStatistics(questionnaire) {
             this.statisticsVisible = true
             this.$nextTick(() => {
-                this.$refs.Statistics.init(id || '')
+                this.$refs.Statistics.init(questionnaire || '')
             })
         },
         openAllocation(id) {
@@ -148,10 +233,10 @@ export default {
             })
         },
 
-        openIssuedForm(id) {
+        openIssuedForm(row) {
             this.issuedFormVisible = true
             this.$nextTick(() => {
-                this.$refs.IssuedForm.init(id)
+                this.$refs.IssuedForm.init(row)
             })
         },
         closeStatistics() {
@@ -172,10 +257,7 @@ export default {
         },
         getList() {
             this.listLoading = true;
-            let params = {
-                title: this.query.title
-            }
-            getQuestionnaireList(params).then(res => {
+            getQuestionnaireList(this.query).then(res => {
                 if (res.code == 200) {
                     this.tableData = res.data.list
                     this.total = res.data.pagination.total

+ 172 - 0
src/views/governmentCloud/questionnaireInvestigation/titleDetails.vue

@@ -0,0 +1,172 @@
+<template>
+    <el-dialog :visible.sync="visible" fullscreen lock-scroll class="JNPF-full-dialog"
+        :show-close="false" :modal="false">
+        <div class="JNPF-common-layout">
+            <div class="JNPF-common-layout-center" v-if="visible">
+                <div class="top">
+                    <div class="" style="display: flex;align-items: center;">
+                        <div style="margin-right: 20px;">题目选项</div>
+                        <div>
+                            <span style="margin-right: 10px;" v-for="item,index in questionnOptions"
+                                :key="index">{{ item.optionContent }}</span>
+                        </div>
+                    </div>
+                    <el-button @click="closeDialog">返回</el-button>
+                </div>
+                <el-row class="JNPF-common-search-box" :gutter="16">
+                    <el-form @submit.native.prevent>
+                        <el-col :span="6">
+                            <jnpf-form-tip-item label="用户" align="left" prop="userId">
+                                <JnpfUserSelect v-model="query.userId" class="item"
+                                    placeholder="请选择用户" clearable :ableIds="[]" :multiple="false" />
+                            </jnpf-form-tip-item>
+                        </el-col>
+                        <el-col :span="6">
+                            <el-form-item>
+                                <el-button type="primary" icon="el-icon-search"
+                                    @click="getList()">查询</el-button>
+                                <el-button icon="el-icon-refresh-right"
+                                    @click="reset()">重置</el-button>
+                            </el-form-item>
+                        </el-col>
+                    </el-form>
+                </el-row>
+                <div class="JNPF-common-layout-main JNPF-flex-main">
+                    <JNPF-table v-loading="listLoading" :data="tableData">
+                        <el-table-column prop="username" label="用户" align="left"
+                            show-overflow-tooltip>
+                        </el-table-column>
+                        <el-table-column prop="" label="回答" align="center" show-overflow-tooltip>
+                            <template slot-scope="scope">
+                                <template v-if="scope.row.answerOption.length ">
+                                    <span v-for=" (item,index) in
+                                    scope.row.answerOption" :key="index"
+                                        style="margin-right: 10px;">{{  item}}</span>
+                                </template>
+                                <span
+                                    v-else-if="scope.row.textResponse">{{ scope.row.textResponse }}</span>
+                                <span v-else>--</span>
+                            </template>
+                        </el-table-column>
+                    </JNPF-table>
+                    <pagination :total="total" :page.sync="query.currentPage"
+                        :limit.sync="query.pageSize" @pagination="getList" />
+                </div>
+            </div>
+        </div>
+        <div class="dialogChart">
+            <el-dialog title="题目预览" :visible.sync="dialogChartVisible" :modal="false">
+                <div id="basic_dashboard" style="width: 100%;height: 400px;"></div>
+            </el-dialog>
+        </div>
+    </el-dialog>
+</template>
+
+<script>
+
+import mixin from '@/mixins/generator/form'
+
+
+import {
+    getStatsDetail
+} from "@/api/governmentCloud/questionnaireInvestigation/questionnaireInvestigation";
+
+
+export default {
+    mixins: [mixin],
+    components: {},
+    data() {
+        return {
+            visible: false,
+            showContent: false,
+            countSecond: null,
+            endDate: 1725089581000,
+            listLoading: false,
+            tableData: [],
+            total: 0,
+            query: {
+                currentPage: 1,
+                pageSize: 20,
+                userId: null
+            },
+
+            dialogChartVisible: false,
+            questionnaire: null,
+
+            questionnaireTopicId: null,
+            id: null
+        }
+    },
+    async created() {
+    },
+    methods: {
+        //返回列表页面
+        closeDialog() {
+            this.$emit("close");
+        },
+        reset() {
+            this.query = {
+                currentPage: 1,
+                pageSize: 20,
+                userId: null
+            }
+            this.getList()
+        },
+        async init(item, id) {
+            this.id = id
+            this.questionnaireTopicId = item.id
+            this.getList()
+        },
+        getList(item, i) {
+            let params = {
+                ...this.query,
+                questionnaireTopicId: this.questionnaireTopicId,
+                id: this.id
+            }
+            this.listLoading = true;
+            getStatsDetail(params).then(res => {
+                if (res.code == 200) {
+                    this.tableData = res.data.stats
+                    this.questionnOptions = res.data.questionnaireOptionIds
+                    this.total = res.data.total
+                    this.listLoading = false
+                    this.visible = true
+                } else {
+                    this.$message.error(res.msg)
+                    this.showType = '1'
+                }
+            })
+
+        },
+    },
+}
+</script>
+
+<style lang="scss" scoped>
+.JNPF-common-layout {
+    padding: 20px;
+    background-color: #fff;
+}
+.top {
+    background-color: #fff;
+    width: 100%;
+    margin-bottom: 20px;
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    .top-title {
+        margin-left: 0px;
+        display: flex;
+        font-size: 18px;
+        align-items: center;
+        div {
+            margin: 0 10px;
+        }
+    }
+}
+.dialogChart {
+    ::v-deep .el-dialog__header {
+        padding: 20px 20px 10px !important;
+    }
+}
+</style>

+ 3 - 1
src/views/login/index.vue

@@ -161,16 +161,18 @@ export default {
                     console.log(query)
 
                     this.$store.dispatch('user/login', query).then(res => {
+                        this.$message.success('登录成功,正在跳转')
                         this.$router.push({
                             path: this.redirect || '/home',
                             query: this.otherQuery
                         })
-                    }).catch(() => {
+                    }).catch((res) => {
                         if (this.needCode) {
                             this.changeImg()
                             this.loginForm.code = ''
                         }
                         this.$store.commit('user/SET_LOGIN_LOADING', false)
+                        this.$message.error(res.msg)
                     })
                 } else {
                     return false

+ 158 - 98
src/views/permission/user/ResetPassword.vue

@@ -1,116 +1,176 @@
 <template>
-  <el-dialog :title="$t(`user.resetPassword`)" :close-on-click-modal="false"
-    :close-on-press-escape="false" :visible.sync="visible" lock-scroll
-    class="JNPF-dialog JNPF-dialog_center" width="600px">
-    <el-form ref="dataForm" v-loading="formLoading" :model="dataForm" :rules="dataRule"
-      label-width="100px">
-      <el-form-item label="账户" prop="account">
-        <el-input v-model="dataForm.account" placeholder="账户" readonly />
-      </el-form-item>
-      <el-form-item label="新密码" prop="userPassword">
-        <el-input v-model="dataForm.userPassword" type="password" autocomplete="off"
-          placeholder="输入新密码" />
-      </el-form-item>
-      <el-form-item label="确认新密码" prop="validatePassword">
-        <el-input v-model="dataForm.validatePassword" type="password" autocomplete="off"
-          placeholder="确认新密码" />
-      </el-form-item>
-    </el-form>
-    <span slot="footer" class="dialog-footer">
-      <el-button @click="visible = false">{{$t('common.cancelButton')}}</el-button>
-      <el-button type="primary" :loading="btnLoading" @click="dataFormSubmit()">
-        {{$t('common.confirmButton')}}</el-button>
-    </span>
-  </el-dialog>
+    <el-dialog :title="$t(`user.resetPassword`)" :close-on-click-modal="false"
+        :close-on-press-escape="false" :visible.sync="visible" lock-scroll
+        class="JNPF-dialog JNPF-dialog_center" width="600px">
+        <el-form ref="dataForm" v-loading="formLoading" :model="dataForm" :rules="dataRule"
+            label-width="100px">
+            <el-form-item label="账户" prop="account">
+                <el-input v-model="dataForm.account" placeholder="账户" readonly />
+            </el-form-item>
+            <el-form-item label="新密码" prop="userPassword">
+                <el-input v-model="dataForm.userPassword" type="password" show-password
+                    autocomplete="off" placeholder="输入新密码" />
+            </el-form-item>
+            <el-form-item label="确认新密码" prop="validatePassword">
+                <el-input v-model="dataForm.validatePassword" type="password" show-password
+                    autocomplete="off" placeholder="确认新密码" />
+            </el-form-item>
+        </el-form>
+        <span slot="footer" class="dialog-footer">
+            <el-button @click="visible = false">{{$t('common.cancelButton')}}</el-button>
+            <el-button type="primary" :loading="btnLoading" @click="dataFormSubmit()">
+                {{$t('common.confirmButton')}}</el-button>
+        </span>
+    </el-dialog>
 </template>
 
 <script>
 import {
-  resetUserPassword
+    resetUserPassword
 } from '@/api/permission/user'
 import md5 from 'js-md5'
 import { getSystemConfig } from '@/api/system/sysConfig'
 
 export default {
-  data() {
-    const validateUserPassword = (rule, value, callback) => {
+    data() {
+        var validatePass = (rule, value, callback) => {
+            // const passwordreg = /(?=.*\d)(?=.*[a-zA-Z])(?=.*[^a-zA-Z0-9]).{6,16}/
+            //是否包含数字
+            const containsNumbers = /[0-9]+/
+            //是否包含小写字符
+            const includeLowercaseLetters = /[a-z]+/
+            //是否包含大写字符
+            const includeUppercaseLetters = /[A-Z]+/
+            //是否包含字符
+            const containsCharacters = /\W/
+            const containsCharacters2 = /_/
 
-      if (value === '') {
-        callback(new Error('新密码不能为空'));
-      }else{
-        if (this.dataForm.password2 !== '') {
-          this.$refs.dataForm.validateField('password2');
+            if (value === '') {
+                callback(new Error('新密码不能为空'));
+            } else if (this.baseForm.passwordStrengthLimit == 1) {
+                if (this.baseForm.passwordLengthMin) {
+                    if (value.length < this.baseForm.passwordLengthMinNumber) {
+                        callback(new Error('新密码长度不能小于' + this.baseForm.passwordLengthMinNumber + '位'));
+                    }
+                }
+                if (this.baseForm.containsNumbers) {
+                    if (!containsNumbers.test(value)) {
+                        callback(new Error('新密码必须包含数字'));
+                    }
+                }
+                if (this.baseForm.includeLowercaseLetters) {
+                    if (!includeLowercaseLetters.test(value)) {
+                        callback(new Error('新密码必须包含小写字母'));
+                    }
+                }
+                if (this.baseForm.includeUppercaseLetters) {
+                    if (!includeUppercaseLetters.test(value)) {
+                        callback(new Error('新密码必须包含大写字母'));
+                    }
+                }
+                if (this.baseForm.containsCharacters) {
+                    if (!containsCharacters.test(value) && !containsCharacters2.test(value)) {
+                        callback(new Error('新密码必须包含字符'));
+                    }
+                }
+                if (this.dataForm.validatePassword !== '') {
+                    this.$refs.dataForm.validateField('validatePassword');
+                }
+                callback();
+            } else {
+                if (this.dataForm.validatePassword !== '') {
+                    this.$refs.dataForm.validateField('validatePassword');
+                }
+                callback();
+            }
+        };
+        var validatePass2 = (rule, value, callback) => {
+            if (value !== this.dataForm.userPassword) {
+                callback(new Error('两次密码输入不一致'));
+            } else {
+                callback();
+            }
+        };
+        return {
+            visible: false,
+            formLoading: false,
+            btnLoading: false,
+            dataForm: {
+                id: '',
+                account: '',
+                userPassword: '',
+                validatePassword: ''
+            },
+            dataRule: {
+                userPassword: [
+                    { required: true, validator: validatePass, trigger: 'blur' }
+                ],
+                validatePassword: [
+                    { validator: validatePass2, trigger: 'blur' }
+                ]
+            },
+            baseForm: {
+                passwordStrengthLimit: 0,
+                passwordLengthMin: false,
+                passwordLengthMinNumber: 0,
+                containsNumbers: false,
+                includeLowercaseLetters: false,
+                includeUppercaseLetters: false,
+                containsCharacters: false,
+            },
         }
-        callback();
-      }
-    }
-    const validatePassword = (rule, value, callback) => {
-      if (value === '') {
-        callback(new Error('请再次输入新密码'));
-      } else if (value !== this.dataForm.userPassword) {
-        callback(new Error('两次输入密码不一致!'));
-      } else {
-        callback();
-      }
-    }
-    return {
-      visible: false,
-      formLoading: false,
-      btnLoading: false,
-      dataForm: {
-        id: '',
-        account: '',
-        userPassword: '',
-        validatePassword: ''
-      },
-      dataRule: {
-        userPassword: [
-          { required: true, validator: validateUserPassword, trigger: 'blur' }
-        ],
-        validatePassword: [
-          { required: true, validator: validatePassword, trigger: 'blur' }
-        ]
-      }
-    }
-  },
-  methods: {
-
-    init(id, account) {
-      this.visible = true
-      this.formLoading = true
-      this.$nextTick(() => {
-        this.$refs['dataForm'].resetFields()
-        this.dataForm.id = id
-        this.dataForm.account = account
-        this.formLoading = false
-      })
     },
-    dataFormSubmit() {
-      this.$refs['dataForm'].validate((valid) => {
-        if (valid) {
-          this.btnLoading = true
-          const formData = {
-            id: this.dataForm.id,
-            userPassword: md5(this.dataForm.userPassword),
-            validatePassword: md5(this.dataForm.validatePassword)
-          }
-          resetUserPassword(formData).then(res => {
-            this.$message({
-              message: res.msg,
-              type: 'success',
-              duration: 1500,
-              onClose: () => {
-                this.visible = false
-                this.btnLoading = false
-                this.$emit('refreshDataList')
-              }
+    methods: {
+
+        init(id, account) {
+            this.visible = true
+            this.formLoading = true
+            this.$nextTick(() => {
+                this.$refs['dataForm'].resetFields()
+                this.dataForm.id = id
+                this.dataForm.account = account
+
+                this.$nextTick(() => {
+                    getSystemConfig().then(res => {
+                        this.baseForm = res.data
+                        this.baseForm.passwordLengthMin = this.baseForm.passwordLengthMin ? true : false
+                        this.baseForm.containsNumbers = this.baseForm.containsNumbers ? true : false
+                        this.baseForm.includeLowercaseLetters = this.baseForm.includeLowercaseLetters ? true : false
+                        this.baseForm.includeUppercaseLetters = this.baseForm.includeUppercaseLetters ? true : false
+                        this.baseForm.containsCharacters = this.baseForm.containsCharacters ? true : false
+                        this.formLoading = false
+                    }).catch(() => {
+                        this.formLoading = false
+                    })
+                })
+            })
+        },
+        dataFormSubmit() {
+            this.$refs['dataForm'].validate((valid) => {
+                if (valid) {
+                    this.btnLoading = true
+                    const formData = {
+                        id: this.dataForm.id,
+                        userPassword: md5(this.dataForm.userPassword),
+                        validatePassword: md5(this.dataForm.validatePassword)
+                    }
+                    resetUserPassword(formData).then(res => {
+                        this.$message({
+                            message: res.msg,
+                            type: 'success',
+                            duration: 1500,
+                            onClose: () => {
+                                this.visible = false
+                                this.btnLoading = false
+                                this.$emit('refreshDataList')
+                            }
+                        })
+                    }).catch(() => {
+                        this.btnLoading = false
+                    })
+                }
             })
-          }).catch(() => {
-            this.btnLoading = false
-          })
         }
-      })
     }
-  }
 }
 </script>

+ 82 - 0
src/views/permission/user/TagForm.vue

@@ -0,0 +1,82 @@
+<template>
+    <el-dialog :title="'分配标签'" :close-on-click-modal="false" :close-on-press-escape="false"
+        :visible.sync="visible" lock-scroll class="JNPF-dialog JNPF-dialog_center" width="600px">
+        <el-form ref="dataForm" v-loading="formLoading" :model="dataForm" :rules="dataRule"
+            label-width="90px">
+            <el-form-item label="标签" prop="type">
+                <el-select v-model="dataForm.type" placeholder="请选择标签" filterable>
+                    <el-option v-for="item in typeOptions" :key="item.enCode" :label="item.fullName"
+                        :value="item.enCode">
+                    </el-option>
+                </el-select>
+            </el-form-item>
+        </el-form>
+        <span slot="footer" class="dialog-footer">
+            <el-button @click="visible = false">{{$t('common.cancelButton')}}</el-button>
+            <el-button type="primary" :loading="btnLoading" @click="dataFormSubmit()">
+                {{$t('common.confirmButton')}}</el-button>
+        </span>
+    </el-dialog>
+</template>
+
+<script>
+import { createPosition, updatePosition, getPositionInfo } from '@/api/permission/position'
+
+export default {
+    data() {
+        return {
+            visible: false,
+            formLoading: false,
+            btnLoading: false,
+            typeOptions: [],
+            dataForm: {
+                type: '',
+            },
+            organizeIdTree: [],
+            dataRule: {
+                type: [
+                    { required: true, message: '岗位类型不能为空', trigger: 'blur' }
+                ]
+            }
+        }
+    },
+    methods: {
+        init(row) {
+            this.visible = true
+            this.organizeIdTree = []
+            this.formLoading = true
+            this.$nextTick(() => {
+                this.$refs['dataForm'].resetFields()
+                // 获取岗位类型
+                this.$store.dispatch('base/getDictionaryData', { sort: 'PositionType' }).then(res => {
+                    this.typeOptions = res
+                })
+
+                this.formLoading = false
+            })
+        },
+        dataFormSubmit() {
+            this.$refs['dataForm'].validate((valid) => {
+                if (valid) {
+                    this.btnLoading = true
+                    const formMethod = this.dataForm.id ? updatePosition : createPosition
+                    formMethod(this.dataForm).then(res => {
+                        this.$message({
+                            message: res.msg,
+                            type: 'success',
+                            duration: 1500,
+                            onClose: () => {
+                                this.visible = false
+                                this.btnLoading = false
+                                this.$emit('refreshDataList')
+                            }
+                        })
+                    }).catch(() => {
+                        this.btnLoading = false
+                    })
+                }
+            })
+        }
+    }
+}
+</script>

+ 21 - 2
src/views/permission/user/index.vue

@@ -153,6 +153,8 @@
                                             v-if="scope.row.mobilePhone && !scope.row.syncItsm"
                                             @click.native="generateITSMAccount(scope.row)">
                                             ITSM账号同步</el-dropdown-item>
+                                        <el-dropdown-item @click.native="assignTags(scope.row)">
+                                            分配标签</el-dropdown-item>
                                     </el-dropdown-menu>
                                 </el-dropdown>
                             </tableOpts>
@@ -170,6 +172,10 @@
         <ImportForm v-if="importFormVisible" ref="importForm" @refresh="reset()" />
         <SocialsBind v-if="socialsVisible" ref="SocialsBind" @close="socialsVisible=false" />
         <WorkHandoverForm v-if="workHandoverVisible" ref="WorkHandoverForm" @complete="initData" />
+
+        <!--分配标签弹框  -->
+        <TagForm v-if="tagFormVisible" ref="TagForm" />
+
         <CheckPermissions v-if="checkPermissionsVisible" ref="checkPermissions"
             @close="checkPermissionsVisible=false" />
     </div>
@@ -182,6 +188,7 @@ import Diagram from './Diagram'
 import ResetPwdForm from './ResetPassword'
 import ImportForm from './ImportForm'
 import ExportForm from './ExportForm'
+import TagForm from './TagForm'
 import SocialsBind from './SocialsBind'
 import WorkHandoverForm from './WorkHandoverForm.vue'
 import { mapGetters } from "vuex"
@@ -196,7 +203,8 @@ export default {
         ImportForm,
         SocialsBind,
         WorkHandoverForm,
-        CheckPermissions
+        CheckPermissions,
+        TagForm
     },
     data() {
         return {
@@ -232,7 +240,10 @@ export default {
             socialsVisible: false,
             workHandoverVisible: false,
             organizeIdTree: [],
-            checkPermissionsVisible: false
+            checkPermissionsVisible: false,
+
+            // 是否展示分配标签弹框
+            tagFormVisible: false
         }
     },
     watch: {
@@ -250,6 +261,14 @@ export default {
         this.getOrganizeList(true)
     },
     methods: {
+
+        // 打开分配标签弹框
+        assignTags(row) {
+            this.tagFormVisible = true
+            this.$nextTick(() => {
+                this.$refs.TagForm.init(row)
+            })
+        },
         workHandover(data) {
             this.workHandoverVisible = true
             this.$nextTick(() => {

Some files were not shown because too many files changed in this diff