【修改】修改vuex的USID为usid 增加流程接口

This commit is contained in:
zhoulingpo
2023-04-24 15:54:41 +08:00
parent fea8f7893b
commit 7f675d424b
9 changed files with 86 additions and 66 deletions
+12
View File
@@ -0,0 +1,12 @@
import { instance as request } from '@/utils/request'
export default {
getReportLisy (data) {
return request({
url: '/api/report/addReportPage',
method: 'post',
data: data
})
},
}
+9
View File
@@ -99,5 +99,14 @@ export default {
})
},
// 停用流程发起
startProcess(data) {
return request({
url: '/api/startProcess',
method: 'post',
data: data
})
}
}
+3
View File
@@ -835,6 +835,9 @@ export default {
<style lang="scss" scoped>
.org-table {
::v-deep .el-form-item--mini .el-form-item__content{
line-height: 40px;
}
::v-deep .el-dialog__header {
padding: 0 20px;
height: 50px;
+8 -2
View File
@@ -89,9 +89,15 @@
})
},
// 所有流程的完成任务
completeProcess(dataJson,submitJson) {
this.$api.process.completeTask().then(res=>{
completeProcess(dataJson,submitJson,taskId,userId) {
this.$api.process.completeTask({
taskId:taskId,
userId:userId,
dataJson,
submitJson
}).then(res=>{
this.$message['success']('提交成功')
this.$router.back(-1)
})
},
// 获取流程详细信息
+1 -1
View File
@@ -2,7 +2,7 @@
import Esenum from './index.js'
// 权限申请
export const PERMISSION = new Esenum([
{ label: '预览', value: 0 },
{ label: '预览', value: 1 },
{ label: '预览+下载', value: 2 }
])
// 流程状态
+1 -1
View File
@@ -97,7 +97,7 @@
</el-row>
</div>
<el-row class="tag-btn">
<el-button type="primary" size="big" @click="permissionApp">权限申请</el-button>
<el-button @click="permissionApp">权限申请</el-button>
</el-row>
<div class="table">
<el-row>
@@ -9,37 +9,47 @@
<el-form
:model="searchForm "
inline
class="search-area search-new "
class="tag-search "
@keyup.enter.native="search">
<el-row :gutter="24">
<el-col :xl="8" :lg="8">
<el-form-item label="报告年份" class="search-item">
<el-select v-model="searchForm.year" multiple collapse-tags placeholder="请选择报告年份">
<template v-for="item in yearList">
<el-option :label="item" :value="item" :key="item"></el-option>
</template>
</el-select>
</el-form-item>
</el-col>
<el-col :xl="8" :lg="8" align="right" class="tag-btns">
<el-button type="primary" size="small" @click="search">查询</el-button>
<el-button type="default" size="small" @click="reset">重置</el-button>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="tag-item">
<label class="tag-title">关键词:</label>
<el-input v-model="searchForm.keyContent" placeholder="请输入关键词"></el-input>
</div>
</el-col>
<el-col :span="8">
<div class="tag-item">
<label class="tag-title">报告年份</label>
<el-select v-model="searchForm.year" multiple collapse-tags placeholder="请选择报告年份">
<template v-for="item in yearList">
<el-option :label="item" :value="item" :key="item"></el-option>
</template>
</el-select>
</div>
</el-col>
<el-col :span="8">
<div class="tag-item">
<label class="tag-title">报告名称:</label>
<el-input v-model="searchForm.name" placeholder="请输入报告名称"></el-input>
</div>
</el-col>
<el-col :span="24" align="right" class="tag-btns">
<el-button type="primary" @click="search">查询</el-button>
<el-button type="default" @click="reset">重置</el-button>
</el-col>
</el-row>
</el-form>
<div class="table">
<vxe-table :data="tableData" :empty-render="{name: 'NotData'}" align="center" border stripe max-height="100%"
<vxe-table :data="tableData" :empty-render="{name: 'NotData'}" align="center" border stripe height="520px"
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 field="createDate" title="涉密等级"></vxe-column>
<vxe-column show-overflow show-header-overflow field="createDate" title="隐私等级"></vxe-column>
</vxe-table>
<el-pagination
class="pagination"
@@ -71,7 +81,9 @@ export default {
pageNo: 1
},
searchForm: {
keyContent:null,
name:null,
year:null
},
checkIds: [],
dialogVisible: false,
@@ -82,10 +94,6 @@ export default {
}
},
props: {
// 获取标签
tagsForm: {
type: Object
},
// 获取已有的数据 在查询全部数据时不展示已有的
alreadyData: {
type: Array
@@ -126,29 +134,29 @@ export default {
this.dialogVisible = false
},
show () {
// 调取接口获取数据
this.reset()
this.ids = this.alreadyData.map(item => item.id)
this.reportDateList()
// 调取接口获取数据
this.reportList()
},
// 重置
reset () {
this.q = {
keyContent: '',
year: [],
labelOneId: [],
labelTwoId: [],
labelThreeId: [],
pageNo: 1,
pageSize: 10
}
this.searchForm={
keyContent: null,
year: null,
name:null
}
this.total = 0
this.tableData = []
this.reportList()
},
// 列表
reportList () {
this.$api.report.reportList({ ...this.q, ...this.searchForm }).then(({ data }) => {
this.$api.permissionProcess.getReportLisy({ ...this.q, ...this.searchForm,usid:this.$store.getters.userInfo.USID }).then(({ data }) => {
this.tableData = data.records
this.total = data.total
this.q.pageNo = data.current
@@ -223,7 +231,7 @@ export default {
::v-deep .el-date-picker,
::v-deep .el-input {
width: 240px;
width: 200px;
}
.tag-item {
@@ -241,16 +249,14 @@ export default {
font-weight: normal;
color: #646464;
display: inline-block;
width: 112px;
width: 80px;
height: 19px;
line-height: 19px;
padding-left: 48px;
border-right: 1px solid #BFBFBF;
margin-right: 10px;
margin-top: 2.5px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.tag-show {
@@ -104,11 +104,12 @@ export default {
},
created () {
// this.copyTableData = JSON.parse(JSON.stringify(this.tableData))
this.labelList()
},
methods: {
addReportList (list) {
this.$emit('updateTable', [...this.value , ...list])
this.$nextTick(()=>{
this.$emit('updateTable', [...this.value , ...list])
})
},
pageChage (current) {
this.total = this.value.length
@@ -132,23 +133,6 @@ export default {
this.qLog.pageNo = 1
this.pageChage(val)
},
// 标签列表
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 => {
@@ -69,7 +69,7 @@ export default {
this.$refs.form.validate((valid) => {
if (valid) {
let userId=this.form.assignee
let assignee=this.$store.getters.userInfo.USID
let assignee=this.$store.getters.userInfo.usid
this.$api.process.changeAssignee({
taskId:this.taskId.join(','),
assignee:assignee,