epmet pc工作端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

246 lines
8.1 KiB

2 years ago
<template>
<div>
<el-dialog
:before-close="handleClose"
:modal="true"
:modal-append-to-body="false"
:visible.sync="dialogVisible"
class="dissatisfied-detail"
title=""
width="1366px"
>
<div class="content">
<div class="main-title main-title2">
<Title text="资源调度"/>
</div>
2 years ago
<div class="contents">
<el-row :gutter="30">
<el-col :span="5">
<div class="tree">
<el-tree
:data="data"
:default-expand-all="true"
:props="defaultProps"
highlight-current
icon-class="el-icon-arrow-right"
node-key="value"
@node-click="handleNodeClick"
/>
</div>
</el-col>
<el-col :span="19">
<div class="table">
<el-table v-loading="loading" :data="list" element-loading-background="rgba(0, 0, 0, 0.3)"
max-height="600px">
<el-table-column label="资源类型" min-width="120" prop="personnelType">
<template slot-scope="{row}">
{{
row.personnelType ? data[0].children.filter(item => item.value === row.personnelType)[0].label : ''
}}
</template>
</el-table-column>
2 years ago
<el-table-column v-if="peopleType !== '4' && peopleType !== '5'" label="所属组织" min-width="180"
prop="orgName"/>
<el-table-column v-if="peopleType !== '4' && peopleType !== '5'" label="姓名/名称" min-width="120"
prop="name"/>
<el-table-column v-if="peopleType !== '4' && peopleType !== '5'" label="联系电话" min-width="120"
prop="mobile">
<template slot-scope="scope">
{{ $sensitive(scope.row.mobile, 3, 7) }}
</template>
</el-table-column>
<!-- <el-table-column label="状态" prop="" width="120"/>-->
<!-- <el-table-column label="距离" prop="" width="120"/>-->
2 years ago
<el-table-column v-if="peopleType === '4'" label="所属组织" min-width="180" prop="agencyName"/>
<el-table-column v-if="peopleType === '4'" label="负责人" min-width="120" prop="principalName"/>
<el-table-column v-if="peopleType === '4'" label="联系电话" min-width="120" prop="principalPhone">
<template slot-scope="scope">
{{ $sensitive(scope.row.principalPhone, 3, 7) }}
</template>
</el-table-column>
<el-table-column v-if="peopleType === '5'" label="所属组织" min-width="180" prop="agencyName"/>
<el-table-column v-if="peopleType === '5'" label="联系人" min-width="120" prop="contact"/>
<el-table-column v-if="peopleType === '5'" label="联系电话" min-width="120" prop="contactMobile">
<template slot-scope="scope">
{{ $sensitive(scope.row.mobile, 3, 7) }}
</template>
</el-table-column>
<el-table-column label="操作" prop="op" width="250">
<template slot-scope="scope">
<CallPhone :mobile="scope.row.mobile" text="拨打电话"/>
<span class="handle" @click="handleHandle">处理</span>
<span class="view" @click="handleViews(scope.row)">查看</span>
</template>
</el-table-column>
</el-table>
</div>
</el-col>
</el-row>
</div>
2 years ago
</div>
</el-dialog>
<ResourceInfo ref="ResourceInfo" @ok="handleHandle" :currentLevelData="currentLevelData"/>
</div>
2 years ago
</template>
<script>
import Title from "@/views/dataBoard/satisfactionEval/components/Title";
import CallPhone from "@/views/dataBoard/cpts/CallPhone";
import ResourceInfo from "@/views/dataBoard/overview/components/ResourceInfo.vue";
2 years ago
export default {
name: "ResourceScheduling",
components: {Title, CallPhone, ResourceInfo},
props: {
currentLevelData: {
type: Object,
default: () => {
},
}
},
2 years ago
data() {
return {
loading: false,
2 years ago
dialogVisible: false,
list: [],
2 years ago
peopleType: "staffGrid",
data: [
{
label: '人资源',
2 years ago
children: [{
2 years ago
label: "网格员",
value: "staffGrid",
},
{
label: "公益岗",
value: "publicWelfareNum",
},
{
label: "志愿者",
value: "volunteer",
},
{
label: "社区自组织",
value: "4",
},
{
label: "联建单位",
value: "5",
},
{
label: "15分钟生活圈商家",
value: "6",
},]
}, {
label: '物资源',
children: []
}, {
label: '场所资源',
children: []
}],
2 years ago
defaultProps: {
children: 'children',
label: 'label'
}
};
},
methods: {
handleClose(done) {
this.dialogVisible = false;
},
open(id) {
this.dialogVisible = true;
this.getList();
2 years ago
},
getList() {
this.loading = true;
console.log(this.currentLevelData, 'this.currentLevelData')
this.$http.get("/actual/base/streetOverview/queryPersonnelGroup" +
"?level=" + this.currentLevelData.orgLevel +
"&orgId=" + this.currentLevelData.orgId +
"&personnelType=" + this.peopleType)
.then(({data: {data}}) => {
this.loading = false;
this.list = data.personnelInfoVOList;
});
},
2 years ago
getZzzList() {
this.loading = true;
this.$http.post('/actual/base/iccommunityselforganization/communityselforganizationlist', {
agencyId: this.currentLevelData.orgId,
...this.queryParams
}).then(res => {
this.loading = false;
this.list = res.data.data.list;
this.total = res.data.data.total;
})
},
getLjdwList() {
this.loading = true;
this.$http.post('/actual/base/icpartyunit/list', {
agencyId: this.currentLevelData.orgId,
...this.queryParams
}).then(res => {
this.loading = false;
this.list = res.data.data.list;
this.total = res.data.data.total;
})
},
handleViews(data) {
// 1志愿者、2联建单位、3社区自组织、4网格员、5公益岗
let type = this.peopleType === 'volunteer' ? 1 :
this.peopleType === '5' ? 2 :
this.peopleType === '4' ? 3 :
this.peopleType === 'staffGrid' ? 4 :
this.peopleType === 'publicWelfareNum' ? 5 : ''
this.$refs.ResourceInfo.open(type === 3 ? data.agencyId : data.id, type,data)
2 years ago
},
2 years ago
/* handleViews() {
this.$refs.ResourceInfo.open()
},*/
handleNodeClick(data) {
console.log(data.value)
if (data.value) {
this.peopleType = data.value;
console.log(data);
2 years ago
if (this.peopleType === '4') {
this.getZzzList();
} else if (this.peopleType === '5') {
this.getLjdwList();
} else {
this.getList()
}
}
},
handleHandle(data) {
this.handleClose()
this.$emit('handle', data);
2 years ago
}
},
};
</script>
<style lang="scss" scoped>
@import "@/assets/scss/dataBoard/dialog.scss";
@import "@/assets/scss/dataBoard/tree.scss";
@import "@/assets/scss/dataBoard/table2.scss";
.handle {
font-size: 14px;
margin-left: 10px;
cursor: pointer;
2 years ago
color: #9A69EC;
}
.view {
font-size: 14px;
margin-left: 10px;
cursor: pointer;
2 years ago
color: #007FF1;
}
2 years ago
</style>