Merge branch 'yuekuo' of http://10.10.10.43:9090/faw-report-library/faw-report-library-web into yuekuo
This commit is contained in:
@@ -0,0 +1,21 @@
|
|||||||
|
import { instance as request } from '@/utils/request'
|
||||||
|
|
||||||
|
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,19 +1,19 @@
|
|||||||
import { instance as request } from '@/utils/request'
|
import { instance as request } from '@/utils/request'
|
||||||
export default{
|
export default {
|
||||||
//查询
|
// 查询
|
||||||
search(data){
|
search (data) {
|
||||||
return request({
|
return request({
|
||||||
url: '',
|
url: '',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//重置
|
// 重置
|
||||||
reset(data){
|
reset (data) {
|
||||||
return request({
|
return request({
|
||||||
url: '',
|
url: '',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,47 @@
|
|||||||
|
.tag-btns {
|
||||||
|
padding-right: 15px;
|
||||||
|
}
|
||||||
|
.search-area {
|
||||||
|
padding: 0;
|
||||||
|
|
||||||
|
.el-form-item__label {
|
||||||
|
line-height: 35px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-form-item__content {
|
||||||
|
line-height: 35px;
|
||||||
|
|
||||||
|
.el-input__inner {
|
||||||
|
height: 25px;
|
||||||
|
line-height: 35px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.search-new {
|
||||||
|
//width: 100%;
|
||||||
|
background: #FFF;
|
||||||
|
padding: 10px 10px 0;
|
||||||
|
|
||||||
|
.el-button + .el-button {
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-form--inline .el-form-item {
|
||||||
|
display: flex;
|
||||||
|
margin-right: 0;
|
||||||
|
|
||||||
|
input.el-input__inner {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-form-item__content {
|
||||||
|
//width: 100%;
|
||||||
|
flex: 1;
|
||||||
|
|
||||||
|
.el-select,
|
||||||
|
.el-range-editor {
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
//流程样式
|
||||||
|
.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 solid rgb(242,242,242);
|
||||||
|
}
|
||||||
|
.base_title{
|
||||||
|
display: inline-block;
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: 700;
|
||||||
|
color: #555;
|
||||||
|
line-height: 40px;
|
||||||
|
border-bottom: 3px solid #409eff;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
.pagination{
|
||||||
|
margin-top: 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,.el-form-item {
|
||||||
|
|
||||||
|
line-height: 40px;
|
||||||
|
font-size: 15px;
|
||||||
|
}
|
||||||
|
.el-select{
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.add-form-item{
|
||||||
|
.el-input{
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.el-input__inner{
|
||||||
|
height: 40px;
|
||||||
|
line-height: 40px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,904 @@
|
|||||||
|
<!-- 分页从全公司选择人员 -->
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<!-- 弹窗,dialogModel则作为单独组件使用 -->
|
||||||
|
<el-dialog
|
||||||
|
append-to-body
|
||||||
|
:title="showTitle"
|
||||||
|
:visible.sync="isVisible"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
class="org-table"
|
||||||
|
@close="handleClose">
|
||||||
|
<template >
|
||||||
|
<div class="search-area search-new">
|
||||||
|
<el-form
|
||||||
|
:model="searchForm"
|
||||||
|
inline
|
||||||
|
class="label-input-form"
|
||||||
|
@keyup.enter.native="handleSearch">
|
||||||
|
<el-row :gutter="24">
|
||||||
|
|
||||||
|
<el-col :xl="8" :lg="8">
|
||||||
|
<el-form-item label="角色名" class="search-item">
|
||||||
|
<!-- <el-input :placeholder="'根据角色名查询'" class="search-item" v-model="searchForm.roleName"/>-->
|
||||||
|
<el-select v-model="searchForm.roleName" class="icon-auth" placeholder="请选择角色名">
|
||||||
|
<el-option label="全部" value=""></el-option>
|
||||||
|
<template v-for="item in roleList">
|
||||||
|
<el-option :label="item.rname" :value="item.rname" :key="item.rid"></el-option>
|
||||||
|
</template>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :xl="8" :lg="8">
|
||||||
|
<el-form-item label="用户名" class="search-item">
|
||||||
|
<!-- <el-input-->
|
||||||
|
<!-- v-model="searchForm.uname"-->
|
||||||
|
<!-- placeholder="根据姓名查询"-->
|
||||||
|
<!-- clearable></el-input>-->
|
||||||
|
<el-input :placeholder="'请输入用户名'" v-model="searchForm.account"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :xl="8" :lg="24">
|
||||||
|
<el-form-item class="tag-btns">
|
||||||
|
<!-- :loading="loading.searching"-->
|
||||||
|
<el-button
|
||||||
|
:disabled="loading.searching"
|
||||||
|
type="primary"
|
||||||
|
size="small"
|
||||||
|
@click="handleSearch">查询
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
size="small"
|
||||||
|
@click="handleReset">重置
|
||||||
|
</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
<div class="org-user v-class">
|
||||||
|
|
||||||
|
<el-table
|
||||||
|
v-if="isVisible"
|
||||||
|
ref="orgTable"
|
||||||
|
:data="tableData"
|
||||||
|
tooltip-effect="dark"
|
||||||
|
style="width: 100%"
|
||||||
|
border
|
||||||
|
stripe
|
||||||
|
:header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }"
|
||||||
|
height="350"
|
||||||
|
v-loading="loading.loadData"
|
||||||
|
:cell-class-name="cellClassName"
|
||||||
|
@select="selectionRow"
|
||||||
|
@select-all="selectionRowAll">
|
||||||
|
<el-table-column v-if="maxSelected && maxSelected == 1" label="" width="35" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<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
|
||||||
|
v-else
|
||||||
|
type="selection"
|
||||||
|
width="55"
|
||||||
|
align="center"
|
||||||
|
:selectable="isSelectable">
|
||||||
|
</el-table-column>
|
||||||
|
<!-- v-if="workNumFlag"-->
|
||||||
|
<el-table-column
|
||||||
|
label="用户名"
|
||||||
|
width="120"
|
||||||
|
prop="ACCOUNT"
|
||||||
|
align="center"
|
||||||
|
show-overflow-tooltip>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="姓名"
|
||||||
|
width="120"
|
||||||
|
:prop="presets ? 'personName':'USNAME'"
|
||||||
|
align="center"
|
||||||
|
show-overflow-tooltip>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="ROLENAME"
|
||||||
|
label="角色"
|
||||||
|
align="center"
|
||||||
|
show-overflow-tooltip>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="EMAIL"
|
||||||
|
label="邮箱"
|
||||||
|
align="center"
|
||||||
|
show-overflow-tooltip>
|
||||||
|
</el-table-column>
|
||||||
|
<!-- <el-table-column-->
|
||||||
|
<!-- :prop="presets?'role':(pageUrl == 'productItem' ? 'projectRoleName' : 'roleNames') "-->
|
||||||
|
<!-- label="角色"-->
|
||||||
|
<!-- align="center"-->
|
||||||
|
<!-- show-overflow-tooltip>-->
|
||||||
|
<!-- <!– <template slot-scope="scope">–>-->
|
||||||
|
<!-- <!– <div class="tag-wrap">–>-->
|
||||||
|
<!-- <!– <el-tag–>-->
|
||||||
|
<!-- <!– size="small"–>-->
|
||||||
|
<!-- <!– v-for="(tag, index) in scope.row.roleName.split(',')"–>-->
|
||||||
|
<!-- <!– :key="index">{{ tag }}</el-tag>–>-->
|
||||||
|
<!-- <!– </div>–>-->
|
||||||
|
<!-- <!– </template>–>-->
|
||||||
|
<!-- </el-table-column>-->
|
||||||
|
<el-table-column
|
||||||
|
label="部门"
|
||||||
|
align="center"
|
||||||
|
show-overflow-tooltip>
|
||||||
|
<template #default="{ row }">{{ row.departmentName || row.DEPARTMENT || row.orgName }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
<el-pagination
|
||||||
|
class="pagination"
|
||||||
|
:current-page="page"
|
||||||
|
:page-sizes="[5, 10, 20]"
|
||||||
|
:pageSize="pageSize"
|
||||||
|
:total="total"
|
||||||
|
@current-change="handlePageChange"
|
||||||
|
@size-change="handlePageSizeChange"
|
||||||
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
></el-pagination>
|
||||||
|
<template v-if="btnFlag">
|
||||||
|
<!-- 已选择的用户 -->
|
||||||
|
<template v-if="maxSelected !== 1">
|
||||||
|
<el-divider content-position="left">已选择</el-divider>
|
||||||
|
<div class="checked-user-list">
|
||||||
|
<el-tag
|
||||||
|
size="medium"
|
||||||
|
closable
|
||||||
|
v-for="item in checkedList"
|
||||||
|
:key="item.usid || item.USID || item.id"
|
||||||
|
@close="handleRemove(item)">{{ item.uname || item.USNAME || item.name }}
|
||||||
|
</el-tag>
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
size="mini"
|
||||||
|
@click="handleCleanChecked"
|
||||||
|
v-show="checkedIdList.length > 1">全部删除
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<div style="text-align: right;" class="dialog-footer">
|
||||||
|
<el-button size="small"
|
||||||
|
type="primary"
|
||||||
|
class="common-button-primary"
|
||||||
|
@click="handleConfirm">确 定
|
||||||
|
</el-button>
|
||||||
|
<el-button size="small"
|
||||||
|
class="common-button-default"
|
||||||
|
@click="handleCancel">取 消
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
<!-- 非弹窗模式使用 -->
|
||||||
|
<el-col :span="span" v-if="!dialogModel">
|
||||||
|
<el-form-item
|
||||||
|
:label="config.attrName"
|
||||||
|
:prop="config.attrField"
|
||||||
|
:label-width="labelWidth"
|
||||||
|
class="add-form-item expand-form-item"
|
||||||
|
:class="{'form-item-disabled': disabled}"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
v-model="checkedName"
|
||||||
|
:placeholder="'请选择' + config.attrName"
|
||||||
|
readonly
|
||||||
|
:disabled="disabled"
|
||||||
|
:id="config.attrField"
|
||||||
|
@click.native="handleChooseByDialog"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { mapGetters } from 'vuex'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'OrgTable',
|
||||||
|
mixins: [],
|
||||||
|
props: {
|
||||||
|
title: {
|
||||||
|
type: String,
|
||||||
|
default: '组织机构'
|
||||||
|
},
|
||||||
|
visible: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
// 弹窗模式选取
|
||||||
|
dialogModel: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
config: {
|
||||||
|
type: Object
|
||||||
|
},
|
||||||
|
value: {
|
||||||
|
required: false
|
||||||
|
},
|
||||||
|
disabled: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
// 栅格比例
|
||||||
|
span: {
|
||||||
|
type: Number,
|
||||||
|
default: 24
|
||||||
|
},
|
||||||
|
// 原数据对象
|
||||||
|
dataModel: {
|
||||||
|
type: Object,
|
||||||
|
default: () => {
|
||||||
|
return {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
labelWidth: {
|
||||||
|
type: String,
|
||||||
|
default: '150px'
|
||||||
|
},
|
||||||
|
maxSelected: {
|
||||||
|
type: Number
|
||||||
|
},
|
||||||
|
maxSelectedTips: {
|
||||||
|
type: String
|
||||||
|
},
|
||||||
|
// 不可选人员
|
||||||
|
excludeUser: {
|
||||||
|
type: [Array, String]
|
||||||
|
},
|
||||||
|
defaultCheck: {
|
||||||
|
type: Object
|
||||||
|
},
|
||||||
|
deptZNodes: {
|
||||||
|
type: Array
|
||||||
|
},
|
||||||
|
orgId: {
|
||||||
|
type: String
|
||||||
|
},
|
||||||
|
roleName: {
|
||||||
|
type: String
|
||||||
|
},
|
||||||
|
searchVal: {
|
||||||
|
type: Object
|
||||||
|
},
|
||||||
|
workNumFlag: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
notUserId: {
|
||||||
|
type: Array,
|
||||||
|
default: () => {
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
idList: {
|
||||||
|
type: Array,
|
||||||
|
default: () => {
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
btnFlag: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
},
|
||||||
|
// 父组件url
|
||||||
|
pageUrl: {
|
||||||
|
type: String,
|
||||||
|
default: null
|
||||||
|
},
|
||||||
|
// 任务处理
|
||||||
|
sarTask: {
|
||||||
|
type: String,
|
||||||
|
default: null
|
||||||
|
},
|
||||||
|
pageId: {
|
||||||
|
type: String,
|
||||||
|
default: null
|
||||||
|
},
|
||||||
|
// preset 审定人员审查人员的接口
|
||||||
|
preset: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
// people 控制是审查还是审定
|
||||||
|
showTable: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
// 哪个流程的制修订
|
||||||
|
zy: {
|
||||||
|
type: Number,
|
||||||
|
default: 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
roleList: [],
|
||||||
|
activeName: 'first',
|
||||||
|
menuTreeLoading: false,
|
||||||
|
zNodesTree: [],
|
||||||
|
checkIdList: [],
|
||||||
|
presets: false,
|
||||||
|
isVisible: false,
|
||||||
|
visibleOrgClearBtn: false,
|
||||||
|
searchForm: {
|
||||||
|
orgId: '',
|
||||||
|
orgName: '',
|
||||||
|
USNAME: '',
|
||||||
|
uname: '',
|
||||||
|
roleName: '',
|
||||||
|
account: ''
|
||||||
|
},
|
||||||
|
tableData: [],
|
||||||
|
tableChecked: null,
|
||||||
|
tableDataSelectedList: [],
|
||||||
|
page: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
total: 0,
|
||||||
|
checkedList: [],
|
||||||
|
loading: {
|
||||||
|
searching: false,
|
||||||
|
loadData: false
|
||||||
|
},
|
||||||
|
orgZNodes: [],
|
||||||
|
// 选中节点id集合
|
||||||
|
checkedIdList: [],
|
||||||
|
// 非弹窗模式
|
||||||
|
treeCheckNode: [],
|
||||||
|
checkedName: '',
|
||||||
|
zNodesRole: [],
|
||||||
|
repeatFlag: false,
|
||||||
|
isShowOrg: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
|
||||||
|
/** 获取选择体系的数据 进行赋值 */
|
||||||
|
handleEOCheck (checkedList) {
|
||||||
|
console.log(checkedList, 'pooooooo')
|
||||||
|
// checkedList.children.forEach(item=>{
|
||||||
|
// item.check
|
||||||
|
// })
|
||||||
|
this.EOCheckList = checkedList
|
||||||
|
},
|
||||||
|
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')
|
||||||
|
this.EOCheckList = [treeNode]
|
||||||
|
},
|
||||||
|
|
||||||
|
handleClose () {
|
||||||
|
this.searchForm = {
|
||||||
|
orgId: '',
|
||||||
|
orgName: '',
|
||||||
|
USNAME: '',
|
||||||
|
uname: '',
|
||||||
|
roleId: '',
|
||||||
|
roleName: ''
|
||||||
|
}
|
||||||
|
this.page = 1
|
||||||
|
this.checkedList = []
|
||||||
|
this.checkedIdList = []
|
||||||
|
this.$refs.orgTable.clearSelection()
|
||||||
|
},
|
||||||
|
|
||||||
|
handleCancel () {
|
||||||
|
this.isVisible = false
|
||||||
|
},
|
||||||
|
handleConfirm () {
|
||||||
|
if (this.dialogModel) {
|
||||||
|
if (this.maxSelected && this.maxSelected > -1 && this.checkedList.length > this.maxSelected) {
|
||||||
|
this.$message.warning(this.maxSelectedTips || `${this.title} 只能选择一个用户`)
|
||||||
|
this.isShowOrg = false
|
||||||
|
} else {
|
||||||
|
const checkedIdList = []
|
||||||
|
|
||||||
|
this.checkedList.map(chkItem => {
|
||||||
|
checkedIdList.push(chkItem.usid || chkItem.USID || chkItem.id)
|
||||||
|
console.log(chkItem.uname, chkItem)
|
||||||
|
if (chkItem.uname) {
|
||||||
|
chkItem.uname = chkItem.uname + '_' + chkItem.account
|
||||||
|
chkItem.USNAME = chkItem.USNAME + '_' + chkItem.account
|
||||||
|
chkItem.orgName = chkItem.departmentName ? chkItem.departmentName : chkItem.orgName
|
||||||
|
} else if (!chkItem.uname && chkItem.USNAME) {
|
||||||
|
chkItem.uname = chkItem.USNAME
|
||||||
|
chkItem.USNAME = chkItem.USNAME
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.$emit('confirm', this.checkedList, checkedIdList)
|
||||||
|
|
||||||
|
this.isVisible = false
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
switch (this.config.attrType) {
|
||||||
|
// 多选
|
||||||
|
case 'SEL_OPTS':
|
||||||
|
break
|
||||||
|
// 单选
|
||||||
|
default:
|
||||||
|
if (this.checkedList.length > 1) {
|
||||||
|
this.$message.warning(`${this.config.attrName} 只能选择一个用户`)
|
||||||
|
} else {
|
||||||
|
const dataItem = this.checkedList[0]
|
||||||
|
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)
|
||||||
|
setTimeout(() => {
|
||||||
|
this.isVisible = false
|
||||||
|
}, 100)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
handlePageChange (page) {
|
||||||
|
this.page = page
|
||||||
|
this.getRoleAndUserByOrgIdPage()
|
||||||
|
},
|
||||||
|
|
||||||
|
handlePageSizeChange (pageSize) {
|
||||||
|
this.pageSize = pageSize
|
||||||
|
this.getRoleAndUserByOrgIdPage()
|
||||||
|
},
|
||||||
|
|
||||||
|
handleSearch () {
|
||||||
|
this.page = 1
|
||||||
|
this.loading.searching = true
|
||||||
|
this.getRoleAndUserByOrgIdPage()
|
||||||
|
},
|
||||||
|
|
||||||
|
handleReset () {
|
||||||
|
this.page = 1
|
||||||
|
this.searchForm = {
|
||||||
|
orgId: '',
|
||||||
|
orgName: '',
|
||||||
|
USNAME: '',
|
||||||
|
uname: '',
|
||||||
|
account: '',
|
||||||
|
roleName: ''
|
||||||
|
}
|
||||||
|
this.getRoleAndUserByOrgIdPage()
|
||||||
|
},
|
||||||
|
|
||||||
|
handleSearchOrgChecked (treeId, treeNode) {
|
||||||
|
this.searchForm.orgId = treeNode.id
|
||||||
|
this.searchForm.orgName = treeNode.oldname || treeNode.name
|
||||||
|
$('#orgInput').click()
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: 获取组织机构
|
||||||
|
* @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: 分页查询用户
|
||||||
|
* @author: chenxiaoxi
|
||||||
|
* @time: 2021-03-21 17:08:06
|
||||||
|
*/
|
||||||
|
getRoleAndUserByOrgIdPage (types) {
|
||||||
|
console.log(types, 'types')
|
||||||
|
console.log(this.preset, 'types')
|
||||||
|
if (!types) {
|
||||||
|
this.presets = this.preset
|
||||||
|
}
|
||||||
|
|
||||||
|
this.loading.loadData = true
|
||||||
|
if (this.orgId) {
|
||||||
|
if (this.searchForm.orgId === '') {
|
||||||
|
this.searchForm.orgId = this.orgId
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const param = {
|
||||||
|
pageNo: this.page,
|
||||||
|
pageSize: this.pageSize,
|
||||||
|
...this.searchForm
|
||||||
|
}
|
||||||
|
// let this.notUserId.length > 0 ? this.notUserId.toString() : null
|
||||||
|
// getRoleAndUserByOrgIdPage(
|
||||||
|
|
||||||
|
this.$api.user.sysUserList(param).then((res) => {
|
||||||
|
this.loading.loadData = false
|
||||||
|
this.loading.searching = false
|
||||||
|
if (res.ok) {
|
||||||
|
this.total = res.data.total
|
||||||
|
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)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.checkedRow(checkedRow)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
// handleRowSelect(selection, row) {
|
||||||
|
// const id = row.USID || row.id
|
||||||
|
// // 当前行选中/取消选中,其他相同用户(角色不同)被选中/取消选中
|
||||||
|
// this.tableData.map(dataItem => {
|
||||||
|
// if (dataItem.USID === id || dataItem.id === id) {
|
||||||
|
// this.$refs['orgTable'].toggleRowSelection(dataItem, selection.includes(row))
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// console.log(this.checkedList)
|
||||||
|
// },
|
||||||
|
radioChange (e) {
|
||||||
|
// console.log(e)
|
||||||
|
this.checkedIdList = []
|
||||||
|
this.checkedList = []
|
||||||
|
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.USID
|
||||||
|
if (!this.checkedIdList.includes(id)) {
|
||||||
|
this.checkedIdList.push(id)
|
||||||
|
this.checkedList.push(row)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.handleRemove(row, 'table')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
selectionRowAll (selection) {
|
||||||
|
if (selection.length > 0) {
|
||||||
|
selection.map(selItem => {
|
||||||
|
const id = selItem.USID
|
||||||
|
if (!this.checkedIdList.includes(id)) {
|
||||||
|
this.checkedIdList.push(id)
|
||||||
|
this.checkedList.push(selItem)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.tableData.map(selItem => {
|
||||||
|
this.handleRemove(selItem, 'table')
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
handleSelectionChange (selection) {
|
||||||
|
if (selection.length) {
|
||||||
|
selection.map(selItem => {
|
||||||
|
const id = selItem.usid || selItem.USID || selItem.orgId || selItem.id
|
||||||
|
// 如果exclude不含当前行
|
||||||
|
if (!this.excludeIdList.includes(id)) {
|
||||||
|
// 如果下面列表没有,就填到下面列表里
|
||||||
|
if (!this.checkedIdList.includes(id)) {
|
||||||
|
this.checkedList.push(selItem)
|
||||||
|
this.checkedIdList.push(id)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 如果exclude含当前行,当前行置为未选中状态
|
||||||
|
// this.$message.warning('主起草人/其他起草人不能为同一个人')
|
||||||
|
// this.$nextTick(() => {
|
||||||
|
// this.$refs['orgTable'].toggleRowSelection(selItem, false)
|
||||||
|
// })
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
handleRemove (user, type) {
|
||||||
|
let delIndex = -1
|
||||||
|
this.checkedList.map((checkedItem, chkIndex) => {
|
||||||
|
if (user.USID === checkedItem.USID) {
|
||||||
|
delIndex = chkIndex
|
||||||
|
if (type !== 'table') {
|
||||||
|
this.checkedRow([checkedItem])
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.checkedList.splice(delIndex, 1)
|
||||||
|
this.checkedIdList.splice(delIndex, 1)
|
||||||
|
},
|
||||||
|
|
||||||
|
handleOrgDel () {
|
||||||
|
this.searchForm.orgId = ''
|
||||||
|
this.searchForm.orgName = ''
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: 设置选中状态
|
||||||
|
* @author: chenxiaoxi
|
||||||
|
* @time: 2021-03-22 10:06:03
|
||||||
|
*/
|
||||||
|
checkedRow (rows) {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
if (rows.length) {
|
||||||
|
rows.forEach(row => {
|
||||||
|
/* 双重for循环,为了解决,第二次点击弹框得时候,删除已选择里面得人员,表格勾选没有取消问题 */
|
||||||
|
for (let i = 0; i < this.tableData.length; i++) {
|
||||||
|
if (this.tableData[i].USID == row.USID) {
|
||||||
|
// console.log(this.tableData[i], '666')
|
||||||
|
this.$refs.orgTable && this.$refs.orgTable.toggleRowSelection(this.tableData[i])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.$refs.orgTable && this.$refs.orgTable.clearSelection()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
cellClassName ({ row, column, rowIndex, columnIndex }) {
|
||||||
|
if (columnIndex === 3) {
|
||||||
|
return 'tag-column'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
isSelectable (row, index) {
|
||||||
|
return !this.excludeIdList.includes(row.USID)
|
||||||
|
},
|
||||||
|
|
||||||
|
handleChooseByDialog () {
|
||||||
|
if (!this.dialogModel) {
|
||||||
|
this.checkedName = this.config.valueName || ''
|
||||||
|
if (this.config.value) {
|
||||||
|
this.checkedList = [{
|
||||||
|
USID: this.config.value,
|
||||||
|
USNAME: this.config.valueName
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
const idList = this.config.value === '' || !this.config.value ? [] : this.config.value.split(',')
|
||||||
|
this.checkedIdList = [...idList]
|
||||||
|
}
|
||||||
|
this.isVisible = true
|
||||||
|
this.getRoleAndUserByOrgIdPage()
|
||||||
|
},
|
||||||
|
|
||||||
|
handleMouseEnter () {
|
||||||
|
if (this.searchForm.orgName !== '') {
|
||||||
|
this.visibleOrgClearBtn = true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
handleMouseLeave () {
|
||||||
|
this.visibleOrgClearBtn = false
|
||||||
|
},
|
||||||
|
// 角色列表
|
||||||
|
getSysRole () {
|
||||||
|
this.$api.role.getSysRole().then(({ data }) => {
|
||||||
|
this.roleList = data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleCleanChecked () {
|
||||||
|
this.$confirm('您是否确定移除全部已选中', '确定移除', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
confirmButtonClass: 'common-button-primary',
|
||||||
|
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
this.checkedList = []
|
||||||
|
this.checkedIdList = []
|
||||||
|
this.$refs.orgTable.clearSelection()
|
||||||
|
}).catch(e => {
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
configContent () {
|
||||||
|
return this.userInfo.configContent
|
||||||
|
},
|
||||||
|
|
||||||
|
placeholder () {
|
||||||
|
return !this.dialogModel && `请选择${this.config.attrName}`
|
||||||
|
},
|
||||||
|
showMessage () {
|
||||||
|
return !this.dialogModel && `${this.config.attrName}不能为空`
|
||||||
|
},
|
||||||
|
isRequired () {
|
||||||
|
return !this.dialogModel && !!this.config.isMust
|
||||||
|
},
|
||||||
|
isString (str) {
|
||||||
|
return (typeof str === 'string') && str.constructor === String
|
||||||
|
},
|
||||||
|
isFO () {
|
||||||
|
return !this.dialogModel && this.config.attrField === 'FO'
|
||||||
|
},
|
||||||
|
ZRBM () {
|
||||||
|
return this.dataModel.ZRBM || ''
|
||||||
|
},
|
||||||
|
showTitle () {
|
||||||
|
return this.dialogModel ? this.title : this.config.attrName
|
||||||
|
},
|
||||||
|
excludeIdList () {
|
||||||
|
return this.excludeUser && this.excludeUser !== '' ? (this.excludeUser instanceof Array ? this.excludeUser : this.excludeUser.split(',')) : []
|
||||||
|
},
|
||||||
|
...mapGetters(['userInfo'])
|
||||||
|
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
visible (val) {
|
||||||
|
this.isVisible = val
|
||||||
|
this.tableChecked = null
|
||||||
|
if (this.maxSelected === 1) {
|
||||||
|
this.isShowOrg = false
|
||||||
|
this.activeName = 'first'
|
||||||
|
} else {
|
||||||
|
this.isShowOrg = true
|
||||||
|
}
|
||||||
|
if (val) {
|
||||||
|
if (this.config.value && this.config.value !== '') {
|
||||||
|
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(','))
|
||||||
|
this.checkedIdList = idList
|
||||||
|
const checkedList = []
|
||||||
|
idList.map((id, index) => {
|
||||||
|
checkedList.push({
|
||||||
|
USID: id,
|
||||||
|
USNAME: nameList[index]
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
if (this.maxSelected == 1) {
|
||||||
|
// debugger
|
||||||
|
this.tableChecked = this.config.value
|
||||||
|
this.isShowOrg = false
|
||||||
|
}
|
||||||
|
// console.log(checkedList, 'checkedList', 'idListDepartment===', idListDepartment, 'nameListDepartment===', nameListDepartment)
|
||||||
|
this.checkedList = checkedList
|
||||||
|
}
|
||||||
|
if (this.searchVal && this.searchVal.type == 'qcrbm') {
|
||||||
|
this.searchForm.orgId = this.searchVal.OrgId
|
||||||
|
this.searchForm.orgName = this.searchVal.orgName
|
||||||
|
} else {
|
||||||
|
this.searchForm.orgId = ''
|
||||||
|
this.searchForm.orgName = ''
|
||||||
|
}
|
||||||
|
this.getRoleAndUserByOrgIdPage()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
isVisible (val) {
|
||||||
|
this.$emit('update:visible', val)
|
||||||
|
},
|
||||||
|
value (newVal, oldVal) {
|
||||||
|
this.checkedName = newVal !== '' ? this.checkedName : ''
|
||||||
|
},
|
||||||
|
deptZNodes: {
|
||||||
|
handler (val) {
|
||||||
|
this.orgZNodes = val
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted () {
|
||||||
|
this.isVisible = this.visible
|
||||||
|
this.getSysRole()
|
||||||
|
if (!this.dialogModel) {
|
||||||
|
this.checkedName = this.config.valueName || ''
|
||||||
|
if (this.config.value !== '') {
|
||||||
|
this.checkedList = [{
|
||||||
|
USID: this.config.value,
|
||||||
|
USNAME: this.config.valueName
|
||||||
|
}]
|
||||||
|
const idList = this.config.value === '' ? [] : this.config.value.split(',')
|
||||||
|
this.checkedIdList = [...idList]
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
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(','))
|
||||||
|
this.checkedIdList = idList
|
||||||
|
const checkedList = []
|
||||||
|
idList.map((id, index) => {
|
||||||
|
checkedList.push({
|
||||||
|
USID: id,
|
||||||
|
USNAME: nameList[index]
|
||||||
|
})
|
||||||
|
})
|
||||||
|
this.checkedList = checkedList
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.org-table {
|
||||||
|
::v-deep .el-dialog__header {
|
||||||
|
padding: 0 20px;
|
||||||
|
height: 50px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
border-bottom: 1px solid #ddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .el-dialog__body {
|
||||||
|
padding: 15px 20px 20px 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.checked-user-list {
|
||||||
|
display: flex;
|
||||||
|
flex-flow: row wrap;
|
||||||
|
justify-content: flex-start;
|
||||||
|
|
||||||
|
.el-tag {
|
||||||
|
margin: 0 10px 10px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-button--mini {
|
||||||
|
padding: 0 15px;
|
||||||
|
height: 28px;
|
||||||
|
line-height: 28px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .el-popover__reference-wrapper {
|
||||||
|
.el-input__suffix {
|
||||||
|
padding-right: 5px;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .tag-column {
|
||||||
|
.cell {
|
||||||
|
padding: 5px 10px;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: clip;
|
||||||
|
|
||||||
|
.tag-wrap {
|
||||||
|
.el-tag {
|
||||||
|
height: auto;
|
||||||
|
white-space: normal;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.dialog-footer{
|
||||||
|
margin-top: 20px;
|
||||||
|
::v-deep .el-button {
|
||||||
|
width: 80px;
|
||||||
|
height: 36px;
|
||||||
|
padding: 0;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,194 @@
|
|||||||
|
<template>
|
||||||
|
<div class="table-box">
|
||||||
|
<el-table
|
||||||
|
:data="standTableList"
|
||||||
|
style="width: 100%;margin-bottom: 30px"
|
||||||
|
max-height="402"
|
||||||
|
v-loading="loading"
|
||||||
|
:header-cell-style="{ color: '#606266', fontSize: '13px',
|
||||||
|
height: '48px'}"
|
||||||
|
border
|
||||||
|
@sort-change="sortChange">
|
||||||
|
<el-table-column
|
||||||
|
show-overflow-tooltip
|
||||||
|
prop="orgName"
|
||||||
|
align="center"
|
||||||
|
label="审批人所在部门">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span >{{ scope.row.orgName }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="assignee"
|
||||||
|
align="center"
|
||||||
|
label="审批人员">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ scope.row.assignee }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="standStateShow"
|
||||||
|
label="审批结果"
|
||||||
|
align="center"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span v-if="scope.row.approvalResult == '1' || scope.row.approvalResult == '3' ">
|
||||||
|
同意
|
||||||
|
</span>
|
||||||
|
<span v-else-if="scope.row.approvalResult == '2'">
|
||||||
|
不同意
|
||||||
|
</span>
|
||||||
|
<span v-else></span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="approvalOpinion"
|
||||||
|
align="center"
|
||||||
|
show-overflow-tooltip
|
||||||
|
label="审批意见">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
show-overflow-tooltip
|
||||||
|
width="160px"
|
||||||
|
align="center"
|
||||||
|
label="开始时间"
|
||||||
|
prop="startTime"
|
||||||
|
sortable="custom">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ scope.row.startTime ? formatIssueDate(scope.row.startTime) : '' }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
show-overflow-tooltip
|
||||||
|
width="160px"
|
||||||
|
align="center"
|
||||||
|
label="完成时间"
|
||||||
|
prop="endTime"
|
||||||
|
sortable="custom">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ scope.row.endTime ? formatIssueDate(scope.row.endTime) : '' }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
show-overflow-tooltip
|
||||||
|
width="150px"
|
||||||
|
align="center"
|
||||||
|
label="审批处理时长(天)">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{scope.row.endTime ? scope.row.approvalTime : ''}}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<!-- <el-table-column-->
|
||||||
|
<!-- show-overflow-tooltip-->
|
||||||
|
<!-- align="center"-->
|
||||||
|
<!-- prop="approvalFile"-->
|
||||||
|
<!-- width="150px"-->
|
||||||
|
<!-- label="附件">-->
|
||||||
|
<!-- <template slot-scope="scope">-->
|
||||||
|
<!--<!– <span>{{ scope.row.approvalFile }}</span>–>-->
|
||||||
|
<!-- <span class="lookFile" @click="lookFile(scope.row.approvalFile)" v-if="scope.row.approvalFile">查看附件</span>-->
|
||||||
|
<!-- <span v-else>-</span>-->
|
||||||
|
<!-- </template>-->
|
||||||
|
<!-- </el-table-column>-->
|
||||||
|
</el-table>
|
||||||
|
<el-dialog
|
||||||
|
width='400px'
|
||||||
|
:visible.sync="importModalshowflagtemp"
|
||||||
|
title="查看附件"
|
||||||
|
@close="defaultFileList = []"
|
||||||
|
>
|
||||||
|
<div class="fileList" v-for="(item,index) in defaultFileList" :key="index">
|
||||||
|
<span class="filename" :title="item.name">{{item.name}}</span>
|
||||||
|
<span class="fileDown" @click="fileDown(item.id)">下载</span>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'approvalHistory',
|
||||||
|
props: ['query'],
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
loading: false,
|
||||||
|
standTableList: [],
|
||||||
|
importModalshowflagtemp: false,
|
||||||
|
defaultFileList: [],
|
||||||
|
uploadPath: 'api/att/attFile/upload'// 上传文件
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created () {
|
||||||
|
this.getListByInstance({})
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 表格排序
|
||||||
|
sortChange (column, prop, order) {
|
||||||
|
const form = {}
|
||||||
|
form.sortWord = column.prop
|
||||||
|
if (column.order === 'ascending') {
|
||||||
|
form.shunxu = 'asc'
|
||||||
|
} else if (column.order === 'descending') {
|
||||||
|
form.shunxu = 'desc'
|
||||||
|
} else {
|
||||||
|
form.shunxu = ''
|
||||||
|
form.sortWord = ''
|
||||||
|
}
|
||||||
|
this.getListByInstance(form)
|
||||||
|
},
|
||||||
|
formatIssueDate (str) {
|
||||||
|
const momentDate = this.$moment(str)
|
||||||
|
if (momentDate.isValid()) {
|
||||||
|
return this.$moment(str).format('YYYY-MM-DD HH:mm:ss')
|
||||||
|
} else {
|
||||||
|
return str
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getListByInstance (form) {
|
||||||
|
this.$api.process.getHistory({
|
||||||
|
prcNum: this.query.prcNum,
|
||||||
|
...form
|
||||||
|
}).then(res => {
|
||||||
|
this.standTableList = res
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.table-box{
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.lookFile{
|
||||||
|
color: #0c91e5;
|
||||||
|
}
|
||||||
|
.lookFile:hover{
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.fileList{
|
||||||
|
width: 100%;
|
||||||
|
line-height: 2;
|
||||||
|
}
|
||||||
|
.filename{
|
||||||
|
width: 90%;
|
||||||
|
display: inline-block;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
-o-text-overflow: ellipsis;
|
||||||
|
white-space:nowrap;
|
||||||
|
}
|
||||||
|
.fileDown{
|
||||||
|
color: #0c91e5;
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
|
.fileDown:hover{
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.file .el-upload{
|
||||||
|
display: none!important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,768 @@
|
|||||||
|
<!-- 分页从全公司选择人员 -->
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<!-- 弹窗,dialogModel则作为单独组件使用 -->
|
||||||
|
<el-dialog
|
||||||
|
append-to-body
|
||||||
|
:title="showTitle"
|
||||||
|
:visible.sync="isVisible"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
class="org-table"
|
||||||
|
@close="handleClose">
|
||||||
|
<div class="search-area search-new">
|
||||||
|
<el-form
|
||||||
|
:model="searchForm"
|
||||||
|
inline
|
||||||
|
class="label-input-form"
|
||||||
|
@keyup.enter.native="handleSearch">
|
||||||
|
<el-row :gutter="24">
|
||||||
|
|
||||||
|
<el-col :xl="8" :lg="8">
|
||||||
|
<el-form-item label="角色名" class="search-item">
|
||||||
|
<el-select v-model="searchForm.roleName" class="icon-auth" placeholder="请选择角色名">
|
||||||
|
<el-option label="全部" value=""></el-option>
|
||||||
|
<template v-for="item in roleList">
|
||||||
|
<el-option :label="item.rname" :value="item.rname" :key="item.rid"></el-option>
|
||||||
|
</template>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :xl="8" :lg="8">
|
||||||
|
<el-form-item label="用户名" class="search-item">
|
||||||
|
<el-input :placeholder="'请输入用户名'" class="search-item" v-model="searchForm.account"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :xl="8" :lg="8">
|
||||||
|
<el-form-item class="search-item btn-box">
|
||||||
|
<el-button
|
||||||
|
:loading="loading.searching"
|
||||||
|
type="primary"
|
||||||
|
class="common-button-primary"
|
||||||
|
size="small"
|
||||||
|
@click="handleSearch">查询
|
||||||
|
<!-- <img src="@/assets/images/btn/search.png" alt="">-->
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
class="common-button-default"
|
||||||
|
size="small"
|
||||||
|
@click="handleReset">重置
|
||||||
|
<!-- <img src="@/assets/images/btn/reset.png" alt="">-->
|
||||||
|
</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="org-user">
|
||||||
|
<el-table
|
||||||
|
ref="orgTable"
|
||||||
|
:data="tableData"
|
||||||
|
tooltip-effect="dark"
|
||||||
|
style="width: 100%"
|
||||||
|
border
|
||||||
|
stripe
|
||||||
|
:header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }"
|
||||||
|
height="350"
|
||||||
|
v-loading="loading.loadData"
|
||||||
|
:cell-class-name="cellClassName"
|
||||||
|
@select="selectionRow"
|
||||||
|
@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.USID">{{null}}</el-radio>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
v-else
|
||||||
|
type="selection"
|
||||||
|
width="55"
|
||||||
|
align="center"
|
||||||
|
:selectable="isSelectable">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="姓名"
|
||||||
|
width="120"
|
||||||
|
prop="USNAME"
|
||||||
|
align="center">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
v-if="workNumFlag"
|
||||||
|
label="用户名"
|
||||||
|
width="120"
|
||||||
|
prop="ACCOUNT"
|
||||||
|
align="center">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="EMAIL"
|
||||||
|
label="邮箱"
|
||||||
|
align="center"
|
||||||
|
show-overflow-tooltip>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="ROLENAME"
|
||||||
|
label="角色"
|
||||||
|
align="center">
|
||||||
|
<!-- <template slot-scope="scope">-->
|
||||||
|
<!-- <div class="tag-wrap">-->
|
||||||
|
<!-- <el-tag-->
|
||||||
|
<!-- size="small"-->
|
||||||
|
<!-- v-for="(tag, index) in scope.row.roleName.split(',')"-->
|
||||||
|
<!-- :key="index">{{ tag }}</el-tag>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </template>-->
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="部门"
|
||||||
|
align="center">
|
||||||
|
<template #default="{ row }">{{ row.DEPARTMENT }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
<pagination
|
||||||
|
class="pagination"
|
||||||
|
:current-page="page"
|
||||||
|
:page-sizes="[5, 10, 20]"
|
||||||
|
:pageSize="pageSize"
|
||||||
|
:total="total"
|
||||||
|
@current-change="handlePageChange"
|
||||||
|
@size-change="handlePageSizeChange"
|
||||||
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
></pagination>
|
||||||
|
|
||||||
|
<!-- 已选择的用户 -->
|
||||||
|
<el-divider content-position="left">已选择</el-divider>
|
||||||
|
<div class="checked-user-list">
|
||||||
|
<el-tag
|
||||||
|
size="medium"
|
||||||
|
closable
|
||||||
|
v-for="item in checkedList"
|
||||||
|
:key="item.usid || item.USID || item.id"
|
||||||
|
@close="handleRemove(item)">{{ item.uname || item.USNAME || item.name }}</el-tag>
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
size="mini"
|
||||||
|
@click="handleCleanChecked"
|
||||||
|
v-show="checkedIdList.length > 1">全部删除</el-button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div slot="footer" class="done">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
class="common-button-primary"
|
||||||
|
size="small"
|
||||||
|
@click="handleConfirm">确 定</el-button>
|
||||||
|
<el-button
|
||||||
|
size="small"
|
||||||
|
class="common-button-default"
|
||||||
|
@click="handleCancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
<!-- 非弹窗模式使用 -->
|
||||||
|
<el-col :span="span" v-if="!dialogModel">
|
||||||
|
<el-form-item
|
||||||
|
:label="config.attrName"
|
||||||
|
:prop="config.attrField"
|
||||||
|
:label-width="labelWidth"
|
||||||
|
class="add-form-item expand-form-item"
|
||||||
|
:class="{'form-item-disabled': disabled}"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
v-model="checkedName"
|
||||||
|
:placeholder="'请选择' + config.attrName"
|
||||||
|
readonly
|
||||||
|
:disabled="disabled"
|
||||||
|
:id="config.attrField"
|
||||||
|
@click.native="handleChooseByDialog"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { mapGetters } from 'vuex'
|
||||||
|
export default {
|
||||||
|
name: 'OrgTable',
|
||||||
|
mixins: [],
|
||||||
|
components: {},
|
||||||
|
props: {
|
||||||
|
title: {
|
||||||
|
type: String,
|
||||||
|
default: '组织机构'
|
||||||
|
},
|
||||||
|
visible: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
// 弹窗模式选取
|
||||||
|
dialogModel: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
config: {
|
||||||
|
type: Object
|
||||||
|
},
|
||||||
|
value: {
|
||||||
|
required: false
|
||||||
|
},
|
||||||
|
disabled: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
// 栅格比例
|
||||||
|
span: {
|
||||||
|
type: Number,
|
||||||
|
default: 24
|
||||||
|
},
|
||||||
|
// 原数据对象
|
||||||
|
dataModel: {
|
||||||
|
type: Object,
|
||||||
|
default: () => {
|
||||||
|
return {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
labelWidth: {
|
||||||
|
type: String,
|
||||||
|
default: '152px'
|
||||||
|
},
|
||||||
|
maxSelected: {
|
||||||
|
type: Number
|
||||||
|
},
|
||||||
|
maxSelectedTips: {
|
||||||
|
type: String
|
||||||
|
},
|
||||||
|
// 不可选人员
|
||||||
|
excludeUser: {
|
||||||
|
type: [Array, String]
|
||||||
|
},
|
||||||
|
defaultCheck: {
|
||||||
|
type: Object
|
||||||
|
},
|
||||||
|
deptZNodes: {
|
||||||
|
type: Array
|
||||||
|
},
|
||||||
|
orgId: {
|
||||||
|
type: String
|
||||||
|
},
|
||||||
|
roleName: {
|
||||||
|
type: String
|
||||||
|
},
|
||||||
|
searchVal: {
|
||||||
|
type: Object
|
||||||
|
},
|
||||||
|
workNumFlag: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
isVisible: false,
|
||||||
|
visibleOrgClearBtn: false,
|
||||||
|
searchForm: {
|
||||||
|
orgId: '',
|
||||||
|
orgName: '',
|
||||||
|
USNAME: '',
|
||||||
|
uname: '',
|
||||||
|
account: '',
|
||||||
|
roleName: ''
|
||||||
|
},
|
||||||
|
tableData: [],
|
||||||
|
tableChecked: null,
|
||||||
|
tableDataSelectedList: [],
|
||||||
|
page: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
total: 0,
|
||||||
|
checkedList: [],
|
||||||
|
loading: {
|
||||||
|
searching: false,
|
||||||
|
loadData: false
|
||||||
|
},
|
||||||
|
orgZNodes: [],
|
||||||
|
// 选中节点id集合
|
||||||
|
checkedIdList: [],
|
||||||
|
// 非弹窗模式
|
||||||
|
treeCheckNode: [],
|
||||||
|
checkedName: '',
|
||||||
|
zNodesRole: [],
|
||||||
|
roleList: [],
|
||||||
|
repeatFlag: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 角色列表
|
||||||
|
getSysRole () {
|
||||||
|
this.$api.role.getSysRole().then(({ data }) => {
|
||||||
|
this.roleList = data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleClose () {
|
||||||
|
this.searchForm = {
|
||||||
|
orgId: '',
|
||||||
|
orgName: '',
|
||||||
|
USNAME: '',
|
||||||
|
uname: ''
|
||||||
|
}
|
||||||
|
this.page = 1
|
||||||
|
this.checkedList = []
|
||||||
|
this.checkedIdList = []
|
||||||
|
this.$refs.orgTable.clearSelection()
|
||||||
|
},
|
||||||
|
|
||||||
|
handleCancel () {
|
||||||
|
this.isVisible = false
|
||||||
|
},
|
||||||
|
|
||||||
|
handleConfirm () {
|
||||||
|
if (this.dialogModel) {
|
||||||
|
if (this.maxSelected && this.maxSelected > -1 && this.checkedList.length > this.maxSelected) {
|
||||||
|
this.$message.warning(this.maxSelectedTips || `${this.title} 只能选择一个用户`)
|
||||||
|
} else {
|
||||||
|
const checkedIdList = []
|
||||||
|
this.checkedList.map(chkItem => {
|
||||||
|
checkedIdList.push(chkItem.usid || chkItem.USID || chkItem.id)
|
||||||
|
})
|
||||||
|
this.$emit('confirm', this.checkedList, checkedIdList)
|
||||||
|
this.isVisible = false
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
switch (this.config.attrType) {
|
||||||
|
// 多选
|
||||||
|
case 'SEL_OPTS':
|
||||||
|
break
|
||||||
|
// 单选
|
||||||
|
default:
|
||||||
|
if (this.checkedList.length > 1) {
|
||||||
|
this.$message.warning(`${this.config.attrName} 只能选择一个用户`)
|
||||||
|
} else {
|
||||||
|
const dataItem = this.checkedList[0]
|
||||||
|
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)
|
||||||
|
setTimeout(() => {
|
||||||
|
this.isVisible = false
|
||||||
|
}, 100)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
handlePageChange (page) {
|
||||||
|
this.page = page
|
||||||
|
this.getRoleAndUserByOrgIdPage()
|
||||||
|
},
|
||||||
|
|
||||||
|
handlePageSizeChange (pageSize) {
|
||||||
|
this.pageSize = pageSize
|
||||||
|
this.getRoleAndUserByOrgIdPage()
|
||||||
|
},
|
||||||
|
|
||||||
|
handleSearch () {
|
||||||
|
this.page = 1
|
||||||
|
this.loading.searching = true
|
||||||
|
this.getRoleAndUserByOrgIdPage()
|
||||||
|
},
|
||||||
|
|
||||||
|
handleReset () {
|
||||||
|
this.page = 1
|
||||||
|
this.searchForm = {
|
||||||
|
orgId: '',
|
||||||
|
orgName: '',
|
||||||
|
USNAME: '',
|
||||||
|
uname: '',
|
||||||
|
account: '',
|
||||||
|
roleName: ''
|
||||||
|
}
|
||||||
|
this.getRoleAndUserByOrgIdPage()
|
||||||
|
},
|
||||||
|
|
||||||
|
handleSearchOrgChecked (treeId, treeNode) {
|
||||||
|
this.searchForm.orgId = treeNode.id
|
||||||
|
this.searchForm.orgName = treeNode.oldname || treeNode.name
|
||||||
|
$('#orgInput').click()
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: 获取组织机构
|
||||||
|
* @author: chenxiaoxi
|
||||||
|
* @time: 2021-03-21 14:40:59
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: 分页查询用户
|
||||||
|
* @author: chenxiaoxi
|
||||||
|
* @time: 2021-03-21 17:08:06
|
||||||
|
*/
|
||||||
|
getRoleAndUserByOrgIdPage () {
|
||||||
|
this.loading.loadData = true
|
||||||
|
if (this.orgId) {
|
||||||
|
if (this.searchForm.orgId === '') {
|
||||||
|
this.searchForm.orgId = this.orgId
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.$api.process.getRoleAndUserByOrgIdPage({
|
||||||
|
pageNo: this.page,
|
||||||
|
pageSize: this.pageSize,
|
||||||
|
...this.searchForm
|
||||||
|
}).then(res => {
|
||||||
|
this.loading.loadData = false
|
||||||
|
this.loading.searching = false
|
||||||
|
if (res.ok) {
|
||||||
|
this.total = res.data.total
|
||||||
|
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)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.checkedRow(checkedRow)
|
||||||
|
}
|
||||||
|
}).catch(e => {
|
||||||
|
this.loading.loadData = false
|
||||||
|
this.loading.searching = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
// handleRowSelect(selection, row) {
|
||||||
|
// const id = row.USID || row.id
|
||||||
|
// // 当前行选中/取消选中,其他相同用户(角色不同)被选中/取消选中
|
||||||
|
// this.tableData.map(dataItem => {
|
||||||
|
// if (dataItem.USID === id || dataItem.id === id) {
|
||||||
|
// this.$refs['orgTable'].toggleRowSelection(dataItem, selection.includes(row))
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// console.log(this.checkedList)
|
||||||
|
// },
|
||||||
|
radioChange (e) {
|
||||||
|
// console.log(e)
|
||||||
|
this.checkedIdList = []
|
||||||
|
this.checkedList = []
|
||||||
|
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.USID
|
||||||
|
if (!this.checkedIdList.includes(id)) {
|
||||||
|
this.checkedIdList.push(id)
|
||||||
|
this.checkedList.push(row)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.handleRemove(row, 'table')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
selectionRowAll (selection) {
|
||||||
|
if (selection.length > 0) {
|
||||||
|
selection.map(selItem => {
|
||||||
|
const id = selItem.USID
|
||||||
|
if (!this.checkedIdList.includes(id)) {
|
||||||
|
this.checkedIdList.push(id)
|
||||||
|
this.checkedList.push(selItem)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.tableData.map(selItem => {
|
||||||
|
this.handleRemove(selItem, 'table')
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
handleSelectionChange (selection) {
|
||||||
|
if (selection.length) {
|
||||||
|
selection.map(selItem => {
|
||||||
|
const id = selItem.usid || selItem.USID || selItem.orgId || selItem.id
|
||||||
|
// 如果exclude不含当前行
|
||||||
|
if (!this.excludeIdList.includes(id)) {
|
||||||
|
// 如果下面列表没有,就填到下面列表里
|
||||||
|
if (!this.checkedIdList.includes(id)) {
|
||||||
|
this.checkedList.push(selItem)
|
||||||
|
this.checkedIdList.push(id)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 如果exclude含当前行,当前行置为未选中状态
|
||||||
|
// this.$message.warning('主起草人/其他起草人不能为同一个人')
|
||||||
|
// this.$nextTick(() => {
|
||||||
|
// this.$refs['orgTable'].toggleRowSelection(selItem, false)
|
||||||
|
// })
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
handleRemove (user, type) {
|
||||||
|
let delIndex = -1
|
||||||
|
this.checkedList.map((checkedItem, chkIndex) => {
|
||||||
|
if (user.USID === checkedItem.USID) {
|
||||||
|
delIndex = chkIndex
|
||||||
|
if (type !== 'table') {
|
||||||
|
this.checkedRow([checkedItem])
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.checkedList.splice(delIndex, 1)
|
||||||
|
this.checkedIdList.splice(delIndex, 1)
|
||||||
|
},
|
||||||
|
|
||||||
|
handleOrgDel () {
|
||||||
|
this.searchForm.orgId = ''
|
||||||
|
this.searchForm.orgName = ''
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: 设置选中状态
|
||||||
|
* @author: chenxiaoxi
|
||||||
|
* @time: 2021-03-22 10:06:03
|
||||||
|
*/
|
||||||
|
checkedRow (rows) {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
if (rows.length) {
|
||||||
|
rows.forEach(row => {
|
||||||
|
this.$refs.orgTable && this.$refs.orgTable.toggleRowSelection(row)
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.$refs.orgTable && this.$refs.orgTable.clearSelection()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
cellClassName ({ row, column, rowIndex, columnIndex }) {
|
||||||
|
if (columnIndex === 3) {
|
||||||
|
return 'tag-column'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
isSelectable (row, index) {
|
||||||
|
return !this.excludeIdList.includes(row.USID)
|
||||||
|
},
|
||||||
|
|
||||||
|
handleChooseByDialog () {
|
||||||
|
if (!this.dialogModel) {
|
||||||
|
this.checkedName = this.config.valueName || ''
|
||||||
|
if (this.config.value) {
|
||||||
|
this.checkedList = [{
|
||||||
|
USID: this.config.value,
|
||||||
|
USNAME: this.config.valueName
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
const idList = this.config.value === '' || !this.config.value ? [] : this.config.value.split(',')
|
||||||
|
this.checkedIdList = [...idList]
|
||||||
|
}
|
||||||
|
this.isVisible = true
|
||||||
|
this.getRoleAndUserByOrgIdPage()
|
||||||
|
},
|
||||||
|
|
||||||
|
handleMouseEnter () {
|
||||||
|
if (this.searchForm.orgName !== '') {
|
||||||
|
this.visibleOrgClearBtn = true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
handleMouseLeave () {
|
||||||
|
this.visibleOrgClearBtn = false
|
||||||
|
},
|
||||||
|
|
||||||
|
handleCleanChecked () {
|
||||||
|
this.$confirm('您是否确定移除全部已选中', '确定移除', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
confirmButtonClass: 'common-button-primary',
|
||||||
|
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
this.checkedList = []
|
||||||
|
this.checkedIdList = []
|
||||||
|
this.$refs.orgTable.clearSelection()
|
||||||
|
}).catch(e => {})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
configContent () {
|
||||||
|
return this.userInfo.configContent
|
||||||
|
},
|
||||||
|
|
||||||
|
placeholder () {
|
||||||
|
return !this.dialogModel && `请选择${this.config.attrName}`
|
||||||
|
},
|
||||||
|
showMessage () {
|
||||||
|
return !this.dialogModel && `${this.config.attrName}不能为空`
|
||||||
|
},
|
||||||
|
isRequired () {
|
||||||
|
return !this.dialogModel && !!this.config.isMust
|
||||||
|
},
|
||||||
|
isString (str) {
|
||||||
|
return (typeof str === 'string') && str.constructor === String
|
||||||
|
},
|
||||||
|
isFO () {
|
||||||
|
return !this.dialogModel && this.config.attrField === 'FO'
|
||||||
|
},
|
||||||
|
ZRBM () {
|
||||||
|
return this.dataModel.ZRBM || ''
|
||||||
|
},
|
||||||
|
showTitle () {
|
||||||
|
return this.dialogModel ? this.title : this.config.attrName
|
||||||
|
},
|
||||||
|
excludeIdList () {
|
||||||
|
return this.excludeUser && this.excludeUser !== '' ? (this.excludeUser instanceof Array ? this.excludeUser : this.excludeUser.split(',')) : []
|
||||||
|
},
|
||||||
|
...mapGetters(['userInfo'])
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
visible (val) {
|
||||||
|
this.isVisible = val
|
||||||
|
this.tableChecked = null
|
||||||
|
if (val) {
|
||||||
|
if (this.config.value && this.config.value !== '') {
|
||||||
|
const idListDepartment = []
|
||||||
|
const nameListDepartment = []
|
||||||
|
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) {
|
||||||
|
const idListDepartment = this.config.valueDepartment instanceof Array ? this.config.valueDepartment : (this.config.valueDepartment === '' ? [] : this.config.valueDepartment.split(','))
|
||||||
|
const nameListDepartment = this.config.valueNameDepartment instanceof Array ? this.config.valueNameDepartment.split(',') : (this.config.valueNameDepartment === '' ? [] : this.config.valueNameDepartment.split(','))
|
||||||
|
}
|
||||||
|
this.checkedIdList = idList
|
||||||
|
const checkedList = []
|
||||||
|
idList.map((id, index) => {
|
||||||
|
checkedList.push({
|
||||||
|
USID: id,
|
||||||
|
USNAME: nameList[index],
|
||||||
|
orgId: idListDepartment[index],
|
||||||
|
orgName: nameListDepartment[index]
|
||||||
|
})
|
||||||
|
})
|
||||||
|
if (this.maxSelected == 1) this.tableChecked = this.config.value
|
||||||
|
// console.log(checkedList,'checkedList','idListDepartment===',idListDepartment,'nameListDepartment===',nameListDepartment)
|
||||||
|
this.checkedList = checkedList
|
||||||
|
}
|
||||||
|
if (this.searchVal && this.searchVal.type == 'qcrbm') {
|
||||||
|
this.searchForm.orgId = this.searchVal.OrgId
|
||||||
|
this.searchForm.orgName = this.searchVal.orgName
|
||||||
|
} else {
|
||||||
|
this.searchForm.orgId = ''
|
||||||
|
this.searchForm.orgName = ''
|
||||||
|
}
|
||||||
|
this.getRoleAndUserByOrgIdPage()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
isVisible (val) {
|
||||||
|
this.$emit('update:visible', val)
|
||||||
|
},
|
||||||
|
value (newVal, oldVal) {
|
||||||
|
this.checkedName = newVal !== '' ? this.checkedName : ''
|
||||||
|
},
|
||||||
|
deptZNodes: {
|
||||||
|
handler (val) {
|
||||||
|
this.orgZNodes = val
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted () {
|
||||||
|
this.isVisible = this.visible
|
||||||
|
this.getSysRole()
|
||||||
|
if (!this.dialogModel) {
|
||||||
|
this.checkedName = this.config.valueName || ''
|
||||||
|
if (this.config.value !== '') {
|
||||||
|
this.checkedList = [{
|
||||||
|
USID: this.config.value,
|
||||||
|
USNAME: this.config.valueName
|
||||||
|
}]
|
||||||
|
const idList = this.config.value === '' ? [] : this.config.value.split(',')
|
||||||
|
this.checkedIdList = [...idList]
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
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(','))
|
||||||
|
this.checkedIdList = idList
|
||||||
|
const checkedList = []
|
||||||
|
idList.map((id, index) => {
|
||||||
|
checkedList.push({
|
||||||
|
USID: id,
|
||||||
|
USNAME: nameList[index]
|
||||||
|
})
|
||||||
|
})
|
||||||
|
this.checkedList = checkedList
|
||||||
|
}
|
||||||
|
|
||||||
|
// this.getOrg()
|
||||||
|
// this.getRoleAndUserByOrgIdPage()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.org-table {
|
||||||
|
::v-deep .el-dialog__header {
|
||||||
|
padding: 0 20px;
|
||||||
|
height: 50px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
border-bottom: 1px solid #ddd;
|
||||||
|
}
|
||||||
|
::v-deep .el-dialog__body {
|
||||||
|
padding: 15px 20px 20px 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pagination {
|
||||||
|
position: static;
|
||||||
|
}
|
||||||
|
.checked-user-list {
|
||||||
|
display: flex;
|
||||||
|
flex-flow: row wrap;
|
||||||
|
justify-content: flex-start;
|
||||||
|
.el-tag {
|
||||||
|
margin: 0 10px 10px 0;
|
||||||
|
}
|
||||||
|
.el-button--mini {
|
||||||
|
padding: 0 15px;
|
||||||
|
height: 28px;
|
||||||
|
line-height: 28px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
::v-deep .el-popover__reference-wrapper {
|
||||||
|
.el-input__suffix {
|
||||||
|
padding-right: 5px;
|
||||||
|
&:hover {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
::v-deep .tag-column {
|
||||||
|
.cell {
|
||||||
|
padding: 5px 10px;
|
||||||
|
overflow: visible;
|
||||||
|
text-overflow: clip;
|
||||||
|
.tag-wrap {
|
||||||
|
.el-tag {
|
||||||
|
height: auto;
|
||||||
|
white-space: normal;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.done {
|
||||||
|
margin: 30px 20px 10px;
|
||||||
|
text-align: right;
|
||||||
|
padding:20px 0 10px ;
|
||||||
|
|
||||||
|
::v-deep .el-button {
|
||||||
|
width: 80px;
|
||||||
|
height: 36px;
|
||||||
|
padding: 0;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,402 @@
|
|||||||
|
<!-- ProcessFooter -->
|
||||||
|
<template>
|
||||||
|
<div class="process-footer" v-if="showSave || showSubmit || showCancel">
|
||||||
|
<div class="footer-line"></div>
|
||||||
|
<div class="btn-group-wrap" style="text-align: center">
|
||||||
|
<slot></slot>
|
||||||
|
<el-button
|
||||||
|
type="warning"
|
||||||
|
size="small"
|
||||||
|
class="common-button-warning"
|
||||||
|
@click="handleOnLineEdit"
|
||||||
|
v-if="showEdit">在线编辑</el-button>
|
||||||
|
<!-- <el-button-->
|
||||||
|
<!-- type="primary"-->
|
||||||
|
<!-- round-->
|
||||||
|
<!-- class="common-button-primary"-->
|
||||||
|
<!-- @click="handleEntrust"-->
|
||||||
|
<!-- :loading="isSubmit"-->
|
||||||
|
<!-- v-if="showEntrust">-->
|
||||||
|
<!-- <i class="iconfont" style="font-size: 12px;"></i>-->
|
||||||
|
<!-- 委托</el-button>-->
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
size="small"
|
||||||
|
class="common-button-primary"
|
||||||
|
@click="handleSendEmail"
|
||||||
|
:loading="sendEmailLoading"
|
||||||
|
v-if="showSendEmail"
|
||||||
|
>发送邮件</el-button>
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
class="common-button-danger"
|
||||||
|
size="small"
|
||||||
|
@click="handleOver"
|
||||||
|
:loading="submitLoading"
|
||||||
|
v-if="showOver"
|
||||||
|
>撤销申请</el-button>
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
size="small"
|
||||||
|
class="common-button-danger"
|
||||||
|
@click="beforeBack"
|
||||||
|
:loading="isSubmit"
|
||||||
|
v-if="showBack">
|
||||||
|
|
||||||
|
{{ backBTNText }}</el-button>
|
||||||
|
<div style="display: inline-block;">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
size="large"
|
||||||
|
class="common-button-primary"
|
||||||
|
@click="handleTransfer"
|
||||||
|
:loading="TransferLoading"
|
||||||
|
v-if="showTransfer" round
|
||||||
|
>转办</el-button>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
size="small"
|
||||||
|
class="common-button-primary"
|
||||||
|
@click="handleSave"
|
||||||
|
:loading="saveLoading"
|
||||||
|
v-if="showSave" round>
|
||||||
|
保存
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
size="large"
|
||||||
|
class="common-button-primary resetColor"
|
||||||
|
@click="handleReset"
|
||||||
|
:loading="resetLoading"
|
||||||
|
v-if="showReset" round>
|
||||||
|
重置
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
size="large"
|
||||||
|
class="common-button-primary submitColor"
|
||||||
|
@click="handleSubmit"
|
||||||
|
:loading="submitLoading"
|
||||||
|
v-if="showSubmit" round
|
||||||
|
>{{ submitBTNTextShow }}</el-button>
|
||||||
|
</div>
|
||||||
|
<!-- <el-button-->
|
||||||
|
<!-- style="float:right;margin-top: 12px;"-->
|
||||||
|
<!-- type="danger"-->
|
||||||
|
<!-- round-->
|
||||||
|
<!-- class="common-button-danger"-->
|
||||||
|
<!-- @click="cancel"-->
|
||||||
|
<!-- :loading="isSubmit"-->
|
||||||
|
<!-- v-if="showCancel">-->
|
||||||
|
<!-- <i class="iconfont" style="font-size: 12px;"></i>-->
|
||||||
|
<!-- 取消 </el-button>-->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 组织机构树 -->
|
||||||
|
<!-- <ProcessChooseTree-->
|
||||||
|
<!-- :visible.sync="visibleTree"-->
|
||||||
|
<!-- show-user-->
|
||||||
|
<!-- :dept-select="false"-->
|
||||||
|
<!-- @dblClick="handleAssigneeNew"-->
|
||||||
|
<!-- ></ProcessChooseTree>-->
|
||||||
|
|
||||||
|
<!-- 在线编辑 -->
|
||||||
|
<!-- <only-office-edit ref="onlyOffice" :visible.sync="visibleOnlyOffice"></only-office-edit>-->
|
||||||
|
|
||||||
|
<!-- 从全公司选人,2021-03-22(上汽大数据量人员解决方案) -->
|
||||||
|
<org-table
|
||||||
|
v-if="showEntrust"
|
||||||
|
:visible.sync="visibleTree"
|
||||||
|
:config="{
|
||||||
|
value: this.orgTableVal,
|
||||||
|
valueName: this.orgTableName
|
||||||
|
}"
|
||||||
|
title="委托"
|
||||||
|
:exclude-user="userId"
|
||||||
|
:max-selected="1"
|
||||||
|
max-selected-tips="当前任务只能委托给一个人"
|
||||||
|
dialog-model
|
||||||
|
@confirm="handleAssigneeNew"
|
||||||
|
></org-table>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
import { mapGetters } from 'vuex'
|
||||||
|
export default {
|
||||||
|
name: 'ProcessFooter',
|
||||||
|
mixins: [],
|
||||||
|
props: {
|
||||||
|
// 是否显示结束流程按钮
|
||||||
|
showOver: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
// 是否显示取消按钮
|
||||||
|
showCancel: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
// 是否显示保存按钮
|
||||||
|
showSave: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
// 是否显示重置按钮
|
||||||
|
showReset: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
// 是否显示发送邮件按钮
|
||||||
|
showSendEmail: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
// 发送邮件按钮loading
|
||||||
|
sendEmailLoading: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
// 是否显示提交按钮
|
||||||
|
showSubmit: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
// 是否显示委托按钮
|
||||||
|
showEntrust: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
// 是否显示退回按钮
|
||||||
|
showBack: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
// 是否显示转办按钮
|
||||||
|
showTransfer: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
// 提交按钮loading
|
||||||
|
submitLoading: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
// 保存按钮loading
|
||||||
|
saveLoading: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
resetLoading: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
// 转办按钮loading
|
||||||
|
TransferLoading: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
// 是否默认委托事件
|
||||||
|
defaultEntrust: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
// 是否显示在线编辑按钮
|
||||||
|
showEdit: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
// 标准编号(在线编辑)
|
||||||
|
standNo: {
|
||||||
|
type: String
|
||||||
|
},
|
||||||
|
// 未选择标准编号/企标编号进行在线编辑的提示
|
||||||
|
noStandNoTip: {
|
||||||
|
type: String,
|
||||||
|
default: '请选择或输入企标编号后进行在线编辑'
|
||||||
|
},
|
||||||
|
// 审批节点
|
||||||
|
approval: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
// 带有退回/驳回意见
|
||||||
|
opinion: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
submitBTNText: {
|
||||||
|
type: String
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
isSubmit: false,
|
||||||
|
visibleTree: false,
|
||||||
|
visibleOnlyOffice: false,
|
||||||
|
orgTableVal: '',
|
||||||
|
orgTableName: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleOver () {
|
||||||
|
this.$emit('over')
|
||||||
|
},
|
||||||
|
handleSave () {
|
||||||
|
this.$emit('save')
|
||||||
|
},
|
||||||
|
handleReset () {
|
||||||
|
this.$emit('reset')
|
||||||
|
},
|
||||||
|
handleSubmit () {
|
||||||
|
this.$emit('submit')
|
||||||
|
},
|
||||||
|
cancel () {
|
||||||
|
if (this.$store.state.detailMap !== '') {
|
||||||
|
this.$router.push({
|
||||||
|
path: this.$store.state.detailMap,
|
||||||
|
query: {
|
||||||
|
tabsName: this.$store.getters.getHandleInfo.tabsName
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.$store.commit('setDetailMap', '')
|
||||||
|
} else {
|
||||||
|
this.$router.push({
|
||||||
|
name: 'ProcessCenter',
|
||||||
|
query: {
|
||||||
|
tabsName: 'ProcessCenter'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// this.$emit('cancel')
|
||||||
|
},
|
||||||
|
handleSendEmail () {
|
||||||
|
this.$emit('sendEmail')
|
||||||
|
},
|
||||||
|
handleTransfer () {
|
||||||
|
this.$emit('transfer')
|
||||||
|
},
|
||||||
|
handleEntrust () {
|
||||||
|
if (this.defaultEntrust) {
|
||||||
|
this.visibleTree = true
|
||||||
|
} else {
|
||||||
|
this.$emit('entrust')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleBack () {
|
||||||
|
if (!this.opinion) {
|
||||||
|
this.$confirm(`您确定要${this.approval ? '驳回' : '退回'}该任务吗?`, '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning',
|
||||||
|
confirmButtonClass: 'common-button-primary'
|
||||||
|
|
||||||
|
}).then(() => {
|
||||||
|
this.$emit('back')
|
||||||
|
}).catch(() => {})
|
||||||
|
} else {
|
||||||
|
this.$emit('back')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: 委托
|
||||||
|
* @date: 2020-12-16 10:11:31
|
||||||
|
* @auth: chenxiaoxi
|
||||||
|
*/
|
||||||
|
handleAssigneeNew (checkedList, checkedIdList) {
|
||||||
|
if (!checkedList.length) { return false }
|
||||||
|
const assignee = checkedIdList[0]
|
||||||
|
const assigneeUserName = checkedList[0].userName
|
||||||
|
this.$confirm(`您确定要委托 ${assigneeUserName} 完成该任务吗?`, '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning',
|
||||||
|
confirmButtonClass: 'common-button-primary'
|
||||||
|
|
||||||
|
}).then(() => {
|
||||||
|
changeAssigneeNew({
|
||||||
|
taskId: this.$store.getters.getHandleInfo.taskIds, // 任务id
|
||||||
|
assignee, // 被委托人
|
||||||
|
userId: this.$store.getters.userInfo.userId, // 委托人
|
||||||
|
pId: this.$store.getters.getHandleInfo.prcId // 流程实例
|
||||||
|
}).then(res => {
|
||||||
|
if (res.success) {
|
||||||
|
this.$message.success('委托成功')
|
||||||
|
setTimeout(() => {
|
||||||
|
this.$router.push({
|
||||||
|
name: 'ProcessCenter'
|
||||||
|
})
|
||||||
|
}, 100)
|
||||||
|
this.visibleTree = false
|
||||||
|
} else {
|
||||||
|
this.$message.warning(res.message)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}).catch(() => {})
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: 在线编辑
|
||||||
|
* @date: 2021-01-08 10:32:16
|
||||||
|
* @auth: chenxiaoxi
|
||||||
|
*/
|
||||||
|
handleOnLineEdit () {
|
||||||
|
if (!this.standNo || this.standNo === '') {
|
||||||
|
this.$message.warning(this.noStandNoTip)
|
||||||
|
} else {
|
||||||
|
this.visibleOnlyOffice = true
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.onlyOffice.officeInit(this.standNo, this.standId)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
beforeBack () {
|
||||||
|
this.handleBack()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
// 提交按钮文字
|
||||||
|
submitBTNTextShow () {
|
||||||
|
return this.submitBTNText ? this.submitBTNText : this.approval ? '同意' : '提交'
|
||||||
|
},
|
||||||
|
// 退回按钮文字
|
||||||
|
backBTNText () {
|
||||||
|
return this.approval ? '驳回' : '退回'
|
||||||
|
},
|
||||||
|
userId () {
|
||||||
|
return this.userInfo.userId
|
||||||
|
},
|
||||||
|
...mapGetters(['userInfo'])
|
||||||
|
},
|
||||||
|
watch: {},
|
||||||
|
mounted () {
|
||||||
|
console.log(this.showCancel)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.process-footer {
|
||||||
|
line-height: 50px;
|
||||||
|
text-align: right;
|
||||||
|
background: #fff;
|
||||||
|
z-index: 999;
|
||||||
|
margin-top: 20px;
|
||||||
|
padding: 0;
|
||||||
|
.footer-line {
|
||||||
|
height: 1px;
|
||||||
|
box-shadow: 0 -1px 2px 0px #e8e8e8;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.resetColor{
|
||||||
|
background-color:#02a7f0 ;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
.submitColor{
|
||||||
|
background-color:#8400ff;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
<!-- 流程信息公共头部 -->
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<div class="prc-header-wrap">
|
||||||
|
<div class="processtitle">{{title}}</div>
|
||||||
|
<div class="processnum" v-if="proceesNum">流程编号:{{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>
|
||||||
+5
-1
@@ -2,7 +2,9 @@ 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 './assets/css/common.scss'
|
||||||
import config from '@/utils/config'
|
import config from '@/utils/config'
|
||||||
// VXETable
|
// VXETable
|
||||||
import 'xe-utils'
|
import 'xe-utils'
|
||||||
@@ -10,6 +12,7 @@ import VXETable from 'vxe-table'
|
|||||||
import 'vxe-table/lib/style.css'
|
import 'vxe-table/lib/style.css'
|
||||||
// ElementUI
|
// ElementUI
|
||||||
import ElementUI from 'element-ui'
|
import ElementUI from 'element-ui'
|
||||||
|
|
||||||
import './assets/css/element-variables.scss'
|
import './assets/css/element-variables.scss'
|
||||||
// ECharts
|
// ECharts
|
||||||
import 'echarts'
|
import 'echarts'
|
||||||
@@ -27,6 +30,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'
|
||||||
|
|||||||
@@ -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/examine'),
|
||||||
|
meta: {
|
||||||
|
crumb: ['权限申请']
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'step3',
|
||||||
|
name: 'urlIndex',
|
||||||
|
component: () => import('../../views/permissionApplication/examine'),
|
||||||
|
meta: {
|
||||||
|
crumb: ['权限申请']
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
export default routes
|
||||||
@@ -12,8 +12,16 @@ const routes = [
|
|||||||
component: () => import('../../views/userCenter/processCenter.vue'),
|
component: () => import('../../views/userCenter/processCenter.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
crumb: ['流程中心']
|
crumb: ['流程中心']
|
||||||
},
|
}
|
||||||
|
},
|
||||||
|
// 流程配置
|
||||||
|
{
|
||||||
|
path: 'processConfig',
|
||||||
|
name: 'processConfig',
|
||||||
|
component: () => import('../../views/userCenter/processConfig/index.vue'),
|
||||||
|
meta: {
|
||||||
|
crumb: ['流程配置']
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path:'monitorViews',
|
path:'monitorViews',
|
||||||
@@ -23,6 +31,5 @@ const routes = [
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
export default routes
|
export default routes
|
||||||
|
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
// 定义枚举
|
||||||
|
import Esenum from './index.js'
|
||||||
|
// 权限申请
|
||||||
|
export const PERMISSION = new Esenum([
|
||||||
|
{ label: '预览', value: 0 },
|
||||||
|
{ label: '预览+下载', value: 2 }
|
||||||
|
])
|
||||||
@@ -0,0 +1,103 @@
|
|||||||
|
export default class EsEunm {
|
||||||
|
constructor (obj) {
|
||||||
|
if (!obj) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
Object.keys(obj).forEach(key => {
|
||||||
|
const item = obj[key]
|
||||||
|
this.addAll(key, item)
|
||||||
|
})
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加枚举
|
||||||
|
* @param key
|
||||||
|
* @param item
|
||||||
|
*/
|
||||||
|
addAll (key, item) {
|
||||||
|
this[key] = item
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取到所有的枚举值列表
|
||||||
|
* @return {Array} list集合
|
||||||
|
*/
|
||||||
|
getItemList () {
|
||||||
|
const optionList = []
|
||||||
|
for (const key in this) {
|
||||||
|
const item = this[key]
|
||||||
|
const option = {}
|
||||||
|
Object.assign(option, item)
|
||||||
|
option.key = key
|
||||||
|
optionList.push(option)
|
||||||
|
}
|
||||||
|
optionList.sort((a, b) => {
|
||||||
|
const value1 = a.index
|
||||||
|
const value2 = b.index
|
||||||
|
return value1 - value2
|
||||||
|
})
|
||||||
|
return optionList
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 过滤掉不需要的值
|
||||||
|
* @params {Array,String} val 需要过滤掉的枚举对象的name值
|
||||||
|
* @return {Array} list集合
|
||||||
|
*/
|
||||||
|
getFilterItemList (val = []) {
|
||||||
|
let filterList = []
|
||||||
|
let valueArr = [] // 接受参数的整理
|
||||||
|
if (Array.isArray(val)) {
|
||||||
|
valueArr = val
|
||||||
|
} else {
|
||||||
|
valueArr.push(val)
|
||||||
|
}
|
||||||
|
const optionList = this.getItemList() // 得到的是list
|
||||||
|
filterList = optionList.filter(item => {
|
||||||
|
if (valueArr.includes(item.name)) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
})
|
||||||
|
return filterList
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据name获取到index
|
||||||
|
* @params {String} name 枚举的name值
|
||||||
|
* @return {Number} name对应的index值
|
||||||
|
*/
|
||||||
|
nameOfIndex (uname) {
|
||||||
|
if (!uname) {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
let index = ''
|
||||||
|
const optionList = this.getItemList()
|
||||||
|
optionList.forEach(item => {
|
||||||
|
if (uname.toString() === item.name.toString()) {
|
||||||
|
index = +item.index
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return index
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据index获取到name
|
||||||
|
* @params {Number} index 枚举的index值
|
||||||
|
* @return {String} index对应的name值
|
||||||
|
*/
|
||||||
|
indexOfName (index) {
|
||||||
|
if (index == undefined) {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
let uname = ''
|
||||||
|
const optionList = this.getItemList()
|
||||||
|
optionList.forEach(item => {
|
||||||
|
if (item.index !== undefined && item.index !== null && item.index == index) {
|
||||||
|
uname = item.name
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return uname
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
<el-input v-model="q.name" placeholder="请输入报告名称"></el-input>
|
<el-input v-model="q.name" placeholder="请输入报告名称"></el-input>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="6" align="right" class="tag-btns">
|
<el-col :span="6" align="right" class="tag-btns">
|
||||||
<el-button type="primary" @click="search">查询</el-button>
|
<el-button type="primary" @click="search">查询</el-button>
|
||||||
<el-button type="default" @click="reset">重置</el-button>
|
<el-button type="default" @click="reset">重置</el-button>
|
||||||
@@ -92,29 +92,34 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-col> -->
|
</el-col> -->
|
||||||
|
|
||||||
|
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
|
<el-row class="tag-btn">
|
||||||
|
<el-button type="primary" size="big" @click="permissionApp">权限申请</el-button>
|
||||||
|
</el-row>
|
||||||
<div class="table">
|
<div class="table">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="4" class="treeList">
|
<el-col :span="4" class="treeList">
|
||||||
<el-input placeholder="输入关键字进行过滤" v-model="filterText">
|
<el-input placeholder="输入关键字进行过滤" v-model="filterText">
|
||||||
</el-input>
|
</el-input>
|
||||||
<el-tree
|
<el-tree
|
||||||
class="filter-tree"
|
class="filter-tree"
|
||||||
:data="treeData"
|
:data="treeData"
|
||||||
show-checkbox
|
show-checkbox
|
||||||
node-key="id"
|
node-key="id"
|
||||||
default-expand-all
|
default-expand-all
|
||||||
:filter-node-method="filterNode"
|
:filter-node-method="filterNode"
|
||||||
ref="tree"
|
ref="tree"
|
||||||
>
|
>
|
||||||
</el-tree>
|
</el-tree>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="19">
|
<el-col :span="19">
|
||||||
<vxe-table :data="tableData" :empty-render="{name: 'NotData'}" align="center" border stripe v-table-min-height="'calc(100vh - 420px)'">
|
<vxe-table ref="xTable" :data="tableData" :empty-render="{name: 'NotData'}" align="center" border stripe v-table-min-height="'calc(100vh - 420px)'"
|
||||||
<vxe-column show-overflow show-header-overflow type="seq" title="序号" width="77">
|
@checkbox-all="selectAllEvent" @checkbox-change="selectChangeEvent">
|
||||||
|
<vxe-column type="checkbox" width="60"></vxe-column>
|
||||||
|
<vxe-column show-overflow show-header-overflow type="seq" title="序号" width="77">
|
||||||
<template #default="{ row, rowIndex }">
|
<template #default="{ row, rowIndex }">
|
||||||
{{ rowIndex + (q.pageNo - 1) * q.pageSize + 1 }}
|
{{ rowIndex + (q.pageNo - 1) * q.pageSize + 1 }}
|
||||||
</template>
|
</template>
|
||||||
@@ -154,7 +159,7 @@
|
|||||||
<!-- <el-button type="text" @click="downloadRow(row)">下载</el-button>-->
|
<!-- <el-button type="text" @click="downloadRow(row)">下载</el-button>-->
|
||||||
</template>
|
</template>
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
|
|
||||||
</vxe-table>
|
</vxe-table>
|
||||||
<el-pagination
|
<el-pagination
|
||||||
@size-change="handleSizeChange"
|
@size-change="handleSizeChange"
|
||||||
@@ -166,10 +171,10 @@
|
|||||||
:total="total"/>
|
:total="total"/>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!--预览-->
|
<!--预览-->
|
||||||
@@ -299,6 +304,8 @@ export default {
|
|||||||
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
content: '',
|
||||||
|
checkIds: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@@ -311,6 +318,24 @@ export default {
|
|||||||
if (!value) return true;
|
if (!value) return true;
|
||||||
return data.label.indexOf(value) !== -1;
|
return data.label.indexOf(value) !== -1;
|
||||||
},
|
},
|
||||||
|
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
|
||||||
|
})
|
||||||
|
},
|
||||||
|
permissionApp () {
|
||||||
|
this.$router.push({
|
||||||
|
path: '/permission/step1',
|
||||||
|
query: { id: 'AEHJB8YNJ3', ids: this.checkIds.toString() }
|
||||||
|
})
|
||||||
|
},
|
||||||
init () {
|
init () {
|
||||||
this.labelList()
|
this.labelList()
|
||||||
this.reportDateList()
|
this.reportDateList()
|
||||||
@@ -440,15 +465,6 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.treeList{
|
|
||||||
padding: 20px;
|
|
||||||
box-shadow: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04);
|
|
||||||
margin-right: 20px;
|
|
||||||
.filter-tree{
|
|
||||||
margin-top: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
.report-list {
|
.report-list {
|
||||||
.title {
|
.title {
|
||||||
border-bottom: 1px solid #EBEEF5;
|
border-bottom: 1px solid #EBEEF5;
|
||||||
@@ -462,7 +478,9 @@ export default {
|
|||||||
color: #262626;
|
color: #262626;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.tag-btn{
|
||||||
|
padding: 10px 13px;
|
||||||
|
}
|
||||||
.tag-search {
|
.tag-search {
|
||||||
padding-top: 9px;
|
padding-top: 9px;
|
||||||
|
|
||||||
@@ -486,11 +504,11 @@ export default {
|
|||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
color: #646464;
|
color: #646464;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
// width: 112px;
|
width: 112px;
|
||||||
height: 19px;
|
height: 19px;
|
||||||
line-height: 19px;
|
line-height: 19px;
|
||||||
padding-left: 13px;
|
padding-left: 48px;
|
||||||
// border-right: 1px solid #BFBFBF;
|
border-right: 1px solid #BFBFBF;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
margin-top: 2.5px;
|
margin-top: 2.5px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|||||||
@@ -50,8 +50,7 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
<div class="table">
|
<div class="table">
|
||||||
<vxe-table :data="tableData" :empty-render="{ name: 'NotData' }" align="center" border stripe
|
<vxe-table ref="xTable" :data="tableData" :empty-render="{name: 'NotData'}" align="center" border stripe v-table-min-height="'calc(100vh - 320px)'">
|
||||||
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 }">
|
||||||
{{ rowIndex + (q.pageNo - 1) * q.pageSize + 1 }}
|
{{ rowIndex + (q.pageNo - 1) * q.pageSize + 1 }}
|
||||||
@@ -524,7 +523,7 @@ export default {
|
|||||||
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);
|
||||||
},
|
},
|
||||||
|
|
||||||
/* =============================================== 操作日志 =============================================== */
|
/* =============================================== 操作日志 =============================================== */
|
||||||
// 操作日志
|
// 操作日志
|
||||||
openLog() {
|
openLog() {
|
||||||
|
|||||||
@@ -0,0 +1,134 @@
|
|||||||
|
<template>
|
||||||
|
<div class="AuditOperationBox">
|
||||||
|
<el-form
|
||||||
|
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"
|
||||||
|
label-width="132px" class="add-form-item"
|
||||||
|
:class="{'form-item-disabled': formdisableflag}">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="examineForm.date"
|
||||||
|
type="date"
|
||||||
|
placeholder="选择赋权时间">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<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" >
|
||||||
|
<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>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'AuditOperation',
|
||||||
|
props: ['query'],
|
||||||
|
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
examineForm: {
|
||||||
|
planReasonFile: '',
|
||||||
|
oldName: '',
|
||||||
|
flag: '1'
|
||||||
|
},
|
||||||
|
examineFormRules: {
|
||||||
|
date: [
|
||||||
|
{ required: true, message: '选择赋权时间不能为空', trigger: 'change' }
|
||||||
|
],
|
||||||
|
oldName: [
|
||||||
|
{ required: true, message: '添加指派不能为空', trigger: 'change' }
|
||||||
|
],
|
||||||
|
flag: [
|
||||||
|
{ required: true, message: '审核结果不能为空', trigger: 'change' }
|
||||||
|
],
|
||||||
|
approvalOpinion: [
|
||||||
|
{ type: 'string', max: 1000, message: '审批意见不能超过1000个字符', trigger: 'blur' }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
formdisableflag: false
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created () {
|
||||||
|
// 判断穿过来的query里的参数 是不是查看
|
||||||
|
if (this.query.isViewDetails && this.query.isViewDetails === 1) {
|
||||||
|
this.examineForm = this.query
|
||||||
|
this.formdisableflag = true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
|
||||||
|
/** 在提交表单的校验 通过继续执行 */
|
||||||
|
submit () {
|
||||||
|
this.isSubmit = false
|
||||||
|
this.$refs.examineForm.validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
this.isSubmit = true
|
||||||
|
return true
|
||||||
|
} else {
|
||||||
|
this.$message.warning('请检查表单是否填写正确')
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.AssignButton {
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.AssignButton:hover {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,301 @@
|
|||||||
|
<template>
|
||||||
|
|
||||||
|
<el-dialog
|
||||||
|
title="添加报告"
|
||||||
|
:visible.sync="dialogVisible"
|
||||||
|
width="50%"
|
||||||
|
class="addreport"
|
||||||
|
:before-close="handleClose">
|
||||||
|
<el-form
|
||||||
|
:model="searchForm "
|
||||||
|
inline
|
||||||
|
class="search-area search-new "
|
||||||
|
|
||||||
|
@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-form>
|
||||||
|
<div class="table">
|
||||||
|
<vxe-table :data="tableData" :empty-render="{name: 'NotData'}" align="center" border stripe max-height="100%"
|
||||||
|
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-table>
|
||||||
|
<el-pagination
|
||||||
|
class="pagination"
|
||||||
|
@size-change="handleLogSizeChange"
|
||||||
|
@current-change="handleLogCurrentChange"
|
||||||
|
:current-page="q.pageNo"
|
||||||
|
:page-sizes="[5, 10, 20]"
|
||||||
|
:page-size="q.pageSize"
|
||||||
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
:total="total"/>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="done">
|
||||||
|
<el-button type="primary" @click.native="savaCheck">确定</el-button>
|
||||||
|
<el-button type="default" @click.native="handleClose">取消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'reportDialog',
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
processTable: [],
|
||||||
|
total: 0,
|
||||||
|
q: {
|
||||||
|
pageSize: 10,
|
||||||
|
pageNo: 1
|
||||||
|
},
|
||||||
|
searchForm: {
|
||||||
|
|
||||||
|
},
|
||||||
|
checkIds: [],
|
||||||
|
dialogVisible: false,
|
||||||
|
tableData: [],
|
||||||
|
ids: [], // 存储已经存在的报告
|
||||||
|
checkList: [],
|
||||||
|
yearList: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
// 获取标签
|
||||||
|
tagsForm: {
|
||||||
|
type: Object
|
||||||
|
},
|
||||||
|
// 获取已有的数据 在查询全部数据时不展示已有的
|
||||||
|
alreadyData: {
|
||||||
|
type: Array
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
search () {
|
||||||
|
this.q.pageNo = 1
|
||||||
|
this.reportList()
|
||||||
|
},
|
||||||
|
// 日期列表
|
||||||
|
reportDateList () {
|
||||||
|
this.$api.report.reportDateList().then(({ data }) => {
|
||||||
|
this.yearList = data.list
|
||||||
|
})
|
||||||
|
},
|
||||||
|
savaCheck () {
|
||||||
|
// 点击保存 需要把选中的数据传给父组件
|
||||||
|
const name = []
|
||||||
|
const ids = []
|
||||||
|
this.alreadyData.forEach(item => {
|
||||||
|
if (this.checkIds.indexOf(item.id) > -1) {
|
||||||
|
name.push(item.name)
|
||||||
|
ids.push(item.id)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.checkList = this.checkList.filter(item => {
|
||||||
|
return ids.indexOf(item.id) === -1
|
||||||
|
})
|
||||||
|
if (name.length > 0) {
|
||||||
|
this.$alert(`报告${name.toString()}已经存在`, '提示', {
|
||||||
|
confirmButtonText: '确定'
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 找出已经存在的数据 用弹窗提示
|
||||||
|
this.$emit('confirm', this.checkList)
|
||||||
|
this.dialogVisible = false
|
||||||
|
},
|
||||||
|
show () {
|
||||||
|
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.total = 0
|
||||||
|
this.tableData = []
|
||||||
|
this.reportList()
|
||||||
|
},
|
||||||
|
// 列表
|
||||||
|
reportList () {
|
||||||
|
this.$api.report.reportList({ ...this.q, ...this.searchForm }).then(({ data }) => {
|
||||||
|
this.tableData = data.records
|
||||||
|
this.total = data.total
|
||||||
|
this.q.pageNo = data.current
|
||||||
|
this.q.pageSize = data.size
|
||||||
|
if (!data.records.length && this.q.pageNo !== 1) {
|
||||||
|
this.q.pageNo = 1
|
||||||
|
this.reportList()
|
||||||
|
}
|
||||||
|
this.dialogVisible = true
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleClose () {
|
||||||
|
this.$refs.xTable.clearSelected()
|
||||||
|
this.dialogVisible = false
|
||||||
|
},
|
||||||
|
handleLogSizeChange (size) {
|
||||||
|
this.q.pageSize = size
|
||||||
|
this.reportList()
|
||||||
|
},
|
||||||
|
handleLogCurrentChange (page) {
|
||||||
|
this.q.pageNo = page
|
||||||
|
this.reportList()
|
||||||
|
},
|
||||||
|
selectAllEvent ({ checked }) {
|
||||||
|
const records = this.$refs.xTable.getCheckboxRecords()
|
||||||
|
this.checkList = records
|
||||||
|
this.checkIds = records.map(item => {
|
||||||
|
return item.id
|
||||||
|
})
|
||||||
|
},
|
||||||
|
selectChangeEvent ({ checked }) {
|
||||||
|
const records = this.$refs.xTable.getCheckboxRecords()
|
||||||
|
this.checkList = records
|
||||||
|
this.checkIds = records.map(item => {
|
||||||
|
return item.id
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.table{
|
||||||
|
padding: 10px 20px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.addreport{
|
||||||
|
::v-deep .el-dialog__header {
|
||||||
|
padding: 0 20px;
|
||||||
|
height: 50px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
border-bottom: 1px solid #ddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .el-dialog__body {
|
||||||
|
padding: 15px 20px 20px 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.done {
|
||||||
|
margin: 10px 20px 10px;
|
||||||
|
text-align: right;
|
||||||
|
|
||||||
|
::v-deep .el-button {
|
||||||
|
width: 80px;
|
||||||
|
height: 36px;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.tag-search {
|
||||||
|
padding-top: 9px;
|
||||||
|
|
||||||
|
::v-deep .el-date-picker,
|
||||||
|
::v-deep .el-input {
|
||||||
|
width: 240px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tag-item {
|
||||||
|
margin-bottom: 15px;
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
.year {
|
||||||
|
::v-deep .el-input__inner {
|
||||||
|
padding: 0 15px !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
label.tag-title {
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: normal;
|
||||||
|
color: #646464;
|
||||||
|
display: inline-block;
|
||||||
|
width: 112px;
|
||||||
|
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 {
|
||||||
|
flex: 1;
|
||||||
|
margin-right: 28px;
|
||||||
|
height: 19px;
|
||||||
|
overflow: hidden;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
&.active {
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .check-active{
|
||||||
|
.el-checkbox__label{
|
||||||
|
color: #434343;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .el-checkbox {
|
||||||
|
margin-right: 15px;
|
||||||
|
color: #434343;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .el-checkbox__label {
|
||||||
|
min-width: 80px;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .el-checkbox-group {
|
||||||
|
display: inline;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-icon-arrow-down,
|
||||||
|
.el-icon-arrow-up {
|
||||||
|
color: #C0C4CC;
|
||||||
|
cursor: pointer;
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: 2px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.tag-btns {
|
||||||
|
padding-right: 15px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,213 @@
|
|||||||
|
<template>
|
||||||
|
<div class="reportTable">
|
||||||
|
<el-button v-if="!disabled" class="addbtn" size="small" @click="addReport">添加报告</el-button>
|
||||||
|
<el-button v-if="!disabled" class="delbtn" size="small" @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="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="报告年份" width="200" ></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 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>-->
|
||||||
|
</template>
|
||||||
|
</vxe-column>
|
||||||
|
</vxe-table>
|
||||||
|
<el-pagination
|
||||||
|
class="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"/>
|
||||||
|
<reportDialog ref="reportDialog" :tagsForm="tagsForm" :alreadyData="value" @confirm="addReportList"></reportDialog>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import reportDialog from './reportDialog'
|
||||||
|
export default {
|
||||||
|
name: 'reportTable',
|
||||||
|
props: {
|
||||||
|
value: {
|
||||||
|
type: Array,
|
||||||
|
default: new Array([]),
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
disabled: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
reportDialog
|
||||||
|
},
|
||||||
|
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.qLog.pageSize = 10
|
||||||
|
this.qLog.pageNo = 1
|
||||||
|
this.total = this.value.length
|
||||||
|
this.processTable = this.value.slice(0, 9)
|
||||||
|
this.pageChage(1)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created () {
|
||||||
|
// this.copyTableData = JSON.parse(JSON.stringify(this.tableData))
|
||||||
|
this.labelList()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
addReportList (list) {
|
||||||
|
this.$emit('updateTable', [...this.value , ...list])
|
||||||
|
},
|
||||||
|
pageChage (current) {
|
||||||
|
this.total = this.value.length
|
||||||
|
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
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleLogSizeChange (val) {
|
||||||
|
this.qLog.pageSize = val
|
||||||
|
this.qLog.pageNo = 1
|
||||||
|
this.pageChage(1)
|
||||||
|
},
|
||||||
|
handleLogCurrentChange (val) {
|
||||||
|
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 => {
|
||||||
|
return item.id
|
||||||
|
})
|
||||||
|
},
|
||||||
|
selectChangeEvent ({ checked }) {
|
||||||
|
const records = this.$refs.xTable.getCheckboxRecords()
|
||||||
|
this.checkIds = records.map(item => {
|
||||||
|
return item.id
|
||||||
|
})
|
||||||
|
},
|
||||||
|
addReport () {
|
||||||
|
this.$refs.reportDialog.show()
|
||||||
|
},
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
.addbtn{
|
||||||
|
border: none;
|
||||||
|
background-color: #8400FF;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
.delbtn{
|
||||||
|
border: none;
|
||||||
|
background-color: #d9001b;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,172 @@
|
|||||||
|
<template>
|
||||||
|
<!-- 此页面主要展示审核和已完成-->
|
||||||
|
<div class="process">
|
||||||
|
<div class="process_box">
|
||||||
|
<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}" :disabled="formControl"></report-table>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-form ref="form" :model="applicationForm" label-width="150px"
|
||||||
|
class="label-input-form" size="medium" :rules="applicationFormRule"
|
||||||
|
:disabled="formControl">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="9">
|
||||||
|
<el-form-item label="申请原因:" prop="name">
|
||||||
|
<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-option
|
||||||
|
v-for="item in PERMISSION"
|
||||||
|
: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>
|
||||||
|
<process-approval-history></process-approval-history>
|
||||||
|
</div>
|
||||||
|
<div class="content">
|
||||||
|
<span class="base_title">审核信息</span>
|
||||||
|
<audit-operation ref="operationRef"></audit-operation>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<process-footer
|
||||||
|
showCancel
|
||||||
|
:show-transfer="isShowTran"
|
||||||
|
:show-submit="isShowSubmit"
|
||||||
|
:submitLoading="isSubmit"
|
||||||
|
:TransferLoading="tranLoading"
|
||||||
|
@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>
|
||||||
|
|
||||||
|
<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'
|
||||||
|
import { PERMISSION } from '@/utils/Enum/enum'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'launch',
|
||||||
|
components: {
|
||||||
|
processHeader,
|
||||||
|
reportTable,
|
||||||
|
processFooter,
|
||||||
|
processApprovalHistory,
|
||||||
|
auditOperation,
|
||||||
|
processChooseTree
|
||||||
|
},
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
visibleTree: false,
|
||||||
|
isSubmit: false,
|
||||||
|
tranLoading: false,
|
||||||
|
isShowTran: true,
|
||||||
|
isShowSubmit: true,
|
||||||
|
formControl: true,
|
||||||
|
assignForm: {},
|
||||||
|
tableData: [],
|
||||||
|
applicationForm: {},
|
||||||
|
q: {
|
||||||
|
pageSize: 10000,
|
||||||
|
pageNo: 1
|
||||||
|
},
|
||||||
|
PERMISSION,
|
||||||
|
applicationFormRule: {
|
||||||
|
name: [{
|
||||||
|
max: 1000, message: '申请原因最多填写1000字符'
|
||||||
|
}],
|
||||||
|
send: [{
|
||||||
|
required: true,
|
||||||
|
message: '请选择申请权限'
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
assignFormRules: {
|
||||||
|
name1: [{
|
||||||
|
required: true,
|
||||||
|
message: '请选择一级审批人员'
|
||||||
|
}],
|
||||||
|
name2: [{
|
||||||
|
required: true,
|
||||||
|
message: '请选择二级审批人员'
|
||||||
|
}],
|
||||||
|
remark: [{
|
||||||
|
max: 1000, message: '说明最多填写1000字符'
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created () {
|
||||||
|
if (this.$route.query.ids) {
|
||||||
|
this.reportList(this.$route.query.ids)
|
||||||
|
}
|
||||||
|
console.log(this.PERMISSION, 'ddd')
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 获取表格列表 吧查询到的值传给子组件
|
||||||
|
reportList (ids) {
|
||||||
|
this.$api.report.reportList({ id: ids }).then(({ data }) => {
|
||||||
|
this.tableData = data.records
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 转办
|
||||||
|
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)
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
},
|
||||||
|
handleSubmit () {
|
||||||
|
if (this.$refs.operationRef.submit()) {
|
||||||
|
// 通过了校验 需要整合参数
|
||||||
|
console.log('斤斤计较')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,251 @@
|
|||||||
|
<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="applicationFormRef" :model="applicationForm" label-width="150px"
|
||||||
|
class="label-input-form" size="medium" :rules="applicationFormRule"
|
||||||
|
>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="9">
|
||||||
|
<el-form-item label="申请原因:" prop="name">
|
||||||
|
<el-input :disabled="formControl" 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 :disabled="formControl" v-model="applicationForm.send" placeholder="请选择申请权限">
|
||||||
|
<el-option
|
||||||
|
v-for="item in PERMISSION"
|
||||||
|
: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" v-if="initShow">
|
||||||
|
<span class="base_title">审批历史</span>
|
||||||
|
<process-approval-history></process-approval-history>
|
||||||
|
</div>
|
||||||
|
<div class="content">
|
||||||
|
<span class="base_title">指派信息</span>
|
||||||
|
<el-form ref="assignFormRef" :model="assignForm" label-width="150px"
|
||||||
|
:rules="assignFormRules" class="label-input-form" size="medium">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="9">
|
||||||
|
<el-form-item label="选择一级审批人员:" prop="name1">
|
||||||
|
<el-input readonly :disabled="formControl" v-model="assignForm.name1" @click.native="handleCheck('spr1')"
|
||||||
|
placeholder="请选择一级审批人员"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="9" >
|
||||||
|
<el-form-item label="选择二级审批人员:" prop="name2">
|
||||||
|
<el-input readonly :disabled="formControl" v-model="assignForm.name2" @click.native="handleCheck('spr2')"
|
||||||
|
placeholder="请选择二级审批人员"></el-input>
|
||||||
|
<!-- <el-input v-model="assignForm.name2" placeholder="请选择二级审批人员"></el-input>-->
|
||||||
|
<!-- <el-select v-model="assignForm.name2"-->
|
||||||
|
<!-- class="icon-auth"-->
|
||||||
|
<!-- multiple-->
|
||||||
|
<!-- collapse-tags-->
|
||||||
|
<!-- @change="changeSelect"-->
|
||||||
|
<!-- @visible-change="changeSelect"-->
|
||||||
|
<!-- placeholder="请选择">-->
|
||||||
|
<!-- <el-checkbox class="check-all" v-model="checked" @change="selectAll">全选</el-checkbox>-->
|
||||||
|
<!-- <template v-for="item in userList">-->
|
||||||
|
<!-- <el-option :label="item.USNAME" :value="item.USID" :key="item.USID"></el-option>-->
|
||||||
|
<!-- </template>-->
|
||||||
|
<!-- </el-select>-->
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24" >
|
||||||
|
<el-form-item label="说明:">
|
||||||
|
<el-input type="textarea" v-model="assignForm.remark" placeholder="请输入说明"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<process-footer
|
||||||
|
showCancel
|
||||||
|
:show-reset="isShowReset"
|
||||||
|
:show-submit="isShowSubmit"
|
||||||
|
:submitLoading="isSubmit"
|
||||||
|
:resetLoading="resetLoading"
|
||||||
|
@reset="handleReset"
|
||||||
|
@submit="handleSubmit"
|
||||||
|
></process-footer>
|
||||||
|
<orgTable :visible.sync="visibleOrgTable" title="人员列表" dialog-model :config="{
|
||||||
|
value: orgTableVal,
|
||||||
|
valueName: orgTableValName
|
||||||
|
}" :workNumFlag="true" :maxSelected="1" @confirm="isTreeOk"></orgTable>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import processHeader from '@/components/ProcessHeader'
|
||||||
|
import processFooter from '@/components/ProcessFooter'
|
||||||
|
import processApprovalHistory from '@/components/ProcessApprovalHistory'
|
||||||
|
import reportTable from './components/reportTable'
|
||||||
|
import { PERMISSION } from '@/utils/Enum/enum'
|
||||||
|
import orgTable from '../../components/OrgTable'
|
||||||
|
export default {
|
||||||
|
name: 'launch',
|
||||||
|
components: {
|
||||||
|
processHeader,
|
||||||
|
reportTable,
|
||||||
|
processFooter,
|
||||||
|
processApprovalHistory,
|
||||||
|
orgTable
|
||||||
|
},
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
initShow: false, // 控制审批历史是否显示
|
||||||
|
treeType: '',
|
||||||
|
orgTableVal: '',
|
||||||
|
orgTableValName: '',
|
||||||
|
visibleOrgTable: false,
|
||||||
|
isSubmit: false,
|
||||||
|
resetLoading: false,
|
||||||
|
isShowReset: true,
|
||||||
|
isShowSubmit: true,
|
||||||
|
formControl: false,
|
||||||
|
assignForm: {
|
||||||
|
name1: '',
|
||||||
|
name2: ''
|
||||||
|
},
|
||||||
|
tableData: [],
|
||||||
|
applicationForm: {},
|
||||||
|
q: {
|
||||||
|
pageSize: 10000,
|
||||||
|
pageNo: 1
|
||||||
|
},
|
||||||
|
PERMISSION,
|
||||||
|
applicationFormRule: {
|
||||||
|
name: [{
|
||||||
|
max: 1000, message: '申请原因最多填写1000字符'
|
||||||
|
}],
|
||||||
|
send: [{
|
||||||
|
required: true,
|
||||||
|
message: '请选择申请权限'
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
assignFormRules: {
|
||||||
|
name1: [{
|
||||||
|
required: true,
|
||||||
|
message: '请选择一级审批人员',
|
||||||
|
trigger: 'change'
|
||||||
|
}],
|
||||||
|
name2: [{
|
||||||
|
required: true,
|
||||||
|
message: '请选择二级审批人员',
|
||||||
|
trigger: 'change'
|
||||||
|
}],
|
||||||
|
remark: [{
|
||||||
|
max: 1000, message: '说明最多填写1000字符'
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created () {
|
||||||
|
// 第一次进入此页面 需要清楚校验
|
||||||
|
if (this.$route.query.ids) {
|
||||||
|
this.reportList(this.$route.query.ids)
|
||||||
|
this.handleReset()
|
||||||
|
}
|
||||||
|
console.log(this.PERMISSION, 'ddd')
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
|
||||||
|
handleCheck (name) {
|
||||||
|
this.treeType = name
|
||||||
|
this.orgTableVal = ''
|
||||||
|
this.orgTableValName = ''
|
||||||
|
if (name === 'spr1') {
|
||||||
|
this.orgTableVal = this.assignForm.name1Id
|
||||||
|
this.orgTableValName = this.assignForm.name1
|
||||||
|
} else {
|
||||||
|
this.orgTableVal = this.assignForm.name2Id
|
||||||
|
this.orgTableValName = this.assignForm.name2
|
||||||
|
}
|
||||||
|
this.visibleOrgTable = true
|
||||||
|
},
|
||||||
|
// 树点击
|
||||||
|
isTreeOk (checkedList) {
|
||||||
|
// console.log(checkedList)
|
||||||
|
const parts = []
|
||||||
|
const partsName = []
|
||||||
|
console.log(checkedList, '0009999')
|
||||||
|
checkedList.map((item, index) => {
|
||||||
|
parts.push(item.userId || item.USID)
|
||||||
|
partsName.push(item.uname)
|
||||||
|
})
|
||||||
|
this.qcrList = checkedList
|
||||||
|
if (this.treeType === 'spr1') {
|
||||||
|
this.assignForm.name1Id = parts.toString()
|
||||||
|
this.assignForm.name1 = partsName.toString()
|
||||||
|
} else if (this.treeType === 'spr2') {
|
||||||
|
this.assignForm.name2Id = parts.toString()
|
||||||
|
this.assignForm.name2 = partsName.toString()
|
||||||
|
}
|
||||||
|
console.log(this.assignForm.name1Id, this.assignForm.name2Id)
|
||||||
|
},
|
||||||
|
// 获取表格列表 吧查询到的值传给子组件
|
||||||
|
reportList (ids) {
|
||||||
|
this.$api.report.reportList({ id: ids }).then(({ data }) => {
|
||||||
|
this.tableData = data.records
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleReset () {
|
||||||
|
this.applicationForm = {
|
||||||
|
}
|
||||||
|
this.assignForm = {
|
||||||
|
name1: '',
|
||||||
|
name2: ''
|
||||||
|
}
|
||||||
|
this.$refs.applicationFormRef.clearValidate()
|
||||||
|
this.$refs.assignFormRef.clearValidate()
|
||||||
|
},
|
||||||
|
// 提交
|
||||||
|
handleSubmit () {
|
||||||
|
this.$refs.assignFormRef.validate(v => {
|
||||||
|
this.$refs.applicationFormRef.validate(m => {
|
||||||
|
if (v && m) {
|
||||||
|
// 过了校验 需要把数据都整合 this.tableData this.applicationForm this.assignForm
|
||||||
|
// 表格数据没有不能提交 需要提示
|
||||||
|
if (this.tableData.length > 0) {
|
||||||
|
this.$message.warning('至少需要选择一条报告数据')
|
||||||
|
} else {
|
||||||
|
// 调用流程数据
|
||||||
|
console.log("发送数据")
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.$message.warning('请检查表单填写完整')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -6,11 +6,11 @@
|
|||||||
<div class="searchForm">
|
<div class="searchForm">
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<div>流程编号:</div>
|
<div>流程编号:</div>
|
||||||
<el-input v-model="form.id" ></el-input>
|
<el-input v-model="form.id" ></el-input>
|
||||||
</div>
|
</div>
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<div>流程名称:</div>
|
<div>流程名称:</div>
|
||||||
<el-input v-model="form.name"></el-input>
|
<el-input v-model="form.name"></el-input>
|
||||||
</div>
|
</div>
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<el-button type="primary" @click="search">查询</el-button>
|
<el-button type="primary" @click="search">查询</el-button>
|
||||||
@@ -91,14 +91,14 @@ import tabs from '../userCenter/processCenter/tabs.vue'
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
.tabs{
|
.tabs{
|
||||||
margin: 20px 0 0 13px;
|
margin: 20px 0 0 13px;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
::v-deep .el-input{
|
::v-deep .el-input{
|
||||||
width: 200px;
|
width: 200px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -0,0 +1,125 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog :close-on-click-modal="false"
|
||||||
|
:visible="visible"
|
||||||
|
:title="title"
|
||||||
|
@close="closeDialog"
|
||||||
|
width="400px"
|
||||||
|
>
|
||||||
|
<div>
|
||||||
|
<el-form
|
||||||
|
ref="form"
|
||||||
|
:model="formData"
|
||||||
|
:rules="formRules"
|
||||||
|
class="label-input-form"
|
||||||
|
label-width="100px"
|
||||||
|
inline
|
||||||
|
>
|
||||||
|
<el-form-item label="流程类型" prop="category" class="add-form-item">
|
||||||
|
<el-select v-model="formData.category" placeholder="请选择流程类型" clearable>
|
||||||
|
<el-option v-for="opt in typeList" :value="opt.value" :key="opt.value" :label="opt.label">{{ opt.label}}</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
<div slot="footer">
|
||||||
|
<el-button round class="common-button-default" icon="el-icon-close" @click="closeDialog">{{$t('m.cancel')}}</el-button>
|
||||||
|
<el-button round class="common-button-primary" icon="el-icon-check" type="primary" @click="confirmDialog">{{$t('m.confirm')}}</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
const formData = {
|
||||||
|
category: '',
|
||||||
|
}
|
||||||
|
export default {
|
||||||
|
name: 'EditProcessClassification',
|
||||||
|
props: ['data', 'visible'],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
formData: {},
|
||||||
|
formRules: {},
|
||||||
|
typeList: [] // 类型下拉框
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
computed: {
|
||||||
|
title() {
|
||||||
|
return !!this.data ? '编辑' : '新增'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
watch: {
|
||||||
|
data(newValue) {
|
||||||
|
this.formData = newValue || {...formData}
|
||||||
|
},
|
||||||
|
visible(newValue) {
|
||||||
|
this.formData = this.data || {...formData}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
mounted() {
|
||||||
|
this.formData = this.data || {...formData}
|
||||||
|
},
|
||||||
|
|
||||||
|
created() {
|
||||||
|
this.queryTablePage()
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
|
||||||
|
// 查询、加载表格
|
||||||
|
queryTablePage () {
|
||||||
|
const formData = {
|
||||||
|
// page: this.pageNo,
|
||||||
|
// pageSize: this.$store.getters.userInfo.configContent,
|
||||||
|
// standNumber: this.searchForm.standardKey
|
||||||
|
}
|
||||||
|
this.$http.get('lawss/activiti/categoryList',
|
||||||
|
formData,
|
||||||
|
{
|
||||||
|
_this: this,
|
||||||
|
loading: 'tableDataLoading'
|
||||||
|
},
|
||||||
|
res => {
|
||||||
|
this.typeList = res.result.map(item => {
|
||||||
|
return {
|
||||||
|
label: item.type,
|
||||||
|
value: item.objectId
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// this.total = res.data.count
|
||||||
|
}, e => {})
|
||||||
|
},
|
||||||
|
|
||||||
|
closeDialog() {
|
||||||
|
// this.visible = false
|
||||||
|
this.$emit('close')
|
||||||
|
this.formData = {}
|
||||||
|
},
|
||||||
|
|
||||||
|
confirmDialog() {
|
||||||
|
const url = !this.data ? 'lawss/activiti/addCategory' : 'lawss/activiti/updatModel'
|
||||||
|
const formData = {
|
||||||
|
modelId: this.formData.id,
|
||||||
|
categoryId: this.formData.category
|
||||||
|
}
|
||||||
|
this.$http.get(url, formData, {
|
||||||
|
_this: this
|
||||||
|
}, res => {
|
||||||
|
if (res.success) {
|
||||||
|
console.log('新增/编辑成功')
|
||||||
|
this.$emit('success')
|
||||||
|
this.$emit('close')
|
||||||
|
}
|
||||||
|
|
||||||
|
}, e => {
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="" scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,103 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog :close-on-click-modal="false"
|
||||||
|
:visible="visible"
|
||||||
|
:title="title"
|
||||||
|
:before-close="closeDialog"
|
||||||
|
width="400px"
|
||||||
|
>
|
||||||
|
<div>
|
||||||
|
<el-form
|
||||||
|
ref="formData"
|
||||||
|
:model="formData"
|
||||||
|
:rules="formRules"
|
||||||
|
class="label-input-form"
|
||||||
|
label-width="100px"
|
||||||
|
inline
|
||||||
|
>
|
||||||
|
<el-form-item label="流程类型名称" prop="type" class="add-form-item">
|
||||||
|
<el-input v-model="formData.type" placeholder="请输入流程类型名称" ></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
<div slot="footer">
|
||||||
|
<el-button round class="common-button-default" icon="el-icon-close" @click="closeDialog">{{$t('m.cancel')}}</el-button>
|
||||||
|
<el-button round class="common-button-primary" icon="el-icon-check" type="primary" @click="confirmDialog">{{$t('m.confirm')}}</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
const formData = {
|
||||||
|
type: '',
|
||||||
|
}
|
||||||
|
export default {
|
||||||
|
name: 'EditProcessClassification',
|
||||||
|
props: ['data', 'visible'],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
formData: {},
|
||||||
|
formRules: {
|
||||||
|
type: [
|
||||||
|
{ required: true, message: '请输入流程类型名称', trigger: 'change' }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
computed: {
|
||||||
|
title() {
|
||||||
|
return !!this.data ? '编辑' : '新增'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
watch: {
|
||||||
|
data(newValue) {
|
||||||
|
this.formData = newValue || {...formData}
|
||||||
|
this.$refs['formData'].resetFields()
|
||||||
|
},
|
||||||
|
visible(newValue) {
|
||||||
|
this.formData = this.data || {...formData}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
mounted() {
|
||||||
|
this.formData = this.data || {...formData}
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
closeDialog() {
|
||||||
|
// this.visible = false
|
||||||
|
this.$refs['formData'].resetFields()
|
||||||
|
this.$emit('close')
|
||||||
|
this.formData = {}
|
||||||
|
},
|
||||||
|
|
||||||
|
confirmDialog() {
|
||||||
|
const url = !this.data ? 'lawss/activiti/addCategory' : 'lawss/activiti/editCategory'
|
||||||
|
const formData = {
|
||||||
|
objectId: this.formData.objectId,
|
||||||
|
type: this.formData.type
|
||||||
|
}
|
||||||
|
this.$refs['formData'].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
this.$http.postData(url, formData, {
|
||||||
|
_this: this
|
||||||
|
}, res => {
|
||||||
|
if (res.success) {
|
||||||
|
console.log('新增/编辑成功')
|
||||||
|
this.$emit('success')
|
||||||
|
this.$emit('close')
|
||||||
|
}
|
||||||
|
|
||||||
|
}, e => {
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="" scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,540 @@
|
|||||||
|
<template>
|
||||||
|
<div style="height: 100%;background-color: #fff;position: relative;overflow: hidden;">
|
||||||
|
<div style="height:50px;margin-top: 20px;overflow:hidden;">
|
||||||
|
<el-form class="hight_form label-input-form" :modal="processForm" :inline="true"
|
||||||
|
label-width="103px" @keyup.enter.native="queryTablePage()">
|
||||||
|
<el-col :xl="6" :lg="8" >
|
||||||
|
<el-form-item label="流程名称:" prop="name" class="search-item search-item-last">
|
||||||
|
<el-input :maxlength='100' v-model="processForm.name"
|
||||||
|
placeholder="请输入流程名称"
|
||||||
|
clearable/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :xl=" 6" :lg="8">
|
||||||
|
<el-form-item class="btn-box">
|
||||||
|
<el-button size="small" type="primary"
|
||||||
|
class="common-button-primary img-button"
|
||||||
|
@click="queryTablePage()">查询
|
||||||
|
</el-button>
|
||||||
|
<el-button size="small" class="common-button-default img-button"
|
||||||
|
@click="clearAllSearchs('standCommonlySearch')">
|
||||||
|
重置
|
||||||
|
</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
<div class="action-bar" style="text-align: left;width:100%;">
|
||||||
|
<el-button
|
||||||
|
size="small"
|
||||||
|
type="primary"
|
||||||
|
class="common-button-primary img-button"
|
||||||
|
@click="addRow"
|
||||||
|
>新增
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
<div style="height: 100%;">
|
||||||
|
<!--<table-tools-bar>-->
|
||||||
|
<!-- <div slot="left">-->
|
||||||
|
<!-- <div class="search-area">-->
|
||||||
|
<!-- <el-form :model="searchForm" inline class="label-input-form">-->
|
||||||
|
<!-- <el-form-item :label="$t('m.standardNumAndName')" prop="standardKey" class="search-item">-->
|
||||||
|
<!-- <el-input-->
|
||||||
|
<!-- v-model="searchForm.standardKey"-->
|
||||||
|
<!-- :placeholder="$t('m.standardNumAndNameTips')"-->
|
||||||
|
<!-- clearable-->
|
||||||
|
<!-- :maxlength="100"/>-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<!-- <el-form-item class="search-item btn-box">-->
|
||||||
|
<!-- <el-button-->
|
||||||
|
<!-- icon="el-icon-search"-->
|
||||||
|
<!-- type="primary"-->
|
||||||
|
<!-- class="common-button-primary"-->
|
||||||
|
<!-- round-->
|
||||||
|
<!-- @click="searchBtn"-->
|
||||||
|
<!-- ></el-button>-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<!-- <el-form-item class="search-item btn-box">-->
|
||||||
|
<!-- <el-button-->
|
||||||
|
<!-- class="common-button-default"-->
|
||||||
|
<!-- icon="el-icon-refresh-left"-->
|
||||||
|
<!-- round-->
|
||||||
|
<!-- @click="resetSearchForm">{{$t('m.clearQuery')}}</el-button>-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<!-- </el-form>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!--</table-tools-bar>-->
|
||||||
|
<!-- v-btn-permission="'XBRKH5BP5K'"-->
|
||||||
|
<div class="content">
|
||||||
|
|
||||||
|
<loading :loading="tableDataLoading">加载中...</loading>
|
||||||
|
<el-table
|
||||||
|
border
|
||||||
|
ref="selection"
|
||||||
|
:data="tableList"
|
||||||
|
tooltip-effect="dark"
|
||||||
|
style="width: 100%;"
|
||||||
|
height="100%"
|
||||||
|
@sort-change="sortChange($event, 'queryTablePage')"
|
||||||
|
:header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px',
|
||||||
|
fontWeight: 'bold', height: '48px'}"
|
||||||
|
row-key="id"
|
||||||
|
>
|
||||||
|
<el-table-column
|
||||||
|
type="index"
|
||||||
|
width="55"
|
||||||
|
label="序号"
|
||||||
|
align="center">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="name"
|
||||||
|
label="流程名称"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="categoryName"
|
||||||
|
label="流程类型"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="createTime" sortable="custom"
|
||||||
|
label="创建时间">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{$moment(scope.row.createTime).format('YYYY-MM-DD HH:mm:ss')}}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column label="操作" align="center" width="60" fixed="right">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div @click.stop style="display: inline-block">
|
||||||
|
<el-dropdown trigger="click" @command="handleCommand">
|
||||||
|
<el-button type="text" class="text" style="padding: 0">更多</el-button>
|
||||||
|
<el-dropdown-menu slot="dropdown">
|
||||||
|
<el-dropdown-item v-btn-permission="'B44TL4SB6RRC6MNLBYMS'" :command="[scope.row, '编辑']">
|
||||||
|
编辑
|
||||||
|
</el-dropdown-item>
|
||||||
|
<el-dropdown-item v-btn-permission="'THJ77DKLPVHP9FHU7BQ6'" :command="[scope.row, '部署']">
|
||||||
|
部署
|
||||||
|
</el-dropdown-item>
|
||||||
|
<el-dropdown-item v-btn-permission="'HHD8BQ2DM4T3MFY73GXL'" :command="[scope.row, '复制']">
|
||||||
|
复制
|
||||||
|
</el-dropdown-item>
|
||||||
|
<el-dropdown-item v-btn-permission="'CK8WF2ESAS7XV7MSFW5X'" :command="[scope.row, '删除']">
|
||||||
|
删除
|
||||||
|
</el-dropdown-item>
|
||||||
|
<el-dropdown-item v-btn-permission="'7U5RD92APKFDYQ8YWQ2S'" :command="[scope.row, '流程']">
|
||||||
|
流程人员配置
|
||||||
|
</el-dropdown-item>
|
||||||
|
<el-dropdown-item v-btn-permission="'SQHZVHRSX69SD96XRBSQ'" :command="[scope.row, '预设']" v-if="processId.indexOf(scope.row.id)>-1">
|
||||||
|
预设人员配置
|
||||||
|
</el-dropdown-item>
|
||||||
|
<el-dropdown-item v-btn-permission="'HVTVWZ32Y32XT7XXDYF9'" :command="[scope.row, '提示']">
|
||||||
|
提示语配置
|
||||||
|
</el-dropdown-item>
|
||||||
|
</el-dropdown-menu>
|
||||||
|
</el-dropdown>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
<pagination :total="total" :page="pageNo" @pageChange="pageChange" @pageSizeChange="pageSizeChange"></pagination>
|
||||||
|
|
||||||
|
<edit-process
|
||||||
|
:visible="editRowDialogVisible"
|
||||||
|
:data="editRowDialogData"
|
||||||
|
@close="handleEditRowDialogClose"
|
||||||
|
@success="handleEditRowDialogSuccess"
|
||||||
|
></edit-process>
|
||||||
|
<el-dialog :close-on-click-modal="false"
|
||||||
|
:visible="visible"
|
||||||
|
:title="title"
|
||||||
|
@close="closeDialog"
|
||||||
|
width="400px"
|
||||||
|
>
|
||||||
|
<el-form
|
||||||
|
ref="form"
|
||||||
|
:model="formData"
|
||||||
|
class="label-input-form"
|
||||||
|
label-width="100px"
|
||||||
|
inline
|
||||||
|
>
|
||||||
|
<el-form-item label="流程类型" prop="category" class="add-form-item">
|
||||||
|
<el-select v-model="formData.category" placeholder="请选择流程类型" clearable>
|
||||||
|
<el-option v-for="opt in typeList" :value="opt.value" :key="opt.value" :label="opt.label">{{
|
||||||
|
opt.label}}
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="模型名称" class="add-form-item">
|
||||||
|
<el-input
|
||||||
|
v-model="formData.name"
|
||||||
|
placeholder="请输入模型名称"
|
||||||
|
clearable
|
||||||
|
:maxlength="100"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="模型描述" class="add-form-item">
|
||||||
|
<el-input
|
||||||
|
v-model="formData.desc"
|
||||||
|
placeholder="请输入模型描述"
|
||||||
|
clearable
|
||||||
|
:maxlength="100"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer">
|
||||||
|
<el-button size="small" class="common-button-default" @click="closeDialog">
|
||||||
|
取消
|
||||||
|
</el-button>
|
||||||
|
<el-button size="small" class="common-button-primary" type="primary"
|
||||||
|
@click="confirmDialog">确认
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import EditProcess from './components/EditProcess'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'ProcessClassification',
|
||||||
|
components: { EditProcess },
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
tableDataLoading: false,
|
||||||
|
total: 0,
|
||||||
|
visible: false,
|
||||||
|
formData: {},
|
||||||
|
title: '添加流程',
|
||||||
|
selectRoleId: '',
|
||||||
|
typeList: [],
|
||||||
|
searchForm: {
|
||||||
|
standardKey: ''
|
||||||
|
},
|
||||||
|
pageNo: this.$route.params.page ? (+this.$route.params.page) : 1,
|
||||||
|
pageSize: 10,
|
||||||
|
tableList: [],
|
||||||
|
editRowDialogVisible: false,
|
||||||
|
editRowDialogData: undefined, // 新增时为 undefined null 或者 false 即可
|
||||||
|
nowOrder: 'prder',
|
||||||
|
processId: ['6450334', '6465017', '6482501', '6482508', '6485001', '6482515'],
|
||||||
|
processForm: {
|
||||||
|
name: ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
// 表格排序
|
||||||
|
sortChange (sortObj, tableName) {
|
||||||
|
console.log(sortObj)
|
||||||
|
if (sortObj.order === 'ascending') {
|
||||||
|
this.nowOrder = 'asc'
|
||||||
|
} else if (sortObj.order === 'descending') {
|
||||||
|
this.nowOrder = 'desc'
|
||||||
|
} else {
|
||||||
|
this.nowOrder = 'prder'
|
||||||
|
}
|
||||||
|
this[tableName]()
|
||||||
|
},
|
||||||
|
// 根据条件查询信息
|
||||||
|
searchBtn () {
|
||||||
|
this.resetPageNo()
|
||||||
|
this.queryTablePage()
|
||||||
|
},
|
||||||
|
closeDialog () {
|
||||||
|
this.visible = false
|
||||||
|
},
|
||||||
|
confirmDialog () {
|
||||||
|
const formData = {
|
||||||
|
category: this.formData.category,
|
||||||
|
desc: this.formData.desc,
|
||||||
|
name: this.formData.name
|
||||||
|
}
|
||||||
|
this.$http.get('lawss/activiti/createModel',
|
||||||
|
formData,
|
||||||
|
{
|
||||||
|
_this: this,
|
||||||
|
loading: 'tableDataLoading'
|
||||||
|
},
|
||||||
|
res => {
|
||||||
|
if (res.success) {
|
||||||
|
this.$message.warning(res.message)
|
||||||
|
this.visible = false
|
||||||
|
this.queryTablePage()
|
||||||
|
}
|
||||||
|
}, e => {
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 重置搜索表单并重新加载表格数据
|
||||||
|
*/
|
||||||
|
resetSearchForm () {
|
||||||
|
this.searchForm.standardKey = ''
|
||||||
|
// this.resetSearchForm()
|
||||||
|
this.queryTablePage()
|
||||||
|
},
|
||||||
|
|
||||||
|
pageChange (page) {
|
||||||
|
this.pageNo = page
|
||||||
|
this.queryTablePage()
|
||||||
|
},
|
||||||
|
|
||||||
|
pageSizeChange () {
|
||||||
|
this.queryTablePage()
|
||||||
|
},
|
||||||
|
|
||||||
|
resetPageNo () {
|
||||||
|
this.pageNo = 1
|
||||||
|
},
|
||||||
|
querytypeList () {
|
||||||
|
const formData = {
|
||||||
|
...this.processForm
|
||||||
|
// page: this.pageNo,
|
||||||
|
// pageSize: this.$store.getters.userInfo.configContent,
|
||||||
|
// standNumber: this.searchForm.standardKey
|
||||||
|
}
|
||||||
|
this.$http.get('lawss/activiti/categoryList',
|
||||||
|
formData,
|
||||||
|
{
|
||||||
|
_this: this,
|
||||||
|
loading: 'tableDataLoading'
|
||||||
|
},
|
||||||
|
res => {
|
||||||
|
this.typeList = res.result.map(item => {
|
||||||
|
return {
|
||||||
|
label: item.type,
|
||||||
|
value: item.objectId
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// this.total = res.data.count
|
||||||
|
}, e => {
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 查询、加载表格
|
||||||
|
queryTablePage () {
|
||||||
|
const formData = {
|
||||||
|
current: this.pageNo,
|
||||||
|
size: this.$store.getters.userInfo.configContent,
|
||||||
|
order: this.nowOrder,
|
||||||
|
...this.processForm
|
||||||
|
// standNumber: this.searchForm.standardKey
|
||||||
|
}
|
||||||
|
this.$http.get('lawss/activiti/modelListPage',
|
||||||
|
formData,
|
||||||
|
{
|
||||||
|
_this: this,
|
||||||
|
loading: 'tableDataLoading'
|
||||||
|
},
|
||||||
|
res => {
|
||||||
|
if (res.success) {
|
||||||
|
this.tableList = res.result.records
|
||||||
|
this.total = res.result.total
|
||||||
|
} else {
|
||||||
|
this.tableList = []
|
||||||
|
this.total = 0
|
||||||
|
this.$message.warning(res.message)
|
||||||
|
}
|
||||||
|
}, e => {
|
||||||
|
})
|
||||||
|
},
|
||||||
|
clearAllSearchs () {
|
||||||
|
this.processForm = { name: '' }
|
||||||
|
this.queryTablePage()
|
||||||
|
},
|
||||||
|
// 点击查看
|
||||||
|
handlePreview (item) {
|
||||||
|
console.log('item', item)
|
||||||
|
const routeUrl = this.$router.resolve({
|
||||||
|
name: 'OtherStandardDetails',
|
||||||
|
params: {
|
||||||
|
id: item.id,
|
||||||
|
pageType: 'INLAND_STAND'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
window.open(routeUrl.href, '_blank')
|
||||||
|
},
|
||||||
|
|
||||||
|
// 表格行 - 点击更多 事件
|
||||||
|
handleCommand (command) {
|
||||||
|
switch (command[1]) {
|
||||||
|
case '编辑':
|
||||||
|
this.$router.push({
|
||||||
|
path: '/ProcessMapping',
|
||||||
|
query: { id: command[0].id }
|
||||||
|
})
|
||||||
|
// this.editRow(command[0])
|
||||||
|
break
|
||||||
|
case '删除':
|
||||||
|
this.deleteRow(command[0])
|
||||||
|
break
|
||||||
|
case '复制':
|
||||||
|
this.copyModel(command[0].id)
|
||||||
|
break
|
||||||
|
case '部署':
|
||||||
|
this.deploy(command[0].id)
|
||||||
|
break
|
||||||
|
case '流程':
|
||||||
|
this.nodeConfiguration(command[0])
|
||||||
|
break
|
||||||
|
case '预设':
|
||||||
|
this.preSet(command[0])
|
||||||
|
break
|
||||||
|
case '提示':
|
||||||
|
this.showTip(command[0])
|
||||||
|
break
|
||||||
|
}
|
||||||
|
},
|
||||||
|
deploy (modelId) {
|
||||||
|
this.$confirm('确认部署该条数据?', '确认部署', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
confirmButtonClass: 'common-button-primary',
|
||||||
|
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
this.$http.get('lawss/activiti/deploy', {
|
||||||
|
modelId: modelId
|
||||||
|
}, {
|
||||||
|
_this: this
|
||||||
|
}, res => {
|
||||||
|
if (res.success) {
|
||||||
|
this.$message.warning(res.message)
|
||||||
|
this.queryTablePage()
|
||||||
|
}
|
||||||
|
}, e => {
|
||||||
|
})
|
||||||
|
}).catch(() => {
|
||||||
|
})
|
||||||
|
},
|
||||||
|
copyModel (modelId) {
|
||||||
|
this.$confirm('确认复制该条数据?', '确认复制', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
confirmButtonClass: 'common-button-primary',
|
||||||
|
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
this.$http.get('/lawss/activiti/copyModel', {
|
||||||
|
modelId: modelId
|
||||||
|
}, {
|
||||||
|
_this: this
|
||||||
|
}, res => {
|
||||||
|
if (res.success) {
|
||||||
|
this.$router.push({
|
||||||
|
path: '/ProcessMapping',
|
||||||
|
query: { id: res.result }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}, e => {
|
||||||
|
})
|
||||||
|
}).catch(() => {
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 删除
|
||||||
|
deleteRow (row) {
|
||||||
|
this.$confirm('确认删除该条数据?', '确认删除', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
confirmButtonClass: 'common-button-primary',
|
||||||
|
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
const id = row.id
|
||||||
|
const oDate1 = new Date('2021-09-22 15:00:00')
|
||||||
|
const oDate2 = new Date(row.createTime)
|
||||||
|
if (oDate1.getTime() > oDate2.getTime()) {
|
||||||
|
this.$message.warning('原始流程不可以删除')
|
||||||
|
} else {
|
||||||
|
this.$http.get('/lawss/activiti/deleteModel', {
|
||||||
|
modelId: id
|
||||||
|
}, {
|
||||||
|
_this: this
|
||||||
|
}, res => {
|
||||||
|
this.$message.success(res.message)
|
||||||
|
this.queryTablePage()
|
||||||
|
}, e => {
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
})
|
||||||
|
},
|
||||||
|
preSet (row) {
|
||||||
|
row.page = this.pageNo
|
||||||
|
this.$router.push({
|
||||||
|
path: '/presetPersonnel',
|
||||||
|
query: { id: row.id }
|
||||||
|
})
|
||||||
|
},
|
||||||
|
nodeConfiguration (row) {
|
||||||
|
row.page = this.pageNo
|
||||||
|
this.$router.push({
|
||||||
|
path: '/nodeConfiguration',
|
||||||
|
query: row
|
||||||
|
})
|
||||||
|
},
|
||||||
|
showTip (row) {
|
||||||
|
row.page = this.pageNo
|
||||||
|
this.$router.push({
|
||||||
|
path: '/promptConfiguration',
|
||||||
|
query: row
|
||||||
|
})
|
||||||
|
},
|
||||||
|
editRow (row) {
|
||||||
|
this.editRowDialogData = { ...row }
|
||||||
|
this.editRowDialogVisible = true
|
||||||
|
},
|
||||||
|
|
||||||
|
handleEditRowDialogClose () {
|
||||||
|
this.editRowDialogVisible = false
|
||||||
|
},
|
||||||
|
|
||||||
|
handleEditRowDialogSuccess () {
|
||||||
|
this.queryTablePage()
|
||||||
|
},
|
||||||
|
|
||||||
|
addRow () {
|
||||||
|
this.visible = true
|
||||||
|
// this.$router.push({
|
||||||
|
// path: '/ProcessMapping',
|
||||||
|
// query:{id:0}
|
||||||
|
// })
|
||||||
|
// this.editRowDialogData = undefined
|
||||||
|
// this.editRowDialogVisible = true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created () {
|
||||||
|
// this.queryTablePage()
|
||||||
|
// this.querytypeList()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.content {
|
||||||
|
padding: 0 10px;
|
||||||
|
height: 100px;
|
||||||
|
}
|
||||||
|
::v-deep .label-input-form .el-input__inner{
|
||||||
|
border-radius: 20px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-divider-low {
|
||||||
|
margin: 15px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-area {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-group {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 20px;
|
||||||
|
right: 20px;
|
||||||
|
background: #ffffff;
|
||||||
|
z-index: 999;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
+3
-2
@@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user