Browse Source

Merge branch 'feature/dev_party_mange' into dev

test
YUJT 3 years ago
parent
commit
ceba73c247
  1. 67
      src/assets/scss/buttonstyle copy.scss
  2. 22
      src/utils/validate.js
  3. 2
      src/views/main-shuju/main-content.vue
  4. 2
      src/views/main-shuju/main.vue
  5. 2
      src/views/main.vue
  6. 18
      src/views/modules/communityParty/regionalParty/unitsForm.vue
  7. 18
      src/views/modules/communityService/ninePlaces/places/placesForm.vue
  8. 385
      src/views/modules/communityService/sqzzz/cpts/edit.vue
  9. 32
      src/views/modules/partymember/icpartyorg-add-or-update.vue
  10. 6
      src/views/modules/shequzhili/event/cpts/event-detail.vue
  11. 1
      src/views/modules/visual/communityParty/community.vue
  12. 3
      src/views/modules/visual/communityParty/party.vue
  13. 151
      src/views/modules/workSys/mapConfig.vue

67
src/assets/scss/buttonstyle copy.scss

@ -1,67 +0,0 @@
//新增
.el-button--add {
color: #fff;
background-color: #22c1c3;
border-color: #22c1c3;
}
.el-button--add:hover {
color: #fff;
background-color: #05b1b4;
border-color: #05b1b4;
}
.el-button--add:focus {
color: #fff;
background-color: #22c1c3;
border-color: #22c1c3;
}
//删除导入
.el-button--delete {
color: #fff;
background-color: #fe6252;
border-color: #fe6252;
}
.el-button--delete:hover {
color: #fff;
background-color: #fe6252;
border-color: #fe6252;
}
.el-button--delete:focus {
color: #fff;
background-color: #fe6252;
border-color: #fe6252;
}
//重置导出
.el-button--reset {
color: #fff;
background-color: #feb349;
border-color: #feb349;
}
.el-button--reset:hover {
color: #fff;
background-color: #feb349;
border-color: #feb349;
}
.el-button--reset:focus {
color: #fff;
background-color: #feb349;
border-color: #feb349;
}
//查询确定
.el-button--search:hover {
color: #fff;
background-color: #3e8ef7;
border-color: #3e8ef7;
}
.el-button--search:focus {
color: #fff;
background-color: #3e8ef7;
border-color: #3e8ef7;
}
.el-button--search {
color: #fff;
background-color: #3e8ef7;
border-color: #3e8ef7;
}

22
src/utils/validate.js

@ -2,38 +2,40 @@
* 邮箱 * 邮箱
* @param {*} s * @param {*} s
*/ */
export function isEmail (s) { export function isEmail(s) {
return /^([a-zA-Z0-9._-])+@([a-zA-Z0-9_-])+((.[a-zA-Z0-9_-]{2,3}){1,2})$/.test(s) return /^([a-zA-Z0-9._-])+@([a-zA-Z0-9_-])+((.[a-zA-Z0-9_-]{2,3}){1,2})$/.test(
s
);
} }
/** /**
* 手机号码 * 手机号码
* @param {*} s * @param {*} s
*/ */
export function isMobile (s) { export function isMobile(s) {
return /^1[0-9]{10}$/.test(s) return /^1[0-9]{10}$/.test(s);
} }
/** /**
* 电话号码 * 电话号码
* @param {*} s * @param {*} s
*/ */
export function isPhone (s) { export function isPhone(s) {
return /^([0-9]{3,4}-)?[0-9]{7,8}$/.test(s) return /^([0-9]{3,4}-)?[0-9]{7,8}$/.test(s);
} }
/** /**
* URL地址 * URL地址
* @param {*} s * @param {*} s
*/ */
export function isURL (s) { export function isURL(s) {
return /^http[s]?:\/\/.*/.test(s) return /^http[s]?:\/\/.*/.test(s) || /^\/\/.*/.test(s);
} }
/** /**
* 身份证 * 身份证
* @param {*} s * @param {*} s
*/ */
export function isCard (s) { export function isCard(s) {
return /^(\d{15}$)|(^\d{17}([0-9]|X)$)/.test(s) return /^(\d{15}$)|(^\d{17}([0-9]|X)$)/.test(s);
} }

2
src/views/main-shuju/main-content.vue

@ -60,6 +60,8 @@ export default {
// localStorage.getItem("token") + // localStorage.getItem("token") +
// "&customerId=" + // "&customerId=" +
// localStorage.getItem("customerId"); // localStorage.getItem("customerId");
// return /^http[s]?:\/\/.*/.test(url);
return isURL(url); return isURL(url);
}, },
// tabs, tab // tabs, tab

2
src/views/main-shuju/main.vue

@ -123,7 +123,7 @@ export default {
localStorage.setItem("customerName", data.customerName || ""); localStorage.setItem("customerName", data.customerName || "");
} }
} else { } else {
this.$message.error(rspMsg); this.$message.error(msg);
} }
}, },
}, },

2
src/views/main.vue

@ -159,7 +159,7 @@ export default {
localStorage.setItem("customerName", data.customerName || ""); localStorage.setItem("customerName", data.customerName || "");
} }
} else { } else {
this.$message.error(rspMsg); this.$message.error(msg);
} }
}, },
}, },

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

@ -287,15 +287,15 @@ export default {
}, },
async addUnit () { async addUnit () {
const regPhone = /^1(3|4|5|6|7|8|9)\d{9}$/; // // const regPhone = /^1(3|4|5|6|7|8|9)\d{9}$/; //
if (regPhone.test(this.formData.contactMobile) === false) { // if (regPhone.test(this.formData.contactMobile) === false) {
this.btnDisable = false // this.btnDisable = false
this.$message({ // this.$message({
type: 'warning', // type: 'warning',
message: '请输入正确的手机号码' // message: ''
}) // })
return false; // return false;
} // }
let url = '/heart/icpartyunit/save' let url = '/heart/icpartyunit/save'
// let url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyunit/save" // let url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyunit/save"

18
src/views/modules/communityService/ninePlaces/places/placesForm.vue

@ -197,15 +197,15 @@ export default {
}, },
async addPlace () { async addPlace () {
const regPhone = /^1(3|4|5|6|7|8|9)\d{9}$/; // // const regPhone = /^1(3|4|5|6|7|8|9)\d{9}$/; //
if (regPhone.test(this.formData.mobile) === false) { // if (regPhone.test(this.formData.mobile) === false) {
this.btnDisable = false // this.btnDisable = false
this.$message({ // this.$message({
type: 'warning', // type: 'warning',
message: '请输入正确的手机号码' // message: ''
}) // })
return false; // return false;
} // }
let url = '' let url = ''

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

@ -1,243 +1,185 @@
<template> <template>
<div> <div>
<div class="dialog-h-content scroll-h"> <div class="dialog-h-content scroll-h">
<el-form <el-form ref="ref_form"
ref="ref_form" :inline="true"
:inline="true" :model="dataForm"
:model="dataForm" :rules="dataRule"
:rules="dataRule" :disabled="formType === 'detail'"
:disabled="formType === 'detail'" class="form">
class="form" <el-form-item label="组织名称 "
> prop="organizationName"
<el-form-item label-width="150px"
label="组织名称 " style="display: block">
prop="organizationName" <el-input class="item_width_1"
label-width="150px" maxlength="50"
style="display: block" show-word-limit
> placeholder="请输入组织名称 "
<el-input v-model="dataForm.organizationName">
class="item_width_1"
maxlength="50"
show-word-limit
placeholder="请输入组织名称 "
v-model="dataForm.organizationName"
>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item <el-form-item label="分类名称 "
label="分类名称 " prop="categoryCode"
prop="categoryCode" label-width="150px"
label-width="150px" style="display: block">
style="display: block" <el-select v-model="dataForm.categoryCode"
> placeholder="请选择"
<el-select clearable>
v-model="dataForm.categoryCode" <el-option v-for="item in categoryList"
placeholder="请选择" :key="item.value"
clearable :label="item.label"
> :value="item.value">
<el-option
v-for="item in categoryList"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item <el-form-item label="组织人数 "
label="组织人数 " prop="organizationPersonCount"
prop="organizationPersonCount" label-width="150px"
label-width="150px" style="display: block">
style="display: block" <el-input class="item_width_1"
> type="number"
<el-input maxlength="50"
class="item_width_1" show-word-limit
type="number" placeholder="请输入组织人数 "
maxlength="50" v-model="dataForm.organizationPersonCount">
show-word-limit
placeholder="请输入组织人数 "
v-model="dataForm.organizationPersonCount"
>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item <el-form-item label="组织成员 "
label="组织成员 " prop="organizationPersonnel"
prop="organizationPersonnel" label-width="150px"
label-width="150px" style="display: block">
style="display: block"
>
<div class="m-staffs"> <div class="m-staffs">
<div <div class="item"
class="item" :key="'staff' + index"
:key="'staff' + index" v-for="(item, index) in dataForm.organizationPersonnel">
v-for="(item, index) in dataForm.organizationPersonnel" <el-input class="item_width_1"
> maxlength="50"
<el-input show-word-limit
class="item_width_1" placeholder="成员姓名"
maxlength="50" v-model="item.personName" />
show-word-limit
placeholder="成员姓名" <el-input style="margin-left: 10px"
v-model="item.personName" class="item_width_1"
/> maxlength="50"
show-word-limit
<el-input placeholder="联系电话"
style="margin-left: 10px" v-model="item.personPhone" />
class="item_width_1"
maxlength="50" <el-button style="margin-left: 10px"
show-word-limit size="small"
placeholder="联系电话" @click="handleDelStaff(index)">删除</el-button>
v-model="item.personPhone"
/>
<el-button
style="margin-left: 10px"
size="small"
@click="handleDelStaff(index)"
>删除</el-button
>
</div> </div>
<div class="item-add"> <div class="item-add">
<el-button size="small" @click="handleAddStaff">添加</el-button> <el-button size="small"
@click="handleAddStaff">添加</el-button>
</div> </div>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item <el-form-item label="服务事项"
label="服务事项" prop="serviceItem"
prop="serviceItem" label-width="150px"
label-width="150px" style="display: block">
style="display: block" <el-input class="item_width_1"
> type="textarea"
<el-input maxlength="1000"
class="item_width_1" show-word-limit
type="textarea" :rows="3"
maxlength="1000" placeholder="请输入服务事项,不超过1000字"
show-word-limit v-model="dataForm.serviceItem"></el-input>
:rows="3"
placeholder="请输入服务事项,不超过1000字"
v-model="dataForm.serviceItem"
></el-input>
</el-form-item> </el-form-item>
<el-form-item <el-form-item label="负责人 "
label="负责人 " prop="principalName"
prop="principalName" label-width="150px"
label-width="150px" style="display: block">
style="display: block" <el-input class="item_width_1"
> maxlength="50"
<el-input show-word-limit
class="item_width_1" placeholder="请输入负责人 "
maxlength="50" v-model="dataForm.principalName">
show-word-limit
placeholder="请输入负责人 "
v-model="dataForm.principalName"
>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item <el-form-item label="联系电话 "
label="联系电话 " prop="principalPhone"
prop="principalPhone" label-width="150px"
label-width="150px" style="display: block">
style="display: block" <el-input class="item_width_1"
> maxlength="50"
<el-input show-word-limit
class="item_width_1" placeholder="请输入联系电话 "
maxlength="50" v-model="dataForm.principalPhone">
show-word-limit
placeholder="请输入联系电话 "
v-model="dataForm.principalPhone"
>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item <el-form-item label="创建时间"
label="创建时间" prop="organizationCreatedTime"
prop="organizationCreatedTime" label-width="150px"
label-width="150px" style="display: block">
style="display: block" <el-date-picker v-model="dataForm.organizationCreatedTime"
> placeholder="创建时间"
<el-date-picker value-format="yyyy-MM-dd">
v-model="dataForm.organizationCreatedTime"
placeholder="创建时间"
value-format="yyyy-MM-dd"
>
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item <el-form-item label="位置坐标"
label="位置坐标" prop="longitude"
prop="longitude" label-width="150px"
label-width="150px" style="display: block">
style="display: block"
>
<div style="width: 500px"> <div style="width: 500px">
<el-input <el-input class="item_width_4"
class="item_width_4" maxlength="50"
maxlength="50" placeholder="请输入关键字"
placeholder="请输入关键字" v-model="dataForm.address">
v-model="dataForm.address"
>
</el-input> </el-input>
<el-button <el-button style="margin-left: 10px"
style="margin-left: 10px" type="primary"
type="primary" size="small"
size="small" @click="handleSearchMap">查询</el-button>
@click="handleSearchMap" <div id="app"
>查询</el-button class="div_map"></div>
>
<div id="app" class="div_map"></div>
<div style="margin-top: 10px"> <div style="margin-top: 10px">
<span>经度</span> <span>经度</span>
<el-input <el-input class="item_width_3"
class="item_width_3" maxlength="50"
maxlength="50" placeholder="请输入经度"
placeholder="请输入经度" v-model="dataForm.longitude">
v-model="dataForm.longitude"
>
</el-input> </el-input>
<span style="margin-left: 20px">纬度</span> <span style="margin-left: 20px">纬度</span>
<el-input <el-input class="item_width_3"
class="item_width_3" maxlength="50"
maxlength="50" placeholder="请输入纬度"
placeholder="请输入纬度" v-model="dataForm.latitude">
v-model="dataForm.latitude"
>
</el-input> </el-input>
</div> </div>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item <el-form-item label="备注"
label="备注" prop="remark"
prop="remark" label-width="150px"
label-width="150px" style="display: block">
style="display: block" <el-input class="item_width_1"
> type="textarea"
<el-input maxlength="500"
class="item_width_1" show-word-limit
type="textarea" :rows="3"
maxlength="500" placeholder="请输入备注,不超过500字"
show-word-limit v-model="dataForm.remark"></el-input>
:rows="3"
placeholder="请输入备注,不超过500字"
v-model="dataForm.remark"
></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
<div class="div_btn resi-btns"> <div class="div_btn resi-btns">
<el-button size="small" @click="handleCancle"> </el-button> <el-button size="small"
<el-button @click="handleCancle"> </el-button>
v-if="formType != 'detail'" <el-button v-if="formType != 'detail'"
type="primary" type="primary"
size="small" size="small"
:disabled="btnDisable" :disabled="btnDisable"
@click="handleComfirm" @click="handleComfirm"> </el-button>
> </el-button
>
</div> </div>
</div> </div>
</template> </template>
@ -255,7 +197,7 @@ var infoWindowList;
let loading; // let loading; //
export default { export default {
data() { data () {
return { return {
formType: "add", // addeditdetail formType: "add", // addeditdetail
@ -281,7 +223,7 @@ export default {
}, },
components: {}, components: {},
computed: { computed: {
dataRule() { dataRule () {
return { return {
organizationName: [ organizationName: [
{ required: true, message: "组织名称 不能为空", trigger: "blur" }, { required: true, message: "组织名称 不能为空", trigger: "blur" },
@ -316,15 +258,15 @@ export default {
props: {}, props: {},
watch: {}, watch: {},
async created() { async created () {
this.getCategoryList(); this.getCategoryList();
}, },
async mounted() { async mounted () {
this.initMap(); this.initMap();
}, },
methods: { methods: {
async getCategoryList() { async getCategoryList () {
const url = "/sys/dict/data/dictlist"; const url = "/sys/dict/data/dictlist";
const params = { const params = {
dictType: "self_org_category", dictType: "self_org_category",
@ -336,19 +278,19 @@ export default {
this.$message.error(msg); this.$message.error(msg);
} }
}, },
handleAddStaff() { handleAddStaff () {
this.dataForm.organizationPersonnel = [ this.dataForm.organizationPersonnel = [
...this.dataForm.organizationPersonnel, ...this.dataForm.organizationPersonnel,
{ personName: "", personPhone: "" }, { personName: "", personPhone: "" },
]; ];
}, },
handleDelStaff(index) { handleDelStaff (index) {
const { organizationPersonnel } = this.dataForm; const { organizationPersonnel } = this.dataForm;
organizationPersonnel.splice(index, 1); organizationPersonnel.splice(index, 1);
this.dataForm.organizationPersonnel = organizationPersonnel; this.dataForm.organizationPersonnel = organizationPersonnel;
}, },
// init // init
initMap() { initMap () {
// //
var center = new window.TMap.LatLng(36.0722275, 120.38945519); var center = new window.TMap.LatLng(36.0722275, 120.38945519);
// map TMap.Map() // map TMap.Map()
@ -374,7 +316,7 @@ export default {
this.handleMoveCenter(); this.handleMoveCenter();
}, },
setMarker(lat, lng) { setMarker (lat, lng) {
markers.setGeometries([]); markers.setGeometries([]);
markers.add([ markers.add([
{ {
@ -388,7 +330,7 @@ export default {
]); ]);
}, },
handleSearchMap() { handleSearchMap () {
infoWindowList.forEach((infoWindow) => { infoWindowList.forEach((infoWindow) => {
infoWindow.close(); infoWindow.close();
}); });
@ -416,7 +358,7 @@ export default {
}); });
}, },
handleMoveCenter() { handleMoveCenter () {
// //
const center = map.getCenter(); const center = map.getCenter();
const lat = center.getLat(); const lat = center.getLat();
@ -426,7 +368,7 @@ export default {
this.setMarker(lat, lng); this.setMarker(lat, lng);
}, },
async initForm(type, row) { async initForm (type, row) {
this.$refs.ref_form.resetFields(); this.$refs.ref_form.resetFields();
this.formType = type; this.formType = type;
@ -438,7 +380,7 @@ export default {
} }
}, },
async handleComfirm() { async handleComfirm () {
this.btnDisable = true; this.btnDisable = true;
setTimeout(() => { setTimeout(() => {
this.btnDisable = false; this.btnDisable = false;
@ -448,26 +390,25 @@ export default {
app.util.validateRule(messageObj); app.util.validateRule(messageObj);
this.btnDisable = false; this.btnDisable = false;
} else { } else {
if (!formVltHelper.userOrMobile(this.dataForm.principalPhone)) { // if (!formVltHelper.userOrMobile(this.dataForm.principalPhone)) {
return this.$message({ // return this.$message({
type: "error", // type: "error",
message: "手机号格式有误", // message: "",
}); // });
} // }
const { const {
dataForm: { organizationPersonnel }, dataForm: { organizationPersonnel },
} = this; } = this;
let vlt = organizationPersonnel.every((item) => { let vlt = organizationPersonnel.every((item) => {
return ( return (
item.personName && item.personName &&
item.personPhone && item.personPhone
formVltHelper.userOrMobile(item.personPhone)
); );
}); });
if (!vlt) { if (!vlt) {
return this.$message({ return this.$message({
type: "error", type: "error",
message: "成员姓名/手机号为空或格式有误", message: "成员姓名/手机号为空",
}); });
} }
this.submit(); this.submit();
@ -475,7 +416,7 @@ export default {
}); });
}, },
async submit() { async submit () {
let url = ""; let url = "";
if (this.formType === "add") { if (this.formType === "add") {
url = "/heart/iccommunityselforganization/addcommunityselforganization"; url = "/heart/iccommunityselforganization/addcommunityselforganization";
@ -503,11 +444,11 @@ export default {
} }
}, },
handleCancle() { handleCancle () {
this.resetData(); this.resetData();
this.$emit("dialogCancle"); this.$emit("dialogCancle");
}, },
resetData() { resetData () {
this.orgId = ""; this.orgId = "";
this.dataForm = { this.dataForm = {
organizationName: "", organizationName: "",
@ -525,7 +466,7 @@ export default {
}; };
}, },
// //
startLoading() { startLoading () {
loading = Loading.service({ loading = Loading.service({
lock: true, // lock: true, //
text: "正在加载……", // text: "正在加载……", //
@ -533,7 +474,7 @@ export default {
}); });
}, },
// //
endLoading() { endLoading () {
// clearTimeout(timer); // clearTimeout(timer);
if (loading) { if (loading) {
loading.close(); loading.close();

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

@ -145,12 +145,6 @@
agencyOrgList:[] agencyOrgList:[]
} }
}, },
// mounted () {
// setTimeout(() => {
// console.log(':::::::::::::::::::::::')
// this.initMap()
// }, 800);
// },
methods: { methods: {
init() { init() {
this.visible = true this.visible = true
@ -159,10 +153,10 @@
this.dataForm.staffId = localStorage.getItem('staffId') this.dataForm.staffId = localStorage.getItem('staffId')
this.keyWords = '' this.keyWords = ''
// //
setTimeout(() => {
this.$nextTick(() => {
this.$refs['dataForm'].resetFields() this.$refs['dataForm'].resetFields()
this.dataForm.latitude = '' this.dataForm.latitude = ''
this.dataForm.agencyId = ''
if (this.dataForm.id) { if (this.dataForm.id) {
this.setPartyOrgType() this.setPartyOrgType()
this.getInfo() this.getInfo()
@ -174,14 +168,17 @@
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.orgPids + ':' + this.dataForm.orgId : this.dataForm.orgId
this.dataForm.partyOrgType = this.dataForm._partyOrgType this.dataForm.partyOrgType = this.dataForm._partyOrgType
console.log(this.dataForm.partyOrgType, this.dataForm.orgPid, this.dataForm.orgPids)
this.setPartyOrgType_xzxj() this.setPartyOrgType_xzxj()
this.getInfoAgencyLisy() this.getInfoAgencyLisy()
} else { } else {
this.dataForm.mySelectOrg = '' this.dataForm.mySelectOrg = ''
} }
} }
}) }, 50);
// this.$nextTick(() => {
// })
}, },
// //
setPartyOrgType_xzxj() { setPartyOrgType_xzxj() {
@ -250,9 +247,22 @@
if(value == '5'){ // if(value == '5'){ //
this.dataForm.agencyId = localStorage.getItem('agencyId') this.dataForm.agencyId = localStorage.getItem('agencyId')
this.dataForm.agencyPids = '' this.dataForm.agencyPids = ''
//
this.orgList = []
this.dataForm.mySelectOrg = '', //
this.dataForm.orgPid = '', // ID,0
this.dataForm.orgPids = ''
this.getOrgList() this.getOrgList()
} else { } else {
// //
this.agencyOrgList = []
this.dataForm.agencyId = ''
//
this.orgList = []
this.dataForm.mySelectOrg = '', //
this.dataForm.orgPid = '', // ID,0
this.dataForm.orgPids = ''
this.getInfoAgencyLisy() this.getInfoAgencyLisy()
} }
}, },

6
src/views/modules/shequzhili/event/cpts/event-detail.vue

@ -78,8 +78,12 @@
</div> </div>
</div> </div>
<!--
显示关闭
1状态=完成 (已评价)||(没评价&&不是本人)
<div v-if="info.operationId&&!(info.status==='closed_case'&&!info.satisfactionName && user.id===info.createdUserId)" 2状态=未完成 有操作id -->
<div v-if="(info.status==='processing'&&info.operationId)||(info.status==='closed_case'&&(info.satisfactionName||(!info.satisfactionName && user.id!=info.createdUserId)))"
class="div-btn "> class="div-btn ">
<el-button size="small" <el-button size="small"
@click="handleCloseEvent">关闭</el-button> @click="handleCloseEvent">关闭</el-button>

1
src/views/modules/visual/communityParty/community.vue

@ -530,6 +530,7 @@ export default {
this.unitTableData = data.list.map((item, index) => { this.unitTableData = data.list.map((item, index) => {
return { return {
...item, ...item,
index: index + 1,
urlIndex: index urlIndex: index
} }
}) })

3
src/views/modules/visual/communityParty/party.vue

@ -317,6 +317,7 @@ export default {
// return // return
// } // }
if (params.seriesIndex == 0 || params.seriesIndex == 2) { if (params.seriesIndex == 0 || params.seriesIndex == 2) {
console.log('请求了吗')
this.ageCode = '' this.ageCode = ''
// this.getUnitList(this.agencyId) // this.getUnitList(this.agencyId)
this.getAgeList() this.getAgeList()
@ -378,7 +379,7 @@ export default {
// this.getEduList() // this.getEduList()
// return // return
// } // }
this.clickEduPie(params.dataIndex) // this.clickEduPie(params.dataIndex)
if (params.seriesIndex == 0 || params.seriesIndex == 2) { if (params.seriesIndex == 0 || params.seriesIndex == 2) {
this.eduCode = '' this.eduCode = ''
this.getEduList() this.getEduList()

151
src/views/modules/workSys/mapConfig.vue

@ -49,8 +49,8 @@
resize="none" resize="none"
size="small" size="small"
style="width:200px" style="width:200px"
:precision="6" :precision="5"
:step="0.00001" :step="0.0001"
placeholder='请输入经度偏差' placeholder='请输入经度偏差'
v-model="xOffset"> v-model="xOffset">
</el-input-number> </el-input-number>
@ -58,8 +58,8 @@
<el-input-number v-if="showBtn&&hasPolygon" <el-input-number v-if="showBtn&&hasPolygon"
resize="none" resize="none"
size="small" size="small"
:precision="6" :precision="5"
:step="0.00001" :step="0.0001"
style="width:200px" style="width:200px"
placeholder='请输入维度偏差' placeholder='请输入维度偏差'
v-model="yOffset"> v-model="yOffset">
@ -100,14 +100,48 @@
width="50%" width="50%"
:before-close="handleClose"> :before-close="handleClose">
<div class="div_textarea"> <div class="div_textarea">
<el-input type="textarea" <div style="margin-top:10px">
:autosize="{ minRows: 20, maxRows: 50}" <span> 中心点经度</span>
:rows="20" <el-input-number size="small"
style="width:600px;height:500px" style="width:250px"
placeholder='请复制坐标数据' v-model="longitude">
v-model="polygonManullyString"> </el-input-number>
</el-input> <span style="margin-left:15px"> 中心点纬度</span>
<el-input-number size="small"
style="width:250px"
v-model="latitude">
</el-input-number>
</div>
<div style="margin-top:20px">
<el-input type="textarea"
:rows="15"
style="width:600px;max-height:500px"
placeholder='请复制坐标数据'
v-model="polygonManullyString">
</el-input>
</div>
<div style="margin-top:20px">
<span> 经度偏差</span>
<el-input-number resize="none"
size="small"
style="width:200px"
:precision="5"
:step="0.0001"
placeholder='请输入经度偏差'
v-model="xOffset_customize">
</el-input-number>
<span style="margin-left:15px"> 纬度偏差</span>
<el-input-number resize="none"
size="small"
:precision="5"
:step="0.0001"
style="width:200px"
placeholder='请输入维度偏差'
v-model="yOffset_customize">
</el-input-number>
</div>
</div> </div>
<span slot="footer" <span slot="footer"
class="dialog-footer"> class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button> <el-button @click="dialogVisible = false"> </el-button>
@ -248,10 +282,16 @@ const vueGis = {
showOffset: false, showOffset: false,
// polygonManullyString: "POLYGON (( 120.33902844 36.10290786, 120.33928218 36.10292997, 120.33956336 36.10316381, 120.34016675 36.10367715, 120.34044913 36.10391476, 120.34045707 36.10392145, 120.34068696 36.10411489, 120.34103181 36.10436285, 120.34117309 36.10441824, 120.34134613 36.10447927, 120.34164715 36.10465122, 120.34124679 36.10507284, 120.34088128 36.10538902, 120.34076198 36.10549222, 120.34053890 36.10520966, 120.34044967 36.10507284, 120.34030632 36.10494761, 120.34019091 36.10484679, 120.33976558 36.10448095, 120.33966658 36.10439980, 120.33947147 36.10425822, 120.33932037 36.10417613, 120.33913002 36.10411307, 120.33895751 36.10406073, 120.33879451 36.10403693, 120.33864104 36.10403158, 120.33864031 36.10395235, 120.33863211 36.10305897, 120.33902175 36.10290728, 120.33902844 36.10290786))", // polygonManullyString: "POLYGON (( 120.33902844 36.10290786, 120.33928218 36.10292997, 120.33956336 36.10316381, 120.34016675 36.10367715, 120.34044913 36.10391476, 120.34045707 36.10392145, 120.34068696 36.10411489, 120.34103181 36.10436285, 120.34117309 36.10441824, 120.34134613 36.10447927, 120.34164715 36.10465122, 120.34124679 36.10507284, 120.34088128 36.10538902, 120.34076198 36.10549222, 120.34053890 36.10520966, 120.34044967 36.10507284, 120.34030632 36.10494761, 120.34019091 36.10484679, 120.33976558 36.10448095, 120.33966658 36.10439980, 120.33947147 36.10425822, 120.33932037 36.10417613, 120.33913002 36.10411307, 120.33895751 36.10406073, 120.33879451 36.10403693, 120.33864104 36.10403158, 120.33864031 36.10395235, 120.33863211 36.10305897, 120.33902175 36.10290728, 120.33902844 36.10290786))",
polygonManullyString: "", polygonManullyString: "",
polygonStringResult: '',
xOffset: 0, xOffset: 0,
yOffset: 0, yOffset: 0,
xOffset_customize: 0,
yOffset_customize: 0,
// xOffset_customize: 0.0051,//
// yOffset_customize: 0.0002,//
longitude: undefined,
latitude: undefined,
} }
}, },
async mounted () { async mounted () {
@ -717,6 +757,17 @@ const vueGis = {
// //
handleManually () { handleManually () {
this.dialogVisible = true this.dialogVisible = true
this.polygonManullyString = ''
this.longitude = undefined
this.latitude = undefined
if (this.selAgency) {
if (this.selAgency.longitude) {
this.longitude = this.selAgency.longitude
}
if (this.selAgency.latitude) {
this.latitude = this.selAgency.latitude
}
}
}, },
// //
@ -725,6 +776,17 @@ const vueGis = {
}, },
handleManuallyOk () { handleManuallyOk () {
if (this.longitude || this.latitude) {
if (!(this.longitude && this.latitude)) {
this.$message({
type: "warning",
message: "请同时填写中心点经纬度,或不填写"
});
return false
}
}
// //
//120.54033616308595,36.53603370922851,120.69620469335939,36.5408402277832,120.63166001562502,36.46771248120117,120.52728989843752,36.458786089599606,120.54033616308595,36.53603370922851 //120.54033616308595,36.53603370922851,120.69620469335939,36.5408402277832,120.63166001562502,36.46771248120117,120.52728989843752,36.458786089599606,120.54033616308595,36.53603370922851
// //
@ -732,20 +794,29 @@ const vueGis = {
// 3°51N53°33N // 3°51N53°33N
const arrayString = this.polygonManullyString const arrayString = this.polygonManullyString
let array = arrayString.split(/[, ]/) let array = arrayString.split(/[, ()]/)
console.log(array) console.log(array)
this.polygonStringResult = '' let polygonStringResult = ''
array.forEach(element => { array.forEach(element => {
let num = Number(element) let num = Number(element)
if (num) { if (num) {
this.polygonStringResult = this.polygonStringResult + element + ',' polygonStringResult = polygonStringResult + element + ','
} }
}); });
this.polygonStringResult = this.polygonStringResult.substring(0, this.polygonStringResult.length - 1) polygonStringResult = polygonStringResult.substring(0, polygonStringResult.length - 1)
if (this.xOffset_customize !== 0 || this.yOffset_customize !== 0) {
this.saveOffset(this.xOffset_customize, this.yOffset_customize, polygonStringResult)
} else {
this.addPolygon(polygonStringResult)
}
this.addPolygon(this.polygonStringResult)
}, },
handleSetOffset () { handleSetOffset () {
@ -753,7 +824,7 @@ const vueGis = {
}, },
handleOffsetOk () { handleOffsetOk () {
let selPolygonString = "" let selPolygonString = ""
let offsetPolygonString = ''//
this.subAgencyArray.forEach(element => { this.subAgencyArray.forEach(element => {
if (element.id === this.selAgencyId && element.coordinates && element.coordinates.length > 0) { if (element.id === this.selAgencyId && element.coordinates && element.coordinates.length > 0) {
selPolygonString = element.coordinates selPolygonString = element.coordinates
@ -761,35 +832,32 @@ const vueGis = {
}); });
if (selPolygonString) { if (selPolygonString) {
let tempArray = selPolygonString.split(',') this.saveOffset(tyhis.xOffset, this.yOffset, selPolygonString)
}
tempArray.forEach((element, index) => {
let aaa = 0
if (index % 2 === 0) {//
aaa = parseFloat(element) + parseFloat(this.xOffset)
} else {
aaa = parseFloat(element) + parseFloat(this.yOffset)
}
if (index % 2 !== 0) {//
} },
offsetPolygonString = offsetPolygonString + aaa + ',' saveOffset (xOffset, yOffset, selPolygonString) {
let offsetPolygonString = ''//
let tempArray = selPolygonString.split(',')
}); tempArray.forEach((element, index) => {
let aaa = 0
offsetPolygonString = offsetPolygonString.substring(0, offsetPolygonString.length - 1) if (index % 2 === 0) {//
} aaa = parseFloat(element) + parseFloat(xOffset)
} else {
aaa = parseFloat(element) + parseFloat(yOffset)
}
if (index % 2 !== 0) {//
}
offsetPolygonString = offsetPolygonString + aaa + ','
console.log('selPolygonString', selPolygonString) });
console.log('offsetPolygonString', offsetPolygonString)
offsetPolygonString = offsetPolygonString.substring(0, offsetPolygonString.length - 1)
this.addPolygon(offsetPolygonString) this.addPolygon(offsetPolygonString)
}, },
handleSetOffset () { handleSetOffset () {
this.handleOffsetCancel = false this.handleOffsetCancel = false
@ -924,7 +992,9 @@ const vueGis = {
let params = { let params = {
orgId: this.selAgency.id, orgId: this.selAgency.id,
level: this.selAgency.level, level: this.selAgency.level,
coordinates: coorString coordinates: coorString,
longitude: this.longitude,
latitude: this.latitude
} }
const { data, code, msg } = await requestPost(url, params) const { data, code, msg } = await requestPost(url, params)
@ -935,6 +1005,7 @@ const vueGis = {
message: "绘制成功" message: "绘制成功"
}); });
if (this.dialogVisible) { if (this.dialogVisible) {
this.polygonManullyString = ''
this.dialogVisible = false this.dialogVisible = false
} }
this.refreshMap(false) this.refreshMap(false)

Loading…
Cancel
Save