Compare commits
13 Commits
v1.0.0
...
bc6f4a50ea
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bc6f4a50ea | ||
|
|
5dfd87e1d1 | ||
|
|
4193ac4717 | ||
|
|
fd777e6774 | ||
|
|
4920b41620 | ||
|
|
15a59707c6 | ||
|
|
e53dc6fbda | ||
|
|
3a21059ab4 | ||
|
|
6276978cc1 | ||
|
|
a1a2384994 | ||
|
|
12caaecf88 | ||
|
|
7c099c852b | ||
| 9afb6bb1cc |
@@ -7,14 +7,14 @@ ENV = 'development'
|
|||||||
VUE_APP_CONTEXT_PATH = '/tool-tech'
|
VUE_APP_CONTEXT_PATH = '/tool-tech'
|
||||||
|
|
||||||
# 工具与技术交流管理系统/开发环境
|
# 工具与技术交流管理系统/开发环境
|
||||||
VUE_APP_BASE_API = 'http://192.168.2.85:8080/tool-tech-admin'
|
VUE_APP_BASE_API = 'http://localhost:8080/tool-tech-admin'
|
||||||
VUE_APP_WS_URL = 'ws://192.168.2.85:8080/tool-tech-admin/websocket'
|
VUE_APP_WS_URL = 'ws://localhost:8080/tool-tech-admin/websocket'
|
||||||
|
|
||||||
# 文档在线预览服务
|
# 文档在线预览服务
|
||||||
VUE_APP_TOOL_TECH_FILE_VIEW_API = 'http://192.168.1.2:8012/tool-tech-file-view'
|
VUE_APP_TOOL_TECH_FILE_VIEW_API = 'http://localhost:8012/tool-tech-file-view'
|
||||||
|
|
||||||
# 流程管理服务地址
|
# 流程管理服务地址
|
||||||
VUE_APP_WORKFLOW_MANAGE_URL = 'http://192.168.1.2:8080/ebpm-process-manage'
|
VUE_APP_WORKFLOW_MANAGE_URL = 'http://192.168.2.18:8085/ebpm-process-manage'
|
||||||
|
|
||||||
# 路由懒加载
|
# 路由懒加载
|
||||||
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ VUE_APP_BASE_API = 'https://www.rzdata.net/tool-tech-admin'
|
|||||||
VUE_APP_WS_URL = 'wss://www.rzdata.net/tool-tech-admin/websocket'
|
VUE_APP_WS_URL = 'wss://www.rzdata.net/tool-tech-admin/websocket'
|
||||||
|
|
||||||
# 文档在线预览服务
|
# 文档在线预览服务
|
||||||
VUE_APP_TOOL_TECH_FILE_VIEW_API = '/tool-tech-file-view'
|
VUE_APP_TOOL_TECH_FILE_VIEW_API = 'http://192.168.1.2:8012/tool-tech-file-view'
|
||||||
|
|
||||||
# 流程管理服务地址
|
# 流程管理服务地址
|
||||||
VUE_APP_WORKFLOW_MANAGE_URL = '/ebpm-process-manage'
|
VUE_APP_WORKFLOW_MANAGE_URL = 'http://192.168.1.2:8080/ebpm-process-manage'
|
||||||
|
|||||||
286
.idea/workspace.xml
generated
286
.idea/workspace.xml
generated
@@ -2,9 +2,16 @@
|
|||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="880b2c9e-bb63-49b5-a9b3-35bf50aa9da8" name="Default Changelist" comment="">
|
<list default="true" id="880b2c9e-bb63-49b5-a9b3-35bf50aa9da8" name="Default Changelist" comment="">
|
||||||
<change beforePath="$PROJECT_DIR$/.env.staging" beforeDir="false" afterPath="$PROJECT_DIR$/.env.staging" afterDir="false" />
|
<change afterPath="$PROJECT_DIR$/src/views/document/editDocument.vue" afterDir="false" />
|
||||||
|
<change afterPath="$PROJECT_DIR$/src/views/document/uploadProgress.vue" afterDir="false" />
|
||||||
|
<change afterPath="$PROJECT_DIR$/src/views/tool/toolDetail.vue" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/.env.development" beforeDir="false" afterPath="$PROJECT_DIR$/.env.development" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/default.conf" beforeDir="false" afterPath="$PROJECT_DIR$/default.conf" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/views/document/index.vue" beforeDir="false" afterPath="$PROJECT_DIR$/src/views/document/index.vue" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/views/tool/index.vue" beforeDir="false" afterPath="$PROJECT_DIR$/src/views/tool/index.vue" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/views/workstuff/apply/index.vue" beforeDir="false" afterPath="$PROJECT_DIR$/src/views/workstuff/apply/index.vue" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/views/workstuff/dispose/index.vue" beforeDir="false" afterPath="$PROJECT_DIR$/src/views/workstuff/dispose/index.vue" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/views/workstuff/message/index.vue" beforeDir="false" afterPath="$PROJECT_DIR$/src/views/workstuff/message/index.vue" afterDir="false" />
|
||||||
</list>
|
</list>
|
||||||
<ignored path="$PROJECT_DIR$/.tmp/" />
|
<ignored path="$PROJECT_DIR$/.tmp/" />
|
||||||
<ignored path="$PROJECT_DIR$/temp/" />
|
<ignored path="$PROJECT_DIR$/temp/" />
|
||||||
@@ -17,10 +24,56 @@
|
|||||||
</component>
|
</component>
|
||||||
<component name="FileEditorManager">
|
<component name="FileEditorManager">
|
||||||
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
|
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
|
||||||
|
<file pinned="false" current-in-tab="false">
|
||||||
|
<entry file="file://$PROJECT_DIR$/src/views/document/index.vue">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="228">
|
||||||
|
<caret line="69" column="40" selection-start-line="69" selection-start-column="22" selection-end-line="69" selection-end-column="40" />
|
||||||
|
<folding>
|
||||||
|
<element signature="n#pagination#0;n#div#1;n#el-card#1;n#div#0;n#template#0;n#!!top" />
|
||||||
|
</folding>
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
</file>
|
||||||
|
<file pinned="false" current-in-tab="false">
|
||||||
|
<entry file="file://$PROJECT_DIR$/src/views/workstuff/apply/index.vue">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="190">
|
||||||
|
<caret line="34" column="38" selection-start-line="34" selection-start-column="26" selection-end-line="34" selection-end-column="38" />
|
||||||
|
<folding>
|
||||||
|
<element signature="n#style#0;n#el-table#0;n#el-card#1;n#div#0;n#template#0;n#!!top" expanded="true" />
|
||||||
|
<element signature="n#style#0;n#img#0;n#el-drawer#1;n#div#0;n#template#0;n#!!top" expanded="true" />
|
||||||
|
</folding>
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
</file>
|
||||||
|
<file pinned="false" current-in-tab="false">
|
||||||
|
<entry file="file://$PROJECT_DIR$/src/main.js">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="114">
|
||||||
|
<caret line="6" column="18" selection-start-line="6" selection-start-column="12" selection-end-line="6" selection-end-column="18" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
</file>
|
||||||
|
<file pinned="false" current-in-tab="false">
|
||||||
|
<entry file="file://$PROJECT_DIR$/src/views/workstuff/dispose/index.vue">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="118">
|
||||||
|
<caret line="321" column="10" lean-forward="true" selection-start-line="298" selection-start-column="8" selection-end-line="321" selection-end-column="10" />
|
||||||
|
<folding>
|
||||||
|
<element signature="n#style#0;n#img#0;n#el-drawer#1;n#div#0;n#template#0;n#!!top" expanded="true" />
|
||||||
|
</folding>
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
</file>
|
||||||
<file pinned="false" current-in-tab="false">
|
<file pinned="false" current-in-tab="false">
|
||||||
<entry file="file://$PROJECT_DIR$/src/views/workstuff/message/index.vue">
|
<entry file="file://$PROJECT_DIR$/src/views/workstuff/message/index.vue">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="722">
|
<state relative-caret-position="151">
|
||||||
<caret line="38" column="4" selection-start-line="38" selection-start-column="4" selection-end-line="45" selection-end-column="40" />
|
<caret line="38" column="4" selection-start-line="38" selection-start-column="4" selection-end-line="45" selection-end-column="40" />
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
@@ -29,7 +82,7 @@
|
|||||||
<file pinned="false" current-in-tab="false">
|
<file pinned="false" current-in-tab="false">
|
||||||
<entry file="file://$PROJECT_DIR$/src/views/tool/index.vue">
|
<entry file="file://$PROJECT_DIR$/src/views/tool/index.vue">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="2356">
|
<state relative-caret-position="192">
|
||||||
<caret line="177" column="132" selection-start-line="177" selection-start-column="96" selection-end-line="177" selection-end-column="132" />
|
<caret line="177" column="132" selection-start-line="177" selection-start-column="96" selection-end-line="177" selection-end-column="132" />
|
||||||
<folding>
|
<folding>
|
||||||
<element signature="n#el-form#0;n#el-card#0;n#div#0;n#template#0;n#!!top" />
|
<element signature="n#el-form#0;n#el-card#0;n#div#0;n#template#0;n#!!top" />
|
||||||
@@ -38,6 +91,7 @@
|
|||||||
<element signature="n#style#0;n#el-input#0;n#div#0;n#el-card#1;n#div#0;n#template#0;n#!!top" expanded="true" />
|
<element signature="n#style#0;n#el-input#0;n#div#0;n#el-card#1;n#div#0;n#template#0;n#!!top" expanded="true" />
|
||||||
<element signature="n#style#0;n#el-select#0;n#el-form-item#0;n#el-col#0;n#el-row#3;n#el-form#0;n#div#0;n#el-drawer#0;n#div#0;n#template#0;n#!!top" expanded="true" />
|
<element signature="n#style#0;n#el-select#0;n#el-form-item#0;n#el-col#0;n#el-row#3;n#el-form#0;n#div#0;n#el-drawer#0;n#div#0;n#template#0;n#!!top" expanded="true" />
|
||||||
<element signature="n#el-drawer#2;n#div#0;n#template#0;n#!!top" />
|
<element signature="n#el-drawer#2;n#div#0;n#template#0;n#!!top" />
|
||||||
|
<element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
|
||||||
</folding>
|
</folding>
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
@@ -55,60 +109,26 @@
|
|||||||
<file pinned="false" current-in-tab="false">
|
<file pinned="false" current-in-tab="false">
|
||||||
<entry file="file://$PROJECT_DIR$/src/plugins/modal.js">
|
<entry file="file://$PROJECT_DIR$/src/plugins/modal.js">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="266">
|
<state relative-caret-position="241">
|
||||||
<caret line="14" column="2" selection-start-line="14" selection-start-column="2" selection-end-line="14" selection-end-column="2" />
|
<caret line="14" column="2" selection-start-line="14" selection-start-column="2" selection-end-line="14" selection-end-column="2" />
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
</file>
|
</file>
|
||||||
<file pinned="false" current-in-tab="false">
|
<file pinned="false" current-in-tab="true">
|
||||||
<entry file="file://$PROJECT_DIR$/src/views/document/editDocument.vue">
|
<entry file="file://$PROJECT_DIR$/src/views/document/editDocument.vue">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="2603">
|
<state relative-caret-position="232">
|
||||||
<caret line="139" column="12" lean-forward="true" selection-start-line="139" selection-start-column="12" selection-end-line="139" selection-end-column="12" />
|
<caret line="149" column="30" lean-forward="true" selection-start-line="149" selection-start-column="30" selection-end-line="149" selection-end-column="30" />
|
||||||
<folding>
|
<folding>
|
||||||
<element signature="n#style#0;n#el-table#0;n#div#0;n#el-dialog#0;n#div#0;n#template#0;n#!!top" expanded="true" />
|
<element signature="n#style#0;n#el-table#0;n#div#0;n#el-dialog#0;n#div#0;n#template#0;n#!!top" expanded="true" />
|
||||||
|
<element signature="e#3190#3196#1" expanded="true" />
|
||||||
|
<element signature="e#2350#2420#0" expanded="true" />
|
||||||
</folding>
|
</folding>
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
</file>
|
</file>
|
||||||
<file pinned="false" current-in-tab="true">
|
|
||||||
<entry file="file://$PROJECT_DIR$/.env.staging">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="342">
|
|
||||||
<caret line="18" column="31" selection-start-line="18" selection-start-column="31" selection-end-line="18" selection-end-column="31" />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
</file>
|
|
||||||
<file pinned="false" current-in-tab="false">
|
|
||||||
<entry file="file://$PROJECT_DIR$/default.conf">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="475">
|
|
||||||
<caret line="25" column="36" lean-forward="true" selection-start-line="25" selection-start-column="36" selection-end-line="25" selection-end-column="36" />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
</file>
|
|
||||||
<file pinned="false" current-in-tab="false">
|
|
||||||
<entry file="file://$PROJECT_DIR$/.env.development">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="228">
|
|
||||||
<caret line="12" selection-start-line="12" selection-end-line="16" selection-end-column="75" />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
</file>
|
|
||||||
<file pinned="false" current-in-tab="false">
|
|
||||||
<entry file="file://$PROJECT_DIR$/.env.production">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="19">
|
|
||||||
<caret line="1" column="27" selection-start-line="1" selection-start-column="27" selection-end-line="1" selection-end-column="27" />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
</file>
|
|
||||||
<file pinned="false" current-in-tab="false">
|
<file pinned="false" current-in-tab="false">
|
||||||
<entry file="file://$PROJECT_DIR$/src/views/workflow/config/index.vue">
|
<entry file="file://$PROJECT_DIR$/src/views/workflow/config/index.vue">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
@@ -191,6 +211,7 @@
|
|||||||
<option value="$PROJECT_DIR$/src/components/userSelector/userSelect.vue" />
|
<option value="$PROJECT_DIR$/src/components/userSelector/userSelect.vue" />
|
||||||
<option value="$PROJECT_DIR$/src/components/user-selector/src/user-selector.vue" />
|
<option value="$PROJECT_DIR$/src/components/user-selector/src/user-selector.vue" />
|
||||||
<option value="$PROJECT_DIR$/vue.config.js" />
|
<option value="$PROJECT_DIR$/vue.config.js" />
|
||||||
|
<option value="$PROJECT_DIR$/default.conf" />
|
||||||
<option value="$PROJECT_DIR$/Dockerfile" />
|
<option value="$PROJECT_DIR$/Dockerfile" />
|
||||||
<option value="$PROJECT_DIR$/public/css/index.css" />
|
<option value="$PROJECT_DIR$/public/css/index.css" />
|
||||||
<option value="$PROJECT_DIR$/src/main.js" />
|
<option value="$PROJECT_DIR$/src/main.js" />
|
||||||
@@ -201,6 +222,7 @@
|
|||||||
<option value="$PROJECT_DIR$/src/store/modules/user.js" />
|
<option value="$PROJECT_DIR$/src/store/modules/user.js" />
|
||||||
<option value="$PROJECT_DIR$/public/css/tool.css" />
|
<option value="$PROJECT_DIR$/public/css/tool.css" />
|
||||||
<option value="$PROJECT_DIR$/.env.production" />
|
<option value="$PROJECT_DIR$/.env.production" />
|
||||||
|
<option value="$PROJECT_DIR$/.env.staging" />
|
||||||
<option value="$PROJECT_DIR$/src/layout/components/Navbar.vue" />
|
<option value="$PROJECT_DIR$/src/layout/components/Navbar.vue" />
|
||||||
<option value="$PROJECT_DIR$/src/components/Breadcrumb/index.vue" />
|
<option value="$PROJECT_DIR$/src/components/Breadcrumb/index.vue" />
|
||||||
<option value="$PROJECT_DIR$/src/router/index.js" />
|
<option value="$PROJECT_DIR$/src/router/index.js" />
|
||||||
@@ -221,6 +243,7 @@
|
|||||||
<option value="$PROJECT_DIR$/src/views/system/role/authUser.vue" />
|
<option value="$PROJECT_DIR$/src/views/system/role/authUser.vue" />
|
||||||
<option value="$PROJECT_DIR$/src/views/document/addDocument.vue" />
|
<option value="$PROJECT_DIR$/src/views/document/addDocument.vue" />
|
||||||
<option value="$PROJECT_DIR$/src/views/tool/toolDetail.vue" />
|
<option value="$PROJECT_DIR$/src/views/tool/toolDetail.vue" />
|
||||||
|
<option value="$PROJECT_DIR$/.env.development" />
|
||||||
<option value="$PROJECT_DIR$/src/views/document/uploadProgress.vue" />
|
<option value="$PROJECT_DIR$/src/views/document/uploadProgress.vue" />
|
||||||
<option value="$PROJECT_DIR$/src/views/document/index.vue" />
|
<option value="$PROJECT_DIR$/src/views/document/index.vue" />
|
||||||
<option value="$PROJECT_DIR$/src/views/tool/index.vue" />
|
<option value="$PROJECT_DIR$/src/views/tool/index.vue" />
|
||||||
@@ -228,9 +251,6 @@
|
|||||||
<option value="$PROJECT_DIR$/src/views/workstuff/dispose/index.vue" />
|
<option value="$PROJECT_DIR$/src/views/workstuff/dispose/index.vue" />
|
||||||
<option value="$PROJECT_DIR$/src/views/workstuff/message/index.vue" />
|
<option value="$PROJECT_DIR$/src/views/workstuff/message/index.vue" />
|
||||||
<option value="$PROJECT_DIR$/src/views/document/editDocument.vue" />
|
<option value="$PROJECT_DIR$/src/views/document/editDocument.vue" />
|
||||||
<option value="$PROJECT_DIR$/.env.development" />
|
|
||||||
<option value="$PROJECT_DIR$/default.conf" />
|
|
||||||
<option value="$PROJECT_DIR$/.env.staging" />
|
|
||||||
</list>
|
</list>
|
||||||
</option>
|
</option>
|
||||||
</component>
|
</component>
|
||||||
@@ -245,6 +265,7 @@
|
|||||||
<foldersAlwaysOnTop value="true" />
|
<foldersAlwaysOnTop value="true" />
|
||||||
</navigator>
|
</navigator>
|
||||||
<panes>
|
<panes>
|
||||||
|
<pane id="Scope" />
|
||||||
<pane id="ProjectPane">
|
<pane id="ProjectPane">
|
||||||
<subPane>
|
<subPane>
|
||||||
<expand>
|
<expand>
|
||||||
@@ -338,7 +359,6 @@
|
|||||||
<select />
|
<select />
|
||||||
</subPane>
|
</subPane>
|
||||||
</pane>
|
</pane>
|
||||||
<pane id="Scope" />
|
|
||||||
</panes>
|
</panes>
|
||||||
</component>
|
</component>
|
||||||
<component name="PropertiesComponent">
|
<component name="PropertiesComponent">
|
||||||
@@ -417,8 +437,6 @@
|
|||||||
<workItem from="1721611088644" duration="28182000" />
|
<workItem from="1721611088644" duration="28182000" />
|
||||||
<workItem from="1721717492928" duration="8889000" />
|
<workItem from="1721717492928" duration="8889000" />
|
||||||
<workItem from="1721783250517" duration="9602000" />
|
<workItem from="1721783250517" duration="9602000" />
|
||||||
<workItem from="1721886425310" duration="2104000" />
|
|
||||||
<workItem from="1721896582395" duration="232000" />
|
|
||||||
</task>
|
</task>
|
||||||
<task id="LOCAL-00001" summary="update">
|
<task id="LOCAL-00001" summary="update">
|
||||||
<created>1721110878122</created>
|
<created>1721110878122</created>
|
||||||
@@ -455,25 +473,11 @@
|
|||||||
<option name="project" value="LOCAL" />
|
<option name="project" value="LOCAL" />
|
||||||
<updated>1721632270841</updated>
|
<updated>1721632270841</updated>
|
||||||
</task>
|
</task>
|
||||||
<task id="LOCAL-00006" summary="update">
|
<option name="localTasksCounter" value="6" />
|
||||||
<created>1721886526500</created>
|
|
||||||
<option name="number" value="00006" />
|
|
||||||
<option name="presentableId" value="LOCAL-00006" />
|
|
||||||
<option name="project" value="LOCAL" />
|
|
||||||
<updated>1721886526500</updated>
|
|
||||||
</task>
|
|
||||||
<task id="LOCAL-00007" summary="update">
|
|
||||||
<created>1721888702083</created>
|
|
||||||
<option name="number" value="00007" />
|
|
||||||
<option name="presentableId" value="LOCAL-00007" />
|
|
||||||
<option name="project" value="LOCAL" />
|
|
||||||
<updated>1721888702083</updated>
|
|
||||||
</task>
|
|
||||||
<option name="localTasksCounter" value="8" />
|
|
||||||
<servers />
|
<servers />
|
||||||
</component>
|
</component>
|
||||||
<component name="TimeTrackingManager">
|
<component name="TimeTrackingManager">
|
||||||
<option name="totallyTimeSpent" value="107954000" />
|
<option name="totallyTimeSpent" value="105618000" />
|
||||||
</component>
|
</component>
|
||||||
<component name="TodoView">
|
<component name="TodoView">
|
||||||
<todo-panel id="selected-file">
|
<todo-panel id="selected-file">
|
||||||
@@ -517,6 +521,16 @@
|
|||||||
<option name="LAST_COMMIT_MESSAGE" value="update" />
|
<option name="LAST_COMMIT_MESSAGE" value="update" />
|
||||||
</component>
|
</component>
|
||||||
<component name="editorHistoryManager">
|
<component name="editorHistoryManager">
|
||||||
|
<entry file="file://D:/日常工作文件库/泛联睿展联合项目/工具管理及技术交流平台/昆明军工/原型静态页面/工具管理及技术交流平台/工具管理.html">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="228">
|
||||||
|
<caret line="369" column="30" lean-forward="true" selection-start-line="12" selection-start-column="4" selection-end-line="369" selection-end-column="30" />
|
||||||
|
<folding>
|
||||||
|
<element signature="n#div#0;n#div#0;n#body#0;n#html#0;n#!!top" />
|
||||||
|
</folding>
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
<entry file="file://$PROJECT_DIR$/src/views/tool/index2.vue" />
|
<entry file="file://$PROJECT_DIR$/src/views/tool/index2.vue" />
|
||||||
<entry file="file://D:/日常工作文件库/泛联睿展联合项目/工具管理及技术交流平台/昆明军工/原型静态页面/工具管理及技术交流平台/我的申请.html">
|
<entry file="file://D:/日常工作文件库/泛联睿展联合项目/工具管理及技术交流平台/昆明军工/原型静态页面/工具管理及技术交流平台/我的申请.html">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
@@ -607,6 +621,20 @@
|
|||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/.env.production">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="19">
|
||||||
|
<caret line="1" column="27" selection-start-line="1" selection-start-column="27" selection-end-line="1" selection-end-column="27" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/.env.staging">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="19">
|
||||||
|
<caret line="1" column="27" selection-start-line="1" selection-start-column="27" selection-end-line="1" selection-end-column="27" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
<entry file="file://$PROJECT_DIR$/src/layout/components/Navbar.vue">
|
<entry file="file://$PROJECT_DIR$/src/layout/components/Navbar.vue">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="266">
|
<state relative-caret-position="266">
|
||||||
@@ -850,24 +878,24 @@
|
|||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
<entry file="file://$PROJECT_DIR$/src/views/document/index.vue">
|
<entry file="file://$PROJECT_DIR$/.env.development">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="1311">
|
<state relative-caret-position="190">
|
||||||
<caret line="69" column="40" selection-start-line="69" selection-start-column="22" selection-end-line="69" selection-end-column="40" />
|
<caret line="10" column="35" selection-start-line="10" selection-start-column="35" selection-end-line="10" selection-end-column="35" />
|
||||||
<folding>
|
|
||||||
<element signature="n#pagination#0;n#div#1;n#el-card#1;n#div#0;n#template#0;n#!!top" />
|
|
||||||
</folding>
|
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
<entry file="file://$PROJECT_DIR$/src/views/workstuff/apply/index.vue">
|
<entry file="file://$PROJECT_DIR$/src/views/workflow/config/index.vue">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="646">
|
<state relative-caret-position="247">
|
||||||
<caret line="34" column="38" selection-start-line="34" selection-start-column="26" selection-end-line="34" selection-end-column="38" />
|
<caret line="13" column="103" selection-start-line="13" selection-start-column="72" selection-end-line="13" selection-end-column="103" />
|
||||||
<folding>
|
</state>
|
||||||
<element signature="n#style#0;n#el-table#0;n#el-card#1;n#div#0;n#template#0;n#!!top" expanded="true" />
|
</provider>
|
||||||
<element signature="n#style#0;n#img#0;n#el-drawer#1;n#div#0;n#template#0;n#!!top" expanded="true" />
|
</entry>
|
||||||
</folding>
|
<entry file="file://$PROJECT_DIR$/src/plugins/modal.js">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="241">
|
||||||
|
<caret line="14" column="2" selection-start-line="14" selection-start-column="2" selection-end-line="14" selection-end-column="2" />
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
@@ -878,34 +906,30 @@
|
|||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
<entry file="file://$PROJECT_DIR$/src/views/workstuff/dispose/index.vue">
|
<entry file="file://$PROJECT_DIR$/src/views/workstuff/message/index.vue">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="6099">
|
<state relative-caret-position="151">
|
||||||
<caret line="321" column="10" selection-start-line="298" selection-start-column="8" selection-end-line="321" selection-end-column="10" />
|
<caret line="38" column="4" selection-start-line="38" selection-start-column="4" selection-end-line="45" selection-end-column="40" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/src/views/workstuff/apply/index.vue">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="190">
|
||||||
|
<caret line="34" column="38" selection-start-line="34" selection-start-column="26" selection-end-line="34" selection-end-column="38" />
|
||||||
<folding>
|
<folding>
|
||||||
|
<element signature="n#style#0;n#el-table#0;n#el-card#1;n#div#0;n#template#0;n#!!top" expanded="true" />
|
||||||
<element signature="n#style#0;n#img#0;n#el-drawer#1;n#div#0;n#template#0;n#!!top" expanded="true" />
|
<element signature="n#style#0;n#img#0;n#el-drawer#1;n#div#0;n#template#0;n#!!top" expanded="true" />
|
||||||
</folding>
|
</folding>
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
<entry file="file://$PROJECT_DIR$/src/views/workstuff/message/index.vue">
|
<entry file="file://$PROJECT_DIR$/src/views/workstuff/dispose/index.vue">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="722">
|
<state relative-caret-position="118">
|
||||||
<caret line="38" column="4" selection-start-line="38" selection-start-column="4" selection-end-line="45" selection-end-column="40" />
|
<caret line="321" column="10" lean-forward="true" selection-start-line="298" selection-start-column="8" selection-end-line="321" selection-end-column="10" />
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/src/views/tool/index.vue">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="2356">
|
|
||||||
<caret line="177" column="132" selection-start-line="177" selection-start-column="96" selection-end-line="177" selection-end-column="132" />
|
|
||||||
<folding>
|
<folding>
|
||||||
<element signature="n#el-form#0;n#el-card#0;n#div#0;n#template#0;n#!!top" />
|
<element signature="n#style#0;n#img#0;n#el-drawer#1;n#div#0;n#template#0;n#!!top" expanded="true" />
|
||||||
<element signature="n#style#0;n#el-select#0;n#el-form-item#2;n#div#0;n#div#0;n#div#0;n#el-form#0;n#el-card#0;n#div#0;n#template#0;n#!!top" expanded="true" />
|
|
||||||
<element signature="n#style#0;n#el-date-picker#0;n#el-form-item#3;n#div#0;n#div#0;n#div#0;n#el-form#0;n#el-card#0;n#div#0;n#template#0;n#!!top" expanded="true" />
|
|
||||||
<element signature="n#style#0;n#el-input#0;n#div#0;n#el-card#1;n#div#0;n#template#0;n#!!top" expanded="true" />
|
|
||||||
<element signature="n#style#0;n#el-select#0;n#el-form-item#0;n#el-col#0;n#el-row#3;n#el-form#0;n#div#0;n#el-drawer#0;n#div#0;n#template#0;n#!!top" expanded="true" />
|
|
||||||
<element signature="n#el-drawer#2;n#div#0;n#template#0;n#!!top" />
|
|
||||||
</folding>
|
</folding>
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
@@ -917,57 +941,43 @@
|
|||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
<entry file="file://$PROJECT_DIR$/src/plugins/modal.js">
|
<entry file="file://$PROJECT_DIR$/src/views/tool/index.vue">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="266">
|
<state relative-caret-position="192">
|
||||||
<caret line="14" column="2" selection-start-line="14" selection-start-column="2" selection-end-line="14" selection-end-column="2" />
|
<caret line="177" column="132" selection-start-line="177" selection-start-column="96" selection-end-line="177" selection-end-column="132" />
|
||||||
|
<folding>
|
||||||
|
<element signature="n#el-form#0;n#el-card#0;n#div#0;n#template#0;n#!!top" />
|
||||||
|
<element signature="n#style#0;n#el-select#0;n#el-form-item#2;n#div#0;n#div#0;n#div#0;n#el-form#0;n#el-card#0;n#div#0;n#template#0;n#!!top" expanded="true" />
|
||||||
|
<element signature="n#style#0;n#el-date-picker#0;n#el-form-item#3;n#div#0;n#div#0;n#div#0;n#el-form#0;n#el-card#0;n#div#0;n#template#0;n#!!top" expanded="true" />
|
||||||
|
<element signature="n#style#0;n#el-input#0;n#div#0;n#el-card#1;n#div#0;n#template#0;n#!!top" expanded="true" />
|
||||||
|
<element signature="n#style#0;n#el-select#0;n#el-form-item#0;n#el-col#0;n#el-row#3;n#el-form#0;n#div#0;n#el-drawer#0;n#div#0;n#template#0;n#!!top" expanded="true" />
|
||||||
|
<element signature="n#el-drawer#2;n#div#0;n#template#0;n#!!top" />
|
||||||
|
<element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
|
||||||
|
</folding>
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/src/views/document/index.vue">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="228">
|
||||||
|
<caret line="69" column="40" selection-start-line="69" selection-start-column="22" selection-end-line="69" selection-end-column="40" />
|
||||||
|
<folding>
|
||||||
|
<element signature="n#pagination#0;n#div#1;n#el-card#1;n#div#0;n#template#0;n#!!top" />
|
||||||
|
</folding>
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
<entry file="file://$PROJECT_DIR$/src/views/document/editDocument.vue">
|
<entry file="file://$PROJECT_DIR$/src/views/document/editDocument.vue">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="2603">
|
<state relative-caret-position="232">
|
||||||
<caret line="139" column="12" lean-forward="true" selection-start-line="139" selection-start-column="12" selection-end-line="139" selection-end-column="12" />
|
<caret line="149" column="30" lean-forward="true" selection-start-line="149" selection-start-column="30" selection-end-line="149" selection-end-column="30" />
|
||||||
<folding>
|
<folding>
|
||||||
<element signature="n#style#0;n#el-table#0;n#div#0;n#el-dialog#0;n#div#0;n#template#0;n#!!top" expanded="true" />
|
<element signature="n#style#0;n#el-table#0;n#div#0;n#el-dialog#0;n#div#0;n#template#0;n#!!top" expanded="true" />
|
||||||
|
<element signature="e#3190#3196#1" expanded="true" />
|
||||||
|
<element signature="e#2350#2420#0" expanded="true" />
|
||||||
</folding>
|
</folding>
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
<entry file="file://$PROJECT_DIR$/.env.development">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="228">
|
|
||||||
<caret line="12" selection-start-line="12" selection-end-line="16" selection-end-column="75" />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/.env.production">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="19">
|
|
||||||
<caret line="1" column="27" selection-start-line="1" selection-start-column="27" selection-end-line="1" selection-end-column="27" />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/src/views/workflow/config/index.vue">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="247">
|
|
||||||
<caret line="13" column="103" selection-start-line="13" selection-start-column="72" selection-end-line="13" selection-end-column="103" />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/default.conf">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="475">
|
|
||||||
<caret line="25" column="36" lean-forward="true" selection-start-line="25" selection-start-column="36" selection-end-line="25" selection-end-column="36" />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/.env.staging">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="342">
|
|
||||||
<caret line="18" column="31" selection-start-line="18" selection-start-column="31" selection-end-line="18" selection-end-column="31" />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
||||||
16
default.conf
16
default.conf
@@ -15,22 +15,6 @@ server {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
location /ebpm-process-manage/ {
|
|
||||||
proxy_pass http://192.168.1.2:8080/ebpm-process-manage/;
|
|
||||||
proxy_set_header Host $host;
|
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
|
||||||
}
|
|
||||||
|
|
||||||
location /tool-tech-file-view/ {
|
|
||||||
proxy_pass http://192.168.1.2:8012/tool-tech-file-view/;
|
|
||||||
proxy_set_header Host $host;
|
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
|
||||||
}
|
|
||||||
|
|
||||||
error_page 500 502 503 504 /50x.html;
|
error_page 500 502 503 504 /50x.html;
|
||||||
location = /50x.html {
|
location = /50x.html {
|
||||||
root /usr/share/nginx/html;
|
root /usr/share/nginx/html;
|
||||||
|
|||||||
@@ -876,7 +876,6 @@ body .el-form-border .el-form-item .el-cascader ,
|
|||||||
body .el-form-border .el-form-item .el-select,
|
body .el-form-border .el-form-item .el-select,
|
||||||
body .el-form-border .el-form-item .el-date-editor{
|
body .el-form-border .el-form-item .el-date-editor{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 340px;
|
|
||||||
}
|
}
|
||||||
body .el-form-border .el-form-item .el-checkbox-group .el-checkbox{
|
body .el-form-border .el-form-item .el-checkbox-group .el-checkbox{
|
||||||
min-width: 200px;
|
min-width: 200px;
|
||||||
@@ -2496,6 +2495,11 @@ body .login-page .loright .locont .el-form--label-top .el-form-item .el-form-ite
|
|||||||
padding: 16px 32px;
|
padding: 16px 32px;
|
||||||
width: 420px;
|
width: 420px;
|
||||||
}
|
}
|
||||||
|
body .el-drawer .el-drawer__body .fbox1 .fl,
|
||||||
|
body .el-drawer .el-drawer__body .fbox1 .fr{
|
||||||
|
height: calc(100vh - 57px);
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
/*pltextarea 评论框*/
|
/*pltextarea 评论框*/
|
||||||
body .pltextarea{
|
body .pltextarea{
|
||||||
|
|||||||
@@ -42,3 +42,13 @@ export function delDocument(id) {
|
|||||||
method: 'delete'
|
method: 'delete'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 发布文档
|
||||||
|
export function pushDoc(id) {
|
||||||
|
return request({
|
||||||
|
url: '/document/pushDoc/' + id,
|
||||||
|
method: 'put'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
55
src/api/documentCategory/documentCategory.js
Normal file
55
src/api/documentCategory/documentCategory.js
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询文档资源分类管理列表
|
||||||
|
export function listCategory(query) {
|
||||||
|
return request({
|
||||||
|
url: '/system/category/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询文档资源分类管理详细
|
||||||
|
export function getCategory(id) {
|
||||||
|
return request({
|
||||||
|
url: '/system/category/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增文档资源分类管理
|
||||||
|
export function addCategory(data) {
|
||||||
|
return request({
|
||||||
|
url: '/system/category',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改文档资源分类管理
|
||||||
|
export function updateCategory(data) {
|
||||||
|
return request({
|
||||||
|
url: '/system/category',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除文档资源分类管理
|
||||||
|
export function delCategory(id) {
|
||||||
|
return request({
|
||||||
|
url: '/system/category/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 获取文档分类树列表
|
||||||
|
export function documentTree(query) {
|
||||||
|
return request({
|
||||||
|
url: '/system/category/documentTree',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
188
src/api/my_business/workflow.js
Normal file
188
src/api/my_business/workflow.js
Normal file
@@ -0,0 +1,188 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
|
||||||
|
// 审批记录
|
||||||
|
export function workflowGetLog(data) {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/getLog',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//流程实例撤回到拟稿人环节
|
||||||
|
export function workflowbacktostart(data) {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/backtostart',
|
||||||
|
method: 'post',
|
||||||
|
data: data,
|
||||||
|
timeout: 30*60*1000
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 获取流程环节定义信息
|
||||||
|
export function activitydefinition(procDefId, actDefId) {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/activitydefinition/' + procDefId + '/' + actDefId,
|
||||||
|
method: 'get',
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 查询列表
|
||||||
|
export function workflowToDoList(data) {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/toDoList',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新建流程,获取下一环节流程定义信息
|
||||||
|
export function workflowNextactsNew(data) {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/nextacts/new',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新建流程,获取下一环节流程定义信息
|
||||||
|
// 获取下一环节集合,并可以标识已办和自动将未办理环节优先排序
|
||||||
|
export function workflowNextactsNew2(data) {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/nextacts/new2',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询流程审批记录列表
|
||||||
|
export function processWorkflowGetList(businessId) {
|
||||||
|
return request({
|
||||||
|
url: '/process/workflowLog/list' + '?pageNum=1&pageSize=100&businessId=' + businessId,
|
||||||
|
method: 'get',
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getNextactuserByPending(query) {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/nextactuser/pending',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getNextActUsersByNew(query) {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/nextactuser/new',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function workflowSubmit(data) {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/submit',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function workflowCancel(data) {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/cancel',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function workflowReject(data) {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/reject',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function workflowBacktoprev(data) {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/backtoprev',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getHistAskLogUrl(procInstId) {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/histasklogurl/' + procInstId,
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getExtAttributeModel(procDefId, actDefId) {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/getExtAttributeModel/?procDefId=' + procDefId + "&actDefId=" + actDefId,
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function selectLogByBusinessId(query) {
|
||||||
|
return request({
|
||||||
|
url: '/process/workflowLog/selectLogByBusinessId?businessId' + query,
|
||||||
|
method: 'get',
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function workflowprocesskey(query) {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/process/key/' + query,
|
||||||
|
method: 'get',
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getStartActdef(procDefId) {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/startactdef/' + procDefId,
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 根据流程实例id获取流程实例信息和流程状态
|
||||||
|
export function procInstInfoAndStatus(procInstId) {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/procInstInfoAndStatus/' + procInstId,
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 根据流程实例id获取流程实例信息
|
||||||
|
export function getProcInstInfo(procInstId) {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/procInstInfo/' + procInstId,
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function selectLogByProcInstId(query) {
|
||||||
|
return request({
|
||||||
|
url: '/web/log/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取流程待选人员展示方式
|
||||||
|
export function selectUserStyle() {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/selectUserStyle',
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 根据流程实例id获取流程实例信息
|
||||||
|
export function getRecordbyPorcInstId(procInstId) {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/getRecord/' + procInstId,
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -9,6 +9,15 @@ export function listType(query) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 查询业务字典类型列表(扩展)
|
||||||
|
export function bizListType(query) {
|
||||||
|
return request({
|
||||||
|
url: '/system/dict/type/bizlist',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 查询字典类型详细
|
// 查询字典类型详细
|
||||||
export function getType(dictId) {
|
export function getType(dictId) {
|
||||||
return request({
|
return request({
|
||||||
|
|||||||
44
src/api/tool/discussions.js
Normal file
44
src/api/tool/discussions.js
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询讨论列表
|
||||||
|
export function listDiscussions(query) {
|
||||||
|
return request({
|
||||||
|
url: '/discussions/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询讨论详细
|
||||||
|
export function getDiscussions(id) {
|
||||||
|
return request({
|
||||||
|
url: '/discussions/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增讨论
|
||||||
|
export function addDiscussions(data) {
|
||||||
|
return request({
|
||||||
|
url: '/discussions',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改讨论
|
||||||
|
export function updateDiscussions(data) {
|
||||||
|
return request({
|
||||||
|
url: '/discussions',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除讨论
|
||||||
|
export function delDiscussions(id) {
|
||||||
|
return request({
|
||||||
|
url: '/discussions/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
44
src/api/tool/replies.js
Normal file
44
src/api/tool/replies.js
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询回复列表
|
||||||
|
export function listReplies(query) {
|
||||||
|
return request({
|
||||||
|
url: '/system/replies/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询回复详细
|
||||||
|
export function getReplies(id) {
|
||||||
|
return request({
|
||||||
|
url: '/replies/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增回复
|
||||||
|
export function addReplies(data) {
|
||||||
|
return request({
|
||||||
|
url: '/replies',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改回复
|
||||||
|
export function updateReplies(data) {
|
||||||
|
return request({
|
||||||
|
url: '/replies',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除回复
|
||||||
|
export function delReplies(id) {
|
||||||
|
return request({
|
||||||
|
url: '/replies/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -17,20 +17,29 @@ export function getTool(toolId) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export function getInfoByBpmcId(bpmcId) {
|
||||||
|
return request({
|
||||||
|
url: '/tool/bpmc/' + bpmcId,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 新增工具信息
|
// 新增工具信息
|
||||||
export function addTool(data) {
|
export function addTool(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/tool',
|
url: '/tool',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data
|
data: data,
|
||||||
|
timeout: 30*60*1000
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 修改工具信息
|
// 修改工具信息
|
||||||
export function updateTool(data) {
|
export function updateTool(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/tool',
|
url: '/tool/edit',
|
||||||
method: 'put',
|
method: 'post',
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -42,3 +51,11 @@ export function delTool(toolId) {
|
|||||||
method: 'delete'
|
method: 'delete'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function checkToolExist(params) {
|
||||||
|
return request({
|
||||||
|
url: '/tool/checkToolExist',
|
||||||
|
method: 'get',
|
||||||
|
params: params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
51
src/api/tool/userApply.js
Normal file
51
src/api/tool/userApply.js
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询使用申请列表
|
||||||
|
export function listApply(query) {
|
||||||
|
return request({
|
||||||
|
url: '/use/apply/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询使用申请详细
|
||||||
|
export function getApply(id) {
|
||||||
|
return request({
|
||||||
|
url: '/use/apply/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getInfoByBpmcId(bpmcId) {
|
||||||
|
return request({
|
||||||
|
url: '/use/apply/bpmc/' + bpmcId,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增使用申请
|
||||||
|
export function addApply(data) {
|
||||||
|
return request({
|
||||||
|
url: '/use/apply',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改使用申请
|
||||||
|
export function updateApply(data) {
|
||||||
|
return request({
|
||||||
|
url: '/use/apply/edit',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除使用申请
|
||||||
|
export function delApply(id) {
|
||||||
|
return request({
|
||||||
|
url: '/use/apply/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
44
src/api/tool/userApplyItem.js
Normal file
44
src/api/tool/userApplyItem.js
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询使用申请详情列表
|
||||||
|
export function listItem(query) {
|
||||||
|
return request({
|
||||||
|
url: '/use/apply/item/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询使用申请详情详细
|
||||||
|
export function getItem(id) {
|
||||||
|
return request({
|
||||||
|
url: '/use/apply/item/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增使用申请详情
|
||||||
|
export function addItem(data) {
|
||||||
|
return request({
|
||||||
|
url: '/use/apply/item',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改使用申请详情
|
||||||
|
export function updateItem(data) {
|
||||||
|
return request({
|
||||||
|
url: '/use/apply/item',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除使用申请详情
|
||||||
|
export function delItem(id) {
|
||||||
|
return request({
|
||||||
|
url: '/use/apply/item/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
107
src/components/DealDrawer/index.vue
Normal file
107
src/components/DealDrawer/index.vue
Normal file
@@ -0,0 +1,107 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-drawer
|
||||||
|
:wrapperClosable="false"
|
||||||
|
:visible.sync="visible"
|
||||||
|
:append-to-body="true"
|
||||||
|
direction="rtl"
|
||||||
|
size="90%"
|
||||||
|
:with-header="false"
|
||||||
|
:show-close="false"
|
||||||
|
modal-append-to-body
|
||||||
|
:destroy-on-close="true"
|
||||||
|
>
|
||||||
|
<div style="width:100%; height:100%;overflow: hidden">
|
||||||
|
<iframe :src="src" width="100%" name="dmsDrawer" height="100%" title="myFrame" style="border: 0"></iframe>
|
||||||
|
</div>
|
||||||
|
</el-drawer>
|
||||||
|
<el-drawer
|
||||||
|
:visible.sync="drawerShow"
|
||||||
|
direction="rtl"
|
||||||
|
size="90%"
|
||||||
|
:append-to-body="true"
|
||||||
|
:with-header="false"
|
||||||
|
:wrapperClosable="false"
|
||||||
|
:show-close="false"
|
||||||
|
modal-append-to-body
|
||||||
|
:destroy-on-close="true"
|
||||||
|
>
|
||||||
|
<main-component ref="mainComponent" :code="path" :data="data" @close="handleCodeCloseChange"></main-component>
|
||||||
|
</el-drawer>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
/*
|
||||||
|
流程处理抽屉组件
|
||||||
|
*/
|
||||||
|
import MainComponent from '@/components/mainComponent/index.vue'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'DealDrawer',
|
||||||
|
components: { MainComponent },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
workflowMessageCbAdded: false,
|
||||||
|
visible: false,
|
||||||
|
drawerShow: false,
|
||||||
|
data: undefined,
|
||||||
|
path: '',
|
||||||
|
src: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
activated() {
|
||||||
|
this.setupMessageListener()
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.setupMessageListener()
|
||||||
|
},
|
||||||
|
deactivated() {
|
||||||
|
this.removeMessageListener()
|
||||||
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
this.removeMessageListener()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
//建立addEventListener事件
|
||||||
|
setupMessageListener() {
|
||||||
|
if (!this.workflowMessageCbAdded) {
|
||||||
|
window.addEventListener('message', this.handleMsg)
|
||||||
|
this.workflowMessageCbAdded = true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//销毁addEventListener事件
|
||||||
|
removeMessageListener() {
|
||||||
|
window.removeEventListener('message', this.handleMsg)
|
||||||
|
this.workflowMessageCbAdded = false
|
||||||
|
},
|
||||||
|
handleMsg(event) {
|
||||||
|
let _this = this
|
||||||
|
let data = event.data
|
||||||
|
if (data.type === 'close') {
|
||||||
|
_this.visible = false
|
||||||
|
if (data.msgType) {
|
||||||
|
_this.$modal[data.msgType](data.msg)
|
||||||
|
}
|
||||||
|
_this.$emit('closeDrawer')
|
||||||
|
}else if(data.type === 'pdfPreview'){
|
||||||
|
this.pdfPreview(data.pdfId)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
pdfPreview(pdfId){
|
||||||
|
this.path = 'views/components/pdfPreview/index'
|
||||||
|
this.data = pdfId
|
||||||
|
this.drawerShow = true
|
||||||
|
},
|
||||||
|
init(url) {
|
||||||
|
let _this = this
|
||||||
|
_this.visible = true
|
||||||
|
// iframe加载URL地址
|
||||||
|
_this.src = url
|
||||||
|
},
|
||||||
|
handleCodeCloseChange() {
|
||||||
|
this.drawerShow = false
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@@ -33,22 +33,6 @@ export default {
|
|||||||
type: String,
|
type: String,
|
||||||
required: true
|
required: true
|
||||||
},
|
},
|
||||||
headers: {
|
|
||||||
type: Object,
|
|
||||||
default: () => ({})
|
|
||||||
},
|
|
||||||
extraData: {
|
|
||||||
type: Object,
|
|
||||||
default: () => ({})
|
|
||||||
},
|
|
||||||
onSuccess: {
|
|
||||||
type: Function,
|
|
||||||
default: () => {}
|
|
||||||
},
|
|
||||||
onError: {
|
|
||||||
type: Function,
|
|
||||||
default: () => {}
|
|
||||||
},
|
|
||||||
// 是否多选
|
// 是否多选
|
||||||
isMultiple: {
|
isMultiple: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
@@ -75,6 +59,13 @@ export default {
|
|||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// 文件
|
||||||
|
dataFile: {
|
||||||
|
type: [Object, Array, String],
|
||||||
|
default() {
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -86,6 +77,18 @@ export default {
|
|||||||
partSize: 5 * 1024 * 1024,
|
partSize: 5 * 1024 * 1024,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
dataFile: {
|
||||||
|
handler(newValue, oldValue) {
|
||||||
|
if (newValue) {
|
||||||
|
this.fileList = Array.isArray(newValue) ? newValue : [newValue]
|
||||||
|
} else {
|
||||||
|
this.fileList = []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
immediate: true
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 上传前
|
// 上传前
|
||||||
beforeUpload(file) {
|
beforeUpload(file) {
|
||||||
@@ -99,67 +102,6 @@ export default {
|
|||||||
return false
|
return false
|
||||||
}*/
|
}*/
|
||||||
},
|
},
|
||||||
/* //上传函数
|
|
||||||
submitUpload(file) {
|
|
||||||
//重新命名 方便setTimeout函数 --因为setTimeout函数在vue内部中无效
|
|
||||||
var that = this;
|
|
||||||
// that.$refs.upload.submit();
|
|
||||||
//判断上传文件数量
|
|
||||||
if (this.fileList.length == 0) {
|
|
||||||
that.$message({
|
|
||||||
message: '请选择导入的文件',
|
|
||||||
type: 'warning',
|
|
||||||
duration: '2000'
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
//创建FormData();主要用于发送表单数据
|
|
||||||
let paramFormData = new FormData();
|
|
||||||
//遍历 fileList
|
|
||||||
that.fileList.forEach(file => {
|
|
||||||
paramFormData.append("file", file.raw);
|
|
||||||
});
|
|
||||||
//修改progressFlag值
|
|
||||||
that.progressFlag = true;
|
|
||||||
//axios 发出请求
|
|
||||||
axios({
|
|
||||||
url: that.uploadUrl,
|
|
||||||
method: 'post',
|
|
||||||
data: paramFormData,
|
|
||||||
headers: {
|
|
||||||
'Authorization': 'Bearer ' + getToken(),
|
|
||||||
'Content-Type': 'multipart/form-data'
|
|
||||||
},
|
|
||||||
onUploadProgress: progressEvent => {
|
|
||||||
// progressEvent.loaded:已上传文件大小
|
|
||||||
// progressEvent.total:被上传文件的总大小
|
|
||||||
//进度条
|
|
||||||
that.progressPercent = ((progressEvent.loaded / progressEvent.total) * 100) | 0;
|
|
||||||
}
|
|
||||||
}).then(res => {
|
|
||||||
console.info("res===========", res)
|
|
||||||
if (res.data.code == 200 && that.progressPercent === 100) {
|
|
||||||
setTimeout(function () {
|
|
||||||
that.$message({
|
|
||||||
message: '上传成功!',
|
|
||||||
type: 'success',
|
|
||||||
duration: '2000'
|
|
||||||
});
|
|
||||||
that.progressFlag = false;
|
|
||||||
that.progressPercent = 0
|
|
||||||
}, 500);
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
that.progressFlag = false;
|
|
||||||
that.progressPercent = 0
|
|
||||||
that.$refs.upload.clearFiles();
|
|
||||||
that.$message({
|
|
||||||
message: '上传失败!',
|
|
||||||
type: 'error',
|
|
||||||
duration: '2000'
|
|
||||||
});
|
|
||||||
})
|
|
||||||
},*/
|
|
||||||
//文件状态改变时的钩子,添加文件、上传成功和上传失败时都会被调用
|
//文件状态改变时的钩子,添加文件、上传成功和上传失败时都会被调用
|
||||||
onChange(file, fileList) {
|
onChange(file, fileList) {
|
||||||
this.fileList = fileList;
|
this.fileList = fileList;
|
||||||
@@ -205,6 +147,7 @@ export default {
|
|||||||
});
|
});
|
||||||
self.progressFlag = false;
|
self.progressFlag = false;
|
||||||
self.progressPercent = 0
|
self.progressPercent = 0
|
||||||
|
self.handleResult(res,file);
|
||||||
}, 500);
|
}, 500);
|
||||||
} else {
|
} else {
|
||||||
self.$message({
|
self.$message({
|
||||||
@@ -227,7 +170,6 @@ export default {
|
|||||||
});
|
});
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
console.info("111111111111")
|
|
||||||
file._shardCount = Math.ceil(file.size / this.partSize) //总片数
|
file._shardCount = Math.ceil(file.size / this.partSize) //总片数
|
||||||
file.uploaded = 0
|
file.uploaded = 0
|
||||||
let formData = new FormData()
|
let formData = new FormData()
|
||||||
@@ -244,7 +186,6 @@ export default {
|
|||||||
'Content-Type': 'multipart/form-data'
|
'Content-Type': 'multipart/form-data'
|
||||||
},
|
},
|
||||||
}).then(function (res) {
|
}).then(function (res) {
|
||||||
console.info("res=====initUpload=======", res)
|
|
||||||
if (res.status == 200) {
|
if (res.status == 200) {
|
||||||
//从第0块开始上传
|
//从第0块开始上传
|
||||||
file.uploadId = res.data.uploadId
|
file.uploadId = res.data.uploadId
|
||||||
@@ -272,12 +213,6 @@ export default {
|
|||||||
//获取文件块MD5
|
//获取文件块MD5
|
||||||
let reader = new FileReader()
|
let reader = new FileReader()
|
||||||
reader.readAsBinaryString(fileData)
|
reader.readAsBinaryString(fileData)
|
||||||
// 读取成功后的回调
|
|
||||||
// reader.onloadend = function(e) {
|
|
||||||
// 用hex_md5生成md5值,与OSS的算法对应,并转换为大写,不是直接md5-js的算法
|
|
||||||
// self.md5Str[index] = (CryptoJS(this.result)).toLocaleUpperCase()
|
|
||||||
// self.md5Str[index] = CryptoJS.MD5(e.target.result)
|
|
||||||
// }
|
|
||||||
let form1 = new FormData()//new一个form的实例,可以进行键值对的添加,
|
let form1 = new FormData()//new一个form的实例,可以进行键值对的添加,
|
||||||
form1.append('chunkFile', fileData) //slice方法用于切出文件的一部分
|
form1.append('chunkFile', fileData) //slice方法用于切出文件的一部分
|
||||||
form1.append('uploadId', file.uploadId)
|
form1.append('uploadId', file.uploadId)
|
||||||
@@ -300,7 +235,6 @@ export default {
|
|||||||
self.progressPercent = ((progressEvent.loaded / progressEvent.total) * 100) | 0;
|
self.progressPercent = ((progressEvent.loaded / progressEvent.total) * 100) | 0;
|
||||||
}
|
}
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
console.info("response=======uploadChunk=====", response)
|
|
||||||
if (response.status == 200) {
|
if (response.status == 200) {
|
||||||
//判断返回的MD5值是否一致,一致继续传下一块,否则重传本块(这里目前前后端MD5一直不一致,暂时先注释掉,有时间了我再研究一下)
|
//判断返回的MD5值是否一致,一致继续传下一块,否则重传本块(这里目前前后端MD5一直不一致,暂时先注释掉,有时间了我再研究一下)
|
||||||
// self.md5Str[index] === response.msg ||
|
// self.md5Str[index] === response.msg ||
|
||||||
@@ -345,9 +279,8 @@ export default {
|
|||||||
'Authorization': 'Bearer ' + getToken(),
|
'Authorization': 'Bearer ' + getToken(),
|
||||||
'Content-Type': 'multipart/form-data'
|
'Content-Type': 'multipart/form-data'
|
||||||
},
|
},
|
||||||
}).then(response => {
|
}).then(res => {
|
||||||
console.info("response====mergeFile========", response)
|
if (res.status == 200) {
|
||||||
if (response.status == 200) {
|
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
self.$message({
|
self.$message({
|
||||||
message: '上传成功!',
|
message: '上传成功!',
|
||||||
@@ -356,6 +289,7 @@ export default {
|
|||||||
});
|
});
|
||||||
self.progressFlag = false;
|
self.progressFlag = false;
|
||||||
self.progressPercent = 0
|
self.progressPercent = 0
|
||||||
|
self.handleResult(res,file);
|
||||||
}, 500);
|
}, 500);
|
||||||
} else {
|
} else {
|
||||||
self.$message({
|
self.$message({
|
||||||
@@ -364,13 +298,30 @@ export default {
|
|||||||
duration: '2000'
|
duration: '2000'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
console.info("file===============", file)
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
resetData() {
|
resetData() {
|
||||||
this.progress = 0;
|
this.progress = 0;
|
||||||
},
|
},
|
||||||
|
handleResult(res, file) {
|
||||||
|
let self = this
|
||||||
|
const data = {
|
||||||
|
fileName: file.name,
|
||||||
|
fileSize: file.size,
|
||||||
|
fileUrl: res.data.url,
|
||||||
|
filePath: res.data.filePath,
|
||||||
|
fileOldName: res.data.originalFilename,
|
||||||
|
fileNewName: res.data.newFileName,
|
||||||
|
suffixType: res.data.suffixType
|
||||||
|
}
|
||||||
|
self.$emit("handleSuccess", data)
|
||||||
|
},
|
||||||
|
/** 清空文件 **/
|
||||||
|
clearFile(){
|
||||||
|
this.$refs.upload.clearFiles();
|
||||||
|
this.fileList = []
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
34
src/components/MonitorDrawer/index.vue
Normal file
34
src/components/MonitorDrawer/index.vue
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
<template>
|
||||||
|
<el-drawer
|
||||||
|
:wrapperClosable='false'
|
||||||
|
title="流程监控"
|
||||||
|
size="65%"
|
||||||
|
:visible.sync="visible"
|
||||||
|
:append-to-body="true"
|
||||||
|
>
|
||||||
|
<div style="width:100%;height:100%">
|
||||||
|
<iframe :src="src" width="100%" height="100%" title="myFrame" style="border: 0;"></iframe>
|
||||||
|
</div>
|
||||||
|
</el-drawer>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { getHistAskLogUrl } from "@/api/my_business/workflow";
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
visible: false,
|
||||||
|
src: ''
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
init(procInstId) {
|
||||||
|
let _this = this
|
||||||
|
_this.visible = true
|
||||||
|
getHistAskLogUrl(procInstId).then(res => {
|
||||||
|
_this.src=res.data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
36
src/components/mainComponent/index.vue
Normal file
36
src/components/mainComponent/index.vue
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
<template>
|
||||||
|
<component :is="dashboard" ref="component" :data="data" :dataType="dataType" @close="close">
|
||||||
|
<slot></slot>
|
||||||
|
</component>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'MainComponent',
|
||||||
|
props: ['code','data','dataType'],
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
dashboard: null,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
code (val) {
|
||||||
|
this.init(val)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mounted () {
|
||||||
|
this.init(this.code)
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
init (val) {
|
||||||
|
try {
|
||||||
|
if (val) {
|
||||||
|
this.dashboard = resolve => require(['@/' + val + '.vue'], resolve)
|
||||||
|
}
|
||||||
|
}catch (e) {}
|
||||||
|
},
|
||||||
|
close (value) {
|
||||||
|
this.$emit('close', value)
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
180
src/components/tool-selector/index.vue
Normal file
180
src/components/tool-selector/index.vue
Normal file
@@ -0,0 +1,180 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
title="工具选择"
|
||||||
|
:visible.sync="visible"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
width="80%"
|
||||||
|
append-to-body>
|
||||||
|
<div class="el-card__body">
|
||||||
|
<el-form :model="queryParams" ref="queryForm" v-show="showSearch" label-width="68px" :inline="true">
|
||||||
|
<el-form-item label="工具编号" prop="toolCode">
|
||||||
|
<el-input
|
||||||
|
v-model.trim="queryParams.toolCode"
|
||||||
|
placeholder="请输入"
|
||||||
|
clearable
|
||||||
|
size="small"
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="工具名称" prop="toolName">
|
||||||
|
<el-input
|
||||||
|
v-model.trim="queryParams.toolName"
|
||||||
|
placeholder="请输入"
|
||||||
|
clearable
|
||||||
|
size="small"
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
|
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<el-card class="gray-card">
|
||||||
|
<el-table
|
||||||
|
v-loading="loading"
|
||||||
|
:data="dataList"
|
||||||
|
border
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
|
ref="multipleTable"
|
||||||
|
header-align="left"
|
||||||
|
>
|
||||||
|
<el-table-column type="selection" width="50" align="center" v-if="multiple" :selectable="(row,index)=>selectableFun(row,index,toolData,selectInfoData)"/>
|
||||||
|
<el-table-column label="工具编号" align="center" key="toolCode" prop="toolCode"/>
|
||||||
|
<el-table-column label="工具名称" align="center" key="toolName" prop="toolName":show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="工具类别" align="center" key="toolType" prop="toolType" :show-overflow-tooltip="true" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.tool_type" :value="scope.row.toolType"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="归属单位" align="center" key="toolRespDeptName" prop="toolRespDeptName" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="负责人" align="center" key="toolPrincipalsName" prop="toolPrincipalsName" width="120" />
|
||||||
|
<el-table-column label="操作" v-if="!multiple" width="100px" class-name="small-padding fixed-width">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
@click="selectHandle(scope.row)"
|
||||||
|
>选择</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-card>
|
||||||
|
<pagination
|
||||||
|
v-show="total > 0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div slot="footer" v-if="multiple">
|
||||||
|
<el-button @click="visible = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="selectHandle(selectInfoData)">确 定</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listTool } from '@/api/tool/tool'
|
||||||
|
export default {
|
||||||
|
name: "ToolSelector",
|
||||||
|
components: {},
|
||||||
|
dicts:['tool_type'],
|
||||||
|
props: {
|
||||||
|
toolData: {
|
||||||
|
type: Array,
|
||||||
|
default: ()=>[],
|
||||||
|
},
|
||||||
|
selectableFun: {
|
||||||
|
type: Function,
|
||||||
|
default: (row, index, toolData, selectInfoData)=>{
|
||||||
|
if (toolData) {
|
||||||
|
return toolData.findIndex(item=>item.id===row.id)<0
|
||||||
|
}else {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
selectValidate:{
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
visible: false,
|
||||||
|
source: undefined,
|
||||||
|
index: undefined,
|
||||||
|
multiple: false,
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 表格数据
|
||||||
|
dataList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
toolCode: undefined,
|
||||||
|
toolName: undefined,
|
||||||
|
status: undefined,
|
||||||
|
recordStatus: 'done',
|
||||||
|
},
|
||||||
|
selectInfoData: [],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
//来源、序号、是否多选
|
||||||
|
init(source,index,multiple){
|
||||||
|
this.visible = true
|
||||||
|
this.source = source
|
||||||
|
this.index = index
|
||||||
|
this.multiple= multiple
|
||||||
|
this.resetQuery()
|
||||||
|
},
|
||||||
|
/** 查询列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
listTool(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
|
||||||
|
this.dataList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm('queryForm')
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.selectInfoData = selection;
|
||||||
|
},
|
||||||
|
selectHandle(data){
|
||||||
|
let _this = this
|
||||||
|
if (_this.selectValidate) {
|
||||||
|
this.$emit("selectHandle", this.source, this.index, data,(res)=>{_this.visible = !res})
|
||||||
|
}else{
|
||||||
|
this.$emit("selectHandle", this.source, this.index, data)
|
||||||
|
_this.visible = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
@@ -276,15 +276,16 @@
|
|||||||
return result;
|
return result;
|
||||||
},
|
},
|
||||||
submitForm() {
|
submitForm() {
|
||||||
let checkedUserArr = []
|
// let checkedUserArr = []
|
||||||
let checkedUser = {}
|
// let checkedUser = {}
|
||||||
this.checkedUsers.forEach(userName => {
|
// this.checkedUsers.forEach(userName => {
|
||||||
checkedUser['userName'] = userName
|
// checkedUser['userName'] = userName
|
||||||
checkedUser['userId'] = this.getUserIdByUserName(userName)
|
// checkedUser['userId'] = this.getUserIdByUserName(userName)
|
||||||
checkedUser['nickName'] = this.getNickNameByUserName(userName)
|
// checkedUser['nickName'] = this.getNickNameByUserName(userName)
|
||||||
checkedUserArr.push(checkedUser)
|
// checkedUserArr.push(checkedUser)
|
||||||
})
|
// })
|
||||||
this.$emit("submit", checkedUserArr); //返回username和nickname
|
// this.$emit("submit", checkedUserArr); //返回username和nickname
|
||||||
|
this.$emit("submit", JSON.parse(JSON.stringify(this.selectedUserList)));
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
this.$emit('cancel');
|
this.$emit('cancel');
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import '../public/css/poctstyle.css'
|
|||||||
import '../public/css/tool.css'
|
import '../public/css/tool.css'
|
||||||
import '@/assets/styles/index.scss' // global css
|
import '@/assets/styles/index.scss' // global css
|
||||||
import '@/assets/styles/ruoyi.scss' // ruoyi css
|
import '@/assets/styles/ruoyi.scss' // ruoyi css
|
||||||
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||||
import App from './App'
|
import App from './App'
|
||||||
import store from './store'
|
import store from './store'
|
||||||
import router from './router'
|
import router from './router'
|
||||||
@@ -38,6 +39,8 @@ import DictTag from '@/components/DictTag'
|
|||||||
import VueMeta from 'vue-meta'
|
import VueMeta from 'vue-meta'
|
||||||
// 字典数据组件
|
// 字典数据组件
|
||||||
import DictData from '@/components/DictData'
|
import DictData from '@/components/DictData'
|
||||||
|
// 图形监控组件
|
||||||
|
import MonitorDrawer from "@/components/MonitorDrawer"
|
||||||
|
|
||||||
// 全局方法挂载
|
// 全局方法挂载
|
||||||
Vue.prototype.getDicts = getDicts
|
Vue.prototype.getDicts = getDicts
|
||||||
@@ -58,6 +61,7 @@ Vue.component('Editor', Editor)
|
|||||||
Vue.component('FileUpload', FileUpload)
|
Vue.component('FileUpload', FileUpload)
|
||||||
Vue.component('ImageUpload', ImageUpload)
|
Vue.component('ImageUpload', ImageUpload)
|
||||||
Vue.component('ImagePreview', ImagePreview)
|
Vue.component('ImagePreview', ImagePreview)
|
||||||
|
Vue.component('MonitorDrawer', MonitorDrawer)
|
||||||
|
|
||||||
Vue.use(directive)
|
Vue.use(directive)
|
||||||
Vue.use(plugins)
|
Vue.use(plugins)
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ const baseURL = process.env.VUE_APP_BASE_API
|
|||||||
let downloadLoadingInstance;
|
let downloadLoadingInstance;
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name(name, isDelete = true) {
|
downloadByName(name, isDelete) {
|
||||||
var url = baseURL + "/common/download?fileName=" + encodeURIComponent(name) + "&delete=" + isDelete
|
var url = baseURL + "/common/download?fileName=" + encodeURIComponent(name) + "&delete=" + isDelete
|
||||||
axios({
|
axios({
|
||||||
method: 'get',
|
method: 'get',
|
||||||
|
|||||||
@@ -41,6 +41,12 @@ export const constantRoutes = [
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
// 统一流程处理前端页面(涉及待办、已办、办结)
|
||||||
|
path: '/workflowRouter',
|
||||||
|
component: (resolve) => require(['@/views/workflowList/workflowRouter.vue'], resolve),
|
||||||
|
hidden: true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: '/login',
|
path: '/login',
|
||||||
component: () => import('@/views/login'),
|
component: () => import('@/views/login'),
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ const getters = {
|
|||||||
cachedViews: state => state.tagsView.cachedViews,
|
cachedViews: state => state.tagsView.cachedViews,
|
||||||
token: state => state.user.token,
|
token: state => state.user.token,
|
||||||
avatar: state => state.user.avatar,
|
avatar: state => state.user.avatar,
|
||||||
|
userId: state => state.user.id,
|
||||||
|
userInfo: state => state.user.info,
|
||||||
name: state => state.user.name,
|
name: state => state.user.name,
|
||||||
nickName: state => state.user.nickName,
|
nickName: state => state.user.nickName,
|
||||||
introduction: state => state.user.introduction,
|
introduction: state => state.user.introduction,
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ const user = {
|
|||||||
id: '',
|
id: '',
|
||||||
name: '',
|
name: '',
|
||||||
nickName: '',
|
nickName: '',
|
||||||
|
info: {},
|
||||||
avatar: '',
|
avatar: '',
|
||||||
roles: [],
|
roles: [],
|
||||||
permissions: []
|
permissions: []
|
||||||
@@ -33,6 +34,9 @@ const user = {
|
|||||||
},
|
},
|
||||||
SET_PERMISSIONS: (state, permissions) => {
|
SET_PERMISSIONS: (state, permissions) => {
|
||||||
state.permissions = permissions
|
state.permissions = permissions
|
||||||
|
},
|
||||||
|
SET_INFO:(state, info) => {
|
||||||
|
state.info = info
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -70,6 +74,8 @@ const user = {
|
|||||||
commit('SET_NAME', user.userName)
|
commit('SET_NAME', user.userName)
|
||||||
commit('SET_NICK_NAME', user.nickName)
|
commit('SET_NICK_NAME', user.nickName)
|
||||||
commit('SET_AVATAR', avatar)
|
commit('SET_AVATAR', avatar)
|
||||||
|
commit('SET_INFO', user)
|
||||||
|
|
||||||
resolve(res)
|
resolve(res)
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
reject(error)
|
reject(error)
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
<el-form ref="form" :model="form" :rules="rules" label-width="150px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="150px">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="文件分类" prop="docCode">
|
<el-form-item label="文件分类" prop="docCategoryId">
|
||||||
<treeselect v-model="form.categoryId" :options="docCategory" :show-count="true" placeholder="请选择文件分类"/>
|
<treeselect v-model="form.docCategoryId" :options="docCategory" :show-count="true" placeholder="请选择文件分类"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
@@ -21,20 +21,51 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="文档类别" prop="docType">
|
<el-form-item label="文档类别" prop="docType" style="width: 100%">
|
||||||
<el-input v-model="form.docType" placeholder="请输入文档类别" maxlength="50" show-word-limit/>
|
<el-select v-model="form.docType" placeholder="请选择文档来源" style="width: 100% !important;">
|
||||||
|
<el-option style="width: 100%"
|
||||||
|
v-for="dict in dict.type.doc_class"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="文档来源" prop="docSource">
|
<el-form-item label="文档来源" prop="docSource">
|
||||||
<el-input v-model="form.docSource" placeholder="请输入文档来源" maxlength="50" show-word-limit/>
|
<el-select v-model="form.docSource" placeholder="请选择文档来源" style="width: 100%">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.doc_source"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
<!-- <el-input v-model="form.docSource" placeholder="请输入文档来源" maxlength="50" show-word-limit/>-->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24">
|
<el-col :span="24" v-if="relatedTool">
|
||||||
<el-form-item label="关联工具" prop="toolId">
|
<el-form-item label="关联工具" prop="toolId">
|
||||||
<el-input v-model="form.toolId" placeholder="请选择关联工具" @focus="drawer1 = true"/>
|
<el-select
|
||||||
|
v-model="toolDataInfo"
|
||||||
|
ref="selectHeadTool"
|
||||||
|
multiple
|
||||||
|
value-key="toolId"
|
||||||
|
filterable
|
||||||
|
remote
|
||||||
|
placeholder="请选择关联工具"
|
||||||
|
@focus="toolSelect">
|
||||||
|
<el-option
|
||||||
|
v-for="item in toolDataInfo"
|
||||||
|
:key="item.toolId"
|
||||||
|
:label="item.toolName"
|
||||||
|
:value="item">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="负责人" prop="docPrincipals">
|
<el-form-item label="负责人" prop="docPrincipals">
|
||||||
@@ -49,69 +80,33 @@
|
|||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="文件" required>
|
<el-form-item label="文件" required>
|
||||||
<uploadVue
|
<uploadVue
|
||||||
|
:display="editStatus"
|
||||||
:uploadUrl="uploadFileUrl"
|
:uploadUrl="uploadFileUrl"
|
||||||
:type="['.txt','.doc','.docx','.pdf','.mp4','.zip','.rar','.7z','.png','.jpg','.jpeg']"
|
:type="['.txt','.doc','.docx','.pdf','.mp4','.zip','.rar','.7z','.png','.jpg','.jpeg']"
|
||||||
:acceptType="acceptType"
|
:acceptType="acceptType"
|
||||||
:limit="1"
|
:limit="1"
|
||||||
:onSuccess="handleUploadSuccess"
|
:dataFile="dataFile"
|
||||||
:onError="handleUploadError"
|
ref="uploadFile"
|
||||||
|
@handleSuccess="handleUploadSuccess"
|
||||||
|
@handleError="handleUploadError"
|
||||||
/>
|
/>
|
||||||
<!-- <uploadVue-->
|
|
||||||
<!-- <upload-progress/>
|
|
||||||
<el-upload
|
|
||||||
class="upload-component"
|
|
||||||
ref="upload"
|
|
||||||
:auto-upload="false"
|
|
||||||
:file-list="fileList"
|
|
||||||
:on-change="onChange"
|
|
||||||
:on-remove="onRemove"
|
|
||||||
:multiple="true"
|
|
||||||
action=""
|
|
||||||
>
|
|
||||||
<el-button size="small" type="primary">点击上传</el-button>
|
|
||||||
<div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div>
|
|
||||||
<div slot="tip" class="el-upload__tip"><el-progress :percentage="progress"></el-progress></div>
|
|
||||||
</el-upload>-->
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="备注">
|
<el-form-item label="备注" prop="remark">
|
||||||
<el-input v-model="form.remark" type="textarea" :rows="3" maxlength="500" show-word-limit></el-input>
|
<el-input v-model="form.remark" type="textarea" :rows="3" maxlength="500" show-word-limit></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form><!--el-form-->
|
</el-form><!--el-form-->
|
||||||
|
|
||||||
<el-dialog title="选择关联工具" :visible.sync="drawer1" width="75%" append-to-body>
|
<tool-selector ref="toolSelect" @selectHandle="selectHandle"></tool-selector>
|
||||||
<div>
|
|
||||||
<el-table :data="tableData2" @row-click="singleElection" highlight-current-row style="width: 100%">
|
|
||||||
<!--<el-table-column label="选择" align="center" width="65">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-radio :label="scope.row.prop1" v-model="radio" @change.native="getCurrentRow(scope.row)" />
|
|
||||||
</template>
|
|
||||||
</el-table-column>-->
|
|
||||||
<el-table-column align="center" width="55">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-radio v-model="templateSelection" :label="scope.row.prop1"></el-radio>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="prop1" label="工具编号"></el-table-column>
|
|
||||||
<el-table-column prop="prop2" label="工具名称"></el-table-column>
|
|
||||||
<el-table-column prop="prop5" label="工具类别" ></el-table-column>
|
|
||||||
<el-table-column prop="prop3" label="归属单位" width="180"> </el-table-column>
|
|
||||||
<el-table-column prop="prop4" label="负责人" width="100" ></el-table-column>
|
|
||||||
</el-table><!--el-table-->
|
|
||||||
</div>
|
|
||||||
<div slot="footer" class="dialog-footer">
|
|
||||||
<el-button type="primary" @click="chooseToolConfirm()">确 定</el-button>
|
|
||||||
<el-button @click="cancel()">取 消</el-button>
|
|
||||||
</div>
|
|
||||||
</el-dialog><!--el-drawer 流程监控-抽屉-->
|
|
||||||
</div><!--el-form-border 表单-->
|
</div><!--el-form-border 表单-->
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { addDocument, updateDocument } from "@/api/document/document";
|
import { addDocument, updateDocument, getDocument } from "@/api/document/document";
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import { getToken } from '@/utils/auth'
|
import { getToken } from '@/utils/auth'
|
||||||
import { deptTreeSelect } from "@/api/system/user";
|
import { deptTreeSelect } from "@/api/system/user";
|
||||||
@@ -119,15 +114,22 @@
|
|||||||
import Treeselect from "@riophae/vue-treeselect";
|
import Treeselect from "@riophae/vue-treeselect";
|
||||||
import uploadProgress from "./uploadProgress";
|
import uploadProgress from "./uploadProgress";
|
||||||
import uploadVue from '@/components/FileUpload/optimizeUpload.vue'
|
import uploadVue from '@/components/FileUpload/optimizeUpload.vue'
|
||||||
|
import ToolSelector from '@/components/tool-selector/index.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'editDocument',
|
name: 'editDocument',
|
||||||
components: { Treeselect, uploadProgress, uploadVue},
|
components: { Treeselect, uploadProgress, uploadVue, ToolSelector},
|
||||||
|
dicts:['doc_class','doc_source'],
|
||||||
props: {
|
props: {
|
||||||
tooId: {
|
tooId: {
|
||||||
type: String,
|
type: String,
|
||||||
default: "",
|
default: "",
|
||||||
}
|
required: false
|
||||||
|
},
|
||||||
|
relatedTool: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
data(){
|
data(){
|
||||||
return{
|
return{
|
||||||
@@ -152,19 +154,24 @@
|
|||||||
],
|
],
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {
|
form: {
|
||||||
categoryId: undefined,
|
docId: undefined,
|
||||||
|
docCategoryId: undefined,
|
||||||
docCode: '',
|
docCode: '',
|
||||||
docName: '',
|
docName: '',
|
||||||
docType: '',
|
docType: '',
|
||||||
docPrincipals: '',
|
docPrincipals: '',
|
||||||
docRespDept: undefined,
|
docRespDept: undefined,
|
||||||
docSource: '',
|
docSource: '',
|
||||||
toolId: ''
|
toolId: '',
|
||||||
|
remark: undefined
|
||||||
},
|
},
|
||||||
fileList: [],
|
fileList: [],
|
||||||
progress: 0,
|
progress: 0,
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
|
docCategoryId: [
|
||||||
|
{ required: true, message: "文档分类不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
docCode: [
|
docCode: [
|
||||||
{ required: true, message: "文档编号不能为空", trigger: "blur" }
|
{ required: true, message: "文档编号不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
@@ -182,7 +189,10 @@
|
|||||||
deptOptions:[],
|
deptOptions:[],
|
||||||
uploadFileUrl: process.env.VUE_APP_BASE_API + "/common/upload", // 上传文件服务器地址
|
uploadFileUrl: process.env.VUE_APP_BASE_API + "/common/upload", // 上传文件服务器地址
|
||||||
fileData: null,
|
fileData: null,
|
||||||
acceptType: ".txt,.doc,.docx,.pdf,.mp4,.zip,.rar,.7z,.png,.jpg,.jpeg"
|
acceptType: ".txt,.doc,.docx,.pdf,.mp4,.zip,.rar,.7z,.png,.jpg,.jpeg",
|
||||||
|
editStatus: true,
|
||||||
|
toolDataInfo: [],
|
||||||
|
dataFile: [],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created(){
|
created(){
|
||||||
@@ -229,21 +239,6 @@
|
|||||||
this.drawer1 = false;
|
this.drawer1 = false;
|
||||||
this.reset();
|
this.reset();
|
||||||
},
|
},
|
||||||
onChange(file, fileList) {
|
|
||||||
// valid the suffix of file
|
|
||||||
/*let validSuffix = ['pdf', 'docx', 'doc', 'txt', 'eml', 'mp4']
|
|
||||||
let splits = file.name.split('.')
|
|
||||||
let suffix = splits[splits.length - 1]
|
|
||||||
if (!validSuffix.includes(suffix)) {
|
|
||||||
this.$message.error(`只能上传 ${validSuffix.join(',')} 类型的文件!`)
|
|
||||||
this.fileList = fileList.filter(item => item.uid !== file.uid)
|
|
||||||
return
|
|
||||||
}*/
|
|
||||||
this.fileList = fileList
|
|
||||||
},
|
|
||||||
onRemove(file, fileList) {
|
|
||||||
this.fileList = fileList.filter(item => item.uid !== file.uid)
|
|
||||||
},
|
|
||||||
generateUniqueID() {
|
generateUniqueID() {
|
||||||
// 使用时间戳来生成唯一ID
|
// 使用时间戳来生成唯一ID
|
||||||
const timestamp = new Date().getTime();
|
const timestamp = new Date().getTime();
|
||||||
@@ -253,80 +248,81 @@
|
|||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm: function() {
|
submitForm: function() {
|
||||||
|
let fileName = []
|
||||||
|
//编辑时走该逻辑
|
||||||
|
if(this.form.docId && (this.fileList == null || this.fileList.length <= 0 )){
|
||||||
|
fileName = this.$refs.uploadFile.fileList[0]
|
||||||
|
this.fileList = this.$refs.uploadFile.fileList
|
||||||
|
}else{
|
||||||
|
fileName = this.fileList[0]
|
||||||
|
this.fileList = this.fileList
|
||||||
|
}
|
||||||
//判断是否有文件再上传
|
//判断是否有文件再上传
|
||||||
if (this.fileList.length === 0) {
|
if (this.fileList.length == 0) {
|
||||||
return this.$message.warning('请选取文件后再上传')
|
return this.$message.warning('请选取文件后再上传')
|
||||||
}
|
}
|
||||||
this.fileList.map(file =>{
|
/*this.fileList.map(file =>{
|
||||||
this.form.docName = file.name
|
this.form.docName = file.name
|
||||||
})
|
})*/
|
||||||
this.form.toolId = this.toolId
|
if(fileName){
|
||||||
|
this.$set(this.form,"docUrl", fileName.filePath)
|
||||||
|
this.$set(this.form,"docStatus", "ysc")
|
||||||
|
this.$set(this.form,"attachment", fileName)
|
||||||
|
}
|
||||||
|
if(this.toolDataInfo && this.toolDataInfo.length > 0){
|
||||||
|
this.$set(this.form,"toolId", this.toolDataInfo[0].toolId)
|
||||||
|
}
|
||||||
|
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.id != undefined) {
|
if (this.form.docId) {
|
||||||
updateDocument(this.form).then(response => {
|
updateDocument(this.form).then(res => {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.$emit("submit");
|
this.$emit("submit");
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addDocument(this.form).then(response => {
|
addDocument(this.form).then(res => {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.confirmSubmit(response.data);
|
// this.confirmSubmit(response.data);
|
||||||
this.$emit("submit");
|
this.$emit("submit");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
testUpdate(docId){
|
/** 提交按钮 */
|
||||||
// 创建 formData 对象
|
assembleSubmit: function() {
|
||||||
const formData = new FormData()
|
let self = this
|
||||||
// 将所有 的 upload 组件中的文件对象放入到 FormData 对象中
|
let fileName = []
|
||||||
this.fileList.forEach((file) => {
|
//编辑时走该逻辑
|
||||||
formData.append('folder', file.raw)
|
if(this.form.docId && (this.fileList == null || this.fileList.length <= 0 )){
|
||||||
})
|
fileName = this.$refs.uploadFile.fileList[0]
|
||||||
formData.append('docId', '')
|
this.fileList = this.$refs.uploadFile.fileList
|
||||||
formData.append('requestId', this.generateUniqueID())
|
|
||||||
axios.post(process.env.VUE_APP_BASE_API + '/document/upload/folder', formData, {
|
|
||||||
headers: {
|
|
||||||
'Content-Type': 'multipart/form-data',
|
|
||||||
'Authorization': 'Bearer ' + getToken(),
|
|
||||||
}
|
|
||||||
}).then((response) => {
|
|
||||||
if(response.data.code===200){
|
|
||||||
this.$emit("submit");
|
|
||||||
}else{
|
}else{
|
||||||
// 弹框报错 response.data.message
|
fileName = this.fileList[0]
|
||||||
}
|
}
|
||||||
}).catch((error) => {
|
//判断是否有文件再上传
|
||||||
console.error('Failed to upload file:', error);
|
if (this.fileList.length == 0) {
|
||||||
});
|
return this.$message.warning('请选取文件后再上传')
|
||||||
},
|
|
||||||
confirmSubmit(docId) {
|
|
||||||
// 创建 formData 对象
|
|
||||||
const formData = new FormData()
|
|
||||||
// 将所有 的 upload 组件中的文件对象放入到 FormData 对象中
|
|
||||||
this.fileList.forEach((file) => {
|
|
||||||
formData.append('files', file.raw)
|
|
||||||
})
|
|
||||||
formData.append('docId', docId)
|
|
||||||
formData.append('requestId', this.generateUniqueID())
|
|
||||||
//自定义的接口也可以用ajax或者自己封装的接口
|
|
||||||
axios.post(process.env.VUE_APP_BASE_API + '/document/upload', formData, {
|
|
||||||
headers: {
|
|
||||||
'Content-Type': 'multipart/form-data',
|
|
||||||
'Authorization': 'Bearer ' + getToken(),
|
|
||||||
}
|
}
|
||||||
}).then((response) => {
|
/*this.fileList.map(file =>{
|
||||||
if(response.data.code===200){
|
this.form.docName = file.name
|
||||||
this.$emit("submit");
|
})*/
|
||||||
}else{
|
if(fileName){
|
||||||
// 弹框报错 response.data.message
|
this.$set(this.form,"docUrl", fileName.filePath)
|
||||||
|
this.$set(this.form,"docStatus", "ysc")
|
||||||
|
this.$set(this.form,"attachment", fileName)
|
||||||
|
}
|
||||||
|
if(this.toolDataInfo && this.toolDataInfo.length > 0){
|
||||||
|
this.$set(this.form,"toolId", this.toolDataInfo[0].toolId)
|
||||||
|
}
|
||||||
|
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
self.$emit("docSubmitData",self.form)
|
||||||
}
|
}
|
||||||
}).catch((error) => {
|
|
||||||
console.error('Failed to upload file:', error);
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 查询部门下拉树结构 */
|
/** 查询部门下拉树结构 */
|
||||||
@@ -354,20 +350,57 @@
|
|||||||
},
|
},
|
||||||
// flag 为true表示新增
|
// flag 为true表示新增
|
||||||
getData(data, flag, index) {
|
getData(data, flag, index) {
|
||||||
console.info("data============", data)
|
|
||||||
console.info("flag============", flag)
|
|
||||||
console.info("index============", index)
|
|
||||||
},
|
},
|
||||||
getError(message) {
|
getError(message) {
|
||||||
this.$message.error(message);
|
this.$message.error(message);
|
||||||
},
|
},
|
||||||
handleUploadSuccess(response) {
|
handleUploadSuccess(res) {
|
||||||
alert('File uploaded successfully');
|
this.fileList = []
|
||||||
|
this.fileList.push(res)
|
||||||
// 处理上传成功后的逻辑
|
// 处理上传成功后的逻辑
|
||||||
},
|
},
|
||||||
handleUploadError(error) {
|
handleUploadError(error) {
|
||||||
alert('Failed to upload file');
|
|
||||||
// 处理上传失败后的逻辑
|
// 处理上传失败后的逻辑
|
||||||
|
},
|
||||||
|
toolSelect(){
|
||||||
|
this.$refs.selectHeadTool.blur();
|
||||||
|
this.$nextTick(()=>{
|
||||||
|
this.$refs.toolSelect.init(null,null,false)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
selectHandle(source,index,data){
|
||||||
|
this.toolDataInfo = []
|
||||||
|
let toolInfo = {toolId:data.toolId,toolCode:data.toolCode,toolName:data.toolName}
|
||||||
|
this.toolDataInfo.push(toolInfo)
|
||||||
|
},
|
||||||
|
/**初始化 **/
|
||||||
|
resetForm() {
|
||||||
|
this.$refs.form.resetFields();
|
||||||
|
this.toolDataInfo = []
|
||||||
|
this.fileList = []
|
||||||
|
this.$nextTick(()=>{
|
||||||
|
this.$refs.uploadFile.clearFile();
|
||||||
|
})
|
||||||
|
},
|
||||||
|
editInit(docId, type){
|
||||||
|
this.$refs.form.resetFields();
|
||||||
|
this.toolDataInfo = []
|
||||||
|
this.$nextTick(()=>{
|
||||||
|
this.$refs.uploadFile.clearFile();
|
||||||
|
|
||||||
|
getDocument(docId).then(res => {
|
||||||
|
this.form = res.data
|
||||||
|
this.toolDataInfo = []
|
||||||
|
let toolInfo = {toolId:this.form.toolId,toolName:this.form.toolName}
|
||||||
|
this.toolDataInfo.push(toolInfo)
|
||||||
|
|
||||||
|
this.dataFile = []
|
||||||
|
let fileData = res.data.attachment
|
||||||
|
this.$set(fileData, "name", fileData.fileOldName)
|
||||||
|
this.$set(fileData, "size", fileData.fileSize)
|
||||||
|
this.dataFile.push(fileData)
|
||||||
|
});
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,18 +1,78 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-card>
|
<el-card>
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
||||||
<div class="search">
|
<div class="search">
|
||||||
<div class="sl">
|
<div class="sl">
|
||||||
<el-form-item label="文档名称" prop="roleName">
|
<el-form-item label="文档编号" prop="docCode">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.docCode"
|
||||||
|
placeholder="请输入文档名称"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="文档名称" prop="docName">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.docName"
|
v-model="queryParams.docName"
|
||||||
placeholder="请输入文档名称"
|
placeholder="请输入文档名称"
|
||||||
clearable
|
clearable
|
||||||
style="width: 240px"
|
|
||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="类别" prop="docType">
|
||||||
|
<el-select v-model="queryParams.docType" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.doc_class"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="负责人" prop="docPrincipals">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.docPrincipals"
|
||||||
|
placeholder="请输入负责人"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<!-- <el-form-item label="归属单位" prop="docRespDept">
|
||||||
|
<treeselect v-model="queryParams.docRespDept" :options="deptOptions"
|
||||||
|
placeholder="请选择归属单位"
|
||||||
|
:show-count="true" style="width: 150px"/>
|
||||||
|
</el-form-item>-->
|
||||||
|
<el-form-item label="来源" prop="docSource">
|
||||||
|
<el-select v-model="queryParams.docSource" placeholder="请选择" >
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.doc_source"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="状态" prop="docStatus">
|
||||||
|
<el-select v-model="queryParams.docStatus" placeholder="请选择" >
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.doc_upload_status"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="创建时间">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="dateRange"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
type="daterange"
|
||||||
|
range-separator="-"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期"
|
||||||
|
></el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
<div class="sr">
|
<div class="sr">
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
@@ -47,46 +107,76 @@
|
|||||||
icon="el-icon-upload2"
|
icon="el-icon-upload2"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="handleAdd"
|
@click="handleAdd"
|
||||||
|
v-hasPermi="['document:add']"
|
||||||
>上传文档</el-button>
|
>上传文档</el-button>
|
||||||
<el-button type="primary" icon="el-icon-position">发布</el-button>
|
<el-button type="primary" icon="el-icon-position" @click="handlePush" v-hasPermi="['document:push']">发布</el-button>
|
||||||
<el-button icon="el-icon-delete" @click="handleDelete">批量删除</el-button>
|
<el-button icon="el-icon-delete" @click="handleDelete" v-hasPermi="['document:batch:remove']">批量删除</el-button>
|
||||||
|
<el-button icon="el-icon-download" @click="handleOpenExport()" v-hasPermi="['document:export']">导出</el-button>
|
||||||
</div><!--operate 操作按钮-->
|
</div><!--operate 操作按钮-->
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="docList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="docList" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" :selectable="isSelectable"/>
|
||||||
<el-table-column label="文档编号" prop="docCode" width="120" />
|
<el-table-column label="文档编号" align="center" prop="docCode" width="120" />
|
||||||
<el-table-column label="文档名称" prop="docName" :show-overflow-tooltip="true" />
|
<el-table-column label="文档名称" align="center" prop="docName" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="类别" prop="docType" :show-overflow-tooltip="true" width="80" />
|
<el-table-column label="类别" align="center" prop="docType" :show-overflow-tooltip="true" width="80">
|
||||||
<el-table-column label="负责人" prop="docPrincipals" :show-overflow-tooltip="true" width="80" />
|
|
||||||
<el-table-column label="归属部门" prop="docRespDept" :show-overflow-tooltip="true" width="150" />
|
|
||||||
<el-table-column label="来源" prop="docSource" width="100" />
|
|
||||||
<el-table-column label="关联工具" prop="roleSort" width="100" />
|
|
||||||
<el-table-column label="上传状态" prop="docUploadProgress" width="100" >
|
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tag type="success" v-if="scope.row.docStatus == 'ysc'">已上传</el-tag>
|
<dict-tag :options="dict.type.doc_class" :value="scope.row.docType"/>
|
||||||
<el-tag type="danger" v-else>上传失败</el-tag>
|
</template>
|
||||||
|
</el-table-column>·
|
||||||
|
<el-table-column label="负责人" align="center" prop="docPrincipals" :show-overflow-tooltip="true" width="80" />
|
||||||
|
<el-table-column label="归属单位" align="center" prop="docRespDeptName" :show-overflow-tooltip="true" width="80" />
|
||||||
|
<el-table-column label="来源" align="center" prop="docSource" width="100">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.doc_source" :value="scope.row.docSource"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
<el-table-column label="关联工具" align="center" prop="toolName" width="100" />
|
||||||
|
<el-table-column label="上传状态" align="center" prop="docStatus" width="100" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.doc_upload_status" :value="scope.row.docStatus"/>
|
||||||
|
</template>
|
||||||
|
<!--
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-tag type="info" v-if="scope.row.docStatus == 'ysc'">已上传</el-tag>
|
||||||
|
<el-tag type="success" v-else-if="scope.row.docStatus == 'yfb'">已发布</el-tag>
|
||||||
|
<el-tag type="warning" v-else-if="scope.row.docStatus == 'shz'">审核中</el-tag>
|
||||||
|
</template>-->
|
||||||
|
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="创建时间" align="center" prop="createTime" width="180" :show-overflow-tooltip="true">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" width="180">
|
<el-table-column label="操作" align="center" width="180">
|
||||||
<template slot-scope="scope" v-if="scope.row.roleId !== 1">
|
<template slot-scope="scope" v-if="scope.row.roleId !== 1">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
v-if="scope.row.docStatus != 'yfb' && scope.row.docStatus != 'shz'"
|
||||||
|
@click="handleEdit(scope.row)"
|
||||||
|
v-hasPermi="['document:edit']"
|
||||||
|
>编辑</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-view"
|
icon="el-icon-view"
|
||||||
@click="handlePriew(scope.row)"
|
v-if="previewAuth(scope.row)"
|
||||||
|
@click="handlePreview(scope.row)"
|
||||||
|
v-hasPermi="['document:preview']"
|
||||||
>预览</el-button>
|
>预览</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
|
v-if="scope.row.docStatus != 'yfb' && scope.row.docStatus != 'shz'"
|
||||||
@click="handleDelete(scope.row)"
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['document:remove']"
|
||||||
>删除</el-button>
|
>删除</el-button>
|
||||||
<el-button type="text" icon="el-icon-download">下载</el-button>
|
<el-button type="text" icon="el-icon-download" @click="handleDownload(scope.row)"
|
||||||
|
v-hasPermi="['document:batch:remove']"
|
||||||
|
v-loading="loadingDownload">下载</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -132,18 +222,50 @@
|
|||||||
<span class="title">新增文档资源</span>
|
<span class="title">新增文档资源</span>
|
||||||
<div class="drawer-head-btn">
|
<div class="drawer-head-btn">
|
||||||
<el-button type="primary" @click="$refs.editDocumentRef.submitForm()">确 定</el-button>
|
<el-button type="primary" @click="$refs.editDocumentRef.submitForm()">确 定</el-button>
|
||||||
<el-button @click="$refs.editDocumentRef.cancel()">取 消</el-button>
|
<el-button @click="docCancel()">取 消</el-button>
|
||||||
</div><!--drawer-head-btn 抽屉顶部按钮区域-->
|
</div><!--drawer-head-btn 抽屉顶部按钮区域-->
|
||||||
</template>
|
</template>
|
||||||
<edit-document ref="editDocumentRef" @submit="editDocumentSubmit"/>
|
<edit-document ref="editDocumentRef" @submit="editDocumentSubmit"/>
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
|
|
||||||
<upload-progress/>
|
|
||||||
|
<!-- 工具导出对话框 -->
|
||||||
|
<el-drawer :visible.sync="exportDrawerOpen" size="75%" :show-close="false">
|
||||||
|
<template #title>
|
||||||
|
<span class="title">导出</span>
|
||||||
|
<div class="drawer-head-btn">
|
||||||
|
<el-button type="primary" @click="handleExport">提交</el-button>
|
||||||
|
<el-button @click="exportDrawerOpen=false">取消</el-button>
|
||||||
|
</div><!--drawer-head-btn 抽屉顶部按钮区域-->
|
||||||
|
</template>
|
||||||
|
<div class="el-form-border">
|
||||||
|
<el-form ref="form" label-width="200px">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="选择需要导出的字段信息">
|
||||||
|
<el-checkbox-group v-model="checkList">
|
||||||
|
<el-checkbox label="docCode">文档编号</el-checkbox>
|
||||||
|
<el-checkbox label="docName">文档名称</el-checkbox>
|
||||||
|
<el-checkbox label="docType">类别</el-checkbox>
|
||||||
|
<el-checkbox label="docPrincipals">负责人</el-checkbox>
|
||||||
|
<el-checkbox label="docRespDeptName">归属单位</el-checkbox>
|
||||||
|
<el-checkbox label="docSource">来源</el-checkbox>
|
||||||
|
<el-checkbox label="toolName">关联工具</el-checkbox>
|
||||||
|
<el-checkbox label="docStatus">上传状态</el-checkbox>
|
||||||
|
<el-checkbox label="createTime">创建时间</el-checkbox>
|
||||||
|
</el-checkbox-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form><!--el-form-->
|
||||||
|
</div><!--el-form-border 表单-->
|
||||||
|
</el-drawer><!--el-drawer 导出抽屉-->
|
||||||
|
<!-- <upload-progress/>-->
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listDocument, getDocument, delDocument, addDocument, updateDocument } from "@/api/document/document";
|
import { listDocument, getDocument, delDocument, addDocument, updateDocument,pushDoc } from "@/api/document/document";
|
||||||
import { deptTreeSelect } from "@/api/system/user";
|
import { deptTreeSelect } from "@/api/system/user";
|
||||||
import { documentTree,addCategory,updateCategory,delCategory,getCategory } from "@/api/documentCategory/documentCategory.js";
|
import { documentTree,addCategory,updateCategory,delCategory,getCategory } from "@/api/documentCategory/documentCategory.js";
|
||||||
|
|
||||||
@@ -153,10 +275,10 @@ import editDocument from "./editDocument";
|
|||||||
import uploadProgress from "./uploadProgress";
|
import uploadProgress from "./uploadProgress";
|
||||||
import { w3cwebsocket as WebSocket } from 'websocket';
|
import { w3cwebsocket as WebSocket } from 'websocket';
|
||||||
import Treeselect from "@riophae/vue-treeselect";
|
import Treeselect from "@riophae/vue-treeselect";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Document",
|
name: "Document",
|
||||||
components: { iFrame, editDocument, uploadProgress, Treeselect},
|
components: { iFrame, editDocument, uploadProgress, Treeselect},
|
||||||
|
dicts:['doc_class','doc_source','doc_upload_status'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
@@ -202,7 +324,13 @@ export default {
|
|||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
docName: undefined
|
docName: '',
|
||||||
|
docCode: '',
|
||||||
|
docType: '',
|
||||||
|
docPrincipals: '',
|
||||||
|
docSource: '',
|
||||||
|
docStatus: '',
|
||||||
|
docCategoryId: '',
|
||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {
|
form: {
|
||||||
@@ -243,6 +371,12 @@ export default {
|
|||||||
categoryDescription: null,
|
categoryDescription: null,
|
||||||
parentId: null
|
parentId: null
|
||||||
},
|
},
|
||||||
|
loadingDownload: false,
|
||||||
|
acceptType: "zip,rar,7z",
|
||||||
|
//导出属性
|
||||||
|
columnList: ['docCode', 'docName', 'docType', 'docPrincipals', 'docRespDeptName', 'docSource', 'toolName', 'docStatus', 'createTime'],
|
||||||
|
checkList: [],
|
||||||
|
exportDrawerOpen: false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@@ -270,18 +404,22 @@ export default {
|
|||||||
},
|
},
|
||||||
// 节点单击事件
|
// 节点单击事件
|
||||||
handleNodeClick(data) {
|
handleNodeClick(data) {
|
||||||
this.queryParams.toolRespDept = data.id;
|
this.queryParams.docCategoryId = data.id;
|
||||||
this.handleQuery();
|
this.handleQuery();
|
||||||
},
|
},
|
||||||
/** 查询列表 */
|
/** 查询列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
let self = this
|
||||||
|
self.loading = true;
|
||||||
listDocument(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
|
listDocument(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
|
||||||
this.docList = response.rows;
|
self.docList = response.rows;
|
||||||
this.total = response.total;
|
self.total = response.total;
|
||||||
this.loading = false;
|
self.loading = false;
|
||||||
}
|
}
|
||||||
);
|
).catch(err=>{
|
||||||
|
console.error("getList=======", err)
|
||||||
|
self.loading = false;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
@@ -291,15 +429,24 @@ export default {
|
|||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.dateRange = [];
|
this.dateRange = [];
|
||||||
|
this.queryParams.docCategoryId = '';
|
||||||
this.resetForm("queryForm");
|
this.resetForm("queryForm");
|
||||||
this.handleQuery();
|
this.handleQuery();
|
||||||
},
|
},
|
||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.open = true
|
this.open = true
|
||||||
|
this.$nextTick(()=>{
|
||||||
|
this.$refs.editDocumentRef.resetForm();
|
||||||
|
})
|
||||||
},
|
},
|
||||||
handlePriew(row){
|
handleEdit(row){
|
||||||
console.log('mmmmmmmmmmm',process.env.VUE_APP_BASE_API + row.docUrl)
|
this.open = true
|
||||||
|
this.$nextTick(()=>{
|
||||||
|
this.$refs.editDocumentRef.editInit(row.docId, "edit");
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handlePreview(row){
|
||||||
this.previewUrl = process.env.VUE_APP_TOOL_TECH_FILE_VIEW_API + '/onlinePreview?url=' + encodeURIComponent(Base64.encode(process.env.VUE_APP_BASE_API + row.docUrl));
|
this.previewUrl = process.env.VUE_APP_TOOL_TECH_FILE_VIEW_API + '/onlinePreview?url=' + encodeURIComponent(Base64.encode(process.env.VUE_APP_BASE_API + row.docUrl));
|
||||||
this.viewDialogTitle = '文档在线预览'
|
this.viewDialogTitle = '文档在线预览'
|
||||||
this.viewDialogOpen = true;
|
this.viewDialogOpen = true;
|
||||||
@@ -322,11 +469,10 @@ export default {
|
|||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.$modal.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
}).catch(() => {});
|
}).catch((err) => {console.error(err)});
|
||||||
},
|
},
|
||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
handleDocCategoryAdd(data) {
|
handleDocCategoryAdd(data) {
|
||||||
console.info("data================", data)
|
|
||||||
this.docCategoryOpen = true;
|
this.docCategoryOpen = true;
|
||||||
// this.docCategoryForm.parentId = data.id;
|
// this.docCategoryForm.parentId = data.id;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
@@ -343,7 +489,7 @@ export default {
|
|||||||
this.getDocumentTree();
|
this.getDocumentTree();
|
||||||
this.$modal.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
console.info("err============", err)
|
console.error("err============", err)
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
@@ -385,7 +531,71 @@ export default {
|
|||||||
/** 重置 **/
|
/** 重置 **/
|
||||||
resetDocCategoryForm(){
|
resetDocCategoryForm(){
|
||||||
this.$refs.docCategoryForm.resetFields();
|
this.$refs.docCategoryForm.resetFields();
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 处理下载
|
||||||
|
* **/
|
||||||
|
handleDownload(row){
|
||||||
|
let self = this
|
||||||
|
self.loadingDownload = true
|
||||||
|
this.$download.resource(row.docUrl);
|
||||||
|
setTimeout(()=>{
|
||||||
|
self.loadingDownload = false
|
||||||
|
},1000)
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handlePush(row) {
|
||||||
|
const docIds = row.docId || this.ids;
|
||||||
|
this.$modal.confirm('是否确认发布?').then(function() {
|
||||||
|
return pushDoc(docIds);
|
||||||
|
}).then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("发布成功");
|
||||||
|
}).catch((err) => {
|
||||||
|
console.error(err)
|
||||||
|
});
|
||||||
|
},
|
||||||
|
docCancel(){
|
||||||
|
this.$refs.editDocumentRef.resetForm();
|
||||||
|
this.open = false
|
||||||
|
},
|
||||||
|
previewAuth(row){
|
||||||
|
if(row.docUrl == null || row.docUrl == '' || row.docUrl == undefined){
|
||||||
|
return false
|
||||||
}
|
}
|
||||||
|
let extension = this.getExtension(row.docUrl);
|
||||||
|
const acceptedExtensions = this.acceptType.toLowerCase().split(',');
|
||||||
|
if(acceptedExtensions.includes(extension)){
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
},
|
||||||
|
getExtension(filePath) {
|
||||||
|
// 分割字符串,以 '.' 为分隔符
|
||||||
|
const parts = filePath.split('.');
|
||||||
|
// 取最后一个部分作为后缀名
|
||||||
|
const extension = parts.pop();
|
||||||
|
return extension;
|
||||||
|
},
|
||||||
|
isSelectable(row) {
|
||||||
|
return row.docStatus !== 'yfb' && row.docStatus !== 'shz';
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleOpenExport() {
|
||||||
|
if (this.checkList.length<1) {
|
||||||
|
this.checkList = JSON.parse(JSON.stringify(this.columnList))
|
||||||
|
}
|
||||||
|
this.exportDrawerOpen = true
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
let excludeFields = this.columnList.filter(item=>!this.checkList.includes(item))
|
||||||
|
this.download('/document/export', {
|
||||||
|
...this.queryParams,
|
||||||
|
downloadCheck:false,
|
||||||
|
excludeFields:excludeFields,
|
||||||
|
}, `文档资源信息数据_${new Date().getTime()}.xlsx`)
|
||||||
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -155,7 +155,6 @@ import { getToken } from "@/utils/auth";
|
|||||||
import { Base64 } from 'js-base64'
|
import { Base64 } from 'js-base64'
|
||||||
import Treeselect from "@riophae/vue-treeselect";
|
import Treeselect from "@riophae/vue-treeselect";
|
||||||
import blUserSelector from "@/components/user-selector/src/user-selector";
|
import blUserSelector from "@/components/user-selector/src/user-selector";
|
||||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
||||||
import toolDetail from "./toolDetail";
|
import toolDetail from "./toolDetail";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|||||||
392
src/views/system/bizdict/data.vue
Normal file
392
src/views/system/bizdict/data.vue
Normal file
@@ -0,0 +1,392 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-card>
|
||||||
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
|
<el-form-item label="字典名称" prop="dictType">
|
||||||
|
<el-select v-model="queryParams.dictType">
|
||||||
|
<el-option
|
||||||
|
v-for="item in typeOptions"
|
||||||
|
:key="item.dictId"
|
||||||
|
:label="item.dictName"
|
||||||
|
:value="item.dictType"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="字典标签" prop="dictLabel">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.dictLabel"
|
||||||
|
placeholder="请输入字典标签"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="状态" prop="status">
|
||||||
|
<el-select v-model="queryParams.status" placeholder="数据状态" clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.sys_normal_disable"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<el-card class="lrtt">
|
||||||
|
<div class="rt">
|
||||||
|
<div class="operate">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="el-icon-plus"
|
||||||
|
size="mini"
|
||||||
|
@click="handleAdd"
|
||||||
|
v-hasPermi="['system:dict:add']"
|
||||||
|
>新增</el-button>
|
||||||
|
<el-button
|
||||||
|
plain
|
||||||
|
icon="el-icon-edit"
|
||||||
|
size="mini"
|
||||||
|
:disabled="single"
|
||||||
|
@click="handleUpdate"
|
||||||
|
v-hasPermi="['system:dict:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
<el-button
|
||||||
|
plain
|
||||||
|
icon="el-icon-delete"
|
||||||
|
size="mini"
|
||||||
|
:disabled="multiple"
|
||||||
|
@click="handleDelete"
|
||||||
|
v-hasPermi="['system:dict:remove']"
|
||||||
|
>删除</el-button>
|
||||||
|
<el-button
|
||||||
|
plain
|
||||||
|
icon="el-icon-download"
|
||||||
|
size="mini"
|
||||||
|
@click="handleExport"
|
||||||
|
v-hasPermi="['system:dict:export']"
|
||||||
|
>导出</el-button>
|
||||||
|
<el-button
|
||||||
|
plain
|
||||||
|
icon="el-icon-close"
|
||||||
|
size="mini"
|
||||||
|
@click="handleClose"
|
||||||
|
>关闭</el-button>
|
||||||
|
</div>
|
||||||
|
<el-table v-loading="loading" :data="dataList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column label="字典编码" align="center" prop="dictCode" />
|
||||||
|
<el-table-column label="字典标签" align="center" prop="dictLabel">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span v-if="(scope.row.listClass == '' || scope.row.listClass == 'default') && (scope.row.cssClass == '' || scope.row.cssClass == null)">{{ scope.row.dictLabel }}</span>
|
||||||
|
<el-tag v-else :type="scope.row.listClass == 'primary' ? '' : scope.row.listClass" :class="scope.row.cssClass">{{ scope.row.dictLabel }}</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="字典键值" align="center" prop="dictValue" />
|
||||||
|
<el-table-column label="字典排序" align="center" prop="dictSort" />
|
||||||
|
<el-table-column label="状态" align="center" prop="status">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
v-hasPermi="['system:dict:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['system:dict:remove']"
|
||||||
|
>删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<!-- 添加或修改参数配置对话框 -->
|
||||||
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
|
<el-form-item label="字典类型">
|
||||||
|
<el-input v-model="form.dictType" :disabled="true" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="数据标签" prop="dictLabel">
|
||||||
|
<el-input v-model="form.dictLabel" placeholder="请输入数据标签" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="数据键值" prop="dictValue">
|
||||||
|
<el-input v-model="form.dictValue" placeholder="请输入数据键值" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="样式属性" prop="cssClass">
|
||||||
|
<el-input v-model="form.cssClass" placeholder="请输入样式属性" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="显示排序" prop="dictSort">
|
||||||
|
<el-input-number v-model="form.dictSort" controls-position="right" :min="0" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="回显样式" prop="listClass">
|
||||||
|
<el-select v-model="form.listClass">
|
||||||
|
<el-option
|
||||||
|
v-for="item in listClassOptions"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label + '(' + item.value + ')'"
|
||||||
|
:value="item.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="状态" prop="status">
|
||||||
|
<el-radio-group v-model="form.status">
|
||||||
|
<el-radio
|
||||||
|
v-for="dict in dict.type.sys_normal_disable"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.value"
|
||||||
|
>{{dict.label}}</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="备注" prop="remark">
|
||||||
|
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listData, getData, delData, addData, updateData } from "@/api/system/dict/data";
|
||||||
|
import { optionselect as getDictOptionselect, getType } from "@/api/system/dict/type";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "Data",
|
||||||
|
dicts: ['sys_normal_disable'],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 字典表格数据
|
||||||
|
dataList: [],
|
||||||
|
// 默认字典类型
|
||||||
|
defaultDictType: "",
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 数据标签回显样式
|
||||||
|
listClassOptions: [
|
||||||
|
{
|
||||||
|
value: "default",
|
||||||
|
label: "默认"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: "primary",
|
||||||
|
label: "主要"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: "success",
|
||||||
|
label: "成功"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: "info",
|
||||||
|
label: "信息"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: "warning",
|
||||||
|
label: "警告"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: "danger",
|
||||||
|
label: "危险"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
// 类型数据字典
|
||||||
|
typeOptions: [],
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
dictType: undefined,
|
||||||
|
dictLabel: undefined,
|
||||||
|
status: undefined
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
dictLabel: [
|
||||||
|
{ required: true, message: "数据标签不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
dictValue: [
|
||||||
|
{ required: true, message: "数据键值不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
dictSort: [
|
||||||
|
{ required: true, message: "数据顺序不能为空", trigger: "blur" }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
const dictId = this.$route.params && this.$route.params.dictId;
|
||||||
|
this.getType(dictId);
|
||||||
|
this.getTypeList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询字典类型详细 */
|
||||||
|
getType(dictId) {
|
||||||
|
getType(dictId).then(response => {
|
||||||
|
this.queryParams.dictType = response.data.dictType;
|
||||||
|
this.defaultDictType = response.data.dictType;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 查询字典类型列表 */
|
||||||
|
getTypeList() {
|
||||||
|
getDictOptionselect().then(response => {
|
||||||
|
this.typeOptions = response.data;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 查询字典数据列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
listData(this.queryParams).then(response => {
|
||||||
|
this.dataList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
dictCode: undefined,
|
||||||
|
dictLabel: undefined,
|
||||||
|
dictValue: undefined,
|
||||||
|
cssClass: undefined,
|
||||||
|
listClass: 'default',
|
||||||
|
dictSort: 0,
|
||||||
|
status: "0",
|
||||||
|
remark: undefined
|
||||||
|
};
|
||||||
|
this.resetForm("form");
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 返回按钮操作 */
|
||||||
|
handleClose() {
|
||||||
|
const obj = { path: "/system/dict" };
|
||||||
|
this.$tab.closeOpenPage(obj);
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.queryParams.dictType = this.defaultDictType;
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
handleAdd() {
|
||||||
|
this.reset();
|
||||||
|
this.open = true;
|
||||||
|
this.title = "添加字典数据";
|
||||||
|
this.form.dictType = this.queryParams.dictType;
|
||||||
|
},
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map(item => item.dictCode)
|
||||||
|
this.single = selection.length!=1
|
||||||
|
this.multiple = !selection.length
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.reset();
|
||||||
|
const dictCode = row.dictCode || this.ids
|
||||||
|
getData(dictCode).then(response => {
|
||||||
|
this.form = response.data;
|
||||||
|
this.open = true;
|
||||||
|
this.title = "修改字典数据";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm: function() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.form.dictCode != undefined) {
|
||||||
|
updateData(this.form).then(response => {
|
||||||
|
this.$store.dispatch('dict/removeDict', this.queryParams.dictType);
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
addData(this.form).then(response => {
|
||||||
|
this.$store.dispatch('dict/removeDict', this.queryParams.dictType);
|
||||||
|
this.$modal.msgSuccess("新增成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
const dictCodes = row.dictCode || this.ids;
|
||||||
|
this.$modal.confirm('是否确认删除字典编码为"' + dictCodes + '"的数据项?').then(function() {
|
||||||
|
return delData(dictCodes);
|
||||||
|
}).then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
this.$store.dispatch('dict/removeDict', this.queryParams.dictType);
|
||||||
|
}).catch(() => {});
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
this.download('system/dict/data/export', {
|
||||||
|
...this.queryParams
|
||||||
|
}, `data_${new Date().getTime()}.xlsx`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
341
src/views/system/bizdict/index.vue
Normal file
341
src/views/system/bizdict/index.vue
Normal file
@@ -0,0 +1,341 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-card>
|
||||||
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
|
<el-form-item label="字典名称" prop="dictName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.dictName"
|
||||||
|
placeholder="请输入字典名称"
|
||||||
|
clearable
|
||||||
|
style="width: 240px"
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="字典类型" prop="dictType">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.dictType"
|
||||||
|
placeholder="请输入字典类型"
|
||||||
|
clearable
|
||||||
|
style="width: 240px"
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="状态" prop="status">
|
||||||
|
<el-select
|
||||||
|
v-model="queryParams.status"
|
||||||
|
placeholder="字典状态"
|
||||||
|
clearable
|
||||||
|
style="width: 240px"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.sys_normal_disable"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="创建时间">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="dateRange"
|
||||||
|
style="width: 240px"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
type="daterange"
|
||||||
|
range-separator="-"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期"
|
||||||
|
></el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<el-card class="lrtt">
|
||||||
|
<div class="rt">
|
||||||
|
<div class="operate">
|
||||||
|
<!--
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="el-icon-plus"
|
||||||
|
size="mini"
|
||||||
|
@click="handleAdd"
|
||||||
|
v-hasPermi="['system:dict:add']"
|
||||||
|
>新增</el-button>
|
||||||
|
<el-button
|
||||||
|
plain
|
||||||
|
icon="el-icon-edit"
|
||||||
|
size="mini"
|
||||||
|
:disabled="single"
|
||||||
|
@click="handleUpdate"
|
||||||
|
v-hasPermi="['system:dict:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
<el-button
|
||||||
|
plain
|
||||||
|
icon="el-icon-delete"
|
||||||
|
size="mini"
|
||||||
|
:disabled="multiple"
|
||||||
|
@click="handleDelete"
|
||||||
|
v-hasPermi="['system:dict:remove']"
|
||||||
|
>删除</el-button>-->
|
||||||
|
<!--
|
||||||
|
<el-button
|
||||||
|
plain
|
||||||
|
icon="el-icon-download"
|
||||||
|
size="mini"
|
||||||
|
@click="handleExport"
|
||||||
|
v-hasPermi="['system:dict:export']"
|
||||||
|
>导出</el-button>-->
|
||||||
|
<el-button
|
||||||
|
plain
|
||||||
|
icon="el-icon-refresh"
|
||||||
|
size="mini"
|
||||||
|
@click="handleRefreshCache"
|
||||||
|
v-hasPermi="['system:dict:remove']"
|
||||||
|
>刷新缓存</el-button>
|
||||||
|
</div>
|
||||||
|
<el-table v-loading="loading" :data="typeList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column label="字典编号" align="center" prop="dictId" />
|
||||||
|
<el-table-column label="字典名称" align="center" prop="dictName" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="字典类型" align="center" :show-overflow-tooltip="true">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<router-link :to="'/system/dict-data/index/' + scope.row.dictId" class="link-type">
|
||||||
|
<span>{{ scope.row.dictType }}</span>
|
||||||
|
</router-link>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="状态" align="center" prop="status">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<!--
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
v-hasPermi="['system:dict:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['system:dict:remove']"
|
||||||
|
>删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
-->
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<!-- 添加或修改参数配置对话框 -->
|
||||||
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
|
<el-form-item label="字典名称" prop="dictName">
|
||||||
|
<el-input v-model="form.dictName" placeholder="请输入字典名称" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="字典类型" prop="dictType">
|
||||||
|
<el-input v-model="form.dictType" placeholder="请输入字典类型" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="状态" prop="status">
|
||||||
|
<el-radio-group v-model="form.status">
|
||||||
|
<el-radio
|
||||||
|
v-for="dict in dict.type.sys_normal_disable"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.value"
|
||||||
|
>{{dict.label}}</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="备注" prop="remark">
|
||||||
|
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { bizListType, getType, delType, addType, updateType, refreshCache } from "@/api/system/dict/type";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "Dict",
|
||||||
|
dicts: ['sys_normal_disable'],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 字典表格数据
|
||||||
|
typeList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 日期范围
|
||||||
|
dateRange: [],
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
dictName: undefined,
|
||||||
|
dictType: undefined,
|
||||||
|
status: undefined
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
dictName: [
|
||||||
|
{ required: true, message: "字典名称不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
dictType: [
|
||||||
|
{ required: true, message: "字典类型不能为空", trigger: "blur" }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询字典类型列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
bizListType(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
|
||||||
|
this.typeList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
dictId: undefined,
|
||||||
|
dictName: undefined,
|
||||||
|
dictType: undefined,
|
||||||
|
status: "0",
|
||||||
|
remark: undefined
|
||||||
|
};
|
||||||
|
this.resetForm("form");
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.dateRange = [];
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
handleAdd() {
|
||||||
|
this.reset();
|
||||||
|
this.open = true;
|
||||||
|
this.title = "添加字典类型";
|
||||||
|
},
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map(item => item.dictId)
|
||||||
|
this.single = selection.length!=1
|
||||||
|
this.multiple = !selection.length
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.reset();
|
||||||
|
const dictId = row.dictId || this.ids
|
||||||
|
getType(dictId).then(response => {
|
||||||
|
this.form = response.data;
|
||||||
|
this.open = true;
|
||||||
|
this.title = "修改字典类型";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm: function() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.form.dictId != undefined) {
|
||||||
|
updateType(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
addType(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("新增成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
const dictIds = row.dictId || this.ids;
|
||||||
|
this.$modal.confirm('是否确认删除字典编号为"' + dictIds + '"的数据项?').then(function() {
|
||||||
|
return delType(dictIds);
|
||||||
|
}).then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
}).catch(() => {});
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
this.download('system/dict/type/export', {
|
||||||
|
...this.queryParams
|
||||||
|
}, `type_${new Date().getTime()}.xlsx`)
|
||||||
|
},
|
||||||
|
/** 刷新缓存按钮操作 */
|
||||||
|
handleRefreshCache() {
|
||||||
|
refreshCache().then(() => {
|
||||||
|
this.$modal.msgSuccess("刷新成功");
|
||||||
|
this.$store.dispatch('dict/cleanDict');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
@@ -159,7 +159,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import { listDept, getDept, delDept, addDept, updateDept, listDeptExcludeChild } from "@/api/system/dept";
|
import { listDept, getDept, delDept, addDept, updateDept, listDeptExcludeChild } from "@/api/system/dept";
|
||||||
import Treeselect from "@riophae/vue-treeselect";
|
import Treeselect from "@riophae/vue-treeselect";
|
||||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Dept",
|
name: "Dept",
|
||||||
|
|||||||
@@ -80,13 +80,14 @@
|
|||||||
@click="handleDelete"
|
@click="handleDelete"
|
||||||
v-hasPermi="['system:dict:remove']"
|
v-hasPermi="['system:dict:remove']"
|
||||||
>删除</el-button>
|
>删除</el-button>
|
||||||
|
<!--
|
||||||
<el-button
|
<el-button
|
||||||
plain
|
plain
|
||||||
icon="el-icon-download"
|
icon="el-icon-download"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="handleExport"
|
@click="handleExport"
|
||||||
v-hasPermi="['system:dict:export']"
|
v-hasPermi="['system:dict:export']"
|
||||||
>导出</el-button>
|
>导出</el-button>-->
|
||||||
<el-button
|
<el-button
|
||||||
plain
|
plain
|
||||||
icon="el-icon-refresh"
|
icon="el-icon-refresh"
|
||||||
|
|||||||
@@ -275,7 +275,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import { listMenu, getMenu, delMenu, addMenu, updateMenu } from "@/api/system/menu";
|
import { listMenu, getMenu, delMenu, addMenu, updateMenu } from "@/api/system/menu";
|
||||||
import Treeselect from "@riophae/vue-treeselect";
|
import Treeselect from "@riophae/vue-treeselect";
|
||||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
||||||
import IconSelect from "@/components/IconSelect";
|
import IconSelect from "@/components/IconSelect";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|||||||
@@ -79,13 +79,14 @@
|
|||||||
@click="handleDelete"
|
@click="handleDelete"
|
||||||
v-hasPermi="['system:role:remove']"
|
v-hasPermi="['system:role:remove']"
|
||||||
>删除</el-button>
|
>删除</el-button>
|
||||||
|
<!--
|
||||||
<el-button
|
<el-button
|
||||||
plain
|
plain
|
||||||
icon="el-icon-download"
|
icon="el-icon-download"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="handleExport"
|
@click="handleExport"
|
||||||
v-hasPermi="['system:role:export']"
|
v-hasPermi="['system:role:export']"
|
||||||
>导出</el-button>
|
>导出</el-button>-->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="roleList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="roleList" @selection-change="handleSelectionChange">
|
||||||
@@ -285,14 +286,16 @@ export default {
|
|||||||
value: "1",
|
value: "1",
|
||||||
label: "全部数据权限"
|
label: "全部数据权限"
|
||||||
},
|
},
|
||||||
|
/*
|
||||||
{
|
{
|
||||||
value: "2",
|
value: "2",
|
||||||
label: "自定数据权限"
|
label: "自定数据权限"
|
||||||
},
|
},*/
|
||||||
{
|
{
|
||||||
value: "3",
|
value: "3",
|
||||||
label: "本部门数据权限"
|
label: "本部门数据权限"
|
||||||
},
|
}
|
||||||
|
/*,
|
||||||
{
|
{
|
||||||
value: "4",
|
value: "4",
|
||||||
label: "本部门及以下数据权限"
|
label: "本部门及以下数据权限"
|
||||||
@@ -300,7 +303,7 @@ export default {
|
|||||||
{
|
{
|
||||||
value: "5",
|
value: "5",
|
||||||
label: "仅本人数据权限"
|
label: "仅本人数据权限"
|
||||||
}
|
}*/
|
||||||
],
|
],
|
||||||
// 菜单列表
|
// 菜单列表
|
||||||
menuOptions: [],
|
menuOptions: [],
|
||||||
|
|||||||
@@ -224,7 +224,6 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Treeselect from "@riophae/vue-treeselect";
|
import Treeselect from "@riophae/vue-treeselect";
|
||||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: { Treeselect },
|
components: { Treeselect },
|
||||||
|
|||||||
@@ -101,6 +101,7 @@
|
|||||||
@click="handleDelete"
|
@click="handleDelete"
|
||||||
v-hasPermi="['system:user:remove']"
|
v-hasPermi="['system:user:remove']"
|
||||||
>删除</el-button>
|
>删除</el-button>
|
||||||
|
<!--
|
||||||
<el-button
|
<el-button
|
||||||
plain
|
plain
|
||||||
icon="el-icon-upload2"
|
icon="el-icon-upload2"
|
||||||
@@ -114,7 +115,7 @@
|
|||||||
size="mini"
|
size="mini"
|
||||||
@click="handleExport"
|
@click="handleExport"
|
||||||
v-hasPermi="['system:user:export']"
|
v-hasPermi="['system:user:export']"
|
||||||
>导出</el-button>
|
>导出</el-button>-->
|
||||||
</div>
|
</div>
|
||||||
<el-table v-loading="loading" :data="userList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="userList" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="50" align="center" />
|
<el-table-column type="selection" width="50" align="center" />
|
||||||
@@ -261,7 +262,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="角色">
|
<el-form-item label="角色" prop="roleIds">
|
||||||
<el-select v-model="form.roleIds" multiple placeholder="请选择角色">
|
<el-select v-model="form.roleIds" multiple placeholder="请选择角色">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in roleOptions"
|
v-for="item in roleOptions"
|
||||||
@@ -325,7 +326,6 @@ import { listUser, getUser, delUser, addUser, updateUser, resetUserPwd, changeUs
|
|||||||
import { getToken } from "@/utils/auth";
|
import { getToken } from "@/utils/auth";
|
||||||
import { Base64 } from 'js-base64'
|
import { Base64 } from 'js-base64'
|
||||||
import Treeselect from "@riophae/vue-treeselect";
|
import Treeselect from "@riophae/vue-treeselect";
|
||||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "User",
|
name: "User",
|
||||||
@@ -412,6 +412,9 @@ export default {
|
|||||||
nickName: [
|
nickName: [
|
||||||
{ required: true, message: "用户昵称不能为空", trigger: "blur" }
|
{ required: true, message: "用户昵称不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
|
deptId: [
|
||||||
|
{ required: true, message: "归属部门不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
password: [
|
password: [
|
||||||
{ required: true, message: "用户密码不能为空", trigger: "blur" },
|
{ required: true, message: "用户密码不能为空", trigger: "blur" },
|
||||||
{ min: 5, max: 20, message: '用户密码长度必须介于 5 和 20 之间', trigger: 'blur' },
|
{ min: 5, max: 20, message: '用户密码长度必须介于 5 和 20 之间', trigger: 'blur' },
|
||||||
@@ -430,7 +433,10 @@ export default {
|
|||||||
message: "请输入正确的手机号码",
|
message: "请输入正确的手机号码",
|
||||||
trigger: "blur"
|
trigger: "blur"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
roleIds: [
|
||||||
|
{ required: true, message: "角色不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog title="新增文档" :visible.sync="visible" width="85%" append-to-body>
|
<el-dialog title="新增附件信息" :visible.sync="visible" width="85%" append-to-body>
|
||||||
<edit-document ref="editDocumentRef" :toolId="toolId" @submit="editDocumentSubmit"/>
|
<edit-document ref="editDocumentRef" :toolId="toolId" @docSubmitData="editDocumentSubmit" :relatedTool="false"/>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="$refs.editDocumentRef.submitForm()">确 定</el-button>
|
<el-button type="primary" @click="submitForm()">确 定</el-button>
|
||||||
<el-button @click="cancel()">取 消</el-button>
|
<el-button @click="cancel()">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@@ -26,7 +26,7 @@ export default {
|
|||||||
*/
|
*/
|
||||||
toolId: {
|
toolId: {
|
||||||
type: String,
|
type: String,
|
||||||
default: true
|
default: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -45,13 +45,19 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
editDocumentSubmit(){
|
editDocumentSubmit(data){
|
||||||
this.$emit('callback')
|
this.$emit("addFileData", data)
|
||||||
this.visible = false
|
this.visible = false
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
this.$refs.editDocumentRef.cancel()
|
this.$refs.editDocumentRef.cancel()
|
||||||
this.visible = false
|
this.visible = false
|
||||||
|
},
|
||||||
|
submitForm(){
|
||||||
|
this.$refs.editDocumentRef.assembleSubmit()
|
||||||
|
},
|
||||||
|
resetForm(){
|
||||||
|
this.$refs.editDocumentRef.resetForm()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-card>
|
<el-card>
|
||||||
<el-form label-width="80px" ref="queryForm">
|
<el-form :model="queryParams" label-width="80px" ref="queryForm">
|
||||||
<div class="grab" id="add">
|
<div class="grab" id="add">
|
||||||
<div class="search">
|
<div class="search">
|
||||||
<div class="sl">
|
<div class="sl">
|
||||||
@@ -50,7 +50,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="sr">
|
<div class="sr">
|
||||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="el-icon-refresh-left" @click="reset">重置</el-button>
|
<el-button icon="el-icon-refresh-left" @click="resetQuery">重置</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div><!--search 默认查询-->
|
</div><!--search 默认查询-->
|
||||||
</div><!--grab-->
|
</div><!--grab-->
|
||||||
@@ -58,7 +58,7 @@
|
|||||||
</el-card><!--el-card-->
|
</el-card><!--el-card-->
|
||||||
|
|
||||||
<el-card class="lrtt">
|
<el-card class="lrtt">
|
||||||
<div class="lt">
|
<div class="lt" v-hasPermi="['tool:org:tree']">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="deptName"
|
v-model="deptName"
|
||||||
placeholder="请输入部门名称"
|
placeholder="请输入部门名称"
|
||||||
@@ -87,30 +87,24 @@
|
|||||||
plain
|
plain
|
||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
@click="handleAdd"
|
@click="handleAdd"
|
||||||
v-hasPermi="['system:user:add']"
|
|
||||||
>工具发布</el-button>
|
>工具发布</el-button>
|
||||||
<!-- <el-button type="primary" icon="el-icon-position">发布</el-button> -->
|
<el-button icon="el-icon-delete" @click="handleDelete(selection)" v-hasPermi="['tool:batch:remove']">批量删除</el-button>
|
||||||
<!-- <el-button icon="el-icon-thumb" @click="applyUse()">申请使用</el-button> -->
|
<el-button icon="el-icon-download" @click="handleOpenExport()" v-hasPermi="['tool:export']">导出</el-button>
|
||||||
<el-button icon="el-icon-delete">批量删除</el-button>
|
|
||||||
<el-button icon="el-icon-download" @click="exoportDrawerOpen = true">导出</el-button>
|
|
||||||
</div><!--operate 操作按钮-->
|
</div><!--operate 操作按钮-->
|
||||||
<el-table v-loading="loading" :data="toolList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="toolList" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="50" align="center" />
|
<el-table-column type="selection" width="50" align="center" :selectable="selectable"/>
|
||||||
<el-table-column label="工具编号" align="center" key="toolCode" prop="toolCode" v-if="columns[0].visible" />
|
<el-table-column label="工具编号" align="center" key="toolCode" prop="toolCode" v-if="columns[0].visible" />
|
||||||
<el-table-column label="工具名称" align="center" key="toolName" prop="toolName" v-if="columns[1].visible" :show-overflow-tooltip="true" />
|
<el-table-column label="工具名称" align="center" key="toolName" prop="toolName" v-if="columns[1].visible" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="工具类别" align="center" key="toolType" prop="toolType" v-if="columns[2].visible" :show-overflow-tooltip="true" >
|
<el-table-column label="工具类别" align="center" key="toolType" prop="toolType" v-if="columns[2].visible" :show-overflow-tooltip="true" >
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<template v-for="dict in dict.type.tool_type">
|
<dict-tag :options="dict.type.tool_type" :value="scope.row.toolType"/>
|
||||||
<span v-if="scope.row.toolType == dict.value">{{ dict.label }}</span>
|
|
||||||
</template>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="部门" align="center" key="deptName" prop="dept.deptName" v-if="columns[3].visible" :show-overflow-tooltip="true" />
|
<el-table-column label="归属单位" align="center" key="toolRespDeptName" prop="toolRespDeptName" v-if="columns[3].visible" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="负责人" align="center" key="toolPrincipalsName" prop="toolPrincipalsName" v-if="columns[4].visible" width="120" />
|
<el-table-column label="负责人" align="center" key="toolPrincipalsName" prop="toolPrincipalsName" v-if="columns[4].visible" width="120" />
|
||||||
<el-table-column label="状态" align="center" key="status" v-if="columns[5].visible">
|
<el-table-column label="状态" align="center" key="status" v-if="columns[5].visible">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tag type="success" v-if="scope.row.status == '0'">正常</el-tag>
|
<dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/>
|
||||||
<el-tag type="info" v-if="scope.row.status == '1'">禁用</el-tag>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="创建时间" align="center" prop="createTime" v-if="columns[6].visible" width="160">
|
<el-table-column label="创建时间" align="center" prop="createTime" v-if="columns[6].visible" width="160">
|
||||||
@@ -125,16 +119,14 @@
|
|||||||
class-name="small-padding fixed-width"
|
class-name="small-padding fixed-width"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button type="text" icon="el-icon-info" @click="applyUse(scope.row)">申请使用</el-button>
|
<el-button type="text" icon="el-icon-info" v-if="scope.row.recordStatus=='done'" @click="applyUse(scope.row)">申请使用</el-button>
|
||||||
<el-button type="text" icon="el-icon-info" @click="handleDetail(scope.row)">详情</el-button>
|
<el-button type="text" icon="el-icon-info" @click="handleDetail(scope.row)">详情</el-button>
|
||||||
<el-button type="text" icon="el-icon-download">下载</el-button>
|
<el-button type="text" icon="el-icon-download" v-if="scope.row.downloadStatus">下载</el-button>
|
||||||
<el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['tool:edit', 'tool:remove']">
|
<el-dropdown size="mini" v-if="selectable(scope.row)" @command="(command) => handleCommand(command, scope.row)">
|
||||||
<el-button size="mini" type="text" icon="el-icon-d-arrow-right" >更多</el-button>
|
<el-button size="mini" type="text" icon="el-icon-d-arrow-right" >更多</el-button>
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<el-dropdown-item command="handleUpdate" icon="el-icon-edit"
|
<el-dropdown-item command="handleUpdate" icon="el-icon-edit">编辑</el-dropdown-item>
|
||||||
v-hasPermi="['tool:edit']">编辑</el-dropdown-item>
|
<el-dropdown-item command="handleDelete" icon="el-icon-delete">删除</el-dropdown-item>
|
||||||
<el-dropdown-item command="handleDelete" icon="el-icon-delete"
|
|
||||||
v-hasPermi="['tool:remove']">删除</el-dropdown-item>
|
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
</template>
|
</template>
|
||||||
@@ -150,215 +142,13 @@
|
|||||||
</div><!--rt 右-->
|
</div><!--rt 右-->
|
||||||
</el-card><!--el-card-->
|
</el-card><!--el-card-->
|
||||||
|
|
||||||
<!-- 添加或修改工具信息对话框 -->
|
|
||||||
<el-drawer :visible.sync="addDrawerOpen" size="75%" @open="openEvent">
|
|
||||||
<template #title>
|
|
||||||
<span>新增工具</span>
|
|
||||||
<div class="drawer-head-btn">
|
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
||||||
<el-button @click="cancel">取 消</el-button>
|
|
||||||
</div><!--drawer-head-btn 抽屉顶部按钮区域-->
|
|
||||||
</template>
|
|
||||||
<div class="el-form-border">
|
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="150px">
|
|
||||||
<div>
|
|
||||||
<div class="box-title">
|
|
||||||
基本信息
|
|
||||||
</div>
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="工具编号" prop="toolCode">
|
|
||||||
<el-input v-model="form.toolCode" placeholder="请输入工具编号"/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="工具名称" prop="toolName">
|
|
||||||
<el-input v-model="form.toolName" placeholder="请输入工具名称"/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="负责人" prop="toolPrincipals">
|
|
||||||
<el-input v-model="form.toolPrincipalsName" placeholder="请选择负责人" maxlength="11" @focus="toolPrincipalsChoose = true"/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="归属部门" prop="toolRespDept">
|
|
||||||
<treeselect v-model="form.toolRespDept" :options="deptOptions" :show-count="true" placeholder="请选择归属部门" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
</el-row>
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="工具来源" prop="toolSource">
|
|
||||||
<el-input v-model="form.toolSource" placeholder="请输入工具来源"/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="工具用途" prop="toolUse">
|
|
||||||
<el-input v-model="form.toolUse" placeholder="请输入工具用途" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="工具类别">
|
|
||||||
<el-select v-model="form.toolType" placeholder="请选择工具类别" style="width: 100%">
|
|
||||||
<el-option
|
|
||||||
v-for="dict in dict.type.tool_type"
|
|
||||||
:key="dict.value"
|
|
||||||
:label="dict.label"
|
|
||||||
:value="dict.value"
|
|
||||||
></el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="状态">
|
|
||||||
<el-radio-group v-model="form.status">
|
|
||||||
<el-radio
|
|
||||||
v-for="dict in dict.type.sys_normal_disable"
|
|
||||||
:key="dict.value"
|
|
||||||
:label="dict.value"
|
|
||||||
>{{dict.label}}</el-radio>
|
|
||||||
</el-radio-group>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="测试情况">
|
|
||||||
<el-input v-model="form.testSituation" type="textarea" :rows="3" maxlength="500" show-word-limit></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="功能描述">
|
|
||||||
<el-input v-model="form.functionDesc" type="textarea" :rows="3" maxlength="500" show-word-limit></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="适用条件">
|
|
||||||
<el-input v-model="form.applyCondition" type="textarea" :rows="3" maxlength="500" show-word-limit></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="操作说明">
|
|
||||||
<el-input v-model="form.operateExplain" type="textarea" :rows="3" maxlength="500" show-word-limit></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="备注">
|
|
||||||
<el-input v-model="form.remark" type="textarea" :rows="3" maxlength="500" show-word-limit></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<div class="box-title">
|
|
||||||
关联附件
|
|
||||||
</div>
|
|
||||||
<div class="operate">
|
|
||||||
<el-button type="primary" icon="el-icon-upload2" @click="handleDocAdd">上传</el-button>
|
|
||||||
<el-button icon="el-icon-delete">删除</el-button>
|
|
||||||
</div><!--operate 操作按钮-->
|
|
||||||
<el-table :data="docList" style="width: 100%">
|
|
||||||
<el-table-column type="selection" width="50" align="center"> </el-table-column>
|
|
||||||
<el-table-column label="文档名称" prop="docName" :show-overflow-tooltip="true" />
|
|
||||||
<el-table-column label="类别" prop="docType" :show-overflow-tooltip="true" width="80" />
|
|
||||||
<el-table-column label="负责人" prop="docPrincipals" :show-overflow-tooltip="true" width="80" />
|
|
||||||
<el-table-column label="归属部门" prop="docRespDept" :show-overflow-tooltip="true" width="150" />
|
|
||||||
<el-table-column label="来源" prop="docSource" width="100" />
|
|
||||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="操作" align="center" width="180">
|
|
||||||
<template slot-scope="scope" v-if="scope.row.roleId !== 1">
|
|
||||||
<el-button
|
|
||||||
size="mini"
|
|
||||||
type="text"
|
|
||||||
icon="el-icon-view"
|
|
||||||
@click="handlePriew(scope.row)"
|
|
||||||
>预览</el-button>
|
|
||||||
<el-button
|
|
||||||
size="mini"
|
|
||||||
type="text"
|
|
||||||
icon="el-icon-delete"
|
|
||||||
@click="handleDelete(scope.row)"
|
|
||||||
>删除</el-button>
|
|
||||||
<el-button type="text" icon="el-icon-download">下载</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table><!--el-table-->
|
|
||||||
</div>
|
|
||||||
</el-form>
|
|
||||||
<!-- 上传 -->
|
|
||||||
<AddDoc :show.sync="addDocShow" toolId="1111" @callback="openEvent"/>
|
|
||||||
</div><!--el-form-border 表单-->
|
|
||||||
</el-drawer><!--el-drawer 新增抽屉-->
|
|
||||||
|
|
||||||
<!-- 工具申请使用对话框 -->
|
|
||||||
<el-drawer :visible.sync="applyDrawerOpen" size="75%">
|
|
||||||
<template #title>
|
|
||||||
<span>申请使用</span>
|
|
||||||
<div class="drawer-head-btn">
|
|
||||||
<el-button type="primary" icon="el-icon-check" @click="submitApply()">提交</el-button>
|
|
||||||
<el-button icon="el-icon-close" @click="cancelApply()">取消</el-button>
|
|
||||||
</div><!--drawer-head-btn 抽屉顶部按钮区域-->
|
|
||||||
</template>
|
|
||||||
<div class="el-form-border">
|
|
||||||
<el-form ref="form" label-width="150px">
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="申请人" required>
|
|
||||||
<el-input placeholder="张莹" ></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="申请部门" required>信息部</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="申请理由">
|
|
||||||
<el-input type="textarea" :rows="4" maxlength="1000" show-word-limit></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form><!--el-form-->
|
|
||||||
</div><!--el-form-border 表单-->
|
|
||||||
<div class="divide double"></div><!--divide 分隔-->
|
|
||||||
<div class="tboper">
|
|
||||||
<div class="tit">申请使用工具列表</div>
|
|
||||||
</div><!--tboper 标题与操作按钮-->
|
|
||||||
<el-table :data="tableData2" style="width: 100%">
|
|
||||||
<el-table-column prop="prop1" label="工具编号"></el-table-column>
|
|
||||||
<el-table-column prop="prop2" label="工具名称"></el-table-column>
|
|
||||||
<el-table-column prop="prop5" label="工具类别" ></el-table-column>
|
|
||||||
<el-table-column prop="prop3" label="归属单位" width="180"> </el-table-column>
|
|
||||||
<el-table-column prop="prop4" label="负责人" width="100" ></el-table-column>
|
|
||||||
<el-table-column label="操作" width="100">
|
|
||||||
<el-button type="text">删除</el-button>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table><!--el-table-->
|
|
||||||
</el-drawer><!--el-drawer 申请使用-->
|
|
||||||
|
|
||||||
<!-- 工具导出对话框 -->
|
<!-- 工具导出对话框 -->
|
||||||
<el-drawer :visible.sync="exoportDrawerOpen" size="75%">
|
<el-drawer :visible.sync="exoportDrawerOpen" size="75%" :show-close="false">
|
||||||
<template #title>
|
<template #title>
|
||||||
<span class="title">导出</span>
|
<span class="title">导出</span>
|
||||||
<div class="drawer-head-btn">
|
<div class="drawer-head-btn">
|
||||||
<el-button type="primary">提交</el-button>
|
<el-button type="primary" @click="handleExport">提交</el-button>
|
||||||
<el-button>取消</el-button>
|
<el-button @click="exoportDrawerOpen=false">取消</el-button>
|
||||||
</div><!--drawer-head-btn 抽屉顶部按钮区域-->
|
</div><!--drawer-head-btn 抽屉顶部按钮区域-->
|
||||||
</template>
|
</template>
|
||||||
<div class="el-form-border">
|
<div class="el-form-border">
|
||||||
@@ -366,19 +156,19 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="选择需要导出的字段信息">
|
<el-form-item label="选择需要导出的字段信息">
|
||||||
<el-checkbox-group v-model="checkList1">
|
<el-checkbox-group v-model="checkList">
|
||||||
<el-checkbox label="A">工具名称</el-checkbox>
|
<el-checkbox label="toolName">工具名称</el-checkbox>
|
||||||
<el-checkbox label="B">工具类别</el-checkbox>
|
<el-checkbox label="toolType">工具类别</el-checkbox>
|
||||||
<el-checkbox label="C">工具来源</el-checkbox>
|
<el-checkbox label="toolSource">工具来源</el-checkbox>
|
||||||
<el-checkbox label="D">负责人</el-checkbox>
|
<el-checkbox label="toolPrincipalsName">负责人</el-checkbox>
|
||||||
<el-checkbox label="E">归属单位</el-checkbox>
|
<el-checkbox label="toolRespDeptName">归属单位</el-checkbox>
|
||||||
<el-checkbox label="F">状态</el-checkbox>
|
<el-checkbox label="status">状态</el-checkbox>
|
||||||
<el-checkbox label="G">工具名称</el-checkbox>
|
<el-checkbox label="toolUse">工具用途</el-checkbox>
|
||||||
<el-checkbox label="H">工具类别</el-checkbox>
|
<el-checkbox label="testSituation">测评情况</el-checkbox>
|
||||||
<el-checkbox label="I">工具来源</el-checkbox>
|
<el-checkbox label="functionDesc">功能描述</el-checkbox>
|
||||||
<el-checkbox label="J">负责人</el-checkbox>
|
<el-checkbox label="applyCondition">适用条件</el-checkbox>
|
||||||
<el-checkbox label="K">归属单位</el-checkbox>
|
<el-checkbox label="operateExplain">操作说明</el-checkbox>
|
||||||
<el-checkbox label="L">状态</el-checkbox>
|
<el-checkbox label="remark">备注</el-checkbox>
|
||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -387,36 +177,53 @@
|
|||||||
</div><!--el-form-border 表单-->
|
</div><!--el-form-border 表单-->
|
||||||
</el-drawer><!--el-drawer 导出抽屉-->
|
</el-drawer><!--el-drawer 导出抽屉-->
|
||||||
|
|
||||||
|
<el-drawer
|
||||||
|
:visible.sync="drawerShow"
|
||||||
|
direction="rtl"
|
||||||
|
size="90%"
|
||||||
|
:with-header="false"
|
||||||
|
:wrapperClosable="false"
|
||||||
|
:show-close="false"
|
||||||
|
modal-append-to-body
|
||||||
|
:destroy-on-close="true"
|
||||||
|
>
|
||||||
|
<main-component ref="mainComponent" :code="path+code" :data="data" @close="handleClose"></main-component>
|
||||||
|
</el-drawer>
|
||||||
|
|
||||||
<!-- 工具详情对话框 -->
|
<!-- 工具详情对话框 -->
|
||||||
<el-drawer :visible.sync="detailDrawerOpen" :modal-append-to-body="false" size="85%" class="no-padding">
|
<el-drawer :visible.sync="detailDrawerOpen" :modal-append-to-body="false" size="85%" class="no-padding" @close="handleCloseDetail()">
|
||||||
<template #title>
|
<template #title>
|
||||||
<span>工具名称</span>
|
<span>工具名称</span>
|
||||||
</template>
|
</template>
|
||||||
|
<template v-if="detailOpen">
|
||||||
<tool-detail ref="toolDetailRef" :toolDetail="toolDetail"/>
|
<tool-detail ref="toolDetailRef" :toolDetail="toolDetail"/>
|
||||||
|
</template>
|
||||||
</el-drawer><!--el-drawer 详情-抽屉-->
|
</el-drawer><!--el-drawer 详情-抽屉-->
|
||||||
|
|
||||||
<bl-user-selector ref="peopleSelect" :type="'single'" :isCheck="true" :open="toolPrincipalsChoose" @cancel="toolPrincipalsChoose=false" @submit="submitPeople"></bl-user-selector>
|
|
||||||
</div><!--app-container-->
|
</div><!--app-container-->
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listDocument } from "@/api/document/document";
|
|
||||||
import { listTool, getTool, delTool, addTool, updateTool } from "@/api/tool/tool";
|
import { listTool, getTool, delTool, addTool, updateTool } from "@/api/tool/tool";
|
||||||
import { deptTreeSelect } from "@/api/system/user";
|
import { deptTreeSelect } from "@/api/system/user";
|
||||||
import { getToken } from "@/utils/auth";
|
import { getToken } from "@/utils/auth";
|
||||||
import { Base64 } from 'js-base64'
|
import { Base64 } from 'js-base64'
|
||||||
import Treeselect from "@riophae/vue-treeselect";
|
import Treeselect from "@riophae/vue-treeselect";
|
||||||
import blUserSelector from "@/components/user-selector/src/user-selector";
|
|
||||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
||||||
import toolDetail from "./toolDetail";
|
import toolDetail from "./toolDetail";
|
||||||
import AddDoc from './AddDoc'
|
import AddDoc from './AddDoc'
|
||||||
|
import mainComponent from "@/components/mainComponent/index.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "User",
|
name: "User",
|
||||||
dicts: ['sys_normal_disable', 'tool_type'],
|
dicts: ['sys_normal_disable', 'tool_type'],
|
||||||
components: { Treeselect, blUserSelector, toolDetail, AddDoc },
|
components: { Treeselect, toolDetail, AddDoc,mainComponent },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
userInfo: this.$store.getters.userInfo,
|
||||||
|
drawerShow: false,
|
||||||
|
path: 'views/workflowList/addWorkflow/',
|
||||||
|
code: '',
|
||||||
|
data: undefined,
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
loading: true,
|
loading: true,
|
||||||
// 选中数组
|
// 选中数组
|
||||||
@@ -427,6 +234,7 @@ export default {
|
|||||||
multiple: true,
|
multiple: true,
|
||||||
// 显示搜索条件
|
// 显示搜索条件
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
|
selection: undefined,
|
||||||
toolPrincipalsChoose: false,
|
toolPrincipalsChoose: false,
|
||||||
// 总条数
|
// 总条数
|
||||||
total: 0,
|
total: 0,
|
||||||
@@ -437,14 +245,14 @@ export default {
|
|||||||
// 部门树选项
|
// 部门树选项
|
||||||
deptOptions: undefined,
|
deptOptions: undefined,
|
||||||
toolPrincipalsData: [],
|
toolPrincipalsData: [],
|
||||||
tableData2: [],
|
columnList: ['toolName', 'toolType', 'toolSource', 'toolPrincipalsName', 'toolRespDeptName', 'status', 'toolUse', 'testSituation', 'functionDesc', 'applyCondition', 'operateExplain', 'remark'],
|
||||||
checkList1: [],
|
checkList: [],
|
||||||
toolDetail: {},
|
toolDetail: {},
|
||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
addDrawerOpen: false,
|
addDrawerOpen: false,
|
||||||
applyDrawerOpen: false,
|
|
||||||
exoportDrawerOpen: false,
|
exoportDrawerOpen: false,
|
||||||
detailDrawerOpen: false,
|
detailDrawerOpen: false,
|
||||||
|
detailOpen: false,
|
||||||
detailActiveName: 'first',
|
detailActiveName: 'first',
|
||||||
// 部门名称
|
// 部门名称
|
||||||
deptName: undefined,
|
deptName: undefined,
|
||||||
@@ -483,7 +291,10 @@ export default {
|
|||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
toolCode: undefined,
|
toolCode: undefined,
|
||||||
toolName: undefined,
|
toolName: undefined,
|
||||||
status: undefined
|
status: undefined,
|
||||||
|
createBy: this.$store.getters.userId,
|
||||||
|
permissionCheck: true,
|
||||||
|
downloadCheck:true
|
||||||
},
|
},
|
||||||
// 列信息
|
// 列信息
|
||||||
columns: [
|
columns: [
|
||||||
@@ -495,33 +306,8 @@ export default {
|
|||||||
{ key: 5, label: `状态`, visible: true },
|
{ key: 5, label: `状态`, visible: true },
|
||||||
{ key: 6, label: `创建时间`, visible: true }
|
{ key: 6, label: `创建时间`, visible: true }
|
||||||
],
|
],
|
||||||
// 表单校验
|
|
||||||
rules: {
|
|
||||||
toolCode: [
|
|
||||||
{ required: true, message: "工具编号不能为空", trigger: "blur" },
|
|
||||||
{ min: 2, max: 30, message: '工具编号长度必须介于 2 和 30 之间', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
toolName: [
|
|
||||||
{ required: true, message: "工具名称不能为空", trigger: "blur" },
|
|
||||||
{ max: 50, message: '工具名称不能超过50个字', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
toolPrincipals: [
|
|
||||||
{ required: true, message: "负责人不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
toolSource: [
|
|
||||||
{ max: 50, message: '工具来源不能超过50个字', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
toolUse: [
|
|
||||||
{ max: 50, message: '工具用途不能超过50个字', trigger: 'blur' }
|
|
||||||
]
|
|
||||||
},
|
|
||||||
// 新增时的关联附件
|
// 新增时的关联附件
|
||||||
docList: [],
|
docList: [],
|
||||||
docQueryParams: {
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
toolId: ''
|
|
||||||
},
|
|
||||||
addDocShow: false,
|
addDocShow: false,
|
||||||
viewDialogOpen: false,
|
viewDialogOpen: false,
|
||||||
viewDialogTitle: '',
|
viewDialogTitle: '',
|
||||||
@@ -555,12 +341,6 @@ export default {
|
|||||||
},
|
},
|
||||||
handleClick(){
|
handleClick(){
|
||||||
|
|
||||||
},
|
|
||||||
submitPeople(peopleList){
|
|
||||||
console.log(peopleList);
|
|
||||||
this.form.toolPrincipals = peopleList[0]['userId']
|
|
||||||
this.form.toolPrincipalsName = peopleList[0]['nickName']
|
|
||||||
this.toolPrincipalsChoose = false;
|
|
||||||
},
|
},
|
||||||
/** 查询用户列表 */
|
/** 查询用户列表 */
|
||||||
getList() {
|
getList() {
|
||||||
@@ -629,18 +409,11 @@ export default {
|
|||||||
},
|
},
|
||||||
/**=============================申请使用Start================================*/
|
/**=============================申请使用Start================================*/
|
||||||
applyUse(row){
|
applyUse(row){
|
||||||
let toolIds = row?.id || '1'
|
let _this = this
|
||||||
if(toolIds.length == 0){
|
_this.handleOpen({...row,type:'use_apply',procInstId:undefined})
|
||||||
this.$modal.msgWarning("请选择需要申请使用的工具!");
|
|
||||||
return
|
|
||||||
}
|
|
||||||
this.applyDrawerOpen = true
|
|
||||||
},
|
},
|
||||||
submitApply(){
|
submitApply(){
|
||||||
|
|
||||||
},
|
|
||||||
cancelApply(){
|
|
||||||
this.applyDrawerOpen = false
|
|
||||||
},
|
},
|
||||||
/**=============================申请使用End================================*/
|
/**=============================申请使用End================================*/
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
@@ -658,12 +431,14 @@ export default {
|
|||||||
},
|
},
|
||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
handleSelectionChange(selection) {
|
handleSelectionChange(selection) {
|
||||||
this.ids = selection.map(item => item.userId);
|
this.selection=selection
|
||||||
this.single = selection.length != 1;
|
// this.ids = selection.map(item => item.userId);
|
||||||
this.multiple = !selection.length;
|
// this.single = selection.length != 1;
|
||||||
|
// this.multiple = !selection.length;
|
||||||
},
|
},
|
||||||
handleDetail(row){
|
handleDetail(row){
|
||||||
this.detailDrawerOpen = true
|
this.detailDrawerOpen = true
|
||||||
|
this.detailOpen = true
|
||||||
this.toolDetail = row
|
this.toolDetail = row
|
||||||
},
|
},
|
||||||
// 更多操作触发
|
// 更多操作触发
|
||||||
@@ -673,7 +448,7 @@ export default {
|
|||||||
this.handleUpdate(row);
|
this.handleUpdate(row);
|
||||||
break;
|
break;
|
||||||
case "handleDelete":
|
case "handleDelete":
|
||||||
this.handleDelete(row);
|
this.handleDelete([{...row}]);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
@@ -681,80 +456,35 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.reset();
|
let _this = this
|
||||||
getTool().then(response => {
|
_this.handleOpen({type:'tool_release'})
|
||||||
this.postOptions = response.posts;
|
},
|
||||||
this.roleOptions = response.roles;
|
handleOpen(row){
|
||||||
this.addDrawerOpen = true;
|
let _this = this
|
||||||
this.title = "添加工具";
|
_this.code = row.type
|
||||||
this.form.password = this.initPassword;
|
_this.data = row
|
||||||
});
|
_this.drawerShow = true
|
||||||
},
|
},
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
handleUpdate(row) {
|
handleUpdate(row) {
|
||||||
this.reset();
|
let _this = this
|
||||||
const toolId = row.toolId || this.ids;
|
_this.handleOpen({type:'tool_release',procInstId:row.procInstId,status:'1'})
|
||||||
getTool(toolId).then(response => {
|
|
||||||
this.form = response.data;
|
|
||||||
this.postOptions = response.posts;
|
|
||||||
this.roleOptions = response.roles;
|
|
||||||
this.$set(this.form, "postIds", response.postIds);
|
|
||||||
this.$set(this.form, "roleIds", response.roleIds);
|
|
||||||
this.addDrawerOpen = true;
|
|
||||||
this.title = "修改工具";
|
|
||||||
this.form.password = "";
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
/** 发布按钮操作 */
|
/** 发布按钮操作 */
|
||||||
handlePublish(row) {
|
handleOpenExport() {
|
||||||
},
|
if (this.checkList.length<1) {
|
||||||
/** 提交按钮 */
|
this.checkList = JSON.parse(JSON.stringify(this.columnList))
|
||||||
submitForm: function() {
|
|
||||||
this.$refs["form"].validate(valid => {
|
|
||||||
if (valid) {
|
|
||||||
if (this.form.userId != undefined) {
|
|
||||||
updateTool(this.form).then(response => {
|
|
||||||
this.$modal.msgSuccess("修改成功");
|
|
||||||
this.addDrawerOpen = false;
|
|
||||||
this.getList();
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
addTool(this.form).then(response => {
|
|
||||||
this.$modal.msgSuccess("新增成功");
|
|
||||||
this.addDrawerOpen = false;
|
|
||||||
this.getList();
|
|
||||||
}).catch((e) => {
|
|
||||||
if (e.response.data.code === 400001001) {
|
|
||||||
let deptName = this.getDeptName(this.deptOptions, this.form.toolRespDept)
|
|
||||||
this.$alert('<strong>' + deptName + '</strong> 下已存在编号为 <strong>' + this.form.toolCode + '</strong> 的工具,请勿重复添加!', '提示', {
|
|
||||||
dangerouslyUseHTMLString: true,
|
|
||||||
confirmButtonText: '确定',
|
|
||||||
callback: action => { }
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
})
|
this.exoportDrawerOpen = true
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
/** 删除按钮操作 */
|
|
||||||
handleDelete(row) {
|
|
||||||
const toolIds = row.toolId || this.ids;
|
|
||||||
this.$modal.confirm('是否确认删除?').then(function() {
|
|
||||||
return delTool(toolIds);
|
|
||||||
}).then(() => {
|
|
||||||
this.getList();
|
|
||||||
this.$modal.msgSuccess("删除成功");
|
|
||||||
}).catch(() => {});
|
|
||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
this.download('system/user/export', {
|
let excludeFields = this.columnList.filter(item=>!this.checkList.includes(item))
|
||||||
...this.queryParams
|
this.download('/tool/export', {
|
||||||
}, `user_${new Date().getTime()}.xlsx`)
|
...this.queryParams,
|
||||||
},
|
downloadCheck:false,
|
||||||
handleUseApply(){
|
excludeFields:excludeFields,
|
||||||
|
}, `工具信息数据_${new Date().getTime()}.xlsx`)
|
||||||
},
|
},
|
||||||
// 文件上传中处理
|
// 文件上传中处理
|
||||||
handleFileUploadProgress(event, file, fileList) {
|
handleFileUploadProgress(event, file, fileList) {
|
||||||
@@ -772,18 +502,51 @@ export default {
|
|||||||
submitFileForm() {
|
submitFileForm() {
|
||||||
this.$refs.upload.submit();
|
this.$refs.upload.submit();
|
||||||
},
|
},
|
||||||
/**
|
handleClose(){
|
||||||
* 打开新增页面的回调事件
|
this.drawerShow = false
|
||||||
*/
|
this.getList();
|
||||||
openEvent() {
|
},
|
||||||
this.loading = true
|
handleDelete(list){
|
||||||
this.docQueryParams.toolId = '1111'
|
let _this = this
|
||||||
listDocument(this.queryParams).then(response => {
|
if (!list||list.length<1) {
|
||||||
this.docList = response.rows;
|
return
|
||||||
this.total = response.total;
|
|
||||||
this.loading = false;
|
|
||||||
}
|
}
|
||||||
);
|
_this.$modal.confirm('删除后,该流程待办任务将会被删除,请谨慎操作。是否确认执行?')
|
||||||
|
.then(async() => {
|
||||||
|
_this.loading = true
|
||||||
|
for (let row of list) {
|
||||||
|
let formData = {
|
||||||
|
toolId: row.toolId,
|
||||||
|
bpmClientInputModel: {
|
||||||
|
model: {
|
||||||
|
wf_procInstId: row.procInstId,
|
||||||
|
wf_sendUserId: _this.userInfo.userName,
|
||||||
|
wf_sendUserOrgId: _this.userInfo.deptId,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
review: false,
|
||||||
|
recordStatus: 'cancel',
|
||||||
|
editStatus: false
|
||||||
|
}
|
||||||
|
await addTool(formData)
|
||||||
|
}
|
||||||
|
_this.$modal.msgSuccess("删除成功");
|
||||||
|
_this.loading = false
|
||||||
|
_this.getList();
|
||||||
|
})
|
||||||
|
},
|
||||||
|
selectable(row,index){
|
||||||
|
return row.recordStatus==='draft'&&row.createBy==this.userInfo.userId
|
||||||
|
},
|
||||||
|
/** 关闭详情 **/
|
||||||
|
handleCloseDetail(){
|
||||||
|
console.info("1111111111")
|
||||||
|
this.detailDrawerOpen = false;
|
||||||
|
this.detailOpen = false;
|
||||||
|
this.$refs.toolDetailRef.$destroy(); // 销毁组件
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.toolDetailRef = null; // 清空引用
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -6,34 +6,42 @@
|
|||||||
<div class="el-form-border">
|
<div class="el-form-border">
|
||||||
<el-form ref="form" label-width="150px">
|
<el-form ref="form" label-width="150px">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12"> <el-form-item label="工具名称">工具名称2</el-form-item> </el-col>
|
<el-col :span="12"> <el-form-item label="工具名称">{{toolDetail.toolName}}</el-form-item> </el-col>
|
||||||
<el-col :span="12"> <el-form-item label="工具类别">网络工具</el-form-item> </el-col>
|
<el-col :span="12"> <el-form-item label="工具类别"><dict-tag :options="dict.type.tool_type" :value="toolDetail.toolType"/></el-form-item> </el-col>
|
||||||
<el-col :span="12"> <el-form-item label="工具来源">单位自建</el-form-item> </el-col>
|
<el-col :span="12"> <el-form-item label="工具来源">{{toolDetail.toolSource}}</el-form-item> </el-col>
|
||||||
<el-col :span="12"> <el-form-item label="负责人">赵宁宇</el-form-item> </el-col>
|
<el-col :span="12"> <el-form-item label="负责人">{{toolDetail.toolPrincipalsName}}</el-form-item> </el-col>
|
||||||
<el-col :span="12"> <el-form-item label="归属单位">人力资源部/员工关系组</el-form-item> </el-col>
|
<el-col :span="12"> <el-form-item label="归属单位">{{toolDetail.toolRespDeptName}}</el-form-item> </el-col>
|
||||||
<el-col :span="12"> <el-form-item label="状态"><span class="green">启用中</span></el-form-item> </el-col>
|
<el-col :span="12"> <el-form-item label="状态"><dict-tag :options="dict.type.sys_normal_disable" :value="toolDetail.status"/></el-form-item> </el-col>
|
||||||
<el-col :span="12"> <el-form-item label="工具用途">主要用于单位网络使用</el-form-item> </el-col>
|
<el-col :span="12"> <el-form-item label="工具用途">{{toolDetail.toolUse}}</el-form-item> </el-col>
|
||||||
<el-col :span="12"> <el-form-item label="测评情况">运行良好,可正常使用</el-form-item> </el-col>
|
<el-col :span="12"> <el-form-item label="测评情况">{{toolDetail.testSituation}}</el-form-item> </el-col>
|
||||||
<el-col :span="12"> <el-form-item label="功能描述">单位网络使用</el-form-item> </el-col>
|
<el-col :span="12"> <el-form-item label="功能描述">{{toolDetail.functionDesc}}</el-form-item> </el-col>
|
||||||
<el-col :span="12"> <el-form-item label="适用条件">网络正常</el-form-item> </el-col>
|
<el-col :span="12"> <el-form-item label="适用条件">{{toolDetail.applyCondition}}</el-form-item> </el-col>
|
||||||
<el-col :span="12"> <el-form-item label="操作说明">正常开启即可用</el-form-item> </el-col>
|
<el-col :span="12"> <el-form-item label="操作说明">{{toolDetail.operateExplain}}</el-form-item> </el-col>
|
||||||
<el-col :span="12"> <el-form-item label="备注">工具使用完成后,请做好保养工作。</el-form-item> </el-col>
|
<el-col :span="12"> <el-form-item label="备注">{{toolDetail.remark}}</el-form-item> </el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="关联工具">
|
||||||
|
<el-tag :key="tag.toolId" v-for="tag in JSON.parse(toolDetail.association)" type="info" style="margin-right: 5px">{{tag.toolName}}</el-tag>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form><!--el-form-->
|
</el-form><!--el-form-->
|
||||||
</div><!--el-form-border 表单-->
|
</div><!--el-form-border 表单-->
|
||||||
</el-tab-pane><!--el-tab-pane-->
|
</el-tab-pane><!--el-tab-pane-->
|
||||||
<el-tab-pane label="关联文件" name="second">
|
<el-tab-pane label="关联文件" name="second">
|
||||||
<div class="operate">
|
|
||||||
<el-button type="primary" icon="el-icon-upload2" @click="handleAdd">上传</el-button>
|
|
||||||
<el-button icon="el-icon-delete">删除</el-button>
|
|
||||||
</div><!--operate 操作按钮-->
|
|
||||||
<el-table :data="docList" style="width: 100%">
|
<el-table :data="docList" style="width: 100%">
|
||||||
<el-table-column type="selection" width="50" align="center"> </el-table-column>
|
|
||||||
<el-table-column label="文档名称" prop="docName" :show-overflow-tooltip="true" />
|
<el-table-column label="文档名称" prop="docName" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="类别" prop="docType" :show-overflow-tooltip="true" width="80" />
|
<el-table-column label="类别" prop="docType" :show-overflow-tooltip="true" width="80" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.doc_class" :value="scope.row.docType"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="负责人" prop="docPrincipals" :show-overflow-tooltip="true" width="80" />
|
<el-table-column label="负责人" prop="docPrincipals" :show-overflow-tooltip="true" width="80" />
|
||||||
<el-table-column label="归属部门" prop="docRespDept" :show-overflow-tooltip="true" width="150" />
|
<el-table-column label="归属单位" align="center" prop="docRespDeptName" :show-overflow-tooltip="true" width="80" />
|
||||||
<el-table-column label="来源" prop="docSource" width="100" />
|
<el-table-column label="来源" prop="docSource" width="100" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.doc_source" :value="scope.row.docSource"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||||
@@ -47,19 +55,69 @@
|
|||||||
icon="el-icon-view"
|
icon="el-icon-view"
|
||||||
@click="handlePriew(scope.row)"
|
@click="handlePriew(scope.row)"
|
||||||
>预览</el-button>
|
>预览</el-button>
|
||||||
<el-button
|
<el-button type="text" icon="el-icon-download" @click="handleDownload(scope.row)" v-loading="loadingDownload">下载</el-button>
|
||||||
size="mini"
|
|
||||||
type="text"
|
|
||||||
icon="el-icon-delete"
|
|
||||||
@click="handleDelete(scope.row)"
|
|
||||||
>删除</el-button>
|
|
||||||
<el-button type="text" icon="el-icon-download">下载</el-button>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table><!--el-table-->
|
</el-table><!--el-table-->
|
||||||
</el-tab-pane><!--el-tab-pane-->
|
</el-tab-pane><!--el-tab-pane-->
|
||||||
</el-tabs><!--el-tabs-->
|
</el-tabs><!--el-tabs-->
|
||||||
</div><!--fl 左侧页签-->
|
</div><!--fl 左侧页签-->
|
||||||
|
<div class="fr">
|
||||||
|
<div class="tboper">
|
||||||
|
<div class="tit">评论</div>
|
||||||
|
</div><!--tboper 标题与操作按钮-->
|
||||||
|
<div class="pltextarea">
|
||||||
|
<el-input v-model="discussionContent" type="textarea" placeholder="请输入您的意见" :rows="4" maxlength="1000" show-word-limit></el-input>
|
||||||
|
<div class="plbtn"><el-button @click="handleDiscussions">发布</el-button></div>
|
||||||
|
</div><!--pltextarea-->
|
||||||
|
<div class="pllist">
|
||||||
|
<template v-if="discussionsList && discussionsList.length > 0">
|
||||||
|
<div class="list" v-for="(item,index) in discussionsList" :key="item.id">
|
||||||
|
<div class="luser"><span class="xuser">{{getFirstChar(item.nickName)}}</span></div>
|
||||||
|
<div class="ltext">
|
||||||
|
<div class="nt"><span class="name">{{item.nickName}}</span><span class="time">{{ parseTime(item.createTime, '{y}-{m}-{d} {h}:{i}') }}</span></div>
|
||||||
|
<div class="te">{{item.content}}</div>
|
||||||
|
<div class="hb">
|
||||||
|
<a class="btn" @click="toggleReplyForm(index)">
|
||||||
|
<i class="el-icon-chat-line-round"></i>回复
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="pltextarea" v-if="showReplyForm[index]">
|
||||||
|
<el-input type="textarea" v-model="replyContent[index]" placeholder="请输入您的意见" :rows="2" maxlength="1000" show-word-limit></el-input>
|
||||||
|
<div class="plbtn">
|
||||||
|
<el-button @click="cancelReply(index)">取消</el-button>
|
||||||
|
<el-divider direction="vertical"></el-divider>
|
||||||
|
<el-button @click="submitReply(index, item)">发布</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--第二层级-->
|
||||||
|
<template v-if="item.repliesList && item.repliesList.length > 0">
|
||||||
|
<div class="list" v-for="(repItem,repIdex) in item.repliesList" :key="repItem.id">
|
||||||
|
<div class="luser"><span class="xuser">{{getFirstChar(repItem.nickName)}}</span></div>
|
||||||
|
<div class="ltext">
|
||||||
|
<div class="nt"><span class="name">{{repItem.nickName}}</span><span class="time">{{ parseTime(repItem.createTime, '{y}-{m}-{d} {h}:{i}') }}</span></div>
|
||||||
|
<div class="te">{{repItem.content}}</div>
|
||||||
|
<!-- <div class="hb"><a class="btn" @click="toggleReplyFormSon(index,repIdex)"><i class="el-icon-chat-line-round"></i>回复</a></div>
|
||||||
|
<div class="pltextarea" v-if="item.showReplyFormSon[repIdex]">
|
||||||
|
<el-input type="textarea" v-model="item.replyContentSon[repIdex]" placeholder="请输入您的意见" :rows="2" maxlength="1000" show-word-limit></el-input>
|
||||||
|
<div class="plbtn">
|
||||||
|
<el-button @click="cancelReplySon(index,repIdex)">取消</el-button>
|
||||||
|
<el-divider direction="vertical"></el-divider>
|
||||||
|
<el-button @click="submitReplySon(index,repIdex, item)">发布</el-button>
|
||||||
|
</div>
|
||||||
|
</div>-->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<el-dialog :title="viewDialogTitle" :visible.sync="viewDialogOpen" fullscreen width="500px" append-to-body>
|
||||||
|
<i-frame :src="previewUrl" />
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
<!-- 上传 -->
|
<!-- 上传 -->
|
||||||
<AddDoc :show.sync="open" :toolId="toolDetail.toolId" @callback="getDocList"/>
|
<AddDoc :show.sync="open" :toolId="toolDetail.toolId" @callback="getDocList"/>
|
||||||
</div><!--fbox1 左右分栏-->
|
</div><!--fbox1 左右分栏-->
|
||||||
@@ -67,12 +125,18 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listDocument, getDocument, delDocument, addDocument, updateDocument } from "@/api/document/document";
|
import { listDocument, getDocument, delDocument, addDocument, updateDocument } from "@/api/document/document";
|
||||||
|
import { listDiscussions, addDiscussions } from "@/api/tool/discussions.js";
|
||||||
|
import { listReplies, addReplies} from "@/api/tool/replies.js";
|
||||||
|
|
||||||
import AddDoc from './AddDoc'
|
import AddDoc from './AddDoc'
|
||||||
import editDocument from "../document/editDocument";
|
import editDocument from "../document/editDocument";
|
||||||
import { Base64 } from 'js-base64';
|
import { Base64 } from 'js-base64';
|
||||||
|
import iFrame from "@/components/iFrame/index"
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'toolDetail',
|
name: 'toolDetail',
|
||||||
components: { editDocument, AddDoc },
|
components: { editDocument, AddDoc, iFrame },
|
||||||
|
dicts:['sys_normal_disable','tool_type','doc_class','doc_source'],
|
||||||
props: {
|
props: {
|
||||||
toolDetail: {
|
toolDetail: {
|
||||||
type: Object,
|
type: Object,
|
||||||
@@ -93,10 +157,26 @@
|
|||||||
viewDialogOpen: false,
|
viewDialogOpen: false,
|
||||||
title: '新增文档',
|
title: '新增文档',
|
||||||
open: false,
|
open: false,
|
||||||
|
loadingDownload: false,
|
||||||
|
discussionContent: null, // 评论内容
|
||||||
|
repliesContent: null, // 回复内容
|
||||||
|
// 评论列表
|
||||||
|
discussionsList: [],
|
||||||
|
// 回复列表
|
||||||
|
repliesList: [],
|
||||||
|
showReplyForm: [],
|
||||||
|
replyContent: [],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created(){
|
created(){
|
||||||
this.getDocList()
|
this.getDocList()
|
||||||
|
this.getDiscussionsList()
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
discussionsList(newList) {
|
||||||
|
this.showReplyForm = new Array(newList.length).fill(false);
|
||||||
|
this.replyContent = new Array(newList.length).fill('');
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
getDocList() {
|
getDocList() {
|
||||||
@@ -130,7 +210,164 @@
|
|||||||
this.getList();
|
this.getList();
|
||||||
this.$modal.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
}).catch(() => {});
|
}).catch(() => {});
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 处理下载
|
||||||
|
* **/
|
||||||
|
handleDownload(row){
|
||||||
|
let self = this
|
||||||
|
self.loadingDownload = true
|
||||||
|
this.$download.resource(row.docUrl);
|
||||||
|
setTimeout(()=>{
|
||||||
|
self.loadingDownload = false
|
||||||
|
},1000)
|
||||||
|
},
|
||||||
|
getDiscussionsList() {
|
||||||
|
let self = this
|
||||||
|
listDiscussions({businessId:this.toolDetail.toolId}).then(res => {
|
||||||
|
self.discussionsList = res.rows
|
||||||
|
self.discussionsList.forEach(item => {
|
||||||
|
if(item.repliesList && item.repliesList.length > 0){
|
||||||
|
self.$set(item, 'showReplyFormSon', new Array(item.repliesList.length).fill(false))
|
||||||
|
self.$set(item, 'replyContentSon', new Array(item.repliesList.length).fill(''))
|
||||||
|
}else{
|
||||||
|
self.$set(item, 'showReplyFormSon', false)
|
||||||
|
self.$set(item, 'replyContentSon', '')
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 评论 **/
|
||||||
|
handleDiscussions(){
|
||||||
|
let self = this
|
||||||
|
if (this.discussionContent == '' || this.discussionContent == null || this.discussionContent == undefined) {
|
||||||
|
self.$message({
|
||||||
|
message: '内容不能为空',//提示的信息
|
||||||
|
type:'warning', //类型是成功
|
||||||
|
duration:1200, //显示时间, 毫秒。设为 0 则不会自动关闭,建议1200
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
let data = {
|
||||||
|
businessId: this.toolDetail.toolId,
|
||||||
|
content: this.discussionContent,
|
||||||
|
type: "tool",
|
||||||
|
}
|
||||||
|
self.$modal.confirm('是否确认发布?').then(()=> {
|
||||||
|
addDiscussions(data).then(res => {
|
||||||
|
this.discussionContent = null
|
||||||
|
self.$message({
|
||||||
|
message: '发布成功',//提示的信息
|
||||||
|
type:'success', //类型是成功
|
||||||
|
duration:1200, //显示时间, 毫秒。设为 0 则不会自动关闭,建议1200
|
||||||
|
});
|
||||||
|
self.getDiscussionsList()
|
||||||
|
}).catch(err =>{
|
||||||
|
this.discussionContent = null
|
||||||
|
console.error("handleDiscussions==err==", err)
|
||||||
|
self.$modal.msgError("发布失败");
|
||||||
|
});
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getFirstChar(value) {
|
||||||
|
if(!value){return ''}
|
||||||
|
return value.charAt(0);
|
||||||
|
},
|
||||||
|
toggleReplyForm(index) {
|
||||||
|
this.$set(this.showReplyForm, index, !this.showReplyForm[index]);
|
||||||
|
},
|
||||||
|
cancelReply(index) {
|
||||||
|
this.$set(this.showReplyForm, index, false);
|
||||||
|
this.$set(this.replyContent, index, '');
|
||||||
|
},
|
||||||
|
/** 回复 **/
|
||||||
|
submitReply(index, item) {
|
||||||
|
let self = this
|
||||||
|
const content = this.replyContent[index];
|
||||||
|
if (content == '' || content == null || content == undefined) {
|
||||||
|
self.$message({
|
||||||
|
message: '回复内容不能为空',//提示的信息
|
||||||
|
type:'warning', //类型是成功
|
||||||
|
duration:1200, //显示时间, 毫秒。设为 0 则不会自动关闭,建议1200
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
let data = {
|
||||||
|
"discussionId": item.id,
|
||||||
|
"content": content,
|
||||||
|
}
|
||||||
|
|
||||||
|
self.$modal.confirm('是否确认发布?').then(()=> {
|
||||||
|
addReplies(data).then(res => {
|
||||||
|
self.$message({
|
||||||
|
message: '发布成功',//提示的信息
|
||||||
|
type:'success', //类型是成功
|
||||||
|
duration:1200, //显示时间, 毫秒。设为 0 则不会自动关闭,建议1200
|
||||||
|
});
|
||||||
|
self.cancelReply(index)
|
||||||
|
self.getDiscussionsList()
|
||||||
|
}).catch(err =>{
|
||||||
|
console.error("handleDiscussions==err==", err)
|
||||||
|
self.$modal.msgError("发布失败");
|
||||||
|
});
|
||||||
|
})
|
||||||
|
|
||||||
|
// 清空回复内容并隐藏表单
|
||||||
|
this.replyContent[index] = '';
|
||||||
|
this.showReplyForm[index] = false;
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/** 第二级 **/
|
||||||
|
toggleReplyFormSon(parentIndex, repIndex) {
|
||||||
|
const parentItem = this.discussionsList[parentIndex];
|
||||||
|
this.$set(parentItem.showReplyFormSon, repIndex, !parentItem.showReplyFormSon[repIndex]);
|
||||||
|
// this.$set(this.showReplyFormSon, index, !this.showReplyFormSon[index]);
|
||||||
|
},
|
||||||
|
/** 第二级,取消回复 **/
|
||||||
|
cancelReplySon(parentIndex, repIndex) {
|
||||||
|
const parentItem = this.discussionsList[parentIndex];
|
||||||
|
this.$set(parentItem.showReplyFormSon, repIndex, false);
|
||||||
|
this.$set(parentItem.replyContentSon, repIndex, '');
|
||||||
|
},
|
||||||
|
/** 第二级回复 **/
|
||||||
|
submitReplySon(parentIndex, repIndex, repItem) {
|
||||||
|
let self = this
|
||||||
|
const parentItem = this.discussionsList[parentIndex];
|
||||||
|
const content = parentItem.replyContentSon[repIndex];
|
||||||
|
if (content.trim() == '' || content == null || content == undefined) {
|
||||||
|
self.$message({
|
||||||
|
message: '回复内容不能为空',//提示的信息
|
||||||
|
type:'warning', //类型是成功
|
||||||
|
duration:1200, //显示时间, 毫秒。设为 0 则不会自动关闭,建议1200
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
let data = {
|
||||||
|
"discussionId": repItem.id,
|
||||||
|
"content": content,
|
||||||
|
}
|
||||||
|
|
||||||
|
self.$modal.confirm('是否确认发布?').then(()=> {
|
||||||
|
addReplies(data).then(res => {
|
||||||
|
self.$message({
|
||||||
|
message: '发布成功',//提示的信息
|
||||||
|
type:'success', //类型是成功
|
||||||
|
duration:1200, //显示时间, 毫秒。设为 0 则不会自动关闭,建议1200
|
||||||
|
});
|
||||||
|
self.cancelReplySon(parentIndex, repIndex)
|
||||||
|
self.getDiscussionsList()
|
||||||
|
}).catch(err =>{
|
||||||
|
console.error("submitReplySon==err==", err)
|
||||||
|
self.$modal.msgError("发布失败");
|
||||||
|
});
|
||||||
|
})
|
||||||
|
|
||||||
|
// 清空回复内容并隐藏表单
|
||||||
|
this.$set(parentItem.replyContentSon, repIndex, '');
|
||||||
|
this.$set(parentItem.showReplyFormSon, repIndex, false);
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
881
src/views/workflowList/addWorkflow/tool_release.vue
Normal file
881
src/views/workflowList/addWorkflow/tool_release.vue
Normal file
@@ -0,0 +1,881 @@
|
|||||||
|
<template>
|
||||||
|
<div v-loading="loading||detailLoading">
|
||||||
|
<div class="drawer-head">
|
||||||
|
<div class="cell-title">
|
||||||
|
<div>
|
||||||
|
<p class="title">新增工具</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="cell-btn">
|
||||||
|
<el-button v-if="pListData&&pListData.procInstId" @click="handleMonitor">流程监控</el-button>
|
||||||
|
<el-button v-if="editStatus&&pListData.procInstId" type="danger" @click="deleteForm">删除</el-button>
|
||||||
|
<el-button v-if="(editStatus||workflowStatus)" type="primary" @click="submitForm">提交</el-button>
|
||||||
|
<el-button v-if="editStatus" type="primary" @click="saveForm" >保存</el-button>
|
||||||
|
<el-button @click="close">关闭</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<el-tabs v-if="pListData&&pListData.procInstId" v-model="activeName">
|
||||||
|
<el-tab-pane label="信息内容" name="info"></el-tab-pane>
|
||||||
|
<el-tab-pane label="审批记录" name="log"></el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
<div class="el-form-border" v-show="activeName==='info'">
|
||||||
|
<el-form ref="eForm" :model="form" :rules="rules" label-width="150px">
|
||||||
|
<div>
|
||||||
|
<div class="box-title">
|
||||||
|
基本信息
|
||||||
|
</div>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="工具编号" prop="toolCode">
|
||||||
|
<el-input v-if="editStatus" v-model="form.toolCode" placeholder="请输入工具编号"/>
|
||||||
|
<span v-else>{{form.toolCode}}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="工具名称" prop="toolName">
|
||||||
|
<el-input v-if="editStatus" v-model="form.toolName" placeholder="请输入工具名称"/>
|
||||||
|
<span v-else>{{form.toolName}}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="负责人" prop="toolPrincipals">
|
||||||
|
<el-input v-if="editStatus" v-model="form.toolPrincipalsName" placeholder="请选择负责人" maxlength="11" @focus="toolPrincipalsChoose = true"/>
|
||||||
|
<span v-else>{{form.toolPrincipalsName}}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="归属部门" prop="toolRespDept">
|
||||||
|
<treeselect :disabled="!editStatus" v-model="form.toolRespDept" :options="deptOptions" @select="handleSelectNode" :show-count="true" placeholder="请选择归属部门" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="工具来源" prop="toolSource">
|
||||||
|
<el-input v-if="editStatus" v-model="form.toolSource" placeholder="请输入工具来源"/>
|
||||||
|
<span v-else>{{form.toolSource}}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="工具用途" prop="toolUse">
|
||||||
|
<el-input v-if="editStatus" v-model="form.toolUse" placeholder="请输入工具用途" />
|
||||||
|
<span v-else>{{form.toolUse}}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="工具类别" prop="toolType">
|
||||||
|
<el-select v-if="editStatus" v-model="form.toolType" placeholder="请选择工具类别" style="width: 100%">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.tool_type"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
<dict-tag v-else :options="dict.type.tool_type" :value="form.toolType"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="状态" prop="status">
|
||||||
|
<el-radio-group v-model="form.status" v-if="editStatus">
|
||||||
|
<el-radio
|
||||||
|
v-for="dict in dict.type.sys_normal_disable"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.value"
|
||||||
|
>{{dict.label}}</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
<dict-tag v-else :options="dict.type.sys_normal_disable" :value="form.status"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="测试情况" prop="testSituation">
|
||||||
|
<el-input :readonly="!editStatus" v-model="form.testSituation" type="textarea" :rows="3" maxlength="500" show-word-limit></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="功能描述" prop="functionDesc">
|
||||||
|
<el-input :readonly="!editStatus" v-model="form.functionDesc" type="textarea" :rows="3" maxlength="500" show-word-limit></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="适用条件" prop="applyCondition">
|
||||||
|
<el-input :readonly="!editStatus" v-model="form.applyCondition" type="textarea" :rows="3" maxlength="500" show-word-limit></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="操作说明" prop="operateExplain">
|
||||||
|
<el-input :readonly="!editStatus" v-model="form.operateExplain" type="textarea" :rows="3" maxlength="500" show-word-limit></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="备注" prop="remark">
|
||||||
|
<el-input :readonly="!editStatus" v-model="form.remark" type="textarea" :rows="3" maxlength="500" show-word-limit></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="关联工具" prop="association">
|
||||||
|
<el-select
|
||||||
|
:disabled="!editStatus"
|
||||||
|
v-model="form.association"
|
||||||
|
ref="selectHeadTool"
|
||||||
|
multiple
|
||||||
|
value-key="toolId"
|
||||||
|
filterable
|
||||||
|
remote
|
||||||
|
placeholder="请选择关联工具"
|
||||||
|
@focus="toolSelect">
|
||||||
|
<el-option
|
||||||
|
v-for="item in form.association"
|
||||||
|
:key="item.toolId"
|
||||||
|
:label="item.toolName"
|
||||||
|
:value="item">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="box-title">
|
||||||
|
关联附件
|
||||||
|
</div>
|
||||||
|
<div class="operate">
|
||||||
|
<el-button type="primary" icon="el-icon-upload2" v-if="editStatus" @click="handleDocAdd">上传</el-button>
|
||||||
|
<!-- <el-button icon="el-icon-delete">删除</el-button>-->
|
||||||
|
</div><!--operate 操作按钮-->
|
||||||
|
<el-table :data="docList" style="width: 100%">
|
||||||
|
<!-- <el-table-column type="selection" width="50" align="center"> </el-table-column>-->
|
||||||
|
<el-table-column label="文档名称" prop="docName" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="类别" prop="docType" :show-overflow-tooltip="true" width="80" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.doc_class" :value="scope.row.docType"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="负责人" prop="docPrincipals" :show-overflow-tooltip="true" width="80" />
|
||||||
|
<el-table-column label="归属部门" prop="docRespDept" :show-overflow-tooltip="true" width="150" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{convertDeptName(scope.row)}}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="来源" prop="docSource" width="100" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.doc_source" :value="scope.row.docSource"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" align="center" width="180">
|
||||||
|
<template slot-scope="scope" v-if="scope.row.roleId !== 1">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-view"
|
||||||
|
v-if="isShowOperation(scope.row)"
|
||||||
|
@click="handlePreview(scope.row)"
|
||||||
|
>预览</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
v-if="editStatus"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
>删除</el-button>
|
||||||
|
<el-button type="text" icon="el-icon-download" v-if="isShowOperation(scope.row)" @click="handleDownload(scope.row)" v-loading="loadingDownload">下载</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table><!--el-table-->
|
||||||
|
</div>
|
||||||
|
<div v-if="attributeModelBool('approve')&&workflowStatus">
|
||||||
|
<div class="box-title">
|
||||||
|
{{submitLabel}}
|
||||||
|
</div>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item :label="submitLabel+'结论:'" prop="pass">
|
||||||
|
<el-radio-group v-model.trim="formSubmit.pass">
|
||||||
|
<el-radio
|
||||||
|
v-for="dict in passoptions"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.value"
|
||||||
|
>{{ dict.label }}</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row >
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item :label="submitLabel+'意见:'">
|
||||||
|
<el-input
|
||||||
|
v-model="formSubmit.summary"
|
||||||
|
type="textarea"
|
||||||
|
:placeholder="'请输入'+submitLabel+'意见'"
|
||||||
|
maxlength="200"
|
||||||
|
:autosize="{ minRows: 4, maxRows: 4 }"
|
||||||
|
:style="{ width: '100%' }"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
</el-form>
|
||||||
|
<!-- 上传 -->
|
||||||
|
<add-doc :show.sync="addDocShow" ref="addDocRef" @addFileData="addFileData"/>
|
||||||
|
</div><!--el-form-border 表单-->
|
||||||
|
<div v-show="activeName==='log'">
|
||||||
|
<workflow-logs :procInstId = "pListData.procInstId"></workflow-logs>
|
||||||
|
</div>
|
||||||
|
<!-- 流程选择下一环节及人员 开始 -->
|
||||||
|
<el-dialog
|
||||||
|
title="选择下一环节及人员"
|
||||||
|
v-if="dialogVisible" :visible.sync="dialogVisible"
|
||||||
|
width="60%"
|
||||||
|
append-to-body
|
||||||
|
v-loading = flowStepLoading
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
:close-on-press-escape="false"
|
||||||
|
>
|
||||||
|
<processcode
|
||||||
|
ref="prochild"
|
||||||
|
:searchQuery="searchQuery"
|
||||||
|
:pListData="pListData"
|
||||||
|
:isSummary="isSummary"
|
||||||
|
></processcode>
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="handleWorkflowSubmit"
|
||||||
|
>提 交</el-button
|
||||||
|
>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
<!-- 流程选择下一环节及人员 结束 -->
|
||||||
|
<monitor-drawer
|
||||||
|
v-if="monitorDrawerVisible"
|
||||||
|
ref="monitorDrawer"
|
||||||
|
></monitor-drawer>
|
||||||
|
<tool-selector ref="toolSelect" @selectHandle="selectHandle"></tool-selector>
|
||||||
|
<bl-user-selector ref="peopleSelect" :type="'single'" :isCheck="true" :open="toolPrincipalsChoose" @cancel="toolPrincipalsChoose=false" @submit="submitPeople"></bl-user-selector>
|
||||||
|
|
||||||
|
|
||||||
|
<el-dialog :title="viewDialogTitle" :visible.sync="viewDialogOpen" fullscreen width="500px" append-to-body>
|
||||||
|
<i-frame :src="previewUrl" />
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import iFrame from "@/components/iFrame/index"
|
||||||
|
import { listDocument,delDocument } from "@/api/document/document";
|
||||||
|
import processcode from "@/views/workflowList/processcode/index.vue";
|
||||||
|
import {
|
||||||
|
workflowprocesskey,
|
||||||
|
getStartActdef,
|
||||||
|
getExtAttributeModel,
|
||||||
|
procInstInfoAndStatus,
|
||||||
|
} from '@/api/my_business/workflow'
|
||||||
|
import WorkflowLogs from '@/views/workflowList/workflowLogs/index.vue'
|
||||||
|
import AddDoc from '@/views/tool/AddDoc.vue'
|
||||||
|
import Treeselect from '@riophae/vue-treeselect'
|
||||||
|
import { deptTreeSelect } from "@/api/system/user";
|
||||||
|
import { addTool, checkToolExist, getInfoByBpmcId, updateTool } from '@/api/tool/tool'
|
||||||
|
import blUserSelector from '@/components/user-selector/src/user-selector.vue'
|
||||||
|
import ToolSelector from '@/components/tool-selector/index.vue'
|
||||||
|
import { Base64 } from 'js-base64'
|
||||||
|
// PDF本地文件预览
|
||||||
|
export default {
|
||||||
|
dicts: ['sys_normal_disable','tool_type','doc_source','doc_class'],
|
||||||
|
components: {
|
||||||
|
ToolSelector,
|
||||||
|
blUserSelector,
|
||||||
|
Treeselect, AddDoc,
|
||||||
|
WorkflowLogs,
|
||||||
|
processcode,
|
||||||
|
iFrame
|
||||||
|
},
|
||||||
|
name: "Borrow_doc",
|
||||||
|
props: ['data'],
|
||||||
|
data() {
|
||||||
|
let validatorToolExist = (rule, value, callback) => {
|
||||||
|
let _this = this
|
||||||
|
if (_this.editStatus&&_this.form.toolCode&&_this.form.toolRespDept) {
|
||||||
|
checkToolExist({toolId:_this.form.toolId,toolCode:_this.form.toolCode,toolRespDept:_this.form.toolRespDept}).then((response) => {
|
||||||
|
if (response.data) {
|
||||||
|
callback(new Error(_this.form.toolRespDeptName+"下已存在编号为"+_this.form.toolCode+'的工具,请勿重复添加!'))
|
||||||
|
} else {
|
||||||
|
callback()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
callback()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
toolPrincipalsChoose: false,
|
||||||
|
// 新增时的关联附件
|
||||||
|
docList: [],
|
||||||
|
addDocShow: false,
|
||||||
|
docQueryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
toolId: ''
|
||||||
|
},
|
||||||
|
defaultStaff: [],
|
||||||
|
yes: 'Y',
|
||||||
|
searchQuery: {},
|
||||||
|
deptList: [],
|
||||||
|
companyList: [],
|
||||||
|
deptOptions: [],
|
||||||
|
docClassList: [],
|
||||||
|
submitLabel:undefined,
|
||||||
|
passoptions: [
|
||||||
|
{ value: true, label: "通过" },
|
||||||
|
{ value: false, label: "不通过" },
|
||||||
|
],
|
||||||
|
formSubmit: { summary: "", actionType: "", pass: "" },
|
||||||
|
isSummary: false,
|
||||||
|
activeName: "info",
|
||||||
|
nodeDetail: [],
|
||||||
|
procDefKey: undefined,
|
||||||
|
viewId: "",
|
||||||
|
userInfo: this.$store.getters.userInfo,
|
||||||
|
viewShow: false,
|
||||||
|
monitorDrawerVisible:false,
|
||||||
|
form: {},
|
||||||
|
rules: {
|
||||||
|
toolCode: [
|
||||||
|
{ required: true, message: "工具编号不能为空", trigger: "blur" },
|
||||||
|
{ min: 2, max: 30, message: '工具编号长度必须介于 2 和 30 之间', trigger: 'blur' },
|
||||||
|
{ validator: validatorToolExist, trigger: "blur" },
|
||||||
|
],
|
||||||
|
toolName: [
|
||||||
|
{ required: true, message: "工具名称不能为空", trigger: "blur" },
|
||||||
|
{ max: 50, message: '工具名称不能超过50个字', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
toolPrincipals: [
|
||||||
|
{ required: true, message: "负责人不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
toolRespDept: [
|
||||||
|
{ required: true, message: "请选择归属部门", trigger: "blur" }
|
||||||
|
],
|
||||||
|
toolSource: [
|
||||||
|
{ required: true, message: "请输入工具来源", trigger: "blur" },
|
||||||
|
{ max: 50, message: '工具来源不能超过50个字', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
toolType: [
|
||||||
|
{ required: true, message: "请选择工具类别", trigger: "blur" }
|
||||||
|
],
|
||||||
|
toolUse: [
|
||||||
|
{ required: true, message: "请输入工具用途", trigger: "blur" },
|
||||||
|
{ max: 50, message: '工具用途不能超过50个字', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
testSituation: [
|
||||||
|
{ required: true, message: "请输入测试情况", trigger: "blur" },
|
||||||
|
],
|
||||||
|
functionDesc: [
|
||||||
|
{ required: true, message: "请输入功能描述", trigger: "blur" },
|
||||||
|
],
|
||||||
|
applyCondition: [
|
||||||
|
{ required: true, message: "请输入适用条件", trigger: "blur" },
|
||||||
|
],
|
||||||
|
operateExplain: [
|
||||||
|
{ required: true, message: "请选择状态", trigger: "blur" },
|
||||||
|
],
|
||||||
|
status: [
|
||||||
|
{ required: true, message: "请输入操作说明", trigger: "blur" },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
kuozhanshuju: {},
|
||||||
|
kuozhanshujuBool: {},
|
||||||
|
kuozhanshujuLabel: {},
|
||||||
|
pListData: {},
|
||||||
|
editStatus:false,
|
||||||
|
workflowStatus: false,
|
||||||
|
dialogVisible: false,
|
||||||
|
loading: false,
|
||||||
|
detailLoading: false,
|
||||||
|
flowStepLoading : false,
|
||||||
|
// 默认密码
|
||||||
|
initPassword: undefined,
|
||||||
|
viewDialogTitle: "",
|
||||||
|
viewDialogOpen: false,
|
||||||
|
previewUrl: '',
|
||||||
|
loadingDownload: false,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {},
|
||||||
|
watch: {
|
||||||
|
data (val) {
|
||||||
|
if (val) {
|
||||||
|
this.init(val)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
if (this.data) {
|
||||||
|
this.init(this.data)
|
||||||
|
}
|
||||||
|
this.getConfigKey("sys.user.initPassword").then(response => {
|
||||||
|
this.initPassword = response.msg;
|
||||||
|
});
|
||||||
|
this.getDeptTree()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询部门下拉树结构 */
|
||||||
|
getDeptTree() {
|
||||||
|
deptTreeSelect().then(response => {
|
||||||
|
this.deptOptions = response.data;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
async init(row) {
|
||||||
|
let _this = this
|
||||||
|
_this.rest()
|
||||||
|
_this.loading = true
|
||||||
|
_this.procDefKey = 'Process_FHXOQXVP'
|
||||||
|
_this.form.type = row.type
|
||||||
|
//是否编辑模式
|
||||||
|
_this.$nextTick(() => {
|
||||||
|
if (row && row.procInstId) {
|
||||||
|
let procInstId = row.procInstId
|
||||||
|
_this.workflowStatus = row.status == '1'
|
||||||
|
_this.procInstInfoAndStatus(procInstId)
|
||||||
|
_this.getDetail(procInstId)
|
||||||
|
} else {
|
||||||
|
_this.workflowStatus = true
|
||||||
|
_this.loading = false
|
||||||
|
_this.editStatus = true
|
||||||
|
_this.getWorkflowprocesskey();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getDetail(procInstId) {
|
||||||
|
let _this = this
|
||||||
|
_this.detailLoading = true
|
||||||
|
getInfoByBpmcId(procInstId).then(async (res) => {
|
||||||
|
let formData = res.data;
|
||||||
|
formData.type = _this.form.type
|
||||||
|
// _this.docList = formData.documentList
|
||||||
|
formData.association = JSON.parse(res.data.association)
|
||||||
|
_this.form = formData
|
||||||
|
_this.getDocumentList(res.data.toolId)
|
||||||
|
}).finally(()=>{
|
||||||
|
_this.detailLoading = false
|
||||||
|
});
|
||||||
|
},
|
||||||
|
rest(){
|
||||||
|
let _this = this
|
||||||
|
_this.activeName = "info"
|
||||||
|
},
|
||||||
|
procInstInfoAndStatus(procInstId){
|
||||||
|
let _this = this
|
||||||
|
procInstInfoAndStatus(procInstId).then((res) => {
|
||||||
|
if (res) {
|
||||||
|
_this.pListData = res
|
||||||
|
}else {
|
||||||
|
_this.pListData = {procInstId:procInstId}
|
||||||
|
}
|
||||||
|
_this.getExtAttributeModel()
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getWorkflowprocesskey() {
|
||||||
|
let _this = this
|
||||||
|
_this.loading = true
|
||||||
|
_this.pListData = {}
|
||||||
|
if (_this.procDefKey) {
|
||||||
|
workflowprocesskey(_this.procDefKey).then((data) => {
|
||||||
|
getStartActdef(data.data.procDefId).then((res) => {
|
||||||
|
_this.pListData = res.data;
|
||||||
|
this.getExtAttributeModel()
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}else {
|
||||||
|
_this.$message.warning("该文件类型尚未进行流程设置,将无法发起流程!");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getExtAttributeModel(){
|
||||||
|
let _this = this
|
||||||
|
let procDefId = _this.pListData.procDefId
|
||||||
|
let curActDefId = _this.pListData.curActDefId || _this.pListData.actDefId
|
||||||
|
if (procDefId&&curActDefId) {
|
||||||
|
getExtAttributeModel(
|
||||||
|
procDefId,
|
||||||
|
curActDefId
|
||||||
|
).then((res) => {
|
||||||
|
let kuozhanshujuBool = {}
|
||||||
|
let kuozhanshuju = {}
|
||||||
|
let kuozhanshujuLabel = {}
|
||||||
|
res.data.forEach(item=>{
|
||||||
|
kuozhanshujuLabel[item.objKey] = item.objName
|
||||||
|
if (item.objType==='Boolean') {
|
||||||
|
kuozhanshujuBool[item.objKey] = item.objValue
|
||||||
|
} else {
|
||||||
|
kuozhanshuju[item.objKey] = item.objValue
|
||||||
|
}
|
||||||
|
})
|
||||||
|
_this.kuozhanshujuBool = kuozhanshujuBool;
|
||||||
|
_this.kuozhanshuju = kuozhanshuju;
|
||||||
|
_this.kuozhanshujuLabel = kuozhanshujuLabel;
|
||||||
|
_this.editStatus =_this.attributeModelBool('edit')&&_this.workflowStatus
|
||||||
|
_this.submitLabel = _this.attributeModelLabel('approve')
|
||||||
|
}).finally(()=>{
|
||||||
|
_this.loading = false
|
||||||
|
});
|
||||||
|
}else {
|
||||||
|
_this.kuozhanshujuBool = {}
|
||||||
|
_this.kuozhanshuju = {}
|
||||||
|
_this.loading = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
attributeModelBool(val){
|
||||||
|
if (this.kuozhanshujuBool&&this.kuozhanshujuBool!=={}) {
|
||||||
|
let obj = this.kuozhanshujuBool[val]
|
||||||
|
return obj?obj==='true':false
|
||||||
|
}else {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
attributeModel(val){
|
||||||
|
return this.kuozhanshuju[val]
|
||||||
|
},
|
||||||
|
attributeModelLabel(val){
|
||||||
|
return this.kuozhanshujuLabel[val]
|
||||||
|
},
|
||||||
|
close() {
|
||||||
|
this.viewShow = false;
|
||||||
|
this.$emit("close")
|
||||||
|
},
|
||||||
|
//不需要验证必填的保存
|
||||||
|
saveForm() {
|
||||||
|
let _this = this
|
||||||
|
if (!_this.procDefKey) {
|
||||||
|
_this.$message.warning("尚未进行流程设置,将无法发起流程!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
_this.loading = true
|
||||||
|
let formData = JSON.parse(JSON.stringify(_this.form))
|
||||||
|
formData.recordStatus = "draft";
|
||||||
|
formData.editStatus = _this.editStatus
|
||||||
|
formData.association = JSON.stringify(_this.form.association)
|
||||||
|
if (formData.toolId) {
|
||||||
|
this.$set(formData,'documentList',_this.docList)
|
||||||
|
updateTool(formData).then((res) => {
|
||||||
|
if (res.code===200) {
|
||||||
|
_this.$message({
|
||||||
|
message: '保存成功',//提示的信息
|
||||||
|
type:'success', //类型是成功
|
||||||
|
duration:1200, //显示时间, 毫秒。设为 0 则不会自动关闭,建议1200
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}).finally(()=>{
|
||||||
|
_this.loading = false
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
let wf_receivers = [];
|
||||||
|
wf_receivers.push({
|
||||||
|
receiveUserId: _this.userInfo.userName,
|
||||||
|
receiveUserOrgId: _this.userInfo.deptId
|
||||||
|
});
|
||||||
|
let wf_procTitle = "【工具发布】" + (formData.toolName?formData.toolName:"")
|
||||||
|
formData.bpmClientInputModel = {
|
||||||
|
model: {
|
||||||
|
wf_procDefId: _this.pListData.procDefId,
|
||||||
|
wf_procDefKey: _this.procDefKey,
|
||||||
|
wf_procTitle: wf_procTitle,
|
||||||
|
wf_sendUserId: _this.userInfo.userName,
|
||||||
|
wf_sendUserOrgId: _this.userInfo.deptId,
|
||||||
|
wf_receivers: wf_receivers,
|
||||||
|
wf_curActDefName: _this.pListData.actDefName,
|
||||||
|
wf_curActDefId: _this.pListData.actDefId,
|
||||||
|
wf_nextActDefName: _this.pListData.actDefName,
|
||||||
|
wf_nextActDefId: _this.pListData.actDefId,
|
||||||
|
},
|
||||||
|
type: formData.type,
|
||||||
|
review: _this.attributeModelBool('approve'),
|
||||||
|
};
|
||||||
|
formData.editStatus = _this.editStatus
|
||||||
|
this.$set(formData,'documentList',_this.docList)
|
||||||
|
addTool(formData).then((res) => {
|
||||||
|
if (res.code===200) {
|
||||||
|
_this.form.toolId = res.data.businessKey;
|
||||||
|
_this.procInstInfoAndStatus(res.data.procInstId)
|
||||||
|
_this.$message({
|
||||||
|
message: '保存成功',//提示的信息
|
||||||
|
type:'success', //类型是成功
|
||||||
|
duration:1200, //显示时间, 毫秒。设为 0 则不会自动关闭,建议1200
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}).finally(()=>{
|
||||||
|
_this.loading = false
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
deleteForm(){
|
||||||
|
let _this = this
|
||||||
|
_this.$modal.confirm('删除后,该流程待办任务将会被删除,请谨慎操作。是否确认执行?')
|
||||||
|
.then(()=> {
|
||||||
|
_this.loading = true
|
||||||
|
let formData = {
|
||||||
|
toolId: _this.form.toolId,
|
||||||
|
bpmClientInputModel: {
|
||||||
|
model: {
|
||||||
|
wf_procInstId: _this.pListData.procInstId,
|
||||||
|
wf_sendUserId: _this.userInfo.userName,
|
||||||
|
wf_sendUserOrgId: _this.userInfo.deptId,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
review: false,
|
||||||
|
recordStatus: 'cancel',
|
||||||
|
editStatus: false
|
||||||
|
}
|
||||||
|
addTool(formData).then((res) => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
this.close(true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 提交
|
||||||
|
async submitForm() {
|
||||||
|
let _this = this
|
||||||
|
// 首先页签调整为 信息内容
|
||||||
|
_this.activeName = 'info'
|
||||||
|
if (!_this.procDefKey) {
|
||||||
|
_this.$message.warning("尚未进行流程设置,将无法发起流程!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
let dialogVisible = true
|
||||||
|
//审核
|
||||||
|
if (_this.attributeModelBool('approve')) {
|
||||||
|
if (_this.formSubmit.pass==='') {
|
||||||
|
_this.$modal.msgError(_this.submitLabel+"结论不能为空!");
|
||||||
|
return true;
|
||||||
|
} else if (!_this.formSubmit.pass&&!_this.formSubmit.summary) {
|
||||||
|
_this.$modal.msgError("请填写"+_this.submitLabel+"意见");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!!_this.$refs["eForm"]) {
|
||||||
|
let valid = await _this.$refs["eForm"].validate()
|
||||||
|
if (!valid) {
|
||||||
|
dialogVisible = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_this.searchQuery.pass = _this.formSubmit.pass
|
||||||
|
let defaultStaff = []
|
||||||
|
this.defaultStaff=defaultStaff
|
||||||
|
this.dialogVisible = true;
|
||||||
|
},
|
||||||
|
|
||||||
|
//提交表单和流程数据
|
||||||
|
handleWorkflowSubmit() {
|
||||||
|
let _this = this
|
||||||
|
let formData = JSON.parse(JSON.stringify(_this.form))
|
||||||
|
formData.association = JSON.stringify(_this.form.association)
|
||||||
|
let wf_receivers = [];
|
||||||
|
if (_this.$refs.prochild.receiveUserList.length < 1 &&_this.$refs.prochild.nextData.actDefType!=='endEvent') {
|
||||||
|
_this.$message.warning("请选择人员!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
_this.$refs.prochild.receiveUserList.forEach((element) => {
|
||||||
|
wf_receivers.push({
|
||||||
|
receiveUserId: element.id,
|
||||||
|
receiveUserOrgId: element.parentId,
|
||||||
|
});
|
||||||
|
});
|
||||||
|
let wf_nextActDefId = _this.$refs.prochild.nextData.actDefId;
|
||||||
|
let wf_nextActDefName = _this.$refs.prochild.nextData.actDefName;
|
||||||
|
// 显示加载中
|
||||||
|
_this.flowStepLoading = true
|
||||||
|
_this.detailLoading = true
|
||||||
|
let wf_procTitle = "【工具发布】" + (formData.toolName?formData.toolName:"")
|
||||||
|
if (_this.pListData && _this.pListData.procInstId) {
|
||||||
|
//流程执行参数
|
||||||
|
formData.bpmClientInputModel = {
|
||||||
|
model: {
|
||||||
|
wf_procDefKey: _this.procDefKey,
|
||||||
|
wf_procDefId: _this.pListData.procDefId,
|
||||||
|
wf_procTitle: wf_procTitle,
|
||||||
|
wf_curActInstId: _this.pListData.curActInstId,
|
||||||
|
wf_sendUserId: _this.userInfo.userName,
|
||||||
|
wf_sendUserOrgId: _this.userInfo.deptId,
|
||||||
|
wf_receivers: wf_receivers,
|
||||||
|
wf_nextActDefId: wf_nextActDefId,
|
||||||
|
wf_curComment: _this.formSubmit.summary,
|
||||||
|
wf_curActDefId: _this.pListData.curActDefId,
|
||||||
|
wf_curActDefName: _this.pListData.curActDefName,
|
||||||
|
wf_nextActDefName: wf_nextActDefName,
|
||||||
|
},
|
||||||
|
applyStatus: _this.formSubmit.pass,
|
||||||
|
review: _this.attributeModelBool('approve'),
|
||||||
|
type: formData.type
|
||||||
|
};
|
||||||
|
}else{
|
||||||
|
//创建流程参数
|
||||||
|
formData.bpmClientInputModel = {
|
||||||
|
model: {
|
||||||
|
wf_procTitle: wf_procTitle,
|
||||||
|
wf_nextActDefId: wf_nextActDefId,
|
||||||
|
wf_procDefId: _this.pListData.procDefId,
|
||||||
|
wf_procDefKey: _this.procDefKey,
|
||||||
|
wf_sendUserId: _this.userInfo.userName,
|
||||||
|
wf_sendUserOrgId: _this.userInfo.deptId,
|
||||||
|
wf_receivers: wf_receivers,
|
||||||
|
wf_curActDefName: _this.pListData.actDefName,
|
||||||
|
wf_curActDefId: _this.pListData.actDefId,
|
||||||
|
wf_nextActDefName: wf_nextActDefName,
|
||||||
|
},
|
||||||
|
review: _this.attributeModelBool('approve'),
|
||||||
|
type: formData.type,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
if (_this.$refs.prochild.nextData.actDefType==='endEvent') {
|
||||||
|
//办结
|
||||||
|
formData.recordStatus = 'done'
|
||||||
|
} else {
|
||||||
|
//进行中
|
||||||
|
formData.recordStatus = 'doing'
|
||||||
|
}
|
||||||
|
formData.editStatus = _this.editStatus
|
||||||
|
this.$set(formData,'documentList',_this.docList)
|
||||||
|
addTool(formData).then((res) => {
|
||||||
|
if (res.code===200) {
|
||||||
|
_this.$message({
|
||||||
|
message: '流程提交成功',//提示的信息
|
||||||
|
type:'success', //类型是成功
|
||||||
|
duration:1200, //显示时间, 毫秒。设为 0 则不会自动关闭,建议1200
|
||||||
|
onClose:()=>{
|
||||||
|
_this.flowStepLoading = false
|
||||||
|
_this.detailLoading = false
|
||||||
|
_this.dialogVisible = false;
|
||||||
|
_this.close();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleMonitor() {
|
||||||
|
this.monitorDrawerVisible = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.monitorDrawer.init(this.pListData.procInstId);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleDelete(row){
|
||||||
|
this.docList.splice(row,1)
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 新增上传附件
|
||||||
|
*/
|
||||||
|
handleDocAdd() {
|
||||||
|
this.addDocShow = true
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.addDocRef.resetForm()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getDocumentList(toolId) {
|
||||||
|
this.loading = true
|
||||||
|
this.docQueryParams.toolId = toolId
|
||||||
|
this.$set(this.docQueryParams,'isDeleted',"0")
|
||||||
|
listDocument(this.docQueryParams).then(res => {
|
||||||
|
this.docList = res.rows;
|
||||||
|
this.total = res.total;
|
||||||
|
this.loading = false;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
},
|
||||||
|
submitPeople(peopleList){
|
||||||
|
this.$set(this.form,'toolPrincipals',peopleList[0]['userId'])
|
||||||
|
this.$set(this.form,'toolPrincipalsName',peopleList[0]['nickName'])
|
||||||
|
this.toolPrincipalsChoose = false;
|
||||||
|
this.$refs['eForm'].validateField("toolPrincipals");
|
||||||
|
},
|
||||||
|
handleSelectNode(node){
|
||||||
|
this.$set(this.form,'toolRespDeptName',node.label)
|
||||||
|
},
|
||||||
|
toolSelect(){
|
||||||
|
this.$refs.selectHeadTool.blur();
|
||||||
|
this.$nextTick(()=>{
|
||||||
|
this.$refs.toolSelect.init(null,null,true)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
selectHandle(source,index,data){
|
||||||
|
let list = this.form.association
|
||||||
|
if (!list) {
|
||||||
|
list = []
|
||||||
|
}
|
||||||
|
data.forEach(itme=>{
|
||||||
|
list.push({toolId:itme.toolId,toolName:itme.toolName})
|
||||||
|
})
|
||||||
|
this.form.association = list
|
||||||
|
},
|
||||||
|
/** 添加关联附件数据**/
|
||||||
|
addFileData(dataInfo){
|
||||||
|
let document = JSON.parse(JSON.stringify(dataInfo))
|
||||||
|
this.docList.push(document)
|
||||||
|
},
|
||||||
|
findDeptInTree(tree, id) {
|
||||||
|
for (const node of tree) {
|
||||||
|
if (node.id == id) {
|
||||||
|
return node;
|
||||||
|
}
|
||||||
|
if (node.children && node.children.length > 0) {
|
||||||
|
const found = this.findDeptInTree(node.children, id);
|
||||||
|
if (found) {
|
||||||
|
return found;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
},
|
||||||
|
/** 获取部门名称 **/
|
||||||
|
convertDeptName(row){
|
||||||
|
let foundDept = this.findDeptInTree(this.deptOptions, row.docRespDept);
|
||||||
|
if(foundDept){
|
||||||
|
return foundDept.label
|
||||||
|
}
|
||||||
|
return null
|
||||||
|
},
|
||||||
|
isShowOperation(row){
|
||||||
|
let self = this
|
||||||
|
if(row.docId == null || row.docId == undefined || row.docId == ''){
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
},
|
||||||
|
handlePreview(row){
|
||||||
|
this.previewUrl = process.env.VUE_APP_TOOL_TECH_FILE_VIEW_API + '/onlinePreview?url=' + encodeURIComponent(Base64.encode(process.env.VUE_APP_BASE_API + row.docUrl));
|
||||||
|
this.viewDialogTitle = '文档在线预览'
|
||||||
|
this.viewDialogOpen = true;
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 处理下载
|
||||||
|
* **/
|
||||||
|
handleDownload(row){
|
||||||
|
let self = this
|
||||||
|
self.loadingDownload = true
|
||||||
|
this.$download.resource(row.docUrl);
|
||||||
|
setTimeout(()=>{
|
||||||
|
self.loadingDownload = false
|
||||||
|
},1000)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
};
|
||||||
|
</script>
|
||||||
600
src/views/workflowList/addWorkflow/use_apply.vue
Normal file
600
src/views/workflowList/addWorkflow/use_apply.vue
Normal file
@@ -0,0 +1,600 @@
|
|||||||
|
<template>
|
||||||
|
<div v-loading="loading||detailLoading">
|
||||||
|
<div class="drawer-head">
|
||||||
|
<div class="cell-title">
|
||||||
|
<div>
|
||||||
|
<p class="title">申请使用</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="cell-btn">
|
||||||
|
<el-button v-if="pListData&&pListData.procInstId" @click="handleMonitor">流程监控</el-button>
|
||||||
|
<el-button v-if="editStatus&&pListData.procInstId" type="danger" @click="deleteForm">撤销</el-button>
|
||||||
|
<el-button v-if="(editStatus||workflowStatus)" type="primary" @click="submitForm">提交</el-button>
|
||||||
|
<el-button v-if="editStatus" type="primary" @click="saveForm" >保存</el-button>
|
||||||
|
<el-button @click="close">关闭</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<el-tabs v-if="pListData&&pListData.procInstId" v-model="activeName">
|
||||||
|
<el-tab-pane label="信息内容" name="info"></el-tab-pane>
|
||||||
|
<el-tab-pane label="审批记录" name="log"></el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
<div class="el-form-border" v-show="activeName==='info'">
|
||||||
|
<el-form ref="eForm" :model="form" :rules="rules" label-width="150px">
|
||||||
|
<div>
|
||||||
|
<div class="box-title">
|
||||||
|
基本信息
|
||||||
|
</div>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="申请人" prop="userId">
|
||||||
|
<el-input v-if="editStatus" v-model="form.nickName" placeholder="请输入申请人" @focus="toolPrincipalsChoose = true"/>
|
||||||
|
<span v-else>{{form.nickName}}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="申请部门" prop="deptId">
|
||||||
|
<span>{{form.deptName}}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="申请理由" prop="reason">
|
||||||
|
<el-input :readonly="!editStatus" v-model="form.reason" type="textarea" :rows="3" maxlength="1000" show-word-limit></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="box-title">
|
||||||
|
申请工具
|
||||||
|
</div>
|
||||||
|
<el-table :data="dataList" style="width: 100%">
|
||||||
|
<el-table-column label="工具编号" prop="toolCode" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="工具名称" prop="toolName" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="归属单位" prop="toolRespDept" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="负责人" prop="toolPrincipalsName" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="工具类别" prop="toolType" :show-overflow-tooltip="true" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.tool_type" :value="scope.row.toolType"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
<div v-if="attributeModelBool('approve')&&workflowStatus">
|
||||||
|
<div class="box-title">
|
||||||
|
{{submitLabel}}
|
||||||
|
</div>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item :label="submitLabel+'结论:'" prop="pass">
|
||||||
|
<el-radio-group v-model.trim="formSubmit.pass">
|
||||||
|
<el-radio
|
||||||
|
v-for="dict in passoptions"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.value"
|
||||||
|
>{{ dict.label }}</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row >
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item :label="submitLabel+'意见:'">
|
||||||
|
<el-input
|
||||||
|
v-model="formSubmit.summary"
|
||||||
|
type="textarea"
|
||||||
|
:placeholder="'请输入'+submitLabel+'意见'"
|
||||||
|
maxlength="200"
|
||||||
|
:autosize="{ minRows: 4, maxRows: 4 }"
|
||||||
|
:style="{ width: '100%' }"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
</el-form>
|
||||||
|
</div><!--el-form-border 表单-->
|
||||||
|
<div v-show="activeName==='log'">
|
||||||
|
<workflow-logs :procInstId = "pListData.procInstId"></workflow-logs>
|
||||||
|
</div>
|
||||||
|
<!-- 流程选择下一环节及人员 开始 -->
|
||||||
|
<el-dialog
|
||||||
|
title="选择下一环节及人员"
|
||||||
|
v-if="dialogVisible" :visible.sync="dialogVisible"
|
||||||
|
width="60%"
|
||||||
|
append-to-body
|
||||||
|
v-loading = flowStepLoading
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
:close-on-press-escape="false"
|
||||||
|
>
|
||||||
|
<processcode
|
||||||
|
ref="prochild"
|
||||||
|
:searchQuery="searchQuery"
|
||||||
|
:pListData="pListData"
|
||||||
|
:isSummary="isSummary"
|
||||||
|
></processcode>
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="handleWorkflowSubmit"
|
||||||
|
>提 交</el-button
|
||||||
|
>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
<!-- 流程选择下一环节及人员 结束 -->
|
||||||
|
<monitor-drawer
|
||||||
|
v-if="monitorDrawerVisible"
|
||||||
|
ref="monitorDrawer"
|
||||||
|
></monitor-drawer>
|
||||||
|
<bl-user-selector ref="peopleSelect" :type="'single'" :isCheck="true" :open="toolPrincipalsChoose" @cancel="toolPrincipalsChoose=false" @submit="submitPeople"></bl-user-selector>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import { listDocument } from "@/api/document/document";
|
||||||
|
import processcode from "@/views/workflowList/processcode/index.vue";
|
||||||
|
import {
|
||||||
|
workflowprocesskey,
|
||||||
|
getStartActdef,
|
||||||
|
getExtAttributeModel,
|
||||||
|
procInstInfoAndStatus,
|
||||||
|
} from '@/api/my_business/workflow'
|
||||||
|
import WorkflowLogs from '@/views/workflowList/workflowLogs/index.vue'
|
||||||
|
import AddDoc from '@/views/tool/AddDoc.vue'
|
||||||
|
import Treeselect from '@riophae/vue-treeselect'
|
||||||
|
import { deptTreeSelect } from "@/api/system/user";
|
||||||
|
import { addApply, getInfoByBpmcId, updateApply } from '@/api/tool/userApply'
|
||||||
|
import { listItem } from '@/api/tool/userApplyItem'
|
||||||
|
import blUserSelector from '@/components/user-selector/src/user-selector.vue'
|
||||||
|
// PDF本地文件预览
|
||||||
|
export default {
|
||||||
|
dicts: ['sys_normal_disable','tool_type'],
|
||||||
|
components: {
|
||||||
|
blUserSelector,
|
||||||
|
Treeselect, AddDoc,
|
||||||
|
WorkflowLogs,
|
||||||
|
processcode,
|
||||||
|
},
|
||||||
|
name: "Borrow_doc",
|
||||||
|
props: ['data'],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
toolPrincipalsChoose: false,
|
||||||
|
// 新增时的关联附件
|
||||||
|
dataList: [],
|
||||||
|
addDocShow: false,
|
||||||
|
defaultStaff: [],
|
||||||
|
yes: 'Y',
|
||||||
|
searchQuery: {},
|
||||||
|
deptList: [],
|
||||||
|
companyList: [],
|
||||||
|
deptOptions: [],
|
||||||
|
docClassList: [],
|
||||||
|
submitLabel:undefined,
|
||||||
|
passoptions: [
|
||||||
|
{ value: true, label: "通过" },
|
||||||
|
{ value: false, label: "不通过" },
|
||||||
|
],
|
||||||
|
formSubmit: { summary: "", actionType: "", pass: "" },
|
||||||
|
isSummary: false,
|
||||||
|
activeName: "info",
|
||||||
|
nodeDetail: [],
|
||||||
|
procDefKey: undefined,
|
||||||
|
viewId: "",
|
||||||
|
userInfo: this.$store.getters.userInfo,
|
||||||
|
viewShow: false,
|
||||||
|
monitorDrawerVisible:false,
|
||||||
|
form: {},
|
||||||
|
rules: {
|
||||||
|
userId: [
|
||||||
|
{ required: true, message: "申请人不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
reason: [
|
||||||
|
{ required: true, message: '申请理由不能为空', trigger: 'blur' }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
kuozhanshuju: {},
|
||||||
|
kuozhanshujuBool: {},
|
||||||
|
kuozhanshujuLabel: {},
|
||||||
|
pListData: {},
|
||||||
|
editStatus:false,
|
||||||
|
workflowStatus: false,
|
||||||
|
dialogVisible: false,
|
||||||
|
loading: false,
|
||||||
|
detailLoading: false,
|
||||||
|
flowStepLoading : false,
|
||||||
|
// 默认密码
|
||||||
|
initPassword: undefined,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {},
|
||||||
|
watch: {
|
||||||
|
data (val) {
|
||||||
|
if (val) {
|
||||||
|
this.init(val)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
if (this.data) {
|
||||||
|
this.init(this.data)
|
||||||
|
}
|
||||||
|
this.getConfigKey("sys.user.initPassword").then(response => {
|
||||||
|
this.initPassword = response.msg;
|
||||||
|
});
|
||||||
|
this.getDeptTree()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询部门下拉树结构 */
|
||||||
|
getDeptTree() {
|
||||||
|
deptTreeSelect().then(response => {
|
||||||
|
this.deptOptions = response.data;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
async init(row) {
|
||||||
|
let _this = this
|
||||||
|
_this.rest(row)
|
||||||
|
_this.loading = true
|
||||||
|
_this.procDefKey = 'Process_DCMGS6M9'
|
||||||
|
_this.form.type = row.type
|
||||||
|
//是否编辑模式
|
||||||
|
_this.$nextTick(() => {
|
||||||
|
if (row && row.procInstId) {
|
||||||
|
let procInstId = row.procInstId
|
||||||
|
_this.workflowStatus = row.status == '1'
|
||||||
|
_this.procInstInfoAndStatus(procInstId)
|
||||||
|
_this.getDetail(procInstId)
|
||||||
|
} else {
|
||||||
|
_this.workflowStatus = true
|
||||||
|
_this.loading = false
|
||||||
|
_this.editStatus = true
|
||||||
|
_this.getWorkflowprocesskey();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getDetail(procInstId) {
|
||||||
|
let _this = this
|
||||||
|
_this.detailLoading = true
|
||||||
|
getInfoByBpmcId(procInstId).then(async (res) => {
|
||||||
|
let formData = res.data;
|
||||||
|
formData.type = _this.form.type
|
||||||
|
_this.form = formData
|
||||||
|
this.getItemList(res.data.id);
|
||||||
|
}).finally(()=>{
|
||||||
|
_this.detailLoading = false
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getItemList(id){
|
||||||
|
let _this = this
|
||||||
|
listItem({applyId:id}).then(res=>{
|
||||||
|
_this.dataList = res.data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
rest(data){
|
||||||
|
let _this = this
|
||||||
|
_this.activeName = "info"
|
||||||
|
_this.dataList = [{...data}]
|
||||||
|
_this.form={
|
||||||
|
userId:_this.userInfo.userId,
|
||||||
|
nickName:_this.userInfo.nickName,
|
||||||
|
deptId:_this.userInfo.deptId,
|
||||||
|
deptName:_this.userInfo.dept.deptName,
|
||||||
|
reason: ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
procInstInfoAndStatus(procInstId){
|
||||||
|
let _this = this
|
||||||
|
procInstInfoAndStatus(procInstId).then((res) => {
|
||||||
|
if (res) {
|
||||||
|
_this.pListData = res
|
||||||
|
}else {
|
||||||
|
_this.pListData = {procInstId:procInstId}
|
||||||
|
}
|
||||||
|
_this.getExtAttributeModel()
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getWorkflowprocesskey() {
|
||||||
|
let _this = this
|
||||||
|
_this.loading = true
|
||||||
|
_this.pListData = {}
|
||||||
|
if (_this.procDefKey) {
|
||||||
|
workflowprocesskey(_this.procDefKey).then((data) => {
|
||||||
|
getStartActdef(data.data.procDefId).then((res) => {
|
||||||
|
_this.pListData = res.data;
|
||||||
|
this.getExtAttributeModel()
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}else {
|
||||||
|
_this.$message.warning("该文件类型尚未进行流程设置,将无法发起流程!");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getExtAttributeModel(){
|
||||||
|
let _this = this
|
||||||
|
let procDefId = _this.pListData.procDefId
|
||||||
|
let curActDefId = _this.pListData.curActDefId || _this.pListData.actDefId
|
||||||
|
if (procDefId&&curActDefId) {
|
||||||
|
getExtAttributeModel(
|
||||||
|
procDefId,
|
||||||
|
curActDefId
|
||||||
|
).then((res) => {
|
||||||
|
let kuozhanshujuBool = {}
|
||||||
|
let kuozhanshuju = {}
|
||||||
|
let kuozhanshujuLabel = {}
|
||||||
|
res.data.forEach(item=>{
|
||||||
|
kuozhanshujuLabel[item.objKey] = item.objName
|
||||||
|
if (item.objType==='Boolean') {
|
||||||
|
kuozhanshujuBool[item.objKey] = item.objValue
|
||||||
|
} else {
|
||||||
|
kuozhanshuju[item.objKey] = item.objValue
|
||||||
|
}
|
||||||
|
})
|
||||||
|
_this.kuozhanshujuBool = kuozhanshujuBool;
|
||||||
|
_this.kuozhanshuju = kuozhanshuju;
|
||||||
|
_this.kuozhanshujuLabel = kuozhanshujuLabel;
|
||||||
|
_this.editStatus =_this.attributeModelBool('edit')&&_this.workflowStatus
|
||||||
|
_this.submitLabel = _this.attributeModelLabel('approve')
|
||||||
|
}).finally(()=>{
|
||||||
|
_this.loading = false
|
||||||
|
});
|
||||||
|
}else {
|
||||||
|
_this.kuozhanshujuBool = {}
|
||||||
|
_this.kuozhanshuju = {}
|
||||||
|
_this.loading = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
attributeModelBool(val){
|
||||||
|
if (this.kuozhanshujuBool&&this.kuozhanshujuBool!=={}) {
|
||||||
|
let obj = this.kuozhanshujuBool[val]
|
||||||
|
return obj?obj==='true':false
|
||||||
|
}else {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
attributeModel(val){
|
||||||
|
return this.kuozhanshuju[val]
|
||||||
|
},
|
||||||
|
attributeModelLabel(val){
|
||||||
|
return this.kuozhanshujuLabel[val]
|
||||||
|
},
|
||||||
|
close() {
|
||||||
|
this.viewShow = false;
|
||||||
|
this.$emit("close")
|
||||||
|
},
|
||||||
|
//不需要验证必填的保存
|
||||||
|
saveForm() {
|
||||||
|
let _this = this
|
||||||
|
if (!_this.procDefKey) {
|
||||||
|
_this.$message.warning("尚未进行流程设置,将无法发起流程!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
_this.loading = true
|
||||||
|
let formData = JSON.parse(JSON.stringify(_this.form))
|
||||||
|
formData.itemList = _this.dataList
|
||||||
|
formData.recordStatus = "draft";
|
||||||
|
formData.editStatus = _this.editStatus
|
||||||
|
if (formData.id) {
|
||||||
|
updateApply(formData).then((res) => {
|
||||||
|
if (res.code===200) {
|
||||||
|
_this.$message({
|
||||||
|
message: '保存成功',//提示的信息
|
||||||
|
type:'success', //类型是成功
|
||||||
|
duration:1200, //显示时间, 毫秒。设为 0 则不会自动关闭,建议1200
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}).finally(()=>{
|
||||||
|
_this.loading = false
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
let wf_receivers = [];
|
||||||
|
wf_receivers.push({
|
||||||
|
receiveUserId: _this.userInfo.userName,
|
||||||
|
receiveUserOrgId: _this.userInfo.deptId
|
||||||
|
});
|
||||||
|
let wf_procTitle = "【使用申请】"+_this.dataList[0].toolName
|
||||||
|
formData.bpmClientInputModel = {
|
||||||
|
model: {
|
||||||
|
wf_procDefId: _this.pListData.procDefId,
|
||||||
|
wf_procDefKey: _this.procDefKey,
|
||||||
|
wf_procTitle: wf_procTitle,
|
||||||
|
wf_sendUserId: _this.userInfo.userName,
|
||||||
|
wf_sendUserOrgId: _this.userInfo.deptId,
|
||||||
|
wf_receivers: wf_receivers,
|
||||||
|
wf_curActDefName: _this.pListData.actDefName,
|
||||||
|
wf_curActDefId: _this.pListData.actDefId,
|
||||||
|
wf_nextActDefName: _this.pListData.actDefName,
|
||||||
|
wf_nextActDefId: _this.pListData.actDefId,
|
||||||
|
},
|
||||||
|
type: formData.type,
|
||||||
|
review: _this.attributeModelBool('approve'),
|
||||||
|
};
|
||||||
|
formData.editStatus = _this.editStatus
|
||||||
|
addApply(formData).then((res) => {
|
||||||
|
if (res.code===200) {
|
||||||
|
_this.form.id = res.data.businessKey;
|
||||||
|
_this.procInstInfoAndStatus(res.data.procInstId)
|
||||||
|
_this.$message({
|
||||||
|
message: '保存成功',//提示的信息
|
||||||
|
type:'success', //类型是成功
|
||||||
|
duration:1200, //显示时间, 毫秒。设为 0 则不会自动关闭,建议1200
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}).finally(()=>{
|
||||||
|
_this.loading = false
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
deleteForm(){
|
||||||
|
let _this = this
|
||||||
|
_this.$modal.confirm('撤销后,该流程待办任务将会被删除,请谨慎操作。是否确认执行?')
|
||||||
|
.then(()=> {
|
||||||
|
_this.loading = true
|
||||||
|
let formData = {
|
||||||
|
id: _this.form.id,
|
||||||
|
bpmClientInputModel: {
|
||||||
|
model: {
|
||||||
|
wf_procDefKey: _this.procDefKey,
|
||||||
|
wf_procDefId: _this.pListData.procDefId,
|
||||||
|
wf_procInstId: _this.pListData.procInstId,
|
||||||
|
wf_sendUserId: _this.userInfo.userName,
|
||||||
|
wf_sendUserOrgId: _this.userInfo.deptId,
|
||||||
|
wf_curActDefName: _this.pListData.curActDefName,
|
||||||
|
wf_curActDefId: _this.pListData.curActDefId,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
review: false,
|
||||||
|
recordStatus: 'cancel',
|
||||||
|
editStatus: false
|
||||||
|
}
|
||||||
|
addApply(formData).then((res) => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
this.$modal.msgSuccess("撤销成功");
|
||||||
|
this.close(true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 提交
|
||||||
|
async submitForm() {
|
||||||
|
let _this = this
|
||||||
|
// 首先页签调整为 信息内容
|
||||||
|
_this.activeName = 'info'
|
||||||
|
if (!_this.procDefKey) {
|
||||||
|
_this.$message.warning("尚未进行流程设置,将无法发起流程!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
let dialogVisible = true
|
||||||
|
//审核
|
||||||
|
if (_this.attributeModelBool('approve')) {
|
||||||
|
if (_this.formSubmit.pass==='') {
|
||||||
|
_this.$modal.msgError(_this.submitLabel+"结论不能为空!");
|
||||||
|
return true;
|
||||||
|
} else if (!_this.formSubmit.pass&&!_this.formSubmit.summary) {
|
||||||
|
_this.$modal.msgError("请填写"+_this.submitLabel+"意见");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!!_this.$refs["eForm"]) {
|
||||||
|
let valid = await _this.$refs["eForm"].validate()
|
||||||
|
if (!valid) {
|
||||||
|
dialogVisible = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_this.searchQuery.pass = _this.formSubmit.pass
|
||||||
|
let defaultStaff = []
|
||||||
|
this.defaultStaff=defaultStaff
|
||||||
|
this.dialogVisible = true;
|
||||||
|
},
|
||||||
|
|
||||||
|
//提交表单和流程数据
|
||||||
|
handleWorkflowSubmit() {
|
||||||
|
let _this = this
|
||||||
|
let formData = JSON.parse(JSON.stringify(_this.form))
|
||||||
|
formData.itemList = _this.dataList
|
||||||
|
let wf_receivers = [];
|
||||||
|
if (_this.$refs.prochild.receiveUserList.length < 1 &&_this.$refs.prochild.nextData.actDefType!=='endEvent') {
|
||||||
|
_this.$message.warning("请选择人员!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
_this.$refs.prochild.receiveUserList.forEach((element) => {
|
||||||
|
wf_receivers.push({
|
||||||
|
receiveUserId: element.id,
|
||||||
|
receiveUserOrgId: element.parentId,
|
||||||
|
});
|
||||||
|
});
|
||||||
|
let wf_nextActDefId = _this.$refs.prochild.nextData.actDefId;
|
||||||
|
let wf_nextActDefName = _this.$refs.prochild.nextData.actDefName;
|
||||||
|
// 显示加载中
|
||||||
|
_this.flowStepLoading = true
|
||||||
|
_this.detailLoading = true
|
||||||
|
let wf_procTitle = "【使用申请】"+_this.dataList[0].toolName
|
||||||
|
if (_this.pListData && _this.pListData.procInstId) {
|
||||||
|
//流程执行参数
|
||||||
|
formData.bpmClientInputModel = {
|
||||||
|
model: {
|
||||||
|
wf_procDefKey: _this.procDefKey,
|
||||||
|
wf_procDefId: _this.pListData.procDefId,
|
||||||
|
wf_procTitle: wf_procTitle,
|
||||||
|
wf_curActInstId: _this.pListData.curActInstId,
|
||||||
|
wf_sendUserId: _this.userInfo.userName,
|
||||||
|
wf_sendUserOrgId: _this.userInfo.deptId,
|
||||||
|
wf_receivers: wf_receivers,
|
||||||
|
wf_nextActDefId: wf_nextActDefId,
|
||||||
|
wf_curComment: _this.formSubmit.summary,
|
||||||
|
wf_curActDefId: _this.pListData.curActDefId,
|
||||||
|
wf_curActDefName: _this.pListData.curActDefName,
|
||||||
|
wf_nextActDefName: wf_nextActDefName,
|
||||||
|
},
|
||||||
|
applyStatus: _this.formSubmit.pass,
|
||||||
|
review: _this.attributeModelBool('approve'),
|
||||||
|
type: formData.type
|
||||||
|
};
|
||||||
|
}else{
|
||||||
|
//创建流程参数
|
||||||
|
formData.bpmClientInputModel = {
|
||||||
|
model: {
|
||||||
|
wf_procTitle: wf_procTitle,
|
||||||
|
wf_nextActDefId: wf_nextActDefId,
|
||||||
|
wf_procDefId: _this.pListData.procDefId,
|
||||||
|
wf_procDefKey: _this.procDefKey,
|
||||||
|
wf_sendUserId: _this.userInfo.userName,
|
||||||
|
wf_sendUserOrgId: _this.userInfo.deptId,
|
||||||
|
wf_receivers: wf_receivers,
|
||||||
|
wf_curActDefName: _this.pListData.actDefName,
|
||||||
|
wf_curActDefId: _this.pListData.actDefId,
|
||||||
|
wf_nextActDefName: wf_nextActDefName,
|
||||||
|
},
|
||||||
|
review: _this.attributeModelBool('approve'),
|
||||||
|
type: formData.type,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
if (_this.$refs.prochild.nextData.actDefType==='endEvent') {
|
||||||
|
//办结
|
||||||
|
formData.recordStatus = 'done'
|
||||||
|
} else {
|
||||||
|
//进行中
|
||||||
|
formData.recordStatus = 'doing'
|
||||||
|
}
|
||||||
|
formData.editStatus = _this.editStatus
|
||||||
|
addApply(formData).then((res) => {
|
||||||
|
if (res.code===200) {
|
||||||
|
_this.$message({
|
||||||
|
message: '流程提交成功',//提示的信息
|
||||||
|
type:'success', //类型是成功
|
||||||
|
duration:1200, //显示时间, 毫秒。设为 0 则不会自动关闭,建议1200
|
||||||
|
onClose:()=>{
|
||||||
|
_this.flowStepLoading = false
|
||||||
|
_this.detailLoading = false
|
||||||
|
_this.dialogVisible = false;
|
||||||
|
_this.close();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleMonitor() {
|
||||||
|
this.monitorDrawerVisible = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.monitorDrawer.init(this.pListData.procInstId);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleDelete(dataList,index){
|
||||||
|
dataList.splice(index,1)
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 新增上传附件
|
||||||
|
*/
|
||||||
|
handleDocAdd() {
|
||||||
|
this.addDocShow = true
|
||||||
|
},
|
||||||
|
submitPeople(peopleList){
|
||||||
|
this.$set(this.form,'userId',peopleList[0]['userId'])
|
||||||
|
this.$set(this.form,'nickName',peopleList[0]['nickName'])
|
||||||
|
this.$set(this.form,'deptId',peopleList[0]['deptId'])
|
||||||
|
this.$set(this.form,'deptName',peopleList[0].dept.deptName)
|
||||||
|
this.toolPrincipalsChoose = false;
|
||||||
|
this.$refs['eForm'].validateField("userId");
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
508
src/views/workflowList/processcode/index.vue
Normal file
508
src/views/workflowList/processcode/index.vue
Normal file
@@ -0,0 +1,508 @@
|
|||||||
|
<template>
|
||||||
|
<div class="maincss" v-loading="loading">
|
||||||
|
<div class="title-box">
|
||||||
|
<div class="draw-title">
|
||||||
|
{{ title }}
|
||||||
|
</div>
|
||||||
|
<div class="draw-title">
|
||||||
|
</div>
|
||||||
|
<el-form
|
||||||
|
:model="formSubmit"
|
||||||
|
ref="formSubmit"
|
||||||
|
class="mt10"
|
||||||
|
:rules="formrules"
|
||||||
|
label-position="top"
|
||||||
|
label-width="120px"
|
||||||
|
>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="8">
|
||||||
|
<div class="h28">办理步骤</div>
|
||||||
|
<el-tree
|
||||||
|
ref="myTree"
|
||||||
|
:data="processList"
|
||||||
|
:props="processProps"
|
||||||
|
node-key="actDefName"
|
||||||
|
@node-click="processNodeClick"
|
||||||
|
style="border: 1px solid rgb(230, 235, 245); height: 314px;overflow: auto"
|
||||||
|
highlight-current
|
||||||
|
>
|
||||||
|
</el-tree>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8" v-show="processList&&processList.length>0&&nextData&&nextData.actDefType != 'endEvent'">
|
||||||
|
<div class="h28">待选用户
|
||||||
|
<!-- <el-button type="primary" style="float: right" size="mini" @click="handleSelect">通讯录</el-button>-->
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<el-input
|
||||||
|
v-model.trim="userTreeName"
|
||||||
|
placeholder="请输入"
|
||||||
|
clearable
|
||||||
|
size="small"
|
||||||
|
prefix-icon="el-icon-search"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<el-tree
|
||||||
|
ref="userTree"
|
||||||
|
:data="userList"
|
||||||
|
:props="userProps"
|
||||||
|
:filter-node-method="filterNode"
|
||||||
|
:highlight-current="true"
|
||||||
|
:default-expand-all="true"
|
||||||
|
@node-click="userNodeClick"
|
||||||
|
style="border: 1px solid rgb(230, 235, 245); height: 282px;overflow: auto"
|
||||||
|
>
|
||||||
|
</el-tree>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8" v-show="processList&&processList.length>0&&nextData&&nextData.actDefType != 'endEvent'">
|
||||||
|
<div class="h28">已选用户</div>
|
||||||
|
<div
|
||||||
|
class="wordbox"
|
||||||
|
style="border: 1px solid rgb(230, 235, 245); height: 314px;overflow: auto"
|
||||||
|
>
|
||||||
|
<ul>
|
||||||
|
<li v-for="(item, index) in receiveUserList" :key="index">
|
||||||
|
<div class="inli">
|
||||||
|
<i class="el-icon-s-custom"></i>
|
||||||
|
<span>{{ item.name }}</span>
|
||||||
|
<i v-if="editStatus" class="el-icon-close" @click="removeData(item)"></i>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24" class="mt10" v-if="istongguo">
|
||||||
|
<el-form-item label="是否通过" prop="pass">
|
||||||
|
<el-radio-group v-model.trim="pass">
|
||||||
|
<el-radio :label="true">是</el-radio>
|
||||||
|
<el-radio :label="false">否</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24" class="mt10">
|
||||||
|
<el-form-item
|
||||||
|
label="是否加入档案:"
|
||||||
|
prop="joinDoc"
|
||||||
|
v-if="formSubmit.actDefId == 'EndEvent_0qwgu4i'"
|
||||||
|
>
|
||||||
|
<el-radio-group v-model.trim="formSubmit.joinDoc">
|
||||||
|
<el-radio :label="true">是</el-radio>
|
||||||
|
<el-radio :label="false">否</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24" v-if="isSummary" class="mt10">
|
||||||
|
<el-form-item label="审核意见:">
|
||||||
|
<el-input
|
||||||
|
v-model.trim="formSubmit.summary"
|
||||||
|
type="textarea"
|
||||||
|
placeholder="请输入审核意见"
|
||||||
|
maxlength="200"
|
||||||
|
:autosize="{ minRows: 4, maxRows: 4 }"
|
||||||
|
:style="{ width: '100%' }"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
workflowNextactsNew2,
|
||||||
|
getNextactuserByPending,
|
||||||
|
getNextActUsersByNew,
|
||||||
|
getExtAttributeModel,
|
||||||
|
selectUserStyle
|
||||||
|
} from "@/api/my_business/workflow";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
searchQuery:{
|
||||||
|
type: Object,
|
||||||
|
default: {},
|
||||||
|
},
|
||||||
|
hideNodeCode: {
|
||||||
|
type: Array,
|
||||||
|
default: ()=>[],
|
||||||
|
},
|
||||||
|
isSummary: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true,
|
||||||
|
},
|
||||||
|
defaultStaff: {
|
||||||
|
type: Object,
|
||||||
|
default: undefined,
|
||||||
|
},
|
||||||
|
pListData: {},
|
||||||
|
data: {},
|
||||||
|
title: {},
|
||||||
|
detatailsData: {},
|
||||||
|
promptContent: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
userInfo: this.$store.getters.userInfo,
|
||||||
|
summary: "",
|
||||||
|
editStatus: true,
|
||||||
|
formSubmit: { summary: "" },
|
||||||
|
processList: [],
|
||||||
|
processProps: {
|
||||||
|
children: "children",
|
||||||
|
label: "actDefName",
|
||||||
|
},
|
||||||
|
userProps: {
|
||||||
|
children: "children",
|
||||||
|
label: function (data, node) {
|
||||||
|
if (data.type == "USER") {
|
||||||
|
return data.id+' '+data.name
|
||||||
|
} else {
|
||||||
|
return data.name
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
formrules: {
|
||||||
|
summary: [{ required: true, message: " ", trigger: "change" }],
|
||||||
|
pass: [{ required: true, message: " ", trigger: "change" }],
|
||||||
|
},
|
||||||
|
userTreeName:undefined,
|
||||||
|
receiveUserList: [],
|
||||||
|
userList: [],
|
||||||
|
loading: true,
|
||||||
|
nextData: {},
|
||||||
|
procDefKey: "",
|
||||||
|
actionType: "",
|
||||||
|
wf_actionType: "",
|
||||||
|
actDefType: "", //actDefType: "endEvent" 判断流程到哪一步了
|
||||||
|
pass: "", //是否通过
|
||||||
|
kuozhanshuju: "",
|
||||||
|
istongguo: false,
|
||||||
|
morendta: undefined,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getOptionsList();
|
||||||
|
console.log("xuanren", this.pListData);
|
||||||
|
if (this.pListData.procDefKey != "") {
|
||||||
|
this.procDefKey = this.pListData.procDefKey;
|
||||||
|
}
|
||||||
|
//this.$emit("yingchanbohui", false);
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
actionType: function (val) {
|
||||||
|
this.wf_actionType = val;
|
||||||
|
},
|
||||||
|
"formSubmit.summary": function (val) {
|
||||||
|
this.summary = val;
|
||||||
|
//console.log(val);
|
||||||
|
},
|
||||||
|
pass(val) {
|
||||||
|
console.log(val);
|
||||||
|
},
|
||||||
|
// 根据名称筛选树
|
||||||
|
userTreeName(val) {
|
||||||
|
this.$refs.userTree.filter(val);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getOptionsList() {
|
||||||
|
let _this = this
|
||||||
|
let searchQuery = this.searchQuery
|
||||||
|
searchQuery.procDefId = _this.pListData.procDefId
|
||||||
|
if (!!_this.pListData.curActInstId) {
|
||||||
|
searchQuery.curActInstId= _this.pListData.curActInstId
|
||||||
|
// 增加参数:当前环节定义ID【用于步骤已执行标记】
|
||||||
|
searchQuery.curActDefId = _this.pListData.curActDefId
|
||||||
|
}else{
|
||||||
|
searchQuery.curActDefId= _this.pListData.actDefId
|
||||||
|
}
|
||||||
|
// 增加参数:流程实例ID【用于步骤已执行标记】
|
||||||
|
searchQuery.procInstId = _this.pListData.procInstId
|
||||||
|
_this.loading = true
|
||||||
|
workflowNextactsNew2(searchQuery)
|
||||||
|
.then((res) => {
|
||||||
|
_this.processList = res.data.filter(item=>!_this.hideNodeCode.includes(item.actDefId));
|
||||||
|
// 关闭遮罩
|
||||||
|
_this.loading = false
|
||||||
|
// 自动识别是否默认选中第一个步骤
|
||||||
|
if(_this.processList.length > 0) {
|
||||||
|
// 默认选中第一个步骤
|
||||||
|
// 此方法内有打开遮罩和关闭遮罩
|
||||||
|
_this.processNodeClick(_this.processList[0]);
|
||||||
|
_this.actDefType = res.data[0].actDefType;
|
||||||
|
_this.$nextTick(() => {
|
||||||
|
// 步骤清单默认选中第一个步骤
|
||||||
|
_this.$refs.myTree.setCurrentKey(_this.processList[0].actDefName);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
_this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
processNodeClick(val){
|
||||||
|
let _this = this
|
||||||
|
if (!!_this.pListData.curActInstId) {
|
||||||
|
_this.processNodeClick1(val);
|
||||||
|
}else {
|
||||||
|
_this.processNodeClick2(val);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//流程节点点击触发 带出可选成员
|
||||||
|
processNodeClick1(val) {
|
||||||
|
let _this = this
|
||||||
|
if (this.nextData != "") {
|
||||||
|
if (val.actDefName == this.nextData.actDefName) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.nextData = val;
|
||||||
|
this.userList = []; //代选
|
||||||
|
this.receiveUserList = []; //已选
|
||||||
|
let params = {
|
||||||
|
userOrgId: _this.userInfo.deptId,
|
||||||
|
curActInstId: this.pListData.curActInstId,
|
||||||
|
destActDefId: val.actDefId,
|
||||||
|
// 当前环节ID、流程定义ID、流程实例ID
|
||||||
|
curActDefId: this.pListData.curActDefId,
|
||||||
|
procDefKey: this.pListData.procDefKey,
|
||||||
|
procInstId: this.pListData.procInstId,
|
||||||
|
};
|
||||||
|
_this.loading = true
|
||||||
|
getNextactuserByPending(params)
|
||||||
|
.then((res) => {
|
||||||
|
// 获取流程待选人员展示方式
|
||||||
|
_this.loading = true
|
||||||
|
selectUserStyle(params).then((selectRes) => {
|
||||||
|
if(selectRes.data == 'tree') {
|
||||||
|
// 树形结构展示
|
||||||
|
_this.userList = this.handleTree(res.data, "id");
|
||||||
|
} else {
|
||||||
|
// 平铺结构展示
|
||||||
|
_this.userList = res.data.filter(item => item.type==='USER')
|
||||||
|
if (_this.defaultStaff&&_this.defaultStaff.length>0) {
|
||||||
|
let item=_this.defaultStaff.find(item=>item.nodeCode===val.actDefId)
|
||||||
|
if (item&&item.users) {
|
||||||
|
JSON.parse(item.users).forEach(item=>{
|
||||||
|
let user = _this.userList.find(user=>user.id===item.userName)
|
||||||
|
if (!user) {
|
||||||
|
_this.userList.push({
|
||||||
|
type: 'USER',
|
||||||
|
id:item.userName,
|
||||||
|
realId: item.userName,
|
||||||
|
parentId: item.deptId,
|
||||||
|
name: item.nickName,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let defaultStaffIds = []
|
||||||
|
if (_this.defaultStaff&&_this.defaultStaff.length>0) {
|
||||||
|
//设定了流程默认执行人
|
||||||
|
let item=_this.defaultStaff.find(item=>item.nodeCode===val.actDefId)
|
||||||
|
if (item&&item.users) {
|
||||||
|
defaultStaffIds = JSON.parse(item.users).map(user=>user.userName)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (defaultStaffIds.length>0) {
|
||||||
|
let userList = []
|
||||||
|
_this.defaultUserList(userList,defaultStaffIds,_this.userList)
|
||||||
|
userList.forEach(user=>{
|
||||||
|
_this.userNodeClick(user);
|
||||||
|
})
|
||||||
|
_this.editStatus = true
|
||||||
|
} else {
|
||||||
|
_this.editStatus = true
|
||||||
|
//如果待选人员里就一个人,自动加入到已选人员名单里z
|
||||||
|
this.rtuserList(res.data);
|
||||||
|
if (this.morendta) {
|
||||||
|
this.userNodeClick(this.morendta);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 关闭遮挡
|
||||||
|
_this.loading = false;
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
console.log(e)
|
||||||
|
_this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
processNodeClick2(val) {
|
||||||
|
let _this = this
|
||||||
|
console.log("业务数据====>", this.pListData);
|
||||||
|
if (this.nextData != "") {
|
||||||
|
if (val.actDefName == this.nextData.actDefName) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.nextData = val;
|
||||||
|
console.log("nextData", this.nextData);
|
||||||
|
this.userList = []; //代选
|
||||||
|
this.receiveUserList = []; //已选
|
||||||
|
let params = {
|
||||||
|
procDefId:this.pListData.procDefId,
|
||||||
|
userOrgId: this.userInfo.deptId,
|
||||||
|
curActDefId: this.pListData.actDefId,
|
||||||
|
destActDefId: val.actDefId,
|
||||||
|
};
|
||||||
|
_this.loading = true
|
||||||
|
getNextActUsersByNew(params).then((res) => {
|
||||||
|
// 获取流程待选人员展示方式
|
||||||
|
selectUserStyle(params).then((selectRes) => {
|
||||||
|
if(selectRes.data == 'tree') {
|
||||||
|
// 树形结构展示
|
||||||
|
_this.userList = this.handleTree(res.data, "id");
|
||||||
|
} else {
|
||||||
|
// 平铺结构展示
|
||||||
|
_this.userList = res.data.filter(item => item.type==='USER')
|
||||||
|
if (_this.defaultStaff&&_this.defaultStaff.length>0) {
|
||||||
|
let item=_this.defaultStaff.find(item=>item.nodeCode===val.actDefId)
|
||||||
|
if (item&&item.users) {
|
||||||
|
JSON.parse(item.users).forEach(item=>{
|
||||||
|
let user = _this.userList.find(user=>user.id===item.userName)
|
||||||
|
if (!user) {
|
||||||
|
_this.userList.push({
|
||||||
|
type: 'USER',
|
||||||
|
id:item.userName,
|
||||||
|
realId: item.userName,
|
||||||
|
parentId: item.deptId,
|
||||||
|
name: item.nickName,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
let defaultStaffIds = []
|
||||||
|
if (_this.defaultStaff) {
|
||||||
|
//设定了流程默认执行人
|
||||||
|
let item=_this.defaultStaff.find(item=>item.nodeCode===val.actDefId)
|
||||||
|
if (item&&item.users) {
|
||||||
|
defaultStaffIds = JSON.parse(item.users).map(user=>user.userName)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (defaultStaffIds.length>0) {
|
||||||
|
let userList = []
|
||||||
|
_this.defaultUserList(userList,defaultStaffIds,_this.userList)
|
||||||
|
userList.forEach(user=>{
|
||||||
|
this.userNodeClick(user);
|
||||||
|
})
|
||||||
|
_this.editStatus = false
|
||||||
|
} else {
|
||||||
|
_this.editStatus = true
|
||||||
|
//如果待选人员里就一个人,就自己加入到已选人员名单里z
|
||||||
|
this.rtuserList(res.data);
|
||||||
|
if (this.morendta) {
|
||||||
|
this.userNodeClick(this.morendta);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_this.loading = false
|
||||||
|
});
|
||||||
|
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//点击成员 导入可选成员
|
||||||
|
userNodeClick(val) {
|
||||||
|
// console.log("val", val);
|
||||||
|
if (val.type == "USER"&&this.editStatus) {
|
||||||
|
if (this.nextData.multi){
|
||||||
|
// 多人处理环节
|
||||||
|
let arr = this.receiveUserList.filter((x) => x.id === val.id);
|
||||||
|
if (arr.length <= 0) {
|
||||||
|
this.receiveUserList.push(val);
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
// 单人处理环节
|
||||||
|
this.receiveUserList = [val]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//移除成员
|
||||||
|
removeData(item) {
|
||||||
|
var arr = [];
|
||||||
|
this.receiveUserList.forEach((element) => {
|
||||||
|
if (element.id != item.id) {
|
||||||
|
arr.push(element);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.receiveUserList = arr;
|
||||||
|
},
|
||||||
|
defaultUserList(userList,ids,data) {
|
||||||
|
data.forEach(item=>{
|
||||||
|
if (ids.includes(item.id)) {
|
||||||
|
userList.push(item)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
rtuserList(originalData) {
|
||||||
|
let userList = originalData.filter(item => item.type==='USER')
|
||||||
|
if (userList.length == 1) {
|
||||||
|
// 若是用户节点直接设置成为已选用户
|
||||||
|
this.morendta = userList[0];
|
||||||
|
} else {
|
||||||
|
this.morendta = undefined
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 从组织用户结构树中寻找叶子节点,不需要的
|
||||||
|
filterUserNode(data) {
|
||||||
|
if(data.type == "USER") {
|
||||||
|
// 若是用户节点就返回
|
||||||
|
return data
|
||||||
|
} else if(data.hasOwnProperty("children")) {
|
||||||
|
let list = data.children;
|
||||||
|
for(var i=0;i<list.length;i++) {
|
||||||
|
let item = list[i];
|
||||||
|
if(item.type != "USER") {
|
||||||
|
let res = this.filterUserNode(item)
|
||||||
|
if(res != null) {
|
||||||
|
// 返回出方法
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 若是用户节点就返回
|
||||||
|
return item;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
filterNode(value, data) {
|
||||||
|
if (!value) return true;
|
||||||
|
return data.id.toLowerCase().indexOf(value.toLowerCase()) !== -1||data.name.toLowerCase().indexOf(value.toLowerCase()) !== -1
|
||||||
|
},
|
||||||
|
handleSelect() {
|
||||||
|
let _this = this
|
||||||
|
_this.$nextTick(()=>{
|
||||||
|
_this.$refs.userList.init(null,null,null)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleSubmitUser(source,index,user) {
|
||||||
|
let val = {
|
||||||
|
type: 'USER',
|
||||||
|
id: user.userName,
|
||||||
|
name: user.nickName,
|
||||||
|
parentId: user.dept.deptId,
|
||||||
|
realId: user.userName,
|
||||||
|
}
|
||||||
|
this.userNodeClick(val);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
.h28{
|
||||||
|
height: 28px;line-height: 28px
|
||||||
|
}
|
||||||
|
</style>
|
||||||
60
src/views/workflowList/workflowLogs/index.vue
Normal file
60
src/views/workflowList/workflowLogs/index.vue
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container document_changeindex el-card is-always-shadow">
|
||||||
|
<el-card class="gray-card" style="width: 60%">
|
||||||
|
<el-table v-loading="loading" :data="dataList">
|
||||||
|
<el-table-column label="环节" align="left" prop="actDefName" width="200px"/>
|
||||||
|
<el-table-column label="意见" align="left" prop="opinion" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span :style="{color:passList[scope.row.pass].color}">{{ passList[scope.row.pass].label }}</span><br/>
|
||||||
|
<span>{{ scope.row.opinion }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作信息" align="left" prop="createTime" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ scope.row.deptName }}</span>
|
||||||
|
<span style="margin-left:10px;">{{ scope.row.nickName }}</span>
|
||||||
|
<span style="margin-left:20px;color:#AAAAAA">{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { selectLogByProcInstId } from "@/api/my_business/workflow";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "WorkflowLogs",
|
||||||
|
props: ["procInstId"],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
loading: true,
|
||||||
|
dataList: [],
|
||||||
|
passList: { 'true':{label:'通过',color:'#70B603'},'false':{label:'不通过',color:'#D9001B'}},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
procInstId (val) {
|
||||||
|
if (val) {
|
||||||
|
this.getList(val)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
if (this.procInstId) {
|
||||||
|
this.getList(this.procInstId)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询岗位列表 */
|
||||||
|
getList(procInstId) {
|
||||||
|
this.loading = true;
|
||||||
|
selectLogByProcInstId({procInstId:procInstId,review:true}).then(response => {
|
||||||
|
this.dataList = response.data;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
51
src/views/workflowList/workflowRouter.vue
Normal file
51
src/views/workflowList/workflowRouter.vue
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
<template>
|
||||||
|
<main-component ref="mainComponent" :code="code" :data="data" @close="handleCloseChange"></main-component>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import MainComponent from "@/components/mainComponent/index.vue";
|
||||||
|
export default {
|
||||||
|
name: "workflowRouter",
|
||||||
|
dicts: [],
|
||||||
|
components: {
|
||||||
|
MainComponent,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
path: 'views/workflowList/addWorkflow/',
|
||||||
|
code: '',
|
||||||
|
data: undefined,
|
||||||
|
status: true,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.$nextTick(()=>{
|
||||||
|
this.handleDetails(this.$route.query);
|
||||||
|
})
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 详情按钮操作 */
|
||||||
|
handleDetails(row) {
|
||||||
|
let _this = this
|
||||||
|
if (row.type&&_this.status) {
|
||||||
|
_this.code = _this.path + row.type
|
||||||
|
_this.data = row
|
||||||
|
}
|
||||||
|
},
|
||||||
|
init(row){
|
||||||
|
let _this = this
|
||||||
|
_this.code = _this.path + row.type
|
||||||
|
_this.data = row
|
||||||
|
_this.status = false
|
||||||
|
},
|
||||||
|
handleCloseChange() {
|
||||||
|
let _this = this
|
||||||
|
if (_this.status) {
|
||||||
|
window.parent.postMessage({type:"close"})
|
||||||
|
}else{
|
||||||
|
_this.$emit("closeDrawer")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
@@ -1,542 +1,277 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container"><!--从这一层开始嵌入页面-->
|
<div class="app-container"><!--从这一层开始嵌入页面-->
|
||||||
|
|
||||||
<el-card>
|
<el-card>
|
||||||
<el-form label-width="80px">
|
<el-form label-width="80px">
|
||||||
<div class="search">
|
<div class="search">
|
||||||
<el-form-item label="流程标题">
|
<el-form-item label="流程标题">
|
||||||
<el-input placeholder="输入流程标题"></el-input>
|
<el-input placeholder="输入流程标题" v-model.trim="queryParams.title"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-button type="primary" icon="el-icon-search">搜索</el-button>
|
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="el-icon-refresh-left">重置</el-button>
|
<el-button icon="el-icon-refresh-left" @click="resetQuery">重置</el-button>
|
||||||
</div><!--search 搜索-->
|
</div><!--search 搜索-->
|
||||||
</el-form><!--el-form-->
|
</el-form><!--el-form-->
|
||||||
</el-card><!--el-card-->
|
</el-card><!--el-card-->
|
||||||
|
|
||||||
<el-card>
|
<el-card>
|
||||||
<el-tabs v-model="activeName3" @tab-click="handleClick">
|
<el-tabs v-model="activeName" @tab-click="state">
|
||||||
<el-tab-pane label="待办(4)" name="first">
|
<el-tab-pane :label="'待办('+ statustotal+')'" name="taskToDo">
|
||||||
<el-table :data="tableData5" style="width: 100%" height="529">
|
<el-table :data="postList" style="width: 100%" height="529">
|
||||||
<el-table-column prop="prop1" label="流程类型"></el-table-column>
|
<el-table-column prop="procDefName" label="流程类型"></el-table-column>
|
||||||
<el-table-column prop="prop2" label="流程标题">【使用申请】工具名称11</el-table-column>
|
<el-table-column prop="title" label="流程标题"></el-table-column>
|
||||||
<el-table-column prop="prop3" label="当前环节"></el-table-column>
|
<el-table-column prop="curActDefName" label="当前环节"></el-table-column>
|
||||||
<el-table-column prop="prop4" label="上一环节"></el-table-column>
|
<el-table-column prop="prevActDefName" label="上一环节"></el-table-column>
|
||||||
<el-table-column prop="prop5" label="上一环节处理人"></el-table-column>
|
<el-table-column prop="sendUserName" label="上一环节处理人"></el-table-column>
|
||||||
<el-table-column prop="prop6" label="发起人"></el-table-column>
|
<el-table-column prop="startUserName" label="发起人"></el-table-column>
|
||||||
<el-table-column prop="prop7" label="接收时间"></el-table-column>
|
<el-table-column prop="sendTime" label="接收时间">
|
||||||
<el-table-column label="操作" width="100" >
|
|
||||||
<el-button type="text" icon="el-icon-info" @click="drawer1 = true">详情</el-button>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table><!--el-table-->
|
|
||||||
<el-pagination :current-page="currentPage4" :page-sizes="[100, 200, 300, 400]" :page-size="100" layout="total, sizes, prev, pager, next, jumper" :total="400"></el-pagination>
|
|
||||||
</el-tab-pane><!--el-tab-pane-->
|
|
||||||
<el-tab-pane label="已办(10)" name="second">
|
|
||||||
<el-table :data="tableData6" style="width: 100%" height="529">
|
|
||||||
<el-table-column prop="prop1" label="流程类型"></el-table-column>
|
|
||||||
<el-table-column prop="prop2" label="流程标题"><a>【使用申请】工具名称1</a></el-table-column>
|
|
||||||
<el-table-column prop="prop8" label="流程状态">
|
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span :class="getClassName(scope.row.prop8)">{{ scope.row.prop8 }}</span>
|
<span>{{ parseTime(scope.row.sendTime,'{y}-{m}-{d}')}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="prop3" label="处理环节"></el-table-column>
|
|
||||||
<el-table-column prop="prop4" label="上一环节"></el-table-column>
|
|
||||||
<el-table-column prop="prop5" label="上一环节处理人"></el-table-column>
|
|
||||||
<el-table-column prop="prop6" label="发起人"></el-table-column>
|
|
||||||
<el-table-column prop="prop7" label="接收时间"></el-table-column>
|
|
||||||
<el-table-column label="操作" width="100" >
|
<el-table-column label="操作" width="100" >
|
||||||
<el-button type="text" icon="el-icon-info" @click="drawer1 = true">详情</el-button>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table><!--el-table-->
|
|
||||||
<el-pagination :current-page="currentPage4" :page-sizes="[100, 200, 300, 400]" :page-size="100" layout="total, sizes, prev, pager, next, jumper" :total="400"></el-pagination>
|
|
||||||
</el-tab-pane><!--el-tab-pane-->
|
|
||||||
<el-tab-pane label="办结(10)" name="third">
|
|
||||||
<el-table :data="tableData7" style="width: 100%" height="529">
|
|
||||||
<el-table-column prop="prop1" label="流程类型"></el-table-column>
|
|
||||||
<el-table-column prop="prop2" label="流程标题">【使用申请】工具名称1</el-table-column>
|
|
||||||
<el-table-column label="流程状态">
|
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span :class="getClassName(scope.row.prop3)">{{ scope.row.prop3 }}</span>
|
<el-button type="text" icon="el-icon-info" @click="handleDeal(scope.row)">详情</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table><!--el-table-->
|
||||||
|
<el-pagination @current-change="getListData" v-show="total > 0" :current-page="queryParams.pageNumber" :page-sizes="pageSizes" :page-size="queryParams.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total"></el-pagination>
|
||||||
|
</el-tab-pane><!--el-tab-pane-->
|
||||||
|
<el-tab-pane :label="'已办('+doneTotal+')'" name="taskDealed">
|
||||||
|
<el-table :data="postList" style="width: 100%" height="529">
|
||||||
|
<el-table-column prop="procDefName" label="流程类型"></el-table-column>
|
||||||
|
<el-table-column prop="title" label="流程标题"></el-table-column>
|
||||||
|
<el-table-column prop="curActDefName" label="处理环节"></el-table-column>
|
||||||
|
<el-table-column prop="prevActDefName" label="上一环节"></el-table-column>
|
||||||
|
<el-table-column prop="sendUserName" label="上一环节处理人"></el-table-column>
|
||||||
|
<el-table-column prop="startUserName" label="发起人"></el-table-column>
|
||||||
|
<el-table-column prop="sendTime" label="接收时间">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.sendTime,'{y}-{m}-{d}')}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="prop4" label="发起人"></el-table-column>
|
|
||||||
<el-table-column prop="prop5" label="发起时间"></el-table-column>
|
|
||||||
<el-table-column prop="prop6" label="接收时间"></el-table-column>
|
|
||||||
<el-table-column label="操作" width="100" >
|
<el-table-column label="操作" width="100" >
|
||||||
<el-button type="text" icon="el-icon-info" @click="drawer1 = true">详情</el-button>
|
<template slot-scope="scope">
|
||||||
|
<el-button type="text" icon="el-icon-info" @click="handleDeal(scope.row)">详情</el-button>
|
||||||
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table><!--el-table-->
|
</el-table><!--el-table-->
|
||||||
<el-pagination :current-page="currentPage4" :page-sizes="[100, 200, 300, 400]" :page-size="100" layout="total, sizes, prev, pager, next, jumper" :total="400"></el-pagination>
|
<el-pagination @current-change="getListData" v-show="total > 0" :current-page="queryParams.pageNumber" :page-sizes="pageSizes" :page-size="queryParams.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total"></el-pagination>
|
||||||
|
</el-tab-pane><!--el-tab-pane-->
|
||||||
|
<el-tab-pane :label="'办结('+finishedTotal+')'" name="taskFinish">
|
||||||
|
<el-table :data="postList" style="width: 100%" height="529">
|
||||||
|
<el-table-column prop="procDefName" label="流程类型"></el-table-column>
|
||||||
|
<el-table-column prop="title" label="流程标题"></el-table-column>
|
||||||
|
<el-table-column prop="startUserName" label="发起人"></el-table-column>
|
||||||
|
<el-table-column prop="startTime" label="发起时间">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.startTime,'{y}-{m}-{d}')}}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="sendTime" label="接收时间">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.sendTime,'{y}-{m}-{d}')}}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" width="100" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button type="text" icon="el-icon-info" @click="handleDeal(scope.row)">详情</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table><!--el-table-->
|
||||||
|
<el-pagination @current-change="getListData" v-show="total > 0" :current-page="queryParams.pageNumber" :page-sizes="pageSizes" :page-size="queryParams.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total"></el-pagination>
|
||||||
</el-tab-pane><!--el-tab-pane-->
|
</el-tab-pane><!--el-tab-pane-->
|
||||||
</el-tabs><!--el-tabs-->
|
</el-tabs><!--el-tabs-->
|
||||||
</el-card><!--el-card-->
|
</el-card>
|
||||||
|
<!-- 流程处理抽屉组件 -->
|
||||||
<el-drawer :visible.sync="drawer1" :direction="direction" :before-close="handleClose" size="75%">
|
<DealDrawer v-if="dealDrawerShow" ref="dealDrawer" @closeDrawer="handleCloseChange"></DealDrawer>
|
||||||
<template #title>
|
</div>
|
||||||
<span>申请使用</span>
|
|
||||||
<div class="drawer-head-btn">
|
|
||||||
<el-button @click="drawer2 = true">流程监控</el-button>
|
|
||||||
<el-button type="primary" v-if="activeName3 == 'first'">提交</el-button>
|
|
||||||
<el-button>取消</el-button>
|
|
||||||
</div><!--drawer-head-btn 抽屉顶部按钮区域-->
|
|
||||||
</template>
|
|
||||||
<el-tabs v-model="activeName1" @tab-click="handleClick">
|
|
||||||
<el-tab-pane label="信息内容" name="first">
|
|
||||||
<div class="el-form-border">
|
|
||||||
<el-form ref="form" label-width="150px">
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="申请人">张莹</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="申请部门">信息部</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="申请理由">
|
|
||||||
<el-input type="textarea" maxlength="1000" placeholder="工作需要额外申请,请批准!" :disabled="true"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form><!--el-form-->
|
|
||||||
</div><!--el-form-border 表单-->
|
|
||||||
<div class="divide double"></div><!--divide 分隔-->
|
|
||||||
<div class="tboper">
|
|
||||||
<div class="tit">申请工具</div>
|
|
||||||
</div><!--tboper 标题与操作按钮-->
|
|
||||||
<el-table :data="tableData2" style="width: 100%">
|
|
||||||
<el-table-column prop="prop1" label="工具编号"></el-table-column>
|
|
||||||
<el-table-column prop="prop2" label="工具名称"></el-table-column>
|
|
||||||
<el-table-column prop="prop5" label="工具类别" ></el-table-column>
|
|
||||||
<el-table-column prop="prop3" label="归属单位"> </el-table-column>
|
|
||||||
<el-table-column prop="prop4" label="负责人"></el-table-column>
|
|
||||||
</el-table><!--el-table-->
|
|
||||||
<div class="divide double"></div><!--divide 分隔-->
|
|
||||||
<div class="tboper" v-if="activeName3 == 'first'">
|
|
||||||
<div class="tit">审批信息</div>
|
|
||||||
</div><!--tboper 标题与操作按钮-->
|
|
||||||
<div class="el-form-border" v-if="activeName3 == 'first'">
|
|
||||||
<el-form ref="form" label-width="150px">
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="审批结论">
|
|
||||||
<el-radio-group v-model="radio1">
|
|
||||||
<el-radio label="1">通过</el-radio>
|
|
||||||
<el-radio label="2" >不通过</el-radio>
|
|
||||||
</el-radio-group>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="审批理由">
|
|
||||||
<el-input type="textarea" rows="4" maxlength="1000" placeholder="请输入" show-word-limit></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form><!--el-form-->
|
|
||||||
</div><!--el-form-border 表单-->
|
|
||||||
</el-tab-pane><!--el-tab-pane-->
|
|
||||||
<el-tab-pane label="审批记录" name="second">
|
|
||||||
<el-table :data="tableData4" style="width: 100%">
|
|
||||||
<el-table-column prop="prop4" label="处理人"></el-table-column>
|
|
||||||
<el-table-column prop="prop3" label="处理环节"> </el-table-column>
|
|
||||||
<el-table-column prop="prop2" label="接收人"></el-table-column>
|
|
||||||
<el-table-column prop="prop1" label="接收环节"></el-table-column>
|
|
||||||
<el-table-column prop="prop7" label="处理时间" ></el-table-column>
|
|
||||||
<el-table-column prop="prop5" label="审批意见" ></el-table-column>
|
|
||||||
</el-table><!--el-table-->
|
|
||||||
</el-tab-pane><!--el-tab-pane-->
|
|
||||||
</el-tabs><!--el-tabs-->
|
|
||||||
</el-drawer><!--el-drawer 申请详情-抽屉-->
|
|
||||||
|
|
||||||
<el-drawer :visible.sync="drawer2" :direction="direction" :before-close="handleClose" size="75%">
|
|
||||||
<template #title>
|
|
||||||
<span>流程监控</span>
|
|
||||||
</template>
|
|
||||||
<div class="lctitle">流程标题:【申请使用】工具名称1 ,流程定义名称:申请使用流程</div><!--lctitle-->
|
|
||||||
<img style="width:auto; max-width: 100%;" src="../../../../public/images/lcjk1.jpg" />
|
|
||||||
</el-drawer><!--el-drawer 流程监控-抽屉-->
|
|
||||||
</div><!--app-container-->
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { workflowToDoList } from "@/api/my_business/workflow";
|
||||||
|
import DealDrawer from "@/components/DealDrawer";
|
||||||
export default {
|
export default {
|
||||||
name: 'dispose',
|
name: "Post",
|
||||||
|
dicts: ["sys_normal_disable", "sys_operterType"],
|
||||||
|
components: {
|
||||||
|
DealDrawer
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
drawer1: false,
|
pageSizes: [10,20,50,100],
|
||||||
drawer2: false,
|
dealDrawerShow: false,
|
||||||
activeName1: 'first',
|
boxClass: false,
|
||||||
activeName2: 'second',
|
// 遮罩层
|
||||||
activeName3: 'first',
|
loading: true,
|
||||||
radio1: '1',
|
// 显示搜索条件
|
||||||
tableData1: [
|
showSearch: true,
|
||||||
{
|
// 总条数
|
||||||
prop1: '使用申请',
|
total: 0,
|
||||||
prop2: '进行中',
|
// 表格数据
|
||||||
prop3: '直接领导审核',
|
postList: [],
|
||||||
prop4: '赵宇',
|
// 弹出层标题
|
||||||
prop5: '2024/02/09 12:00',
|
title: "",
|
||||||
prop6: '2024/02/09 12:00',
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNumber: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
title: "",
|
||||||
|
status: 1,
|
||||||
},
|
},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
postName: [
|
||||||
{
|
{
|
||||||
prop1: '使用申请',
|
required: true,
|
||||||
prop2: '已办结',
|
message: "不能为空",
|
||||||
prop3: '直接领导审核',
|
trigger: "blur",
|
||||||
prop4: '钱多多',
|
|
||||||
prop5: '2024/02/09 12:00',
|
|
||||||
prop6: '2024/02/09 12:00',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop1: '使用申请',
|
|
||||||
prop2: '进行中',
|
|
||||||
prop3: '直接领导审核',
|
|
||||||
prop4: '赵宇',
|
|
||||||
prop5: '2024/02/09 12:00',
|
|
||||||
prop6: '2024/02/09 12:00',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop1: '使用申请',
|
|
||||||
prop2: '已办结',
|
|
||||||
prop3: '直接领导审核',
|
|
||||||
prop4: '钱多多',
|
|
||||||
prop5: '2024/02/09 12:00',
|
|
||||||
prop6: '2024/02/09 12:00',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop1: '使用申请',
|
|
||||||
prop2: '进行中',
|
|
||||||
prop3: '直接领导审核',
|
|
||||||
prop4: '赵宇',
|
|
||||||
prop5: '2024/02/09 12:00',
|
|
||||||
prop6: '2024/02/09 12:00',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop1: '使用申请',
|
|
||||||
prop2: '已办结',
|
|
||||||
prop3: '直接领导审核',
|
|
||||||
prop4: '钱多多',
|
|
||||||
prop5: '2024/02/09 12:00',
|
|
||||||
prop6: '2024/02/09 12:00',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop1: '使用申请',
|
|
||||||
prop2: '进行中',
|
|
||||||
prop3: '直接领导审核',
|
|
||||||
prop4: '赵宇',
|
|
||||||
prop5: '2024/02/09 12:00',
|
|
||||||
prop6: '2024/02/09 12:00',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop1: '使用申请',
|
|
||||||
prop2: '已办结',
|
|
||||||
prop3: '直接领导审核',
|
|
||||||
prop4: '钱多多',
|
|
||||||
prop5: '2024/02/09 12:00',
|
|
||||||
prop6: '2024/02/09 12:00',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop1: '使用申请',
|
|
||||||
prop2: '进行中',
|
|
||||||
prop3: '直接领导审核',
|
|
||||||
prop4: '赵宇',
|
|
||||||
prop5: '2024/02/09 12:00',
|
|
||||||
prop6: '2024/02/09 12:00',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop1: '使用申请',
|
|
||||||
prop2: '已办结',
|
|
||||||
prop3: '直接领导审核',
|
|
||||||
prop4: '钱多多',
|
|
||||||
prop5: '2024/02/09 12:00',
|
|
||||||
prop6: '2024/02/09 12:00',
|
|
||||||
}
|
|
||||||
],
|
|
||||||
tableData2: [
|
|
||||||
{
|
|
||||||
prop1: '0021',
|
|
||||||
prop2: '工具名称1',
|
|
||||||
prop3: '人力资源部/培训组',
|
|
||||||
prop4: '赵宇',
|
|
||||||
prop5: '网络工具',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop1: '0022',
|
|
||||||
prop2: '工具名称2',
|
|
||||||
prop3: '人力资源部/招聘组',
|
|
||||||
prop4: '钱多多',
|
|
||||||
prop5: '网络工具',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop1: '0023',
|
|
||||||
prop2: '工具名称3',
|
|
||||||
prop3: '人力资源部/薪资组',
|
|
||||||
prop4: '孙瑶',
|
|
||||||
prop5: '网络工具',
|
|
||||||
}
|
|
||||||
],
|
|
||||||
tableData3: [
|
|
||||||
{
|
|
||||||
prop1: '总监批准',
|
|
||||||
prop2: '不通过',
|
|
||||||
prop3: '赵宇 ',
|
|
||||||
prop4: '总裁办',
|
|
||||||
prop5: '2024/02/09 12:00',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop1: '部门领导审核',
|
|
||||||
prop2: '通过',
|
|
||||||
prop3: '钱多多',
|
|
||||||
prop4: '设备部',
|
|
||||||
prop5: '2024/02/09 12:00',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop1: '管理员审核',
|
|
||||||
prop2: '通过',
|
|
||||||
prop3: '孙瑶',
|
|
||||||
prop4: '人力资源部',
|
|
||||||
prop5: '2024/02/09 12:00',
|
|
||||||
}
|
|
||||||
],
|
|
||||||
tableData4: [
|
|
||||||
{
|
|
||||||
prop1: '部门领导审核',
|
|
||||||
prop2: '张宇',
|
|
||||||
prop3: '管理员审核 ',
|
|
||||||
prop4: '赵定',
|
|
||||||
prop5: '同意',
|
|
||||||
prop6: '2024/02/09 12:00',
|
|
||||||
prop7: '2024/02/09 12:03',
|
|
||||||
prop8: '耗时0天',
|
|
||||||
prop9: '已完成',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop1: '管理员审核',
|
|
||||||
prop2: '赵定',
|
|
||||||
prop3: '直接领导审核 ',
|
|
||||||
prop4: '钱多多',
|
|
||||||
prop5: '同意',
|
|
||||||
prop6: '2024/02/09 12:00',
|
|
||||||
prop7: '2024/02/09 12:03',
|
|
||||||
prop8: '耗时0天',
|
|
||||||
prop9: '已完成',
|
|
||||||
}
|
|
||||||
],
|
|
||||||
tableData5: [
|
|
||||||
{
|
|
||||||
prop1: '使用申请',
|
|
||||||
prop3: '部门经理审核',
|
|
||||||
prop4: '直接领导审核',
|
|
||||||
prop5: '张鑫辉',
|
|
||||||
prop6: '张慧玉',
|
|
||||||
prop7: '2022/10/10 12:00',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop1: '使用申请',
|
|
||||||
prop3: '管理员审核',
|
|
||||||
prop4: '总监审核',
|
|
||||||
prop5: '柳青',
|
|
||||||
prop6: '刘青',
|
|
||||||
prop7: '2022/10/10 12:00',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop1: '使用申请',
|
|
||||||
prop3: '总经理审核',
|
|
||||||
prop4: '直接领导审核',
|
|
||||||
prop5: '张庆幸',
|
|
||||||
prop6: '王慧',
|
|
||||||
prop7: '2022/10/10 12:00',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop1: '使用申请',
|
|
||||||
prop3: '总监审核',
|
|
||||||
prop4: '部门经理审核',
|
|
||||||
prop5: '刘宁',
|
|
||||||
prop6: '赵媛',
|
|
||||||
prop7: '2022/10/10 12:00',
|
|
||||||
}
|
|
||||||
],
|
|
||||||
tableData6: [
|
|
||||||
{
|
|
||||||
prop1: '使用申请',
|
|
||||||
prop8: '通过',
|
|
||||||
prop3: '部门经理审核',
|
|
||||||
prop4: '直接领导审核',
|
|
||||||
prop5: '张鑫辉',
|
|
||||||
prop6: '张慧玉',
|
|
||||||
prop7: '2022/10/10 12:00',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop1: '使用申请',
|
|
||||||
prop8: '通过',
|
|
||||||
prop3: '管理员审核',
|
|
||||||
prop4: '总监审核',
|
|
||||||
prop5: '柳青',
|
|
||||||
prop6: '刘青',
|
|
||||||
prop7: '2022/10/10 12:00',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop1: '使用申请',
|
|
||||||
prop8: '通过',
|
|
||||||
prop3: '总经理审核',
|
|
||||||
prop4: '直接领导审核',
|
|
||||||
prop5: '张庆幸',
|
|
||||||
prop6: '王慧',
|
|
||||||
prop7: '2022/10/10 12:00',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop1: '使用申请',
|
|
||||||
prop8: '通过',
|
|
||||||
prop3: '总监审核',
|
|
||||||
prop4: '部门经理审核',
|
|
||||||
prop5: '刘宁',
|
|
||||||
prop6: '赵媛',
|
|
||||||
prop7: '2022/10/10 12:00',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop1: '使用申请',
|
|
||||||
prop8: '不通过',
|
|
||||||
prop3: '部门经理审核',
|
|
||||||
prop4: '直接领导审核',
|
|
||||||
prop5: '张鑫辉',
|
|
||||||
prop6: '张慧玉',
|
|
||||||
prop7: '2022/10/10 12:00',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop1: '使用申请',
|
|
||||||
prop8: '通过',
|
|
||||||
prop3: '管理员审核',
|
|
||||||
prop4: '总监审核',
|
|
||||||
prop5: '柳青',
|
|
||||||
prop6: '刘青',
|
|
||||||
prop7: '2022/10/10 12:00',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop1: '使用申请',
|
|
||||||
prop8: '不通过',
|
|
||||||
prop3: '总经理审核',
|
|
||||||
prop4: '直接领导审核',
|
|
||||||
prop5: '张庆幸',
|
|
||||||
prop6: '王慧',
|
|
||||||
prop7: '2022/10/10 12:00',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop1: '使用申请',
|
|
||||||
prop8: '通过',
|
|
||||||
prop3: '总监审核',
|
|
||||||
prop4: '部门经理审核',
|
|
||||||
prop5: '刘宁',
|
|
||||||
prop6: '赵媛',
|
|
||||||
prop7: '2022/10/10 12:00',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop1: '使用申请',
|
|
||||||
prop8: '通过',
|
|
||||||
prop3: '部门经理审核',
|
|
||||||
prop4: '直接领导审核',
|
|
||||||
prop5: '张鑫辉',
|
|
||||||
prop6: '张慧玉',
|
|
||||||
prop7: '2022/10/10 12:00',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop1: '使用申请',
|
|
||||||
prop8: '通过',
|
|
||||||
prop3: '管理员审核',
|
|
||||||
prop4: '总监审核',
|
|
||||||
prop5: '柳青',
|
|
||||||
prop6: '刘青',
|
|
||||||
prop7: '2022/10/10 12:00',
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
tableData7: [
|
postCode: [
|
||||||
{
|
{
|
||||||
prop1: '使用申请',
|
required: true,
|
||||||
prop3: '通过',
|
message: "不能为空",
|
||||||
prop4: '张鑫辉',
|
trigger: "blur",
|
||||||
prop5: '2024/02/08 07:00',
|
|
||||||
prop6: '2024/02/10 12:00',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop1: '使用申请',
|
|
||||||
prop3: '不通过',
|
|
||||||
prop4: '柳青',
|
|
||||||
prop5: '2024/02/08 07:00',
|
|
||||||
prop6: '2024/02/10 12:00',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop1: '使用申请',
|
|
||||||
prop3: '通过',
|
|
||||||
prop4: '张庆幸',
|
|
||||||
prop5: '2024/02/08 07:00',
|
|
||||||
prop6: '2024/02/10 12:00',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop1: '使用申请',
|
|
||||||
prop3: '通过',
|
|
||||||
prop4: '刘宁',
|
|
||||||
prop5: '2024/02/08 07:00',
|
|
||||||
prop6: '2024/02/10 12:00',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop1: '使用申请',
|
|
||||||
prop3: '不通过',
|
|
||||||
prop4: '张鑫辉',
|
|
||||||
prop5: '2024/02/08 07:00',
|
|
||||||
prop6: '2024/02/10 12:00',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop1: '使用申请',
|
|
||||||
prop3: '通过',
|
|
||||||
prop4: '柳青',
|
|
||||||
prop5: '2024/02/08 07:00',
|
|
||||||
prop6: '2024/02/10 12:00',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop1: '使用申请',
|
|
||||||
prop3: '通过',
|
|
||||||
prop4: '张庆幸',
|
|
||||||
prop5: '2024/02/08 07:00',
|
|
||||||
prop6: '2024/02/10 12:00',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop1: '使用申请',
|
|
||||||
prop3: '通过',
|
|
||||||
prop4: '刘宁',
|
|
||||||
prop5: '2024/02/08 07:00',
|
|
||||||
prop6: '2024/02/10 12:00',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop1: '使用申请',
|
|
||||||
prop3: '通过',
|
|
||||||
prop4: '张鑫辉',
|
|
||||||
prop5: '2024/02/08 07:00',
|
|
||||||
prop6: '2024/02/10 12:00',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop1: '使用申请',
|
|
||||||
prop3: '通过',
|
|
||||||
prop4: '柳青',
|
|
||||||
prop5: '2024/02/08 07:00',
|
|
||||||
prop6: '2024/02/10 12:00',
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
}
|
postSort: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "不能为空",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
doneTotal: 0,
|
||||||
|
finishedTotal: 0,
|
||||||
|
taskData: [], // 任务数据
|
||||||
|
deptOptions: [],
|
||||||
|
drawer: false,
|
||||||
|
taskFormData: {},
|
||||||
|
varChangeColor1: true,
|
||||||
|
varChangeColor2: false,
|
||||||
|
pListData: {},
|
||||||
|
statustotal: "",
|
||||||
|
adUpdateDisuseDetails: "",
|
||||||
|
userInfo: this.$store.getters.userInfo,
|
||||||
|
activeName: "taskToDo",
|
||||||
|
classLevelOptions: [],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
// 初始化获取待办清单
|
||||||
|
this.getListData()
|
||||||
|
// 获取已办、办结统计页签数量
|
||||||
|
this.getOtherActiveCount()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getClassName(prop2) {
|
// 流程处理事件
|
||||||
// 根据不同的文本内容返回不同的类名
|
handleDeal(row) {
|
||||||
if (prop2 === '进行中') {
|
this.dealDrawerShow = true;
|
||||||
return 'blue';
|
let flowUrl = this.buildFlowUrl(row)
|
||||||
} else if (prop2 === '已办结') {
|
// alert(flowUrl)
|
||||||
return 'green';
|
//window.open(flowUrl)
|
||||||
}else if (prop2 === '不通过') {
|
/* */
|
||||||
return 'red';
|
this.$nextTick(() => {
|
||||||
} else if (prop2 === '通过') {
|
this.$refs.dealDrawer.init(flowUrl);
|
||||||
return 'green';
|
});
|
||||||
}
|
|
||||||
|
//
|
||||||
},
|
},
|
||||||
|
buildFlowUrl(row) {
|
||||||
|
let res = row.url;
|
||||||
|
//待办=1、已办=2、办结=3
|
||||||
|
res += "&invokeFrom=list&status="+row.status
|
||||||
|
return res;
|
||||||
|
},
|
||||||
|
getOtherActiveCount() {
|
||||||
|
// 获取已办统计数量
|
||||||
|
this.loading = true
|
||||||
|
let params = {
|
||||||
|
pageNumber: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
status: 2,
|
||||||
|
};
|
||||||
|
workflowToDoList(params).then((response) => {
|
||||||
|
this.doneTotal = response.data.totalCount || 0;
|
||||||
|
this.loading = false
|
||||||
|
});
|
||||||
|
// 获取办结统计数量
|
||||||
|
this.loading = true
|
||||||
|
let params2 = {
|
||||||
|
pageNumber: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
status: 3,
|
||||||
|
};
|
||||||
|
workflowToDoList(params2).then((response) => {
|
||||||
|
this.finishedTotal = response.data.totalCount || 0;
|
||||||
|
this.loading = false
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 查询列表 */
|
||||||
|
getListData() {
|
||||||
|
this.loading = true;
|
||||||
|
this.postList = [];
|
||||||
|
workflowToDoList(this.queryParams).then((response) => {
|
||||||
|
if (this.activeName == "taskToDo") {
|
||||||
|
// 待办
|
||||||
|
this.statustotal = response.data.totalCount;
|
||||||
|
// this.$store.commit("SET_THINGNUMBER", response.data.totalCount || 0);
|
||||||
|
this.total = response.data.totalCount;
|
||||||
}
|
}
|
||||||
|
if (this.activeName == "taskDealed") {
|
||||||
|
// 已办
|
||||||
|
this.doneTotal = response.data.totalCount;
|
||||||
|
this.total = response.data.totalCount;
|
||||||
}
|
}
|
||||||
|
if (this.activeName == "taskFinish") {
|
||||||
|
// 办结
|
||||||
|
this.finishedTotal = response.data.totalCount;
|
||||||
|
this.total = response.data.totalCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.postList = response.data.result;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
handleCloseChange() {
|
||||||
|
this.dealDrawerShow = false
|
||||||
|
this.getListData();
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNumber = 1;
|
||||||
|
this.getListData();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.queryParams.pageNumber = 1;
|
||||||
|
this.queryParams.pageSize = 10;
|
||||||
|
this.queryParams.title = "";
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
/** 详情按钮操作 */
|
||||||
|
handleDetails(row) {
|
||||||
|
|
||||||
|
},
|
||||||
|
state(tab) {
|
||||||
|
let p = Number(tab.index) + 1;
|
||||||
|
if (p == 1) {
|
||||||
|
this.varChangeColor1 = true;
|
||||||
|
this.varChangeColor2 = false;
|
||||||
|
}
|
||||||
|
if (p == 2 || p == 3) {
|
||||||
|
this.varChangeColor1 = false;
|
||||||
|
this.varChangeColor2 = true;
|
||||||
|
}
|
||||||
|
this.queryParams.status = p;
|
||||||
|
this.queryParams.pageNumber = 1;
|
||||||
|
this.queryParams.title = "";
|
||||||
|
this.total = 0;
|
||||||
|
this.getListData();
|
||||||
|
// this.getshulian();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
|
|
||||||
</style>
|
|
||||||
|
|||||||
Reference in New Issue
Block a user