Jelajahi Sumber

近期代码提交

lilinfeng 3 bulan lalu
induk
melakukan
2271ebf25a
57 mengubah file dengan 4451 tambahan dan 1501 penghapusan
  1. 2 2
      .env.production
  2. 1 0
      .gitignore
  3. 2 0
      package.json
  4. 10 0
      src/api/governmentCloud/entryAndExitRegis/entryAndExitRegis.js
  5. 1 1
      src/api/governmentCloud/iconManagement/iconManagement.js
  6. 78 0
      src/api/governmentCloud/processConfiguration/processConfiguration.js
  7. 49 0
      src/api/governmentCloud/suggestions/suggestions.js
  8. 13 0
      src/api/governmentCloud/workOrder/workOrder.js
  9. 10 0
      src/api/permission/userSetting.js
  10. TEMPAT SAMPAH
      src/assets/images/suggestion/dianzan.png
  11. TEMPAT SAMPAH
      src/assets/images/suggestion/pinglun.png
  12. TEMPAT SAMPAH
      src/assets/images/suggestion/yidianzan.png
  13. 1 0
      src/components/Generator/generator/itsmConfig.js
  14. 2 3
      src/components/Generator/index/DraggableItem.vue
  15. 110 50
      src/components/Generator/index/Home.vue
  16. 7 4
      src/components/Generator/index/RightComponents/CCheckbox.vue
  17. 26 0
      src/components/Generator/index/RightComponents/CDate.vue
  18. 7 0
      src/components/Generator/index/RightComponents/CGroup.vue
  19. 7 0
      src/components/Generator/index/RightComponents/CRadio.vue
  20. 7 0
      src/components/Generator/index/RightComponents/CSelect.vue
  21. 56 18
      src/components/Generator/index/RightComponents/CUpload.vue
  22. 0 1
      src/components/Generator/index/RightComponents/dynamicMixin.js
  23. 10 1
      src/components/Generator/index/RightPanel.vue
  24. 0 1
      src/components/Generator/render/render.js
  25. 10 0
      src/components/Generator/styles/home.scss
  26. 119 119
      src/components/integrationProcess/index.vue
  27. 4 0
      src/main.js
  28. 10 4
      src/utils/apiUrl.js
  29. 23 16
      src/utils/request.js
  30. 17 0
      src/utils/upload.js
  31. 451 445
      src/views/basic/profile/index.vue
  32. 0 91
      src/views/governmentCloud/computerroommanagement/Detail.vue
  33. 0 0
      src/views/governmentCloud/computerroommanagement/computerRoomQR/columnList.js
  34. 31 7
      src/views/governmentCloud/computerroommanagement/computerRoomQR/form.vue
  35. 75 79
      src/views/governmentCloud/computerroommanagement/computerRoomQR/index.vue
  36. 0 0
      src/views/governmentCloud/computerroommanagement/computerRoomQR/superQueryJson.js
  37. 306 0
      src/views/governmentCloud/computerroommanagement/entryAndExitRegis/Detail.vue
  38. 533 0
      src/views/governmentCloud/computerroommanagement/entryAndExitRegis/form.vue
  39. 310 0
      src/views/governmentCloud/computerroommanagement/entryAndExitRegis/index.vue
  40. 163 172
      src/views/governmentCloud/dictionaryOfProjectSystemsForDepartmentsAndBureaus/index.vue
  41. 22 17
      src/views/governmentCloud/iconManagement/Form.vue
  42. 4 2
      src/views/governmentCloud/iconManagement/index.vue
  43. 215 196
      src/views/governmentCloud/knowledgeBase/index.vue
  44. 3 3
      src/views/governmentCloud/notificationannouncement/index.vue
  45. 74 20
      src/views/governmentCloud/processConfiguration/Allocation.vue
  46. 0 130
      src/views/governmentCloud/processConfiguration/AllocationNew.vue
  47. 173 17
      src/views/governmentCloud/processConfiguration/Form.vue
  48. 90 0
      src/views/governmentCloud/processConfiguration/iconForm.vue
  49. 165 12
      src/views/governmentCloud/processConfiguration/index.vue
  50. 20 52
      src/views/governmentCloud/processConfiguration/infoForm.vue
  51. 131 0
      src/views/governmentCloud/processConfiguration/ruleForm.vue
  52. 4 1
      src/views/governmentCloud/productserverdocumentation/Detail.vue
  53. 16 35
      src/views/governmentCloud/productserverdocumentation/form.vue
  54. 2 2
      src/views/governmentCloud/productserverdocumentation/index.vue
  55. 684 0
      src/views/governmentCloud/suggestions/Detail.vue
  56. 223 0
      src/views/governmentCloud/suggestions/index.vue
  57. 174 0
      src/views/governmentCloud/workOrder/myBusiness/index.vue

+ 2 - 2
.env.production

@@ -2,7 +2,7 @@
 ENV = 'production'
 
 # VUE_APP_BASE_API = 'http://192.168.103.102:58080'
-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'
-# VUE_APP_BASE_API =  "https://api.shidaiyun.net"
+VUE_APP_BASE_API =  "https://api.shidaiyun.net"
 

+ 1 - 0
.gitignore

@@ -67,3 +67,4 @@ components/**/*.jsx
 /.history
 *.tmp
 package-lock.json
+/beifen

+ 2 - 0
package.json

@@ -40,6 +40,7 @@
     "@tinymce/tinymce-vue": "^3.2.0",
     "axios": "0.18.1",
     "babel-loader": "^7.1.5",
+    "bin-code-editor": "^0.9.0",
     "clipboard": "2.0.4",
     "codemirror": "^5.58.2",
     "crypto-js": "^4.1.1",
@@ -83,6 +84,7 @@
     "vue-esign": "^1.0.5",
     "vue-grid-layout": "2.3.12-legacy",
     "vue-i18n": "7.3.2",
+    "vue-json-editor": "^1.4.3",
     "vue-organization-chart": "^1.1.6",
     "vue-quill-editor": "^3.0.6",
     "vue-router": "3.1.1",

+ 10 - 0
src/api/governmentCloud/entryAndExitRegis/entryAndExitRegis.js

@@ -0,0 +1,10 @@
+import request from "@/utils/request";
+
+// 获取流程列表
+export const processUploadPreview = data => {
+  return request({
+    url: `/api/activiti/zhy/processUploadPreview`,
+    method: "GET",
+    data: data
+  });
+};

+ 1 - 1
src/api/governmentCloud/iconManagement/iconManagement.js

@@ -12,7 +12,7 @@ export const getIconList = () => {
 // 获取图标列表
 export const deleteIcon = (icon) => {
   return request({
-    url: `/api//minio/delete?fileName=${icon}`,
+    url: `/api/minio/delete?fileName=${icon}`,
     method: "DELETE",
     data: null
   });

+ 78 - 0
src/api/governmentCloud/processConfiguration/processConfiguration.js

@@ -9,6 +9,38 @@ export const getList = data => {
   });
 };
 
+
+// 获取ITSM流程列表
+export const findProcessList = data => {
+  return request({
+    url: `/api/itsm/CloudOperationMaintenance/findProcessList?name=${data.name}&currentPage=${data.currentPage}&pageSize=${data.pageSize}`,
+    method: "POST",
+    data: null
+  });
+};
+
+// 检查新版本
+export const processNewVersion = data => {
+  return request({
+    url: `/api/itsm/CloudOperationMaintenance/processNewVersion`,
+    method: "POST",
+    data: data
+  });
+};
+
+
+// 同步流程
+export const synchronizedProcessByName = data => {
+  console.log(data)
+  return request({
+    url: `/api/itsm/CloudOperationMaintenance/synchronizedProcessByName`,
+    method: "POST",
+    data: data
+  });
+};
+
+
+
 // 获取流程列表
 export const findVersionByItsmProKey = (data, itsmProKey) => {
   return request({
@@ -82,4 +114,50 @@ export const saveFormJson = (data) => {
     method: "POST",
     data: data
   });
+};
+
+// 复制表单详情
+export const copyFormDetail = (data) => {
+  return request({
+    url: `/api/itsm/ProcessForm/copyFormDetail`,
+    method: "POST",
+    data: data
+  });
+};
+
+
+// 删除流程版本
+export const deleteProcessByKey = (data) => {
+  return request({
+    url: `/api/itsm/CloudOperationMaintenance/deleteProcessByKey?key=${data.key}&version=${data.version}`,
+    method: "DElETE",
+    data: null
+  });
+};
+
+// 获取ITSM规则数据
+export const getProcessAdvanced = (data) => {
+  return request({
+    url: `/api/itsm/ProcessForm/getProcessAdvanced`,
+    method: "POST",
+    data: data
+  });
+};
+
+// 保存规则数据
+export const saveProcessAdvanced = (data) => {
+  return request({
+    url: `/api/itsm/ProcessForm/saveProcessAdvanced`,
+    method: "POST",
+    data: data
+  });
+};
+
+// 获取我方保存的规则数据
+export const getRuleByProcessDefKey = (data) => {
+  return request({
+    url: `/api/activiti/zhy/getRuleByProcessDefKey`,
+    method: "GET",
+    data: data
+  });
 };

+ 49 - 0
src/api/governmentCloud/suggestions/suggestions.js

@@ -0,0 +1,49 @@
+import request from "@/utils/request";
+
+// 投诉列表
+export const getSuggestionsList = (data) => {
+  return request({
+    url: `/api/itsm/ComplaintSuggestion/getList`,
+    method: "POST",
+    data: data,
+    header: {
+      'content-type': 'application/json',
+    },
+  });
+};
+
+// 投诉列表
+export const getListById = (data) => {
+  return request({
+    url: `/api/complain/getListByIdV2`,
+    method: "GET",
+    data: data,
+  });
+};
+
+// 投诉回复
+export const addReply = (data) => {
+  return request({
+    url: `/api/complain/addReply`,
+    method: "POST",
+    data: data,
+  });
+}
+
+// 投诉点赞
+export const addLike = (data) => {
+  return request({
+    url: `/api/complain/addLike`,
+    method: "POST",
+    data: data,
+  });
+}
+// 投诉取消点赞
+export const delLike = (data) => {
+  return request({
+    url: `/api/complain/delLike`,
+    method: "POST",
+    data: data,
+  });
+}
+

+ 13 - 0
src/api/governmentCloud/workOrder/workOrder.js

@@ -0,0 +1,13 @@
+import request from "@/utils/request";
+
+// 全部工单:获取全部工单
+export const getITSMOrderList = (data) => {
+  return request({
+    url: `/api/activiti/zhy/getITSMOrderList`,
+    method: "POST",
+    data: data,
+    header: {
+      'content-type': 'application/json',
+    },
+  });
+};

+ 10 - 0
src/api/permission/userSetting.js

@@ -14,6 +14,16 @@ export function UserSettingInfo() {
     method: 'GET'
   })
 }
+
+// 获取当前用户个人资料
+export function getSysUser() {
+  return request({
+    url: '/api/mobile/user/info',
+    method: 'GET'
+  })
+}
+
+
 // 更新当前用户个人资料
 export function UpdateUser(data) {
   return request({

TEMPAT SAMPAH
src/assets/images/suggestion/dianzan.png


TEMPAT SAMPAH
src/assets/images/suggestion/pinglun.png


TEMPAT SAMPAH
src/assets/images/suggestion/yidianzan.png


+ 1 - 0
src/components/Generator/generator/itsmConfig.js

@@ -377,6 +377,7 @@ export const itsmLayoutComponents = [
       children: []
     },
     header: "模块容器",
+    isNew: true
   },
 ]
 

+ 2 - 3
src/components/Generator/index/DraggableItem.vue

@@ -97,7 +97,6 @@ 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) }} />
 
-        console.log(element)
         if (!element.__config__.isDisplay && element.__config__.jnpfKey.includes('custom')) {
             return
         }
@@ -336,7 +335,7 @@ const layouts = {
             let flag = element.__config__.children.some(item => {
                 return item.__config__.isDisplay
             })
-            if (!flag) {
+            if (!flag && !element.isNew) {
                 return
             }
 
@@ -366,7 +365,7 @@ const layouts = {
                                 <el-row gutter={element.__config__.gutter}
                                     nativeOnClick={event => { activeItem(element); event.stopPropagation() }}>
                                     {tip}
-                                    <draggable list={element.__config__.children} animation={340} group={group} onEnd={onEnd} class="drag-wrapper">
+                                    <draggable list={element.__config__.children} animation={340} group={group} onEnd={onEnd} class="custom-card drag-wrapper">
                                         {child}
                                     </draggable>
                                 </el-row>

+ 110 - 50
src/components/Generator/index/Home.vue

@@ -26,34 +26,62 @@
             </el-scrollbar>
         </div>
 
-        <div class="custom-left-board " v-if="isITSM">
-            <div class="action-bar"
-                style="justify-content: space-between;align-items: center;text-align: left; display: flex">
-                <span>字段列表</span>
-
-            </div>
-            <div style="padding: 10px">
-                <el-button size="mini" type="primary"
-                    @click="changeIsdisplay(true)">改为提交</el-button>
-                <el-button size="mini" type="danger"
-                    @click="changeIsdisplay(false)">改为不提交</el-button>
+        <div class="custom-left-board" v-if="isITSM">
+            <div class="tab">
+                <el-tabs v-model="currentTab">
+                    <el-tab-pane label="字段列表" name="list" />
+                    <el-tab-pane label="控件列表" name="component" />
+                </el-tabs>
             </div>
-            <el-table :data="tableData" style="width: 100%" default-expand-all
-                ref="multipleTableRef" @selection-change="handleSelectionChange" border
-                height="calc(100% - 110px)">
-                <el-table-column type="selection" width="40">
-                </el-table-column>
-                <el-table-column prop="__config__.label" label="字段名称">
-                </el-table-column>
-                <el-table-column prop="__config__.isDisplay" label="是否提交">
-                    <template slot-scope="scope">
-                        <el-tag :type="scope.row.__config__.isDisplay ? 'success' : 'danger'"
-                            disable-transitions>
-                            {{scope.row.__config__.isDisplay ?'是':'否'}}</el-tag>
-                    </template>
-                </el-table-column>
-                <!-- 其他列 -->
-            </el-table>
+
+            <template v-if="currentTab == 'list'">
+                <div style="padding: 10px">
+                    <el-button size="mini" type="primary"
+                        @click="changeIsdisplay(true)">改为提交</el-button>
+                    <el-button size="mini" type="danger"
+                        @click="changeIsdisplay(false)">改为不提交</el-button>
+                </div>
+                <el-table :data="tableData" style="width: 100%" default-expand-all
+                    ref="multipleTableRef" @selection-change="handleSelectionChange" border
+                    height="calc(100% - 110px)">
+                    <el-table-column type="selection" width="40">
+                    </el-table-column>
+                    <el-table-column prop="__config__.label" label="字段名称">
+                    </el-table-column>
+                    <el-table-column prop="__config__.isDisplay" label="是否提交">
+                        <template slot-scope="scope">
+                            <el-tag :type="scope.row.__config__.isDisplay ? 'success' : 'danger'"
+                                disable-transitions>
+                                {{scope.row.__config__.isDisplay ?'是':'否'}}</el-tag>
+                        </template>
+                    </el-table-column>
+                    <!-- 其他列 -->
+                </el-table>
+            </template>
+            <template v-else>
+                <el-scrollbar class="left-scrollbar">
+                    <div class="components-list">
+                        <div v-for="(item, listIndex) in leftComponents" :key="listIndex"
+                            class="components-part">
+                            <div class="components-title">{{ item.title }}</div>
+                            <draggable class="components-draggable" :list="item.list"
+                                :group="{ name: 'componentsGroup', pull: 'clone', put: false }"
+                                :clone="cloneComponent" draggable=".components-item"
+                                filter=".disabled" :sort="false" @end="onEnd">
+                                <div v-for="(element, index) in item.list" :key="index"
+                                    class="components-item"
+                                    :class="{'disabled':element.__config__.dragDisabled}"
+                                    @click="addComponent(element)">
+                                    <div class="components-body">
+                                        <i :class="element.__config__.tagIcon" />
+                                        {{ element.__config__.label }}
+                                    </div>
+                                </div>
+                            </draggable>
+                        </div>
+                    </div>
+                </el-scrollbar>
+            </template>
 
         </div>
         <div class="center-board">
@@ -81,7 +109,7 @@
                     <el-form :size="formConf.size" :label-position="formConf.labelPosition"
                         :disabled="formConf.disabled" :label-width="formConf.labelWidth + 'px'">
                         <draggable class="drawing-board" :list="drawingList" :animation="340"
-                            group="componentsGroup" @end='onCenterEnd'>
+                            group="componentsGroup" @end='onCenterEnd' @start="onCenterStart">
                             <draggable-item v-for="(element, index) in drawingList"
                                 :key="element.renderKey" :drawing-list="drawingList"
                                 :element="element" :index="index" :active-id="activeId"
@@ -269,7 +297,10 @@ export default {
                 }
             },
             multipleSelection: [], // 存储选中的行,
-            tableData: []
+            tableData: [],
+            currentTab: 'list',
+            centerKey: null,
+            oldDrawingList: null
         }
     },
     provide() {
@@ -391,11 +422,18 @@ export default {
                     this.idGlobal = 100
                     this.activeData = {}
                 }
-                // if (!this.isDrawingListChange) {
-                //   this.isDrawingListChange = true
-                //   return
-                // }
-                this.$emit('drawingListChange', this.drawingList)
+
+                if (this.isITSM) {
+                    this.tableData = []
+                    //整理左侧展示的表格数据
+                    this.drawingList.forEach(item => {
+                        console.log(item)
+                        this.tableData.push(...item.__config__.children)
+                    }
+                    )
+                    this.$emit('drawingListChange', this.drawingList)
+                }
+
             },
             deep: true
         },
@@ -435,28 +473,21 @@ export default {
 
         if (this.isITSM) {
             this.leftComponents = [
-                {
-                    title: '基础控件',
-                    list: itsmBasicComponents
-                },
+                // {
+                //     title: '基础控件',
+                //     list: itsmBasicComponents
+                // },
                 {
                     title: '布局控件',
                     list: itsmLayoutComponents
                 },
-                {
-                    title: '高级控件',
-                    list: itsmSelectComponents
-                }
+                // {
+                //     title: '高级控件',
+                //     list: itsmSelectComponents
+                // }
             ]
 
             this.drawingList = this.itsmDrawingList
-
-            //整理左侧展示的表格数据
-            this.itsmDrawingList.forEach(item => {
-                console.log(item)
-                this.tableData.push(...item.__config__.children)
-            }
-            )
         }
     },
     mounted() {
@@ -654,6 +685,17 @@ export default {
                 }
             }
 
+            // 增加组织向自定义表格内拖入不匹配移动端的组件
+            if (obj.to.className.indexOf('custom-card') > -1) {
+                if (['custom-card'].includes(tempActiveData.__config__.jnpfKey)) {
+                    obj.to.__vue__.realList.splice(obj.newIndex, 1);
+                    this.$message({
+                        message: '不支持向模板内拖入模板',
+                        type: 'warning'
+                    });
+                }
+            }
+
 
             this.showTip = true
             if (obj.from !== obj.to) {
@@ -669,7 +711,23 @@ export default {
                 }
             }
         },
+        onCenterStart(obj) {
+            console.log(obj)
+            this.centerKey = this.drawingList[obj.oldIndex].__config__.jnpfKey
+            this.oldDrawingList = JSON.parse(JSON.stringify(this.drawingList))
+        },
         onCenterEnd(obj) {
+            console.log('obj')
+            console.log(obj)
+            // 增加组织向自定义表格内拖入不匹配移动端的组件
+            if (obj.to.className.indexOf('custom-card') > -1 && this.centerKey == 'custom-card') {
+                this.drawingList = JSON.parse(JSON.stringify(this.oldDrawingList))
+                this.$message({
+                    message: '不支持向模板内拖入模板',
+                    type: 'warning'
+                });
+            }
+
             this.showTip = true
             if (obj.from == obj.to) return
             if (obj.to.className.indexOf('table-wrapper') > -1) {
@@ -683,6 +741,8 @@ export default {
         },
         onTableEnd(obj, target, conf) {
             console.log('tableEnd')
+
+            console.log(obj)
             if (obj.from == obj.to) return
             if (obj.to.className.indexOf('table-wrapper') < 0) {
                 this.$set(this.activeItem.__config__, 'isSubTable', false)
@@ -1067,7 +1127,7 @@ export default {
     }
 }
 </script>
-<style lang='scss'>
+<style lang='scss' >
 @import '../styles/index';
 @import '../styles/home';
 </style>

+ 7 - 4
src/components/Generator/index/RightComponents/CCheckbox.vue

@@ -80,6 +80,13 @@
             </el-checkbox-group>
         </el-form-item> -->
         <el-divider />
+        <div>
+            <el-dialog :visible.sync="dicVisible" append-to-body
+                class="JNPF-dialog JNPF-dialog_center JNPF-dialog-tree-select" lock-scroll
+                width="80%" @close="defaultValueChange">
+                <dicIndex ref="dicIndex"></dicIndex>
+            </el-dialog>
+        </div>
     </el-row>
 </template>
 
@@ -114,11 +121,7 @@ export default {
                     this.activeData.options = res.data
                 })
             }
-
-
         }
-
-
     },
     methods: {
         selectChange() {

+ 26 - 0
src/components/Generator/index/RightComponents/CDate.vue

@@ -0,0 +1,26 @@
+<template>
+    <el-row>
+        <el-form-item label="类型">
+            <el-select v-model="activeData.dateFormat" placeholder="请选择字段类型">
+                <el-option label="日期选择" value="1"></el-option>
+                <el-option label="日期时间选择" value="2"></el-option>
+            </el-select>
+        </el-form-item>
+    </el-row>
+</template>
+<script>
+import comMixin from './mixin';
+export default {
+    props: ['activeData'],
+    mixins: [comMixin],
+    components: {},
+    data() {
+        return {
+        }
+    },
+    created() {
+    },
+    methods: {
+    }
+}
+</script>

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

@@ -74,6 +74,13 @@
                 :options="activeData.options" :props="activeData.props" clearable />
         </el-form-item>
         <el-divider />
+        <div>
+            <el-dialog :visible.sync="dicVisible" append-to-body
+                class="JNPF-dialog JNPF-dialog_center JNPF-dialog-tree-select" lock-scroll
+                width="80%" @close="defaultValueChange">
+                <dicIndex ref="dicIndex"></dicIndex>
+            </el-dialog>
+        </div>
     </el-row>
 </template>
 

+ 7 - 0
src/components/Generator/index/RightComponents/CRadio.vue

@@ -74,6 +74,13 @@
                 :options="activeData.options" :props="activeData.props" clearable />
         </el-form-item>
         <el-divider />
+        <div>
+            <el-dialog :visible.sync="dicVisible" append-to-body
+                class="JNPF-dialog JNPF-dialog_center JNPF-dialog-tree-select" lock-scroll
+                width="80%" @close="defaultValueChange">
+                <dicIndex ref="dicIndex"></dicIndex>
+            </el-dialog>
+        </div>
     </el-row>
 </template>
 

+ 7 - 0
src/components/Generator/index/RightComponents/CSelect.vue

@@ -125,6 +125,13 @@
             </el-form-item>
             <el-divider />
         </template>
+        <div>
+            <el-dialog :visible.sync="dicVisible" append-to-body
+                class="JNPF-dialog JNPF-dialog_center JNPF-dialog-tree-select" lock-scroll
+                width="80%" @close="defaultValueChange">
+                <dicIndex ref="dicIndex"></dicIndex>
+            </el-dialog>
+        </div>
     </el-row>
 </template>
 

+ 56 - 18
src/components/Generator/index/RightComponents/CUpload.vue

@@ -9,6 +9,14 @@
                 </el-select>
             </el-input>
         </el-form-item>
+        <el-form-item label="文件类型限制" v-if="visible">
+            <el-select v-model="regexValue" placeholder="选择文件类型限制" clearable :multiple="true"
+                filterable>
+                <el-option v-for="(item,i) in fileTypeOption" :key="i" :label="item['fullName']"
+                    :value="item['enCode']">
+                </el-option>
+            </el-select>
+        </el-form-item>
         <el-form-item label="最大上传数">
             <el-input-number v-model="activeData.limit" :min="0" placeholder="最大上传数" :step="1"
                 :precision="0" controls-position="right" />
@@ -20,11 +28,15 @@
             <el-input v-model="activeData.moduleFileId" placeholder="请上传附件" disabled />
         </el-form-item>
         <el-form-item label="附件">
-            <el-upload class="upload-demo" action="http://localhost:3000/dev/api/minio/upload"
-                :data="uploadData" :headers="uploadHeaders" :on-success="uploadSuccess"
-                :before-upload="beforeUpload" :on-remove="onRemove" :limit="1"
-                :on-preview="onPreview">
+            <el-upload class="upload-demo" action="#" :http-request="upload"
+                :on-success="uploadSuccess" :before-upload="beforeUpload" :on-remove="onRemove"
+                :limit="1" :on-preview="onPreview" :file-list="fileList">
                 <el-button size="small" type="primary">点击上传</el-button>
+                <span v-if="activeData.moduleFileName" style="margin-left: 10px; color: #1890ff;"
+                    @click.stop="onPreview">下载</span>
+                <span v-if="activeData.moduleFileName" style="margin-left: 10px; color: #f56c6c;"
+                    @click.stop="onRemove">删除</span>
+
             </el-upload>
         </el-form-item>
 
@@ -35,7 +47,9 @@
 <script>
 import comMixin from './mixin';
 
-import { getToken } from '@/utils/auth'
+import { minioPath } from '@/utils/apiUrl'
+import { uploadFuction } from '@/utils/upload'
+import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
 
 
 export default {
@@ -43,13 +57,16 @@ export default {
     mixins: [comMixin],
     data() {
         return {
-            uploadData: {
-                type: "process/template"
-
-            },
-            uploadHeaders: {
-                Authorization: getToken(),
-            }
+            fileList: [],
+            regexValue: [],
+            fileTypeOption: [],
+            visible: false
+        }
+    },
+    watch: {
+        regexValue(newValue, oldValue) {
+            console.log(newValue)
+            this.activeData.regex = newValue.join('/')
         }
     },
     computed: {
@@ -65,30 +82,51 @@ export default {
             }
         },
     },
-    created() { },
+    async created() {
+        await this.getFileTypeOption()
+        this.regexValue = this.activeData.regex.split('/')
+        this.visible = true
+    },
     methods: {
+        getFileTypeOption() {
+            return new Promise((resolve, reject) => {
+                getDictionaryDataSelector('596355335980057669').then(res => {
+                    this.fileTypeOption = res.data.list
+                    resolve(true)
+                })
+            })
+        },
+        upload(param) {
+            console.log(param)
+            uploadFuction('process/template', param.file).then(res => {
+                if (res.code == 200) {
+                    this.activeData.moduleFileId = res.data.url
+                    this.activeData.moduleFileName = res.data.name
+                }
+            })
+        },
         onChange() {
             this.activeData.__config__.renderKey = +new Date()
         },
         uploadSuccess(res, file) {
             console.log(res)
             console.log(file)
-            this.activeData.moduleFileId = res.data.url
+
 
         },
         beforeUpload(file) {
-            this.activeData.moduleFileName = file.name
         },
         onRemove() {
-            this.activeData.moduleFileId = null
-            this.activeData.moduleFileName = null
+            this.activeData.moduleFileId = ''
+            this.activeData.moduleFileName = ''
+            this.fileList = []
         },
         onPreview() {
             this.pcDownloadFile(this.activeData.moduleFileId, this.activeData.moduleFileName)
         },
         pcDownloadFile(url, name) {
             console.log(url)
-            url = 'http://47.95.1.150:9001/' + url
+            url = minioPath + url
             //保存到本地
             try {
                 const x = new window.XMLHttpRequest();

+ 0 - 1
src/components/Generator/index/RightComponents/dynamicMixin.js

@@ -83,7 +83,6 @@ export default {
       this.dictionaryId = val
       this.activeData.__config__.defaultValue = this.defaultValue
 
-      console.log(this.ac)
       if (!val) {
         this.activeData.options = []
         return

+ 10 - 1
src/components/Generator/index/RightPanel.vue

@@ -546,6 +546,13 @@
                             </CText>
                         </template>
 
+                        <!-- 自定义custom-text -->
+                        <template
+                            v-if="activeData.__config__.jnpfKey==='custom-datePicker' || activeData.__config__.jnpfKey == 'custom-timePicker'">
+                            <CDate :active-data="activeData">
+                            </CDate>
+                        </template>
+
                         <!-- row 布局 -->
                         <template v-if="activeData.__config__.jnpfKey==='row'">
                             <el-form-item v-if="activeData.__config__.componentName!==undefined"
@@ -885,6 +892,7 @@ import CGroup from './RightComponents/CGroup.vue'
 import CMember from './RightComponents/CMember.vue'
 import CUpload from './RightComponents/CUpload.vue'
 import CText from './RightComponents/CText.vue'
+import CDate from './RightComponents/CDate.vue'
 
 
 
@@ -952,7 +960,8 @@ export default {
         CGroup,
         CMember,
         CUpload,
-        CText
+        CText,
+        CDate
     },
     inject: ["getShowType", "getFormInfo"],
     props: ['showField', 'activeData', 'formConf', 'modelType', 'webType', 'drawingList', 'formInfo', 'isITSM'],

+ 0 - 1
src/components/Generator/render/render.js

@@ -94,7 +94,6 @@ export default {
     relations: Object,
   },
   render(h) {
-    console.log(this.conf)
     const dataObject = makeDataObject()
     const confClone = deepClone(this.conf)
     const children = this.$slots.default || []

+ 10 - 0
src/components/Generator/styles/home.scss

@@ -118,6 +118,16 @@ $lighterBlue: #409EFF;
     padding: 10px;
     padding-bottom: 30px;
   }
+
+  .tab {
+    .el-tabs__item {
+      padding: 0 20px !important;
+    }
+  }
+
+  .el-tabs__header {
+    margin-bottom: 0 !important;
+  }
 }
 
 .left-scrollbar {

+ 119 - 119
src/components/integrationProcess/index.vue

@@ -1,10 +1,10 @@
 <template>
-  <div class="process-container" v-loading="loading">
-    <div class="center-container">
-      <process-main :conf="templateJson" :flowType="flowType" :formInfo="formData"
-        v-if="templateJson" :verifyMode="verifyMode" :key="key" />
+    <div class="process-container" v-loading="loading">
+        <div class="center-container">
+            <process-main :conf="templateJson" :flowType="flowType" :formInfo="formData"
+                v-if="templateJson" :verifyMode="verifyMode" :key="key" />
+        </div>
     </div>
-  </div>
 </template>
 <script>
 import ProcessMain from "./main"
@@ -13,133 +13,133 @@ import draggable from 'vuedraggable'
 import { getInfo, update, create } from '@/api/onlineDev/integrate'
 
 export default {
-  name: 'Process',
-  props: ['flowType', 'conf', 'formInfo'],
-  data() {
-    return {
-      activeConf: null,
-      key: + new Date(),
-      loading: false,
-      verifyMode: false,
-      flowList: [],
-      visible: false,
-      handleType: '',
-      defaultData: {},
-      formFieldList: {},
-      templateJson: null,
-      formData: null
-    };
-  },
-  components: {
-    ProcessMain,
-    draggable
-  },
-  created() {
-    this.init()
-  },
-  methods: {
-    init() {
-      getInfo(this.formInfo.id).then(res => {
-        this.formData = res.data || {}
-        this.templateJson = res.data.templateJson ? JSON.parse(res.data.templateJson) : null;
-        this.defaultData = getMockData(this.formData.type)
-        this.initData()
-      })
+    name: 'Process',
+    props: ['flowType', 'conf', 'formInfo'],
+    data() {
+        return {
+            activeConf: null,
+            key: + new Date(),
+            loading: false,
+            verifyMode: false,
+            flowList: [],
+            visible: false,
+            handleType: '',
+            defaultData: {},
+            formFieldList: {},
+            templateJson: null,
+            formData: null
+        };
     },
-    initData() {
-      this.loading = true
-      if (this.templateJson !== null && typeof this.templateJson === 'object' && JSON.stringify(this.templateJson) !== '{}') {
-        this.templateJson = this.templateJson
-      } else {
-        this.templateJson = JSON.parse(JSON.stringify(this.defaultData))
-      }
-      this.$nextTick(() => {
-        this.loading = false
-      })
+    components: {
+        ProcessMain,
+        draggable
     },
-    // 给父级组件提供的获取流程数据得方法
-    getData() {
-      return new Promise((resolve, reject) => {
-        this.verifyMode = true;
-        this.formData.templateJson = this.templateJson
-        if (NodeUtils.checkAllNode(this.formData.templateJson)) {
-          resolve({ data: this.formData });
-        } else {
-          reject({ msg: '' });
-        }
-      });
+    created() {
+        this.init()
     },
-  }
+    methods: {
+        init() {
+            (this.formInfo.id).then(res => {
+                this.formData = res.data || {}
+                this.templateJson = res.data.templateJson ? JSON.parse(res.data.templateJson) : null;
+                this.defaultData = getMockData(this.formData.type)
+                this.initData()
+            })
+        },
+        initData() {
+            this.loading = true
+            if (this.templateJson !== null && typeof this.templateJson === 'object' && JSON.stringify(this.templateJson) !== '{}') {
+                this.templateJson = this.templateJson
+            } else {
+                this.templateJson = JSON.parse(JSON.stringify(this.defaultData))
+            }
+            this.$nextTick(() => {
+                this.loading = false
+            })
+        },
+        // 给父级组件提供的获取流程数据得方法
+        getData() {
+            return new Promise((resolve, reject) => {
+                this.verifyMode = true;
+                this.formData.templateJson = this.templateJson
+                if (NodeUtils.checkAllNode(this.formData.templateJson)) {
+                    resolve({ data: this.formData });
+                } else {
+                    reject({ msg: '' });
+                }
+            });
+        },
+    }
 };
 </script>
 
 <style scoped lang="scss">
 .process-container {
-  display: flex;
-  height: 100%;
-
-  .left-container {
-    flex-shrink: 0;
-    width: 220px;
-    margin-right: 10px;
-    background: #fff;
-    border-radius: 4px;
+    display: flex;
     height: 100%;
-    .left-list {
-      padding: 10px;
-      height: calc(100% - 40px);
-      border-bottom: 1px solid #dcdfe6;
-      overflow: auto;
-      .left-item {
-        height: 40px;
-        display: flex;
-        align-items: center;
-        justify-content: space-between;
-        border: 1px solid #dcdfe6;
-        padding: 0 10px;
+
+    .left-container {
+        flex-shrink: 0;
+        width: 220px;
+        margin-right: 10px;
+        background: #fff;
         border-radius: 4px;
-        margin-bottom: 10px;
-        .option-drag {
-          margin-right: 6px;
-          cursor: move;
+        height: 100%;
+        .left-list {
+            padding: 10px;
+            height: calc(100% - 40px);
+            border-bottom: 1px solid #dcdfe6;
+            overflow: auto;
+            .left-item {
+                height: 40px;
+                display: flex;
+                align-items: center;
+                justify-content: space-between;
+                border: 1px solid #dcdfe6;
+                padding: 0 10px;
+                border-radius: 4px;
+                margin-bottom: 10px;
+                .option-drag {
+                    margin-right: 6px;
+                    cursor: move;
+                }
+                .icon {
+                    cursor: pointer;
+                }
+                &.active {
+                    border: 1px solid #1890ff;
+                    background: #1890ff;
+                    .name {
+                        color: #fff;
+                    }
+                    .icon {
+                        color: #fff;
+                    }
+                    .option-drag {
+                        color: #fff;
+                    }
+                }
+                .name {
+                    width: 160px;
+                    white-space: nowrap;
+                    text-overflow: ellipsis;
+                    overflow: hidden;
+                    word-break: break-all;
+                }
+            }
         }
-        .icon {
-          cursor: pointer;
+        .add-btn {
+            height: 40px;
+            display: flex;
+            justify-content: center;
+            align-items: center;
+            cursor: pointer;
         }
-        &.active {
-          border: 1px solid #1890ff;
-          background: #1890ff;
-          .name {
-            color: #fff;
-          }
-          .icon {
-            color: #fff;
-          }
-          .option-drag {
-            color: #fff;
-          }
-        }
-        .name {
-          width: 160px;
-          white-space: nowrap;
-          text-overflow: ellipsis;
-          overflow: hidden;
-          word-break: break-all;
-        }
-      }
     }
-    .add-btn {
-      height: 40px;
-      display: flex;
-      justify-content: center;
-      align-items: center;
-      cursor: pointer;
+    .center-container {
+        flex: 1;
+        height: 100%;
+        overflow: hidden;
     }
-  }
-  .center-container {
-    flex: 1;
-    height: 100%;
-    overflow: hidden;
-  }
 }
 </style>

+ 4 - 0
src/main.js

@@ -28,6 +28,10 @@ Vue.use(permission)
 //eventBus挂载
 Vue.prototype.$eventBus = new Vue()
 
+
+import CodeEditor from 'bin-code-editor';
+Vue.use(CodeEditor);
+
 Vue.use(Element, {
   size: jnpf.storageGet('size') || 'small', // set element-ui default size
   i18n: (key, value) => i18n.t(key, value)

+ 10 - 4
src/utils/apiUrl.js

@@ -1,7 +1,13 @@
 module.exports = {
   // 开发环境接口配置
   // APIURl: "http://localhost:30000"
-  // APIURl: "https://test.api.shidaiyun.net"
-  APIURl: "http://10.21.12.253:30000"
-  // APIURl: "https://api.shidaiyun.net"
-};
+  // APIURl: "http://10.21.12.74:30000"
+  APIURl: "http://10.0.0.112:30000"
+  // 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/'
+};
+
+
+

+ 23 - 16
src/utils/request.js

@@ -60,23 +60,30 @@ service.interceptors.response.use(
     // 特殊接口处理
     if (url.indexOf('/Base/DataSource/Actions/Test') > -1 || (url.indexOf('OnlineDev') > -1 && url.indexOf('Config') > -1 || (url.indexOf('api/visualdev/Porta') > -1 && url.indexOf('auth') > -1))) return res
     if (res.code !== 200) {
-      message({
-        message: res.msg || '请求出错,请重试',
-        type: 'error',
-        duration: 1500,
-        onClose: () => {
-          if (url.indexOf('/api/oauth/Login') < 0 && url.indexOf('/api/oauth/LockScreen') < 0 && (res.code === 600 || res.code === 601 || res.code === 602)) {
-            // 600:登录过期,请重新登录  601: 您的帐号在其他地方已登录,被强制踢出 602: Token验证失败
-            store.dispatch('user/resetToken').then(() => {
-              if (window.location.pathname.indexOf('login') > -1) return
-              // setTimeout(() => { location.reload() }, 100);
-              context.$router.push(`/login`)
-            })
+
+      let blob = new Blob([res], { type: 'application/vnd.ms-excel' })
+      if (blob.size) {
+        return res
+      } else {
+        message({
+          message: res.msg || '请求出错,请重试',
+          type: 'error',
+          duration: 1500,
+          onClose: () => {
+            if (url.indexOf('/api/oauth/Login') < 0 && url.indexOf('/api/oauth/LockScreen') < 0 && (res.code === 600 || res.code === 601 || res.code === 602)) {
+              // 600:登录过期,请重新登录  601: 您的帐号在其他地方已登录,被强制踢出 602: Token验证失败
+              store.dispatch('user/resetToken').then(() => {
+                if (window.location.pathname.indexOf('login') > -1) return
+                // setTimeout(() => { location.reload() }, 100);
+                context.$router.push(`/login`)
+              })
+            }
           }
-        }
-      })
-      if (url.indexOf('/api/oauth/Login') > -1) return Promise.reject(res)
-      return Promise.reject(new Error(res.msg || 'Error'))
+        })
+        if (url.indexOf('/api/oauth/Login') > -1) return Promise.reject(res)
+        return Promise.reject(new Error(res.msg || 'Error'))
+      }
+
     } else {
       return res
     }

+ 17 - 0
src/utils/upload.js

@@ -0,0 +1,17 @@
+import request from '@/utils/request'
+
+// 获取下载文件链接
+export function uploadFuction(type, file) {
+  const formData = new FormData()
+  formData.append('file', file)
+  formData.append('type', type)
+
+  return request({
+    url: `/api/minio/upload`,
+    method: 'post',
+    data: formData,
+    headers: {
+      'Content-Type': 'multipart/form-data'
+    },
+  })
+}

+ 451 - 445
src/views/basic/profile/index.vue

@@ -1,107 +1,113 @@
 <template>
-  <div class="app-container Profile-container">
-    <el-tabs tab-position="left" style="height:100%" v-model="activeTab" class="profile-tabs"
-      v-loading="userLoading">
-      <el-tab-pane label="个人资料" name="user">
-        <UserInfo ref="user" :user='user' v-if="visible.user" @updateInfo="getInfo" />
-      </el-tab-pane>
-      <el-tab-pane label="租户信息" name="tenantInfo" v-if="isTenant">
-        <TenantInfo ref="tenantInfo" v-if="visible.tenantInfo" :tenantData="tenantData" />
-      </el-tab-pane>
-      <el-tab-pane label="修改密码" name="password">
-        <Password ref="password" v-if="visible.password" />
-      </el-tab-pane>
-      <el-tab-pane disabled name="line"></el-tab-pane>
-      <el-tab-pane label="我的组织" name="organize">
-        <div class="JNPF-common-title mb-10  ">
-          <h2 class="bold">我的组织
-            <el-tooltip content="用户可以自行切换组织信息,我的组织默认只能进行单选" placement="right">
-              <a class="tooltip-question el-icon-question"></a>
-            </el-tooltip>
-          </h2>
-        </div>
-        <div class="organize-list">
-          <el-row :gutter="80" v-if="organizeList.length">
-            <el-col :span="12" class="organize-item" v-for="(item,i) in organizeList" :key="i">
-              <div class="organize-item-main" :class="{active:activeOrganize===item.id}"
-                @click="changeMajor(item.id,'Organize')">
-                <i class="icon-ym icon-ym-organization"></i>
-                <p class="organize-name">{{item.fullName}}</p>
-                <p class="btn">默认</p>
-                <div class="icon-checked">
-                  <i class="el-icon-check"></i>
+    <div class="app-container Profile-container">
+        <el-tabs tab-position="left" style="height:100%" v-model="activeTab" class="profile-tabs"
+            v-loading="userLoading">
+            <el-tab-pane label="个人资料" name="user">
+                <UserInfo ref="user" :user='user' v-if="visible.user" @updateInfo="getInfo" />
+            </el-tab-pane>
+            <el-tab-pane label="租户信息" name="tenantInfo" v-if="isTenant">
+                <TenantInfo ref="tenantInfo" v-if="visible.tenantInfo" :tenantData="tenantData" />
+            </el-tab-pane>
+            <el-tab-pane label="修改密码" name="password">
+                <Password ref="password" v-if="visible.password" />
+            </el-tab-pane>
+            <el-tab-pane disabled name="line"></el-tab-pane>
+            <el-tab-pane label="我的组织" name="organize">
+                <div class="JNPF-common-title mb-10  ">
+                    <h2 class="bold">我的组织
+                        <el-tooltip content="用户可以自行切换组织信息,我的组织默认只能进行单选" placement="right">
+                            <a class="tooltip-question el-icon-question"></a>
+                        </el-tooltip>
+                    </h2>
                 </div>
-              </div>
-            </el-col>
-          </el-row>
-          <el-empty description="暂无数据" :image-size="120" v-else></el-empty>
-        </div>
-      </el-tab-pane>
-      <el-tab-pane label="我的岗位" name="position">
-        <div class="JNPF-common-title mb-10">
-          <h2 class="bold">我的岗位
-            <el-tooltip content="用户可以自行切换我的组织内的岗位信息,我的岗位默认只能进行单选" placement="right">
-              <a class="el-icon-question tooltip-question"></a>
-            </el-tooltip>
-          </h2>
-        </div>
-        <div class="organize-list">
-          <el-row :gutter="80" v-if="positionList.length">
-            <el-col :span="12" class="organize-item" v-for="(item,i) in positionList" :key="i">
-              <div class="organize-item-main" :class="{active:activePosition===item.id}"
-                @click="changeMajor(item.id,'Position')">
-                <i class="icon-ym icon-ym-wf-outgoingApply"></i>
-                <p class="organize-name">{{item.fullName}}</p>
-                <p class="btn">主岗</p>
-                <div class="icon-checked">
-                  <i class="el-icon-check"></i>
+                <div class="organize-list">
+                    <el-row :gutter="80" v-if="organizeList.length">
+                        <el-col :span="12" class="organize-item" v-for="(item,i) in organizeList"
+                            :key="i">
+                            <div class="organize-item-main"
+                                :class="{active:activeOrganize===item.id}"
+                                @click="changeMajor(item.id,'Organize')">
+                                <i class="icon-ym icon-ym-organization"></i>
+                                <p class="organize-name">{{item.fullName}}</p>
+                                <p class="btn">默认</p>
+                                <div class="icon-checked">
+                                    <i class="el-icon-check"></i>
+                                </div>
+                            </div>
+                        </el-col>
+                    </el-row>
+                    <el-empty description="暂无数据" :image-size="120" v-else></el-empty>
                 </div>
-              </div>
-            </el-col>
-          </el-row>
-          <el-empty description="暂无数据" :image-size="120" v-else></el-empty>
-        </div>
-      </el-tab-pane>
-      <el-tab-pane label="我的下属" name="subordinate">
-        <div class="JNPF-common-title mb-10">
-          <h2 class="bold">我的下属</h2>
-        </div>
-        <div class="subordinate-list">
-          <el-tree :data="treeData" :props="props" check-on-click-node node-key="id" lazy
-            v-loading="loading" :load="loadNode" class="JNPF-common-el-tree subordinate-tree">
-            <el-card class="subordinate-tree-node" shadow="never" slot-scope="{ data }">
-              <el-avatar :size="50" :src="define.comUrl+ data.avatar"></el-avatar>
-              <div class="text">
-                <p>{{data.userName}}</p>
-                <p class="user-text">{{data.department}}{{data.position?'/'+data.position:''}}</p>
-              </div>
-            </el-card>
-          </el-tree>
-        </div>
-      </el-tab-pane>
-      <el-tab-pane label="绑定设置" name="justAuth" v-if="useSocials">
-        <JustAuth ref="justAuth" v-if="visible.justAuth" />
-      </el-tab-pane>
-      <el-tab-pane label="系统权限" name="authorize" class="el-tab-pane-authorize">
-        <Authorize ref="authorize" v-if="visible.authorize" />
-      </el-tab-pane>
-      <el-tab-pane label="登录日志" name="sysLog">
-        <SysLog ref="sysLog" v-if="visible.sysLog" />
-      </el-tab-pane>
-    </el-tabs>
-    <div class="head">
-      <el-upload class="avatar-uploader" :action="define.comUploadUrl+'/userAvatar'"
-        :headers="uploadHeaders" :on-success="handleSuccess" :show-file-list="false"
-        accept="image/*" :before-upload="beforeUpload">
-        <div class="avatar-box">
-          <el-avatar :size="50" :src="define.comUrl + user.avatar" class="avatar"
-            v-if="user.avatar" />
-          <div class="avatar-hover">更换头像</div>
+            </el-tab-pane>
+            <el-tab-pane label="我的岗位" name="position">
+                <div class="JNPF-common-title mb-10">
+                    <h2 class="bold">我的岗位
+                        <el-tooltip content="用户可以自行切换我的组织内的岗位信息,我的岗位默认只能进行单选" placement="right">
+                            <a class="el-icon-question tooltip-question"></a>
+                        </el-tooltip>
+                    </h2>
+                </div>
+                <div class="organize-list">
+                    <el-row :gutter="80" v-if="positionList.length">
+                        <el-col :span="12" class="organize-item" v-for="(item,i) in positionList"
+                            :key="i">
+                            <div class="organize-item-main"
+                                :class="{active:activePosition===item.id}"
+                                @click="changeMajor(item.id,'Position')">
+                                <i class="icon-ym icon-ym-wf-outgoingApply"></i>
+                                <p class="organize-name">{{item.fullName}}</p>
+                                <p class="btn">主岗</p>
+                                <div class="icon-checked">
+                                    <i class="el-icon-check"></i>
+                                </div>
+                            </div>
+                        </el-col>
+                    </el-row>
+                    <el-empty description="暂无数据" :image-size="120" v-else></el-empty>
+                </div>
+            </el-tab-pane>
+            <el-tab-pane label="我的下属" name="subordinate">
+                <div class="JNPF-common-title mb-10">
+                    <h2 class="bold">我的下属</h2>
+                </div>
+                <div class="subordinate-list">
+                    <el-tree :data="treeData" :props="props" check-on-click-node node-key="id" lazy
+                        v-loading="loading" :load="loadNode"
+                        class="JNPF-common-el-tree subordinate-tree">
+                        <el-card class="subordinate-tree-node" shadow="never" slot-scope="{ data }">
+                            <el-avatar :size="50" :src="define.comUrl+ data.avatar"></el-avatar>
+                            <div class="text">
+                                <p>{{data.userName}}</p>
+                                <p class="user-text">
+                                    {{data.department}}{{data.position?'/'+data.position:''}}</p>
+                            </div>
+                        </el-card>
+                    </el-tree>
+                </div>
+            </el-tab-pane>
+            <el-tab-pane label="绑定设置" name="justAuth" v-if="useSocials">
+                <JustAuth ref="justAuth" v-if="visible.justAuth" />
+            </el-tab-pane>
+            <el-tab-pane label="系统权限" name="authorize" class="el-tab-pane-authorize">
+                <Authorize ref="authorize" v-if="visible.authorize" />
+            </el-tab-pane>
+            <el-tab-pane label="登录日志" name="sysLog">
+                <SysLog ref="sysLog" v-if="visible.sysLog" />
+            </el-tab-pane>
+        </el-tabs>
+        <div class="head">
+            <el-upload class="avatar-uploader" :action="define.comUploadUrl+'/userAvatar'"
+                :headers="uploadHeaders" :on-success="handleSuccess" :show-file-list="false"
+                accept="image/*" :before-upload="beforeUpload">
+                <div class="avatar-box">
+                    <el-avatar :size="50" :src="define.comUrl + user.avatar" class="avatar"
+                        v-if="user.avatar" />
+                    <div class="avatar-hover">更换头像</div>
+                </div>
+            </el-upload>
+            <span class="username">{{user.realName}}</span>
         </div>
-      </el-upload>
-      <span class="username">{{user.realName}}</span>
     </div>
-  </div>
 </template>
 <script>
 import { UserSettingInfo, getSubordinate, UpdateAvatar, UpdateLanguage, getUserOrganizes, getUserPositions, setMajor } from '@/api/permission/userSetting'
@@ -112,377 +118,377 @@ import SysLog from './components/SysLog'
 import JustAuth from './components/JustAuth'
 import TenantInfo from './components/TenantInfo'
 export default {
-  name: 'profile',
-  components: { UserInfo, Password, Authorize, SysLog, JustAuth, TenantInfo },
-  data() {
-    return {
-      user: {},
-      treeData: [],
-      activeTab: '',
-      organizeList: [],
-      positionList: [],
-      activeOrganize: '',
-      activePosition: '',
-      visible: {
-        tenantInfo: false,
-        user: true,
-        password: false,
-        theme: false,
-        authorize: false,
-        sysLog: false,
-        justAuth: false,
-      },
-      props: {
-        children: 'children',
-        label: 'userName',
-        isLeaf: 'isLeaf'
-      },
-      loading: false,
-      userLoading: false,
-      nodeId: '0',
-      uploadHeaders: { Authorization: this.$store.getters.token },
-      tenantData: {},
-      isTenant: false
-    }
-  },
-  watch: {
-    '$route': 'getInfo',
-    activeTab(val) {
-      for (let key of Object.keys(this.visible)) {
-        this.visible[key] = false
-      }
-      this.visible[val] = true
-      if (val === 'subordinate') {
-        this.nodeId = '0'
-        this.getSubordinate()
-        return
-      }
-      if (val === 'organize') {
-        this.getUserOrganizes()
-        return
-      }
-      if (val === 'position') {
-        this.getUserPositions()
-        return
-      }
-    }
-  },
-  created() {
-    this.getInfo()
-  },
-  computed: {
-    useSocials() {
-      return localStorage.getItem('useSocials') && localStorage.getItem('useSocials') != '0'
-    }
-  },
-  methods: {
-    beforeUpload(file) {
-      let isAccept = new RegExp('image/*').test(file.type)
-      if (!isAccept) {
-        this.$message.error(`请上传图片`)
-      }
-      return isAccept;
-    },
-    getInfo() {
-      this.userLoading = true
-      UserSettingInfo().then(res => {
-        this.user = res.data
-        this.activeTab = 'user'
-        this.userLoading = false
-        this.tenantData = this.user.currentTenantInfo
-        this.isTenant = this.user.isTenant
-        let flag = this.$router.history.current.query.flag
-        if (flag == "1") {
-          this.activeTab = "justAuth"
+    name: 'profile',
+    components: { UserInfo, Password, Authorize, SysLog, JustAuth, TenantInfo },
+    data() {
+        return {
+            user: {},
+            treeData: [],
+            activeTab: '',
+            organizeList: [],
+            positionList: [],
+            activeOrganize: '',
+            activePosition: '',
+            visible: {
+                tenantInfo: false,
+                user: true,
+                password: false,
+                theme: false,
+                authorize: false,
+                sysLog: false,
+                justAuth: false,
+            },
+            props: {
+                children: 'children',
+                label: 'userName',
+                isLeaf: 'isLeaf'
+            },
+            loading: false,
+            userLoading: false,
+            nodeId: '0',
+            uploadHeaders: { Authorization: this.$store.getters.token },
+            tenantData: {},
+            isTenant: false
         }
-      })
     },
-    getSubordinate() {
-      this.loading = true
-      getSubordinate(this.nodeId).then(res => {
-        this.treeData = res.data
-        this.loading = false
-      })
-    },
-    loadNode(node, resolve) {
-      if (node.level === 0) {
-        this.nodeId = '0'
-        return resolve(this.treeData)
-      }
-      this.nodeId = node.data.id
-      getSubordinate(this.nodeId).then(res => {
-        resolve(res.data)
-      })
-    },
-    handleSuccess(res, file) {
-      if (res.code == 200) {
-        this.updateAvatar(res.data)
-      } else {
-        this.$message({
-          message: '上传失败',
-          type: 'error',
-          duration: 1000,
-        })
-      }
-    },
-    updateAvatar(data) {
-      UpdateAvatar(data.name).then(res => {
-        this.user.avatar = data.url
-        this.$store.commit('user/SET_USERINFO_HEADICON', data.url)
-        this.$message({
-          message: res.msg,
-          type: 'success',
-          duration: 1000,
-        })
-      })
+    watch: {
+        '$route': 'getInfo',
+        activeTab(val) {
+            for (let key of Object.keys(this.visible)) {
+                this.visible[key] = false
+            }
+            this.visible[val] = true
+            if (val === 'subordinate') {
+                this.nodeId = '0'
+                this.getSubordinate()
+                return
+            }
+            if (val === 'organize') {
+                this.getUserOrganizes()
+                return
+            }
+            if (val === 'position') {
+                this.getUserPositions()
+                return
+            }
+        }
     },
-    getUserOrganizes() {
-      getUserOrganizes().then(res => {
-        this.organizeList = res.data || []
-        const list = this.organizeList.filter(o => o.isDefault)
-        if (!list.length) return this.activeOrganize = ''
-        const activeItem = list[0]
-        this.activeOrganize = activeItem.id
-      })
+    created() {
+        this.getInfo()
     },
-    getUserPositions() {
-      getUserPositions().then(res => {
-        this.positionList = res.data || []
-        const list = this.positionList.filter(o => o.isDefault)
-        if (!list.length) return this.activePosition = ''
-        const activeItem = list[0]
-        this.activePosition = activeItem.id
-      })
+    computed: {
+        useSocials() {
+            return localStorage.getItem('useSocials') && localStorage.getItem('useSocials') != '0'
+        }
     },
-    changeMajor(majorId, majorType) {
-      if (this['active' + majorType] === majorId) return
-      let query = {
-        majorId,
-        majorType
-      }
-      setMajor(query).then(res => {
-        this['active' + majorType] = majorId
-        this.$message({
-          message: res.msg,
-          type: 'success',
-          duration: 1500,
-          onClose() {
-            location.reload()
-          }
-        })
-      })
+    methods: {
+        beforeUpload(file) {
+            let isAccept = new RegExp('image/*').test(file.type)
+            if (!isAccept) {
+                this.$message.error(`请上传图片`)
+            }
+            return isAccept;
+        },
+        getInfo() {
+            this.userLoading = true
+            UserSettingInfo().then(res => {
+                this.user = res.data
+                this.activeTab = 'user'
+                this.userLoading = false
+                this.tenantData = this.user.currentTenantInfo
+                this.isTenant = this.user.isTenant
+                let flag = this.$router.history.current.query.flag
+                if (flag == "1") {
+                    this.activeTab = "justAuth"
+                }
+            })
+        },
+        getSubordinate() {
+            this.loading = true
+            getSubordinate(this.nodeId).then(res => {
+                this.treeData = res.data
+                this.loading = false
+            })
+        },
+        loadNode(node, resolve) {
+            if (node.level === 0) {
+                this.nodeId = '0'
+                return resolve(this.treeData)
+            }
+            this.nodeId = node.data.id
+            getSubordinate(this.nodeId).then(res => {
+                resolve(res.data)
+            })
+        },
+        handleSuccess(res, file) {
+            if (res.code == 200) {
+                this.updateAvatar(res.data)
+            } else {
+                this.$message({
+                    message: '上传失败',
+                    type: 'error',
+                    duration: 1000,
+                })
+            }
+        },
+        updateAvatar(data) {
+            UpdateAvatar(data.name).then(res => {
+                this.user.avatar = data.url
+                this.$store.commit('user/SET_USERINFO_HEADICON', data.url)
+                this.$message({
+                    message: res.msg,
+                    type: 'success',
+                    duration: 1000,
+                })
+            })
+        },
+        getUserOrganizes() {
+            getUserOrganizes().then(res => {
+                this.organizeList = res.data || []
+                const list = this.organizeList.filter(o => o.isDefault)
+                if (!list.length) return this.activeOrganize = ''
+                const activeItem = list[0]
+                this.activeOrganize = activeItem.id
+            })
+        },
+        getUserPositions() {
+            getUserPositions().then(res => {
+                this.positionList = res.data || []
+                const list = this.positionList.filter(o => o.isDefault)
+                if (!list.length) return this.activePosition = ''
+                const activeItem = list[0]
+                this.activePosition = activeItem.id
+            })
+        },
+        changeMajor(majorId, majorType) {
+            if (this['active' + majorType] === majorId) return
+            let query = {
+                majorId,
+                majorType
+            }
+            setMajor(query).then(res => {
+                this['active' + majorType] = majorId
+                this.$message({
+                    message: res.msg,
+                    type: 'success',
+                    duration: 1500,
+                    onClose() {
+                        location.reload()
+                    }
+                })
+            })
+        }
     }
-  }
 }
 </script>
 <style lang="scss" scoped>
 .Profile-container {
-  position: relative;
-  padding-top: 10px;
-  .profile-tabs {
-    >>> .el-tabs__nav-scroll {
-      padding-top: 70px;
-    }
-    >>> .el-tabs__item {
-      text-align: left !important;
-    }
-    >>> .el-tabs__content {
-      height: 100%;
-      .el-tab-pane {
-        height: 100%;
-        overflow: auto;
-        overflow-x: hidden;
+    position: relative;
+    padding-top: 10px;
+    .profile-tabs {
+        >>> .el-tabs__nav-scroll {
+            padding-top: 70px;
+        }
+        >>> .el-tabs__item {
+            text-align: left !important;
+        }
+        >>> .el-tabs__content {
+            height: 100%;
+            .el-tab-pane {
+                height: 100%;
+                overflow: auto;
+                overflow-x: hidden;
 
-        &.el-tab-pane-authorize {
-          overflow: hidden;
+                &.el-tab-pane-authorize {
+                    overflow: hidden;
+                }
+            }
+        }
+        >>> #tab-line {
+            height: 20px;
+            width: 160px;
+            &::after {
+                position: absolute;
+                width: 100%;
+                height: 1px;
+                background: #ddd;
+                content: '';
+                display: block;
+                overflow: hidden;
+                top: 10px;
+                left: 0;
+            }
         }
-      }
     }
-    >>> #tab-line {
-      height: 20px;
-      width: 160px;
-      &::after {
+    .head {
         position: absolute;
-        width: 100%;
-        height: 1px;
-        background: #ddd;
-        content: '';
-        display: block;
-        overflow: hidden;
+        left: 10px;
         top: 10px;
-        left: 0;
-      }
-    }
-  }
-  .head {
-    position: absolute;
-    left: 10px;
-    top: 10px;
-    height: 70px;
-    width: 160px;
-    padding-top: 10px;
-    >>> .avatar-uploader {
-      display: inline-block;
-      vertical-align: top;
-      .avatar-hover {
-        position: absolute;
-        left: 0;
-        top: 0;
-        font-size: 12px;
-        display: none;
-        overflow: hidden;
-        width: 50px;
-        height: 50px;
-        text-align: center;
-        border-radius: 50%;
-        line-height: 50px;
-        color: #fff;
-        cursor: pointer;
-        background: rgba(0, 0, 0, 0.5);
-      }
-      &:hover {
-        & .avatar-hover {
-          display: block;
+        height: 70px;
+        width: 160px;
+        padding-top: 10px;
+        >>> .avatar-uploader {
+            display: inline-block;
+            vertical-align: top;
+            .avatar-hover {
+                position: absolute;
+                left: 0;
+                top: 0;
+                font-size: 12px;
+                display: none;
+                overflow: hidden;
+                width: 50px;
+                height: 50px;
+                text-align: center;
+                border-radius: 50%;
+                line-height: 50px;
+                color: #fff;
+                cursor: pointer;
+                background: rgba(0, 0, 0, 0.5);
+            }
+            &:hover {
+                & .avatar-hover {
+                    display: block;
+                }
+            }
+        }
+        .avatar-box {
+            position: relative;
+        }
+        .avatar {
+            display: inline-block;
+            width: 50px;
+            height: 50px;
+            overflow: hidden;
+            border-radius: 50%;
+            vertical-align: top;
+            margin-right: 10px;
+        }
+        .username {
+            line-height: 50px;
+            font-size: 14px;
         }
-      }
-    }
-    .avatar-box {
-      position: relative;
-    }
-    .avatar {
-      display: inline-block;
-      width: 50px;
-      height: 50px;
-      overflow: hidden;
-      border-radius: 50%;
-      vertical-align: top;
-      margin-right: 10px;
-    }
-    .username {
-      line-height: 50px;
-      font-size: 14px;
     }
-  }
 
-  >>> .el-select,
-  >>> .el-date-editor {
-    width: 100%;
-  }
-  .subordinate-tree {
-    height: 100%;
-    margin: 0;
-    .subordinate-tree-node {
-      width: 300px;
-    }
-    >>> .el-tree-node:focus > .el-tree-node__content {
-      background-color: #fff;
-    }
-    >>> .el-tree-node__expand-icon.el-icon-caret-right {
-      font-size: 20px;
-    }
-    >>> .el-tree-node__content {
-      height: 80px;
-      &:hover {
-        background: #fff;
-      }
+    >>> .el-select,
+    >>> .el-date-editor {
+        width: 100%;
     }
-    >>> .el-card__body {
-      display: flex;
-      padding: 10px 10px;
-      align-items: center;
-      .el-avatar {
-        margin-right: 10px;
-        flex-shrink: 0;
-      }
-
-      .text {
-        font-size: 14px;
-        width: calc(100% - 60px);
-        p {
-          line-height: 25px;
-          white-space: nowrap;
-          text-overflow: ellipsis;
-          overflow: hidden;
-          word-break: break-all;
+    .subordinate-tree {
+        height: 100%;
+        margin: 0;
+        .subordinate-tree-node {
+            width: 300px;
         }
-      }
-      .user-text {
-        color: #999;
-        font-size: 12px;
-      }
-    }
-  }
-  #pane-subordinate {
-    overflow: hidden;
-    display: flex;
-    flex-direction: column;
-    .subordinate-list {
-      flex: 1;
-      overflow: auto;
-    }
-  }
-  .organize-list {
-    width: 100%;
-    padding: 50px;
-    .organize-item {
-      margin-bottom: 30px;
-      .organize-item-main {
-        height: 70px;
-        position: relative;
-        border-radius: 4px;
-        border: 1px solid #dcdfe6;
-        display: flex;
-        align-items: center;
-        padding: 0 20px;
-        cursor: pointer;
-        box-shadow: 0 0 6px rgba(0, 0, 0, 0.16);
-        color: #606266;
-        &.active {
-          border: 1px solid #1890ff;
-          box-shadow: 0 0 6px rgba(6, 58, 108, 0.26);
-          color: #1890ff;
-          .btn,
-          .icon-checked {
-            display: block;
-          }
+        >>> .el-tree-node:focus > .el-tree-node__content {
+            background-color: #fff;
         }
-        .icon-ym {
-          font-size: 24px;
-          margin-right: 10px;
+        >>> .el-tree-node__expand-icon.el-icon-caret-right {
+            font-size: 20px;
         }
-        .organize-name {
-          line-height: 24px;
-          font-size: 14px;
+        >>> .el-tree-node__content {
+            height: 80px;
+            &:hover {
+                background: #fff;
+            }
         }
-        .btn {
-          display: none;
-          position: absolute;
-          right: 45px;
-          bottom: 7px;
-          font-size: 12px;
+        >>> .el-card__body {
+            display: flex;
+            padding: 10px 10px;
+            align-items: center;
+            .el-avatar {
+                margin-right: 10px;
+                flex-shrink: 0;
+            }
+
+            .text {
+                font-size: 14px;
+                width: calc(100% - 60px);
+                p {
+                    line-height: 25px;
+                    white-space: nowrap;
+                    text-overflow: ellipsis;
+                    overflow: hidden;
+                    word-break: break-all;
+                }
+            }
+            .user-text {
+                color: #999;
+                font-size: 12px;
+            }
         }
-        .icon-checked {
-          display: none;
-          width: 20px;
-          height: 20px;
-          border: 20px solid #1890ff;
-          border-left: 20px solid transparent;
-          border-top: 20px solid transparent;
-          border-bottom-right-radius: 2px;
-          position: absolute;
-          transform: scale(0.9);
-          right: -2px;
-          bottom: -2px;
-          i {
-            position: absolute;
-            top: -2px;
-            left: -3px;
-            font-size: 20px;
-            color: #fff;
-          }
+    }
+    #pane-subordinate {
+        overflow: hidden;
+        display: flex;
+        flex-direction: column;
+        .subordinate-list {
+            flex: 1;
+            overflow: auto;
+        }
+    }
+    .organize-list {
+        width: 100%;
+        padding: 50px;
+        .organize-item {
+            margin-bottom: 30px;
+            .organize-item-main {
+                height: 70px;
+                position: relative;
+                border-radius: 4px;
+                border: 1px solid #dcdfe6;
+                display: flex;
+                align-items: center;
+                padding: 0 20px;
+                cursor: pointer;
+                box-shadow: 0 0 6px rgba(0, 0, 0, 0.16);
+                color: #606266;
+                &.active {
+                    border: 1px solid #1890ff;
+                    box-shadow: 0 0 6px rgba(6, 58, 108, 0.26);
+                    color: #1890ff;
+                    .btn,
+                    .icon-checked {
+                        display: block;
+                    }
+                }
+                .icon-ym {
+                    font-size: 24px;
+                    margin-right: 10px;
+                }
+                .organize-name {
+                    line-height: 24px;
+                    font-size: 14px;
+                }
+                .btn {
+                    display: none;
+                    position: absolute;
+                    right: 45px;
+                    bottom: 7px;
+                    font-size: 12px;
+                }
+                .icon-checked {
+                    display: none;
+                    width: 20px;
+                    height: 20px;
+                    border: 20px solid #1890ff;
+                    border-left: 20px solid transparent;
+                    border-top: 20px solid transparent;
+                    border-bottom-right-radius: 2px;
+                    position: absolute;
+                    transform: scale(0.9);
+                    right: -2px;
+                    bottom: -2px;
+                    i {
+                        position: absolute;
+                        top: -2px;
+                        left: -3px;
+                        font-size: 20px;
+                        color: #fff;
+                    }
+                }
+            }
         }
-      }
     }
-  }
 }
 </style>

+ 0 - 91
src/views/governmentCloud/computerroommanagement/Detail.vue

@@ -1,91 +0,0 @@
-<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">
-                </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: {
-                rqCodeId: { "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/ComputerRoomManagement/ComputerRoomManagement/detail/' + this.dataForm.id,
-                        method: 'get'
-                    }).then(res => {
-                        this.dataInfo(res.data)
-                        this.loading = false
-                    })
-                }
-
-            })
-        },
-    },
-}
-
-</script>

+ 0 - 0
src/views/governmentCloud/computerroommanagement/columnList.js → src/views/governmentCloud/computerroommanagement/computerRoomQR/columnList.js


+ 31 - 7
src/views/governmentCloud/computerroommanagement/form.vue → src/views/governmentCloud/computerroommanagement/computerRoomQR/form.vue

@@ -6,6 +6,30 @@
                 label-width="100px" label-position="right">
                 <template v-if="!loading">
                     <!-- 具体表单 -->
+                    <el-col :span="24">
+                        <jnpf-form-tip-item label="机房名称" align="left" prop="computerRoom">
+                            <JnpfInput v-model="dataForm.computerRoom"
+                                @change="changeData('title',-1)" placeholder="请输入机房名称" clearable
+                                :style='{"width":"100%"}'>
+                            </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('title',-1)"
+                                placeholder="请输入机房名称" clearable :style='{"width":"100%"}'>
+                            </JnpfInput>
+                        </jnpf-form-tip-item>
+                    </el-col>
+                    <el-col :span="24">
+                        <jnpf-form-tip-item label="备注" align="left" prop="remark">
+                            <JnpfTextarea v-model="dataForm.remark"
+                                @change="changeData('remark',-1)" placeholder="请输入备注"
+                                :style='{"width":"100%"}' true type="textarea"
+                                :autosize='{"minRows":4,"maxRows":4}'>
+                            </JnpfTextarea>
+                        </jnpf-form-tip-item>
+                    </el-col>
                     <!-- 表单结束 -->
                 </template>
             </el-form>
@@ -73,9 +97,9 @@ export default {
             Vmodel: "",
             currVmodel: "",
             dataForm: {
-                createBy: undefined,
-                createTime: undefined,
-                rqCodeId: undefined,
+                computerRoom: undefined,
+                code: undefined,
+                remark: undefined,
             },
             tableRequiredData: {},
             dataRule:
@@ -138,7 +162,7 @@ export default {
         },
         getInfo(id) {
             request({
-                url: '/api/ComputerRoomManagement/ComputerRoomManagement/' + id,
+                url: '/api/QRCode/QRCode/' + id,
                 method: 'get'
             }).then(res => {
                 this.dataInfo(res.data)
@@ -213,7 +237,7 @@ export default {
                 if (this.dataForm.id) {
                     this.loading = true
                     request({
-                        url: '/api/ComputerRoomManagement/ComputerRoomManagement/' + this.dataForm.id,
+                        url: '/api/QRCode/QRCode/' + this.dataForm.id,
                         method: 'get'
                     }).then(res => {
                         this.dataInfo(res.data)
@@ -249,7 +273,7 @@ export default {
             }
             if (!this.dataForm.id) {
                 request({
-                    url: '/api/ComputerRoomManagement/ComputerRoomManagement',
+                    url: '/api/QRCode/QRCode',
                     method: 'post',
                     data: _data
                 }).then((res) => {
@@ -277,7 +301,7 @@ export default {
                 })
             } else {
                 request({
-                    url: '/api/ComputerRoomManagement/ComputerRoomManagement/' + this.dataForm.id,
+                    url: '/api/QRCode/QRCode/' + this.dataForm.id,
                     method: 'PUT',
                     data: _data
                 }).then((res) => {

+ 75 - 79
src/views/governmentCloud/computerroommanagement/index.vue → src/views/governmentCloud/computerroommanagement/computerRoomQR/index.vue

@@ -4,14 +4,9 @@
             <el-row class="JNPF-common-search-box" :gutter="16">
                 <el-form @submit.native.prevent>
                     <el-col :span="6">
-                        <el-form-item label="创建人">
-                            <JnpfUserSelect v-model="query.createBy" placeholder="请选择" />
-                        </el-form-item>
-                    </el-col>
-                    <el-col :span="6">
-                        <el-form-item label="创建时间">
-                            <JnpfDateRangePicker v-model="query.createTime" format="yyyy-MM-dd"
-                                startPlaceholder="开始日期" endPlaceholder="结束日期" />
+                        <el-form-item label="机房名称">
+                            <el-input v-model="query.computerRoom" placeholder="请输入机房名称" clearable>
+                            </el-input>
                         </el-form-item>
                     </el-col>
                     <el-col :span="6">
@@ -29,12 +24,10 @@
                         <el-button type="primary" icon="icon-ym icon-ym-btn-add"
                             @click="addOrUpdateHandle()">新增
                         </el-button>
+                        <el-button type="info" icon="icon-export" @click="exportQR()">导出二维码
+                        </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()" />
@@ -43,11 +36,22 @@
                 </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>
+                    :span-method="arraySpanMethod" @selection-change="handleSelectionChange">
+                    <el-table-column type="selection" width="55" align="center">
+                    </el-table-column>
+                    <el-table-column prop="computerRoom" label="机房名称" show-overflow-tooltip>
                     </el-table-column>
-                    <el-table-column prop="createBy" label="创建人" align="left" show-overflow-tooltip>
+                    <el-table-column prop="code" label="编码" show-overflow-tooltip>
+                    </el-table-column>
+                    <el-table-column prop="url" label="二维码">
+                        <template slot-scope="scope" sortable>
+                            <el-image style="width: 100px; height: 100px"
+                                :src="minioPath+scope.row.url"
+                                :preview-src-list="[minioPath+scope.row.url]">
+                            </el-image>
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="remark" label="备注" show-overflow-tooltip>
                     </el-table-column>
                     <el-table-column label="操作" fixed="right" width="150">
                         <template slot-scope="scope">
@@ -56,8 +60,6 @@
                             <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>
@@ -66,44 +68,27 @@
             </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'
+import { minioPath } from '@/utils/apiUrl'
+
 
 export default {
     components: {
         JNPFForm,
-        Detail,
-        ExportBox, ToFormDetail, SuperQuery
     },
     data() {
         return {
-
+            minioPath: minioPath,
             keyword: '',
             expandsTree: true,
             refreshTree: true,
@@ -115,12 +100,11 @@ export default {
             exportList: [],
             columnList,
 
-            superQueryVisible: false,
             superQueryJson,
             uploadBoxVisible: false,
             detailVisible: false,
             query: {
-                createBy: undefined,
+                computerRoom: undefined,
                 createTime: undefined,
             },
             defListQuery: {
@@ -160,6 +144,7 @@ export default {
             maskConfig: {
                 rqCodeId: { "prefixType": 1, "useUnrealMask": false, "maskType": 1, "unrealMaskLength": 1, "prefixLimit": 0, "suffixLimit": 0, "filler": "*", "prefixSpecifyChar": "", "suffixType": 1, "ignoreChar": "", "suffixSpecifyChar": "" },
             },
+            selectedData: null,
         }
     },
     computed: {
@@ -177,6 +162,52 @@ export default {
         this.setDefaultQuery(this.defaultSortConfig);
     },
     methods: {
+        exportQR() {
+            if (this.selectedData && this.selectedData.length) {
+                this.listLoading = true;
+                let ids = ['123']
+                this.selectedData.forEach(item => {
+                    ids.push(item.id)
+                })
+
+                request({
+                    url: `/api/QRCode/QRCode/export`,
+                    method: 'post',
+                    header: {
+                        'content-type': 'application/json',
+                    },
+                    responseType: 'blob',
+                    data: ['123', '21323']
+                }).then(res => {
+                    console.log(res)
+                    if (res.code !== 400) {
+                        const url = window.URL.createObjectURL(res);
+                        const a = document.createElement('a');
+                        a.href = url;
+                        a.download = '二维码导出.docx';
+                        a.click();
+
+                        this.$message({
+                            message: '导出成功',
+                            type: 'success',
+                            duration: 1000,
+                        })
+                    } else {
+                        this.$message({
+                            message: '导出失败',
+                            type: 'warning',
+                            duration: 1000,
+                        })
+                    }
+                    this.listLoading = false
+                })
+            } else {
+                this.$message.warning('请选择至少一个机房二维码')
+            }
+        },
+        handleSelectionChange(val) {
+            this.selectedData = val;
+        },
         getHasBatchBtn() {
             let btnsList = []
             this.hasBatchBtn = btnsList.some(o => ['batchRemove', 'batchPrint', 'download'].includes(o))
@@ -189,19 +220,6 @@ export default {
             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
@@ -337,12 +355,7 @@ export default {
             }
             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
@@ -369,7 +382,7 @@ export default {
                 type: 1,
             };
             request({
-                url: `/api/ComputerRoomManagement/ComputerRoomManagement/getList`,
+                url: `/api/QRCode/QRCode/getList`,
                 method: 'post',
                 data: _query
             }).then(res => {
@@ -391,7 +404,7 @@ export default {
                 type: 'warning'
             }).then(() => {
                 request({
-                    url: `/api/ComputerRoomManagement/ComputerRoomManagement/${id}`,
+                    url: `/api/QRCode/QRCode/${id}`,
                     method: 'DELETE'
                 }).then(res => {
                     this.$message({
@@ -405,23 +418,6 @@ export default {
             }).catch(() => {
             });
         },
-        handelUpload() {
-            this.uploadBoxVisible = true
-            this.$nextTick(() => {
-                this.$refs.UploadBox.init("", "ComputerRoomManagement/ComputerRoomManagement", 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
@@ -441,7 +437,7 @@ export default {
         download(data) {
             let query = { ...data, ...this.listQuery, ...this.query, menuId: this.menuId }
             request({
-                url: `/api/ComputerRoomManagement/ComputerRoomManagement/Actions/Export`,
+                url: `/api/QRCode/QRCode/Actions/Export`,
                 method: 'post',
                 data: query
             }).then(res => {

+ 0 - 0
src/views/governmentCloud/computerroommanagement/superQueryJson.js → src/views/governmentCloud/computerroommanagement/computerRoomQR/superQueryJson.js


+ 306 - 0
src/views/governmentCloud/computerroommanagement/entryAndExitRegis/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">
+        <template v-if="!loading">
+            <div class="title">信息</div>
+            <el-row :gutter="15" class="">
+                <el-form ref="formRef" :model="dataForm" size="small" label-width="100px"
+                    label-position="right">
+                    <el-col :span="24">
+                        <jnpf-form-tip-item label="机房名称" prop="computerRoom">
+                            <JnpfInput v-model="dataForm.computerRoom" placeholder="请输入" disabled
+                                detailed clearable :style='{"width":"100%"}'>
+                            </JnpfInput>
+                        </jnpf-form-tip-item>
+                    </el-col>
+                    <el-col :span="24">
+                        <jnpf-form-tip-item label="申请人" prop="createBy">
+                            <JnpfInput v-model="dataForm.createBy" placeholder="请输入" disabled
+                                detailed clearable :style='{"width":"100%"}'>
+                            </JnpfInput>
+                        </jnpf-form-tip-item>
+                    </el-col>
+                    <el-col :span="24">
+                        <jnpf-form-tip-item label="单位" prop="orgName">
+                            <JnpfInput v-model="dataForm.orgName" placeholder="请输入" disabled
+                                detailed clearable :style='{"width":"100%"}'>
+                            </JnpfInput>
+                        </jnpf-form-tip-item>
+                    </el-col>
+                    <el-col :span="24">
+                        <jnpf-form-tip-item label="手机号" prop="phone">
+                            <JnpfInput v-model="dataForm.phone" placeholder="请输入" disabled detailed
+                                clearable :style='{"width":"100%"}'>
+                            </JnpfInput>
+                        </jnpf-form-tip-item>
+                    </el-col>
+                    <el-col :span="24">
+                        <jnpf-form-tip-item label="资源池" prop="resourcePool">
+                            {{getComputerRoomManagementLabel(dataForm.resourcePool)  }}
+                        </jnpf-form-tip-item>
+                    </el-col>
+                    <el-col :span="24">
+                        <jnpf-form-tip-item label="进出事由" prop="accessThing">
+                            <JnpfInput v-model="dataForm.accessThing" placeholder="请输入" disabled
+                                detailed clearable :style='{"width":"100%"}'>
+                            </JnpfInput>
+                        </jnpf-form-tip-item>
+                    </el-col>
+                    <el-col :span="24">
+                        <jnpf-form-tip-item label="附件" prop="enable">
+                            <div style="color: #1890ff;cursor: pointer;" class="value file-value"
+                                v-for="(item2, index2) in dataForm.attachment.result.fileList"
+                                :key="index2" @click="pcDownloadFile(item2.minioPath,item2.name)">
+                                {{ item2.name }}(点击下载)
+                            </div>
+                            <div v-for="(item2, index2) in dataForm.attachment.result.imageList">
+                                <el-image style="width: 100px; height: 100px" :src="item2.minioPath"
+                                    :preview-src-list="[item2.minioPath]">
+                                </el-image>
+                            </div>
+                        </jnpf-form-tip-item>
+                    </el-col>
+
+                    <el-col :span="24">
+                        <jnpf-form-tip-item label="申请时间" prop="createTime">
+                            <JnpfInput v-model="dataForm.createTime" placeholder="请输入" disabled
+                                detailed clearable :style='{"width":"100%"}'>
+                            </JnpfInput>
+                        </jnpf-form-tip-item>
+                    </el-col>
+                    <el-col :span="24">
+                        <jnpf-form-tip-item label="审核人" prop="auditBy">
+                            {{dataForm.auditBy || '无数据'}}
+                        </jnpf-form-tip-item>
+                    </el-col>
+                    <el-col :span="24">
+                        <jnpf-form-tip-item label="审核时间" prop="auditTime">
+                            <JnpfInput v-model="dataForm.auditTime" placeholder="请输入" disabled
+                                detailed clearable :style='{"width":"100%"}'>
+                            </JnpfInput>
+                        </jnpf-form-tip-item>
+                    </el-col>
+                </el-form>
+            </el-row>
+
+            <div class="title" v-if="activities.length">时间线</div>
+            <el-row :gutter="15" class="">
+                <el-timeline style="margin-left: 20px;">
+                    <el-timeline-item v-for="(activity, index) in activities" :key="index"
+                        :icon="activity.icon" :type="activity.type" :color="activity.color"
+                        :size="activity.size" :timestamp="activity.timestamp">
+                        {{activity.content}}
+                    </el-timeline-item>
+                </el-timeline>
+            </el-row>
+        </template>
+        <span slot="footer" class="dialog-footer">
+            <el-button @click="visible = false"> 关 闭</el-button>
+        </span>
+    </el-dialog>
+</template>
+<script>
+import request from '@/utils/request'
+import dayjs from 'dayjs'
+import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
+import { processUploadPreview } from '@/api/governmentCloud/entryAndExitRegis/entryAndExitRegis'
+import { minioPath } from '@/utils/apiUrl'
+
+
+export default {
+    components: {},
+    props: [],
+    data() {
+        return {
+            minioPath: minioPath,
+            visible: false,
+            detailVisible: false,
+            loading: false,
+            //定位属性
+            locationScope: {
+            },
+
+            dataForm: {
+            },
+            activities: [{
+                content: '支持使用图标',
+                timestamp: '2018-04-12 20:46',
+                size: 'large',
+                type: 'primary',
+                icon: 'el-icon-more'
+            }, {
+                content: '支持自定义颜色',
+                timestamp: '2018-04-03 20:46',
+                color: '#0bbd87'
+            }, {
+                content: '支持自定义尺寸',
+                timestamp: '2018-04-03 20:46',
+                size: 'large'
+            }, {
+                content: '默认样式的节点',
+                timestamp: '2018-04-03 20:46'
+            }],
+            computerRoomManagementResourcePool: []
+
+        }
+    },
+    computed: {},
+    watch: {},
+    created() {
+        this.getComputerRoomManagementResourcePool()
+    },
+    mounted() { },
+    methods: {
+        getComputerRoomManagementLabel(str) {
+            let arr = str.split(',')
+            console.log(arr)
+            arr.forEach((item, index) => {
+                arr[index] = this.computerRoomManagementResourcePool.filter(o => o.enCode == item)[0].fullName
+            })
+            return arr.join(',')
+        },
+        getComputerRoomManagementResourcePool() {
+            getDictionaryDataSelector('590926334151100741').then(res => {
+                this.computerRoomManagementResourcePool = res.data.list
+            })
+        },
+        dataInfo(dataAll) {
+            let _dataAll = dataAll
+            this.dataForm = _dataAll
+            this.dataForm.auditTime = this.getDate(this.dataForm.auditTime)
+            this.dataForm.computerRoom = this.dataForm.qRCode.computerRoom
+            this.dataForm.attachment = JSON.parse(this.dataForm.attachment)
+        },
+        getMinioPath(item) {
+            let getImageMinioPathList = [];
+            let getFileMinioPathList = [];
+            // 获取图片minioPath
+            getImageMinioPathList = this.getMinio(item.result.imageList);
+            getFileMinioPathList = this.getMinio(item.result.fileList);
+
+            Promise.all(getImageMinioPathList).then((res) => {
+                Promise.all(getFileMinioPathList).then((res) => {
+                    this.loading = false
+                });
+            });
+        },
+        getMinio(list) {
+            let requestList = [];
+            list.map((item) => {
+                requestList.push(
+                    new Promise((resolve, reject) => {
+                        let params = {
+                            itsmFileId: item.id
+                        };
+                        processUploadPreview(params).then((res) => {
+                            if (res.data) {
+                                item.minioPath = minioPath + res.data.fileUrl;
+                                resolve(minioPath + res.data.fileUrl);
+                            } else {
+                                this.$message.error(`附件:${item.name}寻找失败`);
+                                resolve(null);
+                            }
+                        });
+                    })
+                );
+            });
+
+            return requestList;
+        },
+        getDate(time) {
+            let str = time ? dayjs(time).format('YYYY-MM-DD HH:mm:ss') : '无数据'
+            return str
+        },
+        pcDownloadFile(url, name) {
+            console.log(url)
+            //保存到本地
+            try {
+                const x = new window.XMLHttpRequest();
+                x.open('GET', url, true);
+                x.responseType = 'blob';
+                x.onload = () => {
+                    const url = window.URL.createObjectURL(x.response);
+                    const a = document.createElement('a');
+                    a.href = url;
+                    a.download = name;
+                    a.click();
+                };
+                x.send();
+
+
+                this.$message({
+                    message: '下载成功',
+                    type: 'success',
+                    duration: 1000,
+                })
+            } catch (error) {
+                this.$message({
+                    message: '下载失败',
+                    type: 'warning',
+                    duration: 1000,
+                })
+            }
+        },
+        init(obj) {
+            console.log(obj)
+            this.dataForm.id = obj.id || 0;
+            this.visible = true;
+            this.$nextTick(() => {
+                if (this.dataForm.id) {
+                    this.loading = true
+                    request({
+                        url: '/api/ComputerRoomManagement/ComputerRoomManagement/detail/' + this.dataForm.id,
+                        method: 'get',
+                        data: {
+                            code: obj.qRCode.code,
+                            createBy: obj.createBy
+                        }
+                    }).then((res) => {
+                        this.dataInfo(res.data)
+
+                        // 获取进出信息
+                        request({
+                            url: '/api/ComputerRoomManagementSign/ComputerRoomManagementSign/getList',
+                            method: 'post',
+                            data: {
+                                computerRoomManagementId: this.dataForm.id
+                            }
+                        }).then(async (res) => {
+                            this.activities = []
+                            res.data.list.forEach(element => {
+                                let obj = {
+                                    content: element.message,
+                                    timestamp: this.getDate(element.createTime_jnpfId),
+                                    size: 'large',
+                                    type: 'primary',
+                                    color: '#0bbd87'
+                                }
+                                this.activities.push(obj)
+                            });
+                            this.getMinioPath(this.dataForm.attachment)
+                        })
+                    })
+                }
+            })
+        },
+    },
+}
+
+</script>
+
+
+<style scoped>
+.jnpf-code-box {
+    background: #848484;
+    padding: 15px;
+    color: #fff;
+    font-size: 12px;
+    border-radius: 4px;
+}
+.title {
+    margin-bottom: 20px;
+    font-weight: bold;
+    font-size: 18px;
+    color: #000;
+}
+</style>

+ 533 - 0
src/views/governmentCloud/computerroommanagement/entryAndExitRegis/form.vue

@@ -0,0 +1,533 @@
+<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="请求方式" align="left" prop="method">
+                            <JnpfSelect v-model="dataForm.method" @change="changeData('method',-1)"
+                                placeholder="请选择" clearable :style='{"width":"100%"}'
+                                :options="methodOptions" :props="methodProps">
+                            </JnpfSelect>
+                        </jnpf-form-tip-item>
+                    </el-col>
+                    <el-col :span="24">
+                        <jnpf-form-tip-item label="请求路径" align="left" prop="path">
+                            <JnpfInput v-model="dataForm.path" @change="changeData('path',-1)"
+                                placeholder="请输入" clearable :style='{"width":"100%"}'
+                                :maskConfig="maskConfig.path">
+                            </JnpfInput>
+                        </jnpf-form-tip-item>
+                    </el-col>
+                    <el-col :span="24">
+                        <jnpf-form-tip-item label="请求参数" align="left" prop="params">
+                            <JnpfTextarea v-model="dataForm.params"
+                                @change="changeData('params',-1)" placeholder="请输入"
+                                :style='{"width":"100%"}' true type="textarea"
+                                :autosize='{"minRows":4,"maxRows":4}'
+                                :maskConfig="maskConfig.params">
+                            </JnpfTextarea>
+                        </jnpf-form-tip-item>
+                    </el-col>
+                    <el-col :span="24">
+                        <jnpf-form-tip-item label="请求体" align="left" prop="body">
+                            <JnpfTextarea v-model="dataForm.body" @change="changeData('body',-1)"
+                                placeholder="请输入" :style='{"width":"100%"}' true type="textarea"
+                                :autosize='{"minRows":4,"maxRows":4}' :maskConfig="maskConfig.body">
+                            </JnpfTextarea>
+                        </jnpf-form-tip-item>
+                    </el-col>
+                    <el-col :span="24">
+                        <jnpf-form-tip-item label="请求头" align="left" prop="headers">
+                            <JnpfTextarea v-model="dataForm.headers"
+                                @change="changeData('headers',-1)" placeholder="请输入"
+                                :style='{"width":"100%"}' true type="textarea"
+                                :autosize='{"minRows":4,"maxRows":4}'
+                                :maskConfig="maskConfig.headers">
+                            </JnpfTextarea>
+                        </jnpf-form-tip-item>
+                    </el-col>
+                    <el-col :span="24">
+                        <jnpf-form-tip-item label="前置操作" align="left" prop="preOperation">
+                            <JnpfTextarea v-model="dataForm.preOperation"
+                                @change="changeData('preOperation',-1)" placeholder="请输入"
+                                :style='{"width":"100%"}' true type="textarea"
+                                :autosize='{"minRows":4,"maxRows":4}'
+                                :maskConfig="maskConfig.preOperation">
+                            </JnpfTextarea>
+                        </jnpf-form-tip-item>
+                    </el-col>
+                    <el-col :span="24">
+                        <jnpf-form-tip-item label="后置操作" align="left" prop="postOperation">
+                            <JnpfTextarea v-model="dataForm.postOperation"
+                                @change="changeData('postOperation',-1)" placeholder="请输入"
+                                :style='{"width":"100%"}' true type="textarea"
+                                :autosize='{"minRows":4,"maxRows":4}'
+                                :maskConfig="maskConfig.postOperation">
+                            </JnpfTextarea>
+                        </jnpf-form-tip-item>
+                    </el-col>
+                    <el-col :span="24">
+                        <jnpf-form-tip-item label="请求示例" align="left" prop="sampleRequest">
+                            <JnpfTextarea v-model="dataForm.sampleRequest"
+                                @change="changeData('sampleRequest',-1)" placeholder="请输入"
+                                :style='{"width":"100%"}' true type="textarea"
+                                :autosize='{"minRows":4,"maxRows":4}'
+                                :maskConfig="maskConfig.sampleRequest">
+                            </JnpfTextarea>
+                        </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,
+                method: undefined,
+                path: undefined,
+                params: undefined,
+                body: undefined,
+                headers: undefined,
+                preOperation: undefined,
+                postOperation: undefined,
+                createTime: undefined,
+                createBy: undefined,
+                sampleRequest: undefined,
+            },
+            tableRequiredData: {},
+            dataRule:
+            {
+                name: [
+                    {
+                        required: true,
+                        message: '请输入',
+                        trigger: 'blur'
+                    },
+                ],
+                method: [
+                    {
+                        required: true,
+                        message: '请选择',
+                        trigger: 'change'
+                    },
+                ],
+                path: [
+                    {
+                        required: true,
+                        message: '请输入',
+                        trigger: 'blur'
+                    },
+                ],
+                headers: [
+                    {
+                        required: true,
+                        message: '请输入',
+                        trigger: 'blur'
+                    },
+                ],
+            },
+            methodOptions: [],
+            methodProps: { "label": "fullName", "value": "enCode" },
+            childIndex: -1,
+            isEdit: false,
+            interfaceRes: {
+                name: [],
+                method: [],
+                path: [],
+                params: [],
+                body: [],
+                headers: [],
+                preOperation: [],
+                postOperation: [],
+                createTime: [],
+                createBy: [],
+                sampleRequest: [],
+            },
+            //掩码配置
+            maskConfig: {
+                name: { "prefixType": 1, "useUnrealMask": false, "maskType": 1, "unrealMaskLength": 1, "prefixLimit": 0, "suffixLimit": 0, "filler": "*", "prefixSpecifyChar": "", "suffixType": 1, "ignoreChar": "", "suffixSpecifyChar": "" },
+                path: { "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/SystemInterface/SystemInterface/' + 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.getmethodOptions();
+        },
+        getmethodOptions() {
+            getDictionaryDataSelector('581810944762451781').then(res => {
+                this.methodOptions = 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/SystemInterface/SystemInterface/' + 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/SystemInterface/SystemInterface',
+                    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/SystemInterface/SystemInterface/' + 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>

+ 310 - 0
src/views/governmentCloud/computerroommanagement/entryAndExitRegis/index.vue

@@ -0,0 +1,310 @@
+<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.createBy" placeholder="请输入申请人" clearable>
+                            </el-input>
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="6">
+                        <el-form-item label="机房名称">
+                            <el-input v-model="query.computerRoom" 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="el-icon-upload2" @click="exportData()">导出
+                        </el-button>
+                    </div>
+                    <div class="JNPF-common-head-right">
+                        <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="createBy" label="申请人" align="left" show-overflow-tooltip>
+                    </el-table-column>
+                    <el-table-column prop="accessThing" label="登记信息" align="left"
+                        show-overflow-tooltip>
+                    </el-table-column>
+                    <el-table-column prop="qRCode.computerRoom" label="机房" align="left"
+                        show-overflow-tooltip>
+                    </el-table-column>
+                    <el-table-column prop="auditBy" label="审核人" align="left" show-overflow-tooltip>
+                        <template slot-scope="scope" sortable>
+                            {{ scope.row.auditBy || '无数据' }}
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="createTime" label="登记时间" align="left"
+                        show-overflow-tooltip>
+                        <template slot-scope="scope" sortable>
+                            {{ getDate(scope.row.createTime, 'YY-MM-DD HH:mm:ss') }}
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="auditTime" label="审核时间" align="left"
+                        show-overflow-tooltip>
+                        <template slot-scope="scope" sortable>
+                            {{ getDate(scope.row.auditTime, 'YY-MM-DD HH:mm:ss') }}
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="sign" label="签到次数" align="left" show-overflow-tooltip>
+                    </el-table-column>
+                    <el-table-column label="操作" fixed="right" width="150">
+                        <template slot-scope="scope">
+                            <el-button type="text" @click="goDetail(scope.row)">详情
+                            </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" />
+        <Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false" />
+    </div>
+</template>
+
+<script>
+import request from '@/utils/request'
+import { mapGetters } from "vuex";
+import JNPFForm from './form'
+import Detail from './Detail'
+import dayjs from 'dayjs'
+
+export default {
+    components: {
+        JNPFForm,
+        Detail,
+    },
+    data() {
+        return {
+            expandsTree: true,
+            hasBatchBtn: false,
+            expandObj: {},
+            mergeList: [],
+
+            detailVisible: false,
+            query: {
+                createBy: undefined,
+                computerRoom: undefined,
+            },
+            defListQuery: {
+                sort: 'desc',
+                sidx: '',
+            },
+            //排序默认值
+            defaultSortConfig: [],
+            list: [],
+            listLoading: true,
+            total: 0,
+            queryData: {},
+            listQuery: {
+                currentPage: 1,
+                pageSize: 20,
+                // audit: '1'
+            },
+            //多列排序
+            ordersList: [],
+            formVisible: false,
+            flowVisible: false,
+            flowList: [],
+            exportBoxVisible: false,
+            methodOptions: [],
+            methodProps: { "label": "fullName", "value": "enCode" },
+            interfaceRes: {
+            },
+        }
+    },
+    computed: {
+        ...mapGetters(['userInfo']),
+        menuId() {
+            return this.$route.meta.modelId || ''
+        }
+    },
+    created() {
+        this.initData()
+        this.queryData = JSON.parse(JSON.stringify(this.query))
+        //排序默认值
+        this.setDefaultQuery(this.defaultSortConfig);
+    },
+    methods: {
+        exportData() {
+            let ids = []
+            this.list.forEach(item => {
+                ids.push(item.id)
+            })
+            request({
+                url: `/api/ComputerRoomManagementSign/ComputerRoomManagementSign/Actions/Export`,
+                responseType: 'blob',
+                method: 'post',
+                data: ids
+            }).then(res => {
+                // 接收接口返回的xlsx文件并下载下来
+                this.excelDownload(res)
+
+                this.$message.success('导出成功')
+            })
+        },
+        excelDownload(obj, name = '进出登记数据', suffix = 'xlsx') {//Date.now()获取当前日期
+            const url = window.URL.createObjectURL(
+                //Blob是二进制大对象
+                new Blob([obj], { type: 'application/vnd.ms-excel' })
+            )
+            const aDOM = document.createElement('a')
+            aDOM.style.display = 'none'//设置dom元素不显示,隐藏
+            aDOM.href = url
+            const fileName = name + '.' + suffix
+            aDOM.setAttribute('download', fileName)
+            //setAttribute(name, value)增加一个指定名称和值的新属性,或者把一个现有属性设定为指定的值
+            document.body.appendChild(aDOM)//向body节点中添加dom节点
+            aDOM.click()//在adom上模拟一次鼠标点击
+            document.body.removeChild(aDOM)//移除节点
+        },
+        getDate(time) {
+            let str = time ? dayjs(time).format('YYYY-MM-DD HH:mm:ss') : '无数据'
+            return str
+        },
+        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
+                    })
+                }
+            })
+        },
+        goDetail(row) {
+            this.detailVisible = true
+            this.$nextTick(() => {
+                this.$refs.Detail.init(row)
+            })
+        },
+        initData() {
+            // this.queryData = JSON.parse(JSON.stringify(this.query))导致重置失效
+            this.listLoading = true;
+            let _query = {
+                ...this.listQuery,
+                ...this.query,
+                dataType: 0,
+                // menuId: this.menuId,
+                // type: 1,
+            };
+            request({
+                url: `/api/ComputerRoomManagement/ComputerRoomManagement/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
+            })
+        },
+        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>

+ 163 - 172
src/views/governmentCloud/dictionaryOfProjectSystemsForDepartmentsAndBureaus/index.vue

@@ -1,193 +1,184 @@
 <template>
-  <div class="JNPF-common-layout">
-    <div class="JNPF-common-layout-center  JNPF-flex-main">
-      <el-row class="JNPF-common-search-box" :gutter="16">
-        <el-form @submit.native.prevent>
-          <el-col :span="6">
-            <el-form-item :label="$t('common.keyword')">
-              <el-input
-                v-model="listQuery.keyword"
-                placeholder="请输入名称"
-                clearable
-                @keyup.enter.native="search()"
-              />
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item>
-              <el-button type="primary" icon="el-icon-search" @click="search()">
-                {{ $t("common.search") }}</el-button
-              >
-              <el-button icon="el-icon-refresh-right" @click="reset()"
-                >{{ $t("common.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">
-          <el-button type="info" icon="el-icon-sort" @click="synchronousData">
-            同步
-          </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 class="JNPF-common-layout">
+        <div class="JNPF-common-layout-center  JNPF-flex-main">
+            <el-row class="JNPF-common-search-box" :gutter="16">
+                <el-form @submit.native.prevent>
+                    <el-col :span="6">
+                        <el-form-item :label="$t('common.keyword')">
+                            <el-input v-model="listQuery.keyword" placeholder="请输入名称" clearable
+                                @keyup.enter.native="search()" />
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="6">
+                        <el-form-item>
+                            <el-button type="primary" icon="el-icon-search" @click="search()">
+                                {{ $t("common.search") }}</el-button>
+                            <el-button icon="el-icon-refresh-right"
+                                @click="reset()">{{ $t("common.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">
+                    <el-button type="info" icon="el-icon-sort" @click="synchronousData">
+                        同步
+                    </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>
-        <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
+    findTreeList,
+    syncOrganizeProjectSystemDict
 } from "@/api/governmentCloud/dictionaryOfProjectSystemsForDepartmentsAndBureaus/dictionaryOfProjectSystemsForDepartmentsAndBureaus";
 export default {
-  name: "permission-organize",
-  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;
-        });
+    name: "permission-organize",
+    components: {},
+    data() {
+        return {
+            listQuery: {
+                keyword: ""
+            },
+            treeList: [],
+            rawData: [],
+            expands: true,
+            refreshTable: true,
+            btnLoading: false,
+            listLoading: true,
+            formVisible: false,
+            depFormVisible: false,
+            checkUserFormVisible: false
+        };
     },
-    synchronousData() {
-      syncOrganizeProjectSystemDict().then();
+    created() {
+        this.initData();
     },
-    search() {
-      const searchResults = this.findInTree(
-        this.rawData,
-        this.listQuery.keyword
-      );
-      this.treeList = searchResults;
-    },
-    // 树结构数据模糊搜索
-    findInTree(treeData, keyword) {
-      let results = [];
-      function search(nodes) {
-        for (let i = 0; i < nodes.length; i++) {
-          console.log(nodes[i]);
-          if (nodes[i].label.indexOf(keyword) > -1) {
-            results.push(nodes[i]);
-          } else {
-            if (nodes[i].children) {
-              search(nodes[i].children);
+    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;
+                });
+        },
+        synchronousData() {
+            this.loading = true;
+            this.listLoading = true;
+            syncOrganizeProjectSystemDict().then(res => {
+                this.loading = false;
+                this.listLoading = false;
+                if (res.code == 200) {
+                    this.$message({
+                        type: "success",
+                        message: "同步成功"
+                    });
+                } else {
+                    this.$message({
+                        type: "同步失败",
+                        message: res.msg
+                    });
+                }
+            });
+        },
+        search() {
+            const searchResults = this.findInTree(
+                this.rawData,
+                this.listQuery.keyword
+            );
+            this.treeList = searchResults;
+        },
+        // 树结构数据模糊搜索
+        findInTree(treeData, keyword) {
+            let results = [];
+            function search(nodes) {
+                for (let i = 0; i < nodes.length; i++) {
+                    console.log(nodes[i]);
+                    if (nodes[i].label.indexOf(keyword) > -1) {
+                        results.push(nodes[i]);
+                    } else {
+                        if (nodes[i].children) {
+                            search(nodes[i].children);
+                        }
+                    }
+                }
             }
-          }
-        }
-      }
 
-      search(treeData);
-      return results;
-    },
-    // 树形列表index层级,实现方法(可复制直接调用)
-    setTableIndex(arr, index) {
-      arr.forEach((item, key) => {
-        item.index = key + 1;
-        if (index) {
-          item.index = index + 1;
+            search(treeData);
+            return results;
+        },
+        // 树形列表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);
+                }
+            });
+        },
+        reset() {
+            this.listQuery.keyword = "";
+            this.treeList = this.rawData;
+        },
+        toggleExpand() {
+            this.refreshTable = false;
+            this.expands = !this.expands;
+            this.$nextTick(() => {
+                this.refreshTable = true;
+            });
         }
-        if (item.children) {
-          this.setTableIndex(item.children, item.index);
-        }
-      });
-    },
-    reset() {
-      this.listQuery.keyword = "";
-      this.treeList = this.rawData;
-    },
-    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;
+    vertical-align: bottom;
+    font-size: 16px;
+    margin-right: 6px;
+    line-height: 23px;
 }
 </style>

+ 22 - 17
src/views/governmentCloud/iconManagement/Form.vue

@@ -8,9 +8,8 @@
                     <!-- 具体表单 -->
                     <el-col :span="24">
                         <jnpf-form-tip-item label="图标" align="left" prop="enable">
-                            <el-upload class="upload-demo" ref="upload"
-                                action="http://localhost:3000/dev/api/minio/upload"
-                                list-type="picture-card" :data="uploadData" :headers="uploadHeaders"
+                            <el-upload class="upload-demo" ref="upload" action="#"
+                                list-type="picture-card" :http-request="upload"
                                 :class="noneBtnDealImg ? 'disUoloadSty':''" :limit="1"
                                 :file-list="fileList"
                                 :on-success="(res, file, fileList)=>uploadSuccess(res, file, fileList,'img')"
@@ -32,25 +31,38 @@
 </template>
 
 <script>
+
+import { minioPath, APIURl } from '@/utils/apiUrl'
+import { uploadFuction } from '@/utils/upload'
 export default {
     data() {
         return {
+            minioPath: minioPath,
+            APIURl: APIURl,
             visible: false,
             loading: false,
             dataForm: {},
             dataRule: {},
             btnLoading: false,
-            uploadData: {
-                type: "process/icon"
-            },
-            uploadHeaders: {
-                Authorization: this.$store.getters.token
-            },
             noneBtnDealImg: false,
             fileList: [],
         }
     },
     methods: {
+        upload(param) {
+            uploadFuction('process/icon', param.file).then(res => {
+                if (res.code == 200) {
+                    this.$message({
+                        message: "新增成功",
+                        type: "success",
+                        duration: 1500
+                    });
+                    this.noneBtnDealImg = this.fileList.length >= 1
+                    this.visible = false
+                    this.$emit('back')
+                }
+            })
+        },
         init() {
             this.visible = true
         },
@@ -58,14 +70,7 @@ export default {
             this.$refs.upload.submit();
         },
         uploadSuccess(res, file, fileList, name) {
-            this.$message({
-                message: "新增成功",
-                type: "success",
-                duration: 1500
-            });
-            this.noneBtnDealImg = fileList.length >= 1
-            this.visible = false
-            this.$emit('back')
+
 
         },
         //图片删除

+ 4 - 2
src/views/governmentCloud/iconManagement/index.vue

@@ -6,7 +6,7 @@
                     <div>
                         <el-button type="primary" icon="el-icon-plus"
                             @click="addIcon()">新增</el-button>
-                        <el-button icon="el-icon-refresh-right" @click="reset()">查询</el-button>
+                        <el-button icon="el-icon-search" @click="reset()">查询</el-button>
                     </div>
 
                     <div class="JNPF-common-head-right">
@@ -20,7 +20,7 @@
                     <el-table-column prop="name" label="图标" width="80">
                         <template slot-scope="scope" sortable>
                             <img style="width: 40px;height: 40px;"
-                                :src="'https://oss.shidaiyun.net/'+scope.row.icon"></img>
+                                :src="minioPath+scope.row.icon"></img>
                         </template>
                     </el-table-column>
                     <el-table-column prop="icon" label="路径" />
@@ -41,6 +41,7 @@
 import {
     delSysTeam
 } from "@/api/governmentCloud/serviceTeamManage/serviceTeamManage";
+import { minioPath } from '@/utils/apiUrl'
 
 import { getIconList, deleteIcon } from "@/api/governmentCloud/iconManagement/iconManagement";
 
@@ -53,6 +54,7 @@ export default {
     },
     data() {
         return {
+            minioPath: minioPath,
             tableData: [],
             listLoading: false,
             formVisible: false

+ 215 - 196
src/views/governmentCloud/knowledgeBase/index.vue

@@ -1,214 +1,233 @@
 <template>
-  <div class="JNPF-common-layout">
-    <div class="JNPF-common-layout-left">
-      <div class="JNPF-common-title">
-        <h2>知识库</h2>
-        <el-dropdown>
-          <el-link icon="icon-ym icon-ym-mpMenu" :underline="false" />
-          <el-dropdown-menu slot="dropdown">
-            <el-dropdown-item @click.native="initData()">刷新数据</el-dropdown-item>
-            <el-dropdown-item @click.native="toggleTreeExpand(true)">展开全部</el-dropdown-item>
-            <el-dropdown-item @click.native="toggleTreeExpand(false)">折叠全部</el-dropdown-item>
-            <el-dropdown-item @click.native="handleTypeManage">知识库管理</el-dropdown-item>
-          </el-dropdown-menu>
-        </el-dropdown>
-      </div>
-      <div class="JNPF-common-tree-search-box">
-        <el-input placeholder="输入关键字" v-model="filterText" suffix-icon="el-icon-search" clearable />
-      </div>
-      <el-scrollbar class="JNPF-common-el-tree-scrollbar" v-loading="treeLoading">
-        <el-tree ref="treeBox" :data="treeData" :props="defaultProps"
-          :default-expand-all="expandsTree" highlight-current :expand-on-click-node="false"
-          node-key="id" @node-click="handleNodeClick" class="JNPF-common-el-tree"
-          :filter-node-method="filterNode" v-if="refreshTree">
-          <span class="custom-tree-node" slot-scope="{ node }">
-            <i class="el-icon-notebook-2" />
-            <span class="text">{{node.label}}</span>
-          </span>
-        </el-tree>
-      </el-scrollbar>
+    <div class="JNPF-common-layout">
+        <div class="JNPF-common-layout-left">
+            <div class="JNPF-common-title">
+                <h2>知识库</h2>
+                <el-dropdown>
+                    <el-link icon="icon-ym icon-ym-mpMenu" :underline="false" />
+                    <el-dropdown-menu slot="dropdown">
+                        <el-dropdown-item @click.native="initData()">刷新数据</el-dropdown-item>
+                        <el-dropdown-item
+                            @click.native="toggleTreeExpand(true)">展开全部</el-dropdown-item>
+                        <el-dropdown-item
+                            @click.native="toggleTreeExpand(false)">折叠全部</el-dropdown-item>
+                        <el-dropdown-item @click.native="handleTypeManage">知识库管理</el-dropdown-item>
+                    </el-dropdown-menu>
+                </el-dropdown>
+            </div>
+            <div class="JNPF-common-tree-search-box">
+                <el-input placeholder="输入关键字" v-model="filterText" suffix-icon="el-icon-search"
+                    clearable />
+            </div>
+            <el-scrollbar class="JNPF-common-el-tree-scrollbar" v-loading="treeLoading">
+                <el-tree ref="treeBox" :data="treeData" :props="defaultProps"
+                    :default-expand-all="expandsTree" highlight-current
+                    :expand-on-click-node="false" node-key="id" @node-click="handleNodeClick"
+                    class="JNPF-common-el-tree" :filter-node-method="filterNode" v-if="refreshTree">
+                    <span class="custom-tree-node" slot-scope="{ node }">
+                        <i class="el-icon-notebook-2" />
+                        <span class="text">{{node.label}}</span>
+                    </span>
+                </el-tree>
+            </el-scrollbar>
+        </div>
+        <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="listQuery.title" placeholder="请输入关键词查询" clearable
+                                @keyup.enter.native="search()" />
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="6">
+                        <el-form-item>
+                            <el-button type="primary" icon="el-icon-search" @click="search()">
+                                {{$t('common.search')}}</el-button>
+                            <el-button icon="el-icon-refresh-right"
+                                @click="reset()">{{$t('common.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" style="justify-content: space-between;">
+                    <div>
+                        <el-button type="primary" icon="el-icon-plus"
+                            @click="addFormVisible = true">新增</el-button>
+                    </div>
+                    <div class="JNPF-common-head-right">
+                        <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="reset()" />
+                        </el-tooltip>
+                    </div>
+                </div>
+                <JNPF-table v-loading="listLoading" :data="tableData" row-key="id"
+                    v-if="refreshTable">
+                    <el-table-column prop="title" label="标题" />
+                    <el-table-column prop="publishTime" label="发布时间" />
+                    <el-table-column label="标签">
+                        <template slot-scope="scope">
+                            <el-tag v-for="item in scope.row.labelList"
+                                :key="item">{{ item }}</el-tag>
+                        </template>
+                    </el-table-column>
+                    <el-table-column label="操作" width="100">
+                        <template slot-scope="scope">
+                            <el-button type="text"
+                                @click="handleDetail(scope.row.id)">详情</el-button>
+                            <el-button style="color: #F56C6C;" type="text"
+                                @click="handleDel(scope.row.id)">删除</el-button>
+                        </template>
+                    </el-table-column>
+                </JNPF-table>
+                <pagination :total="total" :page.sync="listQuery.current"
+                    :limit.sync="listQuery.size" @pagination="getKnowledgeList" />
+            </div>
+        </div>
+        <TypeList v-if="drawer" ref="TypeList" @refreshDataList="initData" />
+        <Detail v-if="drawerDetail" ref="Detail" />
     </div>
-    <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="listQuery.title" placeholder="请输入关键词查询" clearable
-                @keyup.enter.native="search()" />
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item>
-              <el-button type="primary" icon="el-icon-search" @click="search()">
-                {{$t('common.search')}}</el-button>
-              <el-button icon="el-icon-refresh-right" @click="reset()">{{$t('common.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" row-key="id" v-if="refreshTable">
-          <el-table-column prop="title" label="标题" />
-          <el-table-column prop="publishTime" label="发布时间" />
-          <el-table-column label="标签">
-            <template slot-scope="scope">
-              <el-tag v-for="item in scope.row.labelList" :key="item">{{ item }}</el-tag>
-            </template>
-          </el-table-column>
-          <el-table-column label="操作" width="100">
-            <template slot-scope="scope">
-              <el-button type="text" @click="handleDetail(scope.row.id)">详情</el-button>
-              <el-button style="color: #F56C6C;" type="text"
-                @click="handleDel(scope.row.id)">删除</el-button>
-            </template>
-          </el-table-column>
-        </JNPF-table>
-        <pagination :total="total" :page.sync="listQuery.current" :limit.sync="listQuery.size"
-          @pagination="getKnowledgeList" />
-      </div>
-    </div>
-    <TypeList v-if="drawer" ref="TypeList" @refreshDataList="initData" />
-    <Detail v-if="drawerDetail" ref="Detail" />
-  </div>
 </template>
 
 <script>
 import {
-  getKnowledgeBase,
-  getKnowledgeList,
-  delKnowledge
+    getKnowledgeBase,
+    getKnowledgeList,
+    delKnowledge
 } from '@/api/governmentCloud/knowledgeBase/knowledgeBase'
 import TypeList from './components/index'
 import Detail from './Detail'
 
 export default {
-  name: 'knowledgeBase',
-  components: {
-    TypeList,
-    Detail
-  },
-  data() {
-    return {
-      defaultProps: {
-        children: 'children',
-        label: 'name'
-      },
-      listQuery: {
-        current: 1,
-        size: 20,
-        knowledgeBaseId: '',
-        title: ''
-      },
-      total: 0,
-      drawer: false,
-      treeLoading: false,
-      listLoading: false,
-      treeData: [],
-      tableData: [],
-      expands: true,
-      expandsTree: true,
-      refreshTable: true,
-      refreshTree: true,
-      filterText: '',
-      drawerDetail: false
-    }
-  },
-  watch: {
-    filterText(val) {
-      this.$refs.treeBox.filter(val)
-    }
-  },
-  created() {
-    this.initData(true)
-  },
-  methods: {
-    search() {
-      this.getKnowledgeList()
-    },
-    reset() {
-      this.listQuery.title = ''
-      this.getKnowledgeList()
-    },
-    initData(isInit) {
-      this.filterText = ''
-      this.treeLoading = true
-      getKnowledgeBase().then(res => {
-        this.treeData = res.data
-        this.getKnowledgeList()
-        this.treeLoading = false
-      }).catch(() => {
-        this.treeLoading = false
-      })
-    },
-    filterNode(value, data) {
-      if (!value) return true;
-      return data.name.indexOf(value) !== -1;
-    },
-    toggleExpand() {
-      this.refreshTable = false;
-      this.expands = !this.expands;
-      this.$nextTick(() => {
-        this.refreshTable = true;
-      });
-    },
-    toggleTreeExpand(expands) {
-      this.filterText = ''
-      this.refreshTree = false
-      this.expandsTree = expands
-      this.$nextTick(() => {
-        this.refreshTree = true
-        this.$nextTick(() => {
-          this.$refs.treeBox.setCurrentKey(this.listQuery.knowledgeBaseId)
-        })
-      })
-    },
-    getKnowledgeList() {
-      this.listLoading = true
-      getKnowledgeList(this.listQuery).then(res => {
-        this.tableData = res.data.records
-        this.tableData.forEach(item => {
-          this.$set(item, "labelList", JSON.parse(item.label))
-        })
-        this.total = res.data.total
-        this.listLoading = false
-      }).catch(() => {
-        this.listLoading = false
-      })
+    name: 'knowledgeBase',
+    components: {
+        TypeList,
+        Detail
     },
-    // 分类管理
-    handleTypeManage() {
-      this.drawer = true
-      this.$nextTick(() => {
-        this.$refs.TypeList.init()
-      })
+    data() {
+        return {
+            defaultProps: {
+                children: 'children',
+                label: 'name'
+            },
+            listQuery: {
+                current: 1,
+                size: 20,
+                knowledgeBaseId: '',
+                title: ''
+            },
+            total: 0,
+            drawer: false,
+            treeLoading: false,
+            listLoading: false,
+            treeData: [],
+            tableData: [],
+            expands: true,
+            expandsTree: true,
+            refreshTable: true,
+            refreshTree: true,
+            filterText: '',
+            drawerDetail: false
+        }
     },
-    handleNodeClick(data) {
-      this.listQuery.knowledgeBaseId = data.id
-      this.reset()
+    watch: {
+        filterText(val) {
+            this.$refs.treeBox.filter(val)
+        }
     },
-    handleDetail(id) {
-      this.drawerDetail = true
-      this.$nextTick(() => {
-        this.$refs.Detail.init(id)
-      })
+    created() {
+        this.initData(true)
     },
-    handleDel(id) {
-      this.$confirm(this.$t('common.delTip'), this.$t('common.tipTitle'), {
-        type: 'warning'
-      }).then(() => {
-        delKnowledge(id).then(res => {
-          this.$message({
-            type: 'success',
-            message: res.msg,
-            duration: 1500,
-            onClose: () => {
-              this.getKnowledgeList()
-            }
-          })
-        })
-      }).catch(() => { })
+    methods: {
+        search() {
+            this.getKnowledgeList()
+        },
+        reset() {
+            this.listQuery.title = ''
+            this.getKnowledgeList()
+        },
+        initData(isInit) {
+            this.filterText = ''
+            this.treeLoading = true
+            getKnowledgeBase().then(res => {
+                this.treeData = res.data
+                this.getKnowledgeList()
+                this.treeLoading = false
+            }).catch(() => {
+                this.treeLoading = false
+            })
+        },
+        filterNode(value, data) {
+            if (!value) return true;
+            return data.name.indexOf(value) !== -1;
+        },
+        toggleExpand() {
+            this.refreshTable = false;
+            this.expands = !this.expands;
+            this.$nextTick(() => {
+                this.refreshTable = true;
+            });
+        },
+        toggleTreeExpand(expands) {
+            this.filterText = ''
+            this.refreshTree = false
+            this.expandsTree = expands
+            this.$nextTick(() => {
+                this.refreshTree = true
+                this.$nextTick(() => {
+                    this.$refs.treeBox.setCurrentKey(this.listQuery.knowledgeBaseId)
+                })
+            })
+        },
+        getKnowledgeList() {
+            this.listLoading = true
+            getKnowledgeList(this.listQuery).then(res => {
+                this.tableData = res.data.records
+                this.tableData.forEach(item => {
+                    this.$set(item, "labelList", JSON.parse(item.label))
+                })
+                this.total = res.data.total
+                this.listLoading = false
+            }).catch(() => {
+                this.listLoading = false
+            })
+        },
+        // 分类管理
+        handleTypeManage() {
+            this.drawer = true
+            this.$nextTick(() => {
+                this.$refs.TypeList.init()
+            })
+        },
+        handleNodeClick(data) {
+            this.listQuery.knowledgeBaseId = data.id
+            this.reset()
+        },
+        handleDetail(id) {
+            this.drawerDetail = true
+            this.$nextTick(() => {
+                this.$refs.Detail.init(id)
+            })
+        },
+        handleDel(id) {
+            this.$confirm(this.$t('common.delTip'), this.$t('common.tipTitle'), {
+                type: 'warning'
+            }).then(() => {
+                delKnowledge(id).then(res => {
+                    this.$message({
+                        type: 'success',
+                        message: res.msg,
+                        duration: 1500,
+                        onClose: () => {
+                            this.getKnowledgeList()
+                        }
+                    })
+                })
+            }).catch(() => { })
+        }
     }
-  }
 }
 </script>

+ 3 - 3
src/views/governmentCloud/notificationannouncement/index.vue

@@ -17,13 +17,13 @@
                     </el-col>
                     <el-col :span="6">
                         <el-form-item label="创建人">
-                            <JnpfUserSelect v-model="query.createBy" placeholder="请选择" />
+                            <JnpfUserSelect v-model="query.createById" placeholder="请选择" />
                         </el-form-item>
                     </el-col>
                     <template v-if="showAll">
                         <el-col :span="6">
                             <el-form-item label="创建时间">
-                                <JnpfDateRangePicker v-model="query.createTime" format="yyyy-MM-dd"
+                                <JnpfDateRangePicker v-model="query.createTime"
                                     startPlaceholder="开始日期" endPlaceholder="结束日期" />
                             </el-form-item>
                         </el-col>
@@ -164,7 +164,7 @@ export default {
             query: {
                 title: undefined,
                 type: undefined,
-                createBy: undefined,
+                createById: undefined,
                 createTime: undefined,
             },
             defListQuery: {

+ 74 - 20
src/views/governmentCloud/processConfiguration/Allocation.vue

@@ -10,7 +10,7 @@
                     </div>
                 </div>
                 <div>
-                    <el-button type="primary">
+                    <el-button type="primary" @click="saveForm">
                         保存
                     </el-button>
                     <el-button @click="closeDialog">
@@ -18,8 +18,11 @@
                     </el-button>
                 </div>
             </div>
-            <div class="content" v-if="formData">
-                <form-comp :formData="formData" :formConf="formConf"></form-comp>
+            <div class="content" v-if="itsmDrawingList">
+                <Generator ref="generator" :conf="formData" :modelType="dataForm.type"
+                    :webType="dataForm.webType" :dbType="dbType" :formInfo='dataForm'
+                    @drawingListChange="drawingListChange" :isITSM="true"
+                    :itsmDrawingList="itsmDrawingList" />
             </div>
 
         </div>
@@ -27,28 +30,30 @@
 </template>
 
 <script>
-import formComp from './component/formComp/index/home'
-import { getUpdateFiledList } from "@/api/governmentCloud/processConfiguration/processConfiguration";
+
+import Generator from '@/components/Generator/index/Home'
+import mixin from '@/mixins/generator/form'
+
+import { getFormJson, saveFormJson } from "@/api/governmentCloud/processConfiguration/processConfiguration";
 
 
 
 export default {
-    components: { formComp },
+    mixins: [mixin],
+    components: { Generator },
     data() {
         return {
             visible: false,
             orderDetail: null,//流程数据
-            dataForm: null,
-            formData: null,
-            formConf: {
-                gutter: 16,
-                size: "small",
-                labelPosition: "right",
-                labelWidth: 200,
-                disabled: false
+            itsmDrawingList: null,
+            nowList: {
+                fields: null
             }
         }
     },
+    created() {
+        console.log(this.formData)
+    },
     methods: {
         init(orderDetail, type) {
             console.log(orderDetail)
@@ -57,25 +62,74 @@ export default {
             this.visible = true
 
             let params = {
-                dataType: "1", // 数据类型 0-当前页 1-全部数据
-                currentPage: 1,
-                pageSize: 200,
-                sidx: "moduleSort,sort",
                 itsmProNum: this.orderDetail.itsmProKey, // 流程Key
                 version: this.orderDetail.version, // 版本
                 fieldOperantConfig: type, // 类别(qw qw_detail wx wx_detail)
             }
-            getUpdateFiledList(params).then(res => {
+            getFormJson(params).then(res => {
                 if (res.code == 200) {
-                    this.formData = res.data
+                    //增加placeholder
+                    let list = JSON.parse(JSON.stringify(res.data))
+                    list.forEach(module => {
+                        module.__config__.children.forEach(filed => {
+                            this.getPlaceholder(filed)
+                            if (filed.__config__.children) {
+                                filed.__config__.children.forEach(listFiled => {
+                                    this.getPlaceholder(listFiled)
+                                })
+                            }
+                        })
+                    });
+                    this.itsmDrawingList = JSON.parse(JSON.stringify(list))
+                } else {
+                    this.$message({
+                        type: 'error',
+                        message: res.msg,
+                        duration: 1500,
+                        onClose: () => {
+                            this.closeDialog()
+                        }
+                    })
                 }
             })
 
         },
+        getPlaceholder(n) {
+            if (['custom-radio', 'custom-checkbox', 'custom-select', 'custom-group', 'custom-datePicker', 'custom-timePicker', 'custom-member'].includes(n.__config__.jnpfKey)) {
+                n.placeholder = '请选择' + n.__config__.label
+            } else if (['custom-uploadFile'].includes(n.__config__.jnpfKey)) {
+                n.placeholder = '请上传' + n.__config__.label
+            } else {
+                n.placeholder = '请输入' + n.__config__.label
+            }
+        },
+        drawingListChange(list) {
+            this.nowList.fields = JSON.parse(JSON.stringify(list))
+        },
+
         //关闭配置页面
         closeDialog() {
             this.$emit("close");
         },
+        //保存配置
+        saveForm() {
+            this.nowList.fields.forEach(m => {
+                m.__config__.children.forEach(n => {
+                    if (['custom-checkbox', 'custom-number', 'custom-richText'].includes(n.__config__.jnpfKey)) {
+                        delete n.__config__.defaultValue
+                    }
+                })
+            });
+            this.nowList.proKey = this.orderDetail.itsmProKey
+            this.nowList.version = this.orderDetail.version
+
+            saveFormJson(this.nowList).then(res => {
+                if (res.code == 200) {
+                    this.$message.success("保存成功");
+                    // this.closeDialog();
+                }
+            })
+        }
     },
 }
 </script>

+ 0 - 130
src/views/governmentCloud/processConfiguration/AllocationNew.vue

@@ -1,130 +0,0 @@
-<template>
-    <el-dialog :visible.sync="visible" fullscreen lock-scroll class="JNPF-full-dialog"
-        :show-close="false" :modal="false">
-        <div class="main">
-            <div class="top">
-                <div class="top-title" v-if="visible">
-                    <div style="opacity: 0.5;">ITSM流程接入配置</div> /
-                    <div>表单配置管理</div> /
-                    <div style="font-size: 20px;font-weight: bold;"> {{orderDetail.itsmProName}}
-                    </div>
-                </div>
-                <div>
-                    <el-button type="primary" @click="saveForm">
-                        保存
-                    </el-button>
-                    <el-button @click="closeDialog">
-                        取消
-                    </el-button>
-                </div>
-            </div>
-            <div class="content" v-if="itsmDrawingList">
-                <Generator ref="generator" :conf="formData" :modelType="dataForm.type"
-                    :webType="dataForm.webType" :dbType="dbType" :formInfo='dataForm'
-                    @drawingListChange="drawingListChange" :isITSM="true"
-                    :itsmDrawingList="itsmDrawingList" />
-            </div>
-
-        </div>
-    </el-dialog>
-</template>
-
-<script>
-
-import Generator from '@/components/Generator/index/Home'
-import mixin from '@/mixins/generator/form'
-
-import { getFormJson, saveFormJson } from "@/api/governmentCloud/processConfiguration/processConfiguration";
-
-
-
-export default {
-    mixins: [mixin],
-    components: { Generator },
-    data() {
-        return {
-            visible: false,
-            orderDetail: null,//流程数据
-            itsmDrawingList: null,
-            nowList: {
-                fields: null
-            }
-        }
-    },
-    created() {
-        console.log(this.formData)
-    },
-    methods: {
-        init(orderDetail, type) {
-            console.log(orderDetail)
-            console.log(type)
-            this.orderDetail = orderDetail
-            this.visible = true
-
-            let params = {
-                itsmProNum: this.orderDetail.itsmProKey, // 流程Key
-                version: this.orderDetail.version, // 版本
-                fieldOperantConfig: type, // 类别(qw qw_detail wx wx_detail)
-            }
-            getFormJson(params).then(res => {
-                if (res.code == 200) {
-                    this.itsmDrawingList = res.data
-                }
-            })
-
-        },
-        drawingListChange(list) {
-            this.nowList.fields = JSON.parse(JSON.stringify(list))
-        },
-
-        //关闭配置页面
-        closeDialog() {
-            this.$emit("close");
-        },
-        //保存配置
-        saveForm() {
-            console.log(this.nowList)
-            saveFormJson(this.nowList).then(res => {
-                if (res.code == 200) {
-                    this.$message.success("保存成功");
-                    // this.closeDialog();
-                }
-            })
-        }
-    },
-}
-</script>
-
-<style lang="scss" scoped>
-.main {
-    background-color: #f0f2f5;
-    padding: 0;
-    min-height: 100vh;
-    .top {
-        background-color: #fff;
-        width: 100%;
-        height: 7%;
-        padding: 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;
-            }
-        }
-    }
-    .content {
-        padding: 20px;
-        width: 100%;
-        height: 93%;
-        display: flex;
-        align-items: center;
-        justify-content: space-between;
-    }
-}
-</style>

+ 173 - 17
src/views/governmentCloud/processConfiguration/Form.vue

@@ -48,8 +48,12 @@
                                         style="margin-right: 10px;">当前版本</el-tag>
                                     <el-tag v-else style="margin-right: 10px;"
                                         type="info">其他版本</el-tag>
+
                                     <span class="text"
                                         :title="data.version">{{ data.version }}</span>
+                                    <el-button type="danger" size="mini" v-if="data.current !== '1'"
+                                        @click.prevent="deleteVersion(data)"
+                                        style="margin-right: 10px;">删除</el-button>
                                 </span>
                             </el-tree>
                         </el-scrollbar>
@@ -77,18 +81,39 @@
                                         </div>
 
                                         <div class="right">
+                                            <el-button type="primary" icon="el-icon-tickets"
+                                                style="margin-right: 20px;"
+                                                @click="editRuleForm()">表单规则配置</el-button>
+
                                             <el-button type="primary" icon="el-icon-edit-outline"
-                                                style="margin-right: 50px;"
+                                                style="margin-right: 20px;"
                                                 @click="editForm()">流程信息编辑</el-button>
-                                            <div class="miniapp" style="margin-right: 50px;">
+
+                                            <el-button type="primary" icon="el-icon-document-copy"
+                                                style="margin-right: 20px;"
+                                                @click="copy()">表单字段复制</el-button>
+                                            <div class="miniapp" style="margin-right: 20px;">
+                                                <img
+                                                    src="@/assets/images/processConfiguration/wxmp.png" />
+                                                <span @click="showAllocation('wx')">小程序发起</span>
+                                            </div>
+                                            <div class="miniapp" style="margin-right: 20px;">
                                                 <img
                                                     src="@/assets/images/processConfiguration/wxmp.png" />
-                                                <span @click="showAllocation('wx')">小程序表单配置</span>
+                                                <span
+                                                    @click="showAllocation('wx_detail')">小程序详情</span>
                                             </div>
+                                            <div class="qywx" style="margin-right: 20px;">
+                                                <img style="width: 25px;"
+                                                    src="@/assets/images/processConfiguration/qywx.png" />
+                                                <span @click="showAllocation('qw')">企微发起</span>
+                                            </div>
+
                                             <div class="qywx">
                                                 <img style="width: 25px;"
                                                     src="@/assets/images/processConfiguration/qywx.png" />
-                                                <span @click="showAllocation('qw')">企微表单配置</span>
+                                                <span
+                                                    @click="showAllocation('qw_detail')">企微详情</span>
                                             </div>
                                         </div>
                                     </div>
@@ -104,17 +129,17 @@
                                 </div>
                                 <div class="content">
                                     <div class="info" style="display: flex;align-items: center;">
-                                        <div class="info-item" style="width: 30%;">
+                                        <div class="info-item" style="width: 30%;display: flex;">
                                             <span class="label">类型:</span>
                                             <span class="value">{{orderDetail.type}}
                                             </span>
                                         </div>
-                                        <div class="info-item" style="width: 30%;">
+                                        <div class="info-item" style="width: 30%;display: flex;">
                                             <span class="label">分组:</span>
                                             <span class="value">{{orderDetail.proType}}
                                             </span>
                                         </div>
-                                        <div class="info-item" style="width: 30%;">
+                                        <div class="info-item" style="width: 30%;display: flex;">
                                             <span class="label">排序:</span>
                                             <span class="value">{{orderDetail.sort}}
                                             </span>
@@ -138,7 +163,8 @@
                                         </div>
                                         <div class="info-item">
                                             <div class="label">流程描述:</div>
-                                            <div class="value">{{orderDetail.descriptionWx}}
+                                            <div class="value">
+                                                {{orderDetail.descriptionWx}}
                                             </div>
                                         </div>
                                         <div class="info-item">
@@ -181,11 +207,12 @@
                         <div class="JNPF-common-layout-main JNPF-flex-main basic-table">
                             <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="max-height: 100%;">
+                                <el-col :gutter="16" :span="12" style="height: 100%;">
                                     <div class="title">
                                         小程序表单信息
                                     </div>
-                                    <el-table :data="tableData1" :loding="listLoading1">
+                                    <el-table :data="tableData1" :loding="listLoading1"
+                                        height="220px">
                                         <el-table-column prop="index" type="index" width="50"
                                             label="序号" align="center" />
                                         <el-table-column align="center" prop="itsmFieldName"
@@ -201,7 +228,8 @@
                                     <div class="title">
                                         企微表单信息
                                     </div>
-                                    <el-table :data="tableData2" :loding="listLoading2">
+                                    <el-table :data="tableData2" :loding="listLoading2"
+                                        height="220px">
                                         <el-table-column prop="index" type="index" width="50"
                                             label="序号" align="center" />
                                         <el-table-column align="center" prop="itsmFieldName"
@@ -225,8 +253,29 @@
                 </div>
             </div>
         </transition>
+
+        <el-dialog title="表单字段复制" :visible.sync="copyFormVisible" width="40%"
+            :before-close="copyFormClose">
+            <el-form @submit.native.prevent>
+                <el-form-item label="复制方向" :rules="[
+      { required: true, message: '请输入复制方向', trigger: 'blur' },
+    ]">
+                    <el-select v-model="form.value" reserve-keyword placeholder="请输入复制方向">
+                        <el-option v-for="item in copyProcessList" :key="item.id"
+                            :label="item.fullName" :value="item.enCode">
+                        </el-option>
+                    </el-select>
+                </el-form-item>
+            </el-form>
+            <span slot="footer" class="dialog-footer">
+                <el-button @click="copyFormClose">取 消</el-button>
+                <el-button type="primary" @click="formSubmit">确 定</el-button>
+            </span>
+        </el-dialog>
+
         <Allocation v-if="allocationVisible" ref="Allocation" @close="closeAllocation" />
         <INFO-Form v-if="infoFormVisible" ref="INFOForm" @refreshData="getDetail" />
+        <RULE-Form v-if="ruleFormVisible" ref="RULEForm" />
     </div>
 
 </template>
@@ -235,15 +284,16 @@
 
 
 import INFOForm from './infoForm'
+import RULEForm from './ruleForm'
 
 
-import { findVersionByItsmProKey, getDetail, putSelectVersion, getFiledList } from "@/api/governmentCloud/processConfiguration/processConfiguration";
+import { findVersionByItsmProKey, getDetail, putSelectVersion, getFiledList, copyFormDetail, deleteProcessByKey } from "@/api/governmentCloud/processConfiguration/processConfiguration";
+import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
 
-import Allocation from './AllocationNew'
-// import Allocation from './AllocationNew'
+import Allocation from './Allocation'
 
 export default {
-    components: { Allocation, INFOForm },
+    components: { Allocation, INFOForm, RULEForm },
     data() {
         return {
             visible: false,
@@ -270,12 +320,22 @@ export default {
             listLoading2: true,
             multipleSelection: null,
             order: null,
+            copyFormVisible: false,//复制表单是否显示
+            form: {
+                value: '',
+                src: '',
+                dist: '',
+                version: '',
+                proKey: ''
+            },
+            copyProcessList: [],
 
 
             value1: false, //是否生效 临时
             allocationVisible: false,//配置页面是否展示
             orderDetail: null,//流程详情
-            infoFormVisible: false//信息表单是否展示
+            infoFormVisible: false,//信息表单是否展示
+            ruleFormVisible: false//规则表单是否展示
         };
     },
     watch: {
@@ -284,7 +344,91 @@ export default {
             this.$refs.treeBox.filter(val);
         }
     },
+    created() {
+        this.getCopyProcessList()
+    },
     methods: {
+        getCopyProcessList() {
+            getDictionaryDataSelector('591282270644469765').then(res => {
+                this.copyProcessList = res.data.list
+            })
+        },
+        deleteVersion(item) {
+            console.log(item)
+            this.$confirm("此操作将永久删除该版本, 是否继续?", "提示", {
+                confirmButtonText: "确定",
+                cancelButtonText: "取消",
+                type: "warning"
+            })
+                .then(() => {
+                    console.log(this.order)
+                    let params = {
+                        key: this.order.itsmProKey,
+                        version: item.version
+                    }
+                    deleteProcessByKey(params).then(async (res) => {
+                        if (res.code == 200) {
+                            this.$message({
+                                message: "删除成功",
+                                type: "success",
+                                duration: 1500
+                            });
+                            await this.getVersionByItsmProKey()
+                            this.listQuery.versionId = this.treeData[0].id
+                            this.getDetail()
+                        } else {
+                            this.$message({
+                                message: res.msg,
+                                type: "error",
+                                duration: 1500
+                            });
+                        }
+                    });
+                })
+                .catch(() => { });
+        },
+        copy() {
+            this.copyFormVisible = true
+        },
+        copyFormClose() {
+            this.copyFormVisible = false
+            this.form.value = ''
+        },
+        formSubmit() {
+            if (this.form.value) {
+                let params = {
+                    proKey: this.orderDetail.itsmProKey,
+                    version: this.orderDetail.version,
+                    src: this.form.value.split(',')[0],
+                    dist: this.form.value.split(',')[1],
+                }
+                console.log(params)
+                copyFormDetail(params).then(res => {
+                    if (res.code == 200) {
+                        this.$message({
+                            message: "复制成功",
+                            type: "success",
+                            duration: 1500
+                        });
+                        this.copyFormClose()
+                        this.getDetail()
+                    } else {
+                        this.$message({
+                            message: res.msg,
+                            type: "error",
+                            duration: 1500
+                        });
+                    }
+                });
+            } else {
+                this.$message({
+                    message: "请选择复制方向",
+                    type: "error",
+                    duration: 1500
+                });
+            }
+
+        },
         // 打开配置页
         showAllocation(type) {
             console.log(type)
@@ -297,6 +441,12 @@ export default {
         closeAllocation() {
             this.allocationVisible = false;
         },
+        editRuleForm() {
+            this.ruleFormVisible = true
+            this.$nextTick(() => {
+                this.$refs.RULEForm.init(this.orderDetail)
+            })
+        },
         editForm() {
             this.infoFormVisible = true
             this.$nextTick(() => {
@@ -497,10 +647,16 @@ export default {
                     .info-item {
                         width: 100%;
                         color: #8d8d8d;
-                        margin-bottom: 8px;
+                        margin-bottom: 10px;
                         .label {
                             margin-bottom: 5px;
                         }
+                        .value {
+                            overflow: hidden;
+                            display: -webkit-box;
+                            -webkit-line-clamp: 1;
+                            -webkit-box-orient: vertical;
+                        }
                     }
                 }
                 .foot {

+ 90 - 0
src/views/governmentCloud/processConfiguration/iconForm.vue

@@ -0,0 +1,90 @@
+<template>
+    <el-dialog title="图标选择" :close-on-click-modal="false"
+        class="JNPF-dialog JNPF-dialog_center icon-dialog" lock-scroll append-to-body
+        v-bind="$attrs" width="600px" :modal-append-to-body="false" v-on="$listeners">
+        <div slot="title">
+            图标选择
+        </div>
+        <div class="icon-list">
+            <el-button v-for="item,index in iconList" :key="index" @click="choiceIcon(item.icon)">
+                <slot>
+                    <el-image :src="minioPath+ item.icon"></el-image>
+                </slot>
+            </el-button>
+        </div>
+    </el-dialog>
+</template>
+
+<script>
+import { getIconList } from "@/api/governmentCloud/iconManagement/iconManagement";
+import { minioPath } from '@/utils/apiUrl'
+
+export default {
+    props: [],
+    data() {
+        return {
+            minioPath: minioPath,
+            iconList: [],
+        }
+    },
+    watch: {
+    },
+    async created() {
+        await this.getIconList()
+    },
+    methods: {
+        getIconList() {
+            return new Promise((resolve, reject) => {
+                getIconList()
+                    .then(res => {
+                        let list = []
+                        res.data.forEach(url => {
+                            let obj = {
+                                icon: url
+                            }
+                            list.push(obj)
+                        });
+                        this.iconList = list;
+                    })
+                resolve(true)
+            })
+        },
+        choiceIcon(icon) {
+            this.$emit('choiceIcon', icon)
+        },
+    }
+}
+</script>
+<style lang="scss" scoped>
+.icon-list {
+    padding-bottom: 8px;
+    > .el-button {
+        margin: 8px 0 0 8px;
+        width: 60px;
+        height: 60px;
+        padding: 0;
+        >>> span {
+            width: 60px;
+            height: 60px;
+            display: inline-block;
+            line-height: 60px;
+            text-align: center;
+            transition: 300ms;
+            [class^='el-icon-'] {
+                margin-top: 17px;
+            }
+            .fa {
+                margin-top: 17px;
+            }
+        }
+        i {
+            font-size: 24px;
+        }
+        &:hover {
+            >>> span {
+                transform: scale(1.1);
+            }
+        }
+    }
+}
+</style>

+ 165 - 12
src/views/governmentCloud/processConfiguration/index.vue

@@ -53,21 +53,24 @@
                 </el-form>
             </el-row>
             <div class="JNPF-common-layout-main JNPF-flex-main">
-                <div class="JNPF-common-head" style="justify-content: flex-start;">
-                    <el-button type="primary" @click="">一键同步已接入流程</el-button>
-                    <el-button type="primary" @click="">一键同步已接入流程及表单</el-button>
-                    <!-- <div class="JNPF-common-head-right">
+                <div class="JNPF-common-head" style="justify-content: space-between;">
+                    <div>
+                        <el-button type="primary" @click="addFormVisible = true">新增并同步流程</el-button>
+                        <el-button type="primary" @click="checkNewVersion"
+                            :loading="checkNewVersionLoading">检查流程新版本</el-button>
+                    </div>
+                    <div class="JNPF-common-head-right">
                         <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()" />
+                                :underline="false" @click="reset()" />
                         </el-tooltip>
-                    </div> -->
+                    </div>
                 </div>
                 <JNPF-table v-loading="listLoading" :data="tableData" :hasNO="true">
                     <el-table-column align="center" prop="icon" label="流程图标">
                         <template slot-scope="scope" sortable>
                             <img style="width: 40px;height: 40px;"
-                                :src="'https://oss.shidaiyun.net/'+scope.row.icon"></img>
+                                :src="minioPath+scope.row.icon"></img>
                         </template>
                     </el-table-column>
                     <el-table-column align="center" prop="itsmProName" label="流程名称" />
@@ -86,14 +89,18 @@
                         </template>
                     </el-table-column>
                     <el-table-column align="center" prop="updateTime" label="更新时间" />
-                    <el-table-column align="center" label="操作" width="150" fixed="right">
+                    <el-table-column align="center" label="操作" width="200" fixed="right">
                         <template slot-scope="scope" sortable>
-                            <div>
+                            <div
+                                style="display: flex;align-items: center;justify-content: space-evenly">
                                 <el-button style="width: 100%;margin-left: 10px;" size="mini"
                                     type="text" @click="editTeam(scope.row,scope.row.id)">流程配置
                                 </el-button>
                                 <el-button style="width: 100%;" size="mini" type="text"
-                                    @click="edit()">同步
+                                    @click="synchronous(scope.row)">同步
+                                </el-button>
+                                <el-button style="width: 100%;color: #f56c6c" size="mini"
+                                    type="text" @click="deleteProcess(scope.row)">删除
                                 </el-button>
                             </div>
                         </template>
@@ -102,6 +109,25 @@
                 </JNPF-table>
                 <pagination :total="total" :page.sync="listQuery.currentPage"
                     :limit.sync="listQuery.pageSize" @pagination="getList" />
+
+                <el-dialog title="新增同步流程" :visible.sync="addFormVisible" width="30%"
+                    :before-close="()=>{addFormVisible = false, form.itsmProName = ''}">
+                    <el-form @submit.native.prevent>
+                        <el-form-item label="流程名称">
+                            <el-select v-model="form.itsmProName" filterable remote reserve-keyword
+                                placeholder="请输入流程名称(全名)" :remote-method="getProcessList"
+                                :loading="formSelectLoading">
+                                <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="addFormVisible = false">取 消</el-button>
+                        <el-button type="primary" @click="formSubmit()">确 定</el-button>
+                    </span>
+                </el-dialog>
             </div>
         </div>
         <Form v-if="formVisible" ref="Form" @close="closeForm" />
@@ -110,17 +136,20 @@
 </template>
 
 <script>
-import { getList } from "@/api/governmentCloud/processConfiguration/processConfiguration";
+import { getList, synchronizedProcessByName, findProcessList, processNewVersion, deleteProcessByKey } from "@/api/governmentCloud/processConfiguration/processConfiguration";
 import Form from './Form'
+import { minioPath } from '@/utils/apiUrl'
 
 export default {
     name: "process-configuration",
     components: { Form },
     data() {
         return {
+            minioPath: minioPath,
             tableData: [],
             listLoading: false,
             // organizeIdTree: [],
+            addFormVisible: false,
             listQuery: {
                 menuId: "581767763807176197", // 581767763807176197
                 dataType: "0",
@@ -134,21 +163,145 @@ export default {
                 itsmProKey: '',
                 itsmProName: '',
             },
+            form: {
+                itsmProName: ''
+            },
             total: 0,
-            formVisible: false
+            formVisible: false,
+            formSelectLoading: false,
+            processList: [],
+            checkNewVersionLoading: false
         };
     },
     watch: {},
     created() {
+        this.getProcessList()
         this.getList();
     },
     methods: {
+        deleteProcess(row) {
+            console.log(row)
+            this.$confirm("此操作将永久删除该流程, 是否继续?", "提示", {
+                confirmButtonText: "确定",
+                cancelButtonText: "取消",
+                type: "warning"
+            })
+                .then(() => {
+                    let params = {
+                        key: row.itsmProKey,
+                        version: ''
+                    }
+                    deleteProcessByKey(params).then(async (res) => {
+                        if (res.code == 200) {
+                            this.$message({
+                                message: "删除成功",
+                                type: "success",
+                                duration: 1500
+                            });
+                            this.getList()
+                        } else {
+                            this.$message({
+                                message: res.msg,
+                                type: "error",
+                                duration: 1500
+                            });
+                        }
+                    });
+                })
+                .catch(() => { });
+        },
+        getProcessList(name) {
+            if (name) {
+                this.formSelectLoading = true
+                let params = {
+                    name: name,
+                    currentPage: 1,
+                    pageSize: 1000
+                }
+                findProcessList(params).then(res => {
+                    if (res.code == 200) {
+                        console.log()
+                        this.formSelectLoading = false
+                        this.processList = JSON.parse(res.data).records
+                    }
+                })
+            } else {
+                this.options = [];
+            }
+        },
+        checkNewVersion() {
+            this.checkNewVersionLoading = true
+            processNewVersion().then(res => {
+                this.checkNewVersionLoading = false
+                if (res.code == 200) {
+                    this.$message({
+                        message: "检查成功",
+                        type: "success",
+                        duration: 1500
+                    });
+                    this.getList();
+                } else {
+                    this.$message({
+                        message: res.msg,
+                        type: "error",
+                        duration: 1500
+                    });
+                }
+            })
+        },
         //编辑流程
         editFlow(item) {
             console.log(item)
             this.formVisible = true
             this.$refs.Form.init(item.itsmProKey)
         },
+        synchronous(item) {
+            console.log(item)
+            let params = {
+                name: item.itsmProName,
+                isFirst: false,
+                baseVersion: item.version
+            }
+            synchronizedProcessByName(params).then(res => {
+                if (res.code == 200) {
+                    this.$message({
+                        message: "同步成功",
+                        type: "success",
+                        duration: 1500
+                    });
+                    this.getList();
+                } else {
+                    this.$message({
+                        message: res.msg,
+                        type: "error",
+                        duration: 1500
+                    });
+                }
+            });
+        },
+        formSubmit() {
+            let params = {
+                name: this.form.itsmProName,
+                isFirst: true,
+            }
+            synchronizedProcessByName(params).then(res => {
+                if (res.code == 200) {
+                    this.$message({
+                        message: "新增同步成功",
+                        type: "success",
+                        duration: 1500
+                    });
+                    this.addFormVisible = false
+                    this.getList();
+                } else {
+                    this.$message({
+                        message: res.msg,
+                        type: "error",
+                        duration: 1500
+                    });
+                }
+            });
+        },
         getList() {
             this.listLoading = true;
             getList(this.listQuery)

+ 20 - 52
src/views/governmentCloud/processConfiguration/infoForm.vue

@@ -83,14 +83,15 @@
                     </el-col>
                     <el-col :span="24">
                         <jnpf-form-tip-item label="图标" align="left" prop="icon">
-                            <el-select ref="select" v-model="dataForm.icon" style="width: 100%;"
-                                placeholder="请选择图标" @change="changeSelection(dataForm.icon)">
-                                <el-option v-for="item in iconList" :key="item.icon"
-                                    :value="item.icon">
-                                    <img :src="'https://oss.shidaiyun.net/'+ item.icon"
-                                        style="height: 30px;margin-right: 10px;">
-                                </el-option>
-                            </el-select>
+                            <div
+                                style="display: flex;align-items: center;justify-content: space-between;">
+                                <div style="width: 80px;height: 80px">
+                                    <el-image :src="minioPath+ dataForm.icon" fit="contain"
+                                        :preview-src-list="[minioPath+dataForm.icon]"></el-image>
+                                </div>
+                                <el-button @click="iconChooseFormVisible = true">选择图标</el-button>
+                            </div>
+
                         </jnpf-form-tip-item>
                     </el-col>
                     <!-- 表单结束 -->
@@ -103,22 +104,26 @@
             <el-button type="primary" @click="dataFormSubmit()" :loading="btnLoading"> 确
                 定</el-button>
         </span>
+        <iconForm :visible.sync="iconChooseFormVisible" @choiceIcon="setIcon" />
     </el-dialog>
 </template>
 
 
 <script>
-import request from '@/utils/request'
 import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
+import iconForm from './iconForm'
 
 import { getFormDetail, putDetail } from "@/api/governmentCloud/processConfiguration/processConfiguration";
 
-import { getIconList } from "@/api/governmentCloud/iconManagement/iconManagement";
+import { minioPath } from '@/utils/apiUrl'
+
 
 export default {
     props: [],
+    components: { iconForm },
     data() {
         return {
+            minioPath: minioPath,
             dataFormSubmitType: 0,
             visible: false,
             loading: false,
@@ -126,6 +131,7 @@ export default {
             formRef: 'formRef',
             dataForm: null,
             dataRule: null,
+            iconChooseFormVisible: false,
 
 
             usedQywxOptions: [],
@@ -146,7 +152,6 @@ export default {
             hasNewVersionProps: { "label": "fullName", "value": "enCode" },
 
 
-            iconList: [],
 
             childIndex: -1,
             isEdit: false,
@@ -167,27 +172,9 @@ export default {
     },
     mounted() { },
     methods: {
-        async changeSelection(icon) {
-            console.log(icon)
-            let brand = icon;
-            let flag = false
-            if (this.iconList.length > 1) {
-                flag = true
-            } else {
-                flag = await this.getIconList()
-            }
-
-
-            if (flag) {
-                for (let index in this.iconList) {
-                    let aa = this.iconList[index];
-                    let value = aa.icon;
-                    if (brand === value) {
-                        this.$refs.select.$el.children[0].children[0].setAttribute('style', "background:url(" + 'https://oss.shidaiyun.net/' + aa.icon + ") no-repeat 10px;background-size: 30px 30px;color:#333;padding-left: 50px;");
-                    }
-                }
-            }
-
+        setIcon(val) {
+            this.dataForm.icon = val
+            this.iconChooseFormVisible = false
         },
         async dataAll() {
             this.getusedOptions();
@@ -198,29 +185,13 @@ export default {
             this.getcurrentOptions();
             this.getcategoryOptions();
             this.gethasNewVersionOptions();
-            await this.getIconList()
         },
         getusedOptions() {
             getDictionaryDataSelector('581828792310302341').then(res => {
                 this.usedOptions = res.data.list
             })
         },
-        getIconList() {
-            return new Promise((resolve, reject) => {
-                getIconList()
-                    .then(res => {
-                        let list = []
-                        res.data.forEach(url => {
-                            let obj = {
-                                icon: url
-                            }
-                            list.push(obj)
-                        });
-                        this.iconList = list;
-                    })
-                resolve(true)
-            })
-        },
+
         getusedQywxOptions() {
             getDictionaryDataSelector('581828792310302341').then(res => {
                 this.usedQywxOptions = res.data.list
@@ -263,9 +234,6 @@ export default {
                 this.dataForm = res.data
                 this.loading = false
                 this.visible = true;
-                this.$nextTick(async () => {
-                    this.changeSelection(this.dataForm.icon)
-                })
             })
         },
         // 表单提交

+ 131 - 0
src/views/governmentCloud/processConfiguration/ruleForm.vue

@@ -0,0 +1,131 @@
+<template>
+    <el-dialog title="规则配置" :close-on-click-modal="false" append-to-body :visible.sync="visible"
+        class="JNPF-dialog JNPF-dialog_center" lock-scroll width="800px">
+        <el-row :gutter="15" class="">
+            <el-button style="margin-bottom: 10px" type="primary"
+                @click="synchronous()">同步</el-button>
+            <div v-loading="!editorShow" style="height: 300px;background-color: #282a36;">
+                <!-- <vue-json-editor v-model="jsonStr" :showBtns="false" :mode="'code'"
+                    @json-change="onJsonChange" @json-save="onJsonSave" @has-error="onError" /> -->
+                <b-code-editor v-if="editorShow" v-model="jsonStr" :auto-format="true"
+                    :smart-indent="true" theme="dracula" :indent-unit="4" :line-wrap="false"
+                    ref="editor">
+                </b-code-editor>
+            </div>
+
+        </el-row>
+        <span slot="footer" class="dialog-footer">
+            <el-button @click="visible = false"> 取 消</el-button>
+            <el-button type="primary" @click="dataFormSubmit()" :loading="btnLoading"> 确
+                定</el-button>
+        </span>
+    </el-dialog>
+</template>
+
+
+<script>
+
+import { putDetail, getProcessAdvanced, saveProcessAdvanced, getRuleByProcessDefKey } from "@/api/governmentCloud/processConfiguration/processConfiguration";
+
+import { minioPath } from '@/utils/apiUrl'
+// 导入模块
+import vueJsonEditor from 'vue-json-editor'
+
+
+export default {
+    props: [],
+    components: { vueJsonEditor },
+    data() {
+        return {
+            minioPath: minioPath,
+            visible: false,
+            btnLoading: false,
+            iconChooseFormVisible: false,
+            childIndex: -1,
+            jsonStr: '',
+            editorShow: false,
+            ruleId: null
+        }
+    },
+    created() {
+    },
+    mounted() { },
+    methods: {
+        onJsonChange() { },
+        onJsonSave() { },
+        onError() { },
+        synchronous() {
+        },
+        init(orderDetail) {
+            this.orderDetail = orderDetail
+            let params = {
+                processDefKey: this.orderDetail.itsmProKey
+            }
+            getRuleByProcessDefKey(params).then(res => {
+                if (res.code == 200) {
+                    if (res.data) {
+                        this.jsonStr = res.data.content
+                        this.ruleId = res.data.id
+                    }
+                    this.visible = true;
+                    this.editorShow = true
+                } else {
+                    this.$message.error(res.msg)
+                }
+            })
+        },
+        synchronous() {
+            this.editorShow = false
+            this.jsonStr = null
+            let params = {
+                processName: this.orderDetail.itsmProName,
+                preNum: this.orderDetail.itsmProKey
+            }
+            getProcessAdvanced(params).then(res => {
+                if (res.code == 200) {
+                    this.jsonStr = res.data
+                    this.editorShow = true
+                    this.$message.success('同步成功')
+                } else {
+                    this.$message.error(res.msg)
+                    this.editorShow = true
+                }
+
+            })
+        },
+        // 表单提交
+        dataFormSubmit() {
+            if (this.jsonStr) {
+                let params = {
+                    version: this.orderDetail.version,
+                    preNum: this.orderDetail.itsmProKey,
+                    processAdvanced: this.jsonStr,
+                    id: this.ruleId
+                }
+                this.btnLoading = true
+                saveProcessAdvanced(params).then(res => {
+                    if (res.code == 200) {
+                        this.$message.success('保存成功')
+                        this.btnLoading = false
+
+                        this.visible = false
+                    } else {
+                        this.$message.error(res.msg)
+                    }
+                })
+            } else {
+                this.$message.error('规则配置内容不能为空')
+            }
+
+        },
+    },
+}
+
+</script>
+
+
+<style scoped lang="scss">
+.jsoneditor-outer {
+    height: 1000px;
+}
+</style>

+ 4 - 1
src/views/governmentCloud/productserverdocumentation/Detail.vue

@@ -57,11 +57,14 @@ 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"
+import { minioPath } from '@/utils/apiUrl'
+
 export default {
     components: { Detail },
     props: [],
     data() {
         return {
+            minioPath: minioPath,
             visible: false,
             detailVisible: false,
             loading: false,
@@ -91,7 +94,7 @@ export default {
     methods: {
         pcDownloadFile(url, name) {
             console.log(url)
-            url = 'https://oss.shidaiyun.net/' + url
+            url = minioPath + url
             //保存到本地
             try {
                 const x = new window.XMLHttpRequest();

+ 16 - 35
src/views/governmentCloud/productserverdocumentation/form.vue

@@ -8,29 +8,12 @@
                     <!-- 具体表单 -->
                     <template v-if="!dataForm.id">
                         <el-col :span="24">
-                            <jnpf-form-tip-item label="服务文档" align="left" prop="enable">
-                                <el-upload class="upload-demo"
-                                    action="http://localhost:3000/dev/api/minio/upload"
-                                    :data="uploadData" :headers="uploadHeaders"
-                                    :on-success="uploadSuccess">
+                            <el-form-item label="服务文档" prop="title">
+                                <el-upload class="upload-demo" :http-request="upload" action="#">
                                     <el-button size="small" type="primary">点击上传</el-button>
                                 </el-upload>
-                            </jnpf-form-tip-item>
+                            </el-form-item>
                         </el-col>
-                        <!-- <el-col :span="24">
-                            <jnpf-form-tip-item label="标题" align="left" prop="enable">
-                                <JnpfInput v-model="dataForm.title" disabled clearable
-                                    :style='{"width":"100%"}' :maskConfig="maskConfig.title">
-                                </JnpfInput>
-                            </jnpf-form-tip-item>
-                        </el-col>
-                        <el-col :span=" 24">
-                            <jnpf-form-tip-item label="路径" align="left" prop="enable">
-                                <JnpfInput v-model="dataForm.url" disabled clearable
-                                    :style='{"width":"100%"}' :maskConfig="maskConfig.url">
-                                </JnpfInput>
-                            </jnpf-form-tip-item>
-                        </el-col> -->
                     </template>
 
                     <el-col :span=" 24">
@@ -71,8 +54,6 @@
                     {{'下一条'}}
                 </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>
@@ -91,6 +72,8 @@ 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'
+import { uploadFuction } from '@/utils/upload'
+
 
 import { getToken } from '@/utils/auth'
 
@@ -140,7 +123,7 @@ export default {
                 title: [
                     {
                         required: true,
-                        message: '请输入',
+                        message: '请上传服务文档',
                         trigger: 'blur'
                     },
                 ],
@@ -166,12 +149,6 @@ export default {
             //定位属性
             locationScope: {
             },
-            uploadData: {
-                type: 'productServerDocumentation',
-            },
-            uploadHeaders: {
-                Authorization: getToken(),
-            }
         }
     },
     computed: {
@@ -187,6 +164,16 @@ export default {
     },
     mounted() { },
     methods: {
+        upload(param) {
+            uploadFuction('productServerDocumentation', param.file).then(res => {
+                if (res.code == 200) {
+                    this.$nextTick(() => {
+                        this.dataForm.title = res.data.name
+                        this.dataForm.url = res.data.url
+                    })
+                }
+            })
+        },
         prev() {
             this.index--
             if (this.index === 0) {
@@ -317,12 +304,6 @@ export default {
                 }
             })
         },
-        uploadSuccess(res, file) {
-            console.log(res)
-            console.log(file)
-            this.dataForm.title = res.data.name
-            this.dataForm.url = res.data.url
-        },
         request() {
             let _data = this.dataList()
             if (this.dataFormSubmitType == 2) {

+ 2 - 2
src/views/governmentCloud/productserverdocumentation/index.vue

@@ -15,8 +15,8 @@
                     </el-col>
                     <el-col :span="6">
                         <el-form-item label="创建时间">
-                            <JnpfDateRangePicker v-model="query.createTime" format="yyyy-MM-dd"
-                                startPlaceholder="开始日期" endPlaceholder="结束日期" />
+                            <JnpfDateRangePicker v-model="query.createTime" startPlaceholder="开始日期"
+                                endPlaceholder="结束日期" />
                         </el-form-item>
                     </el-col>
                     <el-col :span="6">

+ 684 - 0
src/views/governmentCloud/suggestions/Detail.vue

@@ -0,0 +1,684 @@
+<template>
+    <el-drawer title="建议详情" :visible.sync="visible" :direction="'rtl'" size="45%">
+        <template slot="title">
+            <h1 style="color: #000;">建议详情</h1>
+        </template>
+        <div class="drawer-content">
+            <div class="top card">
+                <div class="f1">
+                    <div class="left">
+                        <el-image style="width: 40px;height: 40px;"
+                            :src="minioPath+ orderItem.avatar" fit="contain"
+                            :preview-src-list="[minioPath+orderItem.avatar]">
+                            <div slot="error" class="image-slot">
+                                <el-image style="width: 40px;height: 40px;"
+                                    :src="minioPath+ 'prod/userAvatar/avatar.png'"
+                                    fit="contain"></el-image>
+                            </div>
+                        </el-image>
+                        <span class="name">{{ orderItem.createUserName }}</span>
+                        <div class="right"
+                            :style="{ color: orderItem.state.color, marginLeft: '10px' }">
+                            {{ orderItem.state.label }}</div>
+                    </div>
+                    <div class="right" style="color: #000;">
+                        {{ getDate(orderItem.createDate) }}</div>
+
+                </div>
+                <div class="content">
+                    <div class=" button" v-for="(item, index) in orderItem.type"
+                        :style="{ color: item.color, backgroundColor: item.color + '20' }"
+                        :key="index">
+                        {{ item.label }}</div>
+                    <div style="font-size: 18px;fonweight: bold">{{ orderItem.content }}</div>
+                </div>
+                <div class="image-item" v-if="orderItem.imgUrl">
+                    <el-image style="width: 100px;height: 100px;" :src="minioPath + item"
+                        :preview-src-list="srcList"
+                        @click="showImage(item, orderItem.imgUrl.split(','))"
+                        v-for="(item, index) in orderItem.imgUrl.split(',')" :key="index"
+                        fit="contain">
+                        <div slot="error" class="image-slot">
+                            <el-image style="width: 40px;height: 40px;"
+                                :src="minioPath+ 'prod/userAvatar/avatar.png'"
+                                fit="contain"></el-image>
+                        </div>
+                    </el-image>
+                </div>
+                <div class="foot">
+                    <div class="left"></div>
+                    <div class="right"></div>
+                </div>
+            </div>
+            <el-tabs v-model="activeName" @tab-click="handleClick">
+                <el-tab-pane :label="'点赞('+ orderItem.likeList.length + ')' " name="like">
+                    <div class="likes-card card">
+                        <div class="images" v-if="orderItem.likeList.length">
+                            <el-image style="width: 40px;height: 40px;" v-if="index < 4"
+                                v-for="(item, index) in orderItem.likeList" :key="index"
+                                :src="minioPath+ item.avatar" fit="contain"
+                                :preview-src-list="[minioPath+item.avatar]"
+                                :class="index > 0 ? 'avatar-ml' : ''">
+                                <div slot="error" class="image-slot">
+                                    <el-image style="width: 40px;height: 40px;"
+                                        :src="minioPath+ 'prod/userAvatar/avatar.png'"
+                                        fit="contain"></el-image>
+                                </div>
+                            </el-image>
+                            <image v-if="orderItem.likeList.length > 4"
+                                src="@/static/images/suggestions/more.png"
+                                style="width: 30px; height: 30px; margin-left: 10px"></image>
+                        </div>
+                        <el-empty v-else description="暂无数据"></el-empty>
+                    </div>
+                </el-tab-pane>
+                <el-tab-pane :label="'评论('+ orderItem.replyCount +')' " name="pinglun">
+                    <div class="pinglun-card card">
+                        <div class="content" v-if="orderItem.replyList != 0">
+                            <div class="comment-item" v-for="(item, index) in orderItem.replyList"
+                                :key="index">
+                                <el-image style="width: 40px;height: 40px;"
+                                    :src="minioPath+ item.avatar" fit="contain"
+                                    :preview-src-list="[minioPath+item.avatar]">
+                                    <div slot="error" class="image-slot">
+                                        <el-image style="width: 40px;height: 40px;"
+                                            :src="minioPath+ 'prod/userAvatar/avatar.png'"
+                                            fit="contain"></el-image>
+                                    </div>
+                                </el-image>
+                                <div class="center">
+                                    <div class="name">{{ item.replyUserName }}</div>
+                                    <div class="text">
+                                        {{ item.replyContent }}
+                                        <img style="width: 15px; height: 15px"
+                                            @click="startReply('in',item)"
+                                            src="@/assets/images/suggestion/pinglun.png" alt="">
+                                        <img v-if="!item.liked" style="width: 15px; height: 15px"
+                                            src="@/assets/images/suggestion/dianzan.png" alt=""
+                                            @click="beLike(item)">
+                                        <img v-else style="width: 15px; height: 15px"
+                                            src="@/assets/images/suggestion/yidianzan.png" alt=""
+                                            @click="dLike(item)">
+
+                                    </div>
+                                    <div class="time">{{ getDate(item.replyDate) }}</div>
+                                </div>
+                                <div class="children-list" v-if="item.children.length">
+                                    <div class="child" v-for="(child, cindex) in item.children"
+                                        :key="cindex">
+                                        <el-image style="width: 40px;height: 40px;"
+                                            :src="minioPath+ child.avatar" fit="contain"
+                                            :preview-src-list="[minioPath+child.avatar]">
+                                            <div slot="error" class="image-slot">
+                                                <el-image style="width: 40px;height: 40px;"
+                                                    :src="minioPath+ 'prod/userAvatar/avatar.png'"
+                                                    fit="contain"></el-image>
+                                            </div>
+                                        </el-image>
+                                        <div class="center">
+                                            <div class="name">{{ child.replyUserName }}</div>
+                                            <div class="text">
+                                                {{ child.replyContent }}
+                                                <img style="width: 15px; height: 15px"
+                                                    @click="startReply('in',child)"
+                                                    src="@/assets/images/suggestion/pinglun.png"
+                                                    alt="">
+                                                <img v-if="!child.liked"
+                                                    style="width: 15px; height: 15px"
+                                                    src="@/assets/images/suggestion/dianzan.png"
+                                                    alt="" @click="beLike(child)">
+                                                <img v-else style="width: 15px; height: 15px"
+                                                    src="@/assets/images/suggestion/yidianzan.png"
+                                                    alt="" @click="dLike(child)">
+                                            </div>
+                                            <div class="time">{{ getDate(child.replyDate) }}</div>
+                                        </div>
+                                    </div>
+                                </div>
+                            </div>
+                        </div>
+                        <el-empty v-else description="暂无数据"></el-empty>
+
+                    </div>
+                </el-tab-pane>
+            </el-tabs>
+        </div>
+        <div class="drawer-footer">
+            <div class="left">
+                <el-image style="width: 40px;height: 40px;" :src="minioPath+ user.userIcon"
+                    fit="contain">
+                    <div slot="error" class="image-slot">
+                        <el-image style="width: 40px;height: 40px;"
+                            :src="minioPath+ 'prod/userAvatar/avatar.png'" fit="contain"></el-image>
+                    </div>
+                </el-image>
+                <span style="color: #2697ff;" @click="startReply('out')">点此发表评论</span>
+            </div>
+            <div class="right">
+                <img v-if="!orderItem.liked" src="@/assets/images/suggestion/dianzan.png" alt=""
+                    @click.stop="beLike(orderItem, true)">
+                <img v-else src="@/assets/images/suggestion/yidianzan.png" alt=""
+                    @click.stop="dLike(orderItem, true)">
+            </div>
+
+        </div>
+        <el-dialog title=" 评论" :visible.sync="dialogVisible" width="50%" :modal="false"
+            :before-close="handleClose">
+            <el-input type="textarea" :rows="8" placeholder="请输入评论内容" v-model="reply">
+            </el-input>
+            <span slot="footer" class="dialog-footer">
+                <el-button @click="handleClose">取消</el-button>
+                <el-button type="primary" @click="saveReply()">发表</el-button>
+            </span>
+        </el-dialog>
+    </el-drawer>
+</template>
+<script>
+import dayjs from 'dayjs'
+import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
+import { processUploadPreview } from '@/api/governmentCloud/entryAndExitRegis/entryAndExitRegis'
+import { minioPath } from '@/utils/apiUrl'
+import { getSysUser } from '@/api/permission/userSetting'
+
+
+import {
+    getListById, addReply, addLike, delLike
+} from "@/api/governmentCloud/suggestions/suggestions";
+
+export default {
+    components: {},
+    props: [],
+    data() {
+        return {
+            minioPath: minioPath,
+            visible: false,
+            orderItem: null,
+            activeName: 'like',
+            srcList: [],
+            user: null,
+            statusList: null,
+            typeList: null,
+            dialogVisible: false,
+            reply: '',
+            replyType: null,
+            detailId: null,
+            nowItem: null
+        }
+    },
+    computed: {},
+    watch: {},
+    created() {
+    },
+    mounted() { },
+    methods: {
+        // 点击tab
+        handleClick(tab, event) {
+
+        },
+        // 获取用户信息
+        getInfo() {
+            return new Promise((resolve, reject) => {
+                getSysUser().then(res => {
+                    this.user = res.data
+                    resolve(true)
+                })
+            })
+        },
+        // 发起评论前回调
+        startReply(type, item) {
+            this.replyType = type
+            if (item) {
+                this.nowItem = item;
+            }
+            this.dialogVisible = true
+        },
+        //发表评论
+        saveReply() {
+            if (this.reply) {
+                let params = {};
+                if (this.replyType == 'out') {
+                    params = {
+                        complainId: this.orderItem.id,
+                        replyContent: this.reply,
+                        repliedId: '',
+                        repliedUserId: this.orderItem.createUserId,
+                        repliedUserName: this.orderItem.createUserName,
+                        firstReplyId: ''
+                    };
+                } else {
+                    params = {
+                        complainId: this.nowItem.complainId,
+                        replyContent: this.reply,
+                        repliedId: this.nowItem.id,
+                        repliedUserId: this.nowItem.replyUserId,
+                        repliedUserName: this.nowItem.repliedUserName,
+                        firstReplyId: this.nowItem.firstReplyId
+                    };
+                }
+
+                addReply(params).then((res) => {
+                    if (res.code == 200) {
+                        this.$message({
+                            message: '评论成功',
+                            type: 'success'
+                        });
+                        this.getDataList();
+                        this.reply = null;
+                        this.dialogVisible = false
+                    } else {
+                        this.$message({
+                            message: '评论失败,请稍后再试',
+                            type: 'error'
+                        });
+                        setTimeout(() => {
+                            this.reply = null;
+                        }, 1000);
+                    }
+                });
+            } else {
+                this.$message({
+                    message: '评论内容不能为空',
+                    type: 'warning'
+                });
+            }
+        },
+        //点赞
+        beLike(item, isComplaint) {
+            let params;
+            if (isComplaint) {
+                params = {
+                    complainId: item.id
+                };
+            } else {
+                params = {
+                    complainId: item.complainId,
+                    complainReplyId: item.id
+                };
+            }
+            addLike(params).then((res) => {
+                if (res.code == 200) {
+                    item.liked = true;
+                    item.likeCount++;
+                    this.$message({
+                        message: '点赞成功',
+                        type: 'success'
+                    });
+                } else {
+
+                    this.$message({
+                        message: '点赞失败,请稍后再试',
+                        type: 'warning'
+                    });
+                }
+            });
+        },
+        //取消点赞
+        dLike(item, isComplaint) {
+            let params;
+            if (isComplaint) {
+                params = {
+                    complainId: item.id
+                };
+            } else {
+                params = {
+                    complainId: item.complainId,
+                    complainReplyId: item.id
+                };
+            }
+            delLike(params).then((res) => {
+                if (res.code == 200) {
+                    item.liked = false;
+                    item.likeCount--;
+                    this.$message({
+                        message: '取消点赞成功',
+                        type: 'success'
+                    });
+                } else {
+                    this.$message({
+                        message: '取消点赞失败,请稍后再试',
+                        type: 'warning'
+                    });
+                }
+            });
+        },
+        handleClose() {
+            this.dialogVisible = false
+            this.reply = ''
+        },
+        getTypeList() {
+            return new Promise((resolve, reject) => {
+                getDictionaryDataSelector('530731173714858629').then(res => {
+                    this.typeList = res.data.list
+                    resolve(true)
+                })
+            })
+
+        },
+        getStatusList() {
+            return new Promise((resolve, reject) => {
+                getDictionaryDataSelector('530731285270762117').then(res => {
+                    this.statusList = res.data.list
+                    resolve(true)
+                })
+            })
+        },
+        getMinioPath(item) {
+            let getImageMinioPathList = [];
+            let getFileMinioPathList = [];
+            // 获取图片minioPath
+            getImageMinioPathList = this.getMinio(item.result.imageList);
+            getFileMinioPathList = this.getMinio(item.result.fileList);
+
+            Promise.all(getImageMinioPathList).then((res) => {
+                Promise.all(getFileMinioPathList).then((res) => {
+                    this.loading = false
+                });
+            });
+        },
+        getMinio(list) {
+            let requestList = [];
+            list.map((item) => {
+                requestList.push(
+                    new Promise((resolve, reject) => {
+                        let params = {
+                            itsmFileId: item.id
+                        };
+                        processUploadPreview(params).then((res) => {
+                            if (res.data) {
+                                item.minioPath = minioPath + res.data.fileUrl;
+                                resolve(minioPath + res.data.fileUrl);
+                            } else {
+                                this.$message.error(`附件:${item.name}寻找失败`);
+                                resolve(null);
+                            }
+                        });
+                    })
+                );
+            });
+
+            return requestList;
+        },
+        getDate(time) {
+            let str = time ? dayjs(time).format('YYYY-MM-DD HH:mm:ss') : '无数据'
+            return str
+        },
+        pcDownloadFile(url, name) {
+            console.log(url)
+            //保存到本地
+            try {
+                const x = new window.XMLHttpRequest();
+                x.open('GET', url, true);
+                x.responseType = 'blob';
+                x.onload = () => {
+                    const url = window.URL.createObjectURL(x.response);
+                    const a = document.createElement('a');
+                    a.href = url;
+                    a.download = name;
+                    a.click();
+                };
+                x.send();
+
+
+                this.$message({
+                    message: '下载成功',
+                    type: 'success',
+                    duration: 1000,
+                })
+            } catch (error) {
+                this.$message({
+                    message: '下载失败',
+                    type: 'warning',
+                    duration: 1000,
+                })
+            }
+        },
+        getStatus(value) {
+            let obj = {};
+            this.statusList.map((item) => {
+                if (item.enCode.split(',')[0] == value) {
+                    obj.label = item.fullName;
+                    obj.color = item.enCode.split(',')[1];
+                }
+            });
+            return obj;
+        },
+        getType(value) {
+            let obj = {};
+            this.typeList.map((item) => {
+                if (item.enCode.split(',')[0] == value) {
+                    obj.label = item.fullName;
+                    obj.color = item.enCode.split(',')[1];
+                }
+            });
+            return obj;
+        },
+        getDataList() {
+            console.log('发起');
+            let params = {
+                id: this.detailId
+            };
+            getListById(params).then((res) => {
+                this.orderItem = res.data;
+                let stateColor = this.getStatus(this.orderItem.state).color;
+                let stateLabel = this.getStatus(this.orderItem.state).label;
+                this.orderItem.state = {
+                    color: stateColor,
+                    label: stateLabel
+                };
+
+                let list = [];
+                list = this.orderItem.type.split(',');
+                this.orderItem.typeLength = list.length;
+                this.orderItem.type = [];
+                list.map((t) => {
+                    let label = this.getType(t).label;
+                    let color = this.getType(t).color;
+                    this.orderItem.type.push({
+                        label: label,
+                        value: t,
+                        color: color
+                    });
+                });
+
+                this.srcList = []
+                this.orderItem.imgUrl.split(',').map((item) => {
+                    this.srcList.push(minioPath + item)
+                })
+
+                this.visible = true
+                console.log(this.orderItem)
+            });
+        },
+        async init(id) {
+            this.detailId = id
+            if (!this.typeList) {
+                await this.getTypeList();
+            }
+            if (!this.statusList) {
+                await this.getStatusList();
+            }
+            if (!this.user) {
+                await this.getInfo()
+            }
+            this.getDataList()
+        },
+    },
+};
+</script>
+
+
+<style scoped lang="scss">
+.jnpf-code-box {
+    background: #848484;
+    padding: 15px;
+    color: #fff;
+    font-size: 12px;
+    border-radius: 4px;
+}
+.title {
+    margin-bottom: 20px;
+    font-weight: bold;
+    font-size: 18px;
+    color: #000;
+}
+::v-deep .el-drawer__header {
+    margin-bottom: 10px;
+}
+.drawer-content {
+    padding: 0 20px;
+    max-height: calc(100% - 60px);
+    overflow-y: auto;
+
+    .top {
+        height: 30%;
+        margin-bottom: 20px;
+        .f1 {
+            display: flex;
+            align-items: center;
+            justify-content: space-between;
+            padding-bottom: 10px;
+            border-bottom: 1px solid #dddddd99;
+            margin-bottom: 15px;
+            .left {
+                display: flex;
+                align-items: center;
+                .name {
+                    margin-left: 10px;
+                    font-size: 15px;
+                    color: #000000;
+                }
+            }
+            .right {
+                font-size: 15px;
+                font-family: PingFang SC;
+                color: #1dcaac;
+            }
+        }
+        .content {
+            margin-bottom: 10px;
+            display: inline-block;
+            max-width: 100%;
+            .button {
+                padding: 0px 10px;
+                border-radius: 5px;
+                background-color: #e3eefd;
+                color: #1c77f2;
+                margin-right: 10px;
+                height: 30px;
+                line-height: 30px;
+                display: inline-block;
+                margin-bottom: 10px;
+            }
+            span {
+                line-height: 30px;
+                font-size: 15px;
+                color: #000;
+                max-width: 100%;
+            }
+        }
+    }
+    .likes-card {
+        .avatar-ml {
+            margin-left: 10px;
+        }
+    }
+    .pinglun-card {
+        max-height: 70%;
+        padding-bottom: 20px;
+        margin-bottom: 0;
+        img {
+            cursor: pointer;
+            margin-left: 10px;
+        }
+        .content {
+            height: 100%;
+            .comment-item {
+                display: flex;
+                margin-bottom: 20px;
+                flex-wrap: wrap;
+                .center {
+                    flex: 1;
+                    margin-left: 8px;
+                    .name {
+                        font-size: 14px;
+                        font-weight: bold;
+                        color: #000000;
+                        margin-bottom: 10px;
+                        line-height: 40px;
+                    }
+                    .text {
+                        font-size: 14px;
+                        color: #000000;
+                        margin-bottom: 10px;
+                        display: flex;
+                        align-items: center;
+                    }
+                    .time {
+                        font-size: 14px;
+                        color: #000000;
+                        opacity: 0.7;
+                    }
+                }
+                .right {
+                    flex: 0;
+                    display: flex;
+                    align-items: center;
+                    height: 30px;
+                    .like-num {
+                        margin-right: 10px;
+                        font-size: 14px;
+                        color: #000000;
+                        opacity: 0.6;
+                    }
+                }
+                .children-list {
+                    width: 100%;
+                    margin-top: 15px;
+                    padding-left: 35px;
+                    .child {
+                        display: flex;
+                        margin-bottom: 10px;
+                    }
+                    :last-child {
+                        margin-bottom: 0;
+                    }
+                }
+            }
+            :last-child {
+                margin-bottom: 0;
+            }
+        }
+    }
+}
+.drawer-footer {
+    height: 61px;
+    position: fixed;
+    bottom: 0;
+    right: 0;
+    width: 45%;
+    border-top: 1px solid #e8e8e8;
+    padding: 10px 16px;
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    background-color: #fff;
+    .left {
+        display: flex;
+        align-items: center;
+        span {
+            margin-left: 10px;
+            font-size: 14px;
+            font-weight: bold;
+            cursor: pointer;
+            user-select: none;
+        }
+    }
+    .right {
+        img {
+            width: 20px;
+            height: 20px;
+            cursor: pointer;
+        }
+    }
+}
+</style>

+ 223 - 0
src/views/governmentCloud/suggestions/index.vue

@@ -0,0 +1,223 @@
+<template>
+    <div class="JNPF-common-layout">
+        <div class="JNPF-common-layout-center">
+            <el-row class="JNPF-common-search-box" :gutter="16">
+            </el-row>
+            <div class="JNPF-common-layout-main JNPF-flex-main">
+                <div class="JNPF-common-head">
+                    <div>
+                        <!-- <el-button type="primary" icon="el-icon-upload2" @click="exportData()">导出
+                        </el-button> -->
+                    </div>
+                    <div class="JNPF-common-head-right">
+                        <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="getList()" />
+                        </el-tooltip>
+                    </div>
+                </div>
+                <JNPF-table v-loading="listLoading" :data="tableData">
+                    <el-table-column prop="createUserName" label="发起人" align="left"
+                        show-overflow-tooltip>
+                    </el-table-column>
+                    <el-table-column prop="state" label="状态" align="left" show-overflow-tooltip>
+                        <template slot-scope="scope" sortable>
+                            <span
+                                :style="{ color: scope.row.state.color }">{{ scope.row.state.label }}</span>
+
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="type_jnpfId" label="建议类型" align="left" width="300"
+                        show-overflow-tooltip>
+                        <template slot-scope="scope" sortable style="width: 100%;">
+                            <div class="button" v-for="(type, index) in scope.row.type" :key="index"
+                                :style="{ color: type.color, backgroundColor: type.color + '20' }">
+                                {{ type.label }}
+                            </div>
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="content" label="建议内容" align="left" width="300"
+                        show-overflow-tooltip>
+                        <template slot-scope="scope" sortable style="width: 300;">
+                            <div class="suggest-content">
+                                {{ scope.row.content }}
+                            </div>
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="view" label="浏览数" align="left" show-overflow-tooltip>
+                    </el-table-column>
+                    <el-table-column prop="replyCount" label="评论数" align="left"
+                        show-overflow-tooltip>
+                    </el-table-column>
+                    <el-table-column prop="likeCount" label="点赞数" align="left"
+                        show-overflow-tooltip>
+                    </el-table-column>
+                    <el-table-column prop="createDate_jnpfId" label="发起时间" align="left"
+                        show-overflow-tooltip>
+                        <template slot-scope="scope" sortable>
+                            {{ getDate(scope.row.createDate_jnpfId, 'YY-MM-DD HH:mm:ss') }}
+                        </template>
+                    </el-table-column>
+                    <el-table-column label="操作" fixed="right" width="150">
+                        <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="query.currentPage"
+                    :limit.sync="query.pageSize" @pagination="getList" />
+            </div>
+        </div>
+        <Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false" />
+    </div>
+</template>
+
+<script>
+
+import request from '@/utils/request'
+import { mapGetters } from "vuex";
+import dayjs from 'dayjs'
+import { param } from '@/utils';
+import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
+import Detail from './Detail'
+
+import {
+    getSuggestionsList
+} from "@/api/governmentCloud/suggestions/suggestions";
+
+export default {
+    components: {
+        Detail,
+    },
+    data() {
+        return {
+            query: {
+                currentPage: 1,
+                pageSize: 10,
+                dataType: "0"
+            },
+            selectProps: { "label": "fullName", "value": "enCode" },
+            total: 0,
+            listLoading: false,
+            tableData: [],
+
+
+            typeList: [],
+            statusList: [],
+            detailVisible: false
+        }
+    },
+    async created() {
+        this.getStatusList()
+        await this.getTypeList();
+        this.getList()
+    },
+    methods: {
+        goDetail(id) {
+            this.detailVisible = true
+            this.$nextTick(() => {
+                this.$refs.Detail.init(id)
+            })
+        },
+        getDate(time) {
+            let str = time ? dayjs(time).format('YYYY-MM-DD HH:mm:ss') : '无数据'
+            return str
+        },
+        getStatusList() {
+            getDictionaryDataSelector('530731285270762117').then(res => {
+                this.statusList = res.data.list
+            })
+        },
+        getTypeList() {
+            return new Promise((resolve, reject) => {
+                getDictionaryDataSelector('530731173714858629').then(res => {
+                    this.typeList = res.data.list
+                    resolve(true)
+                })
+            })
+
+        },
+        getList() {
+            this.listLoading = true;
+
+            getSuggestionsList(this.query).then(res => {
+                let newList = res.data.list
+                if (newList.length) {
+                    newList.map((item) => {
+                        let list = item.type_jnpfId.split(',');
+                        item.typeLength = list.length;
+                        item.type = [];
+                        list.map((t) => {
+                            let label = this.getType(t).label;
+                            let color = this.getType(t).color;
+                            item.type.push({
+                                label: label,
+                                value: t,
+                                color: color
+                            });
+                        });
+
+                        let stateColor = this.getStatus(item.state_jnpfId).color;
+                        let stateLabel = this.getStatus(item.state_jnpfId).label;
+                        item.state = {
+                            color: stateColor,
+                            label: stateLabel
+                        };
+                    });
+                }
+
+                this.tableData = newList
+                console.log(this.tableData)
+
+
+                this.total = res.data.pagination.total
+                this.listLoading = false
+            })
+        },
+        getType(value) {
+            let obj = {};
+            this.typeList.map((item) => {
+                if (item.enCode.split(',')[0] == value) {
+                    obj.label = item.fullName;
+                    obj.color = item.enCode.split(',')[1];
+                }
+            });
+            return obj;
+        },
+        getStatus(value) {
+            let obj = {};
+            this.statusList.map((item) => {
+                if (item.enCode.split(',')[0] == value) {
+                    obj.label = item.fullName;
+                    obj.color = item.enCode.split(',')[1];
+                }
+            });
+            return obj;
+        },
+    }
+
+}
+
+</script>
+
+<style lang="scss" scoped>
+.button {
+    padding: 0px 5px;
+    border-radius: 3px;
+    background-color: #e3eefd;
+    color: #1c77f2;
+    margin-right: 5px;
+    height: 20px;
+    line-height: 20px;
+    display: inline-block;
+}
+.suggest-content {
+    overflow: hidden; /* 确保内容不会溢出容器 */
+    display: -webkit-box; /* 作为弹性伸缩盒子模型显示 */
+    -webkit-line-clamp: 2; /* 限制在两行 */
+    -webkit-box-orient: vertical; /* 垂直排列盒子 */
+    text-overflow: ellipsis; /* 多出的文字用省略号表示 */
+    white-space: normal; /* 允许文本换行 */
+}
+</style>

+ 174 - 0
src/views/governmentCloud/workOrder/myBusiness/index.vue

@@ -0,0 +1,174 @@
+<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.title" placeholder="请输入工单标题" clearable>
+                            </el-input>
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="6">
+                        <el-form-item label="工单编号">
+                            <el-input v-model="query.bizKey" placeholder="请输入工单编号" clearable>
+                            </el-input>
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="6">
+                        <el-form-item label="事项类型">
+                            <JnpfSelect v-model="query.tab" placeholder="请选择事项类型" clearable
+                                :options="orderTabOptions" :props="selectProps">
+                            </JnpfSelect>
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="6">
+                        <el-form-item label="工单状态">
+                            <JnpfSelect v-model="query.orderStatusList" placeholder="请选择工单状态"
+                                clearable :options="ITSMorderStatusOptions" :props="selectProps"
+                                multiple>
+                            </JnpfSelect>
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="6">
+                        <el-form-item label="工单类型">
+                            <JnpfSelect v-model="query.orderTypeList" placeholder="请选择工单类型"
+                                clearable :options="ITSMOrderTypeOptions" :props="selectProps"
+                                multiple>
+                            </JnpfSelect>
+                        </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="el-icon-upload2" @click="exportData()">导出
+                        </el-button> -->
+                    </div>
+                    <div class="JNPF-common-head-right">
+                        <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="getList()" />
+                        </el-tooltip>
+                    </div>
+                </div>
+                <JNPF-table v-loading="listLoading" :data="tableData">
+                    <el-table-column prop="title" label="工单标题" align="left" show-overflow-tooltip>
+                    </el-table-column>
+                    <el-table-column prop="bizKey" label="工单编号" align="left" show-overflow-tooltip>
+                    </el-table-column>
+                    <el-table-column prop="mobile" label="来源" align="left" show-overflow-tooltip>
+                        <template slot-scope="scope" sortable>
+                            <!-- {{ scope.row.auditBy || '无数据' }} -->
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="createTime" label="发起人" align="left"
+                        show-overflow-tooltip>
+                    </el-table-column>
+                    <el-table-column prop="auditTime" label="发起时间" align="left"
+                        show-overflow-tooltip>
+                        <template slot-scope="scope" sortable>
+                            {{ getDate(scope.row.auditTime, 'YY-MM-DD HH:mm:ss') }}
+                        </template>
+                    </el-table-column>
+                    <el-table-column label="操作" fixed="right" width="150">
+                        <template slot-scope="scope">
+                            <el-button type="text" @click="goDetail(scope.row)">详情
+                            </el-button>
+                        </template>
+                    </el-table-column>
+                </JNPF-table>
+                <pagination :total="total" :page.sync="query.currentPage"
+                    :limit.sync="query.pageSize" @pagination="getList" />
+            </div>
+        </div>
+    </div>
+</template>
+
+<script>
+import request from '@/utils/request'
+import { mapGetters } from "vuex";
+import dayjs from 'dayjs'
+import {
+    getITSMOrderList
+} from "@/api/governmentCloud/workOrder/workOrder";
+import { param } from '@/utils';
+import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
+
+export default {
+    data() {
+        return {
+            query: {
+                title: '',
+                bizKey: '',
+                orderStatusList: undefined,
+                orderTypeList: undefined,
+                tab: undefined,
+                currentPage: 1,
+                pageSize: 10,
+            },
+            selectProps: { "label": "fullName", "value": "enCode" },
+            orderTabOptions: [],
+            orderStatusOptions: [],
+            ITSMorderStatusOptions: [],
+            ITSMOrderTypeOptions: [],
+            total: 0,
+            listLoading: false,
+            tableData: []
+        }
+    },
+    async created() {
+        this.getITSMOrderType();
+        this.getTabs()
+        this.getOrderStatusList()
+        this.getITSMOrderStatusList()
+
+
+
+    },
+    methods: {
+        search() {
+            this.getList()
+        },
+        getList() {
+            this.listLoading = true
+            getITSMOrderList(this.query).then(res => {
+                console.log(res);
+                this.listLoading = false
+            })
+        },
+        getITSMOrderType() {
+            getDictionaryDataSelector('540193916075377477').then(res => {
+                this.ITSMOrderTypeOptions = res.data.list
+            })
+        },
+        getTabs() {
+            getDictionaryDataSelector('553108487895254789').then(res => {
+                this.orderTabOptions = res.data.list
+            })
+        },
+        getOrderStatusList() {
+            getDictionaryDataSelector('530743805301756613').then(res => {
+                this.orderStatusOptions = res.data.list
+            })
+        },
+        getITSMOrderStatusList() {
+            getDictionaryDataSelector('540193181464003397').then(res => {
+                this.ITSMorderStatusOptions = res.data.list
+            })
+        }
+    },
+
+}
+</script>
+
+<style lang="scss" scoped>
+</style>