Browse Source

人文关怀 、难点堵点

shibei_master
jiangyy 4 years ago
parent
commit
35de473a2a
  1. 49
      src/assets/scss/modules/management/secretaryLog.scss
  2. 326
      src/views/modules/secretaryLog/difficulty/difficultyDetail.vue
  3. 553
      src/views/modules/secretaryLog/difficulty/difficultyForm.vue
  4. 377
      src/views/modules/secretaryLog/difficulty/difficultyList.vue
  5. 331
      src/views/modules/secretaryLog/humanisticCare/careDetail.vue
  6. 240
      src/views/modules/secretaryLog/humanisticCare/careForm.vue
  7. 295
      src/views/modules/secretaryLog/humanisticCare/careList.vue

49
src/assets/scss/modules/management/secretaryLog.scss

@ -0,0 +1,49 @@
.div_form {
margin: 20px 50px;
}
.form_item {
display: flex;
justify-content: flex-start;
font-size: 15px;
.item_title {
text-align: right;
flex: 0 0 150px;
line-height: 36px;
}
.item_content {
margin-left: 30px;
line-height: 36px;
}
.attach_item {
display: flex;
justify-content: flex-start;
align-items: center;
margin-left: 30px;
line-height: 36px;
.attach_item_name {
margin-left: 10px;
color: #3e8ef7;
text-decoration: underline;
}
.attach_item_name:hover {
cursor: pointer;
color: #1461c7;
}
}
}
.div_btn {
margin-top: 15px;
display: flex;
width: 100%;
justify-content: center;
.btn_right {
margin-left: 50px;
}
}

326
src/views/modules/secretaryLog/difficulty/difficultyDetail.vue

@ -1,99 +1,63 @@
<template> <template>
<div> <div>
<div class="dialog-h-content scroll-h"> <div class="dialog-h-content scroll-h div_form">
<el-form ref="ref_form"
:inline="true"
:model="formData"
class="form">
<el-form-item label="服务事项"
label-width="150px"
prop="serviceMatterShow">
<span class="detail_span">{{formData.serviceMatterShow}}</span>
</el-form-item>
<el-form-item label="单位名称"
prop="unitId"
label-width="150px"
style="display: block">
<span class="detail_span">{{formData.unitName}}</span>
</el-form-item>
<el-form-item label="活动标题"
prop="title"
label-width="150px"
style="display: block">
<span class="detail_span">{{formData.title}}</span>
</el-form-item>
<el-form-item label="活动目标"
prop="target"
label-width="150px"
style="display: block">
<span class="detail_span">{{formData.target}}</span>
</el-form-item>
<el-form-item label="活动内容"
prop="target"
label-width="150px"
style="display: block">
<p class="text_p"
v-html="formData.content"></p>
</el-form-item>
<el-form-item label="服务人数"
style="display: block"
prop="peopleCount"
label-width="150px">
<span class="detail_span">{{formData.peopleCount}}</span>
</el-form-item>
<el-form-item label="活动时间"
style="display: block"
prop="activityTime"
label-width="150px">
<span class="detail_span">{{formData.activityTime}}</span>
</el-form-item>
<el-form-item label="活动地址"
prop="address"
label-width="150px"
style="display: block">
<span class="detail_span">{{formData.address}}</span>
</el-form-item>
<el-form-item label="活动坐标"
prop="longitude"
label-width="150px"
style="display: block">
<div style="width:500px">
<div id="app">
<div class="form_item">
<div class="item_title">关怀类型</div>
<div class="item_content"> {{formData.concernType}}</div>
</div>
<div class="form_item">
<div class="item_title">关怀人员</div>
<div class="item_content"> {{formData.resiName}}</div>
</div>
<div v-if="formData.phone"
class="form_item">
<div class="item_title">电话</div>
<div class="item_content"> {{formData.phone}}</div>
</div>
<div v-if="formData.address"
class="form_item">
<div class="item_title">地址</div>
<div class="item_content"> {{formData.address}}</div>
</div> </div>
<div class="form_item">
<div class="item_title">关怀事项</div>
<div class="item_content"> {{formData.content}}</div>
</div> </div>
</el-form-item> <div v-if="formData.scheduledTime"
class="form_item">
<div class="item_title">预计关怀时间</div>
<div class="item_content"> {{formData.scheduledTime}}</div>
</div>
<el-form-item label="活动结果" <div v-if="formData.remindTime"
prop="result" class="form_item">
label-width="150px" <div class="item_title">提醒时间</div>
style="display: block"> <div class="item_content"> {{formData.remindTime}}</div>
</div>
<div v-if="formData.status"
class="form_item">
<div class="item_title">状态</div>
<div class="item_content"> {{formData.status==='0'?'未完成':'已完成'}}</div>
</div>
<div v-if="formData.attachmentList.length>0"
class="form_item">
<div class="item_title">附件</div>
<div>
<div class="attach_item"
v-for="(item, index) in formData.attachmentList"
:key="index">
<i class="el-icon-tickets"></i>
<div class="attach_item_name"
@click="handleFileDownload(item)">{{item.fileName}}</div>
</div>
</div>
<p class="text_p" </div>
v-html="formData.result"></p>
</el-form-item>
</el-form>
</div> </div>
<div class="div_btn"> <div class="div_btn">
@ -101,166 +65,88 @@
@click="handleCancle"> </el-button> @click="handleCancle"> </el-button>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { mapGetters } from 'vuex'
import { Loading } from 'element-ui' // Loading import { Loading } from 'element-ui' // Loading
import { requestPost } from '@/js/dai/request'
var map
var search
var markers
var infoWindowList
var geocoder //
let loading // let loading //
export default { export default {
data () { data () {
return { return {
formData: {},
difficultyId: '',
formData: {
content: '',//
resolveWay: '',//
remark: '',//
scheduledTime: '',//yyyy-mm-dd hh:mm
remindTime: '',//yyyy-mm-dd hh:mm
attachmentList: []
},
} }
}, },
components: {}, components: {},
mounted () { mounted () {
this.initMap()
}, },
methods: { methods: {
handleCancle () {
this.$emit('diaClose')
},
async initForm (row) { async initForm (row) {
this.startLoading() this.startLoading()
for (let item of this.serviceList) {
if (row.serviceMatter === item.value) {
row.serviceMatterShow = item.label
}
}
this.formData = { ...row }
map.setCenter(new TMap.LatLng(this.formData.latitude, this.formData.longitude)) this.difficultyId = row.id
this.setMarker(this.formData.latitude, this.formData.longitude) await this.loadFormData()
this.endLoading() this.endLoading()
}, },
// init async loadFormData () {
initMap () {
//
var center = new window.TMap.LatLng(36.0722275, 120.38945519)
// map TMap.Map()
map = new window.TMap.Map(document.getElementById('app'), {
center: center, //
zoom: 17.2, //
pitch: 43.5, //
rotation: 45 //
})
search = new window.TMap.service.Search({ pageSize: 10 }) // const url = 'http://yapi.elinkservice.cn/mock/245/gov/project/memoDifficulty/detail'
// const url = '/gov/project/memoDifficulty/detail'
markers = new TMap.MultiMarker({ let params = {
map: map, id: this.difficultyId,
geometries: [] readFlag: '0',
})
infoWindowList = Array(10)
geocoder = new TMap.service.Geocoder(); //
//
map.on('panend', () => {
this.handleMoveCenter()
})
this.handleMoveCenter()
this.convert()
},
setMarker (lat, lng) {
markers.setGeometries([])
markers.add([
{
id: '4',
styleId: 'marker',
position: new TMap.LatLng(lat, lng),
properties: {
title: 'marker4'
} }
} const { data, code, msg } = await requestPost(url, params)
]) if (code === 0) {
}, this.formData = data
handleSearchMap () {
infoWindowList.forEach((infoWindow) => {
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 { } else {
this.$message.error('未检索到相关位置坐标') this.$message.error(msg)
} }
})
}, },
handleMoveCenter () { handleCancle () {
//
const center = map.getCenter()
const lat = center.getLat() this.$emit('diaClose')
const lng = center.getLng()
this.formData.latitude = lat
this.formData.longitude = lng
this.setMarker(lat, lng)
this.convert(lat, lng)
},
convert (lat, lng) {
markers.setGeometries([]);
// 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 handleFileDownload (file) {
// var a = document.createElement('a');
}); var event = new MouseEvent('click');
a.download = file.fileName;
console.log(a)
a.href = file.attachmentUrl;
a.dispatchEvent(event);
}, },
// //
startLoading () { startLoading () {
loading = Loading.service({ loading = Loading.service({
@ -278,34 +164,14 @@ export default {
} }
}, },
computed: {}, computed: {},
props: { props: {}
serviceList: {
type: Array,
default: []
},
}
} }
</script> </script>
<style lang="scss" scoped > <style lang="scss" scoped >
@import "@/assets/scss/modules/visual/communityManageForm.scss"; @import "@/assets/scss/modules/management/secretaryLog.scss";
</style> </style>
<style lang="scss" scoped> <style lang="scss" scoped>
.detail_span {
width: 500px;
font-weight: bold;
text-align: left;
margin: 0 0;
font-size: 16px;
}
.text_p {
margin: 0 0;
border: 3px;
> p {
margin: 0 0;
}
}
</style> </style>

553
src/views/modules/secretaryLog/difficulty/difficultyForm.vue

@ -6,73 +6,23 @@
:inline="true" :inline="true"
:model="formData" :model="formData"
:rules="dataRule" :rules="dataRule"
:disabled="formType === 'detail'"
class="form"> class="form">
<el-form-item label="服务事项" <el-form-item label="内容"
label-width="150px" prop="content"
prop="serviceMatterList">
<el-checkbox-group class="item_width_1"
style="display:flex;flex-wrap:wrap"
v-model="formData.serviceMatterList">
<el-checkbox v-for="item in serviceList"
:key="item.value"
:label="item.value">{{item.label}}</el-checkbox>
</el-checkbox-group>
<!-- <el-select class="item_width_1"
v-model="formData.serviceMatter"
placeholder="请选择"
clearable>
<el-option v-for="item in serviceList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select> -->
</el-form-item>
<el-form-item label="单位名称"
prop="unitIdList"
label-width="150px"
style="display: block">
<el-checkbox-group class="item_width_1"
style="display:flex;flex-wrap:wrap"
v-model="formData.unitIdList">
<el-checkbox v-for="item in unitList"
:key="item.value"
:label="item.value">{{item.label}}</el-checkbox>
</el-checkbox-group>
<!-- <el-select class="item_width_1"
v-model="formData.unitId"
placeholder="请选择"
clearable>
<el-option v-for="item in unitList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select> -->
</el-form-item>
<el-form-item label="活动标题"
prop="title"
label-width="150px" label-width="150px"
style="display: block"> style="display: block">
<el-input class="item_width_1" <el-input class="item_width_1"
maxlength="50" type="textarea"
maxlength="100"
show-word-limit show-word-limit
placeholder="请输入活动标题" :rows="3"
v-model="formData.title"> placeholder="请输入内容"
</el-input> v-model="formData.content"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="活动目标" <el-form-item label="解决方式"
prop="target" prop="resolveWay"
label-width="150px" label-width="150px"
style="display: block"> style="display: block">
<el-input class="item_width_1" <el-input class="item_width_1"
@ -80,114 +30,71 @@
maxlength="100" maxlength="100"
show-word-limit show-word-limit
:rows="3" :rows="3"
placeholder="请输入活动目标,不超过100字" placeholder="请输入解决方式"
v-model="formData.target"></el-input> v-model="formData.resolveWay"></el-input>
</el-form-item>
<el-form-item label="活动内容"
prop="target"
label-width="150px"
style="display: block">
<div class="item_width_1">
<Tinymce class="tinymce_view "
v-if="formType!='detail'"
v-model="formData.content"
:height="250"
placeholder="在这里输入文字" />
<p v-else
class="text_p"
v-html="formData.content"></p>
</div>
</el-form-item> </el-form-item>
<el-form-item label="服务人数" <el-form-item label="预计处理时间"
style="display: block" style="display: block"
prop="peopleCount" prop="scheduledTime"
label-width="150px"> label-width="150px">
<el-input-number class="item_width_1" <el-date-picker class="item_width_1"
v-model="formData.peopleCount" v-model="formData.scheduledTime"
:min="0" format="yyyy-MM-dd HH:mm"
label="服务人数"></el-input-number> value-format="yyyy-MM-dd HH:mm"
type="datetime"
placeholder="选择时间">
</el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="活动时间" <el-form-item label="提醒时间"
style="display: block" style="display: block"
prop="activityTime" prop="remindTime"
label-width="150px"> label-width="150px">
<el-date-picker v-model="formData.activityTime" <el-date-picker class="item_width_1"
value-format="yyyy-MM-dd HH:mm:ss" v-model="formData.remindTime"
format="yyyy-MM-dd HH:mm"
value-format="yyyy-MM-dd HH:mm"
type="datetime" type="datetime"
placeholder="选择时间"> placeholder="选择时间">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="活动坐标" <el-form-item label="备注"
prop="longitude" prop="remark"
label-width="150px"
style="display: block">
<div class="item_width_1">
<div class="div_map">
<div id="app">
</div>
<div class="div_searchmap">
<el-input class="item_width_4"
maxlength="50"
size="mini"
placeholder="请输入关键字"
v-model="keyWords">
</el-input>
<el-button style="margin-left: 10px"
type="primary"
size="mini"
@click="handleSearchMap">查询</el-button>
</div>
</div>
<div style="margin-top: 10px">
<span>经度</span>
<el-input class="item_width_3"
maxlength="50"
placeholder="请输入经度"
v-model="formData.longitude">
</el-input>
<span style="margin-left: 20px">纬度</span>
<el-input class="item_width_3"
maxlength="50"
placeholder="请输入纬度"
v-model="formData.latitude">
</el-input>
</div>
</div>
</el-form-item>
<el-form-item label="活动地址"
prop="address"
label-width="150px" label-width="150px"
style="display: block"> style="display: block">
<el-input class="item_width_1" <el-input class="item_width_1"
v-model="formData.address"> type="textarea"
</el-input> maxlength="100"
show-word-limit
:rows="3"
placeholder="请输入备注"
v-model="formData.remark"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="活动结果" <el-form-item class="block"
prop="result"
label-width="150px" label-width="150px"
style="display: block"> style="display: block"
<div class="item_width_1"> label="添加附件"
<Tinymce class="tinymce_view " prop="attach">
v-if="formType!='detail'"
v-model="formData.result" <el-upload class="upload-demo"
:height="250" :action="uploadUlr"
placeholder="在这里输入文字" /> accept=".doc,.pdf,.xls,.docx,.xlsx"
:on-success="handleFileSuccess"
<p v-else :on-remove="handleFileRemove"
class="text_p" :on-preview="handleFileDownload"
v-html="formData.result"></p> :limit="3"
</div> :before-upload="beforeUpload"
:file-list="fileList">
<el-button size="small"
:disabled="fileList.length==3"
type="primary">点击上传</el-button>
<div slot="tip"
class="el-upload__tip">最多三个附件只能上传wordexcelpdf文件</div>
</el-upload>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
@ -195,7 +102,6 @@
<el-button size="small" <el-button size="small"
@click="handleCancle"> </el-button> @click="handleCancle"> </el-button>
<el-button size="small" <el-button size="small"
v-if="formType != 'detail'"
type="primary" type="primary"
:disabled="btnDisable" :disabled="btnDisable"
@click="handleComfirm"> </el-button> @click="handleComfirm"> </el-button>
@ -207,13 +113,9 @@
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 Tinymce from '@c/tinymce/index.vue'
var map
var search
var markers
var infoWindowList
var geocoder //
let loading // let loading //
export default { export default {
@ -223,97 +125,66 @@ export default {
btnDisable: false, btnDisable: false,
keyWords: '', difficultyId: '',
activityId: '',
formData: { formData: {
serviceMatter: '',// content: '',//
serviceMatterList: [], resolveWay: '',//
unitId: '',//ID remark: '',//
unitIdList: [], scheduledTime: '',//yyyy-mm-dd hh:mm
title: '',// remindTime: '',//yyyy-mm-dd hh:mm
target: '',// attachmentList: []
content: '',//
activityTime: '',//
peopleCount: 0,//
result: '', //
address: '', //
longitude: 36.0722275, //
latitude: 120.38945519 //
}, },
serviceList: []
fileList: [],
uploadUlr: window.SITE_CONFIG['apiURL'] + '/oss/file/uploadvariedfile',
dialogImageUrl: '',
dialogVisible: false
} }
}, },
components: { Tinymce }, components: {},
mounted () { mounted () {
this.initMap()
}, },
methods: { methods: {
async initForm (type, activityId) { async initForm (type, difficultyId) {
this.startLoading() this.startLoading()
this.$refs.ref_form.resetFields(); this.$refs.ref_form.resetFields();
//
await this.loadService()
this.formType = type this.formType = type
if (activityId) { if (difficultyId) {
this.activityId = activityId this.difficultyId = difficultyId
this.formData.id = activityId this.formData.id = difficultyId
await this.loadFormData() await this.loadFormData()
} else {
map.setCenter(new TMap.LatLng(36.0722275, 120.38945519))
this.setMarker(36.0722275, 120.38945519)
} }
this.endLoading() this.endLoading()
}, },
//
async loadService () {
const url = "/heart/serviceitem/dict-list"
let params = {
type: 'usable'
// parentCategoryCode: '1010'
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.serviceList = data
} else {
this.$message.error(msg)
}
},
//
async loadFormData () { async loadFormData () {
const url = '/heart/icpartyactivity/detail'
// const url = 'http://yapi.elinkservice.cn/mock/245/heart/icpartyactivity/detail' // const url = 'http://yapi.elinkservice.cn/mock/245/gov/project/memoDifficulty/detail'
const url = '/gov/project/memoDifficulty/detail'
let params = { let params = {
id: this.activityId id: this.difficultyId,
readFlag: '0',
} }
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
console.log(this.formData.content)
let style_img = "style='width:50px;height:40px;' "
if (this.formData.content) {
this.formData.content = this.formData.content.replace(/<img/g, "<img style='width:200px;height:120px;'")
// let array=this.formData.content.split('<img')
if (data.attachmentList) {
data.attachmentList.forEach(element => {
element.name = element.fileName
element.type = element.attachmentType
element.size = element.attachmentSize
});
this.fileList = data.attachmentList
} }
console.log(this.formData.content)
map.setCenter(new TMap.LatLng(parseFloat(this.formData.latitude), parseFloat(this.formData.longitude)))
this.setMarker(this.formData.latitude, this.formData.longitude)
} else { } else {
this.$message.error(msg) this.$message.error(msg)
} }
@ -329,15 +200,31 @@ export default {
app.util.validateRule(messageObj) app.util.validateRule(messageObj)
this.btnDisable = false this.btnDisable = false
} else { } else {
this.addActivity()
this.addDifficulty()
} }
}) })
}, },
async addActivity () { async addDifficulty () {
let url = '/heart/icpartyactivity/save'
// let url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyactivity/save"
if (this.fileList.length > 0) {
this.formData.attachmentList = this.fileList
}
let url = ''
if (this.formType === 'add') {
url = '/gov/project/memoDifficulty/save'
// url = "http://yapi.elinkservice.cn/mock/245/gov/project/memoDifficulty/save"
this.formData.id = ''
} else {
url = '/gov/project/memoDifficulty/update'
// url = "http://yapi.elinkservice.cn/mock/245/gov/project/memoDifficulty/update"
}
const { data, code, msg } = await requestPost(url, this.formData) const { data, code, msg } = await requestPost(url, this.formData)
@ -364,133 +251,69 @@ export default {
}, },
// init beforeUpload (file) {
initMap () { const array = file.name.split('.')
// const extension = array[array.length - 1]
var center = new window.TMap.LatLng(36.0722275, 120.38945519)
// map TMap.Map() if (extension !== 'xls'
map = new window.TMap.Map(document.getElementById('app'), { && extension !== 'xlsx'
center: center, // && extension !== 'doc'
zoom: 17.2, // && extension !== 'docx'
pitch: 43.5, // && extension !== 'pdf') {
rotation: 45 // this.$message.error('只能上传word、excel、pdf文件!')
}) return false
}
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) { handleFileRemove (file) {
markers.setGeometries([])
markers.add([
{
id: '4',
styleId: 'marker',
position: new TMap.LatLng(lat, lng),
properties: {
title: 'marker4'
}
}
])
},
handleSearchMap () { if (file && file.status === "success") {
infoWindowList.forEach((infoWindow) => { this.fileList.splice(this.fileList.findIndex(item => item.uid === file.uid), 1)
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 () { handleFileSuccess (res, file) {
//
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) { if (res.code === 0 && res.msg === 'success') {
markers.setGeometries([]); const array = file.name.split('.')
// var input = document.getElementById('location').value.split(','); const fileType = array[array.length - 1]
let location
if (lat && lng) { file.fileName = file.name
location = new TMap.LatLng(lat, lng); file.attachmentUrl = res.data.url
} else { file.attachmentSize = file.size
location = new TMap.LatLng(this.formData.latitude, this.formData.longitude); file.attachmentType = 'doc'
} file.attachmentFormat = fileType
// map.setCenter(location);
markers.updateGeometries([ this.fileList.push(file)
{ console.log(this.fileList)
id: 'main', // } else this.$message.error(res.msg)
position: location,
}, },
]);
geocoder //
.getAddress({ location: location }) // handleFileDownload (file) {
.then((result) => {
this.formData.address = result.result.address var a = document.createElement('a');
// var event = new MouseEvent('click');
}); a.download = file.name;
console.log(a)
a.href = file.url;
a.dispatchEvent(event);
}, },
resetData () { resetData () {
this.activityId = '' this.difficultyId = ''
this.keyWords = ''
this.formData = { this.formData = {
serviceMatter: '',// content: '',//
serviceMatterList: [], resolveWay: '',//
unitId: '',//ID remark: '',//
unitIdList: [], scheduledTime: '',//yyyy-mm-dd hh:mm
title: '',// remindTime: '',//yyyy-mm-dd hh:mm
target: '',// attachmentList: []
content: '',//
activityTime: '',//
peopleCount: 0,//
result: '', //
address: '', //
longitude: 36.0722275, //
latitude: 120.38945519 //
} }
}, },
// //
@ -512,44 +335,20 @@ export default {
computed: { computed: {
dataRule () { dataRule () {
return { return {
serviceMatterList: [ resiName: [
{ required: true, message: '服务事项不能为空', trigger: 'blur' } { required: true, message: '关怀人员不能为空', trigger: 'blur' }
],
unitIdList: [
{ required: true, message: '单位名称不能为空', trigger: 'blur' },
],
title: [
{ required: true, message: '活动标题不能为空', trigger: 'blur' }
],
target: [
{ required: true, message: '活动目标不能为空', trigger: 'blur' }
], ],
content: [ content: [
{ required: true, message: '活动内容不能为空', trigger: 'blur' } { required: true, message: '关怀事项不能为空', trigger: 'blur' },
],
activityTime: [
{ required: true, message: '活动时间不能为空', trigger: 'blur' }
],
result: [
{ required: true, message: '活动结果不能为空', trigger: 'blur' }
], ],
address: [
{ required: true, message: '详细地址不能为空', trigger: 'blur' }
],
longitude: [
{ required: true, message: '坐标不能为空', trigger: 'blur' }
]
} }
}, },
}, },
props: { props: {
unitList: {
type: Array,
default: []
},
// serviceList: { // serviceList: {
// type: Array, // type: Array,
@ -566,31 +365,11 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.item_width_1 { .item_width_1 {
width: 560px; width: 560px;
/deep/.tox .tox-dialog {
z-index: 20000;
}
} }
.tinymce_view { .item_width_2 {
::v-deep .tox .tox-dialog { width: 220px;
z-index: 2000000000;
}
} }
.div_map {
position: relative;
}
.div_searchmap {
z-index: 5000;
position: absolute;
top: 5px;
left: 5px;
}
.tinymce_view {
height: 400px;
overflow: auto;
}
.text_p { .text_p {
margin: 0; margin: 0;
padding: 0 10px; padding: 0 10px;

377
src/views/modules/secretaryLog/difficulty/difficultyList.vue

@ -6,58 +6,36 @@
ref="ref_searchform" ref="ref_searchform"
:label-width="'100px'"> :label-width="'100px'">
<div> <div>
<el-form-item label="内容摘要"
<el-form-item label="单位名称" prop="content">
prop="unitId"> <el-input v-model="formData.content"
<el-select class="item_width_1"
v-model="formData.unitId"
size="small"
placeholder="全部"
clearable>
<el-option v-for="item in unitList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="服务事项"
prop="serviceMatter">
<el-select class="item_width_2"
v-model="formData.serviceMatter"
size="small"
placeholder="请选择"
clearable>
<el-option v-for="item in serviceList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
</div>
<div>
<el-form-item label="活动标题"
prop="title">
<el-input v-model="formData.title"
size="small" size="small"
class="item_width_1" class="item_width_1"
clearable clearable
placeholder="请输入内容"> placeholder="请输入内容摘要">
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="活动时间" <el-form-item label="预计处理时间"
prop="scheduledStartTime">
<el-date-picker v-model="scheduledTimeRange"
size="small"
type="daterange"
value-format="yyyy-MM-dd"
@change="handleScheduledTimeChange"
range-separator="至"
start-placeholder="开始时间"
end-placeholder="结束时间">
</el-date-picker>
</el-form-item>
<el-form-item label="创建时间"
prop="startTime"> prop="startTime">
<el-date-picker v-model="timeRange" <el-date-picker v-model="timeRange"
size="small" size="small"
type="daterange" type="daterange"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd"
@change="handleTimeChange" @change="handleTimeChange"
range-separator="至" range-separator="至"
start-placeholder="开始时间" start-placeholder="开始时间"
@ -82,26 +60,6 @@
class="diy-button--add" class="diy-button--add"
size="small" size="small"
@click="handleAdd">新增</el-button> @click="handleAdd">新增</el-button>
<!--
<el-upload ref="upload"
:multiple='false'
:show-file-list='false'
:before-upload="beforeUpload"
action=""
accept=".xls,.xlsx"
:limit="1"
:on-exceed="handleExceed"
:http-request="uploadFile">
<el-button style="margin-left:10px"
size="small"
class="diy-button--delete">导入</el-button>
</el-upload>
<el-button style="float:left"
class="diy-button--reset"
size="small"
@click="handleExport">导出</el-button>-->
</div> </div>
@ -118,68 +76,74 @@
align="center" align="center"
type="index" type="index"
width="50"></el-table-column> width="50"></el-table-column>
<el-table-column prop="unitName"
<el-table-column prop="content"
header-align="center" header-align="center"
align="center" align="center"
label="单位名称" label="内容"
width="180"> min-width="180">
<template slot-scope="scope">
<div class="twoline">{{scope.row.content}}</div>
</template>
</el-table-column> </el-table-column>
<el-table-column prop="title" <el-table-column prop="resolveWay"
header-align="center" header-align="center"
align="center" align="center"
label="活动标题" label="解决方式"
min-width="180"> min-width="120">
</el-table-column> </el-table-column>
<el-table-column prop="address"
<el-table-column prop="scheduledTime"
header-align="center" header-align="center"
align="center" align="center"
label="活动地址" label="预计处理时间"
min-width="230"> width="170">
</el-table-column> </el-table-column>
<el-table-column prop="remindTime"
<el-table-column prop="peopleCount"
header-align="center" header-align="center"
align="center" align="center"
label="服务人数" label="提醒时间"
width="100"> width="170">
</el-table-column> </el-table-column>
<el-table-column prop="activityTime" <el-table-column prop="remark"
header-align="center" header-align="center"
align="center" align="center"
label="活动时间" label="备注"
width="230"> width="180">
</el-table-column> </el-table-column>
<el-table-column prop="activityTime" <el-table-column prop="createdTime"
header-align="center" header-align="center"
align="center" align="center"
label="来源" label="创建时间"
width="100"> width="170">
<template slot-scope="scope">
<span v-if="scope.row.actId">小程序</span>
<span v-else>管理平台</span>
</template>
</el-table-column> </el-table-column>
<el-table-column label="操作" <el-table-column label="操作"
fixed="right" fixed="right"
width="140" width="170"
header-align="center" header-align="center"
align="center" align="center"
class="operate"> class="operate">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" <el-button type="text"
style="color:#1C6AFD;text-decoration: underline;" class="div-table-button--detail"
size="small" size="small"
@click="handleDetail(scope.row)">查看</el-button> @click="handleDetail(scope.row)">查看</el-button>
<el-button v-if="!scope.row.actId" <el-button v-if="!scope.row.actId"
type="text" type="text"
style="color:#00A7A9;text-decoration: underline;" class="div-table-button--edit"
size="small" size="small"
@click="handleEdit(scope.row)">修改</el-button> @click="handleEdit(scope.row)">修改</el-button>
<el-button v-if="!scope.row.actId"
type="text"
class="div-table-button--detail"
size="small"
@click="handleExport(scope.row)">导出</el-button>
<el-button type="text" <el-button type="text"
style="color:#D51010;text-decoration: underline;" class="div-table-button--delete"
size="small" size="small"
@click="handleDelete(scope.row)">删除</el-button> @click="handleDelete(scope.row)">删除</el-button>
</template> </template>
@ -207,7 +171,6 @@
class="dialog-h" class="dialog-h"
@closed="diaClose"> @closed="diaClose">
<difficulty-form ref="ref_form" <difficulty-form ref="ref_form"
:unitList="unitList"
@dialogCancle="addFormCancle" @dialogCancle="addFormCancle"
@dialogOk="addFormOk"></difficulty-form> @dialogOk="addFormOk"></difficulty-form>
</el-dialog> </el-dialog>
@ -215,13 +178,12 @@
<el-dialog :visible.sync="detailShow" <el-dialog :visible.sync="detailShow"
:close-on-click-modal="false" :close-on-click-modal="false"
:close-on-press-escape="false" :close-on-press-escape="false"
:title="'活动详情'" :title="'详情'"
width="950px" width="950px"
top="5vh" top="5vh"
class="dialog-h" class="dialog-h"
@closed="detailClosed"> @closed="diaClose">
<difficulty-detail ref="ref_detail" <difficulty-detail ref="ref_detail"
:serviceList="serviceList"
@diaClose="diaClose"></difficulty-detail> @diaClose="diaClose"></difficulty-detail>
</el-dialog> </el-dialog>
@ -246,52 +208,24 @@ export default {
pageSize: 10, pageSize: 10,
pageNo: 0, pageNo: 0,
tableLoading: false, tableLoading: false,
agencyId: '',
unitList: [],//list
serviceList: [
{
id: "1",
name: '积极配合社区安全巡查员进行场所消防、安全等方面的检查。'
},
{
id: "2",
name: '积极配合'
},
{
id: "3",
name: '积极配合社区安全巡查员进行'
},
{
id: "4",
name: '积极配合社区安全巡查员进行场所消防、安全等方面的检查。并具备安全意识及设备设施'
},
],//list
pickerOptions: { //
disabledDate (time) {
return time.getTime() > (Date.now() - (24 * 60 * 60 * 1000))
}
},
scheduledTimeRange: [],
timeRange: [], timeRange: [],
unitId: '',
formData: { formData: {
unitId: '', content: '',//
title: '', startTime: '',//yyyy-mm-dd
serviceMatter: '', endTime: '',//yyyy-mm-dd
startTime: '', scheduledStartTime: '',//yyyy-mm-dd
endTime: '' scheduledEndTime: '',// yyyy-mm-dd
}, },
tableData: [], tableData: [],
//form //form
formShow: false, formShow: false,
formTitle: '新增活动', formTitle: '新增',
detailShow: false, detailShow: false,
files: "",
fileName: "",
uploadUlr: window.SITE_CONFIG['apiURL'] + '/gov/org/neighborhood/import'
} }
}, },
@ -302,14 +236,7 @@ export default {
}, },
async mounted () { async mounted () {
//
await this.loadService()
const { user } = this.$store.state
this.agencyId = user.agencyId
//
await this.loadUnit()
// //
await this.loadTable() await this.loadTable()
}, },
@ -319,52 +246,12 @@ export default {
this.loadTable() this.loadTable()
}, },
async loadUnit () {
const url = "/heart/icpartyunit/option"
// const url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyunit/option"
let params = {
agencyId: this.agencyId
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.unitList = data
} else {
this.$message.error(msg)
}
},
//
async loadService () {
const url = "/heart/serviceitem/dict-list"
let params = {
// parentCategoryCode: '1010'
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.serviceList = data
} else {
this.$message.error(msg)
}
},
async loadTable () { async loadTable () {
this.tableLoading = true this.tableLoading = true
const url = "/heart/icpartyactivity/search" const url = "/gov/project/memoDifficulty/page"
// const url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyactivity/list" // const url = "http://yapi.elinkservice.cn/mock/245/gov/project/memoDifficulty/page"
let params = { let params = {
agencyId: this.agencyId,
pageSize: this.pageSize, pageSize: this.pageSize,
pageNo: this.pageNo, pageNo: this.pageNo,
...this.formData ...this.formData
@ -384,21 +271,22 @@ export default {
diaClose () { diaClose () {
if (this.formShow) {
this.$refs.ref_form.resetData() this.$refs.ref_form.resetData()
this.formShow = false this.formShow = false
}, } else {
detailClosed () {
this.detailShow = false this.detailShow = false
}
}, },
handleDetail (row) { handleDetail (row) {
// this.detailShow = true this.detailShow = true
this.formTitle = '详情' this.formTitle = '详情'
this.formShow = true
this.$nextTick(() => { this.$nextTick(() => {
// this.$refs.ref_detail.initForm(row) this.$refs.ref_detail.initForm(row)
this.$refs.ref_form.initForm('detail', row.id)
}) })
}, },
@ -435,7 +323,7 @@ export default {
type: "warning" type: "warning"
}) })
.then(() => { .then(() => {
this.deleteActivity(row) this.deleteDifficulty(row)
}) })
.catch(err => { .catch(err => {
if (err == "cancel") { if (err == "cancel") {
@ -445,15 +333,15 @@ export default {
}); });
}, },
async deleteActivity (row) { async deleteDifficulty (row) {
const url = "/heart/icpartyactivity/delete" const url = "/gov/project/memoDifficulty/delete"
// const url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyactivity/delete" // const url = "http://yapi.elinkservice.cn/mock/245/gov/project/memoDifficulty/delete"
let ids = [row.id]
let params = { let params = {
id: row.id ids: ids
} }
const { data, code, msg } = await requestPost(url, params) const { data, code, msg } = await requestPost(url, ids)
if (code === 0) { if (code === 0) {
this.$message({ this.$message({
@ -469,14 +357,14 @@ export default {
// //
resetSearch () { resetSearch () {
this.scheduledTimeRange = []
this.timeRange = [] this.timeRange = []
this.formData = { this.formData = {
gridId: '', content: '',//
unitName: '', startTime: '',//yyyy-mm-dd
serviceMatter: '', endTime: '',//yyyy-mm-dd
type: '', scheduledStartTime: '',//yyyy-mm-dd
contact: '', scheduledEndTime: '',// yyyy-mm-dd
contactMobile: ''
} }
this.pageSize = 10 this.pageSize = 10
this.pageNo = 0 this.pageNo = 0
@ -484,23 +372,18 @@ export default {
}, },
// //
async handleExport () { async handleExport (row) {
let title = '联建活动列表' let title = '难点堵点详情'
let url = `/gov/project/memoDifficulty/${row.id}/exportWord`
const url = "/heart/icpartyactivity/export"
let params = {
agencyId: this.agencyId,
...this.formData let params = {}
}
app.ajax.exportFilePost( app.ajax.exportFilePost(
url, url,
params, params,
(data, rspMsg) => { (data, rspMsg) => {
this.download(data, title + '.xls') this.download(data, title + '.doc')
}, },
(rspMsg, data) => { (rspMsg, data) => {
this.$message.error(rspMsg); this.$message.error(rspMsg);
@ -535,72 +418,27 @@ export default {
}, },
// handleScheduledTimeChange (time) {
beforeUpload (file) { if (time) {
this.files = file; this.formData.scheduledStartTime = time[0]
this.formData.scheduledEndTime = time[1]
const isText = file.type === 'application/vnd.ms-excel'
const isTextComputer = file.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
if (!isText && !isTextComputer) {
this.$message.error('请选择正确格式的文件')
return false
} else { } else {
this.fileName = file.name; this.formData.scheduledStartTime = ''
return true this.formData.scheduledEndTime = ''
}
},
//
handleExceed (files, fileList) {
this.$message.warning(`当前限制选择 1 个文件,请删除后继续上传`)
},
async uploadFile () {
this.loading = true
if (this.fileName == "") {
this.$message.warning('请选择要上传的文件!')
return false
}
//
this.$refs['upload'].clearFiles()
var url = '/heart/icpartyactivity/import'
let fileFormData = new FormData();
fileFormData.append('file', this.files);//filenamefiletest.zip
const { data, code, msg } = await requestPost(url, fileFormData)
if (code === 0) {
this.$message({
type: "success",
message: "导入成功"
});
this.loadTable()
} else {
this.$message.error(msg)
} }
}, },
handleTimeChange (time) { handleTimeChange (time) {
if (time) { if (time) {
const startTimeArray = util.dateFormatter(time[0], 'date').split('-') this.formData.startTime = time[0]
const endTimeArray = util.dateFormatter(time[1], 'date').split('-') this.formData.endTime = time[1]
this.formData.startTime = startTimeArray[0] + '-' + startTimeArray[1] + '-' + startTimeArray[2] + ' 00:00:00'
this.formData.endTime = endTimeArray[0] + '-' + endTimeArray[1] + '-' + endTimeArray[2] + ' 23:59:59'
// this.startTimeShow = startTimeArray[0] + '' + startTimeArray[1] + '' + startTimeArray[2] + ''
// this.endTimeShow = endTimeArray[0] + '' + endTimeArray[1] + '' + endTimeArray[2] + ''
} else { } else {
this.formData.startTime = '' this.formData.startTime = ''
this.formData.endTime = '' this.formData.endTime = ''
// this.startTimeShow = ''
// this.endTimeShow = ''
} }
}, },
@ -634,12 +472,10 @@ export default {
computed: { computed: {
tableHeight () { tableHeight () {
return (this.clientHeight - 430) return (this.clientHeight - 380)
}, },
rowHeight () {
return (this.clientHeight - 200) + 'px'
},
...mapGetters(['clientHeight']) ...mapGetters(['clientHeight'])
}, },
watch: { watch: {
@ -665,9 +501,6 @@ export default {
.item_width_1 { .item_width_1 {
width: 260px; width: 260px;
} }
.item_width_2 {
width: 495px;
}
.div_table { .div_table {
background: #ffffff; background: #ffffff;
@ -681,9 +514,6 @@ export default {
} }
} }
.div_btn {
}
.el-row { .el-row {
/* margin-bottom: 20px; */ /* margin-bottom: 20px; */
display: flex; display: flex;
@ -691,4 +521,11 @@ export default {
margin-top: 10px; margin-top: 10px;
margin-right: 50px; margin-right: 50px;
} }
.twoline {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
}
</style> </style>

331
src/views/modules/secretaryLog/humanisticCare/careDetail.vue

@ -1,99 +1,64 @@
<template> <template>
<div> <div>
<div class="dialog-h-content scroll-h"> <div class="dialog-h-content scroll-h div_form">
<el-form ref="ref_form"
:inline="true"
:model="formData"
class="form">
<el-form-item label="服务事项"
label-width="150px"
prop="serviceMatterShow">
<span class="detail_span">{{formData.serviceMatterShow}}</span>
</el-form-item>
<el-form-item label="单位名称"
prop="unitId"
label-width="150px"
style="display: block">
<span class="detail_span">{{formData.unitName}}</span>
</el-form-item>
<el-form-item label="活动标题"
prop="title"
label-width="150px"
style="display: block">
<span class="detail_span">{{formData.title}}</span>
</el-form-item>
<el-form-item label="活动目标"
prop="target"
label-width="150px"
style="display: block">
<span class="detail_span">{{formData.target}}</span>
</el-form-item>
<el-form-item label="活动内容"
prop="target"
label-width="150px"
style="display: block">
<p class="text_p"
v-html="formData.content"></p>
</el-form-item>
<el-form-item label="服务人数"
style="display: block"
prop="peopleCount"
label-width="150px">
<span class="detail_span">{{formData.peopleCount}}</span>
</el-form-item>
<el-form-item label="活动时间"
style="display: block"
prop="activityTime"
label-width="150px">
<span class="detail_span">{{formData.activityTime}}</span>
</el-form-item>
<el-form-item label="活动地址"
prop="address"
label-width="150px"
style="display: block">
<span class="detail_span">{{formData.address}}</span>
</el-form-item>
<el-form-item label="活动坐标"
prop="longitude"
label-width="150px"
style="display: block">
<div style="width:500px">
<div id="app">
<div v-if="formData.concernType"
class="form_item">
<div class="item_title">关怀类型</div>
<div class="item_content"> {{formData.concernType}}</div>
</div>
<div class="form_item">
<div class="item_title">关怀人员</div>
<div class="item_content"> {{formData.resiName}}</div>
</div>
<div v-if="formData.phone"
class="form_item">
<div class="item_title">电话</div>
<div class="item_content"> {{formData.phone}}</div>
</div>
<div v-if="formData.address"
class="form_item">
<div class="item_title">地址</div>
<div class="item_content"> {{formData.address}}</div>
</div> </div>
<div class="form_item">
<div class="item_title">关怀事项</div>
<div class="item_content"> {{formData.content}}</div>
</div> </div>
</el-form-item> <div v-if="formData.scheduledTime"
class="form_item">
<div class="item_title">预计关怀时间</div>
<div class="item_content"> {{formData.scheduledTime}}</div>
</div>
<el-form-item label="活动结果" <div v-if="formData.remindTime"
prop="result" class="form_item">
label-width="150px" <div class="item_title">提醒时间</div>
style="display: block"> <div class="item_content"> {{formData.remindTime}}</div>
</div>
<div v-if="formData.status"
class="form_item">
<div class="item_title">状态</div>
<div class="item_content"> {{formData.status==='0'?'未完成':'已完成'}}</div>
</div>
<div v-if="formData.attachmentList.length>0"
class="form_item">
<div class="item_title">附件</div>
<div>
<div class="attach_item"
v-for="(item, index) in formData.attachmentList"
:key="index">
<i class="el-icon-tickets"></i>
<div class="attach_item_name"
@click="handleFileDownload(item)">{{item.fileName}}</div>
</div>
</div>
<p class="text_p" </div>
v-html="formData.result"></p>
</el-form-item>
</el-form>
</div> </div>
<div class="div_btn"> <div class="div_btn">
@ -101,166 +66,92 @@
@click="handleCancle"> </el-button> @click="handleCancle"> </el-button>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { mapGetters } from 'vuex'
import { Loading } from 'element-ui' // Loading import { Loading } from 'element-ui' // Loading
import { requestPost } from '@/js/dai/request'
var map
var search
var markers
var infoWindowList
var geocoder //
let loading // let loading //
export default { export default {
data () { data () {
return { return {
formData: {},
careId: '',
formData: {
content: '',//怀
concernType: '',//怀
resiName: '',//怀
status: '',// 0 1
phone: '',//
address: '',//
scheduledTime: '',//怀yyyy-mm-dd hh:mm
remindTime: '',//yyyy-mm-dd hh:mm
attachmentList: []
},
} }
}, },
components: {}, components: {},
mounted () { mounted () {
this.initMap()
}, },
methods: { methods: {
handleCancle () {
this.$emit('diaClose')
},
async initForm (row) { async initForm (row) {
this.startLoading() this.startLoading()
for (let item of this.serviceList) {
if (row.serviceMatter === item.value) {
row.serviceMatterShow = item.label
}
}
this.formData = { ...row }
map.setCenter(new TMap.LatLng(this.formData.latitude, this.formData.longitude)) this.careId = row.id
this.setMarker(this.formData.latitude, this.formData.longitude) await this.loadFormData()
this.endLoading() this.endLoading()
}, },
// init async loadFormData () {
initMap () {
//
var center = new window.TMap.LatLng(36.0722275, 120.38945519)
// map TMap.Map()
map = new window.TMap.Map(document.getElementById('app'), {
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) { // const url = 'http://yapi.elinkservice.cn/mock/245/gov/project/memoConcern'
markers.setGeometries([]) const url = '/gov/project/memoConcern'
markers.add([ let params = {
{ id: this.careId,
id: '4', readFlag: '0',
styleId: 'marker',
position: new TMap.LatLng(lat, lng),
properties: {
title: 'marker4'
} }
} const { data, code, msg } = await requestPost(url, params)
]) if (code === 0) {
}, this.formData = data
handleSearchMap () {
infoWindowList.forEach((infoWindow) => {
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 { } else {
this.$message.error('未检索到相关位置坐标') this.$message.error(msg)
} }
})
}, },
handleMoveCenter () { handleCancle () {
//
const center = map.getCenter()
const lat = center.getLat() this.$emit('diaClose')
const lng = center.getLng()
this.formData.latitude = lat
this.formData.longitude = lng
this.setMarker(lat, lng)
this.convert(lat, lng)
},
convert (lat, lng) {
markers.setGeometries([]);
// 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 handleFileDownload (file) {
//
}); var a = document.createElement('a');
var event = new MouseEvent('click');
a.download = file.fileName;
console.log(a)
a.href = file.attachmentUrl;
a.dispatchEvent(event);
}, },
// //
startLoading () { startLoading () {
loading = Loading.service({ loading = Loading.service({
@ -278,34 +169,14 @@ export default {
} }
}, },
computed: {}, computed: {},
props: { props: {}
serviceList: {
type: Array,
default: []
},
}
} }
</script> </script>
<style lang="scss" scoped > <style lang="scss" scoped >
@import "@/assets/scss/modules/visual/communityManageForm.scss"; @import "@/assets/scss/modules/management/secretaryLog.scss";
</style> </style>
<style lang="scss" scoped> <style lang="scss" scoped>
.detail_span {
width: 500px;
font-weight: bold;
text-align: left;
margin: 0 0;
font-size: 16px;
}
.text_p {
margin: 0 0;
border: 3px;
> p {
margin: 0 0;
}
}
</style> </style>

240
src/views/modules/secretaryLog/humanisticCare/careForm.vue

@ -6,50 +6,49 @@
:inline="true" :inline="true"
:model="formData" :model="formData"
:rules="dataRule" :rules="dataRule"
:disabled="formType === 'detail'"
class="form"> class="form">
<el-form-item label="关怀类型" <el-form-item label="关怀类型"
prop="title" prop="concernType"
label-width="150px" label-width="150px"
style="display: block"> style="display: block">
<el-input class="item_width_2" <el-input class="item_width_2"
placeholder="请输入关怀类型" placeholder="请输入关怀类型"
v-model="formData.title"> v-model="formData.concernType">
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="关怀人员" <el-form-item label="关怀人员"
prop="title" prop="resiName"
label-width="150px" label-width="150px"
style="display: block"> style="display: block">
<el-input class="item_width_2" <el-input class="item_width_2"
placeholder="请输入关怀人员" placeholder="请输入关怀人员"
v-model="formData.title"> v-model="formData.resiName">
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="电话" <el-form-item label="电话"
prop="title" prop="phone"
label-width="150px" label-width="150px"
style="display: block"> style="display: block">
<el-input class="item_width_2" <el-input class="item_width_2"
placeholder="请输入电话" placeholder="请输入电话"
v-model="formData.title"> v-model="formData.phone">
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="地址" <el-form-item label="地址"
prop="title" prop="address"
label-width="150px" label-width="150px"
style="display: block"> style="display: block">
<el-input class="item_width_1" <el-input class="item_width_1"
placeholder="请输入地址" placeholder="请输入地址"
v-model="formData.title"> v-model="formData.address">
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="关怀事项" <el-form-item label="关怀事项"
prop="target" prop="content"
label-width="150px" label-width="150px"
style="display: block"> style="display: block">
<el-input class="item_width_1" <el-input class="item_width_1"
@ -58,27 +57,29 @@
show-word-limit show-word-limit
:rows="3" :rows="3"
placeholder="请输入关怀事项" placeholder="请输入关怀事项"
v-model="formData.target"></el-input> v-model="formData.content"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="预计关怀时间" <el-form-item label="预计关怀时间"
style="display: block" style="display: block"
prop="activityTime" prop="scheduledTime"
label-width="150px"> label-width="150px">
<el-date-picker class="item_width_1" <el-date-picker class="item_width_2"
v-model="formData.activityTime" v-model="formData.scheduledTime"
value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd HH:mm"
value-format="yyyy-MM-dd HH:mm"
type="datetime" type="datetime"
placeholder="选择时间"> placeholder="选择时间">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="提醒时间" <el-form-item label="提醒时间"
style="display: block" style="display: block"
prop="activityTime" prop="remindTime"
label-width="150px"> label-width="150px">
<el-date-picker class="item_width_1" <el-date-picker class="item_width_2"
v-model="formData.activityTime" v-model="formData.remindTime"
value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd HH:mm"
value-format="yyyy-MM-dd HH:mm"
type="datetime" type="datetime"
placeholder="选择时间"> placeholder="选择时间">
</el-date-picker> </el-date-picker>
@ -86,10 +87,10 @@
<el-form-item label="状态" <el-form-item label="状态"
label-width="150px" label-width="150px"
prop="serviceMatterList"> prop="status">
<el-select class="item_width_2" <el-select class="item_width_2"
v-model="formData.serviceMatter" v-model="formData.status"
placeholder="请选择" placeholder="请选择"
clearable> clearable>
<el-option class="item_width_2" <el-option class="item_width_2"
@ -103,13 +104,13 @@
</el-form-item> </el-form-item>
<el-form-item class="block" <el-form-item class="block"
label-width="150px"
style="display: block" style="display: block"
label="添加附件" label="添加附件"
prop="attach"> prop="attach">
<el-upload class="upload-demo" <el-upload class="upload-demo"
:action="uploadUlr" :action="uploadUlr"
:data="{customerId:customerId}"
accept=".doc,.pdf,.xls,.docx,.xlsx" accept=".doc,.pdf,.xls,.docx,.xlsx"
:on-success="handleFileSuccess" :on-success="handleFileSuccess"
:on-remove="handleFileRemove" :on-remove="handleFileRemove"
@ -118,9 +119,10 @@
:before-upload="beforeUpload" :before-upload="beforeUpload"
:file-list="fileList"> :file-list="fileList">
<el-button size="small" <el-button size="small"
:disabled="fileList.length==3"
type="primary">点击上传</el-button> type="primary">点击上传</el-button>
<div slot="tip" <div slot="tip"
class="el-upload__tip">只能上传wordexcelpdf文件</div> class="el-upload__tip">最多三个附件只能上传wordexcelpdf文件</div>
</el-upload> </el-upload>
</el-form-item> </el-form-item>
@ -131,7 +133,6 @@
<el-button size="small" <el-button size="small"
@click="handleCancle"> </el-button> @click="handleCancle"> </el-button>
<el-button size="small" <el-button size="small"
v-if="formType != 'detail'"
type="primary" type="primary"
:disabled="btnDisable" :disabled="btnDisable"
@click="handleComfirm"> </el-button> @click="handleComfirm"> </el-button>
@ -154,44 +155,33 @@ export default {
formType: 'add', // addeditdetail formType: 'add', // addeditdetail
stateList: [ stateList: [
{ {
value: '1', value: 1,
label: '已完成' label: '已完成'
}, },
{ {
value: '2', value: 0,
label: '未完成' label: '未完成'
}, },
], ],
btnDisable: false, btnDisable: false,
activityId: '', careId: '',
formData: { formData: {
serviceMatter: '',// content: '',//怀
serviceMatterList: [], concernType: '',//怀
unitId: '',//ID resiName: '',//怀
unitIdList: [], status: '',// 0 1
title: '',// phone: '',//
target: '',// address: '',//
content: '',// scheduledTime: '',//怀yyyy-mm-dd hh:mm
activityTime: '',// remindTime: '',//yyyy-mm-dd hh:mm
peopleCount: 0,// attachmentList: []
result: '', // },
}, fileList: [],
serviceList: [], uploadUlr: window.SITE_CONFIG['apiURL'] + '/oss/file/uploadvariedfile',
fileList: [
// {
// name: 'food.jpeg',
// url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'
// }, {
// name: 'food2.jpeg',
// url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'
// }
],
uploadUlr: window.SITE_CONFIG['apiURL'] + '/oss/file/upload-guide-file',
dialogImageUrl: '', dialogImageUrl: '',
dialogVisible: false dialogVisible: false
@ -204,27 +194,46 @@ export default {
methods: { methods: {
async initForm (type, careId) {
async initForm (type, activityId) {
this.startLoading() this.startLoading()
this.$refs.ref_form.resetFields(); this.$refs['ref_form'].resetFields();
//
await this.loadService()
this.formType = type this.formType = type
if (activityId) { if (careId) {
this.activityId = activityId this.careId = careId
this.formData.id = activityId this.formData.id = careId
await this.loadFormData() await this.loadFormData()
} else {
} }
this.endLoading() this.endLoading()
}, },
async loadFormData () {
// const url = 'http://yapi.elinkservice.cn/mock/245/gov/project/memoConcern'
const url = '/gov/project/memoConcern'
let params = {
id: this.careId,
readFlag: '0',
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.formData = data
if (data.attachmentList) {
data.attachmentList.forEach(element => {
element.name = element.fileName
element.type = element.attachmentType
element.size = element.attachmentSize
});
this.fileList = data.attachmentList
}
} else {
this.$message.error(msg)
}
},
async handleComfirm () { async handleComfirm () {
this.btnDisable = true this.btnDisable = true
@ -236,15 +245,39 @@ export default {
app.util.validateRule(messageObj) app.util.validateRule(messageObj)
this.btnDisable = false this.btnDisable = false
} else { } else {
this.addActivity()
this.addCare()
} }
}) })
}, },
async addActivity () { async addCare () {
let url = '/heart/icpartyactivity/save'
// let url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyactivity/save" const regPhone = /^1(3|4|5|6|7|8|9)\d{9}$/; //
// if (regPhone.test(this.formData.mobile) === false) {
// this.btnDisable = false
// this.$message({
// type: 'warning',
// message: ''
// })
// return false;
// }
if (this.fileList.length > 0) {
this.formData.attachmentList = this.fileList
}
let url = ''
if (this.formType === 'add') {
url = '/gov/project/memoConcern/save'
// url = "http://yapi.elinkservice.cn/mock/245/gov/project/memoConcern/save"
this.formData.id = ''
} else {
url = '/gov/project/memoConcern/update'
// url = "http://yapi.elinkservice.cn/mock/245/gov/project/memoConcern/update"
}
const { data, code, msg } = await requestPost(url, this.formData) const { data, code, msg } = await requestPost(url, this.formData)
@ -284,14 +317,6 @@ export default {
return false return false
} }
// if (!isLt2M) {
// this.$message.warning(' 5MB!')
// return
// }
// return false // false
}, },
handleFileRemove (file) { handleFileRemove (file) {
@ -307,8 +332,12 @@ export default {
const array = file.name.split('.') const array = file.name.split('.')
const fileType = array[array.length - 1] const fileType = array[array.length - 1]
file.url = res.data.url file.fileName = file.name
file.type = fileType file.attachmentUrl = res.data.url
file.attachmentSize = file.size
file.attachmentType = 'doc'
file.attachmentFormat = fileType
this.fileList.push(file) this.fileList.push(file)
console.log(this.fileList) console.log(this.fileList)
} else this.$message.error(res.msg) } else this.$message.error(res.msg)
@ -328,19 +357,18 @@ export default {
}, },
resetData () { resetData () {
this.activityId = '' this.careId = ''
this.formData = { this.formData = {
serviceMatter: '',// content: '',//怀
serviceMatterList: [], concernType: '',//怀
unitId: '',//ID resiName: '',//怀
unitIdList: [], status: '',// 0 1
title: '',// phone: '',//
target: '',// address: '',//
content: '',// scheduledTime: '',//怀yyyy-mm-dd hh:mm
activityTime: '',// remindTime: '',//yyyy-mm-dd hh:mm
peopleCount: 0,// attachmentList: []
result: '', //
} }
}, },
@ -363,42 +391,38 @@ export default {
computed: { computed: {
dataRule () { dataRule () {
return { return {
serviceMatterList: [ resiName: [
{ required: true, message: '服务事项不能为空', trigger: 'blur' } { required: true, message: '关怀人员不能为空', trigger: 'blur' }
], ],
unitIdList: [ content: [
{ required: true, message: '单位名称不能为空', trigger: 'blur' }, { required: true, message: '关怀事项不能为空', trigger: 'blur' },
], ],
title: [ concernType: [
{ required: true, message: '活动标题不能为空', trigger: 'blur' } { required: false },
], ],
status: [
target: [ { required: false },
{ required: true, message: '活动目标不能为空', trigger: 'blur' }
], ],
content: [ phone: [
{ required: true, message: '活动内容不能为空', trigger: 'blur' } { required: false },
],
address: [
{ required: false },
], ],
activityTime: [ scheduledTime: [
{ required: true, message: '活动时间不能为空', trigger: 'blur' } { required: false },
], ],
result: [ remindTime: [
{ required: true, message: '活动结果不能为空', trigger: 'blur' } { required: false },
], ],
longitude: [
{ required: true, message: '坐标不能为空', trigger: 'blur' }
]
} }
}, },
}, },
props: { props: {
unitList: {
type: Array,
default: []
},
// serviceList: { // serviceList: {
// type: Array, // type: Array,

295
src/views/modules/secretaryLog/humanisticCare/careList.vue

@ -7,8 +7,8 @@
:label-width="'100px'"> :label-width="'100px'">
<div> <div>
<el-form-item label="关怀类型" <el-form-item label="关怀类型"
prop="title"> prop="concernType">
<el-input v-model="formData.title" <el-input v-model="formData.concernType"
size="small" size="small"
class="item_width_1" class="item_width_1"
clearable clearable
@ -17,8 +17,8 @@
</el-form-item> </el-form-item>
<el-form-item label="关怀人员" <el-form-item label="关怀人员"
prop="title"> prop="resiName">
<el-input v-model="formData.title" <el-input v-model="formData.resiName"
size="small" size="small"
class="item_width_1" class="item_width_1"
clearable clearable
@ -27,8 +27,8 @@
</el-form-item> </el-form-item>
<el-form-item label="关怀事项" <el-form-item label="关怀事项"
prop="title"> prop="content">
<el-input v-model="formData.title" <el-input v-model="formData.content"
size="small" size="small"
class="item_width_1" class="item_width_1"
clearable clearable
@ -38,13 +38,13 @@
</el-form-item> </el-form-item>
<el-form-item label="状态" <el-form-item label="状态"
prop="unitId"> prop="status">
<el-select class="item_width_1" <el-select class="item_width_1"
v-model="formData.unitId" v-model="formData.status"
size="small" size="small"
placeholder="全部" placeholder="全部"
clearable> clearable>
<el-option v-for="item in unitList" <el-option v-for="item in stateList"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value"> :value="item.value">
@ -57,12 +57,12 @@
<div> <div>
<el-form-item label="预计关怀时间" <el-form-item label="预计关怀时间"
prop="startTime"> prop="scheduledStartTime">
<el-date-picker v-model="timeRange" <el-date-picker v-model="scheduledTimeRange"
size="small" size="small"
type="daterange" type="daterange"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd"
@change="handleTimeChange" @change="handleScheduledTimeChange"
range-separator="至" range-separator="至"
start-placeholder="开始时间" start-placeholder="开始时间"
end-placeholder="结束时间"> end-placeholder="结束时间">
@ -74,7 +74,7 @@
<el-date-picker v-model="timeRange" <el-date-picker v-model="timeRange"
size="small" size="small"
type="daterange" type="daterange"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd"
@change="handleTimeChange" @change="handleTimeChange"
range-separator="至" range-separator="至"
start-placeholder="开始时间" start-placeholder="开始时间"
@ -115,56 +115,60 @@
align="center" align="center"
type="index" type="index"
width="50"></el-table-column> width="50"></el-table-column>
<el-table-column prop="unitName" <el-table-column prop="concernType"
header-align="center" header-align="center"
align="center" align="center"
label="关怀类型" label="关怀类型"
width="180"> width="180">
</el-table-column> </el-table-column>
<el-table-column prop="title" <el-table-column prop="resiName"
header-align="center" header-align="center"
align="center" align="center"
label="关怀人员" label="关怀人员"
min-width="120"> min-width="120">
</el-table-column> </el-table-column>
<el-table-column prop="address" <el-table-column prop="phnoe"
header-align="center" header-align="center"
align="center" align="center"
label="电话" label="电话"
width="120"> width="120">
</el-table-column> </el-table-column>
<el-table-column prop="peopleCount" <el-table-column prop="address"
header-align="center" header-align="center"
align="center" align="center"
label="地址" label="地址"
min-width="150"> min-width="150">
</el-table-column> </el-table-column>
<el-table-column prop="activityTime" <el-table-column prop="content"
header-align="center" header-align="center"
align="center" align="center"
label="关怀事项" label="关怀事项"
min-width="200"> min-width="200">
</el-table-column> </el-table-column>
<el-table-column prop="activityTime" <el-table-column prop="scheduledTime"
header-align="center" header-align="center"
align="center" align="center"
label="预计关怀时间" label="预计关怀时间"
width="170"> width="170">
</el-table-column> </el-table-column>
<el-table-column prop="activityTime" <el-table-column prop="remindTime"
header-align="center" header-align="center"
align="center" align="center"
label="提醒时间" label="提醒时间"
width="170"> width="170">
</el-table-column> </el-table-column>
<el-table-column prop="activityTime" <el-table-column prop="status"
header-align="center" header-align="center"
align="center" align="center"
label="状态" label="状态"
width="80"> width="80">
<template slot-scope="scope">
<div>{{scope.row.status===0?'未完成':'已完成'}}</div>
</template>
</el-table-column> </el-table-column>
<el-table-column prop="activityTime" <el-table-column prop="createdTime"
header-align="center" header-align="center"
align="center" align="center"
label="创建时间" label="创建时间"
@ -180,22 +184,22 @@
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" <el-button type="text"
style="color:#1C6AFD;text-decoration: underline;" class="div-table-button--detail"
size="small" size="small"
@click="handleDetail(scope.row)">查看</el-button> @click="handleDetail(scope.row)">查看</el-button>
<el-button v-if="!scope.row.actId" <el-button v-if="!scope.row.actId"
type="text" type="text"
style="color:#00A7A9;text-decoration: underline;" class="div-table-button--edit"
size="small" size="small"
@click="handleEdit(scope.row)">修改</el-button> @click="handleEdit(scope.row)">修改</el-button>
<el-button v-if="!scope.row.actId" <el-button v-if="!scope.row.actId"
type="text" type="text"
style="color:#00A7A9;text-decoration: underline;" class="div-table-button--detail"
size="small" size="small"
@click="handleEdit(scope.row)">导出</el-button> @click="handleExport(scope.row)">导出</el-button>
<el-button type="text" <el-button type="text"
style="color:#D51010;text-decoration: underline;" class="div-table-button--delete"
size="small" size="small"
@click="handleDelete(scope.row)">删除</el-button> @click="handleDelete(scope.row)">删除</el-button>
</template> </template>
@ -223,7 +227,6 @@
class="dialog-h" class="dialog-h"
@closed="diaClose"> @closed="diaClose">
<care-form ref="ref_form" <care-form ref="ref_form"
:unitList="unitList"
@dialogCancle="addFormCancle" @dialogCancle="addFormCancle"
@dialogOk="addFormOk"></care-form> @dialogOk="addFormOk"></care-form>
</el-dialog> </el-dialog>
@ -231,13 +234,12 @@
<el-dialog :visible.sync="detailShow" <el-dialog :visible.sync="detailShow"
:close-on-click-modal="false" :close-on-click-modal="false"
:close-on-press-escape="false" :close-on-press-escape="false"
:title="'活动详情'" :title="'详情'"
width="950px" width="950px"
top="5vh" top="5vh"
class="dialog-h" class="dialog-h"
@closed="detailClosed"> @closed="diaClose">
<care-detail ref="ref_detail" <care-detail ref="ref_detail"
:serviceList="serviceList"
@diaClose="diaClose"></care-detail> @diaClose="diaClose"></care-detail>
</el-dialog> </el-dialog>
@ -262,53 +264,38 @@ export default {
pageSize: 10, pageSize: 10,
pageNo: 0, pageNo: 0,
tableLoading: false, tableLoading: false,
agencyId: '',
unitList: [],//list stateList: [
serviceList: [
{
id: "1",
name: '积极配合社区安全巡查员进行场所消防、安全等方面的检查。'
},
{
id: "2",
name: '积极配合'
},
{ {
id: "3", value: 1,
name: '积极配合社区安全巡查员进行' label: '已完成'
}, },
{ {
id: "4", value: 0,
name: '积极配合社区安全巡查员进行场所消防、安全等方面的检查。并具备安全意识及设备设施' label: '未完成'
},
],//list
pickerOptions: { //
disabledDate (time) {
return time.getTime() > (Date.now() - (24 * 60 * 60 * 1000))
}
}, },
],
scheduledTimeRange: [],
timeRange: [], timeRange: [],
unitId: '',
formData: { formData: {
unitId: '', content: '',//怀
title: '', concernType: '',//怀
serviceMatter: '', resiName: '',//怀
startTime: '', status: '',// 0 1
endTime: '' startTime: '',// yyyy-mm-dd
endTime: '',// yyyy-mm-dd
scheduledStartTime: '',//怀 yyyy-mm-dd
scheduledEndTime: '',//怀 yyyy-mm-dd
}, },
tableData: [], tableData: [],
//form //form
formShow: false, formShow: false,
formTitle: '新增活动', formTitle: '新增',
detailShow: false, detailShow: false,
files: "",
fileName: "",
uploadUlr: window.SITE_CONFIG['apiURL'] + '/gov/org/neighborhood/import'
} }
}, },
components: { components: {
@ -318,14 +305,7 @@ export default {
}, },
async mounted () { async mounted () {
//
await this.loadService()
const { user } = this.$store.state
this.agencyId = user.agencyId
//
await this.loadUnit()
// //
await this.loadTable() await this.loadTable()
}, },
@ -335,52 +315,12 @@ export default {
this.loadTable() this.loadTable()
}, },
async loadUnit () {
const url = "/heart/icpartyunit/option"
// const url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyunit/option"
let params = {
agencyId: this.agencyId
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.unitList = data
} else {
this.$message.error(msg)
}
},
//
async loadService () {
const url = "/heart/serviceitem/dict-list"
let params = {
// parentCategoryCode: '1010'
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.serviceList = data
} else {
this.$message.error(msg)
}
},
async loadTable () { async loadTable () {
this.tableLoading = true this.tableLoading = true
const url = "/heart/icpartyactivity/search" const url = "/gov/project/memoConcern/page"
// const url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyactivity/list" // const url = "http://yapi.elinkservice.cn/mock/245/gov/project/memoConcern/page"
let params = { let params = {
agencyId: this.agencyId,
pageSize: this.pageSize, pageSize: this.pageSize,
pageNo: this.pageNo, pageNo: this.pageNo,
...this.formData ...this.formData
@ -400,21 +340,23 @@ export default {
diaClose () { diaClose () {
this.$refs.ref_form.resetData() if (this.formShow) {
// this.$refs.ref_form.resetData()
this.formShow = false this.formShow = false
}, } else {
detailClosed () {
this.detailShow = false this.detailShow = false
}
}, },
handleDetail (row) { handleDetail (row) {
// this.detailShow = true this.detailShow = true
this.formTitle = '详情' this.formTitle = '详情'
this.formShow = true
this.$nextTick(() => { this.$nextTick(() => {
// this.$refs.ref_detail.initForm(row) this.$refs.ref_detail.initForm(row)
this.$refs.ref_form.initForm('detail', row.id)
}) })
}, },
@ -451,7 +393,7 @@ export default {
type: "warning" type: "warning"
}) })
.then(() => { .then(() => {
this.deleteActivity(row) this.deleteCare(row)
}) })
.catch(err => { .catch(err => {
if (err == "cancel") { if (err == "cancel") {
@ -461,15 +403,15 @@ export default {
}); });
}, },
async deleteActivity (row) { async deleteCare (row) {
const url = "/heart/icpartyactivity/delete" const url = "/gov/project/memoConcern/delete"
// const url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyactivity/delete" // const url = "http://yapi.elinkservice.cn/mock/245/gov/project/memoConcern/delete"
let ids = [row.id]
let params = { let params = {
id: row.id ids: ids
} }
const { data, code, msg } = await requestPost(url, params) const { data, code, msg } = await requestPost(url, ids)
if (code === 0) { if (code === 0) {
this.$message({ this.$message({
@ -485,14 +427,17 @@ export default {
// //
resetSearch () { resetSearch () {
this.scheduledTimeRange = []
this.timeRange = [] this.timeRange = []
this.formData = { this.formData = {
gridId: '', content: '',//怀
unitName: '', concernType: '',//怀
serviceMatter: '', resiName: '',//怀
type: '', status: '',// 0 1
contact: '', startTime: '',// yyyy-mm-dd
contactMobile: '' endTime: '',// yyyy-mm-dd
scheduledStartTime: '',//怀 yyyy-mm-dd
scheduledEndTime: '',//怀 yyyy-mm-dd
} }
this.pageSize = 10 this.pageSize = 10
this.pageNo = 0 this.pageNo = 0
@ -500,23 +445,18 @@ export default {
}, },
// //
async handleExport () { async handleExport (row) {
let title = '联建活动列表' let title = '人员关怀'
const url = "/heart/icpartyactivity/export" let url = `/gov/project/memoConcern/${row.id}/exportWord`
let params = { let params = {}
agencyId: this.agencyId,
...this.formData
}
app.ajax.exportFilePost( app.ajax.exportFilePost(
url, url,
params, params,
(data, rspMsg) => { (data, rspMsg) => {
this.download(data, title + '.xls') this.download(data, title + '.doc')
}, },
(rspMsg, data) => { (rspMsg, data) => {
this.$message.error(rspMsg); this.$message.error(rspMsg);
@ -551,72 +491,27 @@ export default {
}, },
// handleScheduledTimeChange (time) {
beforeUpload (file) { if (time) {
this.files = file; this.formData.scheduledStartTime = time[0]
this.formData.scheduledEndTime = time[1]
const isText = file.type === 'application/vnd.ms-excel'
const isTextComputer = file.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
if (!isText && !isTextComputer) {
this.$message.error('请选择正确格式的文件')
return false
} else { } else {
this.fileName = file.name; this.formData.scheduledStartTime = ''
return true this.formData.scheduledEndTime = ''
}
},
//
handleExceed (files, fileList) {
this.$message.warning(`当前限制选择 1 个文件,请删除后继续上传`)
},
async uploadFile () {
this.loading = true
if (this.fileName == "") {
this.$message.warning('请选择要上传的文件!')
return false
}
//
this.$refs['upload'].clearFiles()
var url = '/heart/icpartyactivity/import'
let fileFormData = new FormData();
fileFormData.append('file', this.files);//filenamefiletest.zip
const { data, code, msg } = await requestPost(url, fileFormData)
if (code === 0) {
this.$message({
type: "success",
message: "导入成功"
});
this.loadTable()
} else {
this.$message.error(msg)
} }
}, },
handleTimeChange (time) { handleTimeChange (time) {
if (time) { if (time) {
const startTimeArray = util.dateFormatter(time[0], 'date').split('-') this.formData.startTime = time[0]
const endTimeArray = util.dateFormatter(time[1], 'date').split('-') this.formData.endTime = time[1]
this.formData.startTime = startTimeArray[0] + '-' + startTimeArray[1] + '-' + startTimeArray[2] + ' 00:00:00'
this.formData.endTime = endTimeArray[0] + '-' + endTimeArray[1] + '-' + endTimeArray[2] + ' 23:59:59'
// this.startTimeShow = startTimeArray[0] + '' + startTimeArray[1] + '' + startTimeArray[2] + ''
// this.endTimeShow = endTimeArray[0] + '' + endTimeArray[1] + '' + endTimeArray[2] + ''
} else { } else {
this.formData.startTime = '' this.formData.startTime = ''
this.formData.endTime = '' this.formData.endTime = ''
// this.startTimeShow = ''
// this.endTimeShow = ''
} }
}, },
@ -653,9 +548,7 @@ export default {
return (this.clientHeight - 430) return (this.clientHeight - 430)
}, },
rowHeight () {
return (this.clientHeight - 200) + 'px'
},
...mapGetters(['clientHeight']) ...mapGetters(['clientHeight'])
}, },
watch: { watch: {

Loading…
Cancel
Save