Browse Source

工作人员根据组织添加

V1.0
mk 2 years ago
parent
commit
a2b5dc67a6
  1. 1
      src/views/dataBoard/renfang/cpts/fwgl.vue
  2. 32
      src/views/dataBoard/renfang/cpts/jmgl.vue
  3. 5
      src/views/dataBoard/renfang/index.vue
  4. 103
      src/views/modules/base/organization/organization.vue

1
src/views/dataBoard/renfang/cpts/fwgl.vue

@ -261,7 +261,6 @@ export default {
// pieChart
this.pieOption = pieOption();
const {pandectData} = this
console.log(pandectData);
//
this.pieOption.title.text =
(pandectData.homeCount != 0

32
src/views/dataBoard/renfang/cpts/jmgl.vue

@ -7,6 +7,7 @@
class=""
@myChartMethod="pieInitOk"
ref="pieChart"
v-if="pandectData.totalResidents"
></screen-echarts-frame>
</div>
<div class="pie-legend">
@ -31,7 +32,7 @@
<div class="title">居民总数</div>
</div>
<div class="item-two">
<div class="num">{{ info.resident_count }}</div>
<div class="num">{{ pandectData.totalResidents }}</div>
<div class="unit"></div>
</div>
</div>
@ -50,7 +51,7 @@
</div>
<div class="item-two">
<div class="num">
{{ info.inhabitant_count }}
{{ pandectData.permanentResiCount }}
</div>
<div class="unit"></div>
</div>
@ -70,7 +71,7 @@
<div class="title">流动人口</div>
</div>
<div class="item-two">
<div class="num">{{ info.floating_count }}</div>
<div class="num">{{ pandectData.floatingResiCount }}</div>
<div class="unit"></div>
</div>
</div>
@ -145,6 +146,7 @@ export default {
inhabitant_count: 0,
floating_count: 0,
},
pandectData:{}
};
},
watch: {
@ -153,7 +155,9 @@ export default {
},
},
mounted() {
this.getData();
this.$nextTick(()=>{
this.getData();
})
},
methods: {
toListPage(type = "", type_name = "") {
@ -233,21 +237,19 @@ export default {
async iniPieChart() {
this.$refs.pieChart.clear();
// this.$refs.pieChart.showLoading()
// pieChart
this.pieOption = pieOption();
const { info } = this;
const { pandectData } = this;
//
this.pieOption.title.text =
(info.resident_count != 0
(pandectData.totalResidents != 0
? parseInt(
(100 * info.inhabitant_count) / info.resident_count
(100 * pandectData.permanentResiCount) / pandectData.totalResidents
)
: "--") + "%";
this.pieData = [
{ value: info.inhabitant_count, name: "常住人口" },
{ value: info.floating_count, name: "流动人口" },
{ value: pandectData.permanentResiCount, name: "常住人口" },
{ value: pandectData.floatingResiCount, name: "流动人口" },
];
this.pieOption.series[0].data = this.pieData;
this.$refs.pieChart.setOption(this.pieOption);
@ -260,14 +262,14 @@ export default {
fromActionPayload: { dataIndexInside },
} = params;
this.pieOption.title.text =
(info.resident_count != 0
(pandectData.totalResidents != 0
? parseInt(
(100 *
[
info.inhabitant_count,
info.floating_count,
pandectData.permanentResiCount,
pandectData.floatingResiCount,
][dataIndexInside]) /
info.resident_count
pandectData.totalResidents
)
: "--") + "%";
this.$refs.pieChart.myChart.setOption(this.pieOption);

5
src/views/dataBoard/renfang/index.vue

@ -17,7 +17,7 @@
</div>
<div class="m-subbox">
<fwgl ref="fwgl" :orgId="orgData.org_id" :pandectData="pandectData"></fwgl>
<fwgl ref="fwgl" :orgId="orgData.org_id"></fwgl>
</div>
</div>
@ -31,7 +31,7 @@
</div>
<div class="m-subbox">
<jmgl :orgId="orgData.org_id" :pandectData="pandectData"></jmgl>
<jmgl :orgId="orgData.org_id" ref="jmgl"></jmgl>
</div>
</div>
</div>
@ -553,6 +553,7 @@ export default {
if (data) {
this.$nextTick(()=>{
this.$refs['fwgl'].pandectData = data
this.$refs['jmgl'].pandectData = data
}
)
}

103
src/views/modules/base/organization/organization.vue

@ -225,7 +225,8 @@
<el-table v-show="gridStaffTableFlag"
:data="gridStaffTableListData"
style="width: 100%"
height="350">
height="350"
>
<el-table-column prop="name"
label="网格工作人员名字"
width="260"></el-table-column>
@ -245,10 +246,19 @@
class-name="small-padding fixed-width">
<template slot="header"
slot-scope="scope">
<el-button size="mini"
<!-- <el-button size="mini"
type="primary"
icon="el-icon-plus"
@click="addGridPeo(scope.row)">新增</el-button>
@click="addGridPeo(scope.row)">新增</el-button> -->
<el-dropdown @command="handleCommand">
<el-button type="primary" >
新增 <i class="el-icon-arrow-down el-icon--right"></i>
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="newAdd" >新添加</el-dropdown-item>
<el-dropdown-item command="fromOrg">从组织添加</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
<template slot-scope="scope">
<el-button size="mini"
@ -488,7 +498,37 @@
</div>
</el-dialog>
</div>
<div v-if="dialogVisiblePeoAgency">
<el-dialog title="新增人员ccccc"
:visible.sync="dialogVisiblePeoAgency"
width="850"
>
<el-form :model="peoFormAgency"
label-width="120px"
ref="addPeoAgencyForm"
:rules="rulesAgencyPeo">
<el-form-item label="工作人员" prop="selectedList">
<el-select v-model="peoFormAgency.selectedList"
multiple
placeholder="请选择"
>
<el-option v-for="item in agencyStaffTableListData"
:key="item.staffId"
:value="item.staffId"
:label="item.name"
>
</el-option>
</el-select>
</el-form-item>
</el-form>
<div slot="footer">
<el-button @click="cancelPeoAgency"> </el-button>
<el-button type="primary"
@click="submitPeoAgency"> </el-button>
</div>
</el-dialog>
</div>
<!-- 人员修改 -->
<el-dialog v-if="modifyPeo"
title="人员修改"
@ -1293,7 +1333,16 @@ export default {
label: 'agencyName',
children: 'subAgencyList',
checkStrictly: true
}
},
dialogVisiblePeoAgency:false,//
peoFormAgency:{
gridId:"",
selectedList:[]
},
rulesAgencyPeo:{
selectedList:[{required:true,message:"请选择人员",trigger:"blur"}]
},
tableKey:""
};
},
created () {
@ -1761,6 +1810,9 @@ export default {
disableFlag: "",
newRoles: [],
};
this.peoFormAgency = {
selectedList:[]
}
},
//
GridFormRest () {
@ -1978,11 +2030,16 @@ export default {
},
//
async addGridPeo () {
async addGridPeo (command) {
if (command === 'newAdd') {
this.dialogVisiblePeo = true;
this.peoForm.orgType = "grid";
} else if (command === 'fromOrg') {
await this.getAgencyStaffListData()
console.log(this.agencyStaffTableListData);
this.peoForm.orgType = "grid";
this.dialogVisiblePeoAgency = true;
}
},
//
async xiuGridPeo (row) {
@ -2625,7 +2682,6 @@ export default {
// id
async getGridDetailsById () {
const url = "/gov/org/grid/griddetail";
let params = {
gridId: this.judgeOrgInfoLevel.id,
};
@ -2816,6 +2872,37 @@ export default {
this.longitude = lonlat[0];
// this.formData.address = selPosition.address + selPosition.name;
},
handleCommand(command) {
this.addGridPeo(command);
},
cancelPeoAgency(){
this.dialogVisiblePeoAgency = false
this.peoFormAgency.selectedList = []; //
},
submitPeoAgency(){
this.$refs["addPeoAgencyForm"].validate((valid, err) => {
if (valid) {
this.submitPeoAgencyDo();
} else {
app.util.validateRule(err);
return console.log("error submit!!", valid, err);
}
});
},
async submitPeoAgencyDo(){
let url = "/gov/org/grid/addgridstaffs"
this.peoFormAgency.gridId = this.currentGridOrgId
const {data,code,msg} = await requestPost(url,this.peoFormAgency)
if(code == 0){
this.$message.success('添加成功')
this.dialogVisiblePeoAgency = false
this.getGridStaffListData();
this.peoFormAgency.selectedList = []
} else{
this.$message.err(msg)
}
},
},
};
</script>

Loading…
Cancel
Save