提交基础页面

This commit is contained in:
zhoulingpo
2023-04-17 10:31:08 +08:00
parent 4ed0752b86
commit 61e01291fd
12 changed files with 2838 additions and 630 deletions
+44
View File
@@ -0,0 +1,44 @@
//流程样式
.process{
background-color: #fff;
width:100%;
height: 100%;
padding: 10px 20px;
overflow: auto;
}
.process_box{
padding: 10px 30px;
border: 1px solid #e8f6fe;
}
.procedure{
}
.content{
margin-top: 25px;
width:100%;
padding: 10px 30px;
border: 1px dotted #ccc;
}
.base_title{
display: inline-block;
font-size: 18px;
font-weight: 700;
color: #555;
line-height: 40px;
border-bottom: 3px solid #409eff;
margin-bottom: 20px;
}
// 表单的样式
.label-input-form{
padding-right: 80px;
.el-form-item.el-form-item__label{
line-height: 40px;
font-size: 15px;
color:#555 !important;
}
.el-form-item.el-input__inner{
height: 40px;
line-height: 40px;
}
}
File diff suppressed because it is too large Load Diff
+62
View File
@@ -0,0 +1,62 @@
<!-- 流程信息公共头部 -->
<template>
<div>
<div class="prc-header-wrap">
<div class="processtitle">{{title}}</div>
<div class="processnum" v-if="proceesNum">流程编号:xcsdsds{{proceesNum}}</div>
</div>
</div>
</template>
<script>
export default {
name: 'ProcessHeader',
mixins: [],
props: {
// 渲染的名称
title: {
type: String,
required: true
},
// 渲染编号
proceesNum: {
type: String,
required: false
}
},
components: {},
data () {
return {
opacityStyle: {},
headerFixed: false
}
},
methods: {
},
computed: {
},
watch: {},
mounted () {
}
}
</script>
<style lang="scss" scoped>
.prc-header-wrap{
display: flex;
justify-content: space-between;
width: 100%;
border-bottom: 1px dotted #ccc;
line-height: 40px;
color: #555;
}
.processtitle{
font-weight: 700;
font-size: 16px;
}
.processnum{
font-size: 13px;
}
</style>
+3
View File
@@ -2,6 +2,8 @@ import Vue from 'vue'
import App from './App.vue' import App from './App.vue'
import router from './router' import router from './router'
import store from './store' import store from './store'
// 流程公共样式
import './assets/css/process.scss'
import config from '@/utils/config' import config from '@/utils/config'
// VXETable // VXETable
@@ -27,6 +29,7 @@ import '@/utils/waterMark'
import JSEncrypt from '../src/assets/js/jsencrypt.min.js' import JSEncrypt from '../src/assets/js/jsencrypt.min.js'
// 富文本引用 // 富文本引用
import VueQuillEditor from 'vue-quill-editor' import VueQuillEditor from 'vue-quill-editor'
// require styles 引入样式 // require styles 引入样式
import 'quill/dist/quill.core.css' import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css' import 'quill/dist/quill.snow.css'
+35
View File
@@ -0,0 +1,35 @@
const routes = [
{
path: '/permission',
name: '',
component: () => import('../../views/Layout.vue'),
children: [
{
path: 'step1',
name: 'urlIndex',
component: () => import('../../views/permissionApplication/launch'),
meta: {
crumb: ['权限申请']
}
},
{
path: 'step2',
name: 'urlIndex',
component: () => import('../../views/permissionApplication/launch'),
meta: {
crumb: ['权限申请']
}
},
{
path: 'step3',
name: 'urlIndex',
component: () => import('../../views/permissionApplication/launch'),
meta: {
crumb: ['权限申请']
}
}
]
}
]
export default routes
+199 -199
View File
@@ -50,6 +50,7 @@
</el-row> </el-row>
</div> </div>
<div class="table"> <div class="table">
{{tagsForm}}
<vxe-table :data="tableData" :empty-render="{name: 'NotData'}" align="center" border stripe v-table-min-height="'calc(100vh - 320px)'"> <vxe-table :data="tableData" :empty-render="{name: 'NotData'}" align="center" border stripe v-table-min-height="'calc(100vh - 320px)'">
<vxe-column show-overflow show-header-overflow type="seq" title="序号" width="77"> <vxe-column show-overflow show-header-overflow type="seq" title="序号" width="77">
<template #default="{ row, rowIndex }"> <template #default="{ row, rowIndex }">
@@ -384,11 +385,11 @@
<script> <script>
import { fileType } from '@/utils/fileType' import { fileType } from '@/utils/fileType'
import {downloadFile} from "../../utils/downloadFile"; import { downloadFile } from '../../utils/downloadFile'
import { formatDate } from '@/utils/date' import { formatDate } from '@/utils/date'
export default { export default {
name: "ReportManager", name: 'ReportManager',
data () { data () {
return { return {
watermarkText: '', // 水印 watermarkText: '', // 水印
@@ -401,7 +402,7 @@ export default {
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
reportName: '', // 报告名称 reportName: '', // 报告名称
startDate: '', // 开始时间 startDate: '' // 开始时间
}, },
qLogTotal: 0, qLogTotal: 0,
qLogDateRange: '', // 开始结束时间 qLogDateRange: '', // 开始结束时间
@@ -436,7 +437,7 @@ export default {
childList: [ childList: [
// {name: '无', type: '3', id: '', parentId: ''}, // {name: '无', type: '3', id: '', parentId: ''},
] ]
}, }
}, },
/* =============================================== 报告上传 =============================================== */ /* =============================================== 报告上传 =============================================== */
dialogReport: false, // 报告上传 dialogReport: false, // 报告上传
@@ -454,7 +455,7 @@ export default {
labelTwoName: '', // 标签2 labelTwoName: '', // 标签2
labelThreeId: '', // 标签3 labelThreeId: '', // 标签3
labelThreeName: '', // 标签3 labelThreeName: '', // 标签3
reportUserIdList: [], // 权限 reportUserIdList: [] // 权限
}, },
labelOne: {}, labelOne: {},
labelTwo: {}, labelTwo: {},
@@ -463,8 +464,8 @@ export default {
userList: [], userList: [],
pickerOptions: { pickerOptions: {
disabledDate (time) { disabledDate (time) {
return time.getFullYear() > new Date().getFullYear() + 1 || time.getFullYear() < new Date().getFullYear() - 10; return time.getFullYear() > new Date().getFullYear() + 1 || time.getFullYear() < new Date().getFullYear() - 10
}, }
}, },
/* =============================================== 列表展示 =============================================== */ /* =============================================== 列表展示 =============================================== */
q: { q: {
@@ -474,7 +475,7 @@ export default {
labelTwoId: [], labelTwoId: [],
labelThreeId: [], labelThreeId: [],
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10
}, },
total: 0, total: 0,
tableData: [], tableData: [],
@@ -483,108 +484,108 @@ export default {
content: '', content: '',
/* 权限全选 */ /* 权限全选 */
checked: false, checked: false,
mulSelecteds: [], // 已选中选项 mulSelecteds: [] // 已选中选项
} }
}, },
methods: { methods: {
/* 权限全选 */ /* 权限全选 */
selectAll () { selectAll () {
this.reportF.reportUserIdList = []; this.reportF.reportUserIdList = []
if (this.checked) { if (this.checked) {
this.userList.forEach((item) => { this.reportF.reportUserIdList.push(item.USID )}); this.userList.forEach((item) => { this.reportF.reportUserIdList.push(item.USID) })
} else { } else {
this.reportF.reportUserIdList = []; this.reportF.reportUserIdList = []
} }
// this.$emit('update:updateMultipleSelect',this.reportF.reportUserIdList); // this.$emit('update:updateMultipleSelect',this.reportF.reportUserIdList);
}, },
changeSelect (val) { changeSelect (val) {
this.checked = (val.length || this.reportF.reportUserIdList.length) === this.userList.length; this.checked = (val.length || this.reportF.reportUserIdList.length) === this.userList.length
// this.$emit('update:updateMultipleSelect',this.reportF.reportUserIdList); // this.$emit('update:updateMultipleSelect',this.reportF.reportUserIdList);
}, },
init () { init () {
this.labelList(); this.labelList()
this.reset(); this.reset()
this.reportDateList(); this.reportDateList()
this.sysUserList(); this.sysUserList()
}, },
/* =============================================== 操作日志 =============================================== */ /* =============================================== 操作日志 =============================================== */
// 操作日志 // 操作日志
openLog () { openLog () {
this.dialogLog = true; this.dialogLog = true
this.logReset(); this.logReset()
}, },
// 日志重置搜索 // 日志重置搜索
logReset () { logReset () {
this.qLogDateRange = ''; this.qLogDateRange = ''
this.qLog = { this.qLog = {
doName: '', // 操作类型 doName: '', // 操作类型
endDate: '', // 结束时间 endDate: '', // 结束时间
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
reportName: '', // 报告名称 reportName: '', // 报告名称
startDate: '', // 开始时间 startDate: '' // 开始时间
}; }
this.qLogTotal = 0; this.qLogTotal = 0
this.qLogDateRange = ''; // 开始结束时间 this.qLogDateRange = '' // 开始结束时间
this.logTableData = []; this.logTableData = []
this.doNames = []; this.doNames = []
this.reportLogList(); this.reportLogList()
}, },
// 搜索 // 搜索
searchLog () { searchLog () {
this.qLog.pageNo = 1; this.qLog.pageNo = 1
this.reportLogList(); this.reportLogList()
}, },
// 报告列表 // 报告列表
reportLogList () { reportLogList () {
this.$api.report.reportLogList(this.qLog) this.$api.report.reportLogList(this.qLog)
.then(({ data }) => { .then(({ data }) => {
this.logTableData = data.records; this.logTableData = data.records
this.qLogTotal = data.total; this.qLogTotal = data.total
this.qLog.pageNo = data.current; this.qLog.pageNo = data.current
this.qLog.pageSize = data.size; this.qLog.pageSize = data.size
if (!data.records.length && this.qLog.pageNo !== 1) { if (!data.records.length && this.qLog.pageNo !== 1) {
this.qLog.pageNo = 1; this.qLog.pageNo = 1
this.reportLogList(); this.reportLogList()
} }
}) })
}, },
// 单页数据量 // 单页数据量
handleLogSizeChange (val) { handleLogSizeChange (val) {
this.qLog.pageSize = val; this.qLog.pageSize = val
this.qLog.pageNo = 1; this.qLog.pageNo = 1
this.reportLogList(); this.reportLogList()
}, },
// 第几页 // 第几页
handleLogCurrentChange (val) { handleLogCurrentChange (val) {
this.qLog.pageNo = val; this.qLog.pageNo = val
this.reportLogList(); this.reportLogList()
}, },
// 日期 // 日期
handleLogDate (val) { handleLogDate (val) {
if (val) { if (val) {
this.qLog.startDate = val[0]; this.qLog.startDate = val[0]
this.qLog.endDate = val[1]; this.qLog.endDate = val[1]
} else { } else {
this.qLog.startDate = ''; this.qLog.startDate = ''
this.qLog.endDate = ''; this.qLog.endDate = ''
} }
}, },
handleTyleChange (val) { handleTyleChange (val) {
this.qLog.doName = val.join(','); this.qLog.doName = val.join(',')
}, },
/* =============================================== 标签维护 =============================================== */ /* =============================================== 标签维护 =============================================== */
// 标签维护 新增 // 标签维护 新增
addTag (index, type) { addTag (index, type) {
if (this.tagsForm['tags0' + type].childList.length >= 20) { if (this.tagsForm['tags0' + type].childList.length >= 20) {
return this.$message.warning("最多添加20个标签"); return this.$message.warning('最多添加20个标签')
} }
let itemData = {name: '', id: "", parentId: this.tagsForm['tags0' + type].id, type: String(type)}; const itemData = { name: '', id: '', parentId: this.tagsForm['tags0' + type].id, type: String(type) }
this.tagsForm['tags0' + type].childList.splice(index + 1, 0, itemData); this.tagsForm['tags0' + type].childList.splice(index + 1, 0, itemData)
}, },
// 标签维护 删除 // 标签维护 删除
delTag (index, type) { delTag (index, type) {
let {id, status} = this.tagsForm['tags0' + type].childList[index]; const { id, status } = this.tagsForm['tags0' + type].childList[index]
if (status === '1') { if (status === '1') {
this.$confirm('此标签已应用于报告, 是否删除?', '提示', { this.$confirm('此标签已应用于报告, 是否删除?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
@@ -593,23 +594,23 @@ export default {
}).then(() => { }).then(() => {
if (id) { if (id) {
this.$api.report.labelDeleteId({ id }).then(_ => { this.$api.report.labelDeleteId({ id }).then(_ => {
this.$message.success('操作成功'); this.$message.success('操作成功')
this.labelList(); this.labelList()
}) })
} else { } else {
this.tagsForm['tags0' + type].childList.splice(index, 1); this.tagsForm['tags0' + type].childList.splice(index, 1)
this.$message.success('操作成功'); this.$message.success('操作成功')
} }
}) })
} else { } else {
if (id) { if (id) {
this.$api.report.labelDeleteId({ id }).then(_ => { this.$api.report.labelDeleteId({ id }).then(_ => {
this.$message.success('操作成功'); this.$message.success('操作成功')
this.labelList(); this.labelList()
}) })
} else { } else {
this.tagsForm['tags0' + type].childList.splice(index, 1); this.tagsForm['tags0' + type].childList.splice(index, 1)
this.$message.success('操作成功'); this.$message.success('操作成功')
} }
} }
}, },
@@ -620,7 +621,7 @@ export default {
moveType: 'up', moveType: 'up',
type: String(type) type: String(type)
}).then(_ => { }).then(_ => {
this.labelList(); this.labelList()
}) })
}, },
// 下移 // 下移
@@ -630,32 +631,32 @@ export default {
moveType: 'down', moveType: 'down',
type: String(type) type: String(type)
}).then(_ => { }).then(_ => {
this.labelList(); this.labelList()
}) })
}, },
// 标签维护 // 标签维护
openTags () { openTags () {
this.dialogTags = true; this.dialogTags = true
this.labelList(); this.labelList()
}, },
// 单个标签保存 // 单个标签保存
handleSaveTag (val, item, type) { handleSaveTag (val, item, type) {
if (val === '') { if (val === '') {
this.$message.warning('标签名称不能为空'); this.$message.warning('标签名称不能为空')
this.labelList(); this.labelList()
return; return
} }
if (val === '-') { if (val === '-') {
this.$message.warning('标签名称不能为-'); this.$message.warning('标签名称不能为-')
this.labelList(); this.labelList()
return; return
} }
if (this.tagsForm['tags0' + type].childList.filter(item => item.name === val).length > 1) { if (this.tagsForm['tags0' + type].childList.filter(item => item.name === val).length > 1) {
this.$message.warning('标签名称不能重复'); this.$message.warning('标签名称不能重复')
this.labelList(); this.labelList()
return; return
} }
let params = {name: val, parentId: this.tagsForm['tags0' + type].id, type: String(type), id: item.id || ''} const params = { name: val, parentId: this.tagsForm['tags0' + type].id, type: String(type), id: item.id || '' }
if (item.status === '1') { if (item.status === '1') {
this.$confirm('此标签已应用于报告, 是否编辑?', '提示', { this.$confirm('此标签已应用于报告, 是否编辑?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
@@ -663,56 +664,56 @@ export default {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
this.$api.report.labelAdd(params).then(_ => { this.$api.report.labelAdd(params).then(_ => {
this.$message.success('操作成功'); this.$message.success('操作成功')
this.labelList(); this.labelList()
}).catch(_ => { }).catch(_ => {
this.labelList(); this.labelList()
}) })
}).catch(_ => { }).catch(_ => {
this.labelList(); this.labelList()
}) })
} else { } else {
this.$api.report.labelAdd(params).then(_ => { this.$api.report.labelAdd(params).then(_ => {
this.$message.success('操作成功'); this.$message.success('操作成功')
this.labelList(); this.labelList()
}).catch(_ => { }).catch(_ => {
this.labelList(); this.labelList()
}) })
} }
}, },
// 单个顶级标签保存 // 单个顶级标签保存
handleSaveTopTag (val, type) { handleSaveTopTag (val, type) {
if (val === '') { if (val === '') {
this.$message.warning('标签名称不能为空'); this.$message.warning('标签名称不能为空')
this.labelList(); this.labelList()
return; return
} }
if (val === '-') { if (val === '-') {
this.$message.warning('标签名称不能为-'); this.$message.warning('标签名称不能为-')
this.labelList(); this.labelList()
return; return
} }
if (type === 1 && (val === this.tagsForm.tags02.name || val === this.tagsForm.tags03.name)) { if (type === 1 && (val === this.tagsForm.tags02.name || val === this.tagsForm.tags03.name)) {
this.$message.warning('标签名称不能重复'); this.$message.warning('标签名称不能重复')
this.labelList(); this.labelList()
return; return
} }
if (type === 2 && (val === this.tagsForm.tags01.name || val === this.tagsForm.tags03.name)) { if (type === 2 && (val === this.tagsForm.tags01.name || val === this.tagsForm.tags03.name)) {
this.$message.warning('标签名称不能重复'); this.$message.warning('标签名称不能重复')
this.labelList(); this.labelList()
return; return
} }
if (type === 3 && (val === this.tagsForm.tags01.name || val === this.tagsForm.tags02.name)) { if (type === 3 && (val === this.tagsForm.tags01.name || val === this.tagsForm.tags02.name)) {
this.$message.warning('标签名称不能重复'); this.$message.warning('标签名称不能重复')
this.labelList(); this.labelList()
return; return
} }
let params = {name: val, id: this.tagsForm['tags0' + type].id, parentId: '0', type: String(type)}; const params = { name: val, id: this.tagsForm['tags0' + type].id, parentId: '0', type: String(type) }
this.$api.report.labelAdd(params).then(_ => { this.$api.report.labelAdd(params).then(_ => {
this.$message.success('操作成功'); this.$message.success('操作成功')
this.labelList(); this.labelList()
}).catch(_ => { }).catch(_ => {
this.labelList(); this.labelList()
}) })
}, },
// 标签列表 // 标签列表
@@ -727,53 +728,52 @@ export default {
if (!data.labelThree.childList.length) { if (!data.labelThree.childList.length) {
data.labelThree.childList = [{ name: '', id: '', parentId: this.tagsForm.tags03.id, type: '3' }] data.labelThree.childList = [{ name: '', id: '', parentId: this.tagsForm.tags03.id, type: '3' }]
} }
this.tagsForm.tags01 = data.labelOne; this.tagsForm.tags01 = data.labelOne
this.tagsForm.tags02 = data.labelTwo; this.tagsForm.tags02 = data.labelTwo
this.tagsForm.tags03 = data.labelThree; this.tagsForm.tags03 = data.labelThree
}) })
}, },
handleTagsClose () { handleTagsClose () {
this.dialogTags = false; this.dialogTags = false
this.labelList(); this.labelList()
this.reset(); this.reset()
}, },
// 保存标签 // 保存标签
saveTags () { saveTags () {
let tagsForm = JSON.parse(JSON.stringify(this.tagsForm)); const tagsForm = JSON.parse(JSON.stringify(this.tagsForm))
let params = { const params = {
labelList: [ labelList: [
tagsForm.tags01, tagsForm.tags01,
tagsForm.tags02, tagsForm.tags02,
tagsForm.tags03 tagsForm.tags03
] ]
} }
let isSave = true; let isSave = true
params.labelList.forEach(item => { params.labelList.forEach(item => {
if (!item.name || item.name === '-') { if (!item.name || item.name === '-') {
isSave = false; isSave = false
return return
} }
item.childList.forEach(ele => { item.childList.forEach(ele => {
if (!ele.name || item.name === '-') { if (!ele.name || item.name === '-') {
isSave = false; isSave = false
return
} }
}) })
}) })
if (!isSave) { if (!isSave) {
return this.$message.warning('标签名称不能为空'); return this.$message.warning('标签名称不能为空')
} }
this.$api.report.labelSave(params).then(_ => { this.$api.report.labelSave(params).then(_ => {
this.$message.success('操作成功'); this.$message.success('操作成功')
this.dialogTags = false; this.dialogTags = false
this.labelList(); this.labelList()
this.reset(); this.reset()
}) })
}, },
/* =============================================== 报告上传 =============================================== */ /* =============================================== 报告上传 =============================================== */
// 打开报告上传 // 打开报告上传
openReportAdd () { openReportAdd () {
this.mode = 'add'; this.mode = 'add'
this.reportF = { this.reportF = {
name: '', // 报告名称 name: '', // 报告名称
keyContent: '', // 关键词 keyContent: '', // 关键词
@@ -788,122 +788,122 @@ export default {
labelTwoName: '', // 标签2 labelTwoName: '', // 标签2
labelThreeId: '', // 标签3 labelThreeId: '', // 标签3
labelThreeName: '', // 标签3 labelThreeName: '', // 标签3
reportUserIdList: [], // 权限 reportUserIdList: [] // 权限
}; }
this.labelOne = {}; this.labelOne = {}
this.labelTwo = {}; this.labelTwo = {}
this.labelThree = {}; this.labelThree = {}
this.labelList(); this.labelList()
this.dialogReport = true; this.dialogReport = true
}, },
// 选择标签 // 选择标签
handleSelectTag (val, type) { handleSelectTag (val, type) {
switch (type) { switch (type) {
case 1: case 1:
this.reportF.labelOneId = val.id; this.reportF.labelOneId = val.id
this.reportF.labelOneName = val.name; this.reportF.labelOneName = val.name
break; break
case 2: case 2:
this.reportF.labelTwoId = val.id; this.reportF.labelTwoId = val.id
this.reportF.labelTwoName = val.name; this.reportF.labelTwoName = val.name
break; break
case 3: case 3:
this.reportF.labelThreeId = val.id; this.reportF.labelThreeId = val.id
this.reportF.labelThreeName = val.name; this.reportF.labelThreeName = val.name
break; break
} }
}, },
// 必填项 // 必填项
checkReportF () { checkReportF () {
if (!this.reportF.name) { if (!this.reportF.name) {
return this.$message.warning('请检查报告名称') && false; return this.$message.warning('请检查报告名称') && false
} }
if (!this.reportF.fileId || !this.reportF.fileName) { if (!this.reportF.fileId || !this.reportF.fileName) {
return this.$message.warning('请检查上传文件') && false; return this.$message.warning('请检查上传文件') && false
} }
if (!this.reportF.year) { if (!this.reportF.year) {
return this.$message.warning('请检查报告年份') && false; return this.$message.warning('请检查报告年份') && false
} }
if (!this.reportF.labelOneId || !this.reportF.labelOneName || this.reportF.labelOneName === '-') { if (!this.reportF.labelOneId || !this.reportF.labelOneName || this.reportF.labelOneName === '-') {
return this.$message.warning(`请检查${this.tagsForm.tags01.name}`) && false; return this.$message.warning(`请检查${this.tagsForm.tags01.name}`) && false
} }
if (!this.reportF.labelTwoId || !this.reportF.labelTwoName || this.reportF.labelTwoName === '-') { if (!this.reportF.labelTwoId || !this.reportF.labelTwoName || this.reportF.labelTwoName === '-') {
return this.$message.warning(`请检查${this.tagsForm.tags02.name}`) && false; return this.$message.warning(`请检查${this.tagsForm.tags02.name}`) && false
} }
if (!this.reportF.labelThreeId || !this.reportF.labelThreeName || this.reportF.labelThreeName === '-') { if (!this.reportF.labelThreeId || !this.reportF.labelThreeName || this.reportF.labelThreeName === '-') {
return this.$message.warning(`请检查${this.tagsForm.tags03.name}`) && false; return this.$message.warning(`请检查${this.tagsForm.tags03.name}`) && false
} }
if (!this.reportF.reportUserIdList || !this.reportF.reportUserIdList.length) { if (!this.reportF.reportUserIdList || !this.reportF.reportUserIdList.length) {
return this.$message.warning('请检查权限') && false; return this.$message.warning('请检查权限') && false
} }
return true; return true
}, },
// 新增或编辑报告 // 新增或编辑报告
reportAdd () { reportAdd () {
if (!this.checkReportF()) return; if (!this.checkReportF()) return
this.$api.report.reportAdd(this.reportF).then(_ => { this.$api.report.reportAdd(this.reportF).then(_ => {
this.$message.success('操作成功'); this.$message.success('操作成功')
this.dialogReport = false; this.dialogReport = false
this.reset(); this.reset()
}) })
}, },
// 上传文件 // 上传文件
uploadFile (params) { uploadFile (params) {
let fd = new FormData(); const fd = new FormData()
fd.append('file', params.file); fd.append('file', params.file)
this.$api.report.reportUploadFile(fd).then(({ data }) => { this.$api.report.reportUploadFile(fd).then(({ data }) => {
this.reportF.fileName = data.name; this.reportF.fileName = data.name
this.reportF.fileId = data.key; this.reportF.fileId = data.key
}) })
}, },
// 上传文件前 // 上传文件前
beforeUploadFile (file) { beforeUploadFile (file) {
let realFileType = file.name.split('.')[file.name.split('.').length - 1]; const realFileType = file.name.split('.')[file.name.split('.').length - 1]
const isType = ( const isType = (
file.type === fileType.pdf || file.type === fileType.xls || file.type === fileType.xlsx || file.type === fileType.doc || file.type === fileType.docx || file.type === fileType.ppt || file.type === fileType.pptx file.type === fileType.pdf || file.type === fileType.xls || file.type === fileType.xlsx || file.type === fileType.doc || file.type === fileType.docx || file.type === fileType.ppt || file.type === fileType.pptx ||
|| realFileType === 'pdf' || realFileType === 'xls' || realFileType === 'xlsx' || realFileType === 'doc' || realFileType === 'docx' || realFileType === 'ppt' || realFileType === 'pptx' realFileType === 'pdf' || realFileType === 'xls' || realFileType === 'xlsx' || realFileType === 'doc' || realFileType === 'docx' || realFileType === 'ppt' || realFileType === 'pptx'
); )
const isSize = file.size / 1024 / 1024 < 200; const isSize = file.size / 1024 / 1024 < 200
if (!isType) { if (!isType) {
this.$message.error('仅能上传 pdf|xls|xlsx|doc|docx|ppt|pptx 格式文件'); this.$message.error('仅能上传 pdf|xls|xlsx|doc|docx|ppt|pptx 格式文件')
} }
if (!isSize) { if (!isSize) {
this.$message.error('您最大可上传200M文件'); this.$message.error('您最大可上传200M文件')
} }
return isType && isSize; return isType && isSize
}, },
// 重置 // 重置
resetUploadFile () { resetUploadFile () {
this.reportF.fileId = ''; this.reportF.fileId = ''
this.reportF.fileName = ''; this.reportF.fileName = ''
}, },
// 打开报告上传 // 打开报告上传
openReportModify (mode, row) { openReportModify (mode, row) {
this.mode = mode; this.mode = mode
this.labelList(); this.labelList()
let rowData = JSON.parse(JSON.stringify(row)); const rowData = JSON.parse(JSON.stringify(row))
if (rowData.labelOneName !== '-') { if (rowData.labelOneName !== '-') {
this.labelOne = {id: rowData.labelOneId, rowData: rowData.labelOneName}; this.labelOne = { id: rowData.labelOneId, rowData: rowData.labelOneName }
} else { } else {
this.labelOne = {}; this.labelOne = {}
} }
if (rowData.labelTwoName !== '-') { if (rowData.labelTwoName !== '-') {
this.labelTwo = {id: rowData.labelTwoId, name: rowData.labelTwoName}; this.labelTwo = { id: rowData.labelTwoId, name: rowData.labelTwoName }
} else { } else {
this.labelTwo = {}; this.labelTwo = {}
} }
if (rowData.labelThreeName !== '-') { if (rowData.labelThreeName !== '-') {
this.labelThree = {id: rowData.labelThreeId, name: rowData.labelThreeName}; this.labelThree = { id: rowData.labelThreeId, name: rowData.labelThreeName }
} else { } else {
this.labelThree = {}; this.labelThree = {}
} }
this.reportF = rowData; this.reportF = rowData
this.dialogReport = true; this.dialogReport = true
}, },
// 获取所有用户 // 获取所有用户
sysUserList () { sysUserList () {
this.$api.user.sysUserList({ pageNo: 1, pageSize: 999999 }).then(({ data }) => { this.$api.user.sysUserList({ pageNo: 1, pageSize: 999999 }).then(({ data }) => {
this.userList = data.records; this.userList = data.records
}) })
}, },
/* =============================================== 列表展示 =============================================== */ /* =============================================== 列表展示 =============================================== */
@@ -916,12 +916,12 @@ export default {
labelTwoId: [], labelTwoId: [],
labelThreeId: [], labelThreeId: [],
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10
}; }
this.total = 0; this.total = 0
this.tableData = []; this.tableData = []
this.reportList(); this.reportList()
this.reportDateList(); this.reportDateList()
}, },
// 报告删除 // 报告删除
reportDelete (ids) { reportDelete (ids) {
@@ -931,54 +931,54 @@ export default {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
this.$api.report.reportDelete({ ids }).then(_ => { this.$api.report.reportDelete({ ids }).then(_ => {
this.$message.success('操作成功'); this.$message.success('操作成功')
this.reportList(); this.reportList()
this.reportDateList(); this.reportDateList()
}) })
}) })
}, },
search () { search () {
this.q.pageNo = 1; this.q.pageNo = 1
this.reportList(); this.reportList()
}, },
// 列表 // 列表
reportList () { reportList () {
this.$api.report.reportList(this.q).then(({ data }) => { this.$api.report.reportList(this.q).then(({ data }) => {
this.tableData = data.records; this.tableData = data.records
this.total = data.total; this.total = data.total
this.q.pageNo = data.current; this.q.pageNo = data.current
this.q.pageSize = data.size; this.q.pageSize = data.size
if (!data.records.length && this.q.pageNo !== 1) { if (!data.records.length && this.q.pageNo !== 1) {
this.q.pageNo = 1; this.q.pageNo = 1
this.reportList(); this.reportList()
} }
}) })
}, },
// 日期列表 // 日期列表
reportDateList () { reportDateList () {
this.$api.report.reportDateList().then(({ data }) => { this.$api.report.reportDateList().then(({ data }) => {
this.yearList = data.list; this.yearList = data.list
}) })
}, },
// 单页数据量 // 单页数据量
handleSizeChange (val) { handleSizeChange (val) {
this.q.pageSize = val; this.q.pageSize = val
this.q.pageNo = 1; this.q.pageNo = 1
this.reportList(); this.reportList()
}, },
// 第几页 // 第几页
handleCurrentChange (val) { handleCurrentChange (val) {
this.q.pageNo = val; this.q.pageNo = val
this.reportList(); this.reportList()
}, },
// 预览 // 预览
previewRow (row) { previewRow (row) {
this.fullscreen = false; this.fullscreen = false
// 更新预览水印的时间戳 // 更新预览水印的时间戳
this.watermarkText = `${this.$store.state.userInfo.usname} ${formatDate(+new Date(), 'yyyy年MM月dd日 hh:mm:ss')}`; this.watermarkText = `${this.$store.state.userInfo.usname} ${formatDate(+new Date(), 'yyyy年MM月dd日 hh:mm:ss')}`
this.$api.report.reportGetReportHtmlId({ id: row.id }).then(({ data }) => { this.$api.report.reportGetReportHtmlId({ id: row.id }).then(({ data }) => {
this.content = data.content; this.content = data.content
this.dialogPreview = true; this.dialogPreview = true
}) })
}, },
// 下载 // 下载
@@ -989,13 +989,13 @@ export default {
// type: 'warning' // type: 'warning'
// }).then(() => { // }).then(() => {
this.$api.report.reportDownload({ fileId: row.fileId }).then(res => { this.$api.report.reportDownload({ fileId: row.fileId }).then(res => {
downloadFile(res); downloadFile(res)
}) })
// }) // })
}, }
}, },
created () { created () {
this.init(); this.init()
} }
} }
</script> </script>
@@ -0,0 +1,211 @@
<template>
<div class="box">
<el-divider content-position="left">指派信息</el-divider>
<el-form
ref="processForms"
:model="processForm"
:rules="processFormRules" label-width="230px"
class="label-input-form prc-content-border">
<el-row :gutter="24">
<el-col :span="24">
<el-form-item label="选择牵头人:" prop="personLiable" class="add-form-item"
:class="{'form-item-disabled': formdisableflag}">
<el-input :maxlength='100'
readonly
@click.native="handleDrafterName('xzqtr')"
v-model="processForm.personLiableName"
:disabled="formdisableflag"
placeholder="请选择牵头人"
clearable></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="24">
<el-form-item label="选择会签人员:" prop="countersign" class="add-form-item"
:class="{'form-item-disabled': formdisableflag}">
<el-input :maxlength='100'
readonly
@click.native="handleDrafterName('hqry')"
v-model="processForm.countersignName"
:disabled="formdisableflag"
placeholder="请选择会签人员"
clearable></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24" v-if="processNode.length > 0" v-for="item in processNode" :key="item.id"
>
<el-col :span="24">
<el-form-item :label="item.remark + ':'" prop="" class="add-form-item"
required :class="{'form-item-disabled': formdisableflag, 'add-form-item': true}">
<el-input :maxlength='100'
readonly
v-model="item.userName"
:disabled="true"
:placeholder="'请选择' + item.remark"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="24">
<el-form-item label="说明:" prop="" class="add-form-item"
:class="{'form-item-disabled': formdisableflag}">
<el-input :maxlength='1000'
type="textarea"
v-model="processForm.remarks"
:disabled="formdisableflag"
:autosize="{ minRows: 2, maxRows: 4}"
placeholder="请输入说明"
clearable></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<org-table :visible.sync="visibleOrgTable" title="人员列表" dialog-model :config="{
value: orgTableVal,
valueName: orgTableValName
}" :workNumFlag="true" :maxSelected="100" @confirm="isTreeOk">
</org-table>
</div>
</template>
<script>
export default {
name: "Assign",
props: {
processNode:{
required:true
},
personLiable:{
type:String
},
personLiableName:{
type:String
},
countersign:{},
countersignName:{},
remarks:{}
}
,
data(){
return {
formdisableflag:false,
visibleOrgTable:false,
processForm: {
personLiable: this.personLiable ||'',
personLiableName:this.personLiableName||'',
countersign:this.countersign||'',
countersignName:this.countersignName||''
},
processFormRules: {
procedureName: [
{required: true, type: 'string', message: '流程名称不能为空', trigger: 'change'},
],
personLiable:[
{required:true,message: '牵头人不能为空', trigger: 'change'}
],
countersign:[
{required:true,message: '会签人员不能为空', trigger: 'change'}
]
},
orgTableVal: '',
orgTableValName: '',
}
},
methods:{
handleDrafterName(val) {
// if (this.disabled) return false;
this.treeType = val;
this.orgTableVal = '';
this.orgTableValName = '';
this.sarTask = ''
this.len = 1
if(val==='cyqcdw'){
this.len=100
}
this.visibleOrgTable = true
},
isTreeOk(checkedList) {
// console.log(checkedList)
const parts = []
const partsName = []
const departmentName = []
let department=[]
let partsWorknum=[]
// const departments = []
// if (checkedList.length === 0) {
// this.$message({
// message: '请选择要分享的人!',
// type: 'warning'
// })
// }
checkedList.map((item, index) => {
parts.push(item.userId);
partsName.push(item.uname);
// if(!departments.includes(item.orgId) && item.orgId){
// departments.push(item.orgId)
// }
partsWorknum.push(item.account)
if(!departmentName.includes(item.orgName) && item.orgName){
departmentName.push(item.orgName)
department.push(item.orgId)
}
})
this.qcrList = checkedList
if (this.treeType == 'zrr') {
this.projectList.responsiblePerson =parts.toString()
this.projectList.responsiblePersonName= partsName.toString()
// // this.standardsFrom.drafter = parts.toString()
// this.budget.applicantOrgName = this.budget.applicantOrgName ? departmentName.toString() : departmentName.toString()
this.projectList.responsiblePersonWorkNum = partsWorknum.toString()
// // this.orgTableVal = this.standardsFrom.drafter
} else if (this.treeType == 'zrld') {
this.projectList.responsibleLeadership =parts.toString()
this.projectList.responsibleLeadershipName= partsName.toString()
this.projectList.responsibleLeadershipWorkNum = partsWorknum.toString()
} else if (this.treeType == 'bzzrr') {
this.projectList.standardizationResponsiblePerson =parts.toString()
this.projectList.standardizationResponsiblePersonName= partsName.toString()
this.projectList.standardizationResponsiblePersonWorkNum = partsWorknum.toString()
} else if (this.treeType == 'zyqcdw') {
this.projectList.mainDraftingUnit =department.toString()
this.projectList.mainDraftingUnitName= departmentName.toString()
}
else if (this.treeType == 'cyqcdw') {
this.projectList.unitsInvolvedInDrafting= department.toString()
this.projectList.unitsInvolvedInDraftingName= departmentName.toString()
}else if (this.treeType == 'qtr') {
this.projectList.leader =parts.toString()
this.projectList.leaderName= partsName.toString()
this.projectList.leaderWorkNum = partsWorknum.toString()
}
else if (this.treeType == 'xzqtr') {
this.processForm.personLiable =parts.toString()
this.processForm.personLiableName= partsName.toString()
this.processForm.personLiableWorkNum = partsWorknum.toString()
}
else if (this.treeType == 'hqry') {
this.processForm.countersign =parts.toString()
this.processForm.countersignName= partsName.toString()
}
},
}
}
</script>
<style scoped>
</style>
@@ -0,0 +1,448 @@
<template>
<div class="AuditOperationBox">
<el-form
ref="examineForm"
:model="examineForm"
:rules="examineFormRules"
class="label-input-form prc-content-border">
<el-row :gutter="24">
<el-col :span="24">
<el-form-item label="审批结果" prop="flag"
label-width="132px" class="add-form-item"
:class="{'form-item-disabled': formdisableflag}">
<el-radio-group :disabled="formdisableflag" v-model="examineForm.flag" style="margin-top: 8px">
<el-radio :label="'1'">同意</el-radio>
<el-radio :label="'2'">不同意</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="24">
<el-form-item :prop="!formdisableflag?'approvalOpinion':''" label-width="132px" class="add-form-item">
<template slot="label">审批意见</template>
<el-input :maxlength='1000'
v-model="examineForm.approvalOpinion"
placeholder="请输入审批意见"
:autosize="{ minRows: 2, maxRows: 4}"
type="textarea"
/>
</el-form-item>
</el-col>
</el-row>
<!-- <el-row :gutter="24">-->
<!-- <el-col :span="24">-->
<!-- <el-form-item label="附件" prop="entStandText" label-width="132px" class="add-form-item"-->
<!-- :class="{'form-item-disabled': formdisableflag}">-->
<!-- <el-button-->
<!-- size="small"-->
<!-- class="form-upload-btn"-->
<!-- icon="el-icon-upload"-->
<!-- @click="clickButtonToUpload('approvalFile')"-->
<!-- >-->
<!-- {{ examineForm.approvalFile === 'null' || examineForm.approvalFile === '' ||-->
<!-- examineForm.approvalFile == null ? '点击上传' : '查看已上传的文件' }}-->
<!-- </el-button>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
</el-form>
<el-drawer
title="责任部门"
:wrapperClosable="false"
:visible.sync="visible.visibleTree">
<div class="demo-drawer-content">
<dept-tree
v-if="visible.visibleTree"
deptSelect
allDept
check-enable
treeDivId="deptTreeOrg"
only-checked
:chkboxType="{ 'Y': '', 'N': '' }"
:editable="false"
:checkIdList="checkIdList"
orgType="DEPART"
ref="deptTreeOrg"
@treeOnCheck="handleEOCheck">
</dept-tree>
</div>
<div class="demo-drawer-footer">
<el-button size="small"
class="common-button-primary"
type="primary"
@click="handleTaskBreakDrawerConfirm">确定
</el-button>
<el-button
class="common-button-default"
size="small"
@click="handleTaskBreakDrawerCancel">取消
</el-button>
</div>
</el-drawer>
<el-drawer
title="指派人员"
:wrapperClosable="false"
:visible.sync="visible.visibleLLRTree"
@closed="onLLRTreeClosed">
<div class="demo-drawer-content">
<laws-tree
ref="manageTree"
:zNodes="manageZNodes"
treeDivId="manageTree"
:editable="false"
expandAll
onlyChecked
initExpand
check-enable
personCheck
:chkboxType="{ 'Y': '', 'N': '' }"
:check-id-list="manageId"
@treeOnCheck="dblClick"
></laws-tree>
</div>
<div class="demo-drawer-footer">
<el-button size="small"
class="common-button-primary"
type="primary"
@click="handleLLRTreeConfirm">确定
</el-button>
<el-button size="small"
class="common-button-default"
@click="handleLLRTreeCancel">取消
</el-button>
</div>
</el-drawer>
<upload ref="upload" :disabled="formdisableflag" :uploadPath="uploadPath" :title="'上传文件'" @uploadSuccess="uploadSuccess"/>
</div>
</template>
<script>
import upload from '@/components/upload/upload'
import {
getRoleAndUserByOrgId,
} from 'api/process'
import {mapGetters} from "vuex";
export default {
name: "AuditOperation",
props: ['query'],
components: {
upload
},
computed: {
...mapGetters(['userInfo']),
},
data() {
return {
examineForm: {
planReasonFile: '',
oldName:'',
flag: '1',
},
examineFormRules: {
oldName: [
{required: true, message: '添加指派不能为空', trigger: 'change'}
],
flag: [
{required: true, message: '审核结果不能为空', trigger: 'change'}
],
approvalOpinion: [
{type: 'string', max: 1000, message: '审批意见不能超过1000个字符', trigger: 'blur'}
],
},
formdisableflag: false,
uploadPath: 'api/att/attFile/upload',//上传文件的接口
uploadName: '', //当前表单对应的文件名称
isTaskReception: false, //是否显示指派人员以及确认任务
isDesignated: false, //是否显示指派人员
isInitiation: false, //是的显示指派部门
visible: {
visibleTree: false,
visibleLLRTree: false,
},
checkIdList: [],
LLRTreeChecked: [],
FGLLRRoleId: [],
manageZNodes: [],
manageId: [],
userList: [],
isApproval: false,
}
},
created() {
if (this.query) {
if (this.query.type == '1' ||
!this.query.taskDefinitionKey ||
this.query.taskDefinitionKey == 'null' ||
this.query.taskDefinitionKey == 'fqrxg' ||
this.query.taskDefinitionKey == 'bzfggcsfq' ||
this.query.taskDefinitionKey == 'bzfggcsfq-1' ||
this.query.taskDefinitionKey == 'bzfggcsfq-2' ||
this.query.taskDefinitionKey == 'bzfggcsfq-3') {
this.isInitiation = true
} else {
this.isInitiation = false
}
if (this.query.taskDefinitionKey == 'bzhskzshlc' ||
this.query.taskDefinitionKey == 'bzhskzsh-1' ||
this.query.taskDefinitionKey == 'bzhskzsh-2' ||
this.query.taskDefinitionKey == 'bzhskzsh-3' ||
this.query.taskDefinitionKey == 'bzhskzsh' ||
this.query.taskDefinitionKey == 'sjbskzsh' ||
this.query.taskDefinitionKey == 'cpfxzxkzsh' ||
this.query.taskDefinitionKey == 'bzhsszpz' ||
this.query.taskDefinitionKey == 'sjbsszpz' ||
this.query.taskDefinitionKey == 'cpfxzxkzpz') {
this.isApproval = true
} else {
this.isApproval = false
}
if (this.query.taskDefinitionKey == 'bzhsszqr' ||
this.query.taskDefinitionKey == 'sjbsszqr' ||
this.query.taskDefinitionKey == 'cpfxzxszqr') {
this.isTaskReception = true
} else {
this.isTaskReception = false
}
}
if (this.query.isViewDetails && this.query.isViewDetails == 1) {
this.examineForm = this.query
this.formdisableflag = true
if (this.isTaskReception && this.query.flag == '1'){
this.isDesignated = true
}
}
this.getRoleAndUserByOrgId()
},
methods: {
getData(data){
this.examineForm.oldName = data.oldName
this.examineForm.userName = data.userName
this.examineForm.orgId = data.orgId
this.examineForm.userId = data.userId
},
/** 上传文件的回调
* 获取接口中的数据进行反显
* */
clickButtonToUpload(current) {
this.$refs.upload.importModalshowflagtemp = true
this.uploadName = current
if (this.examineForm[current]) {
this.$http.get('att/attFile/getMultiFileInfos', {
fileIds: this.examineForm[current]
}, {
_this: this
}, res => {
this.$refs.upload.ids = []
res.data.map(item => {
item.name = item.oldFileName
this.$refs.upload.ids.push(item.id)
})
this.$refs.upload.defaultFileList = res.data || []
}, e => {
})
} else {
this.$refs.upload.defaultFileList = []
}
},
/** 上传文件的回调 */
uploadSuccess(data) {
/** 赋值给当前对应的表单文件 */
this.examineForm[this.uploadName] = data
this.examineForm = {...this.examineForm}
},
/** 审核时通过或不通过的事件;显示 */
flagchange(value) {
this.isDesignated = value == 1 ? true : false
if (this.isDesignated) {
/** 必填或者部必填 */
this.examineFormRules.userName = [
{required: true, message: '指派人员不能为空', trigger: 'change'}
]
} else {
this.examineFormRules.userName = [
{required: false, message: '指派人员不能为空', trigger: 'change'}
]
}
},
/** 在选择完责任部门点击确定的事件 */
handleTaskBreakDrawerConfirm() {
if (this.EOCheckList.length) {
this.handleQueryPersonByDept()
} else {
this.$message.warning('请选择责任部门')
}
},
/** 在选择完责任部门点击取消的事件 */
handleTaskBreakDrawerCancel() {
this.visible.visibleTree = false
this.EOCheckList = []
this.EOCheckId = []
},
/** 在选择完责任部门点击确定的事件
* 调用此方法获取到当前的选中数据的id;通过id去查找人员进行反显
* */
async handleQueryPersonByDept() {
const parts = []
const partsName = []
this.EOCheckList.map(item => {
parts.push(item.id)
if (item.oldname) {
partsName.push(item.oldname)
} else {
partsName.push(item.name)
}
})
this.examineForm.oldName = partsName.join(',')
this.examineForm.orgId = parts.join(',')
const orgIds = parts.join(',')
const res = await getRoleAndUserByOrgId({
orgId: orgIds,
pageNo: 1,
pageSize: 10000
})
const userId = []
const userName = []
/** 遍历截取所长和部长 */
let nodeUserInfoEOs = []
for (let i = 0; i < parts.length; i++) {
res.data.map(person => {
if (person.pOrgId === parts[i]) {
if (person.roleName.slice(person.roleName.length - 2, person.roleName.length) == '所长' ||
person.roleName.slice(person.roleName.length - 2, person.roleName.length) == '部长') {
console.log(person);
if (person.roleName == '标准化所所长') {
nodeUserInfoEOs.push({
"nodeId": "zijsglbbzqr", "parentFlow": "zcfgrklc", "userId": person.userId,
})
} else if (person.roleName == '产品分析中心所长') {
nodeUserInfoEOs.push({
"nodeId": "zicpfxzxszqr", "parentFlow": "zcfgrklc", "userId": person.userId,
})
} else if (person.roleName == '设计部所所长') {
nodeUserInfoEOs.push({
"nodeId": "zisjbsszqr", "parentFlow": "zcfgrklc", "userId": person.userId,
})
}
userId.push(person.userId)
userName.push(person.userName)
}
}
})
}
this.examineForm.userName = userName.join(',')
this.examineForm.userId = userId.join(',')
this.examineForm.nodeUserInfoEOs = nodeUserInfoEOs
this.examineForm = {...this.examineForm}
this.visible.visibleTree = false
},
/** 点击选择部门的弹框 */
handleVisibleDept(id) {
/** 如果有数据进行反显 */
this.checkIdList = id === undefined ? [] : id.split(',')
this.visible.visibleTree = true
},
/** 获取选中部门的数据 进行赋值*/
handleEOCheck(checkedList) {
this.EOCheckList = checkedList
},
/** 关闭指派人员的弹框*/
onLLRTreeClosed() {
this.LLRTreeChecked = []
},
/** 关闭指派人员的弹框*/
handleLLRTreeCancel() {
this.visible.visibleLLRTree = false
},
/** 在提交表单的校验 通过继续执行 */
submit() {
this.isSubmit = false
this.$refs['examineForm'].validate((valid) => {
if (valid) {
this.isSubmit = true
} else {
this.$message.warning('请检查表单是否填写正确')
}
})
},
/** 打开选择人员的弹框 */
handleVisiblePersonnel(id) {
/** 有数据时赋值 */
this.manageId = id === undefined ? [] : id.split(',')
this.visible.visibleLLRTree = true
},
/** 获取当前选中的人员的数据 */
dblClick(checkedList) {
this.userList = checkedList
},
/** 点击选择人员弹框的确认按钮 进行遍历选中数据反显表单*/
handleLLRTreeConfirm() {
if (this.userList.length > 0) {
let parts = []
let partsName = []
this.userList.map(item => {
parts.push(item.id)
if (item.oldname) {
partsName.push(item.oldname)
} else {
partsName.push(item.name)
}
})
this.examineForm.userName = partsName.join(',')
this.examineForm.userId = parts.join(',')
this.examineForm = {...this.examineForm}
this.visible.visibleLLRTree = false
} else {
this.$message.warning('请选择指派人员')
}
},
/** 通过当前登录人的orgId去获取这个部门下面的人员*/
getRoleAndUserByOrgId() {
getRoleAndUserByOrgId({
orgId: this.userInfo.orgId,
}).then(res => {
const manageIdList = []
const manageNameList = []
const zNodes = JSON.parse(JSON.stringify(res.data))
res.data.map(item => {
manageIdList.push(item.userId)
manageNameList.push(item.userName)
})
/** 重组数据*/
zNodes.map(item => {
item.name = item.userName
item.id = item.userId
item.icon = 'static/images/user.png'
item.iconSkin = 'org-user'
item.pId = item.orgId
})
this.manageZNodes = zNodes
})
},
},
}
</script>
<style scoped>
.AssignButton {
font-size: 18px;
}
.AssignButton:hover {
cursor: pointer;
}
</style>
@@ -0,0 +1,184 @@
<template>
<div class="reportTable">
<el-button type="primary" size="big">添加报告</el-button>
<el-button type="success" size="big" @click="deleteAll">批量删除</el-button>
<div class="table">
<vxe-table :data="processTable" :empty-render="{name: 'NotData'}" align="center" border stripe v-table-min-height="500"
ref="xTable" @checkbox-all="selectAllEvent" @checkbox-change="selectChangeEvent">
<vxe-column type="checkbox" width="60"></vxe-column>
<vxe-column show-overflow show-header-overflow field="labelOneName" :title="tagsForm.tags01.name"></vxe-column>
<vxe-column show-overflow show-header-overflow field="name" title="报告名称"></vxe-column>
<vxe-column show-overflow show-header-overflow field="labelTwoName" :title="tagsForm.tags02.name"></vxe-column>
<vxe-column show-overflow show-header-overflow field="labelThreeName" :title="tagsForm.tags03.name"></vxe-column>
<vxe-column show-overflow show-header-overflow field="year" title="报告年份"></vxe-column>
<vxe-column show-overflow show-header-overflow field="createDate" title="上传时间"></vxe-column>
<vxe-column show-overflow show-header-overflow title="操作" width="200" fixed="right">
<template #default="{ row }">
<el-button type="text" class="del-btn" @click="reportDelete(row.id)">删除</el-button>
<!-- <el-button type="text" @click="downloadRow(row)">下载</el-button>-->
</template>
</vxe-column>
</vxe-table>
<el-pagination
@size-change="handleLogSizeChange"
@current-change="handleLogCurrentChange"
:current-page="qLog.pageNo"
:page-sizes="[5, 10, 20]"
:page-size="qLog.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="total"/>
</div>
</div>
</template>
<script>
export default {
name: 'reportTable',
props: {
value: {
type: Array,
default: new Array([]),
required: true
}
},
data () {
return {
processTable: [],
total: 0,
qLog: {
pageSize: 10,
pageNo: 1
},
copyTableData: [],
checkIds: [],
tagsForm: {
tags01: {
name: '',
parentId: '0',
type: '1',
id: '',
childList: [
// {name: '无', type: '1', id: '', parentId: ''},
]
},
tags02: {
name: '',
parentId: '0',
type: '2',
id: '',
childList: [
// {name: '无', type: '2', id: '', parentId: ''},
]
},
tags03: {
name: '',
parentId: '0',
type: '3',
id: '',
childList: [
// {name: '无', type: '3', id: '', parentId: ''},
]
}
}
}
},
watch: {
value () {
this.total = this.value.length
this.processTable = this.value.slice(0, 9)
}
},
created () {
// this.copyTableData = JSON.parse(JSON.stringify(this.tableData))
this.labelList()
},
methods: {
pageChage (current) {
setTimeout(() => {
current = current || this.qLog.pageNo
this.qLog.pageNo = current
this.processTable = this.value.slice(this.qLog.pageSize * (current - 1), this.qLog.pageSize * current)
// console.log(this.pages.size, this.pages.size * (current - 1), this.pages.size * this.pages.current, this.list)
if (this.processTable.length < 1 && current > 1) {
this.pageChage(current - 1)
return false
}
})
this.total = this.value.length
},
handleLogSizeChange (val) {
this.qLog.pageSize = val
this.qLog.pageNo = 1
this.pageChage(1)
},
handleLogCurrentChange (val) {
this.qLog.pageSize = val
this.qLog.pageNo = 1
this.pageChage(1)
},
// 标签列表
labelList () {
this.$api.report.labelList().then(({ data }) => {
if (!data.labelOne.childList.length) {
data.labelOne.childList = [{ name: '', id: '', parentId: this.tagsForm.tags01.id, type: '1' }]
}
if (!data.labelTwo.childList.length) {
data.labelTwo.childList = [{ name: '', id: '', parentId: this.tagsForm.tags02.id, type: '2' }]
}
if (!data.labelThree.childList.length) {
data.labelThree.childList = [{ name: '', id: '', parentId: this.tagsForm.tags03.id, type: '3' }]
}
this.tagsForm.tags01 = data.labelOne
this.tagsForm.tags02 = data.labelTwo
this.tagsForm.tags03 = data.labelThree
})
},
selectAllEvent ({ checked }) {
const records = this.$refs.xTable.getCheckboxRecords()
this.checkIds = records.map(item => {
return item.id
})
},
selectChangeEvent ({ checked }) {
const records = this.$refs.xTable.getCheckboxRecords()
this.checkIds = records.map(item => {
return item.id
})
},
deleteAll () {
this.reportDelete(this.checkIds)
},
reportDelete (id) {
// 删除报告 假删除
if (typeof id === 'string') {
this.$confirm('此操作将删除所选数据, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$emit('updateTable', this.value.filter(item => item.id !== id))
})
} else {
if (Array.isArray(id)) {
this.$confirm('此操作将删除所选数据, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$emit('updateTable', this.value.filter(item => id.indexOf(item.id) === -1))
})
}
}
}
}
}
</script>
<style lang="scss" scoped>
.table{
margin-top: 10px;
}
.reportTable{
margin-bottom: 20px;
}
</style>
@@ -0,0 +1,97 @@
<template>
<div class="process">
<div class="process_box">
<process-header :title="'发起流程'"></process-header>
<div class="procedure">
<div class="content">
<span class="base_title">基础信息</span>
<el-row>
<report-table v-model="tableData" @updateTable="(newValue)=>{tableData=newValue}"> </report-table>
</el-row>
<el-row>
<el-form ref="form" :model="applicationForm" label-width="150px"
class="label-input-form" size="medium">
<el-row>
<el-col :span="9">
<el-form-item label="申请原因">
<el-input type="textarea" v-model="applicationForm.name"></el-input>
</el-form-item>
</el-col>
<el-col :span="9" :offset="6">
<el-form-item label="选择申请权限">
<el-select v-model="value" placeholder="请选择">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-row>
</div>
<div class="content">
<span class="base_title">指派信息</span>
<el-form ref="form" :model="assignForm" label-width="150px"
class="label-input-form" size="medium">
<el-row>
<el-col :span="9">
<el-form-item label="活动名称">
<el-input v-model="assignForm.name"></el-input>
</el-form-item>
</el-col>
<el-col :span="9" :offset="6">
<el-form-item label="活动名称">
<el-input v-model="assignForm.name"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
</div>
</div>
</div>
</template>
<script>
import processHeader from '@/components/ProcessHeader'
import reportTable from './components/reportTable'
export default {
name: 'launch',
components: {
processHeader,
reportTable
},
data () {
return {
assignForm: {},
tableData: [],
applicationForm: {},
q: {
pageSize: 10000,
pageNo: 1
}
}
},
created () {
this.reportList()
},
methods: {
// 获取表格列表 吧查询到的值传给子组件
reportList () {
this.$api.report.reportList(this.q).then(({ data }) => {
this.tableData = data.records
})
}
}
}
</script>
<style scoped>
</style>
+3 -2
View File
@@ -1,5 +1,6 @@
const webpack = require('webpack') const webpack = require('webpack')
module.exports = { module.exports = {
lintOnSave: false,
// publicPath: '/mi', // publicPath: '/mi',
outputDir: 'dist', // 运行时生成的生产环境构建文件的目录(默认''dist'',构建之前会被清除) outputDir: 'dist', // 运行时生成的生产环境构建文件的目录(默认''dist'',构建之前会被清除)
assetsDir: 'static', // 放置生成的静态资源(s、css、img、fonts)的(相对于 outputDir 的)目录(默认'') assetsDir: 'static', // 放置生成的静态资源(s、css、img、fonts)的(相对于 outputDir 的)目录(默认'')
@@ -12,12 +13,12 @@ module.exports = {
proxy: { proxy: {
// 配置跨域 // 配置跨域
'/api': { '/api': {
target: 'http://10.94.1.164:7060', // 服务器 target: 'http://localhost:7060', // 服务器
changeOrigin: true changeOrigin: true
}, },
// 请求静态图片配置项 // 请求静态图片配置项
'/api/home/pic': { '/api/home/pic': {
target: 'http://10.94.1.164:7061', // 图片请求的nginx网址 target: 'http://localhost:7061', // 图片请求的nginx网址
changeOrigin: true changeOrigin: true
} }