Browse Source

Merge branch 'yantai_master' of http://git.elinkit.com.cn:7070/r/epmet-oper-gov into yantai_master

jly/task002
dai 3 years ago
parent
commit
b0c7c0892f
  1. 4
      .env.development
  2. 3
      src/views/modules/base/epidemic/antiInfo.vue
  3. 826
      src/views/modules/communityService/fuwujilu/addForm.vue
  4. 484
      src/views/modules/communityService/fuwujilu/detailForm.vue
  5. 665
      src/views/modules/shequzhili/event/cpts/process-form-demand.vue
  6. 118
      src/views/pages/login.vue

4
.env.development

@ -1,9 +1,9 @@
NODE_ENV=development NODE_ENV=development
VUE_APP_API_SERVER = http://192.168.1.140/api # VUE_APP_API_SERVER = http://192.168.1.140/api
# VUE_APP_API_SERVER = https://epmet-yantai.elinkservice.cn/api # VUE_APP_API_SERVER = https://epmet-yantai.elinkservice.cn/api
# VUE_APP_API_SERVER = https://epmet-test.elinkservice.cn/api # VUE_APP_API_SERVER = https://epmet-test.elinkservice.cn/api
# VUE_APP_API_SERVER = https://epmet-cloud.elinkservice.cn/api VUE_APP_API_SERVER = https://epmet-cloud.elinkservice.cn/api
# VUE_APP_API_SERVER = https://epdc-shibei.elinkservice.cn/api # VUE_APP_API_SERVER = https://epdc-shibei.elinkservice.cn/api
# VUE_APP_API_SERVER = https://epmet-dev.elinkservice.cn:41080/api # VUE_APP_API_SERVER = https://epmet-dev.elinkservice.cn:41080/api
# VUE_APP_API_SERVER = https://epmet-dev.elinkservice.cn/api # VUE_APP_API_SERVER = https://epmet-dev.elinkservice.cn/api

3
src/views/modules/base/epidemic/antiInfo.vue

@ -292,6 +292,7 @@
:close-on-press-escape="false" :close-on-press-escape="false"
:title="formTitle" :title="formTitle"
width="1150px" width="1150px"
:z-index="2000"
top="5vh" top="5vh"
class="dialog-h" class="dialog-h"
@closed="handleCnalceForm"> @closed="handleCnalceForm">
@ -862,7 +863,7 @@ export default {
let params = { let params = {
id id
} }
// this.$message.error('111')
const { data, code, msg } = await requestPost(url, params) const { data, code, msg } = await requestPost(url, params)
if (code === 0) { if (code === 0) {

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

File diff suppressed because it is too large

484
src/views/modules/communityService/fuwujilu/detailForm.vue

@ -1,511 +1,377 @@
<template> <template>
<div> <div>
<div class="dialog-h-content scroll-h"> <div class="dialog-h-content scroll-h">
<div v-if="initLoading" <div v-if="initLoading" class="m-row">
class="m-row">
<div class="m-info"> <div class="m-info">
<div class="info-prop"> <div class="info-prop">
<span class="info-title-2">服务名称</span> <span class="info-title-2">服务名称</span>
<span>{{ formData.serviceName||'--' }}</span> <span>{{ formData.serviceName || "--" }}</span>
</div> </div>
<div class="info-prop"> <div class="info-prop">
<span class="info-title-2">服务组织</span> <span class="info-title-2">服务组织</span>
<span>{{ serviceOrgName||'--' }}</span> <span>{{ serviceOrgName || "--" }}</span>
</div> </div>
<div class="info-prop"> <div class="info-prop">
<span class="info-title-2">服务范围</span> <span class="info-title-2">服务范围</span>
<span>{{ formData.gridIdListName ||'--' }}</span> <span>{{ formData.gridIdListName || "--" }}</span>
</div> </div>
<div class="info-prop"> <div class="info-prop">
<span class="info-title-2">政策依据</span> <span class="info-title-2">政策依据</span>
<span>{{ formData.policyTitle||'--' }}</span> <span>{{ formData.policyTitle || "--" }}</span>
<el-button v-if="formData.policyId" <el-button
style="margin-left: 10px" v-if="formData.policyId"
type="primary" style="margin-left: 10px"
size="small" type="primary"
@click="handlePersonList">预览</el-button> size="small"
@click="handlePersonList"
>预览</el-button
>
</div> </div>
<div class="info-prop"> <div class="info-prop">
<span class="info-title-2">经办人</span> <span class="info-title-2">经办人</span>
<span>{{ formData.principalName||'--' }}</span> <span>{{ formData.principalName || "--" }}</span>
</div> </div>
<div class="info-prop"> <div class="info-prop">
<span class="info-title-2">联系方式</span> <span class="info-title-2">联系方式</span>
<span>{{ formData.principalContact||'--' }}</span> <span>{{ formData.principalContact || "--" }}</span>
</div> </div>
<div class="info-prop"> <div class="info-prop">
<span class="info-title-2">服务时间</span> <span class="info-title-2">服务时间</span>
<span>{{ formData.serviceTimeStart||'--' }}</span> <span>{{ formData.serviceTimeStart || "--" }}</span
<span>{{ formData.serviceTimeEnd||'--' }}</span> >
<span>{{ formData.serviceTimeEnd || "--" }}</span>
</div> </div>
<div class="info-prop"> <div class="info-prop">
<span class="info-title-2">备注</span> <span class="info-title-2">备注</span>
<span>{{ formData.remark||'--' }}</span> <span>{{ formData.remark || "--" }}</span>
</div> </div>
<div v-show="formData.serviceStatus==='completed'"> <div v-show="formData.serviceStatus === 'completed'">
<h3 class="d-h3">反馈内容</h3> <h3 class="d-h3">反馈内容</h3>
<div class="info-prop"> <div class="info-prop">
<span class="info-title-2">服务目标</span> <span class="info-title-2">服务目标</span>
<span>{{ feedbackFormData.serviceGoal||'--' }}</span> <span>{{ feedbackFormData.serviceGoal || "--" }}</span>
</div> </div>
<div class="info-prop"> <div class="info-prop">
<span class="info-title-2">服务效果</span> <span class="info-title-2">服务效果</span>
<span>{{ feedbackFormData.serviceEffect||'--' }}</span> <span>{{ feedbackFormData.serviceEffect || "--" }}</span>
</div> </div>
<div class="info-prop"> <div class="info-prop">
<span class="info-title-2">服务人数</span> <span class="info-title-2">服务人数</span>
<span>{{ feedbackFormData.servicePeopleNumber||0 }}</span> <span>{{ feedbackFormData.servicePeopleNumber || 0 }}</span>
</div> </div>
<div class="info-prop"> <div class="info-prop">
<span class="info-title-2">服务状态</span> <span class="info-title-2">服务状态</span>
<span>{{ feedbackFormData.serviceStatusShow||'--' }}</span> <span>{{ feedbackFormData.serviceStatusShow || "--" }}</span>
</div> </div>
<div class="info-prop"> <div class="info-prop">
<span class="info-title-2">满意度</span> <span class="info-title-2">满意度</span>
<span>{{ feedbackFormData.satisfactionShow||'--' }}</span> <span>{{ feedbackFormData.satisfactionShow || "--" }}</span>
</div> </div>
<div class="info-prop"> <div class="info-prop">
<span class="info-title-2">地理位置</span> <span class="info-title-2">地理位置</span>
<span>{{ feedbackFormData.address||'--' }}</span> <span>{{ feedbackFormData.address || "--" }}</span>
</div> </div>
<div class="info-prop"> <div class="info-prop">
<span class="info-title-2">地图位置</span> <span class="info-title-2">地图位置</span>
<div class="div_map"> <div class="div_map">
<div id="app_detail"></div> <div id="app_detail"></div>
</div> </div>
</div> </div>
<div class="info-prop"> <div class="info-prop">
<span class="info-title-2">附件</span> <span class="info-title-2">附件</span>
<file-list v-if="fileList.length>0" <file-list
:fileList="fileList"></file-list> v-if="fileList.length > 0"
:fileList="fileList"
></file-list>
<span v-else>--</span> <span v-else>--</span>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="div-btn"> <div class="div-btn">
<el-button size="small" <el-button size="small" @click="handleCancle"> </el-button>
@click="handleCancle"> </el-button>
</div> </div>
<el-dialog v-if="showPersonList" <el-dialog
:visible.sync="showPersonList" v-if="showPersonList"
:append-to-body="true" :visible.sync="showPersonList"
:close-on-click-modal="false" :append-to-body="true"
:close-on-press-escape="false" :close-on-click-modal="false"
:title="'政策预览'" :close-on-press-escape="false"
width="1150px" :title="'政策预览'"
top="5vh" width="1150px"
class="dialog-h" top="5vh"
@closed="showPersonList = false"> class="dialog-h"
<person-list ref="ref_detail_form" @closed="showPersonList = false"
:policyId="policyId" >
:ruleList="ruleList" <person-list
@handleOk="handleOk" ref="ref_detail_form"
@handleClose="handleClose"> :policyId="policyId"
:ruleList="ruleList"
@handleOk="handleOk"
@handleClose="handleClose"
>
</person-list> </person-list>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { mapGetters } from 'vuex' import { mapGetters } from "vuex";
import { Loading } from 'element-ui' // Loading import { Loading } from "element-ui"; // Loading
import { requestPost } from '@/js/dai/request' import { requestPost } from "@/js/dai/request";
import personList from "../policy/personList"; import personList from "../policy/personList";
import fileList from '@/views/components/fileList' import fileList from "@/views/components/fileList";
import daiMap from "@/utils/dai-map";
var map;
let loading; //
var map
var search
var markers
var infoWindowList
var geocoder //
let loading //
export default { export default {
data () { data() {
return { return {
initLoading: false, initLoading: false,
keyWords: '', keyWords: "",
formData: {}, formData: {},
feedbackFormData: { feedbackFormData: {
serviceProjectId: '',// id serviceProjectId: "", // id
serviceName: '', serviceName: "",
serviceGoal: '',// serviceGoal: "", //
serviceEffect: '',// serviceEffect: "", //
servicePeopleNumber: null,// servicePeopleNumber: null, //
serviceStatus: 'completed',// in_servicecompleted: serviceStatus: "completed", // in_servicecompleted:
satisfaction: '',//:bad:good:perfect satisfaction: "", //:bad:good:perfect
longitude: '',// longitude: "", //
latitude: '',// latitude: "", //
address: '', address: "",
fileList: [],// fileList: [], //
}, },
policyId: "", policyId: "",
showPersonList: false, showPersonList: false,
ruleList: [], ruleList: [],
policyList: [], policyList: [],
};
}
}, },
components: { personList, fileList }, components: { personList, fileList },
async mounted () { async mounted() {
await this.getPolicyList() await this.getPolicyList();
// if (this.serviceRecordId) {// // if (this.serviceRecordId) {//
await this.loadInfo() await this.loadInfo();
this.initLoading = true this.initLoading = true;
if (this.formData.serviceStatus === 'completed') { if (
this.formData.serviceStatus === "completed" &&
this.feedbackFormData.latitude
) {
this.$nextTick(() => { this.$nextTick(() => {
this.initMap() this.initMap();
}) });
} }
}, },
methods: { methods: {
diaDestroy() {},
diaDestroy () {
if (map) {
map.destroy()
}
},
// //
async handlePersonList () { async handlePersonList() {
if (!this.formData.policyId) { if (!this.formData.policyId) {
this.$message.info('请先选择政策') this.$message.info("请先选择政策");
return false return false;
} }
this.policyId = this.formData.policyId this.policyId = this.formData.policyId;
await this.loadRuleList() await this.loadRuleList();
this.showPersonList = true; this.showPersonList = true;
}, },
async loadRuleList () { async loadRuleList() {
const url = "/heart/policy/rulelist/" + this.policyId;
const url = "/heart/policy/rulelist/" + this.policyId let params = {};
let params = {} const { data, code, msg } = await requestPost(url, params);
const { data, code, msg } = await requestPost(url, params)
if (code === 0) { if (code === 0) {
this.ruleList = data this.ruleList = data;
} else { } else {
this.$message.error(msg) this.$message.error(msg);
} }
}, },
handleClose () { handleClose() {
this.showPersonList = false this.showPersonList = false;
}, },
async getPolicyList() {
const url = "/heart/policy/policyListSelect";
async getPolicyList () { let params = {};
const url = '/heart/policy/policyListSelect'
let params = {}
const { data, code, msg } = await requestPost(url, params) const { data, code, msg } = await requestPost(url, params);
if (code === 0) { if (code === 0) {
this.policyList = data this.policyList = data;
} else { } else {
this.$message.error(msg) this.$message.error(msg);
} }
}, },
// //
async loadInfo () { async loadInfo() {
const url = '/heart/icServiceRecordV2/detail' const url = "/heart/icServiceRecordV2/detail";
let params = { let params = {
serviceRecordId: this.serviceRecordId serviceRecordId: this.serviceRecordId,
} };
const { data, code, msg } = await requestPost(url, params) const { data, code, msg } = await requestPost(url, params);
if (code === 0) { if (code === 0) {
this.formData = { ...data } this.formData = { ...data };
this.formData.serviceRecordId = this.serviceRecordId this.formData.serviceRecordId = this.serviceRecordId;
this.feedbackFormData = { ...data.feedback } this.feedbackFormData = { ...data.feedback };
this.formData.policyName = '' this.formData.policyName = "";
this.formData.gridIdListName = '' this.formData.gridIdListName = "";
this.feedbackFormData.serviceStatusShow = '' this.feedbackFormData.serviceStatusShow = "";
this.feedbackFormData.satisfactionShow = '' this.feedbackFormData.satisfactionShow = "";
let arr = [] let arr = [];
this.formData.gridIdList.forEach(element => { this.formData.gridIdList.forEach((element) => {
arr.push(element.objectName) arr.push(element.objectName);
}); });
this.formData.gridIdListName = arr.join(',') this.formData.gridIdListName = arr.join(",");
this.statusArray.forEach(element => { this.statusArray.forEach((element) => {
if (this.formData.serviceStatus === element.value) { if (this.formData.serviceStatus === element.value) {
this.feedbackFormData.serviceStatusShow = element.label this.feedbackFormData.serviceStatusShow = element.label;
} }
}); });
this.satisfyArray.forEach(element => { this.satisfyArray.forEach((element) => {
if (this.feedbackFormData.satisfaction === element.value) { if (this.feedbackFormData.satisfaction === element.value) {
this.feedbackFormData.satisfactionShow = element.label this.feedbackFormData.satisfactionShow = element.label;
} }
}); });
this.policyList.forEach(element => { this.policyList.forEach((element) => {
if (this.formData.policyId === element.policyId) { if (this.formData.policyId === element.policyId) {
this.formData.policyName = element.title this.formData.policyName = element.title;
} }
}); });
this.fileList = [] this.fileList = [];
if (data.feedback && data.feedback.fileList && data.feedback.fileList.length > 0) { if (
data.feedback.fileList.forEach(element => { data.feedback &&
data.feedback.fileList &&
data.feedback.fileList.length > 0
) {
data.feedback.fileList.forEach((element) => {
let obj = { let obj = {
name: element.name, name: element.name,
format: element.format, format: element.format,
url: element.url, url: element.url,
type: element.type type: element.type,
};
} this.fileList.push(obj);
this.fileList.push(obj)
}); });
} }
} else { } else {
this.$message.error(msg) this.$message.error(msg);
} }
}, },
handleCancle() {
this.resetData();
handleCancle () { this.$emit("diaDetailClose");
this.resetData()
this.$emit('diaDetailClose')
}, },
// init // init
initMap () { initMap() {
// let { latitude, longitude } = this.feedbackFormData;
let { latitude, longitude } = this.$store.state.user;
console.log('lat' + latitude + ',lon' + longitude)
if (this.formData.latitude && this.formData.longitude) {
latitude = this.formData.latitude
longitude = this.formData.longitude
}
if (!latitude || latitude == "" || latitude == "0") {
latitude = 39.9088810666821;
longitude = 116.39743841556731;
}
var center = new window.TMap.LatLng(latitude, latitude)
// map TMap.Map()
map = new window.TMap.Map(document.getElementById('app_detail'), {
center: center, //
zoom: 17.2, //
pitch: 43.5, //
rotation: 45 //
})
search = new window.TMap.service.Search({ pageSize: 10 })
//
markers = new TMap.MultiMarker({
map: map,
geometries: []
})
infoWindowList = Array(10)
geocoder = new TMap.service.Geocoder(); //
//
map.on('panend', () => {
this.handleMoveCenter()
})
this.handleMoveCenter()
this.convert()
},
setMarker (lat, lng) { map = new daiMap(
markers.setGeometries([]) document.getElementById("app_detail"),
markers.add([ { latitude, longitude },
{ {
id: '4', zoom: 16.2, //
styleId: 'marker', pitch: 43.5, //
position: new TMap.LatLng(lat, lng), rotation: 45, //
properties: {
title: 'marker4'
}
} }
]) );
},
handleSearchMap () { map.setCenter(latitude, longitude);
infoWindowList.forEach((infoWindow) => { map.setMarker(latitude, longitude);
infoWindow.close()
})
infoWindowList.length = 0
markers.setGeometries([])
//
search
.searchRectangle({
keyword: this.keyWords,
bounds: map.getBounds()
})
.then((result) => {
let { data } = result
if (Array.isArray(data) && data.length > 0) {
const {
location: { lat, lng }
} = data[0]
map.setCenter(new TMap.LatLng(lat, lng))
this.setMarker(lat, lng)
this.formData.latitude = lat
this.formData.longitude = lng
this.convert()
} else {
this.$message.error('未检索到相关位置坐标')
}
})
},
handleMoveCenter () {
//
const center = map.getCenter()
const lat = center.getLat()
const lng = center.getLng()
this.formData.latitude = lat
this.formData.longitude = lng
this.setMarker(lat, lng)
this.convert(lat, lng)
}, },
convert (lat, lng) { handleOk() {
markers.setGeometries([]); this.showPersonList = false;
// var input = document.getElementById('location').value.split(',');
let location
if (lat && lng) {
location = new TMap.LatLng(lat, lng);
} else {
location = new TMap.LatLng(this.formData.latitude, this.formData.longitude);
}
// map.setCenter(location);
markers.updateGeometries([
{
id: 'main', //
position: location,
},
]);
geocoder
.getAddress({ location: location }) //
.then((result) => {
this.formData.address = result.result.address
//
});
},
handleOk () {
this.showPersonList = false
}, },
resetData () { resetData() {
this.formData = {} this.formData = {};
}, },
// //
startLoading () { startLoading() {
loading = Loading.service({ loading = Loading.service({
lock: true, // lock: true, //
text: '正在加载……', // text: "正在加载……", //
background: 'rgba(0,0,0,.7)' // background: "rgba(0,0,0,.7)", //
}) });
}, },
// //
endLoading () { endLoading() {
// clearTimeout(timer); // clearTimeout(timer);
if (loading) { if (loading) {
loading.close() loading.close();
} }
} },
}, },
computed: { computed: {
dataRule () { dataRule() {
return { return {
serviceTimeStart: [ serviceTimeStart: [
{ required: true, message: '服务时间不能为空', trigger: 'blur' } { required: true, message: "服务时间不能为空", trigger: "blur" },
], ],
};
}
}, },
}, },
props: { props: {
serviceRecordId: { serviceRecordId: {
type: String, type: String,
required: true required: true,
}, },
serviceOrgName: { serviceOrgName: {
type: String, type: String,
required: true required: true,
}, },
satisfyArray: { satisfyArray: {
type: Array, type: Array,
default () { default() {
return [] return [];
} },
}, },
statusArray: { statusArray: {
type: Array, type: Array,
default () { default() {
return [] return [];
} },
}, },
} },
} };
</script> </script>
<style lang="scss" scoped>
<style lang="scss" scoped >
@import "@/assets/scss/modules/management/detail-main.scss"; @import "@/assets/scss/modules/management/detail-main.scss";
</style> </style>

665
src/views/modules/shequzhili/event/cpts/process-form-demand.vue

@ -1,10 +1,12 @@
<template> <template>
<div class=""> <div class="">
<el-form ref="ref_form" <el-form
:inline="false" ref="ref_form"
:model="formData" :inline="false"
:rules="dataRule" :model="formData"
label-width="100px"> :rules="dataRule"
label-width="100px"
>
<!-- <el-form-item label="事件分类" <!-- <el-form-item label="事件分类"
label-width="150px" label-width="150px"
prop="categoryId"> prop="categoryId">
@ -17,105 +19,124 @@
:show-all-levels="false" :show-all-levels="false"
@change="handleChangeCate"></el-cascader> @change="handleChangeCate"></el-cascader>
</el-form-item> --> </el-form-item> -->
<el-form-item label="服务内容" <el-form-item
label-width="150px" label="服务内容"
:class="{'form-item':source==='visiual'}" label-width="150px"
prop="content"> :class="{ 'form-item': source === 'visiual' }"
<div :class="{'visiual-form':source==='visiual'}"> prop="content"
<el-input v-model="formData.content" >
:autosize="{ minRows: 2, maxRows: 10 }" <div :class="{ 'visiual-form': source === 'visiual' }">
type="textarea" <el-input
clearable v-model="formData.content"
class="cell-width-area" :autosize="{ minRows: 2, maxRows: 10 }"
placeholder="请输入内容"></el-input> type="textarea"
clearable
class="cell-width-area"
placeholder="请输入内容"
></el-input>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="服务类型" <el-form-item
label-width="150px" label="服务类型"
:class="{'form-item':source==='visiual'}" label-width="150px"
prop="categoryCode"> :class="{ 'form-item': source === 'visiual' }"
<div :class="{'visiual-form':source==='visiual'}"> prop="categoryCode"
>
<el-cascader v-model="formData.categoryCode" <div :class="{ 'visiual-form': source === 'visiual' }">
:options="demandOptions" <el-cascader
clearable v-model="formData.categoryCode"
class="cell-width-1" :options="demandOptions"
@change="handleCateSlect"></el-cascader> clearable
class="cell-width-1"
@change="handleCateSlect"
></el-cascader>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="服务时间" <el-form-item
label-width="150px" label="服务时间"
:class="{'form-item':source==='visiual'}" label-width="150px"
prop="wantServiceTime"> :class="{ 'form-item': source === 'visiual' }"
<div :class="{'visiual-form':source==='visiual'}"> prop="wantServiceTime"
<el-date-picker v-model="formData.wantServiceTime" >
type="datetime" <div :class="{ 'visiual-form': source === 'visiual' }">
class="cell-width-1" <el-date-picker
clearable v-model="formData.wantServiceTime"
value-format="yyyy-MM-dd HH:mm:ss" type="datetime"
placeholder="选择日期时间"> class="cell-width-1"
clearable
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择日期时间"
>
</el-date-picker> </el-date-picker>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="需求人" <el-form-item
label-width="150px" label="需求人"
:class="{'form-item':source==='visiual'}" label-width="150px"
prop="demandUserName"> :class="{ 'form-item': source === 'visiual' }"
<div :class="{'visiual-form':source==='visiual'}"> prop="demandUserName"
<el-input v-model="formData.demandUserName" >
class="cell-width-1"></el-input> <div :class="{ 'visiual-form': source === 'visiual' }">
<el-input
v-model="formData.demandUserName"
class="cell-width-1"
></el-input>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="联系电话" <el-form-item
label-width="150px" label="联系电话"
:class="{'form-item':source==='visiual'}" label-width="150px"
prop="demandUserMobile"> :class="{ 'form-item': source === 'visiual' }"
<div :class="{'visiual-form':source==='visiual'}"> prop="demandUserMobile"
<el-input v-model="formData.demandUserMobile" >
class="cell-width-1"></el-input> <div :class="{ 'visiual-form': source === 'visiual' }">
<el-input
v-model="formData.demandUserMobile"
class="cell-width-1"
></el-input>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="服务地点" <el-form-item
prop="serviceLocation" label="服务地点"
:class="{'form-item':source==='visiual'}" prop="serviceLocation"
label-width="150px" :class="{ 'form-item': source === 'visiual' }"
style="display: block"> label-width="150px"
style="display: block"
<div :class="{'visiual-form':source==='visiual'}"> >
<el-input class="cell-width-1" <div :class="{ 'visiual-form': source === 'visiual' }">
v-model="formData.serviceLocation"> <el-input class="cell-width-1" v-model="formData.serviceLocation">
</el-input> </el-input>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="位置坐标" <el-form-item
:class="{'form-item':source==='visiual'}" label="位置坐标"
prop="longitude" :class="{ 'form-item': source === 'visiual' }"
label-width="150px" prop="longitude"
style="display: block"> label-width="150px"
<div style="width:500px"> style="display: block"
>
<div style="width: 500px">
<div class="div_map"> <div class="div_map">
<div id="app_map"> <div id="app_map"></div>
</div>
<div class="div_searchmap"> <div class="div_searchmap">
<el-input class="cell-width-map" <el-input
maxlength="50" class="cell-width-map"
size="mini" maxlength="50"
placeholder="请输入关键字" size="mini"
v-model="keyWords"> placeholder="请输入关键字"
v-model="keyWords"
>
</el-input> </el-input>
<el-button style="margin-left: 10px" <el-button
type="primary" style="margin-left: 10px"
size="mini" type="primary"
@click="handleSearchMap">查询</el-button> size="mini"
@click="handleSearchMap"
>查询</el-button
>
</div> </div>
</div> </div>
@ -136,103 +157,108 @@
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="门牌号" <el-form-item
:class="{'form-item':source==='visiual'}" label="门牌号"
label-width="150px" :class="{ 'form-item': source === 'visiual' }"
prop="locationDetail"> label-width="150px"
<div :class="{'visiual-form':source==='visiual'}"> prop="locationDetail"
<el-input v-model="formData.locationDetail" >
class="cell-width-1"></el-input> <div :class="{ 'visiual-form': source === 'visiual' }">
<el-input
v-model="formData.locationDetail"
class="cell-width-1"
></el-input>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="服务方" <el-form-item
:class="{'form-item':source==='visiual'}" label="服务方"
label-width="150px" :class="{ 'form-item': source === 'visiual' }"
prop="serverId"> label-width="150px"
prop="serverId"
>
<template> <template>
<div :class="[{'single-select':source==='visiual'},'sel-service']"> <div
<el-select v-model="formData.serviceType" :class="[{ 'single-select': source === 'visiual' }, 'sel-service']"
class="cell-width-1" >
placeholder="请选择" <el-select
clearable v-model="formData.serviceType"
@change="handleServiceChange('add', $event)"> class="cell-width-1"
<el-option v-for="item in serviceOptions" placeholder="请选择"
:key="item.value" clearable
:label="item.label" @change="handleServiceChange('add', $event)"
:value="item.value"> >
<el-option
v-for="item in serviceOptions"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option> </el-option>
</el-select> </el-select>
- -
<el-select v-model="formData.serverId" <el-select
class="cell-width-1" v-model="formData.serverId"
filterable class="cell-width-1"
placeholder="请选择" filterable
clearable> placeholder="请选择"
<el-option v-for="item in serviceOptiondList" clearable
:key="item.value" >
:label="item.label" <el-option
:value="item.value"> v-for="item in serviceOptiondList"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option> </el-option>
</el-select> </el-select>
</div> </div>
</template> </template>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
</template> </template>
<script> <script>
import { Loading } from "element-ui"; // Loading import { Loading } from "element-ui"; // Loading
import { requestPost } from "@/js/dai/request"; import { requestPost } from "@/js/dai/request";
import formVltHelper from "dai-js/tools/formVltHelper"; import daiMap from "@/utils/dai-map";
import { isCard } from "@/utils/validate";
let loading; // let loading; //
var map var map;
var search
var markers
var infoWindowList
var geocoder //
function iniFmData () { function iniFmData() {
return { return {
operationType: '2',//[0: 1: 2:] operationType: "2", //[0: 1: 2:]
icEventId: '',//Id icEventId: "", //Id
gridId: '',// gridId: "", //
categoryCode: '',// categoryCode: "", //
parentCode: '',// parentCode: "", //
content: '',// 1000 content: "", // 1000
reportType: 'self_help',// communitybuilding_caption;party;self_help reportType: "self_help", // communitybuilding_caption;party;self_help
reportUserName: '',// reportUserName: "", //
reportUserMobile: '',// reportUserMobile: "", //
reportTime: '',// reportTime: "", //
demandUserId: '',// user.idic_resi_user.id demandUserId: "", // user.idic_resi_user.id
demandUserName: '',// demandUserName: "", //
demandUserMobile: '',// demandUserMobile: "", //
wantServiceTime: '',// wantServiceTime: "", //
serviceType: '', serviceType: "",
serverId: '', serverId: "",
locationDetail: '', locationDetail: "",
serviceLocation: '',// serviceLocation: "", //
latitude: '',// latitude: "", //
longitude: '',// longitude: "", //
// categoryId: '' // categoryId: ''
}; };
} }
export default { export default {
data () { data() {
return { return {
btnDisable: false, btnDisable: false,
customerId: localStorage.getItem("customerId"), customerId: localStorage.getItem("customerId"),
demandOptions: [], demandOptions: [],
serviceOptions: [ serviceOptions: [],
],
serviceOptiondList: [], serviceOptiondList: [],
casOptions: [], casOptions: [],
@ -241,25 +267,25 @@ export default {
selCateObj: {}, selCateObj: {},
optionProps: { optionProps: {
multiple: false, multiple: false,
value: 'id', value: "id",
label: 'name', label: "name",
children: 'subCategory', children: "subCategory",
}, },
formData: iniFmData(), formData: iniFmData(),
okflag: false, okflag: false,
// //
keyWords: '', keyWords: "",
eventDetailCopy: {} eventDetailCopy: {},
}; };
}, },
components: {}, components: {},
computed: {
dataRule () {
computed: {
dataRule() {
return { return {
// categoryId: [ // categoryId: [
// { required: true, message: "", trigger: "blur" }, // { required: true, message: "", trigger: "blur" },
@ -285,14 +311,11 @@ export default {
serverId: [ serverId: [
{ required: true, message: "服务方不能为空", trigger: "blur" }, { required: true, message: "服务方不能为空", trigger: "blur" },
], ],
}; };
}, },
}, },
props: {
props: {
demandUserId: { demandUserId: {
type: String, type: String,
default: "", default: "",
@ -312,156 +335,142 @@ export default {
eventDetailData: { eventDetailData: {
type: Object, type: Object,
default () { default() {
return {} return {};
} },
}, },
source: {//manage visiual source: {
//manage visiual
type: String, type: String,
default: 'manage' default: "manage",
} },
}, },
watch: { watch: {
demandUserName: function (val) { demandUserName: function (val) {
this.formData.reportUserName = val;
this.formData.reportUserName = val this.formData.demandUserName = val;
this.formData.demandUserName = val
}, },
demandUserMobile: function (val) { demandUserMobile: function (val) {
this.formData.reportUserMobile = val;
this.formData.reportUserMobile = val this.formData.demandUserMobile = val;
this.formData.demandUserMobile = val
}, },
demandUserId: function (val) { demandUserId: function (val) {
this.formData.demandUserId = val;
this.formData.demandUserId = val
}, },
}, },
created () {
}, async mounted() {
const { user } = this.$store.state;
async mounted () { this.agencyId = user.agencyId;
const { user } = this.$store.state
this.agencyId = user.agencyId
this.getCategoryList();
this.getDemandOptions();
this.getServiceOption()
// this.formData = { ...this.formDataTemp }
this.initMap()
if (this.eventId) { if (this.eventId) {
this.eventDetailCopy = JSON.parse(JSON.stringify(this.eventDetailData)); this.eventDetailCopy = JSON.parse(JSON.stringify(this.eventDetailData));
this.formData.reportUserMobile = this.eventDetailCopy.mobile this.formData.reportUserMobile = this.eventDetailCopy.mobile;
this.formData.reportUserName = this.eventDetailCopy.name this.formData.reportUserName = this.eventDetailCopy.name;
this.formData.reportTime = this.eventDetailCopy.happenTime this.formData.reportTime = this.eventDetailCopy.happenTime;
this.formData.gridId = this.eventDetailCopy.gridId this.formData.gridId = this.eventDetailCopy.gridId;
this.formData.demandUserId = this.eventDetailCopy.reportUserId this.formData.demandUserId = this.eventDetailCopy.reportUserId;
this.formData.demandUserName = this.eventDetailCopy.name this.formData.demandUserName = this.eventDetailCopy.name;
this.formData.demandUserMobile = this.eventDetailCopy.mobile this.formData.demandUserMobile = this.eventDetailCopy.mobile;
if (this.eventDetailCopy.parentCategoryId && this.eventDetailCopy.categoryId) { if (
this.eventDetailCopy.parentCategoryId &&
this.eventDetailCopy.categoryId
) {
// this.selCategoryArray = [] // this.selCategoryArray = []
// this.selCategoryArray.push(this.eventDetailCopy.parentCategoryId) // this.selCategoryArray.push(this.eventDetailCopy.parentCategoryId)
// this.selCategoryArray.push(this.eventDetailCopy.categoryId) // this.selCategoryArray.push(this.eventDetailCopy.categoryId)
// this.formData.categoryId = this.eventDetailCopy.categoryId // this.formData.categoryId = this.eventDetailCopy.categoryId
// this.selCateObj = { // this.selCateObj = {
// name: this.eventDetailCopy.categoryName, // name: this.eventDetailCopy.categoryName,
// id: this.eventDetailCopy.categoryId // id: this.eventDetailCopy.categoryId
// } // }
} }
} else { } else {
this.formData.demandUserName = this.demandUserName this.formData.demandUserName = this.demandUserName;
this.formData.demandUserMobile = this.demandUserMobile this.formData.demandUserMobile = this.demandUserMobile;
this.formData.demandUserId = this.demandUserId this.formData.demandUserId = this.demandUserId;
} }
this.getCategoryList();
this.getDemandOptions();
this.getServiceOption();
this.initMap();
}, },
methods: { methods: {
async getCategoryList() {
const url = "/gov/issue/issueprojectcategorydict/list";
async getCategoryList () { let params = {};
const url = "/gov/issue/issueprojectcategorydict/list"
let params = {} const { data, code, msg } = await requestPost(url, params);
const { data, code, msg } = await requestPost(url, params)
if (code === 0) { if (code === 0) {
let treeDataNew = this.filterTree(data);
let treeDataNew = this.filterTree(data)
// //
++this.iscascaderShow ++this.iscascaderShow;
this.casOptions = [] this.casOptions = [];
this.casOptions = treeDataNew
this.casOptions = treeDataNew;
} else { } else {
this.$message.error(msg) this.$message.error(msg);
} }
}, },
handleChangeCate () { handleChangeCate() {
console.log(this.$refs["myCascader"].getCheckedNodes()[0].data) console.log(this.$refs["myCascader"].getCheckedNodes()[0].data);
this.selCateObj = this.$refs["myCascader"].getCheckedNodes()[0].data this.selCateObj = this.$refs["myCascader"].getCheckedNodes()[0].data;
this.formData.categoryId = this.selCateObj.id this.formData.categoryId = this.selCateObj.id;
}, },
// //
filterTree (arr) { filterTree(arr) {
let childs = arr let childs = arr;
for (let i = childs.length; i--; i > 0) { for (let i = childs.length; i--; i > 0) {
if (childs[i].subCategory) { if (childs[i].subCategory) {
if (childs[i].subCategory.length) { if (childs[i].subCategory.length) {
this.filterTree(childs[i].subCategory) this.filterTree(childs[i].subCategory);
} else { } else {
delete childs[i].subCategory delete childs[i].subCategory;
} }
} }
} }
return arr return arr;
}, },
async getDemandOptions () { async getDemandOptions() {
const url = "/heart/icresidemanddict/demandoption" const url = "/heart/icresidemanddict/demandoption";
let params = {} let params = {};
const { data, code, msg } = await requestPost(url, params) const { data, code, msg } = await requestPost(url, params);
if (code === 0) { if (code === 0) {
this.demandOptions = this.getFlagData( this.demandOptions = this.getFlagData(
this.getTreeData(data), this.getTreeData(data),
"usableFlag" "usableFlag"
); );
} else { } else {
this.$message.error(msg) this.$message.error(msg);
} }
}, },
async getServiceOption () { async getServiceOption() {
const url = "/sys/dict/data/dictlist" const url = "/sys/dict/data/dictlist";
let params = { dictType: "user_demand_service_type", } let params = { dictType: "user_demand_service_type" };
const { data, code, msg } = await requestPost(url, params) const { data, code, msg } = await requestPost(url, params);
if (code === 0) { if (code === 0) {
this.serviceOptions = data; this.serviceOptions = data;
} else { } else {
this.$message.error(msg) this.$message.error(msg);
} }
}, },
getTreeData (data) { getTreeData(data) {
if (!Array.isArray(data)) return []; if (!Array.isArray(data)) return [];
let arr = data.map((item) => { let arr = data.map((item) => {
let _item = {}; let _item = {};
@ -476,7 +485,8 @@ export default {
}); });
return arr; return arr;
}, },
getFlagData (data, flag) {
getFlagData(data, flag) {
if (!Array.isArray(data)) return []; if (!Array.isArray(data)) return [];
let arr1 = data.filter((item) => item[flag]); let arr1 = data.filter((item) => item[flag]);
let arr2 = arr1.map((item) => { let arr2 = arr1.map((item) => {
@ -488,7 +498,7 @@ export default {
return arr2; return arr2;
}, },
handleCateSlect (val) { handleCateSlect(val) {
console.log("val", val); console.log("val", val);
if (val.length === 1) { if (val.length === 1) {
this.demandOptions.forEach((item) => { this.demandOptions.forEach((item) => {
@ -501,7 +511,7 @@ export default {
} }
}, },
handleServiceChange (type, val) { handleServiceChange(type, val) {
if (val === "social_org") { if (val === "social_org") {
if (type === "add") { if (type === "add") {
this.getServiceuserList(val, "add_demand"); this.getServiceuserList(val, "add_demand");
@ -513,8 +523,7 @@ export default {
} }
}, },
async getServiceuserList (serviceType, query) { async getServiceuserList(serviceType, query) {
if (!serviceType) return false; if (!serviceType) return false;
const { demandUserId } = this.formData; const { demandUserId } = this.formData;
const params = { const params = {
@ -523,154 +532,83 @@ export default {
queryPurpose: query, queryPurpose: query,
}; };
const url = "/heart/userdemand/servicelist";
const url = "/heart/userdemand/servicelist" const { data, code, msg } = await requestPost(url, params);
const { data, code, msg } = await requestPost(url, params)
if (code === 0) { if (code === 0) {
this.serviceOptiondList = data.filter( this.serviceOptiondList = data.filter(
(item) => item.value != demandUserId (item) => item.value != demandUserId
); );
} else { } else {
this.$message.error(msg) this.$message.error(msg);
} }
}, },
async getDemandInfo () { async getDemandInfo() {
this.okflag = false this.okflag = false;
this.$refs["ref_form"].validate((valid, messageObj) => { this.$refs["ref_form"].validate((valid, messageObj) => {
if (!valid) { if (!valid) {
app.util.validateRule(messageObj); app.util.validateRule(messageObj);
// this.formData.categoryId = this.selCateObj.id // this.formData.categoryId = this.selCateObj.id
} else { } else {
this.okflag = true;
this.okflag = true
} }
}); });
}, },
resetData() {},
resetData () {
},
// init // init
initMap () { initMap() {
// let { latitude, longitude } = this.$store.state.user;
var center = new window.TMap.LatLng(36.0722275, 120.38945519)
// map TMap.Map()
map = new window.TMap.Map(document.getElementById('app_map'), {
center: center, //
zoom: 17.2, //
pitch: 43.5, //
rotation: 45 //
})
search = new window.TMap.service.Search({ pageSize: 10 })
//
markers = new TMap.MultiMarker({
map: map,
geometries: []
})
infoWindowList = Array(10)
geocoder = new TMap.service.Geocoder(); //
//
map.on('panend', () => {
this.handleMoveCenter()
})
this.handleMoveCenter()
this.convert()
},
setMarker (lat, lng) { map = new daiMap(
markers.setGeometries([]) document.getElementById("app_map"),
markers.add([ { latitude, longitude },
{ {
id: '4', zoom: 16.2, //
styleId: 'marker', pitch: 43.5, //
position: new TMap.LatLng(lat, lng), rotation: 45, //
properties: {
title: 'marker4'
}
} }
]) );
},
handleSearchMap () { //
infoWindowList.forEach((infoWindow) => { map.on("dragend", (e) => {
infoWindow.close() this.handleMoveCenter(e);
}) });
infoWindowList.length = 0
markers.setGeometries([]) map.setCenter(latitude, longitude);
// map.setMarker(latitude, longitude);
search
.searchRectangle({
keyword: this.keyWords,
bounds: map.getBounds()
})
.then((result) => {
let { data } = result
if (Array.isArray(data) && data.length > 0) {
const {
location: { lat, lng }
} = data[0]
map.setCenter(new TMap.LatLng(lat, lng))
this.setMarker(lat, lng)
this.formData.latitude = lat
this.formData.longitude = lng
this.convert()
} else {
this.$message.error('未检索到相关位置坐标')
}
})
}, },
handleMoveCenter () { async handleMoveCenter() {
// //
const center = map.getCenter() const { lat, lng } = map.getCenter();
const lat = center.getLat() this.formData.latitude = lat;
const lng = center.getLng() this.formData.longitude = lng;
this.formData.latitude = lat map.setMarker(lat, lng);
this.formData.longitude = lng
this.setMarker(lat, lng) let { msg, data } = await map.getAddress(lat, lng);
this.convert(lat, lng) if (msg == "success") {
this.formData.address = data.address;
}
}, },
convert (lat, lng) { async handleSearchMap() {
markers.setGeometries([]); const { msg, data } = await map.searchNearby(this.keyWords);
// var input = document.getElementById('location').value.split(','); if (msg == "success") {
let location const { lat, lng } = data;
if (lat && lng) { map.setCenter(lat, lng);
location = new TMap.LatLng(lat, lng); map.setMarker(lat, lng);
this.formData.latitude = lat;
this.formData.longitude = lng;
} else { } else {
location = new TMap.LatLng(this.formData.latitude, this.formData.longitude); this.$message.error("未检索到相关位置坐标");
} }
// map.setCenter(location);
markers.updateGeometries([
{
id: 'main', //
position: location,
},
]);
geocoder
.getAddress({ location: location }) //
.then((result) => {
this.formData.serviceLocation = result.result.address
//
});
}, },
// //
startLoading () { startLoading() {
loading = Loading.service({ loading = Loading.service({
lock: true, // lock: true, //
text: "正在加载……", // text: "正在加载……", //
@ -678,7 +616,7 @@ export default {
}); });
}, },
// //
endLoading () { endLoading() {
// clearTimeout(timer); // clearTimeout(timer);
if (loading) { if (loading) {
loading.close(); loading.close();
@ -688,14 +626,11 @@ export default {
}; };
</script> </script>
<style lang='scss' scoped> <style lang="scss" scoped>
@import "@/assets/scss/modules/visual/a_customize.scss"; @import "@/assets/scss/modules/visual/a_customize.scss";
@import "@/assets/scss/modules/shequzhili/event-info.scss"; @import "@/assets/scss/modules/shequzhili/event-info.scss";
</style> </style>
<style> <style>
.el-dialog__body { .el-dialog__body {
padding: 0 10px 20px !important; padding: 0 10px 20px !important;

118
src/views/pages/login.vue

@ -1,57 +1,57 @@
<template> <template>
<div class="g-app"> <div class="g-app">
<div class="g-bd" v-if="isShowLogin || true"> <div class="g-bd"
v-if="isShowLogin || true">
<div class="m-fm"> <div class="m-fm">
<div class="wrap"> <div class="wrap">
<h2 class="title">{{ $t("brand.work") }}</h2> <h2 class="title">{{ $t("brand.work") }}</h2>
<div class="fm"> <div class="fm">
<el-form <el-form :model="dataForm"
:model="dataForm" :rules="dataRule"
:rules="dataRule" ref="dataForm"
ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()"
@keyup.enter.native="dataFormSubmitHandle()" status-icon>
status-icon
>
<div class="fm-item"> <div class="fm-item">
<div class="ico"> <div class="ico">
<img src="@/assets/img/login/zhanghao.png" alt="" /> <img src="@/assets/img/login/zhanghao.png"
alt="" />
</div> </div>
<el-form-item prop="phone" class="input"> <el-form-item prop="phone"
<input class="input">
type="text" <input type="text"
v-model="dataForm.phone" v-model="dataForm.phone"
placeholder="账号" placeholder="账号" />
/>
</el-form-item> </el-form-item>
</div> </div>
<div class="fm-item"> <div class="fm-item">
<div class="ico"> <div class="ico">
<img src="@/assets/img/login/mima.png" alt="" /> <img src="@/assets/img/login/mima.png"
alt="" />
</div> </div>
<el-form-item prop="password" class="input"> <el-form-item prop="password"
<input class="input">
type="password" <input type="password"
v-model="dataForm.password" v-model="dataForm.password"
:placeholder="$t('login.password')" :placeholder="$t('login.password')" />
/>
</el-form-item> </el-form-item>
</div> </div>
<div class="fm-captcha"> <div class="fm-captcha">
<div class="fm-item"> <div class="fm-item">
<el-form-item prop="captcha" class="input"> <el-form-item prop="captcha"
<input class="input">
type="text" <input type="text"
v-model="dataForm.captcha" v-model="dataForm.captcha"
placeholder="验证码" placeholder="验证码" />
/>
</el-form-item> </el-form-item>
</div> </div>
<div class="captcha"> <div class="captcha">
<img :src="captchaPath" @click="getCaptcha()" /> <img :src="captchaPath"
@click="getCaptcha()" />
</div> </div>
</div> </div>
<div class="fm-btn" @click="dataFormSubmitHandle()"> <div class="fm-btn"
@click="dataFormSubmitHandle()">
{{ $t("login.title") }} {{ $t("login.title") }}
</div> </div>
<div class="hint">请使用小程序端的账号密码登录</div> <div class="hint">请使用小程序端的账号密码登录</div>
@ -63,25 +63,27 @@
<div class="m-footer"> <div class="m-footer">
<div class="login-footer"> <div class="login-footer">
<p> <p>
<a href="" target="_blank">{{ $t("login.copyright") }}</a> <a href=""
target="_blank">{{ $t("login.copyright") }}</a>
</p> </p>
</div> </div>
</div> </div>
</div> </div>
<c-dialog <c-dialog :showFooter="false"
:showFooter="false" :title="'选择客户'"
:title="'选择客户'" :isNest="false"
:isNest="false" :visible="diaVisible"
:visible="diaVisible" :dialogHeight="0.8"
:dialogHeight="0.8" :width="30"
:width="30" :top="'120px'"
:top="'120px'" @cancel="diaCancel">
@cancel="diaCancel"
>
<div class="m-pop"> <div class="m-pop">
<div v-for="(item, index) in tableData" :key="index" class="div_row"> <div v-for="(item, index) in tableData"
<span @click="selectCustomer(item)" class="span_name">{{ :key="index"
class="div_row">
<span @click="selectCustomer(item)"
class="span_name">{{
item.customerName item.customerName
}}</span> }}</span>
</div> </div>
@ -100,7 +102,7 @@ import { Loading } from "element-ui"; // 引入Loading服务
let loading; // let loading; //
export default { export default {
data() { data () {
return { return {
pubKey: null, // pubKey: null, //
isShowLogin: true, isShowLogin: true,
@ -126,7 +128,7 @@ export default {
CDialog, CDialog,
}, },
computed: { computed: {
dataRule() { dataRule () {
return { return {
phone: [{ required: true, message: "手机号不能为空", trigger: "blur" }], phone: [{ required: true, message: "手机号不能为空", trigger: "blur" }],
password: [ password: [
@ -138,7 +140,7 @@ export default {
}; };
}, },
}, },
created() { created () {
// //
if (this.$route.query.platformToken) { if (this.$route.query.platformToken) {
this.isShowLogin = false; this.isShowLogin = false;
@ -149,13 +151,13 @@ export default {
this.getPubKey(); this.getPubKey();
} }
}, },
mounted() { mounted () {
localStorage.removeItem("showHeader"); localStorage.removeItem("showHeader");
}, },
methods: { methods: {
// //
skipAfterLogin() { skipAfterLogin () {
let href = localStorage.getItem("thePageAtExit"); let href = localStorage.getItem("thePageAtExit");
if (href && href.indexOf("login") == -1) { if (href && href.indexOf("login") == -1) {
localStorage.removeItem("thePageAtExit"); localStorage.removeItem("thePageAtExit");
@ -166,7 +168,7 @@ export default {
} }
}, },
// //
getPubKey() { getPubKey () {
this.$http this.$http
.post("/auth/govweb/getKey") .post("/auth/govweb/getKey")
.then(({ data: res }) => { .then(({ data: res }) => {
@ -176,15 +178,15 @@ export default {
this.pubKey = res.data; // ; this.pubKey = res.data; // ;
}) })
.catch(() => {}); .catch(() => { });
}, },
// //
getCaptcha() { getCaptcha () {
this.dataForm.uuid = getUUID(); this.dataForm.uuid = getUUID();
this.captchaPath = `${window.SITE_CONFIG["apiURL"]}/auth/login/captcha?uuid=${this.dataForm.uuid}`; this.captchaPath = `${window.SITE_CONFIG["apiURL"]}/auth/login/captcha?uuid=${this.dataForm.uuid}`;
}, },
// //
dataFormSubmitHandle() { dataFormSubmitHandle () {
this.$refs["dataForm"].validate((valid, messageObj) => { this.$refs["dataForm"].validate((valid, messageObj) => {
console.log(valid, messageObj); console.log(valid, messageObj);
if (!valid) { if (!valid) {
@ -222,7 +224,7 @@ export default {
}); });
}, },
// //
getAutoLogin(platformToken) { getAutoLogin (platformToken) {
this.dataForm.thirdToken = platformToken; this.dataForm.thirdToken = platformToken;
this.dataForm.platform = "pyld"; this.dataForm.platform = "pyld";
this.$http this.$http
@ -240,11 +242,11 @@ export default {
localStorage.setItem("token", res.data.token); localStorage.setItem("token", res.data.token);
this.$router.replace({ name: "index" }); this.$router.replace({ name: "index" });
}) })
.catch(() => {}); .catch(() => { });
// epmet-ext9.elinkservice.cn/platform-admin // epmet-ext9.elinkservice.cn/platform-admin
}, },
// //
selectCustomer(row) { selectCustomer (row) {
localStorage.setItem("customerId", row.customerId); localStorage.setItem("customerId", row.customerId);
localStorage.setItem("customerName", row.customerName); localStorage.setItem("customerName", row.customerName);
this.startLoading(); this.startLoading();
@ -275,11 +277,11 @@ export default {
}); });
}, },
// //
diaCancel() { diaCancel () {
this.diaVisible = false; this.diaVisible = false;
}, },
// //
startLoading() { startLoading () {
loading = Loading.service({ loading = Loading.service({
lock: true, // lock: true, //
text: "正在加载……", // text: "正在加载……", //
@ -287,7 +289,7 @@ export default {
}); });
}, },
// //
endLoading() { endLoading () {
// clearTimeout(timer); // clearTimeout(timer);
if (loading) { if (loading) {
loading.close(); loading.close();

Loading…
Cancel
Save