Browse Source

Merge branch 'dev-数据对比' into dev

dev-用户反馈
dai 3 years ago
parent
commit
8778409e52
  1. 6
      src/views/modules/base/community/buildForm.vue
  2. 6
      src/views/modules/base/community/communityForm.vue
  3. 117
      src/views/modules/base/organization/organization.vue
  4. 716
      src/views/modules/communityParty/heart/heartForm.vue
  5. 8
      src/views/modules/communityParty/regionalParty/activitysForm.vue
  6. 8
      src/views/modules/communityParty/regionalParty/unitsForm.vue
  7. 8
      src/views/modules/communityService/dqfwzx/cpts/edit.vue
  8. 6
      src/views/modules/communityService/fuwujilu/addForm.vue
  9. 6
      src/views/modules/communityService/fuwujilu/editForm.vue
  10. 8
      src/views/modules/communityService/fuwuzuzhi/cpts/edit.vue
  11. 82
      src/views/modules/communityService/shzz/cpts/edit.vue
  12. 12
      src/views/modules/communityService/sqzzz/cpts/edit.vue
  13. 8
      src/views/modules/cpts/base/cpts/edit.vue
  14. 259
      src/views/modules/cpts/base/index.vue
  15. 612
      src/views/modules/partymember/icpartyorg-add-or-update.vue
  16. 6
      src/views/modules/plugins/point/icpointnucleicmonitoring-add-or-update.vue
  17. 6
      src/views/modules/plugins/point/icpointvaccinesinoculation-add-or-update.vue
  18. 108
      src/views/modules/renFangTongJi/cpts/shequtongji.vue
  19. 364
      src/views/modules/renFangTongJi/index.vue
  20. 8
      src/views/modules/shequzhili/csgltc/csglForm.vue
  21. 8
      src/views/modules/shequzhili/event/cpts/add.vue
  22. 8
      src/views/modules/shequzhili/ggfwtc/ggfwForm.vue
  23. 178
      src/views/modules/shujuduibi/canji.vue
  24. 122
      src/views/modules/shujuduibi/siwang.vue

6
src/views/modules/base/community/buildForm.vue

@ -372,9 +372,11 @@ export default {
markers.setGeometries([]) markers.setGeometries([])
// //
search search
.searchRectangle({ .searchNearby({
keyword: this.keyWords, keyword: this.keyWords,
bounds: map.getBounds() radius: 1000,
autoExtend: true,
center: map.getCenter(),
}) })
.then((result) => { .then((result) => {
let { data } = result let { data } = result

6
src/views/modules/base/community/communityForm.vue

@ -285,9 +285,11 @@ export default {
markers.setGeometries([]) markers.setGeometries([])
// //
search search
.searchRectangle({ .searchNearby({
keyword: this.keyWords, keyword: this.keyWords,
bounds: map.getBounds() radius: 1000,
autoExtend: true,
center: map.getCenter(),
}) })
.then((result) => { .then((result) => {
let { data } = result let { data } = result

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

@ -728,11 +728,20 @@
<el-form-item label="调动至"> <el-form-item label="调动至">
<el-cascader <el-cascader
clearable clearable
:props="{ checkStrictly: true }" :props="{ checkStrictly: true, multiple: false }"
v-model="selectValue" v-model="selectValue"
:options="options" :options="options"
@change="handleChange" style="width: 100%"
> @change="handleChangeTransferCascader"
>
<template slot-scope="{ data }">
<span>{{ data.label }}</span>
<span
v-if="data.type != 'agency'"
style="color: #aaa; font-size: 12px"
>{{ data.typeName }}
</span>
</template>
</el-cascader> </el-cascader>
</el-form-item> </el-form-item>
<el-form-item label="调动原因"> <el-form-item label="调动原因">
@ -1254,24 +1263,7 @@ export default {
roleList: [], roleList: [],
// //
options: [ options: [],
{
value: "",
label: "",
children: [
{
value: "",
label: "",
children: [],
},
{
value: "",
label: "",
children: [],
},
],
},
],
selectValue: [], selectValue: [],
// //
breadcrumbArr: [], breadcrumbArr: [],
@ -1358,30 +1350,24 @@ export default {
}, },
methods: { methods: {
// id // id
handleChange(e) { handleChangeTransferCascader(e) {
this.transferForm.orgId = e[1]; console.log("*********************");
if (this.transferForm.orgId != null || "") { function findItem(valueArr, coll) {
if (this.transferForm.orgId === 0) { console.log("--------------------");
if (e[2] == null || "") { console.log(valueArr);
this.transferForm.orgType = "dept"; let copyArr = [...valueArr];
this.transferForm.orgId = "14f572e724eecf7668b655505d789cab"; let firstValue = copyArr.shift();
let item = coll.find((a) => a.value == firstValue);
console.log(item);
if (copyArr.length > 0) {
return findItem(copyArr, item.children);
} else { } else {
this.transferForm.orgId = e[2]; return item;
this.transferForm.orgType = "dept";
} }
} else {
if (e[2] == null || "") {
this.transferForm.orgType = "grid";
this.transferForm.orgId = "63d5ff92ea981b1c58e4914ac894c610";
} else {
this.transferForm.orgId = e[2];
this.transferForm.orgType = "grid";
}
}
} else {
this.transferForm.orgId = e[0];
this.transferForm.orgType = "agency";
} }
let item = findItem(e, this.options);
this.transferForm.orgId = item.value;
this.transferForm.orgType = item.type;
}, },
/** 查询系统工作人员角色(职责) */ /** 查询系统工作人员角色(职责) */
async getDutyList() { async getDutyList() {
@ -2166,31 +2152,32 @@ export default {
const { data, code, msg } = await requestPost(url, params); const { data, code, msg } = await requestPost(url, params);
if (code === 0) { if (code === 0) {
this.options[0].label = data.agencyName; function computeOption(opt) {
this.options[0].value = data.agencyId; return {
label: opt.agencyName,
console.log("--------", this.options); value: opt.agencyId,
let depart = Array.from(data.departmentList); type: "agency",
let gr = Array.from(data.gridList); children: [
...(opt.departmentList || []).map((item) => ({
depart.forEach((item) => {
const ob = {
value: item.deptId,
label: item.deptName, label: item.deptName,
}; value: item.deptId,
this.options[0].children[0].children.push(ob); type: "dept",
}); typeName: "部门",
this.options[0].children[0].value = 0; })),
this.options[0].children[0].label = "部门"; ...(opt.gridList || []).map((item) => ({
this.options[0].children[1].value = 1;
this.options[0].children[1].label = "网格";
gr.forEach((item) => {
const obj = {
value: item.gridId,
label: item.gridName, label: item.gridName,
value: item.gridId,
type: "grid",
typeName: "网格",
})),
...(opt.subAgencyList || []).map((item) => computeOption(item)),
],
}; };
this.options[0].children[1].children.push(obj); }
}); if (data) {
this.options = [computeOption(data)];
console.log("树树树树树树树树树树", this.options[0]);
}
} else { } else {
this.$message.error("树查询失败", msg); this.$message.error("树查询失败", msg);
} }
@ -2477,7 +2464,7 @@ export default {
const url = "/gov/org/agency/addagency-v2"; const url = "/gov/org/agency/addagency-v2";
let params = { let params = {
parentAgencyId: this.parentAgencyId, parentAgencyId: this.currentAgencyId,
agencyName: this.agencyForm.agencyName, agencyName: this.agencyForm.agencyName,
level: this.agencyForm.level, level: this.agencyForm.level,
areaCodeSwitch: "closed", areaCodeSwitch: "closed",

716
src/views/modules/communityParty/heart/heartForm.vue

File diff suppressed because it is too large

8
src/views/modules/communityParty/regionalParty/activitysForm.vue

@ -425,7 +425,7 @@ export default {
// map TMap.Map() // map TMap.Map()
map = new window.TMap.Map(document.getElementById('app'), { map = new window.TMap.Map(document.getElementById('app'), {
center: center, // center: center, //
zoom: 17.2, // zoom: 16.2, //
pitch: 43.5, // pitch: 43.5, //
rotation: 45 // rotation: 45 //
}) })
@ -470,9 +470,11 @@ export default {
markers.setGeometries([]) markers.setGeometries([])
// //
search search
.searchRectangle({ .searchNearby({
keyword: this.keyWords, keyword: this.keyWords,
bounds: map.getBounds() radius: 1000,
autoExtend: true,
center: map.getCenter(),
}) })
.then((result) => { .then((result) => {
let { data } = result let { data } = result

8
src/views/modules/communityParty/regionalParty/unitsForm.vue

@ -354,7 +354,7 @@ export default {
// map TMap.Map() // map TMap.Map()
map = new window.TMap.Map(document.getElementById('app'), { map = new window.TMap.Map(document.getElementById('app'), {
center: center, // center: center, //
zoom: 17.2, // zoom: 16.2, //
pitch: 43.5, // pitch: 43.5, //
rotation: 45 // rotation: 45 //
}) })
@ -399,9 +399,11 @@ export default {
markers.setGeometries([]) markers.setGeometries([])
// //
search search
.searchRectangle({ .searchNearby({
keyword: this.keyWords, keyword: this.keyWords,
bounds: map.getBounds() radius: 1000,
autoExtend: true,
center: map.getCenter(),
}) })
.then((result) => { .then((result) => {
let { data } = result let { data } = result

8
src/views/modules/communityService/dqfwzx/cpts/edit.vue

@ -449,7 +449,7 @@ export default {
// map TMap.Map() // map TMap.Map()
map = new window.TMap.Map(document.getElementById("app"), { map = new window.TMap.Map(document.getElementById("app"), {
center: center, // center: center, //
zoom: 17.2, // zoom: 16.2, //
pitch: 43.5, // pitch: 43.5, //
rotation: 45, // rotation: 45, //
}); });
@ -493,9 +493,11 @@ export default {
markers.setGeometries([]); markers.setGeometries([]);
// //
search search
.searchRectangle({ .searchNearby({
keyword: this.dataForm.locationAddress, keyword: this.dataForm.locationAddress,
bounds: map.getBounds(), radius: 1000,
autoExtend: true,
center: map.getCenter(),
}) })
.then((result) => { .then((result) => {
let { data } = result; let { data } = result;

6
src/views/modules/communityService/fuwujilu/addForm.vue

@ -1023,9 +1023,11 @@ export default {
markers.setGeometries([]); markers.setGeometries([]);
// //
search search
.searchRectangle({ .searchNearby({
keyword: this.keyWords, keyword: this.keyWords,
bounds: map.getBounds(), radius: 1000,
autoExtend: true,
center: map.getCenter(),
}) })
.then((result) => { .then((result) => {
let { data } = result; let { data } = result;

6
src/views/modules/communityService/fuwujilu/editForm.vue

@ -608,9 +608,11 @@ export default {
markers.setGeometries([]) markers.setGeometries([])
// //
search search
.searchRectangle({ .searchNearby({
keyword: this.keyWords, keyword: this.keyWords,
bounds: map.getBounds() radius: 1000,
autoExtend: true,
center: map.getCenter(),
}) })
.then((result) => { .then((result) => {
let { data } = result let { data } = result

8
src/views/modules/communityService/fuwuzuzhi/cpts/edit.vue

@ -279,7 +279,7 @@ export default {
// map TMap.Map() // map TMap.Map()
map = new window.TMap.Map(document.getElementById("app"), { map = new window.TMap.Map(document.getElementById("app"), {
center: center, // center: center, //
zoom: 17.2, // zoom: 16.2, //
pitch: 43.5, // pitch: 43.5, //
rotation: 45, // rotation: 45, //
}); });
@ -323,9 +323,11 @@ export default {
markers.setGeometries([]); markers.setGeometries([]);
// //
search search
.searchRectangle({ .searchNearby({
keyword: this.fmData.address, keyword: this.fmData.address,
bounds: map.getBounds(), radius: 1000,
autoExtend: true,
center: map.getCenter(),
}) })
.then((result) => { .then((result) => {
let { data } = result; let { data } = result;

82
src/views/modules/communityService/shzz/cpts/edit.vue

@ -9,20 +9,29 @@
:disabled="formType === 'detail'" :disabled="formType === 'detail'"
class="form" class="form"
> >
<el-form-item
<el-form-item label="头像" label-width="150px" label="头像"
label-width="150px"
prop="imageList" prop="imageList"
style="display: block"> style="display: block"
>
<div class="imsg-list"> <div class="imsg-list">
<div v-for="(item, index) in dataForm.imageList" :key="index" class="imgs-item"> <div
v-for="(item, index) in dataForm.imageList"
:key="index"
class="imgs-item"
>
<el-image <el-image
style="width: 100px; height: 100px" style="width: 100px; height: 100px"
:src="item" :src="item"
fit="fill" fit="fill"
:preview-src-list="dataForm.imageList"></el-image> :preview-src-list="dataForm.imageList"
></el-image>
<i class="el-icon-delete" @click="handleDelimg(item, index)"></i> <i class="el-icon-delete" @click="handleDelimg(item, index)"></i>
</div> </div>
<el-upload :headers="$getElUploadHeaders()" class="avatar-uploader" <el-upload
:headers="$getElUploadHeaders()"
class="avatar-uploader"
v-if="dataForm.imageList.length < 1 && !disabled" v-if="dataForm.imageList.length < 1 && !disabled"
:action="uploadUlr" :action="uploadUlr"
:data="{ customerId: customerId }" :data="{ customerId: customerId }"
@ -31,10 +40,15 @@
:on-progress="handleProgress" :on-progress="handleProgress"
:on-success="handleImgSuccess" :on-success="handleImgSuccess"
:before-upload="beforeImgUpload" :before-upload="beforeImgUpload"
accept=".jpg,.jpeg,.png,.gif,.bmp,.JPG,.JPEG,.PBG,.GIF,.BMP"> accept=".jpg,.jpeg,.png,.gif,.bmp,.JPG,.JPEG,.PBG,.GIF,.BMP"
<el-progress v-if="uploading" :width="100" type="circle" :percentage="unloadPencent"></el-progress> >
<el-progress
v-if="uploading"
:width="100"
type="circle"
:percentage="unloadPencent"
></el-progress>
<i v-else class="el-icon-plus avatar-uploader-icon"></i> <i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload> </el-upload>
</div> </div>
</el-form-item> </el-form-item>
@ -203,8 +217,7 @@
:disabled="btnDisable" :disabled="btnDisable"
@click="handleComfirm" @click="handleComfirm"
> >
</el-button </el-button>
>
</div> </div>
</div> </div>
</template> </template>
@ -223,11 +236,11 @@ let loading; // 加载动画
export default { export default {
data() { data() {
return { return {
uploadUlr: window.SITE_CONFIG['apiURL'] + '/oss/file/uploadqrcodeV2', uploadUlr: window.SITE_CONFIG["apiURL"] + "/oss/file/uploadqrcodeV2",
btnLoading: false, btnLoading: false,
uploading: false, uploading: false,
disabled: false, disabled: false,
customerId: '', customerId: "",
formType: "add", // addeditdetail formType: "add", // addeditdetail
agencyId: "", agencyId: "",
@ -316,7 +329,7 @@ export default {
// map TMap.Map() // map TMap.Map()
map = new window.TMap.Map(document.getElementById("app"), { map = new window.TMap.Map(document.getElementById("app"), {
center: center, // center: center, //
zoom: 17.2, // zoom: 16.2, //
pitch: 43.5, // pitch: 43.5, //
rotation: 45, // rotation: 45, //
}); });
@ -358,9 +371,11 @@ export default {
markers.setGeometries([]); markers.setGeometries([]);
// //
search search
.searchRectangle({ .searchNearby({
keyword: this.dataForm.address, keyword: this.dataForm.address,
bounds: map.getBounds(), radius: 1000,
autoExtend: true,
center: map.getCenter(),
}) })
.then((result) => { .then((result) => {
let { data } = result; let { data } = result;
@ -378,32 +393,32 @@ export default {
}); });
}, },
beforeImgUpload(file) { beforeImgUpload(file) {
const isPNG = (file.type === 'image/png') || (file.type === 'image/jpeg') const isPNG = file.type === "image/png" || file.type === "image/jpeg";
const isLt1M = file.size / 1024 / 1024 < 10 const isLt1M = file.size / 1024 / 1024 < 10;
if (!isPNG) { if (!isPNG) {
this.$message.error('上传图片只能是 PNG 或 JPEG 格式!') this.$message.error("上传图片只能是 PNG 或 JPEG 格式!");
} }
if (!isLt1M) { if (!isLt1M) {
this.$message.error('上传图片大小不能超过 10MB!') this.$message.error("上传图片大小不能超过 10MB!");
} }
return isPNG && isLt1M return isPNG && isLt1M;
}, },
handleProgress(event, file, fileList) { handleProgress(event, file, fileList) {
this.uploading = true this.uploading = true;
this.unloadPencent = Number(file.percentage.toFixed(0)) this.unloadPencent = Number(file.percentage.toFixed(0));
}, },
handleImgSuccess(res, file) { handleImgSuccess(res, file) {
if (res.code === 0 && res.msg === 'success') { if (res.code === 0 && res.msg === "success") {
this.uploading = false this.uploading = false;
this.unloadPencent = 0 this.unloadPencent = 0;
this.dataForm.imageList.push(res.data.url) this.dataForm.imageList.push(res.data.url);
} else { } else {
this.$message.error(res.msg) this.$message.error(res.msg);
} }
}, },
handleDelimg(item, index) { handleDelimg(item, index) {
this.dataForm.imageList.splice(index, 1) this.dataForm.imageList.splice(index, 1);
}, },
handleMoveCenter() { handleMoveCenter() {
// //
@ -419,7 +434,7 @@ export default {
this.$refs.ref_form.resetFields(); this.$refs.ref_form.resetFields();
this.formType = type; this.formType = type;
this.dataForm.imageList = [] this.dataForm.imageList = [];
if (row) { if (row) {
this.dataForm = { ...this.dataForm, ...row }; this.dataForm = { ...this.dataForm, ...row };
if (row.imgUrl) { if (row.imgUrl) {
@ -485,7 +500,6 @@ export default {
}, },
async submit() { async submit() {
let url = ""; let url = "";
if (this.formType === "add") { if (this.formType === "add") {
url = "/heart/societyorg/add"; url = "/heart/societyorg/add";
@ -535,7 +549,6 @@ export default {
latitude: "", latitude: "",
imageList:[] imageList:[]
};*/ };*/
}, },
// //
startLoading() { startLoading() {
@ -597,15 +610,14 @@ export default {
} }
.avatar-uploader { .avatar-uploader {
::v-deep ::v-deep .el-upload {
.el-upload {
cursor: pointer; cursor: pointer;
position: relative; position: relative;
overflow: hidden; overflow: hidden;
} }
.el-upload:hover { .el-upload:hover {
border-color: #409EFF; border-color: #409eff;
} }
.avatar { .avatar {

12
src/views/modules/communityService/sqzzz/cpts/edit.vue

@ -314,9 +314,7 @@ export default {
principalPhone: [ principalPhone: [
{ required: true, message: "联系电话不能为空", trigger: "blur" }, { required: true, message: "联系电话不能为空", trigger: "blur" },
], ],
address: [ address: [{ required: true, message: "地址不能为空", trigger: "blur" }],
{ required: true, message: "地址不能为空", trigger: "blur" },
],
longitude: [ longitude: [
{ required: true, message: "请拖动地图选择坐标点", trigger: "blur" }, { required: true, message: "请拖动地图选择坐标点", trigger: "blur" },
], ],
@ -404,7 +402,7 @@ export default {
// map TMap.Map() // map TMap.Map()
map = new window.TMap.Map(document.getElementById("app"), { map = new window.TMap.Map(document.getElementById("app"), {
center: center, // center: center, //
zoom: 17.2, // zoom: 16.2, //
pitch: 43.5, // pitch: 43.5, //
rotation: 45, // rotation: 45, //
}); });
@ -448,9 +446,11 @@ export default {
markers.setGeometries([]); markers.setGeometries([]);
// //
search search
.searchRectangle({ .searchNearby({
keyword: this.dataForm.address, keyword: this.dataForm.address,
bounds: map.getBounds(), radius: 1000,
autoExtend: true,
center: map.getCenter(),
}) })
.then((result) => { .then((result) => {
let { data } = result; let { data } = result;

8
src/views/modules/cpts/base/cpts/edit.vue

@ -635,7 +635,7 @@ export default {
// map TMap.Map() // map TMap.Map()
map = new window.TMap.Map(document.getElementById("app"), { map = new window.TMap.Map(document.getElementById("app"), {
center: center, // center: center, //
zoom: 13, // zoom: 16.2, //
pitch: 43.5, // pitch: 43.5, //
rotation: 45, // rotation: 45, //
}); });
@ -679,9 +679,11 @@ export default {
markers.setGeometries([]); markers.setGeometries([]);
// //
search search
.searchRectangle({ .searchNearby({
keyword: this.fmData[item.keyName], keyword: this.fmData[item.keyName],
bounds: map.getBounds(), radius: 1000,
autoExtend: true,
center: map.getCenter(),
}) })
.then((result) => { .then((result) => {
let { data } = result; let { data } = result;

259
src/views/modules/cpts/base/index.vue

@ -1,40 +1,46 @@
<template> <template>
<div class="div_main"> <div class="div_main">
<div v-show="true"> <div v-show="true">
<div class="div_search" <div class="div_search" ref="ref_search">
ref="ref_search"> <el-form :inline="true" ref="ref_searchform" label-width="100px">
<el-form :inline="true"
ref="ref_searchform"
label-width="100px">
<div> <div>
<el-form-item v-for="item in searchParams" <el-form-item
v-for="item in searchParams"
:key="'serach' + item.keyName" :key="'serach' + item.keyName"
:label="item.field" :label="item.field"
:prop="item.keyName"> :prop="item.keyName"
>
<template v-if="item.type == 'input'"> <template v-if="item.type == 'input'">
<el-input v-model="item.value" <el-input
v-model="item.value"
style="width: 240px" style="width: 240px"
size="small" size="small"
clearable clearable
:placeholder="item.placeholder || '请输入'"> :placeholder="item.placeholder || '请输入'"
>
</el-input> </el-input>
</template> </template>
<template v-else-if="item.type == 'select'"> <template v-else-if="item.type == 'select'">
<el-select v-model="item.value" <el-select
v-model="item.value"
:placeholder="item.placeholder || '请选择'" :placeholder="item.placeholder || '请选择'"
size="small" size="small"
clearable clearable
style="width: 240px" style="width: 240px"
:multiple="item.multiple || false"> :multiple="item.multiple || false"
<el-option v-for="item in item.optionList" >
<el-option
v-for="item in item.optionList"
:key="'serach' + item.keyName + item.value" :key="'serach' + item.keyName + item.value"
:label="item.label" :label="item.label"
:value="item.value"> :value="item.value"
>
</el-option> </el-option>
</el-select> </el-select>
</template> </template>
<template v-else-if="item.type == 'cascader'"> <template v-else-if="item.type == 'cascader'">
<el-cascader v-model="item.value" <el-cascader
v-model="item.value"
:placeholder="item.placeholder || '请选择'" :placeholder="item.placeholder || '请选择'"
:options="item.optionList" :options="item.optionList"
:props="item.optionProps" :props="item.optionProps"
@ -42,54 +48,71 @@
size="small" size="small"
clearable clearable
style="width: 240px" style="width: 240px"
@change="(e) => handleChangeCascader(e, item)"> @change="(e) => handleChangeCascader(e, item)"
>
</el-cascader> </el-cascader>
</template> </template>
<template v-if="item.type == 'date-range'"> <template v-if="item.type == 'date-range'">
<el-date-picker v-model="item.supValues[0]" <el-date-picker
v-model="item.supValues[0]"
type="date" type="date"
placeholder="开始时间" placeholder="开始时间"
style="width: 150px" style="width: 150px"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
clearable> clearable
>
</el-date-picker> </el-date-picker>
<span style="display: inline-block; margin: 0 10px"></span> <span style="display: inline-block; margin: 0 10px"></span>
<el-date-picker v-model="item.supValues[1]" <el-date-picker
v-model="item.supValues[1]"
type="date" type="date"
placeholder="结束时间" placeholder="结束时间"
style="width: 150px" style="width: 150px"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
clearable> clearable
>
</el-date-picker> </el-date-picker>
</template> </template>
</el-form-item> </el-form-item>
<el-button style="margin-left: 30px; margin-bottom: 20px" <el-button
style="margin-left: 30px; margin-bottom: 20px"
size="small" size="small"
class="diy-button--search" class="diy-button--search"
@click="handleSearch">查询</el-button> @click="handleSearch"
<el-button style="margin-left: 10px; margin-bottom: 20px" >查询</el-button
>
<el-button
style="margin-left: 10px; margin-bottom: 20px"
size="small" size="small"
class="diy-button--reset" class="diy-button--reset"
@click="resetSearch">重置</el-button> @click="resetSearch"
>重置</el-button
>
</div> </div>
</el-form> </el-form>
</div> </div>
<div class="div_table" <div class="div_table" :style="{ height: maxTableHeight + 130 + 'px' }">
:style="{ height: maxTableHeight + 130 + 'px' }">
<div class="div_btn"> <div class="div_btn">
<el-button class="diy-button--add" <el-button
class="diy-button--add"
v-if="addUrl" v-if="addUrl"
size="small" size="small"
@click="handleAdd">新增</el-button> @click="handleAdd"
>新增</el-button
>
<el-button v-if="mubanUrl" <el-button
v-if="mubanUrl"
class="btn_upload diy-button--export" class="btn_upload diy-button--export"
size="small" size="small"
@click="handleExportModule('room')">下载模板</el-button> @click="handleExportModule('room')"
>下载模板</el-button
>
<el-upload :headers="$getElUploadHeaders()" <el-upload
:headers="$getElUploadHeaders()"
v-if="importUrl" v-if="importUrl"
ref="upload" ref="upload"
class="upload-btn" class="upload-btn"
@ -100,105 +123,151 @@
:show-file-list="false" :show-file-list="false"
:auto-upload="true" :auto-upload="true"
:before-upload="beforeExcelUpload" :before-upload="beforeExcelUpload"
:http-request="uploadHttpRequest"> :http-request="uploadHttpRequest"
<el-button size="small" >
class="btn_upload diy-button--delete">导入</el-button> <el-button size="small" class="btn_upload diy-button--delete"
>导入</el-button
>
</el-upload> </el-upload>
<el-button v-if="exportUrl" <el-button
v-if="exportUrl"
@click="handleExport" @click="handleExport"
class="btn_upload diy-button--reset" class="btn_upload diy-button--reset"
size="small">导出</el-button> size="small"
>导出</el-button
>
<el-button
v-if="delMultipleUrl"
size="small"
@click="handleDeleteMultiple"
>批量删除</el-button
>
<slot
name="listBtn"
v-bind:multipleSelection="multipleSelection"
></slot>
</div> </div>
<el-table ref="ref_table" <el-table
ref="ref_table"
:data="tableData" :data="tableData"
border border
:header-cell-style="{ background: '#2195FE', color: '#FFFFFF' }" :header-cell-style="{ background: '#2195FE', color: '#FFFFFF' }"
class="table" class="table"
style="width: 100%" style="width: 100%"
:height="maxTableHeight"> :height="maxTableHeight"
<template v-for="item in tableParams" @selection-change="handleSelectionChange"
:prop="item.keyName"> >
<el-table-column v-if="item.type == 'no'" <template v-for="(item, index) in tableParams" :prop="item.keyName">
<el-table-column
v-if="item.type == 'selection'"
:key="'table-selection' + index"
type="selection"
align="center"
width="50"
/>
<el-table-column
v-if="item.type == 'no'"
:key="'table-no' + item.keyName" :key="'table-no' + item.keyName"
:label="item.field" :label="item.field"
fixed="left" fixed="left"
type="index" type="index"
align="center" align="center"
width="50" /> width="50"
/>
<el-table-column v-else-if="item.type == 'text'" <el-table-column
v-else-if="item.type == 'text'"
:key="'table' + item.keyName" :key="'table' + item.keyName"
:prop="item.keyName" :prop="item.keyName"
:label="item.field" :label="item.field"
align="center" align="center"
:width="item.width || ''" :width="item.width || ''"
:show-overflow-tooltip="true"> :show-overflow-tooltip="true"
>
</el-table-column> </el-table-column>
<el-table-column v-else-if="item.type == 'array'" <el-table-column
v-else-if="item.type == 'array'"
:key="'table-array' + item.keyName" :key="'table-array' + item.keyName"
:prop="item.keyName" :prop="item.keyName"
:label="item.field" :label="item.field"
align="center" align="center"
:width="item.width || ''" :width="item.width || ''"
:show-overflow-tooltip="true"> :show-overflow-tooltip="true"
>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row[item.keyName].join(item.arrayDiv || ",") }} {{ scope.row[item.keyName].join(item.arrayDiv || ",") }}
</template> </template>
</el-table-column> </el-table-column>
</template> </template>
<el-table-column fixed="right" <el-table-column
v-if="operateCol"
fixed="right"
label="操作" label="操作"
align="center" align="center"
width="200"> width="200"
>
<template slot-scope="scope"> <template slot-scope="scope">
<slot name="listBtnbefore" <slot name="listBtnbefore" v-bind:item="scope.row"></slot>
v-bind:item="scope.row"></slot> <el-button
<el-button v-if="infoUrl && infoAuth(scope.row)" v-if="infoUrl && infoAuth(scope.row)"
@click="handleWatch(scope.row)" @click="handleWatch(scope.row)"
type="text" type="text"
size="small" size="small"
class=".div-table-button--detail">查看</el-button> class=".div-table-button--detail"
<el-button v-if="editUrl && editAuth(scope.row)" >查看</el-button
>
<el-button
v-if="editUrl && editAuth(scope.row)"
@click="handleEdit(scope.row)" @click="handleEdit(scope.row)"
type="text" type="text"
size="small" size="small"
class="div-table-button--edit">{{ editBtnName(scope.row) }}</el-button> class="div-table-button--edit"
<el-popconfirm v-if="delUrl && delAuth(scope.row)" >{{ editBtnName(scope.row) }}</el-button
>
<el-popconfirm
v-if="delUrl && delAuth(scope.row)"
title="删除之后无法回复,确认删除?" title="删除之后无法回复,确认删除?"
@onConfirm="handleDelete(scope.row, scope.$index)" @onConfirm="handleDelete(scope.row, scope.$index)"
@confirm="handleDelete(scope.row, scope.$index)"> @confirm="handleDelete(scope.row, scope.$index)"
<el-button slot="reference" >
<el-button
slot="reference"
type="text" type="text"
size="small" size="small"
style="margin-left: 10px" style="margin-left: 10px"
class="div-table-button--delete">删除</el-button> class="div-table-button--delete"
>删除</el-button
>
</el-popconfirm> </el-popconfirm>
<slot name="listBtnSup" <slot name="listBtnSup" v-bind:item="scope.row"></slot>
v-bind:item="scope.row"></slot>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div> <div>
<el-pagination @size-change="handleSizeChange" <el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
:current-page.sync="pageNo" :current-page.sync="pageNo"
:page-sizes="[20, 50, 100, 200]" :page-sizes="[20, 50, 100, 200]"
:page-size="parseInt(pageSize)" :page-size="parseInt(pageSize)"
layout="sizes, prev, pager, next, total" layout="sizes, prev, pager, next, total"
:total="total"> :total="total"
>
</el-pagination> </el-pagination>
</div> </div>
</div> </div>
</div> </div>
<!-- 修改弹出框 --> <!-- 修改弹出框 -->
<el-dialog v-if="formShow" <el-dialog
v-if="formShow"
:visible.sync="formShow" :visible.sync="formShow"
:close-on-click-modal="false" :close-on-click-modal="false"
:close-on-press-escape="false" :close-on-press-escape="false"
@ -206,8 +275,10 @@
:width="editParamsDiv ? '1100px' : '850px'" :width="editParamsDiv ? '1100px' : '850px'"
top="5vh" top="5vh"
class="dialog-h" class="dialog-h"
@closed="handleClose"> @closed="handleClose"
<edit-form v-if="formShow" >
<edit-form
v-if="formShow"
ref="editForm" ref="editForm"
:idName="idName" :idName="idName"
:formId="formId" :formId="formId"
@ -222,18 +293,23 @@
:formBtnFixed="formBtnFixed" :formBtnFixed="formBtnFixed"
:editConfig="editConfig" :editConfig="editConfig"
@close="handleClose" @close="handleClose"
@afterEdit="handleEditSuccess"> @afterEdit="handleEditSuccess"
>
<template v-slot:bottomSup="{ id, formType, info }"> <template v-slot:bottomSup="{ id, formType, info }">
<slot name="editBottomSup" <slot
name="editBottomSup"
v-bind:id="id" v-bind:id="id"
v-bind:formType="formType" v-bind:formType="formType"
v-bind:info="info"></slot> v-bind:info="info"
></slot>
</template> </template>
<template v-slot:operateSup="{ id, formType, info }"> <template v-slot:operateSup="{ id, formType, info }">
<slot name="editOperateSup" <slot
name="editOperateSup"
v-bind:id="id" v-bind:id="id"
v-bind:formType="formType" v-bind:formType="formType"
v-bind:info="info"></slot> v-bind:info="info"
></slot>
</template> </template>
</edit-form> </edit-form>
</el-dialog> </el-dialog>
@ -282,6 +358,10 @@ export default {
type: String, type: String,
default: "", default: "",
}, },
delMultipleUrl: {
type: String,
default: "",
},
infoUrl: { infoUrl: {
type: String, type: String,
default: "", default: "",
@ -346,6 +426,16 @@ export default {
type: Boolean, type: Boolean,
default: true, default: true,
}, },
operateCol: {
type: Boolean,
default: true,
},
cookTableData: {
type: Function,
default: (val) => val,
},
}, },
data() { data() {
@ -362,6 +452,8 @@ export default {
formType: "", // list add edit info formType: "", // list add edit info
ref_search_height: 100, ref_search_height: 100,
multipleSelection: [],
}; };
}, },
@ -397,6 +489,11 @@ export default {
}, },
methods: { methods: {
handleSelectionChange(val) {
console.log(val);
this.multipleSelection = val;
},
computeSearchHeight() { computeSearchHeight() {
this.ref_search_height = this.$refs["ref_search"].clientHeight; this.ref_search_height = this.$refs["ref_search"].clientHeight;
console.log(this.$refs["ref_search"]); console.log(this.$refs["ref_search"]);
@ -598,6 +695,24 @@ export default {
// this.getTableData(); // this.getTableData();
}, },
async handleDeleteMultiple() {
let { delMultipleUrl: url } = this;
if (!url) return;
const { multipleSelection, idName } = this;
const { data, code, msg } = await requestPost(url, [
...multipleSelection.map((item) => item[idName]),
]);
if (code === 0) {
this.$message.success("批量删除成功!");
this.getTableData();
} else {
this.$message.error("操作失败!");
}
},
async handleDelete(rowData, rowIndex) { async handleDelete(rowData, rowIndex) {
console.log(rowData, rowIndex); console.log(rowData, rowIndex);
let { delUrl: url } = this; let { delUrl: url } = this;
@ -651,11 +766,7 @@ export default {
if (code === 0) { if (code === 0) {
this.total = data.total || 0; this.total = data.total || 0;
this.tableData = data.list this.tableData = data.list ? this.cookTableData(data.list) : [];
? data.list.map((item) => {
return item;
})
: [];
} else { } else {
this.$message.error(msg); this.$message.error(msg);
} }

612
src/views/modules/partymember/icpartyorg-add-or-update.vue

@ -1,78 +1,130 @@
<template> <template>
<el-dialog :visible.sync="visible" :title="!dataForm.id ? '新增党组织' : '更新党组织'" :close-on-click-modal="false" <el-dialog
:close-on-press-escape="false"> :visible.sync="visible"
<el-form class="form" :title="!dataForm.id ? '新增党组织' : '更新党组织'"
:close-on-click-modal="false"
:close-on-press-escape="false"
>
<el-form
class="form"
:model="dataForm" :model="dataForm"
:rules="dataRule" :rules="dataRule"
ref="dataForm" ref="dataForm"
@keyup.enter.native="dataFormSubmitHandle()" @keyup.enter.native="dataFormSubmitHandle()"
:label-width="$i18n.locale === 'en-US' ? '120px' : '100px'"> :label-width="$i18n.locale === 'en-US' ? '120px' : '100px'"
>
<el-form-item prop="partyOrgType" label="党组织类型"> <el-form-item prop="partyOrgType" label="党组织类型">
<el-select :disabled="dataForm.id || dataForm.orgId ? true : false" v-model="dataForm.partyOrgType" @change="changePartyOrgType" clearable placeholder="请选择党组织类型"> <el-select
:disabled="dataForm.id || dataForm.orgId ? true : false"
v-model="dataForm.partyOrgType"
@change="changePartyOrgType"
clearable
placeholder="请选择党组织类型"
>
<el-option <el-option
v-for="item in partyOrgTypeList" v-for="item in partyOrgTypeList"
:key="item.value" :key="item.value"
:label="item.name" :label="item.name"
:value="item.value"> :value="item.value"
>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item prop="partyOrgName" label="党组织名称"> <el-form-item prop="partyOrgName" label="党组织名称">
<el-input v-model="dataForm.partyOrgName" placeholder="请输入党组织名称" style="width:300px"></el-input> <el-input
v-model="dataForm.partyOrgName"
placeholder="请输入党组织名称"
style="width: 300px"
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="党组织编码" prop="partyOrgCode"> <el-form-item label="党组织编码" prop="partyOrgCode">
<el-input v-model="dataForm.partyOrgCode" placeholder="党组织编码" style="width:300px"></el-input> <el-input
v-model="dataForm.partyOrgCode"
placeholder="党组织编码"
style="width: 300px"
></el-input>
</el-form-item> </el-form-item>
<el-form-item v-if="dataForm.partyOrgType != '5'" prop="agencyId" label="行政组织"> <el-form-item
v-if="dataForm.partyOrgType != '5'"
prop="agencyId"
label="行政组织"
>
<el-cascader <el-cascader
style="width: 300px" style="width: 300px"
v-model="dataForm.agencyId" v-model="dataForm.agencyId"
:options="agencyOrgList" :options="agencyOrgList"
placeholder="请选择行政组织" placeholder="请选择行政组织"
:props="{ emitPath:false, checkStrictly: true, label: 'name', value: 'id', children: 'children' }" :props="{
emitPath: false,
checkStrictly: true,
label: 'name',
value: 'id',
children: 'children',
}"
:disabled="dataForm.id ? true : false" :disabled="dataForm.id ? true : false"
:show-all-levels="false" :show-all-levels="false"
@change="changeAgencyOrg" @change="changeAgencyOrg"
clearable /> clearable
/>
</el-form-item> </el-form-item>
<el-form-item v-if="!dataForm.sjdzzName" prop="mySelectOrg" label="上级党组织"> <el-form-item
v-if="!dataForm.sjdzzName"
prop="mySelectOrg"
label="上级党组织"
>
<el-cascader <el-cascader
ref="myOrg" ref="myOrg"
style="width: 300px" style="width: 300px"
v-model="dataForm.mySelectOrg" v-model="dataForm.mySelectOrg"
:options="orgList" :options="orgList"
placeholder="请选择上级党组织" placeholder="请选择上级党组织"
:props="{ checkStrictly: true, label: 'partyOrgName', value: 'id', children: 'children' }" :props="{
checkStrictly: true,
label: 'partyOrgName',
value: 'id',
children: 'children',
}"
@change="handleChangeOrg" @change="handleChangeOrg"
:disabled="dataForm.id || dataForm.orgId ? true : false" :disabled="dataForm.id || dataForm.orgId ? true : false"
clearable /> clearable
/>
</el-form-item> </el-form-item>
<el-form-item v-if="dataForm.sjdzzName" label="上级党组织"> <el-form-item v-if="dataForm.sjdzzName" label="上级党组织">
<el-input :disabled="true" v-model="dataForm.sjdzzName" style="width:300px"></el-input> <el-input
:disabled="true"
v-model="dataForm.sjdzzName"
style="width: 300px"
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="党组织介绍" prop="introduction"> <el-form-item label="党组织介绍" prop="introduction">
<el-input style="width:300px" v-model="dataForm.introduction" type="textarea" maxlength="500" placeholder="党组织介绍"></el-input> <el-input
style="width: 300px"
v-model="dataForm.introduction"
type="textarea"
maxlength="500"
placeholder="党组织介绍"
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="党组织位置" <el-form-item label="党组织位置" prop="longitude" style="display: block">
prop="longitude"
style="display: block">
<div class="item_width_1"> <div class="item_width_1">
<div class="div_map"> <div class="div_map">
<div id="app"> <div id="app"></div>
</div>
<div style="display: none" id="mapSeach_id" class="div_searchmap"> <div style="display: none" id="mapSeach_id" class="div_searchmap">
<el-input class="item_width_4" <el-input
class="item_width_4"
maxlength="50" maxlength="50"
size="mini" size="mini"
placeholder="请输入关键字" placeholder="请输入关键字"
v-model="keyWords"> v-model="keyWords"
>
</el-input> </el-input>
<el-button style="margin-left: 10px" <el-button
style="margin-left: 10px"
type="primary" type="primary"
size="mini" size="mini"
@click="handleSearchMap">查询</el-button> @click="handleSearchMap"
>查询</el-button
>
</div> </div>
</div> </div>
@ -96,84 +148,88 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<template slot="footer"> <template slot="footer">
<el-button @click="visible = false">{{ $t('cancel') }}</el-button> <el-button @click="visible = false">{{ $t("cancel") }}</el-button>
<el-button type="primary" @click="dataFormSubmitHandle()">{{ $t('confirm') }}</el-button> <el-button type="primary" @click="dataFormSubmitHandle()">{{
$t("confirm")
}}</el-button>
</template> </template>
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
var map var map;
var search var search;
var markers var markers;
var infoWindowList var infoWindowList;
var geocoder // var geocoder; //
import debounce from 'lodash/debounce' import debounce from "lodash/debounce";
export default { export default {
data() { data() {
return { return {
visible: false, visible: false,
keyWords: '', keyWords: "",
dataForm: { dataForm: {
id: '', id: "",
partyOrgType: '', // 0,1,2,3,4,5 partyOrgType: "", // 0,1,2,3,4,5
partyOrgName: '', // partyOrgName: "", //
partyOrgCode: '', // partyOrgCode: "", //
mySelectOrg:'', // mySelectOrg: "", //
orgPid: '', // ID,0 orgPid: "", // ID,0
orgPids: '', // ID,0 orgPids: "", // ID,0
agencyId: '', // id agencyId: "", // id
agencyPids:'', // ids() agencyPids: "", // ids()
longitude: '', // longitude: "", //
latitude: '', // latitude: "", //
address: '', address: "",
introduction: '', // introduction: "", //
orgId: '', orgId: "",
customerId: '', customerId: "",
staffId:'', staffId: "",
orgPidName: '', orgPidName: "",
agencyName:'', agencyName: "",
pid: '', pid: "",
sjdzzName: '' // sjdzzName: "", //
}, },
orgListVisible: false, orgListVisible: false,
agencyListVisible: false, agencyListVisible: false,
orgList: [], orgList: [],
agencyId: '', agencyId: "",
level: '', level: "",
partyOrgTypeList: [], partyOrgTypeList: [],
agencyOrgList:[] agencyOrgList: [],
} };
}, },
methods: { methods: {
init() { init() {
this.visible = true this.visible = true;
this.agencyId = localStorage.getItem('agencyId') this.agencyId = localStorage.getItem("agencyId");
this.dataForm.customerId = localStorage.getItem('customerId') this.dataForm.customerId = localStorage.getItem("customerId");
this.dataForm.staffId = localStorage.getItem('staffId') this.dataForm.staffId = localStorage.getItem("staffId");
this.keyWords = '' this.keyWords = "";
// //
setTimeout(() => { setTimeout(() => {
this.$refs['dataForm'].resetFields() this.$refs["dataForm"].resetFields();
this.dataForm.latitude = '' this.dataForm.latitude = "";
this.dataForm.agencyId = '' this.dataForm.agencyId = "";
if (this.dataForm.id) { if (this.dataForm.id) {
this.setPartyOrgType() this.setPartyOrgType();
this.getInfo() this.getInfo();
} else { } else {
this.setPartyOrgType() this.setPartyOrgType();
this.initMap() this.initMap();
if (this.dataForm.orgId) { if (this.dataForm.orgId) {
this.dataForm.mySelectOrg = this.dataForm.orgId this.dataForm.mySelectOrg = this.dataForm.orgId;
this.dataForm.orgPid = this.dataForm.orgId this.dataForm.orgPid = this.dataForm.orgId;
this.dataForm.orgPids = this.dataForm.orgPids ? this.dataForm.orgPids + ':' + this.dataForm.orgId : this.dataForm.orgId this.dataForm.orgPids = this.dataForm.orgPids
this.dataForm.partyOrgType = this.dataForm._partyOrgType ? this.dataForm.orgPids + ":" + this.dataForm.orgId
: this.dataForm.orgId;
this.dataForm.partyOrgType = this.dataForm._partyOrgType;
this.setPartyOrgType_xzxj() this.setPartyOrgType_xzxj();
this.getInfoAgencyLisy() this.getInfoAgencyLisy();
} else { } else {
this.dataForm.mySelectOrg = '' this.dataForm.mySelectOrg = "";
} }
} }
}, 50); }, 50);
@ -183,322 +239,381 @@
}, },
// //
setPartyOrgType_xzxj() { setPartyOrgType_xzxj() {
if (this.dataForm.partyOrgType === '0') { // 0,1,2,3,4,5 if (this.dataForm.partyOrgType === "0") {
this.dataForm.partyOrgType = '1' // 0,1,2,3,4,5
} else if (this.dataForm.partyOrgType === '1') { this.dataForm.partyOrgType = "1";
this.dataForm.partyOrgType = '2' } else if (this.dataForm.partyOrgType === "1") {
} else if (this.dataForm.partyOrgType === '2') { this.dataForm.partyOrgType = "2";
this.dataForm.partyOrgType = '3' } else if (this.dataForm.partyOrgType === "2") {
} else if (this.dataForm.partyOrgType === '3') { this.dataForm.partyOrgType = "3";
this.dataForm.partyOrgType = '4' } else if (this.dataForm.partyOrgType === "3") {
} else if (this.dataForm.partyOrgType === '4') { this.dataForm.partyOrgType = "4";
this.dataForm.partyOrgType = '5' } else if (this.dataForm.partyOrgType === "4") {
this.dataForm.partyOrgType = "5";
} }
}, },
// //
setPartyOrgType() { setPartyOrgType() {
// community:street,: district,: city :province // community:street,: district,: city :province
// 0,1,2,3,4,5 // 0,1,2,3,4,5
this.level = localStorage.getItem('level') ? localStorage.getItem('level') : '' this.level = localStorage.getItem("level")
if (this.level == 'province') { ? localStorage.getItem("level")
: "";
if (this.level == "province") {
this.partyOrgTypeList = [ this.partyOrgTypeList = [
{value: '0', name: '省委'}, { value: "0", name: "省委" },
{value: '1', name: '市委'}, { value: "1", name: "市委" },
{value: '2', name: '区委'}, { value: "2", name: "区委" },
{value: '3', name: '党工委'}, { value: "3", name: "党工委" },
{value: '4', name: '党委'}, { value: "4", name: "党委" },
{value: '5', name: '支部'} { value: "5", name: "支部" },
] ];
}else if(this.level == 'city'){ } else if (this.level == "city") {
this.partyOrgTypeList = [ this.partyOrgTypeList = [
{value: '1', name: '市委'}, { value: "1", name: "市委" },
{value: '2', name: '区委'}, { value: "2", name: "区委" },
{value: '3', name: '党工委'}, { value: "3", name: "党工委" },
{value: '4', name: '党委'}, { value: "4", name: "党委" },
{value: '5', name: '支部'} { value: "5", name: "支部" },
] ];
}else if(this.level == 'district'){ } else if (this.level == "district") {
this.partyOrgTypeList = [ this.partyOrgTypeList = [
{value: '2', name: '区委'}, { value: "2", name: "区委" },
{value: '3', name: '党工委'}, { value: "3", name: "党工委" },
{value: '4', name: '党委'}, { value: "4", name: "党委" },
{value: '5', name: '支部'} { value: "5", name: "支部" },
] ];
}else if(this.level == 'street'){ } else if (this.level == "street") {
this.partyOrgTypeList = [ this.partyOrgTypeList = [
{value: '3', name: '党工委'}, { value: "3", name: "党工委" },
{value: '4', name: '党委'}, { value: "4", name: "党委" },
{value: '5', name: '支部'} { value: "5", name: "支部" },
] ];
}else if(this.level == 'community'){ } else if (this.level == "community") {
this.partyOrgTypeList = [ this.partyOrgTypeList = [
{value: '4', name: '党委'}, { value: "4", name: "党委" },
{value: '5', name: '支部'} { value: "5", name: "支部" },
] ];
} }
}, },
// //
changeAgencyOrg() { changeAgencyOrg() {
if(!this.dataForm.orgId){ // orgId if (!this.dataForm.orgId) {
this.getOrgList() // orgId
this.getOrgList();
} }
}, },
// //
changePartyOrgType(value) { changePartyOrgType(value) {
if(value == '5'){ // if (value == "5") {
this.dataForm.agencyId = localStorage.getItem('agencyId') //
this.dataForm.agencyPids = '' this.dataForm.agencyId = localStorage.getItem("agencyId");
this.dataForm.agencyPids = "";
// //
this.orgList = [] this.orgList = [];
this.dataForm.mySelectOrg = '', // (this.dataForm.mySelectOrg = ""), //
this.dataForm.orgPid = '', // ID,0 (this.dataForm.orgPid = ""), // ID,0
this.dataForm.orgPids = '' (this.dataForm.orgPids = "");
this.getOrgList() this.getOrgList();
} else { } else {
// //
this.agencyOrgList = [] this.agencyOrgList = [];
this.dataForm.agencyId = '' this.dataForm.agencyId = "";
// //
this.orgList = [] this.orgList = [];
this.dataForm.mySelectOrg = '', // (this.dataForm.mySelectOrg = ""), //
this.dataForm.orgPid = '', // ID,0 (this.dataForm.orgPid = ""), // ID,0
this.dataForm.orgPids = '' (this.dataForm.orgPids = "");
this.getInfoAgencyLisy() this.getInfoAgencyLisy();
} }
}, },
// //
getOrgList() { getOrgList() {
if (!this.dataForm.id) { // if (!this.dataForm.id) {
this.orgList = [] //
this.dataForm.mySelectOrg = '', // this.orgList = [];
this.dataForm.orgPid = '', // ID,0 (this.dataForm.mySelectOrg = ""), //
this.dataForm.orgPids = '' (this.dataForm.orgPid = ""), // ID,0
} (this.dataForm.orgPids = "");
this.$http.get('/resi/partymember/icPartyOrg/getParentOrgList', {params: {agencyId: this.dataForm.agencyId, partyOrgType: this.dataForm.partyOrgType}}).then(({data: res}) => { }
this.$http
.get("/resi/partymember/icPartyOrg/getParentOrgList", {
params: {
agencyId: this.dataForm.agencyId,
partyOrgType: this.dataForm.partyOrgType,
},
})
.then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.internalMsg ? res.internalMsg : res.msg ? res.msg : '查询失败') return this.$message.error(
res.internalMsg ? res.internalMsg : res.msg ? res.msg : "查询失败"
);
} }
this.orgList = this.removeEmptyChildren(res.data) this.orgList = this.removeEmptyChildren(res.data);
}).catch(() => {
}) })
.catch(() => {});
}, },
removeEmptyChildren(orgArray) { removeEmptyChildren(orgArray) {
orgArray.forEach((orgInfo) => { orgArray.forEach((orgInfo) => {
if (orgInfo && orgInfo.children) { if (orgInfo && orgInfo.children) {
if (orgInfo.children.length === 0) { if (orgInfo.children.length === 0) {
orgInfo.children = undefined orgInfo.children = undefined;
} else { } else {
this.removeEmptyChildren(orgInfo.children) this.removeEmptyChildren(orgInfo.children);
} }
} }
}) });
return orgArray; return orgArray;
}, },
// //
handleChangeOrg(e) { handleChangeOrg(e) {
if (this.dataForm.mySelectOrg.length > 0 && this.dataForm.mySelectOrg) { if (this.dataForm.mySelectOrg.length > 0 && this.dataForm.mySelectOrg) {
this.dataForm.orgPid = this.dataForm.mySelectOrg[this.dataForm.mySelectOrg.length - 1] this.dataForm.orgPid =
this.dataForm.orgPids = this.$refs.myOrg.getCheckedNodes()[0].data.orgPids; this.dataForm.mySelectOrg[this.dataForm.mySelectOrg.length - 1];
this.dataForm.mySelectOrg.forEach(element => { this.dataForm.orgPids =
this.dataForm.orgPids = this.dataForm.orgPids ? this.dataForm.orgPids + ':' + element : element this.$refs.myOrg.getCheckedNodes()[0].data.orgPids;
this.dataForm.mySelectOrg.forEach((element) => {
this.dataForm.orgPids = this.dataForm.orgPids
? this.dataForm.orgPids + ":" + element
: element;
}); });
} else { } else {
this.dataForm.orgPid = '' this.dataForm.orgPid = "";
this.dataForm.orgPids = '' this.dataForm.orgPids = "";
} }
}, },
// //
getInfo() { getInfo() {
this.$http.get(`/resi/partymember/icPartyOrg/${this.dataForm.id}`).then(({data: res}) => { this.$http
.get(`/resi/partymember/icPartyOrg/${this.dataForm.id}`)
.then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.internalMsg ? res.internalMsg : res.msg ? res.msg : '查询失败') return this.$message.error(
res.internalMsg ? res.internalMsg : res.msg ? res.msg : "查询失败"
);
} }
this.dataForm = { this.dataForm = {
...this.dataForm, ...this.dataForm,
...res.data ...res.data,
} };
// //
this.dataForm.mySelectOrg = this.dataForm.orgPid this.dataForm.mySelectOrg = this.dataForm.orgPid;
// //
this.dataForm.agencyId = this.dataForm.agencyId this.dataForm.agencyId = this.dataForm.agencyId;
// //
this.getInfoAgencyLisy() this.getInfoAgencyLisy();
// //
this.getOrgList() this.getOrgList();
this.initMap() this.initMap();
}).catch(() => {
}) })
.catch(() => {});
}, },
getInfoAgencyLisy() { getInfoAgencyLisy() {
this.$http.get('/gov/org/customeragency/getOrgTreeByUserAndType', {params: {agencyId: this.dataForm.pid?this.dataForm.pid:this.agencyId, orgType: this.dataForm.partyOrgType}}).then(({data: res}) => { this.$http
.get("/gov/org/customeragency/getOrgTreeByUserAndType", {
params: {
agencyId: this.dataForm.pid ? this.dataForm.pid : this.agencyId,
orgType: this.dataForm.partyOrgType,
},
})
.then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.internalMsg ? res.internalMsg : res.msg ? res.msg : '查询失败') return this.$message.error(
res.internalMsg ? res.internalMsg : res.msg ? res.msg : "查询失败"
);
} }
this.agencyOrgList = this.removeEmptyChildren(res.data) this.agencyOrgList = this.removeEmptyChildren(res.data);
}).catch(() => {
}) })
.catch(() => {});
}, },
// init // init
initMap() { initMap() {
document.getElementById('app').innerHTML = '' document.getElementById("app").innerHTML = "";
if (document.getElementById('app')) { if (document.getElementById("app")) {
document.getElementById('mapSeach_id').style.display = "block" document.getElementById("mapSeach_id").style.display = "block";
// document.getElementById('lon_lat_id').style.display = "block" // document.getElementById('lon_lat_id').style.display = "block"
} }
// //
var center = new window.TMap.LatLng( this.dataForm.latitude ? this.dataForm.latitude : 36.0722275, this.dataForm.longitude ? this.dataForm.longitude : 120.38945519) var center = new window.TMap.LatLng(
this.dataForm.latitude ? this.dataForm.latitude : 36.0722275,
this.dataForm.longitude ? this.dataForm.longitude : 120.38945519
);
// map TMap.Map() // map TMap.Map()
map = new window.TMap.Map(document.getElementById('app'), { map = new window.TMap.Map(document.getElementById("app"), {
center: center, // center: center, //
zoom: 17.2, // zoom: 16.2, //
pitch: 43.5, // pitch: 43.5, //
rotation: 45 // rotation: 45, //
}) });
search = new window.TMap.service.Search({ pageSize: 10 }) search = new window.TMap.service.Search({ pageSize: 10 });
// //
markers = new TMap.MultiMarker({ markers = new TMap.MultiMarker({
map: map, map: map,
geometries: [] geometries: [],
}) });
infoWindowList = Array(10) infoWindowList = Array(10);
geocoder = new TMap.service.Geocoder(); // geocoder = new TMap.service.Geocoder(); //
// //
map.on('panend', () => { map.on("panend", () => {
this.handleMoveCenter() this.handleMoveCenter();
}) });
this.handleMoveCenter() this.handleMoveCenter();
this.convert() this.convert();
}, },
setMarker(lat, lng) { setMarker(lat, lng) {
markers.setGeometries([]) markers.setGeometries([]);
markers.add([ markers.add([
{ {
id: '4', id: "4",
styleId: 'marker', styleId: "marker",
position: new TMap.LatLng(lat, lng), position: new TMap.LatLng(lat, lng),
properties: { properties: {
title: 'marker4' title: "marker4",
} },
} },
]) ]);
}, },
handleSearchMap() { handleSearchMap() {
infoWindowList.forEach((infoWindow) => { infoWindowList.forEach((infoWindow) => {
infoWindow.close() infoWindow.close();
}) });
infoWindowList.length = 0 infoWindowList.length = 0;
markers.setGeometries([]) markers.setGeometries([]);
// //
search.searchRectangle({ keyword: this.keyWords, bounds: map.getBounds()}).then((result) => { search
let { data } = result .searchNearby({
keyword: this.keyWords,
radius: 1000,
autoExtend: true,
center: map.getCenter(),
})
.then((result) => {
let { data } = result;
if (Array.isArray(data) && data.length > 0) { if (Array.isArray(data) && data.length > 0) {
const { const {
location: { lat, lng } location: { lat, lng },
} = data[0] } = data[0];
map.setCenter(new TMap.LatLng(lat, lng)) map.setCenter(new TMap.LatLng(lat, lng));
this.setMarker(lat, lng) this.setMarker(lat, lng);
this.dataForm.latitude = lat this.dataForm.latitude = lat;
this.dataForm.longitude = lng this.dataForm.longitude = lng;
this.convert() this.convert();
} else { } else {
this.$message.error('未检索到相关位置坐标') this.$message.error("未检索到相关位置坐标");
} }
}) });
}, },
handleMoveCenter() { handleMoveCenter() {
// //
const center = map.getCenter() const center = map.getCenter();
const lat = center.getLat() const lat = center.getLat();
const lng = center.getLng() const lng = center.getLng();
if (lng === 120.38945519) { if (lng === 120.38945519) {
this.dataForm.latitude = '' this.dataForm.latitude = "";
this.dataForm.longitude = '' this.dataForm.longitude = "";
} else { } else {
this.dataForm.latitude = lat this.dataForm.latitude = lat;
this.dataForm.longitude = lng this.dataForm.longitude = lng;
} }
this.setMarker(lat, lng) this.setMarker(lat, lng);
this.convert(lat, lng) this.convert(lat, lng);
}, },
convert(lat, lng) { convert(lat, lng) {
markers.setGeometries([]); markers.setGeometries([]);
// var input = document.getElementById('location').value.split(':'); // var input = document.getElementById('location').value.split(':');
let location let location;
if (lat && lng) { if (lat && lng) {
location = new TMap.LatLng(lat, lng); location = new TMap.LatLng(lat, lng);
} else { } else {
location = new TMap.LatLng(this.dataForm.latitude, this.dataForm.longitude); location = new TMap.LatLng(
this.dataForm.latitude,
this.dataForm.longitude
);
} }
// map.setCenter(location); // map.setCenter(location);
markers.updateGeometries([ markers.updateGeometries([
{ {
id: 'main', // id: "main", //
position: location, position: location,
}, },
]); ]);
// //
geocoder.getAddress({ location: location }).then((result) => { geocoder.getAddress({ location: location }).then((result) => {
this.dataForm.address = result.result.address this.dataForm.address = result.result.address;
// //
}); });
}, },
// //
dataFormSubmitHandle: debounce(function () { dataFormSubmitHandle: debounce(
function () {
if (!this.dataForm.latitude || !this.dataForm.longitude) { if (!this.dataForm.latitude || !this.dataForm.longitude) {
return this.$message.error('请滑动地图选择党组织位置') return this.$message.error("请滑动地图选择党组织位置");
} }
if (this.dataForm.orgPids === '0') { if (this.dataForm.orgPids === "0") {
this.dataForm.orgPids = '' this.dataForm.orgPids = "";
} }
this.$refs['dataForm'].validate((valid) => { this.$refs["dataForm"].validate((valid) => {
if (!valid) { if (!valid) {
return false return false;
} }
this.$http[!this.dataForm.id ? 'post' : 'put']('/resi/partymember/icPartyOrg/', this.dataForm).then(({data: res}) => { this.$http[!this.dataForm.id ? "post" : "put"](
"/resi/partymember/icPartyOrg/",
this.dataForm
)
.then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.internalMsg ? res.internalMsg : res.msg ? res.msg : '查询失败') return this.$message.error(
res.internalMsg
? res.internalMsg
: res.msg
? res.msg
: "查询失败"
);
} }
this.$message({ this.$message({
message: this.$t('prompt.success'), message: this.$t("prompt.success"),
type: 'success', type: "success",
duration: 500, duration: 500,
onClose: () => { onClose: () => {
this.visible = false this.visible = false;
this.$emit('refreshDataList') this.$emit("refreshDataList");
} },
}) });
}).catch(() => {
})
}) })
}, 1000, {'leading': true, 'trailing': false}) .catch(() => {});
});
},
1000,
{ leading: true, trailing: false }
),
}, },
computed: { computed: {
dataRule() { dataRule() {
return { return {
partyOrgName: [ partyOrgName: [
{required: true, message: "党组织名称不能为空", trigger: 'blur'} { required: true, message: "党组织名称不能为空", trigger: "blur" },
], ],
mySelectOrg: [ mySelectOrg: [
{required: true, message: "上级党组织不能为空", trigger: 'blur'} { required: true, message: "上级党组织不能为空", trigger: "blur" },
], ],
partyOrgType: [ partyOrgType: [
{required: true, message: "党组织类型不能为空", trigger: 'blur'} { required: true, message: "党组织类型不能为空", trigger: "blur" },
], ],
agencyId: [ agencyId: [
{required: true, message: "行政组织不能为空", trigger: 'blur'} { required: true, message: "行政组织不能为空", trigger: "blur" },
] ],
} };
} },
} },
} };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@ -513,7 +628,6 @@
} }
} }
.div_map { .div_map {
position: relative; position: relative;
} }

6
src/views/modules/plugins/point/icpointnucleicmonitoring-add-or-update.vue

@ -282,9 +282,11 @@ export default {
markers.setGeometries([]); markers.setGeometries([]);
// //
search search
.searchRectangle({ .searchNearby({
keyword: this.dataForm.address, keyword: this.dataForm.address,
bounds: map.getBounds(), radius: 1000,
autoExtend: true,
center: map.getCenter(),
}) })
.then((result) => { .then((result) => {
let { data } = result; let { data } = result;

6
src/views/modules/plugins/point/icpointvaccinesinoculation-add-or-update.vue

@ -367,9 +367,11 @@ export default {
markers.setGeometries([]); markers.setGeometries([]);
// //
search search
.searchRectangle({ .searchNearby({
keyword: this.dataForm.address, keyword: this.dataForm.address,
bounds: map.getBounds(), radius: 1000,
autoExtend: true,
center: map.getCenter(),
}) })
.then((result) => { .then((result) => {
let { data } = result; let { data } = result;

108
src/views/modules/renFangTongJi/cpts/shequtongji.vue

@ -0,0 +1,108 @@
<template>
<div v-if="iniLoaded">
<base-page
:searchParams="searchParams"
:tableParams="tableParams"
:tableUrl="tableUrl"
:operateCol="false"
idName="icDangerousChemicalsId"
></base-page>
</div>
</template>
<script>
import basePage from "@/views/modules/cpts/base/index";
import { getItemByIdInCascader, collapse } from "@/utils/cascader";
export default {
props: {
orgId: {
type: String,
default: "",
},
orgIds: {
type: String,
default: "",
},
},
data() {
return {
iniLoaded: false,
searchParams: [
{
field: "选择范围",
keyName: "org",
type: "cascader",
value: "",
// optionUrl: "/gov/org/customeragency/agencygridtree",
optionUrl: "/gov/org/customeragency/my-subagency-list",
optionUrlParams: {
agencyId: this.$store.state.user.agencyId,
},
optionList: [],
optionProps: {
multiple: false,
value: "agencyId",
label: "agencyName",
children: "subAgencyList",
checkStrictly: true,
},
optionCook(obj) {
return [obj];
},
supKeys: ["orgId", "orgType"],
supValues: ["", ""],
handleChangeFn(vals, item) {
const { optionList } = item;
if (vals.length > 0) {
item["supValues"][0] = vals[vals.length - 1];
item["supValues"][1] = getItemByIdInCascader(
optionList,
vals,
"agencyId",
"subAgencyList"
)[vals.length - 1]["level"];
item["supValues"][1] =
item["supValues"][1] == "grid" ? "grid" : "agency";
} else {
item["supValues"][0] = "";
item["supValues"][1] = "";
}
},
},
],
tableParams: [
{ field: "序号", keyName: "", type: "no" },
{ field: "所属组织", keyName: "orgName", type: "text", width: "220" },
{ field: "人口总数", keyName: "userTotal", type: "text" },
{ field: "常住人口数", keyName: "czUserTotal", type: "text" },
{ field: "流动人口数", keyName: "ldUserTotal", type: "text" },
{ field: "房屋总数", keyName: "houseTotal", type: "text" },
{ field: "自住房屋数", keyName: "zzHouseTotal", type: "text" },
{ field: "出租房屋数", keyName: "czHouseTotal", type: "text" },
{ field: "闲置房屋数", keyName: "xzHouseTotal", type: "text" },
],
tableUrl: "/gov/org/house/usingCommunityUserHouseStats",
};
},
components: { basePage },
computed: {},
watch: {},
async mounted() {
this.searchParams[0].value = this.orgIds;
this.searchParams[0].supValues[0] = this.orgId;
if (this.orgId) {
this.searchParams[0].supValues[1] = "agency";
}
this.iniLoaded = true;
},
methods: {},
};
</script>
<style lang="scss" scoped></style>

364
src/views/modules/renFangTongJi/index.vue

@ -0,0 +1,364 @@
<template>
<el-card class="g-cnt">
<div class="m-cards">
<div
class="item"
:key="item.name"
@click="handleClickCard(item)"
v-for="item in list"
>
<div class="item-left">
<div class="num">{{ item.num }}</div>
<div class="name">{{ item.name }}</div>
</div>
<div class="item-right">
<div class="hint">
<div class="hint-title">较上月</div>
<b v-if="item.variation >= 0">+ {{ item.variationAbs }}</b>
<b v-else>- {{ item.variationAbs }}</b>
</div>
</div>
</div>
</div>
<div class="m-tb">
<h3>下级平台使用进度汇总</h3>
<el-table
:data="tableData"
border
style="width: 100%"
class="tb"
:height="maxTableHeight"
align="center"
>
<el-table-column label="序号" type="index" align="center" width="50" />
<el-table-column
prop="orgName"
label="所属组织"
width="150"
align="center"
>
</el-table-column>
<el-table-column
prop="usingCommunityNum"
label="开通平台社区数"
align="center"
>
<template slot-scope="scope">
<a style="cursor: pointer" @click="showDetail(scope.row.orgId)">{{
scope.row.usingCommunityNum
}}</a>
</template>
</el-table-column>
<el-table-column
prop="userTotal"
label="人口总数"
align="center"
></el-table-column>
<el-table-column
prop="czUserTotal"
label="常住人口总数"
align="center"
></el-table-column>
<el-table-column
prop="ldUserTotal"
label="流动人口总数"
align="center"
></el-table-column>
<el-table-column
prop="houseTotal"
label="房屋总数"
align="center"
></el-table-column>
<el-table-column
prop="zzHouseTotal"
label="自住房屋总数"
align="center"
></el-table-column>
<el-table-column
prop="czHouseTotal"
label="出租房屋总数"
align="center"
></el-table-column>
<el-table-column
prop="xzHouseTotal"
label="闲置房屋总数"
align="center"
></el-table-column>
</el-table>
</div>
<!-- 修改弹出框 -->
<el-dialog
v-if="displayedDetail"
:visible="true"
title="社区列表 "
width="1150px"
top="5vh"
@close="displayedDetail = false"
>
<shequtongji
ref="shequtongji"
:orgId="detailOrgId"
:orgIds="[orgId, detailOrgId]"
/>
</el-dialog>
</el-card>
</template>
<script>
import { requestPost } from "@/js/dai/request";
import nextTick from "dai-js/tools/nextTick";
import { mapGetters } from "vuex";
import shequtongji from "./cpts/shequtongji";
export default {
name: "renFangTongJi",
components: { shequtongji },
data() {
return {
displayedDetail: false,
tableData: [],
orgId: "",
orgType: "",
detailOrgId: "",
list: [
{
name: "开通平台社区数",
num: "--",
variation: 0,
variationAbs: "0",
},
{
name: "人口总数",
num: "--",
variation: 0,
variationAbs: "0",
},
{
name: "常住人口数",
num: "--",
variation: 0,
variationAbs: "0",
},
{
name: "流动人口数",
num: "--",
variation: 0,
variationAbs: "0",
},
{
name: "房屋总数",
num: "--",
variation: 0,
variationAbs: "0",
},
{
name: "自住房屋数",
num: "--",
variation: 0,
variationAbs: "0",
},
{
name: "出租房屋数",
num: "--",
variation: 0,
variationAbs: "0",
},
{
name: "闲置房屋数",
num: "--",
variation: 0,
variationAbs: "0",
},
],
};
},
computed: {
maxTableHeight() {
return this.clientHeight - 420;
},
...mapGetters(["clientHeight"]),
},
watch: {
orgId() {
this.getTableData();
},
},
mounted() {
this.getCommunityData();
this.getResiData();
this.getHouseData();
this.getTableData();
},
methods: {
handleClickCard(item) {
if (item.name == "开通平台社区数") {
this.showDetail();
}
},
async showDetail(orgId = "") {
this.displayedDetail = true;
this.detailOrgId = orgId;
},
async getCommunityData() {
const url = "/gov/org/agency/usingCommunityStats";
const { data, code, msg } = await requestPost(url, {
orgId: this.orgId,
orgType: this.orgType,
});
if (code === 0) {
const { list } = this;
let item1 = list.find((item) => item.name == "开通平台社区数");
item1.num = data.usingCommunityNum;
item1.variation = parseInt(data.usingCommunityNumJSY);
item1.variationAbs = Math.abs(item1.variation);
}
},
async getResiData() {
const url = "/epmetuser/icresiuser/userchart";
const { data, code, msg } = await requestPost(url, {
orgId: this.orgId,
orgType: this.orgType,
});
if (code === 0) {
const { list } = this;
this.orgId = data.orgId;
this.orgType = data.orgType;
let item1 = list.find((item) => item.name == "人口总数");
item1.num = data.userTotal;
item1.variation = parseInt(data.userTotalJSY);
item1.variationAbs = Math.abs(item1.variation);
let item2 = list.find((item) => item.name == "常住人口数");
item2.num = data.czUserTotal;
item2.variation = parseInt(data.czUserTotalJSY);
item2.variationAbs = Math.abs(item2.variation);
let item3 = list.find((item) => item.name == "流动人口数");
item3.num = data.ldUserTotal;
item3.variation = parseInt(data.ldUserTotalJSY);
item3.variationAbs = Math.abs(item3.variation);
}
},
async getHouseData() {
const url = "/gov/org/house/housechart";
const { data, code, msg } = await requestPost(url, {
orgId: this.orgId,
orgType: this.orgType,
});
if (code === 0) {
const { list } = this;
let item1 = list.find((item) => item.name == "房屋总数");
item1.num = data.houseTotal;
item1.variation = parseInt(data.houseTotalJSY);
item1.variationAbs = Math.abs(item1.variation);
let item2 = list.find((item) => item.name == "自住房屋数");
item2.num = data.zzHouseTotal;
item2.variation = parseInt(data.zzHouseTotalJSY);
item2.variationAbs = Math.abs(item2.variation);
let item3 = list.find((item) => item.name == "出租房屋数");
item3.num = data.czHouseTotal;
item3.variation = parseInt(data.czHouseTotalJSY);
item3.variationAbs = Math.abs(item3.variation);
let item4 = list.find((item) => item.name == "闲置房屋数");
item4.num = data.xzHouseTotal;
item4.variation = parseInt(data.xzHouseTotalJSY);
item4.variationAbs = Math.abs(item4.variation);
}
},
async getTableData() {
const url = "/gov/org/house/subuserhouselist";
const { data, code, msg } = await requestPost(url, {
orgId: this.orgId,
orgType: this.orgType,
});
if (code === 0) {
this.tableData = data
? data.map((item) => {
return item;
})
: [];
}
},
},
};
</script>
<style lang="scss" scoped>
@import "@/assets/scss/c/config.scss";
@import "@/assets/scss/c/function.scss";
.m-cards {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
.item {
display: flex;
width: 24%;
margin-top: 15px;
// margin-right: 1%;
box-sizing: border-box;
color: #ffffff;
padding: 12px;
border-radius: 4px;
background-image: linear-gradient(to left, #43c8c4, #2aa5c6);
cursor: pointer;
.item-right {
margin-left: auto;
}
.item-left {
text-align: center;
}
.num {
font-size: 28px;
font-weight: bold;
line-height: 40px;
}
.name {
font-size: 14px;
line-height: 20px;
}
.hint {
margin-top: 10px;
line-height: 20px;
text-align: center;
font-size: 18px;
.hint-title {
font-size: 14px;
}
}
}
}
.m-tb {
margin-top: 20px;
}
</style>

8
src/views/modules/shequzhili/csgltc/csglForm.vue

@ -307,7 +307,7 @@ export default {
// map TMap.Map() // map TMap.Map()
map = new window.TMap.Map(document.getElementById('app'), { map = new window.TMap.Map(document.getElementById('app'), {
center: center, // center: center, //
zoom: 17.2, // zoom: 16.2, //
pitch: 43.5, // pitch: 43.5, //
rotation: 45 // rotation: 45 //
}) })
@ -352,9 +352,11 @@ export default {
markers.setGeometries([]) markers.setGeometries([])
// //
search search
.searchRectangle({ .searchNearby({
keyword: this.formData.address, keyword: this.formData.address,
bounds: map.getBounds() radius: 1000,
autoExtend: true,
center: map.getCenter(),
}) })
.then((result) => { .then((result) => {
let { data } = result let { data } = result

8
src/views/modules/shequzhili/event/cpts/add.vue

@ -625,7 +625,7 @@ export default {
// map TMap.Map() // map TMap.Map()
map = new window.TMap.Map(document.getElementById("app"), { map = new window.TMap.Map(document.getElementById("app"), {
center: center, // center: center, //
zoom: 17.2, // zoom: 16.2, //
pitch: 43.5, // pitch: 43.5, //
rotation: 45, // rotation: 45, //
}); });
@ -670,9 +670,11 @@ export default {
markers.setGeometries([]); markers.setGeometries([]);
// //
search search
.searchRectangle({ .searchNearby({
keyword: this.keyWords, keyword: this.keyWords,
bounds: map.getBounds(), radius: 1000,
autoExtend: true,
center: map.getCenter(),
}) })
.then((result) => { .then((result) => {
let { data } = result; let { data } = result;

8
src/views/modules/shequzhili/ggfwtc/ggfwForm.vue

@ -284,7 +284,7 @@ export default {
// map TMap.Map() // map TMap.Map()
map = new window.TMap.Map(document.getElementById('app'), { map = new window.TMap.Map(document.getElementById('app'), {
center: center, // center: center, //
zoom: 17.2, // zoom: 16.2, //
pitch: 43.5, // pitch: 43.5, //
rotation: 45 // rotation: 45 //
}) })
@ -329,9 +329,11 @@ export default {
markers.setGeometries([]) markers.setGeometries([])
// //
search search
.searchRectangle({ .searchNearby({
keyword: this.formData.address, keyword: this.formData.address,
bounds: map.getBounds() radius: 1000,
autoExtend: true,
center: map.getCenter(),
}) })
.then((result) => { .then((result) => {
let { data } = result let { data } = result

178
src/views/modules/shujuduibi/canji.vue

@ -0,0 +1,178 @@
<template>
<div>
<base-page
ref="basePage"
:searchParams="searchParams"
:tableParams="tableParams"
:tableUrl="tableUrl"
:delMultipleUrl="delMultipleUrl"
:infoUrl="infoUrl"
:exportUrl="exportUrl"
:editParams="editParams"
:editParamsDiv="5"
idName="id"
>
<template v-slot:listBtn="{ multipleSelection }">
<el-button @click="handleSyncMultiple(multipleSelection)" size="small"
>批量更新</el-button
>
</template>
<template v-slot:listBtnSup="{ item }">
<el-button type="text" @click="handleSync(item)" size="small"
>全部更新</el-button
>
</template>
<template v-slot:editBottomSup="{ id, info }">
<div class="m-duibi">
<h3>对比信息</h3>
<el-table
:data="cookInfo(info)"
style="width: 100%"
:row-class-name="tableRowClassName"
>
<el-table-column prop="resiInfo" label="数据库信息">
</el-table-column>
<el-table-column prop="result" label="结果"></el-table-column>
</el-table>
</div>
</template>
</base-page>
</div>
</template>
<script>
import basePage from "@/views/modules/cpts/base/index";
import { requestPost } from "@/js/dai/request";
export default {
props: {},
data() {
return {
searchParams: [
{ field: "姓名", keyName: "name", type: "input" },
{ field: "证件号", keyName: "idCard", type: "input" },
{ field: "手机", keyName: "mobile", type: "input" },
],
tableParams: [
{ field: "选择框", keyName: "", type: "selection" },
{ field: "序号", keyName: "", type: "no" },
{ field: "姓名", keyName: "name", type: "text" },
{ field: "证件号", keyName: "idCard", type: "text", width: 200 },
{ field: "手机", keyName: "mobile", type: "text", width: 120 },
{ field: "性别", keyName: "genderCn", type: "text" },
{ field: "民族", keyName: "mzCn", type: "text" },
{ field: "家庭住址", keyName: "address", type: "text" },
{ field: "残疾类别", keyName: "cjlbCn", type: "text" },
{ field: "残疾等级", keyName: "cjzkCn", type: "text" },
{ field: "残疾证号", keyName: "cardNum", type: "text", width: 200 },
{ field: "监护人", keyName: "guardian", type: "text" },
{ field: "状态", keyName: "dealStatusName", type: "text" },
{ field: "失败原因", keyName: "dealResult", type: "text" },
],
tableUrl: "/epmetuser/dataSyncRecordDisability/page",
delMultipleUrl: "/epmetuser/dataSyncRecordDisability/delete",
infoUrl: "/epmetuser/dataSyncRecordDisability/detail/",
// delUrl: "/gov/org/icDangerousChemicals/del",
exportUrl: "/epmetuser/dataSyncRecordDisability/export",
editParams: [
{ field: "姓名", keyName: "name", type: "input" },
{ field: "证件号", keyName: "idCard", type: "input" },
{ field: "手机", keyName: "mobile", type: "input" },
{ field: "性别", keyName: "genderCn", type: "input" },
{ field: "民族", keyName: "mzCn", type: "input" },
{ field: "家庭住址", keyName: "address", type: "input" },
{ field: "残疾类别", keyName: "cjlbCn", type: "input" },
{ field: "残疾等级", keyName: "cjzkCn", type: "input" },
{ field: "残疾证号", keyName: "cardNum", type: "input" },
{ field: "监护人", keyName: "guardian", type: "input" },
{ field: "状态", keyName: "dealStatusName", type: "input" },
{ field: "失败原因", keyName: "dealResult", type: "input" },
],
};
},
components: { basePage },
computed: {},
watch: {},
async mounted() {},
methods: {
cookInfo(info) {
let arr = [
{ field: "姓名", keyName: "name", type: "text" },
{ field: "证件号", keyName: "idCard", type: "text" },
{ field: "手机", keyName: "mobile", type: "text" },
{ field: "性别", keyName: "genderCn", type: "text" },
{ field: "民族", keyName: "mzCn", type: "text" },
{ field: "家庭住址", keyName: "address", type: "text" },
{ field: "残疾类别", keyName: "cjlbCn", type: "text" },
{ field: "残疾等级", keyName: "cjzkCn", type: "text" },
{ field: "残疾证号", keyName: "cardNum", type: "text" },
{ field: "监护人", keyName: "guardian", type: "text" },
];
return arr.map((item) => {
let val = (info && info[item.keyName]) || "--";
let resiVal =
(info && info.resiInfo && info.resiInfo[item.keyName]) || "--";
return {
resiInfo: item.field + ":" + resiVal,
result: resiVal == val ? "一致" : "不一致",
};
});
},
tableRowClassName({ row }) {
if (row.result === "不一致") {
return "z-stress";
}
return "";
},
async handleSync(item) {
const { data, code, msg } = await requestPost(
"/epmetuser/dataSyncRecordDisability/batchUpdate",
[item["id"]]
);
if (code === 0) {
this.$message.success("更新成功!");
this.$refs.basePage.getTableData();
} else {
this.$message.error("操作失败!");
}
},
async handleSyncMultiple(multipleSelection) {
const { data, code, msg } = await requestPost(
"/epmetuser/dataSyncRecordDisability/batchUpdate",
[...multipleSelection.map((item) => item["id"])]
);
if (code === 0) {
this.$message.success("批量更新成功!");
this.$refs.basePage.getTableData();
} else {
this.$message.error("操作失败!");
}
},
},
};
</script>
<style lang="scss" scoped>
.m-duibi {
padding: 10px;
}
::v-deep .el-table .z-stress {
background: oldlace;
}
</style>

122
src/views/modules/shujuduibi/siwang.vue

@ -0,0 +1,122 @@
<template>
<div>
<base-page
ref="basePage"
:searchParams="searchParams"
:tableParams="tableParams"
:tableUrl="tableUrl"
:delMultipleUrl="delMultipleUrl"
:infoUrl="infoUrl"
:exportUrl="exportUrl"
:editParams="editParams"
:cookTableData="cookTableData"
idName="id"
>
<template v-slot:listBtn="{ multipleSelection }">
<el-button @click="handleSyncMultiple(multipleSelection)" size="small"
>批量更新</el-button
>
</template>
<template v-slot:listBtnSup="{ item }">
<el-button type="text" @click="handleSync(item)" size="small"
>全部更新</el-button
>
</template>
</base-page>
</div>
</template>
<script>
import basePage from "@/views/modules/cpts/base/index";
import { requestPost } from "@/js/dai/request";
export default {
props: {},
data() {
return {
searchParams: [
{ field: "姓名", keyName: "name", type: "input" },
{ field: "证件号", keyName: "idCard", type: "input" },
],
tableParams: [
{ field: "选择框", keyName: "", type: "selection" },
{ field: "序号", keyName: "", type: "no" },
{ field: "姓名", keyName: "name", type: "text" },
{ field: "证件号", keyName: "idCard", type: "text", width: 200 },
{ field: "死亡日期", keyName: "deathDate", type: "text", width: 120 },
{ field: "现年龄", keyName: "age", type: "text" },
{ field: "家庭住址", keyName: "address", type: "text" },
{ field: "状态", keyName: "dealStatusName", type: "text" },
{ field: "失败原因", keyName: "dealResult", type: "text" },
],
tableUrl: "/epmetuser/dataSyncRecordDeath/page",
delMultipleUrl: "/epmetuser/dataSyncRecordDeath/delete",
infoUrl: "/epmetuser/dataSyncRecordDeath/detail/",
// delUrl: "/gov/org/icDangerousChemicals/del",
exportUrl: "/epmetuser/dataSyncRecordDeath/export",
editParams: [
{ field: "姓名", keyName: "name", type: "input" },
{ field: "证件号", keyName: "idCard", type: "input" },
{ field: "死亡日期", keyName: "deathDate", type: "input" },
{ field: "现年龄", keyName: "age", type: "input" },
{ field: "家庭住址", keyName: "address", type: "input" },
],
};
},
components: { basePage },
computed: {},
watch: {},
async mounted() {},
methods: {
cookTableData(tableData) {
return tableData.map((item) => {
item.dealStatusName =
!item.dealStatus || item.dealStatus == 0
? "未处理"
: item.dealStatus == 1
? "处理成功"
: "处理失败";
return item;
});
},
async handleSync(item) {
const { data, code, msg } = await requestPost(
"/epmetuser/dataSyncRecordDeath/batchupdate",
[item["id"]]
);
if (code === 0) {
this.$message.success("更新成功!");
this.$refs.basePage.getTableData();
} else {
this.$message.error("操作失败!");
}
},
async handleSyncMultiple(multipleSelection) {
const { data, code, msg } = await requestPost(
"/epmetuser/dataSyncRecordDeath/batchupdate",
[...multipleSelection.map((item) => item["id"])]
);
if (code === 0) {
this.$message.success("批量更新成功!");
this.$refs.basePage.getTableData();
} else {
this.$message.error("操作失败!");
}
},
},
};
</script>
<style lang="scss" scoped></style>
Loading…
Cancel
Save