diff --git a/src/App.vue b/src/App.vue index cc60772..d7d1a57 100644 --- a/src/App.vue +++ b/src/App.vue @@ -110,9 +110,9 @@ export default { z-index: 7777 !important; } - .el-cascader__tags .el-tag { - max-width: 40px !important; - } + //.el-cascader__tags .el-tag { + // max-width: 40px !important; + //} .el-cascader .el-input .el-input__inner { height: 24px !important; diff --git a/src/api/modules/permissionProcess.js b/src/api/modules/permissionProcess.js index ad5507c..df277b5 100644 --- a/src/api/modules/permissionProcess.js +++ b/src/api/modules/permissionProcess.js @@ -9,14 +9,7 @@ export default { data: data }) }, - // 查询报告如果已经发起了 就不能再发起了 - selectReport (data) { - return request({ - url: '/api/report/isAct', - method: 'post', - data: data - }) - }, + deletReport(data){ return request({ url: '/api/report/powerApply/deleteAct', diff --git a/src/api/modules/process.js b/src/api/modules/process.js index 60c1525..e75b831 100644 --- a/src/api/modules/process.js +++ b/src/api/modules/process.js @@ -90,6 +90,15 @@ export default { data: data }) }, + // 通用流程提交 + completeTaskALL(data){ + return request({ + url: '/api/batchCompleteTask', + method: 'post', + data: data + }) + }, + // 通用流程详细信息查询 getProcessDetail( data ){ return request({ @@ -107,7 +116,7 @@ export default { params: data }) }, - // 停用流程发起 + // 流程发起 startProcess(data) { return request({ url: '/api/startProcess', @@ -116,6 +125,15 @@ export default { }) }, + // 流程发起 + startProcessALL(data) { + return request({ + url: '/api/batchStartProcess', + method: 'post', + data: data + + }) + }, // 保存到草稿 saveProcess(data) { return request({ @@ -125,6 +143,16 @@ export default { }) }, + // quan保存到草稿 + saveProcessALL(data) { + return request({ + url: '/api/batchSaveTaskFirst', + method: 'post', + data: data + + }) + }, + // 判断当前人是不是审批人 // /selectTask jugeProcess(data) { @@ -134,5 +162,14 @@ export default { params: data }) - } + }, + // 查询报告如果已经发起了 就不能再发起了 + selectReport (data) { + return request({ + url: '/api/report/isAct', + method: 'post', + data: data + }) + }, + } diff --git a/src/api/modules/report.js b/src/api/modules/report.js index caa2cad..7077d69 100644 --- a/src/api/modules/report.js +++ b/src/api/modules/report.js @@ -49,18 +49,18 @@ export default { params: id }) }, -labelUpdate(data){ - return request({ - url: 'api/tree-label/update', - method: 'POST', - data - }) -}, + labelUpdate(data){ + return request({ + url: 'api/tree-label/update', + method: 'POST', + data + }) + }, // 新增或编辑报告 reportAdd (data) { return request({ - url: '/api/report/add', + url: '/api/report/saveOrUpdate', method: 'POST', data }) @@ -76,6 +76,13 @@ labelUpdate(data){ } }) }, + // 获取报告详情 + getReportDetail (data){ + return request({ + url: `/api/report/detail/${data}`, + method: 'GET' + }) + }, // 获取报告预览 reportGetReportHtmlId (data) { return request({ @@ -151,6 +158,63 @@ labelUpdate(data){ method: 'POST', params: data }) + }, + // 点赞 + goodLuck (data) { + return request({ + url: '/api/reportLogBook/thumbUpOrDown', + method: 'get', + params:data + }) + }, + + //删除评论 {id} + delJuggle (data) { + return request({ + url: '/api/report-comment/'+data, + method: 'delete', + }) + }, + // 添加评论 + addJuggle (data) { + return request({ + url: '/api/report-comment/add', + method: 'post', + data + }) + }, + // 获取评论 + getJuggle (data) { + return request({ + url: '/api/report-comment/page', + method: 'get', + params:data + }) + }, + //评分 + addScore(data) { + return request({ + url: '/api/report-rating/rating', + method: 'put', + params:data + }) + }, + // 获取评分 + getScore(data) { + return request({ + url: '/api/report-rating/rating', + method: 'get', + params:data + }) + }, + // 获取点赞 + getGood(data){ + + return request({ + url: '/api/reportLogBook/getThumbUpCount', + method: 'get', + params:data + }) } - // + } diff --git a/src/api/modules/reportProcess.js b/src/api/modules/reportProcess.js new file mode 100644 index 0000000..ab15040 --- /dev/null +++ b/src/api/modules/reportProcess.js @@ -0,0 +1,18 @@ +import { instance as request } from '@/utils/request' +export default { + searchFile (data) { + return request({ + url: '/api/report/fileName', + method: 'GET', + params:data + }) + }, + // 判断报告名称是否重复 + JggleName(data) { + return request({ + url: '/api/report/isReportNameOccupy', + method: 'post', + data:data + }) + } +} diff --git a/src/assets/css/process.scss b/src/assets/css/process.scss index 3b95180..13248f5 100644 --- a/src/assets/css/process.scss +++ b/src/assets/css/process.scss @@ -97,6 +97,20 @@ word-break: break-word; max-height: 300px; overflow: auto; - +} +.no_border{ + .el-form-item .el-input__inner { + height: 40px; + line-height: 40px; + font-size: 14px; + border: none; + } +.el-form-item .el-textarea__inner{ + border: none; +} + .el-input.is-disabled .el-input__inner, + .el-textarea.is-disabled .el-textarea__inner{ + background-color: #fff; + } } diff --git a/src/components/OrgTable.vue b/src/components/OrgTable.vue index 0730ce0..ef0600a 100644 --- a/src/components/OrgTable.vue +++ b/src/components/OrgTable.vue @@ -5,7 +5,7 @@ @@ -125,7 +125,7 @@ size="medium" closable v-for="item in checkedList" - :key="item.usid || item.USID || item.id" + :key="item.usid || item.USID || item.id || item.orgCode" @close="handleRemove(item)">{{ item.uname || item.USNAME || item.name || item.orgName}} { - const id = selItem.USID + const id = selItem.USID || selItem.orgCode if (!this.checkedIdList.includes(id)) { this.checkedIdList.push(id) this.checkedList.push(row) @@ -758,7 +758,7 @@ export default { selectionRowAll (selection) { if (selection.length > 0) { selection.map(selItem => { - const id = selItem.USID + const id = selItem.USID || selItem.orgCode if (!this.checkedIdList.includes(id)) { this.checkedIdList.push(id) this.checkedList.push(selItem) @@ -948,7 +948,7 @@ export default { }) if (this.maxSelected == 1) { - // debugger + // this.tableChecked = this.config.value this.isShowOrg = false } diff --git a/src/components/ProcessApprovalHistory.vue b/src/components/ProcessApprovalHistory.vue index 054d87c..7a72b62 100644 --- a/src/components/ProcessApprovalHistory.vue +++ b/src/components/ProcessApprovalHistory.vue @@ -49,7 +49,7 @@ prop="approvalOpinion" align="center" show-overflow-tooltip - label="审批意见"> + label="审核意见"> 转办 不同意 @@ -90,9 +89,9 @@ 重置 diff --git a/src/components/ProcessMixin.vue b/src/components/ProcessMixin.vue index 6dfc558..dfc6336 100644 --- a/src/components/ProcessMixin.vue +++ b/src/components/ProcessMixin.vue @@ -7,23 +7,31 @@ components: {}, data() { return { + userId: this.$store.getters.userInfo.usid, + userName:this.$store.getters.userInfo.usname, processTypeList: [ - { - label: '下载申请流程', - value: '1' - }, { - label: '预览申请流程', + label: '预览申请', + value: '1' + }, + + { + label: '预览+下载申请', value: '2' }, { - label: '预览+下载申请流程', + label: '下载申请', value: '3' }, + { - label: '上传审批流程', + label: '上传审批', value: '4' }, + { + label: '编辑报告', + value: '5' + }, ], formDisableFlag: false, nowOrder: '', @@ -106,21 +114,43 @@ // 所有流程的完成任务 completeProcess(obj) { this.$api.process.completeTask(obj).then(res=>{ + if(this.$route.path=='/userCenter/processCenter'){ + this.loadData() + }else { + this.$message['success']('提交成功') + this.$router.push({ + path: "/userCenter/processCenter", + query: { + id: 'AEHJB8YNJ3' + } + }) + } + }) + }, + // 所有流程的完成任务 + completeProcessALL(obj) { + this.$api.process.completeTaskALL(obj).then(res=>{ + if(this.$route.path=='/userCenter/processCenter'){ + this.reset() + }else{ this.$message['success']('提交成功') this.$router.push({ path:"/userCenter/processCenter", query:{ - id:'AEHJB8YNJ3' + id:'AEHJB8YNJ3', } }) - }) - }, + } + + }) + }, // 获取流程详细信息 getProcessDetail(){ return new Promise((resolve,reject)=>{ let params={ - prcId: this.prcId, - prcType: this.prcType + prcId: this.prcId , + prcType: this.prcType, + dataId:this.dataId } if(this.$route.query.type=='yiban') params.tag=1 else params.tag=0 @@ -145,6 +175,16 @@ }) }) }, + //保存到草稿 + saveProcessALL(param){ + return new Promise((resolve,reject)=> { + this.$api.process.saveProcessALL(param).then(res => { + resolve() + }).catch(()=>{ + reject() + }) + }) + }, // 获取草稿详细信息 getDraftDetail(){ let dataId=this.$store.getters.handleProcess.dataId @@ -173,8 +213,6 @@ this.$message.warning("您没有当前流程的操作权限") resolve(false) } - - }) }) } diff --git a/src/icon/svg/pointe_fill.svg b/src/icon/svg/pointe_fill.svg index 5c82f5e..b79ae5b 100644 --- a/src/icon/svg/pointe_fill.svg +++ b/src/icon/svg/pointe_fill.svg @@ -1 +1 @@ - + diff --git a/src/main.js b/src/main.js index 558b169..313b172 100644 --- a/src/main.js +++ b/src/main.js @@ -17,6 +17,7 @@ import './assets/css/element-variables.scss' // ECharts import 'echarts' import ECharts from './components/ECharts' +import orgTable from '@/components/OrgTable' // Api import Api from './api' @@ -47,6 +48,7 @@ Vue.use(VXETable) Vue.use(VueQuillEditor) Vue.use(ElementUI, { size: 'mini', zIndex: 3000 }) Vue.component('v-chart', ECharts) +Vue.component('orgTable',orgTable) Vue.use(Api) Vue.use(Directive) Vue.use(Filter) diff --git a/src/utils/Enum/enum.js b/src/utils/Enum/enum.js index e3a7c12..07f6f6b 100644 --- a/src/utils/Enum/enum.js +++ b/src/utils/Enum/enum.js @@ -1,10 +1,11 @@ // 定义枚举 import Esenum from './index.js' // 权限申请 -export const PERMISSION = new Esenum([ - { label: '预览', value: "1" }, - { label: '预览+下载', value: "2" } -]) +export const PERMISSION = [ + { label: '预览', value: "1" ,disabled:false}, + { label: '预览+下载', value: "2" ,disabled:false}, + { label: '下载', value: "3",disabled:false }, +] // 基础设置的枚举 // export const basMessage = new Esenum([ @@ -14,10 +15,12 @@ export const basMessage = new Esenum({ mark: {name: "水印前缀", value: "WATERMARK_PREFIX",index:0} }) -export const privacyLevelOptions= new Esenum([ + + +export const privacyLevelOptions= [ { - value:'外部公开', - label:'外部公开' + value:'公开(内部公开)', + label:'公开(内部公开)' }, { value:'普通商密', @@ -27,22 +30,18 @@ export const privacyLevelOptions= new Esenum([ value:'核心商密', label:'核心商密' }, +] +export const confidentialLevelOptions = [ { - value:'内部公开', - label:'内部公开' + value:'不涉及用户隐私', + label:'不涉及用户隐私' }, { - value:'用户信息', - label:'用户信息' + value:'用户隐私', + label:'用户隐私' }, { - value:'敏感信息', - label:'敏感信息' - }, -]) -export const confidentialLevelOptions = new Esenum([ - { - value:'一般隐私', - label:'一般隐私' + value:'用户敏感信息', + label:'用户敏感信息' } -]) +] diff --git a/src/utils/date.js b/src/utils/date.js index 6d7bb58..7165094 100644 --- a/src/utils/date.js +++ b/src/utils/date.js @@ -33,3 +33,14 @@ export function formatDate (value, fmt) { return value.substr(0, fmt.length) } } +export function formatDate2 (value, fmt) { + let dateObject = new Date(value); + let year = dateObject.getFullYear(); + let month = dateObject.getMonth() + 1; + let day = dateObject.getDate(); + let hours = dateObject.getHours(); + let minutes = dateObject.getMinutes(); + let seconds = dateObject.getSeconds(); + + return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; +} diff --git a/src/utils/request.js b/src/utils/request.js index fa68921..dd705ca 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -51,7 +51,6 @@ instance.interceptors.response.use(function (response) { // Message.error(response.data.message) // if (response.data.status == 401) { store.commit('savePathUrl', null) - store.commit('setHandleProcess', null) // router.push('/login') Message.error(response.data.message) // window.open(BASE_URL.BASE_CHANGAN + "/logout?service=" + BASE_URL.BASE_LOCAL + "/login?loginType=1", '_self'); diff --git a/src/views/Report/ReportDetail.vue b/src/views/Report/ReportDetail.vue index fd4c33e..74da3d4 100644 --- a/src/views/Report/ReportDetail.vue +++ b/src/views/Report/ReportDetail.vue @@ -1,101 +1,232 @@ diff --git a/src/views/Report/ReportList.vue b/src/views/Report/ReportList.vue index acdc500..324a857 100644 --- a/src/views/Report/ReportList.vue +++ b/src/views/Report/ReportList.vue @@ -32,78 +32,16 @@ 查询 重置 - - - - - - 权限申请 + 申请权限
- 时间 - 点击量 - 下载量 + 时间 + 点击量 + 下载量
@@ -121,7 +59,6 @@ default-expand-all :filter-node-method="filterNode" ref="tree" - check-strictly @check="getHalfCheckedNode" > @@ -137,7 +74,7 @@ - + @@ -151,59 +88,42 @@ - - + - + - - - - + + + + + + + + + + @@ -252,6 +172,9 @@ export default { name: 'ReportList', data() { return { + isShowbg1:true, + isShowbg2:false, + isShowbg3:false, value:3.7, watermarkText: '', // 水印 fullscreen: false, @@ -261,6 +184,9 @@ export default { name: '', pageNo: 1, pageSize: 10, + orderByClicks:0, + orderByDownload:0, + orderByTime:1 }, total: 0, tableData: [], @@ -304,6 +230,29 @@ export default { } }, methods: { + clickBtn(type){ + for(let i= 1;i<4;i++){ + this['isShowbg'+i] = false + } + this['isShowbg'+type] = true + if(type==1){ + this.q.orderByTime=1 + this.q.orderByClicks=0 + this.q.orderByDownload=0 + + }else if(type==2){ + this.q.orderByClicks=1 + this.q.orderByTime=0 + this.q.orderByDownload=0 + + }else{ + this.q.orderByDownload=1 + this.q.orderByClicks=0 + this.q.orderByTime=0 + } + this.q.pageNo=1 + this.reportList() + }, getKeyContent(list) { if (list) { let keyContent = [] @@ -343,26 +292,50 @@ export default { return item.id }) }, - permissionApp() { - // if(this.checkList.length <1){ - // this.$message.warning("至少选择一条报告进行权限申请") - // return - // } - // // 有预览权限的时候是否还让继续申请 - // let temp=this.checkList.filter(item =>{ - // if(+item.power == 1 || +item.power == 2){ - // return item.name - // } - // }) - // if(temp.length>0) { - // this.$message.warning("当前选择的"+temp.toString()+"已经有权限,无须申请!") - // return - // } + permissionApp(row) { + if(row){ + if(row.isAct == 0){ + this.$message.warning("当前"+row.name+"已经在流程中") + return + } + this.$router.push({ + path: '/permission/launch', + query: {id: 'AEHJB8YNJ3', isBegin: 1,ids:row.id} + }) + }else{ + if(this.checkList.length <1){ + this.$message.warning("至少选择一条报告进行权限申请") + return + } + let already=this.checkList.filter(item =>{ + if( +item.isAct == 0){ + return item + } + }) + if(already.length>0) { + let name=already.map(item=>item.name) + this.$message.warning("当前选择的"+name.join(',')+"已经在流程中") + return + } + // 有预览权限的时候是否还让继续申请 + let temp=this.checkList.filter(item =>{ + if( +item.power == 2){ + return item.name + } + }) + console.log(temp) + if(temp.length>0) { + let name=temp.map(item=>item.name) + this.$message.warning("当前选择的"+name.join(',')+"已经有权限,无须申请!") + return + } + + this.$router.push({ + path: '/permission/launch', + query: {id: 'AEHJB8YNJ3', isBegin: 1,ids:this.checkIds.join(',')} + }) + } - this.$router.push({ - path: '/permission/launch', - query: {id: 'AEHJB8YNJ3', isBegin: 1} - }) }, init() { this.getTreeLabel() @@ -464,7 +437,10 @@ export default { labelTwoId: [], labelThreeId: [], pageNo: 1, - pageSize: 10 + pageSize: 10, + orderByTime:1, + orderByDownload:0, + orderByClicks:0 } this.total = 0 this.tableData = [] @@ -490,7 +466,7 @@ export default { }, // 跳转到详情 goReportDetail(row) { - this.$router.push({path: '/report/detail', query: {id: this.$route.query.id, row: JSON.stringify(row)}}) + this.$router.push({path: '/report/detail', query: {id: this.$route.query.id, reportId: row.id}}) } }, created() { @@ -513,7 +489,7 @@ export default { .treeList { padding: 20px 20px 0; box-shadow: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04); - margin-right: 20px; + //margin-right: 20px; .filter-tree { margin-top: 20px; @@ -552,10 +528,31 @@ export default { } .tag-btn { + .el-button + .el-button { + margin-left: 0px; + + + } padding: 18px 13px 11px; .tag-right{ float: right; + ::v-deep .el-button{ + border: 1px solid #3D87CC; + border-radius: 0; + color: #3D87CC; + background-color: #ecf5ff; + } + .clickNum{ + border: none; + border-top: 1px solid #3D87CC ; + border-bottom: 1px solid #3D87CC; + } + + } + .checkClass{ + background-color: rgba(64, 158, 255, 1) !important; + color: #fff !important; } } diff --git a/src/views/Report/ReportManager.vue b/src/views/Report/ReportManager.vue index d8b6fa4..d695714 100644 --- a/src/views/Report/ReportManager.vue +++ b/src/views/Report/ReportManager.vue @@ -41,6 +41,7 @@ +
@@ -55,8 +56,6 @@ :filter-node-method="filterNode" ref="tree" @check="getHalfCheckedNode" - check-strictly - @check-change="setCheckedNodes" :key="treeKey" >