diff --git a/src/views/modules/secretaryLog/difficulty/difficultyDetail.vue b/src/views/modules/secretaryLog/difficulty/difficultyDetail.vue new file mode 100644 index 000000000..8e9796692 --- /dev/null +++ b/src/views/modules/secretaryLog/difficulty/difficultyDetail.vue @@ -0,0 +1,311 @@ + + + + + + + + {{formData.serviceMatterShow}} + + + + + {{formData.unitName}} + + + + + {{formData.title}} + + + + + {{formData.target}} + + + + + + + + + {{formData.peopleCount}} + + + + {{formData.activityTime}} + + + + + {{formData.address}} + + + + + + + + + + + + + + + + + + + + + + + + + 取 消 + + + + + + + + + + + + diff --git a/src/views/modules/secretaryLog/difficulty/difficultyForm.vue b/src/views/modules/secretaryLog/difficulty/difficultyForm.vue new file mode 100644 index 000000000..b67083433 --- /dev/null +++ b/src/views/modules/secretaryLog/difficulty/difficultyForm.vue @@ -0,0 +1,604 @@ + + + + + + + + + + {{item.label}} + + + + + + + + + + {{item.label}} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 查询 + + + + + 经度 + + + 纬度 + + + + + + + + + + + + + + + + + + + + + + + + + 取 消 + 确 定 + + + + + + + + + + diff --git a/src/views/modules/secretaryLog/difficulty/difficultyList.vue b/src/views/modules/secretaryLog/difficulty/difficultyList.vue new file mode 100644 index 000000000..89aac3c1b --- /dev/null +++ b/src/views/modules/secretaryLog/difficulty/difficultyList.vue @@ -0,0 +1,694 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 查询 + 重置 + + + + + + 新增 + + + + + + + + + + + + + + + + + + + + + 小程序 + 管理平台 + + + + + + + 查看 + 修改 + + 删除 + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/modules/secretaryLog/humanisticCare/careForm.vue b/src/views/modules/secretaryLog/humanisticCare/careForm.vue index b67083433..745b01b00 100644 --- a/src/views/modules/secretaryLog/humanisticCare/careForm.vue +++ b/src/views/modules/secretaryLog/humanisticCare/careForm.vue @@ -9,69 +9,46 @@ :disabled="formType === 'detail'" class="form"> - - - - {{item.label}} - - - - - + style="display: block"> + + - - - {{item.label}} - - - + + - + + + + - @@ -80,114 +57,73 @@ maxlength="100" show-word-limit :rows="3" - placeholder="请输入活动目标,不超过100字" + placeholder="请输入关怀事项" v-model="formData.target"> - - - - - - - - - + + - - - - - - - - - - - - - 查询 - - - - - 经度 - - - 纬度 - - - - - - - + prop="serviceMatterList"> - - + + + + - - - - - - + + + + 点击上传 + 只能上传word、excel、pdf文件 + + @@ -207,23 +143,28 @@ import { mapGetters } from 'vuex' import { Loading } from 'element-ui' // 引入Loading服务 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 // 加载动画 export default { data () { return { formType: 'add', //表单操作类型 add新增,edit编辑,detail详情 + stateList: [ + { + value: '1', + label: '已完成' + }, + { + value: '2', + label: '未完成' + }, + ], btnDisable: false, - keyWords: '', activityId: '', formData: { serviceMatter: '',//服务事项 @@ -236,21 +177,34 @@ export default { activityTime: '',//活动时间 peopleCount: 0,//服务人数 result: '', //活动结果 - address: '', //详细地址 - longitude: 36.0722275, //经度 - latitude: 120.38945519 //纬度 + + }, - serviceList: [] + serviceList: [], + + 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: '', + dialogVisible: false } }, - components: { Tinymce }, + components: {}, mounted () { - this.initMap() + }, methods: { + async initForm (type, activityId) { this.startLoading() this.$refs.ref_form.resetFields(); @@ -264,60 +218,13 @@ export default { this.formData.id = activityId await this.loadFormData() } else { - map.setCenter(new TMap.LatLng(36.0722275, 120.38945519)) - this.setMarker(36.0722275, 120.38945519) - } - 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) } + this.endLoading() }, - //加载组织 - async loadFormData () { - const url = '/heart/icpartyactivity/detail' - // const url = 'http://yapi.elinkservice.cn/mock/245/heart/icpartyactivity/detail' - let params = { - id: this.activityId - } - - const { data, code, msg } = await requestPost(url, params) - - if (code === 0) { - 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(/ { - this.handleMoveCenter() - }) - this.handleMoveCenter() - this.convert() - }, + // if (!isLt2M) { + // this.$message.warning('上传模板大小不能超过 5MB!') + // return + // } - setMarker (lat, lng) { - markers.setGeometries([]) - markers.add([ - { - id: '4', - styleId: 'marker', - position: new TMap.LatLng(lat, lng), - properties: { - title: 'marker4' - } - } - ]) + // return false // 返回false不会自动上传 }, - 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 { - this.$message.error('未检索到相关位置坐标') - } - }) + handleFileRemove (file) { + + if (file && file.status === "success") { + this.fileList.splice(this.fileList.findIndex(item => item.uid === file.uid), 1) + } }, - 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) + handleFileSuccess (res, file) { + + if (res.code === 0 && res.msg === 'success') { + const array = file.name.split('.') + const fileType = array[array.length - 1] + + file.url = res.data.url + file.type = fileType + this.fileList.push(file) + console.log(this.fileList) + } else this.$message.error(res.msg) }, - 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.name; + console.log(a) + a.href = file.url; + a.dispatchEvent(event); + + }, resetData () { this.activityId = '' - this.keyWords = '' + this.formData = { serviceMatter: '',//服务事项 serviceMatterList: [], @@ -488,9 +341,7 @@ export default { activityTime: '',//活动时间 peopleCount: 0,//服务人数 result: '', //活动结果 - address: '', //详细地址 - longitude: 36.0722275, //经度 - latitude: 120.38945519 //纬度 + } }, // 开启加载动画 @@ -534,9 +385,7 @@ export default { result: [ { required: true, message: '活动结果不能为空', trigger: 'blur' } ], - address: [ - { required: true, message: '详细地址不能为空', trigger: 'blur' } - ], + longitude: [ { required: true, message: '坐标不能为空', trigger: 'blur' } ] @@ -566,31 +415,11 @@ export default {