流程页面基本完成

This commit is contained in:
zhoulingpo
2023-04-17 17:03:58 +08:00
parent c8db1229dc
commit f87f00b2e7
10 changed files with 270 additions and 368 deletions
+17 -6
View File
@@ -1,9 +1,20 @@
import { instance as request } from '@/utils/request'
export function getUserOrgDept (data) {
return request({
url: '/api/sys/role/getUserAndOrg',
method: 'get',
params: data
})
export default {
getRoleAndUserByOrgIdPage (data) {
return request({
url: '/api/sys/user/list',
method: 'get',
params: data
})
},
// 获取审批历史
getHistory (data) {
return request({
url: '/api/lawss/activiti/get_list_by_instance',
method: 'get',
params: data
})
}
}
+1
View File
@@ -40,6 +40,7 @@
.el-form-item.el-input__inner,.el-form-item {
height: 40px;
line-height: 40px;
font-size: 15px;
}
.el-select{
width: 100%;
+157 -254
View File
@@ -9,15 +9,7 @@
:close-on-click-modal="false"
class="org-table"
@close="handleClose">
<el-tabs v-model="activeName" class="customElTabs hasLine" @tab-click="handleClick" v-if="isShowOrg">
<el-tab-pane label="人员" name="first">
</el-tab-pane>
<el-tab-pane label="部门" name="second" v-if="isShowOrg">
</el-tab-pane>
</el-tabs>
<template v-if="activeName=='first'">
<template >
<div class="search-area search-new">
<el-form
:model="searchForm"
@@ -116,7 +108,7 @@
<el-table-column v-if="maxSelected && maxSelected == 1" label="" width="55" align="center">
<template slot-scope="scope">
<el-radio class="tableRadio" v-model="tableChecked" @change="radioChange(scope.row)"
:label="scope.row.userId">{{ null }}
:label="scope.row.USID">{{ null }}
</el-radio>
</template>
</el-table-column>
@@ -138,7 +130,7 @@
<el-table-column
label="姓名"
width="120"
:prop="presets ? 'personName':'userName'"
:prop="presets ? 'personName':'USNAME'"
align="center"
show-overflow-tooltip>
</el-table-column>
@@ -193,8 +185,8 @@
size="medium"
closable
v-for="item in checkedList"
:key="item.usid || item.userId || item.id"
@close="handleRemove(item)">{{ item.uname || item.userName || item.name }}
:key="item.usid || item.USID || item.id"
@close="handleRemove(item)">{{ item.uname || item.USNAME || item.name }}
</el-tag>
<el-button
type="danger"
@@ -242,7 +234,7 @@
</template>
<script>
import {mapGetters} from 'vuex'
import { mapGetters } from 'vuex'
export default {
name: 'OrgTable',
@@ -346,23 +338,23 @@ export default {
type: String,
default: null
},
//preset 审定人员审查人员的接口
// preset 审定人员审查人员的接口
preset: {
type: Boolean,
default: false
},
//people 控制是审查还是审定
// people 控制是审查还是审定
showTable: {
type: String,
default: ''
},
//哪个流程的制修订
// 哪个流程的制修订
zy: {
type: Number,
default: 0
}
},
data() {
data () {
return {
activeName: 'first',
menuTreeLoading: false,
@@ -374,7 +366,7 @@ export default {
searchForm: {
orgId: '',
orgName: '',
userName: '',
USNAME: '',
uname: ''
},
tableData: [],
@@ -402,9 +394,9 @@ export default {
},
methods: {
// 查询二级菜单
selectMenu() {
let url = 'sys/org/getTree'
let parmas = {
selectMenu () {
const url = 'sys/org/getTree'
const parmas = {
// sorDivide: 'OUT',
// cancel: 0 // 作废 1 不作废 0
}
@@ -413,10 +405,10 @@ export default {
_this: this
}, res => {
this.menuTreeLoading = false
let treeNode = []
const treeNode = []
res.data.map((item, index) => {
let treeItem = {}
for (let key in item) {
const treeItem = {}
for (const key in item) {
if (key === 'orgName') {
treeItem.name = item[key]
} else {
@@ -425,84 +417,81 @@ export default {
}
treeNode[OrgTable] = treeItem
})
// console.log(treeNode)
// console.log(treeNode)
this.zNodesTree = treeNode
}, e => {
})
},
/** 获取选择体系的数据 进行赋值*/
handleEOCheck(checkedList) {
console.log(checkedList, "pooooooo")
/** 获取选择体系的数据 进行赋值 */
handleEOCheck (checkedList) {
console.log(checkedList, 'pooooooo')
// checkedList.children.forEach(item=>{
// item.check
// })
this.EOCheckList = checkedList
},
treeClick(treeNode, className) {
treeClick (treeNode, className) {
// console.log(treeNode)
if (this.lawsTree == 0 && className.indexOf('ico_docu') < 0) {
this.$message.warning('请选择节点!')
this.EOCheckList = ''
return false
}
console.log(className, "pppppiiiii")
console.log(className, 'pppppiiiii')
this.EOCheckList = [treeNode]
},
handleClick(tab) {
tab.name == 'first' ? this.getRoleAndUserByOrgIdPage() : this.selectMenu();
handleClick (tab) {
tab.name == 'first' ? this.getRoleAndUserByOrgIdPage() : this.selectMenu()
},
handleClose() {
handleClose () {
this.searchForm = {
orgId: '',
orgName: '',
userName: '',
USNAME: '',
uname: '',
roleId: '',
roleName: '',
roleName: ''
}
this.page = 1
this.checkedList = []
this.checkedIdList = []
this.$refs['orgTable'].clearSelection()
this.$refs.orgTable.clearSelection()
},
handleCancel() {
handleCancel () {
this.isVisible = false
},
getUser(ids) {
getUser (ids) {
this.$http.postData('sys/user/UserViewPage', {
pageSize: 1000,
orgIds: ids
}, {
_this: this,
loading: 'loadData'
},
res => {
if (res.ok) {
this.EOCheckList = res.data.list
let orgName = []
this.EOCheckList.forEach(item => {
if (orgName.indexOf(item.orgName) == -1) {
orgName.push(item.orgName)
pageSize: 1000,
orgIds: ids
}, {
_this: this,
loading: 'loadData'
},
res => {
if (res.ok) {
this.EOCheckList = res.data.list
const orgName = []
this.EOCheckList.forEach(item => {
if (orgName.indexOf(item.orgName) == -1) {
orgName.push(item.orgName)
} else {
// delete item['orgName']
}
item.uname = item.uname + '_' + item.account + '_' + (item.departmentName ? item.departmentName : item.orgName)
item.USNAME = item.USNAME + '_' + item.account + '_' + (item.departmentName ? item.departmentName : item.orgName)
})
console.log(this.EOCheckList)
// 重新整合数组
this.$emit('confirm', this.EOCheckList)
}
}, e => {
} else {
// delete item['orgName']
}
item.uname = item.uname + '_' + item.account + '_' + (item.departmentName ? item.departmentName : item.orgName)
item.userName = item.userName + '_' + item.account + '_' + (item.departmentName ? item.departmentName : item.orgName)
})
console.log(this.EOCheckList)
//重新整合数组
this.$emit('confirm', this.EOCheckList)
}
}, e => {
})
})
},
handleConfirm() {
handleConfirm () {
if (this.dialogModel) {
if (this.maxSelected && this.maxSelected > -1 && this.checkedList.length > this.maxSelected) {
this.$message.warning(this.maxSelectedTips || `${this.title} 只能选择一个用户`)
@@ -511,29 +500,27 @@ export default {
const checkedIdList = []
if (this.activeName == 'second') {
console.log(this.EOCheckList, "popopop")
let ids = []
console.log(this.EOCheckList, 'popopop')
const ids = []
this.EOCheckList.forEach(item => {
ids.push(item.id)
})
this.getUser(ids.join(','))
//如果是按照部门 就渲染
// 如果是按照部门 就渲染
} else {
this.checkedList.map(chkItem => {
checkedIdList.push(chkItem.usid || chkItem.userId || chkItem.id)
checkedIdList.push(chkItem.usid || chkItem.USID || chkItem.id)
console.log(chkItem.uname, chkItem)
if (chkItem.uname) {
chkItem.uname = chkItem.uname + '_' + chkItem.account
chkItem.userName = chkItem.userName + '_' + chkItem.account
chkItem.USNAME = chkItem.USNAME + '_' + chkItem.account
chkItem.orgName = chkItem.departmentName ? chkItem.departmentName : chkItem.orgName
} else if (!chkItem.uname && chkItem.userName) {
chkItem.uname = chkItem.userName
chkItem.userName = chkItem.userName
} else if (!chkItem.uname && chkItem.USNAME) {
chkItem.uname = chkItem.USNAME
chkItem.USNAME = chkItem.USNAME
}
})
this.$emit('confirm', this.checkedList, checkedIdList)
}
this.isVisible = false
}
@@ -548,8 +535,8 @@ export default {
this.$message.warning(`${this.config.attrName} 只能选择一个用户`)
} else {
const dataItem = this.checkedList[0]
this.checkedName = dataItem.uname || dataItem.userName || dataItem.orgName
const id = dataItem.id || dataItem.userId || dataItem.usid
this.checkedName = dataItem.uname || dataItem.USNAME || dataItem.orgName
const id = dataItem.id || dataItem.USID || dataItem.usid
this.$emit('input', id)
this.$emit('on-checked', this.checkedName)
this.$emit('on-dept', dataItem.pOrgId, dataItem.pOrgName)
@@ -561,34 +548,34 @@ export default {
}
},
handlePageChange(page) {
handlePageChange (page) {
this.page = page
this.getRoleAndUserByOrgIdPage()
},
handlePageSizeChange(pageSize) {
handlePageSizeChange (pageSize) {
this.pageSize = pageSize
this.getRoleAndUserByOrgIdPage()
},
handleSearch() {
handleSearch () {
this.page = 1
this.loading.searching = true
this.getRoleAndUserByOrgIdPage()
},
handleReset() {
handleReset () {
this.page = 1
this.searchForm = {
orgId: '',
orgName: '',
userName: '',
USNAME: '',
uname: ''
}
this.getRoleAndUserByOrgIdPage()
},
handleSearchOrgChecked(treeId, treeNode) {
handleSearchOrgChecked (treeId, treeNode) {
this.searchForm.orgId = treeNode.id
this.searchForm.orgName = treeNode.oldname || treeNode.name
$('#orgInput').click()
@@ -599,8 +586,8 @@ export default {
* @author: chenxiaoxi
* @time: 2021-03-21 14:40:59
*/
getOrg() {
this.$http.get('sys/org/getTree', {}, {_this: this},
getOrg () {
this.$http.get('sys/org/getTree', {}, { _this: this },
res => {
if (res.ok) {
res.data.map(item => {
@@ -618,9 +605,9 @@ export default {
* @author: chenxiaoxi
* @time: 2021-03-21 17:08:06
*/
getRoleAndUserByOrgIdPage(types) {
console.log(types, "types")
console.log(this.preset, "types")
getRoleAndUserByOrgIdPage (types) {
console.log(types, 'types')
console.log(this.preset, 'types')
if (!types) {
this.presets = this.preset
}
@@ -631,8 +618,8 @@ export default {
this.searchForm.orgId = this.orgId
}
}
let url = ''
let param = {
const url = ''
const param = {
page: this.page,
pageSize: this.pageSize,
...this.searchForm,
@@ -641,149 +628,66 @@ export default {
idList: this.idList.length > 0 ? this.idList.toString() : null,
disableFlag: 0
}
if (this.pageUrl == 'productItem') {
url = `newlaws/productItem/info/${this.pageId}/userPage`
} else if (this.sarTask) {
url = 'newlaws/sarTask/userPage/' + this.sarTask
} else if (this.presets && !types) {
url = 'perset/perset/selectUnamePage'
param = {
page: this.page,
pageSize: this.pageSize,
orgId: this.searchForm.orgId,
orgName: this.searchForm.orgName,
personName: this.searchForm.uname,
workNum: this.searchForm.workNum,
type: this.showTable == 'scry' ? '1' : '2',
zy: this.zy
}
} else {
url = 'sys/user/UserViewPage'
}
// let this.notUserId.length > 0 ? this.notUserId.toString() : null
// getRoleAndUserByOrgIdPage(
if (this.presets && !types) {
this.$http.postData(url, param, {
_this: this,
}, res => {
this.loading.loadData = false
this.loading.searching = false
if (res.ok) {
this.total = res.data.total
if (this.total == 0) {
this.presets = false
this.getRoleAndUserByOrgIdPage(true)
} else {
this.getOrg()
this.tableData = res.data.records
const checkedRow = []
this.tableData.map(dataItem => {
const id = dataItem.usid || dataItem.userId || dataItem.orgId || dataItem.personId
dataItem.userId = dataItem.personId
dataItem.userName = dataItem.personName
if (this.checkedIdList.includes(id)) {
checkedRow.push(dataItem)
}
})
this.checkedRow(checkedRow)
this.$api.user.sysUserList(param).then((res) => {
this.loading.loadData = false
this.loading.searching = false
if (res.ok) {
this.getOrg()
this.total = res.data.count
this.tableData = res.data.records
const checkedRow = []
this.tableData.map(dataItem => {
const id = dataItem.usid || dataItem.USID || dataItem.orgId || dataItem.id
if (this.checkedIdList.includes(id)) {
checkedRow.push(dataItem)
}
}
}, e => {
this.loading.loadData = false
this.loading.searching = false
})
} else if (this.sarTask) {
this.$http.get(url, param, {
_this: this,
}, res => {
this.loading.loadData = false
this.loading.searching = false
if (res.ok) {
this.getOrg()
this.total = res.data.count
this.tableData = this.pageUrl == 'productItem' ? res.data : res.data.list
const checkedRow = []
this.tableData.map(dataItem => {
const id = dataItem.usid || dataItem.userId || dataItem.orgId || dataItem.id
if (this.checkedIdList.includes(id)) {
checkedRow.push(dataItem)
}
})
this.checkedRow(checkedRow)
}
}, e => {
this.loading.loadData = false
this.loading.searching = false
})
} else {
this.$http.postData(url, param, {
_this: this,
}, res => {
this.loading.loadData = false
this.loading.searching = false
if (res.ok) {
this.getOrg()
this.total = res.data.count
this.tableData = this.pageUrl == 'productItem' ? res.data : res.data.list
const checkedRow = []
this.tableData.map(dataItem => {
const id = dataItem.usid || dataItem.userId || dataItem.orgId || dataItem.id
if (this.checkedIdList.includes(id)) {
checkedRow.push(dataItem)
}
})
this.checkedRow(checkedRow)
}
}, e => {
this.loading.loadData = false
this.loading.searching = false
})
}
})
this.checkedRow(checkedRow)
}
})
},
// handleRowSelect(selection, row) {
// const id = row.userId || row.id
// const id = row.USID || row.id
// // 当前行选中/取消选中,其他相同用户(角色不同)被选中/取消选中
// this.tableData.map(dataItem => {
// if (dataItem.userId === id || dataItem.id === id) {
// if (dataItem.USID === id || dataItem.id === id) {
// this.$refs['orgTable'].toggleRowSelection(dataItem, selection.includes(row))
// }
// })
// console.log(this.checkedList)
// },
radioChange(e) {
radioChange (e) {
// console.log(e)
this.checkedIdList = [];
this.checkedList = [];
this.checkedIdList.push(e.userId)
this.checkedList.push(e);
this.checkedIdList = []
this.checkedList = []
this.checkedIdList.push(e.USID)
this.checkedList.push(e)
},
selectionRow(selection, row) {
let selected = selection.length && selection.indexOf(row) !== -1; //为true时选中,为 0 时(false)未选中
selectionRow (selection, row) {
const selected = selection.length && selection.indexOf(row) !== -1 // 为true时选中,为 0 时(false)未选中
if (selected) {
selection.map(selItem => {
const id = selItem.userId
const id = selItem.USID
if (!this.checkedIdList.includes(id)) {
this.checkedIdList.push(id)
this.checkedList.push(row);
this.checkedList.push(row)
}
})
} else {
this.handleRemove(row, 'table')
}
},
selectionRowAll(selection) {
selectionRowAll (selection) {
if (selection.length > 0) {
selection.map(selItem => {
const id = selItem.userId
const id = selItem.USID
if (!this.checkedIdList.includes(id)) {
this.checkedIdList.push(id)
this.checkedList.push(selItem);
this.checkedList.push(selItem)
}
})
} else {
@@ -793,10 +697,10 @@ export default {
}
},
handleSelectionChange(selection) {
handleSelectionChange (selection) {
if (selection.length) {
selection.map(selItem => {
const id = selItem.usid || selItem.userId || selItem.orgId || selItem.id
const id = selItem.usid || selItem.USID || selItem.orgId || selItem.id
// 如果exclude不含当前行
if (!this.excludeIdList.includes(id)) {
// 如果下面列表没有,就填到下面列表里
@@ -815,12 +719,12 @@ export default {
}
},
handleRemove(user, type) {
handleRemove (user, type) {
let delIndex = -1
this.checkedList.map((checkedItem, chkIndex) => {
if (user.userId === checkedItem.userId) {
if (user.USID === checkedItem.USID) {
delIndex = chkIndex
if (type !== "table") {
if (type !== 'table') {
this.checkedRow([checkedItem])
}
return false
@@ -830,7 +734,7 @@ export default {
this.checkedIdList.splice(delIndex, 1)
},
handleOrgDel() {
handleOrgDel () {
this.searchForm.orgId = ''
this.searchForm.orgName = ''
},
@@ -840,41 +744,41 @@ export default {
* @author: chenxiaoxi
* @time: 2021-03-22 10:06:03
*/
checkedRow(rows) {
checkedRow (rows) {
this.$nextTick(() => {
if (rows.length) {
rows.forEach(row => {
/*双重for循环,为了解决,第二次点击弹框得时候,删除已选择里面得人员,表格勾选没有取消问题*/
/* 双重for循环,为了解决,第二次点击弹框得时候,删除已选择里面得人员,表格勾选没有取消问题 */
for (let i = 0; i < this.tableData.length; i++) {
if (this.tableData[i].userId == row.userId) {
if (this.tableData[i].USID == row.USID) {
// console.log(this.tableData[i], '666')
this.$refs['orgTable'] && this.$refs['orgTable'].toggleRowSelection(this.tableData[i])
this.$refs.orgTable && this.$refs.orgTable.toggleRowSelection(this.tableData[i])
}
}
});
})
} else {
this.$refs['orgTable'] && this.$refs['orgTable'].clearSelection()
this.$refs.orgTable && this.$refs.orgTable.clearSelection()
}
})
},
cellClassName({row, column, rowIndex, columnIndex}) {
cellClassName ({ row, column, rowIndex, columnIndex }) {
if (columnIndex === 3) {
return 'tag-column'
}
},
isSelectable(row, index) {
return !this.excludeIdList.includes(row.userId)
isSelectable (row, index) {
return !this.excludeIdList.includes(row.USID)
},
handleChooseByDialog() {
handleChooseByDialog () {
if (!this.dialogModel) {
this.checkedName = this.config.valueName || ''
if (this.config.value) {
this.checkedList = [{
userId: this.config.value,
userName: this.config.valueName
USID: this.config.value,
USNAME: this.config.valueName
}]
}
const idList = this.config.value === '' || !this.config.value ? [] : this.config.value.split(',')
@@ -884,17 +788,17 @@ export default {
this.getRoleAndUserByOrgIdPage()
},
handleMouseEnter() {
handleMouseEnter () {
if (this.searchForm.orgName !== '') {
this.visibleOrgClearBtn = true
}
},
handleMouseLeave() {
handleMouseLeave () {
this.visibleOrgClearBtn = false
},
handleCleanChecked() {
handleCleanChecked () {
this.$confirm('您是否确定移除全部已选中', '确定移除', {
confirmButtonText: '确定',
cancelButtonText: '取消',
@@ -904,45 +808,45 @@ export default {
}).then(() => {
this.checkedList = []
this.checkedIdList = []
this.$refs['orgTable'].clearSelection()
this.$refs.orgTable.clearSelection()
}).catch(e => {
})
}
},
computed: {
configContent() {
configContent () {
return this.userInfo.configContent
},
placeholder() {
placeholder () {
return !this.dialogModel && `请选择${this.config.attrName}`
},
showMessage() {
showMessage () {
return !this.dialogModel && `${this.config.attrName}不能为空`
},
isRequired() {
isRequired () {
return !this.dialogModel && !!this.config.isMust
},
isString(str) {
isString (str) {
return (typeof str === 'string') && str.constructor === String
},
isFO() {
isFO () {
return !this.dialogModel && this.config.attrField === 'FO'
},
ZRBM() {
return this.dataModel['ZRBM'] || ''
ZRBM () {
return this.dataModel.ZRBM || ''
},
showTitle() {
showTitle () {
return this.dialogModel ? this.title : this.config.attrName
},
excludeIdList() {
excludeIdList () {
return this.excludeUser && this.excludeUser !== '' ? (this.excludeUser instanceof Array ? this.excludeUser : this.excludeUser.split(',')) : []
},
...mapGetters(['userInfo'])
},
watch: {
visible(val) {
visible (val) {
this.isVisible = val
this.tableChecked = null
if (this.maxSelected === 1) {
@@ -955,8 +859,8 @@ export default {
if (this.config.value && this.config.value !== '') {
let idListDepartment = []
let nameListDepartment = []
let idRoleList = [];
let nameRoleList = [];
let idRoleList = []
let nameRoleList = []
const idList = this.config.value instanceof Array ? this.config.value : (this.config.value === '' ? [] : this.config.value.split(','))
const nameList = this.config.valueName instanceof Array ? this.config.valueName.split(',') : (this.config.valueName === '' ? [] : this.config.valueName.split(','))
if (this.config.valueDepartment) {
@@ -973,18 +877,18 @@ export default {
const checkedList = []
idList.map((id, index) => {
checkedList.push({
userId: id,
userName: nameList[OrgTable],
USID: id,
USNAME: nameList[OrgTable],
orgId: idListDepartment[OrgTable],
orgName: nameListDepartment[OrgTable],
roleId: idRoleList[OrgTable],
roleName: nameRoleList[OrgTable],
roleName: nameRoleList[OrgTable]
})
})
if (this.maxSelected == 1) {
// debugger
this.tableChecked = this.config.value;
this.tableChecked = this.config.value
this.isShowOrg = false
}
// console.log(checkedList, 'checkedList', 'idListDepartment===', idListDepartment, 'nameListDepartment===', nameListDepartment)
@@ -1001,27 +905,26 @@ export default {
this.selectMenu()
}
},
isVisible(val) {
isVisible (val) {
this.$emit('update:visible', val)
},
value(newVal, oldVal) {
value (newVal, oldVal) {
this.checkedName = newVal !== '' ? this.checkedName : ''
},
deptZNodes: {
handler(val) {
handler (val) {
this.orgZNodes = val
}
}
},
mounted() {
mounted () {
this.isVisible = this.visible
if (!this.dialogModel) {
this.checkedName = this.config.valueName || ''
if (this.config.value !== '') {
this.checkedList = [{
userId: this.config.value,
userName: this.config.valueName
USID: this.config.value,
USNAME: this.config.valueName
}]
const idList = this.config.value === '' ? [] : this.config.value.split(',')
this.checkedIdList = [...idList]
@@ -1033,8 +936,8 @@ export default {
const checkedList = []
idList.map((id, index) => {
checkedList.push({
userId: id,
userName: nameList[OrgTable]
USID: id,
USNAME: nameList[OrgTable]
})
})
this.checkedList = checkedList
+4 -38
View File
@@ -105,6 +105,7 @@
</template>
<script>
export default {
name: 'approvalHistory',
props: ['query'],
@@ -144,49 +145,14 @@ export default {
}
},
getListByInstance (form) {
this.$http.get('lawss/activiti/get_list_by_instance', {
this.$api.process.getHistory({
prcNum: this.query.prcNum,
...form
}, {
_this: this,
loading: 'loading'
}, res => {
}).then(res => {
this.standTableList = res
}, e => {
})
},
lookFile (approvalFile) {
this.importModalshowflagtemp = true
this.clickButtonToUpload(approvalFile)
},
fileDown (id) {
window.location.href = '/api/att/attFile/downloadFile?fileId=' + id
// this.$http.get('att/attFile/downloadFile', {
// fileId: id
// }, {
// _this: this
// }, res => {
//
// }, e => {
// })
},
clickButtonToUpload (current) {
if (current) {
this.$http.get('att/attFile/getMultiFileInfos', {
fileIds: current
}, {
_this: this
}, res => {
res.data.map(item => {
item.name = item.oldFileName
})
this.defaultFileList = res.data || []
}, e => {
})
} else {
this.defaultFileList = []
}
}
}
}
</script>
+37 -51
View File
@@ -91,7 +91,7 @@
@select-all="selectionRowAll">
<el-table-column v-if="maxSelected && maxSelected == 1" label="" width="55" align="center">
<template slot-scope="scope">
<el-radio class="tableRadio" v-model="tableChecked" @change="radioChange(scope.row)" :label="scope.row.userId">{{null}}</el-radio>
<el-radio class="tableRadio" v-model="tableChecked" @change="radioChange(scope.row)" :label="scope.row.USID">{{null}}</el-radio>
</template>
</el-table-column>
<el-table-column
@@ -104,24 +104,24 @@
<el-table-column
label="姓名"
width="120"
prop="userName"
prop="USNAME"
align="center">
</el-table-column>
<el-table-column
v-if="workNumFlag"
label="工号"
width="120"
prop="workNum"
prop="ACCOUNT"
align="center">
</el-table-column>
<el-table-column
prop="email"
prop="EMAIL"
label="邮箱"
align="center"
show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="roleNames"
prop="ROLENAME"
label="角色"
align="center">
<!-- <template slot-scope="scope">-->
@@ -136,7 +136,7 @@
<el-table-column
label="部门"
align="center">
<template #default="{ row }">{{ row.departmentName || row.departName || row.orgName }}</template>
<template #default="{ row }">{{ row.DEPARTMENT }}</template>
</el-table-column>
</el-table>
</div>
@@ -155,8 +155,8 @@
size="medium"
closable
v-for="item in checkedList"
:key="item.usid || item.userId || item.id"
@close="handleRemove(item)">{{ item.uname || item.userName || item.name }}</el-tag>
:key="item.usid || item.USID || item.id"
@close="handleRemove(item)">{{ item.uname || item.USNAME || item.name }}</el-tag>
<el-button
type="danger"
size="mini"
@@ -282,14 +282,14 @@ export default {
searchForm: {
orgId: '',
orgName: '',
userName: '',
USNAME: '',
uname: ''
},
tableData: [],
tableChecked: null,
tableDataSelectedList: [],
page: 1,
pageSize: this.configContent,
pageSize: 10,
total: 0,
checkedList: [],
loading: {
@@ -312,7 +312,7 @@ export default {
this.searchForm = {
orgId: '',
orgName: '',
userName: '',
USNAME: '',
uname: ''
}
this.page = 1
@@ -332,7 +332,7 @@ export default {
} else {
const checkedIdList = []
this.checkedList.map(chkItem => {
checkedIdList.push(chkItem.usid || chkItem.userId || chkItem.id)
checkedIdList.push(chkItem.usid || chkItem.USID || chkItem.id)
})
this.$emit('confirm', this.checkedList, checkedIdList)
this.isVisible = false
@@ -348,8 +348,8 @@ export default {
this.$message.warning(`${this.config.attrName} 只能选择一个用户`)
} else {
const dataItem = this.checkedList[0]
this.checkedName = dataItem.uname || dataItem.userName || dataItem.orgName
const id = dataItem.id || dataItem.userId || dataItem.usid
this.checkedName = dataItem.uname || dataItem.USNAME || dataItem.orgName
const id = dataItem.id || dataItem.USID || dataItem.usid
this.$emit('input', id)
this.$emit('on-checked', this.checkedName)
this.$emit('on-dept', dataItem.pOrgId, dataItem.pOrgName)
@@ -382,7 +382,7 @@ export default {
this.searchForm = {
orgId: '',
orgName: '',
userName: '',
USNAME: '',
uname: ''
}
this.getRoleAndUserByOrgIdPage()
@@ -399,18 +399,6 @@ export default {
* @author: chenxiaoxi
* @time: 2021-03-21 14:40:59
*/
getOrg () {
this.$http.get('sys/org/getTree', {}, { _this: this },
res => {
if (res.ok) {
res.data.map(item => {
item.name = item.orgName
item.icon = 'static/images/dept.png'
})
this.orgZNodes = res.data
}
}, e => {})
},
/**
* @description: 分页查询用户
@@ -426,21 +414,19 @@ export default {
}
this.$api.process.getRoleAndUserByOrgIdPage({
page: this.page,
pageNo: this.page,
pageSize: this.pageSize,
...this.searchForm,
roleName: this.roleName,
notUserId: JSON.parse(localStorage.getItem('userInfo')).userId
...this.searchForm
}).then(res => {
this.loading.loadData = false
this.loading.searching = false
if (res.ok) {
this.total = res.data.count
this.tableData = res.data.list
this.total = res.data.total
this.tableData = res.data.records
const checkedRow = []
this.tableData.map(dataItem => {
const id = dataItem.usid || dataItem.userId || dataItem.orgId || dataItem.id
const id = dataItem.usid || dataItem.USID || dataItem.orgId || dataItem.id
if (this.checkedIdList.includes(id)) {
checkedRow.push(dataItem)
}
@@ -454,10 +440,10 @@ export default {
},
// handleRowSelect(selection, row) {
// const id = row.userId || row.id
// const id = row.USID || row.id
// // 当前行选中/取消选中,其他相同用户(角色不同)被选中/取消选中
// this.tableData.map(dataItem => {
// if (dataItem.userId === id || dataItem.id === id) {
// if (dataItem.USID === id || dataItem.id === id) {
// this.$refs['orgTable'].toggleRowSelection(dataItem, selection.includes(row))
// }
// })
@@ -467,14 +453,14 @@ export default {
// console.log(e)
this.checkedIdList = []
this.checkedList = []
this.checkedIdList.push(e.userId)
this.checkedIdList.push(e.USID)
this.checkedList.push(e)
},
selectionRow (selection, row) {
const selected = selection.length && selection.indexOf(row) !== -1 // 为true时选中,为 0 时(false)未选中
if (selected) {
selection.map(selItem => {
const id = selItem.userId
const id = selItem.USID
if (!this.checkedIdList.includes(id)) {
this.checkedIdList.push(id)
this.checkedList.push(row)
@@ -487,7 +473,7 @@ export default {
selectionRowAll (selection) {
if (selection.length > 0) {
selection.map(selItem => {
const id = selItem.userId
const id = selItem.USID
if (!this.checkedIdList.includes(id)) {
this.checkedIdList.push(id)
this.checkedList.push(selItem)
@@ -503,7 +489,7 @@ export default {
handleSelectionChange (selection) {
if (selection.length) {
selection.map(selItem => {
const id = selItem.usid || selItem.userId || selItem.orgId || selItem.id
const id = selItem.usid || selItem.USID || selItem.orgId || selItem.id
// 如果exclude不含当前行
if (!this.excludeIdList.includes(id)) {
// 如果下面列表没有,就填到下面列表里
@@ -525,7 +511,7 @@ export default {
handleRemove (user, type) {
let delIndex = -1
this.checkedList.map((checkedItem, chkIndex) => {
if (user.userId === checkedItem.userId) {
if (user.USID === checkedItem.USID) {
delIndex = chkIndex
if (type !== 'table') {
this.checkedRow([checkedItem])
@@ -566,7 +552,7 @@ export default {
},
isSelectable (row, index) {
return !this.excludeIdList.includes(row.userId)
return !this.excludeIdList.includes(row.USID)
},
handleChooseByDialog () {
@@ -574,8 +560,8 @@ export default {
this.checkedName = this.config.valueName || ''
if (this.config.value) {
this.checkedList = [{
userId: this.config.value,
userName: this.config.valueName
USID: this.config.value,
USNAME: this.config.valueName
}]
}
const idList = this.config.value === '' || !this.config.value ? [] : this.config.value.split(',')
@@ -658,8 +644,8 @@ export default {
const checkedList = []
idList.map((id, index) => {
checkedList.push({
userId: id,
userName: nameList[index],
USID: id,
USNAME: nameList[index],
orgId: idListDepartment[index],
orgName: nameListDepartment[index]
})
@@ -697,8 +683,8 @@ export default {
this.checkedName = this.config.valueName || ''
if (this.config.value !== '') {
this.checkedList = [{
userId: this.config.value,
userName: this.config.valueName
USID: this.config.value,
USNAME: this.config.valueName
}]
const idList = this.config.value === '' ? [] : this.config.value.split(',')
this.checkedIdList = [...idList]
@@ -710,14 +696,14 @@ export default {
const checkedList = []
idList.map((id, index) => {
checkedList.push({
userId: id,
userName: nameList[index]
USID: id,
USNAME: nameList[index]
})
})
this.checkedList = checkedList
}
this.getOrg()
// this.getOrg()
// this.getRoleAndUserByOrgIdPage()
}
}
+1 -1
View File
@@ -3,7 +3,7 @@
<div>
<div class="prc-header-wrap">
<div class="processtitle">{{title}}</div>
<div class="processnum" v-if="proceesNum">流程编号:xcsdsds{{proceesNum}}</div>
<div class="processnum" v-if="proceesNum">流程编号:{{proceesNum}}</div>
</div>
</div>
</template>
@@ -4,10 +4,11 @@
ref="examineForm"
:model="examineForm"
:rules="examineFormRules"
size="medium"
class="label-input-form prc-content-border">
<el-row :gutter="24">
<el-col :span="9">
<el-form-item label="选择赋权时间" prop="date"
<el-form-item label="选择赋权时间:" prop="date"
label-width="132px" class="add-form-item"
:class="{'form-item-disabled': formdisableflag}">
<el-date-picker
@@ -20,7 +21,7 @@
</el-row>
<el-row :gutter="24">
<el-col :span="24">
<el-form-item label="审批结果" prop="flag"
<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" >
@@ -33,7 +34,7 @@
<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>
<template slot="label">审批意见:</template>
<el-input :maxlength='1000'
v-model="examineForm.approvalOpinion"
placeholder="请输入审批意见"
@@ -78,6 +79,9 @@ export default {
flag: '1'
},
examineFormRules: {
date: [
{ required: true, message: '选择赋权时间不能为空', trigger: 'change' }
],
oldName: [
{ required: true, message: '添加指派不能为空', trigger: 'change' }
],
@@ -1,7 +1,7 @@
<template>
<div class="reportTable">
<el-button type="primary" size="big">添加报告</el-button>
<el-button type="success" size="big" @click="deleteAll">批量删除</el-button>
<el-button v-if="!disabled" type="primary" size="big">添加报告</el-button>
<el-button v-if="!disabled" 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">
@@ -12,7 +12,7 @@
<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">
<vxe-column show-overflow show-header-overflow title="操作" width="200" fixed="right" v-if="!disabled">
<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>-->
@@ -39,6 +39,10 @@ export default {
type: Array,
default: new Array([]),
required: true
},
disabled: {
type: Boolean,
default: false
}
},
data () {
+37 -10
View File
@@ -2,12 +2,12 @@
<!-- 此页面主要展示审核和已完成-->
<div class="process">
<div class="process_box">
<process-header :title="'发起流程'"></process-header>
<process-header :title="'权限审批'" :proceesNum="'proceesNum'"></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>
<report-table v-model="tableData" @updateTable="(newValue)=>{tableData=newValue}" :disabled="formControl"></report-table>
</el-row>
<el-row>
<el-form ref="form" :model="applicationForm" label-width="150px"
@@ -16,12 +16,12 @@
<el-row>
<el-col :span="9">
<el-form-item label="申请原因:" prop="name">
<el-input type="textarea" v-model="applicationForm.name"></el-input>
<el-input type="textarea" v-model="applicationForm.name" placeholder="请输入申请原因"></el-input>
</el-form-item>
</el-col>
<el-col :span="9" :offset="6">
<el-form-item label="选择申请权限:" prop="send">
<el-select v-model="applicationForm.send" placeholder="">
<el-select v-model="applicationForm.send" placeholder="请选择申请权限">
<el-option
v-for="item in PERMISSION"
:key="item.value"
@@ -50,9 +50,16 @@
:show-submit="isShowSubmit"
:submitLoading="isSubmit"
:TransferLoading="tranLoading"
@reset="handleReset"
@transfer="handleTransfer"
@submit="handleSubmit"
></process-footer>
<process-choose-tree
dialog-model
:visible.sync="visibleTree"
:maxSelected="100"
:config="{value: '',valueName:''}"
@confirm="handleDblClick"
></process-choose-tree>
</div>
</div>
</template>
@@ -60,6 +67,7 @@
<script>
import processHeader from '@/components/ProcessHeader'
import processFooter from '@/components/ProcessFooter'
import processChooseTree from '../../components/ProcessChooseTree'
import processApprovalHistory from '@/components/ProcessApprovalHistory'
import auditOperation from './components/AuditOperation'
import reportTable from './components/reportTable'
@@ -72,15 +80,17 @@ export default {
reportTable,
processFooter,
processApprovalHistory,
auditOperation
auditOperation,
processChooseTree
},
data () {
return {
visibleTree: false,
isSubmit: false,
tranLoading: false,
isShowTran: true,
isShowSubmit: true,
formControl: false,
formControl: true,
assignForm: {},
tableData: [],
applicationForm: {},
@@ -126,9 +136,26 @@ export default {
this.tableData = data.records
})
},
handleReset () {
this.applicationForm = {}
this.assignForm = {}
// 转办
handleTransfer () {
this.visibleTree = true
},
// 选择转办
handleDblClick (treeNode) {
// changeAssigneeNew({
// taskId: this.$store.getters.getHandleInfo.taskIds, // 任务id
// assignee: treeNode[0].userId, // 转办人
// userId: this.$store.getters.userInfo.userId, // 转办人
// pId: this.$store.getters.getHandleInfo.prcId // 流程实例
// }).then(res => {
// if (res.success) {
// this.$message.success('转办成功')
// this.$router.push('/processCenter')
// this.visibleTree = false
// } else {
// this.$message.warning(res.message)
// }
// })
}
}
}
+2 -2
View File
@@ -15,12 +15,12 @@
<el-row>
<el-col :span="9">
<el-form-item label="申请原因:" prop="name">
<el-input type="textarea" v-model="applicationForm.name"></el-input>
<el-input type="textarea" v-model="applicationForm.name" placeholder="请输入申请原因"></el-input>
</el-form-item>
</el-col>
<el-col :span="9" :offset="6">
<el-form-item label="选择申请权限:" prop="send">
<el-select v-model="applicationForm.send" placeholder="">
<el-select v-model="applicationForm.send" placeholder="请选择申请权限">
<el-option
v-for="item in PERMISSION"
:key="item.value"