Browse Source

Merge branch 'dev_zxc_hsjcd_add'

V1.0
zxc 3 years ago
parent
commit
cca083a477
  1. 141
      src/views/modules/partymember/icpartyorgtree.vue
  2. 40
      src/views/modules/plugins/point/icpointnucleicmonitoring.vue

141
src/views/modules/partymember/icpartyorgtree.vue

@ -12,13 +12,28 @@
:data="tableData" :data="tableData"
:default-expand-all="true" :default-expand-all="true"
row-key="id" row-key="id"
border
:tree-props="{children: 'children', hasChildren: 'hasChildren'}" :tree-props="{children: 'children', hasChildren: 'hasChildren'}"
:header-cell-style="{background:'#2195FE',color:'#FFFFFF'}" :header-cell-style="{background:'#2195FE',color:'#FFFFFF'}"
:height="tableHeight"> :height="tableHeight">
<el-table-column prop="partyOrgName" label="党组织名称"></el-table-column> <el-table-column prop="partyOrgName" min-width="250" label="党组织名称"></el-table-column>
<el-table-column prop="partyOrgType" min-width="150" label="类别">
<template slot-scope="scope">
<span v-for="(item, index) in partyOrgTypes"
:key="item.value"
:value="item.label"
v-if="scope.row.partyOrgType == item.value">
{{ item.label }}</span>
</template>
</el-table-column>
<el-table-column prop="principal" width="120" label="负责人"></el-table-column>
<el-table-column prop="principalMobile" width="150" label="联系方式"></el-table-column>
<el-table-column label="操作" align="center" width="300"> <el-table-column label="操作" align="center" width="300">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-if="scope.row.partyOrgType != '6'"
@click="principal(scope.row)"
type="text"
size="small"
class="div-table-button--detail">{{'负责人'}}</el-button>
<el-button v-if="(scope.row.agencyId == agencyId || scope.row.agencyPids.includes(agencyId)) && scope.row.partyOrgType != '6'" <el-button v-if="(scope.row.agencyId == agencyId || scope.row.agencyPids.includes(agencyId)) && scope.row.partyOrgType != '6'"
@click="handleLook(scope.row.agencyPids, scope.row.id, scope.row)" @click="handleLook(scope.row.agencyPids, scope.row.id, scope.row)"
type="text" type="text"
@ -56,6 +71,39 @@
@lookMemberCancle="lookMemberCancle" @lookMemberCancle="lookMemberCancle"
@lookMemberOk="lookMemberOk"></look-Member> @lookMemberOk="lookMemberOk"></look-Member>
</el-dialog> </el-dialog>
<el-dialog
title="负责人"
:visible.sync="principalShow"
width="850px"
top="5vh"
class="dialog-h"
:before-close="handleClose">
<el-form ref="principalRules"
:inline="true"
:model="editPrincipalData"
:rules="principalRules"
class="div_form">
<el-form-item label="负责人"
label-width="150px"
prop="principal">
<el-select v-model="editPrincipalData.principal"
placeholder="请选择"
clearable
style="width: 200px"
class="item_width_4">
<el-option v-for="item in staffs"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="handleClose"> </el-button>
<el-button type="primary" @click="editPrincipal"> </el-button>
</span>
</el-dialog>
</el-card> </el-card>
</template> </template>
@ -67,6 +115,13 @@
export default { export default {
data () { data () {
return { return {
principalShow: false,
staffs: [],
editPrincipalData: {
principal: '',
principalMobile: '',
partyOrgId: ''
},
searchH: 0, searchH: 0,
dataForm: { dataForm: {
id: '', id: '',
@ -76,6 +131,36 @@
}, },
tableLoading: false, tableLoading: false,
tableData: [], tableData: [],
partyOrgTypes: [
{
value: '0',
label: '省委'
},
{
value: '1',
label: '市委'
},
{
value: '2',
label: '区委'
},
{
value: '3',
label: '党工委'
},
{
value: '4',
label: '党委'
},
{
value: '5',
label: '支部'
},
{
value: '6',
label: '党小组'
}
],
agencyId: '', agencyId: '',
addOrUpdateVisible: false, addOrUpdateVisible: false,
lookMemberShow: false, lookMemberShow: false,
@ -93,6 +178,13 @@
const h = this.clientHeight - this.searchH - 230 + this.iframeHeigh const h = this.clientHeight - this.searchH - 230 + this.iframeHeigh
const _h = this.clientHeight - 230 - this.searchH const _h = this.clientHeight - 230 - this.searchH
return this.$store.state.inIframe ? h : _h return this.$store.state.inIframe ? h : _h
},
principalRules() {
return {
principal: [
{required: true, message: '负责人不能为空', trigger: 'change'},
]
}
} }
}, },
mounted() { mounted() {
@ -109,6 +201,51 @@
// this.pageLoading = true // this.pageLoading = true
}, },
methods:{ methods:{
principal(row) {
this.principalShow = true
this.editPrincipalData.partyOrgId = row.id
this.editPrincipalData.principal = row.principal
this.$http.post('/data/aggregator/org/staff-select-list/'+row.agencyId,{'params': {}}).then(({ data: res }) =>{
if (res.code !== 0) {
return this.$message.error(res.internalMsg ? res.internalMsg : res.msg ? res.msg : '查询失败')
} else {
this.staffs = res.data
}
}).catch(() => {})
},
editPrincipal(row) {
this.staffs.forEach(s => {
if (this.editPrincipalData.principal === s.value){
this.editPrincipalData.principal = s.name
this.editPrincipalData.principalMobile = s.mobile
}
})
this.$refs['principalRules'].validate((valid) => {
if (!valid) {
return false
}
this.$http.post('/resi/partymember/icPartyOrg/editPrincipal',this.editPrincipalData).then(({ data: res }) =>{
if (res.code !== 0) {
return this.$message.error(res.internalMsg ? res.internalMsg : res.msg ? res.msg : '查询失败')
}else {
this.principalShow = false
this.getTableData()
this.resetEditPrincipalData()
}
}).catch(() => {})
})
},
handleClose() {
this.principalShow = false
this.resetEditPrincipalData()
},
resetEditPrincipalData() {
this.editPrincipalData = {
principal: '',
principalMobile: '',
partyOrgId: ''
}
},
// //
async getTableData () { async getTableData () {
this.tableLoading = true this.tableLoading = true

40
src/views/modules/plugins/point/icpointnucleicmonitoring.vue

@ -153,13 +153,32 @@
align="center" align="center"
show-overflow-tooltip show-overflow-tooltip
></el-table-column> ></el-table-column>
<el-table-column
prop="enableFlag"
label="禁用/启用"
header-align="center"
align="center"
show-overflow-tooltip>
<template slot-scope="scope">
<span v-for="(item, index) in enableFlagList"
:key="item.value"
:value="item.label"
v-if="scope.row.enableFlag == item.value">
{{ item.label }}</span>
</template>
</el-table-column>
<el-table-column <el-table-column
label="操作" label="操作"
header-align="center" header-align="center"
align="center" align="center"
width="150" width="180"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-button
type="text"
size="small"
class="div-table-button--detail"
@click="enableOrDisabled(scope.row.id)">{{ (scope.row.enableFlag === 'enable' && '禁用') || '启用' }}</el-button>
<el-button <el-button
type="text" type="text"
size="small" size="small"
@ -243,6 +262,16 @@ export default {
mixins: [mixinViewModule], mixins: [mixinViewModule],
data() { data() {
return { return {
enableFlagList: [
{
value: 'enable',
label: '启用'
},
{
value: 'disabled',
label: '禁用'
}
],
dataForm: { dataForm: {
name: "", name: "",
mobile: "", mobile: "",
@ -361,6 +390,15 @@ export default {
diaClose() { diaClose() {
this.sendNoticeFormShow = false; this.sendNoticeFormShow = false;
}, },
// /
enableOrDisabled(id) {
this.$http
.post(`/epmetuser/appPoint/enableOrDisabled/` + id)
.then(({ data: res }) => {
this.loadTable();
})
.catch(() => {});
},
// / // /
addOrUpdateHandle(id, title) { addOrUpdateHandle(id, title) {
this.dialogTitle = title; this.dialogTitle = title;

Loading…
Cancel
Save