解决冲突
This commit is contained in:
commit
8c3cbb16a7
@ -20,7 +20,11 @@ module.exports = {
|
|||||||
|
|
||||||
// Various Dev Server settings
|
// 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
|
||||||
|
<<<<<<< HEAD
|
||||||
host: IP, // can be overwritten by process.env.HOST
|
host: IP, // can be overwritten by process.env.HOST
|
||||||
|
=======
|
||||||
|
//host: '192.168.43.94', // can be overwritten by process.env.HOST
|
||||||
|
>>>>>>> 963d9e51332d845e8277defde878642dd553bf1b
|
||||||
port: 8001, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
|
port: 8001, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
|
||||||
autoOpenBrowser: true,
|
autoOpenBrowser: true,
|
||||||
errorOverlay: true,
|
errorOverlay: true,
|
||||||
|
|||||||
@ -40,3 +40,17 @@ export const getResultComment = params => {
|
|||||||
export const recordIdsSubmit = params => {
|
export const recordIdsSubmit = params => {
|
||||||
return http({url: '/lz_management/user/lzresultrecord/recordIdsSubmit', method: 'post', 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'})
|
||||||
|
}
|
||||||
|
|||||||
@ -8,9 +8,10 @@ import Vue from 'vue'
|
|||||||
import Router from 'vue-router'
|
import Router from 'vue-router'
|
||||||
import { apiGetMenuNav } from '@/api/api_menu'
|
import { apiGetMenuNav } from '@/api/api_menu'
|
||||||
import { isURL } from '@/utils/validate'
|
import { isURL } from '@/utils/validate'
|
||||||
import { clearLoginInfo } from '@/utils'
|
import {clearLoginInfo} from '@/utils'
|
||||||
import VConsole from 'vconsole';
|
import VConsole from 'vconsole'
|
||||||
let vConsole = new VConsole();
|
|
||||||
|
let vConsole = new VConsole()
|
||||||
Vue.use(Router)
|
Vue.use(Router)
|
||||||
|
|
||||||
// 开发环境不使用懒加载, 因为懒加载页面太多的话会造成webpack热更新太慢, 所以只有生产环境使用懒加载
|
// 开发环境不使用懒加载, 因为懒加载页面太多的话会造成webpack热更新太慢, 所以只有生产环境使用懒加载
|
||||||
@ -71,7 +72,7 @@ const router = new Router({
|
|||||||
router.beforeEach((to, from, next) => {
|
router.beforeEach((to, from, next) => {
|
||||||
// 添加动态(菜单)路由
|
// 添加动态(菜单)路由
|
||||||
// 1. 已经添加 or 全局路由, 直接访问
|
// 1. 已经添加 or 全局路由, 直接访问
|
||||||
// 2. 获取菜单列表, 添加并保存本地存储
|
// 2. 获取菜单列表, 添加并保存本地存储
|
||||||
if (router.options.isAddDynamicMenuRoutes || fnCurrentRouteType(to, globalRoutes) === 'global') {
|
if (router.options.isAddDynamicMenuRoutes || fnCurrentRouteType(to, globalRoutes) === 'global') {
|
||||||
next()
|
next()
|
||||||
} else {
|
} else {
|
||||||
@ -109,8 +110,8 @@ function fnCurrentRouteType (route, globalRoutes = []) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 判断是否为钉钉打开
|
* 判断是否为钉钉打开
|
||||||
* @param {*} menuList
|
* @param {*} menuList
|
||||||
* @param {*} routes
|
* @param {*} routes
|
||||||
*/
|
*/
|
||||||
function isDingtalk () {
|
function isDingtalk () {
|
||||||
if (/(DingTalk)/i.test(navigator.userAgent)) {
|
if (/(DingTalk)/i.test(navigator.userAgent)) {
|
||||||
@ -119,6 +120,7 @@ function isDingtalk () {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加动态(菜单)路由
|
* 添加动态(菜单)路由
|
||||||
* @param {*} menuList 菜单列表
|
* @param {*} menuList 菜单列表
|
||||||
|
|||||||
@ -121,7 +121,6 @@ export default {
|
|||||||
formaterDate (val) {
|
formaterDate (val) {
|
||||||
var date = new Date(val)
|
var date = new Date(val)
|
||||||
var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1
|
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
|
return date.getFullYear() + '-' + month
|
||||||
},
|
},
|
||||||
getStatusStr (status) {
|
getStatusStr (status) {
|
||||||
|
|||||||
@ -92,7 +92,6 @@
|
|||||||
v-loading="dataListLoading" border fit highlight-current-row
|
v-loading="dataListLoading" border fit highlight-current-row
|
||||||
@selection-change="selectionChangeHandle"
|
@selection-change="selectionChangeHandle"
|
||||||
:cell-style="cellStyle"
|
:cell-style="cellStyle"
|
||||||
|
|
||||||
style="width: 100%;" >
|
style="width: 100%;" >
|
||||||
<el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column>
|
<el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column>
|
||||||
<el-table-column prop="id" header-align="center" align="center" label="ID"></el-table-column>
|
<el-table-column prop="id" header-align="center" align="center" label="ID"></el-table-column>
|
||||||
|
|||||||
@ -19,7 +19,7 @@
|
|||||||
<div id="checkResultEditorElem" class="editor"></div>
|
<div id="checkResultEditorElem" class="editor"></div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="优先级" v-show="auth.priority >= 1" prop="priority">
|
<el-form-item label="业绩排序" v-show="auth.priority >= 1" prop="priority">
|
||||||
<el-input :disabled="auth.priority < 2 " v-model="dataForm.priority" placeholder="优先级别,数字越大,越在排列在表格前面"></el-input>
|
<el-input :disabled="auth.priority < 2 " v-model="dataForm.priority" placeholder="优先级别,数字越大,越在排列在表格前面"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
|||||||
@ -21,7 +21,8 @@
|
|||||||
<span>二级部门:<b>{{ department2 }}</b></span>
|
<span>二级部门:<b>{{ department2 }}</b></span>
|
||||||
<span>三级部门:<b>{{ department3 }}</b></span>
|
<span>三级部门:<b>{{ department3 }}</b></span>
|
||||||
<span>直属上级:<b>{{ superStaff }}</b></span>
|
<span>直属上级:<b>{{ superStaff }}</b></span>
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="titleBottom">
|
<div class="titleBottom">
|
||||||
<div class="bottom" v-show="this.auth.commit == 1" >
|
<div class="bottom" v-show="this.auth.commit == 1" >
|
||||||
@ -36,9 +37,6 @@
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="bottom" v-show="this.auth.confirmCommit == 1">
|
<div class="bottom" v-show="this.auth.confirmCommit == 1">
|
||||||
<p><span style="" @click="commitApprovalYes('你要确认得分吗?')">确认得分</span></p>
|
<p><span style="" @click="commitApprovalYes('你要确认得分吗?')">确认得分</span></p>
|
||||||
</div>
|
</div>
|
||||||
@ -46,6 +44,15 @@
|
|||||||
<div class="bottom" v-show="this.auth.reject == 1">
|
<div class="bottom" v-show="this.auth.reject == 1">
|
||||||
<p><span @click="commitApprovalAddOrUpdate(5)" ><label :class="'label bg-danger my_pointer'">驳回</label></span></p>
|
<p><span @click="commitApprovalAddOrUpdate(5)" ><label :class="'label bg-danger my_pointer'">驳回</label></span></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="bottom">
|
||||||
|
<p><span @click="uploadDownFile(1)" ><label :class="'label bg-info my_pointer'">上传附件(0)</label></span></p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="bottom">
|
||||||
|
<p><span @click="uploadDownFile(2)" ><label :class="'label bg-info my_pointer'">下载附件(0)</label></span></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -108,6 +115,7 @@
|
|||||||
<!-- 弹窗, 新增 / 修改 -->
|
<!-- 弹窗, 新增 / 修改 -->
|
||||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
||||||
<approval-add-or-update v-if="approvalVisible" ref="approvalAddOrUpdate" @refreshDataList="getDataList"></approval-add-or-update>
|
<approval-add-or-update v-if="approvalVisible" ref="approvalAddOrUpdate" @refreshDataList="getDataList"></approval-add-or-update>
|
||||||
|
<upload-add-or-update v-if="uploadVisible" ref="uploadAddOrUpdate" @refreshDataList="getDataList"></upload-add-or-update>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -116,6 +124,7 @@
|
|||||||
import {getStaffResultDetail, commitApproval} from '@/api/api_result'
|
import {getStaffResultDetail, commitApproval} from '@/api/api_result'
|
||||||
import AddOrUpdate from './recorddetail-add-or-update'
|
import AddOrUpdate from './recorddetail-add-or-update'
|
||||||
import ApprovalAddOrUpdate from './approval-add-or-update.vue'
|
import ApprovalAddOrUpdate from './approval-add-or-update.vue'
|
||||||
|
import UploadAddOrUpdate from './upload-add-or-update.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
created () {
|
created () {
|
||||||
@ -161,15 +170,20 @@ export default {
|
|||||||
superStaff: '吴林',
|
superStaff: '吴林',
|
||||||
addOrUpdateVisible: false,
|
addOrUpdateVisible: false,
|
||||||
approvalVisible: false,
|
approvalVisible: false,
|
||||||
|
uploadVisible: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
auth: [],
|
auth: [],
|
||||||
recordType: 0,
|
recordType: 0,
|
||||||
|
<<<<<<< HEAD
|
||||||
clientHeight: 0
|
clientHeight: 0
|
||||||
|
=======
|
||||||
|
>>>>>>> 963d9e51332d845e8277defde878642dd553bf1b
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
AddOrUpdate,
|
AddOrUpdate,
|
||||||
ApprovalAddOrUpdate
|
ApprovalAddOrUpdate,
|
||||||
|
UploadAddOrUpdate
|
||||||
},
|
},
|
||||||
activated () {
|
activated () {
|
||||||
if (this.$route.query.id > 0) {
|
if (this.$route.query.id > 0) {
|
||||||
@ -229,6 +243,14 @@ export default {
|
|||||||
}, 500)
|
}, 500)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
uploadDownFile (val) {
|
||||||
|
this.uploadVisible = true
|
||||||
|
this.$nextTick(() => {
|
||||||
|
setTimeout(() => {
|
||||||
|
this.$refs.uploadAddOrUpdate.init(this.recordResultId, this.auth, val)
|
||||||
|
}, 500)
|
||||||
|
})
|
||||||
|
},
|
||||||
commitApprovalYes (msg = '确定要提交审批吗?') {
|
commitApprovalYes (msg = '确定要提交审批吗?') {
|
||||||
this.$confirm(msg, '提示', {
|
this.$confirm(msg, '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
@ -417,7 +439,7 @@ export default {
|
|||||||
.bottom{
|
.bottom{
|
||||||
float: right;
|
float: right;
|
||||||
color: blue;
|
color: blue;
|
||||||
width: 80px;
|
width: 120px;
|
||||||
height: 30px;
|
height: 30px;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
.des{
|
.des{
|
||||||
|
|||||||
220
src/views/modules/result/record/upload-add-or-update.vue
Normal file
220
src/views/modules/result/record/upload-add-or-update.vue
Normal file
@ -0,0 +1,220 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
class="recordDetail"
|
||||||
|
:title="'' "
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
|
||||||
|
:visible.sync="visible">
|
||||||
|
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" >
|
||||||
|
<el-form-item v-if="status===1">
|
||||||
|
<el-upload
|
||||||
|
class="upload-demo igo-form-item"
|
||||||
|
ref="upload"
|
||||||
|
:action="uploadUrl"
|
||||||
|
:data="isCompressNormal"
|
||||||
|
:headers="uploadData"
|
||||||
|
:on-success="handleSuccess"
|
||||||
|
:on-remove="handleRemove"
|
||||||
|
:file-list="fileList"
|
||||||
|
list-type="picture"
|
||||||
|
:limit="10">
|
||||||
|
<el-button size="small" type="primary">点击上传</el-button>
|
||||||
|
</el-upload>
|
||||||
|
</el-form-item>
|
||||||
|
<el-table
|
||||||
|
:data="dataList"
|
||||||
|
border
|
||||||
|
v-loading="dataListLoading" border fit highlight-current-row
|
||||||
|
@selection-change="selectionChangeHandle"
|
||||||
|
style="width: 100%;" >
|
||||||
|
<el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column>
|
||||||
|
<el-table-column prop="id" header-align="center" align="center" label="ID" width="50"></el-table-column>
|
||||||
|
<el-table-column prop="staffName" header-align="center" align="center" label="姓名" width="80"></el-table-column>
|
||||||
|
<el-table-column prop="fileName" header-align="center" align="center" label="文件名称"></el-table-column>
|
||||||
|
<el-table-column v-if="status===1"
|
||||||
|
fixed="right"
|
||||||
|
header-align="center"
|
||||||
|
align="center"
|
||||||
|
width="100"
|
||||||
|
label="操作">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button>
|
||||||
|
<a :href="scope.row.fileUrl" target="_blank">下载</a>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<el-pagination
|
||||||
|
@size-change="sizeChangeHandle"
|
||||||
|
@current-change="currentChangeHandle"
|
||||||
|
:current-page="pageIndex"
|
||||||
|
:page-sizes="[10, 20, 50, 100]"
|
||||||
|
:page-size="pageSize"
|
||||||
|
:total="totalPage"
|
||||||
|
layout="total, sizes, prev, pager, next, jumper">
|
||||||
|
</el-pagination>
|
||||||
|
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" v-if="status === 1 ">确定</el-button>
|
||||||
|
<el-button type="primary" @click="dowLoadZip" v-if="status === 2 " >下载</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {getUploadFileList, deleteFile, downZip} from '@/api/api_result'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
visible: false,
|
||||||
|
recordResultId: 0,
|
||||||
|
auth: [],
|
||||||
|
resultCommitId: 0,
|
||||||
|
status: 1,
|
||||||
|
dataForm: {
|
||||||
|
a: ''
|
||||||
|
},
|
||||||
|
dataRule: {},
|
||||||
|
dataList: [],
|
||||||
|
pageIndex: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
totalPage: 0,
|
||||||
|
dataListLoading: false,
|
||||||
|
fileList: [],
|
||||||
|
uploadUrl: '/lz_management/file/uploadFile',
|
||||||
|
// 上传图片其他参数
|
||||||
|
isCompressNormal: {
|
||||||
|
isCompressNormal: 0,
|
||||||
|
isCompressThumbnail: 0
|
||||||
|
},
|
||||||
|
uploadData: {},
|
||||||
|
dataListSelections: [],
|
||||||
|
recordIdsSelect: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted () {
|
||||||
|
|
||||||
|
},
|
||||||
|
computed: {},
|
||||||
|
methods: {
|
||||||
|
async init (recordResultId, auth, status) {
|
||||||
|
this.recordResultId = recordResultId
|
||||||
|
this.auth = auth
|
||||||
|
this.visible = true
|
||||||
|
this.status = status
|
||||||
|
this.uploadUrl = '/lz_management/file/uploadFile?recordId=' + this.recordResultId
|
||||||
|
this.$nextTick(async () => {
|
||||||
|
this.$refs['dataForm'].resetFields()
|
||||||
|
this.getDataList()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 获取数据列表
|
||||||
|
getDataList () {
|
||||||
|
getUploadFileList({
|
||||||
|
'page': this.pageIndex,
|
||||||
|
'limit': this.pageSize,
|
||||||
|
'recordId': this.recordResultId
|
||||||
|
}).then(data => {
|
||||||
|
if (data && data.code === 0) {
|
||||||
|
this.dataList = data.page.list
|
||||||
|
this.totalPage = data.page.totalCount
|
||||||
|
} else {
|
||||||
|
this.dataList = []
|
||||||
|
this.totalPage = 0
|
||||||
|
}
|
||||||
|
this.dataListLoading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 多选
|
||||||
|
selectionChangeHandle (val) {
|
||||||
|
this.dataListSelections = val
|
||||||
|
this.recordIdsSelect = []
|
||||||
|
for (let i = 0; i < this.dataListSelections.length; i++) {
|
||||||
|
this.recordIdsSelect.push(this.dataListSelections[i].id)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
dowLoadZip () {
|
||||||
|
let a = this.recordIdsSelect.join(',')
|
||||||
|
if (this.stringIsNull(a)) {
|
||||||
|
this.alertInfo(' 请选择要下载的 id')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
window.open('/lz_management/file/downZip?ids=' + this.recordIdsSelect.join(','))
|
||||||
|
},
|
||||||
|
deleteHandle (id) {
|
||||||
|
this.$confirm('你确定要删除文件吗?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
deleteFile({
|
||||||
|
'id': id
|
||||||
|
}).then(data => {
|
||||||
|
if (data && data.code === 0) {
|
||||||
|
this.getDataList()
|
||||||
|
this.$message({
|
||||||
|
message: data.msg,
|
||||||
|
type: 'success',
|
||||||
|
duration: 1500,
|
||||||
|
onClose: () => {
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}).catch(() => {
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleRemove (file, fileList) {
|
||||||
|
const index = this.fileList.findIndex(item => item.url === file.url)
|
||||||
|
if (index !== -1) {
|
||||||
|
this.fileList.splice(index, 1)
|
||||||
|
this.form.width = ''
|
||||||
|
this.form.height = ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
downloadTemplate (id) {
|
||||||
|
window.open('/lz_management/file/downFile?id=' + id)
|
||||||
|
},
|
||||||
|
handleSuccess (res, fileList, response) {
|
||||||
|
this.getDataList()
|
||||||
|
},
|
||||||
|
alertInfo (msg) {
|
||||||
|
this.$message({
|
||||||
|
message: msg,
|
||||||
|
type: 'success',
|
||||||
|
duration: 1500,
|
||||||
|
onClose: () => {
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 每页数
|
||||||
|
sizeChangeHandle (val) {
|
||||||
|
this.pageSize = val
|
||||||
|
this.pageIndex = 1
|
||||||
|
this.getDataList()
|
||||||
|
},
|
||||||
|
|
||||||
|
// 当前页
|
||||||
|
currentChangeHandle (val) {
|
||||||
|
this.pageIndex = val
|
||||||
|
this.getDataList()
|
||||||
|
},
|
||||||
|
|
||||||
|
stringIsNull (str) {
|
||||||
|
if (typeof str === 'undefined' || str === null || str === '') {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.recordDetail .el-upload-list{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
Loading…
x
Reference in New Issue
Block a user