【修改】修改报告上传流程

This commit is contained in:
zhoulingpo
2023-05-09 09:20:54 +08:00
parent 4bd06f2360
commit 64bee0eb7d
15 changed files with 660 additions and 368 deletions
+190 -16
View File
@@ -3,6 +3,155 @@
<div>
<!-- 弹窗,dialogModel则作为单独组件使用 -->
<el-dialog
v-if="isOrg"
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-input v-model="searchForm.orgName" maxlength="50" placeholder="请输入部门名称"></el-input>
</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.orgCode"/>
</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="orgName"
align="center"
show-overflow-tooltip>
</el-table-column>
<el-table-column
label="部门编码"
width="120"
:prop="orgCode"
align="center"
show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="orgLevel"
label="部门级别"
align="center"
show-overflow-tooltip>
</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 || item.orgName}}
</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-dialog
v-else
append-to-body
:title="showTitle"
:visible.sync="isVisible"
@@ -211,6 +360,10 @@ export default {
name: 'OrgTable',
mixins: [],
props: {
isOrg: {
type: Boolean,
default: false
},
title: {
type: String,
default: '组织机构'
@@ -422,6 +575,8 @@ export default {
} else if (!chkItem.uname && chkItem.USNAME) {
chkItem.uname = chkItem.USNAME
chkItem.USNAME = chkItem.USNAME
}else{
chkItem.orgName = chkItem.orgName
}
})
this.$emit('confirm', this.checkedList, checkedIdList)
@@ -531,23 +686,42 @@ export default {
}
// let this.notUserId.length > 0 ? this.notUserId.toString() : null
// getRoleAndUserByOrgIdPage(
if(this.isOrg){
this.$api.org.sysOrgList(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)
}
})
}else{
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)
}
})
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) {