From 60a715ab3bc2bbf759eeab94304cbcaae4f9d5d3 Mon Sep 17 00:00:00 2001
From: quyixiao <2621048238@qq.com>
Date: Tue, 25 Aug 2020 16:33:11 +0800
Subject: [PATCH 1/2] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/api_result.js | 14 ++
.../modules/result/record/lzresultrecord.vue | 1 -
.../result/record/lzresultrecordapp.vue | 1 -
.../record/recorddetail-add-or-update.vue | 2 +-
.../modules/result/record/recorddetail.vue | 33 ++-
.../result/record/upload-add-or-update.vue | 220 ++++++++++++++++++
6 files changed, 261 insertions(+), 10 deletions(-)
create mode 100644 src/views/modules/result/record/upload-add-or-update.vue
diff --git a/src/api/api_result.js b/src/api/api_result.js
index b98daf2..d6689fb 100644
--- a/src/api/api_result.js
+++ b/src/api/api_result.js
@@ -40,3 +40,17 @@ export const getResultComment = params => {
export const recordIdsSubmit = params => {
return http({url: '/lz_management/user/lzresultrecord/recordIdsSubmit', method: 'post', params})
}
+
+// 获取侧边菜单栏
+export const getUploadFileList = params => {
+ return http({url: '/lz_management/user/lzresultrecord/getUploadFileList', method: 'get', params})
+}
+
+// 获取侧边菜单栏
+export const deleteFile = params => {
+ return http({url: '/lz_management/user/lzresultrecord/deleteFile', method: 'get', params})
+}
+
+export const downZip = params => {
+ return http({url: '/lz_management/file/downZip?ids=' + params, method: 'get'})
+}
diff --git a/src/views/modules/result/record/lzresultrecord.vue b/src/views/modules/result/record/lzresultrecord.vue
index 335a174..b222ea5 100644
--- a/src/views/modules/result/record/lzresultrecord.vue
+++ b/src/views/modules/result/record/lzresultrecord.vue
@@ -121,7 +121,6 @@ export default {
formaterDate (val) {
var date = new Date(val)
var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1
- var day = date.getDate() < 10 ? '0' + date.getDate() : date.getDate()
return date.getFullYear() + '-' + month
},
getStatusStr (status) {
diff --git a/src/views/modules/result/record/lzresultrecordapp.vue b/src/views/modules/result/record/lzresultrecordapp.vue
index f2db1c5..a33bd75 100644
--- a/src/views/modules/result/record/lzresultrecordapp.vue
+++ b/src/views/modules/result/record/lzresultrecordapp.vue
@@ -92,7 +92,6 @@
v-loading="dataListLoading" border fit highlight-current-row
@selection-change="selectionChangeHandle"
:cell-style="cellStyle"
-
style="width: 100%;" >
diff --git a/src/views/modules/result/record/recorddetail-add-or-update.vue b/src/views/modules/result/record/recorddetail-add-or-update.vue
index d309ce0..c57b51f 100644
--- a/src/views/modules/result/record/recorddetail-add-or-update.vue
+++ b/src/views/modules/result/record/recorddetail-add-or-update.vue
@@ -19,7 +19,7 @@
-
+
diff --git a/src/views/modules/result/record/recorddetail.vue b/src/views/modules/result/record/recorddetail.vue
index 700ad77..e4acceb 100644
--- a/src/views/modules/result/record/recorddetail.vue
+++ b/src/views/modules/result/record/recorddetail.vue
@@ -21,7 +21,8 @@
二级部门:{{ department2 }}
三级部门:{{ department3 }}
直属上级:{{ superStaff }}
-
+
+
@@ -36,9 +37,6 @@
-
-
-
@@ -46,6 +44,15 @@
+
+
+
+
+
@@ -107,6 +114,7 @@
+
@@ -115,6 +123,7 @@
import {getStaffResultDetail, commitApproval} from '@/api/api_result'
import AddOrUpdate from './recorddetail-add-or-update'
import ApprovalAddOrUpdate from './approval-add-or-update.vue'
+import UploadAddOrUpdate from './upload-add-or-update.vue'
export default {
created () {
@@ -157,14 +166,16 @@ export default {
superStaff: '吴林',
addOrUpdateVisible: false,
approvalVisible: false,
+ uploadVisible: false,
loading: false,
auth: [],
- recordType: 0
+ recordType: 0,
}
},
components: {
AddOrUpdate,
- ApprovalAddOrUpdate
+ ApprovalAddOrUpdate,
+ UploadAddOrUpdate
},
activated () {
if (this.$route.query.id > 0) {
@@ -224,6 +235,14 @@ export default {
}, 500)
})
},
+ uploadDownFile (val) {
+ this.uploadVisible = true
+ this.$nextTick(() => {
+ setTimeout(() => {
+ this.$refs.uploadAddOrUpdate.init(this.recordResultId, this.auth, val)
+ }, 500)
+ })
+ },
commitApprovalYes (msg = '确定要提交审批吗?') {
this.$confirm(msg, '提示', {
confirmButtonText: '确定',
@@ -412,7 +431,7 @@ export default {
.bottom{
float: right;
color: blue;
- width: 80px;
+ width: 120px;
height: 30px;
text-align: left;
.des{
diff --git a/src/views/modules/result/record/upload-add-or-update.vue b/src/views/modules/result/record/upload-add-or-update.vue
new file mode 100644
index 0000000..37ab82c
--- /dev/null
+++ b/src/views/modules/result/record/upload-add-or-update.vue
@@ -0,0 +1,220 @@
+
+
+
+
+
+ 点击上传
+
+
+
+
+
+
+
+
+
+ 删除
+ 下载
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
From 963d9e51332d845e8277defde878642dd553bf1b Mon Sep 17 00:00:00 2001
From: quyixiao <2621048238@qq.com>
Date: Tue, 25 Aug 2020 16:38:21 +0800
Subject: [PATCH 2/2] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
config/index.js | 4 ++--
src/router/index.js | 14 ++++++++------
2 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/config/index.js b/config/index.js
index 29525d6..4d9c185 100644
--- a/config/index.js
+++ b/config/index.js
@@ -13,14 +13,14 @@ module.exports = {
assetsPublicPath: '/',
proxyTable: {
'/lz_management': {
- target: 'http://192.168.43.94:8080',
+ target: 'http://localhost:8080',
changeOrigin: true
}
},
// Various Dev Server settings
// host: '192.168.43.94', // can be overwritten by process.env.HOST
- host: '192.168.43.94', // can be overwritten by process.env.HOST
+ //host: '192.168.43.94', // can be overwritten by process.env.HOST
port: 8001, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser: true,
errorOverlay: true,
diff --git a/src/router/index.js b/src/router/index.js
index ab55eb7..183ab5c 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -8,9 +8,10 @@ import Vue from 'vue'
import Router from 'vue-router'
import { apiGetMenuNav } from '@/api/api_menu'
import { isURL } from '@/utils/validate'
-import { clearLoginInfo } from '@/utils'
-import VConsole from 'vconsole';
-let vConsole = new VConsole();
+import {clearLoginInfo} from '@/utils'
+import VConsole from 'vconsole'
+
+let vConsole = new VConsole()
Vue.use(Router)
// 开发环境不使用懒加载, 因为懒加载页面太多的话会造成webpack热更新太慢, 所以只有生产环境使用懒加载
@@ -71,7 +72,7 @@ const router = new Router({
router.beforeEach((to, from, next) => {
// 添加动态(菜单)路由
// 1. 已经添加 or 全局路由, 直接访问
- // 2. 获取菜单列表, 添加并保存本地存储
+ // 2. 获取菜单列表, 添加并保存本地存储
if (router.options.isAddDynamicMenuRoutes || fnCurrentRouteType(to, globalRoutes) === 'global') {
next()
} else {
@@ -109,8 +110,8 @@ function fnCurrentRouteType (route, globalRoutes = []) {
/**
* 判断是否为钉钉打开
- * @param {*} menuList
- * @param {*} routes
+ * @param {*} menuList
+ * @param {*} routes
*/
function isDingtalk () {
if (/(DingTalk)/i.test(navigator.userAgent)) {
@@ -119,6 +120,7 @@ function isDingtalk () {
return false
}
}
+
/**
* 添加动态(菜单)路由
* @param {*} menuList 菜单列表