案件包分案相关
This commit is contained in:
parent
f8163fc394
commit
eb11d66e67
295
src/components/uploadImportPackage.vue
Normal file
295
src/components/uploadImportPackage.vue
Normal file
@ -0,0 +1,295 @@
|
||||
<template>
|
||||
<div class="upload-file-wrap">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="span" v-if="isInCount">
|
||||
<div class="el-col-ctn-box-import">
|
||||
<div class="el-col-upload-box">
|
||||
<el-upload
|
||||
class="el-upload-box"
|
||||
ref="upload"
|
||||
drag
|
||||
action=""
|
||||
:accept="accept"
|
||||
:show-file-list="false"
|
||||
:http-request="httpRequest"
|
||||
|
||||
>
|
||||
<div class="upload-file">
|
||||
<div class="f14 color-text-secondary text-center">
|
||||
<span class="color-1960F4">点击上传</span>
|
||||
<span class="m-h-8 color-000">/</span>拖拽到此区域
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</el-upload>
|
||||
<div class="text-center color-text-secondary f12 p-v-8">请上传Excel文件,大小在60M以内</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</el-col>
|
||||
<!--上传的图片预览-->
|
||||
<el-col :span="span" v-for="(item,i) in lists" :key="i" >
|
||||
<div class="el-col-ctn-box-import"
|
||||
@click="handlePreview(item)">
|
||||
<div class="el-col-upload-box">
|
||||
<div class="upload-preview-box">
|
||||
<img v-if="item.deletable && !readOnly"
|
||||
class="upload-delete-icon" src="../assets/image/icon_close.png" alt=""
|
||||
@click.stop.prevent="handleDelete(item, i)">
|
||||
<div class="upload-file">
|
||||
<el-image class="el-image-upload" :src="item.iconFrontSrc" fit="scale-down"></el-image>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="f14 text-center color-text-regular line-height-30">
|
||||
{{showFileName ? item.fileName : uploadName}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import projectConfig from "../services/projectConfig";
|
||||
export default {
|
||||
name: "uploadFile",
|
||||
props: {
|
||||
span: {
|
||||
// layout组件参数,每排排列几个
|
||||
type: Number,
|
||||
default: 5
|
||||
},
|
||||
accept: {
|
||||
type: String,
|
||||
default: '*',
|
||||
},
|
||||
imageHeight: {
|
||||
// 图片、上传框的高度
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
imageMode: {
|
||||
// 图片裁剪、缩放的模式,具体参考uni image
|
||||
type: String,
|
||||
default: 'aspectFit'
|
||||
},
|
||||
readOnly: {
|
||||
// 只读,true-是,false-否
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
|
||||
fileList: {
|
||||
// 已上传的文件列表
|
||||
type: [Array, Object],
|
||||
default: () => {
|
||||
return [
|
||||
//{ url:文件地址, fileName: 文件名}
|
||||
]
|
||||
}
|
||||
},
|
||||
uploadName: {
|
||||
// 要上传的文件昵称
|
||||
type: String,
|
||||
default: '上传'
|
||||
},
|
||||
maxCount: {
|
||||
// 允许上传文件的最大总数
|
||||
type: Number,
|
||||
default: 1
|
||||
},
|
||||
selectCount: {
|
||||
// 每次上传时,允许用户选择的文件数量
|
||||
type: Number,
|
||||
default: 1
|
||||
},
|
||||
customUpload: {
|
||||
// 自定义上传按钮的样式
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
autoUpload: {
|
||||
// 是否自动上传
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
showFileName: {
|
||||
// 是否显示文件名
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
splitFileTitle: {
|
||||
// 是否在显示效果上分割文件、文件名
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
lists: [
|
||||
//{url: 文件地址, fileName: 文件名, deletable: 是否可删除, readStatus: 是否显示阅读状态, iconFrontSrc: 图标样式}
|
||||
],
|
||||
srcList: [],
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
isInCount() {
|
||||
return (this.lists.length < this.maxCount) && !this.readOnly
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
// 监听文件列表的变化,重新整理内部数据
|
||||
fileList: {
|
||||
immediate: true,
|
||||
handler() {
|
||||
this.formatFileList()
|
||||
}
|
||||
},
|
||||
|
||||
},
|
||||
methods: {
|
||||
formatFileList() {
|
||||
let fileList = this.fileList || []
|
||||
this.srcList = []
|
||||
fileList = JSON.parse(JSON.stringify(fileList))
|
||||
// console.log('upload===========formatFileList()方法==========fileList:', fileList)
|
||||
const lists = fileList.map(item => {
|
||||
let obj = Object.assign(item)
|
||||
obj.deletable = typeof(obj.deletable) === 'boolean' ? obj.deletable : true
|
||||
let text = obj.url || obj.fileName
|
||||
obj.fileType = this.$util.getFileExtension(text)
|
||||
// 统一显示文件对应的图标(前端图片地址)
|
||||
obj.iconFrontSrc = this.$util.getIcon(obj)
|
||||
let previewUrl = `/manage-center/minio/preview/${obj.url}`
|
||||
if(obj.url.includes('http')){
|
||||
previewUrl = obj.url
|
||||
}
|
||||
obj.previewUrl = previewUrl
|
||||
if(this.$util.getFileType(text) === 'image') {
|
||||
// 如果是图片,直接显示图片
|
||||
obj.iconFrontSrc = obj.previewUrl
|
||||
}
|
||||
this.srcList.push(obj.iconFrontSrc)
|
||||
return obj
|
||||
});
|
||||
this.lists = lists
|
||||
console.log('uploadFile----:', this.lists)
|
||||
// this.isInCount = (lists.length < this.maxCount) && !this.readOnly
|
||||
},
|
||||
async httpRequest(param) {
|
||||
console.log('httpRequest上传文件:',param)
|
||||
let fileType = this.$util.getFileExtension(param.file.name)
|
||||
if(this.accept !== '*' && this.accept.indexOf(fileType) === -1) {
|
||||
this.$message.warning(`不能上传${fileType}格式的文件`)
|
||||
return
|
||||
}
|
||||
|
||||
let size = param.file.size/1024/1024
|
||||
if(size > 60){
|
||||
this.$message.warning(`文件大小不能超过60M`)
|
||||
return
|
||||
}
|
||||
try{
|
||||
let formData = new FormData()
|
||||
// console.log('上传时的',param.file)
|
||||
formData.append('file', param.file)
|
||||
// let uploadFileRes = await fetchApi.uploadFile(formData);
|
||||
let uploadFileRes = await this.$fetchApi.uploadFile(formData);
|
||||
// console.log(uploadFileRes,11111)
|
||||
let fileList = JSON.parse(JSON.stringify(this.fileList))
|
||||
fileList.push({
|
||||
url: uploadFileRes.url,
|
||||
})
|
||||
this.$emit('handleUploadFile',{fileList:fileList,uploadFileRes:uploadFileRes})
|
||||
|
||||
}catch (e) {
|
||||
this.$message.error(e.msg)
|
||||
}
|
||||
},
|
||||
async handlePreview(item) {
|
||||
console.log(item)
|
||||
try {
|
||||
let res = await this.$fetchApi.getMinioToken({objectName: item.url})
|
||||
console.log(res)
|
||||
window.open(`${item.previewUrl}?token=${res}`, '_target')
|
||||
}catch (e) {
|
||||
this.$message.error(e.msg || e)
|
||||
}
|
||||
},
|
||||
handleDelete(item, i) {
|
||||
this.lists.splice(i, 1)
|
||||
let fileList = JSON.parse(JSON.stringify(this.fileList))
|
||||
fileList.splice(i, 1)
|
||||
this.$emit('handleUploadFile', {fileList:fileList,uploadFileRes:{}})
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.el-col-ctn-box-import{
|
||||
width: 344px;
|
||||
height: 180px;
|
||||
.el-col-upload-box{
|
||||
width: 344px;
|
||||
height: 180px;
|
||||
border-radius: 4px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.el-upload-dragger{
|
||||
width: 100%;
|
||||
height: 144px;
|
||||
}
|
||||
.el-upload-box{
|
||||
width: 100%;
|
||||
height: 144px;
|
||||
// border: 2px dashed #EBEEF5;
|
||||
}
|
||||
}
|
||||
|
||||
.el-col-ctn-box-import .el-upload,
|
||||
.el-col-ctn-box-import .upload-file{
|
||||
width: 100% !important;
|
||||
}
|
||||
.el-col-ctn-box-import .upload-preview-box{
|
||||
position: relative;
|
||||
height: 144px;
|
||||
border: 1px dashed #EBEEF5;
|
||||
}
|
||||
.el-col-ctn-box-import .upload-delete-icon{
|
||||
width: 30px;
|
||||
height: auto;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
cursor: pointer;
|
||||
z-index: 11111;
|
||||
}
|
||||
.el-col-ctn-box-import .upload-file{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
height: 144px;
|
||||
}
|
||||
.el-col-ctn-box-import .uploader-file-icon{
|
||||
font-size: 32px;
|
||||
color: $color-text-secondary;
|
||||
}
|
||||
.el-col-ctn-box-import .el-image-upload{
|
||||
border-radius: 4px;
|
||||
padding: 5px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.el-col-ctn-box-import .txt-center{
|
||||
height: 40px;
|
||||
line-height: 20px;
|
||||
}
|
||||
.line-height-30{
|
||||
line-height: 30px;
|
||||
}
|
||||
</style>
|
||||
@ -15,12 +15,12 @@
|
||||
<el-col :span="24">
|
||||
|
||||
<div class="flex-row align-items-center">
|
||||
<div class="mr-8 flex-shrink-0">部门</div>
|
||||
<div class="mr-8 flex-shrink-0">区域</div>
|
||||
<div class="width100">
|
||||
<el-select v-model="deptIds"
|
||||
size="medium"
|
||||
multiple
|
||||
clearable placeholder="请选择部门"
|
||||
clearable placeholder="请选择区域"
|
||||
@change="handleChangeDept"
|
||||
class="width100">
|
||||
<el-option
|
||||
@ -112,7 +112,7 @@ import api from "@/services/caseManagement";
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
deptIds:[],//获取部门id集合
|
||||
deptIds:[],//获取区域id集合
|
||||
queryParam:{
|
||||
planStartTime:'',
|
||||
planEndTime:'',
|
||||
@ -147,7 +147,7 @@ import api from "@/services/caseManagement";
|
||||
]
|
||||
},
|
||||
],
|
||||
departmentOptions:[],//部门
|
||||
departmentOptions:[],//区域
|
||||
isIndeterminate:true,
|
||||
|
||||
checkedAll:[],
|
||||
@ -155,10 +155,10 @@ import api from "@/services/caseManagement";
|
||||
};
|
||||
},
|
||||
mounted () {
|
||||
this.getDeptList();//获取部门
|
||||
this.getDeptList();//获取区域
|
||||
},
|
||||
methods: {
|
||||
// 获取部门
|
||||
// 获取区域
|
||||
getDeptList(){
|
||||
let data = {
|
||||
companyId: this.$store.state.userinfo.companyId,
|
||||
@ -181,7 +181,7 @@ import api from "@/services/caseManagement";
|
||||
this.peopleList=[]
|
||||
|
||||
},
|
||||
// 根据部门id列表查看用户列表
|
||||
// 根据区域id列表查看用户列表
|
||||
getUserByDeptList(){
|
||||
let data = {
|
||||
ids:this.deptIds
|
||||
@ -221,7 +221,7 @@ import api from "@/services/caseManagement";
|
||||
})
|
||||
})
|
||||
this.peopleList = list
|
||||
// console.log('获取部门人员',this.peopleList)
|
||||
// console.log('获取区域人员',this.peopleList)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@ -67,9 +67,9 @@
|
||||
<el-row :gutter="56">
|
||||
<el-col :span="8">
|
||||
<div class="flex-row-center align-items-center height-40 mb-24">
|
||||
<span class="tabs__search-criteria-title flex-shrink-0 pr-16">部门</span>
|
||||
<span class="tabs__search-criteria-title flex-shrink-0 pr-16">区域</span>
|
||||
<el-select v-model="queryParam.deptId"
|
||||
clearable placeholder="请选择部门"
|
||||
clearable placeholder="请选择区域"
|
||||
@keydown.enter.native="handleSearch"
|
||||
:disabled="deptDisabled"
|
||||
class="width100">
|
||||
@ -248,7 +248,7 @@ import api from "@/services/caseManagement";
|
||||
},
|
||||
mediateStatusData:[],//所有案件状态枚举
|
||||
financialProductsTypeOptions:[],//金融产品类型
|
||||
departmentOptions:[],//部门
|
||||
departmentOptions:[],//区域
|
||||
queryParam: {
|
||||
financialOrgName:'',//金融机构名称
|
||||
caseNo: '',//案件编号
|
||||
@ -258,13 +258,13 @@ import api from "@/services/caseManagement";
|
||||
creditorPhone:'',//债务人手机号
|
||||
endTime: '',//结束时间
|
||||
beginTime:'',//开始时间
|
||||
deptId:'',//部门id
|
||||
deptId:'',//区域id
|
||||
current:1,
|
||||
size:10,
|
||||
|
||||
caseName:'',//案件名称
|
||||
dataAuthUserId:'',//当前登录用户所拥有权限的用户id
|
||||
dataAuthDeptId:'',//当前登录用户所拥有权限的部门id
|
||||
dataAuthDeptId:'',//当前登录用户所拥有权限的区域id
|
||||
mediatorId:'',//调解员id
|
||||
resultStatus:'',//结果状态
|
||||
|
||||
@ -291,7 +291,7 @@ import api from "@/services/caseManagement";
|
||||
},
|
||||
{
|
||||
prop: "deptId",
|
||||
label: "归属部门",
|
||||
label: "归属区域",
|
||||
showOverflowTooltip: true,
|
||||
formatter: this.formatdeptName,
|
||||
},
|
||||
@ -327,7 +327,7 @@ import api from "@/services/caseManagement";
|
||||
importCaseDialog:null,//导入
|
||||
addCaseDialog:null,//新增
|
||||
editCaseDrawer:null,//编辑
|
||||
deptDisabled:false,//部门下拉设置是否可选
|
||||
deptDisabled:false,//区域下拉设置是否可选
|
||||
caseStatusData:[],//获取调解中状态枚举
|
||||
caseStatusShow:true,//显示案件状态枚举 全部,调解中
|
||||
|
||||
@ -339,8 +339,8 @@ import api from "@/services/caseManagement";
|
||||
this.getCaseCount();//获取各案件状态数量
|
||||
this.getMediateStatusEnum();//获取所有状态枚举
|
||||
this.getDict();//获取金融产品类型
|
||||
this.getDeptList();//获取部门
|
||||
// 判断当前登录人角色,如果是普通调解员,则默认展示部门且不可选择
|
||||
this.getDeptList();//获取区域
|
||||
// 判断当前登录人角色,如果是普通调解员,则默认展示区域且不可选择
|
||||
let identifier = this.$store.state.userinfo.identifier
|
||||
if(identifier=='mediator'){
|
||||
this.deptDisabled = true
|
||||
@ -481,7 +481,7 @@ import api from "@/services/caseManagement";
|
||||
}
|
||||
})
|
||||
},
|
||||
// 获取部门
|
||||
// 获取区域
|
||||
getDeptList(){
|
||||
let data = {
|
||||
companyId: this.$store.state.userinfo.companyId,
|
||||
@ -505,7 +505,7 @@ import api from "@/services/caseManagement";
|
||||
}
|
||||
})
|
||||
},
|
||||
// 根据id获取部门名称
|
||||
// 根据id获取区域名称
|
||||
formatdeptName(row, column, cellValue, index){
|
||||
let obj = this.departmentOptions.find((item) => {
|
||||
return item.id == row.deptId
|
||||
|
||||
391
src/pages/case-package/components/caseAllocationDialog.vue
Normal file
391
src/pages/case-package/components/caseAllocationDialog.vue
Normal file
@ -0,0 +1,391 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog
|
||||
:title="caseAllocationDialog.title"
|
||||
:visible="true"
|
||||
width="880px"
|
||||
append-to-body
|
||||
:close-on-click-modal="false"
|
||||
@close="handleClose"
|
||||
>
|
||||
|
||||
<div class="dialog-content">
|
||||
<div class="pb-16">
|
||||
<el-row :gutter="20" type="flex" align="middle">
|
||||
<el-col :span="24">
|
||||
|
||||
<div class="flex-row align-items-center">
|
||||
<div class="mr-8 flex-shrink-0">区域</div>
|
||||
<div class="width100">
|
||||
<el-select v-model="deptId"
|
||||
size="medium"
|
||||
clearable placeholder="请选择区域"
|
||||
@change="handleChangeDept"
|
||||
class="width100">
|
||||
<el-option
|
||||
v-for="item in departmentOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
class="width100"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<el-scrollbar class="bor bg-color-light min-height250">
|
||||
<div class="department-wrap">
|
||||
<div v-for="(item,inx) in peopleList" :key="inx" class="department-wrap-list">
|
||||
<div class="department-dept">
|
||||
<el-checkbox v-model="checkedAll" :label="item.deptId" @change="handleCheckChange(1,inx,item,item.deptId,$event)">{{item.name}}({{item.count}}人)</el-checkbox>
|
||||
</div>
|
||||
<div class="flex-row justify-content-start flex-flow-wrap ">
|
||||
<div v-for="(v,i) in item.values" :key="i" class="pt-16" style="flex:0 0 25%">
|
||||
<el-checkbox v-model="checkedAll" :label="v.id" @change="handleCheckChange(2,inx,v,item.deptId,$event)">{{v.realName}}</el-checkbox>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-scrollbar>
|
||||
<div class="p-v-24">
|
||||
<el-form ref="ruleForm"
|
||||
:model="queryParam"
|
||||
:rules="rulesClient"
|
||||
label-width="120px"
|
||||
class="demo-ruleForm">
|
||||
<el-row :gutter="20" type="flex" align="middle">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="分配方式" prop="dispatchType" label-width="80px">
|
||||
<template>
|
||||
<el-radio v-model="queryParam.dispatchType" :label="1">平均分配</el-radio>
|
||||
<el-radio v-model="queryParam.dispatchType" :label="2">调解中案件量最少</el-radio>
|
||||
<el-radio v-model="queryParam.dispatchType" :label="3">当天分案量最少</el-radio>
|
||||
<el-radio v-model="queryParam.dispatchType" :label="4">当月分案量最少</el-radio>
|
||||
<el-radio v-model="queryParam.dispatchType" :label="5">同案由调解成功率最高</el-radio>
|
||||
</template>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="handleClose()">取消</el-button>
|
||||
<el-button type="primary" @click="handleSubmit()">确认</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import api from "@/services/caseManagement";
|
||||
export default {
|
||||
components: {
|
||||
|
||||
},
|
||||
props: {
|
||||
caseAllocationDialog: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {}
|
||||
},
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
deptId:[],//获取区域id集合
|
||||
queryParam:{
|
||||
id:'',//案件包ID
|
||||
dispatchType:1,//分案方式;1,平均分配;2,调解中案件量最少;3,当天分案量最少;4,当月分案量最少;5,同案由调解成功率最高
|
||||
},
|
||||
userList:[],
|
||||
rulesClient: {
|
||||
dispatchType: [
|
||||
{ required: true, message: '请选择分案方式', trigger: 'change',},
|
||||
],
|
||||
},
|
||||
peopleList:[
|
||||
{deptId:1,name:'调解一部',count:10,
|
||||
values:[
|
||||
{id:1,deptId:1,realName:'张三' },
|
||||
{id:2,deptId:1,realName:'张三' },
|
||||
{id:3,deptId:1,realName:'张三' },
|
||||
{id:4,deptId:1,realName:'张三' },
|
||||
{id:5,deptId:1,realName:'里面' },
|
||||
]
|
||||
}
|
||||
],
|
||||
departmentOptions:[],//区域
|
||||
checkedAll:[],
|
||||
chooseChecked:[],
|
||||
};
|
||||
},
|
||||
mounted () {
|
||||
this.getDeptList();//获取区域
|
||||
},
|
||||
methods: {
|
||||
// 获取区域
|
||||
getDeptList(){
|
||||
let data = {
|
||||
companyId: this.$store.state.userinfo.companyId,
|
||||
current: 1,
|
||||
size: 500,
|
||||
pid:0
|
||||
}
|
||||
api.getDeptList(data).then(res => {
|
||||
if (!res.code) {
|
||||
this.departmentOptions = res.records;
|
||||
this.deptId = this.departmentOptions[0].id
|
||||
this.getByDeptList()
|
||||
}
|
||||
})
|
||||
},
|
||||
handleChangeDept(e){
|
||||
this.checkedAll=[]
|
||||
this.chooseChecked=[]
|
||||
this.getByDeptList()
|
||||
this.peopleList=[]
|
||||
|
||||
},
|
||||
// 根据区域id列表查看用户列表
|
||||
getByDeptList(){
|
||||
api.getDeptList({companyId:this.$store.state.userinfo.companyId,current:1,size:500,pid:this.deptId}).then(res => {
|
||||
if (!res.code)
|
||||
{
|
||||
let deptList = []
|
||||
res.records.forEach(item =>{
|
||||
let userlist = []
|
||||
api.getUserByDeptList({ids:[item.id]}).then(res => {
|
||||
|
||||
res.forEach(item =>{
|
||||
userlist.push({
|
||||
id:item.id,
|
||||
realName:item.realName,
|
||||
checked:false
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
deptList.push({
|
||||
deptId:item.id,
|
||||
name:item.name,
|
||||
count:item.count,
|
||||
checked:false,
|
||||
values:userlist
|
||||
})
|
||||
})
|
||||
this.peopleList = deptList
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
handleCheckChange(type,a=0,chooseItem,deptId,event){
|
||||
// console.log(chooseItem,event,a,'this.peopleList')
|
||||
let self = this
|
||||
if(type==2){//二级菜单
|
||||
let index = 0;
|
||||
self.peopleList[a].values.map((item)=>{
|
||||
if(self.checkedAll.indexOf(item.id)>-1){
|
||||
index+=1
|
||||
}
|
||||
})
|
||||
if(index>0){
|
||||
if(self.checkedAll.indexOf(self.peopleList[a].deptId)<0){
|
||||
self.checkedAll.push(self.peopleList[a].deptId)
|
||||
}
|
||||
}else{
|
||||
if(self.checkedAll.indexOf(self.peopleList[a].deptId)>0){
|
||||
self.checkedAll.splice(self.checkedAll.indexOf(self.peopleList[a].deptId),1)
|
||||
}
|
||||
}
|
||||
|
||||
if(event)
|
||||
{
|
||||
if(this.chooseChecked.length==0){self.chooseChecked.push({deptId:deptId,child:[]})}
|
||||
this.chooseChecked.forEach((item,index) => {
|
||||
let haveDeptId = self.chooseChecked.find(citem=>{
|
||||
return citem.deptId===deptId
|
||||
})
|
||||
if(haveDeptId != undefined)
|
||||
{
|
||||
if(item.deptId==deptId)
|
||||
{
|
||||
item.child.push({deptId:deptId,id:chooseItem.id,realName:chooseItem.realName})
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
self.chooseChecked.push({deptId:deptId,child:[{deptId:deptId,id:chooseItem.id,realName:chooseItem.realName}]})
|
||||
}
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
this.chooseChecked.forEach((item,index) => {
|
||||
item.child.forEach((itemchild,index) => {
|
||||
if(itemchild.id==chooseItem.id)
|
||||
{
|
||||
item.child.splice(index,1)
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
let childnum = this.chooseChecked.find(item=>{
|
||||
return item.deptId === deptId
|
||||
}).child.length;
|
||||
|
||||
let allchildnum = this.peopleList.find(item=>{
|
||||
return item.deptId === deptId
|
||||
}).values.length;
|
||||
if(childnum != allchildnum)
|
||||
{
|
||||
if(self.checkedAll.indexOf(deptId)>-1){
|
||||
self.checkedAll.splice(self.checkedAll.indexOf(deptId),1)
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(self.checkedAll.indexOf(deptId)<0){
|
||||
self.checkedAll.push(deptId)
|
||||
}
|
||||
}
|
||||
|
||||
}else{
|
||||
if(self.checkedAll.indexOf(self.peopleList[a].deptId)>-1){
|
||||
self.peopleList[a].values.map((item)=>{
|
||||
if(self.checkedAll.findIndex((n)=> n==item.id)<0){
|
||||
self.checkedAll.push(item.id)
|
||||
// self.checkedAll.push({id:item.id,realName:item.realName,deptId:self.peopleList[a].deptId})
|
||||
}
|
||||
})
|
||||
}else{
|
||||
self.peopleList[a].values.map((item)=>{
|
||||
if(self.checkedAll.findIndex((n)=> n==item.id)>-1){
|
||||
self.checkedAll.splice(self.checkedAll.findIndex((n)=> n==item.id),1)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
let haveDeptId=self.chooseChecked.find(citem=>{
|
||||
return citem.deptId === deptId
|
||||
})
|
||||
if(event)
|
||||
{
|
||||
if(haveDeptId == undefined)
|
||||
{
|
||||
let addchild=[]
|
||||
self.peopleList.forEach((item,index) => {
|
||||
if(item.deptId==deptId)
|
||||
{
|
||||
item.values.forEach((item,index) => {
|
||||
addchild.push({deptId:deptId,id:item.id,realName:item.realName})
|
||||
});
|
||||
}
|
||||
});
|
||||
self.chooseChecked.push({deptId:deptId,child:addchild})
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(haveDeptId != undefined)
|
||||
{
|
||||
self.chooseChecked.forEach((item,index) => {
|
||||
if(item.deptId==deptId)
|
||||
{
|
||||
self.chooseChecked.splice(index,1)
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
// console.log(this.checkedAll,self.chooseChecked,'checkedAll')
|
||||
},
|
||||
|
||||
handleSubmit(){
|
||||
if(!this.$clickThrottle()) { return }//防止重复点击
|
||||
let chooseUser=[]
|
||||
this.chooseChecked.forEach((item,index) => {
|
||||
item.child.forEach((item,index) => {
|
||||
chooseUser.push({deptId:item.deptId,id:item.id,realName:item.realName})
|
||||
});
|
||||
});
|
||||
if(chooseUser.length == 0)
|
||||
{
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: '请先选择调解员!',
|
||||
type: 'warning'
|
||||
});
|
||||
return false
|
||||
}
|
||||
|
||||
this.$refs.ruleForm.validate((valid) => {
|
||||
if(valid) {
|
||||
|
||||
let data = {
|
||||
id:this.caseAllocationDialog.ObjectInfo.id,
|
||||
dispatchType:this.queryParam.dispatchType,
|
||||
userList:chooseUser
|
||||
}
|
||||
|
||||
api.postpkgdispatchCase(data).then(res => {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: '调解案件分配成功!',
|
||||
type: 'success'
|
||||
});
|
||||
this.$parent.getCaseInfoList()
|
||||
this.handleClose()
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
handleSearch(){
|
||||
|
||||
},
|
||||
handleChangeDate(){
|
||||
let planStart = new Date(this.queryParam.planStartTime);
|
||||
let planEnd = new Date(this.queryParam.planEndTime);
|
||||
if (planEnd < planStart) {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: '开始日期不能大于结束日期!',
|
||||
type: 'warning'
|
||||
});
|
||||
this.queryParam.planEndTime=''
|
||||
}
|
||||
},
|
||||
handleClose() {
|
||||
this.$emit('update:caseAllocationDialog', null)
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.dialog-content{
|
||||
padding: 16px 24px;
|
||||
max-height:500px
|
||||
}
|
||||
.department-wrap{
|
||||
padding: 16px 24px;
|
||||
max-height: 250px;
|
||||
.department-wrap-list{
|
||||
margin-bottom:32px;
|
||||
}
|
||||
.department-wrap-list:last-child{
|
||||
margin-bottom:0;
|
||||
}
|
||||
}
|
||||
.min-height250{min-height: 250px;}
|
||||
.department-dept ::v-deep .el-checkbox__label {color: $color-000000}
|
||||
</style>
|
||||
192
src/pages/case-package/components/importPackageDialog.vue
Normal file
192
src/pages/case-package/components/importPackageDialog.vue
Normal file
@ -0,0 +1,192 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog
|
||||
:title="importCaseDialog.title"
|
||||
:visible="true"
|
||||
width="580px"
|
||||
append-to-body
|
||||
:close-on-click-modal="false"
|
||||
@close="handleClose">
|
||||
|
||||
|
||||
<!-- 基本信息 -->
|
||||
<div>
|
||||
<div class="p-h-24">
|
||||
<el-form ref="ruleFormBase"
|
||||
:model="baseInfo"
|
||||
:rules="rulesClient"
|
||||
label-width="150px"
|
||||
class="demo-ruleForm">
|
||||
<el-row type="flex" align="middle">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="案件包名" prop="pkgName">
|
||||
<el-input
|
||||
v-model.trim="baseInfo.pkgName"
|
||||
placeholder="请输入案件包名"
|
||||
clearable
|
||||
maxlength="25"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
<el-row type="flex" align="middle">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="委案机构" prop="entrustingAgencyName">
|
||||
<el-input
|
||||
v-model.trim="baseInfo.entrustingAgencyName"
|
||||
placeholder="请输入委案机构"
|
||||
clearable
|
||||
maxlength="25"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row type="flex" align="middle">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="委案日期" prop="planStartTime">
|
||||
<el-date-picker class="width100"
|
||||
v-model="baseInfo.planStartTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="选择委案日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row type="flex" align="middle">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="委案期限(月)" prop="months">
|
||||
<el-input-number v-model="baseInfo.months" :min="0" :max="100" class="width100"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row type="flex" align="middle">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="上传文件" prop="fileInfo">
|
||||
<upload-import :file-list="fileList" :max-count="1"
|
||||
:show-file-name="true"
|
||||
accept=".xls,.xlsx"
|
||||
@handleUploadFile="handleUploadFile">
|
||||
</upload-import>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="handleClose">取消</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="handleSubmit">确认保存
|
||||
</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import apipk from "@/services/casePackageManagement";
|
||||
export default {
|
||||
components: {
|
||||
uploadImport:() => import('@/components/uploadImportPackage.vue'),//导入上传
|
||||
},
|
||||
props: {
|
||||
importCaseDialog: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {}
|
||||
},
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
baseInfo:{
|
||||
pkgName:'',//案件包名
|
||||
entrustingAgencyName:'',//金融机构名称
|
||||
planStartTime:'',//委案时间
|
||||
months:1,//委案期限
|
||||
fileInfo:null,
|
||||
|
||||
},
|
||||
rulesClient: {
|
||||
pkgName: [
|
||||
{ required: true, message: '请输入案件包名', trigger: 'change',},
|
||||
],
|
||||
planStartTime: [
|
||||
{ required: true, message: '请输入委案时间', trigger: 'change',},
|
||||
],
|
||||
months: [
|
||||
{ required: true, message: '请输入委案期限', trigger: 'change',},
|
||||
],
|
||||
fileInfo: [
|
||||
{ required: true, message: '请上传文件', trigger: 'change',},
|
||||
]
|
||||
},
|
||||
financialProductsTypeOptions:[],//金融产品类型
|
||||
fileList:[],//证据材料
|
||||
|
||||
};
|
||||
},
|
||||
mounted () {
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
||||
handleSubmit(){
|
||||
if(!this.$clickThrottle()) { return }//防止重复点击
|
||||
|
||||
this.$refs.ruleFormBase.validate((valid) => {
|
||||
if (valid){
|
||||
let data = {
|
||||
...this.baseInfo,//基本信息
|
||||
}
|
||||
apipk.CasePkgimport(data).then(res => {
|
||||
this.handleClose()
|
||||
this.$parent.getCaseInfoList(1)
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
},
|
||||
// 上传
|
||||
handleUploadFile(JsonData){
|
||||
|
||||
console.log('获取上传文件信息',JsonData.uploadFileRes)
|
||||
let fileitem = JSON.parse(JSON.stringify(JsonData.fileList))
|
||||
this.fileList = fileitem.map((item,i) => {
|
||||
let time = this.$util.getTimestamp()
|
||||
let fileType = this.$util.getFileExtension(item.url)
|
||||
let fileName = `${time}.${fileType}`
|
||||
return {
|
||||
url: item.url,
|
||||
fileName:fileName,
|
||||
}
|
||||
})
|
||||
if(fileitem.length == 0 ){
|
||||
this.baseInfo.fileInfo = null
|
||||
}
|
||||
else
|
||||
{
|
||||
this.baseInfo.fileInfo = JsonData.uploadFileRes
|
||||
}
|
||||
},
|
||||
|
||||
handleClose() {
|
||||
this.$emit('update:importCaseDialog', null)
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.dialog-content{
|
||||
padding: 16px 24px;
|
||||
// max-height:500px
|
||||
}
|
||||
|
||||
</style>
|
||||
@ -24,7 +24,7 @@
|
||||
<el-col :span="8">
|
||||
<div class="flex-row-center align-items-center height-40 mb-24">
|
||||
<span class="tabs__search-criteria-title flex-shrink-0 pr-16">委案机构</span>
|
||||
<el-select v-model="queryParam.productTypeId"
|
||||
<el-select v-model="queryParam.entrustingAgencyName"
|
||||
clearable placeholder="请选择委案机构"
|
||||
@keydown.enter.native="handleSearch"
|
||||
class="width100">
|
||||
@ -49,25 +49,18 @@
|
||||
<el-col :span="8">
|
||||
<div class="flex-row-center align-items-center height-40 mb-24">
|
||||
<span class="tabs__search-criteria-title flex-shrink-0 pr-16">案件即将到期</span>
|
||||
<el-select v-model="queryParam.resultStatus"
|
||||
<el-select v-model="queryParam.willEnd"
|
||||
clearable placeholder="请选择案件是否即将到期"
|
||||
@keydown.enter.native="handleSearch"
|
||||
:disabled="deptDisabled"
|
||||
class="width100">
|
||||
<el-option
|
||||
v-for="item in caseStatusData"
|
||||
:key="item.code"
|
||||
:label="item.desc"
|
||||
:value="item.code">
|
||||
</el-option>
|
||||
<el-option label="是" value="true"></el-option>
|
||||
<el-option label="否" value="false"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="56" v-if="caseStatusShow">
|
||||
|
||||
</el-row>
|
||||
<el-row :gutter="56">
|
||||
<el-col :span="18">
|
||||
<div class="flex-row align-items-center height-40 mb-24">
|
||||
@ -106,7 +99,6 @@
|
||||
<el-button size="small" type="primary" @click="handleImport">批量导入案件</el-button>
|
||||
<el-button size="small" @click="handleAddForm">添加案件</el-button>
|
||||
<el-button size="small" @click="handleBatchDelete">错误修复</el-button>
|
||||
<el-button size="small" type="primary" @click="handleCaseAllocation">案件分配</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -116,19 +108,28 @@
|
||||
<el-table-column type="selection" width="55" ></el-table-column>
|
||||
<el-table-column prop="pkgName" label="案件包名称" show-overflow-tooltip ></el-table-column>
|
||||
<el-table-column prop="entrustingAgencyName" label="委案机构" show-overflow-tooltip ></el-table-column>
|
||||
<el-table-column prop="resultStatus" label="产品类别" show-overflow-tooltip ></el-table-column>
|
||||
<el-table-column prop="planStartTime" label="委案时间" show-overflow-tooltip ></el-table-column>
|
||||
<el-table-column prop="resultStatus" label="委案期限" show-overflow-tooltip ></el-table-column>
|
||||
<el-table-column prop="resultStatus" label="案件数量" show-overflow-tooltip ></el-table-column>
|
||||
<el-table-column prop="resultStatus" label="待分案" show-overflow-tooltip ></el-table-column>
|
||||
<el-table-column prop="resultStatus" label="已分案" show-overflow-tooltip ></el-table-column>
|
||||
<!-- <el-table-column prop="resultStatus" label="产品类别" show-overflow-tooltip ></el-table-column> -->
|
||||
<el-table-column prop="planStartTime" label="委案时间" show-overflow-tooltip >
|
||||
<template slot-scope="scope">
|
||||
<span >{{ scope.row.planStartTime | formaDate("yyyy-MM-dd") }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="months" label="委案期限(月)" show-overflow-tooltip ></el-table-column>
|
||||
<el-table-column prop="caseTotal" label="案件数量" show-overflow-tooltip ></el-table-column>
|
||||
<el-table-column prop="resultStatus" label="待分案" show-overflow-tooltip >
|
||||
<template slot-scope="scope">
|
||||
<span >{{ scope.row.caseTotal - scope.row.assignTotal}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="assignTotal" label="已分案" show-overflow-tooltip ></el-table-column>
|
||||
<el-table-column label="操作" width="370">
|
||||
<template slot-scope="scope">
|
||||
<div class="flex-row align-items-center">
|
||||
<el-button size="mini" @click="handleEdit(scope)">查看</el-button>
|
||||
<el-button size="mini" @click="handleEdit(scope)">案件分案</el-button>
|
||||
<el-button size="mini" @click="handleCaseAllocation(scope)">案件分配</el-button>
|
||||
<el-button size="mini" @click="handleEdit(scope)">预设还款方案</el-button>
|
||||
<el-button size="mini" @click="handleDelete(scope)">删除</el-button>
|
||||
<el-button size="mini" v-if="scope.row.assignTotal == 0" @click="handleDelete(scope)">删除</el-button>
|
||||
<el-button size="mini" v-if="scope.row.assignTotal > 0" @click="handleBack(scope)">撤回分案</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -149,23 +150,23 @@
|
||||
</div>
|
||||
</div>
|
||||
<!-- 导入 -->
|
||||
<!-- <importCaseDialog v-if="importCaseDialog" :importCaseDialog.sync="importCaseDialog" /> -->
|
||||
<importPackageDialog v-if="importCaseDialog" :importCaseDialog.sync="importCaseDialog" />
|
||||
<!-- 新增 -->
|
||||
<!-- <addCaseDialog v-if="addCaseDialog" :addCaseDialog.sync="addCaseDialog" /> -->
|
||||
<!-- 编辑 -->
|
||||
<!-- <editCaseDrawer v-if="editCaseDrawer" :editCaseDrawer.sync="editCaseDrawer"/> -->
|
||||
<!-- 案件分配-->
|
||||
<!-- <caseAllocationDialog v-if="caseAllocationDialog" :caseAllocationDialog.sync="caseAllocationDialog" /> -->
|
||||
<caseAllocationDialog v-if="caseAllocationDialog" :caseAllocationDialog.sync="caseAllocationDialog" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import api from "@/services/casePackageManagement";
|
||||
export default {
|
||||
components: {
|
||||
// importCaseDialog: () => import('./components/importCaseDialog'),//导入
|
||||
importPackageDialog: () => import('./components/importPackageDialog'),//导入
|
||||
// addCaseDialog: () => import('./components/addCaseDialog'),//新增
|
||||
// editCaseDrawer: () => import('./components/editCaseDrawer'),//编辑
|
||||
// caseAllocationDialog: () => import('./components/caseAllocationDialog'),//案件分配
|
||||
caseAllocationDialog: () => import('./components/caseAllocationDialog'),//案件分配
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -176,12 +177,13 @@ import api from "@/services/casePackageManagement";
|
||||
|
||||
mediateStatusData:[],//所有案件状态枚举
|
||||
financialProductsTypeOptions:[],//金融产品类型
|
||||
departmentOptions:[],//部门
|
||||
departmentOptions:[],//区域
|
||||
queryParam: {
|
||||
pkgName:'',//案件包名称
|
||||
pkgNo: '',//案件编号
|
||||
entrustingAgencyName: '',//委案机构
|
||||
endTime: '',//结束时间
|
||||
beginTime:'',//开始时间
|
||||
willEnd:'',
|
||||
current:1,
|
||||
size:10,
|
||||
},
|
||||
@ -193,14 +195,14 @@ import api from "@/services/casePackageManagement";
|
||||
importCaseDialog:null,//导入
|
||||
addCaseDialog:null,//新增
|
||||
editCaseDrawer:null,//编辑
|
||||
deptDisabled:false,//部门下拉设置是否可选
|
||||
deptDisabled:false,//区域下拉设置是否可选
|
||||
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// 判断当前登录人角色,如果是普通调解员,则默认展示部门且不可选择
|
||||
// 判断当前登录人角色,如果是普通调解员,则默认展示区域且不可选择
|
||||
let identifier = this.$store.state.userinfo.identifier
|
||||
if(identifier=='mediator'){
|
||||
this.deptDisabled = true
|
||||
@ -215,11 +217,7 @@ import api from "@/services/casePackageManagement";
|
||||
contentHeight(){
|
||||
let oh = document.documentElement.clientHeight;
|
||||
if(this.showSearch){
|
||||
if(this.caseStatusShow){
|
||||
return oh-56-48-430-32
|
||||
}else{
|
||||
return oh-56-48-366-32
|
||||
}
|
||||
return oh-56-48-366-32
|
||||
|
||||
}else{
|
||||
return oh-56-48-175-32
|
||||
@ -231,7 +229,7 @@ import api from "@/services/casePackageManagement";
|
||||
// 导入
|
||||
handleImport(){
|
||||
this.importCaseDialog={
|
||||
title:'导入案件',
|
||||
title:'批量导入案件',
|
||||
}
|
||||
},
|
||||
// 批量删除
|
||||
@ -274,6 +272,22 @@ import api from "@/services/casePackageManagement";
|
||||
});
|
||||
}).catch(() => {});
|
||||
},
|
||||
//撤回分案
|
||||
handleBack(scope){
|
||||
this.$confirm("请确定是否撤回分案?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
}).then(() => {
|
||||
if(!this.$clickThrottle()) { return }//防止重复点击
|
||||
// api.CasePkgdeleteById({id:scope.row.id}).then((res) => {
|
||||
|
||||
// this.$message.success("撤回分案成功");
|
||||
// this.getCaseInfoList(1)
|
||||
|
||||
// });
|
||||
}).catch(() => {});
|
||||
},
|
||||
// 新增
|
||||
handleAddForm(){
|
||||
this.addCaseDialog={
|
||||
@ -281,9 +295,21 @@ import api from "@/services/casePackageManagement";
|
||||
}
|
||||
},
|
||||
// 案件分配
|
||||
handleCaseAllocation(){
|
||||
handleCaseAllocation(scope){
|
||||
if((scope.row.caseTotal - scope.row.assignTotal) <= 0)
|
||||
{
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: '该案件包没有待分配的案件!',
|
||||
type: 'warning'
|
||||
});
|
||||
return false
|
||||
}
|
||||
|
||||
|
||||
this.caseAllocationDialog={
|
||||
title:'案件分配',
|
||||
ObjectInfo:scope.row
|
||||
}
|
||||
},
|
||||
// 编辑
|
||||
@ -296,6 +322,10 @@ import api from "@/services/casePackageManagement";
|
||||
},
|
||||
// 列表数据
|
||||
getCaseInfoList(val){
|
||||
|
||||
|
||||
this.queryParam.planBegin = this.queryParam.beginTime
|
||||
this.queryParam.planEnd = this.queryParam.endTime
|
||||
this.queryParam.current = val
|
||||
api.getCasePkgQuery(this.queryParam).then(res => {
|
||||
if (!res.code) {
|
||||
@ -304,14 +334,6 @@ import api from "@/services/casePackageManagement";
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
formatProductType(row, column, cellValue, index){
|
||||
// console.log('row',row)
|
||||
let obj = this.financialProductsTypeOptions.find((item) => {
|
||||
return item.code == row.productTypeId
|
||||
})
|
||||
return row.productTypeId != null ? <div>{obj?obj.codeName:'-'}</div> : '-'
|
||||
},
|
||||
handleToggleSearch() {
|
||||
this.showSearch = !this.showSearch
|
||||
},
|
||||
|
||||
@ -67,9 +67,9 @@
|
||||
<el-row :gutter="56">
|
||||
<el-col :span="8">
|
||||
<div class="flex-row-center align-items-center height-40 mb-24">
|
||||
<span class="tabs__search-criteria-title flex-shrink-0 pr-16">部门</span>
|
||||
<span class="tabs__search-criteria-title flex-shrink-0 pr-16">区域</span>
|
||||
<el-select v-model="queryParam.deptId"
|
||||
clearable placeholder="请选择部门"
|
||||
clearable placeholder="请选择区域"
|
||||
@keydown.enter.native="handleSearch"
|
||||
class="width100">
|
||||
<el-option
|
||||
@ -238,13 +238,13 @@ import api from "@/services/caseManagement";
|
||||
creditorPhone:'',//债务人手机号
|
||||
endTime: '',//结束时间
|
||||
beginTime:'',//开始时间
|
||||
deptId:'',//部门id
|
||||
deptId:'',//区域id
|
||||
current:1,
|
||||
size:10,
|
||||
|
||||
caseName:'',//案件名称
|
||||
dataAuthUserId:'',//当前登录用户所拥有权限的用户id
|
||||
dataAuthDeptId:'',//当前登录用户所拥有权限的部门id
|
||||
dataAuthDeptId:'',//当前登录用户所拥有权限的区域id
|
||||
mediatorId:'',//调解员id
|
||||
resultStatus:'',//结果状态
|
||||
|
||||
@ -271,7 +271,7 @@ import api from "@/services/caseManagement";
|
||||
},
|
||||
{
|
||||
prop: "deptId",
|
||||
label: "归属部门",
|
||||
label: "归属区域",
|
||||
showOverflowTooltip: true,
|
||||
formatter: this.formatdeptName,
|
||||
},
|
||||
@ -296,11 +296,11 @@ import api from "@/services/caseManagement";
|
||||
],
|
||||
tableData: [],
|
||||
financialProductsTypeOptions:[],//金融产品类型
|
||||
departmentOptions:[],//部门
|
||||
departmentOptions:[],//区域
|
||||
total:0,
|
||||
uniqueSelection:[],
|
||||
editCaseDrawer:null,//编辑
|
||||
deptDisabled:false,//部门下拉设置是否可选
|
||||
deptDisabled:false,//区域下拉设置是否可选
|
||||
caseStatusData:[],//获取调解中状态枚举
|
||||
caseStatusShow:true,//显示案件状态枚举 全部,调解中
|
||||
}
|
||||
@ -309,8 +309,8 @@ import api from "@/services/caseManagement";
|
||||
this.getCaseCount();//获取各案件状态数量
|
||||
this.getMediateStatusEnum();//获取所有状态枚举
|
||||
this.getDict();//获取金融产品类型
|
||||
this.getDeptList();//获取部门
|
||||
// 判断当前登录人角色,如果是普通调解员,则默认展示部门且不可选择
|
||||
this.getDeptList();//获取区域
|
||||
// 判断当前登录人角色,如果是普通调解员,则默认展示区域且不可选择
|
||||
let identifier = this.$store.state.userinfo.identifier
|
||||
if(identifier=='mediator'){
|
||||
this.deptDisabled = true
|
||||
@ -387,7 +387,7 @@ import api from "@/services/caseManagement";
|
||||
}
|
||||
})
|
||||
},
|
||||
// 获取部门
|
||||
// 获取区域
|
||||
getDeptList(){
|
||||
let data = {
|
||||
companyId: this.$store.state.userinfo.companyId,
|
||||
@ -485,7 +485,7 @@ import api from "@/services/caseManagement";
|
||||
|
||||
},
|
||||
|
||||
// 根据id获取部门名称
|
||||
// 根据id获取区域名称
|
||||
formatdeptName(row, column, cellValue, index){
|
||||
let obj = this.departmentOptions.find((item) => {
|
||||
return item.id == row.deptId
|
||||
|
||||
@ -0,0 +1,163 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog
|
||||
:title="addOrEditAreaConfig.title"
|
||||
:visible="true"
|
||||
width="400px"
|
||||
append-to-body
|
||||
:close-on-click-modal="false"
|
||||
@close="handleClose"
|
||||
>
|
||||
<el-scrollbar class="bor">
|
||||
<div class="dialog-content">
|
||||
<el-form ref="ruleForm"
|
||||
:model="deptInfo"
|
||||
:rules="rulesClient"
|
||||
label-width="140px"
|
||||
class="demo-ruleForm">
|
||||
<el-row type="flex" align="middle">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="区域名称" prop="name">
|
||||
<el-input
|
||||
v-model.trim="deptInfo.name"
|
||||
placeholder="请输入" maxlength="20"
|
||||
clearable
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row type="flex" align="middle">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="区域描述" prop="remark">
|
||||
<el-input
|
||||
type="textarea"
|
||||
:rows="3"
|
||||
placeholder="请输入内容" maxlength="50"
|
||||
v-model="deptInfo.remark">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-form>
|
||||
</div>
|
||||
</el-scrollbar>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="handleClose()">取消</el-button>
|
||||
<el-button type="primary" @click="handleSubmit()">确认</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import systemManageApi from "@/services/systemManage";
|
||||
export default {
|
||||
components: {
|
||||
|
||||
},
|
||||
props: {
|
||||
addOrEditAreaConfig: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {}
|
||||
},
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
deptInfo:{
|
||||
name:'',//区域名称
|
||||
remark:'',//区域描述
|
||||
companyId:this.$store.state.userinfo.companyId,//机构id 平台管理默认为0
|
||||
},
|
||||
rulesClient: {
|
||||
name: [
|
||||
{ required: true, message: '请输入区域名称', trigger: 'change',},
|
||||
],
|
||||
remark: [
|
||||
{ required: false, message: '请输入区域描述', trigger: 'change',},
|
||||
],
|
||||
}
|
||||
|
||||
};
|
||||
},
|
||||
async created() {
|
||||
// 当为编辑区域时才调用详情接口
|
||||
if(Object.keys(this.addOrEditAreaConfig.data).length>0){
|
||||
this.getDeptById()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 根据角色id获取角色详情
|
||||
getDeptById(){
|
||||
let data={
|
||||
id:this.addOrEditAreaConfig.data.id
|
||||
}
|
||||
systemManageApi.getDeptById(data).then(res => {
|
||||
if (!res.code) {
|
||||
this.deptInfo = {
|
||||
name:res.name,
|
||||
remark:res.remark,
|
||||
companyId:res.companyId
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
handleSubmit(){
|
||||
if(!this.$clickThrottle()) { return }
|
||||
let _this=this;
|
||||
this.$refs.ruleForm.validate((valid) => {
|
||||
if(valid) {
|
||||
if(Object.keys(this.addOrEditAreaConfig.data).length>0)
|
||||
{
|
||||
_this.deptInfo.id = this.addOrEditAreaConfig.data.id
|
||||
systemManageApi.updateDeptById(_this.deptInfo).then(res => {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: '编辑区域成功!',
|
||||
type: 'success'
|
||||
});
|
||||
this.$parent.getDeptList(1)
|
||||
this.handleClose()
|
||||
})
|
||||
}
|
||||
else
|
||||
{
|
||||
systemManageApi.addDept(_this.deptInfo).then(res => {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: '新增区域成功!',
|
||||
type: 'success'
|
||||
});
|
||||
this.$parent.getDeptList(1)
|
||||
this.handleClose()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
handleChangeSort(){
|
||||
|
||||
},
|
||||
handleClose() {
|
||||
this.$emit('update:addOrEditAreaConfig', null)
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.dialog-content{
|
||||
padding: $size16;
|
||||
max-height:500px
|
||||
}
|
||||
|
||||
::v-deep .el-dialog__header{
|
||||
border-bottom: 1px solid $border-color-lighter !important;
|
||||
}
|
||||
|
||||
::v-deep .el-dialog__footer{
|
||||
border-top: 1px solid $border-color-lighter !important;
|
||||
}
|
||||
</style>
|
||||
@ -0,0 +1,164 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog
|
||||
:title="addOrEditDeptConfig.title"
|
||||
:visible="true"
|
||||
width="400px"
|
||||
append-to-body
|
||||
:close-on-click-modal="false"
|
||||
@close="handleClose"
|
||||
>
|
||||
<el-scrollbar class="bor">
|
||||
<div class="dialog-content">
|
||||
<el-form ref="ruleForm"
|
||||
:model="deptInfo"
|
||||
:rules="rulesClient"
|
||||
label-width="140px"
|
||||
class="demo-ruleForm">
|
||||
<el-row type="flex" align="middle">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="部门名称" prop="name">
|
||||
<el-input
|
||||
v-model.trim="deptInfo.name"
|
||||
placeholder="请输入" maxlength="20"
|
||||
clearable
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row type="flex" align="middle">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="部门描述" prop="remark">
|
||||
<el-input
|
||||
type="textarea"
|
||||
:rows="3"
|
||||
placeholder="请输入内容" maxlength="50"
|
||||
v-model="deptInfo.remark">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-form>
|
||||
</div>
|
||||
</el-scrollbar>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="handleClose()">取消</el-button>
|
||||
<el-button type="primary" @click="handleSubmit()">确认</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import systemManageApi from "@/services/systemManage";
|
||||
export default {
|
||||
components: {
|
||||
|
||||
},
|
||||
props: {
|
||||
addOrEditDeptConfig: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {}
|
||||
},
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
deptInfo:{
|
||||
pid:this.addOrEditDeptConfig.data.id,//部门默认1
|
||||
name:'',//部门名称
|
||||
remark:'',//部门描述
|
||||
companyId:this.$store.state.userinfo.companyId,//机构id 平台管理默认为0
|
||||
},
|
||||
rulesClient: {
|
||||
name: [
|
||||
{ required: true, message: '请输入部门名称', trigger: 'change',},
|
||||
],
|
||||
remark: [
|
||||
{ required: false, message: '请输入部门描述', trigger: 'change',},
|
||||
],
|
||||
}
|
||||
|
||||
};
|
||||
},
|
||||
async created() {
|
||||
// 当为编辑部门时才调用详情接口
|
||||
if(Object.keys(this.addOrEditDeptConfig.data).length>0 && this.addOrEditDeptConfig.data.pid != 0){
|
||||
this.getDeptById()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 根据角色id获取角色详情
|
||||
getDeptById(){
|
||||
let data={
|
||||
id:this.addOrEditDeptConfig.data.id
|
||||
}
|
||||
systemManageApi.getDeptById(data).then(res => {
|
||||
if (!res.code) {
|
||||
this.deptInfo = {
|
||||
name:res.name,
|
||||
remark:res.remark,
|
||||
companyId:res.companyId
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
handleSubmit(){
|
||||
if(!this.$clickThrottle()) { return }
|
||||
let _this=this;
|
||||
this.$refs.ruleForm.validate((valid) => {
|
||||
if(valid) {
|
||||
if(Object.keys(this.addOrEditDeptConfig.data).length>0 && this.addOrEditDeptConfig.data.pid != 0)
|
||||
{
|
||||
_this.deptInfo.id = this.addOrEditDeptConfig.data.id
|
||||
systemManageApi.updateDeptById(_this.deptInfo).then(res => {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: '编辑部门成功!',
|
||||
type: 'success'
|
||||
});
|
||||
this.$parent.getDeptList(1,this.addOrEditDeptConfig.data.pid)
|
||||
this.handleClose()
|
||||
})
|
||||
}
|
||||
else
|
||||
{
|
||||
systemManageApi.addDept(_this.deptInfo).then(res => {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: '新增部门成功!',
|
||||
type: 'success'
|
||||
});
|
||||
this.$parent.getDeptList(1,this.addOrEditDeptConfig.data.id)
|
||||
this.handleClose()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
handleChangeSort(){
|
||||
|
||||
},
|
||||
handleClose() {
|
||||
this.$emit('update:addOrEditDeptConfig', null)
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.dialog-content{
|
||||
padding: $size16;
|
||||
max-height:500px
|
||||
}
|
||||
|
||||
::v-deep .el-dialog__header{
|
||||
border-bottom: 1px solid $border-color-lighter !important;
|
||||
}
|
||||
|
||||
::v-deep .el-dialog__footer{
|
||||
border-top: 1px solid $border-color-lighter !important;
|
||||
}
|
||||
</style>
|
||||
206
src/pages/system-management/area-management/index.vue
Normal file
206
src/pages/system-management/area-management/index.vue
Normal file
@ -0,0 +1,206 @@
|
||||
<template>
|
||||
<div class="layout-content-wrap background-color-fff border-radius-8">
|
||||
<div class="border-b-solid-lighter-1 p-h-24">
|
||||
<div class="flex-row justify-content-between height-56 align-items-center">
|
||||
<div class="color-text-primary f22">团队管理</div>
|
||||
<div class="flex-row color-text-regular f14">
|
||||
<div class="mr-24">
|
||||
<el-input
|
||||
placeholder="请输入搜索内容"
|
||||
suffix-icon="el-icon-search"
|
||||
v-model.trim="queryData.name"
|
||||
size="small"
|
||||
clearable
|
||||
@change="handleSearch"
|
||||
@keydown.enter.native="handleSearch"
|
||||
>
|
||||
</el-input>
|
||||
</div>
|
||||
<el-button type="primary" @click="handleAddForm" size="small">新增区域</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layout-tabs-content-box">
|
||||
<!-- table -->
|
||||
<div class="">
|
||||
<el-table ref="monthlyPlanTable"
|
||||
:data="tableData"
|
||||
:header-cell-style="{background:'#F5F7FA'}"
|
||||
row-key="id"
|
||||
lazy
|
||||
:load="load"
|
||||
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
|
||||
>
|
||||
<el-table-column prop="name" label="团队名称" width="250"></el-table-column>
|
||||
<el-table-column label="区域负责人">
|
||||
<template slot-scope="scope">
|
||||
<div class="flex-row">
|
||||
{{ListToString(scope.row.masterName)}}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="团队负责人手机号">
|
||||
<template slot-scope="scope">
|
||||
<div class="flex-row">
|
||||
{{ListToString(scope.row.masterPhone)}}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="count" label="团队人数" width="120"></el-table-column>
|
||||
<el-table-column prop="remark" label="团队描述" width="350"></el-table-column>
|
||||
<el-table-column label="操作" width="190">
|
||||
<template slot-scope="scope">
|
||||
<div class="flex-row">
|
||||
<div class="f14 color-1960F4 cursor-pointer mr-8" v-if="scope.row.pid == 0" @click="handleAddDeptForm(scope)">添加部门</div>
|
||||
<div class="f14 color-1960F4 cursor-pointer mr-8" v-if="scope.row.pid == 0" @click="handleAddForm(scope)">编辑</div>
|
||||
<div class="f14 color-1960F4 cursor-pointer mr-8" v-else @click="handleAddDeptForm(scope)">编辑</div>
|
||||
<div class="f14 color-1960F4 cursor-pointer" @click="handleDelete(scope)">删除</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<div class="text-center p-v-24">
|
||||
<el-pagination
|
||||
@size-change="getDeptList"
|
||||
@current-change="getDeptList"
|
||||
:current-page="queryData.current"
|
||||
:page-size="queryData.size"
|
||||
layout="total, prev, pager, next, jumper"
|
||||
:total="total">
|
||||
</el-pagination>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- 新增-编辑 -->
|
||||
<addOrEditAreaDialog v-if="addOrEditAreaConfig" :addOrEditAreaConfig.sync="addOrEditAreaConfig" />
|
||||
<addOrEditDeptDialog v-if="addOrEditDeptConfig" :addOrEditDeptConfig.sync="addOrEditDeptConfig" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import systemManageApi from "@/services/systemManage";
|
||||
export default {
|
||||
components: {
|
||||
addOrEditDeptDialog: () => import('./components/addOrEditDeptDialog.vue'),
|
||||
addOrEditAreaDialog: () => import('./components/addOrEditAreaDialog.vue'),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tableData:[],
|
||||
queryData: {
|
||||
pid:0,
|
||||
name:'',
|
||||
current: 1,
|
||||
size: 10,
|
||||
companyId:this.$store.state.userinfo.companyId,//机构id 平台管理默认为0
|
||||
},
|
||||
total: 0,
|
||||
addOrEditDeptConfig:null,//新增弹窗
|
||||
addOrEditAreaConfig:null,//新增弹窗
|
||||
map: new Map(),
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getDeptList(1)
|
||||
},
|
||||
methods: {
|
||||
// 新增
|
||||
handleAddForm(scope){
|
||||
let title = scope.row?'编辑区域':'新增区域'
|
||||
let data = scope.row?scope.row:''
|
||||
this.addOrEditAreaConfig={
|
||||
title:title,
|
||||
data: data
|
||||
}
|
||||
},
|
||||
// 新增
|
||||
handleAddDeptForm(scope){
|
||||
let title = '新增部门'
|
||||
let data = scope.row
|
||||
this.addOrEditDeptConfig={
|
||||
title:title,
|
||||
data: data
|
||||
}
|
||||
},
|
||||
// 搜索
|
||||
handleSearch(){
|
||||
this.queryData.current = 1;
|
||||
this.queryData.size = 10;
|
||||
this.getDeptList()
|
||||
},
|
||||
getDeptList(val,parentId = 0){
|
||||
console.log(parentId,'parentId')
|
||||
if(parentId == 0)
|
||||
{
|
||||
if(val!=undefined){this.queryData.current = val}
|
||||
systemManageApi.getDeptList(this.queryData).then(res => {
|
||||
if (!res.code) {
|
||||
this.tableData = res.records;
|
||||
this.tableData.forEach(item =>{
|
||||
item.hasChildren = true
|
||||
})
|
||||
|
||||
this.total = res.total;
|
||||
}
|
||||
})
|
||||
}
|
||||
else
|
||||
{
|
||||
this.refresh(parentId)
|
||||
}
|
||||
|
||||
},
|
||||
// 删除
|
||||
handleDelete(scope){
|
||||
this.$confirm("此操作将永久删除该区域, 是否继续?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
}).then(() => {
|
||||
if(!this.$clickThrottle()) { return }//防止重复点击
|
||||
systemManageApi.deleteDeptById({ id: scope.row.id }).then((res) => {
|
||||
this.$message.success("成功");
|
||||
this.getDeptList(1,scope.row.pid)
|
||||
});
|
||||
}).catch((e) => {});
|
||||
},
|
||||
ListToString(letlist){
|
||||
let letString=''
|
||||
if(letlist){
|
||||
letlist.forEach((element,index) => {
|
||||
if(index==0){letString=element}else{letString+=','+element}
|
||||
});
|
||||
}
|
||||
return letString;
|
||||
},
|
||||
load(tree, treeNode, resolve) {
|
||||
// console.log(tree,treeNode,resolve)
|
||||
systemManageApi.getDeptList({pid:tree.id,name:"",current:1,size:50,companyId:this.$store.state.userinfo.companyId}).then(res => {
|
||||
if (!res.code) {
|
||||
// 在节点展示加载数据时记录treeNode节点
|
||||
this.map.set(tree.id, {tree,treeNode,resolve});
|
||||
resolve(res.records)
|
||||
}
|
||||
})
|
||||
},
|
||||
// 在新增、编辑、删除子节点时,通过父级id找到对应的treeNode,重新加载子节点列表,完成数据刷新
|
||||
refresh(parentId) {
|
||||
if(this.map.get(parentId)) {
|
||||
const {tree,treeNode,resolve} = this.map.get(parentId);
|
||||
if(tree) {
|
||||
this.load(tree, treeNode, resolve);
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.el-table--fit {
|
||||
border:1px solid $border-color-lighter !important;
|
||||
border-bottom: 0!important;
|
||||
}
|
||||
|
||||
</style>
|
||||
@ -27,8 +27,8 @@
|
||||
:data="tableData"
|
||||
:header-cell-style="{background:'#F5F7FA'}"
|
||||
>
|
||||
<el-table-column prop="name" label="部门名称" width="250"></el-table-column>
|
||||
<el-table-column label="部门负责人">
|
||||
<el-table-column prop="name" label="部门名称" width="350"></el-table-column>
|
||||
<!-- <el-table-column label="部门负责人">
|
||||
<template slot-scope="scope">
|
||||
<div class="flex-row">
|
||||
{{ListToString(scope.row.masterName)}}
|
||||
@ -41,9 +41,9 @@
|
||||
{{ListToString(scope.row.masterPhone)}}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="count" label="部门人数" width="120"></el-table-column>
|
||||
<el-table-column prop="remark" label="部门描述" width="350"></el-table-column>
|
||||
</el-table-column> -->
|
||||
<el-table-column prop="count" label="部门人数" width="160"></el-table-column>
|
||||
<el-table-column prop="remark" label="部门描述"></el-table-column>
|
||||
<el-table-column label="操作" width="170">
|
||||
<template slot-scope="scope">
|
||||
<div class="flex-row">
|
||||
@ -134,9 +134,12 @@
|
||||
},
|
||||
ListToString(letlist){
|
||||
let letString=''
|
||||
letlist.forEach((element,index) => {
|
||||
if(index==0){letString=element}else{letString+=','+element}
|
||||
});
|
||||
if(letlist){
|
||||
letlist.forEach((element,index) => {
|
||||
if(index==0){letString=element}else{letString+=','+element}
|
||||
});
|
||||
}
|
||||
|
||||
return letString;
|
||||
}
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="layout-content-wrap">
|
||||
<div class="layout-content-wrap background-color-fff border-radius-8">
|
||||
|
||||
<div class="border-b-solid-lighter-1 p-h-24">
|
||||
<div class="flex-row justify-content-between height-56 align-items-center">
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="layout-content-wrap ">
|
||||
<div class="layout-content-wrap background-color-fff border-radius-8">
|
||||
<div class="layout-tabs-content-box">
|
||||
|
||||
<div class="height-30 flex-row align-items-center justify-content-between mb-24">
|
||||
|
||||
@ -67,21 +67,24 @@
|
||||
</el-row>
|
||||
<el-row type="flex" align="middle">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="选择部门" prop="deptId">
|
||||
<el-select v-model="userInfo.deptId" placeholder="请选择" class="width100">
|
||||
<el-option
|
||||
v-for="item in deptOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-form-item label="选择团队" prop="deptId">
|
||||
<el-cascader class="width100"
|
||||
v-model="userInfo.deptIds"
|
||||
:options="deptOptions"
|
||||
:props="{ expandTrigger: 'hover' }"
|
||||
@change="handleCascaderChange">
|
||||
<template slot-scope="{ node, data }">
|
||||
<span>{{ data.name }}</span>
|
||||
<span v-if="!node.isLeaf"> ({{ data.children.length }}) </span>
|
||||
</template>
|
||||
</el-cascader>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row type="flex" align="middle">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="部门负责人" prop="deptFlag">
|
||||
<el-form-item label="区域负责人" prop="deptFlag">
|
||||
<el-switch
|
||||
v-model="userInfo.identity"
|
||||
active-color="#535AFF"
|
||||
@ -135,6 +138,7 @@ export default {
|
||||
realName:'',
|
||||
roleIds:[],
|
||||
deptId:'',
|
||||
deptIds:[],
|
||||
type: 2,
|
||||
status:1,
|
||||
identity:3
|
||||
@ -151,7 +155,7 @@ export default {
|
||||
{ required: true, message: '请选择员工角色', trigger: ['blur','change'] }
|
||||
],
|
||||
deptId: [
|
||||
{ required: true, message: '请选择部门', trigger: ['blur','change'] }
|
||||
{ required: true, message: '请选择团队', trigger: ['blur','change'] }
|
||||
],
|
||||
phone: [
|
||||
{ required: true, message: '请输入手机号码', trigger: 'blur' },
|
||||
@ -209,6 +213,34 @@ export default {
|
||||
handleClose() {
|
||||
this.$emit('update:addOrEditUserConfig', null)
|
||||
},
|
||||
// 递归获取目标节点所有父节点
|
||||
ShowRecursive(childlist) {
|
||||
let _this=this
|
||||
childlist.forEach(function(item) {
|
||||
if(item.children.length > 0)
|
||||
{
|
||||
//递归
|
||||
item.label = item.name
|
||||
item.value = item.id
|
||||
_this.ShowRecursive(item.children);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(item.pid != 0)
|
||||
{
|
||||
item.children = null
|
||||
}
|
||||
item.label = item.name
|
||||
item.value = item.id
|
||||
}
|
||||
if(_this.userInfo.deptId == item.id){
|
||||
_this.userInfo.deptIds = [item.pid,item.id]
|
||||
}
|
||||
})
|
||||
},
|
||||
handleCascaderChange(e){
|
||||
this.userInfo.deptId = e[1]
|
||||
}
|
||||
},
|
||||
async created()
|
||||
{
|
||||
@ -222,18 +254,14 @@ export default {
|
||||
});
|
||||
})
|
||||
|
||||
api.getDeptList({current: 1,size: 100,companyId:this.$store.state.userinfo.companyId}).then(res => {
|
||||
res.records.forEach(element => {
|
||||
this.deptOptions.push({name:element.name,id:String(element.id)})
|
||||
});
|
||||
api.getDeptTree({current: 1,size: 100,companyId:this.$store.state.userinfo.companyId}).then(res => {
|
||||
this.deptOptions = res
|
||||
this.ShowRecursive(this.deptOptions)
|
||||
|
||||
})
|
||||
|
||||
if(Object.keys(this.addOrEditUserConfig.data).length>0)
|
||||
{
|
||||
// api.getUserById({id:this.addOrEditUserConfig.data.id}).then(res => {
|
||||
|
||||
// })
|
||||
|
||||
this.userInfo = JSON.parse(JSON.stringify(this.addOrEditUserConfig.data));
|
||||
}
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="layout-content-wrap">
|
||||
<div class="layout-content-wrap background-color-fff border-radius-8">
|
||||
<div class="border-b-solid-lighter-1 p-h-24">
|
||||
<div class="flex-row justify-content-between height-56 align-items-center">
|
||||
<div class="color-text-primary f22">用户列表</div>
|
||||
|
||||
@ -68,11 +68,17 @@ const routes = [
|
||||
component: () => import("@/pages/system-management/role-permissions-management"),
|
||||
meta: { title: "角色权限管理", icon: 'menu-role-permissions-management' },
|
||||
},
|
||||
{
|
||||
path: "/system-management/area-management",
|
||||
name: "/system-management/area-management",
|
||||
component: () => import("@/pages/system-management/area-management"),
|
||||
meta: { title: "区域管理", icon: 'menu-department-management' },
|
||||
},
|
||||
{
|
||||
path: "/system-management/department-management",
|
||||
name: "/system-management/department-management",
|
||||
component: () => import("@/pages/system-management/department-management"),
|
||||
meta: { title: "部门管理", icon: 'menu-department-management' },
|
||||
meta: { title: "团队管理", icon: 'menu-department-management' },
|
||||
},
|
||||
]
|
||||
},
|
||||
|
||||
@ -9,11 +9,11 @@ const caseManagementApi = {
|
||||
getDict: data => {
|
||||
return service.service.post(`${apiAdmin}data/dict/getDict`, data, {hideLoading:true})
|
||||
},
|
||||
// 部门
|
||||
// 区域
|
||||
getDeptList: data => {
|
||||
return service.service.post(`${apiAdmin}company/dept/getDeptList`, data)
|
||||
},
|
||||
// 根据部门id列表查看用户列表
|
||||
// 根据区域id列表查看用户列表
|
||||
getUserByDeptList: data => {
|
||||
return service.service.post(`${apiAdmin}system/user/getUserByDeptList`, data, {hideLoading:true})
|
||||
},
|
||||
@ -100,6 +100,11 @@ const caseManagementApi = {
|
||||
return service.service.post(`${apiMediate}cases/caseInfo/getNextCaseById`, data)
|
||||
},
|
||||
|
||||
// 案件包手动分案
|
||||
postpkgdispatchCase: data => {
|
||||
return service.service.post(`${apiMediate}api/case_pkg/dispatchCase`, data)
|
||||
},
|
||||
|
||||
//========================end::案件管理======================================
|
||||
}
|
||||
export default caseManagementApi;
|
||||
@ -99,28 +99,33 @@ const systemLogApi = {
|
||||
return service.service.post(`${apiAdmin}system/role/updateRoleResource`, data)
|
||||
},
|
||||
|
||||
//========================start::部门管理======================================
|
||||
// 部门列表
|
||||
//========================start::区域管理======================================
|
||||
// 区域列表
|
||||
getDeptList: data => {
|
||||
return service.service.post(`${apiAdmin}company/dept/getDeptList`, data)
|
||||
},
|
||||
// 新增部门
|
||||
// 区域列表
|
||||
getDeptTree: data => {
|
||||
return service.service.post(`${apiAdmin}company/dept/getDeptTree`, data)
|
||||
},
|
||||
|
||||
// 新增区域
|
||||
addDept: data => {
|
||||
return service.service.post(`${apiAdmin}company/dept/addDept`, data)
|
||||
},
|
||||
// 修改部门
|
||||
// 修改区域
|
||||
updateDeptById: data => {
|
||||
return service.service.post(`${apiAdmin}company/dept/updateDeptById`, data)
|
||||
},
|
||||
// 删除部门
|
||||
// 删除区域
|
||||
deleteDeptById: data => {
|
||||
return service.service.post(`${apiAdmin}company/dept/deleteDeptById`, data)
|
||||
},
|
||||
// 部门详情查看
|
||||
// 区域详情查看
|
||||
getDeptById: data => {
|
||||
return service.service.post(`${apiAdmin}company/dept/getDeptById`, data)
|
||||
},
|
||||
//========================end::部门管理======================================
|
||||
//========================end::区域管理======================================
|
||||
|
||||
}
|
||||
export default systemLogApi;
|
||||
|
||||
@ -18,7 +18,7 @@ const systemLogApi = {
|
||||
|
||||
return service.service.post(`${apiMediate}statistics/workbench/lineChartStatistics`, data, {hideLoading:true})
|
||||
},
|
||||
// 部门业绩查询
|
||||
// 区域业绩查询
|
||||
rankingStatistics: data => {
|
||||
return service.service.post(`${apiMediate}statistics/workbench/rankingStatistics`, data, {hideLoading:true})
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user